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

Method loadControllerMap

src/core/synth/MidiController.cpp:236–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236void
237MidiController::loadControllerMap()
238{
239 clearControllerMap();
240
241#ifdef _WIN32
242 return;
243#endif
244
245 std::ifstream file(filesystem::get().controllers.c_str(), std::ios::out);
246 std::string name;
247 file >> name;
248 for (int cc = 0; cc < MAX_CC && file.good(); cc++, file >> name) {
249 int paramId = parameter_index_from_name(name.c_str());
250 _cc_to_param_map[cc] = paramId;
251 if (paramId >= 0 && paramId < kAmsynthParameterCount)
252 _param_to_cc_map[paramId] = cc;
253 }
254 file.close();
255}
256
257void
258MidiController::saveControllerMap()

Callers

nothing calls this directly

Calls 2

closeMethod · 0.45

Tested by

no test coverage detected