21#ifndef LS_INSTRUMENT_EDITOR_H
22#define LS_INSTRUMENT_EDITOR_H
24#include "../common/global.h"
25#include "../common/Thread.h"
26#include "../drivers/midi/VirtualMidiDevice.h"
33 class InstrumentEditorListener;
Channel Interface for LinuxSampler Sampler Engines.
Instrument Editor Notifications.
virtual void OnSampleReferenceChanged(void *pOldSample, void *pNewSample, InstrumentEditor *pSender)=0
Called after some data structure changed its reference to a sample.
virtual void OnInstrumentEditorQuit(InstrumentEditor *pSender)=0
Called after the instrument editor stopped running.
virtual void OnSamplesRemoved(InstrumentEditor *pSender)=0
Called after samples have been deleted.
virtual void OnDataStructureToBeChanged(void *pStruct, String sStructType, InstrumentEditor *pSender)=0
Called before data structure is to be modified.
virtual void OnDataStructureChanged(void *pStruct, String sStructType, InstrumentEditor *pSender)=0
Called after data structure has been modified.
virtual void OnSamplesToBeRemoved(std::set< void * > Samples, InstrumentEditor *pSender)=0
Called before samples are to be deleted.
Instrument Editor Interface (external plugin)
virtual String Description()=0
Arbitrary textual description of the instrument editor (i.e.
void AddListener(InstrumentEditorListener *pListener)
Registers object that wants to be notified on events.
void NotifySamplesRemoved()
Dispatch completed sample removal event.
virtual String Version()=0
The instrument editor's version (i.e.
virtual int Main()
This method needs to be implemented by the descending class and is the entry point for the new thread...
InstrumentEditor()
Constructor.
EngineChannel * GetEngineChannel()
Returns the EngineChannel for which this instrument editor was spawned for, for editing the respectiv...
void NotifySampleReferenceChanged(void *pOldSample, void *pNewSample)
Dispatch sample reference changed event.
virtual int Main(void *pInstrument, String sTypeName, String sTypeVersion, void *pUserData=NULL)=0
Entry point for the instrument editor's thread.
void NotifyDataStructureChanged(void *pStruct, String sStructType)
Dispatch completed data structure modification event.
void Launch(EngineChannel *pEngineChannel, void *pInstrument, String sTypeName, String sTypeVersion, void *pUserData=NULL)
Launch the instrument editor for the given instrument.
virtual ~InstrumentEditor()
Destructor.
std::set< InstrumentEditorListener * > listeners
void RemoveListener(InstrumentEditorListener *pListener)
Unregisters object that doesn't want to be notified anymore.
virtual bool IsTypeSupported(String sTypeName, String sTypeVersion)=0
The instrument editor has to return true in case it supports the given instrument data structure type...
void NotifyDataStructureToBeChanged(void *pStruct, String sStructType)
Dispatch pending data structure modification event.
void NotifySamplesToBeRemoved(std::set< void * > Samples)
Dispatch pending sample removal event.
virtual String Name()=0
The instrument editor's name (i.e.
Wraps as a kind of pointer class some data object shared with other threads, to protect / synchronize...
Abstract base class for classes that need to run in an own thread.
Light-weight MIDI interface (for MIDI in & out) intended to be used by pure software MIDI "devices",...