coolbutuseless / tr808r

TR-808 Drum Machine for R
https://coolbutuseless.github.io/package/tr808r/
MIT License
40 stars 0 forks source link

tr808r (pronounced ‘traitor’)

{tr808r} is a tiny sound-a-like for Roland’s TR-808 drum machine.

This is a tech demo for how eventloop} allows you to write complex interactive applications using just R.

What’s in the box

Limitations/Future possibilities

Installation

Note that {tr808r} relies on the {eventloop} package for handling the interactivity on macOS and unix-like platforms.

Windows OS is not supported by {eventloop} as R on Windows does not (currently) support the onIdle callback.

You can install from GitHub with:

# install.package('remotes')
remotes::install_github('coolbutuseless/eventloop')  #  >= v0.1.1
remotes::install_github('coolbutuseless/tr808r')

Compose your own

tr808()

Watch video with sound

Play back an existing song pattern

Open the drum machine with an existing song.

tr808(state = demo_songs[[1]])

Watch video with sound

Tweeting patterns and playing back tweeted patterns

This is an easy, fun(?) way to share patterns on twitter!

Create your own tweetable

Press t (for twitter) within the application to print a text representation to your R console.

If you have {clipr} installed then the text will also be copied to your clipboard for easy pasting into twitter!

#RStats #tr808r
BD xx____xx__x_____
SD ____x_______x___
LT ________________
MT xx______________
HT ______xx__x__x__
RS ________________
CP xx_xx_xx_______x
CB xx__x_xx_x_x_xx_
CY ________________
OH ________________
CH x_xxx_xxx_xxx_xx

Playback a tweet

If you’d like to play a pattern that someone has tweeted, copy the text and pass it to tr808() as the initial state

tr808(state = '
#RStats #tr808r
BD xx____xx__x_____
SD ____x_______x___
LT ________________
MT xx______________
HT ______xx__x__x__
RS ________________
CP xx_xx_xx_______x
CB xx__x_xx_x_x_xx_
CY ________________
OH ________________
CH x_xxx_xxx_xxx_xx')

Related Software

Acknowledgements