Skip to content
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

Closed
wants to merge 51 commits into from
Closed

Conversation

Brackets-Coder
Copy link

@Brackets-Coder Brackets-Coder commented Jul 31, 2024

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:
Screenshot 2024-07-30 at 9 46 34 PM
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.

@Brackets-Coder
Copy link
Author

Brackets-Coder commented Jul 31, 2024

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.

Brackets-Coder and others added 14 commits July 31, 2024 07:49
- 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
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
@CubesterYT
Copy link
Collaborator

As I said in the thread, let me know when you're ready with this extension, and I'll go ahead with the formalities.

@Brackets-Coder
Copy link
Author

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.

@Brackets-Coder
Copy link
Author

As I said in the thread, let me know when you're ready with this extension, and I'll go ahead with the formalities.

@CubesterYT I'm ready for this whenever you are

GarboMuffin and others added 7 commits September 7, 2024 17:55
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.)
@Brackets-Coder
Copy link
Author

Brackets-Coder commented Oct 13, 2024

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

dependabot bot and others added 2 commits October 13, 2024 22:04
#1709)

Reverts #1257.

Adding a delay to `revokeObjectURL` didn't help at all, as the original
issue was caused by an internal bug of `mark.via`. They have fixed the
issue in later versions.
@GarboMuffin GarboMuffin added the pr: new extension Pull requests that add a new extension label Oct 14, 2024
DNin01 and others added 16 commits October 13, 2024 22:12
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: new extension Pull requests that add a new extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants