-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
92 lines (69 loc) · 2.88 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
library(ProTrackR) |>
suppressMessages()
data("mod.intro")
```
# ProTrackR
<img src="https://content.pouet.net/files/screenshots/00050/00050055.png" alt="ProTracker 2.3a" align="right" />
[ProTracker](https://en.wikipedia.org/wiki/Protracker) is music sequencer software
from the 1990s on the [Commodore Amiga](https://en.wikipedia.org/wiki/Amiga)
(see screenshot of version 2.3a on the right).
This R package is designed to read, process and play ProTracker module audio files.
## Installation
> Get CRAN version
```{r eval=FALSE}
install.packages("ProTrackR")
```
> Get development version from R-Universe
``` r
install.packages("ProTrackR", repos = c('https://pepijn-devries.r-universe.dev', 'https://cloud.r-project.org'))
```
## Usage
The package comes bundled with a tiny chiptune, which can easily be played like so:
```{r play_intro, eval=FALSE}
library(ProTrackR) |>
suppressMessages()
data("mod.intro")
playMod(mod.intro, verbose = FALSE)
```
There are plethora of module files available on-line as well. Below you can see how
you can download such a file. It also show how you can select an audio sample
(number 25) from the module and calculate its power spectrum:
```{r power_cyberride}
elekfunk <- read.module("https://api.modarchive.org/downloads.php?moduleid=41529#elektric_funk.mod")
spec <- elekfunk |>
PTSample(25) |>
waveform() |>
tuneR::powspec(wintime = 0.1, steptime = 0.001)
image(log10(spec), col = hcl.colors(100, palette = "Inferno"))
```
While we are at it, why not play it:
```{r play_cyberride, eval=FALSE}
playMod(elekfunk, verbose = FALSE)
```
## Developmental status
It has been a decade since the initial release of this package. Since it's release
a lot has changed in R and in my skill set. I still have plans for this package,
but this requires drastic changes. Therefore, I will only apply minimal maintenance
to this package. Meanwhile I will work on a complete overhaul which will be released
in due time as a new package. This new package will:
* have the same or similar features as the current package.
* will implement modern R features and try to adhere to
[tidyverse](https://www.tidyverse.org) principles.
* implement rendering procedures in C++ giving the package a speed boost.
But until then, please enjoy the current package as is.
## Further reading
For some further reading and inspiration please have a look at the following blog
articles:
* [Chiptunes in R (1)](https://r-coders-anonymous.blogspot.com/2015/09/protrackr-chiptunes-in-r-part-one.html)
* [Chiptunes in R (2)](https://r-coders-anonymous.blogspot.com/2015/11/protrackr-chiptunes-in-r-part-two.html)
* [Chiptunes in R (3)](https://r-coders-anonymous.blogspot.com/2016/11/protrackr-chiptunes-in-r-part-three.html)