-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Extension: MIDI #1637
New Extension: MIDI #1637
Conversation
Since this is still in its very early stages, it has more room for updates. Right now it only supports MIDI input, and even then only the detection of keys. Future plans include other MIDI input events such as pedals, pitch bend, or other keyboard controls and MIDI output devices. Also, the extension isn't compatible with browsers that don't support the MIDI API, most notably Safari. It will alert the user if their browser is not compatible, but the extension will not load after that. |
- Add event listener to detect when a MIDI device is connected or disconnected and update arrays accordingly instead of only when the extension loads - Fix "last note released" not returning the right values/not working
Remove unnecessary console log
- Fix is note on block always returning false
- restore content block: do nothing if the costume wasn't changed - remove unnecessary emitTargetsUpdate - try/catch invalid SVGs
Co-authored-by: Muffin <[email protected]>
Fixes type error in setTextContent Makes querySelector related blocks also be able to get their parent - e.g. querying a on <a /> will return the expected result Adds "inner elements of" and "set inner elements of" blocks for interacting with innerHTML
As I said in the thread, let me know when you're ready with this extension, and I'll go ahead with the formalities. |
Ok. It's ready to merge now. There may be a few undiscovered bugs because it was written quickly but in my testing it works great. I tried to fix format but I couldn't get prettier to work so if you could help me with that I'd appreciate it. |
@CubesterYT I'm ready for this whenever you are |
by appending them into the DOM in a place that doesn't have display: none; seems to fix TurboWarp/scratch-render#12
…1718) The code intended to delete the skins from the renderer when running the "delete all skins" block, but since it tried to iterate through the object like an array instead of iterating through the keys, it didn't work. This fixes a memory leak in the Skins extension. (Also changes the `createdSkins` variable from an array into an object, since it's used with string keys.)
So I've run the npx prettier write command on my file and re-committed but it still says format failed. I have the same config and prettier version as the repo, so I don't really know what's wrong. I'll let someone else deal with format when this gets reviewed |
To make it more... uh, professional. ✨
Add "MasterMath/midi"
- Add event listener to detect when a MIDI device is connected or disconnected and update arrays accordingly instead of only when the extension loads - Fix "last note released" not returning the right values/not working
Remove unnecessary console log
- Fix is note on block always returning false
This is a very small and simple extension that adds MIDI input handling. While it could be updated to support MIDI output controlling in the future, that functionality is not currently supported. This extension was written very quickly and it's my first pull request so the quality may not be the best, but here's a quick look:
I also have a sample project ready to include but I'm going to wait until the extension is released before I add that to the repository.