|
||
Title: scripting - replacement [CC data ->SYSex messag Post by seekerlittle on Aug 19th, 2005, 4:50am Hello! I am trying to solve my problem: my MIDI foot controller Behringer FCB1010 cant transmit SYSex messages - only CC. Can i use scripting for replace [CC data->SYSex]? For example assign by scripting this function: if MIDI-ox recieve CC data (C0 05) then MIDI-ox send SYSex message (240 65 0 0 70 18 11 0 3 3 28 83 247 non-hex format, sorry). if MIDI-ox receive CC data (C0 04) then MIDI-ox send SYSex message ( message2 ). Can i realize this idea?? ??? Another idea - using MIDI data to automatize my hardware. Can i send time-based MIDI message, for example - 0:00 start data 0:01 send CC data C0 05 0:01-0:30 Idle 0:30-0:40 send LONG Sysex message (10sec of DATA) 0:40-0:50 send CC data ... ... etc .... .... 2:34 end Thanx |
||
Title: Re: scripting - replacement [CC data ->SYSex me Post by seekerlittle on Aug 19th, 2005, 6:34am I mean REAL-time Remapper from CC to SYS ex massages |
||
Title: Re: scripting - replacement [CC data ->SYSex me Post by dayton on Aug 19th, 2005, 7:38am Hi. Sure you can do these things. Using VBScript, here's the answer to the first question: Sub Sink_MidiInput( ts, port, stat, dat1, dat2) if stat=&b0 and dat1=4 (this means 5) then mox.SendSysExString strSysEx 'replace strSysEx with your string in hexadecimal end if end sub The second question is a bit more interesting. MidiOx in MidiSync method only does things when a midi note comes in. if you want this: Sub Sink_MidiInput( ts, port, stat, dat1, dat2) if stat=&b0 and dat1=4 (this means 5) then mox.SendSysExString strSysEx WScript.Sleep 300 'milliseconds mox.SendSysExString strSysEx WScript.Sleep 300 mox.SendSysExString strSysEx end if it will work great, but nothing else will happen while you are waiting for that part of the script to finish. Instead, you could use the polling method (which, instead of reacting to Midi Messages, just keeps looping at a very high speed and checks to see if any messages have come in since the last loop. In this way, you just have to look at the timer every time the loop repeats to see if it is time to do something. (this works fine, but I tried programming a sequencer in this manner, and the small variations in loop timing (depending on how much the machine had to do in any given loop) made the music a bit woozy.) try this with the polling method: Do While mox.ShouldExitScript = 0 'permanent loop if t=0 then t=timer '(this gives you the time in seconds, not ms) end if if timer=t+3 then mox.OutputMidiMsg -1, stat, dat1, dat2 end if if timer=t+5 then mox.OutputMidiMsg -1, stat, dat1, dat2 end if if timer=t+7 then mox.OutputMidiMsg -1, stat, dat1, dat2 end if end sub Good luck! (By the way, to get started, just copy the examples in the WSH-folder which came with MidiOx and change the information in the Sub's at the end of the script to suit your needs.) |
||
MIDI-OX User Forum » Powered by YaBB 1 Gold - SP 1.3.1! YaBB © 2000-2003. All Rights Reserved. |