Arduino USB Arcade controller

J
Jesse posted Apr 4, 19:52:

Is it possible to use a USB arduino arcade controller with the sampler box instead of a midi controller? I believe the arcade controller kit just outputs as keystrokes of a usb keyboard. Is it possible to map these to trigger samples?

G
gmeader posted Apr 19, 01:04:

You would have to modify the SamplerBox Python code to do this. It's probably not too difficult, if you know some Python.

H
HansEhv posted Apr 21, 23:37:

I think it will be quite a job, because there's more to it than just mapping.
It requires another thread to scan the keyboard (a midi-keyboard is NOT a USB computer keyboard). In this thread the keys need to be translated to the notes (the original question), which should indeed not be too difficult; it just lacks any form of standard.
Complicating will be that the keyboard interrupt might be disruptive (giving cracks/hiccups like the GPIO buttons sometimes do).
If that's all solved, it will be impossible to implement velocity as a computer keyboard has no such thing. Advantage is that it simplifies the new thread :-)
Bottom line: only usable for triggering effects. If that's what you want, it's an interesting experiment for an extra controller. My approach would be to connect the keyboard to an Arduino for translating all kinds of controllers/triggers to midi output towards Samplerbox. Just to avoid disruptive interrupts on the sound generating device.

J
Jin posted Apr 26, 10:28:

Assuming sampler box is just à modified raspbian system with python code inside, it may be possible to use a standard arcade controller (aka joystick), and use js2midi to convert it's signal to midi.
You can program à static velocity for each note in js2midi.

H
HansEhv posted Apr 26, 23:44:

Hi Jin,
Agree, but that will be quite a job too :-)
If anyone is interested, I found the referred software at github.com/gretchycat/js2midi

...

  (not published)
  I want to post as guest
 

Post