Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Safe HaskellNone

Local.Instrument

Description

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.

Synopsis

Documentation

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.