Version 4.1.2

This commit is contained in:
Gary Scavone
2009-03-24 23:02:13 -04:00
committed by Stephen Sinclair
parent 6e0d1955a8
commit 586b0add5f
125 changed files with 7301 additions and 5337 deletions

View File

@@ -40,7 +40,7 @@ LIBRARY += @frameworks@
REALTIME = @realtime@
ifeq ($(REALTIME),yes)
OBJECTS += RtMidi.o RtAudio.o RtWvOut.o Thread.o Socket.o
DEFS += @sound_api@
DEFS += @audio_apis@
DEFS += @midiator@
endif

View File

@@ -157,6 +157,12 @@ int main(int argc,char *argv[])
case __SK_ControlChange_:
j = (int) byte2;
switch(j) {
case __SK_PitchChange_:
sprintf(s,"PitchChange\t%.3f %d %.1f\n",0.0,channel,byte3);
if (writeFile) {
fprintf(file,"PitchChange\t%.3f %d %.1f\n",dt,channel,byte3);
}
break;
case __SK_Volume_:
sprintf(s,"Volume\t%.3f %d %.1f\n",0.0,channel,byte3);
if (writeFile) {

View File

@@ -1 +1 @@
wish < tcl/Modal.tcl | demo ModalBar -or -ip
wish < tcl/Modal.tcl | ./demo ModalBar -or -ip

View File

@@ -1 +1 @@
wish < tcl/Physical.tcl | demo Clarinet -or -ip
wish < tcl/Physical.tcl | ./demo Clarinet -or -ip

View File

@@ -1 +1 @@
wish < tcl/Demo.tcl | demo Clarinet -or -ip
wish < tcl/Demo.tcl | ./demo Clarinet -or -ip

View File

@@ -1 +1 @@
wish < tcl/Voice.tcl | demo FMVoices -or -ip
wish < tcl/Voice.tcl | ./demo FMVoices -or -ip

View File

@@ -15,7 +15,7 @@
#include <stdlib.h>
#include <signal.h>
#include <math.h>
#include <iostream.h>
#include <iostream>
bool done;
static void finish(int ignore){ done = true; }
@@ -28,12 +28,13 @@ int main(int argc, char *argv[])
Reverb *reverb = 0;
Voicer *voicer = 0;
int i, nVoices = 1;
MY_FLOAT volume = 1.0;
MY_FLOAT t60 = 1.0; // in seconds
// If you want to change the default sample rate (set in Stk.h), do
// it before instantiating any objects! If the sample rate is
// specified in the command line, it will override this setting.
Stk::setSampleRate( 22050.0 );
Stk::setSampleRate( 44100.0 );
// Check the command-line arguments for errors and to determine
// the number of WvOut objects to be instantiated (in utilities.cpp).
@@ -67,6 +68,11 @@ int main(int argc, char *argv[])
goto cleanup;
}
// Set the number of ticks between realtime messages (default =
// RT_BUFFER_SIZE).
messager->setRtDelta( 64 );
// Set the reverb parameters.
reverb = new PRCRev( t60 );
reverb->setEffectMix(0.2);
@@ -86,7 +92,7 @@ int main(int argc, char *argv[])
nTicks = messager->getDelta();
for ( i=0; i<nTicks; i++ ) {
sample = reverb->tick( voicer->tick() );
sample = volume * reverb->tick( voicer->tick() );
for ( j=0; j<nOutputs; j++ ) output[j]->tick(sample);
}
@@ -111,6 +117,10 @@ int main(int argc, char *argv[])
case __SK_ControlChange_:
if (byte2 == 44.0)
reverb->setEffectMix(byte3 * ONE_OVER_128);
else if (byte2 == 7.0)
volume = byte3 * ONE_OVER_128;
else if (byte2 == 49.0)
voicer->setFrequency( byte3 );
else
voicer->controlChange( (int) byte2, byte3 );
break;
@@ -127,6 +137,10 @@ int main(int argc, char *argv[])
voicer->pitchBend( byte2 );
break;
case __SK_Volume_:
volume = byte2 * ONE_OVER_128;
break;
case __SK_ProgramChange_:
if ( voice != (int) byte2 ) {
voicer->silence();
@@ -167,7 +181,7 @@ int main(int argc, char *argv[])
for ( i=0; i<nVoices; i++ ) delete instrument[i];
free(instrument);
cout << "\nStk demo finished ... goodbye.\n" << endl;
std::cout << "\nStk demo finished ... goodbye.\n" << std::endl;
return 0;
}

View File

@@ -8,6 +8,7 @@ set velocity 96.0
set cont1 0.0
set cont2 10.0
set cont4 20.0
set cont7 128.0
set cont11 64.0
set cont44 24.0
set outID "stdout"
@@ -194,22 +195,16 @@ pack .noteOn.exit -side left -padx 5 -pady 10
pack .noteOn
# Configure reverb slider
frame .reverb -bg black
scale .reverb.mix -from 0 -to 128 -length 200 \
-command {printWhatz "ControlChange 0.0 1 " 44} \
-orient horizontal -label "Reverb Mix" \
-tickinterval 32 -showvalue true -bg grey66 \
-variable cont44
pack .reverb.mix -padx 10 -pady 10
pack .reverb
# Configure sliders
frame .left -bg black
frame .right -bg black
scale .left.volume -from 0 -to 128 -length 200 \
-command {printWhatz "ControlChange 0.0 1 " 7} \
-orient horizontal -label "Volume" \
-tickinterval 32 -showvalue true -bg grey66 \
-variable cont7
scale .left.bPressure -from 0 -to 128 -length 200 \
-command {changePress } -variable press \
-orient horizontal -label "Breath Pressure" \
@@ -226,6 +221,12 @@ scale .left.cont2 -from 0 -to 128 -length 200 \
-tickinterval 32 -showvalue true -bg grey66 \
-variable cont2
scale .right.reverb -from 0 -to 128 -length 200 \
-command {printWhatz "ControlChange 0.0 1 " 44} \
-orient horizontal -label "Reverb Mix" \
-tickinterval 32 -showvalue true -bg grey66 \
-variable cont44
scale .right.cont4 -from 0 -to 128 -length 200 \
-command {printWhatz "ControlChange 0.0 1 " 4} \
-orient horizontal -label "Breath Noise" \
@@ -244,9 +245,11 @@ scale .right.cont1 -from 0 -to 128 -length 200 \
-tickinterval 32 -showvalue true -bg grey66 \
-variable cont1
pack .left.volume -padx 10 -pady 10
pack .left.bPressure -padx 10 -pady 10
pack .left.pitch -padx 10 -pady 10
pack .left.cont2 -padx 10 -pady 10
pack .right.reverb -padx 10 -pady 10
pack .right.cont4 -padx 10 -pady 10
pack .right.cont11 -padx 10 -pady 10
pack .right.cont1 -padx 10 -pady 10

View File

@@ -3,6 +3,7 @@ set press 64.0
set cont1 0.0
set cont2 64.0
set cont4 64.0
set cont7 128.0
set cont11 64.0
set cont44 24.0
set outID "stdout"
@@ -82,22 +83,16 @@ pack .noteOn.exit -side left -padx 5 -pady 10
pack .noteOn
# Configure reverb slider
frame .reverb -bg black
scale .reverb.mix -from 0 -to 128 -length 200 \
-command {printWhatz "ControlChange 0.0 1 " 44} \
-orient horizontal -label "Reverb Mix" \
-tickinterval 32 -showvalue true -bg grey66 \
-variable cont44
pack .reverb.mix -padx 10 -pady 10
pack .reverb
# Configure sliders
frame .left -bg black
frame .right -bg black
scale .left.volume -from 0 -to 128 -length 200 \
-command {printWhatz "ControlChange 0.0 1 " 7} \
-orient horizontal -label "Volume" \
-tickinterval 32 -showvalue true -bg grey66 \
-variable cont7
scale .left.bPressure -from 0 -to 128 -length 200 \
-command {changePress } -variable press \
-orient horizontal -label "Strike Vigor" \
@@ -114,6 +109,12 @@ scale .left.cont2 -from 0 -to 128 -length 200 \
-tickinterval 32 -showvalue true -bg grey66 \
-variable cont2
scale .right.reverb -from 0 -to 128 -length 200 \
-command {printWhatz "ControlChange 0.0 1 " 44} \
-orient horizontal -label "Reverb Mix" \
-tickinterval 32 -showvalue true -bg grey66 \
-variable cont44
scale .right.cont4 -from 0 -to 128 -length 200 \
-command {printWhatz "ControlChange 0.0 1 " 4} \
-orient horizontal -label "Stick Position" \
@@ -132,9 +133,11 @@ scale .right.cont1 -from 0 -to 128 -length 200 \
-tickinterval 32 -showvalue true -bg grey66 \
-variable cont1
pack .left.volume -padx 10 -pady 10
pack .left.bPressure -padx 10 -pady 10
pack .left.pitch -padx 10 -pady 10
pack .left.cont2 -padx 10 -pady 10
pack .right.reverb -padx 10 -pady 10
pack .right.cont4 -padx 10 -pady 10
pack .right.cont11 -padx 10 -pady 10
pack .right.cont1 -padx 10 -pady 10

View File

@@ -6,6 +6,7 @@ set press 64.0
set cont1 0.0
set cont2 20.0
set cont4 64.0
set cont7 128.0
set cont11 64.0
set cont44 24.0
set outID "stdout"
@@ -93,22 +94,16 @@ pack .noteOn.exit -side left -padx 5 -pady 10
pack .noteOn
# Configure reverb slider
frame .reverb -bg black
scale .reverb.mix -from 0 -to 128 -length 200 \
-command {printWhatz "ControlChange 0.0 1 " 44} \
-orient horizontal -label "Reverb Mix" \
-tickinterval 32 -showvalue true -bg grey66 \
-variable cont44
pack .reverb.mix -padx 10 -pady 10
pack .reverb
# Configure sliders
frame .left -bg black
frame .right -bg black
scale .left.volume -from 0 -to 128 -length 200 \
-command {printWhatz "ControlChange 0.0 1 " 7} \
-orient horizontal -label "Volume" \
-tickinterval 32 -showvalue true -bg grey66 \
-variable cont7
scale .left.bPressure -from 0 -to 128 -length 200 \
-command {changePress } -variable press \
-orient horizontal -label "Breath Pressure" \
@@ -125,6 +120,12 @@ scale .left.cont2 -from 0 -to 128 -length 200 \
-tickinterval 32 -showvalue true -bg grey66 \
-variable cont2
scale .right.reverb -from 0 -to 128 -length 200 \
-command {printWhatz "ControlChange 0.0 1 " 44} \
-orient horizontal -label "Reverb Mix" \
-tickinterval 32 -showvalue true -bg grey66 \
-variable cont44
scale .right.cont4 -from 0 -to 128 -length 200 \
-command {printWhatz "ControlChange 0.0 1 " 4} \
-orient horizontal -label "Breath Noise" \
@@ -143,9 +144,11 @@ scale .right.cont1 -from 0 -to 128 -length 200 \
-tickinterval 32 -showvalue true -bg grey66 \
-variable cont1
pack .left.volume -padx 10 -pady 10
pack .left.bPressure -padx 10 -pady 10
pack .left.pitch -padx 10 -pady 10
pack .left.cont2 -padx 10 -pady 10
pack .right.reverb -padx 10 -pady 10
pack .right.cont4 -padx 10 -pady 10
pack .right.cont11 -padx 10 -pady 10
pack .right.cont1 -padx 10 -pady 10