Plays the pattern.
midi_out {}, 4
Argument | Description | Default |
---|---|---|
pattern | A pattern or an array of patterns to play. | |
quantization | The quantization in beats. |
The pattern is a map with optional values:
dur
- note durationlength
- note lengthdegree
- step in the scalescale
- case-insensitive, to view available scales execute print_scales
functionroot
- root notetranspose
- simple transposemtranspose
- transpose relating to the scaleoctave
- octave number (from 0)channel
- MIDI channel numberamp
- amplitude (from 0.0 to 1.0)Prints all available scales to the console.
Converts any value into an iterator.
Argument | Description | Default |
---|---|---|
value | Any value. |
Returns a random number between two values.
Argument | Description | Default |
---|---|---|
low | Low value (a number). | |
high | High value (a number). |
Returns a random number between two values exponentially.
Argument | Description | Default |
---|---|---|
low | Low value (a number). | |
high | High value (a number). |
Returns a random value between 0 and the number.
Returns a random number between the negative number and the number.
Folds the number between two values.
Argument | Description | Default |
---|---|---|
low | Low value (a number). | |
high | High value (a number). |
Round the number regarding to given quantization.
Argument | Description | Default |
---|---|---|
quantization | A number. |
Returns the sign of the number.
Wraps the number between two values.
Argument | Description | Default |
---|---|---|
low | Low value (a number). | |
high | High value (a number). |
Scrambles the list.
Interprets the list's values as normalized probabilities and randomly returns an index with the given probabilities.
Recalculates the values in the list and returns the list with the values sum equal to 1.0.
Perform addition between the iterator and another iterator or a number.
Argument | Description | Default |
---|---|---|
value | Iterator or number. |
Perform subtraction between the iterator and another iterator or a number.
Argument | Description | Default |
---|---|---|
value | Iterator or number. |
Perform multiplication between the iterator and another iterator or a number.
Argument | Description | Default |
---|---|---|
value | Iterator or number. |
Perform division between the iterator and another iterator or a number.
Argument | Description | Default |
---|---|---|
value | Iterator or number. |
Perform the modulo operation between the iterator and another iterator or a number.
Argument | Description | Default |
---|---|---|
value | Iterator or number. |
Powered by Doctave