steffest / BassoonTracker

Webbased old-school Amiga music tracker in plain old javascript - Plays and edits Amiga Mod files and FastTracker XM files
http://www.stef.be/bassoontracker/
MIT License
1.02k stars 61 forks source link

feature: Add Midi keyboard support #47

Closed blurymind closed 3 years ago

blurymind commented 5 years ago

Testing my keystation 32 mini here: http://www.multiplayerpiano.com and https://pianu.com/intro/ode-to-joy

Works. All the keys are detected and so is their pressure sensitivity.

Trying the same here https://www.stef.be/bassoontracker/

My midi keyboard simply doesn't exist to bassoon tracker. Pressing all the keys on various instruments - nothing.

Can you add support for midi keyboards please? I will help with testing if need be. Using a standard laptop laptop keyboard is just subpar when compared to using a midi keyboard with pressure sensitivity

Not sure exactly how some of these web apps get their midi support. I assume they use some open source js library to achieve it https://github.com/djipco/webmidi or see many others here https://www.npmjs.com/search?q=midi%20keyboard

this one is popular and well maintained https://www.npmjs.com/package/jzz also works! test here https://jazz-soft.net/demo/SelectMidi.html

Midi keyboards are pretty cheap these days - especially on ebay. Having one greatly enhances the experience of music making with a tracker. To me a tracker without support for midi keyboards is not complete - it is crippled. Thus why I really need this feature before I can use bassoon

steffest commented 5 years ago

Yes, that's on the road map (see first items of "Future plans" in the readme.) Although I play some piano myself and have 2 midi keyboards, the tracker concept - with it's numerical effect entering and non-graphical editing - is tailor-made for computer keyboards. Therefor a computer keyboard will always be the main input method. That being said: Don't worry: midi keyboard support will be added as it's obviously a more musical and natural input method for the more experienced musician.

blurymind commented 5 years ago

Is there anything I can do to help? Have you picked what library to use? Looking at the code it seems keyboard input is set in https://github.com/steffest/BassoonTracker/blob/master/script/src/ui/input.js so I assume that the midi will be added there too?

blurymind commented 5 years ago

The midi input would make a huge difference, as it will give us button pressure :D

blurymind commented 4 years ago

it looks like we dont need a library to do this. There is already a web api for it https://codepen.io/Rumyra/pen/NxdbzL

I wonder if the keys received from the midi device would be compatible with the keys used by handleNoteOn. Will likely need to use something similar to the keyboardTable... a miditable? https://github.com/steffest/BassoonTracker/blob/b6760fffdc411fa6a510bc7b6f884b0888acaa7d/script/src/ui/input.js#L604

steffest commented 3 years ago

Midi-in is supported now

blurymind commented 3 years ago

Thank you for adding this feature.It makes a huge difference in how we can use bassoon! :tada: :musical_keyboard:

blurymind commented 1 year ago

One thing I wound add to this - can we make midi input to be enabled by default? Some people might be too lazy to look for it in the settings and just assume its not supported