--- linuxsampler/trunk/src/engines/gig/Engine.h 2004/10/14 21:31:26 285 +++ linuxsampler/trunk/src/engines/gig/Engine.h 2005/02/12 23:48:50 376 @@ -100,13 +100,14 @@ virtual String Version(); virtual String EngineName(); virtual String InstrumentFileName(); + virtual String InstrumentName(); virtual int InstrumentIndex(); virtual int InstrumentStatus(); // abstract methods derived from interface class 'InstrumentConsumer' virtual void ResourceToBeUpdated(::gig::Instrument* pResource, void*& pUpdateArg); virtual void ResourceUpdated(::gig::Instrument* pOldResource, ::gig::Instrument* pNewResource, void* pUpdateArg); - protected: + //protected: struct midi_key_info_t { RTList* pActiveVoices; ///< Contains the active voices associated with the MIDI key. bool KeyPressed; ///< Is true if the respective MIDI key is currently pressed. @@ -148,12 +149,14 @@ bool SustainPedal; ///< true if sustain pedal is down double GlobalVolume; ///< overall volume (a value < 1.0 means attenuation, a value > 1.0 means amplification) int Pitch; ///< Current (absolute) MIDI pitch value. + int CurrentKeyDimension; ///< Current value (0-127) for the keyboard dimension, altered by pressing a keyswitching key. int ActiveVoiceCount; ///< number of currently active voices int ActiveVoiceCountMax; ///< the maximum voice usage since application start bool SuspensionRequested; ConditionServer EngineDisabled; String InstrumentFile; int InstrumentIdx; + String InstrumentIdxName; int InstrumentStat; int8_t ScaleTuning[12]; ///< contains optional detune factors (-64..+63 cents) for all 12 semitones of an octave RTList::Iterator itLastStolenVoice; ///< Only for voice stealing: points to the last voice which was theft in current audio fragment, NULL otherwise. @@ -165,9 +168,10 @@ void ProcessPitchbend(Pool::Iterator& itPitchbendEvent); void ProcessControlChange(Pool::Iterator& itControlChangeEvent); void ProcessSysex(Pool::Iterator& itSysexEvent); - Pool::Iterator LaunchVoice(Pool::Iterator& itNoteOnEvent, int iLayer = 0, bool ReleaseTriggerVoice = false, bool VoiceStealing = true); + Pool::Iterator LaunchVoice(Pool::Iterator& itNoteOnEvent, int iLayer, bool ReleaseTriggerVoice, bool VoiceStealing); void StealVoice(Pool::Iterator& itNoteOnEvent); void FreeVoice(Pool::Iterator& itVoice); + void FreeKey(midi_key_info_t* pKey); void ResetSynthesisParameters(Event::destination_t dst, float val); void ResetInternal();