synthclone  0.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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 
28 namespace 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
132  getChannelPressure() const = 0;
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
284  setAftertouch(synthclone::MIDIData aftertouch) = 0;
285 
296  virtual void
297  setChannel(synthclone::MIDIData channel) = 0;
298 
310  virtual void
312 
327  virtual void
329  synthclone::MIDIData value) = 0;
330 
343  virtual void
344  setDrySample(synthclone::Sample *sample) = 0;
345 
356  virtual void
357  setNote(synthclone::MIDIData note) = 0;
358 
369  virtual void
370  setReleaseTime(SampleTime releaseTime) = 0;
371 
382  virtual void
383  setSampleTime(SampleTime sampleTime) = 0;
384 
395  virtual void
396  setVelocity(synthclone::MIDIData velocity) = 0;
397 
405  virtual void
406  setWetSampleStale() = 0;
407 
408  signals:
409 
417  void
419 
427  void
429 
437  void
439 
450  void
452  synthclone::MIDIData value);
453 
462  void
463  drySampleChanged(const synthclone::Sample *drySample);
464 
472  void
473  drySampleStaleChanged(bool stale);
474 
482  void
484 
492  void
494 
502  void
504 
512  void
514 
522  void
524 
533  void
534  wetSampleChanged(const synthclone::Sample *wetSample);
535 
543  void
544  wetSampleStaleChanged(bool stale);
545 
546  protected:
547 
556  explicit
557  Zone(QObject *parent=0);
558 
564  virtual
565  ~Zone();
566 
567  };
568 
569 }
570 
571 #endif