@@ -1,181 +0,0 @@ | |||
<Cabbage> | |||
form caption("vocoder"), size(530, 230), pluginID("voco") | |||
image pos(0, 0), size(530, 200), colour(255,255,150), shape("rounded"), outline("LightBrown"), line(4) | |||
image bounds(140, 6,180, 31), colour( 10,225, 90,100), shape("ellipse"), outline(205,205, 70), line(1) | |||
label bounds(158, 5, 33, 33), text("v"), FontColour(100,100,100) | |||
label bounds(178, 5, 33, 33), text("o"), FontColour(100,100,100) | |||
label bounds(198, 5, 33, 33), text("c"), FontColour(100,100,100) | |||
label bounds(218, 5, 33, 33), text("o"), FontColour(100,100,100) | |||
label bounds(238, 5, 33, 33), text("d"), FontColour(100,100,100) | |||
label bounds(258, 5, 33, 33), text("e"), FontColour(100,100,100) | |||
label bounds(278, 5, 33, 33), text("r"), FontColour(100,100,100) | |||
label bounds(161, 4, 30, 30), text("v"), FontColour(255, 0, 0) | |||
label bounds(181, 4, 30, 30), text("o"), FontColour(235, 0, 20) | |||
label bounds(201, 4, 30, 30), text("c"), FontColour(215, 0, 40) | |||
label bounds(221, 4, 30, 30), text("o"), FontColour(195, 0, 60) | |||
label bounds(241, 4, 30, 30), text("d"), FontColour(175, 0, 80) | |||
label bounds(261, 4, 30, 30), text("e"), FontColour(155, 0,100) | |||
label bounds(281, 4, 30, 30), text("r"), FontColour(135, 0,120) | |||
label bounds( 15, 10, 85, 11), text("Carrier Source"), FontColour("black") | |||
combobox bounds( 10, 21, 85, 15), channel("CarSource"), value(1), text("synth","external") | |||
label bounds( 10, 40, 85, 11), text("Filter Steepness"), FontColour("black") | |||
combobox bounds( 10, 51, 85, 15), channel("steepness"), value(2), text("12dB/oct","24dB/oct") | |||
label bounds( 25, 70, 85, 11), text("Synth Type"), FontColour("black") | |||
combobox bounds( 10, 81, 85, 15), channel("SynType"), value(1), text("saw","square","pulse","noise") | |||
rslider bounds(105, 38, 70, 70), text("Base"), colour(255,255,120), FontColour("Black"), channel("base"), range(24, 80, 40,1,1) | |||
rslider bounds(165, 38, 70, 70), text("Num."), colour(255,255,120), FontColour("Black"), channel("num"), range(1, 100, 16,1,1) | |||
rslider bounds(225, 38, 70, 70), text("B.width"), colour(255,255,120), FontColour("Black"), channel("bw"), range(0.01, 1, 0.1,0.5) | |||
rslider bounds(285, 38, 70, 70), text("Spacing"), colour(255,255,120), FontColour("Black"), channel("incr"), range(1, 12, 5,0.5) | |||
vslider bounds(350,-10, 50,110), colour(255,255,120), FontColour("Black"), channel("BPGain"), range(0, 1, 0.6, 0.5) | |||
vslider bounds(400,-10, 50,110), colour(255,255,120), FontColour("Black"), channel("HPGain"), range(0, 1, 0.25, 0.5) | |||
label bounds(365, 95, 50, 12), text("BPF"), FontColour("black") | |||
label bounds(415, 95, 50, 12), text("HPF"), FontColour("black") | |||
checkbox bounds(468, 40, 30, 30), channel("gate"), text("Gate Input"), value(0), shape("ellipse") | |||
label bounds(455, 75, 80, 12), text("Gate Input"), colour("black"), FontColour("black") | |||
keyboard bounds(10, 112, 510,80) | |||
infobutton bounds(5,205, 100, 20), text("Help"), file("VocoderHelp.html") | |||
image bounds(105, 205, 320, 20), colour(75, 85, 90, 50), plant("credit"){ | |||
label bounds(0.03, 0.1, .6, .7), text("Author: Iain McCurdy |2012|"), colour("white"), FontColour("LightGreen") | |||
} | |||
</Cabbage> | |||
<CsoundSynthesizer> | |||
<CsOptions> | |||
-dm0 -n -+rtmidi=null -M0 | |||
</CsOptions> | |||
<CsInstruments> | |||
sr = 44100 | |||
ksmps = 64 | |||
nchnls = 2 | |||
0dbfs = 1 ;MAXIMUM AMPLITUDE | |||
massign 0,2 | |||
gisine ftgen 0,0,4096,10,1 | |||
gaSyn init 0 | |||
opcode VocoderChannel, a, aakiiiii ;MODE UDO | |||
aMod,aCar,ksteepness,ibase,ibw,iincr,icount,inum xin ;NAME INPUT VARIABLES | |||
icf = cpsmidinn(ibase+(icount*iincr)) ;DERIVE FREQUENCY FOR *THIS* BANDPASS FILTER BASED ON BASE FREQUENCY AND FILTER NUMBER (icount) | |||
icount = icount + 1 ;INCREMENT COUNTER IN PREPARTION FOR NEXT FILTER | |||
if icf>15000 goto SKIP ;IF FILTER FREQUENCY EXCEEDS A SENSIBLE LIMIT SKIP THE CREATION OF THIS FILTER AND END RECURSION | |||
aModF butbp aMod,icf,ibw*icf ;BANDPASS FILTER MODULATOR | |||
if ksteepness=2 then ;IF 24DB PER OCT MODE IS CHOSEN... | |||
aModF butbp aModF,icf,ibw*icf ;...BANDPASS FILTER AGAIN TO SHARPEN CUTOFF SLOPES | |||
endif ;END OF THIS CONDITIONAL BRANCH | |||
aEnv follow2 aModF, 0.05, 0.05 ;FOLLOW THE ENVELOPE OF THE FILTERED AUDIO | |||
aCarF butbp aCar,icf,ibw*icf ;BANDPASS FILTER CARRIER | |||
if ksteepness=2 then ;IF 24 DB PER OCT IS CHOSEN... | |||
aCarF butbp aCarF,icf,ibw*icf ;...BANDPASS FILTER AGAIN TO SHARPEN CUTOFF SLOPES | |||
endif ;END OF THIS CONDITIONAL BRANCH | |||
amix init 0 ;INITIALISE MIX VARIABLE CONTAINING ALL SUBSEQUENT BANDS | |||
if icount < inum then ;IF MORE FILTERS STILL NEED TO BE CREATED... | |||
amix VocoderChannel aMod,aCar,ksteepness,ibase,ibw,iincr,icount,inum ;...CALL UDO AGAIN WITH INCREMENTED COUNTER | |||
endif ;END OF THIS CONDITIONAL BRANCH | |||
SKIP: ;LABEL | |||
xout amix + (aCarF*aEnv) ;MIX LOCAL BAND WITH SUBSEQUENT BANDS GENERATED VIA RECURSION | |||
endop ;END OF UDO | |||
instr 1 ;READ IN WIDGETS | |||
gkCarSource chnget "CarSource" | |||
gkbase chnget "base" | |||
gknum chnget "num" | |||
gkbw chnget "bw" | |||
gkincr chnget "incr" | |||
gkBPGain chnget "BPGain" | |||
gkHPGain chnget "HPGain" | |||
gksteepness chnget "steepness" | |||
gkSynType chnget "SynType" | |||
gkgate chnget "gate" | |||
endin | |||
instr 2 ;SIMPLE SYNTH | |||
icps cpsmidi ;READ MIDI NOTE IN CPS FORMAT | |||
icps = icps*0.5 ;TRANSPOSE DOWN AND OCTAVE | |||
aenv linsegr 0,0.01,1,0.02,0 ;CREATE A SIMPLE GATE-TYPE ENVELOPE | |||
if gkSynType==1 then ;IF SYNTH TYPE CHOSEN FROM BUTTON BANK GUI IS SAWTOOTH... | |||
a1 vco2 1,icps ;...CREATE A SAWTOOTH WAVE TONE | |||
a1 tone a1,12000 ;LOWPASS FILTER THE SOUND | |||
elseif gkSynType=2 then ;IF SYNTH TYPE CHOSEN FROM BUTTON BANK GUI IS SQUARE... | |||
a1 vco2 1,icps,2,0.5 ;...CREATE A SQUARE WAVE TONE | |||
a1 tone a1,12000 ;LOWPASS FILTER THE SOUND | |||
elseif gkSynType=3 then ;IF SYNTH TYPE CHOSEN FROM BUTTON BANK GUI IS PULSE... | |||
a1 vco2 1,icps,2,0.1 ;...CREATE A PULSE WAVE TONE | |||
a1 tone a1,12000 ;LOWPASS FILTER THE SOUND | |||
else ;OTHERWISE... | |||
a1 pinkish 10 ;...CREATE SOME PINK NOISE | |||
a1 butbp a1,icps,icps ;BANDPASS FILTER THE SOUND. BANDWIDTH = 1 OCTAVE. NARROW BANDWIDTH IF YOU WANT MORE OF A SENSE OF PITCH IN THE NOISE SIGNAL. | |||
endif ;END OF THIS CONDITIONAL BRANCH | |||
gaSyn = gaSyn + (a1*aenv) ;APPLY ENVELOPE | |||
endin | |||
instr 3 | |||
ktrig changed gkbase,gkbw,gknum,gkincr ;IF ANY OF THE INPUT VARIABLE ARE CHANGED GENERATE A MOMENTARY '1' VALUE (A BANG IN MAX-MSP LANGUAGE) | |||
if ktrig=1 then ;IF A CHANGED VALUE TRIGGER IS RECEIVED... | |||
reinit UPDATE ;REINITIALISE THIS INSTRUMENT FROM THE LABEL 'UPDATE' | |||
endif ;END OF THIS CONDITIONAL BRANCH | |||
UPDATE: ;LABEL | |||
ibase init i(gkbase) ;CREATE AN INITIALISATION TIME VARIABLE FROM FLTK GUI CONTROL | |||
inum init i(gknum) ;CREATE AN INITIALISATION TIME VARIABLE FROM FLTK GUI CONTROL | |||
ibw init i(gkbw) ;CREATE AN INITIALISATION TIME VARIABLE FROM FLTK GUI CONTROL | |||
iincr init i(gkincr) ;CREATE AN INITIALISATION TIME VARIABLE FROM FLTK GUI CONTROL | |||
aMod inch 1 ;READ LIVE AUDIO FROM THE COMPUTER'S LEFT INPUT CHANNEL | |||
;GATE MODULATOR SIGNAL | |||
if gkgate==1 then ;IF 'Gate Modulator' SWITCH IS ON.... | |||
krms rms aMod ;SCAN RMS OF MODUALTOR SIGNAL | |||
kgate = (krms<0.05?0:1) ;IF RMS OF MODULATOR SIGNAL IS BELOW A THRESHOLD, GATE WILL BE CLOSED (ZERO) OTHERWISE IT WILL BE OPEN ('1'). LOWER THE THRESHOLD IF THE GATE IS CUTTING OUT TOO MUCH DESIRED SIGNAL, RAISE IT IF TOO MUCH EXTRANEOUS NOISE IS ENTERING THE OUTPUT SIGNAL. | |||
kgate port kgate,0.01 ;DAMP THE OPENING AND CLOSING OF THE GATE SLIGHTLY | |||
agate interp kgate ;INTERPOLATE GATE VALUE AND CREATE AN A-RATE VERSION | |||
aMod = aMod * agate ;APPLY THE GATE TO THE MODULATOR SIGNAL | |||
endif | |||
if gkCarSource==1 then ;IF 'SYNTH' IS CHOSEN AS CARRIER SOURCE... | |||
aCar = gaSyn ;...ASSIGN SYNTH SIGNAL FROM INSTR 2 AS CARRIER SIGNAL | |||
else ;OTHERWISE... | |||
aCar inch 2 ;READ AUDIO FROM RIGHT INPUT CHANNEL FOR CARRIER SIGNAL | |||
endif | |||
icount init 0 ;INITIALISE THE FILTER COUNTER TO ZERO | |||
amix VocoderChannel aMod,aCar,gksteepness,ibase,ibw,iincr,icount,inum ;CALL 'VocoderChannel' UDO - (WILL RECURSE WITHIN THE UDO ITSELF FOR THEW REQUIRED NUMBER OF FILTERS | |||
;HIGH-PASS CHANNEL | |||
iHPcf = cpsmidinn(ibase+(inum*iincr)+1) ;HIGHPASS FILTER CUTOFF (ONE INCREMENT ABOVE THE HIGHEST BANDPASS FILTER) | |||
iHPcf limit iHPcf,2000,18000 ;LIMIT THE HIGHPASS FILTER TO BE WITHIN SENSIBLE LIMITS | |||
aModHP buthp aMod, iHPcf ;HIGHPASS FILTER THE MODULATOR | |||
aEnv follow2 aModHP,0.01,0.01 ;FOLLOW THE HIGHPASS FILTERED MODULATOR'S AMPLITUDE ENVELOPE | |||
aCarHP buthp aCar, iHPcf ;HIGHPASS FILTER THE CARRIER | |||
amix = (amix*gkBPGain*5)+(aCarHP*aEnv*gkHPGain*3) ;MIX THE HIGHPASS FILTERED CARRIER WITH THE BANDPASS FILTERS. APPLY THE MODULATOR'S ENVELOPE. | |||
outs amix,amix ;SEND AUDIO TO THE OUTPUTS | |||
clear gaSyn ;CLEAR THE INTERNAL SYNTH ACCUMULATING GLOBAL VARIABLE, READ FOR THE NEXT PERF. PASS | |||
rireturn ;RETURN FROM REINITIALISATION PASS. (NOT REALLY NEED AS THE endin FULFILS THE SAME FUNCTION.) | |||
endin | |||
</CsInstruments> | |||
<CsScore> | |||
i 1 0 [60*60*24*7] ;READ IN WIDGETS | |||
i 3 0 [60*60*24*7] ;VOCODER | |||
</CsScore> | |||
</CsoundSynthesizer> |
@@ -1,97 +0,0 @@ | |||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | |||
<HTML> | |||
<HEAD> | |||
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252"> | |||
<TITLE></TITLE> | |||
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)"> | |||
<META NAME="CREATED" CONTENT="20120918;12541200"> | |||
<META NAME="CHANGED" CONTENT="20121002;7553400"> | |||
<STYLE TYPE="text/css"> | |||
<!-- | |||
@page { margin: 2cm } | |||
P { margin-bottom: 0.21cm } | |||
A:link { so-language: zxx } | |||
--> | |||
</STYLE> | |||
</HEAD> | |||
<BODY LANG="en-GB" DIR="LTR"> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Verdana, sans-serif"><FONT SIZE=5><U><B>Vocoder</B></U></FONT></FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><BR> | |||
</P> | |||
<P STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> | |||
<FONT FACE="Tahoma, sans-serif"><FONT SIZE=3>This is an | |||
implementation of a traditional analogue style vocoder. Two audio | |||
signals, referred to as a modulator and a carrier, are passed into | |||
the vocoder effect. The modulator is typically a voice and the | |||
carrier is typically a synthesizer. The modulator is analysed by | |||
being passed into a multiband filter (a bank of bandpass filters), | |||
the amplitude envelope of each band is tracked and a control function | |||
for each band generated. The carrier signal is also passed through a | |||
matching multiband filter, the set of amplitude envelopes derived | |||
from the modulator analysis is applied to the outputs of this second | |||
multiband filter. </FONT></FONT> | |||
</P> | |||
<P STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> | |||
<FONT FACE="Tahoma, sans-serif"><FONT SIZE=3>The uppermost band of | |||
the filter bank is always a highpass filter. This is to allow high | |||
frequency sibilants in the modulator signal to be accurately | |||
represented.</FONT></FONT></P> | |||
<P STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> | |||
<FONT FACE="Tahoma, sans-serif"><FONT SIZE=3>The modulator signal is | |||
always the signal received at the left input channel. For best | |||
results it is recommended to use a high quality external microphone.</FONT></FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><BR> | |||
</P> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Carrier | |||
Source -</B> Source used as carrier signal. Either an internal synth | |||
or an external signal. If external is chosen, audio is taken from the | |||
right input channel.</FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><BR> | |||
</P> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Filter | |||
Steepness –</B> Steepness of the filters used for both analysis | |||
and carrier processing.</FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><BR> | |||
</P> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Synth | |||
Type –</B> Type of oscillator used by the internal synthesizer. | |||
Choose between <I>sawtooth</I>, <I>square</I>, <I>pulse</I> or <I>noise</I>.</FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><BR> | |||
</P> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Base | |||
–</B> Frequency of the lowest filter (both analysis and | |||
processing) expressed as a MIDI note number.</FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><BR> | |||
</P> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Num | |||
–</B> Number of filters that constitute the multibank filters | |||
used during both the analysis of the modulator and the carrier | |||
processing.</FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><BR> | |||
</P> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>B.width | |||
–</B> Bandwidth of the bandpass filters expressed in octaves.</FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><BR> | |||
</P> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Spacing | |||
–</B> Spacing between the bandpass filters expressed in | |||
semitones.</FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><BR> | |||
</P> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>BPF | |||
–</B> Gain of the bank of bandpass filters.</FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><BR> | |||
</P> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>HPF | |||
–</B> Gain of the single highpass filter.</FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><BR> | |||
</P> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Gate | |||
Input –</B> Activating this switch will apply a noise gate to | |||
the modulator signal. This option might be useful if the microphone | |||
used in rather noisy, such as would be the case if using the built-in | |||
microphone on a laptop, or if working in a noisy environment.</FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><BR> | |||
</P> | |||
</BODY> | |||
</HTML> |
@@ -1,647 +0,0 @@ | |||
<Cabbage> | |||
form caption("Arpeggiator") size(700, 440), pluginID("arpe") | |||
groupbox bounds( 5, 0, 690, 100), text("Arpeggiator"),{ | |||
rslider bounds( 10, 30, 60, 60), text("Interval"), channel("intvl"), range(-36, 36, 7, 1, 1) | |||
rslider bounds( 60, 30, 60, 60), text("Cycles"), channel("cycles"), range(0, 32, 5, 1, 1) | |||
label bounds(123, 29, 70, 12), text("Cycle Mode") | |||
combobox bounds(120, 42, 70, 20), channel("CyUpDn"), value(2), text("Up","Up-Down") | |||
rslider bounds(190, 30, 60, 60), text("Tempo"), channel("tempo"), range(1, 500,120, 1, 1) | |||
label bounds(245, 29, 70, 12), text("Tempo Mlt."), | |||
combobox bounds(255, 42, 40, 20), channel("TempoMlt"), value(4), text("1/4","1/3","1/2","1","3/2","2","3","4") | |||
checkbox bounds(310, 40, 30, 30), colour("yellow"), channel("hold"), value(1) | |||
label bounds(311, 77, 40, 12), text("Hold") | |||
label bounds(370, 29, 70, 12), text("Arp.Mode") | |||
combobox bounds(350, 42, 90, 20), channel("mode"), value(6), text("Up","Down","Up<->Down","Random Dir.","Random Pick","Seq. Play") | |||
rslider bounds(440, 30, 60, 60), text("Swing"), channel("swing"), range(0, 1.00, 0) | |||
label bounds(505, 29, 80, 13), text("Clock Source") | |||
button bounds(505, 42, 80, 20), text("Internal","External"), channel("ClockSource"), value(0) | |||
checkbox bounds(597, 40, 30, 30), colour("red"), channel("pause"), value(0) | |||
label bounds(595, 77, 40, 12), text("Pause") | |||
checkbox bounds(647, 40, 30, 30), colour("Cyan"), channel("onoff"), value(1) | |||
label bounds(643, 77, 40, 12), text("On/Off") | |||
} | |||
groupbox bounds( 5,105, 690, 220), text("Synth"), { | |||
label bounds(104,132, 40, 12), text("VCA") | |||
rslider bounds( 10,150, 60, 60), text("Att."), channel("Aatt"),range(0.001, 2, 0.001, 0.5) | |||
rslider bounds( 60,150, 60, 60), text("Dec."), channel("Adec"),range(0.001, 2, 0.001, 0.5) | |||
rslider bounds(110,150, 60, 60), text("Sus."), channel("Asus"), range(0, 1.00, 1) | |||
rslider bounds(160,150, 60, 60), text("Rel."), channel("Arel"), range(0.001, 2, 0.001, 0.5) | |||
line bounds(230, 140, 2, 70), colour("Grey") | |||
label bounds(450,132, 40, 12), text("VCF") | |||
rslider bounds(240,150, 60, 60), text("Env.Amt"), channel("EnvAmt"), range(0.001, 2, 0.5) | |||
rslider bounds(290,150, 60, 60), text("Att."), channel("att"), range(0.001, 2, 0.001, 0.5) | |||
rslider bounds(340,150, 60, 60), text("Dec."), channel("dec"), range(0.001, 2, 0.5, 0.5) | |||
rslider bounds(390,150, 60, 60), text("Sus."), channel("sus"), range(0, 1.00, 0.5) | |||
rslider bounds(440,150, 60, 60), text("Rel."), channel("rel"), range(0.001, 2, 0.1, 0.5) | |||
rslider bounds(490,150, 60, 60), text("Res."), channel("res"), range(0, 1.00, 0.5) | |||
rslider bounds(540,150, 60, 60), text("Dist."), channel("dist"), range(0, 1.00, 0) | |||
checkbox bounds(600,158, 30, 30), colour("yellow"), channel("KybdTrk"), value(1) | |||
label bounds(600,198, 40, 12), text("Track") | |||
label bounds(645,147, 40, 12), text("Type") | |||
combobox bounds(640,160, 45, 20), channel("FiltType"), value(1), text("LPF","BPF") | |||
line bounds( 15,220,670, 2), colour("Grey") | |||
label bounds( 55,230, 40, 12), text("LFO") | |||
rslider bounds( 10,250, 60, 60), text("Depth"), channel("LFOdep"), range(0, 0.5, 0.15) | |||
rslider bounds( 60,250, 60, 60), text("Rate"), channel("LFOrate"), range(0.001, 5, 0.07) | |||
line bounds(130, 240, 2, 70), colour("Grey") | |||
label bounds(245,230, 80, 12), text("Oscillator") | |||
label bounds(166,247, 40, 12), text("Wave") | |||
combobox bounds(150,260, 65, 20), channel("wave"), value(3), text("tri","sq.","saw","noise") | |||
checkbox bounds(150,290,100, 20), colour("yellow"), channel("subosc"), value(0), text("Subosc") | |||
label bounds(239,248, 39, 12), text("Octave") | |||
combobox bounds(225,260, 65, 20), channel("OctTrans"), value(5), text("-6","-5","-4","-3","-2","-1","0","1","2","3","4","5","6") | |||
label bounds(227,283, 64, 12), text("Semitones") | |||
combobox bounds(225,295, 65, 20), channel("SemiTrans"), value(12), text("-11","-10","-9","-8","-7","-6","-5","-4","-3","-2","-1","0","1","2","3","4","5","6","7","8","9","10","11") | |||
rslider bounds(300,250, 60, 60), text("Port."), channel("NotePort"), range(0, 1.00, 0, 0.5) | |||
rslider bounds(350,250, 60, 60), text("Level"), channel("SynLev"), range(0, 1.00, 0.3) | |||
line bounds(420, 240, 2, 70), colour("Grey") | |||
label bounds(442,230, 80, 12), text("Freq.Shift") | |||
rslider bounds(440,250, 60, 60), text("Freq."), channel("FShift"), range(-1000, 1000, 0) | |||
line bounds(515, 240, 2, 70), colour("Grey") | |||
label bounds(593,230, 80, 12), text("Delay") | |||
rslider bounds(530,250, 60, 60), text("Mix"), channel("DryWet"), range(0, 1.00, 0.1) | |||
rslider bounds(580,250, 60, 60), text("Time"), channel("DlyTim"), range(1, 16, 4,1,1) | |||
rslider bounds(630,250, 60, 60), text("F.back"), channel("DlyFB"), range(0, 1.00, 0.5) | |||
} | |||
keyboard pos(5, 330), size(690, 80) | |||
infobutton bounds(5,415, 70, 20), text("Help"), file("ArpeggiatorHelp.html") | |||
image bounds(80, 415, 215, 20), colour(75, 85, 90, 100), plant("credit"), line(0){ | |||
label bounds(0.03, 0.1, .9, .7), text("Author: Iain McCurdy |2012|"), colour("white") | |||
hostbpm channel("bpm") | |||
</Cabbage> | |||
<CsoundSynthesizer> | |||
<CsOptions> | |||
-dm0 -n -+rtmidi=null -M0 | |||
</CsOptions> | |||
<CsInstruments> | |||
sr = 44100 ;SAMPLE RATE | |||
ksmps = 32 ;NUMBER OF AUDIO SAMPLES IN EACH CONTROL CYCLE | |||
nchnls = 2 ;NUMBER OF CHANNELS (2=STEREO) | |||
0dbfs = 1 | |||
massign 0,0 | |||
;Author: Iain McCurdy (2012) | |||
;http://www.iainmccurdy.org | |||
giseqorder ftgen 0,0,1024,-2,0 ;ORDERED ROW OF NOTES (IN THE ORDER IN WHICH THEY WERE PLAYED) | |||
giseqascend ftgen 0,0,1024,-2,0 ;ORDERED ROW OF NOTES (IN ASCENDING ORDER) | |||
ginoteactive ftgen 0,0,128,-2,0 ;TABLE OF NOTE ON STATUSES 1=ON 0=OFF | |||
giblank ftgen 0,0,128,-2,0 ;BLANK TABLE | |||
gisine ftgen 0,0,4096,10,1 | |||
giFletcherMunsonCurve ftgen 0,0,-20000,-16,1,4000,-8,0.15, 20000-4000,0,0.15 | |||
giTempoMlt ftgen 0,0,-8,-2,1/4,1/3,1/2,1,3/2,2,3,4 ;TABLE OF TEMPO MULTIPLIERS - USED TO SCALE THE ARPEGGIO RATE WHEN IN TEMPO MODE | |||
gasendL,gasendR init 0 ;GLOBAL VARIABLES USED TO SEND SIGNAL TO THE DELAY EFFECT | |||
;UDO THAT SORTS A TABLE OF NUMBERS INTO ASCENDING ORDER | |||
opcode tabsort_ascnd2,0,ii | |||
iNumItems,ifn xin | |||
iTabLen = ftlen(ifn) | |||
imax table 0,ifn | |||
icount = 1 | |||
loop1: | |||
ival table icount,ifn | |||
imax = (ival>=imax?ival:imax) | |||
loop_lt icount,1,iNumItems,loop1 | |||
iTableBuffer ftgentmp 0,0,iTabLen,-2, 0 | |||
icount1 = 0 | |||
loop2: | |||
icount2 = 0 | |||
imin = imax | |||
loop3: | |||
ival table icount2,ifn | |||
if ival<=imin then | |||
imin = ival | |||
iloc = icount2 | |||
endif | |||
loop_lt icount2,1,iNumItems,loop3 | |||
tableiw imin,icount1,iTableBuffer | |||
tableiw imax,iloc,ifn | |||
loop_lt icount1,1,iNumItems,loop2 | |||
icount = 0 | |||
loop4: | |||
ival table icount,iTableBuffer | |||
tableiw ival,icount,ifn | |||
loop_lt icount,1,iNumItems,loop4 | |||
endop | |||
opcode FreqShifter,a,aki | |||
ain,kfshift,ifn xin ;READ IN INPUT ARGUMENTS | |||
areal, aimag hilbert ain ;HILBERT OPCODE OUTPUTS TWO PHASE SHIFTED SIGNALS, EACH 90 OUT OF PHASE WITH EACH OTHER | |||
asin oscili 1, kfshift, ifn, 0 | |||
acos oscili 1, kfshift, ifn, 0.25 | |||
;RING MODULATE EACH SIGNAL USING THE QUADRATURE OSCILLATORS AS MODULATORS | |||
amod1 = areal * acos | |||
amod2 = aimag * asin | |||
;UPSHIFTING OUTPUT | |||
aFS = (amod1 - amod2) | |||
xout aFS ;SEND AUDIO BACK TO CALLER INSTRUMENT | |||
endop | |||
;This instrument needs to be last in order for the 'hold' function to work properly. I'm not sure why. | |||
instr ScanWidgets | |||
gkintvl chnget "intvl" | |||
gkcycles chnget "cycles" | |||
gktempo chnget "tempo" ;INTERNAL GUI CONTROL | |||
gkbpm chnget "bpm" ;HOSDT TEMPO | |||
gkClockSource chnget "ClockSource" ;CLOCK SOURCE SELECTOR SWITCH | |||
if gkClockSource==1 then | |||
gktempo = gkbpm | |||
else | |||
gktempo = gktempo | |||
endif | |||
gkCyUpDn chnget "CyUpDn" | |||
gkTempoMlt chnget "TempoMlt" | |||
gkhold chnget "hold" | |||
gkmode chnget "mode" | |||
gkswing chnget "swing" | |||
gkpause chnget "pause" | |||
gkonoff chnget "onoff" | |||
gkAatt chnget "Aatt" | |||
gkAdec chnget "Adec" | |||
gkAsus chnget "Asus" | |||
gkArel chnget "Arel" | |||
gkEnvAmt chnget "EnvAmt" | |||
gkatt chnget "att" | |||
gkdec chnget "dec" | |||
gksus chnget "sus" | |||
gkrel chnget "rel" | |||
gkres chnget "res" | |||
gkdist chnget "dist" | |||
gkKybdTrk chnget "KybdTrk" | |||
gkFiltType chnget "FiltType" | |||
gkLFOdep chnget "LFOdep" | |||
gkLFOrate chnget "LFOrate" | |||
gkwave chnget "wave" | |||
gkOctTrans chnget "OctTrans" | |||
gkSemiTrans chnget "SemiTrans" | |||
gkNotePort chnget "NotePort" | |||
gkSynLev chnget "SynLev" | |||
gksubosc chnget "subosc" | |||
gkFShift chnget "FShift" | |||
gkDryWet chnget "DryWet" | |||
gkDlyTim chnget "DlyTim" | |||
gkDlyFB chnget "DlyFB" | |||
/* | |||
kx1 chnget "x1" | |||
ky1 chnget "y1" | |||
kx1 logcurve kx1,0.1 | |||
ky1 logcurve ky1,0.1 | |||
kx1 scale kx1, 2, 0.001 | |||
ky1 scale ky1, 2, 0.001 | |||
chnset kx1, "att" | |||
chnset ky1, "dec" | |||
*/ | |||
endin | |||
instr ScanMIDI ;SCAN INCOMING MIDI AND TRIGGER NOTES IN INSTRUMENT 'NoteLayer' | |||
insno nstrnum "NoteLayer" | |||
kstatus, kchan, kdata1, kdata2 midiin; read in midi | |||
if kstatus==144||kstatus==128 then | |||
if kdata2>0&&kstatus==144 then ;IF VELOCITY IS GREATER THAN 0 (I.E. FOR SOME KEYBOARDS VELOCITY ZERO IS A NOTE OFF) | |||
kAlreadyActiveStatus table kdata1,ginoteactive ;CHECK IF THIS NOTE IS ALREADY ACTIVE (POSSIBLE IF HOLD IS ON). | |||
if kAlreadyActiveStatus==0 then ;IF THIS NOTE IS NOT ALREADY ACTIVE... | |||
event "i",insno+(kdata1*0.001),0,3600,kdata1 ; | |||
endif | |||
else | |||
if gkhold==0 then | |||
turnoff2 insno+(kdata1*0.001),4,1 | |||
endif | |||
endif | |||
elseif kstatus==128&&gkhold==0 then ;IF MIDI KEYBOARD USES NOTE OFF STATUS BYTE | |||
turnoff2 insno+(kdata1*0.001),4,1 | |||
endif | |||
endin | |||
instr NoteLayer ;THIS INSTRUMENT IS TRIGGERED FOR EACH NOTE PLAYED ON THE KEYBOARD | |||
inum = p4 ;READ IN MIDI NOTE NUMBER | |||
tableiw 1,inum,ginoteactive | |||
iNNotes active "NoteLayer" ;SENSE THE NUMBER INSTANCES OF THIS INSTRUMENT (I.E. MIDI NOTES) ARE BEING HELD AT I-TIME. | |||
tableiw inum,iNNotes-1,giseqorder ;WRITE THE NOTE NUMBER OF THIS NOTE TO THE NEXT LOCATION IN THE ORDERED ROW OF NOTES (giseqorder) | |||
tableicopy giseqascend,giseqorder ;COPY THE LIST OF NOTES (IN THE ORDER IN WHICH THEY WERE PLAYED) INTO THE TABLE OF NOTES TO BE SORTED INTO ASCENDING ORDER | |||
tabsort_ascnd2 iNNotes,giseqascend ;UDO CALLED THAT ORDERS THE LIST OF NOTES INTO ASCENDING ORDER | |||
krelease release ;SENSE WHEN THIS NOTE HAS BEEN RELEASED | |||
if krelease==1 then ;IF THIS NOTE HAS BEEN RELEASED (FINAL K-RATE CYCLE)... | |||
tablew 0,inum,ginoteactive | |||
;AS THIS NOTE HAS BEEN RELEASED IT WILL HAVE TO BE REMOVED FROM THE ORDERED ROW OF NOTE (giseqorder). ALL NOTES *AFTER* IT IN THE ROW WILL HAVE TO BE SHUNTED BACK ONE PLACE. | |||
kShuntNdx = iNNotes ;INITIAL SHUNT INDEX (THE LOCATION TO WHICH THE NOTE NUMBER FOR THIS NOTE WAS WRITTEN) | |||
kNNotes active "NoteLayer" ;FIND THE NUMBER OF INSTANCES OF THIS INSTRUMENT (I.E. NOTES BEING HELD) NOW | |||
SHUNT_ROW: ;A LABEL. THE SHUNTING PROCEDURE LOOPS FROM HERE. | |||
kval table kShuntNdx, giseqorder ;READ THE NOTE NUMBER JUST AFTER THIS ONE IN THE SEQUENCE ROW... | |||
tablew kval, kShuntNdx-1, giseqorder ;AND MOVE IT BACK ONE PLACE | |||
loop_lt kShuntNdx,1,kNNotes,SHUNT_ROW ;LOOP BACK AND REPEAT THE SHUNTING PROCEDURE UNTIL THE NEW ROW IS COMPLETE | |||
endif | |||
kHoldOff trigger gkhold,0.5,1 ;IF HOLD GOES FROM '1'/'ON' TO '0'/'OFF' GENERATE A TRIGGER IMPULSE | |||
if kHoldOff==1 then ;IF HOLD GOES FROM 'ON' TO 'OFF'... | |||
turnoff ;TURN THIS (AND ALL OTHER) NOTES OFF | |||
endif ;END OF CONDITIONAL BRANCH | |||
if iNNotes==1 then ;IF THIS IS THE FIRST NOTE OF AN ARPEGGIO TO BE PLAYED... | |||
event_i "i","Arpeggiator",0,-1 ;START ARPEGGIATOR INSTRUMENT WITH A 'HELD' NOTE. SEND IT THE MIDI NOTE NUMBER. | |||
endif ;END OF CONDITIONAL BRANCH | |||
insnoArp nstrnum "Arpeggiator" | |||
if gkonoff==0 then | |||
turnoff2 insnoArp,0,1 | |||
tablecopy ginoteactive,giblank ;ERASE NOTE STATUSES TABLE | |||
turnoff | |||
endif | |||
endin | |||
instr Arpeggiator | |||
krelease release ;SENSE END OF NOTE (1) | |||
ktrans = ((gkOctTrans-7)*12)+(gkSemiTrans-12) | |||
kHoldOff trigger gkhold,0.5,1 ;IF HOLD GOES FROM '1'/'ON' TO '0'/'OFF' GENERATE A TRIGGER IMPULSE | |||
if kHoldOff==1 then ;IF HOLD GOES FROM 'ON' TO 'OFF'... | |||
tablecopy ginoteactive,giblank ;ERASE NOTE STATUSES TABLE | |||
turnoff ;TURN THIS INSTRUMENT OFF | |||
endif ;END OF CONDITIONAL BRANCH | |||
kNNotes active "NoteLayer" ;NUMBER OF INSTR 1 (MIDI NOTES) BEING HELD. SPECIFICALLY WE ARE INTERESTED IN WHETHER ALL NOTES HAVE BEEN RELEASED | |||
if kNNotes==0&&gkhold==0 then ;IF ALL MIDI KEYBOARD NOTES HAVE BEEN RELEASED... | |||
turnoff ;...TURN THIS INSTRUMENT OFF | |||
endif ;END OF CONDITIONAL BRANCH | |||
kswingval1 scale gkswing,1/1.5,1 | |||
kswingval2 scale gkswing,1/0.5,1 | |||
kswingstep init 0 | |||
kswingval init (i(gkswing)*0.5) + 1 | |||
kTempoMlt table gkTempoMlt-1,giTempoMlt | |||
gkrate = (gktempo/60)*kTempoMlt*4*(1-gkpause) ;DERIVE TEMPO FROM BPM AND TEMPO MULTIPLIER | |||
ktrigger metro gkrate*kswingval ;METRONOME TO TRIGGER NOTES OF THE ARPEGGIO. PHASE OFFSET (P2) PREVENTS A SEARCH FOR A NEW NOTE WHEN THE FIRST NOTE OF AN ARPEGGIO HAS BEEN PLAYED | |||
;SET REQUIRED INITIAL SETTINGS DEPENDING ON ARPEGGIATOR MODE | |||
ktrig changed gkmode | |||
if ktrig==1 then | |||
reinit RESET_START_VALS | |||
endif | |||
RESET_START_VALS: | |||
kcount1 init 0 | |||
kcount2 init 0 | |||
kndx init 0 | |||
kcycle init 0 | |||
kCycleDir init 0 | |||
if i(gkmode)==1 then ;IF UP MODE... | |||
kcount1 init 0 | |||
kcount2 init 0 | |||
kndx init 0 | |||
kdir init 1 | |||
elseif i(gkmode)==2 then ;IF DOWN MODE... | |||
kcount1 init 0 | |||
kcount2 init 0 | |||
kndx init i(kNNotes)-1 | |||
kdir init -1 | |||
elseif i(gkmode)==3 then ;IF UP AND DOWN MODE... | |||
kdir init 1 | |||
kcount1 init 0 | |||
kcount2 init 0 | |||
kndx init 0 | |||
elseif i(gkmode)==4 then ;RANDOM DIRECTION MODE... | |||
kdir init 1 | |||
kcount1 init 0 | |||
kcount2 init 0 | |||
kndx init 0 | |||
elseif i(gkmode)==5 then ;RANDOM PICK MODE... | |||
kcount1 init 0 | |||
kcount2 init 0 | |||
kndx init 0 | |||
elseif i(gkmode)==6 then ;SEQUENCE PLAY MODE... | |||
kcount1 init 0 | |||
kcount2 init 0 | |||
kndx init 0 | |||
kdir init 1 | |||
endif | |||
rireturn | |||
if ktrigger==1&&krelease!=1 then ;IF A TRIGGER FOR A NEW NOTE HAS BEEN ISSUED AND WE ARE NOT IN A RELEASE STAGE... | |||
ktrans = ((gkOctTrans-4)*12)+(gkSemiTrans-12) | |||
kswingstep = abs(kswingstep-1) | |||
kswingval = (kswingstep=0?kswingval1:kswingval2) | |||
;UP | |||
if gkmode==1 then ;IF 'UP' DIRECTION MODE IS SELECTED... | |||
knum table kndx,giseqascend ;READ NOTE NUMBER | |||
knum = knum+(gkintvl*kcycle) | |||
kcount1 = kcount1 + 1 | |||
ktrig changed kNNotes | |||
if ktrig==1 then ;IF NOTES ARE ADDED OR TAKEN AWAY FROM THE ROW SINCE THE LAST ITERATION | |||
kcount1 = kndx+1 | |||
endif | |||
if kndx==kNNotes-1 then | |||
kcount2 = kcount2+1 | |||
if gkCyUpDn==1 then | |||
kcycle wrap kcount2,0,gkcycles+1 | |||
else | |||
kcycle mirror kcount2,0,gkcycles | |||
endif | |||
endif | |||
kndx wrap kcount1,-0.5,kNNotes-0.5 | |||
;DOWN | |||
elseif gkmode==2 then ;IF 'DOWN' DIRECTION MODE IS SELECTED... | |||
knum table kndx,giseqascend ;READ NOTE NUMBER | |||
knum = knum+(gkintvl*kcycle) | |||
if kndx==0 then | |||
kcount2 = kcount2+1 | |||
if gkCyUpDn==1 then | |||
kcycle wrap kcount2,0,gkcycles+1 | |||
else | |||
kcycle mirror kcount2,0,gkcycles | |||
endif | |||
endif | |||
kcount1 = kcount1 - 1 | |||
ktrig changed kNNotes | |||
if ktrig==1 then ;IF NOTES ARE ADDED OR TAKEN AWAY FROM THE ROW SINCE THE LAST ITERATION | |||
kcount1 = kndx-1 | |||
endif | |||
kndx wrap kcount1,-0.5,kNNotes-0.5 | |||
;UP-DOWN | |||
elseif gkmode==3 then ;IF 'UP<->DOWN' DIRECTION MODE IS SELECTED... | |||
if gkcycles==0 then | |||
if kNNotes==1 then | |||
kdir = 0 | |||
elseif kndx=0 then ;OR IF... THE INDEX IS POINTING TO THE FIRST NOTE IN THE LIST, WE NEED TO CHANGE DIRECTION TO UP FOR THE NEXT NOTE AFTER THIS ONE | |||
kdir = 1 ;CHANGE DIRECTION TO UP | |||
elseif kndx=(kNNotes-1) then ;IF THE INDEX IS POINTING TO THE LAST NOTE IN THE LIST, WE NEED TO CHANGE DIRECTION TO DOWN FOR THE NEXT NOTE AFTER THIS ONE | |||
kdir = -1 ;CHANGE DIRECTION TO DOWN | |||
endif ;END OF CONDITIONAL | |||
kndx = kndx + kdir | |||
knum table kndx,giseqascend ;READ NOTE NUMBER | |||
kgoto PLAY_A_NOTE ;GO STRAIGHT TO PLAYING THIS NEW NOTE | |||
else | |||
kndx limit kndx,0,kNNotes-1 | |||
knum table kndx,giseqascend ;READ NOTE NUMBER | |||
knum = knum+(gkintvl*kcycle) | |||
kcount init i(kndx) | |||
kcount = kcount + 1 | |||
kndx mirror kcount,0,kNNotes-1 | |||
if kndx==0 then | |||
kcount2 init i(kcycle) | |||
kcount2 = kcount2+1 | |||
if gkCyUpDn==1 then | |||
kcycle wrap kcount2,0,gkcycles+1 | |||
else | |||
kcycle mirror kcount2,0,gkcycles | |||
endif | |||
endif | |||
kgoto PLAY_A_NOTE ;GO STRAIGHT TO PLAYING THIS NEW NOTE | |||
endif | |||
;RANDOM DIRECTION | |||
elseif gkmode==4 then | |||
if kndx==(kNNotes-1) then ;IF THE INDEX IS POINTING TO THE LAST NOTE IN THE LIST, WE NEED TO CHANGE DIRECTION TO DOWN FOR THE NEXT NOTE AFTER THIS ONE | |||
kdir = -1 ;CHANGE DIRECTION TO DOWN | |||
elseif kndx==0 then ;OR IF... THE INDEX IS POINTING TO THE FIRST NOTE IN THE LIST, WE NEED TO CHANGE DIRECTION TO UP FOR THE NEXT NOTE AFTER THIS ONE | |||
kdir = 1 ;CHANGE DIRECTION TO UP | |||
endif ;END OF CONDITIONAL | |||
knum table kndx,giseqascend ;READ NOTE NUMBER | |||
if gkcycles>0 then | |||
knum = knum+(gkintvl*kcycle) | |||
endif | |||
if kndx==(kNNotes-1) then | |||
kcycle wrap kcycle+1,0,gkcycles+1 | |||
elseif kndx==0 then | |||
kcycle wrap kcycle-1,0,gkcycles+1 | |||
endif | |||
kndx = kndx+kdir ;INCREMENT INDEX FOR THE NEXT NOTE AFTER THIS ONE | |||
kgoto PLAY_A_NOTE ;GO STRAIGHT TO PLAYING THIS NEW NOTE | |||
;RANDOM PICK (RANDOMLY CHOOSE ANY NOTE CURRENTLY BEING HELD) | |||
elseif gkmode==5 then | |||
kRndNdx random 0,kNNotes ;CREATE RANDOM INDEX | |||
knum table kRndNdx,giseqorder ;READ NOTE FROM NOTE LIST USING RANDOM INDEX | |||
knum = knum+(gkintvl*kcycle) | |||
if kndx==kNNotes-1 then | |||
kcount2 = kcount2 + 1 | |||
if gkCyUpDn==1 then | |||
kcycle wrap kcount2,0,gkcycles+1 | |||
else | |||
kcycle mirror kcount2,0,gkcycles | |||
endif | |||
endif | |||
kndx wrap kndx+1,0,kNNotes ;INCREMENT THE COUNTER BUT WRAP IT AROUND IF IT STRAYS BEYOND THE VALUE CORRESPONDING TO THE NUMBER OF NOTES BEING HELD (I.E. THE LENGTH OF THE SEQUENCE) | |||
kgoto PLAY_A_NOTE ;GO STRAIGHT TO PLAYING THIS NEW NOTE | |||
;SEQUENCE PLAY (PLAYS NOTES IN THE ORDER IN WHICH THEY WERE ORIGINALLY PLAYED) | |||
else | |||
knum table kndx,giseqorder ;READ NOTE VALUE FROM TABLE | |||
if gkcycles!=0 then | |||
knum = knum+(gkintvl*kcycle) | |||
endif | |||
if kndx==kNNotes-1 then | |||
kcount2 = kcount2 + 1 | |||
if gkCyUpDn==1 then | |||
kcycle wrap kcount2,0,gkcycles+1 | |||
else | |||
kcycle mirror kcount2,0,gkcycles | |||
endif | |||
endif | |||
kndx wrap kndx+1,0,kNNotes ;INCREMENT THE COUNTER BUT WRAP IT AROUND IF IT STRAYS BEYOND THE VALUE CORRESPONDING TO THE NUMBER OF NOTES BEING HELD (I.E. THE LENGTH OF THE SEQUENCE) | |||
kgoto PLAY_A_NOTE ;GO STRAIGHT TO PLAYING THIS NEW NOTE | |||
endif | |||
endif | |||
PLAY_A_NOTE: | |||
if gkmode==4&&ktrigger==1 then ;IF RANDOM DIRECTION MODE HAS BEEN CHOSEN, CHOOSE A NEW RANDOM DIRECTION FOR THE NEXT STEP | |||
kdir random 0,1.999999 ; | |||
kdir = (int(kdir)*2)-1 ;kdir WILL BE EITHER -1 OR 1 | |||
endif | |||
;PORTAMENTO ADDED TO NOTE NUMBER CHANGES | |||
kporttime linseg 0,0.001,0.1 | |||
knum2 portk knum+ktrans,kporttime*gkNotePort | |||
kcps limit cpsmidinn(knum2),0,10000 | |||
kAmpScale table kcps,giFletcherMunsonCurve | |||
a1 vco2 gkSynLev*kAmpScale,kcps,12 ;TRIANGLE WAVE OSCILLATOR | |||
a2 vco2 gkSynLev*kAmpScale,kcps,10 ;SQUARE WAVE OSCILLATOR | |||
a3 vco2 gkSynLev*kAmpScale,kcps,0,0.5 ;SAWTOOTH WAVE OSCILLATOR | |||
a4 pinkish gkSynLev ;PINK NOISE | |||
ifadecurve ftgenonce 0,0,1024,20,2 ;HANNING WINDOW USED FOR THE CROSSFADING CURVES | |||
kamp1 table (((gkwave-1)/3)*1.5)+0.5,ifadecurve,1 ;TRIANGLE WAVE AMPLITUDE CONTROL EACH OF THE AMPLITUDES ARE OFFSET WITH RESPECT TO EACH OTHER. NOTE THAT IF INDEX IS LESS THAN 0 IT WILL ACTUALLY HOLD READING AT ZERO IF ITS GREATER THAN '1' IT WILL HOLD AT 1 | |||
kamp2 table (((gkwave-1)/3)*1.5),ifadecurve,1 ;SQUARE WAVE AMPLITUDE CONTROL | |||
kamp3 table (((gkwave-1)/3)*1.5)-0.5,ifadecurve,1 ;SAW WAVE AMPLITUDE CONTROL | |||
kamp4 table (((gkwave-1)/3)*1.5)-1,ifadecurve,1 ;PINK NOISE AMPLITUDE CONTROL | |||
aamp1 interp kamp1 | |||
aamp2 interp kamp2 | |||
aamp3 interp kamp3 | |||
aamp4 interp kamp4 | |||
a1 sum a1*aamp1,a2*aamp2,a3*aamp3,a4*aamp4 | |||
;SUB-OSCILLATOR | |||
if gksubosc==1 then | |||
asub vco2 gkSynLev*kAmpScale*0.6,kcps*0.25,10 | |||
a1 = a1 + asub | |||
endif | |||
if ktrigger==1 then | |||
reinit RETRIGGER_ENVELOPES | |||
endif | |||
RETRIGGER_ENVELOPES: | |||
/*AMPLITUDE ENVELOPE*/ | |||
if gkAatt+gkAdec=0.002&&gkAsus==1 kgoto SKIP_AMP_ENV ;IF ATTACK AND/OR DECAY TIME ARE AT THEIR MINIMUM SETTINGS AND SUSTAIN LEVEL IS MAXIMUM IGNORE AMPLITUDE ENVELOPE CREATION AND IMPLEMENTATION - I.E. WE WIL HAVE SIMPLY A SUSTAINING INSTRUMENT | |||
iAatt = i(gkAatt) | |||
iAdec = i(gkAdec) | |||
iAsus = i(gkAsus) | |||
iArel = i(gkArel) | |||
iAsustim = abs((1/i(gkrate))-iAatt-iArel)+0.0001 ;DERIVE SUSTAIN TIME FROM ARPEGGIATOR RATE AND THE OTHER ENVELOPE SEGMENT DURATIONS | |||
kAenv linsegr 0,iAatt,1,iAdec,i(gkAsus),iAsustim,i(gkAsus),iArel,0 ;AMPLITUDE ENVELOPE | |||
a1 = a1*kAenv | |||
SKIP_AMP_ENV: | |||
/*FILTER ENVELOPE*/ | |||
iatt = i(gkatt) | |||
idec = i(gkdec) | |||
isus = i(gksus) | |||
irel = i(gkrel) | |||
isustim = abs((1/i(gkrate))-iatt-irel)+0.0001 ;DERIVE SUSTAIN TIME FROM ARPEGGIATOR RATE AND THE OTHER ENVELOPE SEGMENT DURATIONS | |||
kfenv linsegr 0,iatt,1,idec,0,isustim,0,irel,0 ;FILTER ENVELOPE | |||
kfenv = (kfenv*(1-gksus))+gksus | |||
rireturn | |||
/*FILTER LFO*/ | |||
kLFO lfo gkLFOdep,gkLFOrate,0 ;CREATE AN LFO. SINE WAVE SHAPE | |||
kEnvAmt portk gkEnvAmt,kporttime | |||
kEnvAmt limit kEnvAmt+kLFO,0,1 ;ADD LFO TO ENVELOPE AMOUNT VARIABLE AND LIMIT THE RESULT TO LIE WITHIN 0 AND 1 | |||
/*FILTER KEYBOARD TRACKING*/ | |||
if gkKybdTrk=0 then ;IF KEYBOARD TRACKING IS OFF... | |||
;NON-KEYBOARD TRACKING FILTER | |||
kcfoct = ((kfenv*8)+6)*(kEnvAmt^0.25) | |||
else ;OTHERWISE (KEYBOARD TRACKING IS OFF | |||
;KEYBOARD TRACKING FILTER | |||
kcfoct = octcps(kcps)+((kfenv*7*(kEnvAmt^0.75))-2) ;KEYBOARD TRACKING | |||
endif | |||
/*FILTER*/ | |||
kcf limit cpsoct(kcfoct),20,sr/3 ;PROTECT AGAINST OUT OF RANGE FILTER VALUES | |||
kres portk gkres,kporttime ;SMOOTH CHANGES MADE TO RESONANCE SETTING | |||
if gkFiltType==1 then ;CHOOSE FILTER TYPE | |||
kdist portk gkdist,kporttime ;SMOOTH CHANGES MADE TO DISTORTION SETTING | |||
a1 lpf18 a1,kcf,kres*0.98, (kdist^2)*10 ;LOWPASS | |||
kdmp scale kdist^0.2,0.06,1 ;CREATE A FUNCTION THAT WILL DAMPEN SIGNAL AMPLITUDE WHEN LOWPASS FILTER DISTORTION IS INCREASED | |||
a1 = a1*kdmp ; | |||
else | |||
;aflt butbp a1,kcf,kcf * (2-((kres^0.5)*1.9)) ;BANDPASS | |||
kcf limit kcf,20,sr*0.4 | |||
kbw limit (kcf*(kres^8))*0.7, 1, sr/4 | |||
aflt rbjeq a1,kcf,1,kbw,1,4;BANDPASS | |||
a1 balance aflt,a1/4,1 ;EVEN OUT LEVEL OF FILTER OUTPUT SIGNAL TO COMPENSATE FOR SIGNAL POWER LOSS WHEN BANDWIDTH ('q') IS NARROW | |||
endif | |||
aenv linsegr 0,0.001,1,0.005,0 ;ANTI-CLICK ENVELOPE | |||
a1 = a1*aenv ;APPLY ENVELOPE | |||
/*FREQUENCY SHIFTER*/ | |||
if gkFShift==0 kgoto SKIP_FSHIFT ;IF F.SHIFT VALUE = 0, BYPASS THE EFFECT | |||
a1 FreqShifter a1,gkFShift,gisine ;CALL UDO | |||
SKIP_FSHIFT: | |||
;EFFECT WET/DRY MIX CONSTRUCTION | |||
iWet ftgentmp 0,0,512,-7,0,256,1,256,1 ;RESCALING FUNCTION FOR WET LEVEL CONTROL | |||
iDry ftgentmp 0,0,512,-7,1,256,1,256,0 ;RESCALING FUNCTION FOR DRY LEVEL CONTROL | |||
kWet table gkDryWet, iWet, 1 ;RESCALE WET LEVEL CONTROL ACCORDING TO FUNCTION TABLE iWet | |||
kDry table gkDryWet, iDry, 1 ;RESCALE DRY LEVEL CONTROL ACCORDING TO FUNCTION TABLE iWet | |||
gasendL = gasendL+a1*kWet | |||
gasendR = gasendR+a1*kWet | |||
if gkDryWet>0 then | |||
a1 = a1*kDry | |||
endif | |||
outs a1,a1 | |||
endin | |||
instr Effects | |||
if gkDryWet==0 kgoto SKIP_DELAY | |||
kTempoMlt table gkTempoMlt-1,giTempoMlt | |||
ktime limit (60*gkDlyTim)/(gktempo*8*kTempoMlt),ksmps/sr,10 ;DERIVE TEMPO FROM BPM AND TEMPO MULTIPLIER | |||
atime interp ktime | |||
kfback = 0.5 | |||
;offset delay (no feedback) | |||
abuf delayr 10 | |||
afirst deltap3 atime | |||
delayw gasendL | |||
;left channel delay (note that 'atime' is doubled) | |||
abuf delayr 20 ; | |||
atapL deltap3 atime*2 | |||
delayw afirst+(atapL*gkDlyFB) | |||
;right channel delay (note that 'atime' is doubled) | |||
abuf delayr 20 | |||
atapR deltap3 atime*2 | |||
delayw gasendR+(atapR*gkDlyFB) | |||
outs atapL, atapR | |||
SKIP_DELAY: | |||
clear gasendL, gasendR | |||
endin | |||
</CsInstruments> | |||
<CsScore> | |||
i "ScanWidgets" 0 [3600*24*7] ;SCAN GUI WIDGETS | |||
i "ScanMIDI" 0 [3600*24*7] ;SCANS FOR MIDI NOTE EVENTS | |||
i "Effects" 0 [3600*24*7] ;EFFECTS | |||
</CsScore> | |||
</CsoundSynthesizer> |
@@ -1,90 +0,0 @@ | |||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | |||
<HTML> | |||
<HEAD> | |||
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252"> | |||
<TITLE></TITLE> | |||
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)"> | |||
<META NAME="CREATED" CONTENT="20120918;12541200"> | |||
<META NAME="CHANGED" CONTENT="20121005;23154300"> | |||
<STYLE TYPE="text/css"> | |||
<!-- | |||
@page { margin: 2cm } | |||
P { margin-bottom: 0.21cm } | |||
A:link { so-language: zxx } | |||
--> | |||
</STYLE> | |||
</HEAD> | |||
<BODY LANG="en-GB" DIR="LTR"> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Verdana, sans-serif"><B><U><FONT SIZE=5>Arpeggiator</FONT></U></B></FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">This | |||
instrument implements an arpeggiator effect, such as is often found | |||
on hardware synthesizers. The notes generated by the arpeggiator are | |||
played by a simple synthesizer and echoed by a multi-mode delay.</FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4><U><B>Arpeggiator | |||
Section</B></U></FONT></FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">The | |||
speed or rate of the arpeggio is defined using the 'Tempo' knob in | |||
BPM (beats per minute). Each arpeggio note is assumed to be a | |||
quaver/eighth note so a tempo of 120 BPM will result in 240 notes | |||
being played per minute, assuming beats are crotchets/quarter notes. | |||
There are also 8 'multiplier' presets which scale the tempo using | |||
simple ratios. There are six modes of movement: 'Up', 'Down', and 'Up | |||
and Down' are as would be expected. 'Random Direction' randomly moves | |||
up or down from the current pitch to the next pitch in the arpeggio. | |||
'Random Pick' chooses any other note within the arpeggio each time a | |||
new note is required. 'Seq. Play' plays through the sequence of notes | |||
in the order in which they were pressed. 'Cycles' will add repeats of | |||
the entire arpeggio transposed sequentially by the number of | |||
semitones defined by 'Intvl'. 'Cycles' will have no effect if 'Intvl' | |||
is zero. If 'Intvl' is negative subsequent cycles of the arpeggio | |||
will be lower than the first. If 'Up+Down' is activated the | |||
transposition steps will go up and then back down (or vice versa if | |||
'Intvl' is negative) rather than just in a single direction before | |||
repeating. This option is ignored in 'Random Dir.' mode which instead | |||
implements a kind of 'Drunken Walk'. 'Hold' imitates the action of a | |||
keyboard's sustain pedal. This function is also sometimes referred to | |||
as 'latch' in arpeggiators. 'Swing' warps the rhythm of each pair of | |||
arpeggiator notes. The rhythm is warped continuously from | |||
quaver:quaver at its minimum setting to dotted-quaver:semiquaver at | |||
its maximum. At its midway point the rhythm is | |||
triplet-crotchet:triplet quaver.</FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4><U><B>Synthesizer | |||
Section</B></U></FONT></FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">The | |||
synthesizer is a single oscillator synthesizer with four waveform | |||
choices, an amplitude envelope, a filter envelope and an LFO which | |||
influences the filter cutoff frequency. The filter envelope can be | |||
defined as a static repeating function ('Kybd.Track' off) or one that | |||
describes a frequency function relative to the currently playing | |||
pitch ('Kybd.Track' on). The filter can be either resonant lowpass or | |||
bandpass. Increasing 'Port.' applies an increasing sliding portamento | |||
between pitch changes.</FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">'Freq.Shift' | |||
frequency shifts the synthesizer tone by the number of cycles per | |||
second defined by the 'Freq.' knob. When 'Freq' is zero the effect is | |||
bypassed.</FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">A | |||
ping-pong delay, the delay time of which is defined as the number of | |||
beats at the current tempo, can be introduced by raising the level | |||
control. When 'level' is zero the effect is bypassed.</FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4><U><B>Technical</B></U></FONT></FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Whenever | |||
a new note is played its note number is written into two different | |||
function tables: in the first table, note numbers are written | |||
sequentially in the order in which they were played. (NB. if a note | |||
is removed its note number is removed from this table and any notes | |||
following it in the table are shunted back one place so as to not | |||
leave any gaps.) This table is used by the 'Seq. Play' and 'Random | |||
Pick' arpeggiator modes. A second table is created (and updated any | |||
time a new note is added or removed) in which all notes currently | |||
being held are sorted into ascending order. This table is used by all | |||
other arpeggiator modes. A third table is used to store the on/off | |||
status of each note. A value of '1' in this table denotes 'note on' | |||
and '0' denotes 'note off'. For example if middle C (note number 60) | |||
is pressed, the 61st table item with index number 60 will be '1'. | |||
This is needed to check for active notes and prevent the same note | |||
appearing twice in a note row. This would otherwise be possible when | |||
'hold' is active. This function could be deactivated if you wanted to | |||
define arpeggios with repeated notes.</FONT></P> | |||
</BODY> | |||
</HTML> |
@@ -1,321 +0,0 @@ | |||
Clavinet.csd - an emulation of the Hohner Clavinet D6 | |||
----------------------------------------------------- | |||
Pickup Selection | |||
---------------- | |||
CA - neck pickup only (pickup A) | |||
CB - bridge pickup only (pickup B) | |||
DA - both pickups in phase | |||
DB - bridge pickup (pickup B) 180 degrees out of phase w.r.t the neck pickup | |||
Setup | |||
----- | |||
Pick A - position of the first pickup (range 0 - 1). Typically referred to as the 'neck' pickup | |||
Pick B - position of the second pickup (range 0 - 1). Typically referred to as the 'bridge' pickup | |||
(NB. the relevant pickup has to be 'active' according to the CD AB switches in order for you to be able to here changes to it pickup position.) | |||
Mod.A - the pickup position can also modulated by an LFO. This control controls the depth of this modulation | |||
Mod.B - Depth of this modulation for the second pickup | |||
Rate A - Rate of modulation for the first pickup | |||
Rate B - Rate of modulation for the second pickup | |||
Env.A - The pickup position can be modulated by a simple single segment envelope. This is typically used to add an particualar attack nuance to the sound. This control controls the initial amplitude of this envelope (can be positive or negative). The envelope always ends at zero. | |||
Env.B - Envelope amplitude for the second pickup. | |||
Time A - Duration of the envelope segment for the first pickup | |||
Time B - Duration of the envelope segment for the second pickup | |||
Pluck - location of the 'pluck' (range 0 - 1). Should be close to zero for a typical clavinet behaviour | |||
Damp - string vibration damping that is applied while a note is being held. String damping is also dependent upon the note played using a 'key tracking' function table 'girefl'. In general lower notes should experience greater damping. | |||
HPF - this controls the cutoff frequency of a highpass filter that the signal passes through. | |||
The value supplied here is multiplied by the fundemental frequency of the note played to derive the cutoff frequency. | |||
Therefore if a value of '2' is supplied the cutoff will always by twice the fundemental, i.e. the frequency of the first harmonic/second partial. | |||
This control can be used to remove the emphasis of the fundemental partial. | |||
If this control is at its minimum setting the filter is bypassed. | |||
LPF - behaves in a similar way to HPF but in respect to a lowpass filter. This control, if reduced, can be used to soften the brightness of a note's attack. | |||
If this control is at its maximum setting the filter is bypassed. | |||
Inharm - applies inharmonicity to the spectrum produced by repluck. Negative values compress the spectrum, positive values expand the spectrum and zero leaves the spectrum unaffected. | |||
Release | |||
------- | |||
* Poorly maintained clavinets exhibit a release 'pluck' as the rubber pad which strikes and frets is lifted from the string when the key is released. The is on account of the rubber pad wearing out. | |||
Ampl - amplitude of the release 'pluck' | |||
Tone - a tone control applied to the release 'pluck' (this will also affect amplitude) | |||
D.Time - time it takes for full damping to be applied (this control has a subtle effect) | |||
Damp - amount of damping that is applied to string vibrations whenever a key is | |||
released (this amount of damping is achieved after 'D.Time' seconds). Note that the 'Damp' | |||
control in the 'Setup' pop-up panel also has an impact upon the release damping. | |||
A.Time - amplitude release time. If this is too short, vibration damping may not be heard and the above controls may not appear to do anything | |||
Filters | |||
------- | |||
The D6 Clavinet design incorporates four bandpass filters which can be switched in or out of the circuit. | |||
Emphasising four different frequency bands from high to low they are named 'brilliant', 'treble', 'medium' and 'soft' | |||
Cutoff frequencies (fco), levels and Q values for each of the four filters can be adjusted. | |||
Obviously the relevant filter has to be activated in order to be able to hear changes made to its settings. | |||
The four filters are in a parallel arrangement as opposed to being in series. | |||
<Cabbage> | |||
form caption("Clavinet"), size(550, 195), pluginID("clav"), colour(228,156,28) | |||
snapshot bounds(260, 46,200, 25), master(1), items("Clavinet 1", "Clavinet 2", "Clavinet 3", "Clavinet 4", "Clavinet 5", "Clavinet 6", "Clavinet 7", "Clavinet 8", "Clavinet 9", "Clavinet 10") | |||
; filter switches | |||
checkbox bounds( 10, 5, 70, 15), text("Brilliant") channel("brilliant"), FontColour(50,50,50), colour("lime") | |||
checkbox bounds( 10, 25, 70, 15), text("Treble") channel("treble"), FontColour(50,50,50), colour("lime"), value(1) | |||
checkbox bounds( 10, 45, 70, 15), text("Medium") channel("medium"), FontColour(50,50,50), colour("lime") | |||
checkbox bounds( 10, 65, 70, 15), text("Soft") channel("soft"), FontColour(50,50,50), colour("lime") | |||
; pickup configuration switches | |||
checkbox bounds( 80, 5, 70, 15), text("C/D") channel("C_D"), FontColour(50,50,50), colour("lime"), value(1) | |||
checkbox bounds( 80, 25, 70, 15), text("A/B") channel("A_B"), FontColour(50,50,50), colour("lime"), value(1) | |||
; controls pertaining to the setup of the instrument (pickup positions, pluck position, damping etc.) accessed in a pop-up panel | |||
groupbox bounds(150, 8, 172, 305), colour(228,156,28), plant("Setup), line(0), popup(1) | |||
{ | |||
rslider bounds( 5, 8, 55, 55), text("Pick A"), colour(195,126, 0), FontColour(50,50,50), channel("pickA"), range(0, 1.00, 0.25, 1, 0.001) | |||
rslider bounds( 55, 8, 55, 55), text("Pick B"), colour(195,126, 0), FontColour(50,50,50), channel("pickB"), range(0, 1.00, 0.07, 1, 0.001) | |||
rslider bounds( 5, 68, 55, 55), text("Mod A"), colour(225,156, 28), FontColour(50,50,50), channel("ModA"), range(0,0.50, 0.03, 0.5, 0.001) | |||
rslider bounds( 55, 68, 55, 55), text("Mod B"), colour(225,156, 28), FontColour(50,50,50), channel("ModB"), range(0,0.50, 0.03, 0.5, 0.001) | |||
rslider bounds( 5,128, 55, 55), text("Rate A"), colour(255,186, 58), FontColour(50,50,50), channel("RateA"), range(0,14.00, 0.2, 0.5, 0.001) | |||
rslider bounds( 55,128, 55, 55), text("Rate B"), colour(255,186, 58), FontColour(50,50,50), channel("RateB"), range(0,14.00, 0.15, 0.5, 0.001) | |||
rslider bounds( 5,188, 55, 55), text("Env.A"), colour(255,216, 88), FontColour(50,50,50), channel("EnvA"), range(-1, 1.00, 0) | |||
rslider bounds( 55,188, 55, 55), text("Env.B"), colour(255,216, 88), FontColour(50,50,50), channel("EnvB"), range(-1, 1.00, 0) | |||
rslider bounds( 5,248, 55, 55), text("Time A"), colour(255,246,118), FontColour(50,50,50), channel("TimeA"), range(0, 1.00, 0.05, 0.5, 0.001) | |||
rslider bounds( 55,248, 55, 55), text("Time B"), colour(255,246,118), FontColour(50,50,50), channel("TimeB"), range(0, 1.00, 0.05, 0.5, 0.001) | |||
line bounds(110, 25, 1, 260), colour( 50, 50, 50) | |||
rslider bounds(112, 8, 55, 55), text("Pluck"), colour(195,126, 0), FontColour(50,50,50), channel("plk"), range(0, 1.00, 0.005, 0.5, 0.0001) | |||
rslider bounds(112, 68, 55, 55), text("Damp"), colour(225,156, 28), FontColour(50,50,50), channel("SusDamp"), range(-1.00, 1.00, 0) | |||
rslider bounds(112,128, 55, 55), text("HPF"), colour(255,186, 58), FontColour(50,50,50), channel("HPF"), range(0,16.0, 0) | |||
rslider bounds(112,188, 55, 55), text("LPF"), colour(255,216, 88), FontColour(50,50,50), channel("LPF"), range(1.0,72, 72, 0.375, 0.0001) | |||
rslider bounds(112,248, 55, 55), text("Inharm."),colour(255,216, 88), FontColour(50,50,50), channel("inharm"), range(-0.99,0.99, 0) | |||
} | |||
; controls pertaining to the release stage of a note accessed in a pop-up panel | |||
groupbox bounds(260, 8, 265, 65), colour(228,156,28), plant("Release"), line(0), popup(1) | |||
{ | |||
rslider bounds( 5, 8, 55, 55), text("Ampl."), colour(255,186,58), FontColour(50,50,50), channel("RelAmpl"), range(0, 20.00, 2) | |||
rslider bounds( 55, 8, 55, 55), text("Tone"), colour(255,186,58), FontColour(50,50,50), channel("RelTone"), range(100, 8000, 1000) | |||
rslider bounds(105, 8, 55, 55), text("D.Time"), colour(255,186,58), FontColour(50,50,50), channel("RelDTime"), range(0.001, 1, 0.01, 0.5, 0.001) | |||
rslider bounds(155, 8, 55, 55), text("Damp"), colour(255,186,58), FontColour(50,50,50), channel("RelDamp"), range(0.10, 0.99, 0.95) | |||
rslider bounds(205, 8, 55, 55), text("A.Time"), colour(255,186,58), FontColour(50,50,50), channel("RelATime"), range(0.01,20, 0.05, 0.5, 0.01) | |||
} | |||
; controls pertaining to the setup of the instrument's bandpass filters accessed in a pop-up panel | |||
groupbox bounds(150, 46, 230, 195), colour(228,156,28), plant("Filters"), line(0), popup(1) | |||
{ | |||
label bounds( 10, 5, 60, 12), text("Brilliant"), colour("white"), FontColour(50,50,50) | |||
label bounds( 69, 5, 60, 12), text("Treble"), colour("white"), FontColour(50,50,50) | |||
label bounds(121, 5, 60, 12), text("Medium"), colour("white"), FontColour(50,50,50) | |||
label bounds(185, 5, 60, 12), text("Soft"), colour("white"), FontColour(50,50,50) | |||
checkbox bounds( 26, 18, 10, 10), channel("brilliant"), colour("lime"), value(0), shape("ellipse") | |||
checkbox bounds( 81, 18, 10, 10), channel("treble"), colour("lime"), value(0), shape("ellipse") | |||
checkbox bounds(136, 18, 10, 10), channel("medium"), colour("lime"), value(0), shape("ellipse") | |||
checkbox bounds(191, 18, 10, 10), channel("soft"), colour("lime"), value(0), shape("ellipse") | |||
rslider bounds( 5, 30, 55, 55), channel("fco1"), text("fco.1"), colour(235,166,38), FontColour(50,50,50), range(50,5000,2500,0.5) | |||
rslider bounds( 60, 30, 55, 55), channel("fco2"), text("fco.2"), colour(235,166,38), FontColour(50,50,50), range(50,5000,1000,0.5) | |||
rslider bounds(115, 30, 55, 55), channel("fco3"), text("fco.3"), colour(235,166,38), FontColour(50,50,50), range(50,5000, 500,0.5) | |||
rslider bounds(170, 30, 55, 55), channel("fco4"), text("fco.4"), colour(235,166,38), FontColour(50,50,50), range(50,5000, 200,0.5) | |||
rslider bounds( 5, 85, 55, 55), channel("gain1"), text("Gain 1"), colour(255,216,88), FontColour(50,50,50), range(0.50,30, 3,0.5) | |||
rslider bounds( 60, 85, 55, 55), channel("gain2"), text("Gain 2"), colour(255,216,88), FontColour(50,50,50), range(0.50,30,2.3,0.5) | |||
rslider bounds(115, 85, 55, 55), channel("gain3"), text("Gain 3"), colour(255,216,88), FontColour(50,50,50), range(0.50,30,1.3,0.5) | |||
rslider bounds(170, 85, 55, 55), channel("gain4"), text("Gain 4"), colour(255,216,88), FontColour(50,50,50), range(0.50,30,1.4,0.5) | |||
rslider bounds( 5,140, 55, 55), channel("Q1"), text("Q 1"), colour(255,255,138), FontColour(50,50,50), range(0.50,30,1.25,0.5) | |||
rslider bounds( 60,140, 55, 55), channel("Q2"), text("Q 2"), colour(255,255,138), FontColour(50,50,50), range(0.50,30,1 ,0.5) | |||
rslider bounds(115,140, 55, 55), channel("Q3"), text("Q 3"), colour(255,255,138), FontColour(50,50,50), range(0.50,30,1 ,0.5) | |||
rslider bounds(170,140, 55, 55), channel("Q4"), text("Q 4"), colour(255,255,138), FontColour(50,50,50), range(0.50,30,2 ,0.5) | |||
line bounds( 59, 25, 1, 150), colour(50,50,50) | |||
line bounds(114, 25, 1, 150), colour(50,50,50) | |||
line bounds(169, 25, 1, 150), colour(50,50,50) | |||
} | |||
rslider bounds(470, 5, 75, 75), text("Level"), colour(255,186,58), FontColour(50,50,50), channel("level"), range(0, 8.00, 0.5, 0.5) | |||
keyboard bounds(10, 85, 530,80) | |||
image bounds(5, 170, 420, 20), colour(75, 85, 90, 50), plant("credit"){ | |||
label bounds(0.03, 0.1, .6, .7), text("Author: Iain McCurdy |2013|"), colour("white"), FontColour(50,50,50) | |||
} | |||
</Cabbage> | |||
<CsoundSynthesizer> | |||
<CsOptions> | |||
-dm0 -n -+rtmidi=null -M0 | |||
</CsOptions> | |||
<CsInstruments> | |||
sr = 44100 | |||
ksmps = 16 | |||
nchnls = 2 | |||
0dbfs = 1 | |||
; table used to map of note played to bridge relection | |||
girefl ftgen 0,0,128,-27, 0,0.4, 36,0.4, 72,0.01, 127,0.01 | |||
gisine ftgen 0,0,4096,10,1 | |||
gitri ftgen 0,0,4096,7,0,1024,1,2046,-1,1024,0 | |||
opcode FreqShifter,a,aki | |||
ain,kfshift,ifn xin ;READ IN INPUT ARGUMENTS | |||
areal, aimag hilbert ain ;HILBERT OPCODE OUTPUTS TWO PHASE SHIFTED SIGNALS, EACH 90 OUT OF PHASE WITH EACH OTHER | |||
asin oscili 1, kfshift, ifn, 0 | |||
acos oscili 1, kfshift, ifn, 0.25 | |||
;RING MODULATE EACH SIGNAL USING THE QUADRATURE OSCILLATORS AS MODULATORS | |||
amod1 = areal * acos | |||
amod2 = aimag * asin | |||
;UPSHIFTING OUTPUT | |||
aFS = (amod1 - amod2) | |||
xout aFS ;SEND AUDIO BACK TO CALLER INSTRUMENT | |||
endop | |||
instr 1 | |||
ibrilliant chnget "brilliant" ; filter switch | |||
itreble chnget "treble" ; filter switch | |||
imedium chnget "medium" ; filter switch | |||
isoft chnget "soft" ; filter switch | |||
iC_D chnget "C_D" ; single/dual pickup selector | |||
iA_B chnget "A_B" ; neck/bridge pickup selector | |||
gklevel chnget "level" ; output volume control | |||
icps cpsmidi ; cps read from midi | |||
inum notnum ; note number read from midi | |||
ivel veloc 0,1 ; velocity read from midi | |||
; pluck position is an i-rate variable so a mechanism is created to re-initialise the instrument if it is changed in realtime | |||
kplk chnget "plk" ; pluck position | |||
ktrig changed kplk ; if GUI knob changes, generate a trigger | |||
if ktrig==1 then ; if triggered... | |||
reinit UPDATE ; reinitialise... | |||
endif | |||
UPDATE: ; ...from here (until the end of the instrument) | |||
iplk = i(kplk) ; cast k-rate pluck position to i-rate variable | |||
; pickup positions | |||
kpickA chnget "pickA" ; neck pickup position | |||
kpickB chnget "pickB" ; bridge pickup position | |||
; string vibration damping / reflectivity | |||
irefl table inum,girefl ; read reflectivity for this note from function table (lower notes will experience more damping) | |||
iRelDTime chnget "RelDTime" ; release damping time: time for damping state to be established | |||
iRelDamp chnget "RelDamp" ; amount of damping upon release | |||
krefl linsegr irefl,iRelDTime,iRelDamp ; upon note release vibrations are damped quickly and dramatically | |||
kSusDamp chnget "SusDamp" ; user controlled modulation of string vibration damping | |||
krefl limit krefl+kSusDamp,0.001,0.999 ; consolidate reflection/damping value and limit possible values to prevent out of range values | |||
iamp = ivel*0.3 | |||
kenv expseg 1, 0.01,0.001,1,0.001 ; create an amplitude envelope for the noise burst | |||
axcite pinkish kenv-0.001 ; create a pink noise signal | |||
axcite tone axcite,icps*2 | |||
krelease release ; sense release of note | |||
iRelAmpl chnget "RelAmpl" ; release pluck amplitude | |||
iRelTone chnget "RelTone" ; tone of the release pluck | |||
if krelease==1 then ; if key is released... | |||
axcite mpulse iRelAmpl,0 ; audio impulse is created as an implementation of the release pluck impulse | |||
axcite butlp axcite,iRelTone ; lowpass filter the impulse | |||
endif | |||
kModA chnget "ModA" ; pickup position modulation depth | |||
kModB chnget "ModB" | |||
kRateA chnget "RateA" ; pickup position modulation rate | |||
kRateB chnget "RateB" | |||
iEnvA chnget "EnvA" ; pickup position envelope modulation depth | |||
iEnvB chnget "EnvB" | |||
iTimeA chnget "TimeA" ; pickup position envelope modulation time | |||
iTimeB chnget "TimeB" | |||
kenv1 transeg iEnvA,iTimeA,-4,0 ; envelope applied to the pickup position (pickup A) | |||
kenv2 transeg iEnvB,iTimeB,-4,0 ; envelope applied to the pickup position (pickup B) | |||
kmod1 oscili kModA,kRateA,gitri ; lfo used to modulate pickup position (pickup A) | |||
kmod2 oscili kModB,kRateB,gitri ; lfo used to modulate pickup position (pickup B) | |||
kpickA limit kpickA + kmod1 + kenv1, 0, 1 ; consolidate pickup position between fixed value, lfo and envelope. Also protect against out of range values. (pickup A) | |||
kpickB limit kpickB + kmod2 + kenv2, 0, 1 ; consolidate pickup position between fixed value, lfo and envelope. Also protect against out of range values. (pickup B) | |||
iinharm chnget "inharm" ; inharmonicity of the tone. negative values compress the spectrum, positive values expand it. Compensation will be applied to the fundemental so that it will remain consistent. | |||
iFShift = icps*iinharm ; amount of frequency shift (in CPS) | |||
a1 repluck iplk, iamp, icps-iFShift, kpickA, krefl, axcite ; employ plucked string model (pickup A) | |||
a2 repluck iplk, iamp, icps-iFShift, kpickB, krefl, axcite ; employ plucked string model (pickup B) | |||
if(iinharm!=0) then ; only apply frequency shifting if inharmonicity is anything other than zero | |||
a1 FreqShifter a1,iFShift,gisine ; call frequency shifting UDO | |||
a2 FreqShifter a2,iFShift,gisine | |||
endif | |||
if(iC_D==0&&iA_B==0) then ;CA - neck pickup only | |||
asig = a1 | |||
elseif(iC_D==0&&iA_B==1) then ;CB - bridge pickup only | |||
asig = a2 | |||
elseif(iC_D==1&&iA_B==0) then ;DA - both pickups in phase | |||
asig = a1 + a2 | |||
elseif(iC_D==1&&iA_B==1) then ;DB - both pickups. Pickup B 180 degrees out of phase | |||
asig = a1 - a2 | |||
endif | |||
; velocity to brightness | |||
icf = (ivel*6)+8 ; cutoff frequency in 'oct' format | |||
asig butlp asig,cpsoct(icf) ; lowpass filter audio signal | |||
; filter switches | |||
kfco1 chnget "fco1" ; filter cutoffs | |||
kfco2 chnget "fco2" | |||
kfco3 chnget "fco3" | |||
kfco4 chnget "fco4" | |||
kQ1 chnget "Q1" ; filter q's | |||
kQ2 chnget "Q2" | |||
kQ3 chnget "Q3" | |||
kQ4 chnget "Q4" | |||
kgain1 chnget "gain1" ; filter gains | |||
kgain2 chnget "gain2" | |||
kgain3 chnget "gain3" | |||
kgain4 chnget "gain4" | |||
; filters | |||
amix = 0 ; audio mix of filter outputs (reset to silence upon each iteration) | |||
if(ibrilliant==1) then ; if 'brilliant' selected... | |||
afilt rbjeq asig, kfco1, 1, kQ1, 1, 4 ; bandpass filter sound | |||
amix = amix + (afilt * kgain1) ; add a scaled amount of filtered signal to filter mix signal | |||
endif | |||
if(itreble==1) then ; if 'treble' selected... | |||
afilt rbjeq asig, kfco2, 1, kQ2, 1, 4 ; bandpass filter sound | |||
amix = amix + (afilt * kgain2) ; add a scaled amount of filtered signal to filter mix signal | |||
endif | |||
if(imedium==1) then ; if 'medium' selected... | |||
afilt rbjeq asig, kfco3, 1, kQ3, 1, 4 ; bandpass filter sound | |||
amix = amix + (afilt * kgain3) ; add a scaled amount of filtered signal to filter mix signal | |||
endif | |||
if(isoft==1) then ; if 'soft' selected... | |||
afilt rbjeq asig, kfco4, 1, kQ4, 1, 4 ; bandpass filter sound | |||
amix = amix + (afilt * kgain4) ; add a scaled amount of filtered signal to filter mix signal | |||
endif | |||
if((ibrilliant + itreble + imedium + isoft)==0) then ; if no filters selected... | |||
amix = asig ; ...just send unfiltered audio to filter section output | |||
endif | |||
; key following highpass filter | |||
kHPF chnget "HPF" ; highpass filter multiple | |||
if kHPF>0 then ; if HPF control is greater than 1... | |||
kcf limit icps*kHPF,20,sr/2 ; prevent out of range values which would cause the filter to 'blow up' | |||
amix buthp amix,kcf ; filter tone relative to note fundemental | |||
endif | |||
; key following lowpass filter | |||
kLPF chnget "LPF" ; lowpass filter multiple | |||
if kLPF<72 then ; if LPF control is greater than 1... | |||
kcf limit icps*kLPF,20,sr/2 ; prevent out of range values which would cause the filter to 'blow up' | |||
amix butlp amix,kcf ; filter tone relative to note fundemental | |||
endif | |||
; release envelope | |||
iRelATime chnget "RelATime" ; amplitude release time | |||
aenv linsegr 1, iRelATime, 0 ; amplitude release envelope (senses key release before entering final/only segment) | |||
; output signal | |||
aout = amix * aenv * gklevel ; apply release envelope and level control | |||
outs aout, aout ; send audio to outputs | |||
endin | |||
</CsInstruments> | |||
<CsScore> | |||
f 0 [60*60*24*7] ; keep performance going for up to a week | |||
</CsScore> | |||
</CsoundSynthesizer> |
@@ -1,461 +0,0 @@ | |||
------------------------ Instrument ID: | |||
-------- Start of Preset: Clavinet 1 | |||
brilliant: 0 | |||
treble: 1 | |||
medium: 0 | |||
soft: 0 | |||
C_D: 1 | |||
A_B: 1 | |||
pickA: 0.25 | |||
pickB: 0.0700000003 | |||
ModA: 0.0300000012 | |||
ModB: 0.0300000012 | |||
RateA: 0.200000003 | |||
RateB: 0.150000006 | |||
EnvA: 0 | |||
EnvB: 0 | |||
TimeA: 0.0500000007 | |||
TimeB: 0.0500000007 | |||
plk: 0.00499999989 | |||
SusDamp: 0 | |||
HPF: 0 | |||
LPF: 72 | |||
inharm: 0 | |||
RelAmpl: 2 | |||
RelTone: 1000 | |||
RelDTime: 0.0100000007 | |||
RelDamp: 0.949999988 | |||
RelATime: 0.049999997 | |||
brilliant: 0 | |||
treble: 1 | |||
medium: 0 | |||
soft: 0 | |||
fco1: 2500 | |||
fco2: 1000 | |||
fco3: 500 | |||
fco4: 200 | |||
gain1: 3 | |||
gain2: 2.29999995 | |||
gain3: 1.29999995 | |||
gain4: 1.39999998 | |||
Q1: 1.25 | |||
Q2: 1 | |||
Q3: 1 | |||
Q4: 2 | |||
level: 0.5 | |||
-------- End of Preset: Clavinet 1 | |||
-------- Start of Preset: Clavinet 2 | |||
brilliant: 0 | |||
treble: 0 | |||
medium: 1 | |||
soft: 0 | |||
C_D: 1 | |||
A_B: 0 | |||
pickA: 0.938000023 | |||
pickB: 0.0500000007 | |||
ModA: 0.0300000012 | |||
ModB: 0.0300000012 | |||
RateA: 0.200000003 | |||
RateB: 0.150000006 | |||
EnvA: 0 | |||
EnvB: 0 | |||
TimeA: 0.0500000007 | |||
TimeB: 0.0500000007 | |||
plk: 0.165399998 | |||
SusDamp: 0.50999999 | |||
HPF: 0 | |||
LPF: 39.6390991 | |||
inharm: 0 | |||
RelAmpl: 0 | |||
RelTone: 1000 | |||
RelDTime: 0.0100000007 | |||
RelDamp: 0.359999985 | |||
RelATime: 4.01999998 | |||
brilliant: 0 | |||
treble: 0 | |||
medium: 1 | |||
soft: 0 | |||
fco1: 2500 | |||
fco2: 1000 | |||
fco3: 500 | |||
fco4: 200 | |||
gain1: 3 | |||
gain2: 2.29999995 | |||
gain3: 1.29999995 | |||
gain4: 1.39999998 | |||
Q1: 1.25 | |||
Q2: 1 | |||
Q3: 1 | |||
Q4: 2 | |||
level: 0.925000072 | |||
-------- End of Preset: Clavinet 2 | |||
-------- Start of Preset: Clavinet 3 | |||
brilliant: 0 | |||
treble: 0 | |||
medium: 1 | |||
soft: 0 | |||
C_D: 1 | |||
A_B: 0 | |||
pickA: 0.120000005 | |||
pickB: 0.252000004 | |||
ModA: 0.0300000012 | |||
ModB: 0.0300000012 | |||
RateA: 0.200000003 | |||
RateB: 0.150000006 | |||
EnvA: 0 | |||
EnvB: 0 | |||
TimeA: 0.0500000007 | |||
TimeB: 0.0500000007 | |||
plk: 0.00079999998 | |||
SusDamp: 0.0799999759 | |||
HPF: 2.04999995 | |||
LPF: 8.57209969 | |||
inharm: -0.50999999 | |||
RelAmpl: 2.15999985 | |||
RelTone: 2358.80005 | |||
RelDTime: 0.0650000051 | |||
RelDamp: 0.300000012 | |||
RelATime: 8 | |||
brilliant: 0 | |||
treble: 0 | |||
medium: 1 | |||
soft: 0 | |||
fco1: 2500 | |||
fco2: 1000 | |||
fco3: 500 | |||
fco4: 200 | |||
gain1: 3 | |||
gain2: 2.29999995 | |||
gain3: 1.29999995 | |||
gain4: 1.39999998 | |||
Q1: 1.25 | |||
Q2: 1 | |||
Q3: 1 | |||
Q4: 2 | |||
level: 1.21700001 | |||
-------- End of Preset: Clavinet 3 | |||
-------- Start of Preset: Clavinet 4 | |||
brilliant: 0 | |||
treble: 1 | |||
medium: 0 | |||
soft: 0 | |||
C_D: 1 | |||
A_B: 0 | |||
pickA: 0.530000031 | |||
pickB: 0.462000012 | |||
ModA: 0.0300000012 | |||
ModB: 0.0300000012 | |||
RateA: 0.200000003 | |||
RateB: 0.150000006 | |||
EnvA: 0 | |||
EnvB: 0 | |||
TimeA: 0.0500000007 | |||
TimeB: 0.0500000007 | |||
plk: 0.269099981 | |||
SusDamp: -1 | |||
HPF: 0 | |||
LPF: 25.2099991 | |||
inharm: 0 | |||
RelAmpl: 2 | |||
RelTone: 1000 | |||
RelDTime: 0.0100000007 | |||
RelDamp: 0.879999995 | |||
RelATime: 0.049999997 | |||
brilliant: 0 | |||
treble: 1 | |||
medium: 0 | |||
soft: 0 | |||
fco1: 2500 | |||
fco2: 1000 | |||
fco3: 500 | |||
fco4: 200 | |||
gain1: 3 | |||
gain2: 2.29999995 | |||
gain3: 1.29999995 | |||
gain4: 1.39999998 | |||
Q1: 1.25 | |||
Q2: 1 | |||
Q3: 1 | |||
Q4: 2 | |||
level: 0.5 | |||
-------- End of Preset: Clavinet 4 | |||
-------- Start of Preset: Clavinet 5 | |||
brilliant: 0 | |||
treble: 1 | |||
medium: 0 | |||
soft: 1 | |||
C_D: 0 | |||
A_B: 1 | |||
pickA: 0.398000032 | |||
pickB: 0.522000015 | |||
ModA: 0.0300000012 | |||
ModB: 0.0300000012 | |||
RateA: 0.200000003 | |||
RateB: 0.150000006 | |||
EnvA: 0 | |||
EnvB: 0 | |||
TimeA: 0.0500000007 | |||
TimeB: 0.0500000007 | |||
plk: 0.285899997 | |||
SusDamp: 0.0999999791 | |||
HPF: 0 | |||
LPF: 31.4514999 | |||
inharm: 0 | |||
RelAmpl: 0 | |||
RelTone: 1000 | |||
RelDTime: 0.0100000007 | |||
RelDamp: 0.579999983 | |||
RelATime: 3.91999984 | |||
brilliant: 0 | |||
treble: 1 | |||
medium: 0 | |||
soft: 1 | |||
fco1: 2500 | |||
fco2: 1000 | |||
fco3: 500 | |||
fco4: 200 | |||
gain1: 3 | |||
gain2: 2.29999995 | |||
gain3: 1.29999995 | |||
gain4: 1.39999998 | |||
Q1: 1.25 | |||
Q2: 1 | |||
Q3: 1 | |||
Q4: 2 | |||
level: 0.461000025 | |||
-------- End of Preset: Clavinet 5 | |||
-------- Start of Preset: Clavinet 6 | |||
brilliant: 0 | |||
treble: 1 | |||
medium: 0 | |||
soft: 0 | |||
C_D: 1 | |||
A_B: 1 | |||
pickA: 0.0940000042 | |||
pickB: 0.398000032 | |||
ModA: 0.0300000012 | |||
ModB: 0.0300000012 | |||
RateA: 0.200000003 | |||
RateB: 0.150000006 | |||
EnvA: 0 | |||
EnvB: 0 | |||
TimeA: 0.0500000007 | |||
TimeB: 0.0500000007 | |||
plk: 0.128700003 | |||
SusDamp: 0.299999982 | |||
HPF: 0 | |||
LPF: 72 | |||
inharm: 0 | |||
RelAmpl: 0 | |||
RelTone: 1000 | |||
RelDTime: 0.0100000007 | |||
RelDamp: 0.280000001 | |||
RelATime: 1.39999998 | |||
brilliant: 0 | |||
treble: 1 | |||
medium: 0 | |||
soft: 0 | |||
fco1: 2500 | |||
fco2: 1000 | |||
fco3: 500 | |||
fco4: 200 | |||
gain1: 3 | |||
gain2: 2.29999995 | |||
gain3: 1.29999995 | |||
gain4: 1.39999998 | |||
Q1: 1.25 | |||
Q2: 1 | |||
Q3: 1 | |||
Q4: 2 | |||
level: 0.5 | |||
-------- End of Preset: Clavinet 6 | |||
-------- Start of Preset: Clavinet 7 | |||
brilliant: 1 | |||
treble: 1 | |||
medium: 0 | |||
soft: 0 | |||
C_D: 1 | |||
A_B: 0 | |||
pickA: 0.00200000009 | |||
pickB: 0.950000048 | |||
ModA: 0.0300000012 | |||
ModB: 0.0300000012 | |||
RateA: 0.200000003 | |||
RateB: 0.150000006 | |||
EnvA: 0 | |||
EnvB: 0 | |||
TimeA: 0.0500000007 | |||
TimeB: 0.0500000007 | |||
plk: 0.128700003 | |||
SusDamp: 0.299999982 | |||
HPF: 3.46000004 | |||
LPF: 24.0676003 | |||
inharm: 0 | |||
RelAmpl: 0 | |||
RelTone: 1000 | |||
RelDTime: 0.0100000007 | |||
RelDamp: 0.280000001 | |||
RelATime: 3.32999992 | |||
brilliant: 1 | |||
treble: 1 | |||
medium: 0 | |||
soft: 0 | |||
fco1: 2500 | |||
fco2: 1000 | |||
fco3: 500 | |||
fco4: 200 | |||
gain1: 3 | |||
gain2: 2.29999995 | |||
gain3: 1.29999995 | |||
gain4: 1.39999998 | |||
Q1: 1.25 | |||
Q2: 1 | |||
Q3: 1 | |||
Q4: 2 | |||
level: 4.26300001 | |||
-------- End of Preset: Clavinet 7 | |||
-------- Start of Preset: Clavinet 8 | |||
brilliant: 1 | |||
treble: 1 | |||
medium: 0 | |||
soft: 0 | |||
C_D: 1 | |||
A_B: 0 | |||
pickA: 0.584000051 | |||
pickB: 0.450000018 | |||
ModA: 0.0300000012 | |||
ModB: 0.0300000012 | |||
RateA: 0.200000003 | |||
RateB: 0.150000006 | |||
EnvA: 0 | |||
EnvB: 0 | |||
TimeA: 0.0500000007 | |||
TimeB: 0.0500000007 | |||
plk: 0.23709999 | |||
SusDamp: 0.459999979 | |||
HPF: 1.46999991 | |||
LPF: 16.7103996 | |||
inharm: 0 | |||
RelAmpl: 0 | |||
RelTone: 1000 | |||
RelDTime: 0.0100000007 | |||
RelDamp: 0.140000001 | |||
RelATime: 3.58999991 | |||
brilliant: 1 | |||
treble: 1 | |||
medium: 0 | |||
soft: 0 | |||
fco1: 2500 | |||
fco2: 1000 | |||
fco3: 500 | |||
fco4: 200 | |||
gain1: 3 | |||
gain2: 2.29999995 | |||
gain3: 1.29999995 | |||
gain4: 1.39999998 | |||
Q1: 1.25 | |||
Q2: 1 | |||
Q3: 1 | |||
Q4: 2 | |||
level: 0.720000029 | |||
-------- End of Preset: Clavinet 8 | |||
-------- Start of Preset: Clavinet 9 | |||
brilliant: 1 | |||
treble: 0 | |||
medium: 0 | |||
soft: 0 | |||
C_D: 0 | |||
A_B: 0 | |||
pickA: 0.25 | |||
pickB: 0.0700000003 | |||
ModA: 0.0300000012 | |||
ModB: 0.0300000012 | |||
RateA: 0.200000003 | |||
RateB: 0.150000006 | |||
EnvA: 0 | |||
EnvB: 0 | |||
TimeA: 0.0500000007 | |||
TimeB: 0.0500000007 | |||
plk: 0.00499999989 | |||
SusDamp: 0 | |||
HPF: 0 | |||
LPF: 25.5985985 | |||
inharm: 0 | |||
RelAmpl: 2 | |||
RelTone: 1000 | |||
RelDTime: 0.0100000007 | |||
RelDamp: 0.949999988 | |||
RelATime: 0.049999997 | |||
brilliant: 1 | |||
treble: 0 | |||
medium: 0 | |||
soft: 0 | |||
fco1: 2500 | |||
fco2: 1000 | |||
fco3: 500 | |||
fco4: 200 | |||
gain1: 3 | |||
gain2: 2.29999995 | |||
gain3: 1.29999995 | |||
gain4: 1.39999998 | |||
Q1: 1.25 | |||
Q2: 1 | |||
Q3: 1 | |||
Q4: 2 | |||
level: 1.92100012 | |||
-------- End of Preset: Clavinet 9 | |||
-------- Start of Preset: Clavinet 10 | |||
brilliant: 1 | |||
treble: 0 | |||
medium: 0 | |||
soft: 0 | |||
C_D: 1 | |||
A_B: 0 | |||
pickA: 0.25 | |||
pickB: 0.0700000003 | |||
ModA: 0.0300000012 | |||
ModB: 0.0300000012 | |||
RateA: 0.200000003 | |||
RateB: 0.150000006 | |||
EnvA: 0 | |||
EnvB: 0 | |||
TimeA: 0.0500000007 | |||
TimeB: 0.0500000007 | |||
plk: 0.00499999989 | |||
SusDamp: 0 | |||
HPF: 0 | |||
LPF: 25.5985985 | |||
inharm: 0 | |||
RelAmpl: 2 | |||
RelTone: 1000 | |||
RelDTime: 0.0100000007 | |||
RelDamp: 0.949999988 | |||
RelATime: 0.049999997 | |||
brilliant: 1 | |||
treble: 0 | |||
medium: 0 | |||
soft: 0 | |||
fco1: 2500 | |||
fco2: 1000 | |||
fco3: 500 | |||
fco4: 200 | |||
gain1: 3 | |||
gain2: 2.29999995 | |||
gain3: 1.29999995 | |||
gain4: 1.39999998 | |||
Q1: 1.25 | |||
Q2: 1 | |||
Q3: 1 | |||
Q4: 2 | |||
level: 1.92100012 | |||
-------- End of Preset: Clavinet 10 | |||
------------------------ End of Instrument ID: |
@@ -1,144 +0,0 @@ | |||
<Cabbage> | |||
form caption("Scanned synthesizer") size(552, 330), colour("black"),pluginID("sca1") | |||
rslider bounds(15, 10, 100, 100) channel("speed"), range(0.01,.2,.01), caption("Speed"), colour("orange"), midictrl(1, 1) | |||
rslider bounds(120, 10, 100, 100) channel("semi"), range(-12,12,-12), caption("Coarse"), colour("orange") | |||
rslider bounds(225, 10, 100, 100) channel("cutoff"), range(60,22000,12000), caption("Cutoff"), colour("orange") | |||
rslider bounds(330, 10, 100, 100) channel("reso"), range(.1,.99,.2), caption("Resonance"), colour("orange") | |||
rslider bounds(435, 10, 100, 100) channel("spread"), range(0, 1, .5), caption("Stereo image"), colour("orange") | |||
groupbox bounds(15, 120, 240, 100), text("ADSR amplitude"), plant("ADSR"){ | |||
rslider bounds(.0, .3, .6, .6), text("A"), colour("orange"), channel("att"), range(0.01,3, .5) | |||
rslider bounds(.25, .3, .6, .6), text("D"), colour("orange"), channel("dec"), range(0,1, .5) | |||
rslider bounds(.5, .3, .6, .6), text("S"), colour("orange"), channel("sus"), range(0,1,.8) | |||
rslider bounds(.75, .3, .6, .6), text("R"), colour("orange"), channel("rel"), range(0.01,3, .2) | |||
} | |||
groupbox bounds(270, 120, 130, 100), text("LFO"), plant("lfo"){ | |||
rslider bounds(.04, .3, .6, .6), text("Lfo Amp"), colour("orange"), channel("lfoamp"), range(0,4, 0) | |||
rslider bounds(.5, .3, .6, .6), text("Lfo Rate"), colour("orange"), channel("lforate"), range(.1,10, 0) | |||
;rslider bounds(115, 30, 60, 60), text("S"), colour("orange"), channel("sus"), range(0,1,.8) | |||
;rslider bounds(165, 30, 60, 60), text("R"), colour("orange"), channel("rel"), range(0.01,3, .2) | |||
} | |||
groupbox bounds(410, 120, 130, 100), text("LFO filter"), plant("lfofilter"){ | |||
rslider bounds(.04, .3, .6, .6), text("Lfo Amp"), colour("orange"), channel("lfoamp2"), range(0,1000, 0) | |||
rslider bounds(.5, .3, .6, .6), text("Lfo Rate"), colour("orange"), channel("lforate2"), range(0,10, 0) | |||
;rslider bounds(115, 30, 60, 60), text("S"), colour("orange"), channel("sus"), range(0,1,.8) | |||
;rslider bounds(165, 30, 60, 60), text("R"), colour("orange"), channel("rel"), range(0.01,3, .2) | |||
} | |||
keyboard pos(15, 240), size(530, 60) | |||
</Cabbage> | |||
<CsoundSynthesizer> | |||
<CsOptions> | |||
-d -n -+rtmidi=null -M0 -b1024 -m0d | |||
</CsOptions> | |||
<CsInstruments> | |||
; Initialize the global variables. | |||
sr = 44100 | |||
ksmps = 64 | |||
nchnls = 2 | |||
0dbfs = 1 | |||
;Author: Giorgio Zucco (2012) | |||
instr 1 | |||
;channel | |||
krate chnget "speed" | |||
ksemi1 chnget "semi" | |||
kcut chnget "cutoff" | |||
kreso chnget "reso" | |||
kspread chnget "spread" | |||
iatt chnget "att" | |||
idec chnget "dec" | |||
isus chnget "sus" | |||
irel chnget "rel" | |||
klfoamp chnget "lfoamp" | |||
klforate chnget "lforate" | |||
klfoamp2 chnget "lfoamp2" ;lfo x filter | |||
klforate2 chnget "lforate2" | |||
;midi | |||
imidinn notnum | |||
iamp ampmidi 1 | |||
kbend pchbend 0,2 ;pitch bend | |||
;lfo | |||
klfo lfo klfoamp,klforate,2 | |||
kfreq = cpsmidinn(imidinn+kbend+int(ksemi1))+klfo ;controllo midi | |||
;scanned | |||
ktrig changed krate | |||
if ktrig = 1 then | |||
reinit play | |||
endif | |||
play: | |||
;irate = i(krate) | |||
ifnvel = 6 | |||
ifnmass = 2 | |||
ifnstif = 3 | |||
ifnctr = 4 | |||
ifndamp = 5 | |||
kmass = 2 | |||
kstif = .1 | |||
kcentr = .1 | |||
kdamp = -.01 | |||
ileft = .5 | |||
iright = .5 | |||
kpos = 0 | |||
ky = 0 | |||
ain = 0 | |||
idisp = 1 | |||
id = 2 | |||
scanu 1,.01+i(krate),ifnvel,ifnmass,ifnstif,ifnctr,ifndamp,kmass,kstif, kcentr,kdamp,ileft,iright,kpos,ky,ain,idisp,id | |||
asig1 scans iamp,kfreq,8,id | |||
asig2 scans iamp,kfreq,7,id | |||
;filter | |||
klfofilter lfo klfoamp2,klforate2,3 | |||
amoog1 moogladder asig1,kcut+klfofilter,kreso | |||
amoog2 moogladder asig2,kcut+klfofilter,kreso | |||
aout1 balance amoog1,asig1 | |||
aout2 balance amoog2,asig2 | |||
;master | |||
aL clip aout1,0,.9 | |||
aR clip aout2,0,.9 | |||
aoutL = ((aL * kspread) + (aR * (1 - kspread))) *.5 | |||
aoutR = ((aL * (1-kspread)) + (aR * kspread)) *.5 | |||
kadsr madsr iatt,idec,isus,irel | |||
outs aoutL*kadsr,aoutR*kadsr | |||
endin | |||
</CsInstruments> | |||
<CsScore> | |||
f1 0 128 10 1 | |||
; Initial condition | |||
;f1 0 128 7 0 64 1 64 0 | |||
; Masses | |||
f2 0 128 -7 1 128 .8 | |||
; Spring matrices | |||
f3 0 16384 -23 "string-128" | |||
; Centering force | |||
f4 0 128 -7 0 64 6 64 0 | |||
; Damping | |||
f5 0 128 -7 1 128 .0001 | |||
; Initial velocity | |||
f6 0 128 -7 .02 128 0 | |||
; Trajectories | |||
f8 0 128 -5 .001 32 64 64 96 32 | |||
f7 0 128 -7 0 128 128 | |||
;f0 3600 | |||
i1 0 36000 | |||
</CsScore> | |||
</CsoundSynthesizer> |
@@ -1,64 +0,0 @@ | |||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | |||
<HTML> | |||
<HEAD> | |||
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252"> | |||
<TITLE></TITLE> | |||
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)"> | |||
<META NAME="CREATED" CONTENT="20120918;12541200"> | |||
<META NAME="CHANGED" CONTENT="20120920;9525900"> | |||
<STYLE TYPE="text/css"> | |||
<!-- | |||
@page { margin: 2cm } | |||
P { margin-bottom: 0.21cm } | |||
A:link { so-language: zxx } | |||
--> | |||
</STYLE> | |||
</HEAD> | |||
<BODY LANG="en-GB" DIR="LTR"> | |||
<P STYLE="margin-bottom: 0cm"><FONT FACE="Verdana, sans-serif"><FONT SIZE=5><U><B>Sonic | |||
Lava Lamp</B></U></FONT></FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><BR> | |||
</P> | |||
<TABLE WIDTH=100% BORDER=1 CELLPADDING=4 CELLSPACING=3> | |||
<COL WIDTH=128*> | |||
<COL WIDTH=128*> | |||
<TR VALIGN=TOP> | |||
<TD WIDTH=50%> | |||
<P STYLE="margin-bottom: 0cm; text-decoration: none"><FONT FACE="Verdana, sans-serif"><B>xypad1:</B></FONT></P> | |||
<P STYLE="margin-bottom: 0cm; text-decoration: none"><FONT FACE="Verdana, sans-serif">x | |||
= LFO Speed</FONT></P> | |||
<P STYLE="text-decoration: none"><FONT FACE="Verdana, sans-serif">y | |||
= LFO Offset</FONT></P> | |||
</TD> | |||
<TD WIDTH=50%> | |||
<P STYLE="margin-bottom: 0cm; text-decoration: none"><FONT FACE="Verdana, sans-serif"><B>xypad2:</B></FONT></P> | |||
<P STYLE="margin-bottom: 0cm; text-decoration: none"><FONT FACE="Verdana, sans-serif">x | |||
= LFO Shape</FONT></P> | |||
<P STYLE="text-decoration: none"><FONT FACE="Verdana, sans-serif">y | |||
= LFO Depth</FONT></P> | |||
</TD> | |||
</TR> | |||
<TR VALIGN=TOP> | |||
<TD WIDTH=50%> | |||
<P STYLE="margin-bottom: 0cm; text-decoration: none"><FONT FACE="Verdana, sans-serif"><B>xypad3:</B></FONT></P> | |||
<P STYLE="margin-bottom: 0cm; text-decoration: none"><FONT FACE="Verdana, sans-serif">x | |||
= Pan Position</FONT></P> | |||
<P STYLE="text-decoration: none"><FONT FACE="Verdana, sans-serif">y | |||
= Amplitude</FONT></P> | |||
</TD> | |||
<TD WIDTH=50%> | |||
<P STYLE="margin-bottom: 0cm; text-decoration: none"><FONT FACE="Verdana, sans-serif"><B>xypad4:</B></FONT></P> | |||
<P STYLE="margin-bottom: 0cm; text-decoration: none"><FONT FACE="Verdana, sans-serif">x | |||
= Delay Time</FONT></P> | |||
<P><FONT FACE="Verdana, sans-serif"><SPAN STYLE="text-decoration: none">y | |||
= Delay Send</SPAN></FONT></P> | |||
</TD> | |||
</TR> | |||
</TABLE> | |||
<P STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> | |||
<FONT FACE="Verdana, sans-serif"><FONT SIZE=3>Turn on automation for | |||
each xypad and set them all into slow motion...</FONT></FONT></P> | |||
<P STYLE="margin-bottom: 0cm"><BR> | |||
</P> | |||
</BODY> | |||
</HTML> |
@@ -1,983 +0,0 @@ | |||
Saving patterns saves tables as text file to the pwd. Each save to a new pattern number creates a new text file on disk for that pattern. | |||
Saving snapshots only saves visible widgets. | |||
<Cabbage> | |||
form caption("TR-808") size(800, 400), colour("SlateGrey"), pluginID("T808") | |||
snapshot bounds( 10,373,200, 20), preset("TR-808"), master(1), items("Preset 1", "Preset 2", "Preset 3", "Preset 4", "Preset 5", "Preset 6", "Preset 7", "Preset 8", "Preset 9", "Preset 10") | |||
label bounds(220,375,250, 14), text("Author: Iain McCurdy |2012|"), colour("white") | |||
groupbox bounds( 0, 0, 50, 225), text("B.Drum"),FontColour("black"), colour(192,192,192){ | |||
checkbox bounds(10, 24, 5, 5), colour("yellow"), channel("Act1"), value(0), shape("ellipse") | |||
rslider bounds( 5, 25, 45, 45), text("Level"), FontColour("black"), channel("level1"), range(0, 2, 1) | |||
rslider bounds( 5, 75, 45, 45), text("Tune"), FontColour("black"), channel("tune1"), range(-2, 2, 0) | |||
rslider bounds( 5,125, 45, 45), text("Decay"), FontColour("black"), channel("dur1"), range(0.25, 2, 1, 0.8) | |||
rslider bounds( 5,175, 45, 45), text("Pan"), FontColour("black"),channel("pan1"), range(0, 1, 0.5) | |||
} | |||
groupbox bounds(50, 0, 50, 225), text("Snare"), FontColour("black"),colour(202,202,202){ | |||
checkbox bounds(60, 24, 5, 5), colour("yellow"), channel("Act2"), value(0), shape("ellipse") | |||
rslider bounds(55, 25, 45, 45), text("Level"), FontColour("black"), channel("level2"), range(0, 2, 1) | |||
rslider bounds(55, 75, 45, 45), text("Tune"), FontColour("black"), channel("tune2"), range(-2, 2, 0) | |||
rslider bounds(55,125, 45, 45), text("Decay"), FontColour("black"), channel("dur2"), range(0.25, 2, 1, 0.8) | |||
rslider bounds(55,175, 45, 45), text("Pan"), FontColour("black"),channel("pan2"), range(0, 1, 0.5) | |||
} | |||
groupbox bounds(100, 0, 50, 225), text("Open HH"), FontColour("black"), colour(212,212,212){ | |||
checkbox bounds(110, 24, 5, 5), colour("yellow"), channel("Act3"), value(0), shape("ellipse") | |||
rslider bounds(105, 25, 45, 45), text("Level"), FontColour("black"), channel("level3"), range(0, 2, 1) | |||
rslider bounds(105, 75, 45, 45), text("Tune"), FontColour("black"), channel("tune3"), range(-2, 2, 0) | |||
rslider bounds(105,125, 45, 45), text("Decay"), FontColour("black"),channel("dur3"), range(0.25, 2, 1, 0.8) | |||
rslider bounds(105,175, 45, 45), text("Pan"), FontColour("black"),channel("pan3"), range(0, 1, 0.5) | |||
} | |||
groupbox bounds(150, 0, 50, 225), text("Cl. HH"),FontColour("black"),colour(222,222,222){ | |||
checkbox bounds(160, 24, 5, 5), colour("yellow"), channel("Act4"), value(0), shape("ellipse") | |||
rslider bounds(155, 25, 45, 45), text("Level"), FontColour("black"), channel("level4"), range(0, 2, 1) | |||
rslider bounds(155, 75, 45, 45), text("Tune"), FontColour("black"), channel("tune4"), range(-2, 2, 0) | |||
rslider bounds(155,125, 45, 45), text("Decay"), FontColour("black"),channel("dur4"), range(0.25, 2, 1, 0.8) | |||
rslider bounds(155,175, 45, 45), text("Pan"), FontColour("black"),channel("pan4"), range(0, 1, 0.5) | |||
} | |||
groupbox bounds(200, 0, 50, 225), text("Hi Tom"), FontColour("black"),colour(232,232,232){ | |||
checkbox bounds(210, 24, 5, 5), colour("yellow"), channel("Act5"), value(0), shape("ellipse") | |||
rslider bounds(205, 25, 45, 45), text("Level"), FontColour("black"), channel("level5"), range(0, 2, 1) | |||
rslider bounds(205, 75, 45, 45), text("Tune"), FontColour("black"), channel("tune5"), range(-2, 2, 0) | |||
rslider bounds(205,125, 45, 45), text("Decay"), FontColour("black"),channel("dur5"), range(0.25, 2, 1, 0.8) | |||
rslider bounds(205,175, 45, 45), text("Pan"), FontColour("black"),channel("pan5"), range(0, 1, 0.5) | |||
} | |||
groupbox bounds(250, 0, 50, 225), text("Mid Tom"),FontColour("black"), colour(242,242,242){ | |||
checkbox bounds(260, 24, 5, 5), colour("yellow"), channel("Act6"), value(0), shape("ellipse") | |||
rslider bounds(255, 25, 45, 45), text("Level"), FontColour("black"), channel("level6"), range(0, 2, 1) | |||
rslider bounds(255, 75, 45, 45), text("Tune"), FontColour("black"), channel("tune6"), range(-2, 2, 0) | |||
rslider bounds(255,125, 45, 45), text("Decay"), FontColour("black"),channel("dur6"), range(0.25, 2, 1, 0.8) | |||
rslider bounds(255,175, 45, 45), text("Pan"), FontColour("black"),channel("pan6"), range(0, 1, 0.5) | |||
} | |||
groupbox bounds(300, 0, 50, 225), text("Low Tom"),FontColour("black"), colour(232,232,232){ | |||
checkbox bounds(310, 24, 5, 5), colour("yellow"), channel("Act7"), value(0), shape("ellipse") | |||
rslider bounds(305, 25, 45, 45), text("Level"), FontColour("black"), channel("level7"), range(0, 2, 1) | |||
rslider bounds(305, 75, 45, 45), text("Tune"), FontColour("black"), channel("tune7"), range(-2, 2, 0) | |||
rslider bounds(305,125, 45, 45), text("Decay"), FontColour("black"),channel("dur7"), range(0.25, 2, 1, 0.8) | |||
rslider bounds(305,175, 45, 45), text("Pan"), FontColour("black"),channel("pan7"), range(0, 1, 0.5) | |||
} | |||
groupbox bounds(350, 0, 50, 225), text("Cymbal"), FontColour("black"),colour(222,222,222){ | |||
checkbox bounds(360, 24, 5, 5), colour("yellow"), channel("Act8"), value(0), shape("ellipse") | |||
rslider bounds(355, 25, 45, 45), text("Level"), FontColour("black"), channel("level8"), range(0, 2, 1) | |||
rslider bounds(355, 75, 45, 45), text("Tune"), FontColour("black"), channel("tune8"), range(-2, 2, 0) | |||
rslider bounds(355,125, 45, 45), text("Decay"), FontColour("black"),channel("dur8"), range(0.25, 2, 1, 0.8) | |||
rslider bounds(355,175, 45, 45), text("Pan"), FontColour("black"),channel("pan8"), range(0, 1, 0.5) | |||
} | |||
groupbox bounds(400, 0, 50, 225), text("Rim Shot"),FontColour("black"), colour(212,212,212){ | |||
checkbox bounds(410, 24, 5, 5), colour("yellow"), channel("Act9"), value(0), shape("ellipse") | |||
rslider bounds(405, 25, 45, 45), text("Level"), FontColour("black"), channel("level9"), range(0, 2, 1) | |||
rslider bounds(405, 75, 45, 45), text("Tune"), FontColour("black"), channel("tune9"), range(-2, 2, 0) | |||
rslider bounds(405,125, 45, 45), text("Decay"), FontColour("black"),channel("dur9"), range(0.25, 2, 1, 0.8) | |||
rslider bounds(405,175, 45, 45), text("Pan"), FontColour("black"),channel("pan9"), range(0, 1, 0.5) | |||
} | |||
groupbox bounds(450, 0, 50, 225), text("Claves"), FontColour("black"),colour(202,202,202){ | |||
checkbox bounds(460, 24, 5, 5), colour("yellow"), channel("Act10"), value(0), shape("ellipse") | |||
rslider bounds(455, 25, 45, 45), text("Level"), FontColour("black"), channel("level10"), range(0, 2, 1) | |||
rslider bounds(455, 75, 45, 45), text("Tune"), FontColour("black"), channel("tune10"), range(-2, 2, 0) | |||
rslider bounds(455,125, 45, 45), text("Decay"), FontColour("black"),channel("dur10"), range(0.25, 2, 1, 0.8) | |||
rslider bounds(455,175, 45, 45), text("Pan"), FontColour("black"),channel("pan10"), range(0, 1, 0.5) | |||
} | |||
groupbox bounds(500, 0, 50, 225), text("Cowbell"),FontColour("black"), colour(192,192,192){ | |||
checkbox bounds(510, 24, 5, 5), colour("yellow"), channel("Act11"), value(0), shape("ellipse") | |||
rslider bounds(505, 25, 45, 45), text("Level"), FontColour("black"), channel("level11"), range(0, 2, 1) | |||
rslider bounds(505, 75, 45, 45), text("Tune"), FontColour("black"), channel("tune11"), range(-2, 2, 0) | |||
rslider bounds(505,125, 45, 45), text("Decay"), FontColour("black"),channel("dur11"), range(0.25, 2, 1, 0.8) | |||
rslider bounds(505,175, 45, 45), text("Pan"), FontColour("black"),channel("pan11"), range(0, 1, 0.5) | |||
} | |||
groupbox bounds(550, 0, 50, 225), text("Clap"), FontColour("black"),colour(182,182,182){ | |||
checkbox bounds(560, 24, 5, 5), colour("yellow"), channel("Act12"), value(0), shape("ellipse") | |||
rslider bounds(555, 25, 45, 45), text("Level"),FontColour("black"), channel("level12"), range(0, 2, 1) | |||
rslider bounds(555, 75, 45, 45), text("Tune"), FontColour("black"), channel("tune12"), range(-2, 2, 0) | |||
rslider bounds(555,125, 45, 45), text("Decay"), FontColour("black"), channel("dur12"), range(0.25, 2, 1, 0.8) | |||
rslider bounds(555,175, 45, 45), text("Pan"), FontColour("black"),channel("pan12"), range(0, 1, 0.5) | |||
} | |||
groupbox bounds(600, 0, 50, 225), text("Maraca"),FontColour("black"), colour(172,172,172){ | |||
checkbox bounds(610, 24, 5, 5), colour("yellow"), channel("Act13"), value(0), shape("ellipse") | |||
rslider bounds(605, 25, 45, 45), text("Level"), FontColour("black"), channel("level13"), range(0, 2, 1) | |||
rslider bounds(605, 75, 45, 45), text("Tune"), FontColour("black"), channel("tune13"), range(-2, 2, 0) | |||
rslider bounds(605,125, 45, 45), text("Decay"), FontColour("black"), channel("dur13"), range(0.25, 2, 1, 0.8) | |||
rslider bounds(605,175, 45, 45), text("Pan"), FontColour("black"),channel("pan13"), range(0, 1, 0.5) | |||
} | |||
groupbox bounds(650, 0, 50, 225), text("Hi Conga"),FontColour("black"), colour(162,162,162){ | |||
checkbox bounds(660, 24, 5, 5), colour("yellow"), channel("Act14"), value(0), shape("ellipse") | |||
rslider bounds(655, 25, 45, 45), text("Level"), FontColour("black"), channel("level14"), range(0, 2, 1) | |||
rslider bounds(655, 75, 45, 45), text("Tune"), FontColour("black"), channel("tune14"), range(-2, 2, 0) | |||
rslider bounds(655,125, 45, 45), text("Decay"), FontColour("black"),channel("dur14"), range(0.25, 2, 1, 0.8) | |||
rslider bounds(655,175, 45, 45), text("Pan"), FontColour("black"),channel("pan14"), range(0, 1, 0.5) | |||
} | |||
groupbox bounds(700, 0, 50, 225), text("Md Cnga"),FontColour("black"), colour(152,152,152){ | |||
checkbox bounds(710, 24, 5, 5), colour("yellow"), channel("Act15"), value(0), shape("ellipse") | |||
rslider bounds(705, 25, 45, 45), text("Level"), FontColour("black"), channel("level15"), range(0, 2, 1) | |||
rslider bounds(705, 75, 45, 45), text("Tune"), FontColour("black"), channel("tune15"), range(-2, 2, 0) | |||
rslider bounds(705,125, 45, 45), text("Decay"), FontColour("black"),channel("dur15"), range(0.25, 2, 1, 0.8) | |||
rslider bounds(705,175, 45, 45), text("Pan"), FontColour("black"),channel("pan15"), range(0, 1, 0.5) | |||
} | |||
groupbox bounds(750, 0, 50, 225), text("Lo Cnga"),FontColour("black"), colour(142,142,142){ | |||
checkbox bounds(760, 24, 5, 5), colour("yellow"), channel("Act16"), value(0), shape("ellipse") | |||
rslider bounds(755, 25, 45, 45), text("Level"), FontColour("black"), channel("level16"), range(0, 2, 1) | |||
rslider bounds(755, 75, 45, 45), text("Tune"), FontColour("black"), channel("tune16"), range(-2, 2, 0) | |||
rslider bounds(755,125, 45, 45), text("Decay"), FontColour("black"),channel("dur16"), range(0.25, 2, 1, 0.8) | |||
rslider bounds(755,175, 45, 45), text("Pan"), FontColour("black"),channel("pan16"), range(0, 1, 0.5) | |||
} | |||
keyboard pos(0, 225), size(800, 80) | |||
button bounds( 10,315, 80, 25), text("Run","Stop"), channel("OnOff"), value(0) | |||
combobox bounds( 10,345, 80, 15), channel("sound"), value(1), text("Bass Drum","Snare","Open HH","Cl. HH","Hi Tom","Mid Tom","Lo Tom","Cymbal","Rimshot","Claves","Cowbell","Clap","Maraca","Hi Conga","Mid Conga","Lo Conga") | |||
button bounds(462,315, 80, 20), text("Clear","Clear"), channel("clear"), value(0) | |||
button bounds(462,338, 38, 20), text("Save","Save"), channel("save"), value(0) | |||
button bounds(502,338, 38, 20), text("Load","Load"), channel("load"), value(0) | |||
label bounds(544,328, 48, 10), text("PATTERN"), colour("black"), FontColour("black") | |||
combobox bounds(544,338, 48, 20), channel("pattern"), value(1), text("1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16") | |||
rslider bounds(593,310, 60, 60), text("Accent"), FontColour("black"), channel("AccLev"), range(0, 1, 0.4) | |||
rslider bounds(643,310, 60, 60), text("Tempo"), FontColour("black"), channel("tempo"), range(10, 500, 70, 1, 1) | |||
rslider bounds(693,310, 60, 60), text("Swing"), FontColour("black"), channel("swing"), range(0, 0.5, 0) | |||
rslider bounds(743,310, 60, 60), text("Level"), FontColour("black"), channel("level"), range(0, 2, 1) | |||
label bounds(143,312, 12, 10), text("1"), colour("black"), FontColour("black") | |||
label bounds(163,312, 12, 10), text("2"), colour("black"), FontColour("black") | |||
label bounds(183,312, 12, 10), text("3"), colour("black"), FontColour("black") | |||
label bounds(203,312, 12, 10), text("4"), colour("black"), FontColour("black") | |||
label bounds(223,312, 12, 10), text("5"), colour("black"), FontColour("black") | |||
label bounds(243,312, 12, 10), text("6"), colour("black"), FontColour("black") | |||
label bounds(263,312, 12, 10), text("7"), colour("black"), FontColour("black") | |||
label bounds(283,312, 12, 10), text("8"), colour("black"), FontColour("black") | |||
label bounds(303,312, 12, 10), text("9"), colour("black"), FontColour("black") | |||
label bounds(320,312, 12, 10), text("10"), colour("black"), FontColour("black") | |||
label bounds(340,312, 12, 10), text("11"), colour("black"), FontColour("black") | |||
label bounds(360,312, 12, 10), text("12"), colour("black"), FontColour("black") | |||
label bounds(380,312, 12, 10), text("13"), colour("black"), FontColour("black") | |||
label bounds(400,312, 12, 10), text("14"), colour("black"), FontColour("black") | |||
label bounds(420,312, 12, 10), text("15"), colour("black"), FontColour("black") | |||
label bounds(440,312, 12, 10), text("16"), colour("black"), FontColour("black") | |||
label bounds(122, 325, 30, 12), text("On"), colour("black"), FontColour("black") | |||
checkbox bounds(140, 325, 12, 12), channel("On1"), value(0) | |||
checkbox bounds(160, 325, 12, 12), channel("On2"), value(0) | |||
checkbox bounds(180, 325, 12, 12), channel("On3"), value(0) | |||
checkbox bounds(200, 325, 12, 12), channel("On4"), value(0) | |||
checkbox bounds(220, 325, 12, 12), channel("On5"), value(0) | |||
checkbox bounds(240, 325, 12, 12), channel("On6"), value(0) | |||
checkbox bounds(260, 325, 12, 12), channel("On7"), value(0) | |||
checkbox bounds(280, 325, 12, 12), channel("On8"), value(0) | |||
checkbox bounds(300, 325, 12, 12), channel("On9"), value(0) | |||
checkbox bounds(320, 325, 12, 12), channel("On10"), value(0) | |||
checkbox bounds(340, 325, 12, 12), channel("On11"), value(0) | |||
checkbox bounds(360, 325, 12, 12), channel("On12"), value(0) | |||
checkbox bounds(380, 325, 12, 12), channel("On13"), value(0) | |||
checkbox bounds(400, 325, 12, 12), channel("On14"), value(0) | |||
checkbox bounds(420, 325, 12, 12), channel("On15"), value(0) | |||
checkbox bounds(440, 325, 12, 12), channel("On16"), value(0) | |||
label bounds( 98, 345, 40, 12), text("Accent"), colour("black"), FontColour("black") | |||
checkbox bounds(140, 345, 12, 12), channel("Acc1"), value(0), colour("yellow") | |||
checkbox bounds(160, 345, 12, 12), channel("Acc2"), value(0), colour("yellow") | |||
checkbox bounds(180, 345, 12, 12), channel("Acc3"), value(0), colour("yellow") | |||
checkbox bounds(200, 345, 12, 12), channel("Acc4"), value(0), colour("yellow") | |||
checkbox bounds(220, 345, 12, 12), channel("Acc5"), value(0), colour("yellow") | |||
checkbox bounds(240, 345, 12, 12), channel("Acc6"), value(0), colour("yellow") | |||
checkbox bounds(260, 345, 12, 12), channel("Acc7"), value(0), colour("yellow") | |||
checkbox bounds(280, 345, 12, 12), channel("Acc8"), value(0), colour("yellow") | |||
checkbox bounds(300, 345, 12, 12), channel("Acc9"), value(0), colour("yellow") | |||
checkbox bounds(320, 345, 12, 12), channel("Acc10"), value(0), colour("yellow") | |||
checkbox bounds(340, 345, 12, 12), channel("Acc11"), value(0), colour("yellow") | |||
checkbox bounds(360, 345, 12, 12), channel("Acc12"), value(0), colour("yellow") | |||
checkbox bounds(380, 345, 12, 12), channel("Acc13"), value(0), colour("yellow") | |||
checkbox bounds(400, 345, 12, 12), channel("Acc14"), value(0), colour("yellow") | |||
checkbox bounds(420, 345, 12, 12), channel("Acc15"), value(0), colour("yellow") | |||
checkbox bounds(440, 345, 12, 12), channel("Acc16"), value(0), colour("yellow") | |||
</Cabbage> | |||
<CsoundSynthesizer> | |||
<CsOptions> | |||
-n -+rtmidi=null -M0 -dm0 | |||
</CsOptions> | |||
<CsInstruments> | |||
sr = 44100 ;SAMPLE RATE | |||
ksmps = 32 ;NUMBER OF AUDIO SAMPLES IN EACH CONTROL CYCLE | |||
nchnls = 2 ;NUMBER OF CHANNELS (2=STEREO) | |||
0dbfs = 1 | |||
massign 0,2 | |||
;Author: Iain McCurdy (2012) | |||
gisine ftgen 0,0,1024,10,1 ;A SINE WAVE | |||
gicos ftgen 0,0,65536,9,1,1,90 ;A COSINE WAVE | |||
gkoff init 0 | |||
; 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16 | |||
giOn1 ftgen 0,0,16,2, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0 ;BD | |||
giOn2 ftgen 0,0,16,2, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0 ;SN | |||
giOn3 ftgen 0,0,16,2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ;HHO | |||
giOn4 ftgen 0,0,16,2, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1 ;HHCl | |||
giOn5 ftgen 0,0,16,2, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;Hi Tom | |||
giOn6 ftgen 0,0,16,2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;Mid Tom | |||
giOn7 ftgen 0,0,16,2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 ;Lo Tom | |||
giOn8 ftgen 0,0,16,2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 ;Cym | |||
giOn9 ftgen 0,0,16,2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;Rimshot | |||
giOn10 ftgen 0,0,16,2, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0 ;Claves | |||
giOn11 ftgen 0,0,16,2, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1 ;Cowbell | |||
giOn12 ftgen 0,0,16,2, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 ;Clap | |||
giOn13 ftgen 0,0,16,2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ;Maraca | |||
giOn14 ftgen 0,0,16,2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0 ;Hi Conga | |||
giOn15 ftgen 0,0,16,2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0 ;Mid Conga | |||
giOn16 ftgen 0,0,16,2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1 ;Lo Conga | |||
giAcc1 ftgen 0,0,16,2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;BD | |||
giAcc2 ftgen 0,0,16,2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;SN | |||
giAcc3 ftgen 0,0,16,2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;HHO | |||
giAcc4 ftgen 0,0,16,2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ;HHCl | |||
giAcc5 ftgen 0,0,16,2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;Hi Tom | |||
giAcc6 ftgen 0,0,16,2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;Mid Tom | |||
giAcc7 ftgen 0,0,16,2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;Lo Tom | |||
giAcc8 ftgen 0,0,16,2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ;Cym | |||
giAcc9 ftgen 0,0,16,2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;Rimshot | |||
giAcc10 ftgen 0,0,16,2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;Claves | |||
giAcc11 ftgen 0,0,16,2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;Cowbell | |||
giAcc12 ftgen 0,0,16,2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;Clap | |||
giAcc13 ftgen 0,0,16,2, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ;Maraca | |||
giAcc14 ftgen 0,0,16,2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 ;Hi Conga | |||
giAcc15 ftgen 0,0,16,2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 ;Mid Conga | |||
giAcc16 ftgen 0,0,16,2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 ;Lo Conga | |||
giblank ftgen 0,0,16,2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;blank | |||
instr 1 ;READ IN WIDGETS, SCAN MIDI NOTES PLAYED AND RELAY TO DRUM SOUNDS | |||
;READ IN WIDGETS | |||
gklevel1 chnget "level1" | |||
gklevel2 chnget "level2" | |||
gklevel3 chnget "level3" | |||
gklevel4 chnget "level4" | |||
gklevel5 chnget "level5" | |||
gklevel6 chnget "level6" | |||
gklevel7 chnget "level7" | |||
gklevel8 chnget "level8" | |||
gklevel9 chnget "level9" | |||
gklevel10 chnget "level10" | |||
gklevel11 chnget "level11" | |||
gklevel12 chnget "level12" | |||
gklevel13 chnget "level13" | |||
gklevel14 chnget "level14" | |||
gklevel15 chnget "level15" | |||
gklevel16 chnget "level16" | |||
gktune1 chnget "tune1" | |||
gktune2 chnget "tune2" | |||
gktune3 chnget "tune3" | |||
gktune4 chnget "tune4" | |||
gktune5 chnget "tune5" | |||
gktune6 chnget "tune6" | |||
gktune7 chnget "tune7" | |||
gktune8 chnget "tune8" | |||
gktune9 chnget "tune9" | |||
gktune10 chnget "tune10" | |||
gktune11 chnget "tune11" | |||
gktune12 chnget "tune12" | |||
gktune13 chnget "tune13" | |||
gktune14 chnget "tune14" | |||
gktune15 chnget "tune15" | |||
gktune16 chnget "tune16" | |||
gkdur1 chnget "dur1" | |||
gkdur2 chnget "dur2" | |||
gkdur3 chnget "dur3" | |||
gkdur4 chnget "dur4" | |||
gkdur5 chnget "dur5" | |||
gkdur6 chnget "dur6" | |||
gkdur7 chnget "dur7" | |||
gkdur8 chnget "dur8" | |||
gkdur9 chnget "dur9" | |||
gkdur10 chnget "dur10" | |||
gkdur11 chnget "dur11" | |||
gkdur12 chnget "dur12" | |||
gkdur13 chnget "dur13" | |||
gkdur14 chnget "dur14" | |||
gkdur15 chnget "dur15" | |||
gkdur16 chnget "dur16" | |||
gkpan1 chnget "pan1" | |||
gkpan2 chnget "pan2" | |||
gkpan3 chnget "pan3" | |||
gkpan4 chnget "pan4" | |||
gkpan5 chnget "pan5" | |||
gkpan6 chnget "pan6" | |||
gkpan7 chnget "pan7" | |||
gkpan8 chnget "pan8" | |||
gkpan9 chnget "pan9" | |||
gkpan10 chnget "pan10" | |||
gkpan11 chnget "pan11" | |||
gkpan12 chnget "pan12" | |||
gkpan13 chnget "pan13" | |||
gkpan14 chnget "pan14" | |||
gkpan15 chnget "pan15" | |||
gkpan16 chnget "pan16" | |||
gkOnOff chnget "OnOff" | |||
gksound chnget "sound" | |||
gkOn1 chnget "On1" | |||
gkOn2 chnget "On2" | |||
gkOn3 chnget "On3" | |||
gkOn4 chnget "On4" | |||
gkOn5 chnget "On5" | |||
gkOn6 chnget "On6" | |||
gkOn7 chnget "On7" | |||
gkOn8 chnget "On8" | |||
gkOn9 chnget "On9" | |||
gkOn10 chnget "On10" | |||
gkOn11 chnget "On11" | |||
gkOn12 chnget "On12" | |||
gkOn13 chnget "On13" | |||
gkOn14 chnget "On14" | |||
gkOn15 chnget "On15" | |||
gkOn16 chnget "On16" | |||
gkAcc1 chnget "Acc1" | |||
gkAcc2 chnget "Acc2" | |||
gkAcc3 chnget "Acc3" | |||
gkAcc4 chnget "Acc4" | |||
gkAcc5 chnget "Acc5" | |||
gkAcc6 chnget "Acc6" | |||
gkAcc7 chnget "Acc7" | |||
gkAcc8 chnget "Acc8" | |||
gkAcc9 chnget "Acc9" | |||
gkAcc10 chnget "Acc10" | |||
gkAcc11 chnget "Acc11" | |||
gkAcc12 chnget "Acc12" | |||
gkAcc13 chnget "Acc13" | |||
gkAcc14 chnget "Acc14" | |||
gkAcc15 chnget "Acc15" | |||
gkAcc16 chnget "Acc16" | |||
gkclear chnget "clear" | |||
gksave chnget "save" | |||
gkload chnget "load" | |||
gkpattern chnget "pattern" | |||
gkAccLev chnget "AccLev" | |||
gktempo chnget "tempo" | |||
gkswing chnget "swing" | |||
gklevel chnget "level" | |||
;START/STOP SEQUENCER | |||
ktrig changed gkOnOff ;if Run/Stop button is changed... | |||
if ktrig==1 then ; | |||
if gkOnOff==1 then ;...if Run/Stop has been changed to 'Run'... | |||
event "i",3,0,-1 ;...start instr 3 playing a held note | |||
else ;otherwise... | |||
event "i",-3,0,0 ;...stop instr 3 playing | |||
endif | |||
endif | |||
;CLEAR SEQUENCES FOR ALL DRUM SOUNDS | |||
ktrig changed gkclear | |||
if ktrig==1 then | |||
tablecopy giOn1, giblank ;copy blank table over existing sequence for voice 1 | |||
tablecopy giOn2, giblank ;repeat for every other voice | |||
tablecopy giOn3, giblank | |||
tablecopy giOn4, giblank | |||
tablecopy giOn5, giblank | |||
tablecopy giOn6, giblank | |||
tablecopy giOn7, giblank | |||
tablecopy giOn8, giblank | |||
tablecopy giOn9, giblank | |||
tablecopy giOn10, giblank | |||
tablecopy giOn11, giblank | |||
tablecopy giOn12, giblank | |||
tablecopy giOn13, giblank | |||
tablecopy giOn14, giblank | |||
tablecopy giOn15, giblank | |||
tablecopy giOn16, giblank | |||
tablecopy giAcc1, giblank | |||
tablecopy giAcc2, giblank | |||
tablecopy giAcc3, giblank | |||
tablecopy giAcc4, giblank | |||
tablecopy giAcc5, giblank | |||
tablecopy giAcc6, giblank | |||
tablecopy giAcc7, giblank | |||
tablecopy giAcc8, giblank | |||
tablecopy giAcc9, giblank | |||
tablecopy giAcc10, giblank | |||
tablecopy giAcc11, giblank | |||
tablecopy giAcc12, giblank | |||
tablecopy giAcc13, giblank | |||
tablecopy giAcc14, giblank | |||
tablecopy giAcc15, giblank | |||
tablecopy giAcc16, giblank | |||
endif | |||
;STORE SEQUENCE TABLES | |||
ktrig changed gksave ;if save button is toggled... | |||
if ktrig==1 then | |||
reinit SAVE_TABLES ;begin a reinitialisation pass from label (ftsave operates only at i-time) | |||
endif | |||
SAVE_TABLES: | |||
SFileName sprintf "TR-808_pattern.%d.txt", i(gkpattern) ;create the file name (string variable) that will be used to name the text file that will contain the pattern data | |||
ftsave SFileName, 1, giOn1, giOn2, giOn3, giOn4, giOn5, giOn6, giOn7, giOn8, giOn9, giOn10, giOn11, giOn12, giOn13, giOn14, giOn15, giOn16, giAcc1, giAcc2, giAcc3, giAcc4, giAcc5, giAcc6, giAcc7, giAcc8, giAcc9, giAcc10, giAcc11, giAcc12, giAcc13, giAcc14, giAcc15, giAcc16 ;save all tables (on information and accents) to a text file in the pwd | |||
rireturn | |||
;LOAD SEQUENCE TABLES | |||
ktrig changed gkload ;if load button is toggled... | |||
if ktrig==1 then | |||
reinit LOAD_TABLES ;begin a reinitialisation pass from label (ftload operates only at i-time) | |||
endif | |||
LOAD_TABLES: | |||
SFileName sprintf "TR-808_pattern.%d.txt", i(gkpattern) ;create the file name (string variable) that will be the name of the file from which data will be retrieved | |||
ftload SFileName, 1, giOn1, giOn2, giOn3, giOn4, giOn5, giOn6, giOn7, giOn8, giOn9, giOn10, giOn11, giOn12, giOn13, giOn14, giOn15, giOn16, giAcc1, giAcc2, giAcc3, giAcc4, giAcc5, giAcc6, giAcc7, giAcc8, giAcc9, giAcc10, giAcc11, giAcc12, giAcc13, giAcc14, giAcc15, giAcc16 ;load all tables (on information and accents) to a text file in the pwd | |||
rireturn | |||
;UPDATE SEQUENCE DISPLAY | |||
ktrig changed gksound,gkclear,gkload | |||
if ktrig==1 then | |||
#define UPDATE_SEQUENCE(N) | |||
# | |||
kval tablekt $N-1,giOn1+gksound-1 | |||
chnset kval,"On$N" | |||
kval tablekt $N-1,giAcc1+gksound-1 | |||
chnset kval,"Acc$N" | |||
# | |||
$UPDATE_SEQUENCE(1) | |||
$UPDATE_SEQUENCE(2) | |||
$UPDATE_SEQUENCE(3) | |||
$UPDATE_SEQUENCE(4) | |||
$UPDATE_SEQUENCE(5) | |||
$UPDATE_SEQUENCE(6) | |||
$UPDATE_SEQUENCE(7) | |||
$UPDATE_SEQUENCE(8) | |||
$UPDATE_SEQUENCE(9) | |||
$UPDATE_SEQUENCE(10) | |||
$UPDATE_SEQUENCE(11) | |||
$UPDATE_SEQUENCE(12) | |||
$UPDATE_SEQUENCE(13) | |||
$UPDATE_SEQUENCE(14) | |||
$UPDATE_SEQUENCE(15) | |||
$UPDATE_SEQUENCE(16) | |||
endif | |||
;UPDATE TABLE IF SEQUENCE BUTTON CHANGED | |||
#define UPDATE_TABLE(N) | |||
# | |||
ktrig changed gkOn$N | |||
if ktrig==1 then | |||
tablewkt gkOn$N,$N-1,giOn1+gksound-1 | |||
endif | |||
ktrig changed gkAcc$N | |||
if ktrig==1 then | |||
tablewkt gkAcc$N,$N-1,giAcc1+gksound-1 | |||
endif | |||
# | |||
$UPDATE_TABLE(1) | |||
$UPDATE_TABLE(2) | |||
$UPDATE_TABLE(3) | |||
$UPDATE_TABLE(4) | |||
$UPDATE_TABLE(5) | |||
$UPDATE_TABLE(6) | |||
$UPDATE_TABLE(7) | |||
$UPDATE_TABLE(8) | |||
$UPDATE_TABLE(9) | |||
$UPDATE_TABLE(10) | |||
$UPDATE_TABLE(11) | |||
$UPDATE_TABLE(12) | |||
$UPDATE_TABLE(13) | |||
$UPDATE_TABLE(14) | |||
$UPDATE_TABLE(15) | |||
$UPDATE_TABLE(16) | |||
endin | |||
instr 2 ;READ MIDI AND TRIGGER NOTES | |||
inum notnum ;READ IN MIDI NOTE NUMBER | |||
idb veloc -30,0 ;READ IN MIDI NOTE VELOCITY (WILL BE USED AS A DECIBEL VALUE) | |||
iinstr wrap inum,0,16 ;MAP MIDI NOTE NUMBERS (RANGE: 0 - 127) TO DRUM SOUND NUMBER (0 - 15) | |||
event_i "i",101+iinstr,0,0.001,ampdbfs(idb) ;CALL THE RELEVANT INSTRUMENT AND SEND AMPLITUDE VALUE AS p4 | |||
endin | |||
instr 3 ;PLAY SEQUENCE | |||
gindx init 0 | |||
ktick metro (gktempo*4)/60 | |||
;SWING | |||
kSwingBeat init 0 | |||
kSwingTime = (kSwingBeat==1?(60*gkswing)/(gktempo*4):0) | |||
if ktick==1 then | |||
kSwingBeat = abs(kSwingBeat-1) ;FLIP BETWEEN ZERO AND 1 | |||
endif | |||
schedkwhen ktick, 0, 0, 4, kSwingTime, 0.001 | |||
endin | |||
instr 4 ;TEST FOR NOTE ON SEQUENCE STEP | |||
#define VOICE(N) | |||
# | |||
iOnOff$N table gindx, giOn$N | |||
if iOnOff$N==1 then | |||
iAcc table gindx,giAcc$N | |||
event_i "i", 100+$N, 0, 0.001, 0.4 + (iAcc*i(gkAccLev)) | |||
endif | |||
# | |||
$VOICE(1) | |||
$VOICE(2) | |||
$VOICE(3) | |||
$VOICE(4) | |||
$VOICE(5) | |||
$VOICE(6) | |||
$VOICE(7) | |||
$VOICE(8) | |||
$VOICE(9) | |||
$VOICE(10) | |||
$VOICE(11) | |||
$VOICE(12) | |||
$VOICE(13) | |||
$VOICE(14) | |||
$VOICE(15) | |||
$VOICE(16) | |||
gindx wrap gindx+1, 0, 16 | |||
turnoff | |||
endin | |||
instr 101 ;BASS DRUM | |||
xtratim 0.1 | |||
krelease release ;SENSE RELEASE OF THIS NOTE ('1' WHEN RELEASED, OTHERWISE ZERO) | |||
chnset 1-krelease,"Act1" ;TURN ON ACTIVE LIGHT WHEN NOTE STARTS, TURN IT OFF WHEN NOTE ENDS | |||
p3 = 2*i(gkdur1) ;NOTE DURATION. SCALED USING GUI 'Decay' KNOB | |||
;SUSTAIN AND BODY OF THE SOUND | |||
kmul transeg 0.2,p3*0.5,-15,0.01, p3*0.5,0,0 ;PARTIAL STRENGTHS MULTIPLIER USED BY GBUZZ. DECAYS FROM A SOUND WITH OVERTONES TO A SINE TONE. | |||
kbend transeg 0.5,1.2,-4, 0,1,0,0 ;SLIGHT PITCH BEND AT THE START OF THE NOTE | |||
asig gbuzz 0.5,50*octave(gktune1)*semitone(kbend),20,1,kmul,gicos ;GBUZZ TONE | |||
aenv transeg 1,p3-0.004,-6,0 ;AMPLITUDE ENVELOPE FOR SUSTAIN OF THE SOUND | |||
aatt linseg 0,0.004,1 ;SOFT ATTACK | |||
asig = asig*aenv*aatt | |||
;HARD, SHORT ATTACK OF THE SOUND | |||
aenv linseg 1,0.07,0 ;AMPLITUDE ENVELOPE (FAST DECAY) | |||
acps expsega 400,0.07,0.001,1,0.001 ;FREQUENCY OF THE ATTACK SOUND. QUICKLY GLISSES FROM 400 Hz TO SUB-AUDIO | |||
aimp oscili aenv,acps*octave(gktune1*0.25),gisine ;CREATE ATTACK SOUND | |||
amix = ((asig*0.5)+(aimp*0.35))*gklevel1*p4*gklevel ;MIX SUSTAIN AND ATTACK SOUND ELEMENTS AND SCALE USING GUI 'Level' KNOB | |||
aL,aR pan2 amix,gkpan1 ;PAN THE MONOPHONIC SOUND | |||
outs aL,aR ;SEND AUDIO TO OUTPUTS | |||
endin | |||
instr 102 ;SNARE DRUM | |||
xtratim 0.1 | |||
krelease release ;SENSE RELEASE OF THIS NOTE ('1' WHEN RELEASED, OTHERWISE ZERO) | |||
chnset 1-krelease,"Act2" ;TURN ON ACTIVE LIGHT WHEN NOTE STARTS, TURN IT OFF WHEN NOTE ENDS | |||
;SOUND CONSISTS OF TWO SINE TONES, AN OCTAVE APART AND A NOISE SIGNAL | |||
ifrq = 342 ;FREQUENCY OF THE TONES | |||
iNseDur = 0.3 * i(gkdur2) ;DURATION OF THE NOISE COMPONENT | |||
iPchDur = 0.1 * i(gkdur2) ;DURATION OF THE SINE TONES COMPONENT | |||
p3 = iNseDur ;p3 DURATION TAKEN FROM NOISE COMPONENT DURATION (ALWATS THE LONGEST COMPONENT) | |||
;SINE TONES COMPONENT | |||
aenv1 expseg 1,iPchDur,0.0001,p3-iPchDur,0.0001 ;AMPLITUDE ENVELOPE | |||
apitch1 oscili 1,ifrq*octave(gktune2),gisine ;SINE TONE 1 | |||
apitch2 oscili 0.25,ifrq*0.5*octave(gktune2),gisine ;SINE TONE 2 (AN OCTAVE LOWER) | |||
apitch = (apitch1+apitch2)*0.75 ;MIX THE TWO SINE TONES | |||
;NOISE COMPONENT | |||
aenv2 expon 1,p3,0.0005 ;AMPLITUDE ENVELOPE | |||
anoise noise 0.75,0 ;CREATE SOME NOISE | |||
anoise butbp anoise,10000*octave(gktune2),10000 ;BANDPASS FILTER THE NOISE SIGNAL | |||
anoise buthp anoise,1000 ;HIGHPASS FILTER THE NOISE SIGNAL | |||
kcf expseg 5000,0.1,3000,p3-0.2,3000 ;CUTOFF FREQUENCY FOR A LOWPASS FILTER | |||
anoise butlp anoise,kcf ;LOWPASS FILTER THE NOISE SIGNAL | |||
amix = ((apitch*aenv1)+(anoise*aenv2))*gklevel2*p4*gklevel ;MIX AUDIO SIGNALS AND SCALE ACCORDING TO GUI 'Level' CONTROL | |||
aL,aR pan2 amix,i(gkpan2) ;PAN THE MONOPHONIC AUDIO SIGNAL | |||
outs aL,aR ;SEND AUDIO TO OUTPUTS | |||
endin | |||
instr 103 ;OPEN HIGH HAT | |||
xtratim 0.1 | |||
kFrq1 = 296*octave(gktune3) ;FREQUENCIES OF THE 6 OSCILLATORS | |||
kFrq2 = 285*octave(gktune3) | |||
kFrq3 = 365*octave(gktune3) | |||
kFrq4 = 348*octave(gktune3) | |||
kFrq5 = 420*octave(gktune3) | |||
kFrq6 = 835*octave(gktune3) | |||
p3 = 0.5*i(gkdur3) ;DURATION OF THE NOTE | |||
;SOUND CONSISTS OF 6 PULSE OSCILLATORS MIXED WITH A NOISE COMPONENT | |||
;PITCHED ELEMENT | |||
aenv linseg 1,p3-0.05,0.1,0.05,0 ;AMPLITUDE ENVELOPE FOR THE PULSE OSCILLATORS | |||
ipw = 0.25 ;PULSE WIDTH | |||
a1 vco2 0.5,kFrq1,2,ipw ;PULSE OSCILLATORS... | |||
a2 vco2 0.5,kFrq2,2,ipw | |||
a3 vco2 0.5,kFrq3,2,ipw | |||
a4 vco2 0.5,kFrq4,2,ipw | |||
a5 vco2 0.5,kFrq5,2,ipw | |||
a6 vco2 0.5,kFrq6,2,ipw | |||
amix sum a1,a2,a3,a4,a5,a6 ;MIX THE PULSE OSCILLATORS | |||
amix reson amix,5000*octave(gktune3),5000,1 ;BANDPASS FILTER THE MIXTURE | |||
amix buthp amix,5000 ;HIGHPASS FILTER THE SOUND... | |||
amix buthp amix,5000 ;...AND AGAIN | |||
amix = amix*aenv ;APPLY THE AMPLITUDE ENVELOPE | |||
;NOISE ELEMENT | |||
anoise noise 0.8,0 ;GENERATE SOME WHITE NOISE | |||
aenv linseg 1,p3-0.05,0.1,0.05,0 ;CREATE AN AMPLITUDE ENVELOPE | |||
kcf expseg 20000,0.7,9000,p3-0.1,9000 ;CREATE A CUTOFF FREQ. ENVELOPE | |||
anoise butlp anoise,kcf ;LOWPASS FILTER THE NOISE SIGNAL | |||
anoise buthp anoise,8000 ;HIGHPASS FILTER THE NOISE SIGNAL | |||
anoise = anoise*aenv ;APPLY THE AMPLITUDE ENVELOPE | |||
;MIX PULSE OSCILLATOR AND NOISE COMPONENTS | |||
amix = (amix+anoise)*gklevel3*p4*0.55*gklevel | |||
aL,aR pan2 amix,gkpan3 ;PAN MONOPHONIC SIGNAL | |||
outs aL,aR ;SEND TO OUTPUTS | |||
;kactive active p1+1 ;CHECK NUMBER OF ACTIVE INSTANCES OF CLOSED HIGH HAT INSTRUMENT | |||
;if kactive>0 then ;IF HIGH-HAT CLOSED IS ACTIVE... | |||
; turnoff ;TURN OFF THIS INSTRUMENT | |||
;endif | |||
krelease release ;SENSE RELEASE OF THIS NOTE ('1' WHEN RELEASED, OTHERWISE ZERO) | |||
chnset 1-krelease,"Act3" ;TURN ON ACTIVE LIGHT WHEN NOTE STARTS, TURN IT OFF WHEN NOTE ENDS | |||
endin | |||
instr 104 ;CLOSED HIGH HAT | |||
xtratim 0.1 | |||
krelease release ;SENSE RELEASE OF THIS NOTE ('1' WHEN RELEASED, OTHERWISE ZERO) | |||
chnset 1-krelease,"Act4" ;TURN ON ACTIVE LIGHT WHEN NOTE STARTS, TURN IT OFF WHEN NOTE ENDS | |||
kFrq1 = 296*octave(gktune4) ;FREQUENCIES OF THE 6 OSCILLATORS | |||
kFrq2 = 285*octave(gktune4) | |||
kFrq3 = 365*octave(gktune4) | |||
kFrq4 = 348*octave(gktune4) | |||
kFrq5 = 420*octave(gktune4) | |||
kFrq6 = 835*octave(gktune4) | |||
idur = 0.088*i(gkdur4) ;DURATION OF THE NOTE | |||
p3 limit idur,0.1,10 ;LIMIT THE MINIMUM DURATION OF THE NOTE (VERY SHORT NOTES CAN RESULT IN THE INDICATOR LIGHT ON-OFF NOTE BEING TO0 SHORT) | |||
iactive active p1-1 ;SENSE ACTIVITY OF PREVIOUS INSTRUMENT (OPEN HIGH HAT) | |||
if iactive>0 then ;IF 'OPEN HIGH HAT' IS ACTIVE... | |||
turnoff2 p1-1,0,0 ;TURN IT OFF (CLOSED HIGH HAT TAKES PRESIDENCE) | |||
chnset gkoff,"Act3" ;TURN OFF ACTIVE LIGHT FOR OPEN HIGH HAT | |||
endif | |||
;PITCHED ELEMENT | |||
aenv expsega 1,idur,0.001,1,0.001 ;AMPLITUDE ENVELOPE FOR THE PULSE OSCILLATORS | |||
ipw = 0.25 ;PULSE WIDTH | |||
a1 vco2 0.5,kFrq1,2,ipw ;PULSE OSCILLATORS... | |||
a2 vco2 0.5,kFrq2,2,ipw | |||
a3 vco2 0.5,kFrq3,2,ipw | |||
a4 vco2 0.5,kFrq4,2,ipw | |||
a5 vco2 0.5,kFrq5,2,ipw | |||
a6 vco2 0.5,kFrq6,2,ipw | |||
amix sum a1,a2,a3,a4,a5,a6 ;MIX THE PULSE OSCILLATORS | |||
amix reson amix,5000*octave(gktune4),5000,1 ;BANDPASS FILTER THE MIXTURE | |||
amix buthp amix,5000 ;HIGHPASS FILTER THE SOUND... | |||
amix buthp amix,5000 ;...AND AGAIN | |||
amix = amix*aenv ;APPLY THE AMPLITUDE ENVELOPE | |||
;NOISE ELEMENT | |||
anoise noise 0.8,0 ;GENERATE SOME WHITE NOISE | |||
aenv expsega 1,idur,0.001,1,0.001 ;CREATE AN AMPLITUDE ENVELOPE | |||
kcf expseg 20000,0.7,9000,idur-0.1,9000 ;CREATE A CUTOFF FREQ. ENVELOPE | |||
anoise butlp anoise,kcf ;LOWPASS FILTER THE NOISE SIGNAL | |||
anoise buthp anoise,8000 ;HIGHPASS FILTER THE NOISE SIGNAL | |||
anoise = anoise*aenv ;APPLY THE AMPLITUDE ENVELOPE | |||
;MIX PULSE OSCILLATOR AND NOISE COMPONENTS | |||
amix = (amix+anoise)*gklevel4*p4*0.55*gklevel | |||
aL,aR pan2 amix,gkpan4 ;PAN MONOPHONIC SIGNAL | |||
outs aL,aR ;SEND TO OUTPUTS | |||
endin | |||
instr 105 ;HIGH TOM | |||
xtratim 0.1 | |||
krelease release ;SENSE RELEASE OF THIS NOTE ('1' WHEN RELEASED, OTHERWISE ZERO) | |||
chnset 1-krelease,"Act5" ;TURN ON ACTIVE LIGHT WHEN NOTE STARTS, TURN IT OFF WHEN NOTE ENDS | |||
ifrq = 200 * octave(i(gktune5)) ;FREQUENCY | |||
p3 = 0.5 * i(gkdur5) ;DURATION OF THIS NOTE | |||
;SINE TONE SIGNAL | |||
aAmpEnv transeg 1,p3,-10,0.001 ;AMPLITUDE ENVELOPE FOR SINE TONE SIGNAL | |||
afmod expsega 5,0.125/ifrq,1,1,1 ;FREQUENCY MODULATION ENVELOPE. GIVES THE TONE MORE OF AN ATTACK. | |||
asig oscili -aAmpEnv*0.6,ifrq*afmod,gisine ;SINE TONE SIGNAL | |||
;NOISE SIGNAL | |||
aEnvNse transeg 1,p3,-6,0.001 ;AMPLITUDE ENVELOPE FOR NOISE SIGNAL | |||
anoise dust2 0.4, 8000 ;GENERATE NOISE SIGNAL | |||
anoise reson anoise,400*octave(i(gktune5)),800,1 ;BANDPASS FILTER THE NOISE SIGNAL | |||
anoise buthp anoise,100*octave(i(gktune5)) ;HIGHPASS FILTER THE NOSIE SIGNAL | |||
anoise butlp anoise,1000*octave(i(gktune5)) ;LOWPASS FILTER THE NOISE SIGNAL | |||
anoise = anoise * aEnvNse ;SCALE NOISE SIGNAL WITH AMPLITUDE ENVELOPE | |||
;MIX THE TWO SOUND COMPONENTS | |||
amix = (asig + anoise)*gklevel5*p4*gklevel | |||
aL,aR pan2 amix,gkpan5 ;PAN MONOPHONIC SIGNAL | |||
outs aL,aR ;SEND AUDIO TO OUTPUTS | |||
endin | |||
instr 106 ;MID TOM | |||
xtratim 0.1 | |||
krelease release ;SENSE RELEASE OF THIS NOTE ('1' WHEN RELEASED, OTHERWISE ZERO) | |||
chnset 1-krelease,"Act6" ;TURN ON ACTIVE LIGHT WHEN NOTE STARTS, TURN IT OFF WHEN NOTE ENDS | |||
ifrq = 133*octave(i(gktune6)) ;FREQUENCY | |||
p3 = 0.6 * i(gkdur6) ;DURATION OF THIS NOTE | |||
;SINE TONE SIGNAL | |||
aAmpEnv transeg 1,p3,-10,0.001 ;AMPLITUDE ENVELOPE FOR SINE TONE SIGNAL | |||
afmod expsega 5,0.125/ifrq,1,1,1 ;FREQUENCY MODULATION ENVELOPE. GIVES THE TONE MORE OF AN ATTACK. | |||
asig oscili -aAmpEnv*0.6,ifrq*afmod,gisine ;SINE TONE SIGNAL | |||
;NOISE SIGNAL | |||
aEnvNse transeg 1,p3,-6,0.001 ;AMPLITUDE ENVELOPE FOR NOISE SIGNAL | |||
anoise dust2 0.4, 8000 ;GENERATE NOISE SIGNAL | |||
anoise reson anoise, 400*octave(i(gktune6)),800,1 ;BANDPASS FILTER THE NOISE SIGNAL | |||
anoise buthp anoise,100*octave(i(gktune6)) ;HIGHPASS FILTER THE NOSIE SIGNAL | |||
anoise butlp anoise,600*octave(i(gktune6)) ;LOWPASS FILTER THE NOISE SIGNAL | |||
anoise = anoise * aEnvNse ;SCALE NOISE SIGNAL WITH AMPLITUDE ENVELOPE | |||
;MIX THE TWO SOUND COMPONENTS | |||
amix = (asig + anoise)*gklevel6*p4*gklevel | |||
aL,aR pan2 amix,i(gkpan6) ;PAN MONOPHONIC SIGNAL | |||
outs aL,aR ;SEND AUDIO TO OUTPUTS | |||
endin | |||
instr 107 ;LOW TOM | |||
xtratim 0.1 | |||
krelease release ;SENSE RELEASE OF THIS NOTE ('1' WHEN RELEASED, OTHERWISE ZERO) | |||
chnset 1-krelease,"Act7" ;TURN ON ACTIVE LIGHT WHEN NOTE STARTS, TURN IT OFF WHEN NOTE ENDS | |||
ifrq = 90 * octave(i(gktune7)) ;FREQUENCY | |||
p3 = 0.7*i(gkdur7) ;DURATION OF THIS NOTE | |||
;SINE TONE SIGNAL | |||
aAmpEnv transeg 1,p3,-10,0.001 ;AMPLITUDE ENVELOPE FOR SINE TONE SIGNAL | |||
afmod expsega 5,0.125/ifrq,1,1,1 ;FREQUENCY MODULATION ENVELOPE. GIVES THE TONE MORE OF AN ATTACK. | |||
asig oscili -aAmpEnv*0.6,ifrq*afmod,gisine ;SINE TONE SIGNAL | |||
;NOISE SIGNAL | |||
aEnvNse transeg 1,p3,-6,0.001 ;AMPLITUDE ENVELOPE FOR NOISE SIGNAL | |||
anoise dust2 0.4, 8000 ;GENERATE NOISE SIGNAL | |||
anoise reson anoise,40*octave(gktune7),800,1 ;BANDPASS FILTER THE NOISE SIGNAL | |||
anoise buthp anoise,100*octave(i(gktune7)) ;HIGHPASS FILTER THE NOSIE SIGNAL | |||
anoise butlp anoise,600*octave(i(gktune7)) ;LOWPASS FILTER THE NOISE SIGNAL | |||
anoise = anoise * aEnvNse ;SCALE NOISE SIGNAL WITH AMPLITUDE ENVELOPE | |||
;MIX THE TWO SOUND COMPONENTS | |||
amix = (asig + anoise)*gklevel7*p4*gklevel | |||
aL,aR pan2 amix,i(gkpan7) ;PAN MONOPHONIC SIGNAL | |||
outs aL,aR ;SEND AUDIO TO OUTPUTS | |||
endin | |||
instr 108 ;CYMBAL | |||
xtratim 0.1 | |||
krelease release ;SENSE RELEASE OF THIS NOTE ('1' WHEN RELEASED, OTHERWISE ZERO) | |||
chnset 1-krelease,"Act8" ;TURN ON ACTIVE LIGHT WHEN NOTE STARTS, TURN IT OFF WHEN NOTE ENDS | |||
kFrq1 = 296*octave(gktune8) ;FREQUENCIES OF THE 6 OSCILLATORS | |||
kFrq2 = 285*octave(gktune8) | |||
kFrq3 = 365*octave(gktune8) | |||
kFrq4 = 348*octave(gktune8) | |||
kFrq5 = 420*octave(gktune8) | |||
kFrq6 = 835*octave(gktune8) | |||
p3 = 2*i(gkdur8) ;DURATION OF THE NOTE | |||
;SOUND CONSISTS OF 6 PULSE OSCILLATORS MIXED WITH A NOISE COMPONENT | |||
;PITCHED ELEMENT | |||
aenv expon 1,p3,0.0001 ;AMPLITUDE ENVELOPE FOR THE PULSE OSCILLATORS | |||
ipw = 0.25 ;PULSE WIDTH | |||
a1 vco2 0.5,kFrq1,2,ipw ;PULSE OSCILLATORS... | |||
a2 vco2 0.5,kFrq2,2,ipw | |||
a3 vco2 0.5,kFrq3,2,ipw | |||
a4 vco2 0.5,kFrq4,2,ipw | |||
a5 vco2 0.5,kFrq5,2,ipw | |||
a6 vco2 0.5,kFrq6,2,ipw | |||
amix sum a1,a2,a3,a4,a5,a6 ;MIX THE PULSE OSCILLATORS | |||
amix reson amix,5000 *octave(gktune8),5000,1 ;BANDPASS FILTER THE MIXTURE | |||
amix buthp amix,10000 ;HIGHPASS FILTER THE SOUND | |||
amix butlp amix,12000 ;LOWPASS FILTER THE SOUND... | |||
amix butlp amix,12000 ;AND AGAIN... | |||
amix = amix*aenv ;APPLY THE AMPLITUDE ENVELOPE | |||
;NOISE ELEMENT | |||
anoise noise 0.8,0 ;GENERATE SOME WHITE NOISE | |||
aenv expsega 1,0.3,0.07,p3-0.1,0.00001 ;CREATE AN AMPLITUDE ENVELOPE | |||
kcf expseg 14000,0.7,7000,p3-0.1,5000 ;CREATE A CUTOFF FREQ. ENVELOPE | |||
anoise butlp anoise,kcf ;LOWPASS FILTER THE NOISE SIGNAL | |||
anoise buthp anoise,8000 ;HIGHPASS FILTER THE NOISE SIGNAL | |||
anoise = anoise*aenv ;APPLY THE AMPLITUDE ENVELOPE | |||
;MIX PULSE OSCILLATOR AND NOISE COMPONENTS | |||
amix = (amix+anoise)*gklevel8*p4*0.85*gklevel | |||
aL,aR pan2 amix,i(gkpan8) ;PAN MONOPHONIC SIGNAL | |||
outs aL,aR ;SEND TO OUTPUTS | |||
endin | |||
instr 109 ;RIM SHOT | |||
xtratim 0.1 | |||
iTR808RimShot ftgenonce 0,0,1024,10, 0.971,0.269,0.041,0.054,0.011,0.013,0.08,0.0065,0.005,0.004,0.003,0.003,0.002,0.002,0.002,0.002,0.002,0.001,0.001,0.001,0.001,0.001,0.002,0.001,0.001 ;WAVEFORM FOR TR808 RIMSHOT | |||
krelease release ;SENSE RELEASE OF THIS NOTE ('1' WHEN RELEASED, OTHERWISE ZERO) | |||
chnset 1-krelease,"Act9" ;TURN ON ACTIVE LIGHT WHEN NOTE STARTS, TURN IT OFF WHEN NOTE ENDS | |||
idur = 0.027*i(gkdur9) ;NOTE DURATION | |||
p3 limit idur,0.1,10 ;LIMIT THE MINIMUM DURATION OF THE NOTE (VERY SHORT NOTES CAN RESULT IN THE INDICATOR LIGHT ON-OFF NOTE BEING TO0 SHORT) | |||
;RING | |||
aenv1 expsega 1,idur,0.001,1,0.001 ;AMPLITUDE ENVELOPE FOR SUSTAIN ELEMENT OF SOUND | |||
ifrq1 = 1700*octave(i(gktune9)) ;FREQUENCY OF SUSTAIN ELEMENT OF SOUND | |||
aring oscili 1,ifrq1,iTR808RimShot,0 ;CREATE SUSTAIN ELEMENT OF SOUND | |||
aring butbp aring,ifrq1,ifrq1*8 | |||
aring = aring*(aenv1-0.001)*0.5 ;APPLY AMPLITUDE ENVELOPE | |||
;NOISE | |||
anoise noise 1,0 ;CREATE A NOISE SIGNAL | |||
aenv2 expsega 1, 0.002, 0.8, 0.005, 0.5, idur-0.002-0.005, 0.0001, 1, 0.0001 ;CREATE AMPLITUDE ENVELOPE | |||
anoise buthp anoise,800 ;HIGHPASS FILTER THE NOISE SOUND | |||
kcf expseg 4000,p3,20 ;CUTOFF FREQUENCY FUNCTION FOR LOWPASS FILTER | |||
anoise butlp anoise,kcf ;LOWPASS FILTER THE SOUND | |||
anoise = anoise*(aenv2-0.001) ;APPLY ENVELOPE TO NOISE SIGNAL | |||
;MIX | |||
amix = (aring+anoise)*gklevel9*p4*0.8*gklevel | |||
aL,aR pan2 amix,gkpan9 ;PAN MONOPHONIC SIGNAL | |||
outs aL,aR ;SEND TO OUTPUTS | |||
endin | |||
instr 110 ;CLAVES | |||
xtratim 0.1 | |||
krelease release ;SENSE RELEASE OF THIS NOTE ('1' WHEN RELEASED, OTHERWISE ZERO) | |||
chnset 1-krelease,"Act10" ;TURN ON ACTIVE LIGHT WHEN NOTE STARTS, TURN IT OFF WHEN NOTE ENDS | |||
ifrq = 2500*octave(i(gktune10)) ;FREQUENCY OF OSCILLATOR | |||
idur = 0.045 * i(gkdur10) ;DURATION OF THE NOTE | |||
p3 limit idur,0.1,10 ;LIMIT THE MINIMUM DURATION OF THE NOTE (VERY SHORT NOTES CAN RESULT IN THE INDICATOR LIGHT ON-OFF NOTE BEING TO0 SHORT) | |||
aenv expsega 1,idur,0.001,1,0.001 ;AMPLITUDE ENVELOPE | |||
afmod expsega 3,0.00005,1,1,1 ;FREQUENCY MODULATION ENVELOPE. GIVES THE SOUND A LITTLE MORE ATTACK. | |||
asig oscili -(aenv-0.001),ifrq*afmod,gisine,0 ;AUDIO OSCILLATOR | |||
asig = asig*0.4*gklevel10*p4*gklevel ;RESCALE AMPLITUDE | |||
aL,aR pan2 asig,gkpan10 ;PAN MONOPHONIC AUDIO SIGNAL | |||
outs aL,aR ;SEND AUDIO TO OUTPUTS | |||
endin | |||
instr 111 ;COWBELL | |||
xtratim 0.1 | |||
krelease release ;SENSE RELEASE OF THIS NOTE ('1' WHEN RELEASED, OTHERWISE ZERO) | |||
chnset 1-krelease,"Act11" ;TURN ON ACTIVE LIGHT WHEN NOTE STARTS, TURN IT OFF WHEN NOTE ENDS | |||
ifrq1 = 562 * octave(i(gktune11)) ;FREQUENCIES OF THE TWO OSCILLATORS | |||
ifrq2 = 845 * octave(i(gktune11)) ; | |||
ipw = 0.5 ;PULSE WIDTH OF THE OSCILLATOR | |||
idur = 0.7 ;NOTE DURATION | |||
ishp = -30 | |||
idur = 0.7 ;NOTE DURATION | |||
p3 = idur*i(gkdur11) ;LIMIT THE MINIMUM DURATION OF THE NOTE (VERY SHORT NOTES CAN RESULT IN THE INDICATOR LIGHT ON-OFF NOTE BEING TO0 SHORT) | |||
ishape = -30 ;SHAPE OF THE CURVES IN THE AMPLITUDE ENVELOPE | |||
kenv1 transeg 1,p3*0.3,ishape,0.2, p3*0.7,ishape,0.2 ;FIRST AMPLITUDE ENVELOPE - PRINCIPALLY THE ATTACK OF THE NOTE | |||
kenv2 expon 1,p3,0.0005 ;SECOND AMPLITUDE ENVELOPE - THE SUSTAIN PORTION OF THE NOTE | |||
kenv = kenv1*kenv2 ;COMBINE THE TWO ENVELOPES | |||
itype = 2 ;WAVEFORM FOR VCO2 (2=PULSE) | |||
a1 vco2 0.65,ifrq1,itype,ipw ;CREATE THE TWO OSCILLATORS | |||
a2 vco2 0.65,ifrq2,itype,ipw | |||
amix = a1+a2 ;MIX THE TWO OSCILLATORS | |||
iLPF2 = 10000 ;LOWPASS FILTER RESTING FREQUENCY | |||
kcf expseg 12000,0.07,iLPF2,1,iLPF2 ;LOWPASS FILTER CUTOFF FREQUENCY ENVELOPE | |||
alpf butlp amix,kcf ;LOWPASS FILTER THE MIX OF THE TWO OSCILLATORS (CREATE A NEW SIGNAL) | |||
abpf reson amix, ifrq2, 25 ;BANDPASS FILTER THE MIX OF THE TWO OSCILLATORS (CREATE A NEW SIGNAL) | |||
amix dcblock2 (abpf*0.06*kenv1)+(alpf*0.5)+(amix*0.9) ;MIX ALL SIGNALS AND BLOCK DC OFFSET | |||
amix buthp amix,700 ;HIGHPASS FILTER THE MIX OF ALL SIGNALS | |||
amix = amix*0.07*kenv*p4*gklevel11*gklevel ;RESCALE AMPLITUDE | |||
aL,aR pan2 amix,i(gkpan11) ;PAN THE MONOPHONIC AUDIO SIGNAL | |||
outs aL,aR ;SEND AUDIO TO OUTPUTS | |||
endin | |||
instr 112 ;CLAP | |||
;;xtratim 0.1 | |||
krelease release ;SENSE RELEASE OF THIS NOTE ('1' WHEN RELEASED, OTHERWISE ZERO) | |||
chnset 1-krelease,"Act12" ;TURN ON ACTIVE LIGHT WHEN NOTE STARTS, TURN IT OFF WHEN NOTE ENDS | |||
iTimGap = 0.01 ;GAP BETWEEN EVENTS DURING ATTACK PORTION OF CLAP | |||
idur1 = 0.02 ;DURING OF THE THREE INITIAL 'CLAPS' | |||
idur2 = 2*i(gkdur12) ;DURATION OF THE FOURTH, MAIN, CLAP | |||
idens = 8000 ;DENSITY OF THE NOISE SIGNAL USED TO FORM THE CLAPS | |||
iamp1 = 0.5 ;AMPLITUDE OF AUDIO BEFORE BANDPASS FILTER IN OUTPUT | |||
iamp2 = 1 ;AMPLITUDE OF AUDIO AFTER BANDPASS FILTER IN OUTPUT | |||
if frac(p1)==0 then ;IF THIS IS THE INITIAL NOTE (p1 WILL BE AN INTEGER) | |||
; del. dur env.shape | |||
event_i "i", p1+0.1, 0, idur1, p4 ;CALL THIS INSTRUMENT 4 TIMES. ADD A FRACTION ONTO p1 TO BE ABLE TO DIFFERENTIATE THESE SUBSEQUENT NOTES | |||
event_i "i", p1+0.1, iTimGap, idur1, p4 | |||
event_i "i", p1+0.1, iTimGap*2, idur1, p4 | |||
event_i "i", p1+0.1, iTimGap*3, idur2, p4 | |||
else | |||
kenv transeg 1,p3,-25,0 ;AMPLITUDE ENVELOPE | |||
iamp random 0.7,1 ;SLIGHT RANDOMISATION OF AMPLITUDE | |||
anoise dust2 kenv*iamp, idens ;CREATE NOISE SIGNAL | |||
iBPF = 1100*octave(i(gktune12)) ;FREQUENCY OF THE BANDPASS FILTER | |||
ibw = 2000*octave(i(gktune12)) ;BANDWIDTH OF THE BANDPASS FILTER | |||
iHPF = 1000 ;FREQUENCY OF A HIGHPASS FILTER | |||
iLPF = 1 ;SCALER FOR FREQUENCY OF A LOWPASS FILTER | |||
kcf expseg 8000,0.07,1700,1,800,2,500,1,500 ;CREATE CUTOFF FREQUENCY ENVELOPE | |||
asig butlp anoise,kcf*iLPF ;LOWPASS FILTER THE SOUND | |||
asig buthp asig,iHPF ;HIGHPASS FILTER THE SOUND | |||
ares reson asig,iBPF,ibw,1 ;BANDPASS FILTER THE SOUND (CREATE A NEW SIGNAL) | |||
asig dcblock2 (asig*iamp1)+(ares*iamp2) ;MIX BANDPASS FILTERED AND NON-BANDPASS FILTERED SOUND ELEMENTS | |||
asig = asig*p4*i(gklevel12)*1.75*gklevel ;SCALE AMPLITUDE | |||
aL,aR pan2 asig,i(gkpan12) ;PAN MONOPHONIC SIGNAL | |||
outs aL,aR ;SEND AUDIO TO OUTPUTS | |||
endif | |||
endin | |||
instr 113 ;MARACA | |||
xtratim 0.1 | |||
krelease release ;SENSE RELEASE OF THIS NOTE ('1' WHEN RELEASED, OTHERWISE ZERO) | |||
chnset 1-krelease,"Act13" ;TURN ON ACTIVE LIGHT WHEN NOTE STARTS, TURN IT OFF WHEN NOTE ENDS | |||
idur = 0.07*i(gkdur13) ;DURATION 3 | |||
p3 limit idur,0.1,10 ;LIMIT THE MINIMUM DURATION OF THE NOTE (VERY SHORT NOTES CAN RESULT IN THE INDICATOR LIGHT ON-OFF NOTE BEING TO0 SHORT) | |||
iHPF limit 6000*octave(i(gktune13)),20,sr/2 ;HIGHPASS FILTER FREQUENCY | |||
iLPF limit 12000*octave(i(gktune13)),20,sr/3 ;LOWPASS FILTER FREQUENCY. (LIMIT MAXIMUM TO PREVENT OUT OF RANGE VALUES) | |||
;AMPLITUDE ENVELOPE | |||
iBP1 = 0.4 ;BREAK-POINT 1 | |||
iDur1 = 0.014*i(gkdur13) ;DURATION 1 | |||
iBP2 = 1 ;BREAKPOINT 2 | |||
iDur2 = 0.01 *i(gkdur13) ;DURATION 2 | |||
iBP3 = 0.05 ;BREAKPOINT 3 | |||
p3 limit idur,0.1,10 ;LIMIT THE MINIMUM DURATION OF THE NOTE (VERY SHORT NOTES CAN RESULT IN THE INDICATOR LIGHT ON-OFF NOTE BEING TO0 SHORT) | |||
aenv expsega iBP1,iDur1,iBP2,iDur2,iBP3 ;CREATE AMPLITUDE ENVELOPE | |||
anoise noise 0.75,0 ;CREATE A NOISE SIGNAL | |||
anoise buthp anoise,iHPF ;HIGHPASS FILTER THE SOUND | |||
anoise butlp anoise,iLPF ;LOWPASS FILTER THE SOUND | |||
anoise = anoise*aenv*p4*gklevel13*gklevel ;SCALE THE AMPLITUDE | |||
aL,aR pan2 anoise,i(gkpan13) ;PAN THE MONOPONIC SIGNAL | |||
outs aL,aR ;SEND AUDIO TO OUTPUTS | |||
endin | |||
instr 114 ;HIGH CONGA | |||
xtratim 0.1 | |||
krelease release ;SENSE RELEASE OF THIS NOTE ('1' WHEN RELEASED, OTHERWISE ZERO) | |||
chnset 1-krelease,"Act14" ;TURN ON ACTIVE LIGHT WHEN NOTE STARTS, TURN IT OFF WHEN NOTE ENDS | |||
ifrq = 420*octave(i(gktune14)) ;FREQUENCY OF NOTE | |||
p3 = 0.22*i(gkdur14) ;DURATION OF NOTE | |||
aenv transeg 0.7,1/ifrq,1,1,p3,-6,0.001 ;AMPLITUDE ENVELOPE | |||
afrq expsega ifrq*3,0.25/ifrq,ifrq,1,ifrq ;FREQUENCY ENVELOPE (CREATE A SHARPER ATTACK) | |||
asig oscili -aenv*0.25,afrq,gisine ;CREATE THE AUDIO OSCILLATOR | |||
asig = asig*p4*gklevel14*gklevel ;SCALE THE AMPLITUDE | |||
aL,aR pan2 asig,gkpan14 ;PAN THE MONOPHONIC AUDIO SIGNAL | |||
outs aL,aR ;SEND AUDIO TO THE OUTPUTS | |||
endin | |||
instr 115 ;MID CONGA | |||
xtratim 0.1 | |||
krelease release ;SENSE RELEASE OF THIS NOTE ('1' WHEN RELEASED, OTHERWISE ZERO) | |||
chnset 1-krelease,"Act15" ;TURN ON ACTIVE LIGHT WHEN NOTE STARTS, TURN IT OFF WHEN NOTE ENDS | |||
ifrq = 310*octave(i(gktune15)) ;FREQUENCY OF NOTE | |||
p3 = 0.33*i(gkdur15) ;DURATION OF NOTE | |||
aenv transeg 0.7,1/ifrq,1,1,p3,-6,0.001 ;AMPLITUDE ENVELOPE | |||
afrq expsega ifrq*3,0.25/ifrq,ifrq,1,ifrq ;FREQUENCY ENVELOPE (CREATE A SHARPER ATTACK) | |||
asig oscili -aenv*0.25,afrq,gisine ;CREATE THE AUDIO OSCILLATOR | |||
asig = asig*p4*gklevel15*gklevel ;SCALE THE AMPLITUDE | |||
aL,aR pan2 asig,gkpan15 ;PAN THE MONOPHONIC AUDIO SIGNAL | |||
outs aL,aR ;SEND AUDIO TO THE OUTPUTS | |||
endin | |||
instr 116 ;LOW CONGA | |||
xtratim 0.1 | |||
krelease release ;SENSE RELEASE OF THIS NOTE ('1' WHEN RELEASED, OTHERWISE ZERO) | |||
chnset 1-krelease,"Act16" ;TURN ON ACTIVE LIGHT WHEN NOTE STARTS, TURN IT OFF WHEN NOTE ENDS | |||
ifrq = 227*octave(i(gktune16)) ;FREQUENCY OF NOTE | |||
p3 = 0.41*i(gkdur16) ;DURATION OF NOTE | |||
aenv transeg 0.7,1/ifrq,1,1,p3,-6,0.001 ;AMPLITUDE ENVELOPE | |||
afrq expsega ifrq*3,0.25/ifrq,ifrq,1,ifrq ;FREQUENCY ENVELOPE (CREATE A SHARPER ATTACK) | |||
asig oscili -aenv*0.25,afrq,gisine ;CREATE THE AUDIO OSCILLATOR | |||
asig = asig*p4*gklevel16*gklevel ;SCALE THE AMPLITUDE | |||
aL,aR pan2 asig,gkpan16 ;PAN THE MONOPHONIC AUDIO SIGNAL | |||
outs aL,aR ;SEND AUDIO TO THE OUTPUTS | |||
endin | |||
</CsInstruments> | |||
<CsScore> | |||
f 0 [3600*24*7] | |||
i 1 0 [3600*24*7] | |||
</CsScore> | |||
</CsoundSynthesizer> |
@@ -1,127 +0,0 @@ | |||
<Cabbage> | |||
form caption("Sonic Lava Lamp") size(510, 450), pluginID("sonl") | |||
image bounds( 5, 0,250, 210), colour(255,255, 50,100),shape("rounded"), outline("white"), line(0) | |||
image bounds(255, 0,250, 210), colour( 0, 0,255,100),shape("rounded"), outline("white"), line(0) | |||
image bounds( 5,210,250, 210), colour( 5,255, 0,100),shape("rounded"), outline("white"), line(0) | |||
image bounds(255,210,250, 210), colour(255, 0,200,100),shape("rounded"), outline("white"), line(0) | |||
xypad bounds(5, 0, 250, 210), channel("LFOspeed", "LFO_OS"), rangex(0, 1.00, 0.01), rangey(5, 11, 8), text("Speed/OS") | |||
xypad bounds(255, 0, 250, 210), channel("LFOshape", "LFOdepth"), rangex(0, 1, 0.7), rangey(0.1, 4, 2), text("Shape/Depth") | |||
xypad bounds(5, 210, 250, 210), channel("pan", "amp"), rangex(0, 1, 0.5), rangey(0, 1, 0.8), text("pan/amp") | |||
xypad bounds(255, 210, 250, 210), channel("DelTim", "DelSnd"), rangex(0, 1.00, 0.5), rangey(0, 1.00, 0.5), text("Delay Time/Send") | |||
infobutton bounds(5,425, 100, 20), text("Help"), file("SonicLavaLampHelp.html") | |||
image bounds(105, 425, 315, 20), colour(75, 85, 90, 100), plant("credit"), line(0){ | |||
label bounds(0.03, 0.1, .6, .7), text("Author: Iain McCurdy |2012|"), colour("white") | |||
} | |||
</Cabbage> | |||
<CsoundSynthesizer> | |||
<CsOptions> | |||
-dm0 -n -+rtmidi=null -M0 | |||
</CsOptions> | |||
<CsInstruments> | |||
sr = 44100 | |||
ksmps = 32 | |||
nchnls = 2 | |||
0dbfs = 1 | |||
;Author: Iain McCurdy (2012) | |||
gisine ftgen 0, 0, 4096, 10, 1 ;SINE WAVE | |||
giSawUp ftgen 0, 0, 4096, -7, -1, 4096, 1 | |||
giTri ftgen 0, 0, 4096, -7, -1, 2048, 1, 2048, -1 | |||
giSawDn ftgen 0, 0, 4096, -7, 1, 4096, -1 | |||
giSq ftgen 0, 0, 4096, -7, 1, 2048, 1, 0, -1, 2048, -1 | |||
giMorfTab ftgen 0, 0, 4096, -7, 1, 2048, 1, 0, -1, 2048, -1 | |||
giTabs4Morf ftgen 0, 0, 8, -2, giSq, giSawUp, giTri, giSawDn, giSq, giSq, giSq, giSq | |||
giAmpCurve ftgen 0, 0, 16, -16, 1, 6, 0, 1, 5, -4, 0.2, 5, 0, 0.2 | |||
giEnv ftgen 0, 0, 4096, 20,3,1 ;9, 0.5, 1, 0 | |||
opcode PingPongDelay, aa,aakk | |||
ainL,ainR,ktime,kfeedback xin | |||
atime interp ktime ;INTERPOLATED A-RATE VERSION OF DELAY TIME | |||
aL_OS vdelay ainL,(atime*1000)/2,(10*1000)/2 ;DELAYED OFFSET OF LEFT CHANNEL (FIRST 'PING') | |||
;LEFT CHANNEL | |||
abuf delayr 10 ;ESTABLISH DELAY BUFFER | |||
aDelL deltapi atime ;TAP BUFFER | |||
delayw aL_OS+(aDelL*kfeedback) ;WRITE INPUT AUDIO INTO BUFFER | |||
;RIGHT CHANNEL | |||
abuf delayr 10 ;ESTABLISH DELAY BUFFER | |||
aDelR deltapi atime ;TAP BUFFER | |||
delayw ainR+(aDelR*kfeedback) ;WRITE INPUT AUDIO INTO BUFFER | |||
xout aDelL+aL_OS,aDelR | |||
endop | |||
instr InitialiseXYpads | |||
; xypads output zeroes until they are moved (regardless of any initialisation done within the widget) | |||
; a workaround is to initialise the xypad using chnset within an instrument | |||
; here I have used a macro so cut down on code repetition | |||
#define SET_XYPAD_INIT(NAME'VAL)# | |||
kval = $VAL | |||
chnset kval,"$NAME"# | |||
$SET_XYPAD_INIT(LFOspeed'0.01) | |||
$SET_XYPAD_INIT(LFO_OS'8) | |||
$SET_XYPAD_INIT(LFOshape'0.7) | |||
$SET_XYPAD_INIT(LFOdepth'2) | |||
$SET_XYPAD_INIT(pan'0.5) | |||
$SET_XYPAD_INIT(amp'0.8) | |||
$SET_XYPAD_INIT(DelTim'0.5) | |||
$SET_XYPAD_INIT(DelSnd'0.5) | |||
endin | |||
instr 1 | |||
kLFOspeed chnget "LFOspeed" | |||
kLFO_OS chnget "LFO_OS" | |||
kLFOshape chnget "LFOshape" | |||
kLFOdepth chnget "LFOdepth" | |||
kamp chnget "amp" | |||
kpan chnget "pan" | |||
kDelTim chnget "DelTim" | |||
kDelSnd chnget "DelSnd" | |||
kLFOspeed expcurve kLFOspeed,6 | |||
kLFOspeed scale kLFOspeed, 40,0.01 | |||
kDelTim expcurve kDelTim,6 | |||
kDelTim scale kDelTim, 0.5,0.01 | |||
kporttime linseg 0,0.01,0.03 | |||
kDelSnd portk kDelSnd,kporttime*3 | |||
kLFOdepth portk kLFOdepth,kporttime | |||
kLFO_OS portk kLFO_OS,kporttime | |||
kLFOshape portk kLFOshape,kporttime | |||
kamp portk kamp,kporttime | |||
kamp expcurve kamp,2 | |||
kpan portk kpan,kporttime | |||
ftmorf kLFOshape*5, giTabs4Morf, giMorfTab | |||
aoctLFO oscili kLFOdepth,kLFOspeed,giMorfTab | |||
aoct = aoctLFO+kLFO_OS | |||
koct downsamp aoct | |||
kAmpCurve tablei koct,giAmpCurve | |||
kcps = cpsoct(koct) | |||
aamp interp kAmpCurve/3 | |||
asig oscili aamp,kcps,gisine ;AUDIO OSCILLATOR | |||
aenv oscili 1,kLFOspeed,giEnv | |||
kEnvXFade jspline 1,0.2,0.6 | |||
kEnvXFade limit kEnvXFade,0,1 | |||
asig ntrpol asig*aenv,asig,kEnvXFade | |||
aL,aR pan2 asig,kpan | |||
aRvbL,aRvbR reverbsc aL,aR,0.8,4000 | |||
aL sum (aL*kamp),(aRvbL*0.1) | |||
aR sum (aR*kamp),(aRvbR*0.1) | |||
kDelTim portk kDelTim,kporttime*10 | |||
aDlyL,aDlyR PingPongDelay aL*kDelSnd,aR*kDelSnd,2*kDelTim,0.6 | |||
aL sum aL,(aDlyL*0.5) | |||
aR sum aR,(aDlyR*0.5) | |||
outs aL, aR | |||
endin | |||
</CsInstruments> | |||
<CsScore> | |||
i "InitialiseXYpads" 0 0.01 | |||
i 1 0 [3600*24*7] | |||
</CsScore> | |||
</CsoundSynthesizer> |
@@ -27,7 +27,6 @@ FILES=`find ./cabbage -name \*.csd` | |||
for i in $FILES; do | |||
basename=`echo $i | awk 'sub("./cabbage/","")' | awk 'sub("/","\n")' | tail -n 1 | awk 'sub(".csd","")'` | |||
#basename=`echo $i | awk 'sub("./cabbage-todo/","")' | awk 'sub("/","\n")' | tail -n 1 | awk 'sub(".csd","")'` | |||
basename=`echo "cabbage-$basename"` | |||
lv2dir=`echo "./lv2/"$basename".lv2/"` | |||
@@ -47,7 +46,5 @@ done | |||
# Special files | |||
cp -v cabbage/Synths/bassline.snaps lv2/cabbage-bassline.lv2/ | |||
# cp -v cabbage-todo/Synths/Clavinet.snaps lv2/cabbage-Clavinet.lv2/ | |||
# cp -v cabbage-todo/Synths/TR-808_pattern.0.txt lv2/cabbage-TR-808.lv2/ | |||
cd .. |
@@ -25,7 +25,6 @@ FILES=`find ./cabbage -name \*.csd` | |||
for i in $FILES; do | |||
basename=`echo $i | awk 'sub("./cabbage/","")' | awk 'sub("/","\n")' | tail -n 1 | awk 'sub(".csd","")'` | |||
#basename=`echo $i | awk 'sub("./cabbage-todo/","")' | awk 'sub("/","\n")' | tail -n 1 | awk 'sub(".csd","")'` | |||
basename=`echo "cabbage-$basename"` | |||
if ( echo $i | grep "./cabbage/Synths/" > /dev/null ); then | |||
@@ -42,7 +41,5 @@ done | |||
# Special files | |||
cp -v cabbage/Synths/bassline.snaps vst/ | |||
# cp -v cabbage-todo/Synths/Clavinet.snaps vst/ | |||
# cp -v cabbage-todo/Synths/TR-808_pattern.0.txt vst/ | |||
cd .. |