23 mPositionChanged(true) {
25 throw LogicError(
"Adding a non-mono ugen to a spatial source");
29 logMsg(
"SpatialSource::input UG added");
85 printf(
"\taz: %5.2f el: %5.2f dist: %4.2f\n",
96 mPositionChanged =
false;
101 logMsg(
"SpatialSource::nextBuffer");
103 nextBuffer(outputBuffer, 0);
void logMsg(const char *format,...)
These are the public logging messages.
float elevation()
Returns the horizontal angle.
AdditiveInstrument.h – Sum-of-sines synthesis instrument class.
CPoint * mPosition
source position
virtual void nextBuffer(Buffer &outputBuffer)
get a buffer of Frames – this is the core CSL "pull" function; the given buffer can be written into...
virtual void nextBuffer(Buffer &outputBuffer, unsigned outBufNum)
really compute the next buffer given an offset base channel; this is called by nextBuffer, possibly multiple times
float distance()
Returns the angle of elevation.
CPoint * position(unsigned channelNum=0)
Returns the distance from the center.
virtual unsigned numChannels()
float azimuth()
Sets the distance from the center.
UnitGenerator * mUGen
my unit generator (pointer or NULL)
SpatialSource()
constructors
Buffer – the multi-channel sample buffer class (passed around between generators and IO guys)...
virtual void setPosition(CPoint pos)
Set the sound source position in cartesian coordinates.
Port – used to represent constant, control-rate or signal inputs and outputs in named maps; holds a ...
void addInput(CSL_MAP_KEY name, UnitGenerator &ugen)
Plug in a unit generator to the named input slot.
bool mPositionChanged
true if this source's position has changed recently
void dump()
pretty-print the receiver
Base class of CSL exceptions (written upper-case). Has a string message.