class-rhythmpattern

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
class-rhythmpattern [2022/03/14 01:09] – created renickclass-rhythmpattern [2023/10/05 23:05] (current) steve.wang
Line 1: Line 1:
 ====== class: RhythmPattern ====== ====== class: RhythmPattern ======
  
-===== Description =====+<markdown> 
 +### RhythmPattern
  
-===== Constructor =====+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.
  
-===== Static Properties =====+#### Methods  
 +##### constructor 
 +String -> Number -> [Number ...] -> [Boolean] -> Object
  
-===== Static Methods =====+Creates the RhythmPattern 
 +##### Syntax 
 +``` 
 +new RhythmPattern(n, l, i, b) 
 +```
  
-===== Instance Properties =====+##### Parameters 
 +###### n 
 +Name of the rhythmPattern. 
 +###### l 
 +Length of the rhythmPattern 
 +###### i 
 +A number array filled with the booleans "true" and "false".
  
-===== Instance Methods =====+##### Examples 
 +``` 
 +let testR new RhythmPattern('dopeRhythm', 5, [2, 2, 2, 2, 2], [true, false, true, true]) 
 +```
  
-===== Examples =====+---
  
 +---
 +##### 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')
 +```
 +
 +---
 +
 +---
 +</markdown>
  • class-rhythmpattern.1647245389.txt.gz
  • Last modified: 2022/03/14 01:09
  • by renick