Closed jkbd closed 2 years ago
Hi, @jkbd, the problem is that you are creating a loopback between o2m's input and logging ports. The default output port is 57120, which happens to be the same where it is listening in your configuration. You can either change the listening port, or the output port (using -O or --oscoutputport). Let me know if this solves your issue.
I will add a warning at runtime to highlight when this happens.
Thank you for your quick reply!
My initial assumption was, that one can use m2o
and o2m
to bridge ALSA-MIDI events over the local network, without a dispatcher in the middle. Reading the outgoing OSC message format and the incoming OSC message format in detail tells me, my assumption is wrong. From my point of view, this issue can be closed.
I hope the following helps future tinkerers:
For example, m2o
sends OSC equivalent to
> oscsend localhost 57120 /midi/ua-25_midi_1/0/1/note_on ii 2 3
where /1
is the channel. On the other hand o2m
expects OSC equivalent to
> oscsend localhost 57200 '/*/note_on' iii 1 2 3
where the channel not encoded in the address string.
Also I don't see a way to use --osctemplate
with m2o
to match this format.
P.S. It took me long to understand the meaning of the OSC message format description in the README. That's why I wrote examples using oscsend
, which I find more legible. Some code-markup or similar examples might improve the format description a lot.
The thing is that osmid evolved as the MIDI interfacing for Sonic Pi, and it was tailored to that use case.
I think that what you are saying about briding events over the local network would be very interesting and quite simple to implement. I could just add a switch to make it work in "o2m compatible format", so that you could do what you are after. Or perhaps it could even be the default now, since this is no longer used in Sonic Pi.
Or even use the -r switch, to send in raw mode, and adjust the sending on m2o's side to match what o2m is expecting. That should be quite straightforward, and you get the original raw midi without any conversions. I think I like this idea more.
Would that of interest to you if that gets implemented within a few days?
After thinking a bit more, you might be able to get the behaviour you expected using this:
Does that work for you, @jkbd?
You are right, this works (with some No match on address pattern: /logging
errors)!
Thank you very much!
Apart from that, I don't have a clear goal that legitimates changes in the code. I am somehow experimenting with scaling up synthesizer setups without expensive hardware.
You can add "-m 6" at the end of m2o and it should make the logging messages disappear.
Hello, I just compiled
m2o
ando2m
from commit a1205b4ce976d73ccf9e987fee1f1c0e664ef6b4 on Arch Linux. In one terminal, I run:In another terminal, I run:
I expected
o2m
to receive OSC and forward MIDI events. But if I play a note on a connected MIDI keyboard (connected toUA-25 MIDI 1
),o2m
starts printingin an endless loop at 100% CPU. Within this huge chunk of messages, there is one mention of a MIDI Note-on:
However, if I run
oscdump
as a receiver,I notice, there is no endless stream of
/logging s "..."
and/midi/ua-25_midi_1/1/1/note_on ii 50 86
looks fine to me. Am I doing something wrong? I get the same results, using an--oschost
in the LAN and with any setting of--monitor
.