play-sound

(play-sound time au pitch volume duration)


Description:

Play a sound of duration by sending extended api information to the specified au. Duration is in samples.  Pitch values are real numbers where the decimal portion is in cents (i.e. 60.25 = C+25cents).  volumes are also real number values.  NOTE: this only works with audiounits supporting the extended AudioUnit Note API (at the present the only AU I know that supports this is apples DLS). If your AU does not support this use the standard play-note function instead.


Arguments:

          pitch -- real number value where decimal portion is in cents (i.e. 60.25 = C+25cents)

       duration -- in samples

         volume -- real number volume

             au -- audiounit

           time -- time in samples to play note


Returns: boolean


Examples:

(play-sound (now) inst 60.25 80.5 (* *second* 1.0))



Back to index