|
resonance 1.0.1
|
Effect that chops a channel's level with a square wave while it is applied. More...
#include <stuttereffector.h>


Public Member Functions | |
| StutterEffector (Sch::TickClock *pClock, unsigned char nChannel, int nPeriod, int nFloor) | |
| Build the effect with a square oscillator. | |
| virtual | ~StutterEffector () |
| Switch the effect off through this class's own SetEnabled(), then release the oscillator. | |
| virtual int | Type () |
| Report which effect this object applies. | |
| virtual void | SetEnabled (int bEnabled) |
| Apply or release the effect. | |
| virtual int | Tick (int nElapsedTicks) |
| Send controller 0x30 at the level the oscillator's value selects. | |
| Public Member Functions inherited from TickTask | |
| TickTask (Sch::TickClock *pClock, int nPeriod, int bAligned) | |
| virtual | ~TickTask () |
| Withdraw the queued command. | |
| virtual void | Print (std::ostream &stream) |
| Write the task to a diagnostic stream. | |
| void | Start (int nEpochOffset) |
| Post the task on its clock. | |
| void | Run () |
| Run Tick() for the run now due and post the next one. | |
| void | Stop () |
| Withdraw the queued command and forget its handle. | |
| Public Member Functions inherited from Attachment | |
| Attachment () | |
| virtual | ~Attachment () |
| int | Release () |
| Give back one reference and destroy the object once the last one is gone. | |
| virtual void | Destroy () |
| Destroy the object. | |
| Public Member Functions inherited from Effector | |
| Effector () | |
| virtual | ~Effector () |
| Public Member Functions inherited from MsgSource | |
| virtual | ~MsgSource () |
| virtual void | AddSink (MsgSink *pSink) |
| Register a sink, ignoring a sink that is already registered. | |
| virtual void | RemoveSink (MsgSink *pSink) |
| Unregister the first occurrence of a sink. | |
| void | Send (Message *pMsg) const |
| Deliver a message to every registered sink, in registration order. | |
| void | ClearSinks () |
| Unregister every sink. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from Attachment | |
| static void | ReleaseIfSet (Attachment *pAttachment) |
| Give back one reference to an object that may be null. | |
| Static Public Member Functions inherited from Effector | |
| static Effector * | CreateForType (int nType, unsigned char nChannel, int nTrack) |
| Build the effect one type selects. | |
| Public Attributes inherited from Attachment | |
| int | mRefs |
| Public Attributes inherited from MsgSource | |
| int | mGraphBuilt |
| A word no member of this class reads. | |
Effect that chops a channel's level with a square wave while it is applied.
Its RTTI descriptor is at 0x008eef48. It has TickTask at offset 0 and Effector at offset 0x20. Its tables are at 0x007de708 for TickTask and 0x007de6d0 for the Effector subobject. The factory's allocation measures the object at 0x48 bytes.
The task runs every half period, aligned. Each run samples mOscillator and sends controller 0x30 between 127 and mFloor. Applying the effect runs the task at once, sends controller 0x50 with 0x7f, and starts the task. Releasing it stops the task, restores controller 0x30 to 0x7f, and sends controller 0x50 with zero.
The factory reads both tuning values from configuration code 0x391, which must hold exactly two values.
|
inline |
Build the effect with a square oscillator.
Inline. Effector::CreateForType() expands it, and the image also keeps this out-of-line copy.
| pClock | The clock the task runs against. |
| nChannel | The MIDI channel the controller changes go to. |
| nPeriod | The oscillator period. The task runs every half period. |
| nFloor | The level the chop falls to. |
|
virtual |
Switch the effect off through this class's own SetEnabled(), then release the oscillator.
|
virtual |
Report which effect this object applies.
Implements Effector.
|
virtual |
Apply or release the effect.
A request that repeats the current position sends nothing once a request has been sent.
| bEnabled | Non-zero to apply the effect. |
Reimplemented from Effector.
|
virtual |
Send controller 0x30 at the level the oscillator's value selects.
The level is the value times 127 plus one minus the value times mFloor, computed in double precision.
| nElapsedTicks | Ticks since the task's epoch. |
Implements TickTask.