ORCA & MIDI on DevTerm

I’ve successfully built the terminal version of Orca (~rabbits/orca - sourcehut git). I’ve tried to pair it with Pilot, and could not get any sound out of it despite seeing OSC signals being passed from Orca to Pilot (GitHub - hundredrabbits/Pilot: Orca's best friend.) - I could see Pilot reacting to the signals, but no sound :frowning:

I also realised that I know literally nothing about how MIDI is supposed to work on Linux. I’ve tried to setup and use a couple of rtpmidi daemons to no avail.

Suppose I want to use DevTerm to run Orca to drive synths on other devices, either over network or USB… what would be the approach?

2 Likes

If you’re just wanting to test that ORCA is working (or you don’t own any external MIDI devices), you could install and use FluidSynth

# install the fluidsynth midi synthesizer
# this should also install the fluidsynth-soundfont-gm package too
sudo apt install fluidsynth

# start fluidsynth, using the soundfont that installed with it:
fluidsynth --audio-driver=alsa /usr/share/sounds/sf2/FluidR3_GM.sf2

If you want to launch FluidSynth in the background you can use the -i flag.

Next you need to start ORCA and set it to output to the fluidsynth MIDI output device:

  1. Press Ctrl+D in ORCA to bring up the menu
  2. Go to “Midi Output”
  3. Select “Synth input port (xxxx:0)”

Channels 0-8 should be piano, and 9 is a drum kit.

That’s the setup I use with ORCA on my Pocket CHIP anyway, it should work here too!

2 Likes

@omgmog Thanks! I’ve managed to install FluidSynth and send midi signals from orca to FluidSynth, but so far it is not making sounds. I can see the noteons and noteoffs, so it must be my audio setting. Tried all audio driver configurations (“alsa”, “pulseaudio”, “sdl2” among other things") but no luck.

Okay, realized that speaker-test does not produce any sound either. Funny, I can play games with sounds… back to debugging this!

I was missing `/etc/asound.conf’ entirely. Created the following and I got sound :slight_smile:

pcm.!default {
    type hw
    card 0
    device 0
}

ctl.!default {
    type hw
    card 0
}
4 Likes

I came back to this after some time, and made a bit more progress: DevTerm can send MIDI over wifi, using rptmidi, to Apple devices (rtpmidi being an Apple protocol, that is). All you need is avahi-daemon (for mDNS resolution):

sudo apt install avahi-daemon
systemscl restart avahi-daemon

and the rtpmidi daemon, for which I am running the wonderful implementation from GitHub - davidmoreno/rtpmidid: RTP MIDI (AppleMIDI) daemon for Linux. Once you build it, run the rtpmidid - once the rtpmidi daemon is running, start your Orca and you will see any rtpmidi devices that the daemon has picked up via mDNS. Choose the device to send MIDI there.