Sampler in ChucK
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
638B

  1. //signal chain; record a sine wave, play it back
  2. adc => LiSa saveme => dac;
  3. adc => dac; //monitor the input
  4. 0.5 => adc.gain;
  5. //alloc memory; required
  6. 2::second => saveme.duration;
  7. //start recording input
  8. 1 => saveme.loop;
  9. 0::second => saveme.playPos;
  10. 1::second => saveme.loopEnd;
  11. // Start recording, wait one second, then start playing
  12. saveme.record(1);
  13. 1::second => now;
  14. 1 => saveme.play;
  15. while(true)
  16. {
  17. 1::second => now;
  18. }
  19. /*
  20. // Effects chain
  21. adc => LiSa s => dac;
  22. 1::second => s.duration;
  23. 0::second => s.recPos;
  24. 1::second => s.playPos;
  25. s.loop(1);
  26. s.loopRec(1);
  27. s.play(1);
  28. while (true){
  29. 1::second => now;
  30. }
  31. */