MATLAB Answers

AudioPluginSource testbench error: output size

2 views (last 30 days)
Andreas Almqvist
Andreas Almqvist on 27 Feb 2017
Answered: Charlie DeVane on 24 Apr 2019
I keep getting errors at the point of validation of the plugin.
I set:
out = plugin.matrix
to get the matrix out of the plugin.
The matrix I want to output have the size: 2 rows, 503 columns. I have also tried putting in as a 503 rows, 2 columns.
I get either one of these 2 errors, depending on the matrix config:
Error('ValidateAudioPlugin:BadOutputWidth') Width of output 1 was 503 but should have been 2 (OutputChannels(1)).
Error('ValidateAudioPlugin:BadOutputFrameSize Output 1 produced a frame size of 503 but should have matched the input frame size of 2.
No matter how it lay the matrix, either 2 rows 503 columns or 503 columns 2 rows, matlab still wont accept it.
I also reshape matrix to change it's size with every change of samples per frame that the testbench do, but I still receive the same errors.
Anyone have a hint on how to go on with this?

  0 Comments

Sign in to comment.

Answers (1)

Charlie DeVane
Charlie DeVane on 24 Apr 2019
Hi Andreas,
The size of the output is constrained by the VST plugin API. If your code produces the wrong size output, your generated plugin might crash the DAW it is running in. validateAudioPlugin checks these constraints to help ensure your plugin is safe to run.
You can choose the number of columns (channels) you want to output, using the 'OutputChannels' name-value pair in audioPluginInterface. The default value is 2 (stereo).
You cannot choose the number of rows (samples) to output. This is determined by the plugin host (DAW), and can vary from call to call. Use getSamplesPerFrame(plugin) to determine how many rows the DAW wants you to output.
hth,
Charlie

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!