Is this possible? RPi audio out to audio in on USB soundcard

Multi-platform modular music creation studio
Post Reply
fapplin
Posts: 4
Joined: Wed Nov 03, 2021 10:47 pm

Is this possible? RPi audio out to audio in on USB soundcard

Post by fapplin »

Hi,

I have a custom built synth I've created on a RPi using LibFluidSynth (to play different soundfonts) and RTMidi for capturing MIDI commands. The output is via the RPi's audio out plug. I would like to use Sunvox for different effects (i.e. vibrato, tremolo, etc.). Can I route the RPI's audio out back into a USB soundcard's audio in and use Sonvox Input module to then add effects with the audio then going out the USB soundcard's audio out?

Another questions is: if I also send out midi commands through the RTMidi API can Sunvox capture the command? This would be used to trigger the effect from my controller.

Thanks for any help.

Frank
varheit
Posts: 2
Joined: Tue Oct 19, 2021 6:09 pm

Re: Is this possible? RPi audio out to audio in on USB soundcard

Post by varheit »

Use JACK (https://jackaudio.org/) to route audio and MIDI between applications.
fapplin
Posts: 4
Joined: Wed Nov 03, 2021 10:47 pm

Re: Is this possible? RPi audio out to audio in on USB soundcard

Post by fapplin »

I just ordered a usb soundcard. So, I'll give it try when it comes!

Thanks.
enzyme
Posts: 24
Joined: Wed Mar 24, 2021 12:49 am

Re: Is this possible? RPi audio out to audio in on USB soundcard

Post by enzyme »

I found the RPi struggles a bit with 2 way audio and MIDI at the same time. As mentioned above, routing your audio internally before it hits the outputs would probably be more reliable.
eufex
Posts: 46
Joined: Sun Dec 27, 2020 6:10 pm

Re: Is this possible? RPi audio out to audio in on USB soundcard

Post by eufex »

As Varheit said, you don’t need to route the audio out of the Pi and then back in on Linux. If you use JACK (Jack audio connection kit) you just route the output of one piece of software into the input of another, if you’ve got Raspian installed QJACKCTL is already installed (I think….but if not just install it from the repo), for a quick connection, that disappears every time when you stop JACK you just go into the quick connection dialogue and set up routings. You can also do more permanent routings and save them as a patch.
fapplin
Posts: 4
Joined: Wed Nov 03, 2021 10:47 pm

Re: Is this possible? RPi audio out to audio in on USB soundcard

Post by fapplin »

OK. I do have Sunvox patched via QJackCtl to work with my application. So, my audio out is being used by the Sunvox Input Module. That's cool! Now, can I load a project (let's say Input -> Echo -> Output) from my program via the Sunvox library and have it act the same way?

Frank
fapplin
Posts: 4
Joined: Wed Nov 03, 2021 10:47 pm

Re: Is this possible? RPi audio out to audio in on USB soundcard

Post by fapplin »

Nevermind - I found sv_load().
Post Reply