mirror of
https://codeberg.org/armin/trommelkiste.git
synced 2026-09-01 04:10:46 +02:00
Add user preset save/load to the preset menu
This commit is contained in:
parent
ff96ab1a69
commit
143e0bac76
4 changed files with 212 additions and 28 deletions
|
|
@ -78,14 +78,29 @@ public:
|
|||
const char* samples[NUM_TRACKS];
|
||||
};
|
||||
|
||||
int currentKitIndex = 0;
|
||||
int currentPresetIndex = 0;
|
||||
void loadKit(int index);
|
||||
void nextKit();
|
||||
void prevKit();
|
||||
int getNumKits() const;
|
||||
juce::String getCurrentKitName() const;
|
||||
static const Kit* getKitList();
|
||||
|
||||
// User presets (saved to disk, shown in the preset menu)
|
||||
struct UserPreset
|
||||
{
|
||||
juce::String name;
|
||||
juce::File file;
|
||||
};
|
||||
|
||||
juce::Array<UserPreset> userPresets;
|
||||
void saveUserPreset(const juce::String& name);
|
||||
void loadUserPreset(int index);
|
||||
void refreshUserPresets();
|
||||
|
||||
int getNumPresets() const { return getNumKits() + userPresets.size(); }
|
||||
juce::String getPresetName(int index) const;
|
||||
void loadPreset(int index);
|
||||
void nextPreset();
|
||||
void prevPreset();
|
||||
|
||||
private:
|
||||
struct Voice
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue