30 mAEnv(0.25, 0.03, 0.06, 0.5, 0.15),
38 mAEnv(0.25, 0.03, 0.06, 0.5, 0.15),
46 mAEnv(0.25, 0.03, 0.06, 0.5, 0.15),
47 mSOS(numHarms, noise),
54 mAEnv(0.25, 0.03, 0.06, 0.5, 0.15),
90 mPanner(in.mPanner) { }
100 float d = * (
float *) argv[0];
102 d = (float) (* (
int *) argv[0]);
105 d = (float) (* (
int *) argv[0]);
107 s = * (
float *) argv[1];
109 s = (float) (* (
int *) argv[1]);
132 logMsg(
kLogError,
"Unknown selector in AdditiveInstrument set_parameter selector: %d\n", selector);
136 logMsg(
"Set %d SOS partials to (%s)\n", argc, types);
139 logMsg(
kLogError,
"Unknown multi-arg (%d) setter in AdditiveInstrument: %s\n", argc, types);
149 float ** fargs = (
float **) argv;
159 logMsg(
kLogError,
"Invalid type string in OSC message, expected \"ff...ff\" got \"%s\"\n", types);
162 printf(
"\tAdd: d %5.2f a %5.2f f %7.1f p %5.2f\n",
163 *fargs[0], *fargs[1], *fargs[2], *fargs[3]);
169 printf(
"\t\ta %5.2f d %5.2f s %5.2f r %5.2f\t\ta %5.2f d %5.2f s %5.2f r %5.2f\n",
170 fargs[6], fargs[7], fargs[8], fargs[9], fargs[10], fargs[11], fargs[12], fargs[13]);
void logMsg(const char *format,...)
These are the public logging messages.
Panner mPanner
stereo panner
AdditiveInstrument.h – Sum-of-sines synthesis instrument class.
void playOSC(int argc, void **argv, const char *types)
Play functions.
void setAttack(float attack)
void setRelease(float release)
UnitGenerator * mGraph
Caches.
float keyToFreq(unsigned midiKey)
MIDI Conversions.
void addPartials(unsigned num_p, Partial **pt)
AccessorVector mAccessors
the accessor vector
void playMIDI(float dur, int chan, int key, int vel)
void playNote(float dur=1, float ampl=1, float c_fr=110, float pos=0, float att=0.05, float dec=0.05, float sus=0.5, float rel=0.5)
ADSR mAEnv
amplitude envelope
SumOfSines mSOS
sum-of-sine oscillator
#define set_duration_f
Instrument.h – The CSL pluggable instrument class. See the copyright notice and acknowledgment of au...
unsigned mNumChannels
my "expected" number of output channels
void setPosition(UnitGenerator &pan)
Operations.
Instrument class (abstract)
void addPartial(Partial *pt)
given a SHARC spectrum
void setParameter(unsigned selector, int argc, void **argv, const char *types)
Plug functions.
void setDuration(float d)
Special accessors.
void setFrequency(UnitGenerator &frequency)
Setter accessors.
virtual void scaleValues(float s)
scale values so the max is s
AdditiveInstrument()
Constructor.
void setSustain(float sustain)
The Accessor class has public data members.
void setDecay(float decay)
UGenVector mEnvelopes
the vector of envelopes to query or trigger
void setScale(UnitGenerator &scale)
set the receiver's scale member to a UGen or a float
UGenMap mUGens
the map of ugens in the graph by name