Note
Go to the end to download the full example code
Plugin discovery and browsing#
import os
from pathlib import Path
from pprint import pprint
import rtvamp
# set VAMP_PATH to rtvamp package dir to find example plugins
os.environ["VAMP_PATH"] = os.path.dirname(rtvamp.__file__)
Browse available libraries and plugins#
List libraries:
rtvamp.list_libraries()
[PosixPath('/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/rtvamp/example-plugin.so')]
List plugins:
rtvamp.list_plugins()
['example-plugin:rms', 'example-plugin:spectralrolloff']
List plugins in current working directory:
rtvamp.list_plugins(paths=[Path.cwd()])
[]
Get metadata and descriptors from plugin
PluginMetadata(identifier='rms',
name='RMS',
description='Root mean square',
maker='LB',
copyright='MIT',
plugin_version=1,
input_domain='time',
parameter_descriptors=[],
output_descriptors=[{'bin_count': 1,
'bin_names': [],
'description': 'Root mean square of signal',
'has_known_extents': False,
'identifier': 'rms',
'max_value': 0.0,
'min_value': 0.0,
'name': 'RMS',
'quantize_step': None,
'unit': 'V'}])
PluginMetadata(identifier='spectralrolloff',
name='Spectral roll-off',
description='',
maker='LB',
copyright='MIT',
plugin_version=1,
input_domain='frequency',
parameter_descriptors=[{'default_value': 0.8999999761581421,
'description': 'Some random parameter',
'identifier': 'rolloff',
'max_value': 1.0,
'min_value': 0.0,
'name': 'Roll-off factor',
'quantize_step': None,
'unit': '',
'value_names': []}],
output_descriptors=[{'bin_count': 1,
'bin_names': [],
'description': 'Frequency below which n% '
'of the total energy is '
'concentrated',
'has_known_extents': False,
'identifier': 'frequency',
'max_value': 0.0,
'min_value': 0.0,
'name': 'Roll-off frequency',
'quantize_step': None,
'unit': 'Hz'}])
Total running time of the script: (0 minutes 0.005 seconds)