This GitLab instance reached the end of its service life. It won't be possible to create new users or projects.

Please read the deprecation notice for more information concerning the deprecation timeline

Visit migration.git.tu-berlin.de (internal network only) to import your old projects to the new GitLab platform 📥

sample_trigger.dsp 548 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
// sample_trigger.dsp
//
// Read files and make them playable with a trigger.
//
// - makes use of the 
//
// Henrik von Coler
// 2020-05-28

import("stdfaust.lib");

// read a set of wav files
s = soundfile("label[url:{'../WAV/kick.wav'; '../WAV/cowbell.wav'; '../WAV/my_model.wav'}]", 1);

// a slider for controlling the level of all samples:
level = hslider("level",1,0,2,0.01);
 
// sample objects
kick = so.sound(s, 0);
bell = so.sound(s, 1);

process = kick.play( level, button("kick") ),  bell.play( level, button("bell")) :>  _   <: _,_ ;