/[svn]/linuxsampler/trunk/src/engines/gig/EngineGlobals.h
ViewVC logotype

Contents of /linuxsampler/trunk/src/engines/gig/EngineGlobals.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 539 - (show annotations) (download) (as text)
Wed May 11 20:03:02 2005 UTC (18 years, 10 months ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 4583 byte(s)
lowered MAX_AUDIO_VOICES to pessimistic 64

1 /***************************************************************************
2 * *
3 * LinuxSampler - modular, streaming capable sampler *
4 * *
5 * Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck *
6 * Copyright (C) 2005 Christian Schoenebeck *
7 * *
8 * This program is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU General Public License as published by *
10 * the Free Software Foundation; either version 2 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This program is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU General Public License *
19 * along with this program; if not, write to the Free Software *
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
21 * MA 02111-1307 USA *
22 ***************************************************************************/
23
24 #ifndef __LS_GIG_ENGINEGLOBALS_H__
25 #define __LS_GIG_ENGINEGLOBALS_H__
26
27 #if DEBUG_HEADERS
28 # warning EngineGlobals.h included
29 #endif // DEBUG_HEADERS
30
31 #define PITCHBEND_SEMITONES 12
32 #define MAX_AUDIO_VOICES 64
33 #define SYSEX_BUFFER_SIZE 2048 // 2kB
34 #define VOICE_STEAL_ALGORITHM voice_steal_algo_oldestkey ///< @see voice_steal_algo_t for available voice stealing algorithms
35
36 #define FILTER_UPDATE_PERIOD 64 ///< amount of sample points after which filter parameters (cutoff, resonance) are going to be updated (higher value means less CPU load, but also worse parameter resolution, this value will be aligned to a power of two)
37 #define FORCE_FILTER_USAGE 0 ///< if set to 1 then filter is always used, if set to 0 filter is used only in case the instrument file defined one
38 #define FILTER_CUTOFF_MAX 10000.0f ///< maximum cutoff frequency (10kHz)
39 #define FILTER_CUTOFF_MIN 100.0f ///< minimum cutoff frequency (100Hz)
40
41 // Uncomment following line to override external cutoff controller
42 //#define OVERRIDE_FILTER_CUTOFF_CTRL 1 ///< set to an arbitrary MIDI control change controller (e.g. 1 for 'modulation wheel')
43
44 // Uncomment following line to override external resonance controller
45 //#define OVERRIDE_FILTER_RES_CTRL 91 ///< set to an arbitrary MIDI control change controller (e.g. 91 for 'effect 1 depth')
46
47 // Uncomment following line to override filter type
48 //#define OVERRIDE_FILTER_TYPE ::gig::vcf_type_lowpass ///< either ::gig::vcf_type_lowpass, ::gig::vcf_type_bandpass or ::gig::vcf_type_highpass
49
50 #include "Voice.h"
51 #include "../common/Event.h"
52
53 namespace LinuxSampler { namespace gig {
54
55 class Voice;
56
57 enum voice_steal_algo_t {
58 voice_steal_algo_none,
59 voice_steal_algo_oldestvoiceonkey,
60 voice_steal_algo_oldestkey
61 };
62
63 struct midi_key_info_t {
64 RTList<Voice>* pActiveVoices; ///< Contains the active voices associated with the MIDI key.
65 bool KeyPressed; ///< Is true if the respective MIDI key is currently pressed.
66 bool Active; ///< If the key contains active voices.
67 bool ReleaseTrigger; ///< If we have to launch release triggered voice(s) when the key is released
68 Pool<uint>::Iterator itSelf; ///< hack to allow fast deallocation of the key from the list of active keys
69 RTList<Event>* pEvents; ///< Key specific events (only Note-on, Note-off and sustain pedal currently)
70 int VoiceTheftsQueued; ///< Amount of voices postponed due to shortage of voices.
71 uint8_t RoundRobinIndex; ///< For the round robin dimension: current articulation for this key, will be incremented for each note on
72 };
73
74 }} // namespace LinuxSampler::gig
75
76 #endif // __LS_GIG_ENGINEGLOBALS_H__

  ViewVC Help
Powered by ViewVC