Skip to content

audio()

Play music library material using audio samples as the instruments.

Play.audio(material, audioSamples)

Each channel in the material is played by the audio sample at the same position in audioSamples. The optional loopFlags and envelopes lists are parallel to audioSamples.

Parameters

Play.audio(material, audioSamples, loopFlags=[], envelopes=[])
Parameter Type Default Description
material Note, Phrase, Part, or Score required The music to play.
audioSamples list[AudioSample] required The audio samples to play with, one per channel.
loopFlags list[bool] [] Whether to loop each sample if a note outlasts it. Defaults to no looping.
envelopes list[Envelope] [] An envelope to shape each sample's volume over time.