Karya, built on Sun Nov 26 01:04:37 PST 2017 (patch 0a920b2bde70c0cbac8ee09d158064798b61bbe5)

Safe HaskellNone



Load the instrument db. This collects together all the local instrument definitions.

The convention is that each synthesizer has a module in Local/Instrument/, and each one exports a load :: Load, and possibly make_db :: MakeDb.

Instrument.MakeDb is used to run the make_dbs.



type Load = FilePath -> IO (Maybe MidiInst.Synth) Source #

Instrument definition modules that need to load from disk export a function called load, with this signature. The FilePath is the Config.instrument_dir and could hold cached instruments, as created by MakeDb.

type MakeDb = FilePath -> IO () Source #

Some synths may require a more expensive load, e.g. they could parse a directory full of sysex dumps. These expose a make_db function with this type. As with Load, the FilePath is Config.instrument_dir. The function is expected to do its work and save the results in the instrument dir

You should use save_synth, which will put the file into Config.instrument_cache_dir with the same name as the synth.

all_loads :: [(InstTypes.SynthName, (MakeDb, Load))] Source #

Each synth that caches to disk has a function to make the cache, and one to load it.

midi_synths :: [MidiInst.Synth] Source #

Synth declarations for each synth that is declared purely.