Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Necessary changes and fixes to make synth plugins #62

Merged
merged 4 commits into from
May 1, 2023

Conversation

vsariola
Copy link
Contributor

@vsariola vsariola commented May 1, 2023

Here's a couple of changes that were necessary to compile synthesizer plugins with the vst2 package (to resolve #61):

  1. The events field in the structure Events in vst.h was defined wrong; it was void** events where as it should have been void* events[]. In other words: it should be a variable size structure, with some "header", followed by a list of pointers, and should be allocated with a single calloc (and freed with a single free).

  2. The user has now mechanism to define arbitrary PluginFlags; specifically, to enable defining vst2.PluginIsSynth flag for the synth

  3. I also gave the user a way to define a callback function for responding to PlugCanDo opcode. In my case, I use it to respond positively to vst2.PluginCanReceiveEvents, vst2.PluginCanReceiveMIDIEvent, and vst2.PluginCanReceiveTimeInfo

  4. Finally, I gave the user a way to define a callback function for responding to PlugProcessEvents opcodes, to receive MIDI events from the host.

@dudk dudk merged commit 10b5e35 into pipelined:master May 1, 2023
@dudk
Copy link
Member

dudk commented May 1, 2023

Thanks a lot for your contributions @vsariola! I'll push a tag for the new release later this week. Do you think any other changes would be needed before then?

@vsariola
Copy link
Contributor Author

vsariola commented May 2, 2023

Not entirely sure. I think it would be cool to be able to respond to PlugEditOpen and PlugEditClose opcodes, but that's generic thing for plugins. At the moment, I just open my own windows.

Also, I am not responding to very complex events so far, just midi note on and off messages, so there might be something missing there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to build a vst2 synth?
2 participants