/[svn]/linuxsampler/trunk/src/engines/sfz/EngineChannel.h
ViewVC logotype

Annotation of /linuxsampler/trunk/src/engines/sfz/EngineChannel.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2058 - (hide annotations) (download) (as text)
Sun Feb 14 11:40:49 2010 UTC (14 years, 3 months ago) by persson
File MIME type: text/x-c++hdr
File size: 3185 byte(s)
* sfz/sf2 engines: fixed memory leak and memory handling errors
* sfz engine: added support for sw_trigger=first, sw_trigger=legato
  and sw_previous
* sfz parser: allow non-numerical key values ("C#4" for example)
* sfz engine: "key" opcode now sets pitch_keycenter too
* sfz engine: fixed error when unloading instrument with same sample
  used by multiple regions
* sfz parser: added some opcode aliases, like loopmode for loop_mode,
  to be more compatible

1 iliev 2012 /***************************************************************************
2     * *
3     * LinuxSampler - modular, streaming capable sampler *
4     * *
5     * Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck *
6     * Copyright (C) 2005-2009 Christian Schoenebeck *
7     * Copyright (C) 2009 Grigor Iliev *
8     * *
9     * This program is free software; you can redistribute it and/or modify *
10     * it under the terms of the GNU General Public License as published by *
11     * the Free Software Foundation; either version 2 of the License, or *
12     * (at your option) any later version. *
13     * *
14     * This program is distributed in the hope that it will be useful, *
15     * but WITHOUT ANY WARRANTY; without even the implied warranty of *
16     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
17     * GNU General Public License for more details. *
18     * *
19     * You should have received a copy of the GNU General Public License *
20     * along with this program; if not, write to the Free Software *
21     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
22     * MA 02111-1307 USA *
23     ***************************************************************************/
24    
25     #ifndef __LS_SFZ_ENGINECHANNEL_H__
26     #define __LS_SFZ_ENGINECHANNEL_H__
27    
28     #include "../AbstractEngine.h"
29     #include "../EngineChannelBase.h"
30     #include "../EngineChannelFactory.h"
31     #include "Voice.h"
32     #include "sfz.h"
33    
34     namespace LinuxSampler { namespace sfz {
35     class EngineChannel: public LinuxSampler::EngineChannelBase<Voice, ::sfz::Region, ::sfz::Instrument>, public MidiKeyboardAdapter {
36     public:
37     virtual void SendProgramChange(uint8_t Program);
38     virtual void LoadInstrument();
39     virtual void ResetInternal();
40    
41     virtual AbstractEngine::Format GetEngineFormat();
42    
43     // methods derived from MidiKeyboardListener
44     virtual void PreProcessNoteOn(uint8_t key, uint8_t velocity);
45 persson 2058 virtual void PostProcessNoteOn(uint8_t key, uint8_t velocity);
46 iliev 2012 virtual void PreProcessNoteOff(uint8_t key, uint8_t velocity);
47    
48     friend class Voice;
49     friend class Engine;
50     friend class LinuxSampler::EngineChannelFactory;
51    
52     protected:
53     EngineChannel();
54     virtual ~EngineChannel();
55    
56     virtual void ProcessKeySwitchChange(int key);
57    
58     private:
59     bool PressedKeys[128];
60     std::vector< ::sfz::Region*> regionsTemp;
61     int LastKeySwitch;
62     int LastKey;
63     };
64    
65     }} // namespace LinuxSampler::sfz
66    
67     #endif /* __LS_SFZ_ENGINECHANNEL_H__ */

  ViewVC Help
Powered by ViewVC