No MIDI with 3.11.2 on Linux Mint


For the first time with many installs on various systems, I’m having a MIDI issue with Linux Mint 20.1, jack2 and Qjackctl. I’ve compiled from source with no errors. Have jack installed and it seems to be using a2jmidid properly, along with virtual midi devices set up through modprobe snd-virmidi. However, when I run MIDIClient.init; I get this as if nothing is found for midi devices. Wondering if anyone has encountered this and any fixes:

ERROR: A primitive was not bound. 0 854
Instance of Method {    (0x55e6999f5dc0, gc=01, fmt=00, flg=11, set=04)
  instance variables [15]
    raw1 : Float 0.000000   00000000 0060000C
    raw2 : Float 0.000000   00000100 01000001
    code : instance of Int8Array (0x55e6999f5f40, size=4, set=2)
    selectors : nil
    constants : nil
    prototypeFrame : instance of Array (0x55e697dbdc80, size=1, set=2)
    context : nil
    argNames : instance of SymbolArray (0x55e697dbdd40, size=1, set=2)
    varNames : nil
    sourceCode : nil
    ownerClass : class Meta_MIDIClient (0x55e6999f2480)
    name : Symbol 'prInitClient'
    primitiveName : Symbol '_InitMIDIClient'
    filenameSymbol : Symbol '/usr/local/share/SuperCollider/SCClassLibrary/Common/Control/'
    charPos : Integer 1973
ERROR: Primitive '__none' failed.
		arg this = <instance of PrimitiveFailedError>
		arg this = nil
		arg error = <instance of PrimitiveFailedError>
		arg this = <instance of Thread>
		arg error = <instance of PrimitiveFailedError>
		arg this = <instance of PrimitiveFailedError>
		arg this = nil
		arg this = <instance of Meta_MIDIClient>
		arg inports = nil
		arg outports = nil
		arg verbose = true
		arg this = <instance of Interpreter>
		var res = nil
		var func = <instance of Function>
		var code = "MIDIClient.init;"
		var doc = nil
		var ideClass = <instance of Meta_ScIDE>
		arg this = <instance of Main>
^^ The preceding error dump is for ERROR: Primitive '__none' failed.



aconnect -o
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 16: 'MPK Mini Mk II' [type=kernel,card=0]
    0 'MPK Mini Mk II MIDI 1'
client 20: 'APC40 mkII' [type=kernel,card=1]
    0 'APC40 mkII MIDI 1'
client 36: 'Virtual Raw MIDI 5-0' [type=kernel,card=5]
    0 'VirMIDI 5-0     '
client 37: 'Virtual Raw MIDI 5-1' [type=kernel,card=5]
    0 'VirMIDI 5-1     '
client 38: 'Virtual Raw MIDI 5-2' [type=kernel,card=5]
    0 'VirMIDI 5-2     '
client 39: 'Virtual Raw MIDI 5-3' [type=kernel,card=5]
    0 'VirMIDI 5-3     '

So, not entirely sure if this is some Linux Mint incompatibility, misconfig (though I’ve had zero issues with SC in the past), or a bug. I’m guessing I have something set up incorrectly, just not sure what to do.

Either you don’t have alsa installed or it wasn’t found by CMake. SC uses 3 different MIDI backends depending on the platform it’s being compiled for. The alsa backend (which is implemented in SC_AlsaMIDI.cpp) is what’s used on Linux. It’s only enabled if alsa (both the library and development headers) is found by CMake.

What you should do is:

  1. install both alsa and its development headers if they’re not already installed (these are sometimes 2 different packages depending on who packages it)
  2. compile SC in a clean build directory and see if that solves the problem
  3. if it doesn’t, paste here the entire output from the CMake build system generation step, along with the locations of the alsa libraries and headers on your system. The build system generation step is the step before you compile the program.

An unbound primitive typically means that the issue is at the level of the build system / system configuration, because primitives are almost exclusively enabled and disabled there.

Thank you! Incredibly helpful already in narrowing down the issue. I’ll give this a shot.

And to note - yes this is evidently the problem:


I’m not that great at compiling - may come back for some help :slight_smile:

Glad to help!

I am personally a fan of throwing errors in the build system rather than automagically disabling features when the corresponding dependencies can’t be found, for exactly this reason – there’s a lot of output, people don’t think to read it, and intuitively MIDI support seems like something that should be “standard”. Maybe something I would push to change if I had infinite time and energy… ^^

That totally worked. Thank you! @VIRTUALDOG Though I compiled the alsa-firmware, the alsa-utils and the alsa-lib (following these instructions: Alsa Opensrc Org - Independent ALSA and linux audio support site) after downloading the latest, I imagine it was just in another path location as I had it all repo installed. But that did the trick for this idiot. Cmake showed it found the ALSA Lib and works after a clean recompile.