0
0

hi,

I am writing a Visualisation software for some time for live performances, and now I want to add sound analysation.

I want to analyze the peaks for left and right, I took the pitchdetection sample and use getWaveData instead of spectrum and get the maximum of abs of the array.
which works fine for mono, but if I try to call the same function with channel offset 1 for the next channel it doesn’t work.

exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO);
exinfo.numchannels = 1;
exinfo.format = FMOD_SOUND_FORMAT_PCM16;
exinfo.defaultfrequency = OUTPUTRATE;
exinfo.length = exinfo.defaultfrequency * sizeof(short) * exinfo.numchannels * 5;

in the sound creation I tried to change the number of channels to two but then not even the first channel to analyze works.

so I am really stuck here. how to record in stereo and analzye the peaks for left and right ???

help really appreciated

cool library btw find yourself on our acknoledgement list:
[url:2b5b0cqj]http://www.1n0ut.com/acknoledgements.htm[/url:2b5b0cqj]
[url:2b5b0cqj]http://www.1n0ut.com[/url:2b5b0cqj]

  • You must to post comments
0
0

result = system->setSoftwareFormat(OUTPUTRATE, FMOD_SOUND_FORMAT_PCM16, 1, 0, FMOD_DSP_RESAMPLER_LINEAR);

this line was the bug as the software sample format is here with 1 channel only

changed it to this now it seems to be ok, have to test it though
result = system->setSoftwareFormat(OUTPUTRATE, FMOD_SOUND_FORMAT_PCM16, 1, 0, FMOD_DSP_RESAMPLER_LINEAR);

correct me if the way I am doing this is wrong.
best,
cubic

  • You must to post comments
0
0

those 2 lines are the same.

I assume you meant 2 not 1 in the second case, but all you’re doing is setting it to what fmod already is using. You don’t need to call setSoftwareFormat.

  • You must to post comments
0
0

well, that might be the case that this is standard, nevertheless in the pitchdetection sample this line is in it to change the defaults as it seems which makes sense for microphone pitchdetection.
so I deletete the line and seems to work.
thx,
cubic

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.