Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. import("stdfaust.lib");
  2.  
  3. gain = 0.25;
  4. tempo_scale = hgroup("[0]tempo",hslider("master tempo scale",1,0.1,10,0.1));
  5. step_count = 8;
  6.  
  7. 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)
  8. with {
  9. 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);
  10. 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));
  11. 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));
  12. 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));
  13. step_duration_counter(duration_in_samples) = (1/duration_in_samples) * tempo_scale : + ~ (\(x).(x,0 : select2(>=(x,1)))) : >=(1);
  14. step_index_counter(trigger) = 0,1 : select2(trigger) : + ~ %(step_count);
  15. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement