The goal of midiblender
is to mangle midi files in R and listen to
what happens.
This is an experimental, use at your own frustration package. I’m writing this for my own use cases, and using the R package format because it helps me to clarify and track the goals I’m chasing down. This is an R package, but perhaps should not be confused with one.
I’m sharing this for fun and in case others find it useful.
You can install the midiblender like so:
## install remotes package if it's not already
if (!requireNamespace("remotes", quietly = TRUE)) {
install.packages("remotes")
}
## install from github
remotes::install_github("CrumpLab/midiblender")
Aspects of this package rely on pyramidi, which is also in an experimental lifecycle. That package wraps some python libraries (miditapyr and mido) that handle midi import and export. See the pyramidi documentation for more information about what is necessary to install before this will work. See also fluidsynth for easy playing and rendering of midi in R.
-
a conceptual getting started document
-
Using vignettes to conduct various tests and concepts for midi blending
-
[] Fill out example code in the function documentation
- Slowly adding more examples
The primary style of development here is me trying things out for fun and listening to them…with a side eye toward posterity in case the mangling pattern seems like a tool I’d want to use again.
Thanks to the R community for building such wonderful tools. Special thanks to Urs Wilke for pyramidi, that helped me get up to speed very quickly.
Allaire, JJ. 2023. quarto: R Interface to “Quarto” Markdown Publishing System. https://CRAN.R-project.org/package=quarto.
Allaire, JJ, Yihui Xie, Christophe Dervieux, Jonathan McPherson, Javier Luraschi, Kevin Ushey, Aron Atkins, et al. 2023. rmarkdown: Dynamic Documents for r. https://github.com/rstudio/rmarkdown.
Crump, Matthew J. C. 2024. “midiblender: Experiments in genRative MIDI Mangling.”
Csárdi, Gábor, Jim Hester, Hadley Wickham, Winston Chang, Martin Morgan, and Dan Tenenbaum. 2023. remotes: R Package Installation from Remote Repositories, Including “GitHub”. https://CRAN.R-project.org/package=remotes.
Ligges, Uwe, Sebastian Krey, Olaf Mersmann, and Sarah Schnackenberg. 2023. tuneR: Analysis of Music and Speech. https://CRAN.R-project.org/package=tuneR.
Ooms, Jeroen. 2023. av: Working with Audio and Video in r. https://CRAN.R-project.org/package=av.
R Core Team. 2023. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. https://www.R-project.org/.
Wickham, Hadley, Mara Averick, Jennifer Bryan, Winston Chang, Lucy D’Agostino McGowan, Romain François, Garrett Grolemund, et al. 2019. “Welcome to the tidyverse.” Journal of Open Source Software 4 (43): 1686. https://doi.org/10.21105/joss.01686.
Wickham, Hadley, Jennifer Bryan, Malcolm Barrett, and Andy Teucher. 2023. usethis: Automate Package and Project Setup. https://CRAN.R-project.org/package=usethis.
Wickham, Hadley, Peter Danenberg, Gábor Csárdi, and Manuel Eugster. 2024. Roxygen2: In-Line Documentation for r. https://CRAN.R-project.org/package=roxygen2.
Wickham, Hadley, Jay Hesselberth, and Maëlle Salmon. 2022. pkgdown: Make Static HTML Documentation for a Package. https://CRAN.R-project.org/package=pkgdown.
Wickham, Hadley, Jim Hester, Winston Chang, and Jennifer Bryan. 2022. devtools: Tools to Make Developing r Packages Easier. https://CRAN.R-project.org/package=devtools.
Wild, Fridolin. 2022. lsa: Latent Semantic Analysis. https://CRAN.R-project.org/package=lsa.
Wilke, Urs. 2024. pyramidi: Generate and Manipulate Midi Data in r Data Frames. https://github.com/urswilke/pyramidi.
Xie, Yihui. 2014. “knitr: A Comprehensive Tool for Reproducible Research in R.” In Implementing Reproducible Computational Research, edited by Victoria Stodden, Friedrich Leisch, and Roger D. Peng. Chapman; Hall/CRC.
———. 2015. Dynamic Documents with R and Knitr. 2nd ed. Boca Raton, Florida: Chapman; Hall/CRC. https://yihui.org/knitr/.
———. 2023. knitr: A General-Purpose Package for Dynamic Report Generation in r. https://yihui.org/knitr/.
Xie, Yihui, J. J. Allaire, and Garrett Grolemund. 2018. R Markdown: The Definitive Guide. Boca Raton, Florida: Chapman; Hall/CRC. https://bookdown.org/yihui/rmarkdown.
Xie, Yihui, Christophe Dervieux, and Emily Riederer. 2020. R Markdown Cookbook. Boca Raton, Florida: Chapman; Hall/CRC. https://bookdown.org/yihui/rmarkdown-cookbook.
Yu, Guangchuang. 2023. badger: Badge for r Package. https://CRAN.R-project.org/package=badger.