2018-02-27 08:25:20 +08:00
|
|
|
//
|
|
|
|
// Created by Alex Birch on 17/09/2017.
|
|
|
|
//
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../JuceLibraryCode/JuceHeader.h"
|
|
|
|
#include "Pills.h"
|
|
|
|
#include "TableComponent.h"
|
|
|
|
#include "Preset.h"
|
|
|
|
#include "PresetsToBanks.h"
|
|
|
|
#include "FluidSynthModel.h"
|
|
|
|
#include <memory>
|
|
|
|
#include <fluidsynth.h>
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
2019-07-14 05:37:26 +08:00
|
|
|
class TablesComponent : public Component/*,
|
|
|
|
public FluidSynthModel::Listener */
|
2018-02-27 08:25:20 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
TablesComponent(
|
2019-07-15 00:22:36 +08:00
|
|
|
AudioProcessorValueTreeState& valueTreeState
|
|
|
|
// FluidSynthModel& fluidSynthModel
|
2018-02-27 08:25:20 +08:00
|
|
|
);
|
2019-07-15 00:22:36 +08:00
|
|
|
// ~TablesComponent();
|
2018-02-27 08:25:20 +08:00
|
|
|
|
|
|
|
void resized() override;
|
|
|
|
|
|
|
|
bool keyPressed(const KeyPress &key) override;
|
2019-07-14 05:37:26 +08:00
|
|
|
// void fontChanged(FluidSynthModel *, const String &) override;
|
2018-02-27 08:25:20 +08:00
|
|
|
|
|
|
|
private:
|
2019-07-07 07:22:47 +08:00
|
|
|
AudioProcessorValueTreeState& valueTreeState;
|
2019-07-15 00:22:36 +08:00
|
|
|
// FluidSynthModel& fluidSynthModel;
|
|
|
|
// int selectedBank;
|
2018-02-27 08:25:20 +08:00
|
|
|
|
2019-07-14 21:19:27 +08:00
|
|
|
Pills banks;
|
|
|
|
TableComponent presetTable;
|
2018-02-27 08:25:20 +08:00
|
|
|
|
2019-07-15 00:22:36 +08:00
|
|
|
// BanksToPresets banksToPresets;
|
2018-02-27 08:25:20 +08:00
|
|
|
|
2019-07-14 21:19:27 +08:00
|
|
|
// static vector<vector<string>> mapPresets(const BanksToPresets &banksToPresets, int bank);
|
2019-07-15 00:22:36 +08:00
|
|
|
// static vector<string> mapBanks(const BanksToPresets &banksToPresets);
|
2018-02-27 08:25:20 +08:00
|
|
|
|
2019-07-15 00:22:36 +08:00
|
|
|
// void onBankSelected(int bank);
|
|
|
|
// void onPresetSelected(int preset);
|
|
|
|
// int presetToIndexMapper(int preset);
|
2018-02-27 08:25:20 +08:00
|
|
|
|
2019-07-15 00:22:36 +08:00
|
|
|
// fluid_preset_t* getCurrentPreset();
|
|
|
|
// Preset getFirstPresetInBank(int bank);
|
2018-02-27 08:25:20 +08:00
|
|
|
|
2019-07-15 00:22:36 +08:00
|
|
|
// bool initialised;
|
2018-02-27 08:25:20 +08:00
|
|
|
|
|
|
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TablesComponent)
|
|
|
|
};
|