Module

Audio.SoundFont.Decoder

Package
purescript-soundfonts
Repository
newlandsvalley/purescript-soundfonts

#NoteMap Source

type NoteMap = Map Int Uint8Array

the final note map indexed by the MIDI pitch number

#midiJsToNoteMap Source

midiJsToNoteMap :: InstrumentName -> String -> Either Error NoteMap

Parse the downloaded MIDI.js and process the JSON if we can. This MIDI.js format starts with some javascript which we need to ditch and then the almost-Json for the requested instrument - unfortunately it leaves a trailing comma before the final brace.