Browse Source

Cleanup

tags/2018-04-16
falkTX 10 years ago
parent
commit
8d3c97bac8
14 changed files with 0 additions and 4498 deletions
  1. +0
    -181
      bin/cabbage-extra/Effects/Vocoder.csd
  2. +0
    -97
      bin/cabbage-extra/Effects/VocoderHelp.html
  3. +0
    -647
      bin/cabbage-extra/Synths/Arpeggiator.csd
  4. +0
    -90
      bin/cabbage-extra/Synths/ArpeggiatorHelp.html
  5. +0
    -321
      bin/cabbage-extra/Synths/Clavinet.csd
  6. +0
    -461
      bin/cabbage-extra/Synths/Clavinet.snaps
  7. +0
    -144
      bin/cabbage-extra/Synths/Scanned.csd
  8. +0
    -64
      bin/cabbage-extra/Synths/SonicLavaLampHelp.html
  9. +0
    -983
      bin/cabbage-extra/Synths/TR-808.csd
  10. +0
    -1376
      bin/cabbage-extra/Synths/TR-808_pattern.0.txt
  11. +0
    -127
      bin/cabbage-extra/Synths/sonic_lava_lamp.csd
  12. +0
    -1
      bin/cabbage-extra/Synths/string-128
  13. +0
    -3
      scripts/generate-cabbage-lv2.sh
  14. +0
    -3
      scripts/generate-cabbage-vst.sh

+ 0
- 181
bin/cabbage-extra/Effects/Vocoder.csd View File

@@ -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>

+ 0
- 97
bin/cabbage-extra/Effects/VocoderHelp.html View File

@@ -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 &ndash;</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 &ndash;</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
&ndash;</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
&ndash;</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
&ndash;</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
&ndash;</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
&ndash;</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
&ndash;</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 &ndash;</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>

+ 0
- 647
bin/cabbage-extra/Synths/Arpeggiator.csd View File

@@ -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>

+ 0
- 90
bin/cabbage-extra/Synths/ArpeggiatorHelp.html View File

@@ -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>

+ 0
- 321
bin/cabbage-extra/Synths/Clavinet.csd View File

@@ -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>

+ 0
- 461
bin/cabbage-extra/Synths/Clavinet.snaps View File

@@ -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:

+ 0
- 144
bin/cabbage-extra/Synths/Scanned.csd View File

@@ -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>

+ 0
- 64
bin/cabbage-extra/Synths/SonicLavaLampHelp.html View File

@@ -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>

+ 0
- 983
bin/cabbage-extra/Synths/TR-808.csd View File

@@ -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)
}