Author Topic: midi and TouchOSC  (Read 366 times)

m7b52000

  • Newbie
  • *
  • Posts: 12
    • View Profile
midi and TouchOSC
« on: May 15, 2022, 03:46:00 AM »
I've been experimenting with midi and TouchOSC. I hace successfully managed to get faders on my ipad to control knobs on a pedal and have set up switches to turn pedals on and off. These changes are visible in the Constructor but not on the Pi-Stomp display. This behaviour is expected? - I think I read that the Pi-Stomp software itself does not respond to midi i.e no changes displayed.

I am currently viewing Constructor on my Mac and using TouchOSC on my iPad, both communicating with Pi-Stomp via the home network. Is there an easy way to now make TouchOSC on the iPad still send midi messages to Pi-Stomp when communicating via hotspot? if that makes sense....

Randall (Admin)

  • Administrator
  • Full Member
  • *****
  • Posts: 217
    • View Profile
Re: midi and TouchOSC
« Reply #1 on: May 15, 2022, 12:49:52 PM »
That's great that you got TouchOSC working to control parameters.  Pretty cool, eh?

So, yes, given the current code, it is expected that MIDI learned events from external controllers aren't reflected on the pi-Stomp LCD.  But it would be great if they were.  I've long wanted to add that.  Hearing that someone is hitting that deficiency gives me more reason to get it done.

There are two missing pieces for enabling the desired behavior:
1) pi-Stomp specific code doesn't currently listen to external MIDI messages.  As they come in via wifi/USB/MIDI jack, they are relayed to the MOD host/UI via the Alsa layer.  We'll need to add a listener and event handler.

2) The MIDI mappings for pi-Stomp controls (eg. onboard footswitches, analog pots, expression, etc.) are known by pi-Stomp (obviously), but external controls are not.  The event handler needs to know what to do with a msg when received. The MOD API does not include a method for obtaining MIDI learned mappings.  We'd need to add that.  Fortunately, I just tried a simple hack to prove it is possible, and it looks like it is.

I'll try to make some headway on these in the new few weeks and update this thread as appropriate.

Regarding control of pi-Stomp with two devices, yeah, that'll work via wifi router, but if you switch to hotspot mode, by definition, that'll only be available to one device.  If your touchOSC client can interface over bluetooth, you could enable that on the pi, and likely achieve the behavior you're looking for.  I have configured /boot/config.txt to disable bluetooth on the pi cuz it's generally not required, so why use CPU and created extra potential for EMI noise?  Also, it uses the same UART that is used for connecting wired serial MIDI.  But if you're not using that, you could enable bluetooth (bottom of /boot/config.txt) and see if touchosc2midi will handle incoming OSC via bluetooth.