Midi through toggle using pisound-btn

Hello, and thanks for reading this :slight_smile:

I’m a happy Pisound user, using it in various situations.

My latest challenge is to hook it up to my Roland VT-4 unit, to palliate a super frustrating flaw: basically as soon as the VT-4 detects notes over its MIDI inputs, it automatically switches to robot/vocoder mode, which I sometimes don’t want to be the case.

I’m trying to implement a toggle switch using pisound-btn, so I can choose when to trigger this effect manually, by filtering out the notes.

I’m considering a script that edits /etc/amidiauto.conf so the VT-4 is completely disconnected from MIDI and restarts the service, but I don’t know if there’s a more elegant solution using Jack, PD or any other software.

Many thanks, have a lovely day!

jedd

The MIDI message forwarding happens in the ALSA layer, which other applications interface with, so I’d recommend using aconnect command directly for the device, to make and break the MIDI connections whenever necessary. :slight_smile:

Or if amidiauto provides you with convenient connections right out of the box, then you could go with editing the .conf file and restarting the service when necessary. It doesn’t do disconnects though, so you’ll have to disconnect VT-4 in your script using aconnect, or if it’s permittable, you may break all the existing ALSA MIDI connections using aconnect -x, and once amidiauto is up again, it will restore the necessary connections.

Thanks a lot @Giedrius for the quick reply and for sharing your infinite wisdom :smiley_cat:

aconnect sounds like a good idea for a version 1! Simple and reliable

Ultimately I’d be interested in filtering out only the note on/off events, because I still need to send CCs to the unit, just without triggering its vocoder mode on every key press. I’d also love to map the Pisound button to send a certain CC as well. I presume pure data gives me that degree of freedom?

1 Like

Yes, you’d have to then avoid any direct connection between VT-4 and Pisound’s hardware MIDI ports. You should put PD or something else as the middle-man, and do the processing as necessary. Btw, you may have PD create multiple ALSA ports, to access them, you use the same MIDI objects, except the channel numbers are higher - the 2nd port’s channel numbers start from 16, the 3rd port’s channel numbers start from 32, etc…

To get the input from the button, I’d recommend writing a shell script(s) that would simply trigger an OSC message to be sent on localhost, and listen to the messages in PD. This may have some very slight latency - if that’s intolerable, then look into monitoring Raspberry Pi GPIO 17 directly from PD itself - when it’s 0, the button is down, when it’s 1 - it’s up. :slight_smile:

1 Like

Thanks for all this! :slight_smile: I will have a look at all these solutions ASAP

1 Like