User Forum    :: Powered by YaBB
  « MIDI-OX User Forum - Note length methods »
Welcome, Guest. Please Login or Register.
May 9th, 2025, 1:15am


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


   MIDI-OX User Forum
   MIDI-OX
   Scripting Questions
(Moderator: Jamie OConnell)
   Note length methods
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Note length methods  (Read 1692 times)
charlesrthompson
New Member
*



MIDI-OX Rules!

   


Posts: 1
Note length methods
« on: Mar 7th, 2009, 10:23pm »
Quote Quote Modify Modify

I may very well have overlooked this in the forums... if so I apologize in advance.
 
I'm trying to determine  a best method for using OutputMidiMsg to trigger a note for a certain duration (for argument sake let's say 1 second instead of getting into bpm and note lengths) then generate a next note for 1 sec, etc.
 
So the smaller question is: How can I do something like this:
 
CFGA  with each note being 1 second
 
And the larger question is: Is it possible to do this as a duo?
 
C D C A G A C A Each note is 1 second
C - F - G - A - each note is 2 seconds
 
In some languages I might do this through a function call with some type of timing loop but not sure if there are better ways in WScript.
IP Logged
msalmon
New Member
*



MIDI-OX Rules!

   


Posts: 10
Re: Note length methods
« Reply #1 on: Nov 23rd, 2009, 10:44am »
Quote Quote Modify Modify

I would try the following
 
<loop or sink function>
   OutputMidiMsg (note on..)
   WSH.Shell(1000)  
   OutputMidiMsg (note off..)
</loop>
I read somewhere that sysex uses buffers, but I don't think the other midi data is buffered so i think the above should work
IP Logged
monkeyboi
New Member
*



MIDI-OX Rules!

   


Posts: 9
Re: Note length methods
« Reply #2 on: Mar 13th, 2010, 6:25am »
Quote Quote Modify Modify

WScript.Sleep() is the function you're looking for. I'm pretty sure it will work because I use the sleep() function in VMM to set note lengths.
 
http://devguru.org/technologies/wsh/17382.asp
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.