hq9000 / cython-vst-loader

a cython-based loader for VST audio plugins proving a clean python object-oriented interface
MIT License
39 stars 2 forks source link

`CythonVstLoaderException: plugin-to-host opcode 37 is not supported` #19

Open dschiller opened 2 years ago

dschiller commented 2 years ago

Somone knows wha that means ?

I tried on Windows 10 this one:

vst_loader.py

from cython_vst_loader.vst_host import VstHost
from cython_vst_loader.vst_plugin import VstPlugin
from cython_vst_loader.vst_loader_wrapper import allocate_float_buffer, get_float_buffer_as_list, free_buffer, \
     allocate_double_buffer, get_double_buffer_as_list
from cython_vst_loader.vst_event import VstNoteOnMidiEvent

sample_rate = 44100
buffer_size = 512

host = VstHost(sample_rate, buffer_size)

# Audio will be rendered into these buffers:
right_output = allocate_float_buffer(buffer_size, 1)
left_output = allocate_float_buffer(buffer_size, 1)

# `right_output` and `left_output` are integers which are, in fact, 
# just pointers to float32 arrays cast to `int`

# These buffers are not managed by Python, and, therefore, are not garbage collected.
# use free_buffer to free up the memory

plugin_path = R"D:\Content\VST\Arturia\B-3 V2.dll"
plugin = VstPlugin(plugin_path.encode('utf-8'), host)

# now we can work with this object representing a plugin instance:
assert(41 == plugin.get_num_parameters())
assert (b'amp_attack' == plugin.get_parameter_name(0))
assert (0.0 == plugin.get_parameter_value(0))

Console Output

D:\Work\Coding\Python\VSTHost>vst_loader.py
Traceback (most recent call last):
  File "C:\Users\Someone\AppData\Local\Programs\Python\Python39\lib\site-packages\cython_vst_loader\vst_plugin.py", line 68, in _global_host_callback
    res = host.host_callback(plugin_instance_pointer, opcode, index, value, ptr, opt)
  File "C:\Users\Someone\AppData\Local\Programs\Python\Python39\lib\site-packages\cython_vst_loader\vst_host.py", line 68, in host_callback
    raise CythonVstLoaderException(f"plugin-to-host opcode {str(opcode)} is not supported")
cython_vst_loader.exceptions.CythonVstLoaderException: plugin-to-host opcode 37 is not supported
Exception ignored in: 'cython_vst_loader.vst_loader_wrapper._c_host_callback'
Traceback (most recent call last):
  File "C:\Users\Someone\AppData\Local\Programs\Python\Python39\lib\site-packages\cython_vst_loader\vst_plugin.py", line 68, in _global_host_callback
    res = host.host_callback(plugin_instance_pointer, opcode, index, value, ptr, opt)
  File "C:\Users\Someone\AppData\Local\Programs\Python\Python39\lib\site-packages\cython_vst_loader\vst_host.py", line 68, in host_callback
    raise CythonVstLoaderException(f"plugin-to-host opcode {str(opcode)} is not supported")
cython_vst_loader.exceptions.CythonVstLoaderException: plugin-to-host opcode 37 is not supported
Traceback (most recent call last):
  File "D:\Work\Coding\Python\VSTHost\vst_loader.py", line 27, in <module>
    assert(41 == plugin.get_num_parameters())
AssertionError