songplayer – Text Based Music Player

songplayer module

Very high-level text-based music player Both songs and voices are specified as text strings

Uses a TrackPlayer for the actual playback. The focus in this module is on translating from a text-based format into the simple format used by TrackPlayer, and on doing as much of the setup as possible for the user.

class songplayer.SongPlayer(waveform_name='flute')[source]

Compile and play text-based songs


Convert a song from an ASCII representation to a list of frequency, duration pairs


Play a list of frequency, duration pairs (play a ‘track’)


Play a song based on an ASCII representation (compiles it, then plays it)

Download Source