"Save my ass" Project

Hi everyone, i’m pretty new on rasp world and my project it’s quite unusual and i would like to discuss about it.
I’m trying to create a “save my ass” device for my live shows; it has to send out from the stereo output, an audio track perfectly in sync, of what we are playing. This audio track it would be use in case of midi errors and other beautiful things that can happen using midi.
I need this because i have to play live during a dance performance and lose one minute to reset everything it’s impossible and awful. I’ve think about rasp 3b and pisound system because is an isolated system so it can make only this thing.

I need to send a midi message from my ableton 9 (i’m using a macbook) to sync the audio track in the rasp with what i’m playin’.

Which is the best solution? How can i set up my rasp with pysound so that can be read as a midi port by macbook/ableton9? how can i read midi message properly? it’s better midi or wifi-midi o something else? i have to use the wifi hotspot on pisound (P.s. there are 3 computers running on ableton link on this show, just to make you understand)?

with this midi message i would like to trigger a script in python (mido/rtmidi/pyaudio) in the rasp that play the audio track… but i don’t know how to set up properly the rasp+pisound with my mac.
Probably the midi cable solution it’s the best one, but maybe there’s something cool that i don’t know about wifi-midi.


Hey, welcome to the community :slight_smile:

You are not required to use the WiFi hotspot on Pisound explicitly, as long as your computer and RPi is on the same network.

Have you seen this: https://help.ableton.com/hc/en-us/articles/209071169-Sending-and-receiving-MIDI-messages-using-a-virtual-MIDI-network

Looks like on Raspberry Pi side, you’d need to use some RTP MIDI implementation. There seems to be a python library available. I don’t have experience with any of them, so I can’t advise which one to pick.

Still, a MIDI cable should be reliable, especially if it’s not too long distance. You’d need to use a MIDI interface for your laptop to get a MIDI OUT port which you could connect to Pisound’s MIDI IN.

I can’t connect the rPI to the Macbook properly

Thank you @Giedrius, i’ve tried to set up a midi network but the rPi can’t connect to the network that i’ve create using my macbook, i’had already read the guide by ableton but seems it doesn’t suite for the rPi -> Macbook case. Can you try and tell me what you’ve done?
And in case of a midi cable + midi interface, the problem of setting up the rPi the right way still remain, where can i read the data? i’ve just set up a program in python and i would like to read this data from the MIDI IN port by PiSound and I don’t know how can i read it in python.
Thank you for your help i apprecciate it.

I thought you wanted to send MIDI sync data from your laptop to RPi, or what do you mean?

You should be able to read MIDI data using https://pypi.python.org/pypi/python-rtmidi

Check the examples in the source code: https://github.com/SpotlightKid/python-rtmidi/blob/master/examples/basic/midiin_poll.py

It is based on ‘rtmidi’ C++ library, so you may be able to find more documentation on its usage searching for that directly.

Note that on Linux, you have to use aconnect or aconnectgui utility to connect various virtual and hardware MIDI ports in order for the data to flow.

@Giedrius you’re right, i’ve made a mistake writing the post.

yes i can read midi data with aconnect and with python.rtmidi too, but the problem is that i can’t set up a MIDI network on my studio midi between my mac and my rasp!
I’m creating the network session from my mac that check the port 5006 as usual, but the raspberrypi can only read that there is a network but it can’t connect to it through Wifi.
However, my mac can read the pisound wifi from my rasp but it can’t connect in a midi network; i’ve read online that it’s because mac can connect only with class compilant device, is it true?

P.s. i’ve tried with a midi cable and python-rtmidi and it worked properly! thanks a lot.
But i won’t let it down on the wifi connection, it’s really comfortable to use and i would set up properly too.

Are you able to connect to Pisound WiFi using other devices such as your phone?

Yes, i think so, i’ve follow the guide on Pisound, pushing three times the button i toggle the wifi and i can see the Pisound on my phone/tablet/mac, but when i try to connect it to the Midi Network Session i can’t see the device; but what i want to do is connect the Pisound to a Network made by my Macbook, the exact opposit of what the guide tells me.

Hey, try searching the net for information on how to troubleshoot the WiFi connection on Raspberry Pi, and usually wpa_supplicant.conf file is involved with that.

Once you have joined the same network as Mac we can look into how to get rtpmidi working.