termtab-0.1.0.0: TUI guitar tablature and score editor
Safe HaskellNone
LanguageGHC2021

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

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.

Instances

Instances details
Show AudioCommand Source # 
Instance details

Defined in Termtab.Audio.Types

Eq AudioCommand Source # 
Instance details

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.

Constructors

Playing 
Paused 
Stopped 

Instances

Instances details
Show PlaybackStatus Source # 
Instance details

Defined in Termtab.Audio.Types

Eq PlaybackStatus Source # 
Instance details

Defined in Termtab.Audio.Types

newtype AudioConfig Source #

Backend configuration needed to start an AudioEngine. Currently just the SoundFont (.sf2) file FluidSynth should load.

Constructors

AudioConfig 

Instances

Instances details
Show AudioConfig Source # 
Instance details

Defined in Termtab.Audio.Types

Eq AudioConfig Source # 
Instance details

Defined in Termtab.Audio.Types

data BackendType Source #

Which synthesis backend to use. See startAudioEngine — only BackendFluidSynth is currently implemented.

Instances

Instances details
Show BackendType Source # 
Instance details

Defined in Termtab.Audio.Types

Eq BackendType Source # 
Instance details

Defined in Termtab.Audio.Types