Documentation ¶
Overview ¶
Packate tracker implements the audio.Tracker interface and can be used to record changes in the state of the TIA audio.
Also contains functions that can convert register values into meaningful descriptions.
Index ¶
Constants ¶
const ( Noise = MusicalNote("*") Silence = "-" Low = "L" )
Preset values that the MusicalNote can be. Other values should be musical notation. eg. "C4, D#4", etc.
const NoPianoKey = 0
NoPianoKey is pressed.
Variables ¶
This section is empty.
Functions ¶
func LookupDistortion ¶
LookupDistortion converts the control register value into a text description.
Descriptions taken from Random Terrain's "The Atari 2600 Music and Sound Page"
https://www.randomterrain.com/atari-2600-memories-music-and-sound.html
Types ¶
type Emulation ¶ added in v0.19.3
type Emulation interface { State() govern.State TV() *television.Television }
Emulation defines as much of the emulation we require access to.
type Entry ¶
type Entry struct { Coords coords.TelevisionCoords Channel int Registers audio.Registers Distortion string MusicalNote MusicalNote PianoKey PianoKey }
type MusicalNote ¶
type MusicalNote string
MusicalNote defines the musical note (C#, D, D#, etc.) of an TIA audio channel register group.
func LookupMusicalNote ¶
func LookupMusicalNote(tv *television.Television, reg audio.Registers) MusicalNote
LookupMusicalNote converts the current register values for a channel into a musical note.
Descriptions taken from Random Terrain's "The Atari 2600 Music and Sound Page"
https://www.randomterrain.com/atari-2600-memories-music-and-sound.html
type PianoKey ¶
type PianoKey int
PianoKey is the key number on a piano keyboard.
func NoteToPianoKey ¶
func NoteToPianoKey(note MusicalNote) PianoKey
NoteToPianoKey converts the musical note to the corresponding piano key.
Handle sharps but not flats.
type Tracker ¶
type Tracker struct {
// contains filtered or unexported fields
}
Tracker implements the audio.Tracker interface and keeps a history of the audio registers over time.
func NewTracker ¶
NewTracker is the preferred method of initialisation for the Tracker type.