Is it posible to set 2 inputs in audio plugin?
4 visualizaciones (últimos 30 días)
David Montalbán Caamaño el 5 de Mayo de 2023
I am designing a spectral subtracter to evaluate losses in perceptual audio coding, which consists in a plugin that compares the audio spectrum of two signals, the original and the compressed one. The thing is that i want to develop this code as an audio plugin but i am having some troubles to set two different inputs in my plugin, as the process function only has one in, right? Is there any way of adding another extra input? Or any idea to avoid having this problem?
jibrahim el 5 de Mayo de 2023
Editada: jibrahim el 5 de Mayo de 2023
It is possible to design plugins with more than one input. Here is a simple example:
classdef myPlugin < audioPlugin
PluginInterface = audioPluginInterface( ...
'InputChannels',[2 2], ...
scale = .1
function y = process(obj,x1,x2)
y = obj.scale*x1+x2;
Validation and generation of the plugin should work:
If you were to use the generated plugin in MATLAB, you would have to concatenate the two inputs. For example:
hostedPlugin = loadAudioPlugin("myPlugin.dll")
y = process(hostedPlugin,randn(1024,4));