Module

Emo8.Game.Sound

Package
purescript-emo8
Repository
opyapeus/purescript-emo8

#Sound Source

type Sound = SoundR SoundContext

Emo8 sound monad which runs some sound operations.

#SoundContext Source

type SoundContext = { ctx :: AudioContext, ref :: Ref (Map Score (List OscillatorNode)) }

#play Source

play :: Score -> Tone -> Tempo -> Sound Unit

Play the score with the specified the score, tone and tempo.

The operation is ignored until the score being stopped.

#play' Source

play' :: Score -> Tone -> Tempo -> Sound Unit

play the score after stop.

#stop Source

stop :: Score -> Sound Unit

Stop playing with the specified score.