-m128
ksmps = 128
nchnls = 2
0dbfs = 1
;============================================================================;
;============================================================================;
; PLAYING SCALES WITH A MIDI KEYBOARD ;
;============================================================================;
; by Joachim Heintz and Richard Boulanger ;
; 2010 / 2012 / 2014 ;
; Version for Csound6 ;
;============================================================================;
;============================================================================;
;============================================================================;
; SOME GLOBAL VARIABLES AND ASSIGNMENTS ;
;============================================================================;
giScales[][] init 30, 100 ;two-dimensional array to hold the values
giScaleLens[] init 30 ;how many values in one scale
giSine ftgen 0, 0, 8192, 10, 1
giSaw ftgen 0, 0, 8192, 10, 1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9
giSquare ftgen 0, 0, 8192, 10, 1, 0, 1/3, 0, 1/5, 0, 1/7, 0, 1/9, 0, 1/11
massign 0, "play"; send all midi noteon/noteoff events to instr 'play'
;============================================================================;
; OPCODE DEFINITIONS ;
;============================================================================;
opcode FreqByEqScale, i, iiii
;;frequency calculation for one step of an equal tempered scale. the unit for the scale can be an octave, a duodecim, or whatever
;iref_freq: reference frequency
;iumult: unit multiplier (2 = octave, 3 = Bohlen-Pierce scale, 5 = stockhausen scale in Studie2)
;istepspu: steps per unit (12 for semitones, 13 for complete Bohlen-Pierce scale, 25 for studie2 scale)
;istep: selected step (0 = reference frequency, 1 = one step higher, -1 = one step lower)
iref_freq, iumult, istepspu, istep xin
ifreq = iref_freq * (iumult ^ (istep / istepspu))
xout ifreq
endop
opcode FreqByCentArr, i, iii
;frequency calculation of a step of a scale which is defined by a list of cent values
;refers to the which index of giScales: array with the number of cent values per unit multiplier (usually 2 = octave)
;its first value is the unit multiplier iumult
;the second value must be 0 and matches iref_freq, if istep == 0
;iref_freq: reference frequency (= for istep == 0)
;istep: selected step (0 = reference frequency, 1 = one step higher, -1 = one step lower)
iwhich, iref_freq, istep xin
iumult = giScales[iwhich][0]
iarrlen = giScaleLens[iwhich] - 1
ipos = floor(istep/iarrlen) ;"octave" position
ibasfreq = (iumult ^ ipos) * iref_freq; base freq of istep
icentindx = istep % iarrlen + 1 ;position of the appropriate centvalue ...
icentindx = (icentindx < 1 ? (iarrlen + icentindx) : icentindx); ... in the array
icent = giScales[iwhich][icentindx] ; get cent value
ifreq = ibasfreq * cent(icent); get frequency
xout ifreq
endop
opcode FreqByRatioArr, i, iii
;frequency calculation of a step in a scale which is defined by a list of proportions
;refers to the which index of giScales: array with the number of proportions per unit multiplier (usually 2 = octave)
;its first value is the unit multiplier iumult (2 = octave, 3 = duodecime or whatever)
;the second value must be 1 and matches iref_freq, if istep == 0
;iref_freq: reference frequency (= for istep == 0)
;istep: selected step (0 = reference frequency, 1 = one step higher, -1 = one step lower)
iwhich, iref_freq, istep xin
iumult = giScales[iwhich][0]
iarrlen = giScaleLens[iwhich] - 1
ipos = floor(istep/iarrlen); "octave" position
ibasfreq = (iumult ^ ipos) * iref_freq; base freq of istep
ipropindx = istep % iarrlen + 1; position of the appropriate proportion ...
ipropindx = (ipropindx < 1 ? (iarrlen + ipropindx) : ipropindx); ... in the array
iprop = giScales[iwhich][ipropindx] ; get proportion
ifreq = ibasfreq * iprop; get frequency
xout ifreq
endop
opcode FreqByECRArr, i, iii
;frequency calculation by either equal steps, cent list, or ratio list. the first value in the array gives the unit multiplier of the scale (e.g. 2 = octave or 3 = perfect 12th). the methods are distinguished by the second value in iarr:
;if the second value is 0, the array is considered to be a centlist
;if the second value is 1, the arry is considered to be a list of proportions
;else the second value is read as the number of equal tempered steps in the unit multiplier (e.g. 12 gives the usual keyboard tuning with a ratio of 12th root by 2 for each step when the first table value is 2)
iwhich, iref_freq, istep xin ;iwhich = index in giScales and giScaleLens
ifirst = giScales[iwhich][0] ; unit multiplier
isecond = giScales[iwhich][1] ; 0=centlist, 1=ratios, else=equal tempered
if isecond == 0 then
ifreq FreqByCentArr iwhich, iref_freq, istep
elseif isecond == 1 then
ifreq FreqByRatioArr iwhich, iref_freq, istep
else
ifreq FreqByEqScale iref_freq, ifirst, isecond, istep
endif
xout ifreq
endop
opcode MidiNoteIn, kkk, 0
;returns channel, key and velocity from a MIDI Note-On event. if no note-on event is received, -1 is returned for all three output values
keventin, kchanin, knotin, kvelin midiin
if keventin == 144 then
kchan = kchanin
knot = knotin
kvel = kvelin
else
kchan = -1
knot = -1
kvel = -1
endif
xout kchan, knot, kvel
endop
opcode IsOp, i, So
;returns 1 for (, 2 for +, 3 for -, 4 for *, 5 for /, 6 for %, 7 for ^
;0 for anything else
String, indx xin
Str strsub String, indx, indx+1
if strcmp(Str, "(") == 0 then
iRes = 1
elseif strcmp(Str, "+") == 0 then
iRes = 2
elseif strcmp(Str, "-") == 0 then
iRes = 3
elseif strcmp(Str, "*") == 0 then
iRes = 4
elseif strcmp(Str, "/") == 0 then
iRes = 5
elseif strcmp(Str, "%") == 0 then
iRes = 6
elseif strcmp(Str, "^") == 0 then
iRes = 7
else
iRes = 0
endif
xout iRes
endop
opcode IsNum, i, So
;returns 1 if Schar is a number or point, 0 elsewhere
Schar, ipos xin
iNum strchar Schar, ipos
if iNum == 46 || (iNum > 47 && iNum < 58) then
iRes = 1
else
iRes = 0
endif
xout iRes
endop
opcode IsNoth, i, So
;returns 1 if Schar is a space or tab, 0 elsewhere
Schar, ipos xin
iNum strchar Schar, ipos
if iNum == 32 || iNum == 9 then
iRes = 1
else
iRes = 0
endif
xout iRes
endop
opcode StrExpr, i, S
Str xin
indx = 0
;printf_i "'%s'\n", 1, Str
;look after each character
until indx == strlen(Str) do
;do nothing if part of a number or a space
if IsNum(Str, indx) == 1 || IsNoth(Str, indx) == 1 then
indx += 1
;if '(', look for the ')' and evaluate
elseif IsOp(Str, indx) == 1 then
;position of second parenthesis
iPosPar2 strindex Str, ")"
;is there an operator after
iSubIndx = iPosPar2
iIsOp2 = 0
until iIsOp2 > 0 || iSubIndx == strlen(Str) do
iIsOp2 IsOp Str, iSubIndx
iSubIndx += 1
enduntil
;substring inside this parenthesis
S1 strsub Str, indx+1, iPosPar2
;if this is the end of the string, simply evaluate this section
if iIsOp2 == 0 then
iNum StrExpr S1
igoto end
else
;if there is an operator after this parenthesis, evaluate both strings
S2 strsub Str, iPosPar2+2
if iIsOp2 == 2 then
iNum = StrExpr(S1) + StrExpr(S2)
igoto end
elseif iIsOp2 == 3 then
iNum = StrExpr(S1) - StrExpr(S2)
igoto end
elseif iIsOp2 == 4 then
iNum = StrExpr(S1) * StrExpr(S2)
igoto end
elseif iIsOp2 == 5 then
iNum = StrExpr(S1) / StrExpr(S2)
igoto end
elseif iIsOp2 == 6 then
iNum = StrExpr(S1) % StrExpr(S2)
igoto end
else
iNum = StrExpr(S1) ^ StrExpr(S2)
igoto end
endif
endif
;if operator, recursion with this operator
else
S1 strsub Str, 0, indx
S2 strsub Str, indx+1
if IsOp(Str, indx) == 2 then
iNum = StrExpr(S1) + StrExpr(S2)
igoto end
elseif IsOp(Str, indx) == 3 then
iNum = StrExpr(S1) - StrExpr(S2)
igoto end
elseif IsOp(Str, indx) == 4 then
iNum = StrExpr(S1) * StrExpr(S2)
igoto end
elseif IsOp(Str, indx) == 5 then
iNum = StrExpr(S1) / StrExpr(S2)
igoto end
elseif IsOp(Str, indx) == 6 then
iNum = StrExpr(S1) % StrExpr(S2)
igoto end
else
iNum = StrExpr(S1) ^ StrExpr(S2)
igoto end
endif
endif
enduntil
iNum strtod Str
end: xout iNum
endop
opcode StrayLen, i, Sjj
;returns the number of elements in Stray. elements are defined by two seperators as ASCII coded characters: isep1 defaults to 32 (= space), isep2 defaults to 9 (= tab). if just one seperator is used, isep2 equals isep1
Stray, isepA, isepB xin
;;DEFINE THE SEPERATORS
isep1 = (isepA == -1 ? 32 : isepA)
isep2 = (isepA == -1 && isepB == -1 ? 9 : (isepB == -1 ? isep1 : isepB))
Sep1 sprintf "%c", isep1
Sep2 sprintf "%c", isep2
;;INITIALIZE SOME PARAMETERS
ilen strlen Stray
icount = 0; number of elements
iwarsep = 1
indx = 0
if ilen == 0 igoto end ;don't go into the loop if String is empty
loop:
Snext strsub Stray, indx, indx+1; next sign
isep1p strcmp Snext, Sep1; returns 0 if Snext is sep1
isep2p strcmp Snext, Sep2; 0 if Snext is sep2
if isep1p == 0 || isep2p == 0 then; if sep1 or sep2
iwarsep = 1; tell the log so
else ; if not
if iwarsep == 1 then ; and has been sep1 or sep2 before
icount = icount + 1; increase counter
iwarsep = 0; and tell you are ot sep1 nor sep2
endif
endif
loop_lt indx, 1, ilen, loop
end: xout icount
endop
opcode SToScaleArr, 0, Sijj
;fill a numerical string into iwhere first dimension of giScales
;and its length into iwhere of giScaleLens
Stray, iwhere, isepA, isepB xin
;;DEFINE THE SEPERATORS
isep1 = (isepA == -1 ? 32 : isepA)
isep2 = (isepA == -1 && isepB == -1 ? 9 : (isepB == -1 ? isep1 : isepB))
Sep1 sprintf "%c", isep1
Sep2 sprintf "%c", isep2
;;WRITE ARRAY LENGTH
iarrlen StrayLen Stray, isep1, isep2
giScaleLens[iwhere] = iarrlen
;;INITIALIZE SOME PARAMETERS
ilen strlen Stray
istartsel = -1; startindex for searched element
iel = -1; number of element in Stray and ift
iwarleer = 1; is this the start of a new element
indx = 0 ;character index
inewel = 0 ;new element to find
;;LOOP
if ilen == 0 igoto end ;don't go into the loop if Stray is empty
loop:
Schar strsub Stray, indx, indx+1; this character
isep1p strcmp Schar, Sep1; returns 0 if Schar is sep1
isep2p strcmp Schar, Sep2; 0 if Schar is sep2
is_sep = (isep1p == 0 || isep2p == 0 ? 1 : 0) ;1 if Schar is a seperator
;END OF STRING AND NO SEPARATORS BEFORE?
if indx == ilen && iwarleer == 0 then
Sel strsub Stray, istartsel, -1
inewel = 1
;FIRST CHARACTER OF AN ELEMENT?
elseif is_sep == 0 && iwarleer == 1 then
istartsel = indx ;if so, set startindex
iwarleer = 0 ;reset info about previous separator
iel = iel+1 ;increment element count
;FIRST SEPERATOR AFTER AN ELEMENT?
elseif iwarleer == 0 && is_sep == 1 then
Sel strsub Stray, istartsel, indx ;get element
inewel = 1 ;tell about
iwarleer = 1 ;reset info about previous separator
endif
;WRITE THE ELEMENT TO THE ARRAY
if inewel == 1 then
inum StrExpr Sel ;convert expression to number
giScales[iwhere][iel] = inum
endif
inewel = 0
loop_le indx, 1, ilen, loop
end:
endop
opcode ShowLED_a, 0, Sakkk
;Shows an audio signal in an outvalue channel. You can choose to show the value in dB or in raw amplitudes.
;Input:
;Soutchan: string with the name of the outvalue channel
;asig: audio signal which is to displayed
;kdispfreq: refresh frequency (Hz)
;kdb: 1 = show in dB, 0 = show in raw amplitudes (both in the range 0-1)
;kdbrange: if idb=1: how many db-steps are shown (e.g. if 36 you will not see anything from a signal below -36 dB)
Soutchan, asig, kdispfreq, kdb, kdbrange xin
kdispval max_k asig, kdispfreq, 1
if kdb != 0 then
kdb = dbfsamp(kdispval)
kval = (kdbrange + kdb) / kdbrange
else
kval = kdispval
endif
outvalue Soutchan, kval
endop
opcode ShowOver_a, 0, Sakk
;Shows if the incoming audio signal was more than 1 and stays there for some time
;Input:
;Soutchan: string with the name of the outvalue channel
;asig: audio signal which is to displayed
;kdispfreq: refresh frequency (Hz)
;khold: time in seconds to "hold the red light"
Soutchan, asig, kdispfreq, khold xin
kon init 0
ktim times
kstart init 0
kend init 0
khold = (khold < .01 ? .01 : khold); avoiding too short hold times
kmax max_k asig, kdispfreq, 1
if kon == 0 && kmax > 1 then
kstart = ktim
kend = kstart + khold
outvalue Soutchan, kmax
kon = 1
endif
if kon == 1 && ktim > kend then
outvalue Soutchan, 0
kon = 0
endif
endop
;============================================================================;
; INSTRUMENTS ;
;============================================================================;
instr init
;;INITIALIZE FUNCTION TABLES
event_i "i", "refresh", 0, 1
;;INITIALIZE MENUS AND MESSAGES
outvalue "equal_tmprd", 0
outvalue "various", 0
outvalue "bohlen-pierce", 0
outvalue "midi_event", ""
;;INITIALIZE SOME GLOBAL VALUES
gkscale init 1
gkreftone init 69
gktunfreq init 440
gksound init 0
;;SHOW VALUES OF FIRST SCALE
event_i "i", "show", 0, 1
;;TURN ON MASTER AND REVERB INSTRUMENT
event_i "i", "master", 0, 99999
event_i "i", "reverb", 0, 99999
turnoff
endin
instr master
;reduce rate to query widgets for saving cpu power
ktrig metro 5
if ktrig == 1 then
;;GENERAL VALUES
gkreftone invalue "reftone"; any midi note number
gktunfreq invalue "tunfreq"; any frequency for it
gksound invalue "sound"; select sound by menu
;;SELECT SCALE BY MENU IF CHANGED
kscale1 invalue "equal_tmprd"
kscale2 invalue "various"
kscale3 invalue "bohlen-pierce"
kscact1 changed kscale1
kscact2 changed kscale2
kscact3 changed kscale3
gkscale = (kscact1==1 ? kscale1+1 : (kscact2==1 ? kscale2+11 : (kscact3==1 ? kscale3+21 : gkscale))); set gkscale to new menu value if change
;;SHOW SELECTED SCALE TYPE AND OTHER INFOS
if kscact1 == 1 || kscact2 == 1 || kscact3 == 1 then
event "i", "show", 0, 1
endif
;;REFRESH ARRAYS IF A SCALE HAS BEEN CHANGED
knew invalue "new"
kchange changed knew
if knew == 1 && kchange == 1 then
event "i", "refresh", 0, 1
endif
;;READ USER INPUT FOR SELECTING SCALES BY MIDI
gkgm1_scl invalue "gm1_scale"
gkgm1_key invalue "gm1_key"
gkgm1_chn invalue "gm1_chn"
gkgm2_scl invalue "gm2_scale"
gkgm2_key invalue "gm2_key"
gkgm2_chn invalue "gm2_chn"
gkgm3_scl invalue "gm3_scale"
gkgm3_key invalue "gm3_key"
gkgm3_chn invalue "gm3_chn"
gkgm4_scl invalue "gm4_scale"
gkgm4_key invalue "gm4_key"
gkgm4_chn invalue "gm4_chn"
gkgm5_scl invalue "gm5_scale"
gkgm5_key invalue "gm5_key"
gkgm5_chn invalue "gm5_chn"
gkgm6_scl invalue "gm6_scale"
gkgm6_key invalue "gm6_key"
gkgm6_chn invalue "gm6_chn"
gkgm7_scl invalue "gm7_scale"
gkgm7_key invalue "gm7_key"
gkgm7_chn invalue "gm7_chn"
gkgm8_scl invalue "gm8_scale"
gkgm8_key invalue "gm8_key"
gkgm8_chn invalue "gm8_chn"
endif ;end of cpu saving ...
endin
instr refresh; building and refreshing function tables containing scale values
;;BUILDING ARRAYS LINE EDIT WIDGETS
;(ugly code, but invalue seems not to be reliable in a loop)
Scale1 invalue "scale1"
Scale2 invalue "scale2"
Scale3 invalue "scale3"
Scale4 invalue "scale4"
Scale5 invalue "scale5"
Scale6 invalue "scale6"
Scale7 invalue "scale7"
Scale8 invalue "scale8"
Scale9 invalue "scale9"
Scale10 invalue "scale10"
Scale11 invalue "scale11"
Scale12 invalue "scale12"
Scale13 invalue "scale13"
Scale14 invalue "scale14"
Scale15 invalue "scale15"
Scale16 invalue "scale16"
Scale17 invalue "scale17"
Scale18 invalue "scale18"
Scale19 invalue "scale19"
Scale20 invalue "scale20"
Scale21 invalue "scale21"
Scale22 invalue "scale22"
Scale23 invalue "scale23"
Scale24 invalue "scale24"
Scale25 invalue "scale25"
Scale26 invalue "scale26"
Scale27 invalue "scale27"
Scale28 invalue "scale28"
Scale29 invalue "scale29"
Scale30 invalue "scale30"
SToScaleArr Scale1, 0
SToScaleArr Scale2, 1
SToScaleArr Scale3, 2
SToScaleArr Scale4, 3
SToScaleArr Scale5, 4
SToScaleArr Scale6, 5
SToScaleArr Scale7, 6
SToScaleArr Scale8, 7
SToScaleArr Scale9, 8
SToScaleArr Scale10, 9
SToScaleArr Scale11, 10
SToScaleArr Scale12, 11
SToScaleArr Scale13, 12
SToScaleArr Scale14, 13
SToScaleArr Scale15, 14
SToScaleArr Scale16, 15
SToScaleArr Scale17, 16
SToScaleArr Scale18, 17
SToScaleArr Scale19, 18
SToScaleArr Scale20, 19
SToScaleArr Scale21, 20
SToScaleArr Scale22, 21
SToScaleArr Scale23, 22
SToScaleArr Scale24, 23
SToScaleArr Scale25, 24
SToScaleArr Scale26, 25
SToScaleArr Scale27, 26
SToScaleArr Scale28, 27
SToScaleArr Scale29, 28
SToScaleArr Scale30, 29
turnoff
endin
instr show; show scale info and set menu if changed
;currently (may 2014) there is an issue in sending long strings via outvalue
;so only short info is being sent
;EQUAL TEMPERED
if i(gkscale) == 1 then ;halftone
Sinfo sprintf "1 Halftone\n12 steps per octave with a ratio of 12th root of 2 = %f...", 2^(1/12)
;Sinfo = "Scale 1 selected"
outvalue "equal_tmprd", 0
elseif i(gkscale) == 2 then ;thirdtone
Sinfo sprintf "2 Thirdtone\n18 steps per octave with a ratio of 18th root of 2 = %f...", 2^(1/18)
;Sinfo = "Scale 2 selected"
outvalue "equal_tmprd", 1
elseif i(gkscale) == 3 then ;quartertone
;Sinfo = "Scale 3 selected"
Sinfo sprintf "3 Quartertone\n24 steps per octave with a ratio of 24th root of 2 = %f...", 2^(1/24)
outvalue "equal_tmprd", 2
elseif i(gkscale) == 4 then ;fifthtone
;Sinfo = "Scale 4 selected"
Sinfo sprintf "4 Fifthtone\n30 steps per octave with a ratio of 30th root of 2 = %f...", 2^(1/30)
outvalue "equal_tmprd", 3
elseif i(gkscale) == 5 then ;sixthtone
;Sinfo = "Scale 5 selected"
Sinfo sprintf "5 Sixthtone\n36 steps per octave with a ratio of 36th root of 2 = %f...", 2^(1/36)
outvalue "equal_tmprd", 4
elseif i(gkscale) == 6 then ;eighttone
;Sinfo = "Scale 6 selected"
Sinfo sprintf "6 Eighttone\n48 steps per octave with a ratio of 48th root of 2 = %f...", 2^(1/48)
outvalue "equal_tmprd", 5
elseif i(gkscale) == 7 then ;twelfsttone
;Sinfo = "Scale 7 selected"
Sinfo sprintf "7 Twelfsttone\n72 steps per octave with a ratio of 72th root of 2 = %f...", 2^(1/72)
outvalue "equal_tmprd", 6
elseif i(gkscale) == 8 then ;sixteenthtone
;Sinfo = "Scale 8 selected"
Sinfo sprintf "8 Sixteenthtone\n96 steps per octave with a ratio of 96th root of 2 = %f...", 2^(1/96)
outvalue "equal_tmprd", 7
elseif i(gkscale) == 9 then ;stockhausen scale in "studie ii"
;Sinfo = "Scale 9 selected"
Sinfo sprintf "9 Stockhausen Scale in 'Studie II'\n25 steps per 1:5 with a ratio of 25th root of 5 = %f...", 5^(1/25)
outvalue "equal_tmprd", 8
elseif i(gkscale) == 10 then ;user defined
;Sinfo = "Scale 10 selected"
Sinfo sprintf "%s", "10 User defined\nYou can add your own description in the code at instr 4"
outvalue "equal_tmprd", 9
;VARIOUS TEMPERED
elseif i(gkscale) == 11 then ;pythagorean
;Sinfo = "Scale 11 selected"
Sinfo sprintf "%s", "11 Pythagorean chromatic scale (14th century) with ratios\n1, 2187/2048, 9/8, 32/27, 81/64, 4/3, 729/512, 3/2, 6561/4096, 27/16, 16/9, 243/128\n(after Klaus Lang, Auf Wohlklangswellen durch der Toene Meer, Graz 1999, BEM 10, p. 41)"
outvalue "various", 0
elseif i(gkscale) == 12 then ;zarlino / meantone
;Sinfo = "Scale 12 selected"
Sinfo sprintf "%s", "12 Meantone temperature after Zarlino 1571 with cent values\n0, 76, 193, 310, 386, 503, 579, 697, 773, 890, 1007, 1083\n(after Klaus Lang, Auf Wohlklangswellen durch der Toene Meer, Graz 1999, BEM 10, p. 68)"
outvalue "various", 1
elseif i(gkscale) == 13 then ;werckmeister III
;Sinfo = "Scale 13 selected"
Sinfo sprintf "%s", "13 Werckmeister III temperature (1691) with cent values\n0, 90, 192, 294, 390, 498, 588, 696, 792, 888, 996, 1092\n(after Klaus Lang, Auf Wohlklangswellen durch der Toene Meer, Graz 1999, BEM 10, p. 97)"
outvalue "various", 2
elseif i(gkscale) == 14 then ;kirnberger II
;Sinfo = "Scale 14 selected"
Sinfo sprintf "%s", "14 Kirnberger II temperature (1771) with cent values\n0, 90, 204, 294, 386, 498, 590, 702, 792, 895, 996, 1088\n(after Klaus Lang, Auf Wohlklangswellen durch der Toene Meer, Graz 1999, BEM 10, p. 100)"
outvalue "various", 3
elseif i(gkscale) == 15 then ;sruti I
;Sinfo = "Scale 15 selected"
Sinfo sprintf "%s", "15 Sruti I:\n22 steps per octave in indian classical music with cent values \n0, 90, 112, 182, 204, 294, 316, 386, 408, 498, 520, 590, 610, 702, 792, 814, 884, 906, 996, 1018, 1088, 1110\n(after P. Sambamoorthy, South Indian, Music, Book IV, Second Edition, Madras 1954, pp 95-97)"
outvalue "various", 4
elseif i(gkscale) == 16 then ;sruti II
;Sinfo = "Scale 16 selected"
Sinfo sprintf "%s", "16 Sruti II:\n22 steps per octave in indian clssical music with cent values\n0 68, 135, 200, 263, 325, 385, 444, 501, 557, 612, 666, 719, 771, 822, 872, 921, 969, 1017, 1064, 1110, 1155\n(after Narsing R. Eswara, Tonal Foundations of Indian Music, 2007, Appendix A.4)"
outvalue "various", 5
elseif i(gkscale) == 17 then ;user defined
;Sinfo = "Scale 17 selected"
Sinfo sprintf "%s", "17 User defined\nYou can add your own description in the code at instr 4"
outvalue "various", 6
elseif i(gkscale) == 18 then ;user defined
;Sinfo = "Scale 18 selected"
Sinfo sprintf "%s", "18 User defined\nYou can add your own description in the code at instr 4"
outvalue "various", 7
elseif i(gkscale) == 19 then ;user defined
;Sinfo = "Scale 19 selected"
Sinfo sprintf "%s", "19 User defined\nYou can add your own description in the code at instr 4"
outvalue "various", 8
elseif i(gkscale) == 20 then ;user defined
;Sinfo = "Scale 20 selected"
Sinfo sprintf "%s", "20 User defined\nYou can add your own description in the code at instr 4"
outvalue "various", 9
;BOHLEN-PIERCE
elseif i(gkscale) == 21 then ;equal tempered (13 steps)
;Sinfo = "Scale 21 selected"
Sinfo sprintf "21 Bohlen-Pierce Equal Tempered:\n13 steps per 3:1 (duodecima) with a ratio of 13th root of 3 = %f...", 3^(1/13)
outvalue "bohlen-pierce", 0
elseif i(gkscale) == 22 then ;ratios (13 steps)
;Sinfo = "Scale 22 selected"
Sinfo sprintf "%s", "22 Bohlen-Pierce Ratios:\n13 steps per 3:1 (duodecima) with ratios 1, 27/25, 25/21, 9/7, 7/5, 75/49, 5/3, 9/5, 49/25, 15/7, 7/3, 63/25, 25/9"
outvalue "bohlen-pierce", 1
elseif i(gkscale) == 23 then ;Dur I (9 steps)
;Sinfo = "Scale 23 selected"
Sinfo sprintf "%s", "23 Bohlen-Pierce Dur I Mode:\n9 steps per 3:1 (duodecima) with ratios 1, 27/25, 9/7, 7/5, 5/3, 9/5, 49/25, 7/3, 63/25"
outvalue "bohlen-pierce", 2
elseif i(gkscale) == 24 then ;Dur II (9 steps)
;Sinfo = "Scale 24 selected"
Sinfo sprintf "%s", "24 Bohlen-Pierce Dur II Mode:\n9 steps per 3:1 (duodecima) with ratios 1, 25/21, 9/7, 7/5, 5/3, 9/5, 15/7, 7/3, 63/25"
outvalue "bohlen-pierce", 3
elseif i(gkscale) == 25 then ;Moll I (9 steps)
;Sinfo = "Scale 25 selected"
Sinfo sprintf "%s", "25 Bohlen-Pierce Moll I Mode (Delta):\n9 steps per 3:1 (duodecima) with ratios 1, 25/21, 9/7, 75/49, 5/3, 9/5, 15/7, 7/3, 25/9"
outvalue "bohlen-pierce", 4
elseif i(gkscale) == 26 then ;Moll II (9 steps)
;Sinfo = "Scale 26 selected"
Sinfo sprintf "%s", "26 Bohlen-Pierce Moll II Mode (Pierce):\n9 steps per 3:1 (duodecima) with ratios 1, 27/25, 9/7, 7/5, 5/3, 9/5, 15/7, 7/3, 25/9"
outvalue "bohlen-pierce", 5
elseif i(gkscale) == 27 then ;Gamma (9 steps)
;Sinfo = "Scale 27 selected"
Sinfo sprintf "%s", "27 Bohlen-Pierce Gamma Mode:\n9 steps per 3:1 (duodecima) with ratios 1, 27/25, 9/7, 7/5, 5/3, 9/5, 49/25, 7/3, 25/9"
outvalue "bohlen-pierce", 6
elseif i(gkscale) == 28 then ;Harmonic (9 steps)
;Sinfo = "Scale 28 selected"
Sinfo sprintf "%s", "28 Bohlen-Pierce Harmonic Mode:\n9 steps per 3:1 (duodecima) with ratios 1, 27/25, 9/7, 7/5, 5/3, 9/5, 15/7, 7/3, 63/25"
outvalue "bohlen-pierce", 7
elseif i(gkscale) == 29 then ;Lambda (9 steps)
;Sinfo = "Scale 29 selected"
Sinfo sprintf "%s", "29 Bohlen-Pierce Lambda Mode:\n9 steps per 3:1 (duodecima) with ratios 1, 25/21, 9/7, 7/5, 5/3, 9/5, 15/7, 7/3, 25/9"
outvalue "bohlen-pierce", 8
elseif i(gkscale) == 30 then ;user defined
;Sinfo = "Scale 30 selected"
Sinfo sprintf "%s", "30 User defined\nYou can add your own description in the code at instr 4"
outvalue "bohlen-pierce", 9
endif
outvalue "scsel1", (i(gkscale) < 11 ? 1 : 0)
outvalue "scsel2", (i(gkscale) > 10 && i(gkscale) < 21 ? 1 : 0)
outvalue "scsel3", (i(gkscale) > 20 ? 1 : 0)
outvalue "info", Sinfo
turnoff
endin
instr show_mid_event
ikey = p4
ivel = p5
ichn = p6
Smidi_event sprintf "Key = %d\nVelocity = %d\nChannel = %d\n", ikey, ivel, ichn
outvalue "midi_event", Smidi_event
turnoff
endin
instr show_output
;;SHOW OUTPUT OUT THE CURRENT EVENT
ikey = p4
ifreq = p5
Skey sprintf "%d", ikey
outvalue "key", Skey; key pressed
icent = (log(ifreq / i(gktunfreq)) * 1200) / log(2)
Scent sprintf "%.1f", icent
outvalue "cent", Scent; cent difference in relation to the reference frequency
outvalue "freq", ifreq
inormfreq = cpsmidinn(ikey); usual freq of the pressed key
outvalue "normfreq", inormfreq
icentdiff = 1200 * (log(ifreq/inormfreq) / log(2)); centdifference ifreq to inormfreq
Scentdiff sprintf "%.1f", icentdiff
outvalue "centdiff", Scentdiff
turnoff
endin
instr play; playing one note
;;INPUT
ikey notnum
ivel veloc
ichn midichn
event_i "i", "show_mid_event", 0, 1, ikey, ivel, ichn ;show values
;;IS THIS A NOTE TO SELECT A SCALE (= NOT TO BE PLAYED)?
if ikey == i(gkgm1_key) && ichn == i(gkgm1_chn) then
gkscale = gkgm1_scl+1; set gkscale to the new value
event_i "i", "show", 0, 1
elseif ikey == i(gkgm2_key) && ichn == i(gkgm2_chn) then
gkscale = gkgm2_scl+1
event_i "i", "show", 0, 1
elseif ikey == i(gkgm3_key) && ichn == i(gkgm3_chn) then
gkscale = gkgm3_scl+1
event_i "i", "show", 0, 1
elseif ikey == i(gkgm4_key) && ichn == i(gkgm4_chn) then
gkscale = gkgm4_scl+1
event_i "i", "show", 0, 1
elseif ikey == i(gkgm5_key) && ichn == i(gkgm5_chn) then
gkscale = gkgm5_scl+1
event_i "i", "show", 0, 1
elseif ikey == i(gkgm6_key) && ichn == i(gkgm6_chn) then
gkscale = gkgm6_scl+1
event_i "i", "show", 0, 1
elseif ikey == i(gkgm7_key) && ichn == i(gkgm7_chn) then
gkscale = gkgm7_scl+1
event_i "i", "show", 0, 1
elseif ikey == i(gkgm8_key) && ichn == i(gkgm8_chn) then
gkscale = gkgm8_scl+1
event_i "i", "show", 0, 1
else
;;PLAY THE USUAL NOTE
ivel = ivel/127
ireftone = i(gkreftone)
itunfreq = i(gktunfreq)
iscale = i(gkscale); 1-30
istep = ikey - ireftone; how many steps (keys) higher or lower than the reftone
ifreq FreqByECRArr iscale-1, itunfreq, istep; calculation of the frequency
;;SELECT OUTPUT SOUND
if gksound == 0 then; sine
anote poscil ivel, ifreq, giSine
elseif gksound == 1 then; saw
anote poscil ivel, ifreq, giSaw
elseif gksound == 2 then; square
anote poscil ivel, ifreq, giSquare
elseif gksound == 3 then; square vco2
anote vco2 ivel, ifreq, 10
elseif gksound == 4 then; pluck
anote pluck ivel, ifreq, ifreq, 0, 1
endif
aenv linsegr 0, .1, 1, p3-0.1, 1, .1, 0
aout = anote * aenv; calculate sound
gadry init 0
gadry = gadry + aout; add to global audio signal
;;CALL SUBINSTRUMENT TO SHOW OUTPUT
event_i "i", "show_output", 0, 1, ikey, ifreq
endif
endin
instr reverb; global reverb and display
;;GUI INPUT
kwdmix invalue "wdmix";(between 0=dry und 1=reverberating)
kroomsize invalue "roomsize"; 0-1 (for freeverb)
khfdamp invalue "hfdamp"; attenuation of high frequencies (0-1) (for freeverb)
kvol invalue "vol" ;volume slider
kvol port kvol, .1 ;smooth changes
;;REVERB AND AUDIO OUTPUT
awetL, awetR freeverb gadry, gadry, kroomsize, khfdamp
aoutL = (1-kwdmix) * gadry + (kwdmix * awetL)
aoutR = (1-kwdmix) * gadry + (kwdmix * awetR)
aoutL = aoutL * kvol
aoutR = aoutR * kvol
outs aoutL, aoutR
;;SEND TO GUI
kTrigDisp metro 10
ShowLED_a "outL", aoutL, kTrigDisp, 1, 50
ShowLED_a "outR", aoutR, kTrigDisp, 1, 50
ShowOver_a "outLover", aoutL/0dbfs, kTrigDisp, 1
ShowOver_a "outRover", aoutR/0dbfs, kTrigDisp, 1
;;RESET GLOBAL AUDIO
gadry = 0
endin
i "init" 0 1
4991290754true190188143101017374773{9f76fd32-ca50-46b5-940d-820fe800928e}true0-3center
Lucida Grande
183000255255255border11key8465956227{3bc52c98-448f-4f87-bb44-571bbd00aa08}true0-3left
Lucida Grande
143000255255255noborder1139159545728{58bf0432-9be8-42aa-a453-521fd719a63f}true0-3right
Lucida Grande
143000255255255noborder11cent8476238227{47ed2c50-ebe4-4161-a4bd-b856a958806e}true0-3left
Lucida Grande
143000255255255noborder1130762353927{6844d514-7a40-42a6-ab39-8a807fdea606}true0-3right
Lucida Grande
143000255255255noborder11freq8476498227{7975f04a-23ae-4886-9391-3e348e3d82ad}true0-3left
Lucida Grande
143000255255255noborder1130664954229{c91d9759-0b82-4717-9621-a4d4cf004e1e}true0-3right
Lucida Grande
143000255255255noborder117534525226{0a533a2f-56e9-45c3-b5c5-87962ec7dcf2}true00right
DejaVu Sans
123000255255255noborder11normfreq8476758228{88acc66e-3cfe-43ee-be10-59666b1b2e28}true0-3left
Lucida Grande
143000255255255noborder1130767554129{28b05a3e-f445-486e-9945-664136d7b390}true0-3right
Lucida Grande
143000255255255noborder11centdiff8477018230{bb3b02d4-0dfd-44fc-8d2c-a9dd3925a597}true0-3left
Lucida Grande
143000255255255noborder1130770154131{3f7fe471-d23f-4472-a3eb-de1edd3334c6}true0-3right
Lucida Grande
143000255255255noborder11info276476710109{b6a1d2d0-6f91-4261-9e77-d46b08bc421c}true0-3center
Lucida Grande
143000237169107noborder11_Play466459127{7e1ef5ca-2594-48c8-abef-8c52de3f2ad9}true0-3value1.00000000START/i1 0 10falsefalse_Stop580459127{48ac72cc-9099-4bd7-8736-446ab91b48e6}true0-3value1.00000000STOP/i1 0 10falsetruevol31476925028{ac58723d-0e06-4f05-bd62-b9647a2947b0}true0-30.000000001.000000000.54800000lincontinuous-1.00000000false3497409727{687143f9-ea96-4984-8e67-5597ffa3f81d}true0-3center
Lucida Grande
143000255255255noborder11outL57974533622{56692e84-8339-4713-bedf-b81a5d5dea6b}true0-3out1_post0.000000001.000000000.000000001.00000000-4.578041290.36363600fill10.00000000jump02340false000outLover9137452722{9dbc1525-61ed-4dcc-aeb3-650eb87744db}true0-3outLover0.000000001.000000000.000000001.000000000.000000000.00000000fill10.00000000jump1961412false000outR57977133622{09a3dabb-c32b-4652-b07c-a5149e90b11b}true0-3out2_post0.000000001.000000000.000000001.00000000-4.692633880.52631600fill10.00000000jump02340false000outRover9137712722{d515ef65-7c19-46c4-a888-c5cbc4e5653c}true0-3outRover0.000000001.000000000.000000001.000000000.000000000.00000000fill10.00000000jump1961412false000vol4447409827{7e4a0ff0-63bb-41fe-a64c-41c8dc65828b}true0-3center
Lucida Grande
143000255255255noborder11447744938{460c390f-19ce-46a2-ae4e-2ca424395160}true0-3center
Lucida Grande
223000255255255noborder114307157638{321ab18e-c680-4bd3-81ae-696ef1e02fe2}true0-3left
Lucida Grande
123000255255255noborder1143110815825{1f650c2a-caaa-45d1-8405-66a7b7ab147a}true0-3left
Lucida Grande
143000255255255noborder1143113157878{c6919d13-0dde-4b29-8628-3e8f74241f42}true0-3left
Lucida Grande
123000255255255noborder1143120746627{36e69f68-86a5-436a-a774-0d64767cd5f3}true0-3left
Lucida Grande
143000255255255noborder11431233583155{41ba012c-7cc4-4060-a02e-05afaf5762b7}true0-3left
Lucida Grande
123000255255255noborder1143138758478{bf72fd7e-bb12-4d4f-acb9-d21ac8b8c3e6}true0-3left
Lucida Grande
123000255255255noborder11333422217{8fee01a4-6aff-4a18-b9d3-682fd8b62927}true0-3center
Lucida Grande
183000222143206border11sound20122016525{fcbc67a7-51c0-4ca5-94e3-98229024c81a}true00sine0saw1square2square vco23pluck44false4321616031{89a47f25-152d-40af-a3a2-0d2499bbdbc2}true0-3center
Lucida Grande
183000255255255noborder11scsel12318910423{fa1d2e5d-12c8-4900-af8a-b5a4feebf74f}true0-3vert340.000000001.000000000.000000001.000000000.000000000.43478300fill10.00000000jump02340false000scsel215418910423{39ac622a-56e3-4d32-a2e9-b8f85dbec7b3}true0-3vert340.000000001.000000000.000000001.000000001.000000000.43478300fill10.00000000jump02340false000scsel328518910423{5b35e488-40f1-4be1-9dc2-079192003890}true0-3vert340.000000001.000000000.000000001.000000000.000000000.43478300fill10.00000000jump02340false000tunfreq3134410726{c014f205-06aa-45df-be4c-8b8bb3583229}true0-3left
Lucida Grande
140002552552550.0000010011e+12false261.6252064410828{a9440b0b-595c-4c9b-b112-b55b7cd728bb}true0-3right
Lucida Grande
143000255255255noborder11227657225{04c0e64a-16bb-4ddb-b286-62d57f752e34}true0-3center
Lucida Grande
123000255255255noborder11equal_tmprd1216712624{5ee933a0-615a-4995-b661-f16a24a14150}true0-31 Halftones02 Thirdtones13 Quartertones24 Fifthtones35 Sixthtones46 Eighttones57 Twelfthtones68 Sixteenthtones79 Stockhausen Studie II810 UserDefined95false109339330{8cc05c0f-ad73-46ae-ace2-556caad97763}true0-3center
Lucida Grande
183000255255255noborder11reftone136446226{d62aecdf-74ab-43d1-a501-549e1973297c}true0-3right
Lucida Grande
140002552552551.000000000127false6084413028{88e4e2ee-f553-4356-8ea4-554dfc18d3d5}true0-3right
Lucida Grande
143000255255255noborder1186712927{d80338cb-8182-4796-a1ae-8a922f0d03cf}true0-3center
Lucida Grande
123000255255255noborder111512012147{2b882335-a79a-4ce8-b5c7-15e51e2a2c4b}true0-3center
Lucida Grande
143000255255255noborder11various14116713224{64462832-bfe5-491c-8b85-6c00f2062b17}true0-311 Pythagorean012 Zarlino 1/4 Comma113 Werckmeister III214 Kirnberger II315 Indian Sruti I416 Indian Sruti II517 User Defined618 User Defined719 User Defined820 User Defined92false14812012147{79d233f5-b289-442a-a78f-bc2a90c32392}true0-3center
Lucida Grande
143000255255255noborder11bohlen-pierce27516713624{dd3f6092-bad8-4ae1-8e90-044dab957c1d}true0-321 Equal Tempered022 Ratios123 Dur I Mode224 Dur II Mode325 Moll I (Delta) Mode426 Moll II (Pierce) Mode527 Gamma Mode628 Harmonic Mode729 Lambda Mode830 User Defined90false27812012147{6d2e6268-a18a-4196-b14c-eb4a6afada8a}true0-3center
Lucida Grande
143000255255255noborder114256261311{50c3bfda-28ab-4c5a-82c0-14459384a68a}true0-3center
Lucida Grande
183000222143206border11gm1_scale1032310825{94cd0db6-ab80-4318-ada1-489baaa49a6c}true0-31 Halftones02 Thirdtones13 Quartertones24 Fifthtones35 Sixthtones46 Eighttones57 Twelfthtones68 Sixteenthtones79 Stockhausen Studie II810 User Defined911 Pythagorean1012 Zarlino 1/4 Comma1113 Werckmeister III1214 Kirnberger II1315 Indian Sruti I1416 Indian Sruti II1517 User Defined1618 User Defined1719 User Defined1820 User Defined1921 BP Equal Tempered2022 BP Ratios2123 BP Dur I Mode2224 BP Dur II Mode2325 BP Moll I (Delta) Mode2426 BP Moll II (Pierce) Mode2527 BP Gamma Mode2628 BP Harmonic Mode2729 BP Lambda Mode2830 User Defined290falsegm1_key1243236125{4edbfe44-aa5a-4cb1-811e-817d739605e3}true0-3right
Lucida Grande
140002552552551.000000000127false36gm1_chn1883236125{7a93960a-e5d8-4940-b320-4212e941ed6b}true0-3right
Lucida Grande
140002552552551.00000000116false2182938327{34ddb657-9510-4824-b955-89185b1d6a71}true0-3center
Lucida Grande
143000255255255noborder111252935027{391a889d-de9b-4019-af3b-ae4ab68fb663}true0-3center
Lucida Grande
143000255255255noborder111812937327{b056127d-4963-413f-9b90-f3df8811af4f}true0-3center
Lucida Grande
143000255255255noborder11gm2_scale1035410825{a4ae0f35-4e5a-4480-b043-89f1256211cc}true0-31 Halftones02 Thirdtones13 Quartertones24 Fifthtones35 Sixthtones46 Eighttones57 Twelfthtones68 Sixteenthtones79 Stockhausen Studie II810 User Defined911 Pythagorean1012 Zarlino 1/4 Comma1113 Werckmeister III1214 Kirnberger II1315 Indian Sruti I1416 Indian Sruti II1517 User Defined1618 User Defined1719 User Defined1820 User Defined1921 BP Equal Tempered2022 BP Ratios2123 BP Dur I Mode2224 BP Dur II Mode2325 BP Moll I (Delta) Mode2426 BP Moll II (Pierce) Mode2527 BP Gamma Mode2628 BP Harmonic Mode2729 BP Lambda Mode2830 User Defined2911falsegm2_key1243546125{048b8812-0d96-4035-b4bb-9000b1786f02}true0-3right
Lucida Grande
140002552552551.000000000127false37gm2_chn1883546125{31698544-6623-484c-99d2-14945339d4c3}true0-3right
Lucida Grande
140002552552551.00000000116false2gm3_scale1038210825{ebc0eda5-bfae-4055-b3c1-4c45d8c0df99}true0-31 Halftones02 Thirdtones13 Quartertones24 Fifthtones35 Sixthtones46 Eighttones57 Twelfthtones68 Sixteenthtones79 Stockhausen Studie II810 User Defined911 Pythagorean1012 Zarlino 1/4 Comma1113 Werckmeister III1214 Kirnberger II1315 Indian Sruti I1416 Indian Sruti II1517 User Defined1618 User Defined1719 User Defined1820 User Defined1921 BP Equal Tempered2022 BP Ratios2123 BP Dur I Mode2224 BP Dur II Mode2325 BP Moll I Mode2426 BP Moll II Mode2527 BP Gamma Mode2628 BP Harmonic Mode2729 BP Lambda Mode2830 User Defined2920falsegm3_key1243826125{7d8605f3-241c-4e8e-8e8d-df51359091ac}true0-3right
Lucida Grande
140002552552551.000000000127false38gm3_chn1883826125{8ac519ad-9dfa-44f3-82a4-a55c607e29c2}true0-3right
Lucida Grande
140002552552551.00000000116false2gm4_scale1041310825{3a87415d-126b-4a43-80dd-cb5f8f076713}true0-31 Halftones02 Thirdtones13 Quartertones24 Fifthtones35 Sixthtones46 Eighttones57 Twelfthtones68 Sixteenthtones79 Stockhausen Studie II810 User Defined911 Pythagorean1012 Zarlino 1/4 Comma1113 Werckmeister III1214 Kirnberger II1315 Indian Sruti I1416 Indian Sruti II1517 User Defined1618 User Defined1719 User Defined1820 User Defined1921 BP Equal Tempered2022 BP Ratios2123 BP Dur I Mode2224 BP Dur II Mode2325 BP Moll I (Delta) Mode2426 BP Moll II (Pierce) Mode2527 BP Gamma Mode2628 BP Harmonic Mode2729 BP Lambda Mode2830 User Defined292falsegm4_key1244136125{316bb9bd-fb55-4852-b227-dad4cd7794b9}true0-3right
Lucida Grande
140002552552551.000000000127false40gm4_chn1884136125{1807bde7-43ce-4994-b20c-ade301dbfc88}true0-3right
Lucida Grande
140002552552551.00000000116false2gm5_scale1044110825{274ebd83-0d72-4a70-ad7b-8473364c9392}true0-31 Halftones02 Thirdtones13 Quartertones24 Fifthtones35 Sixthtones46 Eighttones57 Twelfthtones68 Sixteenthtones79 Stockhausen Studie II810 User Defined911 Pythagorean1012 Zarlino 1/4 Comma1113 Werckmeister III1214 Kirnberger II1315 Indian Sruti I1416 Indian Sruti II1517 User Defined1618 User Defined1719 User Defined1820 User Defined1921 BP Equal Tempered2022 BP Ratios2123 BP Dur I Mode2224 BP Dur II Mode2325 BP Moll I Mode2426 BP Moll II Mode2527 BP Gamma Mode2628 BP Harmonic Mode2729 BP Lambda Mode2830 User Defined2925falsegm5_key1244416125{67a7e03e-f0ad-4092-b182-7361c1b7bd78}true0-3right
Lucida Grande
140002552552551.000000000127false41gm5_chn1884416125{f146f09c-4288-4042-8561-6e27cb9e4eff}true0-3right
Lucida Grande
140002552552551.00000000116false2gm6_scale1047210825{d34a9233-6773-44c6-b327-2b93b34f9aa7}true0-31 Halftones02 Thirdtones13 Quartertones24 Fifthtones35 Sixthtones46 Eighttones57 Twelfthtones68 Sixteenthtones79 Stockhausen Studie II810 User Defined911 Pythagorean1012 Zarlino 1/4 Comma1113 Werckmeister III1214 Kirnberger II1315 Indian Sruti I1416 Indian Sruti II1517 User Defined1618 User Defined1719 User Defined1820 User Defined1921 BP Equal Tempered2022 BP Ratios2123 BP Dur I Mode2224 BP Dur II Mode2325 BP Moll I (Delta) Mode2426 BP Moll II (Pierce) Mode2527 BP Gamma Mode2628 BP Harmonic Mode2729 BP Lambda Mode2830 User Defined2910falsegm6_key1244726125{654afdbe-6baf-4630-baf9-583b50e9e93f}true0-3right
Lucida Grande
140002552552551.000000000127false43gm6_chn1884726125{370d1312-dc97-4f4b-91c9-fd439ad33c63}true0-3right
Lucida Grande
140002552552551.00000000116false2gm7_scale1050010825{551dd85c-08f1-4aee-90c3-03ce89cdeae1}true0-31 Halftones02 Thirdtones13 Quartertones24 Fifthtones35 Sixthtones46 Eighttones57 Twelfthtones68 Sixteenthtones79 Stockhausen Studie II810 User Defined911 Pythagorean1012 Zarlino 1/4 Comma1113 Werckmeister III1214 Kirnberger II1315 Indian Sruti I1416 Indian Sruti II1517 User Defined1618 User Defined1719 User Defined1820 User Defined1921 BP Equal Tempered2022 BP Ratios2123 BP Dur I Mode2224 BP Dur II Mode2325 BP Moll I (Delta) Mode2426 BP Moll II (Pierce) Mode2527 BP Gamma Mode2628 BP Harmonic Mode2729 BP Lambda Mode2830 User Defined2912falsegm7_key1245006125{2c4c42b0-7616-4e5a-acb9-1fd5bfb6378c}true0-3right
Lucida Grande
140002552552551.000000000127false45gm7_chn1885006125{0784db53-0760-4631-a367-64f2eb53dabf}true0-3right
Lucida Grande
140002552552551.00000000116false2gm8_scale1053110825{b9e13efc-7de6-4c27-94b5-35d922782236}true0-31 Halftones02 Thirdtones13 Quartertones24 Fifthtones35 Sixthtones46 Eighttones57 Twelfthtones68 Sixteenthtones79 Stockhausen Studie II810 User Defined911 Pythagorean1012 Zarlino 1/4 Comma1113 Werckmeister III1214 Kirnberger II1315 Indian Sruti I1416 Indian Sruti II1517 User Defined1618 User Defined1719 User Defined1820 User Defined1921 BP Equal Tempered2022 BP Ratios2123 BP Dur I Mode2224 BP Dur II Mode2325 BP Moll I (Delta) Mode2426 BP Moll II (Pierce) Mode2527 BP Gamma Mode2628 BP Harmonic Mode2729 BP Lambda Mode2830 User Defined294falsegm8_key1245316125{7f6a41d8-2c24-4e30-a513-a0c8576a9673}true0-3right
Lucida Grande
140002552552551.000000000127false47gm8_chn1885316125{74754e99-71ea-4e0b-a34b-ad9ae57445a1}true0-3right
Lucida Grande
140002552552551.00000000116false2926325231{61aaff8a-e262-49a0-b834-8e124e9340e4}true0-3center
Lucida Grande
183000255255255noborder112597261201{764f7fce-c3ca-4869-a1f4-90a5bd098426}true0-3center
Lucida Grande
143000255255255border11wdmix5264216028{05f629ba-fed7-41ac-9efd-f1614cf08fa9}true0-30.000000001.000000000.43125000lincontinuous-1.00000000false36434925{e522ff72-282b-4b83-948a-952b9d2b7664}true0-3center
Lucida Grande
123000255255255noborder112126444825{a556f13f-b772-4baf-8d29-b4d955f36bda}true0-3center
Lucida Grande
123000255255255noborder117361910924{2b72ce0e-23e3-4903-a4be-3d1c03bf14f9}true0-3center
Lucida Grande
123000255255255noborder11roomsize5169416130{c92bd11e-57a8-4b00-a2f0-5172e2382e8f}true0-30.000000001.000000000.42857143lincontinuous-1.00000000false16965025{f955e85e-6c4d-4908-9710-c3d6559a5408}true0-3center
Lucida Grande
123000255255255noborder112106965224{aadcb08e-dfaf-47c2-b913-19bd09dd0e5f}true0-3center
Lucida Grande
123000255255255noborder117267011024{094b23b0-6d2a-4f79-b03f-8a7473b41956}true0-3center
Lucida Grande
123000255255255noborder11hfdamp4675316031{6f8db5c1-b0b6-4740-ae4c-b32b0d6b2b9c}true0-30.000000001.000000000.36875000lincontinuous-1.00000000false27564426{615df0d8-51da-4a6f-82dd-6360b33f98ad}true0-3center
Lucida Grande
123000255255255noborder112047575925{2bfde5cc-dc42-4add-a9ec-1346575f5f53}true0-3center
Lucida Grande
123000255255255noborder114072317530{c8577a79-24bc-4075-8d88-d66383ea66ce}true0-3center
Lucida Grande
103000255255255noborder11scale111565122024{41924a59-97b1-43bc-8481-d36acf53cc47}true0-3left
Lucida Grande
143000206206206nobackground10185013826{47e38419-62ba-460b-a267-7cf6da2f961e}true0-3left
Lucida Grande
123000255255255noborder11scale211567522024{148c7136-1bf7-4c90-839e-2a2687c7773f}true0-3left
Lucida Grande
143000206206206nobackground10187513826{ca945a81-40a8-49e4-b4ce-f3c440c2b42f}true0-3left
Lucida Grande
123000255255255noborder11scale311569922024{b4667509-0101-4453-8b9b-fe8920cbcf93}true0-3left
Lucida Grande
143000206206206nobackground10189913826{726509f4-50ff-4564-9e2a-b1c786b962f7}true0-3left
Lucida Grande
123000255255255noborder11scale4115612422024{3a86087a-c910-4e2d-8aa8-06078cbd63b6}true0-3left
Lucida Grande
143000206206206nobackground101812413826{0025791b-f77a-439a-b39e-7c9ff252c8b3}true0-3left
Lucida Grande
123000255255255noborder11scale5115614822024{5db08c35-cf97-4111-8f52-fb05460e4e0d}true0-3left
Lucida Grande
143000206206206nobackground101814813826{a31c3cf5-4e7d-4314-8700-fbf3badf98c3}true0-3left
Lucida Grande
123000255255255noborder11scale6115617322024{4127e44d-5013-4b66-95f1-d0c0a42fd1bc}true0-3left
Lucida Grande
143000206206206nobackground101817313826{cfb79d3e-2555-43a6-af4c-9289b9673791}true0-3left
Lucida Grande
123000255255255noborder11scale7115619722024{bf4933e2-13b2-4c42-a4a8-e40cb672cb81}true0-3left
Lucida Grande
143000206206206nobackground101819713826{5d94d8ff-6383-4486-9dca-41d0c51deab0}true0-3left
Lucida Grande
123000255255255noborder11scale8115622222024{1af2b968-3f9d-4b8a-895d-ce312149c3b3}true0-3left
Lucida Grande
143000206206206nobackground101822213826{a1abea1c-f33e-4dd9-9c64-677f4b8cfddc}true0-3left
Lucida Grande
123000255255255noborder11scale9115624522024{5db50544-26b2-47b2-b93e-6b028c94b79d}true0-3left
Lucida Grande
143000206206206nobackground101824513826{a43bea2e-a2ee-4004-ac9e-002877d3c6ed}true0-3left
Lucida Grande
123000255255255noborder11scale10115627022024{166d0f00-2be7-413d-93f9-f24f6e03aed6}true0-3left
Lucida Grande
143000206206206nobackground101827013826{0ff548f1-c6b9-42e2-a499-e16f8849045f}true0-3left
Lucida Grande
123000255255255noborder11scale11115629422024{b5593333-b902-4ce2-b4fa-5f516ea3ff23}true0-3left
Lucida Grande
143000206206206nobackground101829413826{a423fbc0-cc68-4629-85aa-8f481b3139f2}true0-3left
Lucida Grande
123000255255255noborder11scale12115631922024{ead660d7-fc87-4ee7-a4b9-072d057c2aa4}true0-3left
Lucida Grande
143000206206206nobackground101831913826{2cf5d943-5bcf-4661-b338-b9721e7c8917}true0-3left
Lucida Grande
123000255255255noborder11scale13115634322024{3a058ccc-fa3d-407e-9bc7-8245f6b0965a}true0-3left
Lucida Grande
143000206206206nobackground101834313826{e5546b76-099b-47b8-a13e-5ba6a491495b}true0-3left
Lucida Grande
123000255255255noborder11scale14115636822024{8ae1ce39-54d9-406a-8ebd-caf9510bcac6}true0-3left
Lucida Grande
143000206206206nobackground101836813826{e2aaccf0-a0d3-4dbd-a237-019cf77d605c}true0-3left
Lucida Grande
123000255255255noborder11scale15115639222024{9c571518-20fb-4b2f-a3d3-91248bcad372}true0-3left
Lucida Grande
143000206206206nobackground101839213826{afd9fdfe-7be2-40c3-9421-3e22df9c8c8e}true0-3left
Lucida Grande
123000255255255noborder11scale16115641722024{4cea0667-fa01-4b06-9009-34485bfe62a8}true00left
DejaVu Sans
143000206206206nobackground101841713826{12c5d630-064d-4b8a-89b6-cb167158fb41}true0-3left
Lucida Grande
123000255255255noborder11scale17115644022024{da80b6f0-7db6-4c30-b796-0bb35da95d0d}true0-3left
Lucida Grande
143000206206206nobackground101844013826{d4445e61-4c3d-4dc8-a198-e3c2ac272655}true0-3left
Lucida Grande
123000255255255noborder11scale18115646522024{bf20c58c-cda9-4281-9d33-dfe23868ead1}true0-3left
Lucida Grande
143000206206206nobackground101846513826{328ce731-1a06-48ee-921c-93e55971f145}true0-3left
Lucida Grande
123000255255255noborder11scale19115648922024{83143afb-dfdc-4d2b-9992-c88ce0f6a2dc}true0-3left
Lucida Grande
143000206206206nobackground101848913826{5ac37219-6934-4896-8ef6-f586e712a2f9}true0-3left
Lucida Grande
123000255255255noborder11scale20115651422024{20e8cf37-0ac9-4450-8dd4-b70c5a6aaeb6}true0-3left
Lucida Grande
143000206206206nobackground101851413826{42d0d5df-6975-4cd5-809d-e3560fb76be6}true0-3left
Lucida Grande
123000255255255noborder11scale21115653822024{0a8fe8ca-3efe-4f22-a7ad-999b94cb4178}true0-3left
Lucida Grande
143000206206206nobackground101853813826{29d5a91d-ed88-4bb5-9fcf-2f5ab99477c6}true0-3left
Lucida Grande
123000255255255noborder11scale22115656322024{264738ea-cb2b-4cc5-be17-ac17ea7f337e}true0-3left
Lucida Grande
143000206206206nobackground101856313826{9af90ad2-5c07-43f9-87b8-5a711a9096e4}true0-3left
Lucida Grande
123000255255255noborder11scale23115658622024{d0a3b549-3434-449b-949e-36e0d509ffff}true0-3left
Lucida Grande
143000206206206nobackground101858613826{2ad8b869-ec31-45a3-8767-f44237a1d126}true0-3left
Lucida Grande
123000255255255noborder11scale24115661122024{fa85f026-2fc3-4e31-90fb-16f0f53136ad}true0-3left
Lucida Grande
143000206206206nobackground101861113826{af80d63e-d5eb-4adb-982c-4b00237e6160}true0-3left
Lucida Grande
123000255255255noborder11scale25115663522024{43124faa-e689-4af2-b29f-cdf06b58e766}true0-3left
Lucida Grande
143000206206206nobackground101863513826{bd925631-99bd-42d0-8134-b2d27f0e380b}true0-3left
Lucida Grande
123000255255255noborder11scale26115666022024{f5dabc23-5f3c-465a-a0d5-ee9ce9955943}true0-3left
Lucida Grande
143000206206206nobackground101866013826{7cf4bea9-f231-4db8-bf51-81bf6fa24d06}true0-3left
Lucida Grande
123000255255255noborder11scale27115668422024{3d8a2466-18ca-48e3-94d8-e349a7814f97}true0-3left
Lucida Grande
143000206206206nobackground101868413826{675ca19b-cf4f-46c8-ab64-b606dea3a710}true0-3left
Lucida Grande
123000255255255noborder11scale28115670922024{3768fb29-0b74-4640-b7f3-c45c95d3fb1f}true0-3left
Lucida Grande
143000206206206nobackground101870913826{c2485292-109a-4afd-bf12-667a05984b7e}true0-3left
Lucida Grande
123000255255255noborder11scale29115673322024{644240e6-34ce-44c0-afe9-5c5733c98ef7}true0-3left
Lucida Grande
143000206206206nobackground101873313826{e3d2642a-6c5b-425e-9b42-83ba92498712}true0-3left
Lucida Grande
123000255255255noborder11scale30115675822024{699ad52a-6334-4c81-85ed-b0c0c62dff8b}true00left
DejaVu Sans
143000206206206nobackground101875813826{cb60f824-d334-4897-b678-8600ac4a0ede}true0-3left
Lucida Grande
123000255255255noborder1126737516293{30bb34d6-d258-4378-bd08-c2a4a8cd442d}true0-3left
Arial
103000255255255border1127037815659{834120d4-1a7f-401e-8671-9257529f95cc}true00center
DejaVu Sans
123000255255255noborder11new29743610030{4c65b8b1-6b84-49b5-9b41-86f4796e4005}true00value1.00000000New Values!/i1 0 10falsefalse268257161111{6494ec80-5dcf-4335-ba2d-99aa2e2f31cd}true0-3left
Arial
103000255255255border1127726513725{39a0c8be-fb8f-4a5e-9c79-f8694e516142}true0-3center
Lucida Grande
123000255255255noborder11midi_event27828813771{b0139093-9747-4da9-aaf1-848c9c3b7589}true0-3center
Lucida Grande
123000255255255noborder11i "play" 0 1 60
i "play" 1 1 62
i "play" 2 1 64
i "play" 3 1 65
i "play" 4 1 67