tur/tidal
stdlib/tidal.tur
defn
scale-pat
(scale-pat [scale & [tonic 60])
build a cycling MIDI note pattern from a scale and tonic.
Parameters
| scale | list of semitone offsets from the tonic | |
| tonic | base MIDI note number (default: 60 = middle C) |
Example
NumPattern cycling through the MIDI notes of the scale. (scale-pat MAJOR_SCALE 60)
defn
play
(play [session def-name pattern-string bpm])
parse a mini-notation string and start a synth player.
Parameters
| session | scscm session | |
| def-name | SynthDef name | |
| pattern-string | mini-notation pattern string | |
| bpm | tempo in beats per minute |
Example
PatternPlayer (already started). (play session "default" "bd sd bd sd" 120)
defn
hush
(hush [session])
stop all patterns in a session.
Parameters
| session | LiveSession or scscm session |
defn
drum-machine
(drum-machine [kick-pattern snare-pattern hat-pattern])
combine kick, snare, and hi-hat patterns into a stacked drum part.
Parameters
| kick-pattern | Pattern for kick drum | |
| snare-pattern | Pattern for snare drum | |
| hat-pattern | Pattern for hi-hat |
Example
Pattern<vec<map>> stacking all three drum voices. (drum-machine DRUM_KICK DRUM_SNARE DRUM_HAT)
defn
bass-line
(bass-line [notes & [duration (pattern/const 0.25) velocity (pattern/const 100)])
create a bass line note pattern.
Parameters
| notes | Pattern for MIDI note pitches | |
| duration | Pattern for note durations in beats (default: 0.25) | |
| velocity | Pattern for velocities (default: 100) |
Returns
Pattern<map> suitable for a bass synth.
defn
lead
(lead [notes & [duration (pattern/const 0.5) velocity (pattern/const 90)])
create a lead melody note pattern.
Parameters
| notes | Pattern for MIDI note pitches | |
| duration | Pattern for note durations in beats (default: 0.5) | |
| velocity | Pattern for velocities (default: 90) |
Returns
Pattern<map> suitable for a lead synth.
defn
pad
(pad [chords & [duration (pattern/const 1.0) velocity (pattern/const 70)])
create a pad chord pattern.
Parameters
| chords | Pattern<vec<int>> for chord voicings (MIDI notes) | |
| duration | Pattern for chord durations (default: 1.0) | |
| velocity | Pattern for velocities (default: 70) |
Returns
Pattern<vec<map>> suitable for a pad synth.