// CCRMA Mobile Synths II Summer Workshop 2017 // Simple app to be controlled by a Teensy running duet.ino declare interface "SmartKeyboard{ 'Number of Keyboards':'1', 'Max Keyboard Polyphony':'0', 'Keyboard 0 - Number of Keys':'1', 'Keyboard 0 - Send Freq':'0', 'Keyboard 0 - Piano Keyboard':'0' }"; import("stdfaust.lib"); freq0 = hslider("freq0[midi:ctrl 10]",50,0,127,1) : ba.midikey2hz : si.smoo; freq1 = hslider("freq1[midi:ctrl 11]",50,0,127,1) : ba.midikey2hz : si.smoo; switch = hslider("switch[midi:ctrl 12]",0,0,127,1) : int; process = os.sawtooth(freq0)*((switch == 0) | (switch == 2)) + os.triangle(freq1)*((switch == 1) | (switch == 2)) : *(0.5) <: _,_;