09-17-2018, 04:49 PM | #1 |
Human being with feelings
Join Date: Sep 2018
Posts: 2
|
MIDI to OSC Translator Help
I'm trying to use OSCII-bot to send OSC commands from MIDI notes. The problem is I'm not the best coder and I'm not sure where I'm getting stuck. Here is what I've written based off the examples:
Code:
@input midi_in MIDI "E-MU XMidi1X1 Tab" //"Name" is full device name from device manager @output osc_out OSC "localhost:8000" //Loop back to computer, match in port of Nomad @midimsg msg1 == 90 ? ( msg2 == 01; oscsend(osc_out,"/eos/chan=1"); msg2 == 02; oscsend(osc_out,"/eos/chan=2"); msg2 == 03; oscsend(osc_out,"/eos/chan=3"); msg2 == 04; oscsend(osc_out,"/eos/chan=4"); msg2 == 05; oscsend(osc_out,"/eos/chan=5"); msg2 == 06; oscsend(osc_out,"/eos/chan=6"); msg2 == 07; oscsend(osc_out,"/eos/chan=7"); ); EDIT: Skipped the explanation of what I need. I need to send a different OSC message based on the note received. Last edited by WayfarerAM; 09-18-2018 at 12:05 AM. |
09-17-2018, 09:44 PM | #2 |
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
|
the instruction
x == 7; is a NOP. Guessing what you are trying to accomplish: EEL code for "case": Code:
a == 1 ? ( b = 10; ) : a == 2 ? ( b = 20; ) : a == 3 ? ( b = 30; ) : a == 4 ? ( b = 40; ) : a == 5 ? ( b = 50; ); |
09-18-2018, 12:03 AM | #3 |
Human being with feelings
Join Date: Sep 2018
Posts: 2
|
I'm assuming from the programming document that the parts of a MIDI message of the structure. In OSCII msg1 is the channel, msg 2 is the note, and msg 3 is velocity. The controller I'm using sends all the information on the same channel so msg1 should remain the same but msg2 would be different depending on the button (MIDI note). I want different OSC messages depending on the note.
|
09-18-2018, 06:46 AM | #4 | ||
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
|
Quote:
In EEL (and C and many other languages), hexadecimal is denoted by 0x90. While "90" just means 90, "0x90" means a decimal value of 144. Quote:
-Michael Last edited by mschnell; 09-18-2018 at 09:25 PM. |
||
Thread Tools | |
Display Modes | |
|
|