28 |
RTList<note_id_t>* pChildNotes; ///< Note ID list of "child" notes of this note. These are special notes that must be released once this note gets released. |
RTList<note_id_t>* pChildNotes; ///< Note ID list of "child" notes of this note. These are special notes that must be released once this note gets released. |
29 |
Event cause; ///< Copy of the original event (usually a note-on event) which caused this note. |
Event cause; ///< Copy of the original event (usually a note-on event) which caused this note. |
30 |
event_id_t eventID; ///< Unique ID of the actual original @c Event which caused this note. |
event_id_t eventID; ///< Unique ID of the actual original @c Event which caused this note. |
31 |
|
/// Optional synthesis parameters that might be overridden (by calling real-time instrument script functions like change_vol(), change_pitch(), etc.). |
32 |
|
struct _Override { |
33 |
|
float Volume; ///< as linear amplification ratio (1.0 being neutral) |
34 |
|
float Pitch; ///< as linear frequency ratio (1.0 being neutral) |
35 |
|
float Pan; ///< between -1.0 (most left) and +1.0 (most right) and 0.0 being neutral. |
36 |
|
int64_t PanSources; ///< Might be used for calculating an average pan value in differential way: amount of times the Pan value had been changed and shall be calculated relatively upon. |
37 |
|
float Cutoff; ///< between 0.0 and 1.0 |
38 |
|
float Resonance; ///< between 0.0 and 1.0 |
39 |
|
} Override; |
40 |
/// Sampler format specific informations and variables. |
/// Sampler format specific informations and variables. |
41 |
union _Format { |
union _Format { |
42 |
/// Gigasampler/GigaStudio format specifics. |
/// Gigasampler/GigaStudio format specifics. |
47 |
} Format; |
} Format; |
48 |
protected: |
protected: |
49 |
NoteBase() : hostKey(0), parentNoteID(0), pChildNotes(NULL) { |
NoteBase() : hostKey(0), parentNoteID(0), pChildNotes(NULL) { |
50 |
Format = (_Format) {}; |
Override.Volume = 1.f; |
51 |
|
Override.Pitch = 1.f; |
52 |
|
Override.Pan = 0.f; |
53 |
|
Override.PanSources = 0; |
54 |
|
Override.Cutoff = 1.f; |
55 |
|
Override.Resonance = 1.f; |
56 |
|
Format = _Format(); |
57 |
} |
} |
58 |
}; |
}; |
59 |
|
|
87 |
pChildNotes->clear(); |
pChildNotes->clear(); |
88 |
cause = Event(); |
cause = Event(); |
89 |
eventID = 0; |
eventID = 0; |
90 |
Format = (_Format) {}; |
Override.Volume = 1.f; |
91 |
|
Override.Pitch = 1.f; |
92 |
|
Override.Pan = 0.f; |
93 |
|
Override.PanSources = 0; |
94 |
|
Override.Cutoff = 1.f; |
95 |
|
Override.Resonance = 1.f; |
96 |
|
Format = _Format(); |
97 |
if (pActiveVoices) { |
if (pActiveVoices) { |
98 |
typename RTList<V>::Iterator itVoice = pActiveVoices->first(); |
typename RTList<V>::Iterator itVoice = pActiveVoices->first(); |
99 |
typename RTList<V>::Iterator itVoicesEnd = pActiveVoices->end(); |
typename RTList<V>::Iterator itVoicesEnd = pActiveVoices->end(); |