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 to import your old projects to the new GitLab platform 📥

Commit 8253db60 by Henrik von Coler

Added polyphonic MIDI trigger example!

parent 87320553
// midi-example.dsp
//
// Control a square wave oscillator with a MIDI controller.
//
// Compile with: faust2xxxx -midi -nvoices 12 midi_trigger.dsp
//
//
// (from: https://ccrma.stanford.edu/~rmichon/faustTutorials)
//
// Henrik von Coler
// 2020-05-17
import("stdfaust.lib");
freq = nentry("freq",200,40,2000,0.01) : si.polySmooth(gate,0.999,2);
gain = nentry("gain",1,0,1,0.01) : si.polySmooth(gate,0.999,2);
gate = button("gate") : si.smoo;
process = vgroup("synth",os.sawtooth(freq)*gain*gate <: _,_);
// import("stdfaust.lib");
// freq =100;
// hslider("frequency[midi:ctrl 48]",100,20,1000,0.1) : si.smoo;
// trigger = 1 when MIDI key pressed
// = 0 when released
// trig = button("trigger[midi:key 0,1]");
// process = os.osc(freq) * en.arfe(0.01, 1, 0,trig) <: _,_ ;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment