VST bit depth problem I think

Hi guys,

Apologies if this sounds like a stupid question, I’m new to VST development. I’m trying to build a plugin and I’m currently trying to test it with a sine wav. When I open the .wav file in Audacity it tells me it’s 44100Hz and it’s a 32 bit float. When I load this same file into matlab the first three samples are something like 0.00, 0.0443, 0.0884… However, when I put the same file into Ableton and try to step through the code I find the first three samples of the same file are 0.00000000, 0.00012068315, 0.00048156900… I see this when I peak into the memory in VS and look at it in 32 bit floating point view.

My problem is that I need the audio to have the same sample values as they are in Matlab for my algo to work. Obviously there’s a conversion happening that I have no control of. Can anyone shed any light on this problem and how I should go about fixing it.

Thanks.

Make sure Ableton is not warping the sample. When you load an audio clip in Ableton, the program will try to warp it to match your project’s bpm, this will either stretch or compress regions of the clip, which could consequently change the values of the samples.

At the moment I can’t think of anything else that could lead to this problem, maybe the programs represent samples at different ranges?

I get the same problem with Reaper, so I don’t think it’s a warping issue.

If the 2 DAW applications give you similar results, that would seem to suggest a problem in Matlab’s audio file handling instead of the DAW applications or JUCE doing something wrong.

Another possibility is that the DAW applications run at a different sample rate than your audio file. Both Live and Reaper would in that case resample the audio before it arrives into your plugin.