Open
Conversation
wrl
reviewed
Aug 23, 2020
Comment on lines
+625
to
+648
| // drain parameter changes | ||
| // todo: interleave with events for sample accurate automation | ||
| if let Some(input_param_changes) = data.input_param_changes.upgrade() { | ||
| for i in 0..input_param_changes.get_parameter_count() { | ||
| if let Some(queue) = input_param_changes.get_parameter_data(i).upgrade() { | ||
| let id = queue.get_parameter_id(); | ||
| for p in 0..queue.get_point_count() { | ||
| let mut offset = 0; | ||
| let mut value = 0.0; | ||
| if queue.get_point(p, &mut offset as *mut _, &mut value as *mut _) | ||
| != 0 | ||
| { | ||
| break; | ||
| } | ||
| if let Some(param) = baseplug::api::vst3::param_for_vst3_id::< | ||
| <$plugin as Plugin>::Model, | ||
| >(id) | ||
| { | ||
| self.plugin().set_parameter(param, value as f32); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
Owner
There was a problem hiding this comment.
you should already be able to use https://github.com/wrl/baseplug/blob/trunk/src/event.rs#L9-L21 to enqueue parameter change events.
doesn't support ramp events and almost certainly never will, but who cares.
Comment on lines
+677
to
+681
| // todo: figure this out | ||
| baseplug::MusicalTime { | ||
| bpm: 0.0, | ||
| beat: 0.0, | ||
| } |
Owner
There was a problem hiding this comment.
should we pass in MusicalTime to the plugin as an Option<MusicalTime> to handle the case where the host doesn't provide any?
Comment on lines
+479
to
+481
| (true, false) => ("Audio Input", 2), | ||
| (false, false) => ("Audio Output", 2), | ||
| (true, true) => ("Event Input", 0), |
Owner
There was a problem hiding this comment.
is it alright as a stopgap to use Plugin::INPUT_CHANNELS, Plugin::OUTPUT_CHANNELS, Plugin::MIDI_INPUT here?
until we figure out a more comprehensive bus configuration scheme, that is
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Work in progress VST3 wrapper.
Notes:
WrappedPluginpublicnormalize/denormalizeas functions toWrappedPlugin.The code is dense and could probably be cleaned up in a few places.