User Forum    :: Powered by YaBB
  « MIDI-OX User Forum - scripting - replacement [CC data ->SYSex messag »
Welcome, Guest. Please Login or Register.
May 9th, 2025, 8:44am


Home Home Help Help Search Search Members Members Login Login Register Register


   MIDI-OX User Forum
   MIDI-OX
   Scripting Questions
(Moderator: Jamie OConnell)
   scripting - replacement [CC data ->SYSex messag
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: scripting - replacement [CC data ->SYSex messag  (Read 2027 times)
seekerlittle
New Member
*



MIDI-OX Rules!

   
Email

Posts: 4
scripting - replacement [CC data ->SYSex messag
« on: Aug 19th, 2005, 4:50am »
Quote Quote Modify Modify

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?? Huh
 
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
IP Logged
seekerlittle
New Member
*



MIDI-OX Rules!

   
Email

Posts: 4
Re: scripting - replacement [CC data ->SYSex me
« Reply #1 on: Aug 19th, 2005, 6:34am »
Quote Quote Modify Modify

I mean REAL-time Remapper from CC to SYS ex massages
IP Logged
dayton
Member
**



MIDI-OX Rules!

   


Posts: 15
Re: scripting - replacement [CC data ->SYSex me
« Reply #2 on: Aug 19th, 2005, 7:38am »
Quote Quote Modify Modify

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.)
IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »


MIDI-OX User Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.