mirror of
https://github.com/thestk/stk
synced 2026-01-11 20:11:52 +00:00
Added new Recorder class, fixed bug in StifKarp.
This commit is contained in:
@@ -10,13 +10,13 @@ vpath %.o $(OBJECT_PATH)
|
||||
OBJECTS = Stk.o Noise.o Envelope.o ADSR.o \
|
||||
Modulate.o SingWave.o SineWave.o FileRead.o FileWrite.o \
|
||||
FileWvIn.o FileLoop.o FileWvOut.o \
|
||||
OneZero.o OnePole.o PoleZero.o TwoZero.o Fir.o \
|
||||
OneZero.o OnePole.o PoleZero.o TwoZero.o Fir.o Iir.o \
|
||||
BiQuad.o FormSwep.o Delay.o DelayL.o DelayA.o \
|
||||
ReedTable.o JetTable.o BowTable.o \
|
||||
JCRev.o \
|
||||
Voicer.o Vector3D.o Sphere.o Twang.o \
|
||||
\
|
||||
Clarinet.o BlowHole.o Saxofony.o Flute.o Brass.o BlowBotl.o \
|
||||
Clarinet.o BlowHole.o Saxofony.o Flute.o Brass.o BlowBotl.o Recorder.o \
|
||||
Bowed.o Plucked.o StifKarp.o Sitar.o PluckTwo.o Mandolin.o Mesh2D.o \
|
||||
FM.o Rhodey.o Wurley.o TubeBell.o HevyMetl.o PercFlut.o BeeThree.o FMVoices.o \
|
||||
Sampler.o Moog.o Simple.o Drummer.o Shakers.o \
|
||||
|
||||
@@ -151,6 +151,8 @@ menu .menu.instrument -tearoff 0
|
||||
-value 2600 -command { patchChange $patchnum }
|
||||
.menu.instrument add radio -label "Police Whistle" -variable patchnum \
|
||||
-value 2700 -command { patchChange $patchnum }
|
||||
.menu.instrument add radio -label "Recorder" -variable patchnum \
|
||||
-value 2800 -command { patchChange $patchnum }
|
||||
|
||||
. configure -menu .menu
|
||||
|
||||
@@ -744,6 +746,23 @@ proc patchChange {value} {
|
||||
printWhatz "ControlChange 0.0 1 " 2 $cont2
|
||||
flush stdout
|
||||
}
|
||||
if {$program==28} { # Recorder
|
||||
.pretty config -bitmap @$bitmappath/KFloot.xbm
|
||||
.left.bPressure config -state normal -label "Breath Pressure"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state normal -label "Softness"
|
||||
.right.cont4 config -state normal -label "Breath Noise"
|
||||
.right.cont11 config -state normal -label "Vibrato Rate"
|
||||
.right.cont1 config -state normal -label "Vibrato Amount"
|
||||
set cont1 10.0
|
||||
set cont2 64.0
|
||||
set cont4 40.0
|
||||
set cont11 64.0
|
||||
printWhatz "ControlChange 0.0 1 " 1 $cont1
|
||||
printWhatz "ControlChange 0.0 1 " 2 $cont2
|
||||
printWhatz "ControlChange 0.0 1 " 4 $cont4
|
||||
printWhatz "ControlChange 0.0 1 " 11 $cont11
|
||||
}
|
||||
set oldpatch $value
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,8 @@ radiobutton .radios2.sitr -text "Sitar" -bg grey66 \
|
||||
-variable patchnum -value 9 -command { patchChange $patchnum }
|
||||
radiobutton .radios2.mand -text "Mandolin" -bg grey66 \
|
||||
-variable patchnum -value 10 -command { patchChange $patchnum }
|
||||
radiobutton .radios2.recdr -text "Recorder" -bg grey66 \
|
||||
-variable patchnum -value 28 -command { patchChange $patchnum }
|
||||
|
||||
pack .radios1.clar -side left -padx 5 -pady 10
|
||||
pack .radios1.hole -side left -padx 5 -pady 10
|
||||
@@ -55,6 +57,7 @@ pack .radios2.pluk -side left -padx 5 -pady 10
|
||||
pack .radios2.karp -side left -padx 5 -pady 10
|
||||
pack .radios2.sitr -side left -padx 5 -pady 10
|
||||
pack .radios2.mand -side left -padx 5 -pady 10
|
||||
pack .radios2.recdr -side left -padx 5 -pady 10
|
||||
|
||||
pack .radios1
|
||||
pack .radios2
|
||||
@@ -169,178 +172,195 @@ proc noteOff {pitchVal pressVal} {
|
||||
proc patchChange {value} {
|
||||
global bitmappath cont1 cont2 cont4 cont11 pitch oldpatch
|
||||
puts [format "ProgramChange 0.0 1 %i" $value]
|
||||
if {$value==0} { # Clarinet
|
||||
.pretty config -bitmap @$bitmappath/Klar.xbm
|
||||
.left.bPressure config -state normal -label "Breath Pressure"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state normal -label "Reed Stiffness"
|
||||
.right.cont4 config -state normal -label "Breath Noise"
|
||||
.right.cont11 config -state normal -label "Vibrato Rate"
|
||||
.right.cont1 config -state normal -label "Vibrato Amount"
|
||||
set cont1 20.0
|
||||
set cont2 64.0
|
||||
set cont4 20.0
|
||||
set cont11 64.0
|
||||
printWhatz "ControlChange 0.0 1 " 1 $cont1
|
||||
printWhatz "ControlChange 0.0 1 " 2 $cont2
|
||||
printWhatz "ControlChange 0.0 1 " 4 $cont4
|
||||
printWhatz "ControlChange 0.0 1 " 11 $cont11
|
||||
}
|
||||
if {$value==1} { # BlowHole
|
||||
.pretty config -bitmap @$bitmappath/Klar.xbm
|
||||
.left.bPressure config -state normal -label "Breath Pressure"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state normal -label "Reed Stiffness"
|
||||
.right.cont4 config -state normal -label "Breath Noise"
|
||||
.right.cont11 config -state normal -label "Tonehole Openness"
|
||||
.right.cont1 config -state normal -label "Register Vent Openness"
|
||||
set cont1 0.0
|
||||
set cont2 64.0
|
||||
set cont4 20.0
|
||||
set cont11 0.0
|
||||
printWhatz "ControlChange 0.0 1 " 1 $cont1
|
||||
printWhatz "ControlChange 0.0 1 " 2 $cont2
|
||||
printWhatz "ControlChange 0.0 1 " 4 $cont4
|
||||
printWhatz "ControlChange 0.0 1 " 11 $cont11
|
||||
}
|
||||
if {$value==2} { # Saxofony
|
||||
.pretty config -bitmap @$bitmappath/prcFunny.xbm
|
||||
.left.bPressure config -state normal -label "Breath Pressure"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state normal -label "Reed Stiffness"
|
||||
.right.cont4 config -state normal -label "Breath Noise"
|
||||
.right.cont11 config -state normal -label "Blow Position"
|
||||
.right.cont1 config -state normal -label "Vibrato Amount"
|
||||
set cont1 20.0
|
||||
set cont2 64.0
|
||||
set cont4 20.0
|
||||
set cont11 26.0
|
||||
printWhatz "ControlChange 0.0 1 " 1 $cont1
|
||||
printWhatz "ControlChange 0.0 1 " 2 $cont2
|
||||
printWhatz "ControlChange 0.0 1 " 4 $cont4
|
||||
printWhatz "ControlChange 0.0 1 " 11 $cont11
|
||||
}
|
||||
if {$value==3} { # Flute
|
||||
.pretty config -bitmap @$bitmappath/KFloot.xbm
|
||||
.left.bPressure config -state normal -label "Breath Pressure"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state normal -label "Embouchure Adjustment"
|
||||
.right.cont4 config -state normal -label "Breath Noise"
|
||||
.right.cont11 config -state normal -label "Vibrato Rate"
|
||||
.right.cont1 config -state normal -label "Vibrato Amount"
|
||||
set cont1 20.0
|
||||
set cont2 64.0
|
||||
set cont4 20.0
|
||||
set cont11 64.0
|
||||
printWhatz "ControlChange 0.0 1 " 1 $cont1
|
||||
printWhatz "ControlChange 0.0 1 " 2 $cont2
|
||||
printWhatz "ControlChange 0.0 1 " 4 $cont4
|
||||
printWhatz "ControlChange 0.0 1 " 11 $cont11
|
||||
}
|
||||
if {$value==4} { # Brass
|
||||
.pretty config -bitmap @$bitmappath/KHose.xbm
|
||||
.left.bPressure config -state normal -label "Breath Pressure"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state normal -label "Lip Adjustment"
|
||||
.right.cont4 config -state normal -label "Slide Length"
|
||||
.right.cont11 config -state normal -label "Vibrato Rate"
|
||||
.right.cont1 config -state normal -label "Vibrato Amount"
|
||||
set cont1 0.0
|
||||
set cont2 64.0
|
||||
set cont4 20.0
|
||||
set cont11 64.0
|
||||
set press 80.0
|
||||
printWhatz "ControlChange 0.0 1 " 1 $cont1
|
||||
printWhatz "ControlChange 0.0 1 " 2 $cont2
|
||||
printWhatz "ControlChange 0.0 1 " 4 $cont4
|
||||
printWhatz "ControlChange 0.0 1 " 11 $cont11
|
||||
puts [format "NoteOn 0.0 1 %3.2f %3.2f" $pitch $press]
|
||||
}
|
||||
if {$value==5} { # Bottle
|
||||
.pretty config -bitmap @$bitmappath/prcFunny.xbm
|
||||
.left.bPressure config -state normal -label "Breath Pressure"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state disabled -label "Disabled"
|
||||
.right.cont4 config -state normal -label "Breath Noise"
|
||||
.right.cont11 config -state normal -label "Vibrato Rate"
|
||||
.right.cont1 config -state normal -label "Vibrato Amount"
|
||||
set cont1 20.0
|
||||
set cont4 20.0
|
||||
set cont11 64.0
|
||||
printWhatz "ControlChange 0.0 1 " 1 $cont1
|
||||
printWhatz "ControlChange 0.0 1 " 4 $cont4
|
||||
printWhatz "ControlChange 0.0 1 " 11 $cont11
|
||||
}
|
||||
if {$value==6} { # Bowed String
|
||||
.pretty config -bitmap @$bitmappath/KFiddl.xbm
|
||||
.left.bPressure config -state normal -label "Volume"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state normal -label "Bow Pressure"
|
||||
.right.cont4 config -state normal -label "Bow Position"
|
||||
.right.cont11 config -state normal -label "Vibrato Rate"
|
||||
.right.cont1 config -state normal -label "Vibrato Amount"
|
||||
set cont1 4.0
|
||||
set cont2 64.0
|
||||
set cont4 24.0
|
||||
set cont11 64.0
|
||||
printWhatz "ControlChange 0.0 1 " 1 $cont1
|
||||
printWhatz "ControlChange 0.0 1 " 2 $cont2
|
||||
printWhatz "ControlChange 0.0 1 " 4 $cont4
|
||||
printWhatz "ControlChange 0.0 1 " 11 $cont11
|
||||
}
|
||||
if {$value==7} { # Yer Basic Pluck
|
||||
.pretty config -bitmap @$bitmappath/KPluk.xbm
|
||||
.left.bPressure config -state normal -label "Pluck Strength"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state disabled -label "Disabled"
|
||||
.right.cont4 config -state disabled -label "Disabled"
|
||||
.right.cont11 config -state disabled -label "Disabled"
|
||||
.right.cont1 config -state disabled -label "Disabled"
|
||||
}
|
||||
if {$value==8} { # Stiff String
|
||||
.pretty config -bitmap @$bitmappath/KPluk.xbm
|
||||
.left.bPressure config -state normal -label "Pluck Strength"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state disabled -label "Disabled"
|
||||
.right.cont4 config -state normal -label "Pickup Position"
|
||||
.right.cont11 config -state normal -label "String Sustain"
|
||||
.right.cont1 config -state normal -label "String Stretch"
|
||||
set cont1 10.0
|
||||
set cont4 64.0
|
||||
set cont11 96.0
|
||||
printWhatz "ControlChange 0.0 1 " 1 $cont1
|
||||
printWhatz "ControlChange 0.0 1 " 4 $cont4
|
||||
printWhatz "ControlChange 0.0 1 " 11 $cont11
|
||||
}
|
||||
if {$value==9} { # Sitar
|
||||
.pretty config -bitmap @$bitmappath/KPluk.xbm
|
||||
.left.bPressure config -state normal -label "Pluck Strength"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state disabled -label "Disabled"
|
||||
.right.cont4 config -state disabled -label "Disabled"
|
||||
.right.cont11 config -state disabled -label "Disabled"
|
||||
.right.cont1 config -state disabled -label "Disabled"
|
||||
}
|
||||
if {$value==10} { # Mandolin
|
||||
.pretty config -bitmap @$bitmappath/KPluk.xbm
|
||||
.left.bPressure config -state normal -label "Microphone Position and Gain"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state normal -label "Mandolin Body Size"
|
||||
.right.cont4 config -state normal -label "Pick Position"
|
||||
.right.cont11 config -state normal -label "String Sustain"
|
||||
.right.cont1 config -state normal -label "String Detune"
|
||||
set cont1 10.0
|
||||
set cont2 64.0
|
||||
set cont4 64.0
|
||||
set cont11 96.0
|
||||
set press 64.0
|
||||
printWhatz "ControlChange 0.0 1 " 1 $cont1
|
||||
printWhatz "ControlChange 0.0 1 " 2 $cont2
|
||||
printWhatz "ControlChange 0.0 1 " 4 $cont4
|
||||
printWhatz "ControlChange 0.0 1 " 11 $cont11
|
||||
changePress $press
|
||||
}
|
||||
set oldpatch $value
|
||||
if {$value==0} { # Clarinet
|
||||
.pretty config -bitmap @$bitmappath/Klar.xbm
|
||||
.left.bPressure config -state normal -label "Breath Pressure"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state normal -label "Reed Stiffness"
|
||||
.right.cont4 config -state normal -label "Breath Noise"
|
||||
.right.cont11 config -state normal -label "Vibrato Rate"
|
||||
.right.cont1 config -state normal -label "Vibrato Amount"
|
||||
set cont1 20.0
|
||||
set cont2 64.0
|
||||
set cont4 20.0
|
||||
set cont11 64.0
|
||||
printWhatz "ControlChange 0.0 1 " 1 $cont1
|
||||
printWhatz "ControlChange 0.0 1 " 2 $cont2
|
||||
printWhatz "ControlChange 0.0 1 " 4 $cont4
|
||||
printWhatz "ControlChange 0.0 1 " 11 $cont11
|
||||
}
|
||||
if {$value==1} { # BlowHole
|
||||
.pretty config -bitmap @$bitmappath/Klar.xbm
|
||||
.left.bPressure config -state normal -label "Breath Pressure"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state normal -label "Reed Stiffness"
|
||||
.right.cont4 config -state normal -label "Breath Noise"
|
||||
.right.cont11 config -state normal -label "Tonehole Openness"
|
||||
.right.cont1 config -state normal -label "Register Vent Openness"
|
||||
set cont1 0.0
|
||||
set cont2 64.0
|
||||
set cont4 20.0
|
||||
set cont11 0.0
|
||||
printWhatz "ControlChange 0.0 1 " 1 $cont1
|
||||
printWhatz "ControlChange 0.0 1 " 2 $cont2
|
||||
printWhatz "ControlChange 0.0 1 " 4 $cont4
|
||||
printWhatz "ControlChange 0.0 1 " 11 $cont11
|
||||
}
|
||||
if {$value==2} { # Saxofony
|
||||
.pretty config -bitmap @$bitmappath/prcFunny.xbm
|
||||
.left.bPressure config -state normal -label "Breath Pressure"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state normal -label "Reed Stiffness"
|
||||
.right.cont4 config -state normal -label "Breath Noise"
|
||||
.right.cont11 config -state normal -label "Blow Position"
|
||||
.right.cont1 config -state normal -label "Vibrato Amount"
|
||||
set cont1 20.0
|
||||
set cont2 64.0
|
||||
set cont4 20.0
|
||||
set cont11 26.0
|
||||
printWhatz "ControlChange 0.0 1 " 1 $cont1
|
||||
printWhatz "ControlChange 0.0 1 " 2 $cont2
|
||||
printWhatz "ControlChange 0.0 1 " 4 $cont4
|
||||
printWhatz "ControlChange 0.0 1 " 11 $cont11
|
||||
}
|
||||
if {$value==3} { # Flute
|
||||
.pretty config -bitmap @$bitmappath/KFloot.xbm
|
||||
.left.bPressure config -state normal -label "Breath Pressure"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state normal -label "Embouchure Adjustment"
|
||||
.right.cont4 config -state normal -label "Breath Noise"
|
||||
.right.cont11 config -state normal -label "Vibrato Rate"
|
||||
.right.cont1 config -state normal -label "Vibrato Amount"
|
||||
set cont1 20.0
|
||||
set cont2 64.0
|
||||
set cont4 20.0
|
||||
set cont11 64.0
|
||||
printWhatz "ControlChange 0.0 1 " 1 $cont1
|
||||
printWhatz "ControlChange 0.0 1 " 2 $cont2
|
||||
printWhatz "ControlChange 0.0 1 " 4 $cont4
|
||||
printWhatz "ControlChange 0.0 1 " 11 $cont11
|
||||
}
|
||||
if {$value==4} { # Brass
|
||||
.pretty config -bitmap @$bitmappath/KHose.xbm
|
||||
.left.bPressure config -state normal -label "Breath Pressure"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state normal -label "Lip Adjustment"
|
||||
.right.cont4 config -state normal -label "Slide Length"
|
||||
.right.cont11 config -state normal -label "Vibrato Rate"
|
||||
.right.cont1 config -state normal -label "Vibrato Amount"
|
||||
set cont1 0.0
|
||||
set cont2 64.0
|
||||
set cont4 20.0
|
||||
set cont11 64.0
|
||||
set press 80.0
|
||||
printWhatz "ControlChange 0.0 1 " 1 $cont1
|
||||
printWhatz "ControlChange 0.0 1 " 2 $cont2
|
||||
printWhatz "ControlChange 0.0 1 " 4 $cont4
|
||||
printWhatz "ControlChange 0.0 1 " 11 $cont11
|
||||
puts [format "NoteOn 0.0 1 %3.2f %3.2f" $pitch $press]
|
||||
}
|
||||
if {$value==5} { # Bottle
|
||||
.pretty config -bitmap @$bitmappath/prcFunny.xbm
|
||||
.left.bPressure config -state normal -label "Breath Pressure"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state disabled -label "Disabled"
|
||||
.right.cont4 config -state normal -label "Breath Noise"
|
||||
.right.cont11 config -state normal -label "Vibrato Rate"
|
||||
.right.cont1 config -state normal -label "Vibrato Amount"
|
||||
set cont1 20.0
|
||||
set cont4 20.0
|
||||
set cont11 64.0
|
||||
printWhatz "ControlChange 0.0 1 " 1 $cont1
|
||||
printWhatz "ControlChange 0.0 1 " 4 $cont4
|
||||
printWhatz "ControlChange 0.0 1 " 11 $cont11
|
||||
}
|
||||
if {$value==6} { # Bowed String
|
||||
.pretty config -bitmap @$bitmappath/KFiddl.xbm
|
||||
.left.bPressure config -state normal -label "Volume"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state normal -label "Bow Pressure"
|
||||
.right.cont4 config -state normal -label "Bow Position"
|
||||
.right.cont11 config -state normal -label "Vibrato Rate"
|
||||
.right.cont1 config -state normal -label "Vibrato Amount"
|
||||
set cont1 4.0
|
||||
set cont2 64.0
|
||||
set cont4 24.0
|
||||
set cont11 64.0
|
||||
printWhatz "ControlChange 0.0 1 " 1 $cont1
|
||||
printWhatz "ControlChange 0.0 1 " 2 $cont2
|
||||
printWhatz "ControlChange 0.0 1 " 4 $cont4
|
||||
printWhatz "ControlChange 0.0 1 " 11 $cont11
|
||||
}
|
||||
if {$value==7} { # Yer Basic Pluck
|
||||
.pretty config -bitmap @$bitmappath/KPluk.xbm
|
||||
.left.bPressure config -state normal -label "Pluck Strength"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state disabled -label "Disabled"
|
||||
.right.cont4 config -state disabled -label "Disabled"
|
||||
.right.cont11 config -state disabled -label "Disabled"
|
||||
.right.cont1 config -state disabled -label "Disabled"
|
||||
}
|
||||
if {$value==8} { # Stiff String
|
||||
.pretty config -bitmap @$bitmappath/KPluk.xbm
|
||||
.left.bPressure config -state normal -label "Pluck Strength"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state disabled -label "Disabled"
|
||||
.right.cont4 config -state normal -label "Pickup Position"
|
||||
.right.cont11 config -state normal -label "String Sustain"
|
||||
.right.cont1 config -state normal -label "String Stretch"
|
||||
set cont1 10.0
|
||||
set cont4 64.0
|
||||
set cont11 96.0
|
||||
printWhatz "ControlChange 0.0 1 " 1 $cont1
|
||||
printWhatz "ControlChange 0.0 1 " 4 $cont4
|
||||
printWhatz "ControlChange 0.0 1 " 11 $cont11
|
||||
}
|
||||
if {$value==9} { # Sitar
|
||||
.pretty config -bitmap @$bitmappath/KPluk.xbm
|
||||
.left.bPressure config -state normal -label "Pluck Strength"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state disabled -label "Disabled"
|
||||
.right.cont4 config -state disabled -label "Disabled"
|
||||
.right.cont11 config -state disabled -label "Disabled"
|
||||
.right.cont1 config -state disabled -label "Disabled"
|
||||
}
|
||||
if {$value==10} { # Mandolin
|
||||
.pretty config -bitmap @$bitmappath/KPluk.xbm
|
||||
.left.bPressure config -state normal -label "Microphone Position and Gain"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state normal -label "Mandolin Body Size"
|
||||
.right.cont4 config -state normal -label "Pick Position"
|
||||
.right.cont11 config -state normal -label "String Sustain"
|
||||
.right.cont1 config -state normal -label "String Detune"
|
||||
set cont1 10.0
|
||||
set cont2 64.0
|
||||
set cont4 64.0
|
||||
set cont11 96.0
|
||||
set press 64.0
|
||||
printWhatz "ControlChange 0.0 1 " 1 $cont1
|
||||
printWhatz "ControlChange 0.0 1 " 2 $cont2
|
||||
printWhatz "ControlChange 0.0 1 " 4 $cont4
|
||||
printWhatz "ControlChange 0.0 1 " 11 $cont11
|
||||
changePress $press
|
||||
}
|
||||
if {$value==28} { # Recorder
|
||||
.pretty config -bitmap @$bitmappath/KFloot.xbm
|
||||
.left.bPressure config -state normal -label "Breath Pressure"
|
||||
.left.pitch config -state normal -label "MIDI Note Number"
|
||||
.left.cont2 config -state normal -label "Softness"
|
||||
.right.cont4 config -state normal -label "Breath Noise"
|
||||
.right.cont11 config -state normal -label "Vibrato Rate"
|
||||
.right.cont1 config -state normal -label "Vibrato Amount"
|
||||
set cont1 10.0
|
||||
set cont2 64.0
|
||||
set cont4 40.0
|
||||
set cont11 64.0
|
||||
printWhatz "ControlChange 0.0 1 " 1 $cont1
|
||||
printWhatz "ControlChange 0.0 1 " 2 $cont2
|
||||
printWhatz "ControlChange 0.0 1 " 4 $cont4
|
||||
printWhatz "ControlChange 0.0 1 " 11 $cont11
|
||||
}
|
||||
set oldpatch $value
|
||||
}
|
||||
|
||||
proc printWhatz {tag value1 value2 } {
|
||||
@@ -389,4 +409,4 @@ proc center_the_toplevel { w } {
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "BlowHole.h"
|
||||
#include "Saxofony.h"
|
||||
#include "Flute.h"
|
||||
#include "Recorder.h"
|
||||
#include "Brass.h"
|
||||
#include "BlowBotl.h"
|
||||
#include "Bowed.h"
|
||||
@@ -37,7 +38,7 @@
|
||||
|
||||
using namespace stk;
|
||||
|
||||
#define NUM_INSTS 28
|
||||
#define NUM_INSTS 29
|
||||
|
||||
// The order of the following list is important. The location of a particular
|
||||
// instrument in the list should correspond to that instrument's ProgramChange
|
||||
@@ -46,7 +47,7 @@ char insts[NUM_INSTS][10] = { "Clarinet", "BlowHole", "Saxofony", "Flute", "Bras
|
||||
"BlowBotl", "Bowed", "Plucked", "StifKarp", "Sitar", "Mandolin",
|
||||
"Rhodey", "Wurley", "TubeBell", "HevyMetl", "PercFlut",
|
||||
"BeeThree", "FMVoices", "VoicForm", "Moog", "Simple", "Drummer",
|
||||
"BandedWG", "Shakers", "ModalBar", "Mesh2D", "Resonate", "Whistle" };
|
||||
"BandedWG", "Shakers", "ModalBar", "Mesh2D", "Resonate", "Whistle", "Recorder" };
|
||||
|
||||
int voiceByNumber(int number, Instrmnt **instrument)
|
||||
{
|
||||
@@ -82,6 +83,7 @@ int voiceByNumber(int number, Instrmnt **instrument)
|
||||
else if (number==25) *instrument = new Mesh2D(10, 10);
|
||||
else if (number==26) *instrument = new Resonate;
|
||||
else if (number==27) *instrument = new Whistle;
|
||||
else if (number==28) *instrument = new Recorder;
|
||||
|
||||
else {
|
||||
printf("\nUnknown instrument or program change requested!\n");
|
||||
|
||||
Reference in New Issue
Block a user