About VSTi...
Hi I'm building a sequencer with your module and have two problems.
First it crashes while dumping some of the VSTi's parameters without modifications to these:
class VstStringConsta
kVstMaxProgNa
kVstMaxParamS
kVstMaxVendor
kVstMaxProduc
kVstMaxEffect
I solved it by setting every numbers big enough..
And secondly, I'm trying to send a Midi message and get an output but I don't get any output.... I don't know if sending midi message part is wrong or getting an output part is wrong...
Same code using C++ produces result, but with python no results.
Can you tell me what I'm doing wrong?
Below is the code.
Thank you!
class VSTWindow:
def __init__(self, fileName, parent):
self.parent = parent
vstEff = pyvst.VSTPlugin
self.vstEff = vstEff
self.isVSTi = vstEff.
wndproc = {
title = vstEff.get_name()
l,t,r,b = 100, 100, 200, 200
wc = win32gui.WNDCLASS()
wc.style = win32con.
wc.hCursor = win32gui.
self.hwnd = hwnd = win32gui.
title,
eRect = self.vstEff.
width = eRect.right - eRect.left;
height = eRect.bottom - eRect.top;
if (width < 100):
width = 100
if (height < 100):
height = 100
width += 10
height += 35
def NoteEvent(self, key, volume):
midiEvent1 = pyvst.VstMidiEv
midiEvent2 = pyvst.VstMidiEv
midiEvent3 = pyvst.VstMidiEv
midiEvent4 = pyvst.VstMidiEv
print self.vstEff.
output = numpy.zeros(
f = open("text.wav", "wb")
f.close()
def OnWM_CLOSE(self, hwnd, msg, wp, lp):
def Close(self, hwnd):
def CloseWindow(self, hwnd):
if self.notClosed:
def Callback(self, effect, opcode, index, value, ptr, opt):
"""
Basic callback
"""
kVstVersion = 2400
if opcode == pyvst.AudioMast
canDos = ["sendVstEvents",
print c_char_p(ptr).value
if c_char_p(ptr).value in canDos:
if opcode == pyvst.AudioMast
return kVstVersion
return 0
# additions to your module
class VstMidiEvent(
_fields_ = [
("type", c_int, 32),
("flags", c_int, 32),
("detune", c_byte, 8),
class VstMidiEvents(
_fields_ = [
("events", POINTER(
]
def ProcessMidi(self, midiEvents):
evtP = POINTER(
return self.dispatcher
def process_
f4ptr = POINTER(c_float)
float_
self.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- pyvst Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jin
- Solved:
- Last query:
- Last reply: