Audio.SoundFont
- Package
- purescript-soundfonts
- Repository
- newlandsvalley/purescript-soundfonts
#AudioBuffer Source
data AudioBufferThe SoundFont API which we will expose the Audio Buffer for a single note
#Instrument Source
type Instrument = Tuple InstrumentName SoundFontan instrument name attached to its SoundFont
#InstrumentChannels Source
type InstrumentChannels = Map InstrumentName Intthe mapping of instrument names to MIDI channels
#SoundFont Source
type SoundFont = Map Int AudioBufferthe instrument soundfont a mapping between MIDI pitch and the note's AudioBuffer
#canPlayOgg Source
canPlayOgg :: Effect Booleancan the browser play ogg format ?
#isWebAudioEnabled Source
isWebAudioEnabled :: Effect Booleanis the browser web-audio enabled ?
#setNoteRing Source
setNoteRing :: Number -> Effect Unitsetting for how long the note 'rings' after it's alloted time in order to support features such as a more legato feel This should be a number between 0 (no ring) and 1 (double the original note duration)
#logLoadResource Source
logLoadResource :: InstrumentName -> Effect (Fiber Unit)just for debug
#loadInstrument Source
loadInstrument :: Maybe String -> InstrumentName -> Aff Instrumentload a single instrument SoundFont The options are to load the soundfont from: Benjamin Gleitzman's server (default) A directory from the local server if this is supplied
#loadInstruments Source
loadInstruments :: Maybe String -> Array InstrumentName -> Aff (Array Instrument)load a bunch of instrument SoundFonts (in parallel) again with options to load either locally or remotely from Benjamin Gleitzman's server
#loadRemoteSoundFonts Source
loadRemoteSoundFonts :: Array InstrumentName -> Aff (Array Instrument)load a bunch of soundfonts from the Gleitzmann server
#loadPianoSoundFont Source
loadPianoSoundFont :: String -> Aff Instrumentload the piano soundfont from a relative directory on the local server
#instrumentChannels Source
instrumentChannels :: Array Instrument -> InstrumentChannelscreate a map of instrument name to channel from an Instrument Array