Skip to content

Commit

Permalink
update sequencer.ck
Browse files Browse the repository at this point in the history
  • Loading branch information
David Braun committed Jan 16, 2022
1 parent c546f3b commit e8b189e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions assets/sequencer.ck
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// number of tracks
7 => int NUM_TRACKS;

// TouchDesigner will set these global Event and int variables
// TouchDesigner sets these global Event and int variables
global Event notifier0;
global Event notifier1;
global Event notifier2;
Expand Down Expand Up @@ -32,10 +32,11 @@ global float playheadPos;
// so we pick something less than (1000./60.)=16.6 ms
10::ms => dur POS_RATE;

// MEASURE_SEC is the amount of seconds in 4 quarter notes
(240. / BPM)::second => dur MEASURE_SEC;
// MEASURE_SEC is the amount of seconds in 4 beats
(60. * 4./ BPM)::second => dur MEASURE_SEC;

// posInc is how much playheadPos needs to increment when now advances by POS_RATE
// posInc is how much playheadPos needs to increment
// when now advances by POS_RATE
POS_RATE/MEASURE_SEC => float posInc;

class Track {
Expand Down Expand Up @@ -65,7 +66,8 @@ class Track {

time offTime;

fun void setup(int id, string name, string file_path, int seq[], Event notifier) {
fun void setup(int id, string name, string file_path,
int seq[], Event notifier) {
id => trackID;
name => myName;
seq @=> mySeq;
Expand Down

0 comments on commit e8b189e

Please sign in to comment.