16 mEnvelope((mPlayer.stopFrame() - mPlayer.startFrame()) / mPlayer.frameRate(), 0.01, 0.01),
17 mPanner(mEnvelope, 0.0, 1.0),
24 mPlayer(folder + path ),
25 mEnvelope((mPlayer.stopFrame() - mPlayer.startFrame()) / mPlayer.frameRate(), 0.01, 0.01),
26 mPanner(mEnvelope, 0.0, 1.0),
36 if (path.size() > 0) {
67 float d = * (
float *) argv[0];
69 d = (float) (* (
int *) argv[0]);
78 mPlayer.setPath((
char *) argv[0]);
96 logMsg(
kLogError,
"Unknown selector in SndFileInstrument set_parameter selector: %d", selector);
110 float ** fargs = (
float **) argv;
111 int ** iargs = (
int **) argv;
114 if (strcmp(types,
"ff") != 0) {
115 logMsg(
kLogError,
"Invalid type string in OSC message, expected \"ff\" got \"%s\"", types);
123 if (strcmp(types,
"fff") != 0) {
124 logMsg(
kLogError,
"Invalid type string in OSC message, expected \"fff\" got \"%s\"", types);
133 if (strcmp(types,
"ffii") == 0) {
141 if (strcmp(types,
"ffff") == 0) {
144 mPlayer.setStartRatio(*fargs[2]);
145 mPlayer.setStopRatio(*fargs[3]);
149 logMsg(
kLogError,
"Invalid type string in OSC message, expected \"ffii\" got \"%s\"", types);
152 if (strcmp(types,
"fffii") != 0) {
153 logMsg(
kLogError,
"Invalid type string in OSC message, expected \"fffii\" got \"%s\"", types);
159 mPlayer.setStartRatio(*iargs[3]);
160 mPlayer.setStopRatio(*iargs[4]);
164 if (strcmp(types,
"ffiiff") != 0) {
165 logMsg(
kLogError,
"Invalid type string in OSC message, expected \"ffiiff\" got \"%s\"", types);
177 if (strcmp(types,
"fffiiff") != 0) {
178 logMsg(
kLogError,
"Invalid type string in OSC message, expected \"fffiiff\" got \"%s\"", types);
191 logMsg(
kLogError,
"Invalid type string in OSC message: \"%s\"", types);
void logMsg(const char *format,...)
These are the public logging messages.
StaticVariable mRate
plugs playback rate (ignored for now)
void playNote(float ampl=1, float rate=1, float pos=0, int start=-1, int stop=-1, float attack=0.0, float decay=0.0)
AdditiveInstrument.h – Sum-of-sines synthesis instrument class.
virtual void trigger()
reset internal time to restart envelope
UnitGenerator * mGraph
Caches.
AccessorVector mAccessors
the accessor vector
#define CSL_INT_TYPE
Accessor.h – "Reflective" parameter name/setter/type acessor object. See the copyright notice and ac...
void setValue(float x)
set/get the value (not allowed in the abstract, useful for static values)
SndFileInstrument(string path, int start=-1, int stop=-1)
Panner mPanner
stereo panner
unsigned mNumChannels
my "expected" number of output channels
void setPosition(UnitGenerator &pan)
Operations.
void setAttack(float attack)
void setParameter(unsigned selector, int argc, void **argv, const char *types)
Plug functions.
SoundFile mPlayer
sample player
Instrument class (abstract)
void initialize(string path)
void playOSC(int argc, void **argv, const char *types)
The Accessor class has public data members.
void setScale(UnitGenerator &scale)
set the receiver's scale member to a UGen or a float
void setDuration(float d)
Special accessors.
void setRelease(float release)
Base class of CSL exceptions (written upper-case). Has a string message.
UGenMap mUGens
the map of ugens in the graph by name