Module

Audio.SoundFont.Melody

Package
purescript-soundfonts
Repository
newlandsvalley/purescript-soundfonts

#MidiPhrase Source

type MidiPhrase = Array MidiNote

We split up a melody into phrases to allow the player to be re-rendered after each phrase is played

#Melody Source

type Melody = Array MidiPhrase

A Melody is simply an array of phrases where each phrase is an Array of notes that can be played using playNotes. It is also the entity that is played by the Halogen player widget.

#PMelody Source

newtype PMelody

Constructors

#playPhrase Source

playPhrase :: Array Instrument -> MidiPhrase -> Aff Unit

Play a phrase of MidiNotes. This is identical to playNotes except that it invokes a delay equal to the duration of the phrase. This allows multiple phrased to be paced properly.

#playMelody Source

playMelody :: Array Instrument -> Melody -> Aff Unit

Play the entire Melody