File Load Dialog Problem in Matlab Audio Plugin

조회 수: 1 (최근 30일)
Ben Jancovich
Ben Jancovich 2017년 5월 4일
답변: Charlie DeVane 2019년 5월 13일
This is my first time writing code using the audio plugin class, so I apologize if this is a bit of a silly question. I'm trying to modify audiopluginexample.FastConvolver to write a simple convolution engine VST plugin, but I'm having trouble adding a file load dialog to allow end users to load their own impulse response. I'm using uigetfile as a property value, which works fine, except that it is called when generating the plugin code rather than in the final plugin. I suspect that this may need to be moved to a method so it runs in the when the plugin is instantiated in a DAW. The addition of this uigetfile property has also caused a few parse errors elsewhere in unmodified parts of the original code, including showing the next instance of the term "properties" as a parse error.
  댓글 수: 1
Stephan Moeller
Stephan Moeller 2018년 3월 26일
I would also like to know how to program this. Like loading filter coefficiants

댓글을 달려면 로그인하십시오.

답변 (1개)

Charlie DeVane
Charlie DeVane 2019년 5월 13일
Sorry, there is currently no way to do this in a generated plugin.
As for the property value issue, suppose you set a property's default value using a function:
classdef
properties
MyProperty = myFunction(7)
end
% other stuff ...
end
In general, myFunction will be called once when the class is loaded into MATLAB, even before an instance of the class is created. It does not necessarily happen during validateAudioPlugin or generateAudioPlugin: it will have happened earlier if you have been working with the class. You can read more at https://www.mathworks.com/help/matlab/matlab_oop/specifying-properties.html
hth,
Charlie

카테고리

Help CenterFile Exchange에서 Audio Plugin Creation and Hosting에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by