Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help sending OSC commands #133

Open
JonnyC0G opened this issue Jul 25, 2023 · 4 comments
Open

Help sending OSC commands #133

JonnyC0G opened this issue Jul 25, 2023 · 4 comments

Comments

@JonnyC0G
Copy link

hello there
I'm trying to convert incoming midi-messages into OSC-signals.
My OSC-Device is listening on Port 65535. I use following config:

[backend winmidi]
detect = on

[winmidi loopbe]
; 0 is the id of loopbe
read = 0

[backend osc]
detect = on

[osc lt]
dest = localhost 65535

/lighttoys/start/* = i 1 1

[map]

loopbe.ch0.note0 > lt./lighttoys/start/01

I managed to receive the midi-trigger, but then i get the error:
Failed to transmit packet: An operation was attempted on something that is not a socket.

If I add bind = :: 65535 the error disappears, and the programm also captures the osc-command, but it never reaches my desired application (which is also listening on 65535, confirmed using ShowCockpit) and the programm terminates immediately.

I hope you can help me

  • why does midimonster need to listen for osc, when I'm only trying to send
  • why is the command not be transfered to another application

thanks in advance!

@JonnyC0G
Copy link
Author

edit:
I debugged the osc-information sent via wireshark. It seems like the port configuration for the osc-destination doesn't work at all. every time i restart the program a new (random?) port is picked, ignoring the specified port in the config file.
also the content of the message is only one byte long.

@TimPeterson
Copy link

I just had a similar problem (except it was Failed to transmit packet: Bad file descriptor) and came to the same solution. According to the source in backends/osc.c it doesn't even open a network socket if you don't specify a bind parameter, at which point it cannot function. I would consider this a bug, since if my configuration only intends to transmit OSC and not receive, I shouldn't have to listen anywhere. I suspect the call to mmbackend_socket ought to be moved into osc_start.

In my case adding the bind option was all I had to do to make it work. If midimonster is terminating as soon as you send a command, there may be something else going on. Could you please post a copy of the full log output?

@JonnyC0G
Copy link
Author

JonnyC0G commented Sep 6, 2023

this is my output:

MIDIMonster v0.6-38-g811592c
core/be Registered backend artnet
core/be Registered backend loopback
core/pl Failed to load plugin backends\lua.dll, check that all supporting libraries are present: The specified module could not be found.

core/be Registered backend maweb
core/be Registered backend mqtt
core/be Registered backend openpixelcontrol
core/be Registered backend osc
core/be Registered backend rtpmidi
core/be Registered backend sacn
core/be Registered backend visca
core/be Registered backend wininput
core/be Registered backend winmidi
core/cfg        Reading configuration file monster.cfg
core/cfg        Created winmidi instance loopbe
core/cfg        Created osc instance lt
osc     Matched pattern /lighttoys/start/* for /lighttoys/start/01
osc     Registered 1 descriptors to core
winmidi Selected input device LoopBe Internal MIDI for ID 0
winmidi Registering 1 descriptor to core
core/rt Routing 1 sources, largest bucket has 1 entries
winmidi Incoming data on channel loopbe.ch0.note1, value 0.007874
winmidi Incoming data on channel loopbe.ch0.note2, value 0.039370

when doing this midimonster sends udp-messages at a random port (e.g. 63094) instead of the specified port.
also the content of the sent message does not match my configuration.
image

I helped myself using another tool, sorry.

@peternewman
Copy link
Contributor

I found the same thing on Windows with the 0.6 release. Adding bind allowed it to work once, but subsequent transmits after that failed.

This would have been on:

Edition	Windows 10 Pro
Version	22H2
Installed on	‎10/‎06/‎2024
OS build	19045.4651
Experience	Windows Feature Experience Pack 1000.19060.1000.0
- Browser: Microsoft Edge
Version 126.0.2592.113 (Official build) (64-bit)

Doing MIDI to OSC (if it matters).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants