A p5.Part plays back one or more p5.Phrases. Instantiate a part with steps and tatums. By default, each step represents a 1/16th note.
See p5.Phrase for more about musical timing.
Examples
Syntax
p5.Part([steps], [tatums])
Parameters
Steps in the part
Divisions of a beat, e.g. use 1/4, or 0.25 for a quater note (default is 1/16, a sixteenth note)
Methods
Set the tempo of this part, in Beats Per Minute.
Returns the tempo, in Beats Per Minute, of this part.
Start playback of this part. It will play through all of its phrases at a speed determined by setBPM.
Loop playback of this part. It will begin looping through all of its phrases at a speed determined by setBPM.
Tell the part to stop looping.
Stop the part and cue it to step 0. Playback will resume from the begining of the Part when it is played again.
Pause the part. Playback will resume from the current step.
Add a p5.Phrase to this Part.
Remove a phrase from this part, based on the name it was given when it was created.
Get a phrase from this part, based on the name it was given when it was created. Now you can modify its array.
Find all sequences with the specified name, and replace their patterns with the specified array.
Set the function that will be called at every step. This will clear the previous function.