| Title: | Interface to 'Vamp' Audio Analysis Plugins |
|---|---|
| Description: | Provides an interface to the 'Vamp' audio analysis plugin system <https://www.vamp-plugins.org/> developed by Queen Mary University of London's Centre for Digital Music. Enables loading and running 'Vamp' plugins for various audio analysis tasks including tempo detection, onset detection, spectral analysis, and audio feature extraction. Supports mono and stereo audio with automatic channel adaptation and domain conversion. |
| Authors: | Ed Baker [aut, cre] (ORCID: <https://orcid.org/0000-0002-5887-9543>), Authors of vamp-sdk [cph] (Authorship and copyright of included vamp-sdk as detailed in inst/COPYRIGHTS), Mark Borgerding [cph] (Authorship and copyright of included kiss_fft as detailed in inst/COPYRIGHTS) |
| Maintainer: | Ed Baker <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 1.0.1 |
| Built: | 2026-05-24 06:44:44 UTC |
| Source: | https://github.com/edwbaker/revamp |
Provides an R interface to the Vamp audio analysis plugin system developed by Queen Mary University of London's Centre for Digital Music. Enables loading and running Vamp plugins for Music Information Retrieval (MIR) tasks including tempo detection, onset detection, spectral analysis, and audio feature extraction.
The ReVAMP package allows R users to access the extensive library of Vamp audio analysis plugins. Key functions include:
vampPlugins - List all available Vamp plugins
runPlugin - Execute a plugin on audio data
vampPluginParams - Get plugin parameter information
vampPaths - List plugin search paths
vampInfo - Get Vamp SDK version information
See the individual function documentation for usage examples.
Your Name
Maintainer: Your Name <[email protected]>
Vamp Plugins: https://www.vamp-plugins.org/
Cannam, C., Landone, C., & Sandler, M. (2010). Sonic Visualiser: An open source application for viewing, analysing, and annotating music audio files. In Proceedings of the 18th ACM international conference on Multimedia (pp. 1467-1468).
vampPlugins, runPlugin, vampInfo
## Not run: # List available plugins plugins <- vampPlugins() head(plugins) # Get plugin search paths vampPaths() # Get info about a specific plugin params <- vampParams("vamp-example-plugins:amplitudefollower") # Get SDK version information vampInfo() ## End(Not run)## Not run: # List available plugins plugins <- vampPlugins() head(plugins) # Get plugin search paths vampPaths() # Get info about a specific plugin params <- vampParams("vamp-example-plugins:amplitudefollower") # Get SDK version information vampInfo() ## End(Not run)
Executes a Vamp audio analysis plugin on a Wave object and returns all outputs produced by the plugin. This is the main function for performing audio feature extraction and analysis.
runPlugin( wave, key, params = NULL, useFrames = FALSE, blockSize = NULL, stepSize = NULL, verbose = FALSE, dropIncompleteFinalFrame = TRUE )runPlugin( wave, key, params = NULL, useFrames = FALSE, blockSize = NULL, stepSize = NULL, verbose = FALSE, dropIncompleteFinalFrame = TRUE )
wave |
A Wave object from the |
key |
Character string specifying the plugin in "library:plugin" format
(e.g., "vamp-example-plugins:amplitudefollower", "vamp-aubio-plugins:aubioonset").
Use |
params |
Optional named list of parameter values to configure the plugin.
Parameter names must match the parameter identifiers from |
useFrames |
Logical indicating whether to use frame numbers (TRUE) or timestamps (FALSE) in the output. Default is FALSE. |
blockSize |
Optional integer specifying the analysis block size in samples. If NULL (default), the plugin's preferred block size is used. For frequency domain plugins, this determines the FFT size and frequency resolution. Larger values give better frequency resolution but worse time resolution. |
stepSize |
Optional integer specifying the step size (hop size) in samples between successive analysis blocks. If NULL (default), the plugin's preferred step size is used. For frequency domain plugins, this defaults to blockSize/2. Smaller values give better time resolution but increase computation time. |
verbose |
Logical indicating whether to print progress messages and diagnostic information during plugin execution. Default is FALSE for quiet operation. |
dropIncompleteFinalFrame |
Logical indicating whether to drop the final analysis frame if it would require zero-padding due to insufficient samples. Default is TRUE, meaning only complete frames are processed. Set to FALSE to include zero-padded incomplete final frames. |
Many Vamp plugins produce multiple outputs. For example, an onset detector might output both "onsets" (discrete event times) and "detection_function" (a continuous measure). This function returns ALL outputs, allowing you to access whichever ones you need.
The plugin will automatically adapt to the audio characteristics:
Channel mixing/augmentation if plugin requirements differ from input
Time/frequency domain conversion as needed
Buffering to handle different block sizes
Block Size and Step Size:
These parameters control the time/frequency resolution trade-off:
blockSize: Size of each analysis window. For frequency domain plugins, this is the FFT size. Typical values: 512, 1024, 2048, 4096. Larger = better frequency resolution, worse time resolution.
stepSize: Number of samples to advance between blocks (hop size). Typical values: blockSize/2 (50\ Smaller = better time resolution, more computation.
Each output data frame typically includes:
timestamp: Time or frame number of the feature
duration: Duration of the feature (if applicable, otherwise NA)
value/value1/value2/...: Feature values (number of columns varies)
label: Text label for the feature (if applicable, otherwise empty)
The function supports all three Vamp output sample types:
OneSamplePerStep: Regular intervals based on step size
FixedSampleRate: Output at a fixed rate (may differ from input)
VariableSampleRate: Sparse output at irregular intervals
A named list of data frames, one for each output produced by the plugin. The names correspond to the output identifiers (e.g., "amplitude", "onsets"). Each data frame contains columns for timestamp (or frame), duration, values, and labels (if applicable). If the plugin has only one output, the list will have one element.
vampPlugins to list available plugins,
vampPluginParams to get plugin parameters
## Not run: library(tuneR) # Load audio file audio <- readWave("myaudio.wav") # Run amplitude follower plugin - returns list with one output result <- runPlugin( wave = audio, key = "vamp-example-plugins:amplitudefollower" ) # Access the amplitude output amplitude_data <- result$amplitude head(amplitude_data) # Run onset detection - may return multiple outputs result <- runPlugin( wave = audio, key = "vamp-aubio-plugins:aubioonset" ) # See what outputs were produced names(result) # Access specific outputs onsets <- result$onsets detection_fn <- result$detection_function # Run plugin with custom parameters # First check what parameters are available params_info <- vampPluginParams("vamp-aubio-plugins:aubioonset") print(params_info) # Set specific parameter values result <- runPlugin( wave = audio, key = "vamp-aubio-plugins:aubioonset", params = list(threshold = 0.5, silence = -70) ) # Run with custom block and step sizes for better time resolution result <- runPlugin( wave = audio, key = "vamp-aubio-plugins:aubioonset", blockSize = 512, # Smaller blocks for better time resolution stepSize = 128 # 75% overlap for smoother detection ) # Run frequency domain plugin with larger FFT for better frequency resolution result <- runPlugin( wave = audio, key = "qm-vamp-plugins:qm-chromagram", blockSize = 4096, # Larger FFT for better frequency resolution stepSize = 2048 # 50% overlap (typical for frequency domain) ) ## End(Not run)## Not run: library(tuneR) # Load audio file audio <- readWave("myaudio.wav") # Run amplitude follower plugin - returns list with one output result <- runPlugin( wave = audio, key = "vamp-example-plugins:amplitudefollower" ) # Access the amplitude output amplitude_data <- result$amplitude head(amplitude_data) # Run onset detection - may return multiple outputs result <- runPlugin( wave = audio, key = "vamp-aubio-plugins:aubioonset" ) # See what outputs were produced names(result) # Access specific outputs onsets <- result$onsets detection_fn <- result$detection_function # Run plugin with custom parameters # First check what parameters are available params_info <- vampPluginParams("vamp-aubio-plugins:aubioonset") print(params_info) # Set specific parameter values result <- runPlugin( wave = audio, key = "vamp-aubio-plugins:aubioonset", params = list(threshold = 0.5, silence = -70) ) # Run with custom block and step sizes for better time resolution result <- runPlugin( wave = audio, key = "vamp-aubio-plugins:aubioonset", blockSize = 512, # Smaller blocks for better time resolution stepSize = 128 # 75% overlap for smoother detection ) # Run frequency domain plugin with larger FFT for better frequency resolution result <- runPlugin( wave = audio, key = "qm-vamp-plugins:qm-chromagram", blockSize = 4096, # Larger FFT for better frequency resolution stepSize = 2048 # 50% overlap (typical for frequency domain) ) ## End(Not run)
Executes multiple Vamp plugins on the same audio data in a single audio-read loop.
All plugins must use the same blockSize and stepSize (either their preferred values
must match or the caller must provide explicit blockSize/stepSize that apply to all).
runPlugins( wave, keys, params = NULL, useFrames = FALSE, blockSize = NULL, stepSize = NULL, verbose = FALSE, dropIncompleteFinalFrame = TRUE )runPlugins( wave, keys, params = NULL, useFrames = FALSE, blockSize = NULL, stepSize = NULL, verbose = FALSE, dropIncompleteFinalFrame = TRUE )
wave |
Wave object or filename (same as |
keys |
Character vector of plugin keys in "library:plugin" format. |
params |
Optional list of parameter lists (either a list-of-lists, a single list applied to all, or a named list keyed by plugin key). |
useFrames, blockSize, stepSize, verbose, dropIncompleteFinalFrame
|
Same semantics as |
A named list where each element corresponds to a plugin key and contains that plugin's outputs (same structure as runPlugin).
Returns information about the Vamp API and SDK versions used by ReVAMP.
vampInfo()vampInfo()
A list with two elements:
Integer indicating the Vamp API version (typically 2)
Character string indicating the Vamp SDK version (e.g., "2.10")
## Not run: # Get version information vampInfo() ## End(Not run)## Not run: # Get version information vampInfo() ## End(Not run)
Returns the list of directories where ReVAMP searches for Vamp plugins. The search paths are determined by the Vamp Host SDK and typically include system-wide plugin directories and user-specific directories.
vampPaths()vampPaths()
A character vector of directory paths
## Not run: # List plugin search paths vampPaths() ## End(Not run)## Not run: # List plugin search paths vampPaths() ## End(Not run)
Returns detailed information about the configurable parameters for a given Vamp plugin. Parameters can be adjusted to customize plugin behavior.
vampPluginParams(key)vampPluginParams(key)
key |
Character string specifying the plugin key in "library:plugin" format
(e.g., "vamp-aubio-plugins:aubionotes"). Use |
A data frame with one row per parameter and columns including:
Parameter identifier
Human-readable parameter name
Parameter description
Unit of measurement (if applicable)
Minimum allowed value
Maximum allowed value
Default value
Logical indicating if parameter is quantized to discrete values
Returns an empty data frame if the plugin has no configurable parameters.
vampPlugins to list available plugins
## Not run: # Get parameters for aubio onset detector params <- vampPluginParams("vamp-aubio-plugins:aubioonset") ## End(Not run)## Not run: # Get parameters for aubio onset detector params <- vampPluginParams("vamp-aubio-plugins:aubioonset") ## End(Not run)
Enumerates all Vamp plugins found in the plugin search paths and returns detailed information about each plugin including metadata, parameters, and audio processing requirements.
vampPlugins()vampPlugins()
A data frame with one row per plugin and columns including:
Plugin library name (without extension)
Human-readable plugin name
Unique plugin identifier (library:plugin format)
Plugin version number
Vamp API version the plugin uses
Plugin author/creator
Copyright information
Detailed plugin description
Input domain: "Time Domain" or "Frequency Domain"
Default step size in samples
Default block size in samples
Minimum number of audio channels required
Maximum number of audio channels supported
vampPluginParams to get parameter information for a specific plugin
## Not run: # List all installed plugins plugins <- vampPlugins() # Filter for specific library aubio_plugins <- plugins[plugins$library == "vamp-aubio-plugins", ] ## End(Not run)## Not run: # List all installed plugins plugins <- vampPlugins() # Filter for specific library aubio_plugins <- plugins[plugins$library == "vamp-aubio-plugins", ] ## End(Not run)