Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
Safe HaskellSafe-Inferred

Cmd.Instrument.MidiInstDb

Synopsis

Documentation

save_synth :: Path.AppDir -> InstT.SynthName -> [MidiInst.Patch] -> IO () Source #

Some instruments want to load their patches in elaborate slow ways, like parsing a directory full of sysexes. These patches can export a make_db function, which will do the slow parts and save the results in a cache file. The load function will simply read the cache file, if present.

generate_names :: [MidiInst.Patch] -> (Map InstT.Name MidiInst.Patch, [Text]) Source #

inst_name is the name as it appears on the synth, so it's not guaranteed to be unique. Also, due to loading from sysexes, there may be duplicate patches. Generate valid names for the patches, drop duplicates, and disambiguate names that wind up the same.

clean_name :: Text -> InstT.Name Source #

People like to put wacky characters in their names, but it makes them hard to type.