synthclone  0.3.0
context.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_CONTEXT_H__
21 #define __SYNTHCLONE_CONTEXT_H__
22 
23 #include <QtCore/QDir>
24 #include <QtCore/QStringList>
25 
26 #include <synthclone/effect.h>
27 #include <synthclone/effectjob.h>
28 #include <synthclone/menuaction.h>
31 #include <synthclone/sampler.h>
32 #include <synthclone/target.h>
34 
35 namespace synthclone {
36 
37  class Participant;
38 
45  class Context: public QObject {
46 
47  Q_OBJECT
48 
49  public:
50 
59  virtual const EffectJob *
60  getCurrentEffectJob() const = 0;
61 
69  virtual const SamplerJob *
70  getCurrentSamplerJob() const = 0;
71 
82  virtual const Effect *
83  getEffect(int index) const = 0;
84 
92  virtual int
93  getEffectCount() const = 0;
94 
105  virtual int
106  getEffectIndex(const Effect *effect) const = 0;
107 
118  virtual const EffectJob *
119  getEffectJob(int index) const = 0;
120 
128  virtual int
129  getEffectJobCount() const = 0;
130 
141  virtual int
142  getEffectJobIndex(const synthclone::EffectJob *job) const = 0;
143 
151  virtual const Component *
152  getFocusedComponent() const = 0;
153 
161  virtual int
162  getMajorVersion() const = 0;
163 
171  virtual int
172  getMinorVersion() const = 0;
173 
184  virtual const Participant *
185  getParticipant(const QByteArray &id) const = 0;
186 
201  virtual const Participant *
202  getParticipant(int index, const Participant *parent=0) const = 0;
203 
216  virtual int
217  getParticipantCount(const Participant *parent=0) const = 0;
218 
229  virtual QByteArray
230  getParticipantId(const Participant *participant) const = 0;
231 
243  virtual const Participant *
244  getParticipantParent(const Participant *participant) const = 0;
245 
253  virtual int
254  getRevision() const = 0;
255 
263  virtual SampleChannelCount
264  getSampleChannelCount() const = 0;
265 
274  virtual const Sampler *
275  getSampler() const = 0;
276 
287  virtual const SamplerJob *
288  getSamplerJob(int index) const = 0;
289 
297  virtual int
298  getSamplerJobCount() const = 0;
299 
310  virtual int
311  getSamplerJobIndex(const synthclone::SamplerJob *job) const = 0;
312 
320  virtual SampleRate
321  getSampleRate() const = 0;
322 
330  virtual const Effect *
331  getSelectedEffect() const = 0;
332 
340  virtual const Target *
341  getSelectedTarget() const = 0;
342 
353  virtual Zone *
354  getSelectedZone(int index) = 0;
355 
363  virtual int
364  getSelectedZoneCount() const = 0;
365 
374  virtual const QDir *
375  getSessionDirectory() const = 0;
376 
384  virtual SessionState
385  getSessionState() const = 0;
386 
397  virtual const Target *
398  getTarget(int index) const = 0;
399 
407  virtual int
408  getTargetCount() const = 0;
409 
420  virtual int
421  getTargetIndex(const Target *target) const = 0;
422 
433  virtual Zone *
434  getZone(int index) = 0;
435 
443  virtual int
444  getZoneCount() const = 0;
445 
456  virtual int
457  getZoneIndex(const Zone *zone) const = 0;
458 
467  virtual bool
468  isAftertouchPropertyVisible() const = 0;
469 
478  virtual bool
480 
489  virtual bool
490  isChannelPropertyVisible() const = 0;
491 
503  virtual bool
504  isControlPropertyVisible(MIDIData control) const = 0;
505 
514  virtual bool
515  isDrySamplePropertyVisible() const = 0;
516 
525  virtual bool
526  isNotePropertyVisible() const = 0;
527 
538  virtual bool
539  isParticipantActivated(const Participant *participant) const = 0;
540 
549  virtual bool
550  isReleaseTimePropertyVisible() const = 0;
551 
560  virtual bool
561  isSampleTimePropertyVisible() const = 0;
562 
574  virtual bool
575  isSessionDirectory(const QDir &directory) const = 0;
576 
585  virtual bool
586  isStatusPropertyVisible() const = 0;
587 
596  virtual bool
597  isVelocityPropertyVisible() const = 0;
598 
607  virtual bool
608  isWetSamplePropertyVisible() const = 0;
609 
620  virtual bool
621  isZoneSelected(const Zone *zone) const = 0;
622 
633  virtual bool
634  isZoneSelected(int index) const = 0;
635 
636  public slots:
637 
642  virtual void
644 
653  virtual void
654  activateParticipant(const synthclone::Participant *participant) = 0;
655 
669  virtual const Registration &
670  addEffect(Effect *effect, int index=-1) = 0;
671 
683  virtual const EffectJob *
684  addEffectJob(Zone *zone) = 0;
685 
703  virtual const Registration &
704  addMenuAction(MenuAction *action, Menu menu,
705  const QStringList &subMenus=QStringList()) = 0;
706 
724  virtual const Registration &
725  addMenuAction(MenuAction *action, const Effect *effect,
726  const QStringList &subMenus=QStringList()) = 0;
727 
746  virtual const Registration &
747  addMenuAction(MenuAction *action, const Sampler *sampler,
748  const QStringList &subMenus=QStringList()) = 0;
749 
767  virtual const Registration &
768  addMenuAction(MenuAction *action, const Target *target,
769  const QStringList &subMenus=QStringList()) = 0;
770 
788  virtual const Registration &
789  addMenuSeparator(MenuSeparator *separator, Menu menu,
790  const QStringList &subMenus=QStringList()) = 0;
791 
810  virtual const Registration &
811  addMenuSeparator(MenuSeparator *separator, const Effect *effect,
812  const QStringList &subMenus=QStringList()) = 0;
813 
832  virtual const Registration &
833  addMenuSeparator(MenuSeparator *separator, const Sampler *sampler,
834  const QStringList &subMenus=QStringList()) = 0;
835 
854  virtual const Registration &
855  addMenuSeparator(MenuSeparator *separator, const Target *target,
856  const QStringList &subMenus=QStringList()) = 0;
857 
886  virtual const Registration &
887  addParticipant(Participant *participant, const QByteArray &subId) = 0;
888 
900  virtual const Registration &
901  addSampler(Sampler *sampler) = 0;
902 
919  virtual const SamplerJob *
920  addSamplerJob(SamplerJob::Type type, Zone *zone) = 0;
921 
935  virtual const Registration &
936  addTarget(Target *target, int index=-1) = 0;
937 
948  virtual Zone *
949  addZone(int index=-1) = 0;
950 
955  virtual void
956  buildTargets() = 0;
957 
971  virtual void
972  createSession(const QDir &directory, SampleRate sampleRate,
973  SampleChannelCount count) = 0;
974 
983  virtual void
984  deactivateParticipant(const Participant *participant) = 0;
985 
997  virtual void
998  loadSession(const QDir &directory) = 0;
999 
1010  virtual void
1011  moveEffect(int fromIndex, int toIndex) = 0;
1012 
1023  virtual void
1024  moveEffectJob(int fromIndex, int toIndex) = 0;
1025 
1036  virtual void
1037  moveSamplerJob(int fromIndex, int toIndex) = 0;
1038 
1049  virtual void
1050  moveTarget(int fromIndex, int toIndex) = 0;
1051 
1062  virtual void
1063  moveZone(int fromIndex, int toIndex) = 0;
1064 
1074  virtual void
1075  quit() = 0;
1076 
1084  virtual void
1085  removeEffect(const Effect *effect) = 0;
1086 
1094  virtual void
1095  removeEffect(int index) = 0;
1096 
1104  virtual void
1105  removeEffectJob(const EffectJob *job) = 0;
1106 
1114  virtual void
1115  removeEffectJob(int index) = 0;
1116 
1124  virtual void
1125  removeMenuAction(const MenuAction *action) = 0;
1126 
1134  virtual void
1135  removeMenuSeparator(const MenuSeparator *separator) = 0;
1136 
1144  virtual void
1145  removeParticipant(const Participant *participant) = 0;
1146 
1151  virtual void
1152  removeSampler() = 0;
1153 
1161  virtual void
1162  removeSamplerJob(const SamplerJob *job) = 0;
1163 
1171  virtual void
1172  removeSamplerJob(int index) = 0;
1173 
1181  virtual void
1182  removeTarget(const Target *target) = 0;
1183 
1191  virtual void
1192  removeTarget(int index) = 0;
1193 
1201  virtual void
1202  removeZone(Zone *zone) = 0;
1203 
1211  virtual void
1212  removeZone(int index) = 0;
1213 
1222  virtual void
1223  reportError(const QString &message) = 0;
1224 
1230  virtual void
1231  saveSession() = 0;
1232 
1241  virtual void
1242  saveSession(const QDir &directory) = 0;
1243 
1251  virtual void
1252  setAftertouchPropertyVisible(bool visible) = 0;
1253 
1261  virtual void
1262  setChannelPressurePropertyVisible(bool visible) = 0;
1263 
1271  virtual void
1272  setChannelPropertyVisible(bool visible) = 0;
1273 
1284  virtual void
1285  setControlPropertyVisible(MIDIData control, bool visible) = 0;
1286 
1294  virtual void
1295  setDrySamplePropertyVisible(bool visible) = 0;
1296 
1305  virtual void
1306  setFocusedComponent(const Component *component) = 0;
1307 
1315  virtual void
1316  setNotePropertyVisible(bool visible) = 0;
1317 
1325  virtual void
1326  setReleaseTimePropertyVisible(bool visible) = 0;
1327 
1345  virtual void
1346  setSampleChannelCount(SampleChannelCount sampleChannelCount) = 0;
1347 
1358  virtual void
1359  setSampleRate(SampleRate sampleRate) = 0;
1360 
1368  virtual void
1369  setSampleTimePropertyVisible(bool visible) = 0;
1370 
1379  virtual void
1380  setSelectedEffect(const Effect *effect) = 0;
1381 
1390  virtual void
1391  setSelectedEffect(int index) = 0;
1392 
1401  virtual void
1402  setSelectedTarget(const Target *target) = 0;
1403 
1412  virtual void
1413  setSelectedTarget(int index) = 0;
1414 
1423  virtual void
1424  setSessionModified() = 0;
1425 
1433  virtual void
1434  setStatusPropertyVisible(bool visible) = 0;
1435 
1443  virtual void
1444  setVelocityPropertyVisible(bool visible) = 0;
1445 
1453  virtual void
1454  setWetSamplePropertyVisible(bool visible) = 0;
1455 
1466  virtual void
1467  setZoneSelected(const Zone *zone, bool selected) = 0;
1468 
1479  virtual void
1480  setZoneSelected(int index, bool selected) = 0;
1481 
1492  virtual void
1493  sortZones(const ZoneComparer &comparer, bool ascending=true) = 0;
1494 
1505  virtual void
1506  unloadSession() = 0;
1507 
1508  signals:
1509 
1525  void
1527  const synthclone::Participant *parent,
1528  const QByteArray &id);
1529 
1540  void
1541  addingEffect(const synthclone::Effect *effect, int index);
1542 
1553  void
1554  addingEffectJob(const synthclone::EffectJob *job, int index);
1555 
1570  void
1572  synthclone::Menu menu, const QStringList &subMenus);
1573 
1588  void
1590  const synthclone::Effect *effect,
1591  const QStringList &subMenus);
1592 
1608  void
1610  const synthclone::Sampler *sampler,
1611  const QStringList &subMenus);
1612 
1627  void
1629  const synthclone::Target *target,
1630  const QStringList &subMenus);
1631 
1646  void
1648  synthclone::Menu menu,
1649  const QStringList &subMenus);
1650 
1666  void
1668  const synthclone::Effect *effect,
1669  const QStringList &subMenus);
1670 
1686  void
1688  const synthclone::Sampler *sampler,
1689  const QStringList &subMenus);
1690 
1706  void
1708  const synthclone::Target *target,
1709  const QStringList &subMenus);
1710 
1726  void
1727  addingParticipant(const synthclone::Participant *participant,
1728  const synthclone::Participant *parent,
1729  const QByteArray &id);
1730 
1738  void
1739  addingSampler(const synthclone::Sampler *sampler);
1740 
1751  void
1752  addingSamplerJob(const synthclone::SamplerJob *job, int index);
1753 
1764  void
1765  addingTarget(const synthclone::Target *target, int index);
1766 
1777  void
1778  addingZone(const synthclone::Zone *zone, int index);
1779 
1787  void
1789 
1797  void
1798  buildingTarget(const synthclone::Target *target);
1799 
1804  void
1805  buildingTargets();
1806 
1815  void
1817 
1825  void
1826  channelPropertyVisibilityChanged(bool visible);
1827 
1838  void
1840  bool visible);
1841 
1849  void
1851 
1859  void
1861 
1877  void
1879  const synthclone::Participant *parent,
1880  const QByteArray &id);
1881 
1889  void
1890  drySamplePropertyVisibilityChanged(bool visible);
1891 
1902  void
1903  effectAdded(const synthclone::Effect *effect, int index);
1904 
1915  void
1916  effectJobAdded(const synthclone::EffectJob *job, int index);
1917 
1931  void
1932  effectJobMoved(const synthclone::EffectJob *job, int fromIndex,
1933  int toIndex);
1934 
1945  void
1946  effectJobRemoved(const synthclone::EffectJob *job, int index);
1947 
1961  void
1962  effectMoved(const synthclone::Effect *effect, int fromIndex,
1963  int toIndex);
1964 
1975  void
1976  effectRemoved(const synthclone::Effect *effect, int index);
1977 
1985  void
1986  errorReported(const QString &message);
1987 
1996  void
1998 
2013  void
2015  synthclone::Menu menu, const QStringList &subMenus);
2016 
2031  void
2033  const synthclone::Effect *effect,
2034  const QStringList &subMenus);
2035 
2050  void
2052  const synthclone::Sampler *sampler,
2053  const QStringList &subMenus);
2054 
2069  void
2071  const synthclone::Target *target,
2072  const QStringList &subMenus);
2073 
2088  void
2090  synthclone::Menu menu, const QStringList &subMenus);
2091 
2106  void
2108  const synthclone::Effect *effect,
2109  const QStringList &subMenus);
2110 
2125  void
2127  const synthclone::Sampler *sampler,
2128  const QStringList &subMenus);
2129 
2144  void
2146  const synthclone::Target *target,
2147  const QStringList &subMenus);
2148 
2163  void
2165  synthclone::Menu menu, const QStringList &subMenus);
2166 
2181  void
2183  const synthclone::Effect *effect,
2184  const QStringList &subMenus);
2185 
2200  void
2202  const synthclone::Sampler *sampler,
2203  const QStringList &subMenus);
2204 
2219  void
2221  const synthclone::Target *target,
2222  const QStringList &subMenus);
2223 
2238  void
2240  synthclone::Menu menu,
2241  const QStringList &subMenus);
2242 
2258  void
2260  const synthclone::Effect *effect,
2261  const QStringList &subMenus);
2262 
2278  void
2280  const synthclone::Sampler *sampler,
2281  const QStringList &subMenus);
2282 
2298  void
2300  const synthclone::Target *target,
2301  const QStringList &subMenus);
2302 
2316  void
2317  movingEffect(const synthclone::Effect *effect, int fromIndex,
2318  int toIndex);
2319 
2333  void
2334  movingEffectJob(const synthclone::EffectJob *job, int fromIndex,
2335  int toIndex);
2336 
2350  void
2351  movingSamplerJob(const synthclone::SamplerJob *job, int fromIndex,
2352  int toIndex);
2353 
2367  void
2368  movingTarget(const synthclone::Target *target, int fromIndex,
2369  int toIndex);
2370 
2384  void
2385  movingZone(const synthclone::Zone *zone, int fromIndex, int toIndex);
2386 
2394  void
2395  notePropertyVisibilityChanged(bool visible);
2396 
2412  void
2413  participantActivated(const synthclone::Participant *participant,
2414  const synthclone::Participant *parent,
2415  const QByteArray &id);
2416 
2431  void
2432  participantAdded(const synthclone::Participant *participant,
2433  const synthclone::Participant *parent,
2434  const QByteArray &id);
2435 
2451  void
2453  const synthclone::Participant *parent,
2454  const QByteArray &id);
2455 
2471  void
2472  participantRemoved(const synthclone::Participant *participant,
2473  const synthclone::Participant *parent,
2474  const QByteArray &id);
2475 
2483  void
2485 
2496  void
2497  removingEffect(const synthclone::Effect *effect, int index);
2498 
2509  void
2510  removingEffectJob(const synthclone::EffectJob *job, int index);
2511 
2526  void
2528  synthclone::Menu menu, const QStringList &subMenus);
2529 
2544  void
2546  const synthclone::Effect *effect,
2547  const QStringList &subMenus);
2548 
2563  void
2565  const synthclone::Sampler *sampler,
2566  const QStringList &subMenus);
2567 
2582  void
2584  const synthclone::Target *target,
2585  const QStringList &subMenus);
2586 
2601  void
2603  synthclone::Menu menu,
2604  const QStringList &subMenus);
2605 
2621  void
2623  const synthclone::Effect *effect,
2624  const QStringList &subMenus);
2625 
2641  void
2643  const synthclone::Sampler *sampler,
2644  const QStringList &subMenus);
2645 
2661  void
2663  const synthclone::Target *target,
2664  const QStringList &subMenus);
2665 
2681  void
2682  removingParticipant(const synthclone::Participant *participant,
2683  const synthclone::Participant *parent,
2684  const QByteArray &id);
2685 
2693  void
2694  removingSampler(const synthclone::Sampler *sampler);
2695 
2707  void
2708  removingSamplerJob(const synthclone::SamplerJob *job, int index);
2709 
2720  void
2721  removingTarget(const synthclone::Target *target, int index);
2722 
2733  void
2734  removingZone(const synthclone::Zone *zone, int index);
2735 
2744  void
2746 
2754  void
2755  samplerAdded(const synthclone::Sampler *sampler);
2756 
2764  void
2766 
2777  void
2778  samplerJobAdded(const synthclone::SamplerJob *job, int index);
2779 
2793  void
2794  samplerJobMoved(const synthclone::SamplerJob *job, int fromIndex,
2795  int toIndex);
2796 
2808  void
2809  samplerJobRemoved(const synthclone::SamplerJob *job, int index);
2810 
2818  void
2819  samplerRemoved(const synthclone::Sampler *sampler);
2820 
2828  void
2830 
2841  void
2842  selectedEffectChanged(const synthclone::Effect *effect, int index);
2843 
2854  void
2855  selectedTargetChanged(const synthclone::Target *target, int index);
2856 
2868  void
2870  const QDir *directory);
2871 
2879  void
2880  statusPropertyVisibilityChanged(bool visible);
2881 
2892  void
2893  targetAdded(const synthclone::Target *target, int index);
2894 
2905  void
2906  targetBuildError(const synthclone::Target *target,
2907  const QString &message);
2908 
2916  void
2917  targetBuilt(const synthclone::Target *target);
2918 
2923  void
2924  targetsBuilt();
2925 
2939  void
2940  targetMoved(const synthclone::Target *target, int fromIndex,
2941  int toIndex);
2942 
2953  void
2954  targetRemoved(const synthclone::Target *target, int index);
2955 
2963  void
2964  velocityPropertyVisibilityChanged(bool visible);
2965 
2973  void
2974  wetSamplePropertyVisibilityChanged(bool visible);
2975 
2986  void
2987  zoneAdded(const synthclone::Zone *zone, int index);
2988 
3002  void
3003  zoneMoved(const synthclone::Zone *zone, int fromIndex, int toIndex);
3004 
3015  void
3016  zoneRemoved(const synthclone::Zone *zone, int index);
3017 
3028  void
3029  zoneSelectionChanged(const synthclone::Zone *zone, bool selected);
3030 
3031  protected:
3032 
3042  explicit
3043  Context(QObject *parent=0);
3044 
3050  virtual
3051  ~Context();
3052 
3053  };
3054 
3055 }
3056 
3057 #endif
void menuSeparatorRemoved(const synthclone::MenuSeparator *separator, synthclone::Menu menu, const QStringList &subMenus)
Emitted when a MenuSeparator has been removed from a root menu.
void addingParticipant(const synthclone::Participant *participant, const synthclone::Participant *parent, const QByteArray &id)
Emitted when a Participant is being added.
virtual bool isWetSamplePropertyVisible() const =0
Gets a boolean indicating whether or not the wet sample property is visible.
quint16 SampleChannelCount
Holds a sample channel count.
Definition: types.h:72
virtual void reportError(const QString &message)=0
Reports a session error.
virtual void setSelectedEffect(const Effect *effect)=0
Sets the selected Effect.
virtual ~Context()
Destroys the Context object.
virtual const SamplerJob * getSamplerJob(int index) const =0
Gets a SamplerJob from the SamplerJob queue.
virtual void removeTarget(const Target *target)=0
Removes a Target from the Target list.
void effectRemoved(const synthclone::Effect *effect, int index)
Emitted when an Effect has been removed from the Effect list.
virtual bool isChannelPropertyVisible() const =0
Gets a boolean indicating whether or not the channel property is visible.
virtual int getEffectJobCount() const =0
Gets the count of EffectJob objects in the EffectJob queue.
virtual QByteArray getParticipantId(const Participant *participant) const =0
Gets the id of a Participant.
virtual const Effect * getEffect(int index) const =0
Gets the effect.
virtual Zone * addZone(int index=-1)=0
Adds a new zone to the session.
void movingZone(const synthclone::Zone *zone, int fromIndex, int toIndex)
Emitted when a Zone is being moved.
virtual const Registration & addParticipant(Participant *participant, const QByteArray &subId)=0
Adds a Participant to the session.
virtual const SamplerJob * addSamplerJob(SamplerJob::Type type, Zone *zone)=0
Adds a SamplerJob object to the SamplerJob queue.
void errorReported(const QString &message)
Emitted when an error is reported.
virtual void setControlPropertyVisible(MIDIData control, bool visible)=0
Sets the visibility of a control property.
void removingZone(const synthclone::Zone *zone, int index)
Emitted when an Zone is being removed from the Zone list.
void buildingTargets()
Emitted when a Target build operation is starting.
void removingParticipant(const synthclone::Participant *participant, const synthclone::Participant *parent, const QByteArray &id)
Emitted when a Participant is being removed.
virtual const QDir * getSessionDirectory() const =0
Gets the current session directory.
void effectJobRemoved(const synthclone::EffectJob *job, int index)
Emitted when an EffectJob has been removed from the EffectJob queue.
virtual const Registration & addEffect(Effect *effect, int index=-1)=0
Adds an Effect to the session.
virtual void saveSession()=0
Saves the session in the current session directory.
virtual int getParticipantCount(const Participant *parent=0) const =0
Gets the count of child Participants of a Participant, or the count of root Participant objects...
Subclasses of &#39;ZoneComparer&#39; are used to sort zones, generally by a specific property.
Definition: zonecomparer.h:35
virtual int getEffectIndex(const Effect *effect) const =0
Gets the index of an effect.
virtual const EffectJob * getCurrentEffectJob() const =0
Gets the EffectJob currently being executed by the registered Effect objects.
virtual void setStatusPropertyVisible(bool visible)=0
Sets the visibility of the status property.
void focusedComponentChanged(const synthclone::Component *component)
Emitted when the focused component is changed.
virtual void setSampleChannelCount(SampleChannelCount sampleChannelCount)=0
Sets the SampleChannelCount for the session.
virtual void activateParticipant(const synthclone::Participant *participant)=0
Activates a Participant.
Component capable of altering samples in some way.
Definition: effect.h:34
void removingSamplerJob(const synthclone::SamplerJob *job, int index)
Emitted when a SamplerJob is being removed from the SamplerJob queue.
void statusPropertyVisibilityChanged(bool visible)
Emitted when the visibility of the status property is changed.
void addingEffect(const synthclone::Effect *effect, int index)
Emitted when an Effect is being added to the Effect list.
void targetBuildError(const synthclone::Target *target, const QString &message)
Emitted when an error occurs while attempting to build a Target.
virtual void moveEffectJob(int fromIndex, int toIndex)=0
Moves an EffectJob.
void participantActivated(const synthclone::Participant *participant, const synthclone::Participant *parent, const QByteArray &id)
Emitted when a Participant has being activated.
virtual int getRevision() const =0
Gets the revision portion of the version of synthclone.
virtual const EffectJob * addEffectJob(Zone *zone)=0
Adds an EffectJob to the EffectJob queue.
virtual void setWetSamplePropertyVisible(bool visible)=0
Sets the visibility of the wet sample property.
void removingEffectJob(const synthclone::EffectJob *job, int index)
Emitted when an EffectJob is being removed from the EffectJob queue.
void addingSamplerJob(const synthclone::SamplerJob *job, int index)
Emitted when a SamplerJob is being added to the SamplerJob queue.
void menuSeparatorAdded(const synthclone::MenuSeparator *separator, synthclone::Menu menu, const QStringList &subMenus)
Emitted when a MenuSeparator has been added to a root menu.
void targetAdded(const synthclone::Target *target, int index)
Emitted when a Target has been added to the Target list.
virtual int getEffectJobIndex(const synthclone::EffectJob *job) const =0
Gets the index of an EffectJob in the EffectJob queue.
virtual const Effect * getSelectedEffect() const =0
Gets the currently selected Effect.
virtual const Participant * getParticipantParent(const Participant *participant) const =0
Gets the parent Participant of a Participant.
void deactivatingParticipant(const synthclone::Participant *participant, const synthclone::Participant *parent, const QByteArray &id)
Emitted when a Participant is being deactivated.
virtual void buildTargets()=0
Attempts to build all registered targets.
virtual const Component * getFocusedComponent() const =0
Gets the component that currently has focus.
virtual Zone * getSelectedZone(int index)=0
Gets a Zone from the selected Zone list.
void addingZone(const synthclone::Zone *zone, int index)
Emitted when a Zone is being added to the Zone list.
void activatingParticipant(const synthclone::Participant *participant, const synthclone::Participant *parent, const QByteArray &id)
Emitted when a Participant is being activated.
void currentEffectJobChanged(const synthclone::EffectJob *job)
Emitted when the current effect job is changed.
virtual bool isChannelPressurePropertyVisible() const =0
Gets a boolean indicating whether or not the channel pressure property is visible.
Base class for synthclone components.
Definition: component.h:33
void zoneMoved(const synthclone::Zone *zone, int fromIndex, int toIndex)
Emitted when a Zone has been moved in the Zone list.
virtual void setChannelPropertyVisible(bool visible)=0
Sets the visibility of the channel property.
Definition: component.h:26
void samplerRemoved(const synthclone::Sampler *sampler)
Emitted when a Sampler is removed.
virtual void removeEffectJob(const EffectJob *job)=0
Removes an EffectJob from the EffectJob queue.
virtual void removeMenuAction(const MenuAction *action)=0
Removes a MenuAction.
void removingTarget(const synthclone::Target *target, int index)
Emitted when a Target is being removed from the Target list.
void sampleRateChanged(synthclone::SampleRate sampleRate)
Emitted when the session&#39;s synthclone::SampleRate is changed.
void notePropertyVisibilityChanged(bool visible)
Emitted when the visibility of the note property is changed.
virtual void moveEffect(int fromIndex, int toIndex)=0
Moves an Effect.
virtual const Registration & addSampler(Sampler *sampler)=0
Adds a Sampler to the session, removing any Sampler that may already be registered with the session...
SessionState
Defines session states.
Definition: types.h:148
virtual Zone * getZone(int index)=0
Gets a Zone.
void addingMenuAction(const synthclone::MenuAction *action, synthclone::Menu menu, const QStringList &subMenus)
Emitted when a MenuAction is being added to a root menu.
void channelPropertyVisibilityChanged(bool visible)
Emitted when the visibility of the channel property is changed.
void channelPressurePropertyVisibilityChanged(bool visible)
Emitted when the visibility of the channel pressure property is changed.
void movingTarget(const synthclone::Target *target, int fromIndex, int toIndex)
Emitted when a Target is being moved.
virtual bool isReleaseTimePropertyVisible() const =0
Gets a boolean indicating whether or not the release time property is visible.
virtual const Sampler * getSampler() const =0
Gets the Sampler registered with the session.
Participants objects interact with synthclone.
Definition: participant.h:34
void menuActionRemoved(const synthclone::MenuAction *action, synthclone::Menu menu, const QStringList &subMenus)
Emitted when a MenuAction has been removed from a root menu.
virtual void removeMenuSeparator(const MenuSeparator *separator)=0
Removes a MenuSeparator.
void effectAdded(const synthclone::Effect *effect, int index)
Emitted when an Effect has been added to the Effect list.
virtual const Registration & addMenuSeparator(MenuSeparator *separator, Menu menu, const QStringList &subMenus=QStringList())=0
Adds a MenuSeparator to the application.
virtual const Target * getSelectedTarget() const =0
Gets the currently selected target.
void targetRemoved(const synthclone::Target *target, int index)
Emitted when a Target has been removed from the Target list.
Menu
Menu identifiers for default synthclone menus.
Definition: types.h:44
void samplerJobMoved(const synthclone::SamplerJob *job, int fromIndex, int toIndex)
Emitted when a SamplerJob is moved in the SamplerJob queue.
Component capable of building a patch from a list of Zone objects.
Definition: target.h:34
Represents a job that will be sent to registered Effect objects.
Definition: effectjob.h:31
Context objects allow Participant objects to interact with a synthclone session.
Definition: context.h:45
Represents a job that will be sent to a Sampler.
Definition: samplerjob.h:31
void samplerJobRemoved(const synthclone::SamplerJob *job, int index)
Emitted when a SamplerJob has been removed from the SamplerJob queue.
virtual bool isStatusPropertyVisible() const =0
Gets a boolean indicating whether or not the status property is visible.
void addingTarget(const synthclone::Target *target, int index)
Emitted when a Target is being added to the Target list.
Context(QObject *parent=0)
Constructs a new Context object.
void currentSamplerJobChanged(const synthclone::SamplerJob *job)
Emitted when the current sampler job is changed.
virtual void setChannelPressurePropertyVisible(bool visible)=0
Sets the visibility of the channel pressure property.
virtual const Registration & addMenuAction(MenuAction *action, Menu menu, const QStringList &subMenus=QStringList())=0
Adds a MenuAction to the application.
void targetsBuilt()
Emitted when a Target build operation is completed.
virtual const EffectJob * getEffectJob(int index) const =0
Gets an EffectJob from the EffectJob queue.
virtual void setDrySamplePropertyVisible(bool visible)=0
Sets the visibility of the dry sample property.
void targetBuilt(const synthclone::Target *target)
Emitted when a Target is successfully built.
void sampleChannelCountChanged(synthclone::SampleChannelCount count)
Emitted when the session&#39;s synthclone::SampleChannelCount is changed.
virtual const Participant * getParticipant(const QByteArray &id) const =0
Gets a Participant.
void samplerAdded(const synthclone::Sampler *sampler)
Emitted when a Sampler has been added.
virtual const SamplerJob * getCurrentSamplerJob() const =0
Gets the SamplerJob currently being executed by the Sampler.
void sessionStateChanged(synthclone::SessionState state, const QDir *directory)
Emitted when the synthclone::SessionState changes.
virtual int getSamplerJobCount() const =0
Gets the count of SamplerJob objects in the SamplerJob queue.
virtual void removeParticipant(const Participant *participant)=0
Removes a Participant from the session.
virtual int getSelectedZoneCount() const =0
Gets the count of Zone objects in the selected Zone list.
virtual void moveZone(int fromIndex, int toIndex)=0
Moves a Zone.
virtual void deactivateParticipant(const Participant *participant)=0
Deactivates a Participant.
void addingEffectJob(const synthclone::EffectJob *job, int index)
Emitted when an EffectJob is being added to the EffectJob queue.
virtual void abortCurrentSamplerJob()=0
Tells the Sampler to abort the current SamplerJob.
Type
The type of job that will be executed by the Sampler.
Definition: samplerjob.h:41
void removingMenuSeparator(const synthclone::MenuSeparator *separator, synthclone::Menu menu, const QStringList &subMenus)
Emitted when a MenuSeparator is being removed from a root menu.
virtual SampleChannelCount getSampleChannelCount() const =0
Gets the current sample channel count.
virtual void removeSampler()=0
Removes a Sampler registered with the session.
void selectedEffectChanged(const synthclone::Effect *effect, int index)
Emitted when the selected Effect is changed.
void addingSampler(const synthclone::Sampler *sampler)
Emitted when a Sampler is being added.
MenuSeparator objects are used to create a sense of grouping with MenuAction objects.
Definition: menuseparator.h:32
virtual void setSelectedTarget(const Target *target)=0
Sets the selected Target.
virtual void setSessionModified()=0
Changes the session state to SESSIONSTATE_MODIFIED if the session state is SESSIONSTATE_CURRENT.
virtual int getZoneCount() const =0
Gets the count of Zones in the Zone list.
virtual void removeEffect(const Effect *effect)=0
Removes an Effect.
virtual void removeSamplerJob(const SamplerJob *job)=0
Removes a SamplerJob from the SamplerJob queue.
void drySamplePropertyVisibilityChanged(bool visible)
Emitted when the visibility of the dry sample property is changed.
virtual void quit()=0
Terminates synthclone.
void zoneAdded(const synthclone::Zone *zone, int index)
Emitted when a Zone has been added to the Zone list.
Zone objects contains data about how Sample objects should be acquired from a Sampler.
Definition: zone.h:37
void zoneRemoved(const synthclone::Zone *zone, int index)
Emitted when a Zone has been removed from the Zone list.
void movingEffectJob(const synthclone::EffectJob *job, int fromIndex, int toIndex)
Emitted when an EffectJob is being moved.
virtual void removeZone(Zone *zone)=0
Removes a Zone from the Zone list.
void selectedTargetChanged(const synthclone::Target *target, int index)
Emitted when the selected Target is changed.
virtual void setZoneSelected(const Zone *zone, bool selected)=0
(De)selects a Zone.
virtual void setVelocityPropertyVisible(bool visible)=0
Sets the visibility of the velocity property.
void wetSamplePropertyVisibilityChanged(bool visible)
Emitted when the visibility of the wet sample property is changed.
virtual void moveSamplerJob(int fromIndex, int toIndex)=0
Moves a SamplerJob.
void effectMoved(const synthclone::Effect *effect, int fromIndex, int toIndex)
Emitted when an Effect has been moved in the Effect list.
void buildingTarget(const synthclone::Target *target)
Emitted when a Target is being built.
virtual bool isParticipantActivated(const Participant *participant) const =0
Gets a boolean indicating whether or not a Participant is activated.
void controlPropertyVisibilityChanged(synthclone::MIDIData control, bool visible)
Emitted when the visibility of a control property is changed.
virtual void sortZones(const ZoneComparer &comparer, bool ascending=true)=0
Sorts the Zone list.
virtual int getMinorVersion() const =0
Gets the minor portion of the version of synthclone.
virtual int getSamplerJobIndex(const synthclone::SamplerJob *job) const =0
Gets the index of a SamplerJob in the SamplerJob queue.
void aftertouchPropertyVisibilityChanged(bool visible)
Emitted when the visibility of the aftertouch property is changed.
virtual void setAftertouchPropertyVisible(bool visible)=0
Sets the visibility of the aftertouch property.
virtual bool isDrySamplePropertyVisible() const =0
Gets a boolean indicating whether or not the dry sample property is visible.
quint8 MIDIData
Holds a byte of MIDI data.
Definition: types.h:59
void samplerJobAdded(const synthclone::SamplerJob *job, int index)
Emitted when a SamplerJob has been added to the SamplerJob queue.
quint32 SampleRate
Holds a sample rate.
Definition: types.h:96
void movingEffect(const synthclone::Effect *effect, int fromIndex, int toIndex)
Emitted when an Effect is being moved.
virtual void unloadSession()=0
Unloads the current session.
void removingMenuAction(const synthclone::MenuAction *action, synthclone::Menu menu, const QStringList &subMenus)
Emitted when a MenuAction is being removed from a root menu.
void releaseTimePropertyVisibilityChanged(bool visible)
Emitted when the visibility of the release time property is changed.
virtual const Registration & addTarget(Target *target, int index=-1)=0
Adds a Target to the session.
void movingSamplerJob(const synthclone::SamplerJob *job, int fromIndex, int toIndex)
Emitted when a SamplerJob is being moved.
void targetMoved(const synthclone::Target *target, int fromIndex, int toIndex)
Emitted when a Target has been moved in the Target list.
Component capable of capturing and playing back audio.
Definition: sampler.h:33
MenuAction objects are triggerable choices in a menu.
Definition: menuaction.h:33
virtual bool isVelocityPropertyVisible() const =0
Gets a boolean indicating whether or not the velocity property is visible.
virtual int getMajorVersion() const =0
Gets the major portion of the version of synthclone.
void menuActionAdded(const synthclone::MenuAction *action, synthclone::Menu menu, const QStringList &subMenus)
Emitted when a MenuAction has been added to a root menu.
virtual void setSampleRate(SampleRate sampleRate)=0
Sets the SampleRate for the session.
void removingEffect(const synthclone::Effect *effect, int index)
Emitted when an Effect is being removed from the Effect list.
void participantRemoved(const synthclone::Participant *participant, const synthclone::Participant *parent, const QByteArray &id)
Emitted when a Participant has being removed.
virtual void setReleaseTimePropertyVisible(bool visible)=0
Sets the visibility of the release time property.
virtual void moveTarget(int fromIndex, int toIndex)=0
Moves a Target.
virtual void setNotePropertyVisible(bool visible)=0
Sets the visibility of the note property.
virtual bool isSessionDirectory(const QDir &directory) const =0
Gets a boolean indicating whether or not a directory contains a valid synthclone session.
void effectJobMoved(const synthclone::EffectJob *job, int fromIndex, int toIndex)
Emitted when an EffectJob is moved in the EffectJob queue.
virtual bool isAftertouchPropertyVisible() const =0
Gets a boolean indicating whether or not the aftertouch property is visible.
void zoneSelectionChanged(const synthclone::Zone *zone, bool selected)
Emitted when the selection of a Zone changes.
virtual bool isNotePropertyVisible() const =0
Gets a boolean indicating whether or not the note property is visible.
virtual int getEffectCount() const =0
Gets the count of registered effects.
void sampleTimePropertyVisibilityChanged(bool visible)
Emitted when the visibility of the sample time property is changed.
virtual bool isControlPropertyVisible(MIDIData control) const =0
Gets a boolean indicating whether or not a control property is visible.
virtual void loadSession(const QDir &directory)=0
Loads a synthclone session.
virtual bool isZoneSelected(const Zone *zone) const =0
Gets a boolean indicating whether or not a Zone is selected.
void velocityPropertyVisibilityChanged(bool visible)
Emitted when the visibility of the velocity property is changed.
void removingSampler(const synthclone::Sampler *sampler)
Emitted when a Sampler is being removed.
void participantDeactivated(const synthclone::Participant *participant, const synthclone::Participant *parent, const QByteArray &id)
Emitted when a Participant has being deactivated.
virtual int getTargetCount() const =0
Gets the count of Target objects in the Target list.
virtual void setFocusedComponent(const Component *component)=0
Sets the focused component.
virtual int getTargetIndex(const Target *target) const =0
Gets the index of a Target in the Target list.
void effectJobAdded(const synthclone::EffectJob *job, int index)
Emitted when an EffectJob has been added to the EffectJob queue.
virtual void setSampleTimePropertyVisible(bool visible)=0
Sets the visibility of the sample time property.
virtual const Target * getTarget(int index) const =0
Gets a Target from the Target list.
Registration objects are returned when objects are registered with the session.
Definition: registration.h:33
virtual void createSession(const QDir &directory, SampleRate sampleRate, SampleChannelCount count)=0
Writes an empty synthclone session to a directory.
void addingMenuSeparator(const synthclone::MenuSeparator *separator, synthclone::Menu menu, const QStringList &subMenus)
Emitted when a MenuSeparator is being added to a root menu.
virtual SampleRate getSampleRate() const =0
Gets the session sample rate.
virtual SessionState getSessionState() const =0
Gets the state of the current session.
virtual int getZoneIndex(const Zone *zone) const =0
Gets the index of a Zone in the Zone list.
void participantAdded(const synthclone::Participant *participant, const synthclone::Participant *parent, const QByteArray &id)
Emitted when a Participant has being added.
virtual bool isSampleTimePropertyVisible() const =0
Gets a boolean indicating whether or not the sample time property is visible.