--- linuxsampler/trunk/src/engines/gig/EngineChannel.h 2005/06/22 22:09:28 675 +++ linuxsampler/trunk/src/engines/gig/EngineChannel.h 2006/11/27 21:34:55 947 @@ -3,7 +3,7 @@ * LinuxSampler - modular, streaming capable sampler * * * * Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * - * Copyright (C) 2005 Christian Schoenebeck * + * Copyright (C) 2005, 2006 Christian Schoenebeck * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -29,7 +29,8 @@ #endif // DEBUG_HEADERS #include "../common/Event.h" -#include "../common/EngineChannel.h" +#include "../EngineChannel.h" +#include "../../common/RingBuffer.h" #include "EngineGlobals.h" #include "Engine.h" #include "Voice.h" @@ -56,9 +57,13 @@ virtual void LoadInstrument(); virtual void Reset(); virtual void SendNoteOn(uint8_t Key, uint8_t Velocity); + virtual void SendNoteOn(uint8_t Key, uint8_t Velocity, int32_t FragmentPos); virtual void SendNoteOff(uint8_t Key, uint8_t Velocity); + virtual void SendNoteOff(uint8_t Key, uint8_t Velocity, int32_t FragmentPos); virtual void SendPitchbend(int Pitch); + virtual void SendPitchbend(int Pitch, int32_t FragmentPos); virtual void SendControlChange(uint8_t Controller, uint8_t Value); + virtual void SendControlChange(uint8_t Controller, uint8_t Value, int32_t FragmentPos); virtual bool StatusChanged(bool bNewStatus = false); virtual float Volume(); virtual void Volume(float f); @@ -93,19 +98,24 @@ midi_chan_t midiChannel; ///< MIDI channel(s) on which this engine channel listens to. RingBuffer* pEventQueue; ///< Input event queue. RTList* pEvents; ///< All engine channel specific events for the current audio fragment. - RTList* pCCEvents; ///< All control change events for the current audio fragment on this engine channel. - RTList* pSynthesisEvents[Event::destination_count]; ///< Events directly affecting synthesis parameters (like pitch, volume and filter). - uint8_t ControllerTable[128]; ///< Reflects the current values (0-127) of all MIDI controllers for this engine / sampler channel. + uint8_t ControllerTable[129]; ///< Reflects the current values (0-127) of all MIDI controllers for this engine / sampler channel. Number 128 is for channel pressure (mono aftertouch). midi_key_info_t* pMIDIKeyInfo; ///< Contains all active voices sorted by MIDI key number and other informations to the respective MIDI key Pool* pActiveKeys; ///< Holds all keys in it's allocation list with active voices. std::map ActiveKeyGroups; ///< Contains active keys (in case they belong to a key group) ordered by key group ID. ::gig::Instrument* pInstrument; bool SustainPedal; ///< true if sustain pedal is down - double GlobalVolume; ///< overall volume (a value < 1.0 means attenuation, a value > 1.0 means amplification) + bool SostenutoPedal; ///< true if sostenuto pedal is down + bool SoloMode; ///< in Solo Mode we only play one voice (group) at a time + int SoloKey; ///< Currently 'active' solo key, that is the key to which the currently sounding voice belongs to (only if SoloMode is enabled) + bool PortamentoMode; ///< in Portamento Mode we slide the pitch from the last note to the current note. + float PortamentoTime; ///< How long it will take to glide from the previous note to the current (in seconds) + float PortamentoPos; ///< Current position on the keyboard, that is integer and fractional part (only used if PortamentoMode is on) + double GlobalVolume; ///< Master volume factor set through the C++ API / LSCP (a value < 1.0 means attenuation, a value > 1.0 means amplification) + double MidiVolume; ///< Volume factor altered by MIDI CC#7 (a value < 1.0 means attenuation, a value > 1.0 means amplification) float GlobalPanLeft; float GlobalPanRight; int Pitch; ///< Current (absolute) MIDI pitch value. - int CurrentKeyDimension; ///< Current value (0-127) for the keyboard dimension, altered by pressing a keyswitching key. + float CurrentKeyDimension; ///< Current value (0-1.0) for the keyboard dimension, altered by pressing a keyswitching key. String InstrumentFile; int InstrumentIdx; String InstrumentIdxName;