(play-note time au pitch volume duration [midi-channel])


Play a note by sending a note-on then a note-off event seperated by duration to au.  Duration is in samples.  Pitch values falling outside of 0-127 are ignored (so you can use negative numbers as rests if you like).  If for some reason you need to send pitch values outside of 0-127 you can call au:midi-out which does not bounds checking.


          pitch -- 0-127 midi

       duration -- in samples

         volume -- 0-127 midi

   midi-channel -- optional midi-channel defaults to 0

             au -- audiounit

           time -- time in samples to play note

Returns: boolean


(play-note (now) inst 60 80 (* *second* 1.0))

Back to index