| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Termtab.Audio.Playback
Description
Simple, blocking note/beat playback built directly on
AudioEngine — no transport control (play/pause/stop),
no position tracking, just "turn this on, sleep, turn it off" for as
many beats as given. Used where a single synchronous sequence needs to
be auditioned (e.g. previewing a track in isolation); full Song
playback with pause/resume/seek instead goes through
Termtab.Audio.PlaybackThread, which reuses durationToMicroseconds
from here for its own timing.
Synopsis
- durationToMicroseconds :: Duration -> Tempo -> Int
- playNote :: AudioEngine -> MidiChannel -> Pitch -> Velocity -> Duration -> Tempo -> IO ()
- playSequence :: AudioEngine -> MidiChannel -> Tempo -> [Beat] -> IO ()
Documentation
playNote :: AudioEngine -> MidiChannel -> Pitch -> Velocity -> Duration -> Tempo -> IO () Source #
Play a single note for the given duration, then turn it off.
playSequence :: AudioEngine -> MidiChannel -> Tempo -> [Beat] -> IO () Source #
Play a sequence of beats on a given channel at a given tempo.