Deluge Firmware
Loading...
Searching...
No Matches
sounddrum.h
Go to the documentation of this file.
1/*
2 * Copyright © 2014-2023 Synthstrom Audible Limited
3 *
4 * This file is part of The Synthstrom Audible Deluge Firmware.
5 *
6 * The Synthstrom Audible Deluge Firmware is free software: you can redistribute it and/or modify it under the
7 * terms of the GNU General Public License as published by the Free Software Foundation,
8 * either version 3 of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 * See the GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along with this program.
15 * If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#ifndef SOUNDDRUM_H
19#define SOUNDDRUM_H
20
21#include <sound.h>
22#include "definitions.h"
23#include "drum.h"
24#include "DString.h"
25
27
28class SoundDrum final : public Sound, public Drum
29{
30public:
31
34
37
38 SoundDrum();
39 bool isDrum() { return true; }
40 bool allowNoteTails(ModelStackWithSoundFlags* modelStack, bool disregardSampleLoop = false);
41 bool anyNoteIsOn();
42 bool hasAnyVoices();
43 void noteOn(ModelStackWithThreeMainThings* modelStack, uint8_t velocity, Kit* kit, int16_t const* mpeValues, int fromMIDIChannel = MIDI_CHANNEL_NONE, uint32_t sampleSyncLength = 0, int32_t ticksLate = 0, uint32_t samplesLate = 0);
44 void noteOff(ModelStackWithThreeMainThings* modelStack, int velocity);
45 void unassignAllVoices();
47 bool readTagFromFile(char const* tagName);
48 int loadAllSamples(bool mayActuallyReadFiles);
50 void writeToFile(bool savingSong, ParamManager* paramManager);
51 void getName(char* buffer);
52 int readFromFile(Song* song, Clip* clip, int32_t readAutomationUpToPos);
53 void choke(ModelStackWithSoundFlags* modelStack);
54 void setSkippingRendering(bool newSkipping);
55 uint8_t* getModKnobMode();
58
59 void expressionEvent(int newValue, int whichExpressionDimension);
60 void polyphonicExpressionEventOnChannelOrNote(int newValue, int whichExpressionDimension, int channelOrNoteNumber, int whichCharacteristic);
61
64};
65
66#endif // SOUNDDRUM_H
Definition: Arpeggiator.h:73
Definition: Arpeggiator.h:97
Definition: Arpeggiator.h:28
Definition: Clip.h:41
Definition: drum.h:45
Kit * kit
Definition: drum.h:50
Definition: InstrumentClip.h:54
Definition: kit.h:35
Definition: ModControllable.h:39
Definition: ModelStack.h:295
Definition: ModelStack.h:243
Definition: ModelStack.h:130
Definition: ParamManager.h:50
Definition: song.h:72
Definition: sounddrum.h:29
void noteOn(ModelStackWithThreeMainThings *modelStack, uint8_t velocity, Kit *kit, int16_t const *mpeValues, int fromMIDIChannel=MIDI_CHANNEL_NONE, uint32_t sampleSyncLength=0, int32_t ticksLate=0, uint32_t samplesLate=0)
Definition: sounddrum.cpp:78
int loadAllSamples(bool mayActuallyReadFiles)
Definition: sounddrum.cpp:132
void choke(ModelStackWithSoundFlags *modelStack)
Definition: sounddrum.cpp:162
SoundDrum()
Definition: sounddrum.cpp:34
void polyphonicExpressionEventOnChannelOrNote(int newValue, int whichExpressionDimension, int channelOrNoteNumber, int whichCharacteristic)
Definition: sounddrum.cpp:118
void drumWontBeRenderedForAWhile()
Definition: sounddrum.cpp:193
ArpeggiatorForDrum arpeggiator
Definition: sounddrum.h:35
void unassignAllVoices()
Definition: sounddrum.cpp:123
ArpeggiatorSettings * getArpSettings(InstrumentClip *clip=NULL)
Definition: sounddrum.h:63
bool isDrum()
Definition: sounddrum.h:39
bool allowNoteTails(ModelStackWithSoundFlags *modelStack, bool disregardSampleLoop=false)
Definition: sounddrum.cpp:66
void expressionEvent(int newValue, int whichExpressionDimension)
Definition: sounddrum.cpp:96
void setupPatchingForAllParamManagers(Song *song)
Definition: sounddrum.cpp:128
ArpeggiatorBase * getArp()
Definition: sounddrum.cpp:197
bool nameIsDiscardable
Definition: sounddrum.h:33
bool anyNoteIsOn()
Definition: sounddrum.cpp:70
int readFromFile(Song *song, Clip *clip, int32_t readAutomationUpToPos)
Definition: sounddrum.cpp:154
ModControllable * toModControllable()
Definition: sounddrum.h:57
uint8_t * getModKnobMode()
Definition: sounddrum.cpp:189
bool hasAnyVoices()
Definition: sounddrum.cpp:74
bool readTagFromFile(char const *tagName)
Definition: sounddrum.cpp:54
ArpeggiatorSettings arpSettings
Definition: sounddrum.h:36
String name
Definition: sounddrum.h:32
void setSkippingRendering(bool newSkipping)
Definition: sounddrum.cpp:174
void prepareForHibernation()
Definition: sounddrum.cpp:136
void getName(char *buffer)
Definition: sounddrum.cpp:151
void noteOff(ModelStackWithThreeMainThings *modelStack, int velocity)
Definition: sounddrum.cpp:87
void writeToFile(bool savingSong, ParamManager *paramManager)
Definition: sounddrum.cpp:140
Definition: sound.h:66
Definition: DString.h:25
#define MIDI_CHANNEL_NONE
Definition: definitions.h:927