class: RhythmPattern
RhythmPattern
A RhythmPattern is a set of parameters bundled as an object which is used to create a rhythm pattern and mask pattern for a particular Player.
Methods
constructor
String -> Number -> [Number ...] -> [Boolean] -> Object
Creates the RhythmPattern
Syntax
new RhythmPattern(n, l, i, b)
Parameters
n
Name of the rhythmPattern.
l
Length of the rhythmPattern
i
A number array filled with the booleans "true" and "false".
Examples
let testR = new RhythmPattern('dopeRhythm', 5, [2, 2, 2, 2, 2], [true, false, true, true])
addToPlayer
MusicalEnvironment -> String ->
Adds this RhythmPattern to a player.
Syntax
testR.addToPlayer(env, playerName)
Parameters
env
MusicalEnvironment
playerName
Name of the player to add to.
Examples
testR.addToPlayer(e, 'p3')
add
MusicalEnvironment -> String ->
Adds to MusicalEnvironment but does not add to a player.
Syntax
testR.add(env, playerName)
Parameters
env
MusicalEnvironment
playerName
Name of the player to add to.
Examples
testR.add(e, 'p3')