Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: beats to bar printing
name
code content
( f = (); f.beatAndBar = { var t = currentEnvironment.clock; // t= TempoClock.new; var text = "xB: "; var nBeatsPerBar = { arg n, beats, clock; var nBpb = clock.beatsPerBar * n; "" ++ n ++ text ++ (nBpb - (beats%(nBpb))).asInteger }; t.play({arg beats, time, clock; ( //["beat: " ++ (t.beatInBar + 1).asInteger] ++ //uncomment for beat in bar [1,2,4,8,16,32].collect( {|n,i| nBeatsPerBar.value(n, beats, clock)}) ).postln; 1}); "beatAntBar"; } ) f[\beatAndBar].value; ( f[\beatAndBar].value; CmdPeriod.add(f[\beatAndBar]); )
code description
Prints beats to bars for a mutiple of bar. How many beats left until next 1, 2, 4, 8, 16, 32, etc bar.
use markdown for formating
category tags
comma separated, i.g. "wild, siren" (do not enter default SC class names, please)
ancestor(s)
comma separated identificators, i.g. "1-C,1-1,1-4M,1-x"
Private?
the code will be accessible by direct url and not visible in public activity
signup to submit public code without captcha
comment of change