0
0

Hello,
is it possible to read the [b:gj9i9qdm][color=orange:gj9i9qdm]Sone[/color:gj9i9qdm][/b:gj9i9qdm] Values of a Sound?
I tried a Bitmap with GetWaveData():
[list:gj9i9qdm]60 Sec. of a Sound with very silent first 15 Sec., than rather loud
abs-Values of left + right / 2
with 128, 256, 512 numvalues[/list:u:gj9i9qdm]
but the whole Waveform looks the same from Begining to the End of the 60 Sec., no low Wave at the first 15 Sec..
Do I something wrong or is this Function not suitable for this?
Can someone help?

Thank you

  • You must to post comments
0
0

Thank you Brett,
but i already used it. Here my code, is something else wrong with it?

[size=75:tmnmf6pc] FMResult = FMOD_System_Create(&FMSystem);
ERRCHECK(FMResult);

FMResult = FMOD_System_GetVersion(FMSystem, &FMVersion);
ERRCHECK(FMResult);

FMResult = FMOD_System_Init(FMSystem, 2, FMOD_INIT_NORMAL, FMOD_OUTPUTTYPE_AUTODETECT);
ERRCHECK(FMResult);

strTitel = “E:\Eigene_Dateien\Eigene Musik\mp3\George_Michael_-_Amazing.mp3”;
FMResult = FMOD_System_CreateSound(FMSystem, strTitel.c_str(), (FMOD_MODE)(FMOD_ACCURATETIME | FMOD_CREATESAMPLE | FMOD_SOFTWARE | FMOD_2D), 0, &FMSound);
ERRCHECK(FMResult);

FMOD_Sound_GetLength(FMSound, &samples, FMOD_TIMEUNIT_PCM);
FMOD_Sound_GetLength(FMSound, &ms, FMOD_TIMEUNIT_MS);
FMOD_Sound_GetLength(FMSound, &pcmbytes, FMOD_TIMEUNIT_PCMBYTES); // uncompressed
FMOD_Sound_GetLength(FMSound, &rawbytes, FMOD_TIMEUNIT_RAWBYTES); // compressed

BtsSek = int((float)pcmbytes / ms * 1000); // bytes pro Sekunde

for(unsigned int i = 0; i <= BtsSek * 60; i += BtsSek)
{
FMOD_Sound_Lock(FMSound, 0, BtsSek, &ptr1, &ptr2, &len1, &len2);
FMOD_Channel_GetWaveData(FMChannel, WavedataL, 256, 0); // 0 = links, 1 = rechts
FMOD_Channel_GetWaveData(FMChannel, WavedataR, 256, 1); // 0 = links, 1 = rechts
FMOD_Sound_Unlock(FMSound, ptr1, ptr2, len1, len2);

for(int i = 0; i &lt; 256; i++)
{
  if(IsNan(WavedataR[i]))   // Not a Number (Wert, der keine Zahl ist)
    WavedataR[i] = 0;
  if(IsNan(WavedataL[i]))
    WavedataL[i] = 0;

  Wavedata[i] = (StrToFloat(LeftStr(FloatToStr(WavedataL[i]), 4)) + StrToFloat(LeftStr(FloatToStr(WavedataR[i]), 4))) / 2;
  y = abs(SimpleRoundTo(Wavedata[i], -1) * 10);
  cPoint = y; 
  Memo1-&gt;Lines-&gt;Add(cPoint);
  ListBox1-&gt;Items-&gt;Add(y);
}

}[/size:tmnmf6pc]

And a further Question:
Where can I get the DSP-Tutorials? This Section in the Help File is empty.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.