commit 6485746ee95310999a895fcbac123794d79b320d Author: Gary Scavone Date: Tue Mar 24 22:41:14 2009 -0400 Version 0.99 diff --git a/ADSR.cpp b/ADSR.cpp new file mode 100644 index 0000000..f010ef7 --- /dev/null +++ b/ADSR.cpp @@ -0,0 +1,173 @@ +/*******************************************/ +/* ADSR Subclass of the Envelope Class, */ +/* by Perry R. Cook, 1995-96 */ +/* This is the traditional ADSR (Attack */ +/* Decay, Sustain, Release) ADSR. */ +/* It responds to simple KeyOn and KeyOff */ +/* messages, keeping track of it's state. */ +/* There are two tick (update value) */ +/* methods, one returns the value, and */ +/* other returns the state (0 = A, 1 = D, */ +/* 2 = S, 3 = R) */ +/*******************************************/ + +#include "ADSR.h" + +ADSR :: ADSR() : Envelope() +{ + target = 0.0; + value = 0.0; + attackRate = 0.001; + decayRate = 0.001; + sustainLevel = 0.5; + releaseRate = 0.01; + state = 0; +} + +ADSR :: ~ADSR() +{ + /* Nothing to do here */ +} + +void ADSR :: keyOn() +{ + target = 1.0; + rate = attackRate; + state = 0; +} + +void ADSR :: keyOff() +{ + target = 0.0; + rate = releaseRate; + state = 3; +} + +void ADSR :: setAttackRate(MY_FLOAT aRate) +{ + if (aRate < 0.0) { + printf("negative rates not allowed!!, correcting\n"); + attackRate = -aRate; + } + else attackRate = aRate; + attackRate = attackRate * RATE_NORM; /* SEE Object.h */ +} + +void ADSR :: setDecayRate(MY_FLOAT aRate) +{ + if (aRate < 0.0) { + printf("negative rates not allowed!!, correcting\n"); + decayRate = -aRate; + } + else decayRate = aRate; + decayRate = decayRate * RATE_NORM; /* SEE Object.h */ +} + +void ADSR :: setSustainLevel(MY_FLOAT aLevel) +{ + if (aLevel < 0.0 ) { + printf("Sustain level out of range!!, correcting\n"); + sustainLevel = 0.0; + } + else sustainLevel = aLevel; +} + +void ADSR :: setReleaseRate(MY_FLOAT aRate) +{ + if (aRate < 0.0) { + printf("negative rates not allowed!!, correcting\n"); + releaseRate = -aRate; + } + else releaseRate = aRate; + releaseRate = releaseRate * RATE_NORM; /* SEE Object.h */ +} + +void ADSR :: setAll(MY_FLOAT attRate, MY_FLOAT decRate, MY_FLOAT susLevel, MY_FLOAT relRate) +{ + this->setAttackRate(attRate); + this->setDecayRate(decRate); + this->setSustainLevel(susLevel); + this->setReleaseRate(relRate); +} + +void ADSR :: setTarget(MY_FLOAT aTarget) +{ + target = aTarget; + if (value < target) { + state = ATTACK; + this->setSustainLevel(target); + rate = attackRate; + } + if (value > target) { + this->setSustainLevel(target); + state = DECAY; + rate = decayRate; + } +} + +void ADSR :: setValue(MY_FLOAT aValue) +{ + state = SUSTAIN; + target = aValue; + value = aValue; + this->setSustainLevel(aValue); + rate = 0.0; +} + +MY_FLOAT ADSR :: tick() +{ + if (state==ATTACK) { + value += rate; + if (value >= target) { + value = target; + rate = decayRate; + target = sustainLevel; + state = DECAY; + } + } + else if (state==DECAY) { + value -= decayRate; + if (value <= sustainLevel) { + value = sustainLevel; + rate = 0.0; + state = SUSTAIN; + } + } + else if (state==RELEASE) { + value -= releaseRate; + if (value <= 0.0) { + value = 0.0; + state = 4; + } + } + return value; +} + +int ADSR :: informTick() +{ + this->tick(); + return state; +} + +MY_FLOAT ADSR :: lastOut() +{ + return value; +} + +/************ Test Main ************************/ +/* +void main() +{ + long i; + ADSR test; + + test.setAttackRate(0.15); + test.keyOn(); + while(test.informTick()==ATTACK) printf("%lf\n",test.tick()); + test.setDecayRate(0.1); + while (test.informTick()==DECAY) printf("%lf\n",test.lastOut()); + test.setReleaseRate(0.05); + test.keyOff(); + while(test.informTick()==RELEASE) printf("%lf\n",test.lastOut()); +} +*/ diff --git a/ADSR.h b/ADSR.h new file mode 100644 index 0000000..3783904 --- /dev/null +++ b/ADSR.h @@ -0,0 +1,43 @@ +/*******************************************/ +/* ADSR Subclass of the Envelope Class, */ +/* by Perry R. Cook, 1995-96 */ +/* This is the traditional ADSR (Attack */ +/* Decay, Sustain, Release) envelope. */ +/* It responds to simple KeyOn and KeyOff */ +/* messages, keeping track of it's state. */ +/* There are two tick (update value) */ +/* methods, one returns the value, and */ +/* other returns the state (0 = A, 1 = D, */ +/* 2 = S, 3 = R) */ +/*******************************************/ + +#if !defined(__ADSR_h) +#define __ADSR_h + +#include "Envelope.h" + +class ADSR : public Envelope +{ + protected: + MY_FLOAT attackRate; + MY_FLOAT decayRate; + MY_FLOAT sustainLevel; + MY_FLOAT releaseRate; + public: + ADSR(); + ~ADSR(); + void keyOn(); + void keyOff(); + void setAttackRate(MY_FLOAT aRate); + void setDecayRate(MY_FLOAT aRate); + void setSustainLevel(MY_FLOAT aLevel); + void setReleaseRate(MY_FLOAT aRate); + void setAll(MY_FLOAT attRate, MY_FLOAT decRate, MY_FLOAT susLevel, MY_FLOAT relRate); + void setTarget(MY_FLOAT aTarget); + void setValue(MY_FLOAT aValue); + MY_FLOAT tick(); + int informTick(); + MY_FLOAT lastOut(); +}; + +#endif diff --git a/AgogoBel.cpp b/AgogoBel.cpp new file mode 100644 index 0000000..a777eed --- /dev/null +++ b/AgogoBel.cpp @@ -0,0 +1,75 @@ +/*******************************************/ +/* AgogoBell SubClass of Modal4 Instrument*/ +/* by Perry R. Cook, 1995-96 */ +/* */ +/* Controls: CONTROL1 = stickHardness */ +/* CONTROL2 = strikePosition*/ +/* CONTROL3 = vibFreq */ +/* MOD_WHEEL= vibAmt */ +/*******************************************/ + +/* Modes measured from my Agogo Bell by FFT: */ +/* 360, 1470, 2401, 4600 */ + +#include "AgogoBel.h" + +AgogoBel :: AgogoBel() : Modal4() +{ + wave = new RawWave("rawwaves/britestk.raw"); + wave->normalize(); + wave->setRate(7.0); /* hardstick */ + this->setRatioAndReson(0, 1.00,0.999); /* Set our */ + this->setRatioAndReson(1, 4.08,0.999); /* resonances */ + this->setRatioAndReson(2,6.669,0.999); /* here */ + this->setRatioAndReson(3,-3725.0,0.999); /* (One fixed) */ + this->setFiltGain(0,0.07); /* And filter */ + this->setFiltGain(1,0.06); /* gains too */ + this->setFiltGain(2,0.04); + this->setFiltGain(3,0.02); + directGain = 0.3; +} + +AgogoBel :: ~AgogoBel() +{ + delete wave; +} + +void AgogoBel :: setStickHardness(MY_FLOAT hardness) +{ + stickHardness = hardness; /* To an approximation, */ + wave->setRate(3.0 + (8.0 * stickHardness)); /* hardness <-> center */ + masterGain = 1.0; /* freq and amplitude */ +} + +void AgogoBel :: setStrikePosition(MY_FLOAT position) +{ + MY_FLOAT temp,temp2; + temp2 = position * PI; + strikePosition = position; /* Hack only first */ + temp = sin(0.7 * temp2); /* three modes, */ + this->setFiltGain(0,0.08 * temp); /* leave the other */ + temp = sin(0.1 + (5.0 * temp2)); /* fixed. Why? */ + this->setFiltGain(1,0.07 * temp); /* So it doesn't */ + temp = sin(0.2 + (7.0 * temp2)); /* sound like a */ + this->setFiltGain(2,0.04 * temp); /* sample! */ +} + +void AgogoBel :: controlChange(int number, MY_FLOAT value) +{ +#if defined(_debug_) + printf("AgogoBel : ControlChange: Number=%i Value=%f\n",number,value); +#endif + if (number == MIDI_control1) + this->setStickHardness(value * NORM_7); + else if (number == MIDI_control2) + this->setStrikePosition(value * NORM_7); + else if (number == MIDI_control3) + vibr->setFreq((value * NORM_7 * 12.0)); + else if (number == MIDI_mod_wheel) + vibrGain = (value * NORM_7); + else if (number == MIDI_after_touch) + this->strike(value * NORM_7); + else { + printf("AgogoBel : Undefined Control Number!!\n"); + } +} diff --git a/AgogoBel.h b/AgogoBel.h new file mode 100644 index 0000000..a8c2656 --- /dev/null +++ b/AgogoBel.h @@ -0,0 +1,26 @@ +/*******************************************/ +/* AgogoBell SubClass of Modal4 Instrument*/ +/* by Perry R. Cook, 1995-96 */ +/* */ +/* Controls: CONTROL1 = stickHardness */ +/* CONTROL2 = strikePosition*/ +/* CONTROL3 = vibFreq */ +/* MOD_WHEEL= vibAmt */ +/*******************************************/ + +#if !defined(__AgogoBel_h) +#define __AgogoBel_h + +#include "Modal4.h" + +class AgogoBel : public Modal4 +{ + public: + AgogoBel(); + ~AgogoBel(); + void setStickHardness(MY_FLOAT hardness); + void setStrikePosition(MY_FLOAT position); + virtual void controlChange(int number, MY_FLOAT value); +}; + +#endif diff --git a/AllPass1.cpp b/AllPass1.cpp new file mode 100644 index 0000000..50281ee --- /dev/null +++ b/AllPass1.cpp @@ -0,0 +1,39 @@ +/*******************************************/ +/* 1st order allpass filter. */ +/* by Perry R. Cook, 1995-96 */ +/* A special case of the one pole */ +/* one zero filter. */ +/*******************************************/ + +#include "AllPass1.h" + +AllPass1 :: AllPass1() +{ + inputs = (MY_FLOAT *) malloc(MY_FLOAT_SIZE); + outputs = (MY_FLOAT *) malloc(MY_FLOAT_SIZE); + this->clear(); + +} + +AllPass1 :: ~AllPass1() +{ + free(inputs); + free(outputs); +} + +void AllPass1 :: clear() +{ + outputs[0] = 0.0; + inputs[0] = 0.0; + lastOutput = 0.0; +} + +MY_FLOAT AllPass1 :: tick(MY_FLOAT sample) +{ + outputs[0] = sample - inputs[0] + (0.99 * outputs[0]); + inputs[0] = sample; + lastOutput = outputs[0]; + return lastOutput; +} + + diff --git a/AllPass1.h b/AllPass1.h new file mode 100644 index 0000000..164679a --- /dev/null +++ b/AllPass1.h @@ -0,0 +1,24 @@ +/*******************************************/ +/* 1st order allpass filter. */ +/* by Perry R. Cook, 1995-96 */ +/* A special case of the one pole */ +/* one zero filter. */ +/*******************************************/ + +#include "Filter.h" + +#if !defined(__AllPass1_h) +#define __AllPass1_h + +#include "Filter.h" + +class AllPass1 : Filter +{ + public: + AllPass1(); + ~AllPass1(); + void clear(); + MY_FLOAT tick(MY_FLOAT sample); +}; + +#endif diff --git a/BeeThree.cpp b/BeeThree.cpp new file mode 100644 index 0000000..374d609 --- /dev/null +++ b/BeeThree.cpp @@ -0,0 +1,71 @@ +/******************************************/ +/* Hammond(OID) Organ Subclass */ +/* of Algorithm 8 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/******************************************/ + +#include "BeeThree.h" + +BeeThree :: BeeThree() : FM4Alg8() +{ + this->loadWaves("rawwaves/sinewave.raw", + "rawwaves/sinewave.raw", + "rawwaves/sinewave.raw", + "rawwaves/sinewave.raw"); + this->setRatio(0,0.999); + this->setRatio(1,1.997); + this->setRatio(2,3.006); + this->setRatio(3,6.009); + gains[0] = __FM4Op_gains[95]; + gains[1] = __FM4Op_gains[95]; + gains[2] = __FM4Op_gains[99]; + gains[3] = __FM4Op_gains[95]; + adsr[0]->setAll(0.05,0.03,1.0,0.04); + adsr[1]->setAll(0.05,0.03,1.0,0.04); + adsr[2]->setAll(0.05,0.03,1.0,0.04); + adsr[3]->setAll(0.05,0.001,0.4,0.06); + twozero->setGain(0.1); +} + +BeeThree :: ~BeeThree() +{ + +} + +void BeeThree :: setFreq(MY_FLOAT frequency) +{ + baseFreq = frequency; + waves[0]->setFreq(baseFreq * ratios[0]); + waves[1]->setFreq(baseFreq * ratios[1]); + waves[2]->setFreq(baseFreq * ratios[2]); + waves[3]->setFreq(baseFreq * ratios[3]); +} + +MY_FLOAT BeeThree :: tick() +{ + MY_FLOAT temp; + if (modDepth > 0.0) { + temp = 1.0 + (modDepth * vibWave->tick() * 0.1); + waves[0]->setFreq(baseFreq * ratios[0] * temp); + waves[1]->setFreq(baseFreq * ratios[1] * temp); + waves[2]->setFreq(baseFreq * ratios[2] * temp); + waves[3]->setFreq(baseFreq * ratios[3] * temp); + } + lastOutput = FM4Alg8 :: tick(); + return lastOutput; +} + +void BeeThree :: noteOn(MY_FLOAT freq, MY_FLOAT amp) +{ + gains[0] = amp * __FM4Op_gains[95]; + gains[1] = amp * __FM4Op_gains[95]; + gains[2] = amp * __FM4Op_gains[99]; + gains[3] = amp * __FM4Op_gains[95]; + this->setFreq(freq); + this->keyOn(); +#if defined(_debug_) + printf("BeeThree : NoteOn: Freq=%lf Amp=%lf\n",freq,amp); +#endif +} + diff --git a/BeeThree.h b/BeeThree.h new file mode 100644 index 0000000..298572f --- /dev/null +++ b/BeeThree.h @@ -0,0 +1,23 @@ +/******************************************/ +/* HammondOid Organ Subclass */ +/* of Algorithm 8 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/******************************************/ + +#if !defined(__BeeThree_h) +#define __BeeThree_h + +#include "FM4Alg8.h" + +class BeeThree : public FM4Alg8 +{ + public: + BeeThree(); + ~BeeThree(); + virtual void setFreq(MY_FLOAT frequency); + MY_FLOAT tick(); + virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp); +}; + +#endif diff --git a/BiQuad.cpp b/BiQuad.cpp new file mode 100644 index 0000000..c03137a --- /dev/null +++ b/BiQuad.cpp @@ -0,0 +1,80 @@ +/*******************************************/ +/* BiQuad (2-pole, 2-zero) Filter Class, */ +/* by Perry R. Cook, 1995-96 */ +/* See books on filters to understand */ +/* more about how this works. Nothing */ +/* out of the ordinary in this version. */ +/*******************************************/ + +#include "BiQuad.h" + +BiQuad :: BiQuad() : Filter() +{ + inputs = (MY_FLOAT *) malloc(2 * MY_FLOAT_SIZE); + zeroCoeffs[0] = 0.0; + zeroCoeffs[1] = 0.0; + poleCoeffs[0] = 0.0; + poleCoeffs[1] = 0.0; + gain = 1.0; + this->clear(); +} + +BiQuad :: ~BiQuad() +{ + free(inputs); +} + +void BiQuad :: clear() +{ + inputs[0] = 0.0; + inputs[1] = 0.0; + lastOutput = 0.0; +} + +void BiQuad :: setPoleCoeffs(MY_FLOAT *coeffs) +{ + poleCoeffs[0] = coeffs[0]; + poleCoeffs[1] = coeffs[1]; +} + +void BiQuad :: setZeroCoeffs(MY_FLOAT *coeffs) +{ + zeroCoeffs[0] = coeffs[0]; + zeroCoeffs[1] = coeffs[1]; +} + +void BiQuad :: setFreqAndReson(MY_FLOAT freq, MY_FLOAT reson) +{ + poleCoeffs[1] = - (reson * reson); + poleCoeffs[0] = 2.0 * reson * cos(TWO_PI * freq / SRATE); +} + +void BiQuad :: setEqualGainZeroes() +{ + zeroCoeffs[1] = -1.0; + zeroCoeffs[0] = 0.0; +} + +void BiQuad :: setGain(MY_FLOAT aValue) +{ + gain = aValue; +} + +MY_FLOAT BiQuad :: tick(MY_FLOAT sample) /* Perform Filter Operation */ +{ /* Biquad is two pole, two zero filter */ + MY_FLOAT temp; /* Look it up in your favorite DSP text */ + + temp = sample * gain; /* Here's the math for the */ + temp += inputs[0] * poleCoeffs[0]; /* version which implements */ + temp += inputs[1] * poleCoeffs[1]; /* only 2 state variables. */ + + lastOutput = temp; /* This form takes */ + lastOutput += (inputs[0] * zeroCoeffs[0]); /* 5 multiplies and */ + lastOutput += (inputs[1] * zeroCoeffs[1]); /* 4 adds */ + inputs[1] = inputs[0]; /* and 3 moves */ + inputs[0] = temp; /* like the 2 state-var form*/ + + return lastOutput; + +} + diff --git a/BiQuad.h b/BiQuad.h new file mode 100644 index 0000000..b8178f2 --- /dev/null +++ b/BiQuad.h @@ -0,0 +1,31 @@ +/*******************************************/ +/* BiQuad (2-pole, 2-zero) Filter Class, */ +/* by Perry R. Cook, 1995-96 */ +/* See books on filters to understand */ +/* more about how this works. Nothing */ +/* out of the ordinary in this version. */ +/*******************************************/ + +#if !defined(__BiQuad_h) +#define __BiQuad_h + +#include "Filter.h" + +class BiQuad : public Filter +{ + protected: + MY_FLOAT poleCoeffs[2]; + MY_FLOAT zeroCoeffs[2]; + public: + BiQuad(); + ~BiQuad(); + void clear(); + void setPoleCoeffs(MY_FLOAT *coeffs); + void setZeroCoeffs(MY_FLOAT *coeffs); + void setGain(MY_FLOAT aValue); + void setFreqAndReson(MY_FLOAT freq, MY_FLOAT reson); + void setEqualGainZeroes(); + MY_FLOAT tick(MY_FLOAT sample); +}; + +#endif diff --git a/BowTabl.cpp b/BowTabl.cpp new file mode 100644 index 0000000..85538f6 --- /dev/null +++ b/BowTabl.cpp @@ -0,0 +1,46 @@ +/***********************************************/ +/* Simple Bow Table Object, after Smith */ +/* by Perry R. Cook, 1995-96 */ +/***********************************************/ + +#include "BowTabl.h" + +BowTabl :: BowTabl() +{ + offSet = 0.0; /* offset is a bias, really not needed unless */ + /* friction is different in each direction */ + slope = 0.1; /* controls width of friction pulse, */ + /* related to bowForce */ +} + +BowTabl :: ~BowTabl() +{ +} + +void BowTabl :: setOffset(MY_FLOAT aValue) +{ + offSet = aValue; +} + +void BowTabl :: setSlope(MY_FLOAT aValue) +{ + slope = aValue; +} + +MY_FLOAT BowTabl :: lookup(MY_FLOAT sample) /* Perform Table Lookup */ +{ /* sample is differential */ + /* string vs. bow velocity */ + MY_FLOAT input; + input = sample + offSet; /* add bias to sample */ + input *= slope; /* scale it */ + lastOutput = fabs(input) + 0.75; /* below min delta, friction = 1 */ + lastOutput = pow(lastOutput,-4.0); +// if (lastOutput < 0.0 ) lastOutput = 0.0; /* minimum friction is 0.0 */ + if (lastOutput > 1.0 ) lastOutput = 1.0; /* maximum friction is 1.0 */ + return lastOutput; +} + +MY_FLOAT BowTabl :: lastOut() +{ + return lastOutput; +} diff --git a/BowTabl.h b/BowTabl.h new file mode 100644 index 0000000..28c17f1 --- /dev/null +++ b/BowTabl.h @@ -0,0 +1,22 @@ +/***********************************************/ +/* Simple Bow Table Object, after Smith */ +/* by Perry R. Cook, 1995-96 */ +/***********************************************/ + +#include "Object.h" + +class BowTabl : public Object +{ + protected: + MY_FLOAT offSet; + MY_FLOAT slope; + MY_FLOAT lastOutput; + public: + BowTabl(); + ~BowTabl(); + void setOffset(MY_FLOAT aValue); + void setSlope(MY_FLOAT aValue); + MY_FLOAT lookup(MY_FLOAT sample); + MY_FLOAT lastOut(); +}; + diff --git a/Bowed.cpp b/Bowed.cpp new file mode 100644 index 0000000..8aeb046 --- /dev/null +++ b/Bowed.cpp @@ -0,0 +1,160 @@ +/******************************************/ +/* Bowed String model ala Smith */ +/* after McIntyre, Schumacher, Woodhouse */ +/* by Perry Cook, 1995-96 */ +/* */ +/* This is a waveguide model, and thus */ +/* relates to various Stanford Univ. */ +/* and possibly Yamaha and other patents.*/ +/* */ +/* Controls: CONTROL1 = bowPressure */ +/* CONTROL2 = bowPosition */ +/* CONTROL3 = vibrFreq */ +/* MOD_WHEEL= vibrGain */ +/* */ +/******************************************/ + +#include "Bowed.h" + +Bowed :: Bowed(MY_FLOAT lowestFreq) +{ + long length; + length = (long) (SRATE / lowestFreq + 1); + neckDelay = new DLineL(length); + length >> 1; + bridgeDelay = new DLineL(length); + bowTabl = new BowTabl; + reflFilt = new OnePole; + bodyFilt = new BiQuad; + vibr = new RawLoop("rawwaves/sinewave.raw"); + adsr = new ADSR; + vibrGain = 0.0; + + neckDelay->setDelay(100.0); + bridgeDelay->setDelay(29.0); + + bowTabl->setSlope(3.0); + + reflFilt->setPole(0.6 - (0.1 * RATE_NORM)); + reflFilt->setGain(0.95); + + bodyFilt->setFreqAndReson(500.0, 0.85); + bodyFilt->setEqualGainZeroes(); + bodyFilt->setGain(0.2); + + vibr->normalize(); + vibr->setFreq(6.12723); + + adsr->setAll(0.002,0.01,0.9,0.01); + + betaRatio = 0.127236; +} + +Bowed :: ~Bowed() +{ + delete neckDelay; + delete bridgeDelay; + delete bowTabl; + delete reflFilt; + delete bodyFilt; + delete vibr; + delete adsr; +} + +void Bowed :: clear() +{ + neckDelay->clear(); + bridgeDelay->clear(); +} + +void Bowed :: setFreq(MY_FLOAT frequency) +{ + baseDelay = (MY_FLOAT) SRATE / frequency - 4.0; /* delay - approx. filter delay */ + bridgeDelay->setDelay(baseDelay * betaRatio); /* bow to bridge length */ + neckDelay->setDelay(baseDelay * (1.0 - betaRatio)); /* bow to nut (finger) length */ +} + +void Bowed :: startBowing(MY_FLOAT amplitude, MY_FLOAT rate) +{ + adsr->setRate(rate); + adsr->keyOn(); + maxVelocity = 0.03 + (0.2 * amplitude); +} + +void Bowed :: stopBowing(MY_FLOAT rate) +{ + adsr->setRate(rate); + adsr->keyOff(); +} + +void Bowed :: noteOn(MY_FLOAT freq, MY_FLOAT amp) +{ + this->startBowing(amp,amp * 0.001); + this->setFreq(freq); +#if defined(_debug_) + printf("Bowed : NoteOn: Freq=%lf Amp=%lf\n",freq,amp); +#endif +} + +void Bowed :: noteOff(MY_FLOAT amp) +{ + this->stopBowing((1.0 - amp) * 0.005); +#if defined(_debug_) + printf("Bowed : NoteOff: Amp=%lf\n",amp); +#endif +} + +void Bowed :: setVibrato(MY_FLOAT amount) +{ + vibrGain = amount; +} + +MY_FLOAT Bowed :: tick() +{ + MY_FLOAT bowVelocity; + MY_FLOAT bridgeRefl=0,nutRefl=0; + MY_FLOAT newVel=0,velDiff=0,stringVel=0; + + bowVelocity = maxVelocity * adsr->tick(); + + bridgeRefl = -reflFilt->tick( + bridgeDelay->lastOut()); /* Bridge Reflection */ + nutRefl = -neckDelay->lastOut(); /* Nut Reflection */ + stringVel = bridgeRefl + nutRefl; /* Sum is String Velocity */ + velDiff = bowVelocity - stringVel; /* Differential Velocity */ + newVel = velDiff * bowTabl->lookup(velDiff); /* Non-Lin Bow Function */ + neckDelay->tick(bridgeRefl + newVel); /* Do string */ + bridgeDelay->tick(nutRefl + newVel); /* propagations */ + + if (vibrGain > 0.0) { + neckDelay->setDelay((baseDelay * (1.0 - betaRatio)) + + (baseDelay * vibrGain*vibr->tick())); + } + + lastOutput = bodyFilt->tick(bridgeDelay->lastOut()); + + return lastOutput; +} + +void Bowed :: controlChange(int number, MY_FLOAT value) +{ +#if defined(_debug_) + printf("Bowed : ControlChange: Number=%i Value=%f\n",number,value); +#endif + if (number == MIDI_control1) + bowTabl->setSlope(5.0 - (4.0 * value * NORM_7)); + else if (number == MIDI_control2) { + betaRatio = 0.027236 + (0.2 * value * NORM_7); + bridgeDelay->setDelay(baseDelay * betaRatio); /* bow to bridge length */ + neckDelay->setDelay(baseDelay * (1.0 - betaRatio)); /* bow to nut (finger) length */ + } + else if (number == MIDI_control3) + vibr->setFreq((value * NORM_7 * 12.0)); + else if (number == MIDI_mod_wheel) + vibrGain = (value * NORM_7 * 0.4); + else if (number == MIDI_after_touch) + adsr->setTarget(value * NORM_7); + else { + printf("Bowed : Undefined Control Number!!\n"); + } +} diff --git a/Bowed.h b/Bowed.h new file mode 100644 index 0000000..92d2174 --- /dev/null +++ b/Bowed.h @@ -0,0 +1,56 @@ +/******************************************/ +/* Bowed String model ala Smith */ +/* after McIntyre, Schumacher, Woodhouse */ +/* by Perry Cook, 1995-96 */ +/* */ +/* This is a waveguide model, and thus */ +/* relates to various Stanford Univ. */ +/* and possibly Yamaha and other patents.*/ +/* */ +/* Controls: CONTROL1 = bowPressure */ +/* CONTROL2 = bowPosition */ +/* CONTROL3 = vibrFreq */ +/* MOD_WHEEL= vibrGain */ +/* */ +/******************************************/ + +#if !defined(__Bowed_h) +#define __Bowed_h + +#include "Instrmnt.h" +#include "DLineL.h" +#include "BowTabl.h" +#include "OnePole.h" +#include "BiQuad.h" +#include "RawLoop.h" +#include "ADSR.h" + +class Bowed : public Instrmnt +{ + protected: + DLineL *neckDelay; + DLineL *bridgeDelay; + BowTabl *bowTabl; + OnePole *reflFilt; + BiQuad *bodyFilt; + RawLoop *vibr; + ADSR *adsr; + MY_FLOAT maxVelocity; + MY_FLOAT baseDelay; + MY_FLOAT vibrGain; + MY_FLOAT betaRatio; + public: + Bowed(MY_FLOAT lowestFreq); + ~Bowed(); + void clear(); + void startBowing(MY_FLOAT amplitude,MY_FLOAT rate); + void stopBowing(MY_FLOAT rate); + virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp); + virtual void noteOff(MY_FLOAT amp); + virtual void setFreq(MY_FLOAT frequency); + void setVibrato(MY_FLOAT amount); + virtual void controlChange(int number, MY_FLOAT value); + virtual MY_FLOAT tick(); +}; + +#endif diff --git a/Brass.cpp b/Brass.cpp new file mode 100644 index 0000000..4f7e318 --- /dev/null +++ b/Brass.cpp @@ -0,0 +1,129 @@ +/******************************************/ +/* Waveguide Brass Instrument Model ala */ +/* Cook (TBone, HosePlayer) */ +/* by Perry R. Cook, 1995-96 */ +/* */ +/* This is a waveguide model, and thus */ +/* relates to various Stanford Univ. */ +/* and possibly Yamaha and other patents.*/ +/* */ +/* Controls: CONTROL1 = lipTension */ +/* CONTROL2 = slideLength */ +/* CONTROL3 = vibFreq */ +/* MOD_WHEEL= vibAmt */ +/******************************************/ + +#include "Brass.h" + +Brass :: Brass(MY_FLOAT lowestFreq) +{ + length = (long) (SRATE / lowestFreq + 1); + delayLine = new DLineA(length); + lipFilter = new LipFilt; + dcBlock = new DCBlock; + adsr = new ADSR; + adsr->setAll(0.02, 0.05, 1.0, 0.001); + vibr = new RawLoop("rawwaves/sinewave.raw"); + this->clear(); + + vibr->normalize(); + vibr->setFreq(6.137); + vibrGain = 0.05; /* breath periodic vibrato component */ +} + +Brass :: ~Brass() +{ + delete delayLine; + delete lipFilter; + delete dcBlock; + delete adsr; + delete vibr; +} + +void Brass :: clear() +{ + delayLine->clear(); + lipFilter->clear(); + dcBlock->clear(); +/* adsr->reset(); */ +} + +void Brass :: setFreq(MY_FLOAT frequency) +{ + slideTarget = ((MY_FLOAT) SRATE / frequency * 2.0) + 3.0; + /* fudge correction for filter delays */ + delayLine->setDelay(slideTarget); /* we'll play a harmonic */ + lipTarget = frequency; + lipFilter->setFreq(frequency); +} + +void Brass :: setLip(MY_FLOAT frequency) +{ + lipFilter->setFreq(frequency); +} + +void Brass :: startBlowing(MY_FLOAT amplitude,MY_FLOAT rate) +{ + adsr->setAttackRate(rate); + maxPressure = amplitude; + adsr->keyOn(); +} + +void Brass :: stopBlowing(MY_FLOAT rate) +{ + adsr->setReleaseRate(rate); + adsr->keyOff(); +} + +void Brass :: noteOn(MY_FLOAT freq, MY_FLOAT amp) +{ + this->setFreq(freq); + this->startBlowing(amp, amp * 0.001); +#if defined(_debug_) + printf("Brass : NoteOn: Freq=%lf Amp=%lf\n",freq,amp); +#endif +} + +void Brass :: noteOff(MY_FLOAT amp) +{ + this->stopBlowing(amp * 0.005); +#if defined(_debug_) + printf("Brass : NoteOff: Amp=%lf\n",amp); +#endif +} + +MY_FLOAT Brass :: tick() +{ + MY_FLOAT breathPressure; + + breathPressure = maxPressure * adsr->tick(); + breathPressure += vibrGain * vibr->tick(); + lastOutput = delayLine->tick( /* bore delay */ + dcBlock->tick( /* block DC */ + lipFilter->tick(0.3 * breathPressure, /* mouth input */ + 0.85 * delayLine->lastOut()))); /* and bore reflection */ + return lastOutput; +} + +void Brass :: controlChange(int number, MY_FLOAT value) +{ + MY_FLOAT temp; +#if defined(_debug_) + printf("Brass : ControlChange: Number=%i Value=%f\n",number,value); +#endif + if (number == MIDI_control1) { + temp = lipTarget * pow(4.0,(2.0*value*NORM_7) - 1.0); + this->setLip(temp); + } + else if (number == MIDI_control2) + delayLine->setDelay(slideTarget * (0.5 + (value * NORM_7))); + else if (number == MIDI_control3) + vibr->setFreq((value * NORM_7 * 12.0)); + else if (number == MIDI_mod_wheel) + vibrGain = (value * NORM_7 * 0.4); + else if (number == MIDI_after_touch) + adsr->setTarget(value * NORM_7); + else { + printf("Brass : Undefined Control Number!!\n"); + } +} diff --git a/Brass.h b/Brass.h new file mode 100644 index 0000000..c3b8635 --- /dev/null +++ b/Brass.h @@ -0,0 +1,53 @@ +/******************************************/ +/* Simple Brass Instrument Model ala */ +/* Cook (TBone, HosePlayer) */ +/* by Perry R. Cook, 1995-96 */ +/* */ +/* This is a waveguide model, and thus */ +/* relates to various Stanford Univ. */ +/* and possibly Yamaha and other patents.*/ +/* */ +/* Controls: CONTROL1 = lipTension */ +/* CONTROL2 = slideLength */ +/* CONTROL3 = vibFreq */ +/* MOD_WHEEL= vibAmt */ +/******************************************/ + +#if !defined(__Brass_h) +#define __Brass_h + +#include "Instrmnt.h" +#include "DLineA.h" +#include "LipFilt.h" +#include "DCBlock.h" +#include "ADSR.h" +#include "RawLoop.h" + +class Brass: public Instrmnt +{ + protected: + DLineA *delayLine; + LipFilt *lipFilter; + DCBlock *dcBlock; + ADSR *adsr; + RawLoop *vibr; + long length; + MY_FLOAT lipTarget; + MY_FLOAT slideTarget; + MY_FLOAT vibrGain; + MY_FLOAT maxPressure; + public: + Brass(MY_FLOAT lowestFreq); + ~Brass(); + void clear(); + virtual void setFreq(MY_FLOAT frequency); + void setLip(MY_FLOAT frequency); + void startBlowing(MY_FLOAT amplitude,MY_FLOAT rate); + void stopBlowing(MY_FLOAT rate); + virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp); + virtual void noteOff(MY_FLOAT amp); + virtual void controlChange(int number, MY_FLOAT value); + virtual MY_FLOAT tick(); +}; + +#endif diff --git a/Clarinet.cpp b/Clarinet.cpp new file mode 100644 index 0000000..8e8df86 --- /dev/null +++ b/Clarinet.cpp @@ -0,0 +1,125 @@ +/******************************************/ +/* Waveguide Clarinet model ala Smith */ +/* after McIntyre, Schumacher, Woodhouse */ +/* by Perry Cook, 1995-96 */ +/* */ +/* This is a waveguide model, and thus */ +/* relates to various Stanford Univ. */ +/* and possibly Yamaha and other patents.*/ +/* */ +/* Controls: CONTROL1 = reedStiffns */ +/* CONTROL2 = noiseGain */ +/* CONTROL3 = vibFreq */ +/* MOD_WHEEL= vibAmt */ +/******************************************/ + +#include "Clarinet.h" + +Clarinet :: Clarinet(MY_FLOAT lowestFreq) +{ + length = (long) (SRATE / lowestFreq + 1); + delayLine = new DLineL(length); + reedTable = new ReedTabl; + reedTable->setOffset(0.7); + reedTable->setSlope(-0.3); + filter = new OneZero; + envelope = new Envelope; + noise = new Noise; + vibr = new RawLoop("rawwaves/sinewave.raw"); + vibr->normalize(); + vibr->setFreq(5.735); + outputGain = 1.0; + noiseGain = 0.2; + vibrGain = 0.1; +} + +Clarinet :: ~Clarinet() +{ + delete delayLine; + delete reedTable; + delete filter; + delete envelope; + delete noise; + delete vibr; +} + +void Clarinet :: clear() +{ + delayLine->clear(); + filter->tick(0.0); +} + +void Clarinet :: setFreq(MY_FLOAT frequency) +{ + delayLine->setDelay /* length - approx filter delay */ + ((SRATE / frequency) * 0.5 - 1.5); +} + +void Clarinet :: startBlowing(MY_FLOAT amplitude,MY_FLOAT rate) +{ + envelope->setRate(rate); + envelope->setTarget(amplitude); +} + +void Clarinet :: stopBlowing(MY_FLOAT rate) +{ + envelope->setRate(rate); + envelope->setTarget(0.0); +} + +void Clarinet :: noteOn(MY_FLOAT freq, MY_FLOAT amp) +{ + this->setFreq(freq); + this->startBlowing(0.55 + (amp * 0.30),amp * 0.005); + outputGain = amp + 0.001; +#if defined(_debug_) + printf("Clarinet : NoteOn: Freq=%lf Amp=%lf\n",freq,amp); +#endif +} + +void Clarinet :: noteOff(MY_FLOAT amp) +{ + this->stopBlowing(amp * 0.01); +#if defined(_debug_) + printf("Clarinet : NoteOff: Amp=%lf\n",amp); +#endif +} + +MY_FLOAT Clarinet :: tick() +{ + MY_FLOAT pressureDiff; + MY_FLOAT breathPressure; + + breathPressure = envelope->tick(); + breathPressure += breathPressure * + noiseGain * noise->tick(); + breathPressure += breathPressure * + vibrGain * vibr->tick(); + pressureDiff = filter->tick(delayLine->lastOut()); /* differential pressure */ + pressureDiff = (pressureDiff * -0.95) - breathPressure; /* of reflected and mouth */ + lastOutput = delayLine->tick(breathPressure + /* perform scattering */ + pressureDiff * reedTable->lookup(pressureDiff)); /* in economical way */ + lastOutput *= outputGain; + return lastOutput; +} + +void Clarinet :: controlChange(int number, MY_FLOAT value) +{ +#if defined(_debug_) + printf("Clarinet : ControlChange: Number=%i Value=%f\n",number,value); +#endif + if (number == MIDI_control1) + reedTable->setSlope(-0.44 + (0.26 * value * NORM_7)); + else if (number == MIDI_control2) + noiseGain = (value * NORM_7 * 0.4); + else if (number == MIDI_control3) + vibr->setFreq((value * NORM_7 * 12.0)); + else if (number == MIDI_mod_wheel) + vibrGain = (value * NORM_7 * 0.5); + else if (number == MIDI_after_touch) { + envelope->setValue(value * NORM_7); + } + else { + printf("Clarinet : Undefined Control Number!!\n"); + } +} diff --git a/Clarinet.h b/Clarinet.h new file mode 100644 index 0000000..d64aa3f --- /dev/null +++ b/Clarinet.h @@ -0,0 +1,53 @@ +/******************************************/ +/* Clarinet model ala Smith */ +/* after McIntyre, Schumacher, Woodhouse */ +/* by Perry Cook, 1995-96 */ +/* */ +/* This is a waveguide model, and thus */ +/* relates to various Stanford Univ. */ +/* and possibly Yamaha and other patents.*/ +/* */ +/* Controls: CONTROL1 = reedStiffns */ +/* CONTROL2 = noiseGain */ +/* CONTROL3 = vibFreq */ +/* MOD_WHEEL= vibAmt */ +/******************************************/ + +#if !defined(__Clarinet_h) +#define __Clarinet_h + +#include "Instrmnt.h" +#include "DLineL.h" +#include "ReedTabl.h" +#include "OneZero.h" +#include "Envelope.h" +#include "Noise.h" +#include "RawLoop.h" + +class Clarinet : public Instrmnt +{ + protected: + DLineL *delayLine; + ReedTabl *reedTable; + OneZero *filter; + Envelope *envelope; + Noise *noise; + RawLoop *vibr; + long length; + MY_FLOAT outputGain; + MY_FLOAT noiseGain; + MY_FLOAT vibrGain; + public: + Clarinet(MY_FLOAT lowestFreq); + ~Clarinet(); + void clear(); + virtual void setFreq(MY_FLOAT frequency); + void startBlowing(MY_FLOAT amplitude,MY_FLOAT rate); + void stopBlowing(MY_FLOAT rate); + virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp); + virtual void noteOff(MY_FLOAT amp); + virtual MY_FLOAT tick(); + virtual void controlChange(int number, MY_FLOAT value); +}; + +#endif diff --git a/DCBlock.cpp b/DCBlock.cpp new file mode 100644 index 0000000..6cf5e29 --- /dev/null +++ b/DCBlock.cpp @@ -0,0 +1,41 @@ +/*******************************************/ +/* DC Blocking Filter */ +/* by Perry R. Cook, 1995-96 */ +/* This guy is very helpful in, uh, */ +/* blocking DC. Needed because a simple */ +/* low-pass reflection filter allows DC */ +/* to build up inside recursive */ +/* structures. */ +/*******************************************/ + +#include "DCBlock.h" + +DCBlock :: DCBlock() +{ + inputs = (MY_FLOAT *) malloc(MY_FLOAT_SIZE); + outputs = (MY_FLOAT *) malloc(MY_FLOAT_SIZE); + this->clear(); + +} + +DCBlock :: ~DCBlock() +{ + free(inputs); + free(outputs); +} + +void DCBlock :: clear() +{ + outputs[0] = 0.0; + inputs[0] = 0.0; + lastOutput = 0.0; +} + +MY_FLOAT DCBlock :: tick(MY_FLOAT sample) +{ + outputs[0] = sample - inputs[0] + (0.99 * outputs[0]); + inputs[0] = sample; + lastOutput = outputs[0]; + return lastOutput; +} + diff --git a/DCBlock.h b/DCBlock.h new file mode 100644 index 0000000..55deb9f --- /dev/null +++ b/DCBlock.h @@ -0,0 +1,25 @@ +/*******************************************/ +/* DC Blocking Filter */ +/* by Perry R. Cook, 1995-96 */ +/* This guy is very helpful in, uh, */ +/* blocking DC. Needed because a simple */ +/* low-pass reflection filter allows DC */ +/* to build up inside recursive */ +/* structures. */ +/*******************************************/ + +#if !defined(__DCBlock_h) +#define __DCBlock_h + +#include "Filter.h" + +class DCBlock : public Filter +{ + public: + DCBlock(); + ~DCBlock(); + void clear(); + MY_FLOAT tick(MY_FLOAT sample); +}; + +#endif diff --git a/DLineA.cpp b/DLineA.cpp new file mode 100644 index 0000000..b273803 --- /dev/null +++ b/DLineA.cpp @@ -0,0 +1,104 @@ +/*******************************************/ +/* */ +/* AllPass Interpolating Delay Line */ +/* Object by Perry R. Cook 1995-96 */ +/* This one uses a delay line of maximum */ +/* length specified on creation, and */ +/* interpolates fractional length using */ +/* an all-pass filter. This version is */ +/* more efficient for computing static */ +/* length delay lines (alpha and coeff */ +/* are computed only when the length */ +/* is set, there probably is a more */ +/* efficient computational form if alpha */ +/* is changed often (each sample)). */ +/* */ +/*******************************************/ + +#include "DLineA.h" + +DLineA :: DLineA(long max_length) +{ + long i; + length = max_length; + inputs = (MY_FLOAT *) malloc(length * MY_FLOAT_SIZE); + for (i=0;iclear(); + inPoint = 0; + outPoint = length >> 1; +} + +DLineA :: ~DLineA() +{ + free(inputs); +} + +void DLineA :: clear() +{ + long i; + for (i=0;iclear(); + outPoint = 0; + inPoint = length >> 1; +} + +DLineL :: ~DLineL() +{ + free(inputs); +} + +void DLineL :: clear() +{ + long i; + for (i=0;iclear(); + this->setDelay(length * 0.5); + inPoint = 0; + outPoint = 0; +} + +DLineN :: ~DLineN() +{ + free(inputs); +} + +void DLineN :: clear() +{ + long i; + for (i=0;i=length) { // Check for end condition */ + outPoint -= length; + } + return lastOutput; +} + +/************ Test Main Program *****************/ +/* +void main() +{ + DLineN delay(140); + FILE *fd; + MY_FLOAT temp; + short data; + long i; + + fd = fopen("test.raw","wb"); + + delay.setDelay(128); + for (i=0;i<4096;i++) { + if (i%256 != 0) temp = 0.0; else temp = 1.0; + data = (temp + delay.tick(temp)) * 16000.0; + fwrite(&data,2,1,fd); + } + delay.setDelay(64.5); + for (i=0;i<4096;i++) { + if (i%256 != 0) temp = 0.0; else temp = 1.0; + data = (temp + delay.tick(temp)) * 16000.0; + fwrite(&data,2,1,fd); + } + + fclose(fd); +} +*/ diff --git a/DLineN.h b/DLineN.h new file mode 100644 index 0000000..657c001 --- /dev/null +++ b/DLineN.h @@ -0,0 +1,30 @@ +/*******************************************/ +/* Non-Interpolating Delay Line */ +/* Object by Perry R. Cook 1995-96 */ +/* This one uses a delay line of maximum */ +/* length specified on creation. A non- */ +/* interpolating delay line should be */ +/* used in non-time varying (reverb) or */ +/* non-critical (????) applications. */ +/*******************************************/ + +#if !defined(__DLineN_h) +#define __DLineN_h + +#include "Filter.h" + +class DLineN : public Filter +{ + protected: + long inPoint; + long outPoint; + long length; + public: + DLineN(long max_length); + ~DLineN(); + void clear(); + void setDelay(MY_FLOAT length); + MY_FLOAT tick(MY_FLOAT sample); +}; + +#endif diff --git a/DrumSynt.cpp b/DrumSynt.cpp new file mode 100644 index 0000000..e5c8d55 --- /dev/null +++ b/DrumSynt.cpp @@ -0,0 +1,164 @@ +/*******************************************/ +/* Master Class for Drum Synthesizer */ +/* by Perry R. Cook, 1995-96 */ +/* This instrument contains a bunch of */ +/* RawWvIn objects (Non-Interpolating, */ +/* 1 shot players), run through a bunch */ +/* of one-pole filters. You can specify */ +/* the maximum Polyphony (maximum number */ +/* of simultaneous voices) in a #define */ +/* in the .h file. */ +/*******************************************/ + +#include "DrumSynt.h" +#include + +char waveNames[DRUM_NUMWAVES][16] = { + "bass.raw", + "snar.raw", + "tomlow.raw", + "tommid.raw", + "tomhi.raw", + "hat.raw", + "ride.raw", + "crash.raw", + "cowbell.raw", + "tamb.raw" +}; + +DrumSynt :: DrumSynt() : Object() +{ + int i; +/* char temp[64]; */ + +/* for (i=0;ifinish(); */ +/* waves[i]->normalize(0.2); */ +/* } */ + + for (i=0;iclear(); /* then */ + tempWv = waves[0]; + tempFilt = filters[0]; + for (i=0;inormalize(0.2); + filters[numSounding-1]->setPole(0.999 - (vel / 32.0)); + filters[numSounding-1]->setGain(vel / 128.0); + } + else { + waves[notDone]->reset(); + filters[notDone]->setPole(0.999 - (vel / 32.0)); + filters[notDone]->setGain(vel / 128.0); + } + + printf("Number Sounding = %i\n",numSounding); + for (i=0;ilastOut(); + + if (waves[i]->informTick() == 1) { + + printf("Wave %i %i down here\n",i,sounding[i]); + + delete waves[i]; + tempFilt = filters[i]; + + for (j=i;jclear(); + sounding[j] = -1; + numSounding -= 1; + if (numSounding == 0) notDone = 0; + i -= 1; + } + i++; + } + + return output; +} + +/************** Test Main Program *********************/ + +#include "miditabl.h" +#include "RawWvOut.h" +#include "Reverb.h" +#include "Noise.h" + +int main() +{ + long i,j; + DrumSynt instrument; + RawWvOut output("test.snd"); + Reverb reverb(2137); + Noise noise; + + for (j=0;j<100;j++) { + i = (int) (fabs(noise.tick()) * DRUM_NUMWAVES); + instrument.noteOn(i,127); + for (i=0;i<2000;i++) output.tick(reverb.tick(instrument.tick())); + } + + for (i=0;i<22000;i++) output.tick(reverb.tick(instrument.tick())); + +} diff --git a/DrumSynt.h b/DrumSynt.h new file mode 100644 index 0000000..ab66517 --- /dev/null +++ b/DrumSynt.h @@ -0,0 +1,37 @@ +/*******************************************/ +/* Master Class for Drum Synthesizer */ +/* by Perry R. Cook, 1995-96 */ +/* This instrument contains a bunch of */ +/* RawWvIn objects (Non-Interpolating, */ +/* 1 shot players), run through a bunch */ +/* of one-pole filters. You can specify */ +/* the maximum Polyphony (maximum number */ +/* of simultaneous voices) in a #define */ +/* in the .h file. */ +/*******************************************/ + +#if !defined(__DrumSynt_h) +#define __DrumSynt_h + +#include "Object.h" +#include "RawWvIn.h" +#include "OnePole.h" + +#define DRUM_NUMWAVES 10 +#define DRUM_POLYPHONY 4 + +class DrumSynt : public Object +{ + protected: + RawWvIn *waves[DRUM_POLYPHONY]; + OnePole *filters[DRUM_POLYPHONY]; + int sounding[DRUM_POLYPHONY]; + int numSounding; + public: + DrumSynt(); +/* ~DrumSynt(); */ + void noteOn(int noteNum, int vel); + MY_FLOAT tick(); +}; + +#endif diff --git a/Envelope.cpp b/Envelope.cpp new file mode 100644 index 0000000..9dc50c1 --- /dev/null +++ b/Envelope.cpp @@ -0,0 +1,113 @@ +/*******************************************/ +/* Envelope Class, Perry R. Cook, 1995-96 */ +/* This is the base class for envelopes. */ +/* This one is capable of ramping state */ +/* from where it is to a target value by */ +/* a rate. It also responds to simple */ +/* KeyOn and KeyOff messages, ramping to */ +/* 1.0 on keyon and to 0.0 on keyoff. */ +/* There are two tick (update value) */ +/* methods, one returns the value, and */ +/* other returns 0 if the envelope is at */ +/* the target value (the state bit). */ +/*******************************************/ + +#include "Envelope.h" + +Envelope :: Envelope() : Object() +{ + target = 0.0; + value = 0.0; + rate = 0.001; + state = 0; +} + +Envelope :: ~Envelope() +{ +} + +void Envelope :: keyOn() +{ + target = 1.0; + if (value != target) state = 1; +} + +void Envelope :: keyOff() +{ + target = 0.0; + if (value != target) state = 1; +} + +void Envelope :: setRate(MY_FLOAT aRate) +{ + if (aRate < 0.0) { + printf("negative rates not allowed!!, correcting\n"); + rate = -aRate; + } + else rate = aRate; + rate = rate * RATE_NORM; /* SEE Object.h */ +} + +void Envelope :: setTarget(MY_FLOAT aTarget) +{ + target = aTarget; + if (value != target) state = 1; +} + +void Envelope :: setValue(MY_FLOAT aValue) +{ + state = 0; + target = aValue; + value = aValue; +} + +MY_FLOAT Envelope :: tick() +{ + if (state) { + if (target > value) { + value += rate; + if (value >= target) { + value = target; + state = 0; + } + } + else { + value -= rate; + if (value <= target) { + value = target; + state = 0; + } + } + } + return value; +} + +int Envelope :: informTick() +{ + this->tick(); + return state; +} + +MY_FLOAT Envelope :: lastOut() +{ + return value; +} + +/************ Test Main ************************/ +/* +void main() +{ + long i; + Envelope test; + + test.setRate(0.15); + test.keyOn(); + for (i=0;i<10;i++) printf("%lf\n",test.tick()); + test.setRate(0.1); + test.setTarget(0.5); + while (test.informTick()) printf("%lf\n",test.lastOut()); + test.setRate(0.05); + test.keyOff(); + while(test.informTick()) printf("%lf\n",test.lastOut()); +} +*/ diff --git a/Envelope.h b/Envelope.h new file mode 100644 index 0000000..8294a0d --- /dev/null +++ b/Envelope.h @@ -0,0 +1,40 @@ +/*******************************************/ +/* Envelope Class, Perry R. Cook, 1995-96 */ +/* This is the base class for envelopes. */ +/* This one is capable of ramping state */ +/* from where it is to a target value by */ +/* a rate. It also responds to simple */ +/* KeyOn and KeyOff messages, ramping to */ +/* 1.0 on keyon and to 0.0 on keyoff. */ +/* There are two tick (update value) */ +/* methods, one returns the value, and */ +/* other returns 0 if the envelope is at */ +/* the target value (the state bit). */ +/*******************************************/ + +#if !defined(__Envelope_h) +#define __Envelope_h + +#include "Object.h" + +class Envelope : public Object +{ + protected: + MY_FLOAT value; + MY_FLOAT target; + MY_FLOAT rate; + int state; + public: + Envelope(); + ~Envelope(); + void keyOn(); + void keyOff(); + void setRate(MY_FLOAT aRate); + void setTarget(MY_FLOAT aTarget); + void setValue(MY_FLOAT aValue); + MY_FLOAT tick(); + int informTick(); + MY_FLOAT lastOut(); +}; + +#endif diff --git a/FM4Alg3.cpp b/FM4Alg3.cpp new file mode 100644 index 0000000..93f3433 --- /dev/null +++ b/FM4Alg3.cpp @@ -0,0 +1,51 @@ +/******************************************/ +/* Algorithm 3 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/* */ +/* Alg 3 is : 4--\ */ +/* 3-->2-- + -->1-->Out */ +/* */ +/* Controls: control1 = total mod index */ +/* control2 = crossfade of two */ +/* modulators */ +/* control3 = LFO speed */ +/* modWheel = LFO amount */ +/* */ +/******************************************/ + +#include "FM4Alg3.h" + +FM4Alg3 :: FM4Alg3() : FM4Op() +{ + /* We still don't make the waves here yet, because */ + /* we still don't know what they will be. */ +} + +MY_FLOAT FM4Alg3 :: tick() +{ + MY_FLOAT temp; + + temp = vibWave->tick() * modDepth * 0.2; + waves[0]->setFreq(baseFreq * (1.0 + temp) * ratios[0]); + waves[1]->setFreq(baseFreq * (1.0 + temp) * ratios[1]); + waves[2]->setFreq(baseFreq * (1.0 + temp) * ratios[2]); + waves[3]->setFreq(baseFreq * (1.0 + temp) * ratios[3]); + + temp = gains[2] * adsr[2]->tick() * waves[2]->tick(); + waves[1]->addPhaseOffset(temp); + + waves[3]->addPhaseOffset(twozero->lastOut()); + temp = (1.0 - (control2 * 0.5)) * gains[3] * adsr[3]->tick() * waves[3]->tick(); + twozero->tick(temp); + + temp += control2 * 0.5 * gains[1] * adsr[1]->tick() * waves[1]->tick(); + temp = temp * control1; + + waves[0]->addPhaseOffset(temp); + temp = gains[0] * adsr[0]->tick() * waves[0]->tick(); + + lastOutput = temp * 0.5; + return lastOutput; +} + diff --git a/FM4Alg3.h b/FM4Alg3.h new file mode 100644 index 0000000..ad8a530 --- /dev/null +++ b/FM4Alg3.h @@ -0,0 +1,29 @@ +/******************************************/ +/* Algorithm 3 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/* */ +/* Alg 3 is : 4--\ */ +/* 3-->2-- + -->1-->Out */ +/* */ +/* Controls: control1 = total mod index */ +/* control2 = crossfade of two */ +/* modulators */ +/* control3 = LFO speed */ +/* modWheel = LFO amount */ +/* */ +/******************************************/ + +#if !defined(__FM4Alg3_h) +#define __FM4Alg3_h + +#include "FM4Op.h" + +class FM4Alg3 : public FM4Op +{ + public: + FM4Alg3(); + MY_FLOAT tick(); +}; + +#endif diff --git a/FM4Alg4.cpp b/FM4Alg4.cpp new file mode 100644 index 0000000..53d3e6b --- /dev/null +++ b/FM4Alg4.cpp @@ -0,0 +1,48 @@ +/******************************************/ +/* Algorithm 4 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/* */ +/* Alg 4 is : 4->3--\ */ +/* 2-- + -->1-->Out */ +/* */ +/* Controls: control1 = total mod index */ +/* control2 = crossfade of two */ +/* modulators */ +/* control3 = LFO speed */ +/* modWheel = LFO amount */ +/* */ +/******************************************/ + +#include "FM4Alg4.h" + +FM4Alg4 :: FM4Alg4() : FM4Op() +{ + /* We still don't make the waves here yet, because */ + /* we still don't know what they will be. */ +} + +MY_FLOAT FM4Alg4 :: tick() +{ + MY_FLOAT temp; + + temp = vibWave->tick() * modDepth * 0.2; + waves[0]->setFreq(baseFreq * (1.0 + temp) * ratios[0]); + waves[1]->setFreq(baseFreq * (1.0 + temp) * ratios[1]); + waves[2]->setFreq(baseFreq * (1.0 + temp) * ratios[2]); + waves[3]->setFreq(baseFreq * (1.0 + temp) * ratios[3]); + + waves[3]->addPhaseOffset(twozero->lastOut()); + temp = gains[3] * adsr[3]->tick() * waves[3]->tick(); + twozero->tick(temp); + waves[2]->addPhaseOffset(temp); + temp = (1.0 - (control2 * 0.5)) * gains[2] * adsr[2]->tick() * waves[2]->tick(); + temp += control2 * 0.5 * gains[1] * adsr[1]->tick() * waves[1]->tick(); + temp = temp * control1; + waves[0]->addPhaseOffset(temp); + temp = gains[0] * adsr[0]->tick() * waves[0]->tick(); + + lastOutput = temp * 0.5; + return lastOutput; +} + diff --git a/FM4Alg4.h b/FM4Alg4.h new file mode 100644 index 0000000..6a21da3 --- /dev/null +++ b/FM4Alg4.h @@ -0,0 +1,29 @@ +/******************************************/ +/* Algorithm 4 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/* */ +/* Alg 4 is : 4->3--\ */ +/* 2-- + -->1-->Out */ +/* */ +/* Controls: control1 = total mod index */ +/* control2 = crossfade of two */ +/* modulators */ +/* control3 = LFO speed */ +/* modWheel = LFO amount */ +/* */ +/******************************************/ + +#if !defined(__FM4Alg4_h) +#define __FM4Alg4_h + +#include "FM4Op.h" + +class FM4Alg4 : public FM4Op +{ + public: + FM4Alg4(); + MY_FLOAT tick(); +}; + +#endif diff --git a/FM4Alg5.cpp b/FM4Alg5.cpp new file mode 100644 index 0000000..c6eaca7 --- /dev/null +++ b/FM4Alg5.cpp @@ -0,0 +1,48 @@ +/******************************************/ +/* Algorithm 5 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/* This connection topology is 2 simple */ +/* FM Pairs summed together, like: */ +/* */ +/* Alg 5 is : 4->3--\ */ +/* + --> Out */ +/* 2->1--/ */ +/* */ +/* Controls: control1 = mod index 1 */ +/* control2 = crossfade of two */ +/* outputs */ +/* control3 = LFO speed */ +/* modWheel = LFO amount */ +/* */ +/******************************************/ + +#include "FM4Alg5.h" + +FM4Alg5 :: FM4Alg5() : FM4Op() +{ + /* We still don't make the waves here yet, because */ + /* we still don't know what they will be. */ +} + +MY_FLOAT FM4Alg5 :: tick() +{ + MY_FLOAT temp,temp2; + + temp = gains[1] * adsr[1]->tick() * waves[1]->tick(); + temp = temp * control1; + waves[0]->addPhaseOffset(temp); + waves[3]->addPhaseOffset(twozero->lastOut()); + temp = gains[3] * adsr[3]->tick() * waves[3]->tick(); + twozero->tick(temp); + waves[2]->addPhaseOffset(temp); + temp = (1.0 - (control2 * 0.5)) * gains[0] * adsr[0]->tick() * waves[0]->tick(); + temp += control2 * 0.5 * gains[2] * adsr[2]->tick() * waves[2]->tick(); + + temp2 = vibWave->tick() * modDepth; /* Calculate amplitude mod */ + temp = temp * (1.0 + temp2); /* and apply it to output */ + + lastOutput = temp * 0.5; + return lastOutput; +} + diff --git a/FM4Alg5.h b/FM4Alg5.h new file mode 100644 index 0000000..00ad570 --- /dev/null +++ b/FM4Alg5.h @@ -0,0 +1,32 @@ +/******************************************/ +/* Algorithm 5 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/* This connection topology is 2 simple */ +/* FM Pairs summed together, like: */ +/* */ +/* 1 -> 2 -\ */ +/* +-> Out */ +/* 3 -> 4 -/ */ +/* */ +/* Controls: control1 = mod index 1 */ +/* control2 = crossfade of two */ +/* outputs */ +/* control3 = LFO speed */ +/* modWheel = LFO amount */ +/* */ +/******************************************/ + +#if !defined(__FM4Alg5_h) +#define __FM4Alg5_h + +#include "FM4Op.h" + +class FM4Alg5 : public FM4Op +{ + public: + FM4Alg5(); + MY_FLOAT tick(); +}; + +#endif diff --git a/FM4Alg6.cpp b/FM4Alg6.cpp new file mode 100644 index 0000000..ce071c1 --- /dev/null +++ b/FM4Alg6.cpp @@ -0,0 +1,54 @@ +/******************************************/ +/* Algorithm 6 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/* This connection topology is three */ +/* Carriers and a common Modulator */ +/* */ +/* /->1 -\ */ +/* 4-|-->2 - +-> Out */ +/* \->3 -/ */ +/* */ +/* Controls: control1 = vowel */ +/* control2 = spectral tilt */ +/* control3 = LFO speed */ +/* modWheel = LFO amount */ +/* */ +/******************************************/ + +#include "FM4Alg6.h" + +FM4Alg6 :: FM4Alg6() : FM4Op() +{ + /* We still don't make the waves here yet, because */ + /* we still don't know what they will be. */ +} + +MY_FLOAT FM4Alg6 :: tick() +{ + MY_FLOAT temp,temp2; + + temp = gains[3] * adsr[3]->tick() * waves[3]->tick(); + temp2 = vibWave->tick() * modDepth * 0.1; /* Calculate frequency mod */ + + waves[0]->setFreq(baseFreq * (1.0 + temp2) * ratios[0]); + waves[1]->setFreq(baseFreq * (1.0 + temp2) * ratios[1]); + waves[2]->setFreq(baseFreq * (1.0 + temp2) * ratios[2]); + waves[3]->setFreq(baseFreq * (1.0 + temp2) * ratios[3]); + + waves[0]->addPhaseOffset(temp * mods[0]); + waves[1]->addPhaseOffset(temp * mods[1]); + waves[2]->addPhaseOffset(temp * mods[2]); + waves[3]->addPhaseOffset(twozero->lastOut()); + twozero->tick(temp); + temp = gains[0] * tilt[0] * adsr[0]->tick() * waves[0]->tick(); + temp += gains[1] * tilt[1] * adsr[1]->tick() * waves[1]->tick(); + temp += gains[2] * tilt[2] * adsr[2]->tick() * waves[2]->tick(); + + return temp * 0.33; +} + +void FM4Alg6 :: controlChange(int number, MY_FLOAT value) +{ + +} diff --git a/FM4Alg6.h b/FM4Alg6.h new file mode 100644 index 0000000..a48f644 --- /dev/null +++ b/FM4Alg6.h @@ -0,0 +1,35 @@ +/******************************************/ +/* Algorithm 6 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/* This connection topology is three */ +/* Carriers and a common Modulator */ +/* */ +/* /->1 -\ */ +/* 4-|-->2 - +-> Out */ +/* \->3 -/ */ +/* */ +/* Controls: control1 = vowel */ +/* control2 = spectral tilt */ +/* control3 = LFO speed */ +/* modWheel = LFO amount */ +/* */ +/******************************************/ + +#if !defined(__FM4Alg6_h) +#define __FM4Alg6_h + +#include "FM4Op.h" + +class FM4Alg6 : public FM4Op +{ + protected: + MY_FLOAT tilt[3]; + MY_FLOAT mods[3]; + public: + FM4Alg6(); + MY_FLOAT tick(); + virtual void controlChange(int number, MY_FLOAT value); +}; + +#endif diff --git a/FM4Alg8.cpp b/FM4Alg8.cpp new file mode 100644 index 0000000..6743eee --- /dev/null +++ b/FM4Alg8.cpp @@ -0,0 +1,43 @@ +/******************************************/ +/* Algorithm 8 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/* This connection topology is simple */ +/* Additive Synthesis, like: */ +/* */ +/* 1 --. */ +/* 2 -\| */ +/* +-> Out */ +/* 3 -/| */ +/* 4 -- */ +/* */ +/* Controls: control1 = op4 (fb) gain */ +/* control2 = op3 gain */ +/* control3 = LFO speed */ +/* modWheel = LFO amount */ +/* */ +/******************************************/ + +#include "FM4Alg8.h" + +FM4Alg8 :: FM4Alg8() : FM4Op() +{ + /* We still don't make the waves here yet, because */ + /* we still don't know what they will be. */ +} + +MY_FLOAT FM4Alg8 :: tick() +{ + MY_FLOAT temp; + + waves[3]->addPhaseOffset(twozero->lastOut()); + temp = control1 * 2.0 * gains[3] * adsr[3]->tick() * waves[3]->tick(); + twozero->tick(temp); + temp += control2 * 2.0 * gains[2] * adsr[2]->tick() * waves[2]->tick(); + temp += gains[1] * adsr[1]->tick() * waves[1]->tick(); + temp += gains[0] * adsr[0]->tick() * waves[0]->tick(); + + lastOutput = temp * 0.125; + return lastOutput; +} + diff --git a/FM4Alg8.h b/FM4Alg8.h new file mode 100644 index 0000000..864a9d2 --- /dev/null +++ b/FM4Alg8.h @@ -0,0 +1,33 @@ +/******************************************/ +/* Algorithm 8 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/* This connection topology is simple */ +/* Additive Synthesis, like: */ +/* */ +/* 1 --. */ +/* 2 -\| */ +/* +-> Out */ +/* 3 -/| */ +/* 4 -- */ +/* */ +/* Controls: control1 = op4 (fb) gain */ +/* control2 = op3 gain */ +/* control3 = LFO speed */ +/* modWheel = LFO amount */ +/* */ +/******************************************/ + +#if !defined(__FM4Alg8_h) +#define __FM4Alg8_h + +#include "FM4Op.h" + +class FM4Alg8 : public FM4Op +{ + public: + FM4Alg8(); + virtual MY_FLOAT tick(); +}; + +#endif diff --git a/FM4Op.cpp b/FM4Op.cpp new file mode 100644 index 0000000..5c858e3 --- /dev/null +++ b/FM4Op.cpp @@ -0,0 +1,179 @@ +/*******************************************/ +/* Master Class for 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/* This instrument contains 4 waves, */ +/* 4 adsr, and various state vars. */ +/* */ +/* The basic Chowning/Stanford FM patent */ +/* expired April 1995, but there exist */ +/* follow-on patents, mostly assigned to */ +/* Yamaha. If you are of the type who */ +/* should worry about this (making money) */ +/* worry away. */ +/* */ +/*******************************************/ + +#include "FM4Op.h" + +FM4Op :: FM4Op() +{ + int i; + MY_FLOAT temp; + MY_FLOAT tempCoeffs[2] = {0.0, -1.0}; + adsr[0] = new ADSR; + adsr[1] = new ADSR; + adsr[2] = new ADSR; + adsr[3] = new ADSR; + twozero = new TwoZero; + vibWave = new RawLoop("rawwaves/sinewave.raw"); + vibWave->normalize(); + vibWave->setFreq(6.0); /* should make this random?? */ + modDepth = 0.0; + /* We don't make the waves here yet, because */ + /* we don't know what they will be. */ + baseFreq = 440.0; + ratios[0] = 1.0; + ratios[1] = 1.0; + ratios[2] = 1.0; + ratios[3] = 1.0; + gains[0] = 1.0; + gains[1] = 1.0; + gains[2] = 1.0; + gains[3] = 1.0; + twozero->setZeroCoeffs(tempCoeffs); + twozero->setGain(0.0); + control1 = 1.0; + control2 = 1.0; + temp = 1.0; + for (i=99;i>=0;i--) { + __FM4Op_gains[i] = temp; + temp *= 0.933033; + } + temp = 1.0; + for (i=15;i>=0;i--) { + __FM4Op_susLevels[i] = temp; + temp *= 0.707101; + } + temp = 8.498186; + for (i=0;i<32;i++) { + __FM4Op_attTimes[i] = temp; + temp *= 0.707101; + } +} + +FM4Op :: ~FM4Op() +{ + delete adsr[0]; + delete adsr[1]; + delete adsr[2]; + delete adsr[3]; + delete waves[0]; + delete waves[1]; + delete waves[2]; + delete waves[3]; + delete vibWave; + delete twozero; +} + +void FM4Op :: loadWaves(char* wave1, char* wave2, char* wave3, char* wave4) +{ + int i; + waves[0] = new RawLoop(wave1); + waves[1] = new RawLoop(wave2); + waves[2] = new RawLoop(wave3); + waves[3] = new RawLoop(wave4); + for (i=0;i<4;i++) { + waves[i]->normalize(); + } +} +void FM4Op :: setFreq(MY_FLOAT frequency) +{ + baseFreq = frequency; + waves[0]->setFreq(baseFreq * ratios[0]); + waves[1]->setFreq(baseFreq * ratios[1]); + waves[2]->setFreq(baseFreq * ratios[2]); + waves[3]->setFreq(baseFreq * ratios[3]); +} + +void FM4Op :: setRatio(int whichOne, MY_FLOAT ratio) +{ + ratios[whichOne] = ratio; + if (ratio>0.0) + waves[whichOne]->setFreq(baseFreq * ratio); + else + waves[whichOne]->setFreq(ratio); +} + +void FM4Op :: setGain(int whichOne, MY_FLOAT gain) +{ + gains[whichOne]=gain; +} + +void FM4Op :: keyOn() +{ + adsr[0]->keyOn(); + adsr[1]->keyOn(); + adsr[2]->keyOn(); + adsr[3]->keyOn(); +} + +void FM4Op :: keyOff() +{ + adsr[0]->keyOff(); + adsr[1]->keyOff(); + adsr[2]->keyOff(); + adsr[3]->keyOff(); +} + +void FM4Op :: noteOff(MY_FLOAT amp) +{ + this->keyOff(); +#if defined(_debug_) + printf("FM4Op : NoteOff: Amp=%lf\n",amp); +#endif +} + +void FM4Op :: setModulationSpeed(MY_FLOAT mSpeed) +{ + vibWave->setFreq(mSpeed); +} + +void FM4Op :: setModulationDepth(MY_FLOAT mDepth) +{ + modDepth = mDepth; +} + +void FM4Op :: setControl1(MY_FLOAT cVal) +{ + control1 = cVal*2.0; +} + +void FM4Op :: setControl2(MY_FLOAT cVal) +{ + control2 = cVal*2.0; +} + +void FM4Op :: controlChange(int number, MY_FLOAT value) +{ +#if defined(_debug_) + printf("FM4Op : ControlChange: Number=%i Value=%f\n",number,value); +#endif + if (number == MIDI_control1) + this->setControl1(value * NORM_7); + else if (number == MIDI_control2) + this->setControl2(value * NORM_7); + else if (number == MIDI_control3) + this->setModulationSpeed(value * NORM_7 * 12.0); /* 0 to 12 Hz */ + else if (number == MIDI_mod_wheel) + this->setModulationDepth(value * NORM_7); + else if (number == MIDI_after_touch) { + adsr[0]->setTarget(value * NORM_7); + adsr[1]->setTarget(value * NORM_7); + adsr[2]->setTarget(value * NORM_7); + adsr[3]->setTarget(value * NORM_7); + } + else { + printf("FM4Op : Undefined Control Number!!\n"); + } +} + diff --git a/FM4Op.h b/FM4Op.h new file mode 100644 index 0000000..87d56a5 --- /dev/null +++ b/FM4Op.h @@ -0,0 +1,59 @@ +/*******************************************/ +/* Master Class for 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/* This instrument contains an 4 waves, */ +/* 4 envelopes, and various state vars. */ +/* */ +/* The basic Chowning/Stanford FM patent */ +/* expired April 1995, but there exist */ +/* follow-on patents, mostly assigned to */ +/* Yamaha. If you are of the type who */ +/* should worry about this (making money) */ +/* worry away. */ +/* */ +/*******************************************/ + +#if !defined(__FM4Op_h) +#define __FM4Op_h + +#include "Instrmnt.h" +#include "ADSR.h" +#include "RawLoop.h" +#include "TwoZero.h" + +class FM4Op : public Instrmnt +{ + protected: + ADSR *adsr[4]; + RawLoop *waves[4]; + RawLoop *vibWave; + TwoZero *twozero; + MY_FLOAT baseFreq; + MY_FLOAT ratios[4]; + MY_FLOAT gains[4]; + MY_FLOAT modDepth; + MY_FLOAT control1; + MY_FLOAT control2; + MY_FLOAT __FM4Op_gains[100]; + MY_FLOAT __FM4Op_susLevels[16]; + MY_FLOAT __FM4Op_attTimes[32]; + public: + FM4Op(); + ~FM4Op(); + void loadWaves(char* wave1, char* wave2, char* wave3, char* wave4); + void clear(); + void setFreq(MY_FLOAT frequency); + void setRatio(int whichOne, MY_FLOAT ratio); + void setGain(int whichOne, MY_FLOAT gain); + void keyOn(); + void keyOff(); + void noteOff(MY_FLOAT amp); + /* There's no tick() method here, because that depends on the algorithm */ + void setModulationSpeed(MY_FLOAT mSpeed); + void setModulationDepth(MY_FLOAT mDepth); + void setControl1(MY_FLOAT cVal); + void setControl2(MY_FLOAT cVal); + virtual void controlChange(int number, MY_FLOAT value); +}; + +#endif diff --git a/FMVoices.cpp b/FMVoices.cpp new file mode 100644 index 0000000..463e9e5 --- /dev/null +++ b/FMVoices.cpp @@ -0,0 +1,118 @@ +/******************************************/ +/* Singing Voice Synthesis Subclass */ +/* of Algorithm 6 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1996 */ +/******************************************/ + +#include "FMVoices.h" + +FMVoices :: FMVoices() : FM4Alg6() +{ + this->loadWaves("rawwaves/sinewave.raw", + "rawwaves/sinewave.raw", + "rawwaves/sinewave.raw", + "rawwaves/sinewave.raw"); + + this->setRatio(0,2.00); + this->setRatio(1,4.00); + this->setRatio(2,12.0); + this->setRatio(3,1.00); + gains[3] = __FM4Op_gains[80]; + adsr[0]->setAll(0.001,0.001,__FM4Op_susLevels[15],0.001); + adsr[1]->setAll(0.001,0.001,__FM4Op_susLevels[15],0.001); + adsr[2]->setAll(0.001,0.001,__FM4Op_susLevels[15],0.001); + adsr[3]->setAll(0.05,0.05,__FM4Op_susLevels[15],0.0001); + twozero->setGain(0.0); + modDepth = 0.005; + currentVowel = 0; + tilt[0] = 1.0; + tilt[1] = 0.5; + tilt[2] = 0.2; + mods[0] = 1.0; + mods[1] = 1.1; + mods[2] = 1.1; + baseFreq = 110.0; + this->setFreq(110.0); +} + +#include "phonTabl.h" + +void FMVoices :: setFreq(MY_FLOAT frequency) +{ + MY_FLOAT temp,temp2; + int tempi,tempi2; + + if (currentVowel < 16) { + tempi2 = currentVowel; + temp2 = 0.9; + } + else if (currentVowel < 32) { + tempi2 = currentVowel - 16; + temp2 = 1.0; + } + else if (currentVowel < 48) { + tempi2 = currentVowel - 32; + temp2 = 1.1; + } + else if (currentVowel < 64) { + tempi2 = currentVowel - 48; + temp2 = 1.2; + } + baseFreq = frequency; + temp = (temp2 * phonParams[tempi2][0][0] / baseFreq) + 0.5; + tempi = (int) temp; + this->setRatio(0,(MY_FLOAT) tempi); + temp = (temp2 * phonParams[tempi2][1][0] / baseFreq) + 0.5; + tempi = (int) temp; + this->setRatio(1,(MY_FLOAT) tempi); + temp = (temp2 * phonParams[tempi2][2][0] / baseFreq) + 0.5; + tempi = (int) temp; + this->setRatio(2,(MY_FLOAT) tempi); + gains[0] = 1.0; // pow(10.0,phonParams[tempi2][0][2] * 0.05); + gains[1] = 1.0; // pow(10.0,phonParams[tempi2][1][2] * 0.05); + gains[2] = 1.0; // pow(10.0,phonParams[tempi2][2][2] * 0.05); +} + +void FMVoices :: noteOn(MY_FLOAT freq, MY_FLOAT amp) +{ + this->setFreq(freq); + tilt[0] = amp; + tilt[1] = amp * amp; + tilt[2] = amp * amp * amp; + this->keyOn(); +#if defined(_debug_) + printf("FMVoices : NoteOn: Freq=%lf Amp=%lf\n",freq,amp); +#endif +} + +void FMVoices :: controlChange(int number, MY_FLOAT value) +{ + MY_FLOAT temp; + int tempi; + +#if defined(_debug_) + printf("FM4Op : ControlChange: Number=%i Value=%f\n",number,value); +#endif + if (number == MIDI_control1) + gains[3] = __FM4Op_gains[(int) (value * 0.78125)]; + else if (number == MIDI_control2) { + tempi = (int) (value / 2); + currentVowel = tempi; + this->setFreq(baseFreq); + } + else if (number == MIDI_control3) + this->setModulationSpeed(value * NORM_7 * 12.0); /* 0 to 12 Hz */ + else if (number == MIDI_mod_wheel) + this->setModulationDepth(value * NORM_7); + else if (number == MIDI_after_touch) { + temp = value * NORM_7; + tilt[0] = temp; + tilt[1] = temp * temp; + tilt[2] = temp * temp * temp; + } + else { + printf("FM4Op : Undefined Control Number!!\n"); + } +} + diff --git a/FMVoices.h b/FMVoices.h new file mode 100644 index 0000000..33e4723 --- /dev/null +++ b/FMVoices.h @@ -0,0 +1,24 @@ +/******************************************/ +/* Singing Voice Synthesis Subclass */ +/* of Algorithm 6 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1996 */ +/******************************************/ + +#if !defined(__FMVoices_h) +#define __FMVoices_h + +#include "FM4Alg6.h" + +class FMVoices : public FM4Alg6 +{ + protected: + int currentVowel; + public: + FMVoices(); + virtual void setFreq(MY_FLOAT frequency); + virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp); + virtual void controlChange(int number, MY_FLOAT value); +}; + +#endif diff --git a/Filter.cpp b/Filter.cpp new file mode 100644 index 0000000..6b8c11c --- /dev/null +++ b/Filter.cpp @@ -0,0 +1,24 @@ +/*******************************************/ +/* Filter Class, by Perry R. Cook, 1995-96*/ +/* This is the base class for all filters.*/ +/* To me, most anything is a filter, but */ +/* I'll be a little less general here, and*/ +/* define a filter as something which has */ +/* input(s), output(s), and gain. */ +/*******************************************/ + +#include "Filter.h" + +Filter :: Filter() : Object() +{ +} + +Filter :: ~Filter() +{ +} + +MY_FLOAT Filter :: lastOut() +{ + return lastOutput; +} + diff --git a/Filter.h b/Filter.h new file mode 100644 index 0000000..727c6f6 --- /dev/null +++ b/Filter.h @@ -0,0 +1,28 @@ +/*******************************************/ +/* Filter Class, by Perry R. Cook, 1995-96*/ +/* This is the base class for all filters.*/ +/* To me, most anything is a filter, but */ +/* I'll be a little less general here, and*/ +/* define a filter as something which has */ +/* input(s), output(s), and gain. */ +/*******************************************/ + +#if !defined(__Filter_h) +#define __Filter_h + +#include "Object.h" + +class Filter : public Object +{ + protected: + MY_FLOAT gain; + MY_FLOAT *outputs; + MY_FLOAT *inputs; + MY_FLOAT lastOutput; + public: + Filter(); + ~Filter(); + MY_FLOAT lastOut(); +}; + +#endif diff --git a/Flute.cpp b/Flute.cpp new file mode 100644 index 0000000..00ec943 --- /dev/null +++ b/Flute.cpp @@ -0,0 +1,172 @@ +/******************************************/ +/* WaveGuide Flute ala Karjalainen, */ +/* Smith, Waryznyk, etc. */ +/* with polynomial Jet ala Cook */ +/* by Perry Cook, 1995-96 */ +/* */ +/* This is a waveguide model, and thus */ +/* relates to various Stanford Univ. */ +/* and possibly Yamaha and other patents.*/ +/* */ +/* Controls: CONTROL1 = jetDelay */ +/* CONTROL2 = noiseGain */ +/* CONTROL3 = vibFreq */ +/* MOD_WHEEL= vibAmt */ +/******************************************/ + +#include "Flute.h" + +Flute :: Flute(MY_FLOAT lowestFreq) +{ + long length; + length = (long) (SRATE / lowestFreq + 1); + boreDelay = new DLineL(length); + length >> 1; + jetDelay = new DLineL(length); + jetTable = new JetTabl; + filter = new OnePole; + dcBlock = new DCBlock; + noise = new Noise; + adsr = new ADSR; + vibr = new RawLoop("rawwaves/sinewave.raw"); + this->clear(); + + boreDelay->setDelay(100.0); + jetDelay->setDelay(49.0); + + filter->setPole(0.7 - (0.1 * RATE_NORM)); + filter->setGain(-1.0); + vibr->normalize(); + vibr->setFreq(5.925); + adsr->setAll(0.02, 0.05, 0.8, 0.001); + endRefl = 0.5; + jetRefl = 0.5; + noiseGain = 0.15; /* Breath pressure random component */ + vibrGain = 0.05; /* breath periodic vibrato component */ + jetRatio = 0.32; +} + +Flute :: ~Flute() +{ + delete jetDelay; + delete boreDelay; + delete jetTable; + delete filter; + delete dcBlock; + delete noise; + delete adsr; + delete vibr; +} + +void Flute :: clear() +{ + jetDelay->clear(); + boreDelay->clear(); + filter->clear(); + dcBlock->clear(); +/* adsr->reset(); */ +} + +void Flute :: setFreq(MY_FLOAT frequency) +{ + MY_FLOAT temp; + lastFreq = frequency * 0.66666; /* we're overblowing here */ + temp = SRATE / lastFreq - 2.0; /* Length - approx. filter delay */ + boreDelay->setDelay(temp); /* Length of bore tube */ + jetDelay->setDelay(temp * jetRatio); /* jet delay shorter */ +} + +void Flute :: startBlowing(MY_FLOAT amplitude, MY_FLOAT rate) +{ + adsr->setAttackRate(rate); + maxPressure = amplitude / 0.8; + adsr->keyOn(); +} + +void Flute :: stopBlowing(MY_FLOAT rate) +{ + adsr->setReleaseRate(rate); + adsr->keyOff(); +} + +void Flute :: noteOn(MY_FLOAT freq, MY_FLOAT amp) +{ + this->setFreq(freq); + this->startBlowing(1.1 + (amp * 0.20),amp * 0.02); + outputGain = amp + 0.001; +#if defined(_debug_) + printf("Flute : NoteOn: Freq=%lf Amp=%lf\n",freq,amp); +#endif +} + +void Flute :: noteOff(MY_FLOAT amp) +{ + this->stopBlowing(amp * 0.02); +#if defined(_debug_) + printf("Flute : NoteOff: Amp=%lf\n",amp); +#endif +} + +void Flute :: setJetRefl(MY_FLOAT refl) +{ + jetRefl = refl; +} + +void Flute :: setEndRefl(MY_FLOAT refl) +{ + endRefl = refl; +} + +void Flute :: setJetDelay(MY_FLOAT aRatio) +{ + MY_FLOAT temp; + temp = SRATE / lastFreq - 2.0; /* Length - approx. filter delay */ + jetRatio = aRatio; + jetDelay->setDelay(temp * aRatio); /* Scaled by ratio */ +} + +MY_FLOAT Flute :: tick() +{ + MY_FLOAT temp; + MY_FLOAT pressureDiff; + MY_FLOAT randPressure; + MY_FLOAT breathPressure; + + breathPressure = maxPressure * adsr->tick(); /* Breath Pressure */ + randPressure = noiseGain * noise->tick(); /* Random Deviation */ + randPressure += vibrGain * vibr->tick(); /* + breath vibrato */ + randPressure *= breathPressure; /* All scaled by Breath Pressure */ + + temp = filter->tick(boreDelay->lastOut()); + temp = dcBlock->tick(temp); /* Block DC on reflection */ + pressureDiff = breathPressure + randPressure - /* Breath Pressure */ + (jetRefl * temp); /* - reflected */ + pressureDiff = jetDelay->tick(pressureDiff); /* Jet Delay Line */ + pressureDiff = jetTable->lookup(pressureDiff) /* Non-Lin Jet + reflected */ + + (endRefl * temp); + lastOutput = 0.3 * boreDelay->tick(pressureDiff); /* Bore Delay and "bell" filter */ + + lastOutput *= outputGain; + return lastOutput; + +} + +void Flute :: controlChange(int number, MY_FLOAT value) +{ +#if defined(_debug_) + printf("Flute : ControlChange: Number=%i Value=%f\n",number,value); +#endif + if (number == MIDI_control1) + this->setJetDelay(0.08 + (0.48 * value * NORM_7)); + else if (number == MIDI_control2) + noiseGain = (value * NORM_7 * 0.4); + else if (number == MIDI_control3) + vibr->setFreq((value * NORM_7 * 12.0)); + else if (number == MIDI_mod_wheel) + vibrGain = (value * NORM_7 * 0.4); + else if (number == MIDI_after_touch) + adsr->setTarget(value * NORM_7); + else { + printf("Flute : Undefined Control Number!!\n"); + } +} diff --git a/Flute.h b/Flute.h new file mode 100644 index 0000000..3f9b00a --- /dev/null +++ b/Flute.h @@ -0,0 +1,64 @@ +/******************************************/ +/* WaveGuide Flute ala Karjalainen, */ +/* Smith, Waryznyk, etc. */ +/* with polynomial Jet ala Cook */ +/* by Perry Cook, 1995-96 */ +/* */ +/* This is a waveguide model, and thus */ +/* relates to various Stanford Univ. */ +/* and possibly Yamaha and other patents.*/ +/* */ +/* Controls: CONTROL1 = jetDelay */ +/* CONTROL2 = noiseGain */ +/* CONTROL3 = vibFreq */ +/* MOD_WHEEL= vibAmt */ +/******************************************/ + +#if !defined(__Flute_h) +#define __Flute_h + +#include "Instrmnt.h" +#include "JetTabl.h" +#include "DLineL.h" +#include "OnePole.h" +#include "DCBlock.h" +#include "Noise.h" +#include "ADSR.h" +#include "RawLoop.h" + +class Flute : public Instrmnt +{ + protected: + DLineL *jetDelay; + DLineL *boreDelay; + JetTabl *jetTable; + OnePole *filter; + DCBlock *dcBlock; + Noise *noise; + ADSR *adsr; + RawLoop *vibr; + MY_FLOAT lastFreq; + MY_FLOAT maxPressure; + MY_FLOAT jetRefl; + MY_FLOAT endRefl; + MY_FLOAT noiseGain; + MY_FLOAT vibrGain; + MY_FLOAT outputGain; + MY_FLOAT jetRatio; + public: + Flute(MY_FLOAT lowestFreq); + ~Flute(); + void clear(); + void startBlowing(MY_FLOAT amplitude,MY_FLOAT rate); + void stopBlowing(MY_FLOAT rate); + virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp); + virtual void noteOff(MY_FLOAT amp); + void setJetRefl(MY_FLOAT refl); + void setEndRefl(MY_FLOAT refl); + virtual void setFreq(MY_FLOAT frequency); + virtual MY_FLOAT tick(); + virtual void controlChange(int number, MY_FLOAT value); + void setJetDelay(MY_FLOAT aLength); +}; + +#endif diff --git a/FormSwep.cpp b/FormSwep.cpp new file mode 100644 index 0000000..be1c4d8 --- /dev/null +++ b/FormSwep.cpp @@ -0,0 +1,170 @@ +/*******************************************/ +/* Sweepable Formant (2-pole) */ +/* Filter Class, by Perry R. Cook, 1995-96*/ +/* See books on filters to understand */ +/* more about how this works. This drives*/ +/* to a target at speed set by rate. */ +/*******************************************/ + +#include "FormSwep.h" + +FormSwep :: FormSwep() : Filter() +{ + outputs = (MY_FLOAT *) malloc(2 * MY_FLOAT_SIZE); + poleCoeffs[0] = 0.0; + poleCoeffs[1] = 0.0; + gain = 1.0; + freq = 0.0; + reson = 0.0; + currentGain = 1.0; + currentFreq = 0.0; + currentReson = 0.0; + targetGain = 1.0; + targetFreq = 0.0; + targetReson = 0.0; + deltaGain = 0.0; + deltaFreq = 0.0; + deltaReson = 0.0; + sweepState = 0; + sweepRate = 0.002; + dirty = 0; + this->clear(); +} + +FormSwep :: ~FormSwep() +{ + free(outputs); +} + +void FormSwep :: clear() +{ + outputs[0] = 0.0; + outputs[1] = 0.0; +} + +void FormSwep :: setPoleCoeffs(MY_FLOAT *coeffs) +{ + dirty = 0; + poleCoeffs[0] = coeffs[0]; + poleCoeffs[1] = coeffs[1]; +} + +void FormSwep :: setFreqAndReson(MY_FLOAT aFreq, MY_FLOAT aReson) +{ + dirty = 0; + reson = aReson; + freq = aFreq; + currentReson = aReson; + currentFreq = aFreq; + poleCoeffs[1] = - (reson * reson); + poleCoeffs[0] = 2.0 * reson * cos(TWO_PI * freq / SRATE); +} + +void FormSwep :: setStates(MY_FLOAT aFreq, MY_FLOAT aReson, MY_FLOAT aGain) +{ + dirty = 0; + freq = aFreq; + reson = aReson; + gain = aGain; + targetFreq = aFreq; + targetReson = aReson; + targetGain = aGain; + currentFreq = aFreq; + currentReson = aReson; + currentGain = aGain; +} + +void FormSwep :: setTargets(MY_FLOAT aFreq, MY_FLOAT aReson, MY_FLOAT aGain) +{ + dirty = 1; + targetFreq = aFreq; + targetReson = aReson; + targetGain = aGain; + deltaFreq = aFreq - currentFreq; + deltaReson = aReson - currentReson; + deltaGain = aGain - currentGain; + sweepState = 0.0; +} + +void FormSwep :: setSweepRate(MY_FLOAT aRate) +{ + sweepRate = aRate; +} + +void FormSwep :: setGain(MY_FLOAT aValue) +{ + gain = aValue; +} + +MY_FLOAT FormSwep :: tick(MY_FLOAT sample) /* Perform Filter Operation */ +{ + MY_FLOAT temp; + + if (dirty) { + sweepState += sweepRate; + if (sweepState>= 1.0) { + sweepState = 1.0; + dirty = 0; + currentReson = targetReson; + reson = targetReson; + currentFreq = targetFreq; + freq = targetFreq; + currentGain = targetGain; + gain = targetGain; + } + else { + currentReson = reson + (deltaReson * sweepState); + currentFreq = freq + (deltaFreq * sweepState); + currentGain = gain + (deltaGain * sweepState); + } + poleCoeffs[1] = - (currentReson * currentReson); + poleCoeffs[0] = 2.0 * currentReson * cos(TWO_PI * currentFreq / SRATE); + } + + temp = currentGain * sample; + temp += poleCoeffs[0] * outputs[0]; + temp += poleCoeffs[1] * outputs[1]; + outputs[1] = outputs[0]; + outputs[0] = temp; + lastOutput = outputs[0]; + return lastOutput; +} + +/************ Test Main Program *****************/ +/* + +void main() +{ + FormSwep filter; + FILE *fd; + MY_FLOAT temp; + short data; + long i; + + fd = fopen("test.raw","wb"); + + filter.setTargets(100.0,0.99,0.01); + for (i=0;i<20000;i++) { + if (i%100 != 0) temp = 0.0; else temp = 1.0; + data = filter.tick(temp) * 32000.0; + fwrite(&data,2,1,fd); + } + + filter.setTargets(1000.0,0.99,0.01); + for (i=0;i<20000;i++) { + if (i%100 != 0) temp = 0.0; else temp = 1.0; + data = filter.tick(temp) * 32000.0; + fwrite(&data,2,1,fd); + } + + filter.setTargets(500.0,0.9999,0.001); + for (i=0;i<20000;i++) { + if (i%100 != 0) temp = 0.0; else temp = 1.0; + data = filter.tick(temp) * 32000.0; + fwrite(&data,2,1,fd); + } + + fclose(fd); +} +*/ + diff --git a/FormSwep.h b/FormSwep.h new file mode 100644 index 0000000..7a46c83 --- /dev/null +++ b/FormSwep.h @@ -0,0 +1,45 @@ +/*******************************************/ +/* Sweepable Formant (2-pole) */ +/* Filter Class, by Perry R. Cook, 1995-96*/ +/* See books on filters to understand */ +/* more about how this works. Nothing */ +/* out of the ordinary in this version. */ +/*******************************************/ + +#if !defined(__FormSwep_h) +#define __FormSwep_h + +#include "Filter.h" + +class FormSwep : public Filter +{ + protected: + MY_FLOAT poleCoeffs[2]; + MY_FLOAT freq; + MY_FLOAT reson; + int dirty; + MY_FLOAT targetFreq; + MY_FLOAT targetReson; + MY_FLOAT targetGain; + MY_FLOAT currentFreq; + MY_FLOAT currentReson; + MY_FLOAT currentGain; + MY_FLOAT deltaFreq; + MY_FLOAT deltaReson; + MY_FLOAT deltaGain; + MY_FLOAT sweepState; + MY_FLOAT sweepRate; + public: + FormSwep(); + ~FormSwep(); + void clear(); + void setPoleCoeffs(MY_FLOAT *coeffs); + void setGain(MY_FLOAT aValue); + void setFreqAndReson(MY_FLOAT aFreq, MY_FLOAT aReson); + void setStates(MY_FLOAT aFreq, MY_FLOAT aReson, MY_FLOAT aGain); + void setTargets(MY_FLOAT aFreq, MY_FLOAT aReson, MY_FLOAT aGain); + void setSweepRate(MY_FLOAT aRate); + MY_FLOAT tick(MY_FLOAT sample); +}; + +#endif diff --git a/HIERARCH.txt b/HIERARCH.txt new file mode 100644 index 0000000..6c13687 --- /dev/null +++ b/HIERARCH.txt @@ -0,0 +1,125 @@ +Brief Descriptions of Classes in TK96CPP +A ToolKit of Sound Synthesis Classes + and Instruments in C++ +Perry Cook, 1995-96, free distribution for +academic, instructional, tutorial, etc. purposes. +Please read README.txt for more information. + +<-----Building Blocks----->|<----------------Instruments------------------> + +SourcSink Filters Non-Lin ModalSyn FM Physical Sampling PhISM + & Formant + +Object---------------------------Instrmnt----------. + | | | | | | +Envelope| Filter BowTabl | .------------------|---------------------. + | | | JetTabl | | | | | | | | | +ADSR | OneZero ReedTabl| Modal4 | FM4Op---.| | | | PhISEM + | OnePole | | | | || | | | | + ._____| TwoZero .____| Marimba | FM4Alg3 || Plucked Sampler | Maracha + | | TwoPole | Vibraphn| | || Clarinet | | Whistle +Noise | DCBlock LipFilt AgogoBel| HeavyMtl|| Brass SamplFlt| VibraSlp + | | BiQuad | || Flute | | Tambourn +SubNoise| AllPass1 .____| .____|| Bowed Moog1 | + | DLineA | | || | + ._____| DLineL VoicForm FM4Alg4 ||____. | + | | DLineN | | | | +RawWave | FormSwep PercFlut| Plucked2 | + | | | | + ._____| .____| Mandolin .____| + | | | | | +RawLoop | FM4Alg5 | DrumSynt + | | | + ._____| Rhodey | + | | Wurley | +NiWave1S| TubeBell | + | .____| + ._____| | | + | | FM4Alg6 | +Modulatr| | | + | FMVoices| + ._____| | + | | .____| +SingWave| | + | FM4Alg8 + ._____| | + | | BeeThree +RawWvOut| + | + ._____| + | | +RawWvIn | + ._____| + | +NIFileIn + +********** Instruments and Algorithms ************** +Each Class will be listed either with all UGs it uses, +or the <> of which it is a flavor. +All inherit from Instrmnt, which inherits from Object. + +Plucked.cpp Basic Plucked String DLineA,OneZero,OnePole,Noise +Plucked2.cpp Not so Basic Pluck DLineL,DlineA,OneZero +Mandolin.cpp My Own Mandolin <> +Bowed.cpp Not Hideous Bowed String DlineL,BowTabl,OnePole,BiQuad,RawWave,ADSR +Brass.cpp Not So Bad Brass Inst. DLineA,LipFilt,DCBlock,ADSR,BiQuad +Clarinet.cpp Pretty Good Clarinet DLineL,ReedTabl,OneZero,Envelope,Noise.h +Flute.cpp Pretty Good Flute JetTabl,DLineL,OnePole,DCBlock,Noise,ADSR,RawWave +Modal4.cpp 4 Resonances Envelope,RawWave,BiQuad,OnePole +Marimba.cpp <> +Vibraphn.cpp <> +Agogobel.cpp <> +FM4Op.cpp 4 Operator FM Master ADSR,RawLoop,TwoZero +FM4Alg3.cpp 3 Cascade w/ FB Mod. <> +FM4Alg4.cpp Like Alg3 but diff. <> +FM4Alg5.cpp 2 Parallel Simple FMs <> +FM4Alg6.cpp 3 Carr. with 1 Mod. <> +FM4Alg8.cpp 4 Osc. Additive <> +HeavyMtl.cpp Distorted Synth <> +PercFlut.cpp Perc. Flute <> +Rhodey.cpp Rhodes-Like Elec. Piano <> +Wurley.cpp Wurlitz. Elec. Piano <> +TubeBell.cpp Classic FM Bell <> +FMVoices.cpp 3-Formant Voice Synth. <> +BeeThree.cpp Cheezy Organ for Paul <> +Sampler.cpp Sampling Synth. 4 each ADSR, RawWave (att), RawWave (loop), OnePole +SamplFlt.cpp Sampler with Swept Filt.<> +Moog1.cpp Swept filter flavor of <> +Voicform.cpp Source/Filter Voice Envelope,Noise,SingWave,FormSwep,OnePole,OneZero +DrumSynt.cpp Drum Synthesizer bunch of NIFileIn, and OnePole + +*********** Basic Unit Generators ************** + +Master Object: Object.cpp for compatibility with Objective C + +Source&Sink: RawWave.cpp Lin-Interp Wavetable, Looped or 1 Shot + NIWave1S.cpp Non-Interp Wavetable, 1 Shot + RawLoop.cpp Lin-Interp Wavetable, Looping + RawWvIn.cpp Lin-Interp Wave In streaming 'device' + NIFileIn.cpp Non-Interp Wave In streamer, closes & opens + RawWvOut.cpp Non-Interp Wave Out streaming 'device' + Envelope.cpp Linearly Goes to Target by Rate, + noteOn/Off + ADSR.cpp ADSR Flavor of Envelope + Noise.cpp Random Number Generator + SubNoise.cpp Random Numbers each N samples + +Filters: Filter.cpp Filter Master Class + OneZero.cpp One Zero Filter + OnePole.cpp One Pole Filter + AllPass1.cpp 1st Order All-Pass (phase) Filter + DCBlock.cpp DC Blocking 1Pole/1Zero Filter + TwoZero.cpp Two Zero Filter + TwoPole.cpp Two Pole Filter + BiQuad.cpp 2Pole/2Zero Filter + FormSwep.cpp Sweepable 2Pole filter, go to target by rate + DLineL.cpp Linearly Interpolating Delay Line + DLineA.cpp AllPass Interpolating Delay Line + DLineN.cpp Non Interpolating Delay Line + +NonLin&Lookup: JetTabl.cpp Cubic Jet NonLinearity + BowTabl.cpp 1/x^3-like Bow NonLinearity + ReedTabl.cpp 1 break point Reed NonLinearity + LipFilt.cpp Pressure Controlled BiQuad with NonLin + +Derived: Modulatr.cpp Per. and Rnd. Vibrato: RawWave,SubNoise,OnePole + SingWave.cpp Looping Wavetable with: Modulatr,Envelope diff --git a/HeavyMtl.cpp b/HeavyMtl.cpp new file mode 100644 index 0000000..230c3c1 --- /dev/null +++ b/HeavyMtl.cpp @@ -0,0 +1,60 @@ +/******************************************/ +/* Heavy Metal Synth Subclass */ +/* of Algorithm 3 (TX81Z) Subclass of */ +/* 3 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/******************************************/ + +#include "HeavyMtl.h" + +HeavyMtl :: HeavyMtl() : FM4Alg3() +{ + this->loadWaves("rawwaves/sinewave.raw", + "rawwaves/twopeaks.raw", + "rawwaves/twopeaks.raw", + "rawwaves/sinewave.raw"); + + this->setRatio(0,1.00 ); + this->setRatio(1,4.00 * 0.999); + this->setRatio(2,3.00 * 1.001); + this->setRatio(3,0.50 * 1.002); + gains[0] = __FM4Op_gains[92]; + gains[1] = __FM4Op_gains[76]; + gains[2] = __FM4Op_gains[91]; + gains[3] = __FM4Op_gains[68]; + adsr[0]->setAll(0.050,0.0100,1.0,0.001); + adsr[1]->setAll(0.050,0.0010,1.0,0.0001); + adsr[2]->setAll(0.001,0.0020,1.0,0.0002); + adsr[3]->setAll(0.050,0.0010,0.2,0.0002); + twozero->setGain(2.0); + vibWave->setFreq(5.5); + modDepth = 0.00; +} + +HeavyMtl :: ~HeavyMtl() +{ + +} + +void HeavyMtl :: setFreq(MY_FLOAT frequency) +{ + baseFreq = frequency; + waves[0]->setFreq(baseFreq * ratios[0]); + waves[1]->setFreq(baseFreq * ratios[1]); + waves[2]->setFreq(baseFreq * ratios[2]); + waves[3]->setFreq(baseFreq * ratios[3]); +} + +void HeavyMtl :: noteOn(MY_FLOAT freq, MY_FLOAT amp) +{ + gains[0] = amp * __FM4Op_gains[92]; + gains[1] = amp * __FM4Op_gains[76]; + gains[2] = amp * __FM4Op_gains[91]; + gains[3] = amp * __FM4Op_gains[68]; + this->setFreq(freq); + this->keyOn(); +#if defined(_debug_) + printf("HeavyMtl : NoteOn: Freq=%lf Amp=%lf\n",freq,amp); +#endif +} + diff --git a/HeavyMtl.h b/HeavyMtl.h new file mode 100644 index 0000000..685080f --- /dev/null +++ b/HeavyMtl.h @@ -0,0 +1,22 @@ +/******************************************/ +/* Heavy Metal Synth Subclass */ +/* of Algorithm 3 (TX81Z) Subclass of */ +/* 3 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/******************************************/ + +#if !defined(__HeavyMtl_h) +#define __HeavyMtl_h + +#include "FM4Alg3.h" + +class HeavyMtl : public FM4Alg3 +{ + public: + HeavyMtl(); + ~HeavyMtl(); + virtual void setFreq(MY_FLOAT frequency); + virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp); +}; + +#endif diff --git a/Instrmnt.cpp b/Instrmnt.cpp new file mode 100644 index 0000000..46b59fc --- /dev/null +++ b/Instrmnt.cpp @@ -0,0 +1,35 @@ +/******************************************/ +/* Instrument SuperClass for Toolkit96 */ +/* Perry R. Cook, Princeton University */ +/******************************************/ + +#include "Instrmnt.h" + +Instrmnt :: Instrmnt() +{ +} + +void Instrmnt :: noteOn(MY_FLOAT freq, MY_FLOAT amp) +{ +} + +void Instrmnt :: noteOff(MY_FLOAT amp) +{ +} + +void Instrmnt :: setFreq(MY_FLOAT freq) +{ +} + +MY_FLOAT Instrmnt :: tick() +{ +} + +MY_FLOAT Instrmnt :: lastOut() +{ + return lastOutput; +} + +void Instrmnt :: controlChange(int number, MY_FLOAT value) +{ +} diff --git a/Instrmnt.h b/Instrmnt.h new file mode 100644 index 0000000..db604d4 --- /dev/null +++ b/Instrmnt.h @@ -0,0 +1,25 @@ +/******************************************/ +/* Instrument SuperClass for Toolkit96 */ +/* Perry R. Cook, Princeton University */ +/******************************************/ + +#if !defined(__Instrmnt_h) +#define __Instrmnt_h + +#include "Object.h" + +class Instrmnt : public Object +{ + protected: + MY_FLOAT lastOutput; + public: + Instrmnt(); + MY_FLOAT lastOut(); + virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp); + virtual void noteOff(MY_FLOAT amp); + virtual void setFreq(MY_FLOAT frequency); + virtual MY_FLOAT tick(); + virtual void controlChange(int number, MY_FLOAT value); +}; + +#endif diff --git a/JetTabl.cpp b/JetTabl.cpp new file mode 100644 index 0000000..373f813 --- /dev/null +++ b/JetTabl.cpp @@ -0,0 +1,36 @@ +/**********************************************/ +/* Jet Table Object by Perry R. Cook, 1995-96 */ +/* Consult Fletcher and Rossing, Karjalainen, */ +/* Cook, more, for information. */ +/* This, as with many other of my "tables", */ +/* is not a table, but is computed by poly- */ +/* nomial calculation. */ +/**********************************************/ + +#include "JetTabl.h" + +JetTabl :: JetTabl() +{ + lastOutput = 0.0; +} + +JetTabl :: ~JetTabl() +{ +} + +MY_FLOAT JetTabl :: lookup(double sample) /* Perform "Table Lookup" */ +{ /* By Polynomial Calculation */ + lastOutput = sample * + (sample*sample - 1.0); /* (x^3 - x) approximates sigmoid of jet */ + if (lastOutput > 1.0) + lastOutput = 1.0; /* Saturation at +/- 1.0 */ + if (lastOutput < -1.0) + lastOutput = -1.0; + return lastOutput; +} + +MY_FLOAT JetTabl :: lastOut() +{ + return lastOutput; +} + diff --git a/JetTabl.h b/JetTabl.h new file mode 100644 index 0000000..bb80376 --- /dev/null +++ b/JetTabl.h @@ -0,0 +1,22 @@ +/**********************************************/ +/* Jet Table Object by Perry R. Cook, 1995-96 */ +/* Consult Fletcher and Rossing, Karjalainen, */ +/* Cook, more, for information. */ +/* This, as with many other of my "tables", */ +/* is not a table, but is computed by poly- */ +/* nomial calculation. */ +/**********************************************/ + +#include "Object.h" + +class JetTabl : public Object +{ + protected: + double lastOutput; + public: + JetTabl(); + ~JetTabl(); + double lookup(double deltaP); + double lastOut(); +}; + diff --git a/Lacrymosa b/Lacrymosa new file mode 100755 index 0000000..a31dad3 --- /dev/null +++ b/Lacrymosa @@ -0,0 +1 @@ +time textVoic =100.00 lll ahh ...... =133 .... xxx rrr + + eee .. mmm + ohh ..... sss ahh ..... ddd - eee .. - - ... + + ehh .. + ... sss - - - eee ..... lll =100.0 ahh ....... diff --git a/LipFilt.cpp b/LipFilt.cpp new file mode 100644 index 0000000..3afddb9 --- /dev/null +++ b/LipFilt.cpp @@ -0,0 +1,66 @@ +/**********************************************/ +/* Lip Filter Object by Perry R. Cook, 1995-96*/ +/* The lip of the brass player has dynamics */ +/* which are controlled by the mass, spring */ +/* constant, and damping of the lip. This */ +/* filter simulates that behavior and the */ +/* transmission/reflection properties as */ +/* well. See Cook TBone and HosePlayer */ +/* instruments and articles. */ +/**********************************************/ + +#include "LipFilt.h" + +LipFilt :: LipFilt() +{ + MY_FLOAT coeffs[2]; + filter = new BiQuad; + coeffs[0] = 0.0; + coeffs[1] = 0.0; + filter->setZeroCoeffs(coeffs); + this->clear(); +} + +LipFilt :: ~LipFilt() +{ + delete filter; +} + +void LipFilt :: clear() +{ + filter->clear(); + lastOutput = 0.0; +} + +void LipFilt :: setFreq(MY_FLOAT frequency) +{ + MY_FLOAT coeffs[2]; + coeffs[0] = 2.0 * 0.997 * + cos(TWO_PI * frequency / SRATE); /* damping should change with */ + coeffs[1] = -0.997 * 0.997; /* lip parameters, but not yet.*/ + filter->setPoleCoeffs(coeffs); + filter->setGain(0.03); +} + +/* NOTE: Here we should add lip tension */ +/* settings based on Mass/Spring/Damping */ +/* Maybe in TookKit97 */ + +MY_FLOAT LipFilt :: tick(MY_FLOAT mouthSample,MY_FLOAT boreSample) + /* Perform "Table Lookup" By Polynomial Calculation */ +{ + MY_FLOAT temp; + temp = mouthSample - boreSample; /* Differential pressure */ + temp = filter->tick(temp); /* Force -> position */ + temp = temp*temp; /* Simple position to area mapping */ + if (temp > 1.0) temp = 1.0; /* Saturation at + 1.0 */ + lastOutput = temp * mouthSample; /* Assume mouth input = area */ + lastOutput += (1.0 - temp) * boreSample; /* and Bore reflection is compliment. */ + return lastOutput; +} + +MY_FLOAT LipFilt :: lastOut() +{ + return lastOutput; +} + diff --git a/LipFilt.h b/LipFilt.h new file mode 100644 index 0000000..23a891e --- /dev/null +++ b/LipFilt.h @@ -0,0 +1,28 @@ +/**********************************************/ +/* Lip Filter Object by Perry R. Cook, 1995-96*/ +/* The lip of the brass player has dynamics */ +/* which are controlled by the mass, spring */ +/* constant, and damping of the lip. This */ +/* filter simulates that behavior and the */ +/* transmission/reflection properties as */ +/* well. See Cook TBone and HosePlayer */ +/* instruments and articles. */ +/**********************************************/ + +#include "Object.h" +#include "BiQuad.h" + +class LipFilt : public Object +{ + protected: + BiQuad *filter; + MY_FLOAT lastOutput; + public: + LipFilt(); + ~LipFilt(); + void clear(); + void setFreq(MY_FLOAT frequency); + MY_FLOAT tick(MY_FLOAT mouthSample,MY_FLOAT boreSample); + MY_FLOAT lastOut(); +}; + diff --git a/MIDIInpt.cpp b/MIDIInpt.cpp new file mode 100644 index 0000000..3cc742e --- /dev/null +++ b/MIDIInpt.cpp @@ -0,0 +1,188 @@ +/******************************************/ +/* Simple RealTime MIDI Input Object, */ +/* by Perry R. Cook, 1996 */ +/* */ +/* This object takes MIDI from the input */ +/* , parses it, turns it into TSIDI */ +/* messages, and buffers it up for use by*/ +/* any object that asks for it later. */ +/* */ +/* TSIDI (ToolKit Synthesis Instrument */ +/* Digital Interfaceis like MIDI, but */ +/* allows for floating point control */ +/* changes, note numbers, etc. Example: */ +/* noteOn(1,60.01,111.132) plays a sharp */ +/* middle C with a velocity of 111.132 */ +/* */ +/******************************************/ + +#include "MIDIInpt.h" + +int onePending; +MDport inport; +MDevent lastEvent; + + +// void pollMessage(void *) +// { +// int status; +// while (1) { +// while (onePending == 0) { +// mdReceive(inport, &lastEvent, 1); +// status = mdGetStatus(lastEvent.msg); +// if (status==MD_NOTEON || status==MD_NOTEOFF) +// onePending = 1; +// } +// } +// } + +MIDIInpt :: MIDIInpt() +{ + int nports; + nports = mdInit(); + printf("%d MIDI devices available\n", nports); + inport = mdOpenInPort(0); + if (inport == NULL) { + printf("open failed\n"); + exit(0); + } + mdSetStampMode(inport, MD_NOSTAMP); + onePending = 0; +// midi_pid = sproc(pollMessage, PR_SALL); +// if (midi_pid == -1) +// { +// fprintf(stderr, "unable to create midi input thread...aborting.\n"); +// exit(-1); +// } +} + +#define _BSD_SIGNALS +#include + +MIDIInpt :: ~MIDIInpt() +{ + mdClosePort(inport); +// kill(midi_pid, SIGKILL); +} + +/* MIDI File Code + if (byte > 15) { + if (byte == 248) printf("MIDI Clock,"); + else if (byte == 249) printf("Undefined,"); + else if (byte == 250) printf("Song Start,"); + else if (byte == 251) printf("Continue,"); + else if (byte == 252) printf("Song Stop,"); + else if (byte == 253) printf("Undefined,"); + else if (byte == 254) printf("ActiveSen,"); + else if (byte == 255) printf("SystReset,"); + else printf("BEATSME"); + } + else { + if (byte == 8) printf("NoteOff"); + if (byte == 9) printf("NoteOn"); + if (byte == 10) printf("Poly Pressure"); + if (byte == 11) printf("Control Change"); + if (byte == 12) printf("Program Change"); + if (byte == 13) printf("Channel Pressure"); + if (byte == 14) printf("Pitch Wheel"); + } +*/ + +int MIDIInpt :: nextMessage() +{ + int status; + int byte1; + int byte2; + + messageType = -1; + + mdReceive(inport, &lastEvent, 1); + +// if (onePending == 1) { + + status = mdGetStatus(lastEvent.msg); + byte1 = mdGetByte1(lastEvent.msg); + byte2 = mdGetByte2(lastEvent.msg); + channel = mdGetChannel(lastEvent.msg); + + if (status==MD_NOTEON) { + byteTwo = (float) byte1; + byteThree = (float) byte2; + if (byte2==0) + messageType = 8; + else + messageType = 9; + } + else if (status==MD_NOTEOFF) { + byteTwo = (float) byte1; + byteThree = (float) byte2; + messageType = 8; + } + else if (status==MD_CONTROLCHANGE) { + byteTwo = (float) byte1; + byteThree = (float) byte2; + messageType = 11; + } + else if (status==MD_PROGRAMCHANGE) { + byteTwo = (float) byte1; + messageType = 12; + } + else if (status==MD_CHANNELPRESSURE) { + byteTwo = (float) byte1; + messageType = 13; + } + else if (status==MD_PITCHBENDCHANGE) { + byteTwo = (float) byte1; + byteTwo += (float) byte2 * NORM_7; + messageType = 14; + } + else { + messageType = -1; + } +// onePending = 0; + +// } + + return messageType; +} + +void MIDIInpt :: printMessage() +{ + char buffer[128]; + mdPrintEvent(buffer,&lastEvent,1); + printf(buffer); +} + +int MIDIInpt :: getType() +{ + return messageType; +} + +int MIDIInpt :: getChannel() +{ + return channel; +} + +MY_FLOAT MIDIInpt :: getByteTwo() +{ + return byteTwo; +} + +MY_FLOAT MIDIInpt :: getByteThree() +{ + return byteThree; +} + +/************ Test Main Program *****************/ +/* +void main(int argc,char *argv[]) +{ + MIDIInpt testMIDI; + + while(1) { + if (testMIDI.nextMessage() > 0) + testMIDI.printMessage(); + } +} +*/ + diff --git a/MIDIInpt.h b/MIDIInpt.h new file mode 100644 index 0000000..19d18ab --- /dev/null +++ b/MIDIInpt.h @@ -0,0 +1,48 @@ +/******************************************/ +/* Simple MIDI Text File Reader Class, */ +/* by Perry R. Cook, 1996 */ +/* This Object can open a MIDI Text File */ +/* and parse it. The file spec is mine */ +/* and mine alone, but it's all text so */ +/* you should be able to figure it out. */ +/* */ +/* TSIDI (ToolKit Synthesis Instrument */ +/* Digital Interfaceis like MIDI, but */ +/* allows for floating point control */ +/* changes, note numbers, etc. Example: */ +/* noteOn(1,60.01,111.132) plays a sharp */ +/* middle C with a velocity of 111.132 */ +/* */ +/* Warning: Obey column spacing in the */ +/* text file if you try to edit it or */ +/* create your own files. */ +/******************************************/ + +#if !defined(__MIDIInpt_h) +#define __MIDIInpt_h + +#include "Object.h" +#include "dmedia/midi.h" +#include +#include + +class MIDIInpt : public Object +{ + protected: + int midi_pid; + int messageType; + int channel; + float byteTwo; + float byteThree; + public: + MIDIInpt(); + ~MIDIInpt(); + void printMessage(); + int nextMessage(); + int getType(); + int getChannel(); + MY_FLOAT getByteTwo(); + MY_FLOAT getByteThree(); +}; + +#endif diff --git a/MIDIText.cpp b/MIDIText.cpp new file mode 100644 index 0000000..53cb6dd --- /dev/null +++ b/MIDIText.cpp @@ -0,0 +1,133 @@ +/******************************************/ +/* Simple MIDI Text File Reader Class, */ +/* by Perry R. Cook, 1996 */ +/* This Object can open a MIDI Text File */ +/* and parse it. The file spec is mine */ +/* and mine alone, but it's all text so */ +/* you should be able to figure it out. */ +/* */ +/* SKINI (Synthesis toolKit Instrument */ +/* Network Interface) is like MIDI, but */ +/* allows for floating point control */ +/* changes, note numbers, etc. Example: */ +/* noteOn 60.01 111.132 plays a sharp */ +/* middle C with a velocity of 111.132 */ +/* See SKINI.txt for more information */ +/* Warning: Obey columns in the text */ +/* file if you try to edit it or create */ +/* your own files. */ +/******************************************/ + +#include "MIDIText.h" + +MIDIText :: MIDIText(char *fileName) +{ + myFile = fopen(fileName,"r"); + this->nextMessage(); +} + +MIDIText :: ~MIDIText() +{ +} + +/* MIDI File Codes + if (byte > 15) { + if (byte == 248) printf("MIDI Clock,"); + else if (byte == 249) printf("Undefined,"); + else if (byte == 250) printf("Song Start,"); + else if (byte == 251) printf("Continue,"); + else if (byte == 252) printf("Song Stop,"); + else if (byte == 253) printf("Undefined,"); + else if (byte == 254) printf("ActiveSen,"); + else if (byte == 255) printf("SystReset,"); + else printf("BEATSME"); + } + else { // these are all nybbles of status bytes // + if (byte == 8) printf("NoteOff"); + if (byte == 9) printf("NoteOn"); + if (byte == 10) printf("Poly Pressure"); + if (byte == 11) printf("Control Change"); + if (byte == 12) printf("Program Change"); + if (byte == 13) printf("Channel Pressure"); + if (byte == 14) printf("Pitch Wheel"); + } +*/ + +int MIDIText :: nextMessage() +{ + int notDone = 1,point; + char inputString[1024]; + char tempString[32]; + + while (notDone) { + notDone = 0; + if (fgets(inputString,1000,myFile)) { + sscanf(inputString,"%s %lf %i %f %f",tempString,&deltaTime,&channel,&byteTwo,&byteThree); + point = 5; + if (tempString[0]=='%') point = 1; + if (tempString[point] == 'n') { // NoteO'n' + messageType = 9; + } + else if (inputString[point] == 'f') { // NoteO'f'f + messageType = 8; + } + else if (inputString[point] == 'B') { // Pitch'B'end + byteThree = byteTwo; + messageType = 14; + } + else if (inputString[point] == 'a') { // Progr'a'mChange + messageType = 12; + } + else if (inputString[point] == 'T') { // After'T'ouch + messageType = 11; + } + else if (inputString[point] == 'o') { // Contr'o'lChange + messageType = 11; + } + else if (inputString[0] == '/' || inputString[0] == ' ') { + notDone = 1; + } + } + else { + messageType = -1; + } + } + return messageType; +} + +int MIDIText :: getType() +{ + return messageType; +} + +int MIDIText :: getChannel() +{ + return channel; +} + +MY_FLOAT MIDIText :: getDelta() +{ + return deltaTime; +} + +MY_FLOAT MIDIText :: getByteTwo() +{ + return byteTwo; +} + +MY_FLOAT MIDIText :: getByteThree() +{ + return byteThree; +} + +/************ Test Main Program *****************/ +/* +void main(int argc,char *argv[]) +{ + MIDIText testFile(argv[1]); + + while(testFile.nextMessage() > 0) ; + +} +*/ + diff --git a/MIDIText.h b/MIDIText.h new file mode 100644 index 0000000..0a2aabf --- /dev/null +++ b/MIDIText.h @@ -0,0 +1,46 @@ +/******************************************/ +/* Simple MIDI Text File Reader Class, */ +/* by Perry R. Cook, 1996 */ +/* This Object can open a MIDI Text File */ +/* and parse it. The file spec is mine */ +/* and mine alone, but it's all text so */ +/* you should be able to figure it out. */ +/* */ +/* SKINI (Synthesis toolKit Instrument */ +/* Network Interface) is like MIDI, but */ +/* allows for floating point control */ +/* changes, note numbers, etc. Example: */ +/* noteOn 60.01 111.132 plays a sharp */ +/* middle C with a velocity of 111.132 */ +/* See SKINI.txt for more information */ +/* Warning: Obey columns in the text */ +/* file if you try to edit it or create */ +/* your own files. */ +/******************************************/ + +#if !defined(__MIDIText_h) +#define __MIDIText_h + +#include "Object.h" + +class MIDIText : public Object +{ + protected: + FILE *myFile; + int messageType; + int channel; + MY_FLOAT deltaTime; + float byteTwo; + float byteThree; + public: + MIDIText(char *fileName); + ~MIDIText(); + int nextMessage(); + int getType(); + int getChannel(); + MY_FLOAT getDelta(); + MY_FLOAT getByteTwo(); + MY_FLOAT getByteThree(); +}; + +#endif diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7760806 --- /dev/null +++ b/Makefile @@ -0,0 +1,247 @@ +O_FILES = Object.o Envelope.o ADSR.o Noise.o SubNoise.o RawWave.o RawLoop.o \ + NIWave1S.o Modulatr.o SingWave.o RawWvOut.o RawWvIn.o Filter.o \ + OneZero.o OnePole.o TwoZero.o TwoPole.o DCBlock.o BiQuad.o AllPass1.o \ + DLineA.o DLineL.o DLineN.o FormSwep.o BowTabl.o JetTabl.o ReedTabl.o \ + LipFilt.o Modal4.o FM4Op.o FM4Alg3.o FM4Alg4.o FM4Alg5.o FM4Alg6.o \ + FM4Alg8.o Plucked2.o SamplFlt.o Sampler.o VoicForm.o\ + MIDIText.o Reverb.o VoicMang.o \ + \ + Instrmnt.o Marimba.o Vibraphn.o AgogoBel.o Plucked.o Mandolin.o \ + Clarinet.o Flute.o Brass.o Bowed.o Rhodey.o Wurley.o TubeBell.o \ + HeavyMtl.o PercFlut.o BeeThree.o FMVoices.o Moog1.o + +RM = /bin/rm + +# This is for NeXT +# CC = cc -O +# INSTR = testMono testMult DrumSynt textVoic + + +# These are for SGI +INSTR = testTextIn testMono testMIDI testMult DrumSynt textVoic + CC = gcc -O + MEDIALINK = -lmd + TCLLIB = /usr/local/lib/libtcl.so.7.4 /usr/local/lib/libtk.so.4.0 /usr/lib/libX11.so + LIBRARY = /usr/lib/libmx.so /usr/lib/libaudio.a + +# .cpp.o: +# $(CC) -c $*.cpp + +all: $(INSTR) + +testTextIn: $(LIBRARY) testTextIn.cpp $(O_FILES) MIDIInpt.o + $(CC) $(MEDIALINK) -o testTextIn testTextIn.cpp $(O_FILES) $(LIBRARY) + +testMono: $(LIBRARY) testMono.cpp $(O_FILES) + $(CC) $(MEDIALINK) -o testMono testMono.cpp $(O_FILES) $(LIBRARY) + +testMIDI: $(LIBRARY) testMIDI.cpp Object.o MIDIInpt.o + $(CC) $(MEDIALINK) -o testMIDI testMIDI.cpp Object.o MIDIInpt.o $(LIBRARY) /usr/lib/libmidi.so + +testMult: $(LIBRARY) testMult.cpp $(O_FILES) + $(CC) $(MEDIALINK) -o testMult testMult.cpp $(O_FILES) $(LIBRARY) + +textVoic: $(LIBRARY) textVoic.cpp $(O_FILES) + $(CC) $(MEDIALINK) -o textVoic textVoic.cpp $(O_FILES) $(LIBRARY) + +Instrmnt.o: Instrmnt.cpp + $(CC) -c Instrmnt.cpp + +Marimba.o: Marimba.cpp + $(CC) -c Marimba.cpp + +Vibraphn.o: Vibraphn.cpp + $(CC) -c Vibraphn.cpp + +AgogoBel.o: AgogoBel.cpp + $(CC) -c AgogoBel.cpp + +Plucked.o: Plucked.cpp + $(CC) -c Plucked.cpp + +Mandolin.o: Mandolin.cpp + $(CC) -c Mandolin.cpp + +Clarinet.o: Clarinet.cpp + $(CC) -c Clarinet.cpp + +Flute.o: Flute.cpp + $(CC) -c Flute.cpp + +Brass.o: Brass.cpp + $(CC) -c Brass.cpp + +Bowed.o: Bowed.cpp + $(CC) -c Bowed.cpp + +Rhodey.o: Rhodey.cpp + $(CC) -c Rhodey.cpp + +Wurley.o: Wurley.cpp + $(CC) -c Wurley.cpp + +TubeBell.o: TubeBell.cpp + $(CC) -c TubeBell.cpp + +HeavyMtl.o: HeavyMtl.cpp + $(CC) -c HeavyMtl.cpp + +PercFlut.o: PercFlut.cpp + $(CC) -c PercFlut.cpp + +BeeThree.o: BeeThree.cpp + $(CC) -c BeeThree.cpp + +FMVoices.o: FMVoices.cpp + $(CC) -c FMVoices.cpp + +Moog1.o: Moog1.cpp + $(CC) -c Moog1.cpp + +DrumSynt: $(LIBRARY) DrumSynt.cpp $(O_FILES) + $(CC) -o DrumSynt DrumSynt.cpp $(O_FILES) $(LIBRARY) + +testVoic: $(LIBRARY) testVoic.cpp $(O_FILES) + $(CC) -o testVoic testVoic.cpp $(O_FILES) $(LIBRARY) + +# $(O_FILES) : +# $(CC) -c -o $@ $*.cpp + +Object.o : Object.cpp + $(CC) -c Object.cpp + +Envelope.o : Envelope.cpp + $(CC) -c Envelope.cpp + +ADSR.o : ADSR.cpp + $(CC) -c ADSR.cpp + +Noise.o : Noise.cpp + $(CC) -c Noise.cpp + +SubNoise.o : SubNoise.cpp + $(CC) -c SubNoise.cpp + +RawWave.o : RawWave.cpp + $(CC) -c RawWave.cpp + +RawLoop.o : RawLoop.cpp + $(CC) -c RawLoop.cpp + +NIWave1S.o : NIWave1S.cpp + $(CC) -c NIWave1S.cpp + +Modulatr.o : Modulatr.cpp + $(CC) -c Modulatr.cpp + +SingWave.o : SingWave.cpp + $(CC) -c SingWave.cpp + +RawWvOut.o : RawWvOut.cpp + $(CC) -c RawWvOut.cpp + +RawWvIn.o : RawWvIn.cpp + $(CC) -c RawWvIn.cpp + +Filter.o : Filter.cpp + $(CC) -c Filter.cpp + +OneZero.o : OneZero.cpp + $(CC) -c OneZero.cpp + +OnePole.o : OnePole.cpp + $(CC) -c OnePole.cpp + +TwoZero.o : TwoZero.cpp + $(CC) -c TwoZero.cpp + +TwoPole.o : TwoPole.cpp + $(CC) -c TwoPole.cpp + +DCBlock.o : DCBlock.cpp + $(CC) -c DCBlock.cpp + +BiQuad.o : BiQuad.cpp + $(CC) -c BiQuad.cpp + +AllPass1.o : AllPass1.cpp + $(CC) -c AllPass1.cpp + +DLineA.o : DLineA.cpp + $(CC) -c DLineA.cpp + +DLineL.o : DLineL.cpp + $(CC) -c DLineL.cpp + +DLineN.o : DLineN.cpp + $(CC) -c DLineN.cpp + +FormSwep.o : FormSwep.cpp + $(CC) -c FormSwep.cpp + +BowTabl.o : BowTabl.cpp + $(CC) -c BowTabl.cpp + +JetTabl.o : JetTabl.cpp + $(CC) -c JetTabl.cpp + +ReedTabl.o : ReedTabl.cpp + $(CC) -c ReedTabl.cpp + +LipFilt.o : LipFilt.cpp + $(CC) -c LipFilt.cpp + +Modal4.o : Modal4.cpp + $(CC) -c Modal4.cpp + +FM4Op.o : FM4Op.cpp + $(CC) -c FM4Op.cpp + +FM4Alg3.o : FM4Alg3.cpp + $(CC) -c FM4Alg3.cpp + +FM4Alg4.o : FM4Alg4.cpp + $(CC) -c FM4Alg4.cpp + +FM4Alg5.o : FM4Alg5.cpp + $(CC) -c FM4Alg5.cpp + +FM4Alg6.o : FM4Alg6.cpp + $(CC) -c FM4Alg6.cpp + +FM4Alg8.o : FM4Alg8.cpp + $(CC) -c FM4Alg8.cpp + +Plucked2.o : Plucked2.cpp + $(CC) -c Plucked2.cpp + +SamplFlt.o : SamplFlt.cpp + $(CC) -c SamplFlt.cpp + +Sampler.o : Sampler.cpp + $(CC) -c Sampler.cpp + +VoicForm.o : VoicForm.cpp + $(CC) -c VoicForm.cpp + +MIDIText.o : MIDIText.cpp + $(CC) -c MIDIText.cpp + +MIDIInpt.o : MIDIInpt.cpp + $(CC) -c MIDIInpt.cpp + +VoicMang.o : VoicMang.cpp + $(CC) -c VoicMang.cpp + +Reverb.o : Reverb.cpp + $(CC) -c Reverb.cpp + +clean : + rm $(INSTR) + rm *.o + +cleanIns : + rm $(INSTR) + +strip : + strip $(INSTR) diff --git a/Mandolin.cpp b/Mandolin.cpp new file mode 100644 index 0000000..e1cfdc4 --- /dev/null +++ b/Mandolin.cpp @@ -0,0 +1,116 @@ +/********************************************/ +/* Commuted Mandolin Subclass of enhanced */ +/* dual plucked-string model */ +/* by Perry Cook, 1995-96 */ +/* Controls: CONTROL1 = bodySize */ +/* CONTROL2 = pluckPosition */ +/* CONTROL3 = loopGain */ +/* MOD_WHEEL= deTuning */ +/* */ +/* Note: Commuted Synthesis, as with many */ +/* other WaveGuide techniques, is covered */ +/* by patents, granted, pending, and/or */ +/* applied-for. Many are assigned to the */ +/* Board of Trustees, Stanford University. */ +/* For information, contact the Office of */ +/* Technology Licensing, Stanford U. */ +/********************************************/ + +#include "Mandolin.h" + +Mandolin :: Mandolin(MY_FLOAT lowestFreq) : Plucked2(lowestFreq) +{ + soundfile = new RawWave("rawwaves/mandpluk.raw"); + soundfile->normalize(0.05); /* Empirical hack here */ + soundfile->setLooping(0); + dampTime = 0; + waveDone = 1; +} + +void Mandolin :: pluck(MY_FLOAT amplitude) +{ /* this function gets interesting here, */ + soundfile->reset(); /* because pluck may be longer than */ + pluckAmp = amplitude; /* string length, so we just reset the */ + /* soundfile and add in the pluck in */ + /* the tick method. */ + combDelay->setDelay( + 0.5 * pluckPos * lastLength); /* Set Pick Position */ + /* which puts zeroes at pos*length */ + dampTime = (long) lastLength; /* See tick method below */ + waveDone = 0; +} + +void Mandolin :: pluck(MY_FLOAT amplitude, MY_FLOAT position) +{ + pluckPos = position; /* pluck position is zeroes at pos*length */ + this->pluck(amplitude); +} + +void Mandolin :: noteOn(MY_FLOAT freq, MY_FLOAT amp) +{ + this->setFreq(freq); + this->pluck(amp); +#if defined(_debug_) + printf("Mandolin : NoteOn: Freq=%lf Amp=%lf\n",freq,amp); +#endif +} + +void Mandolin :: setBodySize(MY_FLOAT size) +{ + soundfile->setRate(size); +} + +MY_FLOAT Mandolin :: tick() +{ + MY_FLOAT temp = 0; + if (!waveDone) { + waveDone = soundfile->informTick(); /* as long as it goes . . . */ + temp = soundfile->lastOut() * pluckAmp; /* scaled pluck excitation */ + temp = temp - combDelay->tick(temp); /* with comb filtering */ + } + if (dampTime>=0) { /* Damping hack to help avoid */ + dampTime -= 1; /* overflow on replucking */ + lastOutput = delayLine->tick( /* Calculate 1st delay */ + filter->tick( /* filterered reflection */ + temp + /* plus pluck excitation */ + (delayLine->lastOut() * 0.7))); + lastOutput += delayLine2->tick( /* and 2nd delay */ + filter2->tick( /* just like the 1st */ + temp + + (delayLine2->lastOut() * 0.7))); /* that's the whole thing!! */ + } + else { /* No damping hack after 1 period */ + lastOutput = delayLine->tick( /* Calculate 1st delay */ + filter->tick( /* filtered reflection */ + temp + /* plus pluck excitation */ + (delayLine->lastOut() + * loopGain))); + lastOutput += delayLine2->tick( /* and 2nd delay */ + filter2->tick( /* just like the 1st */ + temp + + (delayLine2->lastOut() + * loopGain))); + } + lastOutput *= 2.0; + return lastOutput; +} + +void Mandolin :: controlChange(int number, MY_FLOAT value) +{ +#if defined(_debug_) + printf("Mandolin : ControlChange: Number=%i Value=%f\n",number,value); +#endif + if (number == MIDI_control1) + this->setBodySize(value * NORM_7 * 2.0); + else if (number == MIDI_control2) + this->setPluckPos(value * NORM_7); + else if (number == MIDI_control3) + this->setBaseLoopGain(0.97 + (value * NORM_7 * 0.03)); + else if (number == MIDI_mod_wheel) + this->setDetune(1.0 - (value * NORM_7 * 0.1)); + else if (number == MIDI_after_touch) + this->pluck(value * NORM_7); + else { + printf("Mandolin : Undefined Control Number!!\n"); + } +} diff --git a/Mandolin.h b/Mandolin.h new file mode 100644 index 0000000..77b1d4f --- /dev/null +++ b/Mandolin.h @@ -0,0 +1,41 @@ +/********************************************/ +/* Commuted Mandolin Subclass of enhanced */ +/* dual plucked-string model */ +/* by Perry Cook, 1995-96 */ +/* Controls: CONTROL1 = bodySize */ +/* CONTROL2 = pluckPosition */ +/* CONTROL3 = loopGain */ +/* MOD_WHEEL= deTuning */ +/* */ +/* Note: Commuted Synthesis, as with many */ +/* other WaveGuide techniques, is covered */ +/* by patents, granted, pending, and/or */ +/* applied-for. All are assigned to the */ +/* Board of Trustees, Stanford University. */ +/* For information, contact the Office of */ +/* Technology Licensing, Stanford U. */ +/********************************************/ + +#if !defined(__Mandolin_h) +#define __Mandolin_h + +#include "Plucked2.h" +#include "RawWave.h" + +class Mandolin : public Plucked2 +{ + protected: + RawWave *soundfile; + long dampTime; + int waveDone; + public: + Mandolin(MY_FLOAT lowestFreq); + void pluck(MY_FLOAT amplitude); + void pluck(MY_FLOAT amplitude,MY_FLOAT position); + virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp); + void setBodySize(MY_FLOAT size); + virtual void controlChange(int number, MY_FLOAT value); + virtual MY_FLOAT tick(); +}; + +#endif diff --git a/Marimba.cpp b/Marimba.cpp new file mode 100644 index 0000000..cfa97d1 --- /dev/null +++ b/Marimba.cpp @@ -0,0 +1,111 @@ +/*******************************************/ +/* Marimba SubClass of Modal4 Instrument, */ +/* by Perry R. Cook, 1995-96 */ +/* */ +/* Controls: CONTROL1 = stickHardness */ +/* CONTROL2 = strikePosition*/ +/* CONTROL3 = vibFreq */ +/* MOD_WHEEL= vibAmt */ +/*******************************************/ + +#include "Marimba.h" + +Marimba :: Marimba() : Modal4() +{ + wave = new RawWave("rawwaves/marmstk1.raw"); + wave->normalize(); + wave->setRate(0.5); /* normal stick */ + this->setRatioAndReson(0, 1.00,0.9996); /* Set all 132.0 */ + this->setRatioAndReson(1, 3.99,0.9994); /* of our 523.0 */ + this->setRatioAndReson(2,10.65,0.9994); /* default 1405.0 */ + this->setRatioAndReson(3,-18.50,0.999); /* resonances 2443.0 */ + this->setFiltGain(0,0.08); /* and */ + this->setFiltGain(1,0.02); /* gains */ + this->setFiltGain(2,0.02); /* for each */ + this->setFiltGain(3,0.015); /* resonance */ + directGain = 0.1; + multiStrike = 0; +} + +Marimba :: ~Marimba() +{ +} + +void Marimba :: setStickHardness(MY_FLOAT hardness) +{ + stickHardness = hardness; + wave->setRate(0.25 * pow(4.0,stickHardness)); + masterGain = 0.1 + (1.8 * stickHardness); +} + +void Marimba :: setStrikePosition(MY_FLOAT position) +{ + MY_FLOAT temp,temp2; + temp2 = position * PI; + strikePosition = position; /* Hack only first three modes */ + temp = sin(temp2); + this->setFiltGain(0,0.12 * temp); /* 1st mode function of pos. */ + temp = sin(0.05 + (3.9 * temp2)); + this->setFiltGain(1,-0.03 * temp); /* 2nd mode function of pos. */ + temp = sin(-0.05 + (11 * temp2)); + this->setFiltGain(2,0.11 * temp); /* 3rd mode function of pos. */ +} + +void Marimba :: setModulationSpeed(MY_FLOAT mSpeed) +{ + /* don't bother here, marimba decay so fast, mod doesn't make sense */ +} + +void Marimba :: setModulationDepth(MY_FLOAT mDepth) +{ +} + +void Marimba :: strike(MY_FLOAT amplitude) +{ + int temp; + temp = random() >> 26; + if (temp < 2) { + multiStrike = 1; +#if defined(_debug_) + printf("striking twice here!!\n"); +#endif + } + else if (temp < 1) { + multiStrike = 2; +#if defined(_debug_) + printf("striking three times here!!!\n"); +#endif + } + else multiStrike = 0; + Modal4::strike(amplitude); +} + +void Marimba :: controlChange(int number, MY_FLOAT value) +{ +#if defined(_debug_) + printf("Marimba : ControlChange: Number=%i Value=%f\n",number,value); +#endif + if (number == MIDI_control1) + this->setStickHardness(value * NORM_7); + else if (number == MIDI_control2) + this->setStrikePosition(value * NORM_7); + else if (number == MIDI_control3) + vibr->setFreq((value * NORM_7 * 12.0)); + else if (number == MIDI_mod_wheel) + vibrGain = (value * NORM_7); + else if (number == MIDI_after_touch) + this->strike(value * NORM_7); + else { + printf("Marimba : Undefined Control Number!!\n"); + } +} + +MY_FLOAT Marimba :: tick() +{ + if (multiStrike>0) + if (wave->isAllDone()) { + wave->reset(); + multiStrike -= 1; + } + return Modal4::tick(); +} diff --git a/Marimba.h b/Marimba.h new file mode 100644 index 0000000..8e02111 --- /dev/null +++ b/Marimba.h @@ -0,0 +1,32 @@ +/*******************************************/ +/* Marimba SubClass of Modal4 Instrument, */ +/* by Perry R. Cook, 1995-96 */ +/* */ +/* Controls: CONTROL1 = stickHardness */ +/* CONTROL2 = strikePosition*/ +/* CONTROL3 = vibFreq */ +/* MOD_WHEEL= vibAmt */ +/*******************************************/ + +#if !defined(__Marimba_h) +#define __Marimba_h + +#include "Modal4.h" + +class Marimba : public Modal4 +{ + private: + int multiStrike; + public: + Marimba(); + ~Marimba(); + void setStickHardness(MY_FLOAT hardness); + void setStrikePosition(MY_FLOAT position); + void setModulationSpeed(MY_FLOAT mSpeed); + void setModulationDepth(MY_FLOAT mDepth); + virtual void strike(MY_FLOAT amplitude); + virtual void controlChange(int number, MY_FLOAT value); + virtual MY_FLOAT tick(); +}; + +#endif diff --git a/Modal4.cpp b/Modal4.cpp new file mode 100644 index 0000000..1ddd19e --- /dev/null +++ b/Modal4.cpp @@ -0,0 +1,187 @@ +/*******************************************/ +/* 4 Resonance Modal Synthesis Instrument */ +/* by Perry R. Cook, 1995-96 */ +/* This instrument contains an excitation */ +/* wavetable, an envelope, and four reso- */ +/* nances (Non-Sweeping BiQuad Filters). */ +/*******************************************/ + +#include "Modal4.h" + +Modal4 :: Modal4() +{ + envelope = new Envelope; + /* We don't make the excitation wave here yet, */ + /* because we don't know what it's going to be. */ + filters[0] = new BiQuad; + filters[1] = new BiQuad; + filters[2] = new BiQuad; + filters[3] = new BiQuad; + onepole = new OnePole; + + vibr = new RawLoop("rawwaves/sinewave.raw"); + vibr->normalize(); + vibr->setFreq(6.0); + vibrGain = 0.05; + + directGain = 0.0; + masterGain = 1.0; + baseFreq = 440.0; + this->setRatioAndReson(0,1.00,0.9997); /* Set some */ + this->setRatioAndReson(1,1.30,0.9997); /* silly */ + this->setRatioAndReson(2,1.77,0.9997); /* default */ + this->setRatioAndReson(3,2.37,0.9997); /* values here */ + this->setFiltGain(0,0.01); + this->setFiltGain(1,0.01); + this->setFiltGain(2,0.01); + this->setFiltGain(3,0.01); + this->clear(); + filters[0]->setEqualGainZeroes(); + filters[1]->setEqualGainZeroes(); + filters[2]->setEqualGainZeroes(); + filters[3]->setEqualGainZeroes(); + stickHardness = 0.5; + strikePosition = 0.561; +} + +Modal4 :: ~Modal4() +{ + delete envelope; + delete wave; + delete filters[0]; + delete filters[1]; + delete filters[2]; + delete filters[3]; + delete onepole; + delete vibr; +} + +void Modal4 :: clear() +{ + onepole->clear(); + filters[0]->clear(); + filters[1]->clear(); + filters[2]->clear(); + filters[3]->clear(); +} + +void Modal4 :: setFreq(MY_FLOAT frequency) +{ + baseFreq = frequency; + this->setRatioAndReson(0,ratios[0],resons[0]); + this->setRatioAndReson(1,ratios[1],resons[1]); + this->setRatioAndReson(2,ratios[2],resons[2]); + this->setRatioAndReson(3,ratios[3],resons[3]); +} + +#include + +void Modal4 :: setRatioAndReson(int whichOne, MY_FLOAT ratio,MY_FLOAT reson) +{ + MY_FLOAT temp; + if (ratio*baseFreq < SRATE_OVER_TWO) { + ratios[whichOne] = ratio; + } + else { + temp = ratio; + while (temp*baseFreq > SRATE_OVER_TWO) temp *= 0.5; + ratios[whichOne] = temp; +#if defined(_debug_) + printf("Modal4 : Aliasing would occur here, correcting.\n"); +#endif + } + resons[whichOne] = reson; + if (ratio<0) + temp = -ratio; + else + temp = ratio*baseFreq; + filters[whichOne]->setFreqAndReson(temp,reson); +} + +void Modal4 :: setMasterGain(MY_FLOAT aGain) +{ + masterGain = aGain; +} + +void Modal4 :: setDirectGain(MY_FLOAT aGain) +{ + directGain = aGain; +} + +void Modal4 :: setFiltGain(int whichOne, MY_FLOAT gain) +{ + filters[whichOne]->setGain(gain); +} + +void Modal4 :: strike(MY_FLOAT amplitude) +{ + int i; + MY_FLOAT temp; + envelope->setRate(1.0); + envelope->setTarget(amplitude); + onepole->setPole(1.0 - amplitude); + envelope->tick(); + wave->reset(); + for (i=0;i<4;i++) { + if (ratios[i] < 0) + temp = -ratios[i]; + else + temp = ratios[i] * baseFreq; + filters[i]->setFreqAndReson(temp,resons[i]); + } +} + +void Modal4 :: noteOn(MY_FLOAT freq, MY_FLOAT amp) +{ + this->strike(amp); + this->setFreq(freq); +#if defined(_debug_) + printf("Modal4 : NoteOn: Freq=%lf Amp=%lf\n",freq,amp); +#endif +} + +void Modal4 :: noteOff(MY_FLOAT amp) /* This calls damp, but inverts the */ +{ /* meaning of amplitude. */ + this->damp(1.0 - (amp * 0.03)); /* (high amplitude means fast damping) */ +#if defined(_debug_) + printf("Modal4 : NoteOff: Amp=%lf\n",amp); +#endif +} + +void Modal4 :: damp(MY_FLOAT amplitude) +{ + int i; + MY_FLOAT temp; + for (i=0;i<4;i++) { + if (ratios[i] < 0) + temp = -ratios[i]; + else + temp = ratios[i] * baseFreq; + filters[i]->setFreqAndReson(temp,resons[i]*amplitude); + } +} + +void Modal4 :: controlChange(int number, MY_FLOAT value) +{ +} + +MY_FLOAT Modal4 :: tick() +{ + MY_FLOAT temp,temp2; + temp = masterGain * onepole->tick(wave->tick() * envelope->tick()); + temp2 = filters[0]->tick(temp); + temp2 += filters[1]->tick(temp); + temp2 += filters[2]->tick(temp); + temp2 += filters[3]->tick(temp); + temp2 = temp2 - (temp2 * directGain); + temp2 += directGain * temp; + + if (vibrGain != 0.0) { + temp = 1.0 + (vibr->tick() * vibrGain); /* Calculate AM */ + temp2 = temp * temp2; /* and apply to master out */ + } + + lastOutput = temp2 * 2.0; + return lastOutput; +} + diff --git a/Modal4.h b/Modal4.h new file mode 100644 index 0000000..5b6a54a --- /dev/null +++ b/Modal4.h @@ -0,0 +1,52 @@ +/*******************************************/ +/* 4 Resonance Modal Synthesis Instrument */ +/* by Perry R. Cook, 1995-96 */ +/* This instrument contains an excitation */ +/* wavetable, an envelope, and four reso- */ +/* nances (Non-Sweeping BiQuad Filters). */ +/*******************************************/ + +#if !defined(__Modal4_h) +#define __Modal4_h + +#include "Instrmnt.h" +#include "Envelope.h" +#include "RawWave.h" +#include "RawLoop.h" +#include "BiQuad.h" +#include "OnePole.h" + +class Modal4 : public Instrmnt +{ + protected: + Envelope *envelope; + RawWave *wave; + BiQuad *filters[4]; + OnePole *onepole; + RawLoop *vibr; + MY_FLOAT vibrGain; + MY_FLOAT masterGain; + MY_FLOAT directGain; + MY_FLOAT stickHardness; + MY_FLOAT strikePosition; + MY_FLOAT baseFreq; + MY_FLOAT ratios[4]; + MY_FLOAT resons[4]; + public: + Modal4(); + ~Modal4(); + void clear(); + virtual void setFreq(MY_FLOAT frequency); + void setRatioAndReson(int whichOne, MY_FLOAT ratio, MY_FLOAT reson); + void setMasterGain(MY_FLOAT aGain); + void setDirectGain(MY_FLOAT aGain); + void setFiltGain(int whichOne, MY_FLOAT gain); + virtual void strike(MY_FLOAT amplitude); + virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp); + virtual void noteOff(MY_FLOAT amp); + void damp(MY_FLOAT amplitude); + virtual void controlChange(int number, MY_FLOAT value); + virtual MY_FLOAT tick(); +}; + +#endif diff --git a/Modulatr.cpp b/Modulatr.cpp new file mode 100644 index 0000000..1cbcdfe --- /dev/null +++ b/Modulatr.cpp @@ -0,0 +1,84 @@ +/*******************************************/ +/* Modulator Class, Perry R. Cook, 1995-96*/ +/* This Object combines random and */ +/* periodic modulations to give a nice */ +/* natural human modulation function. */ +/*******************************************/ + +#define POLE_POS 0.999 +#define RND_SCALE 10.0 + +#include "Modulatr.h" + +Modulatr :: Modulatr() +{ + vibwave = new RawWave("rawwaves/sinewave.raw"); + vibwave->normalize(); + vibwave->setFreq(6.0); + vibwave->setLooping(1); + vibAmt = 0.04; + noise = new SubNoise(330); + rndAmt = 0.005; + onepole = new OnePole; + onepole->setPole(POLE_POS); + onepole->setGain(rndAmt * RND_SCALE); +} + +Modulatr :: ~Modulatr() +{ + delete vibwave; + delete noise; + delete onepole; +} + +void Modulatr :: reset() +{ + lastOutput = 0.0; +} + +void Modulatr :: setVibFreq(double vibFreq) +{ + vibwave->setFreq(vibFreq); +} + +void Modulatr :: setVibAmt(double vibAmount) +{ + vibAmt = vibAmount; +} + +void Modulatr :: setRndAmt(double rndAmount) +{ + rndAmt = rndAmount; + onepole->setGain(RND_SCALE * rndAmt); +} + +double Modulatr :: tick() +{ + lastOutput = vibAmt * vibwave->tick(); /* Compute periodic and */ + lastOutput += onepole->tick(noise->tick()); /* random modulations */ + return lastOutput; +} + +double Modulatr :: lastOut() +{ + return lastOutput; +} + +/************ Test Main Program *****************/ +/* +void main() +{ + Modulatr testMod; + FILE *fd; + short data; + long i; + + fd = fopen("test.raw","wb"); + + for (i=0;i<20000;i++) { + data = testMod.tick() * 32000.0; + fwrite(&data,2,1,fd); + } + fclose(fd); +} +*/ diff --git a/Modulatr.h b/Modulatr.h new file mode 100644 index 0000000..a454754 --- /dev/null +++ b/Modulatr.h @@ -0,0 +1,36 @@ +/*******************************************/ +/* Modulator Class, Perry R. Cook, 1995-96*/ +/* This Object combines random and */ +/* periodic modulations to give a nice */ +/* natural human modulation function. */ +/*******************************************/ + +#if !defined(__Modulatr_h) +#define __Modulatr_h + +#include "Object.h" +#include "RawWave.h" +#include "SubNoise.h" +#include "OnePole.h" + +class Modulatr : public Object +{ + protected: + RawWave *vibwave; + SubNoise *noise; + OnePole *onepole; + double vibAmt; + double rndAmt; + double lastOutput; + public: + Modulatr(); + ~Modulatr(); + void reset(); + void setVibFreq(double vibFreq); + void setVibAmt(double vibAmount); + void setRndAmt(double rndAmount); + double tick(); + double lastOut(); +}; + +#endif diff --git a/Moog1.cpp b/Moog1.cpp new file mode 100644 index 0000000..ce8905b --- /dev/null +++ b/Moog1.cpp @@ -0,0 +1,108 @@ +/******************************************/ +/* Test Sampler Subclass of */ +/* Sampling Synthesizer Class */ +/* by Perry R. Cook, 1995-96 */ +/* */ +/* Controls: CONTROL1 = filterQ */ +/* CONTROL2 = filterRate */ +/* CONTROL3 = vibFreq */ +/* MOD_WHEEL= vibAmt */ +/******************************************/ + +#include "Moog1.h" + +Moog1 :: Moog1() : SamplFlt() +{ + attacks[0] = new RawWave("rawwaves/mandpluk.raw"); + loops[0] = new RawWave("rawwaves/impuls20.raw"); + loops[1] = new RawWave("rawwaves/sinewave.raw"); /* Steal one for vibrato */ + attacks[0]->normalize(); + loops[0]->normalize(); + loops[0]->setLooping(1); + loops[1]->normalize(); + loops[1]->setLooping(1); + loops[1]->setFreq(6.122); + adsr->setAll(0.05,0.00003,0.6,0.0002); + filterQ = 0.85; + filterRate = 0.0001; + modDepth = 0.0; +} + +Moog1 :: ~Moog1() +{ + delete attacks[0]; + delete loops[0]; + delete loops[1]; +} + +void Moog1 :: setFreq(MY_FLOAT frequency) +{ + baseFreq = frequency; + attacks[0]->setFreq(baseFreq * 0.01); + loops[0]->setFreq(baseFreq); +} + +void Moog1 :: noteOn(MY_FLOAT freq, MY_FLOAT amp) +{ + MY_FLOAT temp; + + this->setFreq(freq); + this->keyOn(); + attackGain = amp * 0.5; + loopGain = amp; + + temp = filterQ+0.05; + filters[0]->setStates(2000,temp,2.0 * (1.0 - temp)); + filters[1]->setStates(2000,temp,2.0 * (1.0 - temp)); + temp = filterQ+0.099; + filters[0]->setTargets( 0,temp,2.0 * (1.0 - temp)); + filters[1]->setTargets( 0,temp,2.0 * (1.0 - temp)); + filters[0]->setSweepRate(filterRate * RATE_NORM); + filters[1]->setSweepRate(filterRate * RATE_NORM); +#if defined(_debug_) + printf("Moog1 : NoteOn: Freq=%lf Amp=%lf\n",freq,amp); +#endif +} + +void Moog1 :: setModulationSpeed(MY_FLOAT mSpeed) +{ + loops[1]->setFreq(mSpeed); +} + +void Moog1 :: setModulationDepth(MY_FLOAT mDepth) +{ + modDepth = mDepth * 0.5; +} + +void Moog1 :: controlChange(int number, MY_FLOAT value) +{ +#if defined(_debug_) + printf("Moog1 : ControlChange: Number=%i Value=%f\n",number,value); +#endif + if (number == MIDI_control1) + filterQ = 0.80 + (0.1 * value * NORM_7); + else if (number == MIDI_control2) + filterRate = (value * NORM_7 * 0.0002); + else if (number == MIDI_control3) + this->setModulationSpeed(value * NORM_7 * 12.0); + else if (number == MIDI_mod_wheel) + this->setModulationDepth(value * NORM_7); + else if (number == MIDI_after_touch) + adsr->setTarget(value * NORM_7); + else { + printf("Moog1 : Undefined Control Number!!\n"); + } +} + +MY_FLOAT Moog1 :: tick() +{ + MY_FLOAT temp; + + if (modDepth!=0.0) { + temp = loops[1]->tick() * modDepth; + loops[0]->setFreq(baseFreq * (1.0 + temp)); + } + lastOutput = SamplFlt :: tick(); + return lastOutput; +} + diff --git a/Moog1.h b/Moog1.h new file mode 100644 index 0000000..018a296 --- /dev/null +++ b/Moog1.h @@ -0,0 +1,34 @@ +/******************************************/ +/* Moog1 Subclass of */ +/* Sampling Synthesizer Class */ +/* by Perry R. Cook, 1995-96 */ +/* */ +/* Controls: CONTROL1 = filterQ */ +/* CONTROL2 = filterRate */ +/* CONTROL3 = vibFreq */ +/* MOD_WHEEL= vibAmt */ +/******************************************/ + +#if !defined(__Moog1_h) +#define __Moog1_h + +#include "SamplFlt.h" + +class Moog1 : public SamplFlt +{ + private: + MY_FLOAT modDepth; + MY_FLOAT filterQ; + MY_FLOAT filterRate; + public: + Moog1(); + ~Moog1(); + virtual void setFreq(MY_FLOAT frequency); + virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp); + void setModulationSpeed(MY_FLOAT mSpeed); + void setModulationDepth(MY_FLOAT mDepth); + virtual void controlChange(int number, MY_FLOAT value); + virtual MY_FLOAT tick(); +}; + +#endif diff --git a/NIFileIn.cpp b/NIFileIn.cpp new file mode 100644 index 0000000..80a1643 --- /dev/null +++ b/NIFileIn.cpp @@ -0,0 +1,163 @@ +/*******************************************/ +/* NonInterpolating One-Shot Raw Sound- */ +/* file Class, by Perry R. Cook, 1995-96 */ +/* This Object can open a raw 16bit data */ +/* (signed integers) file, and play back */ +/* the data once, with no interpolation */ +/* on playback. Once finished, it closes */ +/* the file, the file is reopened with */ +/* the reset() method. */ +/* This is useful for small memory model, */ +/* applications, or for streaming from */ +/* disk (and generally non real-time */ +/* applications). */ +/*******************************************/ + +#include "NIFileIn.h" + +NIFileIn :: NIFileIn(char *fileName) +{ + long i; + + strcpy(fileNm,fileName); + + myFile = fopen(fileNm,"rb"); + if (!myFile) { + printf("Couldn't find soundfile %s !!!!!!!!\n",fileName); + exit(0); + } + + i = 0; + while (fread(&data,2,1,myFile)) i++; + length = i; + fseek(myFile,0,0); + time = 0.0; + rate = 1.0; + lastTime = 0; + finished = 0; + gain = 1.0; + lastOutput = 0.0; +} + +NIFileIn :: ~NIFileIn() +{ + this->finish(); +} + +void NIFileIn :: reset() +{ + if (finished) { + myFile = fopen(fileNm,"rb"); + } + fseek(myFile,0,0); + + printf("Resetting\n"); + time = 0.0; + lastTime = 0; + finished = 0; + lastOutput = 0.0; +} + +void NIFileIn :: normalize() +{ + this->normalize(1.0); +} + +void NIFileIn :: normalize(MY_FLOAT newPeak) +{ + long i; + FILE *fd; + + gain = 0.0; + + fd = fopen(fileNm,"rb"); + for (i=0;i gain) + gain = fabs(data); + } + if (gain > 0.0) { + gain = newPeak / gain; + } + fclose(fd); +} + +void NIFileIn :: setRate(MY_FLOAT aRate) +{ + rate = aRate; +} + +void NIFileIn :: finish() +{ + finished = 1; + lastOutput = 0.0; + if (myFile) { + fclose(myFile); + myFile = 0; + } +} + +MY_FLOAT NIFileIn :: tick() +{ + this->informTick(); + return lastOutput; +} + +int NIFileIn :: informTick() +{ + long temp; + + if (!finished) { + + time += rate; /* Update current time */ + + if (time >= length) { /* Check for end of sound */ + time = length - 1; /* stick at end */ + finished = 1; /* Information for one-shot use */ + fclose(myFile); + myFile = 0; + } + else { + temp = (long) time; /* Integer part of time address */ + if (temp > lastTime) { /* If we cross next sample time */ + lastTime = temp; + fread(&data,2,1,myFile); /* Snarf next sample from file */ + lastOutput = data * gain; /* And save as non-interpolated data */ + } + } + } + + return finished; +} + +MY_FLOAT NIFileIn :: lastOut() +{ + return lastOutput; +} + +/************ Test Main Program *****************/ +/* +void main() +{ + NIFileIn oneShot("rawwaves/mandpluk.raw"); + FILE *fd; + short data; + long i; + + fd = fopen("test.raw","wb"); + oneShot.setRate(1.0); + while (!oneShot.informTick()) { + data = oneShot.lastOut(); + fwrite(&data,2,1,fd); + } + + oneShot.reset(); + oneShot.setRate(0.5); + for (i=0;i<16384;i++) { + data = oneShot.tick(); + fwrite(&data,2,1,fd); + } + fclose(fd); +} +*/ + diff --git a/NIFileIn.h b/NIFileIn.h new file mode 100644 index 0000000..936747a --- /dev/null +++ b/NIFileIn.h @@ -0,0 +1,47 @@ +/*******************************************/ +/* NonInterpolating One-Shot Raw Sound- */ +/* file Class, by Perry R. Cook, 1995-96 */ +/* This Object can open a raw 16bit data */ +/* (signed integers) file, and play back */ +/* the data once, with no interpolation */ +/* on playback. Once finished, it closes */ +/* the file, the file is reopened with */ +/* the reset() method. */ +/* This is useful for small memory model, */ +/* applications, or for streaming from */ +/* disk (and generally non real-time */ +/* applications). */ +/*******************************************/ + +#if !defined(__NIFileIn_h) +#define __NIFileIn_h + +#include "Object.h" + +class NIFileIn : public Object +{ + protected: + long length; + long lastTime; + int finished; + short data; + char fileNm[128]; + FILE *myFile; + MY_FLOAT rate; + MY_FLOAT time; + MY_FLOAT gain; + MY_FLOAT lastOutput; + public: + NIFileIn(char *fileName); + ~NIFileIn(); + void reset(); + void normalize(); + void normalize(MY_FLOAT newPeak); + void setRate(MY_FLOAT aRate); + void finish(); + MY_FLOAT tick(); + int informTick(); + MY_FLOAT lastOut(); +}; + +#endif diff --git a/NIWave1S.cpp b/NIWave1S.cpp new file mode 100644 index 0000000..d2a75ee --- /dev/null +++ b/NIWave1S.cpp @@ -0,0 +1,119 @@ +/*******************************************/ +/* NonInterpolating One-Shot Raw Sound- */ +/* file Class, by Perry R. Cook, 1995-96 */ +/* This Object can open a raw 16bit data */ +/* (signed integers) file, and play back */ +/* the data once (again when reset), with */ +/* no interpolation on playback. */ +/*******************************************/ + +#include "NIWave1S.h" + +NIWave1S :: NIWave1S(char *fileName) +{ + long i; + short temp; + FILE *fd; + fd = fopen(fileName,"rb"); + if (!fd) { + printf("Couldn't find soundfile %s !!!!!!!!\n",fileName); + exit(0); + } + i = 0; + while (fread(&temp,2,1,fd)) i++; + length = i; + fseek(fd,0,0); + data = (MY_FLOAT *) malloc(MY_FLOAT_SIZE * (length + 1)); + i = 0; + while (fread(&temp,2,1,fd)) { + data[i] = temp; + i++; + } + data[length] = data[length-1]; + fclose(fd); + time = 0.0; + rate = 1.0; +} + +void NIWave1S :: reset() +{ + time = 0.0; + lastOutput = 0.0; +} + +void NIWave1S :: normalize() +{ + this->normalize(1.0); +} + +void NIWave1S :: normalize(MY_FLOAT newPeak) +{ + long i; + MY_FLOAT max = 0.0; + for (i=0;i<=length;i++) + if (fabs(data[i]) > max) + max = fabs(data[i]); + if (max > 0.0) { + max = 1.0 / max; + max *= newPeak; + for (i=0;i<=length;i++) + data[i] *= max; + } +} + +void NIWave1S :: setRate(MY_FLOAT aRate) +{ + rate = aRate; +} + +MY_FLOAT NIWave1S :: tick() +{ + this->informTick(); + return lastOutput; +} + +int NIWave1S :: informTick() +{ + int allDone = 0; + long temp; + + time += rate; /* Update current time */ + + if (time >= length) { /* Check for end of sound */ + time = length-1; /* stick at end */ + allDone = 1; /* Information for one-shot use */ + } + temp = (long) time; /* Integer part of time address */ + lastOutput = data[temp]; /* Get non-interpolated data */ + + return allDone; +} + +MY_FLOAT NIWave1S :: lastOut() +{ + return lastOutput; +} + +/************ Test Main Program *****************/ +/* +void main() +{ + NIWave1S oneShot("rawwaves/mandpluk.raw"); + FILE *fd; + short data; + long i; + + fd = fopen("test.raw","wb"); + for (i=0;i<8192;i++) { + data = oneShot.tick(); + fwrite(&data,2,1,fd); + } + oneShot.reset(); + oneShot.setRate(0.5); + for (i=0;i<16384;i++) { + data = oneShot.tick(); + fwrite(&data,2,1,fd); + } + fclose(fd); +} +*/ diff --git a/NIWave1S.h b/NIWave1S.h new file mode 100644 index 0000000..298abe1 --- /dev/null +++ b/NIWave1S.h @@ -0,0 +1,34 @@ +/*******************************************/ +/* NonInterpolating One-Shot Raw Sound- */ +/* file Class, by Perry R. Cook, 1995-96 */ +/* This Object can open a raw 16bit data */ +/* (signed integers) file, and play back */ +/* the data once (again when reset), with */ +/* no interpolation on playback. */ +/*******************************************/ + +#if !defined(__NIWave1S_h) +#define __NIWave1S_h + +#include "Object.h" + +class NIWave1S : public Object +{ + protected: + long length; + MY_FLOAT *data; + MY_FLOAT rate; + MY_FLOAT time; + MY_FLOAT lastOutput; + public: + NIWave1S(char *fileName); + void reset(); + void normalize(); + void normalize(MY_FLOAT newPeak); + void setRate(MY_FLOAT aRate); + MY_FLOAT tick(); + int informTick(); + MY_FLOAT lastOut(); +}; + +#endif diff --git a/Noise.cpp b/Noise.cpp new file mode 100644 index 0000000..25ad571 --- /dev/null +++ b/Noise.cpp @@ -0,0 +1,52 @@ +/*******************************************/ +/* Noise Generator Class, */ +/* by Perry R. Cook, 1995-96 */ +/* White noise as often as you like. */ +/*******************************************/ + +#include "Noise.h" + +Noise :: Noise() : Object() +{ + lastOutput = 0.0; +} + +Noise :: ~Noise() +{ + +} + +/* THIS IS FOR TURBO C */ +/* Constant = 1.0 / 16384.0 */ +/* #define ONE_OVER_RANDLIMIT 0.00006103516 */ + + +/* THIS IS FOR UNIX, NeXT and SGI */ + #define ONE_OVER_RANDLIMIT 0.00000000093132258 + +MY_FLOAT Noise :: tick() +{ +/* THIS ONE IS TURBO C */ +/* lastOutput = (MY_FLOAT) random(32767) - 16384.0; */ + +/* THIS IS FOR UNIX, NeXT and SGI */ + + lastOutput = (MY_FLOAT) random() - 1073741823.0; + lastOutput *= ONE_OVER_RANDLIMIT; + return lastOutput; +} + +MY_FLOAT Noise :: lastOut() +{ + return lastOutput; +} + +/************ Test Main ************************/ +/* +void main() +{ + long i; + Noise test; + for (i=0;i<20;i++) printf("%lf\n",test.tick()); +} +*/ diff --git a/Noise.h b/Noise.h new file mode 100644 index 0000000..950dc81 --- /dev/null +++ b/Noise.h @@ -0,0 +1,23 @@ +/*******************************************/ +/* Noise Generator Class, */ +/* by Perry R. Cook, 1995-96 */ +/* White noise as often as you like. */ +/*******************************************/ + +#if !defined(__Noise_h) +#define __Noise_h + +#include "Object.h" + +class Noise : public Object +{ + protected: + MY_FLOAT lastOutput; + public: + Noise(); + ~Noise(); + virtual MY_FLOAT tick(); + MY_FLOAT lastOut(); +}; + +#endif diff --git a/Object.cpp b/Object.cpp new file mode 100644 index 0000000..bdb31e8 --- /dev/null +++ b/Object.cpp @@ -0,0 +1,29 @@ +/*******************************************/ +/* Object Class, by Perry R. Cook, 1995-96*/ +/* This is mostly here for compatibility */ +/* with Objective C. We'll also stick */ +/* global defines here, so everyone will */ +/* see them. */ +/*******************************************/ + +#include "Object.h" + + +/* This is just here for compatibility and convenience, + so there's no need to do any real calculations. + I do set up some redefinable variables here. */ + + +Object :: Object() +{ + MIDI_mod_wheel = 1; /* Controller # 1 */ + MIDI_control1 = 2; /* Breath Pressure */ + MIDI_control2 = 4; /* Foot Control */ + MIDI_control3 = 11; /* Expression Pedal */ + MIDI_after_touch = 128; /* Channel Pressure -> new controller */ +} + +Object :: ~Object() +{ +} + diff --git a/Object.h b/Object.h new file mode 100644 index 0000000..f691156 --- /dev/null +++ b/Object.h @@ -0,0 +1,91 @@ +/*******************************************/ +/* Object Class, by Perry R. Cook, 1995-96*/ +/* This is mostly here for compatibility */ +/* with Objective C. We'll also stick */ +/* global defines here, so everyone will */ +/* see them. */ +/*******************************************/ + +#if !defined(__Object_h) +#define __Object_h + +#include +#include +#include +#include + +class Object +{ + public: + int MIDI_control1; + int MIDI_control2; + int MIDI_control3; + int MIDI_mod_wheel; + int MIDI_after_touch; + protected: + Object(); + ~Object(); +}; + +/* Only use one of __SGI_ __NeXT_ __DOS_ */ +/* And choice of __SGI_REALTIME or not */ + + #define __SGI_ + #define __SGI_REALTIME +/* #define __NeXT_ */ + +/* SRATE here is 44100, others are derived accordingly */ +/* #define SRATE 44100.0 + #define SRATE_OVER_TWO 22050.0 + #define ONE_OVER_SRATE 0.00002267573696 + #define RATE_NORM 0.5 +*/ + +/* SRATE here is 22050, others are derived accordingly */ + #define SRATE 22050.0 + #define SRATE_OVER_TWO 11025.0 + #define ONE_OVER_SRATE 0.00004535147392 + #define RATE_NORM 1.0 + + +/* SRATE here is 8k, others are derived accordingly */ +/* #define SRATE 8000.0 + #define SRATE_OVER_TWO 4000 + #define ONE_OVER_SRATE 0.00012500000000 + #define RATE_NORM 2.75625 +*/ +/* RATE_NORM is 22050 / 8000 */ + +/* Yer Basic Trigonometric constants */ +#define PI 3.14159265359 +#define TWO_PI 6.28318530718 +#define ONE_OVER_TWO_PI 0.15915494309 + +/* States for Envelopes, etc. */ + +#define ATTACK 0 +#define DECAY 1 +#define SUSTAIN 2 +#define RELEASE 3 + +/* Machine dependent stuff, possibly useful for optimization */ +/* for example, changing double to float here increases */ +/* performance (speed) by a whopping 4-6% on 486-flavor machines */ +/* BUT!! a change from float to double here increases speed by */ +/* 30% or so on SGI machines */ +/* #define MY_FLOAT float */ +/* #define MY_FLOAT_SIZE 4 */ + +#define MY_FLOAT double +#define MY_FLOAT_SIZE 8 + +/* Debugging define, causes massive printf's to come out. */ +/* Also enables timing calculations in WaveOut class, other stuff. */ +/* #define _debug_ 1 */ + +#include + +#define NORM_7 0.0078125 +/* this is 1/128 for MIDI normalization*/ + +#endif diff --git a/OnePole.cpp b/OnePole.cpp new file mode 100644 index 0000000..6b788de --- /dev/null +++ b/OnePole.cpp @@ -0,0 +1,81 @@ +/*******************************************/ +/* One Pole Filter Class, */ +/* by Perry R. Cook, 1995-96 */ +/* The parameter gain is an additional */ +/* gain parameter applied to the filter */ +/* on top of the normalization that takes */ +/* place automatically. So the net max */ +/* gain through the system equals the */ +/* value of gain. sgain is the combina- */ +/* tion of gain and the normalization */ +/* parameter, so if you set the poleCoeff */ +/* to alpha, sgain is always set to */ +/* gain * (1.0 - fabs(alpha)). */ +/*******************************************/ + +#include "OnePole.h" + +OnePole :: OnePole() : Filter() +{ + poleCoeff = 0.9; + gain = 1.0; + sgain = 0.1; + outputs = (MY_FLOAT *) malloc(MY_FLOAT_SIZE); + outputs[0] = 0.0; +} + +OnePole :: ~OnePole() +{ + free(outputs); +} + +void OnePole :: clear() +{ + outputs[0] = 0.0; + lastOutput = 0.0; +} + +void OnePole :: setPole(MY_FLOAT aValue) +{ + poleCoeff = aValue; + if (poleCoeff > 0.0) /* Normalize gain to 1.0 max */ + sgain = gain * (1.0 - poleCoeff); + else + sgain = gain * (1.0 + poleCoeff); +} + +void OnePole :: setGain(MY_FLOAT aValue) +{ + gain = aValue; + if (poleCoeff > 0.0) + sgain = gain * (1.0 - poleCoeff); /* Normalize gain to 1.0 max */ + else + sgain = gain * (1.0 + poleCoeff); +} + +MY_FLOAT OnePole :: tick(MY_FLOAT sample) /* Perform Filter Operation */ +{ + outputs[0] = (sgain * sample) + (poleCoeff * outputs[0]); + lastOutput = outputs[0]; + return lastOutput; +} + +/************ Test Main ************************/ +/* +#include + +void main() +{ + long i; + OnePole test; + test.setPole(0.99); + for (i=0;i<150;i++) printf("%lf ",test.tick(1.0)); + printf("\n\n"); + + test.clear(); + test.setPole(0.9); + test.setGain(2.0); + for (i=0;i<150;i++) printf("%lf ",test.tick(0.5)); + printf("\n\n"); +} +*/ diff --git a/OnePole.h b/OnePole.h new file mode 100644 index 0000000..282e7fa --- /dev/null +++ b/OnePole.h @@ -0,0 +1,35 @@ +/*******************************************/ +/* One Pole Filter Class, */ +/* by Perry R. Cook, 1995-96 */ +/* The parameter gain is an additional */ +/* gain parameter applied to the filter */ +/* on top of the normalization that takes */ +/* place automatically. So the net max */ +/* gain through the system equals the */ +/* value of gain. sgain is the combina- */ +/* tion of gain and the normalization */ +/* parameter, so if you set the poleCoeff */ +/* to alpha, sgain is always set to */ +/* gain * (1.0 - fabs(alpha)). */ +/*******************************************/ + +#if !defined(__OnePole_h) +#define __OnePole_h + +#include "Filter.h" + +class OnePole : public Filter +{ + protected: + MY_FLOAT poleCoeff; + MY_FLOAT sgain; + public: + OnePole(); + ~OnePole(); + void clear(); + void setPole(MY_FLOAT aValue); + void setGain(MY_FLOAT aValue); + MY_FLOAT tick(MY_FLOAT sample); +}; + +#endif diff --git a/OneZero.cpp b/OneZero.cpp new file mode 100644 index 0000000..d648780 --- /dev/null +++ b/OneZero.cpp @@ -0,0 +1,64 @@ +/*******************************************/ +/* One Zero Filter Class, */ +/* by Perry R. Cook, 1995-96 */ +/* The parameter gain is an additional */ +/* gain parameter applied to the filter */ +/* on top of the normalization that takes */ +/* place automatically. So the net max */ +/* gain through the system equals the */ +/* value of gain. sgain is the combina- */ +/* tion of gain and the normalization */ +/* parameter, so if you set the poleCoeff */ +/* to alpha, sgain is always set to */ +/* gain / (1.0 - fabs(alpha)). */ +/*******************************************/ + +#include "OneZero.h" + +OneZero :: OneZero() +{ + gain = 1.0; + zeroCoeff = 1.0; + sgain = 0.5; + inputs = (MY_FLOAT *) malloc(MY_FLOAT_SIZE); + this->clear(); +} + +OneZero :: ~OneZero() +{ + free(inputs); +} + +void OneZero :: clear() +{ + inputs[0] = 0.0; + lastOutput = 0.0; +} + +void OneZero :: setGain(MY_FLOAT aValue) +{ + gain = aValue; + if (zeroCoeff > 0.0) /* Normalize gain to 1.0 max */ + sgain = gain / (1.0 + zeroCoeff); + else + sgain = gain / (1.0 - zeroCoeff); +} + +void OneZero :: setCoeff(MY_FLOAT aValue) +{ + zeroCoeff = aValue; + if (zeroCoeff > 0.0) /* Normalize gain to 1.0 max */ + sgain = gain / (1.0 + zeroCoeff); + else + sgain = gain / (1.0 - zeroCoeff); +} + +MY_FLOAT OneZero :: tick(MY_FLOAT sample) /* Perform Filter Operation */ +{ + MY_FLOAT temp; + temp = sgain * sample; + lastOutput = (inputs[0] * zeroCoeff) + temp; + inputs[0] = temp; + return lastOutput; +} + diff --git a/OneZero.h b/OneZero.h new file mode 100644 index 0000000..686fff1 --- /dev/null +++ b/OneZero.h @@ -0,0 +1,35 @@ +/*******************************************/ +/* One Zero Filter Class, */ +/* by Perry R. Cook, 1995-96 */ +/* The parameter gain is an additional */ +/* gain parameter applied to the filter */ +/* on top of the normalization that takes */ +/* place automatically. So the net max */ +/* gain through the system equals the */ +/* value of gain. sgain is the combina- */ +/* tion of gain and the normalization */ +/* parameter, so if you set the poleCoeff */ +/* to alpha, sgain is always set to */ +/* gain / (1.0 - fabs(alpha)). */ +/*******************************************/ + +#if !defined(__OneZero_h) +#define __OneZero_h + +#include "Filter.h" + +class OneZero : public Filter +{ + protected: + MY_FLOAT zeroCoeff; + MY_FLOAT sgain; + public: + OneZero(); + ~OneZero(); + void clear(); + void setGain(MY_FLOAT aValue); + void setCoeff(MY_FLOAT aValue); + MY_FLOAT tick(MY_FLOAT sample); +}; + +#endif diff --git a/PercFlut.cpp b/PercFlut.cpp new file mode 100644 index 0000000..ac371fc --- /dev/null +++ b/PercFlut.cpp @@ -0,0 +1,50 @@ +/******************************************/ +/* Percussive Flute Subclass */ +/* of Algorithm 4 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/******************************************/ + +#include "PercFlut.h" + +PercFlut :: PercFlut() : FM4Alg4() +{ + this->loadWaves("rawwaves/sinewave.raw", + "rawwaves/sinewave.raw", + "rawwaves/sinewave.raw", + "rawwaves/sinewave.raw"); + + this->setRatio(0,1.50 ); + this->setRatio(1,3.00 * 0.995); + this->setRatio(2,2.99 * 1.005); + this->setRatio(3,6.00 * 0.997); + gains[0] = __FM4Op_gains[99]; + gains[1] = __FM4Op_gains[71]; + gains[2] = __FM4Op_gains[93]; + gains[3] = __FM4Op_gains[85]; + adsr[0]->setAll(0.001,0.001,__FM4Op_susLevels[14],0.001); + adsr[1]->setAll(0.05,0.0001,__FM4Op_susLevels[13],0.0001); + adsr[2]->setAll(0.05,0.0020,__FM4Op_susLevels[11],0.001); + adsr[3]->setAll(0.05,0.0010,__FM4Op_susLevels[13],0.005); + twozero->setGain(0.0); + modDepth = 0.005; +} + +void PercFlut :: setFreq(MY_FLOAT frequency) +{ + baseFreq = frequency; +} + +void PercFlut :: noteOn(MY_FLOAT freq, MY_FLOAT amp) +{ + gains[0] = amp * __FM4Op_gains[99]; + gains[1] = amp * __FM4Op_gains[71]; + gains[2] = amp * __FM4Op_gains[93]; + gains[3] = amp * __FM4Op_gains[85]; + this->setFreq(freq); + this->keyOn(); +#if defined(_debug_) + printf("PercFlut : NoteOn: Freq=%lf Amp=%lf\n",freq,amp); +#endif +} + diff --git a/PercFlut.h b/PercFlut.h new file mode 100644 index 0000000..96b60b0 --- /dev/null +++ b/PercFlut.h @@ -0,0 +1,21 @@ +/******************************************/ +/* Percussive Flute Subclass */ +/* of Algorithm 4 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/******************************************/ + +#if !defined(__PercFlut_h) +#define __PercFlut_h + +#include "FM4Alg4.h" + +class PercFlut : public FM4Alg4 +{ + public: + PercFlut(); + virtual void setFreq(MY_FLOAT frequency); + virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp); +}; + +#endif diff --git a/PhonTabl.h b/PhonTabl.h new file mode 100644 index 0000000..7ba437e --- /dev/null +++ b/PhonTabl.h @@ -0,0 +1,189 @@ +double phonGains[32][2] = + {{1.0,0.0}, // eee + {1.0,0.0}, // ihh + {1.5,0.0}, // ehh + {1.0,0.0}, // aaa + + {0.5,0.0}, // ahh + {0.5,0.0}, // aww + {0.5,0.0}, // ohh + {0.5,0.0}, // uhh + + {0.5,0.0}, // uuu + {0.15,0.0}, // ooo + {0.15,0.0}, // rrr + {6.0,0.0}, // lll + + {1.0,0.0}, // mmm + {1.0,0.0}, // nnn + {1.0,0.0}, // nng + {1.0,0.0}, // ngg + + {0.0,1.0}, // fff + {0.0,1.0}, // sss + {0.0,1.0}, // thh + {0.0,1.0}, // shh + + {0.0,0.2}, // xxx + {0.0,0.003}, // hee + {0.0,0.001}, // hoo + {0.0,0.002}, // hah + + {1.0,0.4}, // bbb + {4.0,0.1}, // ddd + {1.0,0.4}, // jjj + {1.0,0.4}, // ggg + + {1.0,0.1}, // vvv + {1.0,0.1}, // zzz + {1.0,0.1}, // thz + {1.0,0.1} // zhh +}; + +double phonParams[32][4][3] = + {{ { 273,0.996, 0}, // eee (beet) + {2086,0.945, -16}, + {2754,0.979, -12}, + {3270,0.440, -17}}, + { { 385,0.987, 0}, // ihh (bit) + {2056,0.930, -20}, + {2587,0.890, -20}, + {3150,0.400, -20}}, + { { 515,0.977, 0}, // ehh (bet) + {1805,0.810, -10}, + {2526,0.875, -10}, + {3103,0.400, -13}}, + { { 773,0.950, 0}, // aaa (bat) + {1676,0.830, -6}, + {2380,0.880, -20}, + {3027,0.600, -20}}, + + { { 770,0.950, 0}, // ahh (father) + {1153,0.970, -3}, + {2450,0.780, -20}, + {3140,0.800, -32}}, + { { 637,0.910, 0}, // aww (bought) + { 895,0.900, -3}, + {2556,0.950, -17}, + {3070,0.910, -20}}, + { { 637,0.910, 0}, // ohh (bone) NOTE:: same as aww (bought) + { 895,0.900, -3}, + {2556,0.950, -17}, + {3070,0.910, -20}}, + { { 561,0.965, 0}, // uhh (but) + {1084,0.930, -10}, + {2541,0.930, -15}, + {3345,0.900, -20}}, + + { { 515,0.976, 0}, // uuu (foot) + {1031,0.950, -3}, + {2572,0.960, -11}, + {3345,0.960, -20}}, + { { 349,0.986, 0}, // ooo (boot) + { 918,0.940, -10}, + {2350,0.960, -17}, + {2731,0.950, -23}}, + { { 394,0.959, 0}, // rrr (bird) + {1297,0.780, -6}, + {1441,0.980, -6}, + {2754,0.950, -30}}, + { { 462,0.940, 0}, // lll (lull) + {2754,0.900, -30}, + {3406,0.100, -30}, + {3755,0.100, -30}}, + + { { 265,0.987, 0}, // mmm (mom) + {1176,0.940, -22}, + {2352,0.970, -20}, + {3277,0.940, -31}}, + { { 204,0.980, 0}, // nnn (nun) + {1570,0.940, -15}, + {2481,0.980, -12}, + {3133,0.800, -30}}, + { { 204,0.980, 0}, // nng (sang) NOTE:: same as nnn + {1570,0.940, -15}, + {2481,0.980, -12}, + {3133,0.800, -30}}, + { { 204,0.980, 0}, // ngg (bong) NOTE:: same as nnn + {1570,0.940, -15}, + {2481,0.980, -12}, + {3133,0.800, -30}}, + + { {1000,0.300, -10}, // fff + {2800,0.860, -10}, + {7425,0.740, 0}, + {8140,0.860, 0}}, + { {2000,0.700, -20}, // sss + {5257,0.750, -15}, + {7171,0.840, -3}, + {9000,0.900, 0}}, + { { 100,0.900, 0}, // thh + {4000,0.500, -20}, + {5500,0.500, -15}, + {8000,0.400, -20}}, + { {2693,0.940, 0}, // shh + {4000,0.720, -10}, + {6123,0.870, -10}, + {7755,0.750, -18}}, + + { {1000,0.300, -10}, // xxx NOTE:: Not Really Done Yet + {2800,0.860, -10}, + {7425,0.740, 0}, + {8140,0.860, 0}}, + { { 273,0.996, 0}, // hee (beet) (noisy eee) + {2086,0.945, -16}, + {2754,0.979, -12}, + {3270,0.440, -17}}, + { { 349,0.986, 0}, // hoo (boot) (noisy ooo) + { 918,0.940, -10}, + {2350,0.960, -17}, + {2731,0.950, -23}}, + { { 770,0.950, 0}, // hah (father) (noisy ahh) + {1153,0.970, -3}, + {2450,0.780, -20}, + {3140,0.800, -32}}, + + { {2000,0.700, -20}, // bbb NOTE:: Not Really Done Yet + {5257,0.750, -15}, + {7171,0.840, -3}, + {9000,0.900, 0}}, + { { 100,0.900, 0}, // ddd NOTE:: Not Really Done Yet + {4000,0.500, -20}, + {5500,0.500, -15}, + {8000,0.400, -20}}, + { {2693,0.940, 0}, // jjj NOTE:: Not Really Done Yet + {4000,0.720, -10}, + {6123,0.870, -10}, + {7755,0.750, -18}}, + { {2693,0.940, 0}, // ggg NOTE:: Not Really Done Yet + {4000,0.720, -10}, + {6123,0.870, -10}, + {7755,0.750, -18}}, + + { {2000,0.700, -20}, // vvv NOTE:: Not Really Done Yet + {5257,0.750, -15}, + {7171,0.840, -3}, + {9000,0.900, 0}}, + { { 100,0.900, 0}, // zzz NOTE:: Not Really Done Yet + {4000,0.500, -20}, + {5500,0.500, -15}, + {8000,0.400, -20}}, + { {2693,0.940, 0}, // thz NOTE:: Not Really Done Yet + {4000,0.720, -10}, + {6123,0.870, -10}, + {7755,0.750, -18}}, + { {2693,0.940, 0}, // zhh NOTE:: Not Really Done Yet + {4000,0.720, -10}, + {6123,0.870, -10}, + {7755,0.750, -18}} +}; + +char phonemes[32][4] = + {"eee","ihh","ehh","aaa", + "ahh","aww","ohh","uhh", + "uuu","ooo","rrr","lll", + "mmm","nnn","nng","ngg", + "fff","sss","thh","shh", + "xxx","hee","hoo","hah", + "bbb","ddd","jjj","ggg", + "vvv","zzz","thz","zhh"}; diff --git a/Plucked.cpp b/Plucked.cpp new file mode 100644 index 0000000..ea3cef0 --- /dev/null +++ b/Plucked.cpp @@ -0,0 +1,84 @@ + /******************************************/ +/* Karplus-Strong plucked string model */ +/* by Perry Cook, 1995-96 */ +/* */ +/* There exist at least two patents, */ +/* assigned to Stanford, bearing the */ +/* names of Karplus and/or Strong. */ +/******************************************/ + +#include "Plucked.h" + +Plucked :: Plucked(MY_FLOAT lowestFreq) +{ + length = (long) (SRATE / lowestFreq + 1); + loopGain = 0.999; + delayLine = new DLineA(length); + loopFilt = new OneZero; + pickFilt = new OnePole; + noise = new Noise; + this->clear(); +} + +Plucked :: ~Plucked() +{ + delete delayLine; + delete loopFilt; + delete pickFilt; + delete noise; +} + +void Plucked :: clear() +{ + delayLine->clear(); + loopFilt->clear(); + pickFilt->clear(); +} + +void Plucked :: setFreq(MY_FLOAT frequency) +{ + MY_FLOAT delay; + delay = ((MY_FLOAT) SRATE / frequency) - 0.5; /* length - delays */ + delayLine->setDelay(delay); + loopGain = 0.995 + (frequency * 0.000005); + if (loopGain>1.0) loopGain = 0.99999; +} + +void Plucked :: pluck(MY_FLOAT amplitude) +{ + long i; + pickFilt->setPole(0.999 - (amplitude*0.15)); + pickFilt->setGain(amplitude * 0.5); + for (i=0;itick(delayLine->lastOut() * 0.6 /* fill delay with noise */ + + pickFilt->tick(noise->tick())); /* additively with current */ + /* contents */ +} + +void Plucked :: noteOn(MY_FLOAT freq, MY_FLOAT amp) +{ + this->setFreq(freq); + this->pluck(amp); +#if defined(_debug_) + printf("Plucked : NoteOn: Freq=%lf Amp=%lf\n",freq,amp); +#endif +} + +void Plucked :: noteOff(MY_FLOAT amp) +{ + loopGain = 1.0 - amp; +#if defined(_debug_) + printf("Plucked : NoteOff: Amp=%lf\n",amp); +#endif +} + +MY_FLOAT Plucked :: tick() +{ + lastOutput = delayLine->tick( /* check this out, */ + loopFilt->tick( /* here's the whole inner */ + delayLine->lastOut() /* loop of the instrument!! */ + * loopGain)); + lastOutput *= 3.0; + return lastOutput; +} + diff --git a/Plucked.h b/Plucked.h new file mode 100644 index 0000000..de41457 --- /dev/null +++ b/Plucked.h @@ -0,0 +1,40 @@ +/******************************************/ +/* Karplus-Strong plucked string model */ +/* by Perry Cook, 1995-96 */ +/* */ +/* There exist at least two patents, */ +/* assigned to Stanford, bearing the */ +/* names of Karplus and/or Strong. */ +/******************************************/ + +#if !defined(__Plucked_h) +#define __Plucked_h + +#include "Instrmnt.h" +#include "DLineA.h" +#include "OneZero.h" +#include "OnePole.h" +#include "Noise.h" + +class Plucked : public Instrmnt +{ + protected: + DLineA *delayLine; + OneZero *loopFilt; + OnePole *pickFilt; + Noise *noise; + long length; + MY_FLOAT loopGain; + public: + Plucked(MY_FLOAT lowestFreq); + ~Plucked(); + void clear(); + virtual void setFreq(MY_FLOAT frequency); + void pluck(MY_FLOAT amplitude); + virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp); + virtual void noteOff(MY_FLOAT amp); + virtual MY_FLOAT tick(); +}; + +#endif + diff --git a/Plucked2.cpp b/Plucked2.cpp new file mode 100644 index 0000000..2ebd171 --- /dev/null +++ b/Plucked2.cpp @@ -0,0 +1,90 @@ +/******************************************/ +/* Enhanced (Jaffe-Smith, Smith, others) */ +/* Karplus-Strong plucked model */ +/* by Perry Cook, 1995-96 */ +/* This is the super-class, with no */ +/* excitation specified. So this one by */ +/* itself doesn't make any sound. */ +/******************************************/ + +#include "Plucked2.h" + +Plucked2 :: Plucked2(MY_FLOAT lowestFreq) +{ + length = (long) (SRATE / lowestFreq + 1); + baseLoopGain = 0.995; + loopGain = 0.999; + delayLine = new DLineA(length); + delayLine2 = new DLineA(length); + combDelay = new DLineL(length); + filter = new OneZero; + filter2 = new OneZero; + pluckAmp = 0.3; + pluckPos = 0.4; + detuning = 0.995; + lastFreq = lowestFreq * 2.0; + lastLength = length * 0.5; +} + +Plucked2 :: ~Plucked2() +{ + delete delayLine; + delete delayLine2; + delete combDelay; + delete filter; + delete filter2; +} + +void Plucked2 :: clear() +{ + delayLine->clear(); + delayLine2->clear(); + combDelay->clear(); + filter->clear(); + filter2->clear(); +} + +void Plucked2 :: setFreq(MY_FLOAT frequency) +{ + lastFreq = frequency; + lastLength = ((MY_FLOAT) SRATE / lastFreq); /* length - delays */ + delayLine->setDelay((lastLength / detuning) - 0.5); + delayLine2->setDelay((lastLength * detuning) - 0.5); + loopGain = baseLoopGain + (frequency * 0.000005); + if (loopGain>1.0) loopGain = 0.99999; +} + +void Plucked2 :: setDetune(MY_FLOAT detune) +{ + detuning = detune; + delayLine->setDelay((lastLength / detuning) - 0.5); + delayLine2->setDelay((lastLength * detuning) - 0.5); +} + +void Plucked2 :: setFreqAndDetune(MY_FLOAT frequency,MY_FLOAT detune) +{ + lastFreq = frequency; + detuning = detune; + this->setFreq(frequency); +} + +void Plucked2 :: setPluckPos(MY_FLOAT position) +{ + pluckPos = position; +} + +void Plucked2 :: setBaseLoopGain(MY_FLOAT aGain) +{ + baseLoopGain = aGain; + loopGain = baseLoopGain + (lastFreq * 0.000005); + if (loopGain>1.0) loopGain = 0.99999; +} + +void Plucked2 :: noteOff(MY_FLOAT amp) +{ + loopGain = (1.0 - amp) * 0.5; +#if defined(_debug_) + printf("Plucked2 : NoteOff: Amp=%lf\n",amp); +#endif +} + diff --git a/Plucked2.h b/Plucked2.h new file mode 100644 index 0000000..2a102e2 --- /dev/null +++ b/Plucked2.h @@ -0,0 +1,46 @@ +/******************************************/ +/* Enhanced (Jaffe-Smith, Smith, others) */ +/* Karplus-Strong plucked model */ +/* by Perry Cook, 1995-96 */ +/* This is the super-class, with no */ +/* excitation specified. So this one by */ +/* itself doesn't make any sound. */ +/******************************************/ + +#if !defined(__Plucked2_h) +#define __Plucked2_h + +#include "Instrmnt.h" +#include "DLineL.h" +#include "DLineA.h" +#include "OneZero.h" + +class Plucked2 : public Instrmnt +{ + protected: + DLineA *delayLine; + DLineA *delayLine2; + DLineL *combDelay; + OneZero *filter; + OneZero *filter2; + long length; + MY_FLOAT loopGain; + MY_FLOAT baseLoopGain; + MY_FLOAT lastFreq; + MY_FLOAT lastLength; + MY_FLOAT detuning; + MY_FLOAT pluckAmp; + MY_FLOAT pluckPos; + public: + Plucked2(MY_FLOAT lowestFreq); + ~Plucked2(); + void clear(); + virtual void setFreq(MY_FLOAT frequency); + void setDetune(MY_FLOAT detune); + void setFreqAndDetune(MY_FLOAT frequency, MY_FLOAT detune); + void setPluckPos(MY_FLOAT position); + void setBaseLoopGain(MY_FLOAT aGain); + virtual void noteOff(MY_FLOAT amp); +}; + +#endif diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..e883554 --- /dev/null +++ b/README.txt @@ -0,0 +1,117 @@ +TK96CPP +A ToolKit of Audio Synthesis Classes + and Instruments in C++ +Perry Cook, 1995-96 + +Please read the Legal and Ethical notes at the +bottom of this document. + +For instant fun, if you get it to compile (see +below) type TestAllNext or TestAllSGIRT. The +former makes sound files of each instrument and +saves them under the instrument name. The latter +plays in real time from a SKINI scorefile. + +For even more potential fun, try the GUI and MIDI +interface demos in the directory TCLSpecs. MIDI +is SGI specific for today, look for more support +later. TCL works on SGI, maybe elsewhere, but +you must have and install Tcl/TK. + +For more documentation on this ToolKit, the classes, +etc, read the file HIERARCH.txt and the individual +class definitions. + +SGI vs. NeXT vs. Intel vs. the world: +See Object.h and Makefile for machine-specific +items. + +Initial public release. Some objects still beta. + +This whole world was created with no particular +hardware in mind. These examples are intended +to be tutorial in nature, as a platform for the +continuation of my research, and as a possible +starting point for a software synthesis system. +The basic motivation was to create the necessary +unit generators to do the synthesis, processing, +and control that I want to do and teach about. +Little thought for optimization was given (see +Object.cpp), and therefore improvements, especially +speed enhancements, should be possible with +these classes. It was written with some basic +concepts in mind about how to let compilers +optimize (see Adrian Freed's home page for some +nice experience-based thoughts on that topic). + +Your question at this point might be, "But Perry, +with CMix, CMusic, CSound, CShells, CMonkeys, etc. +already cluttering the landscape, why a new set +of stupid C functions for music synthesis and +processing?" The answers lie below. + +1) I needed to port many of the things I've done + into something which is generic enough to port + further to different machines. + +2) I really plan to document this stuff, so that + you don't have to be me to figure out what's + going on. (I'll probably be sorry I said this + in a couple of years, when even I can't figure + out what I was thinking.) + +3) The classic difficulties most people have in + trying to implement physical models are: + + A) They have trouble understanding the papers, + and/or in turning the theory into practice. + + B) The Physical Model instruments are a pain to get + to oscillate, and coming up with stable and + meaningful parameter values is required to + get the models to work at all. + + This set of C++ unitgenerators and instruments + might help to diminish the scores of EMails I + get asking what to do with those block diagrams + I put in my papers. + +4) I wanted to try some new stuff with modal synthesis, + and implement some classic FM patches as well. + +5) I wanted to reimplement, and newly implement + more of the intelligent and physical performer + models I've talked about in some of my papers. + But I wanted to do it in a portable way, and in + such a way that I can hook up modules quickly. + I also wanted to make these instruments connectable + to such player objects, so folks like Brad Garton + who really think a lot about the players can connect + them to my instruments, a lot about which I think. + +6) More rationalizations to follow . . . + +*********************************************************** +Legal and Ethical: + +This software was designed and created to be +made publicly available for free, primarily for +academic purposes, so if you use it, pass it on +with this documentation, and for free. + +If you make a million dollars with it, give me some. +If you make compositions with it, put me in the +program notes. + +Some of the concepts are covered by various patents, +some known to me and likely others which are unknown. +Many of the ones known to me are administered by the +Stanford Office of Technology and Licensing. + +The good news is that large hunks of the techniques +used here are public domain. To avoid subtle legal +issues, I'll not state what's freely useable here, +but I'll try to note within the various classes +where certain things are likely to be protected by +patents. +*********************************************************** diff --git a/RawLoop.cpp b/RawLoop.cpp new file mode 100644 index 0000000..c2c0c5c --- /dev/null +++ b/RawLoop.cpp @@ -0,0 +1,155 @@ +/*******************************************/ +/* Raw Looped Soundfile Class, */ +/* by Perry R. Cook, 1995-96 */ +/* This Object can open a raw 16bit data */ +/* (signed integers) file, and play back */ +/* the data, looping only, with linear */ +/* interpolation on playback. */ +/*******************************************/ + +#include "RawLoop.h" + +RawLoop :: RawLoop(char *fileName) +{ + long i; + short temp; + FILE *fd; + fd = fopen(fileName,"rb"); + if (!fd) { + printf("Couldn't find soundfile %s !!!!!!!!\n",fileName); + exit(0); + } + i = 0; + while (fread(&temp,2,1,fd)) i++; + length = i; + fseek(fd,0,0); + data = (MY_FLOAT *) malloc(MY_FLOAT_SIZE * (length + 1)); + i = 0; + while (fread(&temp,2,1,fd)) { + data[i] = temp; + i++; + } + data[length] = data[0]; + fclose(fd); + time = 0.0; + phaseOffset = 0.0; + rate = 1.0; +} + +RawLoop :: ~RawLoop() +{ + free(data); +} + +void RawLoop :: reset() +{ + time = 0.0; + lastOutput = 0.0; +} + +void RawLoop :: normalize() +{ + this->normalize(1.0); +} + +void RawLoop :: normalize(MY_FLOAT newPeak) +{ + long i; + MY_FLOAT max = 0.0; + for (i=0;i<=length;i++) + if (fabs(data[i]) > max) + max = fabs(data[i]); + if (max > 0.0) { + max = 1.0 / max; + max *= newPeak; + for (i=0;i<=length;i++) + data[i] *= max; + } +} + +void RawLoop :: setRate(MY_FLOAT aRate) +{ + rate = aRate; +} + +void RawLoop :: setFreq(MY_FLOAT aFreq) +{ + rate = length * ONE_OVER_SRATE * aFreq; +} + +void RawLoop :: addTime(MY_FLOAT aTime) /* Add an absolute time */ +{ /* in samples */ + time += aTime; +} + +void RawLoop :: addPhase(MY_FLOAT anAngle) /* Add a time in cycles */ +{ /* Cycles here means */ + time += length * anAngle; /* 1.0 = length */ +} + +void RawLoop :: addPhaseOffset(MY_FLOAT anAngle) +{ /* Add a phase offset */ + phaseOffset = length * anAngle; /* in cycles, where */ +} /* 1.0 = length */ + +MY_FLOAT RawLoop :: tick() +{ + long temp; + + MY_FLOAT temp_time, alpha; + + time += rate; /* Update current time */ + + while (time >= length) /* Check for end of sound */ + time -= length; /* loop back to beginning */ + while (time < 0.0) /* Check for end of sound */ + time += length; /* loop back to beginning */ + + temp_time = time; + + if (phaseOffset != 0.0) { + temp_time += phaseOffset; /* Add phase offset */ + while (temp_time >= length) /* Check for end of sound */ + temp_time -= length; /* loop back to beginning */ + while (temp_time < 0.0) /* Check for end of sound */ + temp_time += length; /* loop back to beginning */ + } + + temp = (long) temp_time; /* Integer part of time address */ + alpha = temp_time - (MY_FLOAT) temp; /* fractional part of time address */ + lastOutput = data[temp]; /* Do linear interpolation */ + lastOutput = lastOutput + /* same as alpha*data[temp+1] */ + (alpha * (data[temp+1] + - lastOutput)); /* + (1-alpha)data[temp] */ + + return lastOutput; +} + +MY_FLOAT RawLoop :: lastOut() +{ + return lastOutput; +} + +/************ Test Main Program *****************/ +/* +void main() +{ + RawLoop loopWave("rawwaves/sinewave.raw"); + FILE *fd; + short data; + long i; + + loopWave.setFreq(5500); + fd = fopen("test.raw","wb"); + for (i=0;i<4096;i++) { + data = loopWave.tick(); + fwrite(&data,2,1,fd); + } + loopWave.setFreq(2750); + for (i=0;i<4096;i++) { + data = loopWave.tick(); + fwrite(&data,2,1,fd); + } + fclose(fd); +} +*/ diff --git a/RawLoop.h b/RawLoop.h new file mode 100644 index 0000000..0cab42d --- /dev/null +++ b/RawLoop.h @@ -0,0 +1,39 @@ +/*******************************************/ +/* Raw Looped Soundfile Class, */ +/* by Perry R. Cook, 1995-96 */ +/* This Object can open a raw 16bit data */ +/* (signed integers) file, and play back */ +/* the data, looping only, with linear */ +/* interpolation on playback. */ +/*******************************************/ + +#if !defined(__RawLoop_h) +#define __RawLoop_h + +#include "Object.h" + +class RawLoop : public Object +{ + protected: + long length; + MY_FLOAT *data; + MY_FLOAT rate; + MY_FLOAT time; + MY_FLOAT phaseOffset; + MY_FLOAT lastOutput; + public: + RawLoop(char *fileName); + ~RawLoop(); + void reset(); + void normalize(); + void normalize(MY_FLOAT newPeak); + void setRate(MY_FLOAT aRate); + void setFreq(MY_FLOAT aFreq); + void addTime(MY_FLOAT aTime); + void addPhase(MY_FLOAT anAngle); + void addPhaseOffset(MY_FLOAT anAngle); + MY_FLOAT tick(); + MY_FLOAT lastOut(); +}; + +#endif diff --git a/RawWave.cpp b/RawWave.cpp new file mode 100644 index 0000000..e9aa5e4 --- /dev/null +++ b/RawWave.cpp @@ -0,0 +1,235 @@ +/*******************************************/ +/* Raw Soundfile Class, */ +/* by Perry R. Cook, 1995-96 */ +/* This Object can open a raw 16bit data */ +/* (signed integers) file, and play back */ +/* the data once or looping, with linear */ +/* interpolation on playback. */ +/*******************************************/ + +#include "RawWave.h" + +RawWave :: RawWave(char *fileName) +{ + long i; + short temp; + FILE *fd; + fd = fopen(fileName,"rb"); + if (!fd) { + printf("Couldn't find soundfile %s !!!!!!!!\n",fileName); + exit(0); + } + i = 0; + while (fread(&temp,2,1,fd)) i++; + length = i; + fseek(fd,0,0); + data = (MY_FLOAT *) malloc(MY_FLOAT_SIZE * (length + 1)); + myData = 1; + i = 0; + while (fread(&temp,2,1,fd)) { + data[i] = temp; + i++; + } + data[length] = data[length-1]; + fclose(fd); + looping = 0; + time = length; + phaseOffset = 0.0; + rate = 1.0; + allDone = 0; +} + +RawWave :: RawWave(MY_FLOAT *someData, long aLength) +{ + + length = aLength; + data = someData; + myData = 0; + looping = 0; + time = 0.0; + phaseOffset = 0.0; + rate = 1.0; +} + +RawWave :: ~RawWave() +{ + if (myData) { + free(data); + data = 0; + } +} + +void RawWave :: reset() +{ + time = 0.0; + lastOutput = 0.0; + allDone = 0; +} + +void RawWave :: normalize() +{ + this->normalize(1.0); +} + +void RawWave :: normalize(MY_FLOAT newPeak) +{ + long i; + MY_FLOAT max = 0.0; + for (i=0;i<=length;i++) + if (fabs(data[i]) > max) + max = fabs(data[i]); + if (max > 0.0) { + max = 1.0 / max; + max *= newPeak; + for (i=0;i<=length;i++) + data[i] *= max; + } +} + +void RawWave :: setRate(MY_FLOAT aRate) +{ + rate = aRate; +} + +void RawWave :: setFreq(MY_FLOAT aFreq) +{ + rate = length * ONE_OVER_SRATE * aFreq; +} + +void RawWave :: addTime(MY_FLOAT aTime) /* Add an absolute time */ +{ /* in samples */ + time += aTime; +} + +void RawWave :: addPhase(MY_FLOAT anAngle) /* Add a time in cycles */ +{ /* Cycles here means */ + time += length * anAngle; /* 1.0 = length */ +} + +void RawWave :: addPhaseOffset(MY_FLOAT anAngle) +{ /* Add a phase offset */ + phaseOffset = length * anAngle; /* in cycles, where */ +} /* 1.0 = length */ + +void RawWave :: setLooping(int aLoopStatus) +{ + time = 0; + looping = aLoopStatus; + if (looping) data[length] = data[0]; +} + +long RawWave :: getLength() +{ + return length; +} + +MY_FLOAT* RawWave :: getData() +{ + return data; +} + +MY_FLOAT RawWave :: tick() +{ + this->informTick(); + return lastOutput; +} + +int RawWave :: isAllDone() +{ + return allDone; +} + +int RawWave :: informTick() +{ + long temp; + + MY_FLOAT temp_time, alpha; + + time += rate; /* Update current time */ + + if (looping) { + while (time >= length) /* Check for end of sound */ + time -= length; /* loop back to beginning */ + while (time < 0.0) /* Check for end of sound */ + time += length; /* loop back to beginning */ + } + else { + if (time >= length) { /* Check for end of sound */ + time = length-1; /* stick at end */ + allDone = 1; /* Information for one-shot use */ + } + else if (time < 0.0) /* Check for end of sound */ + time = 0.0; /* stick at beg */ + } + + temp_time = time; + + if (phaseOffset != 0.0) { + temp_time += phaseOffset; /* Add phase offset */ + if (looping) { + while (temp_time >= length) /* Check for end of sound */ + temp_time -= length; /* loop back to beginning */ + while (temp_time < 0.0) /* Check for end of sound */ + temp_time += length; /* loop back to beginning */ + } + else { + if (temp_time >= length) /* Check for end of sound */ + temp_time = length-1; /* stick at end */ + else if (temp_time < 0.0) /* check for end of sound */ + temp_time = 0.0; /* stick at beg */ + } + } + + temp = (long) temp_time; /* Integer part of time address */ + alpha = temp_time - (MY_FLOAT) temp; /* fractional part of time address */ + lastOutput = data[temp]; /* Do linear interpolation */ + lastOutput = lastOutput + /* same as alpha*data[temp+1] */ + (alpha * (data[temp+1] - + lastOutput)); /* + (1-alpha)data[temp] */ + + return allDone; +} + +MY_FLOAT RawWave :: lastOut() +{ + return lastOutput; +} + +/************ Test Main Program *****************/ +/* + +void main() +{ + RawWave loopWave("rawwaves/sinewave.raw"); + RawWave oneShot("rawwaves/mandpluk.raw"); + FILE *fd; + short data; + long i; + + loopWave.setLooping(1); + loopWave.setFreq(5500); + fd = fopen("test.raw","wb"); + for (i=0;i<4096;i++) { + data = loopWave.tick(); + fwrite(&data,2,1,fd); + } + loopWave.setFreq(2750); + for (i=0;i<4096;i++) { + data = loopWave.tick(); + fwrite(&data,2,1,fd); + } + + oneShot.setLooping(0); + for (i=0;i<8192;i++) { + data = oneShot.tick(); + fwrite(&data,2,1,fd); + } + oneShot.reset(); + oneShot.setRate(0.5); + for (i=0;i<16384;i++) { + data = oneShot.tick(); + fwrite(&data,2,1,fd); + } + fclose(fd); +} +*/ diff --git a/RawWave.h b/RawWave.h new file mode 100644 index 0000000..83cef3d --- /dev/null +++ b/RawWave.h @@ -0,0 +1,48 @@ +/*******************************************/ +/* Raw Soundfile Class, */ +/* by Perry R. Cook, 1995-96 */ +/* This Object can open a raw 16bit data */ +/* (signed integers) file, and play back */ +/* the data once or looping, with linear */ +/* interpolation on playback. */ +/*******************************************/ + +#if !defined(__RawWave_h) +#define __RawWave_h + +#include "Object.h" + +class RawWave : public Object +{ + protected: + int looping; + int myData; + int allDone; + long length; + MY_FLOAT *data; + MY_FLOAT rate; + MY_FLOAT time; + MY_FLOAT phaseOffset; + MY_FLOAT lastOutput; + public: + RawWave(char *fileName); + RawWave(MY_FLOAT *someData,long aLength); + ~RawWave(); + void reset(); + void normalize(); + void normalize(MY_FLOAT newPeak); + void setRate(MY_FLOAT aRate); + void setFreq(MY_FLOAT aFreq); + void addTime(MY_FLOAT aTime); + void addPhase(MY_FLOAT anAngle); + void addPhaseOffset(MY_FLOAT anAngle); + void setLooping(int aLoopStatus); + int isAllDone(); + long getLength(); + MY_FLOAT* getData(); + MY_FLOAT tick(); + int informTick(); + MY_FLOAT lastOut(); +}; + +#endif diff --git a/RawWvIn.cpp b/RawWvIn.cpp new file mode 100644 index 0000000..fa4a36c --- /dev/null +++ b/RawWvIn.cpp @@ -0,0 +1,163 @@ +/*******************************************/ +/* NonInterpolating One-Shot Raw Sound- */ +/* file Class, by Perry R. Cook, 1995-96 */ +/* This Object can open a raw 16bit data */ +/* (signed integers) file, and play back */ +/* the data once, with no interpolation */ +/* on playback. Once finished, it closes */ +/* the file, the file is reopened with */ +/* the reset() method. */ +/* This is useful for small memory model, */ +/* applications, or for streaming from */ +/* disk (and generally non real-time */ +/* applications). */ +/*******************************************/ + +#include "RawWvIn.h" + +RawWvIn :: RawWvIn(char *fileName) +{ + long i; + + strcpy(fileNm,fileName); + + myFile = fopen(fileNm,"rb"); + if (!myFile) { + printf("Couldn't find soundfile %s !!!!!!!!\n",fileName); + exit(0); + } + + i = 0; + while (fread(&data,2,1,myFile)) i++; + length = i; + fseek(myFile,0,0); + time = 0.0; + rate = 1.0; + lastTime = 0; + finished = 0; + gain = 1.0; + lastOutput = 0.0; +} + +RawWvIn :: ~RawWvIn() +{ + this->finish(); +} + +void RawWvIn :: reset() +{ + if (finished) { + myFile = fopen(fileNm,"rb"); + } + fseek(myFile,0,0); + + printf("Resetting\n"); + time = 0.0; + lastTime = 0; + finished = 0; + lastOutput = 0.0; +} + +void RawWvIn :: normalize() +{ + this->normalize(1.0); +} + +void RawWvIn :: normalize(MY_FLOAT newPeak) +{ + long i; + FILE *fd; + + gain = 0.0; + + fd = fopen(fileNm,"rb"); + for (i=0;i gain) + gain = fabs(data); + } + if (gain > 0.0) { + gain = newPeak / gain; + } + fclose(fd); +} + +void RawWvIn :: setRate(MY_FLOAT aRate) +{ + rate = aRate; +} + +void RawWvIn :: finish() +{ + finished = 1; + lastOutput = 0.0; + if (myFile) { + fclose(myFile); + myFile = 0; + } +} + +MY_FLOAT RawWvIn :: tick() +{ + this->informTick(); + return lastOutput; +} + +int RawWvIn :: informTick() +{ + long temp; + + if (!finished) { + + time += rate; /* Update current time */ + + if (time >= length) { /* Check for end of sound */ + time = length - 1; /* stick at end */ + finished = 1; /* Information for one-shot use */ + fclose(myFile); + myFile = 0; + } + else { + temp = (long) time; /* Integer part of time address */ + if (temp > lastTime) { /* If we cross next sample time */ + lastTime = temp; + fread(&data,2,1,myFile); /* Snarf next sample from file */ + lastOutput = data * gain; /* And save as non-interpolated data */ + } + } + } + + return finished; +} + +MY_FLOAT RawWvIn :: lastOut() +{ + return lastOutput; +} + +/************ Test Main Program *****************/ +/* +void main() +{ + RawWvIn oneShot("rawwaves/mandpluk.raw"); + FILE *fd; + short data; + long i; + + fd = fopen("test.raw","wb"); + oneShot.setRate(1.0); + while (!oneShot.informTick()) { + data = oneShot.lastOut(); + fwrite(&data,2,1,fd); + } + + oneShot.reset(); + oneShot.setRate(0.5); + for (i=0;i<16384;i++) { + data = oneShot.tick(); + fwrite(&data,2,1,fd); + } + fclose(fd); +} +*/ + diff --git a/RawWvIn.h b/RawWvIn.h new file mode 100644 index 0000000..49c59cd --- /dev/null +++ b/RawWvIn.h @@ -0,0 +1,47 @@ +/*******************************************/ +/* NonInterpolating One-Shot Raw Sound- */ +/* file Class, by Perry R. Cook, 1995-96 */ +/* This Object can open a raw 16bit data */ +/* (signed integers) file, and play back */ +/* the data once, with no interpolation */ +/* on playback. Once finished, it closes */ +/* the file, the file is reopened with */ +/* the reset() method. */ +/* This is useful for small memory model, */ +/* applications, or for streaming from */ +/* disk (and generally non real-time */ +/* applications). */ +/*******************************************/ + +#if !defined(__RawWvIn_h) +#define __RawWvIn_h + +#include "Object.h" + +class RawWvIn : public Object +{ + protected: + long length; + long lastTime; + int finished; + short data; + char fileNm[128]; + FILE *myFile; + MY_FLOAT rate; + MY_FLOAT time; + MY_FLOAT gain; + MY_FLOAT lastOutput; + public: + RawWvIn(char *fileName); + ~RawWvIn(); + void reset(); + void normalize(); + void normalize(MY_FLOAT newPeak); + void setRate(MY_FLOAT aRate); + void finish(); + MY_FLOAT tick(); + int informTick(); + MY_FLOAT lastOut(); +}; + +#endif diff --git a/RawWvOut.cpp b/RawWvOut.cpp new file mode 100644 index 0000000..3cf49e9 --- /dev/null +++ b/RawWvOut.cpp @@ -0,0 +1,115 @@ +/*******************************************/ +/* Raw Wave File Output Class, */ +/* by Perry R. Cook, 1995-96 */ +/* This version opens a mono NeXT .snd */ +/* file 16bit data at 22KHz, and */ +/* pokes buffers of samples into it. */ +/*******************************************/ + +#include "RawWvOut.h" + +#if !defined(__SGI_REALTIME) + +/******** NeXT Soundfile Header Struct *******/ +struct headerform { + char pref[4]; + long hdr_length; + long file_length; + long mode; + long samp_rate; + long num_channels; + char comment[1024]; +}; + +RawWvOut :: RawWvOut(char *fileName) +{ + struct headerform hdr = {".sn",28,0,3,(long) SRATE,1,"TK"}; + hdr.pref[3] = 'd'; + + fd = fopen(fileName,"wb"); + if (!fd) { + printf("Couldn't create soundfile %s !!!!!!!!\n",fileName); + exit(0); + } + fwrite(&hdr,4,7,fd); + counter = 0; + totalCount = 0; +} + +RawWvOut :: ~RawWvOut() +{ + MY_FLOAT temp; + fwrite(data,2,counter,fd); + fseek(fd,8,SEEK_SET); + fwrite(&totalCount,4,1,fd); + fclose(fd); + temp = (double) totalCount * ONE_OVER_SRATE; + printf("%f Seconds Computed\n",temp); +} + +long RawWvOut :: getCounter() +{ + return totalCount; +} + +void RawWvOut :: tick(MY_FLOAT sample) +{ + + data[counter++] = (short) (sample * 32000.0); + totalCount += 1; + if (counter == BUFFER_SIZE) { + fwrite(data,2,BUFFER_SIZE,fd); + counter = 0; + } +} + +#else + + +/*******************************************/ +/* SGI Real-Time Wave File Output Class, */ +/* by Perry R. Cook, 1996 */ +/* This Object can opens the SGI soundout */ +/* device, and pokes buffers of samples */ +/* into it. The real code that does the */ +/* is from Doug Scott of SGI. */ +/*******************************************/ + +#include "sgio.C" + +RawWvOut :: RawWvOut(char *fileName) +{ + int fd; + + fd = init_sound(SRATE,1); + if (fd<0) { + printf("Couldn't open SoundOut Device !!!!!!!!\n"); + exit(0); + } + counter = 0; +} + +RawWvOut :: ~RawWvOut() +{ + playbuf(data,counter); + counter = 0; + while (counter 1.0) lastOutput = 1.0; /* if other way, reed slams shut */ + if (lastOutput < -1.0) lastOutput = -1.0; /* if all the way open, acts like open end */ + return lastOutput; +} + +MY_FLOAT ReedTabl :: lastOut() +{ + return lastOutput; +} + diff --git a/ReedTabl.h b/ReedTabl.h new file mode 100644 index 0000000..484cda2 --- /dev/null +++ b/ReedTabl.h @@ -0,0 +1,24 @@ +/**********************************************/ +/* One break point linear reed table object */ +/* by Perry R. Cook, 1995-96 */ +/* Consult McIntyre, Schumacher, & Woodhouse */ +/* Smith, Hirschman, Cook, Scavone, */ +/* more for information. */ +/**********************************************/ + +#include "Object.h" + +class ReedTabl : public Object +{ + protected: + MY_FLOAT offSet; + MY_FLOAT slope; + MY_FLOAT lastOutput; + public: + ReedTabl(); + ~ReedTabl(); + void setOffset(double aValue); + void setSlope(double aValue); + MY_FLOAT lookup(double deltaP); + MY_FLOAT lastOut(); +}; diff --git a/Reverb.cpp b/Reverb.cpp new file mode 100644 index 0000000..0f25713 --- /dev/null +++ b/Reverb.cpp @@ -0,0 +1,187 @@ +/******************************************/ +/* Reverb Effect Applied to Soundfile */ +/* by Perry Cook, 1996 */ +/* */ +/* This is based on some of the famous */ +/* Stanford CCRMA reverbs (NRev, KipRev) */ +/* all based on the the Chowning/Moorer/ */ +/* Schroeder reverberators, which use */ +/* networks of simple allpass and comb */ +/* delay filters. */ +/******************************************/ + +#include "Reverb.h" + +Reverb :: Reverb(MY_FLOAT longestDelay) +{ + delayLine[0] = new DLineN((long) (longestDelay * 0.164631) + 2); + delayLine[1] = new DLineN((long) (longestDelay * 0.513434) + 2); + delayLine[2] = new DLineN((long) (longestDelay * 1.000000) + 2); + delayLine[3] = new DLineN((long) (longestDelay * 0.830484) + 2); + delayLine[0]->setDelay((long) (longestDelay * 0.164631)); + delayLine[1]->setDelay((long) (longestDelay * 0.513434)); + delayLine[2]->setDelay((long) (longestDelay * 1.000000)); + delayLine[3]->setDelay((long) (longestDelay * 0.830484)); + allPassCoeff = 0.7; + combCoeff1 = 0.62; + combCoeff2 = -0.71; + effectMix = 0.5; + this->clear(); +} + +Reverb :: ~Reverb() +{ + delete delayLine[0]; + delete delayLine[1]; + delete delayLine[2]; + delete delayLine[3]; +} + +void Reverb :: clear() +{ + delayLine[0]->clear(); + delayLine[1]->clear(); + delayLine[2]->clear(); + delayLine[3]->clear(); + lastOutL = 0.0; + lastOutR = 0.0; +} + +void Reverb :: setEffectMix(MY_FLOAT mix) +{ + effectMix = mix; +} + +MY_FLOAT Reverb :: lastOutput() +{ + return (lastOutL + lastOutR) * 0.5; +} + +MY_FLOAT Reverb :: lastOutputL() +{ + return lastOutL; +} + +MY_FLOAT Reverb :: lastOutputR() +{ + return lastOutR; +} + +MY_FLOAT Reverb :: tick(MY_FLOAT input) +{ + MY_FLOAT temp,temp0,temp1,temp2,temp3; + + temp = delayLine[0]->lastOut(); + temp0 = allPassCoeff * temp; + temp0 += input; + delayLine[0]->tick(temp0); + temp0 = -(allPassCoeff * temp0) + temp; + + temp = delayLine[1]->lastOut(); + temp1 = allPassCoeff * temp; + temp1 += temp0; + delayLine[1]->tick(temp1); + temp1 = -(allPassCoeff * temp1) + temp; + + temp2 = temp1 + (combCoeff1 * delayLine[2]->lastOut()); + temp3 = temp1 + (combCoeff2 * delayLine[3]->lastOut()); + + lastOutL = effectMix * (delayLine[2]->tick(temp2)); + lastOutR = effectMix * (delayLine[3]->tick(temp3)); + temp = (1.0 - effectMix) * input; + lastOutL += temp; + lastOutR += temp; + + return (lastOutL + lastOutR) * 0.5; + +} + +/************** Test Main Program *********************/ + + +struct headerform { /*** NeXT Soundfile Header Struct ***/ + char pref[4]; + long hdr_length; + long file_length; + long mode; + long samp_rate; + long num_channels; + char comment[1024]; +}; + +/* +int main(int argc, char *argv[]) +{ + FILE *soundIn,*soundOut; + long i,dLength; + short data[2]; + MY_FLOAT temp,efMix; + Reverb *effect; + struct headerform hdr = {".sn",28,0,3,(long) SRATE,1,"TK"}; + hdr.pref[3] = 'd'; + + if (argc==5) { + soundIn = fopen(argv[3],"rb"); + soundOut = fopen(argv[4],"wb"); + if (soundIn && soundOut) { + dLength = atoi(argv[2]); + efMix = atof(argv[1]); + fread(&hdr,4,2,soundIn); + fread(&hdr.file_length,hdr.hdr_length,1,soundIn); + hdr.file_length += 4 * (2 * dLength * hdr.num_channels); + if (hdr.mode != 3) { + fclose(soundIn); + fclose(soundOut); + printf("Only 16 bit linear data supported in this demo"); + exit(0); + } + fwrite(&hdr,1,hdr.hdr_length,soundOut); + effect = new Reverb(dLength); + effect->setEffectMix(1.0); + for (i=0;itick(temp); + data[0] = (short) (temp + (data[0] * (1.0 - efMix))); + data[1] = (short) (temp + (data[1] * (1.0 - efMix))); + } + else { + temp = effect->tick(0); + data[0] = (short) temp; + data[1] = (short) temp; + } + fwrite(data,2,2,soundOut); + i++; + } + else { + if (fread(data,2,1,soundIn)) { + temp = data[0] * efMix; + temp = effect->tick(temp); + data[0] = (short) (temp + (data[0] * (1.0 - efMix))); + } + else { + temp = effect->tick(0); + data[0] = (short) temp; + } + fwrite(data,2,1,soundOut); + } + } + delete effect; + fclose(soundIn); + fclose(soundOut); + } + else { + printf("Can't open one of the files\n"); + } + } + else { + printf("useage: Reverb mix maxDelay soundIn.snd soundOut.snd\n"); + printf("0.0 <= mix <= 1.0\n"); + printf("maxDelay is in samples\n"); + printf("soundfiles are 16 bit linear mono or stereo\n"); + } +} + +*/ diff --git a/Reverb.h b/Reverb.h new file mode 100644 index 0000000..a96cfa5 --- /dev/null +++ b/Reverb.h @@ -0,0 +1,41 @@ +/******************************************/ +/* Reverb Effect Applied to Soundfile */ +/* by Perry Cook, 1996 */ +/* */ +/* This is based on some of the famous */ +/* Stanford CCRMA reverbs (NRev, KipRev) */ +/* all based on the the Chowning/Moorer/ */ +/* Schroeder reverberators, which use */ +/* networks of simple allpass and comb */ +/* delay filters. */ +/******************************************/ + +#if !defined(__Reverb_h) +#define __Reverb_h + +#include "Object.h" +#include "DLineN.h" + +class Reverb : public Object +{ + protected: + DLineN *delayLine[4]; + MY_FLOAT allPassCoeff; + MY_FLOAT combCoeff1; + MY_FLOAT combCoeff2; + MY_FLOAT lastOutL; + MY_FLOAT lastOutR; + MY_FLOAT effectMix; + public: + Reverb(MY_FLOAT longestDelay); + ~Reverb(); + void clear(); + void setEffectMix(MY_FLOAT mix); + MY_FLOAT lastOutput(); + MY_FLOAT lastOutputL(); + MY_FLOAT lastOutputR(); + MY_FLOAT tick(MY_FLOAT input); +}; + +#endif + diff --git a/Rhodey.cpp b/Rhodey.cpp new file mode 100644 index 0000000..32d6acd --- /dev/null +++ b/Rhodey.cpp @@ -0,0 +1,57 @@ +/******************************************/ +/* Fender Rhodes Electric Piano Subclass */ +/* of Algorithm 5 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/******************************************/ + +#include "Rhodey.h" + +Rhodey :: Rhodey() : FM4Alg5() +{ + this->loadWaves("rawwaves/sinewave.raw", + "rawwaves/sinewave.raw", + "rawwaves/sinewave.raw", + "rawwaves/fwavblnk.raw"); + this->setRatio(0,1.0); + this->setRatio(1,0.5); + this->setRatio(2,1.0); + this->setRatio(3,15.0); + gains[0] = __FM4Op_gains[99]; + gains[1] = __FM4Op_gains[90]; + gains[2] = __FM4Op_gains[99]; + gains[3] = __FM4Op_gains[67]; + adsr[0]->setAll(0.05,0.00003,0.0,0.02); + adsr[1]->setAll(0.05,0.00003,0.0,0.02); + adsr[2]->setAll(0.05,0.00005,0.0,0.02); + adsr[3]->setAll(0.05,0.0002,0.0,0.02); + twozero->setGain(1.0); +} + +Rhodey :: ~Rhodey() +{ + +} + +void Rhodey :: setFreq(MY_FLOAT frequency) +{ + baseFreq = frequency * 2.0; + waves[0]->setFreq(baseFreq * ratios[0]); + waves[1]->setFreq(baseFreq * ratios[1]); + waves[2]->setFreq(baseFreq * ratios[2]); + waves[3]->setFreq(baseFreq * ratios[3]); +} + +void Rhodey :: noteOn(MY_FLOAT freq, MY_FLOAT amp) +{ + gains[0] = amp * __FM4Op_gains[99]; + gains[1] = amp * __FM4Op_gains[90]; + gains[2] = amp * __FM4Op_gains[99]; + gains[3] = amp * __FM4Op_gains[67]; + this->setFreq(freq); + this->keyOn(); +#if defined(_debug_) + printf("Rhodey : NoteOn: Freq=%lf Amp=%lf\n",freq,amp); +#endif +} + diff --git a/Rhodey.h b/Rhodey.h new file mode 100644 index 0000000..56a9a7e --- /dev/null +++ b/Rhodey.h @@ -0,0 +1,22 @@ +/******************************************/ +/* Fender Rhodes Electric Piano Subclass */ +/* of Algorithm 5 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/******************************************/ + +#if !defined(__Rhodey_h) +#define __Rhodey_h + +#include "FM4Alg5.h" + +class Rhodey : public FM4Alg5 +{ + public: + Rhodey(); + ~Rhodey(); + virtual void setFreq(MY_FLOAT frequency); + virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp); +}; + +#endif diff --git a/SamplFlt.cpp b/SamplFlt.cpp new file mode 100644 index 0000000..4704001 --- /dev/null +++ b/SamplFlt.cpp @@ -0,0 +1,48 @@ +/*******************************************/ +/* Swept Filter SubClass of Sampling */ +/* Synthesizer, by Perry R. Cook, 1995-96*/ +/* This instrument inherits up to 5 */ +/* attack waves, 5 looped waves, an ADSR */ +/* envelope, and adds a 4 pole swept */ +/* filter. */ +/*******************************************/ + +#include "SamplFlt.h" + +SamplFlt :: SamplFlt() : Sampler() +{ + MY_FLOAT tempCoeffs[2] = {0.0,-1.0}; + twozeroes[0] = new TwoZero; + twozeroes[0]->setZeroCoeffs(tempCoeffs); + twozeroes[0]->setGain(1.0); + twozeroes[1] = new TwoZero; + twozeroes[1]->setZeroCoeffs(tempCoeffs); + twozeroes[1]->setGain(1.0); + filters[0] = new FormSwep; + filters[0]->setTargets(0.0,0.7,0.5); + filters[1] = new FormSwep; + filters[1]->setTargets(0.0,0.7,0.5); +} + +SamplFlt :: ~SamplFlt() +{ + delete filters[0]; + delete filters[1]; + delete twozeroes[0]; + delete twozeroes[1]; +} + +MY_FLOAT SamplFlt :: tick() +{ + MY_FLOAT output; + output = Sampler :: tick(); + output = twozeroes[0]->tick(output); + output = filters[0]->tick(output); + output = twozeroes[1]->tick(output); + output = filters[1]->tick(output); + return output; +} + +void SamplFlt :: controlChange(int number, MY_FLOAT value) +{ +} diff --git a/SamplFlt.h b/SamplFlt.h new file mode 100644 index 0000000..fccd355 --- /dev/null +++ b/SamplFlt.h @@ -0,0 +1,29 @@ +/*******************************************/ +/* Swept Filter SubClass of Sampling */ +/* Synthesizer, by Perry R. Cook, 1995-96*/ +/* This instrument inherits up to 5 */ +/* attack waves, 5 looped waves, an ADSR */ +/* envelope, and adds a 4 pole swept */ +/* filter. */ +/*******************************************/ + +#if !defined(__SamplFlt_h) +#define __SamplFlt_h + +#include "Sampler.h" +#include "FormSwep.h" +#include "TwoZero.h" + +class SamplFlt : public Sampler +{ + protected: + FormSwep *filters[2]; + TwoZero *twozeroes[2]; + public: + SamplFlt(); + ~SamplFlt(); + virtual MY_FLOAT tick(); + virtual void controlChange(int number, MY_FLOAT value); +}; + +#endif diff --git a/Sampler.cpp b/Sampler.cpp new file mode 100644 index 0000000..afc1427 --- /dev/null +++ b/Sampler.cpp @@ -0,0 +1,63 @@ +/*******************************************/ +/* Master Class for Sampling Synthesizer */ +/* by Perry R. Cook, 1995-96 */ +/* This instrument contains up to 5 */ +/* attack waves, 5 looped waves, and */ +/* an ADSR envelope. */ +/*******************************************/ + +#include "Sampler.h" + +Sampler :: Sampler() +{ + adsr = new ADSR; + /* We don't make the waves here yet, because */ + /* we don't know what they will be. */ + baseFreq = 440.0; + filter = new OnePole; + attackGain = 0.25; + loopGain = 0.25; + whichOne = 0; +} + +Sampler :: ~Sampler() +{ + delete adsr; + delete filter; +} + +void Sampler :: keyOn() +{ + adsr->keyOn(); + attacks[0]->reset(); +} + +void Sampler :: keyOff() +{ + adsr->keyOff(); +} + +void Sampler :: noteOff(MY_FLOAT amplitude) +{ + this->keyOff(); +#if defined(_debug_) + printf("Sampler : NoteOff: Amp=%lf\n",amplitude); +#endif +} + +void Sampler :: setFreq(MY_FLOAT frequency) +{ +} + +MY_FLOAT Sampler :: tick() +{ + lastOutput = attackGain * attacks[whichOne]->tick(); + lastOutput += loopGain * loops[whichOne]->tick(); + lastOutput = filter->tick(lastOutput); + lastOutput *= adsr->tick(); + return lastOutput; +} + +void Sampler :: controlChange(int number, MY_FLOAT value) +{ +} diff --git a/Sampler.h b/Sampler.h new file mode 100644 index 0000000..f2dd5d6 --- /dev/null +++ b/Sampler.h @@ -0,0 +1,42 @@ +/*******************************************/ +/* Master Class for Sampling Synthesizer */ +/* by Perry R. Cook, 1995-96 */ +/* This instrument contains up to 5 */ +/* attack waves, 5 looped waves, and */ +/* an ADSR envelope. */ +/*******************************************/ + +#if !defined(__Sampler_h) +#define __Sampler_h + +#include "Instrmnt.h" +#include "ADSR.h" +#include "RawWave.h" +#include "OnePole.h" + +class Sampler : public Instrmnt +{ + protected: + ADSR *adsr; + RawWave *attacks[5]; + RawWave *loops[5]; + OnePole *filter; + MY_FLOAT baseFreq; + MY_FLOAT attackRatios[5]; + MY_FLOAT loopRatios[5]; + MY_FLOAT attackGain; + MY_FLOAT loopGain; + int whichOne; + public: + Sampler(); + ~Sampler(); + void clear(); + virtual void setFreq(MY_FLOAT frequency); + void keyOn(); + void keyOff(); + virtual void noteOff(MY_FLOAT amplitude); + virtual MY_FLOAT tick(); + virtual void controlChange(int number, MY_FLOAT value); +}; + +#endif diff --git a/SingWave.cpp b/SingWave.cpp new file mode 100644 index 0000000..5cc6d2a --- /dev/null +++ b/SingWave.cpp @@ -0,0 +1,239 @@ +/*******************************************/ +/* "Singing" Looped Soundfile Class, */ +/* by Perry R. Cook, 1995-96 */ +/* This Object contains all that's needed */ +/* to make a pitched musical sound, like */ +/* a simple voice or violin. In general, */ +/* it will not be used alone (because of */ +/* of munchinification effects from pitch */ +/* shifting. It will be used as an */ +/* excitation source for other instruments*/ +/*******************************************/ + +#include "SingWave.h" + +SingWave :: SingWave(char *fileName) +{ + long i; + short temp; + FILE *fd; + fd = fopen(fileName,"rb"); + if (!fd) { + printf("Couldn't find soundfile %s !!!!!!!!\n",fileName); + } + i = 0; + while (fread(&temp,2,1,fd)) i++; + length = i; + fseek(fd,0,0); + data = (MY_FLOAT *) malloc(MY_FLOAT_SIZE * (length + 1)); + i = 0; + while (fread(&temp,2,1,fd)) { + data[i] = temp; + i++; + } + data[length] = data[length-1]; + fclose(fd); + mytime = 0.0; + rate = 1.0; + sweepRate = 0.001; + modulator = new Modulatr; + modulator->setVibFreq(6.0); + modulator->setVibAmt(0.04); + modulator->setRndAmt(0.005); + envelope = new Envelope; + pitchEnvelope = new Envelope; + this->setFreq(75.0); + pitchEnvelope->setRate(1.0); + this->tick(); + this->tick(); + pitchEnvelope->setRate(sweepRate * rate); +} + +SingWave :: ~SingWave() +{ + delete modulator; + delete envelope; + delete pitchEnvelope; + free(data); +} + +void SingWave :: reset() +{ + mytime = 0.0; + lastOutput = 0.0; +} + +void SingWave :: normalize() +{ + long i; + MY_FLOAT max = 0.0; + for (i=0;i<=length;i++) + if (fabs(data[i]) > max) + max = fabs(data[i]); + if (max > 0.0) { + max = 1.0 / max; + for (i=0;i<=length;i++) + data[i] *= max; + } +} + +void SingWave :: normalize(MY_FLOAT newPeak) +{ + long i; + MY_FLOAT max = 0.0; + for (i=0;i<=length;i++) + if (fabs(data[i]) > max) + max = fabs(data[i]); + if (max > 0.0) { + max = 1.0 / max; + max *= newPeak; + for (i=0;i<=length;i++) + data[i] *= max; + } +} + +void SingWave :: setFreq(MY_FLOAT aFreq) +{ + MY_FLOAT temp; + temp = rate; + rate = length * ONE_OVER_SRATE * aFreq; + temp -= rate; + if (temp<0) temp = -temp; + pitchEnvelope->setTarget(rate); + pitchEnvelope->setRate(sweepRate * temp); +} + +void SingWave :: setVibFreq(MY_FLOAT vibFreq) +{ + modulator->setVibFreq(vibFreq); +} + +void SingWave :: setVibAmt(MY_FLOAT vibAmount) +{ + modulator->setVibAmt(vibAmount); +} + +void SingWave :: setRndAmt(MY_FLOAT rndAmount) +{ + modulator->setRndAmt(rndAmount); +} + +void SingWave :: setSweepRate(MY_FLOAT swpRate) +{ + sweepRate = swpRate; +} + +void SingWave :: setGainRate(MY_FLOAT gainRate) +{ + envelope->setRate(gainRate); +} + +void SingWave :: setGainTarget(MY_FLOAT aTarget) +{ + envelope->setTarget(aTarget); +} + +void SingWave :: noteOn() +{ + envelope->keyOn(); +} + +void SingWave :: noteOff() +{ + envelope->keyOff(); +} + +MY_FLOAT SingWave :: tick() +{ + long temp; + MY_FLOAT alpha, temp_rate; + + temp_rate = pitchEnvelope->tick(); + mytime += temp_rate; /* Update current time */ + mytime += temp_rate * + modulator->tick(); /* Add vibratos */ + + while (mytime >= length) { /* Check for end of sound */ + mytime -= length; /* loop back to beginning */ + } + while (mytime < 0.0) { /* Check for end of sound */ + mytime += length; /* loop back to beginning */ + } + + temp = (long) mytime; /* Integer part of time address */ + alpha = mytime - (MY_FLOAT) temp; /* fractional part of time address*/ + + lastOutput = alpha * data[temp+1]; /* Do linear */ + lastOutput += (1.0 - alpha) * + data[temp]; /* interpolation */ + lastOutput *= envelope->tick(); + + return lastOutput; +} + +MY_FLOAT SingWave :: lastOut() +{ + return lastOutput; +} + +/************ Test Main Program *****************/ +/* +void main() +{ + SingWave ahhWave("rawwaves/ahh.raw"); + SingWave eeeWave("rawwaves/eee.raw"); + SingWave oooWave("rawwaves/ooo.raw"); + FILE *fd; + short data; + long i,j; + + fd = fopen("test.raw","wb"); + + ahhWave.normalize(); + ahhWave.noteOn(); + for (j=0;j<6;j++) { + ahhWave.setFreq(100 * pow(2.0,j*0.25)); + for (i=0;i<10000;i++) { + data = ahhWave.tick() * 32000.0; + fwrite(&data,2,1,fd); + } + } + ahhWave.noteOff(); + for (i=0;i<5000;i++) { + data = ahhWave.tick() * 32000.0; + fwrite(&data,2,1,fd); + } + + eeeWave.normalize(); + eeeWave.noteOn(); + for (j=0;j<6;j++) { + eeeWave.setFreq(100 * pow(2.0,j*0.25)); + for (i=0;i<10000;i++) { + data = eeeWave.tick() * 32000.0; + fwrite(&data,2,1,fd); + } + } + eeeWave.noteOff(); + for (i=0;i<5000;i++) { + data = eeeWave.tick() * 32000.0; + fwrite(&data,2,1,fd); + } + + oooWave.normalize(); + oooWave.noteOn(); + for (j=0;j<6;j++) { + oooWave.setFreq(100 * pow(2.0,j*0.25)); + for (i=0;i<10000;i++) { + data = oooWave.tick() * 32000.0; + fwrite(&data,2,1,fd); + } + } + oooWave.noteOff(); + for (i=0;i<5000;i++) { + data = oooWave.tick() * 32000.0; + fwrite(&data,2,1,fd); + } + + fclose(fd); +} +*/ diff --git a/SingWave.h b/SingWave.h new file mode 100644 index 0000000..7fc3329 --- /dev/null +++ b/SingWave.h @@ -0,0 +1,51 @@ +/*******************************************/ +/* "Singing" Looped Soundfile Class, */ +/* by Perry R. Cook, 1995-96 */ +/* This Object contains all that's needed */ +/* to make a pitched musical sound, like */ +/* a simple voice or violin. In general, */ +/* it will not be used alone (because of */ +/* of munchinification effects from pitch */ +/* shifting. It will be used as an */ +/* excitation source for other instruments*/ +/*******************************************/ + +#if !defined(__SingWave_h) +#define __SingWave_h + +#include "Object.h" +#include "Modulatr.h" +#include "Envelope.h" + +class SingWave : public Object +{ + protected: + Modulatr *modulator; + Envelope *envelope; + Envelope *pitchEnvelope; + long length; + MY_FLOAT *data; + MY_FLOAT rate; + MY_FLOAT sweepRate; + MY_FLOAT mytime; + MY_FLOAT lastOutput; + public: + SingWave(char *fileName); + ~SingWave(); + void reset(); + void normalize(); + void normalize(MY_FLOAT newPeak); + void setFreq(MY_FLOAT aFreq); + void setVibFreq(MY_FLOAT vibFreq); + void setVibAmt(MY_FLOAT vibAmt); + void setRndAmt(MY_FLOAT rndVib); + void setSweepRate(MY_FLOAT swpRate); + void setGainRate(MY_FLOAT gainRate); + void setGainTarget(MY_FLOAT aTarget); + void noteOn(); + void noteOff(); + MY_FLOAT tick(); + MY_FLOAT lastOut(); +}; + +#endif diff --git a/SubNoise.cpp b/SubNoise.cpp new file mode 100644 index 0000000..23dc24c --- /dev/null +++ b/SubNoise.cpp @@ -0,0 +1,52 @@ +/*******************************************/ +/* SubSampled Noise Generator Class, */ +/* by Perry R. Cook, 1995-96 */ +/* White noise as often as you like. */ +/*******************************************/ + +#include "SubNoise.h" + +SubNoise :: SubNoise() : Noise() +{ + lastOutput = 0.0; + howOften = 15; + counter = 15; +} + +SubNoise :: ~SubNoise() +{ + +} + +SubNoise :: SubNoise(int subSample) : Noise() +{ + lastOutput = 0.0; + howOften = subSample-1; + counter = subSample-1; +} + +MY_FLOAT SubNoise :: tick() +{ + if (!counter) { + lastOutput = Noise::tick(); + counter = howOften; + } + else counter -= 1; + return lastOutput; +} + +void SubNoise :: setHowOften(int howOft) +{ + howOften = howOft; +} + +/************ Test Main ************************/ +/* +void main() +{ + long i; + SubNoise test(5); + for (i=0;i<100;i++) printf("%lf\n",test.tick()); +} +*/ + diff --git a/SubNoise.h b/SubNoise.h new file mode 100644 index 0000000..6d20f8b --- /dev/null +++ b/SubNoise.h @@ -0,0 +1,25 @@ +/*******************************************/ +/* SubSampled Noise Generator Class, */ +/* by Perry R. Cook, 1995-96 */ +/* White noise as often as you like. */ +/*******************************************/ + +#if !defined(__SubNoise_h) +#define __SubNoise_h + +#include "Noise.h" + +class SubNoise : public Noise +{ + protected: + int counter; + int howOften; + public: + SubNoise(); + ~SubNoise(); + SubNoise(int subSample); + void setHowOften(int howOft); + MY_FLOAT tick(); +}; + +#endif diff --git a/TCLSpecs/GUIPhysical b/TCLSpecs/GUIPhysical new file mode 100755 index 0000000..18e408a --- /dev/null +++ b/TCLSpecs/GUIPhysical @@ -0,0 +1,2 @@ +cd .. +wish < TCLSpecs/TCLPhys.tcl | testTextIn Clarinet diff --git a/TCLSpecs/GUIPlukStruk b/TCLSpecs/GUIPlukStruk new file mode 100755 index 0000000..d1b6bef --- /dev/null +++ b/TCLSpecs/GUIPlukStruk @@ -0,0 +1,2 @@ +cd .. +wish < TCLSpecs/TCLStruk.tcl | testTextIn Mandolin diff --git a/TCLSpecs/GUIVoice b/TCLSpecs/GUIVoice new file mode 100755 index 0000000..3952696 --- /dev/null +++ b/TCLSpecs/GUIVoice @@ -0,0 +1,2 @@ +cd .. +wish < TCLSpecs/TCLVoice.tcl | testTextIn FMVoices diff --git a/TCLSpecs/MIDIPhysical b/TCLSpecs/MIDIPhysical new file mode 100755 index 0000000..ff186fe --- /dev/null +++ b/TCLSpecs/MIDIPhysical @@ -0,0 +1,2 @@ +cd .. +testMIDI | testTextIn Clarinet diff --git a/TCLSpecs/MIDIPlukStruk b/TCLSpecs/MIDIPlukStruk new file mode 100755 index 0000000..a38440c --- /dev/null +++ b/TCLSpecs/MIDIPlukStruk @@ -0,0 +1,2 @@ +cd .. +testMIDI | testTextIn Mandolin diff --git a/TCLSpecs/MIDIVoice b/TCLSpecs/MIDIVoice new file mode 100755 index 0000000..9f7b20a --- /dev/null +++ b/TCLSpecs/MIDIVoice @@ -0,0 +1,2 @@ +cd .. +testMIDI | testTextIn FMVoices diff --git a/TCLSpecs/TCLPhys.tcl b/TCLSpecs/TCLPhys.tcl new file mode 100644 index 0000000..bcd8b34 --- /dev/null +++ b/TCLSpecs/TCLPhys.tcl @@ -0,0 +1,136 @@ +set pitch 64.0 +set press 64.0 + +button .pretty -bitmap @TCLSpecs/bitmaps/prcFunny.xbm \ +-background white -foreground black +.pretty config -bitmap @TCLSpecs/bitmaps/prc.xbm + +proc myExit {} { + puts stdout [format "ExitProgram"] + flush stdout + exit +} + +proc noteOn {pitchVal pressVal} { + puts stdout [format "NoteOn 0.0 1 %f %f" $pitchVal $pressVal] + flush stdout +} + +proc noteOff {pitchVal pressVal} { + puts stdout [format "NoteOff 0.0 1 %f %f" $pitchVal $pressVal] + flush stdout +} + +proc patchChange {value} { + global .pretty + puts stdout [format "ProgramChange 0.0 1 %i" $value] + if {$value==0} { + .pretty config -bitmap @TCLSpecs/bitmaps/Klar.xbm + } + if {$value==1} { + .pretty config -bitmap @TCLSpecs/bitmaps/KFloot.xbm + } + if {$value==2} { + .pretty config -bitmap @TCLSpecs/bitmaps/KHose.xbm + } + if {$value==3} { + .pretty config -bitmap @TCLSpecs/bitmaps/KFiddl.xbm + } + flush stdout +} + +proc printWhatz {tag value1 value2 } { + puts stdout [format "%s %i %f" $tag $value1 $value2] + flush stdout +} + +proc changePress {value} { + global press + set press $value + puts stdout [format "AfterTouch 0.0 1 %f" $press] + flush stdout +} + +proc changePitch {value} { + global pitch + set pitch $value + puts stdout [format "PitchBend 0.0 1 %f" $pitch] + flush stdout +} + +scale .bPressure -from 0 -to 128 -length 200 \ +-command {changePress } \ +-activeforeground white -sliderforeground grey80\ +-orient horizontal -label "Breath Pressure" \ +-tickinterval 32 -showvalue true -bg grey66 + +scale .pitch -from 0 -to 128 -length 200 \ +-command {changePitch } \ +-activeforeground white -sliderforeground grey80\ +-orient horizontal -label "MIDI Note Number" \ +-tickinterval 32 -showvalue true -bg grey66 + +scale .cont1 -from 0 -to 128 -length 200 \ +-command {printWhatz "ControlChange 0.0 1 " 2} \ +-activeforeground white -sliderforeground grey80\ +-orient horizontal -label "Reed, Emb., Lip., Bow Pres." \ +-tickinterval 32 -showvalue true -bg grey66 + +scale .cont2 -from 0 -to 128 -length 200 \ +-command {printWhatz "ControlChange 0.0 1 " 4} \ +-activeforeground white -sliderforeground grey80\ +-orient horizontal -label "Noise Amt., Slide Length,Bow Pos." \ +-tickinterval 32 -showvalue true -bg grey66 + +scale .cont3 -from 0 -to 128 -length 200 \ +-command {printWhatz "ControlChange 0.0 1 " 11} \ +-activeforeground white -sliderforeground grey80\ +-orient horizontal -label "Vibrato Rate" \ +-tickinterval 32 -showvalue true -bg grey66 + +scale .vibrato -from 0 -to 128 -length 200 \ +-command {printWhatz "ControlChange 0.0 1 " 1} \ +-activeforeground white -sliderforeground grey80\ +-orient horizontal -label "Vibrato Amount" \ +-tickinterval 32 -showvalue true -bg grey66 + +. config -bg grey20 + +frame .instChoice -bg black + +radiobutton .instChoice.clar -text Clarinet -bg grey66 \ +-command { patchChange 0 } +radiobutton .instChoice.flut -text Flute -bg grey66 \ +-command { patchChange 1 } +radiobutton .instChoice.bras -text Brass -bg grey66 \ +-command { patchChange 2 } +radiobutton .instChoice.bowd -text Bowed -bg grey66 \ +-command { patchChange 3 } + +pack .instChoice.clar -side left -padx 5 +pack .instChoice.flut -side left -padx 5 +pack .instChoice.bras -side left -padx 5 +pack .instChoice.bowd -side left -padx 5 -pady 10 + +pack .instChoice + +pack .pretty -padx 5 -pady 10 + +pack .bPressure -padx 10 -pady 10 +pack .pitch -padx 10 -pady 10 +pack .vibrato -padx 10 -pady 10 +pack .cont1 -padx 10 -pady 10 +pack .cont2 -padx 10 -pady 10 +pack .cont3 -padx 10 -pady 10 + +frame .noteOn -bg black + +button .noteOn.on -text NoteOn -bg grey66 -command { noteOn $pitch $press } +button .noteOn.off -text NoteOff -bg grey66 -command { noteOff $pitch 127.0 } +button .noteOn.exit -text "Exit Program" -bg grey66 -command myExit +pack .noteOn.on -side left -padx 5 +pack .noteOn.off -side left -padx 5 -pady 10 +pack .noteOn.exit -side left -padx 5 -pady 10 + +pack .noteOn + diff --git a/TCLSpecs/TCLStruk.tcl b/TCLSpecs/TCLStruk.tcl new file mode 100644 index 0000000..be84cdd --- /dev/null +++ b/TCLSpecs/TCLStruk.tcl @@ -0,0 +1,159 @@ +set pitch 64.0 +set press 64.0 + +button .pretty -bitmap @TCLSpecs/bitmaps/prcFunny.xbm \ +-background white -foreground black +.pretty config -bitmap @TCLSpecs/bitmaps/prc.xbm + +proc myExit {} { + puts stdout [format "ExitProgram"] + flush stdout + exit +} + +proc noteOn {pitchVal pressVal} { + puts stdout [format "NoteOn 0.0 1 %f %f" $pitchVal $pressVal] + flush stdout +} + +proc noteOff {pitchVal pressVal} { + puts stdout [format "NoteOff 0.0 1 %f %f" $pitchVal $pressVal] + flush stdout +} + +proc patchChange {value} { + global .pretty + puts stdout [format "ProgramChange 0.0 1 %i" $value] + if {$value==4} { + .pretty config -bitmap @TCLSpecs/bitmaps/KPluk.xbm + } + if {$value==5} { + .pretty config -bitmap @TCLSpecs/bitmaps/KModal.xbm + } + if {$value==6} { + .pretty config -bitmap @TCLSpecs/bitmaps/KModal.xbm + } + if {$value==7} { + .pretty config -bitmap @TCLSpecs/bitmaps/KModal.xbm + } + if {$value==8} { + .pretty config -bitmap @TCLSpecs/bitmaps/KFMod.xbm + } + if {$value==9} { + .pretty config -bitmap @TCLSpecs/bitmaps/KFMod.xbm + } + if {$value==10} { + .pretty config -bitmap @TCLSpecs/bitmaps/KFMod.xbm + } + flush stdout +} + +proc printWhatz {tag value1 value2 } { + puts stdout [format "%s %i %f" $tag $value1 $value2] + flush stdout +} + +proc changePress {value} { + global press + set press $value + puts stdout [format "AfterTouch 0.0 1 %f" $press] + flush stdout +} + +proc changePitch {value} { + global pitch + set pitch $value + puts stdout [format "PitchBend 0.0 1 %f" $pitch] + flush stdout +} + +scale .bPressure -from 0 -to 128 -length 200 \ +-command {changePress } \ +-activeforeground white -sliderforeground grey80\ +-orient horizontal -label "Breath Pressure" \ +-tickinterval 32 -showvalue true -bg grey66 + +scale .pitch -from 0 -to 128 -length 200 \ +-command {changePitch } \ +-activeforeground white -sliderforeground grey80\ +-orient horizontal -label "MIDI Note Number" \ +-tickinterval 32 -showvalue true -bg grey66 + +scale .cont1 -from 0 -to 128 -length 200 \ +-command {printWhatz "ControlChange 0.0 1 " 2} \ +-activeforeground white -sliderforeground grey80\ +-orient horizontal -label "Stick/Pick Hardness" \ +-tickinterval 32 -showvalue true -bg grey66 + +scale .cont2 -from 0 -to 128 -length 200 \ +-command {printWhatz "ControlChange 0.0 1 " 4} \ +-activeforeground white -sliderforeground grey80\ +-orient horizontal -label "Strike/Pick Position" \ +-tickinterval 32 -showvalue true -bg grey66 + +scale .cont3 -from 0 -to 128 -length 200 \ +-command {printWhatz "ControlChange 0.0 1 " 11} \ +-activeforeground white -sliderforeground grey80\ +-orient horizontal -label "Vibrato Rate" \ +-tickinterval 32 -showvalue true -bg grey66 + +scale .vibrato -from 0 -to 128 -length 200 \ +-command {printWhatz "ControlChange 0.0 1 " 1} \ +-activeforeground white -sliderforeground grey80\ +-orient horizontal -label "Vibrato Amount" \ +-tickinterval 32 -showvalue true -bg grey66 + +. config -bg grey20 + +frame .modal -bg black +frame .fm -bg black + +radiobutton .mand -text Mandolin -bg grey66 \ +-command { patchChange 4 } +radiobutton .modal.mari -text Marimba -bg grey66 \ +-command { patchChange 5 } +radiobutton .modal.vibr -text Vibraphn -bg grey66 \ +-command { patchChange 6 } +radiobutton .modal.agog -text AgogoBel -bg grey66 \ +-command { patchChange 7 } +radiobutton .fm.rhod -text Rhodey -bg grey66 \ +-command { patchChange 8 } +radiobutton .fm.wurl -text Wurley -bg grey66 \ +-command { patchChange 9 } +radiobutton .fm.tube -text TubeBell -bg grey66 \ +-command { patchChange 10 } + +pack .mand -padx 5 -pady 10 +pack .modal.mari -side left -padx 5 +pack .modal.vibr -side left -padx 5 +pack .modal.agog -side left -padx 5 -pady 10 +pack .modal +pack .fm.rhod -side left -padx 5 +pack .fm.wurl -side left -padx 5 +pack .fm.tube -side left -padx 5 -pady 10 +pack .fm + +pack .pretty -padx 5 -pady 10 + +pack .bPressure -padx 10 -pady 10 +pack .pitch -padx 10 -pady 10 +pack .vibrato -padx 10 -pady 10 +pack .cont1 -padx 10 -pady 10 +pack .cont2 -padx 10 -pady 10 +pack .cont3 -padx 10 -pady 10 + +frame .noteOn -bg black + +button .noteOn.on -text NoteOn -bg grey66 -command { noteOn $pitch $press } +button .noteOn.off -text NoteOff -bg grey66 -command { noteOff $pitch 127.0 } +button .noteOn.exit -text "Exit Program" -bg grey66 -command myExit +pack .noteOn.on -side left -padx 5 +pack .noteOn.off -side left -padx 5 -pady 10 +pack .noteOn.exit -side left -padx 5 -pady 10 + +bind all { + noteOn $pitch $press +} + +pack .noteOn + diff --git a/TCLSpecs/TCLVoice.tcl b/TCLSpecs/TCLVoice.tcl new file mode 100644 index 0000000..3196efc --- /dev/null +++ b/TCLSpecs/TCLVoice.tcl @@ -0,0 +1,124 @@ +set pitch 64.0 +set press 64.0 + +button .pretty -bitmap @TCLSpecs/bitmaps/prcFunny.xbm \ +-background white -foreground black +.pretty config -bitmap @TCLSpecs/bitmaps/prc.xbm + +proc myExit {} { + puts stdout [format "ExitProgram"] + flush stdout + exit +} + +proc noteOn {pitchVal pressVal} { + puts stdout [format "NoteOn 0.0 1 %f %f" $pitchVal $pressVal] + flush stdout +} + +proc noteOff {pitchVal pressVal} { + puts stdout [format "NoteOff 0.0 1 %f %f" $pitchVal $pressVal] + flush stdout +} + +proc patchChange {value} { + global .pretty + puts stdout [format "ProgramChange 0.0 1 %i" $value] + if {$value==11} { + .pretty config -bitmap @TCLSpecs/bitmaps/KVoiceFM.xbm + } + if {$value==12} { + .pretty config -bitmap @TCLSpecs/bitmaps/KVoicForm.xbm + } + flush stdout +} + +proc printWhatz {tag value1 value2 } { + puts stdout [format "%s %i %f" $tag $value1 $value2] + flush stdout +} + +proc changePress {value} { + global press + set press $value + puts stdout [format "AfterTouch 0.0 1 %f" $press] + flush stdout +} + +proc changePitch {value} { + global pitch + set pitch $value + puts stdout [format "PitchBend 0.0 1 %f" $pitch] + flush stdout +} + +scale .bPressure -from 0 -to 128 -length 200 \ +-command {changePress } \ +-activeforeground white -sliderforeground grey80\ +-orient horizontal -label "Loudness (Spectral Tilt)" \ +-tickinterval 32 -showvalue true -bg grey66 + +scale .pitch -from 0 -to 128 -length 200 \ +-command {changePitch } \ +-activeforeground white -sliderforeground grey80\ +-orient horizontal -label "MIDI Note Number" \ +-tickinterval 32 -showvalue true -bg grey66 + +scale .cont1 -from 0 -to 128 -length 200 \ +-command {printWhatz "ControlChange 0.0 1 " 2} \ +-activeforeground white -sliderforeground grey80\ +-orient horizontal -label "Formant Q / Voiced/Un." \ +-tickinterval 32 -showvalue true -bg grey66 + +scale .cont2 -from 0 -to 128 -length 200 \ +-command {printWhatz "ControlChange 0.0 1 " 4} \ +-activeforeground white -sliderforeground grey80\ +-orient horizontal -label "Vowel (Bass, Tenor, Alto, Sop.)" \ +-tickinterval 32 -showvalue true -bg grey66 + +scale .cont3 -from 0 -to 128 -length 200 \ +-command {printWhatz "ControlChange 0.0 1 " 11} \ +-activeforeground white -sliderforeground grey80\ +-orient horizontal -label "Vibrato Rate" \ +-tickinterval 32 -showvalue true -bg grey66 + +scale .vibrato -from 0 -to 128 -length 200 \ +-command {printWhatz "ControlChange 0.0 1 " 1} \ +-activeforeground white -sliderforeground grey80\ +-orient horizontal -label "Vibrato Amount" \ +-tickinterval 32 -showvalue true -bg grey66 + +. config -bg grey20 + +frame .instChoice -bg black + +radiobutton .instChoice.fm -text FMVoice -bg grey66 \ +-command { patchChange 11 } +radiobutton .instChoice.form -text Formant -bg grey66 \ +-command { patchChange 12 } + +pack .instChoice.fm -side left -padx 5 +pack .instChoice.form -side left -padx 5 -pady 10 + +pack .instChoice + +pack .pretty -padx 5 -pady 10 + +pack .bPressure -padx 10 -pady 10 +pack .pitch -padx 10 -pady 10 +pack .vibrato -padx 10 -pady 10 +pack .cont1 -padx 10 -pady 10 +pack .cont2 -padx 10 -pady 10 +pack .cont3 -padx 10 -pady 10 + +frame .noteOn -bg black + +button .noteOn.on -text NoteOn -bg grey66 -command { noteOn $pitch $press } +button .noteOn.off -text NoteOff -bg grey66 -command { noteOff $pitch 127.0 } +button .noteOn.exit -text "Exit Program" -bg grey66 -command myExit +pack .noteOn.on -side left -padx 5 +pack .noteOn.off -side left -padx 5 -pady 10 +pack .noteOn.exit -side left -padx 5 -pady 10 + +pack .noteOn + diff --git a/TCLSpecs/bitmaps/KASM.xbm b/TCLSpecs/bitmaps/KASM.xbm new file mode 100644 index 0000000..f562852 --- /dev/null +++ b/TCLSpecs/bitmaps/KASM.xbm @@ -0,0 +1,117 @@ +#define KASM_width 220 +#define KASM_height 61 +static char KASM_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xfe,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7,0x02,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf4,0xfa,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xf5,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf5,0x5a,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0xf5,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf5,0xea,0xff,0xff,0xff,0xff,0xff,0xbf,0xaa,0xaa,0xaa,0xfa,0xed,0xff,0xef, + 0xbf,0x7f,0x55,0xab,0xea,0x6f,0xff,0xaa,0x7f,0x55,0x55,0x55,0x55,0xf5,0xca, + 0xaa,0xaa,0xfa,0xea,0xbd,0x6a,0x00,0x00,0x00,0xbc,0xcf,0x7d,0x8f,0x2f,0xbe, + 0x00,0x03,0x70,0x3d,0x7c,0x80,0x1f,0x00,0x00,0x00,0x00,0xf5,0x5a,0x00,0x00, + 0x06,0x10,0x36,0x20,0x55,0x55,0x55,0x0d,0xdc,0xf9,0x2c,0x8f,0x0c,0xd4,0x53, + 0xb5,0x30,0xf9,0xaa,0x4f,0x55,0x55,0x55,0x55,0xf5,0x4a,0x55,0xd5,0x91,0x84, + 0x2c,0x35,0x00,0x00,0x00,0x4e,0x4d,0x7a,0x8c,0x2f,0x42,0x81,0x07,0x38,0xba, + 0xf8,0x40,0x0f,0x00,0x00,0x00,0x00,0xf5,0x6a,0x00,0x60,0x08,0x51,0x78,0x60, + 0x29,0xa5,0x94,0x1e,0xd8,0x78,0x2a,0x9f,0x13,0xa8,0x57,0xba,0x20,0xec,0xd5, + 0xaf,0x52,0x4a,0x29,0x55,0xf5,0xca,0x52,0x3a,0x45,0x04,0xf2,0x29,0x42,0x08, + 0x41,0x7e,0x05,0x7c,0x11,0xcf,0x88,0xc2,0x0f,0xf9,0x54,0xf9,0x41,0x0f,0x84, + 0x10,0x42,0x00,0xf5,0x4a,0x04,0x4c,0x10,0xa1,0xe0,0x63,0x08,0x21,0x14,0xfd, + 0x50,0x79,0x84,0xff,0x42,0x50,0x4f,0xf4,0x03,0xca,0x35,0xaf,0x10,0x42,0x08, + 0x55,0xf5,0x5a,0xa1,0x06,0xff,0x09,0x4a,0x2b,0x42,0x08,0x41,0xfc,0x07,0x7a, + 0x21,0xff,0x10,0x65,0x1e,0xf1,0xaf,0xe8,0xa3,0x0f,0x84,0x10,0x42,0x00,0xf5, + 0x4a,0x88,0xd3,0x01,0xff,0xc7,0xa6,0x28,0xa2,0x10,0xf2,0xa7,0x78,0x14,0xff, + 0x4b,0x20,0x5f,0xd4,0x1f,0x8c,0x37,0x5f,0x51,0x44,0x11,0xa9,0xf5,0x6a,0xc5, + 0x38,0x24,0x00,0x9c,0x3c,0x02,0x09,0x84,0xc8,0x0f,0x7c,0x41,0xef,0x03,0x6a, + 0x1c,0x41,0x7f,0xa9,0x17,0x0f,0x04,0x12,0x48,0x02,0xf5,0x4a,0x60,0x0e,0x01, + 0x49,0x90,0xab,0xa8,0xa0,0x52,0x22,0x5f,0x79,0x24,0xdf,0x57,0xf1,0x7f,0x18, + 0x3d,0x98,0xb7,0x4f,0x51,0x41,0x05,0x50,0xf5,0x6a,0xb5,0xe1,0xff,0x10,0x35, + 0x2a,0x02,0x0a,0x00,0x8b,0x0e,0x7a,0x41,0x8f,0x0f,0x14,0x3e,0x4a,0xb8,0x4a, + 0x0f,0x2f,0x04,0x14,0x50,0x05,0xf5,0x4a,0xd0,0x38,0xc0,0x5f,0xe0,0xbe,0xa8, + 0x40,0x55,0x26,0x9e,0xf8,0x14,0x5f,0x5f,0x59,0x79,0x19,0x3d,0x08,0x4f,0x0f, + 0x51,0x41,0x05,0x50,0xf5,0xda,0x5a,0x8e,0x14,0xe0,0x75,0x26,0x02,0x2a,0x00, + 0x8e,0x46,0x7c,0x40,0x8f,0x3e,0x08,0x7c,0x5c,0x58,0xad,0x2e,0x5f,0x04,0x14, + 0x50,0x05,0xf5,0x4a,0xcc,0x23,0x00,0x89,0x12,0xb2,0x90,0x80,0xaa,0x2e,0x0b, + 0x79,0x15,0x2f,0xbe,0x2e,0xf9,0x39,0x1d,0x18,0x86,0x0f,0x21,0x81,0x04,0x50, + 0xf5,0x6a,0x66,0x88,0xaa,0x10,0xb4,0x60,0x44,0x24,0x00,0xf2,0x43,0xfe,0xc1, + 0xbf,0xff,0x7e,0xfe,0xd9,0x47,0x7f,0xd5,0x7f,0x88,0x28,0x51,0x05,0xf5,0xca, + 0x36,0x22,0x00,0x5e,0x3d,0x2a,0x12,0x89,0x54,0x09,0x28,0x22,0x2a,0x01,0x12, + 0x01,0x44,0x44,0x10,0x00,0x04,0x08,0x25,0x02,0x04,0x50,0xf5,0x5a,0x93,0x88, + 0xfa,0xe3,0xe8,0x20,0x41,0x20,0x01,0xa2,0x82,0x88,0x40,0xa8,0x40,0x54,0x11, + 0x11,0x85,0x2a,0xa1,0x42,0x80,0x50,0x91,0x04,0xf5,0xca,0x01,0x7f,0x0f,0x88, + 0xca,0x6a,0x14,0x0a,0xa4,0x08,0x28,0x22,0x12,0x05,0x14,0x01,0x44,0x44,0x20, + 0x40,0x14,0x28,0x2a,0x0a,0x04,0x51,0xf5,0xca,0xd4,0x01,0x40,0xe2,0xf8,0x20, + 0x41,0x41,0x09,0x42,0x82,0x88,0x44,0xa0,0x42,0x54,0x11,0x11,0x15,0x09,0x81, + 0x82,0x80,0x20,0x51,0x04,0xf5,0xda,0x60,0xa0,0x94,0x3c,0x24,0x35,0x12,0x14, + 0x90,0x28,0x21,0x22,0x10,0x0a,0x10,0x01,0x44,0x44,0x40,0x44,0x28,0x24,0x2a, + 0x44,0x04,0x51,0xf5,0x4a,0x34,0x0a,0x01,0x87,0x1e,0xa0,0x20,0x81,0x22,0x02, + 0x88,0x08,0x45,0x41,0x45,0x28,0x11,0x11,0x15,0x21,0x82,0x88,0x00,0x11,0x51, + 0x04,0xf5,0x6a,0x11,0x41,0x28,0xf1,0x7b,0x35,0x8a,0x28,0x88,0x50,0x25,0x42, + 0x10,0x14,0x10,0x42,0x04,0x44,0x40,0x14,0x29,0x22,0xa9,0x44,0x04,0xa1,0xf5, + 0x4a,0x5a,0x14,0xc5,0x3d,0x60,0xa0,0x20,0x84,0x03,0x0a,0xf0,0x28,0x22,0xf9, + 0x45,0x11,0xa7,0x10,0x1d,0xe1,0x9f,0x08,0xf7,0x6e,0x48,0x14,0xf5,0xda,0x08, + 0x41,0x60,0x04,0x69,0x29,0x0a,0xd1,0xa9,0xa0,0x66,0x82,0x44,0xcc,0x10,0xc4, + 0x16,0x42,0x4c,0x28,0x33,0x90,0x66,0x6e,0x05,0x41,0xf5,0x4a,0x4c,0x14,0x35, + 0x46,0x3c,0xa4,0x40,0xc4,0x03,0x08,0x6e,0x28,0x10,0xae,0x44,0x71,0x46,0x11, + 0x0a,0x65,0x97,0x22,0xee,0x43,0x2e,0x12,0xf5,0x5a,0x15,0x41,0xf0,0x13,0x46, + 0x31,0x2a,0x51,0xfb,0xf3,0xef,0xe3,0x9b,0x9c,0xf3,0xf7,0x1f,0xde,0xef,0x13, + 0xc3,0xf3,0x66,0x79,0x8f,0x40,0xf5,0x4a,0x44,0x14,0x05,0x88,0x12,0xa4,0x00, + 0x64,0x67,0xdb,0x67,0xf3,0x37,0x7a,0xd7,0x66,0xbe,0xf7,0x6e,0x42,0x73,0xdf, + 0xef,0xe3,0x26,0x14,0xf5,0x6a,0x15,0x41,0x40,0x42,0x4a,0x31,0xa9,0xa8,0x76, + 0xbf,0x77,0xfb,0x8f,0xe8,0xd3,0x6e,0x36,0xff,0xed,0x15,0xe7,0xbe,0x67,0x6b, + 0x8e,0x42,0xf5,0x4a,0x44,0x10,0x95,0x28,0x03,0x24,0x02,0xf2,0xe7,0x9b,0xe7, + 0x33,0x26,0xc4,0xde,0xe6,0x76,0xcb,0xdf,0x83,0x6b,0x9e,0x77,0xe7,0x26,0x10, + 0xf5,0x6a,0x1d,0x45,0x00,0x02,0xaa,0xa8,0xa8,0x30,0x6e,0xfb,0x6f,0xf7,0x86, + 0xee,0xee,0x76,0x36,0x27,0x6f,0x2b,0xe3,0xff,0xe7,0x6e,0x0e,0x45,0xf5,0x4a, + 0x50,0x10,0xaa,0x50,0x05,0x22,0x02,0xbc,0x7f,0xf7,0x7c,0xe7,0x2f,0x7c,0xed, + 0xcf,0x7f,0xff,0xff,0x83,0xd7,0xf3,0x7f,0xfe,0x4d,0x10,0xf5,0x6a,0x35,0x85, + 0x00,0x0a,0xac,0xb0,0x50,0x01,0x24,0x09,0x82,0x10,0x89,0x12,0x14,0x20,0x41, + 0x28,0x01,0xa8,0x04,0x08,0x11,0x12,0x20,0x45,0xf5,0xca,0x60,0x50,0xaa,0x40, + 0x0d,0x2a,0x04,0x54,0x41,0xa0,0x28,0x44,0x22,0x80,0x87,0x4a,0x14,0x42,0xa8, + 0x02,0x50,0x45,0x84,0x88,0x0a,0x10,0xf5,0xda,0x44,0x05,0x00,0x14,0x98,0x60, + 0x51,0x01,0x14,0x0a,0x82,0x12,0x08,0x55,0x2b,0x00,0x41,0x11,0x05,0x50,0x05, + 0x10,0x51,0x42,0x40,0x45,0xf5,0xca,0x00,0x00,0x4a,0x01,0x48,0x24,0x04,0x54, + 0x41,0xa1,0x28,0x80,0xa2,0x00,0x02,0x55,0x14,0x44,0xa0,0x0a,0x50,0x45,0x04, + 0x28,0x2a,0x20,0xf5,0xda,0x20,0x49,0x00,0x22,0x09,0x31,0x51,0x01,0x14,0x08, + 0x82,0x2a,0x08,0xaa,0xa8,0x00,0x41,0x11,0x0a,0x40,0x05,0x10,0xa1,0x02,0x81, + 0x8a,0xf5,0xca,0x34,0xc0,0x0d,0x40,0x02,0x60,0x04,0x28,0x81,0xa2,0x28,0x00, + 0x91,0x00,0x02,0x2a,0x12,0x44,0x21,0x15,0xa0,0x44,0x14,0x50,0x28,0x20,0xf5, + 0x5a,0x10,0x39,0xa4,0xf7,0x85,0x20,0xc9,0x47,0x54,0x08,0x02,0x55,0x24,0x94, + 0xb8,0x80,0xf0,0x13,0xbc,0x80,0xea,0x11,0x71,0x8f,0x83,0x0b,0xf5,0x4a,0x54, + 0xaa,0x20,0x02,0x01,0x60,0x20,0x0b,0x01,0x93,0xa8,0x00,0x01,0x41,0x3a,0x29, + 0xea,0x86,0xdc,0x2a,0xc0,0x44,0x38,0xdf,0xf7,0x40,0xf5,0xda,0x00,0x03,0x00, + 0x04,0x24,0x24,0x8a,0x43,0xa8,0x21,0x02,0x54,0xa8,0xf4,0x30,0x82,0x60,0x2e, + 0xc6,0x80,0xd4,0x00,0x35,0xfb,0x66,0x2a,0xf5,0x4a,0x88,0x01,0x42,0x20,0x00, + 0xb0,0x20,0xff,0xfa,0xef,0xfb,0x36,0xfd,0xf3,0xf4,0x98,0xeb,0x86,0x0e,0x7d, + 0xde,0x5e,0x70,0xdb,0xbe,0x00,0xf5,0x6a,0x0d,0xa3,0x00,0x8a,0x20,0x22,0x09, + 0xb3,0xcd,0x5b,0x9b,0x6d,0xee,0x66,0xf2,0xbd,0xe0,0x27,0x46,0xfc,0xfb,0x06, + 0x35,0x9e,0xf7,0xaa,0xf5,0x4a,0x14,0x09,0x11,0x20,0x82,0x20,0xa2,0xbb,0xbd, + 0x59,0xdf,0xef,0xfe,0xee,0xb8,0x99,0x69,0x90,0x16,0xcd,0xf7,0x53,0xb0,0xba, + 0xb6,0x01,0xf5,0x6a,0x05,0x21,0x40,0x88,0x08,0xb2,0x08,0xf3,0xfb,0x1d,0x9b, + 0x7d,0xc6,0x67,0xb2,0xb5,0xe4,0x42,0x46,0xec,0xf3,0x07,0x3a,0x0c,0xbb,0x53, + 0xf5,0x4a,0x24,0x89,0x14,0x21,0xa0,0x20,0x42,0xb7,0xed,0x59,0xbf,0x6d,0xdf, + 0x6e,0xf0,0x71,0x61,0x18,0x9d,0xdd,0xf7,0xbc,0xb0,0xce,0xb3,0x05,0xf5,0x6a, + 0x00,0x21,0x40,0x00,0x00,0xa4,0x90,0xbf,0x7f,0xbf,0xf6,0xed,0xfc,0xde,0xd5, + 0x75,0xf8,0x5d,0x78,0x78,0xfe,0x3e,0x7a,0xd3,0xe9,0x50,0xf5,0xca,0xff,0xff, + 0xff,0xff,0xff,0x3f,0x44,0x40,0x00,0x12,0x08,0x92,0x84,0x40,0x10,0x60,0x05, + 0x10,0x85,0x8a,0x92,0xb0,0x48,0x0a,0xa2,0x04,0xf5,0x2a,0x41,0x42,0x12,0x09, + 0x49,0xa2,0x12,0x15,0xaa,0x88,0xa2,0x04,0x21,0x0a,0x45,0x3a,0xa0,0x44,0x20, + 0x20,0x08,0x54,0x82,0x40,0x08,0x51,0xf5,0x0a,0x14,0x11,0x41,0x44,0x84,0x08, + 0x40,0x40,0x01,0x42,0x08,0x50,0x88,0x40,0x10,0x19,0x15,0x11,0x95,0x8a,0xa2, + 0x02,0x28,0x2a,0x22,0x04,0xf5,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xf5,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf4,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0}; diff --git a/TCLSpecs/bitmaps/KFMod.xbm b/TCLSpecs/bitmaps/KFMod.xbm new file mode 100644 index 0000000..60f18d9 --- /dev/null +++ b/TCLSpecs/bitmaps/KFMod.xbm @@ -0,0 +1,117 @@ +#define KFMod_width 220 +#define KFMod_height 61 +static char KFMod_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xfe,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7,0x02,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf4,0xfa,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xf5,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf5,0x5a,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0xf5,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf5,0xea,0xff,0xff,0xff,0xff,0xff,0x7f,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xf5,0x4a, + 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x9f,0xfc,0xff,0xfc,0xf3, + 0xf7,0xff,0xf3,0x03,0xf8,0x01,0x00,0xf8,0x00,0x00,0x00,0xf5,0x6a,0x00,0x00, + 0x00,0x00,0x00,0xa0,0xaa,0xaa,0xaa,0xea,0xf1,0x9c,0xe7,0xf1,0xc4,0xc1,0x83, + 0xc7,0x53,0x7d,0xa8,0xaa,0xe2,0x54,0x55,0x55,0xf5,0x4a,0x80,0x7f,0x00,0x00, + 0x00,0x20,0x00,0x00,0x00,0xc0,0xd4,0xad,0xcf,0xf4,0x51,0xd4,0x2b,0xd3,0x0f, + 0xfc,0x02,0x00,0xe8,0x02,0x00,0x00,0xf5,0x5a,0x80,0x80,0x01,0x00,0x00,0x60, + 0xa5,0x94,0x52,0xea,0xc1,0x84,0xa7,0xf0,0xa4,0xc2,0x83,0xc2,0x47,0x7b,0xa8, + 0x94,0xe2,0x48,0x29,0x55,0xf5,0x4a,0x80,0x1c,0x02,0x00,0x00,0x20,0x08,0x21, + 0x84,0xe0,0xa8,0xad,0x87,0xf5,0x38,0xd0,0x57,0x6a,0x1f,0x7a,0x02,0x21,0xf0, + 0x12,0x42,0x00,0xf5,0x6a,0x80,0x14,0x04,0x00,0x00,0x60,0x42,0x08,0x21,0xf4, + 0x03,0x80,0x57,0xf0,0x8e,0xca,0xe3,0x42,0x4f,0x7b,0xe9,0x85,0xef,0x40,0x08, + 0x55,0xf5,0x4a,0x80,0x22,0x06,0x00,0x00,0xa0,0x10,0x42,0x08,0xc1,0xaf,0xaa, + 0x07,0xf5,0x2e,0xd0,0x77,0xd0,0x0e,0x7d,0x30,0x93,0xf7,0x15,0x42,0x00,0xf5, + 0x5a,0x80,0x22,0x7e,0x00,0x00,0x20,0x4a,0x29,0xa5,0xe4,0x3f,0x80,0x57,0xf0, + 0x8f,0xc2,0x7f,0x4a,0x5e,0x79,0xbd,0xa6,0xe9,0x40,0x11,0xa9,0xf5,0x4a,0x80, + 0x40,0x45,0x00,0x00,0xa0,0x00,0x00,0x00,0x88,0x7f,0xd5,0x07,0xfa,0x3f,0xd0, + 0x73,0x61,0x9d,0x7a,0x1c,0xce,0xe1,0x14,0x48,0x02,0xf5,0x6a,0x80,0xc0,0x45, + 0x00,0x00,0x20,0xaa,0xaa,0xaa,0x22,0xfe,0x80,0x57,0xf1,0xbe,0xca,0x6b,0x48, + 0xfc,0x78,0x5d,0xdf,0xeb,0x41,0x05,0x50,0xf5,0x4a,0x80,0x00,0x42,0x00,0x00, + 0xa0,0x00,0x00,0x00,0xa0,0xf0,0xaa,0x07,0xf4,0x7d,0xe0,0xd3,0xc2,0xbe,0x7d, + 0x1c,0xce,0xe1,0x14,0x50,0x05,0xf5,0x5a,0x80,0x80,0x41,0x00,0x00,0x20,0xaa, + 0xaa,0xaa,0x2a,0xea,0x80,0x2f,0xf1,0xf8,0xca,0x47,0x50,0x78,0x78,0xbd,0xde, + 0xf5,0x41,0x05,0x50,0xf5,0x4a,0x80,0x7f,0x40,0x00,0x00,0xa0,0x00,0x00,0x00, + 0xe0,0xe0,0xd5,0x47,0xf4,0xf4,0xc1,0x23,0x65,0x7a,0xfa,0x1c,0xce,0xe1,0x10, + 0x50,0x05,0xf5,0x6a,0x00,0x00,0x40,0x00,0x00,0x20,0x4a,0x29,0xa5,0x6a,0x74, + 0x80,0x0f,0xf1,0xe2,0xd7,0x8b,0xc0,0x34,0x79,0x9a,0xa6,0xeb,0x85,0x04,0x50, + 0xf5,0x4a,0x00,0x00,0x40,0x00,0x00,0xa0,0x10,0x42,0x08,0xe0,0xb1,0xa4,0x47, + 0xf8,0xe8,0xc3,0x23,0x54,0x70,0x7c,0x34,0x93,0xf3,0x20,0x51,0x05,0xf5,0x5a, + 0x00,0x00,0x40,0x00,0x00,0x20,0x84,0x10,0x42,0x35,0x1f,0xe2,0x3f,0xfe,0xf3, + 0xff,0x9f,0xf2,0x2b,0xfe,0xf1,0x45,0xef,0x15,0x04,0x50,0xf5,0x4a,0x80,0x7f, + 0x40,0xfe,0x01,0x60,0x21,0x84,0x10,0x80,0xa4,0x10,0x80,0x20,0x25,0x92,0x24, + 0x88,0x40,0x21,0x45,0x11,0x11,0x41,0x91,0x04,0xf5,0x5a,0x80,0x80,0x41,0x02, + 0x06,0x20,0x94,0x52,0x4a,0x55,0x10,0xa4,0x2a,0x44,0x88,0x20,0x42,0x22,0x14, + 0x48,0x10,0x04,0x44,0x14,0x04,0x51,0xf5,0x4a,0x80,0x1c,0x42,0x72,0x08,0x20, + 0x01,0x00,0x00,0x00,0x85,0x02,0x00,0x11,0x22,0x8a,0x10,0x88,0x42,0x85,0x44, + 0x51,0x11,0x21,0x51,0x04,0xf5,0x5a,0x80,0x14,0x44,0x52,0x10,0x60,0x54,0x55, + 0x55,0x4a,0x50,0xa8,0xaa,0x84,0x88,0x20,0x8a,0x22,0x10,0x10,0x11,0x04,0x44, + 0x44,0x04,0x51,0xf5,0x4a,0x80,0x22,0x46,0x8a,0x18,0x20,0x01,0x00,0x80,0x10, + 0x05,0x02,0x00,0x20,0x22,0x8a,0x40,0x88,0x8a,0x22,0x04,0x51,0x11,0x08,0x51, + 0x04,0xf5,0x5a,0x80,0x22,0xfe,0x8b,0xf8,0x67,0xa8,0xaa,0x2a,0x42,0x50,0x51, + 0x55,0x95,0x88,0x20,0x14,0x22,0x40,0x88,0x50,0x04,0x84,0x22,0x04,0xa1,0xf5, + 0x4a,0x80,0x40,0x45,0x02,0x15,0x20,0x02,0x00,0x83,0x10,0xe2,0x08,0x00,0xf0, + 0x21,0x88,0x8e,0x08,0x1d,0xc2,0x3f,0x91,0xfe,0xdd,0x48,0x14,0xf5,0x5a,0x80, + 0xc0,0x45,0x02,0x17,0x20,0x51,0x4a,0x27,0x44,0xc9,0xa2,0xaa,0x9a,0x8b,0x82, + 0x2d,0x42,0xb8,0x68,0x66,0x44,0xcc,0xec,0x0a,0x41,0xf5,0x4a,0x80,0x00,0x42, + 0x02,0x08,0x60,0x84,0x90,0x8f,0x12,0xdc,0x08,0x00,0x58,0x21,0xe8,0x8c,0x10, + 0x05,0x42,0x2f,0x11,0xdd,0x87,0x2c,0x12,0xf5,0x5a,0x80,0x80,0x41,0x02,0x06, + 0x20,0x21,0x84,0xe6,0xe3,0xdf,0xe3,0x77,0x3d,0xe6,0xe7,0x3f,0xbe,0xbf,0x4f, + 0x86,0xe7,0xcd,0xf6,0x9e,0x40,0xf5,0x4a,0x80,0x7f,0x40,0xfe,0x01,0xa0,0x08, + 0xe1,0xd6,0xfe,0xdf,0xe7,0x2f,0xf0,0xb7,0xcf,0xfc,0xee,0xdc,0x24,0xee,0xbe, + 0xdf,0xc3,0x2d,0x14,0xf5,0x5a,0x00,0x00,0x40,0x00,0x00,0x20,0xa4,0x48,0xcd, + 0x36,0xcf,0xee,0x2f,0xd5,0xa7,0xdd,0x6c,0xfe,0xdb,0x87,0xc6,0x7d,0xcf,0xd6, + 0x8c,0x42,0xf5,0x4a,0x00,0x00,0x40,0x00,0x00,0xa0,0x02,0xe4,0xef,0x76,0xef, + 0x66,0x4c,0x88,0xed,0xcd,0xed,0xa6,0xbf,0x27,0xd6,0x3c,0xef,0xce,0x2e,0x10, + 0xf5,0x5a,0x00,0x00,0x40,0x00,0x00,0x20,0x50,0x31,0xdc,0x77,0xcf,0xf6,0x1e, + 0xba,0x9f,0xed,0x6c,0xce,0xde,0x16,0xc7,0x7f,0xcf,0xfd,0x1c,0x45,0xf5,0x4a, + 0x00,0x00,0x40,0x00,0x00,0xa0,0x0a,0x74,0xff,0xee,0xfb,0xcf,0x5f,0xf9,0xd8, + 0x9f,0xef,0xfe,0xff,0x43,0xaf,0xef,0xff,0xfc,0x59,0x10,0xf5,0x5a,0x80,0x7f, + 0x40,0x00,0x00,0x20,0x40,0x41,0x08,0x24,0x20,0x90,0x00,0x44,0x5a,0x90,0x94, + 0x24,0x04,0x14,0x08,0x80,0x88,0x04,0x05,0x45,0xf5,0x4a,0x80,0x80,0x41,0x00, + 0x00,0xa0,0x2a,0x14,0x42,0x89,0x0a,0x25,0x2a,0x11,0x8e,0x04,0x21,0x10,0x51, + 0x41,0x45,0x29,0x22,0x51,0x50,0x10,0xf5,0x5a,0x80,0x1c,0x42,0x00,0x00,0x20, + 0x00,0x81,0x28,0x20,0x40,0x80,0x40,0x44,0x17,0x51,0x08,0x45,0x04,0x14,0x20, + 0x82,0x08,0x04,0x05,0x45,0xf5,0x4a,0x80,0x14,0x44,0xfc,0x1d,0xae,0x54,0x54, + 0x82,0x8a,0x2a,0x2a,0x14,0x11,0x40,0x04,0x45,0x10,0x51,0x81,0x8a,0x28,0x42, + 0x51,0x50,0x20,0xf5,0x5a,0x80,0x22,0x46,0x98,0x19,0x27,0x01,0x01,0x28,0x20, + 0x00,0x01,0x41,0x44,0x15,0x51,0x20,0x42,0x04,0x54,0x20,0x82,0x10,0x84,0x04, + 0x8a,0xf5,0x4a,0x80,0x22,0x7e,0x18,0x18,0x67,0x54,0xa8,0x02,0x89,0xaa,0xa8, + 0x08,0x11,0x00,0x04,0x15,0x11,0x51,0x01,0x0a,0x28,0x4a,0x11,0xa2,0x20,0xf5, + 0x5a,0x80,0x40,0x05,0x4c,0x9c,0x22,0x81,0x0f,0x50,0x22,0x00,0x02,0x22,0x84, + 0x7a,0x51,0xe0,0x47,0x70,0xa9,0xe0,0x83,0x60,0x5c,0x0f,0x0b,0xf5,0x4a,0x80, + 0xc0,0x05,0x7c,0x54,0x23,0x24,0x4e,0x05,0x8a,0xaa,0xa8,0x10,0xa1,0x60,0x04, + 0xd2,0x1c,0x9d,0x03,0x8a,0x25,0x74,0xb7,0xed,0x45,0xf5,0x5a,0x80,0x00,0x02, + 0x2c,0x74,0xa3,0x88,0x26,0xa0,0x23,0x00,0x02,0x8a,0xc8,0x74,0xa1,0xc8,0x4e, + 0x4c,0xa9,0xa0,0x11,0x69,0xb6,0xcd,0x21,0xf5,0x4a,0x80,0x80,0x01,0x06,0xb6, + 0x21,0x22,0xf6,0xfb,0xdf,0xbf,0xed,0xf8,0xe7,0xe3,0x35,0xe3,0x0c,0x1d,0xf1, + 0xbe,0x9b,0xe0,0xf6,0x6d,0x14,0xf5,0x5a,0x80,0x7f,0x00,0x06,0xb6,0xa1,0x08, + 0x67,0x9b,0xb7,0x76,0xdf,0xdd,0xdd,0x68,0x73,0xcb,0x57,0x2c,0xda,0xf7,0x2d, + 0x6a,0x3e,0xff,0x81,0xf5,0x4a,0x00,0x00,0x00,0x0f,0x97,0x23,0x42,0x76,0x7b, + 0x73,0x37,0xdb,0xfc,0xcf,0x62,0x37,0xe1,0x04,0x8d,0x98,0xef,0x87,0xe0,0x30, + 0x6d,0x2b,0xf5,0x5a,0x00,0x00,0x00,0x00,0x00,0xa0,0x28,0x67,0xf7,0x37,0x76, + 0xdb,0xae,0xed,0x70,0xe3,0xc9,0x51,0x1c,0xba,0xe7,0x2d,0x6a,0x5c,0xe6,0x03, + 0xf5,0x4a,0x00,0x00,0x00,0x00,0x00,0x20,0x02,0x76,0xdb,0xb3,0x3e,0xff,0x9c, + 0xcd,0xea,0xeb,0xc2,0x34,0x5a,0xb9,0xff,0xfd,0x60,0x3d,0x6f,0x57,0xf5,0x5a, + 0x00,0x00,0x00,0x00,0x00,0xa0,0xa8,0xff,0x7f,0x7e,0xed,0xdb,0xfb,0xbf,0xa1, + 0xc5,0xf0,0xb1,0xf0,0xf5,0xfc,0x79,0xfa,0x86,0xd1,0x01,0xf5,0xca,0xff,0xff, + 0xff,0xff,0xff,0x3f,0x02,0x02,0x80,0x12,0x24,0x01,0x48,0x40,0x4a,0x60,0x8a, + 0x24,0x0a,0x40,0x82,0x44,0x40,0x52,0x85,0x54,0xf5,0x4a,0x00,0x00,0x00,0x00, + 0x00,0xa4,0x48,0xa8,0x2a,0x40,0x11,0x54,0x11,0x8a,0x10,0xf5,0x20,0x82,0xa0, + 0x94,0x28,0x68,0x15,0x08,0x20,0x02,0xf5,0x1a,0x55,0x55,0x55,0x55,0x55,0x09, + 0x22,0x02,0x00,0x15,0x44,0x01,0x44,0x21,0x42,0x30,0x8a,0x28,0x0a,0x02,0x82, + 0x02,0x80,0xa2,0x8a,0x50,0xf5,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xf5,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf4,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0}; diff --git a/TCLSpecs/bitmaps/KFiddl.xbm b/TCLSpecs/bitmaps/KFiddl.xbm new file mode 100644 index 0000000..5a0e724 --- /dev/null +++ b/TCLSpecs/bitmaps/KFiddl.xbm @@ -0,0 +1,117 @@ +#define KFiddl_width 220 +#define KFiddl_height 61 +static char KFiddl_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xfe,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7,0x02,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf4,0xfa,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xf5,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf5,0x5a,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0xf5,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf5,0xea,0xff,0xff,0xff,0xff,0xff,0xbf,0xaa,0xaa,0xaa,0xfa,0xed,0xff,0xef, + 0xbf,0xff,0xff,0x7f,0x57,0xfd,0x55,0x7f,0x5f,0x55,0x55,0x55,0x55,0xf5,0x4a, + 0x53,0xbd,0xaa,0xaa,0xaa,0x6a,0x00,0x00,0x00,0xbc,0xcf,0x7d,0x8f,0x2f,0x3e, + 0x7e,0x3d,0x0f,0xf0,0x00,0x3c,0x3c,0x00,0x00,0x00,0x00,0xf5,0x6a,0x02,0x66, + 0x00,0x00,0x00,0x20,0x55,0x55,0x55,0x0d,0xdc,0xf9,0x2c,0x8f,0x84,0x3c,0x70, + 0x5f,0xe5,0x54,0xb9,0x1e,0x55,0x55,0x55,0x55,0xf5,0xca,0x81,0x44,0x55,0x55, + 0x55,0x35,0x00,0x00,0x00,0x4e,0x4d,0x7a,0x8c,0x2f,0x2a,0x3c,0x29,0x06,0xe0, + 0x01,0x38,0x5c,0x00,0x00,0x00,0x00,0xf5,0x5a,0x40,0x69,0x00,0x00,0x00,0x60, + 0x29,0xa5,0x94,0x1e,0xd8,0x78,0x2a,0x9f,0x83,0xbe,0x24,0x25,0xf5,0x48,0x7d, + 0x1d,0x52,0x4a,0x29,0x55,0xf5,0x4a,0xc0,0x42,0xa5,0x94,0x72,0x29,0x42,0x08, + 0x41,0x7e,0x05,0x7c,0x11,0xcf,0x28,0x7c,0x56,0x1f,0xef,0xc5,0x3b,0x5c,0xf9, + 0x10,0x42,0x00,0xf5,0x6a,0x40,0x10,0x08,0x21,0xe4,0x63,0x08,0x21,0x14,0xfd, + 0x50,0x79,0x84,0xff,0x02,0x3d,0x07,0xce,0xf3,0xf0,0xbc,0x1e,0xc6,0x42,0x08, + 0x55,0xf5,0xca,0x80,0x4a,0x21,0x84,0xe8,0x2e,0x42,0x08,0x41,0xfc,0x07,0x7a, + 0x21,0xff,0xa8,0xfc,0xaf,0x8e,0xe9,0x64,0x3a,0x5c,0xd7,0x10,0x42,0x00,0xf5, + 0x5a,0x01,0x80,0x08,0x21,0xbe,0xad,0x28,0xa2,0x10,0xf2,0xa7,0x78,0x14,0xff, + 0x03,0xbc,0x07,0xde,0xe3,0xf1,0x78,0x1d,0xc7,0x45,0x11,0xa9,0xf5,0x4a,0xaa, + 0x54,0xa7,0x88,0xde,0x3a,0x02,0x09,0x84,0xc8,0x0f,0x7c,0x41,0xef,0xa7,0x3e, + 0xa6,0xce,0xe9,0x74,0x3a,0x5c,0xff,0x13,0x48,0x02,0xf5,0x6a,0x15,0x01,0x0d, + 0x24,0x1d,0xbb,0xa8,0xa0,0x52,0x22,0x5f,0x79,0x24,0xdf,0x0f,0xbc,0x16,0xde, + 0xe3,0xf1,0xb8,0x3e,0x4f,0x40,0x05,0x50,0xf5,0x4a,0x58,0x54,0xa9,0x02,0x74, + 0x3d,0x02,0x0a,0x00,0x8b,0x0e,0x7a,0x41,0x8f,0x4f,0x3d,0x84,0xce,0xe9,0x74, + 0x3c,0x1c,0x17,0x15,0x50,0x05,0xf5,0xda,0x62,0x01,0x08,0xa8,0x4e,0xbf,0xa8, + 0x40,0x55,0x26,0x9e,0xf8,0x14,0x2f,0x3f,0xbc,0x52,0xde,0xe1,0x71,0x79,0xbd, + 0x4f,0x40,0x05,0x50,0xf5,0x4a,0x90,0xa9,0xae,0x02,0xae,0x3d,0x02,0x2a,0x00, + 0x8e,0x46,0x7c,0x40,0x4f,0xbe,0x3e,0x08,0x8e,0xeb,0x68,0x38,0x1c,0x0e,0x15, + 0x50,0x05,0xf5,0x6a,0x25,0x03,0x0a,0x50,0xff,0xa3,0x90,0x80,0xaa,0x2e,0x0b, + 0x79,0x15,0x1f,0x3e,0xbc,0x42,0xaf,0xf3,0xe4,0x3e,0x9d,0xfe,0x81,0x04,0x50, + 0xf5,0x4a,0x40,0xaa,0x20,0x85,0xde,0x69,0x44,0x24,0x00,0xf2,0x43,0xfe,0xc1, + 0xbf,0xff,0xff,0x11,0x5f,0xef,0xe3,0x7b,0x3e,0x7a,0x28,0x51,0x05,0xf5,0x5a, + 0x15,0x1a,0x4a,0x70,0x8f,0x23,0x12,0x89,0x54,0x09,0x28,0x44,0x54,0x01,0x80, + 0x24,0x8a,0x00,0x29,0x88,0xa4,0xa4,0x08,0x05,0x04,0x50,0xf5,0x4a,0xf0,0xb3, + 0xf8,0xf5,0x57,0x30,0x41,0x20,0x01,0xa2,0x02,0x11,0x01,0xa8,0x2a,0x81,0x40, + 0x54,0x80,0x22,0x08,0x08,0x42,0x50,0x91,0x04,0xf5,0xea,0x8e,0x78,0x86,0x6f, + 0x03,0x65,0x14,0x0a,0xa4,0x08,0xa8,0x44,0x54,0x05,0x00,0x28,0x2a,0x02,0x2a, + 0x88,0xa2,0xa2,0x90,0x04,0x04,0x51,0xf5,0x4a,0x2c,0xa4,0xa9,0xf2,0x55,0x20, + 0x41,0x41,0x09,0x42,0x02,0x10,0x01,0x50,0x55,0x85,0x00,0x51,0x81,0x22,0x08, + 0x08,0x0a,0x21,0x51,0x04,0xf5,0xda,0x02,0xe1,0x05,0xef,0x01,0x35,0x12,0x14, + 0x90,0x28,0x51,0x45,0x28,0x05,0x00,0x20,0x54,0x04,0x24,0x40,0x42,0x91,0x40, + 0x48,0x04,0x51,0xf5,0x4a,0xa9,0x94,0xa1,0x7d,0x48,0xa0,0x20,0x81,0x22,0x02, + 0x04,0x10,0x42,0x50,0x55,0x15,0x01,0x21,0x11,0x95,0x28,0x44,0x14,0x05,0x51, + 0x04,0xf5,0x5a,0x03,0x80,0xcb,0x3e,0x12,0x35,0x8a,0x28,0x88,0x50,0x51,0x45, + 0x09,0x05,0x00,0x80,0x54,0x48,0x44,0x00,0x02,0x01,0x41,0x50,0x04,0xa1,0xf5, + 0x4a,0x51,0xd5,0xf7,0x77,0x41,0xa0,0x20,0x84,0x23,0x04,0x74,0x10,0x40,0xf8, + 0x4a,0x29,0x07,0x85,0x1c,0xf5,0x5f,0x54,0xf7,0x6f,0x48,0x14,0xf5,0xda,0xc5, + 0x7f,0xdc,0x3b,0x14,0x29,0x0a,0xd1,0x81,0xa2,0xe4,0x44,0x15,0xed,0x10,0xc2, + 0x56,0x20,0x4c,0x60,0x1b,0x01,0x6e,0x66,0x05,0x41,0xf5,0x4a,0x37,0x80,0x3c, + 0x6f,0x41,0xa4,0x40,0xc4,0x2b,0x10,0x66,0x11,0x40,0x8c,0x42,0x68,0x06,0x8a, + 0x02,0x25,0x53,0x54,0x67,0x53,0x2e,0x12,0xf5,0x6a,0xbe,0x7a,0xb5,0x73,0x12, + 0x31,0x2a,0x51,0xf3,0xf5,0xef,0xe5,0x1f,0x5e,0xfb,0xf3,0xbe,0xde,0xef,0x4b, + 0xd3,0xf3,0xee,0x75,0x8f,0x40,0xf5,0x4a,0x09,0x3e,0xfe,0x45,0x44,0xa4,0x00, + 0x64,0xe7,0xdb,0x6f,0x73,0x57,0x79,0xd3,0x6e,0x37,0x77,0x6e,0x12,0x67,0xdf, + 0xe7,0xe1,0x26,0x14,0xf5,0xda,0x5c,0x8f,0xd7,0x70,0x11,0x31,0x52,0xb1,0x6e, + 0xdb,0x67,0xfb,0x2f,0xe8,0xd7,0x67,0x76,0xff,0xed,0x81,0xe3,0x9e,0x6f,0x6b, + 0x8e,0x42,0xf5,0xca,0x1f,0xe3,0xf3,0x75,0x04,0xa4,0x04,0xf0,0x67,0x9f,0x77, + 0xb3,0x86,0xd6,0xde,0x76,0x37,0xe7,0xdf,0x2b,0x77,0xbe,0x67,0xe7,0x26,0x10, + 0xf5,0xca,0xd7,0xe9,0x78,0x5f,0x51,0x21,0x50,0x15,0x6e,0xbb,0xe7,0x77,0x26, + 0xcc,0xee,0x66,0x76,0xa7,0x6f,0x07,0xe3,0xbe,0x77,0x6f,0x0e,0x45,0xf5,0xda, + 0xe3,0x63,0xdf,0x73,0x04,0x74,0x05,0xb8,0xff,0xf7,0x7d,0xef,0x0f,0xfd,0xec, + 0xde,0x77,0xfe,0xff,0xd1,0xd7,0xf3,0x7f,0xfe,0x4d,0x10,0xf5,0x4a,0x17,0x78, + 0x37,0x7e,0x51,0x21,0x50,0x25,0x12,0x28,0x12,0x20,0xa9,0x10,0x85,0x42,0x8a, + 0x12,0x84,0x04,0x82,0x8a,0x80,0x12,0x20,0x45,0xf5,0xda,0x8c,0xde,0xda,0x0d, + 0x04,0xa8,0x04,0x88,0x88,0x42,0x44,0x09,0x02,0x24,0x2f,0x90,0x20,0x40,0x11, + 0xa1,0x28,0x20,0x2a,0x88,0x0a,0x10,0xf5,0x4a,0x5e,0x74,0x6d,0x35,0xa1,0x22, + 0x51,0x22,0x42,0x08,0x11,0xa0,0xa8,0x02,0x83,0x0a,0x0a,0x15,0x44,0x08,0x82, + 0x8a,0x80,0x22,0x40,0x45,0xf5,0x6a,0x13,0xbd,0x76,0x58,0x08,0x68,0x84,0x08, + 0x28,0x22,0x84,0x0a,0x02,0x50,0x29,0xa0,0x40,0x40,0x11,0xa5,0x28,0x20,0x2a, + 0x88,0x2a,0x20,0xf5,0xca,0x45,0xf4,0x1a,0x72,0xa2,0x2f,0x11,0xa2,0x82,0x88, + 0x50,0xa0,0xa8,0x0a,0x00,0x09,0x2a,0x15,0x44,0x00,0x02,0x89,0x40,0x22,0x80, + 0x8a,0xf5,0xda,0x14,0x32,0x5a,0xc1,0x49,0x2c,0x84,0x08,0x20,0x42,0x04,0x0a, + 0x02,0xa0,0xaa,0x90,0x00,0x20,0x11,0x95,0x50,0x22,0x14,0x88,0x2a,0x20,0xf5, + 0xca,0x4c,0x79,0x0b,0x54,0x7f,0x64,0xa1,0xa7,0x8a,0x28,0xa2,0x40,0x48,0x09, + 0x38,0x24,0xfa,0x87,0xb8,0x40,0xe4,0x08,0x71,0x9f,0x83,0x0b,0xf5,0x6a,0x19, + 0x4c,0x4d,0xe1,0x61,0x2b,0x14,0x0b,0x20,0x03,0x11,0x14,0x11,0xc4,0xb2,0x82, + 0xe0,0x16,0xce,0x14,0xc9,0x42,0x3a,0xdb,0xf6,0x40,0xf5,0x4a,0xd8,0x2f,0x15, + 0x3c,0x2f,0x20,0x41,0xa3,0x8a,0x51,0x88,0x42,0x44,0x71,0x34,0x28,0x74,0x46, + 0xae,0x41,0xe0,0x28,0x30,0xdb,0x66,0x2a,0xf5,0x6a,0x35,0xc2,0x8b,0x86,0xbf, + 0x6a,0x14,0xfb,0xf8,0xef,0xdb,0x3e,0xfd,0xf3,0xf1,0x99,0xe1,0x26,0x46,0x7c, + 0xdf,0x8d,0xba,0xfb,0xbe,0x00,0xf5,0x4a,0xe0,0xe8,0x41,0xc2,0xdc,0x21,0x81, + 0xb7,0xdd,0xdb,0xbb,0x6d,0xee,0x6e,0xb8,0xb9,0xe5,0x8b,0x16,0xed,0xfb,0x26, + 0x30,0x9e,0xf7,0xaa,0xf5,0x6a,0x95,0xdf,0x14,0x7d,0xfe,0x68,0x28,0xb3,0xbd, + 0x19,0x9f,0xed,0xfe,0x66,0xb2,0x9b,0x68,0x22,0x46,0xdc,0xf7,0x13,0xb5,0xba, + 0xb6,0x01,0xf5,0x4a,0x40,0x7c,0x42,0x24,0xbf,0x24,0x42,0xf7,0xfb,0x5d,0xdb, + 0x6d,0xce,0xee,0xb8,0xf1,0xe2,0x08,0x0f,0xcd,0xf3,0x46,0x30,0x0c,0xbb,0x53, + 0xf5,0xda,0x12,0x05,0x11,0xe1,0x82,0x62,0x11,0xb3,0xe5,0x19,0x9f,0xef,0xee, + 0x66,0xf2,0x75,0x68,0x5a,0xac,0xdc,0xf7,0x3e,0xba,0xce,0xb3,0x05,0xf5,0x4a, + 0x44,0x50,0x44,0x28,0x83,0x30,0x88,0xbf,0x7f,0xbf,0xf6,0xed,0xfc,0xdf,0xd0, + 0xe2,0xf2,0x38,0x79,0x7a,0xfe,0xbc,0x78,0xd3,0xe9,0x50,0xf5,0xda,0xff,0xff, + 0xff,0xff,0xff,0x3f,0x45,0x92,0x08,0x49,0x48,0x28,0x02,0x20,0x15,0x28,0x10, + 0x05,0x84,0x48,0x25,0x69,0x24,0x05,0xa2,0x04,0xf5,0x8a,0x80,0x04,0x10,0x02, + 0x81,0x8a,0x90,0x00,0x22,0x22,0x22,0x82,0xa8,0x8a,0x80,0x3a,0x45,0x50,0x21, + 0x12,0x40,0x12,0x41,0x50,0x08,0x51,0xf5,0x2a,0x2a,0x50,0x45,0x51,0x28,0x20, + 0x04,0xaa,0x88,0x08,0x09,0x29,0x02,0x20,0x54,0x58,0x90,0x04,0x94,0x40,0x15, + 0x48,0x14,0x05,0x22,0x04,0xf5,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xf5,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf4,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0}; diff --git a/TCLSpecs/bitmaps/KFloot.xbm b/TCLSpecs/bitmaps/KFloot.xbm new file mode 100644 index 0000000..ae11487 --- /dev/null +++ b/TCLSpecs/bitmaps/KFloot.xbm @@ -0,0 +1,117 @@ +#define KFloot_width 220 +#define KFloot_height 61 +static char KFloot_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xfe,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7,0x02,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf4,0xfa,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xf5,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf5,0x5a,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0xf5,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf5,0xea,0xff,0xff,0xff,0xff,0xff,0x7f,0x55,0x55,0x55,0x55,0xbf,0xfd,0xff, + 0xfd,0xf7,0xff,0xff,0xf7,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xf5,0x4a, + 0xb5,0xaa,0xaa,0xaa,0xaa,0x2a,0x00,0x00,0x00,0x80,0xf7,0xb9,0xef,0xf1,0xc5, + 0xc7,0xaf,0xcf,0x03,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0xf5,0x6a,0x20,0x00, + 0x00,0x00,0x02,0xa0,0xaa,0xaa,0xaa,0xaa,0x81,0x3b,0x9f,0xe5,0x91,0x90,0x07, + 0xe6,0xa9,0xaa,0xaa,0x6a,0x55,0x55,0x55,0x55,0xf5,0x4a,0x15,0x55,0x55,0x55, + 0x55,0x35,0x00,0x00,0x00,0xc0,0xa9,0x49,0x8f,0xf1,0x45,0x85,0x57,0xc5,0x01, + 0x00,0x00,0x60,0x00,0x00,0x00,0x00,0xf5,0x6a,0x8c,0x01,0x00,0x80,0x06,0x60, + 0x29,0xa5,0x94,0xd2,0x03,0x1b,0x4f,0xe5,0x73,0xd0,0x87,0xd4,0x2b,0xa5,0x94, + 0xfa,0x52,0x4a,0x29,0x55,0xf5,0xca,0x8a,0x93,0x24,0xa9,0x22,0x29,0x42,0x08, + 0x21,0xc8,0xaf,0x80,0x2f,0xe2,0x19,0x85,0xd7,0xca,0xc1,0x0b,0x3c,0xf8,0x85, + 0x10,0x42,0x00,0xf5,0x5a,0x90,0x21,0x42,0x42,0x49,0x62,0x08,0x21,0x84,0xa2, + 0x1f,0x2a,0x8f,0xf0,0x5f,0xa0,0xe7,0xc0,0x73,0x46,0xe7,0x72,0x10,0x42,0x08, + 0x55,0xf5,0x4a,0x0a,0x8a,0x10,0xb0,0x04,0x28,0x42,0x08,0x21,0x88,0xff,0x40, + 0x2f,0xe4,0x1f,0x95,0xff,0xea,0x31,0x2d,0xd3,0x74,0x85,0x10,0x42,0x00,0xf5, + 0xda,0x20,0x20,0x4a,0xf5,0xa2,0x22,0x11,0x45,0x14,0x42,0xfe,0x14,0x8f,0xe2, + 0x7f,0xc0,0xf7,0xc0,0xbd,0x9c,0xcb,0x71,0x50,0x44,0x11,0xa9,0xf5,0x4a,0xd4, + 0x89,0x00,0x68,0x18,0xb0,0x48,0x20,0x81,0x10,0xf9,0x81,0x2f,0xe8,0x7d,0x92, + 0xc7,0xd5,0x39,0xde,0xc3,0x7b,0x05,0x12,0x48,0x02,0xf5,0xda,0x02,0x23,0x54, + 0x25,0x5d,0x65,0x04,0x15,0x54,0x4a,0xe4,0x2b,0x8f,0xe4,0xfb,0x88,0xaf,0xc0, + 0xbb,0x9c,0xeb,0x71,0x50,0x41,0x05,0x50,0xf5,0x4a,0x50,0x89,0x02,0x5c,0x38, + 0x20,0x51,0x40,0x01,0x60,0xd1,0x41,0x2f,0xe8,0xf1,0xc3,0x87,0xd4,0x39,0xbc, + 0xc3,0x75,0x05,0x14,0x50,0x05,0xf5,0x6a,0x0a,0x26,0x50,0x0f,0x7a,0x35,0x04, + 0x15,0xa8,0xca,0xc4,0x13,0x9f,0xe2,0xeb,0x93,0x57,0xc1,0xbd,0x9e,0xd7,0x71, + 0x50,0x41,0x05,0x50,0xf5,0xca,0x40,0x19,0x05,0x59,0x79,0x60,0x51,0x40,0x05, + 0xc0,0xd1,0x88,0x0f,0xe8,0xc1,0xa7,0x07,0xe8,0x31,0x4c,0xc3,0xfa,0x06,0x14, + 0x50,0x05,0xf5,0x5a,0x2a,0x54,0xa0,0x06,0xec,0x2a,0x04,0x12,0x50,0xd5,0x65, + 0x21,0xaf,0xe2,0xe9,0x8f,0xaf,0xc2,0xf5,0x96,0x76,0xf0,0x21,0x81,0x04,0x50, + 0xf5,0xca,0x00,0x31,0x4a,0x52,0x79,0x20,0xa1,0x88,0x04,0x40,0x7e,0xc8,0x3f, + 0xf8,0xe7,0xff,0x3f,0xe8,0xc3,0x07,0x7c,0xe5,0x8a,0x28,0x51,0x05,0xf5,0x4a, + 0x54,0x64,0xd1,0x06,0xe8,0xb4,0x08,0x22,0x91,0x2a,0x01,0x85,0x88,0x2a,0x12, + 0x90,0x80,0x92,0x24,0x50,0x05,0x20,0x20,0x02,0x04,0x50,0xf5,0x6a,0x01,0x1f, + 0xe4,0x91,0x2a,0x21,0xa4,0x08,0x24,0x40,0x54,0x20,0x22,0x80,0x44,0x05,0x2a, + 0x00,0x11,0x05,0x90,0x8a,0x8a,0x50,0x91,0x04,0xf5,0x4a,0xe8,0x21,0xd1,0x44, + 0x28,0xa8,0x02,0x42,0x81,0x14,0x01,0x95,0x08,0x25,0x10,0xa0,0x00,0x55,0x84, + 0xa0,0x22,0x20,0x20,0x0a,0x04,0x51,0xf5,0xda,0x42,0x08,0x4c,0x11,0xae,0x32, + 0x90,0x28,0x28,0x41,0x48,0x00,0xa2,0x10,0x45,0x15,0xaa,0x00,0x51,0x14,0x88, + 0x0a,0x89,0x20,0x51,0x04,0xf5,0x4a,0x30,0xa5,0x44,0x84,0x0f,0x60,0x25,0x82, + 0x02,0x12,0x25,0xaa,0x08,0x84,0x10,0x80,0x00,0x4a,0x04,0x81,0x22,0x40,0x22, + 0x44,0x04,0x51,0xf5,0x6a,0xa5,0x00,0x62,0xa1,0xaf,0x2a,0x40,0x24,0x50,0x44, + 0x80,0x00,0xa2,0x22,0x84,0x2a,0xaa,0x20,0x48,0x28,0x88,0x2a,0x08,0x11,0x51, + 0x04,0xf5,0x4a,0x30,0x54,0x1f,0xc8,0x1f,0x20,0x15,0x11,0x05,0x11,0x2a,0xaa, + 0x08,0x10,0x21,0x80,0x00,0x8a,0x22,0x82,0x22,0x80,0xa2,0x44,0x04,0xa1,0xf5, + 0x5a,0xc5,0x02,0x9d,0xd2,0x87,0x6a,0x40,0x40,0x53,0x84,0xe0,0x00,0x22,0xf5, + 0x95,0x2a,0x9e,0x20,0x18,0xd1,0x7f,0x2a,0xee,0xdd,0x48,0x14,0xf5,0x6a,0xd0, + 0xa9,0x58,0xc0,0x27,0x20,0x0a,0x15,0x07,0x50,0xda,0x92,0x48,0xb8,0x01,0x80, + 0x4d,0x88,0xba,0x48,0xa6,0x80,0xcc,0xdc,0x0a,0x41,0xf5,0x4a,0x05,0x42,0x04, + 0x55,0x88,0x6a,0x41,0xa0,0x57,0x05,0xcc,0x21,0x02,0x5a,0x55,0xe9,0x1c,0x22, + 0x04,0xc4,0x2e,0x24,0xde,0x87,0x2c,0x12,0xf5,0x5a,0x50,0xf7,0x48,0x00,0x61, + 0x20,0x28,0x8a,0xe6,0xf3,0xdf,0xcb,0xbf,0xb8,0xe6,0xe7,0x7d,0xbd,0xdf,0x27, + 0xa6,0xe7,0xcd,0xea,0x9e,0x40,0xf5,0xca,0xff,0xe4,0x22,0x4a,0xc4,0xb7,0x82, + 0xe0,0xce,0xf6,0xef,0xe6,0x6e,0xf2,0xae,0xcd,0x6d,0xee,0xdc,0x8d,0xc6,0xbe, + 0xdf,0xd3,0x2d,0x14,0xf5,0xea,0xff,0xd7,0x89,0x10,0xd1,0x2f,0x28,0x49,0xcd, + 0x36,0xcf,0xee,0x1f,0xc8,0xa7,0xdd,0xec,0xfe,0xdb,0x23,0xee,0x7e,0xcf,0xc6, + 0x8c,0x42,0xf5,0x4a,0x2e,0x8a,0x22,0x44,0xc4,0xad,0x02,0xe2,0xef,0xb7,0xdf, + 0x67,0x8c,0xaa,0xed,0xcf,0x6e,0xce,0x9f,0x8f,0xc6,0x3c,0xdf,0xdf,0x2e,0x10, + 0xf5,0xda,0xfc,0xcd,0x08,0x11,0x51,0x3c,0xa8,0x30,0xdc,0x76,0xcf,0xf6,0x4d, + 0x98,0x9d,0xed,0xec,0x4e,0x7f,0x26,0xd6,0x7d,0xcf,0xdc,0x1c,0x45,0xf5,0x4a, + 0xf1,0x52,0xa2,0x44,0x04,0xa7,0x02,0x74,0xff,0xee,0xf9,0xce,0x1f,0xfa,0xdd, + 0x9d,0xef,0xfc,0xff,0x83,0xcf,0xe7,0xff,0xfd,0x59,0x10,0xf5,0x5a,0x84,0x25, + 0x08,0x00,0x51,0x2b,0x90,0x42,0x08,0x95,0x24,0x49,0x50,0x21,0x28,0x49,0x12, + 0x25,0x44,0x2a,0x12,0x2a,0x21,0x24,0x05,0x45,0xf5,0xca,0x90,0xdf,0xa3,0x2a, + 0x84,0x61,0x25,0x10,0x42,0x00,0x08,0x20,0x0a,0x88,0x1e,0x20,0x44,0x00,0x91, + 0x80,0x80,0x40,0x88,0x40,0x50,0x10,0xf5,0x5a,0xa2,0x5e,0xff,0x81,0xd0,0x2f, + 0x80,0x8a,0x28,0xaa,0xa2,0x0a,0x41,0x25,0x86,0x0a,0x11,0x55,0x04,0x2a,0x54, + 0x14,0x22,0x14,0x05,0x45,0xf5,0x4a,0x64,0x3e,0xe2,0x55,0xc4,0xad,0x2a,0x40, + 0x02,0x01,0x08,0x40,0x14,0x80,0x52,0x40,0x44,0x00,0x91,0x80,0x02,0x41,0x89, + 0x42,0x50,0x20,0xf5,0x6a,0x31,0x24,0x0c,0x06,0x62,0x3c,0x80,0x2a,0xa8,0xa8, + 0xa2,0x2a,0x81,0x2a,0x04,0x2a,0x11,0x55,0x44,0x24,0x50,0x14,0x20,0x88,0x04, + 0x8a,0xf5,0x4a,0x1c,0x52,0x2e,0xa0,0x88,0xa6,0x2a,0x80,0x02,0x04,0x08,0x00, + 0x28,0x00,0x51,0x01,0x44,0x00,0x11,0x11,0x05,0x81,0x8a,0x22,0xa2,0x20,0xf5, + 0x6a,0x09,0xaa,0xf8,0x0a,0x22,0x2b,0x80,0x2f,0x50,0xa1,0x42,0x55,0x05,0x55, + 0x70,0x54,0xe1,0x4f,0x70,0x45,0xd0,0x29,0x60,0x1c,0x0f,0x0b,0xf5,0x4a,0x06, + 0xc3,0x0a,0xa1,0x88,0x63,0x25,0x0e,0x05,0x0a,0x10,0x00,0x50,0x80,0x6a,0x01, + 0xd4,0x1c,0xbd,0x11,0x8a,0x83,0xfa,0xf6,0xed,0x45,0xf5,0xda,0x82,0xa4,0x13, + 0x08,0xe2,0x28,0x88,0xa6,0xa0,0xa3,0x8a,0x54,0x05,0xea,0x60,0x28,0xc1,0x4d, + 0x8c,0x85,0xa0,0x29,0x60,0xb6,0xcd,0x21,0xf5,0x4a,0x42,0x00,0x4d,0xa2,0x48, + 0x22,0x21,0xf6,0xf5,0xdf,0xb7,0x6d,0xf8,0xe7,0xeb,0x33,0xd7,0x0c,0x2d,0xf0, + 0xbe,0x99,0x6a,0xbf,0x6d,0x14,0xf5,0xda,0x42,0x55,0x32,0x08,0x22,0xb1,0x08, + 0x6f,0x9b,0xb7,0x76,0xdb,0xfe,0xdd,0x60,0x73,0xc1,0x57,0x0c,0xdd,0xf7,0x2f, + 0x60,0xbc,0xff,0x81,0xf5,0x4a,0x7d,0x00,0xc4,0x92,0x88,0x28,0x44,0x66,0x7b, + 0x73,0x3e,0xdb,0xfc,0xcd,0x75,0x37,0xe9,0x04,0xad,0xb8,0xef,0x87,0xf4,0x32, + 0x6c,0x2b,0xf5,0x6a,0x05,0xaa,0x14,0x03,0x22,0xa4,0x22,0xee,0xfb,0xb7,0xb6, + 0xff,0x8d,0xdd,0x60,0x6b,0xc3,0x51,0x0c,0x9a,0xe7,0x1d,0x61,0x58,0xe7,0x03, + 0xf5,0xca,0xa1,0x00,0x40,0xac,0x08,0x31,0x90,0x66,0xcb,0x33,0x3e,0xdb,0xdc, + 0xcd,0xea,0xe3,0xd0,0x32,0x5d,0xb9,0xef,0x79,0x68,0x1e,0x6f,0x57,0xf5,0xda, + 0x0a,0x52,0x29,0x02,0x42,0xa4,0x0a,0x7f,0x7f,0x7e,0xed,0xdb,0xfb,0xbd,0xa1, + 0xe9,0xe5,0x71,0xf0,0xfa,0xfc,0xfb,0xf2,0xae,0xd1,0x01,0xf5,0xca,0xff,0xff, + 0xff,0xff,0xff,0x3f,0x40,0x91,0x52,0x49,0x50,0x24,0x10,0x05,0x2a,0x42,0x10, + 0x0a,0x25,0x40,0x25,0x48,0x24,0x81,0x84,0x54,0xf5,0xaa,0x20,0x01,0x00,0x51, + 0x24,0xa1,0x2a,0x24,0x04,0x02,0x05,0x01,0x45,0xa0,0x80,0x78,0x85,0x40,0x10, + 0x15,0x88,0x22,0x41,0x24,0x21,0x02,0xf5,0x0a,0x4a,0x54,0x55,0x04,0x11,0x08, + 0x00,0x81,0x90,0x50,0x90,0xa8,0x10,0x15,0x2a,0x72,0x50,0x14,0x85,0x40,0x22, + 0x50,0x14,0x11,0x88,0x50,0xf5,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xf5,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf4,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0}; diff --git a/TCLSpecs/bitmaps/KHose.xbm b/TCLSpecs/bitmaps/KHose.xbm new file mode 100644 index 0000000..05de479 --- /dev/null +++ b/TCLSpecs/bitmaps/KHose.xbm @@ -0,0 +1,117 @@ +#define KHose_width 220 +#define KHose_height 61 +static char KHose_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xfe,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7,0x02,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf4,0xfa,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xf5,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf5,0x5a,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0xf5,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf5,0xea,0xff,0xff,0xff,0xff,0xff,0xbf,0xaa,0xaa,0xaa,0xea,0xb7,0xff,0xbf, + 0xff,0xfe,0xff,0xfb,0x5f,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xf5,0x4a, + 0xab,0xaa,0xaa,0xaa,0xaa,0x6a,0x00,0x00,0x00,0xf0,0x3e,0xf7,0x3d,0xbe,0xf8, + 0xf8,0xe2,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf5,0x6a,0x02,0x00, + 0x00,0x00,0x00,0x20,0x55,0x55,0x55,0x35,0x70,0xe7,0xb3,0x3c,0x12,0xf2,0xc8, + 0x53,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xf5,0xca,0x51,0x55,0x55,0x55, + 0x55,0x35,0x00,0x00,0x00,0x38,0x35,0xe9,0x31,0xbe,0x58,0xf8,0xc2,0x03,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf5,0x5a,0x18,0x00,0x00,0x00,0x00,0x60, + 0xa5,0x94,0x52,0x7a,0x60,0xe3,0xa9,0x7c,0x06,0xf2,0xe9,0x57,0x4a,0x29,0xa5, + 0x94,0x52,0x4a,0x29,0x55,0xf5,0x4a,0x38,0xa5,0x94,0x52,0x4a,0x29,0x08,0x21, + 0x04,0xf9,0x15,0xf0,0x45,0x3c,0x53,0xf1,0xc0,0x03,0x1e,0x72,0xc9,0xc3,0xb3, + 0x10,0x42,0x00,0xf5,0x6a,0x59,0x08,0x21,0x8c,0x10,0x22,0x21,0x84,0x50,0xf4, + 0x43,0xe5,0x11,0xfe,0x0b,0xf8,0xd5,0xab,0xb3,0x88,0x31,0xae,0x7f,0x42,0x08, + 0x55,0xf5,0xca,0x00,0x42,0x08,0x3d,0x84,0xb0,0x08,0x21,0x04,0xf1,0x1f,0xe8, + 0x85,0xfc,0xa3,0xf2,0xff,0x83,0x75,0xae,0x75,0x87,0xf7,0x10,0x42,0x00,0xf5, + 0x5a,0xa2,0x10,0xa2,0x64,0x21,0x24,0xa2,0x88,0x42,0xc8,0x9f,0xe2,0x51,0xfc, + 0x0f,0xf0,0xc0,0xd7,0xe1,0x1c,0x38,0xae,0x03,0x44,0x11,0xa9,0xf5,0x4a,0x0d, + 0x8a,0x08,0xc6,0x95,0xb2,0x08,0x24,0x10,0x22,0x3f,0xf0,0x05,0xbd,0x4f,0xf5, + 0xd4,0xc3,0xeb,0xfe,0xfa,0x8f,0xab,0x12,0x48,0x02,0xf5,0x6a,0xb4,0x40,0xa2, + 0x04,0x07,0x20,0xa2,0x82,0x4a,0x89,0x7c,0xe5,0xa3,0x7c,0x1f,0xf0,0xc2,0xeb, + 0xe1,0xf8,0x79,0xd2,0x03,0x40,0x05,0x50,0xf5,0x4a,0x11,0x2a,0x08,0x04,0xac, + 0xaa,0x08,0x28,0x00,0x2c,0x3a,0xe8,0x09,0xbd,0xbe,0xfa,0xe8,0xc3,0xf5,0xea, + 0x3f,0x84,0x57,0x15,0x50,0x05,0xf5,0x5a,0xe8,0x80,0xa2,0x06,0x30,0x20,0xa2, + 0x02,0x55,0x99,0x78,0xe2,0x21,0x3c,0x7c,0xf0,0xc2,0xd3,0xe1,0x82,0x7b,0xa1, + 0x03,0x40,0x05,0x50,0xf5,0x4a,0x85,0x2b,0x08,0x04,0x40,0xb5,0x08,0xa8,0x00, + 0x38,0x9a,0xe8,0x0b,0xbd,0xfa,0xf5,0xd0,0x8b,0x6b,0x57,0x73,0x8c,0x2b,0x15, + 0x50,0x05,0xf5,0xda,0x20,0x41,0xa2,0x06,0x80,0x21,0x42,0x02,0xaa,0xba,0x0c, + 0xe2,0xa1,0x3c,0xf8,0xf0,0xc5,0x43,0x73,0x0e,0xf9,0xa7,0x43,0x80,0x04,0x50, + 0xf5,0x4a,0x94,0x8a,0x08,0x02,0x00,0xb6,0x10,0x91,0x00,0xc8,0xaf,0xf8,0x0f, + 0xff,0xfe,0xff,0xf3,0x2f,0x1e,0xfa,0xc2,0xd3,0x0f,0x29,0x51,0x05,0xf5,0x6a, + 0x02,0x12,0x42,0x03,0x00,0x2c,0x4a,0x24,0x52,0x25,0x00,0x4a,0x20,0x49,0x91, + 0x24,0x54,0x8a,0xa2,0x42,0x51,0x84,0x54,0x04,0x04,0x50,0xf5,0xca,0xf8,0x85, + 0x10,0x02,0x00,0xac,0x00,0x81,0x04,0x10,0xa5,0x20,0x4a,0x04,0x04,0x08,0x81, + 0x20,0x08,0x10,0x08,0x20,0x00,0x51,0x91,0x04,0xf5,0x5a,0x4d,0x21,0x8a,0x02, + 0x00,0x36,0x54,0x28,0x50,0x85,0x08,0x0a,0x01,0x51,0xa1,0xa2,0x14,0x0a,0xa2, + 0x4a,0x45,0x15,0x55,0x04,0x04,0x51,0xf5,0x4a,0x24,0x88,0x20,0x03,0x00,0x61, + 0x01,0x05,0x05,0x20,0xa2,0x40,0x54,0x04,0x14,0x08,0x80,0xa0,0x08,0x00,0x20, + 0x80,0x00,0x21,0x51,0x04,0xf5,0x5a,0x0b,0x25,0x49,0x01,0xe0,0x2a,0x48,0x50, + 0x20,0x95,0x08,0x2a,0x01,0x51,0x81,0xa2,0x2a,0x0a,0xa2,0xaa,0x8a,0x2a,0x4a, + 0x48,0x04,0x51,0xf5,0x4a,0xa2,0x00,0x02,0x01,0x10,0x60,0x85,0x04,0x8a,0x00, + 0x82,0x00,0x28,0x04,0x28,0x08,0x80,0xa0,0x08,0x00,0x20,0x80,0x10,0x05,0x51, + 0x04,0xf5,0x6a,0x0b,0x54,0xa8,0x00,0xac,0x2a,0x20,0x51,0x21,0xaa,0x28,0xaa, + 0x82,0x48,0x85,0xa2,0x2a,0x09,0xa2,0x54,0x0a,0x29,0x42,0x50,0x04,0xa1,0xf5, + 0x4a,0xa4,0x02,0x82,0x00,0x02,0x20,0x15,0x04,0x8e,0x00,0xc2,0x01,0x28,0xe2, + 0x23,0x08,0x1c,0xa2,0x30,0x81,0x7f,0x82,0xdc,0xbb,0x49,0x14,0xf5,0xda,0x9e, + 0xa9,0xe8,0x00,0x55,0xb5,0x40,0xa1,0x26,0x52,0xb4,0xa9,0x82,0x38,0x4b,0x82, + 0x59,0x08,0x3a,0xa8,0xdc,0x28,0xba,0x9b,0x13,0x41,0xf5,0x4a,0x68,0x01,0x42, + 0x80,0x01,0x20,0x12,0x08,0x0f,0x04,0x99,0x03,0x28,0xb2,0x02,0xa8,0x1b,0x91, + 0x80,0x82,0x4d,0x82,0x98,0x4d,0x38,0x12,0xf5,0x5a,0x41,0xae,0x50,0x40,0x54, + 0xb5,0x08,0x45,0xed,0xd7,0xbf,0xd7,0xef,0x70,0xee,0xcf,0x7b,0x78,0x3f,0x5f, + 0x2c,0xdf,0xbb,0xd5,0xbd,0x40,0xf5,0x4a,0x68,0xf8,0x3f,0x20,0x01,0x20,0x42, + 0x90,0x9d,0x6d,0xdf,0xcd,0x5d,0xea,0xcd,0x9b,0xfb,0xde,0xfd,0x09,0x8d,0x7d, + 0x9f,0x8f,0x1b,0x14,0xf5,0xea,0x45,0x00,0x18,0xf0,0x55,0xaa,0x28,0xc5,0xda, + 0xed,0x9e,0xdd,0x3f,0xa0,0x5f,0xbb,0xd9,0xfc,0xb7,0x4f,0xdc,0xf9,0xde,0xcd, + 0xb9,0x42,0xf5,0xca,0x7f,0x00,0x06,0x0c,0x8f,0x20,0x02,0xd0,0x9f,0x6f,0xbe, + 0xcd,0x19,0x15,0x5b,0x9f,0xdd,0x4d,0x3f,0x1f,0x8d,0x7b,0x9e,0x9d,0x1b,0x10, + 0xf5,0x5a,0x5f,0x00,0x01,0x03,0x38,0xb4,0x50,0x45,0xb8,0xfd,0x9e,0xcf,0x9b, + 0xb0,0x7b,0xbb,0xf9,0x9c,0xfd,0x4c,0xac,0xfb,0xbf,0xbb,0x59,0x45,0xf5,0xca, + 0x50,0xf8,0xc0,0x3f,0xe0,0x22,0x0a,0xf0,0xfe,0xdd,0xf7,0xbd,0x3f,0xfa,0xb5, + 0x7b,0xdf,0xfd,0xff,0x07,0x1f,0xcf,0xff,0xf9,0x37,0x10,0xf5,0x5a,0x44,0x66, + 0x70,0xe0,0x41,0xb0,0xa0,0x84,0x48,0x22,0x21,0x01,0xa4,0x40,0x30,0x02,0x02, + 0x21,0x08,0x52,0xa4,0x24,0x00,0x4a,0x20,0x45,0xf5,0x4a,0x72,0x35,0x1c,0x15, + 0xc7,0x25,0x09,0x22,0x11,0x08,0x14,0x94,0x10,0x14,0x9e,0x90,0xa8,0x88,0xa2, + 0x08,0x01,0x88,0xaa,0x20,0x4a,0x10,0xf5,0xda,0xb4,0x11,0xa6,0x80,0x8c,0x31, + 0xa2,0x10,0x84,0x42,0x41,0x41,0x84,0x42,0x2d,0x24,0x02,0x22,0x08,0x42,0xa8, + 0x22,0x00,0x0a,0x01,0x45,0xf5,0x4a,0x9f,0x1c,0x0b,0x2a,0x0a,0xa7,0x08,0x44, + 0x51,0x28,0x10,0x14,0x51,0x10,0x84,0x82,0xa8,0x48,0xa2,0x10,0x05,0x88,0xaa, + 0x40,0x54,0x20,0xf5,0xea,0x10,0x88,0xa1,0x80,0x18,0x2a,0x42,0x11,0x04,0x02, + 0x45,0x41,0x04,0x8a,0x20,0x28,0x02,0x82,0x08,0x4a,0x50,0x22,0x00,0x2a,0x01, + 0x8a,0xf5,0xca,0x85,0x8e,0x0a,0x2a,0x14,0xa2,0x10,0x24,0xa1,0xa8,0x10,0x14, + 0xa1,0x20,0x8a,0x82,0x90,0x10,0xa2,0x00,0x85,0x88,0xaa,0x00,0xa4,0x20,0xf5, + 0xda,0x50,0xc4,0x90,0x00,0x11,0x32,0x8a,0x9e,0x08,0x02,0x44,0x41,0x08,0x8a, + 0xe0,0x24,0xca,0x8f,0xe0,0x56,0x90,0x23,0xc0,0xbc,0x1e,0x0e,0xf5,0x4a,0x04, + 0xc5,0x22,0xaa,0x14,0xa6,0x40,0x0c,0xa4,0x54,0x11,0x10,0xa5,0x20,0xd5,0x88, + 0xa0,0x3d,0x3a,0x03,0x44,0x8b,0xea,0x7d,0xdb,0x43,0xf5,0x6a,0x49,0x84,0x89, + 0x00,0x18,0x32,0x2a,0xae,0x02,0x06,0x44,0x45,0x00,0x8a,0xc1,0x21,0x8a,0x99, + 0x98,0x52,0x11,0x23,0xc0,0x6c,0x9b,0x2b,0xf5,0xca,0x10,0x05,0x03,0xa9,0x0e, + 0xa7,0x80,0xec,0xf3,0xff,0x6f,0xdb,0xfa,0xef,0xd7,0x67,0xa6,0x3b,0x5a,0xe4, + 0x7b,0xb7,0xd4,0xec,0xdb,0x00,0xf5,0x5a,0x42,0x04,0xfc,0xff,0x03,0x31,0x2a, + 0xdd,0xb6,0x6f,0x6d,0xb6,0xb9,0x9b,0xc1,0xee,0x8a,0x8f,0x18,0xb2,0xef,0x1b, + 0xc2,0x7a,0xfe,0xab,0xf5,0x4a,0x10,0x0a,0x00,0x00,0xc0,0xa3,0x00,0xcc,0xf6, + 0x66,0x7d,0xbf,0xfb,0xdb,0xd5,0x66,0xc2,0x21,0xbc,0x38,0xef,0xaf,0xe8,0x68, + 0xda,0x06,0xf5,0xda,0x8a,0x18,0x00,0x00,0x70,0x28,0x52,0xdd,0xef,0x6f,0x6c, + 0xf6,0x59,0x9f,0xc1,0xd6,0x96,0x0b,0x19,0x72,0xcf,0x1b,0xc2,0xb2,0xcc,0x57, + 0xf5,0x4a,0x40,0xf4,0xff,0xff,0x0f,0xa2,0x04,0xcc,0x96,0x67,0xfd,0xb6,0x3d, + 0xbb,0xeb,0xc6,0x81,0xe1,0xb4,0x72,0xdf,0xf7,0xd0,0x79,0xde,0x06,0xf5,0x6a, + 0x15,0x11,0x12,0x00,0x50,0x31,0x50,0xff,0xfe,0xfc,0xda,0xb7,0xf3,0x3b,0xc3, + 0xd3,0xeb,0x77,0xe0,0xe9,0xfb,0xf3,0xe5,0x0d,0xa3,0x53,0xf5,0xca,0xff,0xff, + 0xff,0xff,0xff,0x7f,0x05,0x90,0xa4,0x4a,0x20,0x92,0x48,0x44,0x11,0x8a,0x00, + 0x80,0x2a,0x04,0x90,0xa8,0x20,0xa8,0x0a,0x0a,0xf5,0x2a,0x80,0x20,0x41,0x55, + 0x05,0x04,0x20,0x05,0x08,0x20,0x8a,0x08,0x04,0x11,0x88,0xe0,0xaa,0x2a,0x40, + 0x51,0x25,0x42,0x15,0x05,0xa0,0x40,0xf5,0x8a,0x2a,0x4a,0x14,0x00,0x50,0x91, + 0x8a,0xa0,0x42,0x09,0x21,0x42,0x51,0x84,0x22,0xea,0x00,0x00,0x15,0x04,0x80, + 0x24,0x80,0xa0,0x0a,0x2a,0xf5,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xf5,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf4,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0}; diff --git a/TCLSpecs/bitmaps/KModal.xbm b/TCLSpecs/bitmaps/KModal.xbm new file mode 100644 index 0000000..5c8a62b --- /dev/null +++ b/TCLSpecs/bitmaps/KModal.xbm @@ -0,0 +1,117 @@ +#define KModal_width 220 +#define KModal_height 61 +static char KModal_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xfe,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7,0x02,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf4,0xfa,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xf5,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf5,0x5a,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0xf5,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf5,0xea,0xff,0xff,0xff,0xff,0xff,0x7f,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xf5,0x4a, + 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0xf0,0xc9,0xff,0xcf,0x3f,0x7f, + 0x7e,0x00,0x3f,0x00,0x00,0x3e,0x00,0xe0,0x01,0x00,0x00,0xf5,0x6a,0x00,0x00, + 0x00,0xfc,0x1f,0xa0,0xaa,0xaa,0xaa,0x1e,0xcf,0x79,0x1e,0x4f,0x9c,0x78,0xaa, + 0x8f,0xaa,0xaa,0xb8,0xaa,0xca,0x55,0x55,0x55,0xf5,0x4a,0x00,0x00,0x00,0x04, + 0x10,0x20,0x00,0x00,0x00,0x4c,0xdd,0xfa,0x4c,0x1f,0x25,0xfa,0x81,0x2f,0x00, + 0x00,0x3a,0x00,0xd0,0x01,0x00,0x00,0xf5,0x5a,0x00,0x00,0x00,0x24,0x10,0xa0, + 0x4a,0x29,0xa5,0x1e,0x4c,0x78,0x0a,0x4f,0x8a,0xf8,0x68,0x1f,0x29,0xa5,0x78, + 0xa5,0xc4,0x4b,0x29,0x55,0xf5,0x4a,0x00,0x00,0x00,0x24,0x10,0x20,0x10,0x42, + 0x08,0x8e,0xda,0x7a,0x58,0x8f,0x21,0xec,0x43,0x4f,0x42,0x08,0x3a,0x08,0xd1, + 0x11,0x42,0x00,0xf5,0x6a,0x00,0x00,0x00,0x64,0x10,0xa0,0x84,0x10,0x42,0x3f, + 0x00,0x78,0x05,0xef,0x0a,0xe9,0x69,0x0f,0x78,0xe1,0x3b,0xf9,0xc4,0x43,0x08, + 0x55,0xf5,0x4a,0x00,0x00,0x80,0xf7,0xf0,0x21,0x21,0x84,0x10,0xfc,0xaa,0x7a, + 0x50,0xef,0xa0,0xd8,0xa1,0xaf,0xce,0xe4,0xbd,0xa4,0xd1,0x11,0x42,0x00,0xf5, + 0x5a,0x00,0x00,0x80,0x94,0x11,0x61,0x94,0x52,0x4a,0xfe,0x03,0x78,0x05,0xff, + 0x0a,0xcc,0x2b,0x1f,0xae,0x69,0x3a,0x8e,0xc7,0x45,0x11,0xa9,0xf5,0x4a,0x00, + 0x00,0x80,0x14,0x13,0x21,0x01,0x00,0x80,0xf8,0x57,0x7d,0xa0,0xff,0x41,0xa9, + 0x53,0x4f,0x87,0x73,0x78,0xaf,0xe3,0x11,0x48,0x02,0xf5,0x6a,0x00,0x00,0x80, + 0x1c,0x16,0x21,0xa8,0xaa,0x2a,0xe2,0x0f,0x78,0x15,0xef,0x17,0x8a,0x1f,0x0f, + 0xd7,0x77,0x3d,0xc8,0xcb,0x45,0x05,0x50,0xf5,0x4a,0x00,0x00,0x80,0x04,0x10, + 0xa1,0x02,0x00,0x00,0x0a,0xaf,0x7a,0x40,0xdf,0x87,0xd8,0x57,0x5f,0x87,0x73, + 0x38,0xb5,0xd3,0x11,0x50,0x05,0xf5,0x5a,0x00,0x00,0x80,0xfc,0x1f,0x61,0xa8, + 0xaa,0xaa,0xa2,0x0e,0xf8,0x12,0x8f,0x2f,0x0a,0x1f,0x0f,0xa7,0xfb,0x7a,0xdc, + 0xc7,0x45,0x05,0x50,0xf5,0x4a,0x00,0x00,0x80,0x00,0x00,0x21,0x02,0x00,0x00, + 0x0e,0x5e,0x7d,0x44,0x5f,0x9f,0x48,0x4f,0xaf,0x97,0x73,0xb8,0x8e,0xe3,0x11, + 0x50,0x05,0xf5,0x6a,0x00,0xfe,0x81,0xfc,0x1f,0x21,0x91,0x52,0xaa,0x46,0x07, + 0xf8,0x10,0x0f,0x3e,0x2c,0x16,0x0f,0xc6,0x65,0x3a,0xae,0xcb,0x85,0x04,0x50, + 0xf5,0x4a,0x00,0x02,0x86,0x04,0x10,0x61,0x24,0x84,0x00,0x1e,0x4b,0x7a,0x84, + 0x4f,0x7f,0x19,0x87,0xaf,0xce,0xf1,0xbc,0xfe,0xd7,0x23,0x51,0x05,0xf5,0x5a, + 0x00,0x12,0x88,0x24,0x10,0x21,0x01,0x21,0x54,0xf3,0x21,0xfe,0xd1,0x3f,0xff, + 0xbe,0xd4,0x3f,0x78,0xc4,0x7b,0x1c,0xe3,0x13,0x04,0x50,0xf5,0x4a,0x00,0x32, + 0x90,0x24,0x10,0x61,0x54,0x08,0x01,0x48,0x0a,0x01,0x45,0x90,0x08,0x02,0x24, + 0x22,0x95,0x50,0x95,0xa2,0x24,0x44,0x91,0x04,0xf5,0x5a,0x00,0x32,0x90,0x64, + 0x10,0x21,0x01,0xa5,0x54,0x05,0x41,0xaa,0x10,0x25,0xa2,0x50,0x81,0x88,0x00, + 0x04,0x20,0x08,0x11,0x11,0x04,0x51,0xf5,0x4a,0x00,0x32,0xf0,0xf7,0xf0,0x2f, + 0x54,0x00,0x00,0x50,0x28,0x00,0x44,0x80,0x08,0x0a,0x28,0x22,0xaa,0xa2,0x84, + 0x42,0x44,0x24,0x51,0x04,0xf5,0x5a,0x00,0xda,0x97,0x94,0x11,0x61,0x01,0x55, + 0xa5,0x04,0x05,0x55,0x11,0x2a,0xa2,0xa0,0x82,0x88,0x00,0x08,0x22,0x10,0x11, + 0x41,0x04,0x51,0xf5,0x4a,0x00,0x02,0x90,0x14,0x13,0x21,0x54,0x00,0x08,0x51, + 0xa0,0x00,0x44,0x81,0x08,0x0a,0x28,0x22,0xa8,0xa2,0x88,0x4a,0x44,0x08,0x51, + 0x04,0xf5,0x5a,0x00,0x02,0x88,0x1c,0x16,0x21,0x01,0xaa,0x22,0x04,0x15,0x54, + 0x11,0x24,0xa2,0xa0,0x02,0x88,0x02,0x08,0x22,0x00,0x11,0x22,0x04,0xa1,0xf5, + 0x4a,0x00,0x02,0x86,0x04,0x10,0x61,0xa4,0x00,0x0b,0x41,0xe0,0x01,0x44,0xf1, + 0x09,0x0a,0x5e,0x21,0x38,0xd1,0xbf,0x2a,0xee,0xdd,0x48,0x14,0xf5,0x5a,0x00, + 0xfe,0x81,0xfc,0x1f,0x21,0x09,0x4a,0x43,0x14,0xda,0x28,0x11,0x9c,0x91,0xc0, + 0x0c,0x08,0x5d,0x44,0x26,0x00,0xed,0xee,0x0a,0x41,0xf5,0x4a,0x00,0x00,0x80, + 0x00,0x00,0x21,0xa0,0x90,0x2f,0x81,0xcc,0x42,0x04,0x59,0x45,0xd4,0xad,0xa2, + 0x00,0xd1,0x6e,0xaa,0xcc,0x8e,0x2c,0x12,0xf5,0x5a,0x00,0x00,0x80,0xfc,0x1f, + 0xa1,0x0a,0x84,0xe6,0xf7,0xff,0xcb,0xb7,0xb8,0xe6,0xe7,0x3d,0xbc,0xbf,0x27, + 0x86,0xe7,0xdd,0xe2,0x9e,0x40,0xf5,0x4a,0x00,0x00,0x80,0x04,0x10,0x21,0x40, + 0xe1,0xce,0xb6,0xcf,0xe6,0x6e,0xf4,0xb6,0xcd,0x6d,0xef,0xdd,0x8c,0xee,0xbe, + 0xcf,0xd3,0x2d,0x14,0xf5,0x5a,0x00,0x00,0x80,0x24,0x10,0x61,0x15,0x54,0xdd, + 0x76,0xdf,0xf6,0x1f,0xc9,0xa7,0xdd,0x7c,0xfe,0xdb,0x23,0xc6,0x7d,0xef,0xc7, + 0x8c,0x42,0xf5,0x4a,0x00,0x00,0x80,0x24,0x10,0x21,0x40,0xe1,0xcf,0x36,0xcf, + 0x67,0x4d,0xa8,0xef,0xcf,0xed,0x8e,0xbf,0x0f,0xd7,0x3c,0xcf,0xde,0x2e,0x10, + 0xf5,0x5a,0x00,0x00,0x80,0x64,0x10,0x21,0x15,0x28,0xfc,0x7f,0xdf,0xee,0x1c, + 0x9a,0x9d,0xdd,0x6c,0x6e,0xde,0x46,0xc6,0xfd,0xdf,0xdc,0x1c,0x45,0xf5,0x4a, + 0x00,0x00,0x80,0xf7,0xf0,0x61,0x80,0xf2,0xfe,0xee,0xf9,0xce,0x5f,0xf9,0xd8, + 0x9d,0xef,0xfd,0xff,0x2b,0xaf,0xe7,0xff,0xfe,0x59,0x10,0xf5,0x5a,0x00,0x00, + 0x00,0x94,0x11,0x20,0x55,0x10,0x02,0x90,0x04,0x51,0x02,0x24,0x2d,0xa2,0x24, + 0x80,0x04,0x02,0x49,0x12,0x80,0x48,0x05,0x45,0xf5,0x4a,0x00,0x00,0x00,0x14, + 0x13,0x60,0x00,0x8a,0x50,0x05,0x51,0x04,0x50,0x41,0x8e,0x08,0x88,0x2a,0xa2, + 0x50,0x82,0x88,0x2a,0x02,0x50,0x10,0xf5,0x5a,0x00,0x00,0x00,0x1c,0x16,0x20, + 0x55,0x41,0x04,0x50,0x04,0xa1,0x0a,0x94,0x26,0xa2,0x22,0x80,0x10,0x04,0x28, + 0x42,0x80,0x50,0x05,0x45,0xf5,0x4a,0x00,0x00,0x00,0x04,0x10,0x20,0x00,0x28, + 0x52,0x05,0x51,0x14,0x40,0x01,0x92,0x08,0x88,0x2a,0x8a,0xa2,0x82,0x28,0x2a, + 0x0a,0x50,0x20,0xf5,0x5a,0x00,0x00,0x00,0xfc,0x1f,0xa0,0x94,0x02,0x01,0x50, + 0x04,0x41,0x15,0xa8,0x08,0xa2,0x22,0x80,0x40,0x10,0x10,0x02,0x81,0xa0,0x04, + 0x8a,0xf5,0x4a,0x1c,0x0e,0xe0,0x00,0x00,0x20,0x41,0x50,0xa8,0x04,0x51,0x14, + 0x80,0x02,0xa2,0x08,0x08,0x25,0x2a,0x8a,0x8a,0x50,0x14,0x09,0xa2,0x20,0xf5, + 0x5a,0x18,0x07,0xc0,0x80,0x01,0x60,0x14,0x0f,0x02,0x48,0x04,0x41,0x55,0x90, + 0x70,0x42,0xe2,0x8f,0xf0,0x21,0xe0,0x05,0x61,0x5c,0x0f,0x0b,0xf5,0x4a,0x18, + 0x07,0x60,0x80,0x01,0x20,0x41,0x57,0x51,0x03,0x41,0x10,0x00,0x8a,0x6a,0x90, + 0xd0,0x2c,0x9a,0x09,0x89,0x51,0x78,0xb7,0xed,0x45,0xf5,0x5a,0x9c,0xe2,0x78, + 0xd6,0x00,0x20,0x12,0x06,0x04,0x57,0x14,0x85,0x54,0xe1,0xe0,0x0a,0xca,0x8c, + 0x2c,0x45,0xa2,0x05,0x62,0xb6,0xcd,0x21,0xf5,0x4a,0x54,0xb3,0x6d,0xdb,0x00, + 0xa0,0x88,0xfe,0xf3,0xdf,0xb7,0x7d,0xf9,0xef,0xeb,0x71,0xe3,0x2d,0x0c,0xf1, + 0xbc,0x59,0xe9,0xfe,0x6d,0x14,0xf5,0x5a,0x74,0x9b,0xa7,0x59,0x00,0x20,0x42, + 0x66,0xbb,0xb3,0x76,0xdb,0xdc,0xcd,0x60,0x37,0xc9,0x87,0x5e,0xdc,0xf7,0x1f, + 0x64,0x3c,0xff,0x81,0xf5,0x4a,0xb6,0x99,0xb7,0x6d,0x00,0xa0,0x10,0x77,0x7b, + 0x37,0x37,0xdb,0xfd,0xdd,0x6a,0x73,0xc3,0x28,0x0c,0xb9,0xef,0x87,0xf0,0x32, + 0x6d,0x2b,0xf5,0x5a,0xb6,0xd9,0xb6,0x6d,0x01,0x20,0x4a,0xe6,0xf7,0x73,0x76, + 0xdf,0x8c,0xcd,0x60,0x6b,0xe9,0x02,0x4d,0x98,0xe7,0x2d,0x62,0x58,0xe6,0x03, + 0xf5,0x4a,0x97,0x73,0x6c,0xdb,0x00,0xa0,0x00,0x6e,0xcb,0x3b,0x3f,0xdb,0xde, + 0xed,0xf5,0xe3,0xc2,0x78,0x9a,0xfd,0xff,0xfb,0x68,0x1e,0x6f,0x57,0xf5,0x5a, + 0x00,0x00,0x00,0x00,0x00,0x20,0xaa,0x7f,0x7f,0x7e,0xec,0xfb,0xf9,0x9f,0xa1, + 0xd5,0xe8,0x33,0xf8,0xf0,0xfc,0x79,0xf2,0xd6,0xd1,0x01,0xf5,0xca,0xff,0xff, + 0xff,0xff,0xff,0xbf,0x00,0x00,0x51,0x21,0x95,0x04,0x12,0x40,0x24,0x40,0x42, + 0x88,0x22,0x0a,0x02,0xc8,0x90,0x02,0x85,0x54,0xf5,0x4a,0x00,0x00,0x00,0x00, + 0x00,0x22,0x54,0x55,0x04,0x44,0x20,0xa2,0x44,0x15,0x89,0xfa,0x28,0x22,0x08, + 0xa1,0xa8,0x22,0x04,0x50,0x20,0x02,0xf5,0x2a,0xaa,0xaa,0xaa,0xaa,0xaa,0x10, + 0x01,0x00,0x51,0x11,0x85,0x10,0x10,0x40,0x20,0x30,0x82,0x48,0xa2,0x08,0x02, + 0x90,0xa2,0x0a,0x8a,0x50,0xf5,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xf5,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf4,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0}; diff --git a/TCLSpecs/bitmaps/KPluk.xbm b/TCLSpecs/bitmaps/KPluk.xbm new file mode 100644 index 0000000..62b2528 --- /dev/null +++ b/TCLSpecs/bitmaps/KPluk.xbm @@ -0,0 +1,117 @@ +#define KPluk_width 220 +#define KPluk_height 61 +static char KPluk_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xfe,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7,0x02,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf4,0xfa,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xf5,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf5,0x5a,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0xf5,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf5,0xea,0xff,0xff,0xff,0xff,0xff,0xbf,0xaa,0xaa,0xaa,0xfa,0xed,0xff,0xef, + 0xbf,0xff,0xfe,0xbf,0xbe,0xaa,0xea,0x57,0x55,0x55,0x55,0x55,0x55,0xf5,0x4a, + 0x53,0xbd,0xaa,0xaa,0xaa,0x6a,0x00,0x00,0x00,0xbc,0xcf,0x7d,0x8f,0x2f,0x3e, + 0xf8,0x7a,0x78,0x00,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0xf5,0x6a,0x02,0x66, + 0x00,0x00,0x00,0x20,0x55,0x55,0x55,0x0d,0xdc,0xf9,0x2c,0x8f,0x84,0xf2,0x71, + 0x3d,0x55,0xd5,0x53,0x55,0x55,0x55,0x55,0x55,0xf5,0xca,0x81,0x44,0x55,0x55, + 0x55,0x35,0x00,0x00,0x00,0x4e,0x4d,0x7a,0x8c,0x2f,0x16,0xf4,0xf8,0x38,0x00, + 0x80,0x07,0x00,0x00,0x00,0x00,0x00,0xf5,0x5a,0x40,0x69,0x00,0x00,0x00,0x60, + 0x29,0xa5,0x94,0x1e,0xd8,0x78,0x2a,0x9f,0x81,0xf0,0xf2,0xba,0x4a,0xa9,0xa3, + 0x94,0x52,0x4a,0x29,0x55,0xf5,0x4a,0xc0,0x42,0x95,0x52,0x4a,0x29,0x42,0x08, + 0x41,0x7e,0x05,0x7c,0x11,0xcf,0x2a,0xfa,0xf4,0x38,0xcf,0x83,0xf7,0x21,0x84, + 0x10,0x42,0x00,0xf5,0x6a,0x40,0x10,0x20,0x84,0x10,0x62,0x08,0x21,0x14,0xfd, + 0x50,0x79,0x84,0xff,0x80,0xf0,0x71,0x7d,0xae,0xab,0x63,0x85,0x10,0x42,0x08, + 0x55,0xf5,0xca,0x80,0x8a,0x84,0x10,0x42,0x28,0x42,0x08,0x41,0xfc,0x07,0x7a, + 0x21,0xff,0x2a,0xf4,0x7a,0xb8,0x8e,0x83,0x37,0x20,0x84,0x10,0x42,0x00,0xf5, + 0x5a,0x01,0x20,0x22,0x84,0x10,0xa2,0x28,0xa2,0x10,0xf2,0xa7,0x78,0x14,0xff, + 0x01,0xf1,0x1f,0x3a,0xde,0xab,0x53,0x15,0x51,0x44,0x11,0xa9,0xf5,0x4a,0x5a, + 0x8a,0x10,0x51,0x44,0x31,0x02,0x09,0x84,0xc8,0x0f,0x7c,0x41,0xef,0xab,0xf4, + 0xa0,0xb8,0x8e,0x87,0x1b,0x80,0x04,0x12,0x48,0x02,0xf5,0x6a,0x95,0x20,0x8a, + 0x04,0x12,0xa4,0xa8,0xa0,0x52,0x22,0x5f,0x79,0x24,0xdf,0x07,0xf0,0x0a,0x3a, + 0xae,0xd3,0x3f,0x55,0x50,0x41,0x05,0x50,0xf5,0x4a,0x14,0x8a,0x40,0x50,0x41, + 0x31,0x02,0x0a,0x00,0x8b,0x0e,0x7a,0x41,0xcf,0xaf,0xfa,0x20,0x79,0x8f,0x83, + 0x7b,0x00,0x05,0x14,0x50,0x05,0xf5,0x5a,0xf1,0x20,0x14,0x05,0x14,0xa4,0xa8, + 0x40,0x55,0x26,0x9e,0xf8,0x14,0x0f,0x1f,0xf0,0x4a,0x3c,0xae,0xab,0xfb,0x55, + 0x50,0x41,0x05,0x50,0xf5,0x4a,0x84,0x09,0x41,0x20,0x21,0x31,0x02,0x2a,0x00, + 0x8e,0x46,0x7c,0x40,0xaf,0x7e,0xf5,0x01,0xb9,0x9e,0x83,0xe3,0x00,0x05,0x14, + 0x50,0x05,0xf5,0x6a,0x41,0xa3,0x14,0x4a,0x44,0xa4,0x90,0x80,0xaa,0x2e,0x0b, + 0x79,0x15,0x0f,0x3e,0xf0,0x54,0x38,0xfc,0xd7,0xf7,0x49,0x20,0x81,0x04,0x50, + 0xf5,0x4a,0x14,0x0a,0x40,0x81,0x1c,0x31,0x44,0x24,0x00,0xf2,0x43,0xfe,0xc1, + 0xbf,0xff,0xfe,0x03,0x7e,0x9d,0xc7,0xf7,0x23,0x8a,0x28,0x51,0x05,0xf5,0x6a, + 0x81,0x42,0x15,0x28,0x7c,0xa0,0x12,0x89,0x54,0x09,0x28,0x22,0xaa,0x52,0x88, + 0x10,0xa8,0x48,0xa2,0x20,0x80,0x8a,0x20,0x02,0x04,0x50,0xf5,0xca,0xf8,0x2b, + 0x40,0x05,0xdd,0x35,0x40,0x20,0x01,0xa2,0x82,0x88,0x00,0x04,0x42,0x84,0x02, + 0x22,0x08,0x8a,0x2a,0x20,0x8a,0x50,0x91,0x04,0xf5,0x5a,0x2e,0x80,0x12,0xe0, + 0xb7,0x61,0x15,0x0a,0xa4,0x08,0x28,0x22,0xaa,0x50,0x11,0x51,0xa8,0x88,0xa2, + 0x20,0x80,0x8a,0x20,0x0a,0x04,0x51,0xf5,0x4a,0x84,0x52,0x44,0xca,0x57,0x2b, + 0x40,0x41,0x09,0x42,0x82,0x88,0x00,0x04,0x48,0x04,0x02,0x20,0x08,0x8a,0x2a, + 0x20,0x8a,0x20,0x51,0x04,0xf5,0x6a,0x2b,0xa4,0x93,0xa0,0x6b,0xa3,0x12,0x14, + 0x90,0x28,0x21,0x22,0x52,0x51,0x05,0xa2,0x48,0x85,0xa2,0x20,0x00,0x89,0x20, + 0x44,0x04,0x51,0xf5,0x4a,0x01,0x31,0x1c,0x8a,0xa6,0x37,0x20,0x81,0x22,0x02, + 0x88,0x88,0x04,0x04,0xa0,0x10,0x22,0x20,0x08,0x0a,0x55,0x22,0x08,0x11,0x51, + 0x04,0xf5,0x6a,0x55,0x1c,0xf0,0xa0,0xeb,0xa3,0x8a,0x28,0x88,0x50,0x25,0x22, + 0x50,0x51,0x15,0x8a,0x08,0x15,0x91,0xa0,0x00,0x88,0xa2,0x44,0x04,0xa1,0xf5, + 0xca,0x81,0x0c,0x00,0xcf,0xbd,0x29,0x20,0x84,0x03,0x0a,0x70,0x08,0x05,0xf8, + 0x80,0x20,0xa7,0x80,0x4c,0xe4,0x5f,0x21,0xf7,0x6e,0x48,0x14,0xf5,0x5a,0x25, + 0xc2,0x1f,0xf8,0xb3,0xa4,0x0a,0xd1,0xa9,0x40,0xed,0x42,0x90,0xce,0x2a,0xca, + 0x0e,0x2a,0x0e,0x29,0x37,0x88,0x6e,0x6e,0x05,0x41,0xf5,0x4a,0x8f,0x61,0xe8, + 0x70,0x32,0x31,0x40,0xc4,0x03,0x14,0x66,0x10,0x45,0xac,0x80,0x60,0x96,0x80, + 0x50,0x60,0x93,0x22,0xe6,0x43,0x2e,0x12,0xf5,0xda,0x9e,0x90,0x92,0xef,0x64, + 0xa4,0x2a,0x51,0xfb,0xf1,0xef,0xeb,0x1b,0x9d,0xfb,0xfb,0x5e,0xde,0xcf,0x17, + 0xcb,0xf3,0x66,0x79,0x8f,0x40,0xf5,0x4a,0x48,0x28,0x3f,0xbe,0x39,0x31,0x00, + 0x64,0xe3,0xdf,0x6f,0x73,0x57,0x78,0xd3,0xe6,0x36,0x7f,0x6e,0x82,0x63,0xdf, + 0xef,0xe3,0x26,0x14,0xf5,0x5a,0x3d,0xce,0xf0,0x3f,0x08,0xa4,0x52,0x61,0x77, + 0xbb,0x67,0xf7,0x17,0xea,0xf7,0x6e,0xb6,0xff,0xfd,0x29,0xf7,0xbe,0x67,0x6b, + 0x8e,0x42,0xf5,0xca,0x1f,0x63,0xd5,0x3f,0x5e,0x31,0x04,0xf8,0x67,0x9b,0x77, + 0x73,0x8e,0xc4,0xd6,0x67,0x37,0xe3,0xcf,0x03,0x63,0x9e,0x77,0xe7,0x26,0x10, + 0xf5,0xea,0x88,0x59,0xe0,0xfe,0x07,0x60,0xa1,0x12,0x6e,0xfb,0xe7,0xf3,0x46, + 0xee,0xce,0x76,0x7e,0xaf,0xbf,0xab,0xeb,0xff,0xe7,0x6e,0x0e,0x45,0xf5,0xca, + 0x6b,0x0a,0x9a,0xdf,0xa4,0x2a,0x14,0xb8,0xff,0xf7,0x7d,0xef,0x2f,0x7c,0xfd, + 0xce,0x77,0xfe,0xff,0x85,0xc7,0xf3,0x7f,0xfe,0x4d,0x10,0xf5,0xda,0xbe,0xa8, + 0x68,0x43,0x11,0x20,0x81,0x4a,0x14,0x0a,0x12,0x00,0x88,0x12,0x04,0x22,0x01, + 0x01,0x00,0x41,0x28,0x08,0x12,0x12,0x20,0x45,0xf5,0x4a,0x3d,0xce,0xb7,0x17, + 0x84,0x6a,0x28,0x10,0x41,0x20,0x88,0xaa,0x22,0x80,0xaf,0x48,0x54,0x54,0x55, + 0x28,0x02,0xa5,0xa0,0x88,0x0a,0x10,0xf5,0x4a,0xf4,0x77,0x5b,0x23,0x21,0x20, + 0x02,0x45,0x14,0x89,0x42,0x00,0x08,0x55,0x03,0x02,0x01,0x01,0x00,0x85,0xa8, + 0x00,0x0a,0x42,0x40,0x45,0xf5,0xda,0x9e,0x20,0xbe,0x86,0x88,0x6a,0x51,0x10, + 0x41,0x22,0x28,0xaa,0xa2,0x00,0xa9,0x50,0x54,0x54,0x55,0x20,0x02,0xaa,0xa0, + 0x28,0x2a,0x20,0xf5,0x4a,0x2e,0xfe,0x5c,0x2e,0x24,0x20,0x08,0x42,0x14,0x48, + 0x82,0x00,0x08,0x2a,0x02,0x0a,0x01,0x01,0x00,0x8a,0xa8,0x00,0x0a,0x02,0x81, + 0x8a,0xf5,0x6a,0x87,0xfe,0x71,0x85,0x02,0xb5,0xa2,0x08,0x81,0x02,0x24,0x4a, + 0x91,0x80,0xa8,0x40,0x54,0xa8,0xaa,0x20,0x02,0xaa,0xa0,0x50,0x28,0x20,0xf5, + 0x4a,0x11,0x7f,0x41,0x26,0x50,0x20,0x88,0x47,0x54,0x50,0x89,0x10,0x22,0x2a, + 0x38,0x14,0xf1,0x03,0xb8,0x8a,0xf0,0x00,0x34,0x8e,0x83,0x0b,0xf5,0xea,0xc9, + 0xff,0xc1,0x8e,0x0a,0xaa,0x42,0x17,0x01,0x0b,0x20,0x42,0x88,0xc0,0x72,0x41, + 0x64,0x4f,0xcd,0x20,0xc4,0x4a,0xb9,0xdf,0xf7,0x40,0xf5,0xca,0x85,0xff,0x40, + 0x25,0xa0,0x30,0x10,0x43,0xa8,0x41,0x89,0x10,0x02,0x69,0x34,0x14,0x68,0x16, + 0xa6,0x89,0xe2,0x10,0x34,0xfb,0x66,0x2a,0xf5,0x5a,0xd0,0xbf,0x80,0x86,0x0a, + 0xa2,0x4a,0xfb,0xfa,0xef,0xdb,0xb7,0xfc,0xf3,0xf1,0xd9,0xe3,0x86,0x16,0x78, + 0xde,0x4d,0x71,0xdb,0xbe,0x00,0xf5,0xca,0xa4,0x9f,0x84,0x2b,0xa0,0x30,0x20, + 0xb7,0xcd,0x5d,0x9b,0x6d,0xfe,0x6e,0xb4,0x99,0xe8,0x53,0x86,0xee,0xfb,0x16, + 0x34,0x9e,0xf7,0xaa,0xf5,0x5a,0x79,0xa2,0x0f,0x43,0x0a,0xa4,0x8a,0xb3,0xbd, + 0x59,0xbf,0x7f,0xff,0x66,0xb1,0xbb,0x62,0x04,0x57,0xdc,0xf7,0x43,0xb1,0xba, + 0xb6,0x01,0xf5,0x4a,0xb4,0xd5,0x1e,0x8b,0xa0,0x32,0x00,0xfb,0xfb,0x1d,0x9b, + 0x6d,0xc6,0x77,0xb8,0xb1,0x70,0x51,0x0e,0xcd,0xf3,0x16,0x38,0x0c,0xbb,0x53, + 0xf5,0xda,0x5b,0x41,0x23,0x26,0x0a,0x60,0x55,0xb3,0xf5,0x59,0xbf,0xed,0xde, + 0xe6,0xf2,0x75,0x65,0x9a,0xac,0xfc,0xff,0xbe,0x72,0xcf,0xb3,0x05,0xf5,0x4a, + 0x76,0xff,0x55,0x84,0xa0,0x2a,0x80,0xbf,0xbf,0x3f,0xf6,0xed,0xfc,0xce,0xd4, + 0xe8,0xf0,0x18,0x7a,0x7a,0xfe,0x3c,0x78,0xd3,0xe9,0x50,0xf5,0xda,0xff,0xff, + 0xff,0xff,0xff,0x7f,0xaa,0x44,0x04,0xa4,0x02,0x25,0x05,0x29,0x20,0x22,0x2a, + 0xa5,0x00,0x01,0x81,0xa2,0x0a,0x08,0xa2,0x04,0xf5,0x4a,0x00,0x09,0x01,0x12, + 0x04,0x80,0x00,0x10,0x51,0x09,0x50,0x10,0x50,0x82,0x0a,0xb9,0x40,0x08,0xaa, + 0xa8,0x28,0x38,0x40,0x45,0x08,0x51,0xf5,0x0a,0x55,0x44,0xa8,0x44,0x51,0x15, + 0x54,0x45,0x04,0xa0,0x0a,0x85,0x04,0x28,0x40,0x3c,0x0a,0xa1,0x00,0x04,0x84, + 0x82,0x2a,0x20,0x22,0x04,0xf5,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xf5,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf4,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0}; diff --git a/TCLSpecs/bitmaps/KVoicForm.xbm b/TCLSpecs/bitmaps/KVoicForm.xbm new file mode 100644 index 0000000..ef9b130 --- /dev/null +++ b/TCLSpecs/bitmaps/KVoicForm.xbm @@ -0,0 +1,117 @@ +#define KVoicForm_width 220 +#define KVoicForm_height 61 +static char KVoicForm_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xfe,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7,0x02,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf4,0xfa,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xf5,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf5,0x5a,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0xf5,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf5,0xea,0xff,0xff,0xff,0xff,0xff,0xbf,0xaa,0xaa,0xaa,0xfa,0xed,0xff,0xef, + 0xbf,0x7f,0xff,0xfb,0x55,0xd5,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xf5,0xca, + 0xaa,0xaa,0xfa,0xea,0xbd,0x6a,0x00,0x00,0x00,0xbc,0xcf,0x7d,0x8f,0x2f,0xbe, + 0xfc,0xe0,0x02,0xc0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xf5,0x5a,0x00,0x00, + 0x06,0x10,0x36,0x20,0x55,0x55,0x55,0x0d,0xdc,0xf9,0x2c,0x8f,0x0c,0x7c,0xca, + 0x50,0xd5,0x57,0x55,0x55,0x55,0x55,0x55,0x55,0xf5,0x4a,0x55,0xd5,0x91,0x84, + 0x2c,0x35,0x00,0x00,0x00,0x4e,0x4d,0x7a,0x8c,0x2f,0x42,0x79,0x40,0x04,0x80, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xf5,0x6a,0x00,0x60,0x08,0x51,0x78,0x60, + 0x29,0xa5,0x94,0x1e,0xd8,0x78,0x2a,0x9f,0x13,0xf4,0x6a,0x22,0x55,0x29,0xa5, + 0x94,0x52,0x4a,0x29,0x55,0xf5,0xca,0x52,0x3a,0x45,0x04,0xf2,0x29,0x42,0x08, + 0x41,0x7e,0x05,0x7c,0x11,0xcf,0x44,0xf1,0x20,0xe9,0xc1,0x03,0x0f,0x79,0x84, + 0x10,0x42,0x00,0xf5,0x4a,0x04,0x4c,0x10,0xa1,0xe0,0x63,0x08,0x21,0x14,0xfd, + 0x50,0x79,0x84,0xff,0x10,0xf4,0x5b,0x30,0x97,0xd7,0x79,0xc6,0x10,0x42,0x08, + 0x55,0xf5,0x5a,0xa1,0x06,0xff,0x09,0x4a,0x2b,0x42,0x08,0x41,0xfc,0x07,0x7a, + 0x21,0xff,0x45,0xe1,0x11,0x9d,0x86,0xc3,0x3c,0xee,0x85,0x10,0x42,0x00,0xf5, + 0x4a,0x88,0xd3,0x01,0xff,0xc7,0xa6,0x28,0xa2,0x10,0xf2,0xa7,0x78,0x14,0xff, + 0x11,0xd2,0x5b,0x5c,0xde,0xeb,0xb9,0xc7,0x51,0x44,0x11,0xa9,0xf5,0x6a,0xc5, + 0x38,0x24,0x00,0x9c,0x3c,0x02,0x09,0x84,0xc8,0x0f,0x7c,0x41,0xef,0x47,0xc4, + 0x1b,0x1d,0x8e,0xe3,0x24,0xff,0x05,0x12,0x48,0x02,0xf5,0x4a,0x60,0x0e,0x01, + 0x49,0x90,0xab,0xa8,0xa0,0x52,0x22,0x5f,0x79,0x24,0xcf,0x17,0xa1,0x4f,0xbc, + 0xae,0xeb,0x01,0x27,0x50,0x41,0x05,0x50,0xf5,0x6a,0xb5,0xe1,0xff,0x10,0x35, + 0x2a,0x02,0x0a,0x00,0x8b,0x0e,0x7a,0x89,0xaf,0x4f,0x94,0x17,0x1e,0x8e,0xe7, + 0xa8,0x0f,0x05,0x14,0x50,0x05,0xf5,0x4a,0xd0,0x38,0xc0,0x5f,0xe0,0xbe,0xa8, + 0x40,0x55,0x26,0x9e,0xf8,0x20,0x0f,0x1f,0xc1,0x87,0x5c,0xaf,0xf3,0x05,0xaf, + 0x50,0x41,0x05,0x50,0xf5,0xda,0x5a,0x8e,0x14,0xe0,0x75,0x26,0x02,0x2a,0x00, + 0x8e,0x46,0x7c,0x0a,0xaf,0x3e,0x14,0x57,0x1a,0x96,0xc3,0x63,0x0e,0x05,0x14, + 0x50,0x05,0xf5,0x4a,0xcc,0x23,0x00,0x89,0x12,0xb2,0x90,0x80,0xaa,0x2e,0x0b, + 0x79,0xa0,0x0f,0x7e,0x81,0x07,0xb0,0xc3,0xab,0x9f,0xfe,0x21,0x81,0x04,0x50, + 0xf5,0x6a,0x66,0x88,0xaa,0x10,0xb4,0x60,0x44,0x24,0x00,0xf2,0x43,0xfe,0xc9, + 0x7f,0xff,0x28,0xa2,0xea,0xcb,0x07,0x2f,0x3a,0x88,0x28,0x51,0x05,0xf5,0xca, + 0x36,0x22,0x00,0x5e,0x3d,0x2a,0x12,0x89,0x54,0x09,0x28,0x92,0x22,0x88,0x04, + 0x82,0x12,0x20,0x20,0x52,0x89,0x48,0x25,0x02,0x04,0x50,0xf5,0x5a,0x93,0x88, + 0xfa,0xe3,0xe8,0x20,0x41,0x20,0x01,0xa2,0x82,0x40,0x88,0x12,0xa1,0x28,0x88, + 0x0a,0x89,0x04,0x22,0x22,0x80,0x50,0x91,0x04,0xf5,0xca,0x01,0x7f,0x0f,0x88, + 0xca,0x6a,0x14,0x0a,0xa4,0x08,0x28,0x14,0x22,0x40,0x14,0x42,0x42,0x40,0x22, + 0xa0,0x88,0x88,0x2a,0x0a,0x04,0x51,0xf5,0xca,0xd4,0x01,0x40,0xe2,0xf8,0x20, + 0x41,0x41,0x09,0x42,0x82,0x82,0x08,0x15,0x81,0x08,0x11,0x2a,0x88,0x0a,0x02, + 0x22,0x80,0x20,0x51,0x04,0xf5,0xda,0x60,0xa0,0x94,0x3c,0x24,0x35,0x12,0x14, + 0x90,0x28,0x24,0x28,0xa2,0x40,0x28,0x22,0x44,0x81,0x22,0xa0,0x50,0x08,0x29, + 0x44,0x04,0x51,0xf5,0x4a,0x34,0x0a,0x01,0x87,0x1e,0xa0,0x20,0x81,0x22,0x02, + 0x89,0x82,0x08,0x0a,0x85,0x08,0x11,0x28,0x88,0x0a,0x0a,0x42,0x02,0x11,0x51, + 0x04,0xf5,0x6a,0x11,0x41,0x28,0xf1,0x7b,0x35,0x8a,0x28,0x88,0xa8,0x20,0x28, + 0x91,0x40,0x20,0x42,0x84,0x02,0x21,0x90,0xa0,0x28,0xa8,0x44,0x04,0xa1,0xf5, + 0x4a,0x5a,0x14,0xc5,0x3d,0x60,0xa0,0x20,0x84,0x03,0x02,0x74,0x02,0x44,0xfc, + 0x8a,0x28,0x27,0xa8,0x4c,0xe2,0x1f,0x82,0xf7,0x6e,0x48,0x14,0xf5,0xda,0x08, + 0x41,0x60,0x04,0x69,0x29,0x0a,0xd1,0xa9,0x50,0xe5,0x50,0x01,0xdd,0x20,0xc2, + 0x96,0x02,0x8e,0x28,0xb7,0x24,0x66,0x6e,0x05,0x41,0xf5,0x4a,0x4c,0x14,0x35, + 0x46,0x3c,0xa4,0x40,0xc4,0x03,0x04,0x6e,0x04,0x54,0x8c,0x8a,0x68,0x06,0x90, + 0x28,0x62,0x13,0x88,0xee,0x43,0x2e,0x12,0xf5,0x5a,0x15,0x41,0xf0,0x13,0x46, + 0x31,0x2a,0x51,0xfb,0xf3,0xef,0xf3,0x1b,0x5d,0xf3,0xf3,0x5f,0xdf,0xcf,0x13, + 0xd3,0xf3,0x66,0x79,0x8f,0x40,0xf5,0x4a,0x44,0x14,0x05,0x88,0x12,0xa4,0x00, + 0x64,0x67,0xdf,0x6f,0x73,0x57,0x78,0xd7,0x6e,0x3e,0x77,0x6e,0x8a,0xe7,0xdf, + 0xef,0xe3,0x26,0x14,0xf5,0x6a,0x15,0x41,0x40,0x42,0x4a,0x31,0xa9,0xa8,0x76, + 0xbb,0x67,0xf7,0x17,0xea,0xf3,0xe6,0x76,0xff,0xfd,0x23,0x6b,0xbe,0x67,0x6b, + 0x8e,0x42,0xf5,0x4a,0x44,0x10,0x95,0x28,0x03,0x24,0x02,0xf2,0x67,0x9b,0x77, + 0xb3,0x86,0xd4,0xd6,0x6f,0x36,0xe7,0xcf,0x0b,0xe3,0x9e,0x77,0xe7,0x26,0x10, + 0xf5,0x6a,0x1d,0x45,0x00,0x02,0xaa,0xa8,0xa8,0x30,0xee,0xbb,0xe7,0x7b,0x2e, + 0xcd,0xcf,0xe6,0x76,0x2f,0x6f,0x43,0xeb,0xbe,0xe7,0x6e,0x0e,0x45,0xf5,0x4a, + 0x50,0x10,0xaa,0x50,0x05,0x22,0x02,0xba,0x7f,0xff,0x7c,0xe7,0x0f,0x7c,0xfc, + 0xde,0x77,0xfe,0xff,0xa9,0xc7,0xf7,0x7f,0xfe,0x4d,0x10,0xf5,0x6a,0x35,0x85, + 0x00,0x0a,0xac,0xb0,0xa8,0x08,0x92,0xa0,0x12,0x24,0x51,0x49,0x06,0x01,0x09, + 0x41,0x89,0x04,0x52,0x20,0x11,0x12,0x20,0x45,0xf5,0xca,0x60,0x50,0xaa,0x40, + 0x0d,0x24,0x02,0x42,0x08,0x0a,0x44,0x41,0x04,0x22,0x57,0x48,0x44,0x14,0x20, + 0xa2,0x04,0x4a,0x84,0x88,0x0a,0x10,0xf5,0xda,0x44,0x05,0x00,0x14,0xa8,0xb2, + 0x90,0x28,0xa2,0x40,0x11,0x14,0xa1,0x08,0x03,0x12,0x11,0x81,0x8a,0x10,0x50, + 0x01,0x51,0x42,0x40,0x45,0xf5,0xca,0x62,0x10,0x20,0x00,0x0a,0x20,0x24,0x82, + 0x08,0x14,0x44,0x41,0x08,0xa2,0x54,0x41,0x44,0x28,0x20,0x44,0x05,0x54,0x04, + 0x28,0x2a,0x20,0xf5,0xda,0xa8,0x84,0x0a,0x42,0x88,0xa2,0x82,0x28,0x42,0x81, + 0x10,0x14,0x45,0x08,0x02,0x14,0x11,0x05,0x09,0x11,0x20,0x01,0xa1,0x02,0x81, + 0x8a,0xf5,0xca,0x32,0xc2,0x8f,0x88,0x02,0x30,0x28,0x82,0x10,0x54,0x44,0x41, + 0x20,0xa2,0x50,0x41,0x44,0x50,0xa2,0x84,0x4a,0x54,0x14,0x50,0x28,0x20,0xf5, + 0x5a,0x90,0x18,0xd0,0xeb,0x89,0xa0,0x82,0x27,0x4a,0x01,0x11,0x12,0x8a,0x08, + 0x3a,0x08,0xf1,0x07,0xb8,0x20,0xe0,0x01,0x71,0x8f,0x83,0x0b,0xf5,0x4a,0x15, + 0x96,0x4a,0x00,0x00,0x20,0x50,0x8b,0x00,0x55,0x44,0x44,0x21,0xc2,0x34,0x45, + 0x68,0xa6,0xce,0x95,0xca,0x48,0x38,0xdf,0xf7,0x40,0xf5,0x6a,0xb8,0x07,0x00, + 0x02,0x22,0x64,0x05,0x23,0xaa,0x01,0x81,0x10,0x88,0x70,0xb0,0x10,0xe5,0x16, + 0xae,0x00,0xd0,0x12,0x35,0xfb,0x66,0x2a,0xf5,0x4a,0x09,0x09,0x90,0x48,0x04, + 0x30,0x50,0xff,0xf8,0xef,0xdf,0xb6,0xfe,0xf7,0xfa,0xba,0x61,0x86,0x86,0xfc, + 0xde,0x4c,0x70,0xdb,0xbe,0x00,0xf5,0x6a,0x4c,0x41,0x45,0x00,0x20,0x22,0x05, + 0xb3,0xcd,0x5d,0xbb,0x6f,0xee,0xe6,0xb0,0x99,0xf4,0x2b,0x16,0xed,0xfb,0x0e, + 0x35,0x9e,0xf7,0xaa,0xf5,0x4a,0x05,0x0b,0x00,0xa2,0x44,0x60,0xa0,0xf3,0xbf, + 0x59,0x9b,0x7d,0xfe,0x6e,0xb4,0xbb,0x61,0x82,0x46,0xdc,0xf7,0x43,0xb0,0xba, + 0xb6,0x01,0xf5,0x5a,0x54,0x81,0x8a,0x00,0x00,0x25,0x0a,0xb7,0xf9,0x3b,0xbb, + 0xed,0xd6,0x66,0xb2,0xb1,0xe8,0x28,0x16,0xcd,0xf3,0x2e,0x3a,0x0c,0xbb,0x53, + 0xf5,0xca,0x06,0x15,0x10,0x48,0x41,0x60,0x41,0xb3,0xf7,0x99,0x9f,0x6d,0xce, + 0xf7,0xf8,0x75,0x65,0x1a,0x8d,0xdc,0xff,0x3d,0xb1,0xce,0xb3,0x05,0xf5,0x5a, + 0xaa,0x41,0x45,0x02,0x88,0x24,0x94,0xbf,0x7f,0x3f,0xf6,0xef,0xfd,0xce,0xd2, + 0x61,0xf0,0xb8,0xfc,0x7a,0xfe,0xbc,0x78,0xd3,0xe9,0x50,0xf5,0xca,0xff,0xff, + 0xff,0xff,0xff,0x3f,0x21,0x49,0x00,0x92,0x4a,0x20,0x48,0x20,0x08,0xb4,0x2a, + 0x05,0x20,0x48,0x21,0x22,0x4a,0x0a,0xa2,0x04,0xf5,0x4a,0x00,0x09,0x00,0x48, + 0x02,0x50,0x44,0x20,0x2a,0x21,0x20,0x8a,0x22,0x8a,0xa2,0x38,0x40,0x90,0x8a, + 0x22,0x88,0x98,0x80,0x40,0x08,0x51,0xf5,0x1a,0x55,0xa2,0xaa,0x82,0x50,0x05, + 0x11,0x0a,0x81,0x08,0x09,0x21,0x08,0x21,0x08,0x9a,0x0a,0x45,0x20,0x88,0x22, + 0x22,0x2a,0x2a,0x22,0x04,0xf5,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xf5,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf4,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0}; diff --git a/TCLSpecs/bitmaps/KVoiceFM.xbm b/TCLSpecs/bitmaps/KVoiceFM.xbm new file mode 100644 index 0000000..b795a8b --- /dev/null +++ b/TCLSpecs/bitmaps/KVoiceFM.xbm @@ -0,0 +1,117 @@ +#define KVoiceFM_width 220 +#define KVoiceFM_height 61 +static char KVoiceFM_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xfe,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7,0x02,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf4,0xfa,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xf5,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf5,0x5a,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0xf5,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf5,0xea,0xff,0xff,0xff,0xff,0xff,0xbf,0xaa,0xaa,0xaa,0xfa,0xed,0xff,0xef, + 0xbf,0x7f,0xff,0xfb,0x55,0xd5,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xf5,0xca, + 0xaa,0xaa,0xfa,0xea,0xbd,0x6a,0x00,0x00,0x00,0xbc,0xcf,0x7d,0x8f,0x2f,0xbe, + 0xfc,0xe0,0x02,0xc0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xf5,0x5a,0x00,0x00, + 0x06,0x10,0x36,0x20,0x55,0x55,0x55,0x0d,0xdc,0xf9,0x2c,0x8f,0x0c,0x7c,0xca, + 0x50,0xd5,0x57,0x55,0x55,0x55,0x55,0x55,0x55,0xf5,0x4a,0x55,0xd5,0x91,0x84, + 0x2c,0x35,0x00,0x00,0x00,0x4e,0x4d,0x7a,0x8c,0x2f,0x42,0x79,0x40,0x04,0x80, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xf5,0x6a,0x00,0x60,0x08,0x51,0x78,0x60, + 0x29,0xa5,0x94,0x1e,0xd8,0x78,0x2a,0x9f,0x13,0xf4,0x6a,0x22,0x55,0x29,0xa5, + 0x94,0x52,0x4a,0x29,0x55,0xf5,0xca,0x52,0x3a,0x45,0x04,0xf2,0x29,0x42,0x08, + 0x41,0x7e,0x05,0x7c,0x11,0xcf,0x44,0xf1,0x20,0xe9,0xc1,0x03,0x0f,0x79,0x84, + 0x10,0x42,0x00,0xf5,0x4a,0x04,0x4c,0x10,0xa1,0xe0,0x63,0x08,0x21,0x14,0xfd, + 0x50,0x79,0x84,0xff,0x10,0xf4,0x5b,0x30,0x97,0xd7,0x79,0xc6,0x10,0x42,0x08, + 0x55,0xf5,0x5a,0xa1,0x06,0xff,0x09,0x4a,0x2b,0x42,0x08,0x41,0xfc,0x07,0x7a, + 0x21,0xff,0x45,0xe1,0x11,0x9d,0x86,0xc3,0x3c,0xee,0x85,0x10,0x42,0x00,0xf5, + 0x4a,0x88,0xd3,0x01,0xff,0xc7,0xa6,0x28,0xa2,0x10,0xf2,0xa7,0x78,0x14,0xff, + 0x11,0xd2,0x5b,0x5c,0xde,0xeb,0xb9,0xc7,0x51,0x44,0x11,0xa9,0xf5,0x6a,0xc5, + 0x38,0x24,0x00,0x9c,0x3c,0x02,0x09,0x84,0xc8,0x0f,0x7c,0x41,0xef,0x47,0xc4, + 0x1b,0x1d,0x8e,0xe3,0x24,0xff,0x05,0x12,0x48,0x02,0xf5,0x4a,0x60,0x0e,0x01, + 0x49,0x90,0xab,0xa8,0xa0,0x52,0x22,0x5f,0x79,0x24,0xcf,0x17,0xa1,0x4f,0xbc, + 0xae,0xeb,0x01,0x27,0x50,0x41,0x05,0x50,0xf5,0x6a,0xb5,0xe1,0xff,0x10,0x35, + 0x2a,0x02,0x0a,0x00,0x8b,0x0e,0x7a,0x89,0xaf,0x4f,0x94,0x17,0x1e,0x8e,0xe7, + 0xa8,0x0f,0x05,0x14,0x50,0x05,0xf5,0x4a,0xd0,0x38,0xc0,0x5f,0xe0,0xbe,0xa8, + 0x40,0x55,0x26,0x9e,0xf8,0x20,0x0f,0x1f,0xc1,0x87,0x5c,0xaf,0xf3,0x05,0xaf, + 0x50,0x41,0x05,0x50,0xf5,0xda,0x5a,0x8e,0x14,0xe0,0x75,0x26,0x02,0x2a,0x00, + 0x8e,0x46,0x7c,0x0a,0xaf,0x3e,0x14,0x57,0x1a,0x96,0xc3,0x63,0x0e,0x05,0x14, + 0x50,0x05,0xf5,0x4a,0xcc,0x23,0x00,0x89,0x12,0xb2,0x90,0x80,0xaa,0x2e,0x0b, + 0x79,0xa0,0x0f,0x7e,0x81,0x07,0xb0,0xc3,0xab,0x9f,0xfe,0x21,0x81,0x04,0x50, + 0xf5,0x6a,0x66,0x88,0xaa,0x10,0xb4,0x60,0x44,0x24,0x00,0xf2,0x43,0xfe,0xc9, + 0x7f,0xff,0x28,0xa2,0xea,0xcb,0x07,0x2f,0x3a,0x88,0x28,0x51,0x05,0xf5,0xca, + 0x36,0x22,0x00,0x5e,0x3d,0x2a,0x12,0x89,0x54,0x09,0x28,0x92,0x22,0x88,0x04, + 0x82,0x12,0x20,0x20,0x52,0x89,0x48,0x25,0x02,0x04,0x50,0xf5,0x5a,0x93,0x88, + 0xfa,0xe3,0xe8,0x20,0x41,0x20,0x01,0xa2,0x82,0x40,0x88,0x12,0xa1,0x28,0x88, + 0x0a,0x89,0x04,0x22,0x22,0x80,0x50,0x91,0x04,0xf5,0xca,0x01,0x7f,0x0f,0x88, + 0xca,0x6a,0x14,0x0a,0xa4,0x08,0x28,0x14,0x22,0x40,0x14,0x42,0x42,0x40,0x22, + 0xa0,0x88,0x88,0x2a,0x0a,0x04,0x51,0xf5,0xca,0xd4,0x01,0x40,0xe2,0xf8,0x20, + 0x41,0x41,0x09,0x42,0x82,0x82,0x08,0x15,0x81,0x08,0x11,0x2a,0x88,0x0a,0x02, + 0x22,0x80,0x20,0x51,0x04,0xf5,0xda,0x60,0xa0,0x94,0x3c,0x24,0x35,0x12,0x14, + 0x90,0x28,0x24,0x28,0xa2,0x40,0x28,0x22,0x44,0x81,0x22,0xa0,0x50,0x08,0x29, + 0x44,0x04,0x51,0xf5,0x4a,0x34,0x0a,0x01,0x87,0x1e,0xa0,0x20,0x81,0x22,0x02, + 0x89,0x82,0x08,0x0a,0x85,0x08,0x11,0x28,0x88,0x0a,0x0a,0x42,0x02,0x11,0x51, + 0x04,0xf5,0x6a,0x11,0x41,0x28,0xf1,0x7b,0x35,0x8a,0x28,0x88,0xa8,0x20,0x28, + 0x91,0x40,0x20,0x42,0x84,0x02,0x21,0x90,0xa0,0x28,0xa8,0x44,0x04,0xa1,0xf5, + 0x4a,0x5a,0x14,0xc5,0x3d,0x60,0xa0,0x20,0x84,0x03,0x02,0x74,0x02,0x44,0xfc, + 0x8a,0x28,0x27,0xa8,0x4c,0xe2,0x1f,0x82,0xf7,0x6e,0x48,0x14,0xf5,0xda,0x08, + 0x41,0x60,0x04,0x69,0x29,0x0a,0xd1,0xa9,0x50,0xe5,0x50,0x01,0xdd,0x20,0xc2, + 0x96,0x02,0x8e,0x28,0xb7,0x24,0x66,0x6e,0x05,0x41,0xf5,0x4a,0x4c,0x14,0x35, + 0x46,0x3c,0xa4,0x40,0xc4,0x03,0x04,0x6e,0x04,0x54,0x8c,0x8a,0x68,0x06,0x90, + 0x28,0x62,0x13,0x88,0xee,0x43,0x2e,0x12,0xf5,0x5a,0x15,0x41,0xf0,0x13,0x46, + 0x31,0x2a,0x51,0xfb,0xf3,0xef,0xf3,0x1b,0x5d,0xf3,0xf3,0x5f,0xdf,0xcf,0x13, + 0xd3,0xf3,0x66,0x79,0x8f,0x40,0xf5,0x4a,0x44,0x14,0x05,0x88,0x12,0xa4,0x00, + 0x64,0x67,0xdf,0x6f,0x73,0x57,0x78,0xd7,0x6e,0x3e,0x77,0x6e,0x8a,0xe7,0xdf, + 0xef,0xe3,0x26,0x14,0xf5,0x6a,0x15,0x41,0x40,0x42,0x4a,0x31,0xa9,0xa8,0x76, + 0xbb,0x67,0xf7,0x17,0xea,0xf3,0xe6,0x76,0xff,0xfd,0x23,0x6b,0xbe,0x67,0x6b, + 0x8e,0x42,0xf5,0x4a,0x44,0x10,0x95,0x28,0x03,0x24,0x02,0xf2,0x67,0x9b,0x77, + 0xb3,0x86,0xd4,0xd6,0x6f,0x36,0xe7,0xcf,0x0b,0xe3,0x9e,0x77,0xe7,0x26,0x10, + 0xf5,0x6a,0x1d,0x45,0x00,0x02,0xaa,0xa8,0xa8,0x30,0xee,0xbb,0xe7,0x7b,0x2e, + 0xcd,0xcf,0xe6,0x76,0x2f,0x6f,0x43,0xeb,0xbe,0xe7,0x6e,0x0e,0x45,0xf5,0x4a, + 0x50,0x10,0xaa,0x50,0x05,0x22,0x02,0xba,0x7f,0xff,0x7c,0xe7,0x0f,0x7c,0xfc, + 0xde,0x77,0xfe,0xff,0xa9,0xc7,0xf7,0x7f,0xfe,0x4d,0x10,0xf5,0x6a,0x35,0x85, + 0x00,0x0a,0xac,0xb0,0xa8,0x08,0x92,0xa0,0x12,0x24,0x51,0x49,0x06,0x01,0x09, + 0x41,0x89,0x04,0x52,0x20,0x11,0x12,0x20,0x45,0xf5,0xca,0x60,0x50,0xaa,0x40, + 0x0d,0x24,0x02,0x42,0x08,0x0a,0x44,0x41,0x04,0x22,0x57,0x48,0x44,0x14,0x20, + 0xa2,0x04,0x4a,0x84,0x88,0x0a,0x10,0xf5,0xda,0x44,0x05,0x00,0x14,0xa8,0xb2, + 0x90,0x28,0xa2,0x40,0x11,0x14,0xa1,0x08,0x03,0x12,0x11,0x81,0x8a,0x10,0x50, + 0x01,0x51,0x42,0x40,0x45,0xf5,0xca,0x62,0xa0,0x52,0x01,0x08,0x20,0x24,0x82, + 0x08,0x14,0x44,0x41,0x08,0xa2,0x54,0x41,0x44,0x28,0x20,0x44,0x05,0x54,0x04, + 0x28,0x2a,0x20,0xf5,0xda,0x28,0x0a,0x04,0x84,0x8a,0xa2,0x82,0x28,0x42,0x81, + 0x10,0x14,0x45,0x08,0x02,0x14,0x11,0x05,0x09,0x11,0x20,0x01,0xa1,0x02,0x81, + 0x8a,0xf5,0xca,0x32,0xe1,0x5f,0x21,0x06,0x30,0x28,0x82,0x10,0x54,0x44,0x41, + 0x20,0xa2,0x50,0x41,0x44,0x50,0xa2,0x84,0x4a,0x54,0x14,0x50,0x28,0x20,0xf5, + 0x5a,0x50,0xbc,0xf0,0xef,0x89,0xa0,0x82,0x27,0x4a,0x01,0x11,0x12,0x8a,0x08, + 0x3a,0x08,0xf1,0x07,0xb8,0x20,0xe0,0x01,0x71,0x8f,0x83,0x0b,0xf5,0x4a,0x15, + 0x06,0x04,0x44,0x02,0x20,0x50,0x8b,0x00,0x55,0x44,0x44,0x21,0xc2,0x34,0x45, + 0x68,0xa6,0xce,0x95,0xca,0x48,0x38,0xdf,0xf7,0x40,0xf5,0x6a,0x98,0x53,0x51, + 0x01,0x20,0x64,0x05,0x23,0xaa,0x01,0x81,0x10,0x88,0x70,0xb0,0x10,0xe5,0x16, + 0xae,0x00,0xd0,0x12,0x35,0xfb,0x66,0x2a,0xf5,0x4a,0x49,0x09,0x04,0x08,0x04, + 0x30,0x50,0xff,0xf8,0xef,0xdf,0xb6,0xfe,0xf7,0xfa,0xba,0x61,0x86,0x86,0xfc, + 0xde,0x4c,0x70,0xdb,0xbe,0x00,0xf5,0x6a,0x1c,0x45,0xa1,0xa2,0x22,0x22,0x05, + 0xb3,0xcd,0x5d,0xbb,0x6f,0xee,0xe6,0xb0,0x99,0xf4,0x2b,0x16,0xed,0xfb,0x0e, + 0x35,0x9e,0xf7,0xaa,0xf5,0x4a,0x85,0x21,0x08,0x00,0x40,0x60,0xa0,0xf3,0xbf, + 0x59,0x9b,0x7d,0xfe,0x6e,0xb4,0xbb,0x61,0x82,0x46,0xdc,0xf7,0x43,0xb0,0xba, + 0xb6,0x01,0xf5,0x6a,0x24,0x0b,0xa5,0x8a,0x0a,0x25,0x0a,0xb7,0xf9,0x3b,0xbb, + 0xed,0xd6,0x66,0xb2,0xb1,0xe8,0x28,0x16,0xcd,0xf3,0x2e,0x3a,0x0c,0xbb,0x53, + 0xf5,0xca,0x16,0xa1,0x00,0x40,0x40,0x60,0x41,0xb3,0xf7,0x99,0x9f,0x6d,0xce, + 0xf7,0xf8,0x75,0x65,0x1a,0x8d,0xdc,0xff,0x3d,0xb1,0xce,0xb3,0x05,0xf5,0x5a, + 0x82,0x09,0xaa,0x0a,0x85,0x24,0x94,0xbf,0x7f,0x3f,0xf6,0xef,0xfd,0xce,0xd2, + 0x61,0xf0,0xb8,0xfc,0x7a,0xfe,0xbc,0x78,0xd3,0xe9,0x50,0xf5,0xca,0xff,0xff, + 0xff,0xff,0xff,0x3f,0x21,0x49,0x00,0x92,0x4a,0x20,0x48,0x20,0x08,0xb4,0x2a, + 0x05,0x20,0x48,0x21,0x22,0x4a,0x0a,0xa2,0x04,0xf5,0x2a,0x52,0x44,0x00,0x20, + 0x10,0x50,0x44,0x20,0x2a,0x21,0x20,0x8a,0x22,0x8a,0xa2,0x38,0x40,0x90,0x8a, + 0x22,0x88,0x98,0x80,0x40,0x08,0x51,0xf5,0x8a,0x04,0x11,0xaa,0x0a,0x45,0x05, + 0x11,0x0a,0x81,0x08,0x09,0x21,0x08,0x21,0x08,0x9a,0x0a,0x45,0x20,0x88,0x22, + 0x22,0x2a,0x2a,0x22,0x04,0xf5,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xf5,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf4,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0}; diff --git a/TCLSpecs/bitmaps/Klar.xbm b/TCLSpecs/bitmaps/Klar.xbm new file mode 100644 index 0000000..a9f8653 --- /dev/null +++ b/TCLSpecs/bitmaps/Klar.xbm @@ -0,0 +1,117 @@ +#define Klar_width 220 +#define Klar_height 61 +static char Klar_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xfe,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7,0x02,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf4,0xfa,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xf5,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf5,0x5a,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x55,0x55,0xf5,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf5,0xea,0xff,0xff,0xff,0xff,0xff,0xbf,0xaa,0xaa,0xaa,0xfa,0xed,0xff,0xef, + 0xbf,0x7f,0x5f,0x55,0x55,0xd5,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xf5,0x4a, + 0x53,0xbd,0xaa,0xaa,0xaa,0x6a,0x00,0x00,0x00,0xbc,0xcf,0x7d,0x8f,0x2f,0xbe, + 0x3c,0x00,0x00,0xc0,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0xf5,0x6a,0x02,0x66, + 0x00,0x00,0x00,0x20,0x55,0x55,0x55,0x0d,0xdc,0xf9,0x2c,0x8f,0x0c,0x1e,0x55, + 0x55,0xd5,0xab,0xaa,0xaa,0xaa,0x55,0x55,0x55,0xf5,0xca,0x81,0x44,0x55,0x75, + 0x55,0x35,0x00,0x00,0x00,0x4e,0x4d,0x7a,0x8c,0x2f,0x82,0x5c,0x00,0x00,0x80, + 0x03,0x00,0x00,0x80,0x01,0x00,0x00,0xf5,0x5a,0x40,0x69,0x00,0xdc,0x00,0x60, + 0x29,0xa5,0x94,0x1e,0xd8,0x78,0x2a,0x9f,0x53,0x1c,0x4a,0x29,0x55,0xa8,0x94, + 0x52,0xea,0x4b,0x29,0x55,0xf5,0x4a,0xc0,0x42,0xa9,0x87,0x4a,0x29,0x42,0x08, + 0x41,0x7e,0x05,0x7c,0x11,0xcf,0x08,0xbe,0x7c,0xf2,0xcc,0xe3,0x39,0xe4,0xe1, + 0x17,0x42,0x00,0xf5,0x6a,0x40,0x10,0x82,0xfc,0x10,0x62,0x08,0x21,0x14,0xfd, + 0x50,0x79,0x84,0xff,0xa2,0x1c,0xc2,0xe4,0xbf,0xcb,0xfd,0x18,0xcb,0x41,0x08, + 0x55,0xf5,0xca,0x80,0x8a,0x28,0x42,0x42,0x28,0x42,0x08,0x41,0xfc,0x07,0x7a, + 0x21,0xff,0x08,0xbc,0xef,0xf1,0x9c,0xd3,0xe7,0xba,0xd3,0x15,0x42,0x00,0xf5, + 0x5a,0x01,0xa0,0x82,0x10,0x11,0xa2,0x28,0xa2,0x10,0xf2,0xa7,0x78,0x14,0xff, + 0x43,0x1d,0xc7,0xe3,0xc2,0xc7,0xe9,0x1c,0xc7,0x41,0x11,0xa9,0xf5,0x4a,0x5a, + 0x0a,0x27,0x4a,0x44,0x31,0x02,0x09,0x84,0xc8,0x0f,0x7c,0x41,0xef,0x2b,0x3c, + 0xe9,0xe9,0x91,0xe3,0xe1,0xfd,0xef,0x15,0x48,0x02,0xf5,0x6a,0x95,0x40,0x8d, + 0x00,0x11,0xa4,0xa8,0xa0,0x52,0x22,0x5f,0x79,0x24,0xdf,0x07,0x9d,0xd8,0xe3, + 0x88,0xcb,0xeb,0x3c,0xc1,0x41,0x05,0x50,0xf5,0x4a,0x14,0x94,0x28,0x54,0x44, + 0x31,0x02,0x0a,0x00,0x8b,0x0e,0x7a,0x41,0x8f,0xaf,0x1c,0xd6,0xe9,0xc5,0xc3, + 0xe1,0x1d,0xd4,0x15,0x50,0x05,0xf5,0x5a,0xf1,0x02,0x18,0x01,0x11,0xa4,0xa8, + 0x40,0x55,0x26,0x9e,0xf8,0x14,0x4f,0x1f,0xbe,0xc7,0xe1,0x90,0xeb,0xeb,0x7c, + 0xc1,0x41,0x05,0x50,0xf5,0x4a,0x84,0x51,0x8f,0x28,0x22,0x31,0x02,0x2a,0x00, + 0x8e,0x46,0x7c,0x40,0x2f,0xbe,0x1c,0xd7,0xeb,0xa4,0xc3,0xe1,0x3a,0xec,0x1b, + 0x50,0x05,0xf5,0xda,0x48,0x09,0x48,0x42,0x44,0xa4,0x90,0x80,0xaa,0x2e,0x0b, + 0x79,0x15,0x0f,0x3f,0x5c,0xff,0xe3,0x81,0xd7,0xf5,0xf8,0xc3,0x87,0x04,0x50, + 0xf5,0x4a,0x11,0xa3,0x22,0x08,0x11,0x31,0x44,0x24,0x00,0xf2,0x43,0xfe,0xc1, + 0x7f,0xff,0x3f,0x8f,0xf9,0xeb,0xe7,0xf3,0xeb,0x94,0x2b,0x51,0x05,0xf5,0x5a, + 0x44,0x0a,0x88,0x42,0x40,0xa0,0x12,0x89,0x54,0x09,0x28,0x44,0x54,0x12,0x24, + 0x44,0xa8,0x04,0x82,0x10,0x44,0x40,0x81,0x00,0x04,0x50,0xf5,0x4a,0xf1,0x43, + 0x22,0x28,0x0a,0x35,0x40,0x20,0x01,0xa2,0x02,0x11,0x01,0x41,0x89,0x10,0x02, + 0xa2,0x28,0x44,0x11,0x15,0x54,0x54,0x91,0x04,0xf5,0x6a,0x1c,0x90,0x88,0x02, + 0x41,0x60,0x15,0x0a,0xa4,0x08,0xa8,0x44,0x54,0x14,0x20,0x44,0x91,0x10,0x82, + 0x12,0x44,0x40,0x01,0x02,0x04,0x51,0xf5,0xca,0x86,0x0a,0x22,0xa8,0x28,0x2a, + 0x40,0x41,0x09,0x42,0x02,0x10,0x01,0x81,0x0a,0x11,0x24,0x8a,0x20,0x40,0x11, + 0x12,0xa8,0x28,0x51,0x04,0xf5,0x5a,0x52,0x40,0x88,0x02,0x84,0xa0,0x12,0x14, + 0x90,0x28,0x51,0x45,0x54,0x28,0xa0,0x44,0x81,0x40,0x14,0x15,0x84,0x88,0x02, + 0x42,0x04,0x51,0xf5,0x4a,0x05,0x2a,0xfe,0xff,0x23,0x32,0x20,0x81,0x22,0x02, + 0x04,0x10,0x01,0x05,0x09,0x10,0x28,0x14,0x42,0x20,0x51,0x42,0xa8,0x08,0x51, + 0x04,0xf5,0xda,0xa1,0x00,0x03,0x00,0xff,0xac,0x8a,0x28,0x88,0x50,0xa1,0x44, + 0x48,0x50,0x44,0x45,0x05,0x41,0x11,0x09,0x04,0x10,0x02,0x42,0x04,0xa1,0xf5, + 0x4a,0x15,0xea,0xc3,0x0f,0x01,0x38,0x20,0x84,0x23,0x04,0xe8,0x11,0x22,0xf2, + 0x21,0x10,0xae,0x14,0x58,0xe2,0xbf,0x8a,0xfe,0xdd,0x48,0x14,0xf5,0x6a,0x81, + 0xf8,0xf7,0xcf,0x0d,0xba,0x0a,0x21,0x87,0xa2,0xca,0x44,0x09,0x99,0x8b,0xc4, + 0x0c,0x40,0x1d,0xc8,0x66,0x40,0xcc,0xdd,0x0a,0x41,0xf5,0xca,0x57,0x0e,0x02, + 0x08,0x01,0x38,0x40,0x94,0x27,0x10,0xdc,0x10,0x40,0x5c,0x21,0xc2,0x5d,0x15, + 0xa0,0x42,0x2e,0x15,0xdd,0x86,0x2c,0x12,0xf5,0x5a,0xde,0x77,0x23,0x1d,0x23, + 0xb3,0x2a,0xc1,0xee,0xe7,0xdf,0xc7,0x3f,0x39,0xee,0xf7,0x3d,0xfc,0x9f,0x97, + 0xa6,0xe7,0xcd,0xf6,0x9e,0x40,0xf5,0x4a,0xf9,0x02,0xaa,0x38,0xce,0x34,0x00, + 0xc8,0xc6,0xb6,0xcf,0xf6,0x6e,0xf4,0xa7,0xcd,0xec,0xee,0xde,0x24,0xc6,0xbe, + 0xdf,0xc3,0x2d,0x14,0xf5,0xda,0xfe,0xff,0xff,0xef,0xff,0x7f,0xa9,0x52,0xed, + 0xbe,0xef,0xe6,0x0f,0xd1,0xb7,0xdd,0x6e,0xfe,0xfb,0x0b,0xd7,0x7d,0xcf,0xd6, + 0x8c,0x42,0xf5,0xca,0xff,0xff,0xff,0xdf,0xfe,0x3f,0x02,0xe0,0xcf,0x36,0xcf, + 0x77,0x5d,0x88,0xed,0xcd,0xec,0x86,0x9f,0x47,0xc6,0x3c,0xef,0xce,0x2e,0x10, + 0xf5,0x6a,0xff,0xff,0xc9,0x0e,0x02,0x70,0xa8,0x2a,0xdc,0x77,0xdf,0xe6,0x0c, + 0xdd,0x9d,0xef,0x6d,0x6e,0xde,0x2e,0xd7,0x7f,0xcf,0xfd,0x1c,0x45,0xf5,0xca, + 0x5e,0x05,0x84,0x4b,0xff,0x3f,0x02,0x70,0xff,0xfe,0xf9,0xde,0x5f,0xf8,0xda, + 0x9d,0xff,0xfe,0xff,0x03,0x8f,0xef,0xff,0xfc,0x59,0x10,0xf5,0x5a,0x08,0x10, + 0x89,0x27,0xfc,0xbf,0xa8,0xaa,0x28,0x41,0x05,0x42,0x12,0x12,0x48,0x20,0x82, + 0x10,0x11,0x52,0x52,0xa0,0x24,0x05,0x05,0x45,0xf5,0xca,0x1a,0xc0,0x4d,0x43, + 0xc0,0x30,0x02,0x00,0x02,0x14,0xa0,0x10,0x81,0x44,0x2f,0x8a,0x28,0x44,0x84, + 0x08,0x84,0x04,0x00,0x50,0x50,0x10,0xf5,0x4a,0xfe,0xe7,0x2d,0x40,0x84,0xbf, + 0x48,0xa5,0x50,0x41,0x15,0x44,0x54,0x10,0x16,0x21,0x02,0x11,0x21,0x42,0x21, + 0x50,0x55,0x05,0x05,0x45,0xf5,0x6a,0x43,0xe0,0xbf,0x6c,0x99,0x3f,0x12,0x08, + 0x0a,0x12,0x40,0x11,0x01,0x45,0x85,0x88,0xa8,0x44,0x94,0x28,0x14,0x05,0x00, + 0x50,0x50,0x20,0xf5,0xca,0x15,0x0a,0xce,0x7f,0x98,0xbf,0x40,0xa1,0x40,0x44, + 0x15,0x44,0x54,0x10,0x20,0x22,0x02,0x10,0x01,0x02,0x81,0xa0,0xaa,0x84,0x04, + 0x8a,0xf5,0xda,0x40,0x41,0x36,0xf0,0x7e,0x24,0x14,0x08,0x14,0x11,0x40,0x01, + 0x01,0x45,0x95,0x88,0x50,0x45,0xa8,0x50,0x28,0x0a,0x00,0x11,0xa2,0x20,0xf5, + 0xca,0x14,0x14,0x12,0xba,0x01,0x69,0x81,0xaf,0x42,0x84,0x14,0x54,0x48,0x10, + 0x70,0x22,0xe4,0x17,0x72,0x05,0xc2,0x41,0x75,0x5c,0x0f,0x0b,0xf5,0xda,0x42, + 0x81,0x8e,0x98,0x54,0x22,0x54,0x06,0x10,0x22,0x41,0x01,0x22,0x84,0xe5,0x80, + 0xc2,0x4c,0x99,0x51,0xa9,0x15,0x70,0xb7,0xed,0x45,0xf5,0x4a,0x10,0x54,0x40, + 0x64,0x00,0x68,0x01,0x97,0x8a,0x13,0x14,0x54,0x09,0xe1,0x68,0x2a,0xd0,0x1d, + 0xac,0x05,0x80,0x81,0x64,0xb6,0xcd,0x21,0xf5,0xda,0x24,0x01,0x2a,0x11,0xaa, + 0x22,0x48,0xf6,0xf1,0xdf,0xf7,0x6d,0xf8,0xef,0xe1,0xb1,0xcb,0x8c,0x0e,0xf2, + 0xfe,0x3d,0x71,0xf7,0x6d,0x14,0xf5,0x4a,0x42,0x54,0x01,0x84,0x00,0xb0,0x22, + 0x6e,0xbb,0xf7,0x36,0xdb,0xfe,0xcd,0x6a,0x37,0xc5,0x47,0x9c,0xf8,0xf7,0x0d, + 0x64,0x3c,0xff,0x81,0xf5,0x6a,0x08,0x01,0x54,0x51,0x54,0x25,0x08,0x67,0x7b, + 0x33,0xb7,0xdb,0xfc,0xed,0x60,0x73,0xe1,0x14,0x4d,0x9c,0xef,0xa7,0x68,0x35, + 0x6d,0x2b,0xf5,0xca,0x42,0x28,0x01,0x04,0x01,0xa8,0x42,0xee,0xf7,0x37,0x36, + 0xff,0x8d,0xcf,0xf5,0x6b,0xcb,0x41,0x0c,0xb9,0xe7,0x1d,0xe2,0x58,0xe6,0x03, + 0xf5,0x4a,0x28,0x42,0x54,0x51,0xa4,0x22,0x28,0x66,0xcb,0xb3,0x7e,0xdb,0xbc, + 0xdd,0x60,0xe3,0xd0,0x38,0x5d,0xb9,0xef,0xfb,0x68,0x3e,0x6f,0x57,0xf5,0x6a, + 0x82,0x08,0x01,0x04,0x09,0xb0,0x82,0x7f,0x7f,0x7e,0xee,0xdb,0xfb,0x9d,0xab, + 0xd5,0xe5,0x73,0xf0,0xf4,0xfc,0x79,0xf2,0x86,0xd1,0x01,0xf5,0xca,0xff,0xff, + 0xff,0xff,0xff,0x3f,0x28,0x90,0xa4,0x92,0x10,0x24,0x08,0x42,0x80,0x40,0x20, + 0x08,0x25,0x82,0x4a,0xc4,0x10,0x51,0x85,0x54,0xf5,0x5a,0x24,0x42,0x24,0x41, + 0x90,0x92,0x02,0x25,0x08,0x20,0x44,0x01,0xa1,0x10,0x29,0x7a,0x89,0x22,0x88, + 0x28,0x10,0x31,0x44,0x08,0x20,0x02,0xf5,0x0a,0x81,0x10,0x11,0x14,0x25,0x44, + 0xa8,0x80,0xa2,0x0a,0x11,0xa8,0x08,0x4a,0x84,0x70,0x22,0x08,0x21,0x82,0x42, + 0x84,0x12,0xa2,0x8a,0x50,0xf5,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xf5,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf4,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0}; diff --git a/TCLSpecs/bitmaps/prc.xbm b/TCLSpecs/bitmaps/prc.xbm new file mode 100644 index 0000000..e86d614 --- /dev/null +++ b/TCLSpecs/bitmaps/prc.xbm @@ -0,0 +1,101 @@ +#define prc_width 100 +#define prc_height 112 +static char prc_bits[] = { + 0xff,0xff,0xff,0xff,0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xb5,0x6a, + 0xad,0x55,0xfd,0xff,0xff,0xbf,0xaa,0x6a,0x6d,0x55,0xfd,0xff,0xff,0xff,0xff, + 0xbf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd5,0xb6,0xb5,0xd5,0xff,0xff, + 0xff,0xff,0x6f,0xad,0xb5,0x6d,0xfb,0xbf,0xdf,0xdf,0xff,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xbf,0xff,0xf6,0x75,0x7d,0xf5,0xff,0xff,0xf7,0xfb,0xff,0xd5, + 0xda,0xea,0xfd,0xbd,0xfe,0xef,0xff,0xff,0x7b,0xdf,0xae,0xff,0xff,0xff,0xbf, + 0xfe,0xef,0x57,0xbb,0xff,0xff,0xde,0xf5,0x75,0xfd,0xdb,0xb6,0xed,0xfb,0xbb, + 0xfd,0xef,0xff,0x57,0xab,0x2e,0x5b,0xf5,0xbf,0xff,0xdf,0xfe,0xee,0x57,0xfd, + 0x7f,0xab,0x6a,0x55,0xad,0xaa,0xff,0x6a,0xf5,0xfb,0x7b,0xfd,0xf7,0xff,0x75, + 0xad,0x6a,0xb5,0xa5,0xff,0xff,0x5f,0xff,0xde,0x57,0xfd,0x3f,0x95,0x55,0xab, + 0xd5,0xaa,0xfe,0x6f,0xfb,0xfd,0xb7,0xfd,0xff,0xaf,0x5a,0x55,0x55,0x55,0xab, + 0xfe,0xfb,0x6e,0xff,0xfb,0xaf,0xfe,0x5b,0x55,0x55,0x55,0x55,0xad,0xfa,0xbf, + 0xbb,0xfb,0xae,0xf5,0xff,0x6b,0x55,0x55,0xa9,0xaa,0x6a,0xf5,0xef,0xef,0xfd, + 0xfb,0xbf,0x7f,0xad,0x55,0x52,0x4a,0x55,0xb5,0xf6,0xbf,0xba,0xfe,0x6f,0xed, + 0xff,0x55,0xa5,0x4a,0xa5,0xaa,0x56,0xeb,0xff,0xef,0xfb,0xfb,0xf7,0x5f,0x5b, + 0x95,0x2a,0x29,0x55,0xd5,0xda,0xff,0xdd,0xfe,0xad,0xfd,0xbf,0x55,0x55,0x52, + 0xa5,0x54,0x55,0x6d,0xbf,0xbb,0xfb,0xff,0xef,0xef,0x56,0xaa,0x4a,0x95,0xaa, + 0xaa,0xb5,0xff,0xef,0xfe,0xd5,0xfa,0x5f,0x55,0x49,0xaa,0x54,0x55,0xb5,0xda, + 0xfe,0x7b,0xff,0xff,0xff,0xbf,0x55,0x55,0x55,0xaa,0xa4,0xaa,0x6d,0xff,0xaf, + 0xfb,0xd5,0xfa,0xef,0xaa,0xaa,0x24,0x45,0xaa,0xaa,0xd6,0xfe,0xfb,0xfe,0xff, + 0xff,0xbf,0xad,0x92,0xaa,0x28,0xa5,0xaa,0x7a,0xff,0xae,0xfb,0xda,0xfa,0xdf, + 0xaa,0x4a,0x45,0x55,0x29,0x55,0xd5,0xfe,0xfb,0xfe,0xf7,0xff,0x6f,0x55,0x55, + 0x28,0x82,0x94,0xaa,0xaa,0xff,0xaf,0xfb,0x7d,0xfd,0xbf,0x55,0x55,0x93,0x54, + 0x52,0xaa,0xf6,0xfe,0xff,0xfe,0xd7,0xff,0xdf,0xea,0x57,0x49,0x22,0xd5,0x75, + 0xab,0xff,0xb7,0xfb,0xfd,0xfd,0x6f,0xfd,0xff,0x2b,0x95,0x74,0xff,0x7d,0xff, + 0xef,0xff,0x6f,0xff,0xbf,0x6e,0x7f,0x95,0x40,0xda,0xff,0xaf,0xff,0xbf,0xfa, + 0xf5,0xfd,0x6f,0xff,0xef,0x5b,0x94,0xea,0xff,0x6f,0xff,0xef,0xff,0xbf,0xff, + 0xdf,0xba,0x7a,0xab,0x4a,0x74,0xbd,0xbf,0xff,0xff,0xfa,0xea,0xfd,0x6f,0xd7, + 0xaa,0x2a,0x21,0x95,0x67,0x7d,0xff,0xaf,0xff,0x7f,0xff,0xbf,0xad,0x5d,0xab, + 0x94,0xea,0xba,0xb6,0xff,0xf7,0xfb,0xda,0xfd,0xaf,0xf7,0xff,0x5d,0xaa,0x7a, + 0xdf,0xfb,0xfe,0xaf,0xfe,0x7d,0xff,0x6f,0x79,0xf7,0x6f,0x45,0xdf,0x77,0xad, + 0xff,0xff,0xfb,0xef,0xfb,0xdf,0xee,0x7f,0xbb,0x52,0xf7,0xfe,0xf7,0xff,0xaf, + 0xfe,0xf5,0xfe,0xaf,0xbe,0xbf,0xaf,0xaa,0xff,0xff,0xaf,0xfe,0xfb,0xfb,0xbf, + 0xff,0x77,0xfb,0xbe,0xf5,0xda,0xb6,0xff,0xdf,0xff,0xaf,0xfe,0xf5,0xf5,0xaf, + 0xbd,0x7f,0x5f,0xb7,0xdf,0xbe,0xaf,0xfe,0xfa,0xfb,0x7f,0xef,0xaf,0xd6,0xd4, + 0xb5,0xd9,0x75,0x6b,0x7b,0xff,0xaf,0xfe,0xd5,0xdf,0xb7,0x2a,0x6b,0xdf,0x6e, + 0xdf,0xad,0xad,0xbf,0xfa,0xfb,0x7e,0x6b,0x5f,0x55,0xbd,0xb5,0xaa,0xfb,0xb6, + 0xd6,0x7e,0x6f,0xff,0xeb,0xdd,0xaa,0xd5,0x52,0xd5,0x75,0xad,0xdb,0x5a,0xdb, + 0xbb,0xfb,0xff,0x6b,0xb7,0x6a,0x5f,0xad,0xae,0xf7,0x6e,0xab,0x76,0xed,0xfe, + 0x6a,0xaf,0x5d,0xb5,0x55,0x75,0xb3,0x95,0xb5,0x75,0xbb,0xbf,0xfb,0xff,0xbb, + 0xb6,0xda,0xaa,0xda,0xaa,0x5e,0xda,0xaa,0xd7,0xea,0xfe,0xdb,0xae,0xdb,0x4a, + 0x55,0xad,0xaa,0xb6,0xaa,0xaa,0x6e,0xbf,0xfb,0xf6,0xdb,0x56,0x55,0x8a,0x56, + 0xa5,0x7a,0x51,0x55,0xad,0xeb,0xfe,0xbf,0xbf,0x5b,0x55,0x51,0x55,0xa9,0xca, + 0xaa,0x6a,0xff,0xfe,0xfb,0xf5,0xd5,0x6f,0xab,0x8a,0xeb,0xa6,0xbf,0x45,0xad, + 0x5a,0x57,0xff,0xdf,0xff,0x5a,0x55,0x68,0xfd,0xfb,0x7f,0x93,0x6a,0xef,0xfb, + 0xfd,0x7b,0xb5,0x6e,0x95,0xaa,0xfe,0xef,0xdf,0x4d,0x52,0xbb,0xae,0xff,0xfe, + 0xdf,0xba,0x25,0x69,0xff,0xff,0xff,0x26,0xea,0xed,0xfb,0xfa,0x6b,0x75,0x5d, + 0x95,0xb4,0xff,0xff,0xff,0x5f,0xa9,0xd6,0xde,0xff,0xff,0x7f,0x6b,0x55,0xea, + 0xff,0xff,0xff,0x4f,0x6a,0xfb,0xfb,0xfd,0xb6,0xda,0xbd,0x2b,0xfd,0xff,0xff, + 0xff,0x7f,0xd5,0x6d,0x5f,0xff,0xdf,0xff,0xd6,0x94,0xfe,0xff,0xff,0xff,0xbf, + 0x6a,0xfb,0xf5,0xfb,0xf5,0xda,0x7d,0xab,0xfe,0xff,0xff,0xff,0xff,0xb4,0xbf, + 0xdf,0xfe,0x5f,0x7f,0xd7,0xaa,0xff,0xff,0xff,0xff,0xff,0xd6,0xfa,0xfb,0xff, + 0xfb,0xf7,0x7f,0xd5,0xff,0xff,0xff,0xff,0xff,0xe9,0xef,0x5e,0xfb,0x5f,0xbd, + 0xed,0xd5,0xff,0xff,0xff,0xff,0xff,0x5a,0xbf,0xf7,0xff,0xf6,0xef,0xbe,0xd6, + 0xff,0x7f,0x55,0xfd,0xff,0xea,0xfd,0xdf,0xfe,0xdf,0xfe,0x6b,0xd3,0xff,0xaa, + 0xb7,0xb7,0xff,0xb6,0xff,0xfa,0xff,0xfb,0x6b,0xff,0xda,0x5f,0xb7,0xd4,0xea, + 0x7e,0xea,0xdb,0x6f,0xfb,0x5f,0xff,0xad,0xd7,0xbf,0xfd,0xff,0xff,0xff,0xfd, + 0x7e,0xff,0xff,0xfb,0xd7,0xff,0xa9,0xd7,0xfe,0xff,0x5f,0x7d,0xd5,0xf7,0xbb, + 0xfd,0x6e,0xfb,0xb6,0xd6,0x6f,0xff,0xff,0xff,0x7e,0x7b,0xff,0xef,0xff,0xfb, + 0xaf,0xfb,0xdf,0xbf,0xfe,0xff,0xbf,0xfe,0xee,0xdd,0x7e,0xff,0x5f,0xfb,0xdf, + 0xea,0xbf,0xff,0xff,0xdf,0x7e,0xfb,0xfb,0xfb,0xfd,0xf7,0xdf,0xf6,0xbf,0xff, + 0xfe,0xff,0xaf,0xff,0xdd,0xff,0xdf,0xff,0xdf,0xf6,0xff,0xab,0xff,0xff,0xff, + 0xff,0x7f,0xff,0xbf,0xfd,0xfe,0xfb,0xbb,0xdb,0xfe,0xfe,0xfe,0xff,0xef,0xff, + 0xee,0xf6,0xef,0xff,0xdf,0xef,0xff,0xaf,0xff,0xff,0xff,0xff,0xff,0xf7,0xff, + 0xbe,0xfb,0xfd,0xfd,0xf6,0xfb,0xff,0xff,0xff,0xff,0x7f,0x5f,0xf7,0xfb,0xff, + 0xb7,0xd7,0xff,0xae,0xfe,0xff,0xff,0xff,0xff,0xbb,0xde,0xef,0xfe,0xff,0xff, + 0x9b,0xfa,0xff,0xff,0xff,0xff,0xbf,0xbd,0x7e,0xff,0xff,0xdb,0xf6,0x4f,0xef, + 0xfe,0xff,0xff,0xff,0xff,0xff,0xfa,0xbb,0xfd,0xfe,0xdf,0xe2,0xb7,0xff,0xff, + 0xff,0xff,0x5f,0xf5,0xfc,0xff,0xff,0xef,0x7b,0xf9,0xf7,0xfe,0xff,0xff,0xff, + 0xff,0xfd,0xd9,0xdd,0xff,0xbd,0x3f,0xfe,0xab,0xfd,0xff,0xff,0xff,0x6f,0xfb, + 0xf8,0xf7,0xfd,0xff,0x9d,0xff,0xff,0xfb,0xff,0xff,0xff,0xbb,0xfd,0xf9,0xbf, + 0xff,0xed,0xcf,0xff,0x57,0xef,0xff,0xff,0xff,0xef,0xf6,0x70,0xff,0xff,0xff, + 0xdd,0xff,0xaf,0xbd,0xff,0xff,0x7f,0x5b,0xfb,0xfa,0xdb,0xfd,0xb7,0xcf,0xff, + 0xf7,0x76,0xdd,0xff,0xd7,0x6e,0xfd,0xd0,0xff,0xff,0xfe,0xcb,0xff,0x5b,0xef, + 0xb6,0xd4,0x7a,0xb7,0xfe,0x01,0xfa,0xfe,0xff,0x8e,0xff,0xaf,0xba,0xdb,0x56, + 0xd5,0xda,0x7b,0x84,0xd0,0xff,0xed,0xa7,0xff,0x7b,0xdb,0xaa,0xaa,0xae,0x55, + 0x3f,0x10,0x82,0xfe,0xff,0x8b,0xff,0xaf,0x6d,0x55,0xd5,0x6a,0xab,0xbf,0x40, + 0x10,0xf8,0xf7,0x0a,0xfe,0xbf,0xb6,0xb7,0x55,0x55,0xd5,0x1f,0x02,0x40,0xf2, + 0x7e,0x41,0xfe,0xdb,0xda,0x54,0xaa,0xaa,0xfa,0x0f,0x20,0x05,0xf0,0x17,0x00, + 0xfc,0x7f,0x6b,0x55,0x55,0x55,0xd5,0x01,0x04,0x10,0xf2,0x47,0x12,0xfc,0xdf, + 0xaa,0x56,0xa9,0xaa,0xfe,0x00,0x20,0x81,0xf0,0x00,0x80,0xf8,0xff,0xd7,0x52, + 0xa5,0xaa,0x7d,0x22,0x01,0x08,0xf2,0x00,0x08,0xf0,0x7f,0xad,0xaa,0x2a,0x55, + 0x2f,0x00,0x24,0x02,0xf0,0x24,0x21,0xf0,0xff,0x57,0x15,0x49,0xe9,0x0f,0x00, + 0x00,0x48,0xf0,0x00,0x00,0xe1,0xff,0x7d,0xa5,0x24,0xf6,0x03,0x42,0x90,0x00, + 0xf2,0x92,0x08,0xa0,0xff,0xaf,0x12,0x49,0x7d,0x01,0x00,0x02,0x04,0xf0,0x00, + 0x42,0x80,0xff,0xff,0xaa,0x24,0x57,0x40,0x08,0x08,0x90,0xf0,0x08,0x08,0x04, + 0xff,0xb7,0x4a,0xd2,0x00,0x09,0x20,0x80,0x00,0xf2,0x40,0x40,0x01,0xfe,0xff, + 0x55,0xa9,0x40,0x02,0x00,0x11,0x02,0xf0,0x02,0x01,0x10,0xfc,0x7f,0xaf,0x6a, + 0x28,0x50,0x02,0x00,0x48,0xf0,0x08,0x24,0x42,0xe4,0xff,0x5d,0x3b,0x82,0x00, + 0x08,0x42,0x00,0xf2,0x20,0x80,0x00,0x8a,0xfe,0xff,0x7d,0x00,0x52,0x40,0x08, + 0x20,0xf0,0x01,0x01,0x08,0x34,0xfc,0xff,0x3f,0x00,0x48,0x00,0x20,0x82,0xf0, + 0x08,0x10,0x82,0xf4,0xf1,0xfe,0x3f,0x49,0x20,0x84,0x00,0x00,0xf2,0x40,0x42, + 0x10,0xe0,0xd3,0x60,0x7f,0x00,0x52,0x10,0x82,0x08,0xf0,0x02,0x00,0x42,0x84, + 0x87,0xc1,0xff,0x25,0x00,0x00,0x08,0x20,0xf0,0x48,0x08,0x10,0x00,0x0a,0x80, + 0xff,0x81,0x28,0x01,0x20,0x00,0xf2,0x00,0x21,0x81,0x10,0x24,0x84,0xff,0x07, + 0x00,0x48,0x00,0x42,0xf0,0x00,0x00,0x10,0x00,0x10,0x00,0xfe,0x07,0x92,0x01, + 0x81,0x00,0xf1,0x24,0x09,0x40,0x42,0x48,0x00,0xfc,0x27,0x88,0x05,0x08,0x08, + 0xf0}; diff --git a/TCLSpecs/bitmaps/prcFunny.xbm b/TCLSpecs/bitmaps/prcFunny.xbm new file mode 100644 index 0000000..31e09c2 --- /dev/null +++ b/TCLSpecs/bitmaps/prcFunny.xbm @@ -0,0 +1,60 @@ +#define prcFunny_width 100 +#define prcFunny_height 65 +static char prcFunny_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x07,0xf0,0x00,0xa8,0xea,0x7d,0xef,0x7f,0xfb,0xdb,0xb5,0x5e,0x55,0x05, + 0xf0,0x00,0xfc,0xff,0xf7,0xff,0xff,0xbf,0xff,0xff,0xff,0xff,0x07,0xf0,0x00, + 0x58,0xd5,0x5f,0x5f,0xf7,0xff,0xdb,0xbb,0x7f,0x55,0x05,0xf0,0x00,0xf4,0x7f, + 0x01,0x39,0x76,0xbc,0x91,0x13,0xe3,0xff,0x07,0xf0,0x00,0xbc,0xed,0x01,0x39, + 0x76,0xb2,0x11,0x12,0xe3,0x6d,0x05,0xf0,0x00,0xd8,0xfb,0x00,0x00,0xf6,0xb3, + 0x0d,0x62,0x83,0xdf,0x07,0xf0,0x00,0xec,0xfe,0x00,0x00,0x80,0x0f,0x0c,0x00, + 0x83,0x77,0x05,0xf0,0x00,0x7c,0x1f,0x00,0x00,0x80,0x0f,0xe0,0x0f,0x00,0xdf, + 0x07,0xf0,0x00,0xd4,0x03,0x00,0xff,0x07,0x02,0x1e,0xf0,0x00,0x7f,0x05,0xf0, + 0x00,0x7c,0x03,0xf8,0x00,0x78,0xc0,0x01,0x00,0x03,0xec,0x07,0xf0,0x00,0xd4, + 0x03,0x1f,0x00,0x80,0x73,0x00,0x00,0x04,0x7c,0x05,0xf0,0x00,0xfc,0x03,0x00, + 0x00,0x00,0x3e,0x00,0x00,0x18,0xd8,0x07,0xf0,0x00,0xa8,0x00,0xc0,0xff,0x3f, + 0x8e,0xff,0x7f,0x60,0x78,0x05,0xf0,0x00,0xfc,0x00,0x20,0x00,0x70,0x40,0x00, + 0x80,0x00,0xe0,0x07,0xf0,0x00,0xd8,0x00,0x1e,0x00,0xc0,0x31,0x00,0x00,0x07, + 0x40,0x05,0xf0,0x00,0xec,0x00,0x07,0x00,0x00,0x0e,0x00,0x08,0x1c,0xe0,0x07, + 0xf0,0x00,0xfc,0x00,0x01,0x00,0x00,0x02,0x00,0x00,0x78,0x60,0x05,0xf0,0x00, + 0xe4,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x07,0xf0,0x00,0x64,0xe4, + 0x80,0x02,0x08,0x10,0x00,0x00,0x80,0x23,0x04,0xf0,0x00,0x64,0x24,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0x20,0x04,0xf0,0x00,0x60,0x38,0x00,0x00,0x00,0x10, + 0x04,0x00,0x80,0x20,0x04,0xf0,0x00,0x60,0x38,0x00,0x00,0x00,0x02,0x00,0x00, + 0x80,0x20,0x04,0xf0,0x00,0x60,0x18,0x08,0x00,0x00,0x00,0x04,0x00,0x81,0x00, + 0x04,0xf0,0x00,0x60,0x18,0x00,0x00,0x3f,0x04,0x00,0x20,0x00,0xc0,0x04,0xf0, + 0x00,0x64,0x18,0x00,0x00,0x3f,0x00,0x00,0x00,0x00,0xc3,0x04,0xf0,0x00,0x64, + 0x18,0x00,0x00,0x3f,0x00,0x00,0x00,0x00,0xc3,0x04,0xf0,0x00,0xe4,0x18,0x00, + 0x00,0x0e,0x80,0x03,0x00,0x00,0xc3,0x07,0xf0,0x00,0xfc,0x38,0x00,0x00,0x00, + 0xc0,0x0f,0x00,0x80,0xc3,0x07,0xf0,0x00,0xfc,0x23,0x00,0x00,0x00,0xc0,0x0f, + 0x00,0x80,0x00,0x05,0xf0,0x00,0xa8,0xe3,0x80,0x00,0x00,0x80,0x03,0x00,0x80, + 0x00,0x07,0xf0,0x00,0xfc,0xc3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05, + 0xf0,0x00,0xac,0x03,0x40,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x06,0xf0,0x00, + 0xf8,0x03,0x01,0x00,0x02,0x02,0x00,0x00,0x78,0xc0,0x07,0xf0,0x00,0xac,0x03, + 0x07,0x00,0x00,0x0e,0x80,0x00,0x1c,0x60,0x03,0xf0,0x00,0xfc,0x03,0x20,0x00, + 0x72,0x40,0x00,0x80,0x00,0xc0,0x06,0xf0,0x00,0xa8,0x03,0xc0,0xff,0x3f,0x80, + 0x7f,0x7f,0x00,0xc0,0x07,0xf0,0x00,0xfc,0x03,0x00,0x00,0x80,0x31,0x00,0x00, + 0x00,0x40,0x05,0xf0,0x00,0x58,0x03,0x00,0x00,0x80,0x31,0x00,0x00,0x00,0xc0, + 0x07,0xf0,0x00,0xf4,0x03,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x40,0x05,0xf0, + 0x00,0xbc,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x07,0xf0,0x00,0xd8, + 0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0xf0,0x00,0x74,0x1d,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x07,0xf0,0x00,0xdc,0x37,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x60,0x05,0xf0,0x00,0x78,0xfd,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xe0,0x07,0xf0,0x00,0xdc,0xd7,0x00,0x07,0x81,0x03,0x10,0x00,0x00, + 0x40,0x05,0xf0,0x00,0xf4,0xfd,0xc0,0xf8,0xff,0x3f,0xfe,0x0f,0x00,0xfc,0x07, + 0xf0,0x00,0x5c,0xaf,0x00,0x00,0x70,0xc0,0xed,0x0f,0x00,0x6c,0x05,0xf0,0x00, + 0xf4,0xf5,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0xdc,0x07,0xf0,0x00,0x5c,0xbf, + 0x1e,0x00,0x00,0x00,0x00,0x00,0x80,0x77,0x05,0xf0,0x00,0xf4,0xd6,0x3b,0x00, + 0x00,0x00,0x00,0x00,0x80,0xdd,0x07,0xf0,0x00,0xdc,0xfd,0xfe,0x01,0x00,0x00, + 0x00,0x80,0xff,0x77,0x05,0xf0,0x00,0xb8,0xb7,0xd7,0x0f,0x00,0x00,0x00,0xf0, + 0xaf,0xde,0x07,0xf0,0x00,0xec,0xee,0x7a,0xff,0xff,0xff,0x9f,0xff,0xfb,0x7b, + 0x05,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0}; diff --git a/TestAllNext b/TestAllNext new file mode 100755 index 0000000..c20dfec --- /dev/null +++ b/TestAllNext @@ -0,0 +1,65 @@ +testMono Plucked scores/duelingb.ski +sndplay test.snd +mv test.snd Plucked.snd + +testMono Mandolin scores/mandtune.ski +sndplay test.snd +mv test.snd MandTune.snd +testMono Mandolin scores/funicula.ski +sndplay test.snd +mv test.snd MandSolo.snd + + +testMono Clarinet scores/simplgft.ski +sndplay test.snd +mv test.snd Clarinet.snd +testMono Flute scores/simplgft.ski +sndplay test.snd +mv test.snd Flute.snd +testMono Brass scores/pictures.ski +sndplay test.snd +mv test.snd Brass.snd +testMono Bowed scores/fiddle.ski +sndplay test.snd +mv test.snd Bowed.snd + +testMono Marimba scores/spain.ski +sndplay test.snd +mv test.snd Marimba.snd +testMono Vibraphn scores/spain.ski +sndplay test.snd +mv test.snd Vibraphn.snd +testMono AgogoBel scores/morazbel.ski +sndplay test.snd +mv test.snd AgogoBel.snd + +testMono Rhodey scores/doogie.ski +sndplay test.snd +mv test.snd Rhodey.snd +testMono Wurley scores/riderson.ski +sndplay test.snd +mv test.snd Wurley.snd +testMono TubeBell scores/tubebell.ski +sndplay test.snd +mv test.snd TubeBell.snd +testMono PercFlut scores/misacrio.ski +sndplay test.snd +mv test.snd PercFlut.snd +testMono HeavyMtl scores/streetsf.ski +sndplay test.snd +mv test.snd HeavyMtl.snd +testMult 0.33 BeeThree scores/organs.ski +sndplay test.snd +mv test.snd BeeThree.snd + +testMono Moog1 scores/thecars.ski +sndplay test.snd +mv test.snd Moog1.snd + +Lacrymosa +mv test.snd Vocaliz.snd + +DrumSynt +sndplay test.snd +mv test.snd DrumSynt.snd + diff --git a/TestAllSGIRT b/TestAllSGIRT new file mode 100755 index 0000000..6565e4d --- /dev/null +++ b/TestAllSGIRT @@ -0,0 +1,30 @@ +testMono Plucked scores/duelingb.ski +testMult 1.0 Mandolin scores/mandtune.ski +testMono Mandolin scores/funicula.ski + +testMono Clarinet scores/simplgft.ski +testMono Flute scores/simplgft.ski +testMono Brass scores/pictures.ski +testMono Bowed scores/fiddle.ski + +testMono Marimba scores/spain.ski +testMono Vibraphn scores/spain.ski +testMono AgogoBel scores/morazbel.ski + +testMono Rhodey scores/doogie.ski +testMono Wurley scores/riderson.ski +testMono TubeBell scores/tubebell.ski +testMono PercFlut scores/misacrio.ski +testMono HeavyMtl scores/streetsf.ski +testMono BeeThree scores/bookert.ski +testMult 0.33 BeeThree scores/organs.ski + +testMono Moog1 scores/thecars.ski + +testMono FMVoices scores/lacrymos.ski +testMono VoicForm scores/lacrymos.ski + +Vocaliz +Lacrymosa + +DrumSynt diff --git a/ToDo.txt b/ToDo.txt new file mode 100644 index 0000000..304926c --- /dev/null +++ b/ToDo.txt @@ -0,0 +1,116 @@ +Need to iron out the differences between RawWvIn, NIWave1S, NIFileIn, etc. +Need to make DrumSyn1 vs. DrumSyn2 + One real-time large memory, one non real-time small memory +***************************************************** +Legend: + +x = done <1 - 9> = How Good? : = by Inheritance N = Not Applicable +Ex = Exists +Cm = Compiles +On = Note On +Of = Note Off +Pt = Pitch (5 octave range) +Vl = Velocity (0-128) +Bn = Pitch Bend +Md = Mod Wheel +C1 = Controller 1, Algorithm Specific +C2 = Controller 2, Algorithm Specific +Lg = Long/Int/Double verification +Op = Optimization pass 1 +Com. = Comments + +FILE/CLASS Ex Cm On Of Pt Vl Bn Md C1 C2 C3 Lg Op Com + +README.TXT x N N N N N N N N N N N N + +OBJECT.H x x N N N N N N N N N x N + +FILTER.H x x N N N N N N N N N x N + +ONEPOLE.H x x N N N N N N N N N x +ONEZERO.H x x N N N N N N N N N x +DCBLOCK.H x x N N N N N N N N N x +BIQUAD.H x x N N N N N N N N N x +TWOZERO.H x x N N N N N N N N N x +TWOPOLE.H x x N N N N N N N N N x +ALLPASS1.H + +FORMSWEP.H x x N N N N N N N N N x + +DLINEA.H x x N N N N N N N N N x +DLINEL.H x x N N N N N N N N N x +DLINEN.H x x N N N N N N N N N x + +RAWWAVE.H x x N N N N N N N N N x +RAWLOOP.H x x N N N N N N N N N x +NIWAVE1S.H +SINGWAVE.H x x N N N N N N N N N x +RAWWVOUT.H x x N N N N N N N N N x +RAWWVIN.H x x N N N N N N N N N x + +REEDTABL.H x x N N N N N N N N N x +JETTABL.H x x N N N N N N N N N x +LIPFILT.H x x N N N N N N N N N x Add Lip Tension Modulation? +BOWTABL.H x x N N N N N N N N N x + +ENVELOPE.H x x N N N N N N N N N x +ADSR.H x x N N N N N N N N N x +NOISE.H x x N N N N N N N N N x +SUBNOISE.H x x N N N N N N N N N x Noise each n samples + +FILE/CLASS Ex Cm On Of Pt Vl Bn Md C1 C2 C3 Lg Op Com + +PLUCKED.H x x x x 7 8 N N N N x tuning funny, allpass approx. +CLARINET.H x x x x 7 5 7 7 7 7 x +FLUTE.H x x x x 7 5 7 7 7 7 x +BRASS.H x x x x 7 5 7 7 7 7 x +BOWED.H x x x x 7 5 7 7 7 7 x Need Better Body Filter + +PLUCKED2.H x x N x N N N N N N x +MANDOLIN.H x x x : 8 8 9 9 9 9 x tuning funny, allpass approx. + +MODAL4.H x x N x N N 7 N N N x +MARIMBA.H x x x : 7 x : 7 7 7 x Check 4 Clipping Mid Range +VIBRAPHN.H x x x : x x : 7 7 7 x AMDept StickHard Pos AMFreq +AGOGOBEL.H x x x : x x : 7 7 7 x StickHard Position + +FM4OP.H x x N x N N N N N x 9 x + +FM4ALG8.H x x N : N N N 9 9 | x +BEETHREE.H x x x : x x 9 : : : x + +FM4ALG5.H x x N : N N N 9 9 : x +RHODEY.H x x x : 8 x 9 : : : x Minor Aliasing High Range +WURLEY.H x x x : 8 x 9 : : : x " " " " +TUBEBELL.H x x x : x x 9 : : : x + +FM4ALG4.H x x N : N N N 9 9 : x +PERCFLUT.H x x x : 8 x 9 : : : x Minor Aliasing High Range + +FM4ALG3.H x x N : N N N 9 9 : x +HEAVYMTL.H x x x : x x 9 : : : x Minor Aliasing High Range + +SAMPLER.H x x N x N +SAMPLFLT.H x x N : N +MOOG1.H x x x : x x + +VOICFORM.H x x ? ? ? ? ? ? ? ? ? x Need much phoneme!! + +DRUMSYNT.H x x x N x N N N N N x Need New Drum Samples + +FILE/CLASS Ex Cm On Of Pt Vl Bn Md C1 C2 C3 Lg Op Com + +Legend: +Es = Exists +Cm = Compiles +On = Note On +Of = Note Off +Pt = Pitch (5 octave range) +Vl = Velocity (0-128) +Bn = Pitch Bend +Md = Mod Wheel +C1 = Controller 1, Algorithm Specific +C2 = Controller 2, Algorithm Specific +Lg = Long/Int/Double verification +Op = Optimization pass 1 +Com. = Comments diff --git a/TubeBell.cpp b/TubeBell.cpp new file mode 100644 index 0000000..aaf1cce --- /dev/null +++ b/TubeBell.cpp @@ -0,0 +1,53 @@ +/******************************************/ +/* Tubular Bell (Orch. Chime) Subclass */ +/* of Algorithm 5 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/******************************************/ + +#include "TubeBell.h" + +TubeBell :: TubeBell() : FM4Alg5() +{ + this->loadWaves("rawwaves/sinewave.raw", + "rawwaves/sinewave.raw", + "rawwaves/sinewave.raw", + "rawwaves/sinewave.raw"); + + this->setRatio(0,1.0 * 0.995); + this->setRatio(1,1.414 * 0.995); + this->setRatio(2,1.0 * 1.005); + this->setRatio(3,1.414 ); + gains[0] = __FM4Op_gains[94]; + gains[1] = __FM4Op_gains[76]; + gains[2] = __FM4Op_gains[99]; + gains[3] = __FM4Op_gains[71]; + adsr[0]->setAll(0.03,0.00001,0.0,0.02); + adsr[1]->setAll(0.03,0.00001,0.0,0.02); + adsr[2]->setAll(0.07,0.00002,0.0,0.02); + adsr[3]->setAll(0.04,0.00001,0.0,0.02); + twozero->setGain(0.5); + vibWave->setFreq(2.0); +} + +void TubeBell :: setFreq(MY_FLOAT frequency) +{ + baseFreq = frequency; + waves[0]->setFreq(baseFreq * ratios[0]); + waves[1]->setFreq(baseFreq * ratios[1]); + waves[2]->setFreq(baseFreq * ratios[2]); + waves[3]->setFreq(baseFreq * ratios[3]); +} + +void TubeBell :: noteOn(MY_FLOAT freq, MY_FLOAT amp) +{ + gains[0] = amp * __FM4Op_gains[94]; + gains[1] = amp * __FM4Op_gains[76]; + gains[2] = amp * __FM4Op_gains[99]; + gains[3] = amp * __FM4Op_gains[71]; + this->setFreq(freq); + this->keyOn(); +#if defined(_debug_) + printf("TubeBell : NoteOn: Freq=%lf Amp=%lf\n",freq,amp); +#endif +} diff --git a/TubeBell.h b/TubeBell.h new file mode 100644 index 0000000..aacb484 --- /dev/null +++ b/TubeBell.h @@ -0,0 +1,21 @@ +/******************************************/ +/* Tubular Bell (Orch. Chime) Subclass */ +/* of Algorithm 5 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/******************************************/ + +#if !defined(__TubeBell_h) +#define __TubeBell_h + +#include "FM4Alg5.h" + +class TubeBell : public FM4Alg5 +{ + public: + TubeBell(); + virtual void setFreq(MY_FLOAT frequency); + virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp); +}; + +#endif diff --git a/TwoPole.cpp b/TwoPole.cpp new file mode 100644 index 0000000..362fd5f --- /dev/null +++ b/TwoPole.cpp @@ -0,0 +1,61 @@ +/*******************************************/ +/* Two Pole Filter Class, */ +/* by Perry R. Cook, 1995-96 */ +/* See books on filters to understand */ +/* more about how this works. Nothing */ +/* out of the ordinary in this version. */ +/*******************************************/ + +#include "TwoPole.h" + +TwoPole :: TwoPole() : Filter() +{ + outputs = (MY_FLOAT *) malloc(2 * MY_FLOAT_SIZE); + poleCoeffs[0] = 0.0; + poleCoeffs[1] = 0.0; + gain = 1.0; + this->clear(); +} + +TwoPole :: ~TwoPole() +{ +// free(inputs); + free(outputs); +} + +void TwoPole :: clear() +{ + outputs[0] = 0.0; + outputs[1] = 0.0; + lastOutput = 0.0; +} + +void TwoPole :: setPoleCoeffs(MY_FLOAT *coeffs) +{ + poleCoeffs[0] = coeffs[0]; + poleCoeffs[1] = coeffs[1]; +} + +void TwoPole :: setFreqAndReson(MY_FLOAT freq, MY_FLOAT reson) +{ + poleCoeffs[1] = - (reson * reson); + poleCoeffs[0] = 2.0 * reson * cos(TWO_PI * freq / SRATE); +} + +void TwoPole :: setGain(MY_FLOAT aValue) +{ + gain = aValue; +} + +MY_FLOAT TwoPole :: tick(MY_FLOAT sample) /* Perform Filter Operation */ +{ /* TwoPole is a two pole filter (duh!) */ + MY_FLOAT temp; /* Look it up in your favorite DSP text */ + temp = sample * gain; + temp += poleCoeffs[0] * outputs[0]; + temp += poleCoeffs[1] * outputs[1]; + outputs[1] = outputs[0]; + outputs[0] = temp; + lastOutput = outputs[0]; + return lastOutput; +} + diff --git a/TwoPole.h b/TwoPole.h new file mode 100644 index 0000000..007090e --- /dev/null +++ b/TwoPole.h @@ -0,0 +1,28 @@ +/*******************************************/ +/* Two Pole Filter Class, */ +/* by Perry R. Cook, 1995-96 */ +/* See books on filters to understand */ +/* more about how this works. Nothing */ +/* out of the ordinary in this version. */ +/*******************************************/ + +#if !defined(__TwoPole_h) +#define __TwoPole_h + +#include "Filter.h" + +class TwoPole : public Filter +{ + protected: + MY_FLOAT poleCoeffs[2]; + public: + TwoPole(); + ~TwoPole(); + void clear(); + void setPoleCoeffs(MY_FLOAT *coeffs); + void setGain(MY_FLOAT aValue); + void setFreqAndReson(MY_FLOAT freq, MY_FLOAT reson); + MY_FLOAT tick(MY_FLOAT sample); +}; + +#endif diff --git a/TwoZero.cpp b/TwoZero.cpp new file mode 100644 index 0000000..9c4ad5d --- /dev/null +++ b/TwoZero.cpp @@ -0,0 +1,53 @@ +/*******************************************/ +/* Two Zero Filter Class, */ +/* by Perry R. Cook, 1995-96 */ +/* See books on filters to understand */ +/* more about how this works. Nothing */ +/* out of the ordinary in this version. */ +/*******************************************/ + +#include "TwoZero.h" + +TwoZero :: TwoZero() : Filter() +{ + inputs = (MY_FLOAT *) malloc(2 * MY_FLOAT_SIZE); + zeroCoeffs[0] = 0.0; + zeroCoeffs[1] = 0.0; + gain = 1.0; + this->clear(); +} + +TwoZero :: ~TwoZero() +{ + free(inputs); +} + +void TwoZero :: clear() +{ + inputs[0] = 0.0; + inputs[1] = 0.0; + lastOutput = 0.0; +} + +void TwoZero :: setZeroCoeffs(MY_FLOAT *coeffs) +{ + zeroCoeffs[0] = coeffs[0]; + zeroCoeffs[1] = coeffs[1]; +} + +void TwoZero :: setGain(MY_FLOAT aValue) +{ + gain = aValue; +} + +MY_FLOAT TwoZero :: tick(MY_FLOAT sample) /* Perform Filter Operation */ +{ /* TwoZero is a two zero filter (duh!) */ + /* Look it up in your favorite DSP text */ + lastOutput = zeroCoeffs[0] * inputs[0]; + lastOutput += zeroCoeffs[1] * inputs[1]; + inputs[1] = inputs[0]; + inputs[0] = gain * sample; + lastOutput += inputs[0]; + return lastOutput; +} + diff --git a/TwoZero.h b/TwoZero.h new file mode 100644 index 0000000..d68adf8 --- /dev/null +++ b/TwoZero.h @@ -0,0 +1,27 @@ +/*******************************************/ +/* Two Zero Filter Class, */ +/* by Perry R. Cook, 1995-96 */ +/* See books on filters to understand */ +/* more about how this works. Nothing */ +/* out of the ordinary in this version. */ +/*******************************************/ + +#if !defined(__TwoZero_h) +#define __TwoZero_h + +#include "Filter.h" + +class TwoZero : public Filter +{ + protected: + MY_FLOAT zeroCoeffs[2]; + public: + TwoZero(); + ~TwoZero(); + void clear(); + void setZeroCoeffs(MY_FLOAT *coeffs); + void setGain(MY_FLOAT aValue); + MY_FLOAT tick(MY_FLOAT sample); +}; + +#endif diff --git a/Vibraphn.cpp b/Vibraphn.cpp new file mode 100644 index 0000000..f6a922f --- /dev/null +++ b/Vibraphn.cpp @@ -0,0 +1,75 @@ +/*******************************************/ +/* Vibraphone SubClass of Modal4 */ +/* Instrument, by Perry R. Cook, 1995-96 */ +/* */ +/* Controls: CONTROL1 = stickHardness */ +/* CONTROL2 = strikePosition*/ +/* CONTROL3 = vibFreq */ +/* MOD_WHEEL= vibAmt */ +/*******************************************/ + +#include "Vibraphn.h" + +Vibraphn :: Vibraphn() : Modal4() +{ + wave = new RawWave("rawwaves/marmstk1.raw"); + wave->normalize(); + wave->setRate(13.33); + vibr->setFreq(4.0); + onepole->setPole(0.2); + this->setRatioAndReson(0, 1.0,0.99995); /* Set */ + this->setRatioAndReson(1, 2.01,0.99991); /* our */ + this->setRatioAndReson(2, 3.9,0.99992); /* resonance */ + this->setRatioAndReson(3,14.37,0.99990); /* values here */ + this->setFiltGain(0,0.025); + this->setFiltGain(1,0.015); + this->setFiltGain(2,0.015); + this->setFiltGain(3,0.015); + masterGain = 1.0; + directGain = 0.0; + vibrGain = 0.2; +} + +Vibraphn :: ~Vibraphn() +{ +} + +void Vibraphn :: setStickHardness(MY_FLOAT hardness) +{ + wave->setRate(2.0 + (22.66 * hardness)); + masterGain = 0.2 + (hardness * 1.6); +} + +void Vibraphn :: setStrikePosition(MY_FLOAT position) +{ + MY_FLOAT temp,temp2; + temp2 = position * PI; + strikePosition = position; /* Hack only first three modes */ + temp = sin(strikePosition * PI); + this->setFiltGain(0,0.025 * temp); + temp = sin(0.1 + (2.01 * temp2)); + this->setFiltGain(1,0.015 * temp); + temp = sin(3.95 * temp2); + this->setFiltGain(2,0.015 * temp); +} + +void Vibraphn :: controlChange(int number, MY_FLOAT value) +{ +#if defined(_debug_) + printf("Vibraphn : ControlChange: Number=%i Value=%f\n",number,value); +#endif + if (number == MIDI_control1) + this->setStickHardness(value * NORM_7); + else if (number == MIDI_control2) + this->setStrikePosition(value * NORM_7); + else if (number == MIDI_control3) + vibr->setFreq((value * NORM_7 * 12.0)); + else if (number == MIDI_mod_wheel) + vibrGain = (value * NORM_7); + else if (number == MIDI_after_touch) + this->strike(value * NORM_7); + else { + printf("Vibraphn : Undefined Control Number!!\n"); + } +} + diff --git a/Vibraphn.h b/Vibraphn.h new file mode 100644 index 0000000..ebef735 --- /dev/null +++ b/Vibraphn.h @@ -0,0 +1,27 @@ +/*******************************************/ +/* Vibraphone SubClass of Modal4 */ +/* Instrument, by Perry R. Cook, 1995-96 */ +/* */ +/* Controls: CONTROL1 = stickHardness */ +/* CONTROL2 = strikePosition*/ +/* CONTROL3 = vibFreq */ +/* MOD_WHEEL= vibAmt */ +/*******************************************/ + +#if !defined(__Vibraphn_h) +#define __Vibraphn_h + +#include "Modal4.h" + +class Vibraphn : public Modal4 +{ + protected: + public: + Vibraphn(); + ~Vibraphn(); + void setStickHardness(MY_FLOAT hardness); + void setStrikePosition(MY_FLOAT position); + virtual void controlChange(int number, MY_FLOAT value); +}; + +#endif diff --git a/Vocaliz b/Vocaliz new file mode 100755 index 0000000..5c04c5d --- /dev/null +++ b/Vocaliz @@ -0,0 +1 @@ +time textVoic =100.00 eee ahh .... eee + + + + ahh .... eee + + + ahh . eee - - ahh . eee - ahh . eee - - ahh . eee - - ahh ..... =150.0 ...... =200.0 ...... diff --git a/VoicForm.cpp b/VoicForm.cpp new file mode 100644 index 0000000..daa7911 --- /dev/null +++ b/VoicForm.cpp @@ -0,0 +1,228 @@ +/*******************************************/ +/* 4 Formant Synthesis Instrument */ +/* by Perry R. Cook, 1995-96 */ +/* This instrument contains an excitation */ +/* singing wavetable (looping wave with */ +/* random and periodic vibrato, smoothing */ +/* on frequency, etc.), excitation noise, */ +/* and four sweepable complex resonances. */ +/* */ +/* Measured Formant data (from me) is */ +/* included, and enough data is there to */ +/* support either parallel or cascade */ +/* synthesis. In the floating point case */ +/* cascade synthesis is the most natural */ +/* so that's what you'll find here. */ +/* */ +/* For right now, there's a simple command*/ +/* line score interface consisting of 3 */ +/* letter symbols for the phonemes, =xx */ +/* sets the pitch to x, + and - add and */ +/* subtract a half step, and ... makes it */ +/* keep doing what it's doing for longer. */ +/*******************************************/ + +#include "VoicForm.h" + +VoicForm :: VoicForm() : Instrmnt() +{ + voiced = new SingWave("rawwaves/impuls40.raw"); + voiced->normalize(); + voiced->setGainRate(0.001); + voiced->setGainTarget(0.0); + + noise = new Noise; + + filters[0] = new FormSwep; + filters[1] = new FormSwep; + filters[2] = new FormSwep; + filters[3] = new FormSwep; + filters[0]->setSweepRate(0.001); + filters[1]->setSweepRate(0.001); + filters[2]->setSweepRate(0.001); + filters[3]->setSweepRate(0.001); + + onezero = new OneZero; + onezero->setCoeff(-0.9); + onepole = new OnePole; + onepole->setPole(0.9); + + noiseEnv = new Envelope; + noiseEnv->setRate(0.001); + noiseEnv->setTarget(0.0); + + this->setPhoneme("eee"); + this->clear(); +} + +VoicForm :: ~VoicForm() +{ + delete voiced; + delete noise; + delete filters[0]; + delete filters[1]; + delete filters[2]; + delete filters[3]; + delete onezero; + delete onepole; + delete noiseEnv; +} + +void VoicForm :: clear() +{ + onepole->clear(); + filters[0]->clear(); + filters[1]->clear(); + filters[2]->clear(); + filters[3]->clear(); +} + +void VoicForm :: setFreq(double frequency) +{ + voiced->setFreq(frequency); +} + +void VoicForm :: setFormantAll(int whichOne, double freq,double reson,double gain) +{ + filters[whichOne]->setTargets(freq,reson,gain); +} + + extern double phonGains[32][2]; + extern double phonParams[32][4][3]; + extern char phonemes[32][4]; + +int VoicForm :: setPhoneme(char *phoneme) +{ + int i=0,found=0; + + while(i<32 && !found) { + if (!strcmp(phonemes[i],phoneme)) { + found = 1; + this->setFormantAll(0,phonParams[i][0][0],phonParams[i][0][1],pow(10.0,phonParams[i][0][2] / 20.0)); + this->setFormantAll(1,phonParams[i][1][0],phonParams[i][1][1],1.0); + this->setFormantAll(2,phonParams[i][2][0],phonParams[i][2][1],1.0); + this->setFormantAll(3,phonParams[i][3][0],phonParams[i][3][1],1.0); + this->setVoicedUnVoiced(phonGains[i][0],phonGains[i][1]); + printf("Found Formant: %s (number %i)\n",phoneme,i); + } + i++; + } + if (!found) printf("Phoneme %s not found\n",phoneme); + return found; +} + +void VoicForm :: setVoiced(double vGain) +{ + voiced->setGainTarget(vGain); +} + +void VoicForm :: setUnVoiced(double nGain) +{ + noiseEnv->setTarget(nGain); +} + +void VoicForm :: setVoicedUnVoiced(double vGain, double nGain) +{ + this->setVoiced(vGain); + this->setUnVoiced(nGain); +} + +void VoicForm :: setFiltSweepRate(int whichOne,double rate) +{ + filters[whichOne]->setSweepRate(rate); +} + +void VoicForm :: setPitchSweepRate(double rate) +{ + voiced->setSweepRate(rate); +} + +void VoicForm :: speak() +{ + voiced->noteOn(); +} + +void VoicForm :: quiet() +{ + voiced->noteOff(); + noiseEnv->setTarget(0.0); +} + +void VoicForm :: noteOn(MY_FLOAT freq, MY_FLOAT amp) +{ + voiced->setGainTarget(amp); + onepole->setPole(0.95 - (amp * NORM_7 * 0.2)); + voiced->setFreq(freq); +} + +void VoicForm :: noteOff(MY_FLOAT amp) +{ + voiced->noteOff(); +} + +MY_FLOAT VoicForm :: tick() +{ + MY_FLOAT temp; + temp = onepole->tick(onezero->tick(voiced->tick())); + temp += noiseEnv->tick() * noise->tick(); + lastOutput = filters[0]->tick(temp); + lastOutput = filters[1]->tick(lastOutput); + lastOutput = filters[2]->tick(lastOutput); + lastOutput = filters[3]->tick(lastOutput); + lastOutput *= 0.02; + return lastOutput; +} + +void VoicForm :: controlChange(int number, MY_FLOAT value) +{ + MY_FLOAT temp; + int tempi; + +#if defined(_debug_) + printf("VoicForm : ControlChange: Number=%i Value=%f\n",number,value); +#endif + if (number == MIDI_control1) { + this->setVoiced(1.0 - (value*NORM_7)); + this->setUnVoiced(0.01 * value * NORM_7); + } + else if (number == MIDI_control2) { + tempi = (int) (value / 2); + if (tempi < 16) { + tempi = tempi; + temp = 0.9; + } + else if (tempi < 32) { + tempi = tempi - 16; + temp = 1.0; + } + else if (tempi < 48) { + tempi = tempi - 32; + temp = 1.1; + } + else if (tempi < 64) { + tempi = tempi - 48; + temp = 1.2; + } + this->setFormantAll(0,temp*phonParams[tempi][0][0], + phonParams[tempi][0][1], + pow(10.0,phonParams[tempi][0][2] / 20.0)); + this->setFormantAll(1,temp*phonParams[tempi][1][0], + phonParams[tempi][1][1],1.0); + this->setFormantAll(2,temp*phonParams[tempi][2][0], + phonParams[tempi][2][1],1.0); + this->setFormantAll(3,temp*phonParams[tempi][3][0], + phonParams[tempi][3][1],1.0); + } + else if (number == MIDI_control3) + voiced->setVibFreq(value * NORM_7 * 12.0); /* 0 to 12 Hz */ + else if (number == MIDI_mod_wheel) + voiced->setVibAmt(value * NORM_7 * 0.2); + else if (number == MIDI_after_touch) { + this->setVoiced(value*NORM_7); + onepole->setPole(0.99 - (value*NORM_7 * 0.2)); + } + else { + printf("VoicForm : Undefined Control Number!!\n"); + } +} + diff --git a/VoicForm.h b/VoicForm.h new file mode 100644 index 0000000..bba660c --- /dev/null +++ b/VoicForm.h @@ -0,0 +1,65 @@ +/*******************************************/ +/* 4 Formant Synthesis Instrument */ +/* by Perry R. Cook, 1995-96 */ +/* This instrument contains an excitation */ +/* singing wavetable (looping wave with */ +/* random and periodic vibrato, smoothing */ +/* on frequency, etc.), excitation noise, */ +/* and four sweepable complex resonances. */ +/* */ +/* Measured Formant data (from me) is */ +/* included, and enough data is there to */ +/* support either parallel or cascade */ +/* synthesis. In the floating point case */ +/* cascade synthesis is the most natural */ +/* so that's what you'll find here. */ +/* */ +/* For right now, there's a simple command*/ +/* line score interface consisting of 3 */ +/* letter symbols for the phonemes, =xx */ +/* sets the pitch to x, + and - add and */ +/* subtract a half step, and ... makes it */ +/* keep doing what it's doing for longer. */ +/*******************************************/ + +#if !defined(__VoicForm_h) +#define __VoicForm_h + +#include "Instrmnt.h" +#include "Envelope.h" +#include "Noise.h" +#include "SingWave.h" +#include "FormSwep.h" +#include "OnePole.h" +#include "OneZero.h" + +class VoicForm : public Instrmnt +{ + protected: + SingWave *voiced; + Noise *noise; + Envelope *noiseEnv; + FormSwep *filters[4]; + OnePole *onepole; + OneZero *onezero; + public: + VoicForm(); + ~VoicForm(); + void clear(); + void setFreq(double frequency); + void setFormantAll(int whichOne, double freq, double reson, double gain); + int setPhoneme(char* phoneme); + void setVoiced(double vGain); + void setUnVoiced(double nGain); + void setVoicedUnVoiced(double vGain, double nGain); + void setFiltSweepRate(int whichOne,double rate); + void setPitchSweepRate(double rate); + void speak(); + void quiet(); + virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp); + virtual void noteOff(MY_FLOAT amp); + MY_FLOAT tick(); + virtual void controlChange(int number, MY_FLOAT value); +}; + +#endif diff --git a/VoicMang.cpp b/VoicMang.cpp new file mode 100644 index 0000000..83b095e --- /dev/null +++ b/VoicMang.cpp @@ -0,0 +1,307 @@ +/******************************************/ +/* Simple Voice Manager (Mangler) */ +/* for ToolKit96, 1996 Perry R. Cook */ +/* Princeton University */ +/* */ +/* Make one of these by telling it the */ +/* maximum number of voices you'll want, */ +/* and also what flavor instrument */ +/* group it will be mangling. Pipe TSIDI*/ +/* messages into it and it will return */ +/* the mixed channel signal each tick. */ +/* For multi-channel (multi-timbral), */ +/* make one for each channel and mix */ +/* their outputs. */ +/* */ +/* Each note on returns a unique tag, */ +/* (credits to the NeXT MusicKit here), */ +/* so you can send control changes to */ +/* unique instances of instruments */ +/* within an ensemble. */ +/* */ +/* TSIDI (ToolKit Synthesis Instrument */ +/* Digital Interfaceis like MIDI, but */ +/* allows for floating point control */ +/* changes, note numbers, etc. Example: */ +/* noteOn(1,60.01,111.132) plays a sharp */ +/* middle C with a velocity of 111.132 */ +/* */ +/******************************************/ + +#include "VoicMang.h" +#include "Marimba.h" +#include "Vibraphn.h" +#include "AgogoBel.h" +#include "Plucked.h" +#include "Mandolin.h" +#include "Clarinet.h" +#include "Flute.h" +#include "Brass.h" +#include "Bowed.h" +#include "Rhodey.h" +#include "Wurley.h" +#include "TubeBell.h" +#include "HeavyMtl.h" +#include "PercFlut.h" +#include "BeeThree.h" +#include "Moog1.h" + +VoicMang :: VoicMang(int maxVoices, char *instrType) +{ + int i; + max_voices = maxVoices; + if (max_voices > __VMang_MAX_) { + printf("You ask for too many voices, setting to %i\n",__VMang_MAX_); + max_voices = __VMang_MAX_; + } + if (!strcmp(instrType,"Marimba")) { + for (i=0;inoteOn(temp,amp); +} + +#define ONE_OVER_12 0.083333 + +long VoicMang :: noteOn(MY_FLOAT note_num, MY_FLOAT amp) +{ + int i,gotOne; + int temp1; + long temp2; + MY_FLOAT temp3,temp4; + MY_FLOAT freq; + freq = 220.0*pow(2.0,(note_num-57.0) * ONE_OVER_12); + gotOne = 0; + for (i=0;inoteOn(freq,amp*NORM_7); + frequencies[i] = freq; + gotOne = 1; + i = max_voices; + } + } + if (!gotOne) { /* if can't find a free one */ + return -1; /* report back */ + } + return newTag-1; +} + +long VoicMang :: oldestVoice() +{ + int i; + long temp,temp2,gotOne; + temp = newTag; + gotOne = -1; + for (i=0;i 0 && temp2 < newTag) { + temp = temp2; + gotOne = temp2; + } + } + return gotOne; +} + +int VoicMang :: noteOffN(int note_num, MY_FLOAT amp) +{ + int i,gotOne; + MY_FLOAT temp; + gotOne = -1; + for (i=0;inoteOff(amp*NORM_7); + voicesOn[i] = -mute_time; + gotOne = 1; + } + } + return gotOne; +} + +void VoicMang :: noteOff(long tag, MY_FLOAT amp) +{ + int i; + for (i=0;inoteOff(amp*NORM_7); + voicesOn[i] = -mute_time; + } + } +} + +void VoicMang :: kill(long tag) +{ + int i; + for (i=0;inoteOff(1.0); + voicesOn[i] = 0; + notesOn[i] = -1; + } + } +} + +void VoicMang :: pitchBend(MY_FLOAT value) +{ + int i; + pitch_bend = value; + for (i=0;isetFreq(freqBases[i]*frequencies[i]); + } +} + +void VoicMang :: pitchBend(long tag, MY_FLOAT value) +{ + int i; + for (i=0;isetFreq(freqBases[i]*frequencies[i]); + i = max_voices; + } + } +} + +MY_FLOAT VoicMang :: tick() +{ + int i,j; + MY_FLOAT temp; + temp = 0.0; + for (i=0;itick(); + } + if (voicesOn[i] < 0) { + voicesOn[i] += 1; + if (voicesOn[i] == 0) { + notesOn[i] = -1; + frequencies[i] = 0.0; + freqBases[i] = 1.0; + } + } + } + return temp; +} + +void VoicMang :: controlChange(int number, MY_FLOAT value) +{ + int i; + for (i=0;icontrolChange(number,value); + } +} + +void VoicMang :: controlChange(long tag, int number, MY_FLOAT value) +{ + int i; + for (i=0;icontrolChange(number,value); + i = max_voices; + } + } +} + + diff --git a/VoicMang.h b/VoicMang.h new file mode 100644 index 0000000..9420a66 --- /dev/null +++ b/VoicMang.h @@ -0,0 +1,69 @@ +/******************************************/ +/* Simple Voice Manager (Mangler) */ +/* for ToolKit96, 1996 Perry R. Cook */ +/* Princeton University */ +/* */ +/* Make one of these by telling it the */ +/* maximum number of voices you'll want, */ +/* and also what flavor instrument */ +/* group it will be mangling. Pipe TSIDI*/ +/* messages into it and it will return */ +/* the mixed channel signal each tick. */ +/* For multi-channel (multi-timbral), */ +/* make one for each channel and mix */ +/* their outputs. */ +/* */ +/* Each note on returns a unique tag, */ +/* (credits to the NeXT MusicKit here), */ +/* so you can send control changes to */ +/* unique instances of instruments */ +/* within an ensemble. */ +/* */ +/* TSIDI (ToolKit Synthesis Instrument */ +/* Digital Interfaceis like MIDI, but */ +/* allows for floating point control */ +/* changes, note numbers, etc. Example: */ +/* noteOn(1,60.01,111.132) plays a sharp */ +/* middle C with a velocity of 111.132 */ +/* */ +/******************************************/ + +#include "Object.h" + +#if !defined(__VoicMang_h) +#define __VoicMang_h + +#include "Instrmnt.h" + +#define __VMang_MAX_ 8 + +class VoicMang : public Object +{ + protected: + char InstrumentType[16]; // Instrument Flavor + int max_voices; + long newTag; // Unique NoteOn tag counter + Instrmnt *instrument[__VMang_MAX_]; // The actual Instruments + long voicesOn[__VMang_MAX_]; // Tags of Sounding Notes + int notesOn[__VMang_MAX_]; // Note Numbers On + long mute_time; // Instrument time to shut up + MY_FLOAT freqBases[__VMang_MAX_]; // Indiv. Pitch Bend Multipliers + MY_FLOAT frequencies[__VMang_MAX_]; // Indiv. Sounding Frequencies + MY_FLOAT pitch_bend; // Channel Pitch Bend Mult. + public: + VoicMang(int maxVoices, char *instrType); + ~VoicMang(); + long noteOn(MY_FLOAT noteNum, MY_FLOAT amp); + long noteOnF(MY_FLOAT freq, MY_FLOAT amp); + void noteOff(long tag, MY_FLOAT amp); + int noteOffN(int note_num, MY_FLOAT amp); + long oldestVoice(); + void kill(long tag); + void controlChange(int number, MY_FLOAT value); + void controlChange(long tag, int number, MY_FLOAT value); + void pitchBend(MY_FLOAT value); + void pitchBend(long tag, MY_FLOAT value); + MY_FLOAT tick(); +}; + +#endif diff --git a/Wurley.cpp b/Wurley.cpp new file mode 100644 index 0000000..5685437 --- /dev/null +++ b/Wurley.cpp @@ -0,0 +1,53 @@ +/******************************************/ +/* Wurlitzer Electric Piano Subclass */ +/* of Algorithm 5 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/******************************************/ + +#include "Wurley.h" + +Wurley :: Wurley() : FM4Alg5() +{ + this->loadWaves("rawwaves/sinewave.raw", + "rawwaves/sinewave.raw", + "rawwaves/sinewave.raw", + "rawwaves/fwavblnk.raw"); + + this->setRatio(0,1.0); + this->setRatio(1,4.0); + this->setRatio(2,-510.0); + this->setRatio(3,-510.0); + gains[0] = __FM4Op_gains[99]; + gains[1] = __FM4Op_gains[82]; + gains[2] = __FM4Op_gains[92]; + gains[3] = __FM4Op_gains[68]; /* Originally 78, but sounded stinky */ + twozero->setGain(2.0); + adsr[0]->setAll(0.05,0.00003,0.0,0.02); + adsr[1]->setAll(0.05,0.00003,0.0,0.02); + adsr[2]->setAll(0.05,0.0002,0.0,0.02); + adsr[3]->setAll(0.05,0.0003,0.0,0.02); + vibWave->setFreq(8.0); +} + +void Wurley :: setFreq(MY_FLOAT frequency) +{ + baseFreq = frequency; + waves[0]->setFreq(baseFreq * ratios[0]); + waves[1]->setFreq(baseFreq * ratios[1]); + waves[2]->setFreq(ratios[2]); /* Note here a 'fixed resonance' */ + waves[3]->setFreq(ratios[3]); +} + +void Wurley :: noteOn(MY_FLOAT freq, MY_FLOAT amp) +{ + gains[0] = amp * __FM4Op_gains[99]; + gains[1] = amp * __FM4Op_gains[82]; + gains[2] = amp * __FM4Op_gains[82]; /* Originally 92 */ + gains[3] = amp * __FM4Op_gains[68]; /* Originally 78 */ + this->setFreq(freq); + this->keyOn(); +#if defined(_debug_) + printf("Wurley : NoteOn: Freq=%lf Amp=%lf\n",freq,amp); +#endif +} diff --git a/Wurley.h b/Wurley.h new file mode 100644 index 0000000..7be2f8e --- /dev/null +++ b/Wurley.h @@ -0,0 +1,21 @@ +/******************************************/ +/* Wurlitzer Electric Piano Subclass */ +/* of Algorithm 5 (TX81Z) Subclass of */ +/* 4 Operator FM Synth */ +/* by Perry R. Cook, 1995-96 */ +/******************************************/ + +#if !defined(__Wurley_h) +#define __Wurley_h + +#include "FM4Alg5.h" + +class Wurley : public FM4Alg5 +{ + public: + Wurley(); + virtual void setFreq(MY_FLOAT frequency); + virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp); +}; + +#endif diff --git a/miditabl.h b/miditabl.h new file mode 100644 index 0000000..4c2c08f --- /dev/null +++ b/miditabl.h @@ -0,0 +1,17 @@ +double __MIDI_To_Pitch[128] = { +8.18,8.66,9.18,9.72,10.30,10.91,11.56,12.25, +12.98,13.75,14.57,15.43,16.35,17.32,18.35,19.45, +20.60,21.83,23.12,24.50,25.96,27.50,29.14,30.87, +32.70,34.65,36.71,38.89,41.20,43.65,46.25,49.00, +51.91,55.00,58.27,61.74,65.41,69.30,73.42,77.78, +82.41,87.31,92.50,98.00,103.83,110.00,116.54,123.47, +130.81,138.59,146.83,155.56,164.81,174.61,185.00,196.00, +207.65,220.00,233.08,246.94,261.63,277.18,293.66,311.13, +329.63,349.23,369.99,392.00,415.30,440.00,466.16,493.88, +523.25,554.37,587.33,622.25,659.26,698.46,739.99,783.99, +830.61,880.00,932.33,987.77,1046.50,1108.73,1174.66,1244.51, +1318.51,1396.91,1479.98,1567.98,1661.22,1760.00,1864.66,1975.53, +2093.00,2217.46,2349.32,2489.02,2637.02,2793.83,2959.96,3135.96, +3322.44,3520.00,3729.31,3951.07,4186.01,4434.92,4698.64,4978.03, +5274.04,5587.65,5919.91,6271.93,6644.88,7040.00,7458.62,7902.13, +8372.02,8869.84,9397.27,9956.06,10548.08,11175.30,11839.82,12543.85}; diff --git a/phonTabl.h b/phonTabl.h new file mode 100644 index 0000000..45d148a --- /dev/null +++ b/phonTabl.h @@ -0,0 +1,189 @@ +double phonGains[32][2] = + {{1.0,0.0}, // eee + {1.0,0.0}, // ihh + {1.0,0.0}, // ehh + {1.0,0.0}, // aaa + + {1.0,0.0}, // ahh + {1.0,0.0}, // aww + {1.0,0.0}, // ohh + {1.0,0.0}, // uhh + + {1.0,0.0}, // uuu + {1.0,0.0}, // ooo + {1.0,0.0}, // rrr + {1.0,0.0}, // lll + + {1.0,0.0}, // mmm + {1.0,0.0}, // nnn + {1.0,0.0}, // nng + {1.0,0.0}, // ngg + + {0.0,1.0}, // fff + {0.0,1.0}, // sss + {0.0,1.0}, // thh + {0.0,1.0}, // shh + + {0.0,1.0}, // xxx + {0.0,0.1}, // hee + {0.0,0.1}, // hoo + {0.0,0.1}, // hah + + {1.0,0.1}, // bbb + {1.0,0.1}, // ddd + {1.0,0.1}, // jjj + {1.0,0.1}, // ggg + + {1.0,1.0}, // vvv + {1.0,1.0}, // zzz + {1.0,1.0}, // thz + {1.0,1.0} // zhh +}; + +double phonParams[32][4][3] = + {{ { 273,0.996, 0}, // eee (beet) + {2086,0.945, -16}, + {2754,0.979, -12}, + {3270,0.440, -17}}, + { { 385,0.987, 10}, // ihh (bit) + {2056,0.930, -20}, + {2587,0.890, -20}, + {3150,0.400, -20}}, + { { 515,0.977, 10}, // ehh (bet) + {1805,0.810, -10}, + {2526,0.875, -10}, + {3103,0.400, -13}}, + { { 773,0.950, 10}, // aaa (bat) + {1676,0.830, -6}, + {2380,0.880, -20}, + {3027,0.600, -20}}, + + { { 770,0.950, 0}, // ahh (father) + {1153,0.970, -9}, + {2450,0.780, -29}, + {3140,0.800, -39}}, + { { 637,0.910, 0}, // aww (bought) + { 895,0.900, -3}, + {2556,0.950, -17}, + {3070,0.910, -20}}, + { { 637,0.910, 0}, // ohh (bone) NOTE:: same as aww (bought) + { 895,0.900, -3}, + {2556,0.950, -17}, + {3070,0.910, -20}}, + { { 561,0.965, 0}, // uhh (but) + {1084,0.930, -10}, + {2541,0.930, -15}, + {3345,0.900, -20}}, + + { { 515,0.976, 0}, // uuu (foot) + {1031,0.950, -3}, + {2572,0.960, -11}, + {3345,0.960, -20}}, + { { 349,0.986, -10}, // ooo (boot) + { 918,0.940, -20}, + {2350,0.960, -27}, + {2731,0.950, -33}}, + { { 394,0.959, -10}, // rrr (bird) + {1297,0.780, -16}, + {1441,0.980, -16}, + {2754,0.950, -40}}, + { { 462,0.990, +5}, // lll (lull) + {1200,0.640, -10}, + {2500,0.200, -20}, + {3000,0.100, -30}}, + + { { 265,0.987, -10}, // mmm (mom) + {1176,0.940, -22}, + {2352,0.970, -20}, + {3277,0.940, -31}}, + { { 204,0.980, -10}, // nnn (nun) + {1570,0.940, -15}, + {2481,0.980, -12}, + {3133,0.800, -30}}, + { { 204,0.980, -10}, // nng (sang) NOTE:: same as nnn + {1570,0.940, -15}, + {2481,0.980, -12}, + {3133,0.800, -30}}, + { { 204,0.980, -10}, // ngg (bong) NOTE:: same as nnn + {1570,0.940, -15}, + {2481,0.980, -12}, + {3133,0.800, -30}}, + + { {1000,0.300, 0}, // fff + {2800,0.860, -10}, + {7425,0.740, 0}, + {8140,0.860, 0}}, + { {0,0.000, 0}, // sss + {2000,0.700, -15}, + {5257,0.750, -3}, + {7171,0.840, 0}}, + { { 100,0.900, 0}, // thh + {4000,0.500, -20}, + {5500,0.500, -15}, + {8000,0.400, -20}}, + { {2693,0.940, 0}, // shh + {4000,0.720, -10}, + {6123,0.870, -10}, + {7755,0.750, -18}}, + + { {1000,0.300, -10}, // xxx NOTE:: Not Really Done Yet + {2800,0.860, -10}, + {7425,0.740, 0}, + {8140,0.860, 0}}, + { { 273,0.996, -40}, // hee (beet) (noisy eee) + {2086,0.945, -16}, + {2754,0.979, -12}, + {3270,0.440, -17}}, + { { 349,0.986, -40}, // hoo (boot) (noisy ooo) + { 918,0.940, -10}, + {2350,0.960, -17}, + {2731,0.950, -23}}, + { { 770,0.950, -40}, // hah (father) (noisy ahh) + {1153,0.970, -3}, + {2450,0.780, -20}, + {3140,0.800, -32}}, + + { {2000,0.700, -20}, // bbb NOTE:: Not Really Done Yet + {5257,0.750, -15}, + {7171,0.840, -3}, + {9000,0.900, 0}}, + { { 100,0.900, 0}, // ddd NOTE:: Not Really Done Yet + {4000,0.500, -20}, + {5500,0.500, -15}, + {8000,0.400, -20}}, + { {2693,0.940, 0}, // jjj NOTE:: Not Really Done Yet + {4000,0.720, -10}, + {6123,0.870, -10}, + {7755,0.750, -18}}, + { {2693,0.940, 0}, // ggg NOTE:: Not Really Done Yet + {4000,0.720, -10}, + {6123,0.870, -10}, + {7755,0.750, -18}}, + + { {2000,0.700, -20}, // vvv NOTE:: Not Really Done Yet + {5257,0.750, -15}, + {7171,0.840, -3}, + {9000,0.900, 0}}, + { { 100,0.900, 0}, // zzz NOTE:: Not Really Done Yet + {4000,0.500, -20}, + {5500,0.500, -15}, + {8000,0.400, -20}}, + { {2693,0.940, 0}, // thz NOTE:: Not Really Done Yet + {4000,0.720, -10}, + {6123,0.870, -10}, + {7755,0.750, -18}}, + { {2693,0.940, 0}, // zhh NOTE:: Not Really Done Yet + {4000,0.720, -10}, + {6123,0.870, -10}, + {7755,0.750, -18}} +}; + +char phonemes[32][4] = + {"eee","ihh","ehh","aaa", + "ahh","aww","ohh","uhh", + "uuu","ooo","rrr","lll", + "mmm","nnn","nng","ngg", + "fff","sss","thh","shh", + "xxx","hee","hoo","hah", + "bbb","ddd","jjj","ggg", + "vvv","zzz","thz","zhh"}; diff --git a/rawwaves/MAKEFUNC.C b/rawwaves/MAKEFUNC.C new file mode 100644 index 0000000..9148919 --- /dev/null +++ b/rawwaves/MAKEFUNC.C @@ -0,0 +1,55 @@ +/**********************************************/ +/** Utility to make various functions **/ +/** like exponential and log gain curves. **/ +/** **/ +/** Included here: **/ +/** Yamaha TX81Z curves for master gain, **/ +/** Envelope Rates (in normalized units), **/ +/** envelope sustain level, and more.... **/ +/**********************************************/ + +#include +#include +#include + +void main() +{ + int i,j; + double temp; + double data[128]; + +/*************** TX81Z Master Gain *************/ + for (i=0;i<100;i++) { + data[i] = pow(2.0,-(99-i)/10.0); + } + data[0] = 0.0; + printf("double __FM4Op_gains[99] = {"); + for (i=0;i<100;i++) { + if (i%8 == 0) printf("\n"); + printf("%lf,",data[i]); + } + printf("};\n"); +/*************** TX81Z Sustain Level ***********/ + for (i=0;i<16;i++) { + data[i] = pow(2.0,-(15-i)/2.0); + } + data[0] = 0.0; + printf("double __FM4Op_susLevels[16] = {"); + for (i=0;i<16;i++) { + if (i%8 == 0) printf("\n"); + printf("%lf,",data[i]); + } + printf("};\n"); +/****************** Attack Rate ***************/ + for (i=0;i<32;i++) { + data[i] = 6.0 * pow(5.7,-(i-1)/5.0); + } + printf("double __FM4Op_attTimes[16] = {"); + for (i=0;i<32;i++) { + if (i%8 == 0) printf("\n"); + printf("%lf,",data[i]); + } + printf("};\n"); + exit(1); +} + diff --git a/rawwaves/MAKEMIDI.C b/rawwaves/MAKEMIDI.C new file mode 100644 index 0000000..de68d25 --- /dev/null +++ b/rawwaves/MAKEMIDI.C @@ -0,0 +1,33 @@ +/**********************************************/ +/** Utility to make various functions **/ +/** like exponential and log gain curves. **/ +/** Specifically for direct MIDI parameter **/ +/** conversions. **/ +/** Included here: **/ +/** A440 Referenced Equal Tempered Pitches **/ +/** as a function of MIDI note number. **/ +/** **/ +/**********************************************/ + +#include +#include +#include + +void main() +{ + int i,j; + double temp; + double data[128]; + +/********* Pitch as fn. of MIDI Note **********/ + + printf("double __MIDI_To_Pitch[128] = {"); + for (i=0;i<128;i++) { + if (i%8 == 0) printf("\n"); + temp = 220.0 * pow(2.0,((double) i - 57) / 12.0); + printf("%.2lf,",temp); + } + printf("};\n"); + exit(1); +} + diff --git a/rawwaves/MAKEWAVS.C b/rawwaves/MAKEWAVS.C new file mode 100644 index 0000000..ab52ed3 --- /dev/null +++ b/rawwaves/MAKEWAVS.C @@ -0,0 +1,116 @@ +/**********************************************/ +/** Utility to make various flavors of **/ +/** sine wave (rectified, etc), and **/ +/** other commonly needed waveforms, like **/ +/** triangles, ramps, etc. **/ +/** The files generated are all 16 bit **/ +/** linear signed integer, of length **/ +/** as defined by LENGTH below **/ +/**********************************************/ + +#include +#include +#include + +#define LENGTH 256 +#define PI 3.14159265358979323846 + +void main() +{ + int i,j; + double temp; + short data[LENGTH + 2]; + FILE *fd; + + /////////// Yer Basic TX81Z Waves, Including Sine /////////// + fd = fopen("halfwave.raw","wb"); + for (i=0;i +#include +#include +#include +#define ABS(x) ((x < 0) ? (-x) : (x)) +#define MAX(A,B) ( (A) > (B) ? (A) : (B) ) + +/* + This version of soundio.c is specific for use on an SGI machine. + + -Doug Scott, 10/95 +*/ + +ALconfig audio_port_config; +ALport audio_port; +long bufsize; +int lookaheadbuffers = 8; // number of lookahead buffers +short peakl, peakr; + +int +init_sound(float sr,int chans) + +{ + long pvbuf[2]; + int nbuf; + audio_port_config = ALnewconfig(); + if(ALsetchannels(audio_port_config, chans) < 0) + exit(-1); + /* make output queue twice the size of our buffer */ + nbuf = (chans == 2) ? lookaheadbuffers : lookaheadbuffers/2; + if(ALsetqueuesize(audio_port_config, bufsize=BUFFER_SIZE * nbuf) < 0) + exit(-1); + if(audio_port) ALcloseport(audio_port); + audio_port = ALopenport("sgi.driver", "w", audio_port_config); + if(!audio_port) exit(-1); + ALfreeconfig(audio_port_config); + audio_port_config = 0; + + pvbuf[0] = AL_OUTPUT_RATE; + pvbuf[1] = (long) sr; + ALsetparams(AL_DEFAULT_DEVICE, pvbuf, 2); /* set output SR */ + /* tell port to accept refill at buffers - 1 */ + ALsetfillpoint(audio_port,BUFFER_SIZE * (lookaheadbuffers - 1)); + return(0); +} + +int +playbuf(short *buf,int bufsize) +{ + ALwritesamps(audio_port, buf, bufsize); + return(0); +} + +void shuddup() +{ + if(audio_port) ALcloseport(audio_port); + audio_port=0; +} diff --git a/testMIDI.cpp b/testMIDI.cpp new file mode 100644 index 0000000..e0f6c60 --- /dev/null +++ b/testMIDI.cpp @@ -0,0 +1,71 @@ +/************** Test Main Program Individual Voice *********************/ + +#include "miditabl.h" +#include "MIDIInpt.h" + +#define ATOUCHMAX 2 + +int main(int argc,char *argv[]) +{ + long i, j; + int oneOn = 0; + int lastTouch = 0; + int aTouchThin = 0; + MY_FLOAT temp,temp2; + MIDIInpt controller; + + if (argc!=1) { + printf("useage: testMIDI\n"); + exit(0); + } + + while(1) { + if (controller.nextMessage() > 0) { + temp2 = controller.getByteThree(); + temp = controller.getByteTwo(); + if (controller.getType()==9) { + if (temp2 < 1.0) { + if (oneOn == 1) { + printf("NoteOff 0.0 1 %f %f\n",temp,64.0); + } + oneOn -= 1; + } + else { + printf("NoteOn 0.0 1 %f %f\n",temp,temp2); + oneOn += 1; + } + } + else if (controller.getType()==8) { + if (temp2 < 2.0) temp2 = 64.0; + if (oneOn ==1) { + printf("NoteOff 0.0 1 %f %f\n",temp,temp2); + } + oneOn -= 1; + } + else if (controller.getType() == 11) { + j = (int) temp; + printf("ControlChange 0.0 1 %i %f\n",j,temp2); + } + else if (controller.getType() == 13) { +// aTouchThin += 1; +// if (aTouchThin == ATOUCHMAX) { +// temp2 = fabs(temp - lastTouch); +// if (temp2 > 10) { +// printf("AfterTouch 0.0 1 %f\n",temp); +// lastTouch = temp; +// } +// aTouchThin = 0; +// } + } + else if (controller.getType() == 12) { + j = (int) temp; + printf("ProgramChange 0.0 1 %i\n",j); + } + fflush(stdout); + } + } + + +} + + diff --git a/testMono.cpp b/testMono.cpp new file mode 100644 index 0000000..c6f6c52 --- /dev/null +++ b/testMono.cpp @@ -0,0 +1,110 @@ +/************** Test Main Program Individual Voice *********************/ + +#include "miditabl.h" +#include "RawWvOut.h" +#include "MIDIText.h" +#include "Instrmnt.h" +#include "Marimba.h" +#include "Vibraphn.h" +#include "AgogoBel.h" +#include "Plucked.h" +#include "Mandolin.h" +#include "Clarinet.h" +#include "Flute.h" +#include "Brass.h" +#include "Bowed.h" +#include "Rhodey.h" +#include "Wurley.h" +#include "TubeBell.h" +#include "HeavyMtl.h" +#include "PercFlut.h" +#include "BeeThree.h" +#include "FMVoices.h" +#include "VoicForm.h" +#include "Moog1.h" +#include "Reverb.h" + +int main(int argc,char *argv[]) +{ + long i, j; + MY_FLOAT temp,temp2; + Instrmnt *instrument; + RawWvOut output("test.snd"); + Reverb reverb(2137); + MIDIText *score; + + if (argc<3) { + printf("useage: testMono Instr file.mtx\n"); + printf(" where Instr = Marimba Vibraphn AgogoBel Plucked\n"); + printf(" Mandolin Clarinet Flute Brass Bowed \n"); + printf(" Rhodey Wurley TubeBell HeavyMtl\n"); + printf(" PercFlut BeeThree FMVoices Moog1 VoicForm\n"); + exit(0); + } + if (!strcmp(argv[1],"Marimba")) instrument = new Marimba; + else if (!strcmp(argv[1],"Vibraphn")) instrument = new Vibraphn; + else if (!strcmp(argv[1],"AgogoBel")) instrument = new AgogoBel; + else if (!strcmp(argv[1],"Plucked")) instrument = new Plucked(50.0); + else if (!strcmp(argv[1],"Mandolin")) instrument = new Mandolin(50.0); + else if (!strcmp(argv[1],"Clarinet")) instrument = new Clarinet(50.0); + else if (!strcmp(argv[1],"Flute")) instrument = new Flute(50.0); + else if (!strcmp(argv[1],"Brass")) instrument = new Brass(50.0); + else if (!strcmp(argv[1],"Bowed")) instrument = new Bowed(50.0); + else if (!strcmp(argv[1],"Rhodey")) instrument = new Rhodey; + else if (!strcmp(argv[1],"Wurley")) instrument = new Wurley; + else if (!strcmp(argv[1],"TubeBell")) instrument = new TubeBell; + else if (!strcmp(argv[1],"HeavyMtl")) instrument = new HeavyMtl; + else if (!strcmp(argv[1],"PercFlut")) instrument = new PercFlut; + else if (!strcmp(argv[1],"BeeThree")) instrument = new BeeThree; + else if (!strcmp(argv[1],"FMVoices")) instrument = new FMVoices; + else if (!strcmp(argv[1],"VoicForm")) instrument = new VoicForm; + else if (!strcmp(argv[1],"Moog1")) instrument = new Moog1; + else { + printf("Instrument type must be 1 of:\n"); + printf("Marimba Vibraphn AgogoBel Plucked Mandolin\n"); + printf("Clarinet Flute Brass Bowed Rhodey Wurley TubeBell\n"); + printf("HeavyMtl PercFlut BeeThree FMVoices Moog1 VoicForm\n"); + exit(0); + } + score = new MIDIText(argv[2]); + + reverb.setEffectMix(0.2); + while(score->getType() > 0) { + j = (long) (score->getDelta() * SRATE); +#if defined(_debug_) + printf("%i\n",j); +#endif + if (j > 0) { + for (i=0;itick())); + } + } + temp2 = score->getByteThree()*NORM_7; + if (score->getType()==9) { + if (score->getByteThree() == 0) + instrument->noteOff(temp2); + else { + j = (int) score->getByteTwo(); + temp = __MIDI_To_Pitch[j]; + instrument->noteOn(temp,temp2); + } + } + else if (score->getType() == 8) { + instrument->noteOff(temp2); + } + else if (score->getType() == 11) { + j = (int) score->getByteTwo(); + instrument->controlChange(j,temp2*128.0); + } + score->nextMessage(); + } + for (i=0;i<22000;i++) { /* let the reverb settle a little */ + output.tick(reverb.tick(instrument->tick())); + } + + delete score; + delete instrument; + +} + + diff --git a/testMult.cpp b/testMult.cpp new file mode 100644 index 0000000..d8ccc6a --- /dev/null +++ b/testMult.cpp @@ -0,0 +1,87 @@ +/************** Test Main Program Individual Voice *********************/ + +#include "miditabl.h" +#include "RawWvOut.h" +#include "MIDIText.h" +#include "Reverb.h" +#include "VoicMang.h" + +int main(int argc,char *argv[]) +{ + long i, j; + MY_FLOAT temp,temp2; + VoicMang *section; + RawWvOut output("test.snd"); + Reverb reverb(2137); + float gain; + MIDIText *score; + + if (argc<3) { + printf("useage: testMulti Instr file.mtx\n"); + printf(" where Instr = Marimba Vibraphn AgogoBel Plucked\n"); + printf(" Mandolin Clarinet Flute Brass Bowed \n"); + printf(" Rhodey Wurley TubeBell HeavyMtl\n"); + printf(" PercFlut BeeThree Moog1\n"); + exit(0); + } + else if (argc==4) { + gain = atof(argv[1]); + section = new VoicMang(8,argv[2]); + score = new MIDIText(argv[3]); + } + else if (argc==3) { + gain = 0.125; + section = new VoicMang(8,argv[1]); + score = new MIDIText(argv[2]); + } + if (!section) { + printf("section type must be 1 of:\n"); + printf("Marimba Vibraphn AgogoBel Plucked Mandolin\n"); + printf("Clarinet Flute Brass Bowed Rhodey Wurley\n"); + printf("TubeBell HeavyMtl PercFlut BeeThree Moog1\n"); + exit(0); + } + + reverb.setEffectMix(0.2); + while(score->getType() > 0) { + j = long (score->getDelta() * SRATE); +// printf("%i\n",j); + if (j > 0) { + for (i=0;itick())); + } + } + temp = score->getByteTwo(); + temp2 = score->getByteThree(); + if (score->getType()==9) { + if (score->getByteThree() == 0) { + section->noteOffN((int) temp,temp2); + } + else { + j = section->noteOn(temp,temp2); + if (j<0) { + printf("Out of Voices Here\n"); + section->kill(section->oldestVoice()); + section->noteOn(temp,temp2); + } + } + } + else if (score->getType() == 8) { + section->noteOffN((int) temp,temp2); + } + else if (score->getType() == 11) { + j = (int) score->getByteTwo(); + section->controlChange(j,temp2); + } + score->nextMessage(); + } + for (i=0;i<22000;i++) { /* let the reverb settle a little */ + output.tick(reverb.tick(0.125 * section->tick())); + } + + delete score; + delete section; + +} + + diff --git a/testTextIn.cpp b/testTextIn.cpp new file mode 100644 index 0000000..db3f1eb --- /dev/null +++ b/testTextIn.cpp @@ -0,0 +1,187 @@ +/************** Test Main Program Individual Voice *********************/ + +#include "miditabl.h" +#include "RawWvOut.h" +#include "Instrmnt.h" +#include "Marimba.h" +#include "Vibraphn.h" +#include "AgogoBel.h" +#include "Plucked.h" +#include "Mandolin.h" +#include "Clarinet.h" +#include "Flute.h" +#include "Brass.h" +#include "Bowed.h" +#include "Rhodey.h" +#include "Wurley.h" +#include "TubeBell.h" +#include "HeavyMtl.h" +#include "PercFlut.h" +#include "BeeThree.h" +#include "FMVoices.h" +#include "Moog1.h" +#include "VoicForm.h" +#include "Reverb.h" + +#include +#include +#define _BSD_SIGNALS +#include + +#define MAX_BUF 16 + +int gotOne = 0; +char inputString[128]; +int test_pid; + +void newString(void *) +{ + while (1) { + fgets(inputString,128,stdin); + gotOne = 1; + } +} + +int main(int argc,char *argv[]) +{ + long i, j; + MY_FLOAT temp,temp2; + Instrmnt *instrument; + RawWvOut output("test.snd"); + Reverb reverb(2137); + int outAHere; + double deltaTime; + int channel; + int point; + char tempString[32]; + float byteTwo,byteThree,lastPitch=100.0; + + if (argc<2) { + printf("useage: testTCL Instr\n"); + printf(" where Instr = Marimba Vibraphn AgogoBel Plucked\n"); + printf(" Mandolin Clarinet Flute Brass Bowed \n"); + printf(" Rhodey Wurley TubeBell HeavyMtl\n"); + printf(" PercFlut BeeThree FMVoices VoicForm Moog1\n"); + exit(0); + } + if (!strcmp(argv[1],"Marimba")) instrument = new Marimba; + else if (!strcmp(argv[1],"Vibraphn")) instrument = new Vibraphn; + else if (!strcmp(argv[1],"AgogoBel")) instrument = new AgogoBel; + else if (!strcmp(argv[1],"Plucked")) instrument = new Plucked(50.0); + else if (!strcmp(argv[1],"Mandolin")) instrument = new Mandolin(50.0); + else if (!strcmp(argv[1],"Clarinet")) instrument = new Clarinet(50.0); + else if (!strcmp(argv[1],"Flute")) instrument = new Flute(50.0); + else if (!strcmp(argv[1],"Brass")) instrument = new Brass(50.0); + else if (!strcmp(argv[1],"Bowed")) instrument = new Bowed(50.0); + else if (!strcmp(argv[1],"Rhodey")) instrument = new Rhodey; + else if (!strcmp(argv[1],"Wurley")) instrument = new Wurley; + else if (!strcmp(argv[1],"TubeBell")) instrument = new TubeBell; + else if (!strcmp(argv[1],"HeavyMtl")) instrument = new HeavyMtl; + else if (!strcmp(argv[1],"PercFlut")) instrument = new PercFlut; + else if (!strcmp(argv[1],"BeeThree")) instrument = new BeeThree; + else if (!strcmp(argv[1],"FMVoices")) instrument = new FMVoices; + else if (!strcmp(argv[1],"VoicForm")) instrument = new VoicForm; + else if (!strcmp(argv[1],"Moog1")) instrument = new Moog1; + else { + printf("Instrument type must be 1 of:\n"); + printf("Marimba Vibraphn AgogoBel Plucked Mandolin\n"); + printf("Clarinet Flute Brass Bowed Rhodey Wurley TubeBell\n"); + printf("HeavyMtl PercFlut BeeThree FMVoices VoicForm Moog1\n"); + exit(0); + } + + reverb.setEffectMix(0.2); + instrument->noteOn(440.0, 0.95); + + test_pid = sproc(newString, PR_SALL); + + if (test_pid == -1) + { + fprintf(stderr, "unable to create input thread...aborting.\n"); + exit(-1); + } + + outAHere = 0; + + while (!outAHere) { + while (gotOne == 0) { + output.tick(reverb.tick(instrument->tick())); + } + if (gotOne > 0) { + sscanf(inputString,"%s %lf %i %f %f",tempString,&deltaTime,&channel,&byteTwo,&byteThree); + gotOne = 0; + point = 5; + if (tempString[0]=='%') point = 1; + if (tempString[point] == 'n') { // NoteO'n' + j = (int) byteTwo; + byteTwo = __MIDI_To_Pitch[j]; + lastPitch = byteTwo; + instrument->noteOn(byteTwo,byteThree*NORM_7); + } + else if (tempString[point] == 'f') { // NoteO'f'f + j = (int) byteTwo; + instrument->noteOff(byteThree*NORM_7); + } + else if (tempString[point] == 'B') { // Pitch'B'end + byteThree = byteTwo; + j = (int) byteThree; + byteThree -= j; + lastPitch = __MIDI_To_Pitch[j] * pow(2.0,byteThree / 12.0) ; + instrument->setFreq(lastPitch); + } + else if (tempString[point] == 'a') { // Progr'a'mChange + instrument->noteOff(1.0); + for (i=0;i<4096;i++) { + output.tick(reverb.tick(instrument->tick())); + } + delete instrument; + if (byteTwo==0) instrument = new Clarinet(50.0); + else if (byteTwo==1) instrument = new Flute(50.0); + else if (byteTwo==2) instrument = new Brass(50.0); + else if (byteTwo==3) instrument = new Bowed(50.0); + + else if (byteTwo==4) instrument = new Mandolin(50.0); + else if (byteTwo==5) instrument = new Marimba; + else if (byteTwo==6) instrument = new Vibraphn; + else if (byteTwo==7) instrument = new AgogoBel; + else if (byteTwo==8) instrument = new Rhodey; + else if (byteTwo==9) instrument = new Wurley; + else if (byteTwo==10) instrument = new TubeBell; + + else if (byteTwo==11) instrument = new FMVoices; + else if (byteTwo==12) instrument = new VoicForm; + + else if (byteTwo==13) instrument = new HeavyMtl; + else if (byteTwo==14) instrument = new PercFlut; + else if (byteTwo==15) instrument = new Moog1; + + instrument->noteOn(lastPitch, 0.95); + } + else if (tempString[point] == 'T') { // After'T'ouch + instrument->controlChange(128,byteTwo); + } + else if (tempString[point] == 'o') { // Contr'o'lChange + j = (long) byteTwo; + instrument->controlChange(j,byteThree); + } + else if (tempString[0] == 'E' && tempString[1] == 'x') { + gotOne = 0; + outAHere = 1; + } + +// else if (tempString[0] == '/') { +// notDone = 1; +// } + + gotOne = 0; + + } + + } + + kill(test_pid, SIGKILL); + delete instrument; + +} + + diff --git a/textVoic.cpp b/textVoic.cpp new file mode 100644 index 0000000..5707d04 --- /dev/null +++ b/textVoic.cpp @@ -0,0 +1,80 @@ +/* Very simple text input program for formant voice + model. Perry R. Cook 1996 */ + +/************ Test Main Program *****************/ + +#include "VoicForm.h" +#include "RawWvOut.h" +#include "Reverb.h" + +int main(int argc, char *argv[]) +{ + VoicForm instrument; + RawWvOut output("test.snd"); + Reverb reverb(2137); + long i,j,k; + double temp = 110.0; + + if (argc>1) { + + instrument.setPitchSweepRate(0.001); + instrument.setFreq(temp); + reverb.setEffectMix(0.2); + for (j=1;j