Hello,
I’m attempting to recall a recurring configuration with a midi controller within my startup file.
I’ve used the same code snippet to successfully connect my prior controller. I cannot get why it either works straight up, or fails at MIDIIn.connect with this error message:
MIDI (ALSA): connect failed (Ressource temporairement non disponible)
ERROR: Primitive '_ConnectMIDIIn' failed.
Failed.
RECEIVER:
class MIDIIn (0x55fd02bfaf80) {
instance variables [19]
name : Symbol 'MIDIIn'
nextclass : instance of Meta_MIDIMTCtoSMPTEDispatcher (0x55fd02daacc0, size=19, set=5)
superclass : Symbol 'Object'
subclasses : nil
methods : nil
instVarNames : instance of SymbolArray (0x55fd02bfb100, size=1, set=2)
classVarNames : instance of SymbolArray (0x55fd02bfb280, size=21, set=4)
iprototype : instance of Array (0x55fd02bfb1c0, size=1, set=2)
cprototype : instance of Array (0x55fd02bfb400, size=21, set=5)
constNames : nil
constValues : nil
instanceFormat : Integer 0
instanceFlags : Integer 0
classIndex : Integer 359
classFlags : Integer 0
maxSubclassIndex : Integer 359
filenameSymbol : Symbol '/usr/local/share/SuperCollider/SCClassLibrary/Common/Control/MIDIOut.sc'
charPos : Integer 3187
classVarIndex : Integer 269
}
PATH: /home/pi/.config/SuperCollider/startup.scd
PROTECTED CALL STACK:
Meta_MethodError:new 0x55fd01fd1200
arg this = PrimitiveFailedError
arg what = Failed.
arg receiver = MIDIIn
Meta_PrimitiveFailedError:new 0x55fd01fd90c0
arg this = PrimitiveFailedError
arg receiver = MIDIIn
Object:primitiveFailed 0x55fd0145ae80
arg this = MIDIIn
Meta_MIDIIn:connect 0x55fd02c08140
arg this = MIDIIn
arg inport = 0
arg device = MIDIEndPoint("UC-33 USB MIDI Controller", "UC-33 USB MIDI Controller MIDI ")
var uid = 1310720
var source = nil
a FunctionDef 0x55fd01744068
sourceCode = "<an open Function>"
arg source = MIDIEndPoint("UC-33 USB MIDI Controller", "UC-33 USB MIDI Controller MIDI ")
arg i = 4
ArrayedCollection:do 0x55fd0301a2c0
arg this = [ MIDIEndPoint("System", "Timer"), MIDIEndPoint("System", "Announce"), MIDIEndPoint("Midi Through", "Midi Through Port-0"), MIDIEndPoint("UMC404HD 192k", "UMC404HD 192k MIDI 1"), MIDIEndPoint("UC-33 USB MIDI Controller", "UC-33 USB MIDI Controller MIDI "), MIDIEndPoint("UC-33 USB MIDI Controller", "UC-33 USB MIDI Controller MIDI "), MIDIEndPoint("SuperCollider", "out0"), MIDIEndPoint("SuperCollider", "out1"), MIDIEndPoint("SuperCollider", "out2") ]
arg function = a Function
var i = 4
a FunctionDef 0x55fd01744698
sourceCode = "{
\"/home/pi/.local/share/SuperCollider/downloaded-quarks/SuperDirt/hacks/scriptfabien.scd\".load;
~dirt = SuperDirt(2, s); // ?two output channels, increase if you want to pan across more channels
~dirt.loadSoundFiles; // load samples (path containing a wildcard can be passed in)
// for example: ~dirt.loadSoundFiles(\"/Users/myUserName/Dirt/samples/*\");
2.wait;
// s.sync; // optionally: wait for samples to be read
~dirt.start(57120, [0, 2, 4]); // start listening on port 57120, ...etc..."
var on = nil
var off = nil
var cc = nil
var osc = a NetAddr(127.0.0.1, 6010)
var tidalMidiChan = nil
a FunctionDef 0x55fd01e7ba00
sourceCode = "<an open Function>"
Function:prTry 0x55fd022a89c0
arg this = a Function
var result = nil
var thread = a Thread
var next = nil
var wasInProtectedFunc = false
CALL STACK:
MethodError:reportError
arg this = <instance of PrimitiveFailedError>
Nil:handleError
arg this = nil
arg error = <instance of PrimitiveFailedError>
Thread:handleError
arg this = <instance of Thread>
arg error = <instance of PrimitiveFailedError>
Object:throw
arg this = <instance of PrimitiveFailedError>
Function:protect
arg this = <instance of Function>
arg handler = <instance of Function>
var result = <instance of PrimitiveFailedError>
Interpreter:executeFile
arg this = <instance of Interpreter>
arg pathName = "/home/pi/.config/SuperCollid..."
arg args = [*0]
var result = nil
var saveExecutingPath = nil
ArrayedCollection:do
arg this = [*2]
arg function = <instance of Function>
var i = 1
Platform:loadStartupFiles
arg this = <instance of LinuxPlatform>
LinuxPlatform:startup
arg this = <instance of LinuxPlatform>
Main:startup
arg this = <instance of Main>
var didWarnOverwrite = false
^^ The preceding error dump is for ERROR: Primitive '_ConnectMIDIIn' failed.
Failed.
RECEIVER: MIDIIn
I’m on ubuntu 23.10.
The said controller has two ports that both have the same name in Alsa.
Edit: if i recompile the class lib after turning off then back on my controller, it seems to work, but meh.
I’ve had a quick look at similar threads, but no one came cross my problem.
Any help welcome, have a nice weekend !