Module src.backends.fluidsynth.backend_controls
Fluidsynth backend controls for MIDI track management.
Provides functions to start, stop, and advance playback by sending TCP messages to a Fluidsynth-compatible server.
Functions
togglePlayback (host, port) | Toggle playback state. |
beginSong (host, port) | Start playback of the current song. |
nextSong (host, port) | Advance to the next song in the playlist. |
Fields
send_message | Alias for send_command. |
Functions
- togglePlayback (host, port)
-
Toggle playback state.
If currently playing, sends “player_stop”; otherwise sends “player_cont”.
Pushes a “clear” control message prior to sending.
Parameters:
- host string Remote host address
- port number Remote TCP port
Usage:
backend_controls.togglePlayback("127.0.0.1", 5555)
- beginSong (host, port)
-
Start playback of the current song.
Sends “player_start” after clearing previous controls.
Parameters:
- host string Remote host address
- port number Remote TCP port
Usage:
backend_controls.beginSong("127.0.0.1", 5555)
- nextSong (host, port)
-
Advance to the next song in the playlist.
Sends “player_next” after clearing previous controls.
Parameters:
- host string Remote host address
- port number Remote TCP port
Usage:
backend_controls.nextSong("127.0.0.1", 5555)