Newbie: Error unknown midi output even though it's the same one (name and Input / Output) as Midi -> List Devices

(A continuation from prior query / experiment with accelerometer, but entirely separate problem - custom js worked perfectly by the way!)

Hello, I’ve got stuck trying to send midi out. I successfully got my accelerometer roll data, parsed it through the custom js…

… and had it be received as /control , with the aim to send it on as midi control obviously.

I have a fader that works perfectly well and is being controlled by the accelerometer, up until the point that I try to specify preargs and it becomes unresponsive to the phone then. Leave preargs blank, it responds, but give preargs the value of [1,7] (or anything else) and it stops responding.

At the same time though, I can see from the console that it only sends when I actually move the fader by hand. And when it sends it then errors saying unknown midi output. I had specified “IAC Driver Bus 1:0,0” in the server settings (which once entered, and saved, modifies to “IAC Driver” Bus 1:0,0 - should this moving of quote be of concern?) This was named exactly as shown by Midi -> List Devices but then I see in the documentation this is just an ID and I could name something else anyway? I therefore renamed to the shorter and space-free string IAC, in both server settings and target, and it seems the name is not the issue as it is the same identical error.

What am I not understanding?

Help gratefully appreciated here! Stumped!

Self-solved some issues, left with one at the moment.

With regards IAC, which is the standard approach to doing virtual midi on MacOS, I could get it to work by going into Applications -> Utilities -> Audio Midi Setup and renaming IAC Driver to just IAC, and removing the name of the Bus. It therefore lists as device “IAC”. Irrespective of whether you name it some spaceless ID, it seems the fact that the system name includes spaces, it will go wrong. The original device has to have no spaces. So that was great, no more error unknown midi output.

I amended my custom JS because I realized that I didn’t have matching preArgs, and that solved the problem of fader not responding once I had specified preArgs in the editor (which was breaking the widget being married to the data being received).

But I have one remaining problem. When the data from the accelerometer is received, it doesn’t yet send any event back out. I have midi mapped in Bitwig to a fader, just as proof of concept, and moving the fader in Open Stage Control by hand does control the fader perfectly well. But while the accelerometer controls the Open Stage Control fader, that doesn’t get sent onwards. See screenshot, and the console, with the difference, where first I am moving the fader, and second, I launch the mobile app which starts the data being received (but not sent).

Device names defined in open stage control are not related to the ones listed in the device list, you can choose whatever name you want and use it as target, it is the port numbers that binds the name to the actual midi devices. If you want it to contain spaces, enclose the device defnition in quotes, not just the name: "my device:1,1".

I amended my custom JS because I realized that I didn’t have matching preArgs, and that solved the problem of fader not responding once I had specified preArgs in the editor (which was breaking the widget being married to the data being received).

Matching preArgs is mandatory indeed, you could almost see these as extensions of the address.

But I have one remaining problem. When the data from the accelerometer is received, it doesn’t yet send any event back out.

Widgets never send message in response to osc messages. This kind of behavior (ie feedback) is usually to be expected of controlled apps, not controllers, otherwise you’d likely get feedback loop issues.

You can send the midi message from the custom module directly:

send('midi', 'my device', '/control', 1, 7, 65) 

ah that makes sense! i was actually going to ask you about the syntax for the send function and midi, thank you! that’s perfect!

One thing though - your instructions regarding device names and spaces, on Mac OS at least regarding IAC Driver, do not work. Enclosing in quotes does not work. And naming whatever name you want as an Id also does not work, not if the device in question as far as the OS is concerned has a space in it. I had to rename the device within the utility Audio Midi Setup and then it worked. Nothing else works.

Cheers

Could describe precisely the case that fails, including the server configuration & widget configuration ?

Yes I will do that today. Cheers

This issue might be related, but in this case the port name doesn’t contain any space : First time user: "ERROR: Midi: unknown output