MCPcopy Create free account
hub / github.com/amsynth/amsynth / PresetController

Method PresetController

src/core/synth/PresetController.cpp:51–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50
51PresetController::PresetController()
52{
53 // Load the first user-writable bank by default, falling back to first read-only one.
54 const auto &banks = getPresetBanks();
55 if (!banks.empty()) {
56 auto it = std::find_if(banks.begin(), banks.end(), [] (const BankInfo &bi) {return !bi.read_only;});
57 if (it == banks.end())
58 it = banks.begin();
59 loadPresets(it->file_path.c_str());
60 selectPreset(0);
61 }
62
63 currentPreset.addObserver(this);
64}
65
66int
67PresetController::selectPreset (const int presetNo)

Callers

nothing calls this directly

Calls 1

addObserverMethod · 0.45

Tested by

no test coverage detected