{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.
tr808()
Start an interactive TR-808 session.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')
tr808(state = ...)
tr808(state = ...)
tr808()
Open the drum machine with an existing song.
tr808(state = demo_songs[[1]])
This is an easy, fun(?) way to share patterns on twitter!
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
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')