synthclone 0.3.0
Loading...
Searching...
No Matches
zone.h
Go to the documentation of this file.
1/*
2 * libsynthclone - a plugin API for `synthclone`
3 * Copyright (C) 2011 Devin Anderson
4 *
5 * This library is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU Lesser General Public License as published by the
7 * Free Software Foundation; either version 2.1 of the License, or (at your
8 * option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this library; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#ifndef __SYNTHCLONE_ZONE_H__
21#define __SYNTHCLONE_ZONE_H__
22
23#include <QtCore/QMap>
24
25#include <synthclone/sample.h>
26#include <synthclone/types.h>
27
28namespace synthclone {
29
37 class Zone: public QObject {
38
39 Q_OBJECT
40
41 public:
42
43 typedef QMap<MIDIData, MIDIData> ControlMap;
44
85 enum Status {
94 };
95
106 virtual MIDIData
107 getAftertouch() const = 0;
108
118 virtual MIDIData
119 getChannel() const = 0;
120
131 virtual MIDIData
133
142 virtual const ControlMap &
143 getControlMap() const = 0;
144
157 virtual MIDIData
158 getControlValue(MIDIData control) const = 0;
159
168 virtual const Sample *
169 getDrySample() const = 0;
170
179 virtual MIDIData
180 getNote() const = 0;
181
192 virtual SampleTime
193 getReleaseTime() const = 0;
194
203 virtual SampleTime
204 getSampleTime() const = 0;
205
215 virtual Status
216 getStatus() const = 0;
217
228 virtual MIDIData
229 getVelocity() const = 0;
230
240 virtual const Sample *
241 getWetSample() const = 0;
242
253 virtual bool
254 isDrySampleStale() const = 0;
255
266 virtual bool
267 isWetSampleStale() const = 0;
268
269 public slots:
270
283 virtual void
285
296 virtual void
298
310 virtual void
312
327 virtual void
329 synthclone::MIDIData value) = 0;
330
343 virtual void
345
356 virtual void
358
369 virtual void
370 setReleaseTime(SampleTime releaseTime) = 0;
371
382 virtual void
383 setSampleTime(SampleTime sampleTime) = 0;
384
395 virtual void
397
405 virtual void
407
408 signals:
409
417 void
419
427 void
429
437 void
439
450 void
453
462 void
464
472 void
474
482 void
484
492 void
494
502 void
504
512 void
514
522 void
524
533 void
535
543 void
545
546 protected:
547
556 explicit
557 Zone(QObject *parent=0);
558
564 virtual
566
567 };
568
569}
570
571#endif
Contains sample data.
Definition: sample.h:37
Zone objects contains data about how Sample objects should be acquired from a Sampler.
Definition: zone.h:37
virtual void setSampleTime(SampleTime sampleTime)=0
Sets the sample time.
void wetSampleStaleChanged(bool stale)
Emitted when the wet Sample is (un)marked as stale.
virtual void setNote(synthclone::MIDIData note)=0
Sets the MIDI note.
void drySampleStaleChanged(bool stale)
Emitted when the dry Sample is (un)marked as stale.
void channelPressureChanged(synthclone::MIDIData pressure)
Emitted when the MIDI channel pressure value is changed.
virtual void setChannel(synthclone::MIDIData channel)=0
Sets the MIDI channel.
void velocityChanged(synthclone::MIDIData velocity)
Emitted when the MIDI velocity is changed.
virtual void setControlValue(synthclone::MIDIData control, synthclone::MIDIData value)=0
Sets a MIDI control value.
virtual bool isDrySampleStale() const =0
Gets a flag indicating whether or not this Zone object's dry Sample is stale.
virtual void setChannelPressure(synthclone::MIDIData pressure)=0
Sets the MIDI channel pressure value.
virtual SampleTime getReleaseTime() const =0
Gets the release time.
void channelChanged(synthclone::MIDIData channel)
Emitted when the MIDI channel is changed.
virtual const Sample * getWetSample() const =0
Gets the wet Sample object, which is the result of applying registered Effect objects to the dry samp...
QMap< MIDIData, MIDIData > ControlMap
Definition: zone.h:43
virtual MIDIData getChannelPressure() const =0
Gets the MIDI channel pressure value.
virtual void setDrySample(synthclone::Sample *sample)=0
Sets the dry Sample.
virtual MIDIData getAftertouch() const =0
Gets the MIDI polyphonic aftertouch value.
void sampleTimeChanged(synthclone::SampleTime sampleTime)
Emitted when the sample time is changed.
virtual const Sample * getDrySample() const =0
Gets the dry Sample object, which has been retrieved from a Sampler.
Zone(QObject *parent=0)
Constructs a new Zone object.
virtual SampleTime getSampleTime() const =0
Gets the sample time.
Status
A zone's status indicates whether or not the zone is being used within the session.
Definition: zone.h:85
@ STATUS_TARGETS
Definition: zone.h:93
@ STATUS_SAMPLER_PLAYING_DRY_SAMPLE
Definition: zone.h:88
@ STATUS_SAMPLER_SAMPLING
Definition: zone.h:90
@ STATUS_SAMPLER_PLAYING_WET_SAMPLE
Definition: zone.h:89
@ STATUS_SAMPLER_JOB_QUEUE
Definition: zone.h:87
@ STATUS_EFFECTS
Definition: zone.h:92
@ STATUS_EFFECT_JOB_QUEUE
Definition: zone.h:91
@ STATUS_NORMAL
Definition: zone.h:86
virtual Status getStatus() const =0
Gets the Zone object's Zone::Status.
void noteChanged(synthclone::MIDIData note)
Emitted when the MIDI note is changed.
virtual MIDIData getNote() const =0
Gets the MIDI note value.
virtual bool isWetSampleStale() const =0
Gets a flag indicating whether or not the wet Sample is stale.
virtual void setWetSampleStale()=0
Used to indicate that the wet Sample is now stale.
void drySampleChanged(const synthclone::Sample *drySample)
Emitted when the dry Sample is changed.
virtual ~Zone()
Destroys a Zone object.
virtual void setVelocity(synthclone::MIDIData velocity)=0
Sets the MIDI velocity.
void statusChanged(synthclone::Zone::Status status)
Emitted when a zone's status is changed.
virtual MIDIData getVelocity() const =0
Gets the MIDI velocity.
void releaseTimeChanged(synthclone::SampleTime releaseTime)
Emitted when the release time is changed.
virtual MIDIData getChannel() const =0
Gets the MIDI channel.
void controlValueChanged(synthclone::MIDIData control, synthclone::MIDIData value)
Emitted when a MIDI control value is changed.
virtual MIDIData getControlValue(MIDIData control) const =0
Returns the MIDI value for a control.
void wetSampleChanged(const synthclone::Sample *wetSample)
Emitted when the wet Sample is changed.
virtual void setAftertouch(synthclone::MIDIData aftertouch)=0
Sets the MIDI polyphonic aftertouch value.
virtual void setReleaseTime(SampleTime releaseTime)=0
Sets the release time.
void aftertouchChanged(synthclone::MIDIData aftertouch)
Emitted when the MIDI polyphonic aftertouch value is changed.
virtual const ControlMap & getControlMap() const =0
Gets the internal control map containing all of the current control values.
Definition: component.h:26
float SampleTime
Holds a sample time (in seconds).
Definition: types.h:129
quint8 MIDIData
Holds a byte of MIDI data.
Definition: types.h:59