synthclone  0.3.0
synthclone::Zone Class Referenceabstract

Zone objects contains data about how Sample objects should be acquired from a Sampler. More...

#include <synthclone/zone.h>

Inheritance diagram for synthclone::Zone:
Collaboration diagram for synthclone::Zone:

Public Types

enum  Status {
  STATUS_NORMAL = 0, STATUS_SAMPLER_JOB_QUEUE = 1, STATUS_SAMPLER_PLAYING_DRY_SAMPLE = 2, STATUS_SAMPLER_PLAYING_WET_SAMPLE = 3,
  STATUS_SAMPLER_SAMPLING = 4, STATUS_EFFECT_JOB_QUEUE = 5, STATUS_EFFECTS = 6, STATUS_TARGETS = 7
}
 A zone's status indicates whether or not the zone is being used within the session. More...
 
typedef QMap< MIDIData, MIDIDataControlMap
 

Public Slots

virtual void setAftertouch (synthclone::MIDIData aftertouch)=0
 Sets the MIDI polyphonic aftertouch value. More...
 
virtual void setChannel (synthclone::MIDIData channel)=0
 Sets the MIDI channel. More...
 
virtual void setChannelPressure (synthclone::MIDIData pressure)=0
 Sets the MIDI channel pressure value. More...
 
virtual void setControlValue (synthclone::MIDIData control, synthclone::MIDIData value)=0
 Sets a MIDI control value. More...
 
virtual void setDrySample (synthclone::Sample *sample)=0
 Sets the dry Sample. More...
 
virtual void setNote (synthclone::MIDIData note)=0
 Sets the MIDI note. More...
 
virtual void setReleaseTime (SampleTime releaseTime)=0
 Sets the release time. More...
 
virtual void setSampleTime (SampleTime sampleTime)=0
 Sets the sample time. More...
 
virtual void setVelocity (synthclone::MIDIData velocity)=0
 Sets the MIDI velocity. More...
 
virtual void setWetSampleStale ()=0
 Used to indicate that the wet Sample is now stale. More...
 

Signals

void aftertouchChanged (synthclone::MIDIData aftertouch)
 Emitted when the MIDI polyphonic aftertouch value is changed. More...
 
void channelChanged (synthclone::MIDIData channel)
 Emitted when the MIDI channel is changed. More...
 
void channelPressureChanged (synthclone::MIDIData pressure)
 Emitted when the MIDI channel pressure value is changed. More...
 
void controlValueChanged (synthclone::MIDIData control, synthclone::MIDIData value)
 Emitted when a MIDI control value is changed. More...
 
void drySampleChanged (const synthclone::Sample *drySample)
 Emitted when the dry Sample is changed. More...
 
void drySampleStaleChanged (bool stale)
 Emitted when the dry Sample is (un)marked as stale. More...
 
void noteChanged (synthclone::MIDIData note)
 Emitted when the MIDI note is changed. More...
 
void releaseTimeChanged (synthclone::SampleTime releaseTime)
 Emitted when the release time is changed. More...
 
void sampleTimeChanged (synthclone::SampleTime sampleTime)
 Emitted when the sample time is changed. More...
 
void statusChanged (synthclone::Zone::Status status)
 Emitted when a zone's status is changed. More...
 
void velocityChanged (synthclone::MIDIData velocity)
 Emitted when the MIDI velocity is changed. More...
 
void wetSampleChanged (const synthclone::Sample *wetSample)
 Emitted when the wet Sample is changed. More...
 
void wetSampleStaleChanged (bool stale)
 Emitted when the wet Sample is (un)marked as stale. More...
 

Public Member Functions

virtual MIDIData getAftertouch () const =0
 Gets the MIDI polyphonic aftertouch value. More...
 
virtual MIDIData getChannel () const =0
 Gets the MIDI channel. More...
 
virtual MIDIData getChannelPressure () const =0
 Gets the MIDI channel pressure value. More...
 
virtual const ControlMapgetControlMap () const =0
 Gets the internal control map containing all of the current control values. More...
 
virtual MIDIData getControlValue (MIDIData control) const =0
 Returns the MIDI value for a control. More...
 
virtual const SamplegetDrySample () const =0
 Gets the dry Sample object, which has been retrieved from a Sampler. More...
 
virtual MIDIData getNote () const =0
 Gets the MIDI note value. More...
 
virtual SampleTime getReleaseTime () const =0
 Gets the release time. More...
 
virtual SampleTime getSampleTime () const =0
 Gets the sample time. More...
 
virtual Status getStatus () const =0
 Gets the Zone object's Zone::Status. More...
 
virtual MIDIData getVelocity () const =0
 Gets the MIDI velocity. More...
 
virtual const SamplegetWetSample () const =0
 Gets the wet Sample object, which is the result of applying registered Effect objects to the dry sample. More...
 
virtual bool isDrySampleStale () const =0
 Gets a flag indicating whether or not this Zone object's dry Sample is stale. More...
 
virtual bool isWetSampleStale () const =0
 Gets a flag indicating whether or not the wet Sample is stale. More...
 

Protected Member Functions

 Zone (QObject *parent=0)
 Constructs a new Zone object. More...
 
virtual ~Zone ()
 Destroys a Zone object. More...
 

Detailed Description

Zone objects contains data about how Sample objects should be acquired from a Sampler.

After a Sample is acquired, a Zone object contains the acquired (dry) Sample. After effects are applied, a Zone object also contains the wet Sample.

Member Typedef Documentation

◆ ControlMap

Member Enumeration Documentation

◆ Status

A zone's status indicates whether or not the zone is being used within the session.

If the zone's status is not STATUS_NORMAL, then attempts to modify or remove the zone from the session will fail.

STATUS_NORMAL
The Zone object is not being used by the application.
STATUS_SAMPLER_JOB_QUEUE
The Zone object is waiting in the SamplerJob queue. When the SamplerJob pertaining to the Zone is at the front of the queue, the Sampler will perform some operation using the Zone.
STATUS_SAMPLER_PLAYING_DRY_SAMPLE
The Zone object is being used by the Sampler. The Sampler is playing the dry Sample registered with the Zone.
STATUS_SAMPLER_PLAYING_WET_SAMPLE
The Zone object is being used by the Sampler. The Sampler is playing the wet Sample registered with the Zone.
STATUS_SAMPLER_SAMPLING
The Zone object is being used by the Sampler. The Sampler is sampling a note based on other information in the Zone.
STATUS_EFFECT_JOB_QUEUE
The Zone object is waiting in the EffectJob queue. When the EffectJob pertaining to the Zone is at the front of the queue, the registered Effect objects will be applied to the Zone object's dry sample, and the result will be set as the Zone object's wet sample.
STATUS_EFFECTS
The registered Effect objects are being applied to the Zone object's dry sample.
STATUS_TARGETS
The registered targets are using the Zone to create patches.
Enumerator
STATUS_NORMAL 
STATUS_SAMPLER_JOB_QUEUE 
STATUS_SAMPLER_PLAYING_DRY_SAMPLE 
STATUS_SAMPLER_PLAYING_WET_SAMPLE 
STATUS_SAMPLER_SAMPLING 
STATUS_EFFECT_JOB_QUEUE 
STATUS_EFFECTS 
STATUS_TARGETS 

Constructor & Destructor Documentation

◆ Zone()

synthclone::Zone::Zone ( QObject *  parent = 0)
explicitprotected

Constructs a new Zone object.

This constructor cannot be accessed directly. To create new Zone objects, call Context::addZone().

Parameters
parentThe parent object of the new Zone object.

◆ ~Zone()

virtual synthclone::Zone::~Zone ( )
protectedvirtual

Destroys a Zone object.

The memory of Zone objects is managed by the application.

Member Function Documentation

◆ aftertouchChanged

void synthclone::Zone::aftertouchChanged ( synthclone::MIDIData  aftertouch)
signal

Emitted when the MIDI polyphonic aftertouch value is changed.

Parameters
aftertouchThe new MIDI polyphonic aftertouch value.

◆ channelChanged

void synthclone::Zone::channelChanged ( synthclone::MIDIData  channel)
signal

Emitted when the MIDI channel is changed.

Parameters
channelThe new MIDI channel.

◆ channelPressureChanged

void synthclone::Zone::channelPressureChanged ( synthclone::MIDIData  pressure)
signal

Emitted when the MIDI channel pressure value is changed.

Parameters
pressureThe new MIDI channel pressure value.

◆ controlValueChanged

void synthclone::Zone::controlValueChanged ( synthclone::MIDIData  control,
synthclone::MIDIData  value 
)
signal

Emitted when a MIDI control value is changed.

Parameters
controlThe control index.
valueThe new control value.

◆ drySampleChanged

void synthclone::Zone::drySampleChanged ( const synthclone::Sample drySample)
signal

Emitted when the dry Sample is changed.

Note that the dry Sample can be set to 0.

Parameters
drySampleThe new dry Sample (or lack thereof).

◆ drySampleStaleChanged

void synthclone::Zone::drySampleStaleChanged ( bool  stale)
signal

Emitted when the dry Sample is (un)marked as stale.

Parameters
staleWhether or not the dry Sample is now stale.

◆ getAftertouch()

virtual MIDIData synthclone::Zone::getAftertouch ( ) const
pure virtual

Gets the MIDI polyphonic aftertouch value.

If the polyphonic aftertouch isn't set, then the value will be MIDI_VALUE_NOT_SET. The polyphonic aftertouch value is used by the Sampler to send a MIDI polyphonic aftertouch message before sampling.

Returns
The aftertouch value.

◆ getChannel()

virtual MIDIData synthclone::Zone::getChannel ( ) const
pure virtual

Gets the MIDI channel.

The channel will be in the range [1, 16]. The channel is the MIDI channel that a Sampler uses when retrieving a Sample for this Zone.

Returns
The MIDI channel.

◆ getChannelPressure()

virtual MIDIData synthclone::Zone::getChannelPressure ( ) const
pure virtual

Gets the MIDI channel pressure value.

If the channel pressure isn't set, then the value will be MIDI_VALUE_NOT_SET. The channel pressure value is used by the Sampler to send a MIDI channel pressure message before sampling.

Returns
The pressure value.

◆ getControlMap()

virtual const ControlMap& synthclone::Zone::getControlMap ( ) const
pure virtual

Gets the internal control map containing all of the current control values.

Returns
The map.

◆ getControlValue()

virtual MIDIData synthclone::Zone::getControlValue ( MIDIData  control) const
pure virtual

Returns the MIDI value for a control.

If the control isn't set, then the value will be MIDI_VALUE_NOT_SET. Control values are used by the Sampler to send MIDI control messages before sampling.

Parameters
controlThe control index.
Returns
The control value.

◆ getDrySample()

virtual const Sample* synthclone::Zone::getDrySample ( ) const
pure virtual

Gets the dry Sample object, which has been retrieved from a Sampler.

If a Sample object hasn't been retrieved, then this will be 0.

Returns
The Sample object.

◆ getNote()

virtual MIDIData synthclone::Zone::getNote ( ) const
pure virtual

Gets the MIDI note value.

The note value is used by the Sampler to send MIDI note messages during the sampling process.

Returns
The note value.

◆ getReleaseTime()

virtual SampleTime synthclone::Zone::getReleaseTime ( ) const
pure virtual

Gets the release time.

The release time is used by a Sampler to add space between the processing of SamplerJob objects in order to give a note the chance to fade away. If the release time is set too low, then a sampled note may overlap another sampled note.

Returns
The release time.

◆ getSampleTime()

virtual SampleTime synthclone::Zone::getSampleTime ( ) const
pure virtual

Gets the sample time.

The sample time is used by a Sampler to determine how long a note should be sampled.

Returns
The sample time.

◆ getStatus()

virtual Status synthclone::Zone::getStatus ( ) const
pure virtual

Gets the Zone object's Zone::Status.

A Zone object's Zone::Status can be used to determine how the Zone is currently being used by synthclone.

Returns
The Zone object's Zone::Status.

◆ getVelocity()

virtual MIDIData synthclone::Zone::getVelocity ( ) const
pure virtual

Gets the MIDI velocity.

The velocity is used by the Sampler to send MIDI note messages. Usually, the velocity is used to determine the volume of the note, though some creative synthesizers allow you to map the velocity to another parameter.

Returns
The MIDI velocity.

◆ getWetSample()

virtual const Sample* synthclone::Zone::getWetSample ( ) const
pure virtual

Gets the wet Sample object, which is the result of applying registered Effect objects to the dry sample.

If a Sample object hasn't been set, then this will be 0.

Returns
The Sample object.

◆ isDrySampleStale()

virtual bool synthclone::Zone::isDrySampleStale ( ) const
pure virtual

Gets a flag indicating whether or not this Zone object's dry Sample is stale.

If a dry Sample is stale, it means that the parameters used to get the dry Sample have changed, or that this Zone doesn't have a dry Sample.

Returns
A flag indicating the above.

◆ isWetSampleStale()

virtual bool synthclone::Zone::isWetSampleStale ( ) const
pure virtual

Gets a flag indicating whether or not the wet Sample is stale.

If a wet Sample is stale, it means that the parameters used to get the wet Sample (Effect parameters, for example) have changed, or that the dry Sample that was used to get the wet Sample has changed.

Returns
A flag indicating the above.

◆ noteChanged

void synthclone::Zone::noteChanged ( synthclone::MIDIData  note)
signal

Emitted when the MIDI note is changed.

Parameters
noteThe new MIDI note.

◆ releaseTimeChanged

void synthclone::Zone::releaseTimeChanged ( synthclone::SampleTime  releaseTime)
signal

Emitted when the release time is changed.

Parameters
releaseTimeThe new release time.

◆ sampleTimeChanged

void synthclone::Zone::sampleTimeChanged ( synthclone::SampleTime  sampleTime)
signal

Emitted when the sample time is changed.

Parameters
sampleTimeThe new sample time.

◆ setAftertouch

virtual void synthclone::Zone::setAftertouch ( synthclone::MIDIData  aftertouch)
pure virtualslot

Sets the MIDI polyphonic aftertouch value.

The MIDI polyphonic aftertouch value can be cleared by calling this method with MIDI_VALUE_NOT_SET.

Parameters
aftertouchThe aftertouch value.
See also
getAftertouch()

◆ setChannel

virtual void synthclone::Zone::setChannel ( synthclone::MIDIData  channel)
pure virtualslot

Sets the MIDI channel.

Parameters
channelThe MIDI channel.
See also
getChannel()

◆ setChannelPressure

virtual void synthclone::Zone::setChannelPressure ( synthclone::MIDIData  pressure)
pure virtualslot

Sets the MIDI channel pressure value.

The MIDI channel pressure value can be cleared by calling this method with MIDI_VALUE_NOT_SET.

Parameters
pressureThe pressure value.
See also
getChannelPressure()

◆ setControlValue

virtual void synthclone::Zone::setControlValue ( synthclone::MIDIData  control,
synthclone::MIDIData  value 
)
pure virtualslot

Sets a MIDI control value.

A control can be cleared by calling this method with the value set to MIDI_VALUE_NOT_SET.

Parameters
controlThe control index.
valueThe control value.
See also
getControlValue()

◆ setDrySample

virtual void synthclone::Zone::setDrySample ( synthclone::Sample sample)
pure virtualslot

Sets the dry Sample.

The data in the Sample is copied to a new Sample object, which has its memory managed by this Zone. The dry Sample will be set as fresh (not stale).

Parameters
sampleThe sample to copy.
See also
getDrySample()

◆ setNote

virtual void synthclone::Zone::setNote ( synthclone::MIDIData  note)
pure virtualslot

Sets the MIDI note.

Parameters
noteThe MIDI note.
See also
getNote()

◆ setReleaseTime

virtual void synthclone::Zone::setReleaseTime ( SampleTime  releaseTime)
pure virtualslot

Sets the release time.

Parameters
releaseTimeThe release time.
See also
getReleaseTime()

◆ setSampleTime

virtual void synthclone::Zone::setSampleTime ( SampleTime  sampleTime)
pure virtualslot

Sets the sample time.

Parameters
sampleTimeThe sample time.
See also
getSampleTime()

◆ setVelocity

virtual void synthclone::Zone::setVelocity ( synthclone::MIDIData  velocity)
pure virtualslot

Sets the MIDI velocity.

Parameters
velocityThe MIDI velocity.
See also
getVelocity()

◆ setWetSampleStale

virtual void synthclone::Zone::setWetSampleStale ( )
pure virtualslot

Used to indicate that the wet Sample is now stale.

See also
isWetSampleStale()

◆ statusChanged

void synthclone::Zone::statusChanged ( synthclone::Zone::Status  status)
signal

Emitted when a zone's status is changed.

Parameters
statusThe new status.

◆ velocityChanged

void synthclone::Zone::velocityChanged ( synthclone::MIDIData  velocity)
signal

Emitted when the MIDI velocity is changed.

Parameters
velocityThe new MIDI velocity.

◆ wetSampleChanged

void synthclone::Zone::wetSampleChanged ( const synthclone::Sample wetSample)
signal

Emitted when the wet Sample is changed.

Note that the wet Sample can be set to 0.

Parameters
wetSampleThe new wet Sample (or lack thereof).

◆ wetSampleStaleChanged

void synthclone::Zone::wetSampleStaleChanged ( bool  stale)
signal

Emitted when the wet Sample is (un)marked as stale.

Parameters
staleWhether or not the wet Sample is now stale.

The documentation for this class was generated from the following file: