Best. Cover. Ever.
Last updated: Aug. 6, 2019, 1:23 p.m.
The jukebox was retrofitted with a screen and a modern interface created to facilitate voting for music videos to play across the whole YouTube Beach site. Guests on the beach could vote their favourite tune to the top of the list, and whatever was at the top would play after the currently playing song finished.
The graphical interface ran on a Raspberry Pi within the Wurlitzer housing. It used the Python-based "Kivy" user interface toolkit, and featured graphics with the types of transitions and responsivity expected from modern user interfaces. The physical 1-9 buttons on the Wurlitzer were connected to the Raspberry Pi's GPIO pins, and allowed the user to vote for song 1-9 on the screen.
In order to add and remove songs from the jukebox, production staff used an HTML control panel to add YouTube video IDs or URLs. These video IDs were then used by the backend to look up the title, thumbnail and track information from the YouTube API, and saved in a MongoDB database. The control panel could also be used to disable the Wurlitzer interface during times when events were taking place on the beach's stage.
The AV playout system which controlled all of the audio and screens on site performed an HTTP request to an API module in order to establish which track should be played next, as well as close voting, or let the system know which track was now playing, in order for it to be removed from the voting list and display in the "Now Playing" section on the Wurlitzer.
The state machine controlling the logic of the system ran as a standalone module, which subscribed and published to an MQTT message bus. Each of the other components, such as the Wurlitzer's GUI, the control panel, and the GPIO inputs reading the Wurlitzer's physical button presses simply subscribed and published to the MQTT topics required to play their part. This meant that the system could use small, stateless modules to perform individual tasks, and the state machine could contain all of the state and handle all of the logic.
An added benefit of this type of message bus architecture is that ancilliary modules can be attached or removed without impacting any of the existing system. For example, monitoring or logging modules can be built which simply subscribe to the topics that are in use, and receive the same real-time events used for the logic of the system.