Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import("stdfaust.lib");
- gain = 0.25;
- tempo_scale = hgroup("[0]tempo",hslider("master tempo scale",1,0.1,10,0.1));
- step_count = 8;
- process = (step_duration_counter : step_index_counter) ~ duration_select : \(s).((osc1_freq_select(s)+(os.osc(osc2_freq_select(s))*osc2_amp_select(s))) : os.osc * gain)
- with {
- duration_select(i) = hgroup("time",par(i,step_count,vslider("t%i",500,1,1000,0.1)) : ba.selectn(step_count,i) / 1000 * ma.SR);
- osc1_freq_select(i) = hgroup("osc 1 pitch",par(i,step_count,vslider("f%i",100*(i+1),50,1000,0.1)) : ba.selectn(step_count,i));
- osc2_amp_select(i) = hgroup("osc 2 amp",par(i,step_count,vslider("a%i",0,0,1000,0.1)) : ba.selectn(step_count,i));
- osc2_freq_select(i) = hgroup("osc 2 pitch",par(i,step_count,vslider("a%i",100*(i+1),50,1000,0.1)) : ba.selectn(step_count,i));
- step_duration_counter(duration_in_samples) = (1/duration_in_samples) * tempo_scale : + ~ (\(x).(x,0 : select2(>=(x,1)))) : >=(1);
- step_index_counter(trigger) = 0,1 : select2(trigger) : + ~ %(step_count);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement