tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_MidiProgramManager.h
Go to the documentation of this file.
1 /*
2 ,--. ,--. ,--. ,--.
3 ,-' '-.,--.--.,--,--.,---.| |,-.,-' '-.`--' ,---. ,--,--, Copyright 2024
4 '-. .-'| .--' ,-. | .--'| /'-. .-',--.| .-. || \ Tracktion Software
5 | | | | \ '-' \ `--.| \ \ | | | |' '-' '| || | Corporation
6 `---' `--' `--`--'`---'`--'`--' `---' `--' `---' `--''--' www.tracktion.com
7
8 Tracktion Engine uses a GPL/commercial licence - see LICENCE.md for details.
9*/
10
11namespace tracktion { inline namespace engine
12{
13
14//==============================================================================
18{
19public:
21
22 juce::StringArray getMidiProgramSetNames();
23 juce::String getProgramName (int set, int bank, int program);
24 juce::String getBankName (int set, int bank);
25 int getBankID (int set, int bank);
26 void setBankID (int set, int bank, int id);
27 void setProgramName (int set, int bank, int program, const juce::String& newName);
28 void setBankName (int set, int bank, const juce::String& newName);
29 void clearProgramName (int set, int bank, int program);
30 juce::String getDefaultName (int bank, int program, bool zeroBased);
31 juce::String getDefaultCustomName();
32 int getSetIndex (const juce::String& setName);
33 bool isZeroBased (int set);
34 void setZeroBased (int set, bool zeroBased);
35
36 bool doesSetExist (const juce::String& name) const noexcept;
37 bool canEditProgramSet (int set) const noexcept;
38 bool canDeleteProgramSet (int set) const noexcept;
39 void addNewSet (const juce::String& name);
40 void addNewSet (const juce::String& name, const juce::XmlElement&);
41 void deleteSet (int set);
42 bool importSet (int set, const juce::File&);
43 bool exportSet (int set, const juce::File&);
44
45 static juce::StringArray getListOfPresets (Engine&);
46 juce::String getPresetXml (juce::String presetName);
47
48 void saveAll();
49
50 Engine& engine;
51
52protected:
53 struct MidiBank
54 {
55 juce::XmlElement* createXml();
56 void updateFromXml (const juce::XmlElement&);
57
58 juce::String name;
59 int id = 0;
60 std::map<int, juce::String> programNames;
61 };
62
64 {
66 juce::XmlElement* createXml();
67 void updateFromXml (const juce::XmlElement&);
68
69 juce::String name;
70 bool zeroBased = true;
71 MidiBank midiBanks[16];
72 };
73
75
77};
78
79}} // namespace tracktion { inline namespace engine
The Engine is the central class for all tracktion sessions.
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)