stagelinq

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 17 Imported by: 2

README

StagelinQ for Golang

Go Reference

This library implements Denon's StagelinQ protocol, allowing any Go application to talk to devices that are compatible with this protocol on the network.

An example application is provided that, if running successfully, will output information like this:

Screenshot of the example CLI

Features

  • Automatically discover StagelinQ-compatible devices on the network
  • Access state map information such as currently playing track metadata, fader values, etc.
  • Access live beat stream information such as current beat, total beats, bpm, and timeline position.

Stability

The code of this project is an experimental reverse-engineering effort and therefore can behave erratically in untested cases. Currently, this code only has been practically tested with the Denon Prime 4.

If you have any other Denon devices you would like to test this library against, please do! Even better, you can let me know if you run into any bugs by reporting them as an issue ticket.

Building

Please make sure you have a recent version of Go with module support enabled.

stagelinq-discover

You may install the stagelinq-discover example binary by one of two means:

  • git clone this repository and run go build -v ./cmd/stagelinq-discover to build the binary.
  • Run go install github.com/icedream/go-stagelinq/cmd/stagelinq-discover to install the binary to your $GOPATH.
beatinfo

You may install the beatinfo example binary by one of two means:

  • git clone this repository and run go build -v ./cmd/beatinfo to build the binary.
  • Run go install github.com/icedream/go-stagelinq/cmd/beatinfo to install the binary to your $GOPATH.

Usage

To use this library, import "github.com/icedream/go-stagelinq" in your Go project. This will give you access to the stagelinq library namespace.

Go code documentation is available.

Testing

This project uses Go tests, they can be run with this command:

go test ./...

License

This code is licensed under the MIT license. For more information, please read LICENSE.

Documentation

Index

Constants

View Source
const (
	ClientLibrarianDevicesControllerCurrentDevice         = "/Client/Librarian/DevicesController/CurrentDevice"
	ClientLibrarianDevicesControllerHasSDCardConnected    = "/Client/Librarian/DevicesController/HasSDCardConnected"
	ClientLibrarianDevicesControllerHasUsbDeviceConnected = "/Client/Librarian/DevicesController/HasUsbDeviceConnected"
	ClientPreferencesLayerA                               = "/Client/Preferences/LayerA"
	ClientPreferencesLayerB                               = "/Client/Preferences/LayerB"
	ClientPreferencesPlayer                               = "/Client/Preferences/Player"
	ClientPreferencesPlayerJogColorA                      = "/Client/Preferences/PlayerJogColorA"
	ClientPreferencesPlayerJogColorB                      = "/Client/Preferences/PlayerJogColorB"
	ClientPreferencesProfileApplicationPlayerColor1       = "/Client/Preferences/Profile/Application/PlayerColor1"
	ClientPreferencesProfileApplicationPlayerColor1A      = "/Client/Preferences/Profile/Application/PlayerColor1A"
	ClientPreferencesProfileApplicationPlayerColor1B      = "/Client/Preferences/Profile/Application/PlayerColor1B"
	ClientPreferencesProfileApplicationPlayerColor2       = "/Client/Preferences/Profile/Application/PlayerColor2"
	ClientPreferencesProfileApplicationPlayerColor2A      = "/Client/Preferences/Profile/Application/PlayerColor2A"
	ClientPreferencesProfileApplicationPlayerColor2B      = "/Client/Preferences/Profile/Application/PlayerColor2B"
	ClientPreferencesProfileApplicationPlayerColor3       = "/Client/Preferences/Profile/Application/PlayerColor3"
	ClientPreferencesProfileApplicationPlayerColor3A      = "/Client/Preferences/Profile/Application/PlayerColor3A"
	ClientPreferencesProfileApplicationPlayerColor3B      = "/Client/Preferences/Profile/Application/PlayerColor3B"
	ClientPreferencesProfileApplicationPlayerColor4       = "/Client/Preferences/Profile/Application/PlayerColor4"
	ClientPreferencesProfileApplicationPlayerColor4A      = "/Client/Preferences/Profile/Application/PlayerColor4A"
	ClientPreferencesProfileApplicationPlayerColor4B      = "/Client/Preferences/Profile/Application/PlayerColor4B"
	ClientPreferencesProfileApplicationSyncMode           = "/Client/Preferences/Profile/Application/SyncMode"
	EngineDeckCount                                       = "/Engine/DeckCount"
	EngineMasterMasterTempo                               = "/Engine/Master/MasterTempo"
	EngineSyncNetworkMasterStatus                         = "/Engine/Sync/Network/MasterStatus"
	GUIDecksDeckActiveDeck                                = "/GUI/Decks/Deck/ActiveDeck"
	GUIViewLayerLayerB                                    = "/GUI/ViewLayer/LayerB"
	MixerCH1faderPosition                                 = "/Mixer/CH1faderPosition"
	MixerCH2faderPosition                                 = "/Mixer/CH2faderPosition"
	MixerCH3faderPosition                                 = "/Mixer/CH3faderPosition"
	MixerCH4faderPosition                                 = "/Mixer/CH4faderPosition"
	MixerChannelAssignment1                               = "/Mixer/ChannelAssignment1"
	MixerChannelAssignment2                               = "/Mixer/ChannelAssignment2"
	MixerChannelAssignment3                               = "/Mixer/ChannelAssignment3"
	MixerChannelAssignment4                               = "/Mixer/ChannelAssignment4"
	MixerCrossfaderPosition                               = "/Mixer/CrossfaderPosition"
	MixerNumberOfChannels                                 = "/Mixer/NumberOfChannels"
)

Variables

View Source
var (
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.CurrentBPM] method instead.
	EngineDeck1CurrentBPM = EngineDeck1.CurrentBPM()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.DeckIsMaster] method instead.
	EngineDeck1DeckIsMaster = EngineDeck1.DeckIsMaster()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.ExternalMixerVolume] method instead.
	EngineDeck1ExternalMixerVolume = EngineDeck1.ExternalMixerVolume()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.ExternalScratchWheelTouch] method instead.
	EngineDeck1ExternalScratchWheelTouch = EngineDeck1.ExternalScratchWheelTouch()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.PadsView] method instead.
	EngineDeck1PadsView = EngineDeck1.PadsView()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.Play] method instead.
	EngineDeck1Play = EngineDeck1.Play()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.PlayState] method instead.
	EngineDeck1PlayState = EngineDeck1.PlayState()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.PlayStatePath] method instead.
	EngineDeck1PlayStatePath = EngineDeck1.PlayStatePath()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.Speed] method instead.
	EngineDeck1Speed = EngineDeck1.Speed()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.SpeedNeutral] method instead.
	EngineDeck1SpeedNeutral = EngineDeck1.SpeedNeutral()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.SpeedOffsetDown] method instead.
	EngineDeck1SpeedOffsetDown = EngineDeck1.SpeedOffsetDown()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.SpeedOffsetUp] method instead.
	EngineDeck1SpeedOffsetUp = EngineDeck1.SpeedOffsetUp()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.SpeedRange] method instead.
	EngineDeck1SpeedRange = EngineDeck1.SpeedRange()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.SpeedState] method instead.
	EngineDeck1SpeedState = EngineDeck1.SpeedState()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.SyncMode] method instead.
	EngineDeck1SyncMode = EngineDeck1.SyncMode()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackArtistName] method instead.
	EngineDeck1TrackArtistName = EngineDeck1.TrackArtistName()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackBleep] method instead.
	EngineDeck1TrackBleep = EngineDeck1.TrackBleep()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackCuePosition] method instead.
	EngineDeck1TrackCuePosition = EngineDeck1.TrackCuePosition()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackCurrentBPM] method instead.
	EngineDeck1TrackCurrentBPM = EngineDeck1.TrackCurrentBPM()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackCurrentKeyIndex] method instead.
	EngineDeck1TrackCurrentKeyIndex = EngineDeck1.TrackCurrentKeyIndex()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackCurrentLoopInPosition] method instead.
	EngineDeck1TrackCurrentLoopInPosition = EngineDeck1.TrackCurrentLoopInPosition()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackCurrentLoopOutPosition] method instead.
	EngineDeck1TrackCurrentLoopOutPosition = EngineDeck1.TrackCurrentLoopOutPosition()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackCurrentLoopSizeInBeats] method instead.
	EngineDeck1TrackCurrentLoopSizeInBeats = EngineDeck1.TrackCurrentLoopSizeInBeats()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackKeyLock] method instead.
	EngineDeck1TrackKeyLock = EngineDeck1.TrackKeyLock()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackLoopEnableState] method instead.
	EngineDeck1TrackLoopEnableState = EngineDeck1.TrackLoopEnableState()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackLoopQuickLoop1] method instead.
	EngineDeck1TrackLoopQuickLoop1 = EngineDeck1.TrackLoopQuickLoop1()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackLoopQuickLoop2] method instead.
	EngineDeck1TrackLoopQuickLoop2 = EngineDeck1.TrackLoopQuickLoop2()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackLoopQuickLoop3] method instead.
	EngineDeck1TrackLoopQuickLoop3 = EngineDeck1.TrackLoopQuickLoop3()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackLoopQuickLoop4] method instead.
	EngineDeck1TrackLoopQuickLoop4 = EngineDeck1.TrackLoopQuickLoop4()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackLoopQuickLoop5] method instead.
	EngineDeck1TrackLoopQuickLoop5 = EngineDeck1.TrackLoopQuickLoop5()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackLoopQuickLoop6] method instead.
	EngineDeck1TrackLoopQuickLoop6 = EngineDeck1.TrackLoopQuickLoop6()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackLoopQuickLoop7] method instead.
	EngineDeck1TrackLoopQuickLoop7 = EngineDeck1.TrackLoopQuickLoop7()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackLoopQuickLoop8] method instead.
	EngineDeck1TrackLoopQuickLoop8 = EngineDeck1.TrackLoopQuickLoop8()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackPlayPauseLEDState] method instead.
	EngineDeck1TrackPlayPauseLEDState = EngineDeck1.TrackPlayPauseLEDState()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackSampleRate] method instead.
	EngineDeck1TrackSampleRate = EngineDeck1.TrackSampleRate()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackSongAnalyzed] method instead.
	EngineDeck1TrackSongAnalyzed = EngineDeck1.TrackSongAnalyzed()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackSongLoaded] method instead.
	EngineDeck1TrackSongLoaded = EngineDeck1.TrackSongLoaded()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackSongName] method instead.
	EngineDeck1TrackSongName = EngineDeck1.TrackSongName()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackSoundSwitchGuid] method instead.
	EngineDeck1TrackSoundSwitchGUID = EngineDeck1.TrackSoundSwitchGuid()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackTrackBytes] method instead.
	EngineDeck1TrackTrackBytes = EngineDeck1.TrackTrackBytes()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackTrackData] method instead.
	EngineDeck1TrackTrackData = EngineDeck1.TrackTrackData()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackTrackLength] method instead.
	EngineDeck1TrackTrackLength = EngineDeck1.TrackTrackLength()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackTrackName] method instead.
	EngineDeck1TrackTrackName = EngineDeck1.TrackTrackName()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackTrackNetworkPath] method instead.
	EngineDeck1TrackTrackNetworkPath = EngineDeck1.TrackTrackNetworkPath()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackTrackUri] method instead.
	EngineDeck1TrackTrackURI = EngineDeck1.TrackTrackUri()
	// Deprecated: Use [EngineDeck1] and its [DeckValueNames.TrackTrackWasPlayed] method instead.
	EngineDeck1TrackTrackWasPlayed = EngineDeck1.TrackTrackWasPlayed()
)

Deck 1 legacy variables

Deprecated: Use values from EngineDeck1 instead.

View Source
var (
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.CurrentBPM] method instead.
	EngineDeck2CurrentBPM = EngineDeck2.CurrentBPM()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.DeckIsMaster] method instead.
	EngineDeck2DeckIsMaster = EngineDeck2.DeckIsMaster()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.ExternalMixerVolume] method instead.
	EngineDeck2ExternalMixerVolume = EngineDeck2.ExternalMixerVolume()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.ExternalScratchWheelTouch] method instead.
	EngineDeck2ExternalScratchWheelTouch = EngineDeck2.ExternalScratchWheelTouch()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.PadsView] method instead.
	EngineDeck2PadsView = EngineDeck2.PadsView()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.Play] method instead.
	EngineDeck2Play = EngineDeck2.Play()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.PlayState] method instead.
	EngineDeck2PlayState = EngineDeck2.PlayState()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.PlayStatePath] method instead.
	EngineDeck2PlayStatePath = EngineDeck2.PlayStatePath()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.Speed] method instead.
	EngineDeck2Speed = EngineDeck2.Speed()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.SpeedNeutral] method instead.
	EngineDeck2SpeedNeutral = EngineDeck2.SpeedNeutral()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.SpeedOffsetDown] method instead.
	EngineDeck2SpeedOffsetDown = EngineDeck2.SpeedOffsetDown()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.SpeedOffsetUp] method instead.
	EngineDeck2SpeedOffsetUp = EngineDeck2.SpeedOffsetUp()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.SpeedRange] method instead.
	EngineDeck2SpeedRange = EngineDeck2.SpeedRange()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.SpeedState] method instead.
	EngineDeck2SpeedState = EngineDeck2.SpeedState()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.SyncMode] method instead.
	EngineDeck2SyncMode = EngineDeck2.SyncMode()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackArtistName] method instead.
	EngineDeck2TrackArtistName = EngineDeck2.TrackArtistName()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackBleep] method instead.
	EngineDeck2TrackBleep = EngineDeck2.TrackBleep()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackCuePosition] method instead.
	EngineDeck2TrackCuePosition = EngineDeck2.TrackCuePosition()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackCurrentBPM] method instead.
	EngineDeck2TrackCurrentBPM = EngineDeck2.TrackCurrentBPM()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackCurrentKeyIndex] method instead.
	EngineDeck2TrackCurrentKeyIndex = EngineDeck2.TrackCurrentKeyIndex()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackCurrentLoopInPosition] method instead.
	EngineDeck2TrackCurrentLoopInPosition = EngineDeck2.TrackCurrentLoopInPosition()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackCurrentLoopOutPosition] method instead.
	EngineDeck2TrackCurrentLoopOutPosition = EngineDeck2.TrackCurrentLoopOutPosition()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackCurrentLoopSizeInBeats] method instead.
	EngineDeck2TrackCurrentLoopSizeInBeats = EngineDeck2.TrackCurrentLoopSizeInBeats()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackKeyLock] method instead.
	EngineDeck2TrackKeyLock = EngineDeck2.TrackKeyLock()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackLoopEnableState] method instead.
	EngineDeck2TrackLoopEnableState = EngineDeck2.TrackLoopEnableState()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackLoopQuickLoop1] method instead.
	EngineDeck2TrackLoopQuickLoop1 = EngineDeck2.TrackLoopQuickLoop1()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackLoopQuickLoop2] method instead.
	EngineDeck2TrackLoopQuickLoop2 = EngineDeck2.TrackLoopQuickLoop2()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackLoopQuickLoop3] method instead.
	EngineDeck2TrackLoopQuickLoop3 = EngineDeck2.TrackLoopQuickLoop3()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackLoopQuickLoop4] method instead.
	EngineDeck2TrackLoopQuickLoop4 = EngineDeck2.TrackLoopQuickLoop4()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackLoopQuickLoop5] method instead.
	EngineDeck2TrackLoopQuickLoop5 = EngineDeck2.TrackLoopQuickLoop5()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackLoopQuickLoop6] method instead.
	EngineDeck2TrackLoopQuickLoop6 = EngineDeck2.TrackLoopQuickLoop6()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackLoopQuickLoop7] method instead.
	EngineDeck2TrackLoopQuickLoop7 = EngineDeck2.TrackLoopQuickLoop7()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackLoopQuickLoop8] method instead.
	EngineDeck2TrackLoopQuickLoop8 = EngineDeck2.TrackLoopQuickLoop8()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackPlayPauseLEDState] method instead.
	EngineDeck2TrackPlayPauseLEDState = EngineDeck2.TrackPlayPauseLEDState()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackSampleRate] method instead.
	EngineDeck2TrackSampleRate = EngineDeck2.TrackSampleRate()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackSongAnalyzed] method instead.
	EngineDeck2TrackSongAnalyzed = EngineDeck2.TrackSongAnalyzed()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackSongLoaded] method instead.
	EngineDeck2TrackSongLoaded = EngineDeck2.TrackSongLoaded()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackSongName] method instead.
	EngineDeck2TrackSongName = EngineDeck2.TrackSongName()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackSoundSwitchGuid] method instead.
	EngineDeck2TrackSoundSwitchGUID = EngineDeck2.TrackSoundSwitchGuid()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackTrackBytes] method instead.
	EngineDeck2TrackTrackBytes = EngineDeck2.TrackTrackBytes()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackTrackData] method instead.
	EngineDeck2TrackTrackData = EngineDeck2.TrackTrackData()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackTrackLength] method instead.
	EngineDeck2TrackTrackLength = EngineDeck2.TrackTrackLength()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackTrackName] method instead.
	EngineDeck2TrackTrackName = EngineDeck2.TrackTrackName()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackTrackNetworkPath] method instead.
	EngineDeck2TrackTrackNetworkPath = EngineDeck2.TrackTrackNetworkPath()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackTrackUri] method instead.
	EngineDeck2TrackTrackURI = EngineDeck2.TrackTrackUri()
	// Deprecated: Use [EngineDeck2] and its [DeckValueNames.TrackTrackWasPlayed] method instead.
	EngineDeck2TrackTrackWasPlayed = EngineDeck2.TrackTrackWasPlayed()
)

Deck 2 legacy variables

Deprecated: Use values from EngineDeck2 instead.

View Source
var (
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.CurrentBPM] method instead.
	EngineDeck3CurrentBPM = EngineDeck3.CurrentBPM()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.DeckIsMaster] method instead.
	EngineDeck3DeckIsMaster = EngineDeck3.DeckIsMaster()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.ExternalMixerVolume] method instead.
	EngineDeck3ExternalMixerVolume = EngineDeck3.ExternalMixerVolume()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.ExternalScratchWheelTouch] method instead.
	EngineDeck3ExternalScratchWheelTouch = EngineDeck3.ExternalScratchWheelTouch()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.PadsView] method instead.
	EngineDeck3PadsView = EngineDeck3.PadsView()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.Play] method instead.
	EngineDeck3Play = EngineDeck3.Play()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.PlayState] method instead.
	EngineDeck3PlayState = EngineDeck3.PlayState()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.PlayStatePath] method instead.
	EngineDeck3PlayStatePath = EngineDeck3.PlayStatePath()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.Speed] method instead.
	EngineDeck3Speed = EngineDeck3.Speed()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.SpeedNeutral] method instead.
	EngineDeck3SpeedNeutral = EngineDeck3.SpeedNeutral()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.SpeedOffsetDown] method instead.
	EngineDeck3SpeedOffsetDown = EngineDeck3.SpeedOffsetDown()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.SpeedOffsetUp] method instead.
	EngineDeck3SpeedOffsetUp = EngineDeck3.SpeedOffsetUp()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.SpeedRange] method instead.
	EngineDeck3SpeedRange = EngineDeck3.SpeedRange()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.SpeedState] method instead.
	EngineDeck3SpeedState = EngineDeck3.SpeedState()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.SyncMode] method instead.
	EngineDeck3SyncMode = EngineDeck3.SyncMode()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackArtistName] method instead.
	EngineDeck3TrackArtistName = EngineDeck3.TrackArtistName()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackBleep] method instead.
	EngineDeck3TrackBleep = EngineDeck3.TrackBleep()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackCuePosition] method instead.
	EngineDeck3TrackCuePosition = EngineDeck3.TrackCuePosition()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackCurrentBPM] method instead.
	EngineDeck3TrackCurrentBPM = EngineDeck3.TrackCurrentBPM()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackCurrentKeyIndex] method instead.
	EngineDeck3TrackCurrentKeyIndex = EngineDeck3.TrackCurrentKeyIndex()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackCurrentLoopInPosition] method instead.
	EngineDeck3TrackCurrentLoopInPosition = EngineDeck3.TrackCurrentLoopInPosition()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackCurrentLoopOutPosition] method instead.
	EngineDeck3TrackCurrentLoopOutPosition = EngineDeck3.TrackCurrentLoopOutPosition()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackCurrentLoopSizeInBeats] method instead.
	EngineDeck3TrackCurrentLoopSizeInBeats = EngineDeck3.TrackCurrentLoopSizeInBeats()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackKeyLock] method instead.
	EngineDeck3TrackKeyLock = EngineDeck3.TrackKeyLock()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackLoopEnableState] method instead.
	EngineDeck3TrackLoopEnableState = EngineDeck3.TrackLoopEnableState()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackLoopQuickLoop1] method instead.
	EngineDeck3TrackLoopQuickLoop1 = EngineDeck3.TrackLoopQuickLoop1()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackLoopQuickLoop2] method instead.
	EngineDeck3TrackLoopQuickLoop2 = EngineDeck3.TrackLoopQuickLoop2()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackLoopQuickLoop3] method instead.
	EngineDeck3TrackLoopQuickLoop3 = EngineDeck3.TrackLoopQuickLoop3()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackLoopQuickLoop4] method instead.
	EngineDeck3TrackLoopQuickLoop4 = EngineDeck3.TrackLoopQuickLoop4()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackLoopQuickLoop5] method instead.
	EngineDeck3TrackLoopQuickLoop5 = EngineDeck3.TrackLoopQuickLoop5()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackLoopQuickLoop6] method instead.
	EngineDeck3TrackLoopQuickLoop6 = EngineDeck3.TrackLoopQuickLoop6()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackLoopQuickLoop7] method instead.
	EngineDeck3TrackLoopQuickLoop7 = EngineDeck3.TrackLoopQuickLoop7()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackLoopQuickLoop8] method instead.
	EngineDeck3TrackLoopQuickLoop8 = EngineDeck3.TrackLoopQuickLoop8()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackPlayPauseLEDState] method instead.
	EngineDeck3TrackPlayPauseLEDState = EngineDeck3.TrackPlayPauseLEDState()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackSampleRate] method instead.
	EngineDeck3TrackSampleRate = EngineDeck3.TrackSampleRate()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackSongAnalyzed] method instead.
	EngineDeck3TrackSongAnalyzed = EngineDeck3.TrackSongAnalyzed()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackSongLoaded] method instead.
	EngineDeck3TrackSongLoaded = EngineDeck3.TrackSongLoaded()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackSongName] method instead.
	EngineDeck3TrackSongName = EngineDeck3.TrackSongName()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackSoundSwitchGuid] method instead.
	EngineDeck3TrackSoundSwitchGUID = EngineDeck3.TrackSoundSwitchGuid()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackTrackBytes] method instead.
	EngineDeck3TrackTrackBytes = EngineDeck3.TrackTrackBytes()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackTrackData] method instead.
	EngineDeck3TrackTrackData = EngineDeck3.TrackTrackData()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackTrackLength] method instead.
	EngineDeck3TrackTrackLength = EngineDeck3.TrackTrackLength()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackTrackName] method instead.
	EngineDeck3TrackTrackName = EngineDeck3.TrackTrackName()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackTrackNetworkPath] method instead.
	EngineDeck3TrackTrackNetworkPath = EngineDeck3.TrackTrackNetworkPath()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackTrackUri] method instead.
	EngineDeck3TrackTrackURI = EngineDeck3.TrackTrackUri()
	// Deprecated: Use [EngineDeck3] and its [DeckValueNames.TrackTrackWasPlayed] method instead.
	EngineDeck3TrackTrackWasPlayed = EngineDeck3.TrackTrackWasPlayed()
)

Deck 3 legacy variables

Deprecated: Use values from EngineDeck3 instead.

View Source
var (
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.CurrentBPM] method instead.
	EngineDeck4CurrentBPM = EngineDeck4.CurrentBPM()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.DeckIsMaster] method instead.
	EngineDeck4DeckIsMaster = EngineDeck4.DeckIsMaster()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.ExternalMixerVolume] method instead.
	EngineDeck4ExternalMixerVolume = EngineDeck4.ExternalMixerVolume()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.ExternalScratchWheelTouch] method instead.
	EngineDeck4ExternalScratchWheelTouch = EngineDeck4.ExternalScratchWheelTouch()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.PadsView] method instead.
	EngineDeck4PadsView = EngineDeck4.PadsView()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.Play] method instead.
	EngineDeck4Play = EngineDeck4.Play()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.PlayState] method instead.
	EngineDeck4PlayState = EngineDeck4.PlayState()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.PlayStatePath] method instead.
	EngineDeck4PlayStatePath = EngineDeck4.PlayStatePath()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.Speed] method instead.
	EngineDeck4Speed = EngineDeck4.Speed()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.SpeedNeutral] method instead.
	EngineDeck4SpeedNeutral = EngineDeck4.SpeedNeutral()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.SpeedOffsetDown] method instead.
	EngineDeck4SpeedOffsetDown = EngineDeck4.SpeedOffsetDown()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.SpeedOffsetUp] method instead.
	EngineDeck4SpeedOffsetUp = EngineDeck4.SpeedOffsetUp()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.SpeedRange] method instead.
	EngineDeck4SpeedRange = EngineDeck4.SpeedRange()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.SpeedState] method instead.
	EngineDeck4SpeedState = EngineDeck4.SpeedState()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.SyncMode] method instead.
	EngineDeck4SyncMode = EngineDeck4.SyncMode()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackArtistName] method instead.
	EngineDeck4TrackArtistName = EngineDeck4.TrackArtistName()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackBleep] method instead.
	EngineDeck4TrackBleep = EngineDeck4.TrackBleep()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackCuePosition] method instead.
	EngineDeck4TrackCuePosition = EngineDeck4.TrackCuePosition()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackCurrentBPM] method instead.
	EngineDeck4TrackCurrentBPM = EngineDeck4.TrackCurrentBPM()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackCurrentKeyIndex] method instead.
	EngineDeck4TrackCurrentKeyIndex = EngineDeck4.TrackCurrentKeyIndex()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackCurrentLoopInPosition] method instead.
	EngineDeck4TrackCurrentLoopInPosition = EngineDeck4.TrackCurrentLoopInPosition()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackCurrentLoopOutPosition] method instead.
	EngineDeck4TrackCurrentLoopOutPosition = EngineDeck4.TrackCurrentLoopOutPosition()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackCurrentLoopSizeInBeats] method instead.
	EngineDeck4TrackCurrentLoopSizeInBeats = EngineDeck4.TrackCurrentLoopSizeInBeats()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackKeyLock] method instead.
	EngineDeck4TrackKeyLock = EngineDeck4.TrackKeyLock()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackLoopEnableState] method instead.
	EngineDeck4TrackLoopEnableState = EngineDeck4.TrackLoopEnableState()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackLoopQuickLoop1] method instead.
	EngineDeck4TrackLoopQuickLoop1 = EngineDeck4.TrackLoopQuickLoop1()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackLoopQuickLoop2] method instead.
	EngineDeck4TrackLoopQuickLoop2 = EngineDeck4.TrackLoopQuickLoop2()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackLoopQuickLoop3] method instead.
	EngineDeck4TrackLoopQuickLoop3 = EngineDeck4.TrackLoopQuickLoop3()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackLoopQuickLoop4] method instead.
	EngineDeck4TrackLoopQuickLoop4 = EngineDeck4.TrackLoopQuickLoop4()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackLoopQuickLoop5] method instead.
	EngineDeck4TrackLoopQuickLoop5 = EngineDeck4.TrackLoopQuickLoop5()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackLoopQuickLoop6] method instead.
	EngineDeck4TrackLoopQuickLoop6 = EngineDeck4.TrackLoopQuickLoop6()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackLoopQuickLoop7] method instead.
	EngineDeck4TrackLoopQuickLoop7 = EngineDeck4.TrackLoopQuickLoop7()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackLoopQuickLoop8] method instead.
	EngineDeck4TrackLoopQuickLoop8 = EngineDeck4.TrackLoopQuickLoop8()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackPlayPauseLEDState] method instead.
	EngineDeck4TrackPlayPauseLEDState = EngineDeck4.TrackPlayPauseLEDState()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackSampleRate] method instead.
	EngineDeck4TrackSampleRate = EngineDeck4.TrackSampleRate()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackSongAnalyzed] method instead.
	EngineDeck4TrackSongAnalyzed = EngineDeck4.TrackSongAnalyzed()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackSongLoaded] method instead.
	EngineDeck4TrackSongLoaded = EngineDeck4.TrackSongLoaded()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackSongName] method instead.
	EngineDeck4TrackSongName = EngineDeck4.TrackSongName()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackSoundSwitchGuid] method instead.
	EngineDeck4TrackSoundSwitchGUID = EngineDeck4.TrackSoundSwitchGuid()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackTrackBytes] method instead.
	EngineDeck4TrackTrackBytes = EngineDeck4.TrackTrackBytes()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackTrackData] method instead.
	EngineDeck4TrackTrackData = EngineDeck4.TrackTrackData()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackTrackLength] method instead.
	EngineDeck4TrackTrackLength = EngineDeck4.TrackTrackLength()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackTrackName] method instead.
	EngineDeck4TrackTrackName = EngineDeck4.TrackTrackName()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackTrackNetworkPath] method instead.
	EngineDeck4TrackTrackNetworkPath = EngineDeck4.TrackTrackNetworkPath()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackTrackUri] method instead.
	EngineDeck4TrackTrackURI = EngineDeck4.TrackTrackUri()
	// Deprecated: Use [EngineDeck4] and its [DeckValueNames.TrackTrackWasPlayed] method instead.
	EngineDeck4TrackTrackWasPlayed = EngineDeck4.TrackTrackWasPlayed()
)

Deck 4 legacy variables

Deprecated: Use values from EngineDeck4 instead.

View Source
var (
	EngineDeck1 = DeckValueNames{DeckIndex: 1}
	EngineDeck2 = DeckValueNames{DeckIndex: 2}
	EngineDeck3 = DeckValueNames{DeckIndex: 3}
	EngineDeck4 = DeckValueNames{DeckIndex: 4}
)
View Source
var ErrInvalidDiscovererActionReceived = errors.New("invalid discoverer action received")

ErrInvalidDiscovererActionReceived is returned by Listener.Discover if a valid StagelinQ discovery message has been received by another device but it is reporting neither that it is leaving nor joining the network. This would indicate another application trying to speak via the StagelinQ protocol but it is sending invalid data. You can check the returned device object for the source address of the bad message.

View Source
var ErrInvalidMessageReceived = errors.New("invalid message received")

ErrInvalidMessageReceived is returned by Listener.Discover if a message has been received but it is not a StagelinQ message. This would indicate another application using UDP port 51337 on the network for broadcasts.

View Source
var ErrTooShortDiscoveryMessageReceived = errors.New("too short discovery message received")

ErrTooShortDiscoveryMessageReceived is returned by Listener.Discover if a too short message has been received on the StagelinQ discovery port. This would indicate another application using UDP port 51337 on the network for broadcasts.

Functions

This section is empty.

Types

type BeatInfo added in v1.0.0

type BeatInfo struct {
	Clock     uint64
	Players   []PlayerInfo
	Timelines []float64
}

BeatInfo represents a received BeatInfo message.

type BeatInfoConnection added in v1.0.0

type BeatInfoConnection struct {
	// contains filtered or unexported fields
}

BeatInfoConnection provides functionality to communicate with the BeatInfo data source.

func NewBeatInfoConnection added in v1.0.0

func NewBeatInfoConnection(conn net.Conn, token Token) (bic *BeatInfoConnection, err error)

func (*BeatInfoConnection) BeatInfoC added in v1.0.0

func (bic *BeatInfoConnection) BeatInfoC() <-chan *BeatInfo

BeatInfoC returns the channel via which the BeatInfo data stream will be published for this connection.

func (*BeatInfoConnection) ErrorC added in v1.0.0

func (bic *BeatInfoConnection) ErrorC() <-chan error

ErrorC returns the channel via which connection errors will be returned for this connection.

func (*BeatInfoConnection) StartStream added in v1.0.0

func (bic *BeatInfoConnection) StartStream() error

StartStream tells the StagelinQ device to start publishing the device BeatInfo data stream.

func (*BeatInfoConnection) StopStream added in v1.0.0

func (bic *BeatInfoConnection) StopStream() error

StopStream tells the StagelinQ device to stop publishing the device BeatInfo data stream.

type DeckValueNames added in v1.0.0

type DeckValueNames struct {
	DeckIndex int
}

func (*DeckValueNames) CurrentBPM added in v1.0.0

func (n *DeckValueNames) CurrentBPM() string

func (*DeckValueNames) DeckIsMaster added in v1.0.0

func (n *DeckValueNames) DeckIsMaster() string

func (*DeckValueNames) ExternalMixerVolume added in v1.0.0

func (n *DeckValueNames) ExternalMixerVolume() string

func (*DeckValueNames) ExternalScratchWheelTouch added in v1.0.0

func (n *DeckValueNames) ExternalScratchWheelTouch() string

func (*DeckValueNames) PadsView added in v1.0.0

func (n *DeckValueNames) PadsView() string

func (*DeckValueNames) Play added in v1.0.0

func (n *DeckValueNames) Play() string

func (*DeckValueNames) PlayState added in v1.0.0

func (n *DeckValueNames) PlayState() string

func (*DeckValueNames) PlayStatePath added in v1.0.0

func (n *DeckValueNames) PlayStatePath() string

func (*DeckValueNames) Speed added in v1.0.0

func (n *DeckValueNames) Speed() string

func (*DeckValueNames) SpeedNeutral added in v1.0.0

func (n *DeckValueNames) SpeedNeutral() string

func (*DeckValueNames) SpeedOffsetDown added in v1.0.0

func (n *DeckValueNames) SpeedOffsetDown() string

func (*DeckValueNames) SpeedOffsetUp added in v1.0.0

func (n *DeckValueNames) SpeedOffsetUp() string

func (*DeckValueNames) SpeedRange added in v1.0.0

func (n *DeckValueNames) SpeedRange() string

func (*DeckValueNames) SpeedState added in v1.0.0

func (n *DeckValueNames) SpeedState() string

func (*DeckValueNames) SyncMode added in v1.0.0

func (n *DeckValueNames) SyncMode() string

func (*DeckValueNames) TrackArtistName added in v1.0.0

func (n *DeckValueNames) TrackArtistName() string

func (*DeckValueNames) TrackBleep added in v1.0.0

func (n *DeckValueNames) TrackBleep() string

func (*DeckValueNames) TrackCuePosition added in v1.0.0

func (n *DeckValueNames) TrackCuePosition() string

func (*DeckValueNames) TrackCurrentBPM added in v1.0.0

func (n *DeckValueNames) TrackCurrentBPM() string

func (*DeckValueNames) TrackCurrentKeyIndex added in v1.0.0

func (n *DeckValueNames) TrackCurrentKeyIndex() string

func (*DeckValueNames) TrackCurrentLoopInPosition added in v1.0.0

func (n *DeckValueNames) TrackCurrentLoopInPosition() string

func (*DeckValueNames) TrackCurrentLoopOutPosition added in v1.0.0

func (n *DeckValueNames) TrackCurrentLoopOutPosition() string

func (*DeckValueNames) TrackCurrentLoopSizeInBeats added in v1.0.0

func (n *DeckValueNames) TrackCurrentLoopSizeInBeats() string

func (*DeckValueNames) TrackKeyLock added in v1.0.0

func (n *DeckValueNames) TrackKeyLock() string

func (*DeckValueNames) TrackLoopEnableState added in v1.0.0

func (n *DeckValueNames) TrackLoopEnableState() string

func (*DeckValueNames) TrackLoopQuickLoop1 added in v1.0.0

func (n *DeckValueNames) TrackLoopQuickLoop1() string

func (*DeckValueNames) TrackLoopQuickLoop2 added in v1.0.0

func (n *DeckValueNames) TrackLoopQuickLoop2() string

func (*DeckValueNames) TrackLoopQuickLoop3 added in v1.0.0

func (n *DeckValueNames) TrackLoopQuickLoop3() string

func (*DeckValueNames) TrackLoopQuickLoop4 added in v1.0.0

func (n *DeckValueNames) TrackLoopQuickLoop4() string

func (*DeckValueNames) TrackLoopQuickLoop5 added in v1.0.0

func (n *DeckValueNames) TrackLoopQuickLoop5() string

func (*DeckValueNames) TrackLoopQuickLoop6 added in v1.0.0

func (n *DeckValueNames) TrackLoopQuickLoop6() string

func (*DeckValueNames) TrackLoopQuickLoop7 added in v1.0.0

func (n *DeckValueNames) TrackLoopQuickLoop7() string

func (*DeckValueNames) TrackLoopQuickLoop8 added in v1.0.0

func (n *DeckValueNames) TrackLoopQuickLoop8() string

func (*DeckValueNames) TrackPlayPauseLEDState added in v1.0.0

func (n *DeckValueNames) TrackPlayPauseLEDState() string

func (*DeckValueNames) TrackSampleRate added in v1.0.0

func (n *DeckValueNames) TrackSampleRate() string

func (*DeckValueNames) TrackSongAnalyzed added in v1.0.0

func (n *DeckValueNames) TrackSongAnalyzed() string

func (*DeckValueNames) TrackSongLoaded added in v1.0.0

func (n *DeckValueNames) TrackSongLoaded() string

func (*DeckValueNames) TrackSongName added in v1.0.0

func (n *DeckValueNames) TrackSongName() string

func (*DeckValueNames) TrackSoundSwitchGuid added in v1.0.0

func (n *DeckValueNames) TrackSoundSwitchGuid() string

func (*DeckValueNames) TrackTrackBytes added in v1.0.0

func (n *DeckValueNames) TrackTrackBytes() string

func (*DeckValueNames) TrackTrackData added in v1.0.0

func (n *DeckValueNames) TrackTrackData() string

func (*DeckValueNames) TrackTrackLength added in v1.0.0

func (n *DeckValueNames) TrackTrackLength() string

func (*DeckValueNames) TrackTrackName added in v1.0.0

func (n *DeckValueNames) TrackTrackName() string

func (*DeckValueNames) TrackTrackNetworkPath added in v1.0.0

func (n *DeckValueNames) TrackTrackNetworkPath() string

func (*DeckValueNames) TrackTrackUri added in v1.0.0

func (n *DeckValueNames) TrackTrackUri() string

func (*DeckValueNames) TrackTrackWasPlayed added in v1.0.0

func (n *DeckValueNames) TrackTrackWasPlayed() string

type Device

type Device struct {
	IP              net.IP
	Name            string
	SoftwareName    string
	SoftwareVersion string
	// contains filtered or unexported fields
}

Device presents information about a discovered StagelinQ device on the network.

func (*Device) Connect

func (device *Device) Connect(token Token, offeredServices []*Service) (conn *MainConnection, err error)

Connect starts a new main connection with the device. You need to pass the StagelinQ token announced for your own device. You also need to pass services you want to provide; if you don't have any, pass an empty array.

func (*Device) Dial

func (device *Device) Dial(port uint16) (conn net.Conn, err error)

Dial starts a TCP connection with the device on the given port.

func (*Device) IsEqual

func (device *Device) IsEqual(anotherDevice *Device) bool

IsEqual checks if this device has the same address and values as the other given device.

type DeviceState

type DeviceState byte

DeviceState represents a device's state in the network. Possible values are DevicePresent and DeviceLeaving.

const (
	// DevicePresent indicates that a device is actively announcing itself to the network.
	DevicePresent DeviceState = iota

	// DeviceLeaving indicates that a device has announced that it is leaving the network. It will no longer send announcements after this.
	DeviceLeaving
)

type Listener

type Listener struct {
	// contains filtered or unexported fields
}

Listener listens on UDP port 51337 for StagelinQ devices and announces itself in the same way.

func Listen

func Listen() (listener *Listener, err error)

Listen sets up a StagelinQ listener.

func ListenWithConfiguration

func ListenWithConfiguration(listenerConfig *ListenerConfiguration) (listener *Listener, err error)

ListenWithConfiguration sets up a StagelinQ listener with the given configuration.

func (*Listener) Announce

func (l *Listener) Announce() error

Announce announces this StagelinQ listener to the network. This function should be called before actually listening in for devices to allow them to pick up our token for communication immediately.

func (*Listener) AnnounceEvery

func (l *Listener) AnnounceEvery(interval time.Duration)

AnnounceEvery will start a goroutine which calls the Announce function at given interval. It will automatically terminate once this listener is shut down. A recommended value for the interval is 1 second.

func (*Listener) Close

func (l *Listener) Close() error

Close shuts down the listener.

func (*Listener) Discover

func (l *Listener) Discover(timeout time.Duration) (device *Device, deviceState DeviceState, err error)

Discover listens for any StagelinQ devices announcing to the network. If no device is found within the given timeout or any non-StagelinQ message has been received, nil is returned for the device. If a device has been discovered before, the returned device object is not going to be the same as when the device was previously discovered. Use device.IsEqual for such comparison.

func (*Listener) Token

func (l *Listener) Token() Token

Token returns our token that is being announced to the StagelinQ network. Use this token for further communication with services on other devices.

func (*Listener) Unannounce

func (l *Listener) Unannounce() error

Unannounce announces this StagelinQ listener leaving from the network. Call this before closing the listener!

type ListenerConfiguration

type ListenerConfiguration struct {
	// Context can be set to allow cancellation of network operations from somewhere else in the code.
	Context context.Context

	// DiscoveryTimeout is the duration for which Listener.Discover will wait for StagelinQ devices to announce themselves.
	// If this is not set, no timeout will occur.
	DiscoveryTimeout time.Duration

	// Name is the name under which we announce ourselves to the network.
	// For example, Resolute uses the computer user name here, and Denon devices use their identifying abbreviation (the Prime 4 uses "prime4").
	Name string

	// SoftwareName is your application's name. It is used for StagelinQ announcements to the network.
	SoftwareName string

	// SoftwareVersion is your application's version. It is used for StagelinQ announcements to the network.
	SoftwareVersion string

	// Token is used as part of announcements and main data communication. It is currently recommended to leave this empty.
	Token Token
}

ListenerConfiguration contains configurable values for setting up a StagelinQ listener.

type MainConnection

type MainConnection struct {
	// contains filtered or unexported fields
}

MainConnection represents a connection to the main TCP port of a StagelinQ device.

func (*MainConnection) Close

func (conn *MainConnection) Close() (err error)

Close terminates the connection.

func (*MainConnection) RequestServices

func (conn *MainConnection) RequestServices() (retval []*Service, err error)

RequestServices asks the device to return other TCP ports it is listening on and which services it provides on them.

type PlayerInfo added in v1.0.0

type PlayerInfo struct {
	Beat       float64
	TotalBeats float64
	Bpm        float64
}

type Service

type Service struct {
	Name string
	Port uint16
}

Service contains information about a data service a device provides.

type State

type State struct {
	Name  string
	Value map[string]interface{}
}

State represents a received state value.

type StateMapConnection

type StateMapConnection struct {
	// contains filtered or unexported fields
}

StateMapConnection provides functionality to communicate with the StateMap data source.

func NewStateMapConnection

func NewStateMapConnection(conn net.Conn, token Token) (smc *StateMapConnection, err error)

NewStateMapConnection wraps an existing network connection and returns a StateMapConnection, providing the functionality to subscribe to and receive changes of state values. You need to pass the token that you have announced for your own device on the network.

func (*StateMapConnection) Emit added in v1.0.0

func (smc *StateMapConnection) Emit(state *State) error

func (*StateMapConnection) ErrorC

func (smc *StateMapConnection) ErrorC() <-chan error

ErrorC returns the channel via which connectionrerors will be returned for this connection.

func (*StateMapConnection) StateC

func (smc *StateMapConnection) StateC() <-chan *State

StateC returns the channel via which state changes will be returned for this connection.

func (*StateMapConnection) Subscribe

func (smc *StateMapConnection) Subscribe(event string) error

Subscribe tells the StagelinQ device to let us know about changes for the given state value.

type Token

type Token [16]byte

Token contains the identifying Token for a device in the StagelinQ network.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL