20 #ifndef __SYNTHCLONE_CONTEXT_H__ 21 #define __SYNTHCLONE_CONTEXT_H__ 23 #include <QtCore/QDir> 24 #include <QtCore/QStringList> 705 const QStringList &subMenus=QStringList()) = 0;
726 const QStringList &subMenus=QStringList()) = 0;
748 const QStringList &subMenus=QStringList()) = 0;
769 const QStringList &subMenus=QStringList()) = 0;
790 const QStringList &subMenus=QStringList()) = 0;
812 const QStringList &subMenus=QStringList()) = 0;
834 const QStringList &subMenus=QStringList()) = 0;
856 const QStringList &subMenus=QStringList()) = 0;
1063 moveZone(
int fromIndex,
int toIndex) = 0;
1528 const QByteArray &
id);
1591 const QStringList &subMenus);
1611 const QStringList &subMenus);
1630 const QStringList &subMenus);
1649 const QStringList &subMenus);
1669 const QStringList &subMenus);
1689 const QStringList &subMenus);
1709 const QStringList &subMenus);
1729 const QByteArray &
id);
1880 const QByteArray &
id);
2034 const QStringList &subMenus);
2053 const QStringList &subMenus);
2072 const QStringList &subMenus);
2109 const QStringList &subMenus);
2128 const QStringList &subMenus);
2147 const QStringList &subMenus);
2184 const QStringList &subMenus);
2203 const QStringList &subMenus);
2222 const QStringList &subMenus);
2241 const QStringList &subMenus);
2261 const QStringList &subMenus);
2281 const QStringList &subMenus);
2301 const QStringList &subMenus);
2415 const QByteArray &
id);
2434 const QByteArray &
id);
2454 const QByteArray &
id);
2474 const QByteArray &
id);
2547 const QStringList &subMenus);
2566 const QStringList &subMenus);
2585 const QStringList &subMenus);
2604 const QStringList &subMenus);
2624 const QStringList &subMenus);
2644 const QStringList &subMenus);
2664 const QStringList &subMenus);
2684 const QByteArray &
id);
2870 const QDir *directory);
2907 const QString &message);
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 'ZoneComparer' 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'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'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.
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
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.