// Edmond Howser // CCRMA Mobile Synth Workshop 6/2017 // This code is based on the ideas behind Equilibrium by Jordan Nobles // The original score can be found on www.jordannobles.com // Collection of Open Score Works (1997-2016) Jordan Nobles // The interface is a set of five keyboard with 7 buttons // The first button intentionally is silent // Each row represents a set of fifths // Instructions (based upon original score) // play freely in your own time // only ever play the given notes, in a random order // players can pause at any time to breathe and to listen before proceeding // all notes should be soft and quiet throughout the piece // the duration of the piece is variable but should probably be decided on ahead of time // there are no parts or formal score... any musicians play freely from available notes // there is no pulse, tempo, measures or exact synchronization. import("stdfaust.lib"); declare interface "SmartKeyboard{ 'Number of Keyboards':'5', 'Max Keyboard Polyphony':'1', 'Keyboard 0 - Number of Keys':'7', 'Keyboard 1 - Number of Keys':'7', 'Keyboard 2 - Number of Keys':'7', 'Keyboard 3 - Number of Keys':'7', 'Keyboard 4 - Number of Keys':'7', 'Keyboard 0 - Piano Keyboard':'0', 'Keyboard 1 - Piano Keyboard':'0', 'Keyboard 2 - Piano Keyboard':'0', 'Keyboard 3 - Piano Keyboard':'0', 'Keyboard 4 - Piano Keyboard':'0', }"; g = hslider("g[acc: 0 1 -10 0 10]",0.5,0,1.0,0.01) : si.smoo; key = hslider("key",0,0,6,1); keyboard = hslider("keyboard",0,0,4,1); t = button("gate"); // Pitches & Frequencies XX = 0; C1 = 32.70; G1 = 49.00; C2 = 65.41; D2 = 73.42; E2 = 82.41; F2 = 87.31; G2 = 98.00; A2 = 110.00; B2 = 123.47; C3 = 130.81; D3 = 146.83; E3 = 164.81; F3s = 185.00; G3 = 196.00; A3 = 220.00; B3 = 246.94; D4 = 293.66; E4 = 329.63; F4s = 368.99; B4 = 493.88; C4s = 277.18; G4s = 415.30; A4 = 440.00; C5s = 554.37; D5s = 622.25; E5 = 659.25; F5s = 739.99; G5s = 830.61; D6s = 1244.51; A6s = 1864.66; E7s = 2783.83; B7s = 4186.01; // Frequencies for Keyboard 0 freq0 = (keyboard == 0)*(key==0)*XX + (keyboard == 0)*(key==1)*G2 + (keyboard == 0)*(key==2)*D3 + (keyboard == 0)*(key==3)*A3 + (keyboard == 0)*(key==4)*E4 + (keyboard == 0)*(key==5)*B4 + (keyboard == 0)*(key==6)*F5s; // Frequencies for Keyboard 1 freq1 = (keyboard == 1)*(key==0)*XX + (keyboard == 1)*(key==1)*F2 + (keyboard == 1)*(key==2)*C3 + (keyboard == 1)*(key==3)*G3 + (keyboard == 1)*(key==4)*D4 + (keyboard == 1)*(key==5)*A4 + (keyboard == 1)*(key==6)*E5; // Frequencies for Keyboard 2 freq2 = (keyboard == 2)*(key==0)*XX + (keyboard == 2)*(key==1)*E2 + (keyboard == 2)*(key==2)*B2 + (keyboard == 2)*(key==3)*F3s + (keyboard == 2)*(key==4)*C4s + (keyboard == 2)*(key==5)*G4s + (keyboard == 2)*(key==6)*D5s; // Frequencies for Keyboard 3 freq3 = (keyboard == 3)*(key==0)*XX + (keyboard == 3)*(key==1)*D2 + (keyboard == 3)*(key==2)*A2 + (keyboard == 3)*(key==3)*E3 + (keyboard == 3)*(key==4)*B3 + (keyboard == 3)*(key==5)*F4s + (keyboard == 3)*(key==6)*C5s; // Frequencies for Keyboard 4 freq4 = (keyboard == 4)*(key==0)*XX + (keyboard == 4)*(key==1)*C2 + (keyboard == 4)*(key==2)*G2 + (keyboard == 4)*(key==3)*D3 + (keyboard == 4)*(key==4)*A3 + (keyboard == 4)*(key==5)*E4 + (keyboard == 4)*(key==6)*B4; signal0 = os.osc(freq0); signal1 = os.osc(freq1); signal2 = os.osc(freq2); signal3 = os.osc(freq3); signal4 = os.osc(freq4); envelope0 = en.adsr(5,2.5,80,5,t) * g; envelope1 = en.adsr(5,2.5,80,5,t) * g; envelope2 = en.adsr(5,2.5,80,5,t) * g; envelope3 = en.adsr(5,2.5,80,5,t) * g; envelope4 = en.adsr(5,2.5,80,5,t) * g; synth = signal0*envelope0*(keyboard == 0) + signal1*envelope1*(keyboard == 1) + signal2*envelope2*(keyboard == 2) + signal3*envelope3*(keyboard == 3) + signal4*envelope4*(keyboard == 4); process = synth <: _,_;