tempogram | R Documentation |
Computes a Fourier-based tempogram based on onsets of Spotify segments.
Returns a tibble with time
, bpm
, and power
columns.
Power is normalised to a max of 1 (Chebyshev norm) within each time point.
tempogram( track_analysis, window_size = 8, hop_size = 1, cyclic = FALSE, bpms = if (cyclic) 80:160 else 30:600, window_function = signal::hamming )
track_analysis |
Spotify audio analysis as returned by
|
window_size |
Window size in seconds (default 8). |
hop_size |
Hop size in seconds (default 1). |
cyclic |
Boolean stating whether the tempogram should be cyclic (default not). |
bpms |
Vector of tempi in beats per minute to include in the tempogram (default 30–200 for non-cyclic and 80–160 for cyclic, inclusive of all integer tempi). |
window_function |
Window function for the Fourier analysis (default Hamming). |
library(tidyverse) get_tidy_audio_analysis("6PJasPKAzNLSOzxeAH33j2") %>% tempogram(window_size = 4, hop_size = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.