Trait rsynth::backend::vst_backend::vst::host::Host [−]
Implemented by all VST hosts.
Provided methods
pub fn automate(&self, index: i32, value: f32)
Automate a parameter; the value has been changed.
pub fn get_plugin_id(&self) -> i32
Get the plugin ID of the currently loading plugin.
This is only useful for shell plugins where this value will change the plugin returned.
TODO: implement shell plugins
pub fn idle(&self)
An idle call.
This is useful when the plugin is doing something such as mouse tracking in the UI.
pub fn get_info(&self) -> (isize, String, String)
Get vendor and product information.
Returns a tuple in the form of (version, vendor_name, product_name)
.
pub fn process_events(&self, events: &Events)
Handle incoming events from the plugin.
pub fn get_time_info(&self, mask: i32) -> Option<TimeInfo>
Get time information.
pub fn get_block_size(&self) -> isize
Get block size.
pub fn update_display(&self)
Refresh UI after the plugin’s parameters changed.
Note: some hosts will call some PluginParameters
methods from within the update_display
call, including get_parameter
, get_parameter_label
, get_parameter_name
and get_parameter_text
.
Implementors
impl Host for HostCallback
pub fn automate(&self, index: i32, value: f32)
pub fn get_plugin_id(&self) -> i32
pub fn idle(&self)
pub fn get_info(&self) -> (isize, String, String)
pub fn process_events(&self, events: &Events)
Send events to the host.
This should only be called within process
or process_f64
. Calling process_events
anywhere else is undefined behaviour and may crash some hosts.
pub fn get_time_info(&self, mask: i32) -> Option<TimeInfo>
Request time information from Host.
The mask parameter is composed of the same flags which will be found in the flags
field of TimeInfo
when returned.
That is, if you want the host’s tempo, the parameter passed to get_time_info()
should have the TEMPO_VALID
flag set.
This request and delivery system is important, as a request like this may cause
significant calculations at the application’s end, which may take a lot of our precious time.
This obviously means you should only set those flags that are required to get the information you need.
Also please be aware that requesting information does not necessarily mean that that information is provided in return.
Check the flags field in the TimeInfo
structure to see if your request was actually met.
pub fn get_block_size(&self) -> isize
Get block size.
pub fn update_display(&self)
Refresh UI after the plugin’s parameters changed.