0
0

Hi. I ‘m trying to do a musical keyboard that can be working with SF2 (Soundfont 2) files. I can open the SF2 files as a Raw file and play them. Here is the code if someones want:

sampleHandle = FSOUND_Sample_Load(FSOUND_FREE, xFilename, FSOUND_LOADRAW Or FSOUND_NORMAL, 0, 0)

Now, my problem is how can i play the part of the SF2 files? For example there are 4 samples in a SF2 file and i want to play them one by one. How can i seperate them such as different samples? I ‘m waiting your helps.

  • You must to post comments
0
0

if you’re hacking it with RAW mode, then you should probably just look at the , int offset, int length params that you have set to 0,0 at the end of that function. That lets you load part of a file.

  • You must to post comments
0
0

Thanks for your help. But it isnt enough for me. I ‘m just new with FMOD library. What does "offset" do? What is that? And can you give an example here please? Thanks again.

  • You must to post comments
0
0

Ok, i got those parameters. "offset" is the starting position and "length" is the length that we want to play. Now how can i detect the samples automatically? :) I dont know it is possible or not but i believe that is possible with FMOD. Thanks for helps.

  • You must to post comments
0
0

you would have to read the sf2 format and find the correct offsets.

  • You must to post comments
0
0

That is way that i thought. But i need another method to do it. I want to detect automatically. I think, i should check the volume level in that time. So if the volume level is so lil, it means that point is the split point. I tried a lot of different methods to check volume level of the sample in the time but i didnt it. Is there any function or something like that to do that?

  • You must to post comments
0
0

no because you’re trying to detect what is metadata and what is pcm data, metadata will come out as noise, but a crash symbol might have similar noise characteristics, you have to know the fileformat to do it properly.

  • You must to post comments
0
0

Got it. Unfortunately i m not good at to know the wave formats or somethings like that :) By the way i have another strange problem. It is about FX. When i use the FX (even eq, chorus,..) without "waves_reverb", if i stop the sound, my machine is getting slow. I didnt understand why. If it will drive my pc slow, it must be when it is playing, right? But if i use FX’es with "waves_reverb", there is no problem. Can u help me about this topic? Thanks for your helps again.

  • You must to post comments
0
0

If you’re wanting to use effects i’d use FMOD Ex not FMOD 3 as FMOD 3 uses inefficient DirectX effects.

  • You must to post comments
0
0

Ok, you are the boss :) Thanks for your all helps

  • You must to post comments
Showing 9 results
Your Answer

Please first to submit.