| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Termtab.Audio.Types
Description
Shared vocabulary for the audio subsystem: the commands sent to a
playback worker (AudioCommand), what state that worker reports back
(PlaybackStatus), and how a backend is selected and configured
(BackendType, AudioConfig). Kept separate from Termtab.Audio so
that Termtab.Audio.Playback and Termtab.Audio.PlaybackThread can
depend on just the vocabulary without pulling in a concrete backend.
Synopsis
- data AudioCommand
- data PlaybackStatus
- newtype AudioConfig = AudioConfig {}
- data BackendType
Documentation
data AudioCommand Source #
A message sent to Termtab.Audio.PlaybackThread's worker loop. The
CmdNote*/CmdProgramChange variants are low-level one-off events
(mirroring the synchronous engine* calls in Termtab.Audio); CmdPlay
/ CmdStop / CmdPause / CmdSeek control song-level transport
state; CmdShutdown tells the worker thread to exit.
Constructors
| CmdNoteOn MidiChannel Pitch Velocity | |
| CmdNoteOff MidiChannel Pitch | |
| CmdProgramChange MidiChannel MidiProgram | |
| CmdPlay | |
| CmdStop | |
| CmdPause | |
| CmdSeek MeasureIndex | |
| CmdShutdown |
Instances
| Show AudioCommand Source # | |
Defined in Termtab.Audio.Types Methods showsPrec :: Int -> AudioCommand -> ShowS # show :: AudioCommand -> String # showList :: [AudioCommand] -> ShowS # | |
| Eq AudioCommand Source # | |
Defined in Termtab.Audio.Types | |
data PlaybackStatus Source #
Current transport state of song playback, as reported by Termtab.Audio.PlaybackThread for the UI to display.
Instances
| Show PlaybackStatus Source # | |
Defined in Termtab.Audio.Types Methods showsPrec :: Int -> PlaybackStatus -> ShowS # show :: PlaybackStatus -> String # showList :: [PlaybackStatus] -> ShowS # | |
| Eq PlaybackStatus Source # | |
Defined in Termtab.Audio.Types Methods (==) :: PlaybackStatus -> PlaybackStatus -> Bool # (/=) :: PlaybackStatus -> PlaybackStatus -> Bool # | |
newtype AudioConfig Source #
Backend configuration needed to start an AudioEngine.
Currently just the SoundFont (.sf2) file FluidSynth should load.
Constructors
| AudioConfig | |
Fields | |
Instances
| Show AudioConfig Source # | |
Defined in Termtab.Audio.Types Methods showsPrec :: Int -> AudioConfig -> ShowS # show :: AudioConfig -> String # showList :: [AudioConfig] -> ShowS # | |
| Eq AudioConfig Source # | |
Defined in Termtab.Audio.Types | |
data BackendType Source #
Which synthesis backend to use. See startAudioEngine —
only BackendFluidSynth is currently implemented.
Constructors
| BackendFluidSynth | |
| BackendPortMidi |
Instances
| Show BackendType Source # | |
Defined in Termtab.Audio.Types Methods showsPrec :: Int -> BackendType -> ShowS # show :: BackendType -> String # showList :: [BackendType] -> ShowS # | |
| Eq BackendType Source # | |
Defined in Termtab.Audio.Types | |