0
0

Hello,

I am testing FMOD’s 3D functionality to create a 3d sound.
I have taken a solo violin recording and I wanted to try to make a little orchestra atmosphere with it.
I made 21 sounds on 21 channels by duplicating this violin sound with different positions, (-20+2*i, 0, 10), i from 0 to 20, and I cant hear any difference with the original sound …
I only hear difference in the speakers when I put all the instruments to the left or to the right. Am I doing something wrong here?
How could I achieve this?

Thank you very much,

  • You must to post comments
0
0

Hello,

As I didnt receive any answer, maybe I baddly explained my issue.
I would just like to know how I can get a 3d atmosphere with 1 single music source file as input (mono or stereo) just by duplicating this source?

Thank you for your help,
Have a good day,

  • You must to post comments
0
0

Can you please post the code you are using to play the sound, and then position the channel.

  • You must to post comments
0
0

Hello Nick,

Thanks for your answer. Here is the code with 1 sound duplicated 2 times. (3 sounds total)
I have tried with different modes other than FMOD_SPEAKERMODE_SURROUND but it doesnt look to change anything.

Could you please find out what I am doing wrong here?

Cheers,

[code:616gc6ts] result = system->init(100, FMOD_INIT_NORMAL, 0);
if (result == FMOD_ERR_OUTPUT_CREATEBUFFER) /* Ok, the speaker mode selected isn’t supported by this soundcard. Switch it back to stereo... */
{
result = system->setSpeakerMode(FMOD_SPEAKERMODE_SURROUND);
ERRCHECK(result);

    result = system->init(32, FMOD_INIT_NORMAL, 0);/* ... and re-init. */
    ERRCHECK(result);
}

/*
    Set the distance units. (meters/feet etc).
*/
FMOD_VECTOR listenerpos  = { 0.0f, 0.0f, -1.0f};
FMOD_VECTOR forward        = { 0.0f, 0.0f, 1.0f };
FMOD_VECTOR up             = { 0.0f, 1.0f, 0.0f };

FMOD_VECTOR pos1 = {-5.0f, 0.0f, 0.0f};
FMOD_VECTOR pos2 = {0.0f, 0.0f, 5.0f};
FMOD_VECTOR pos3 = {5.0f, 0.0f, 0.0f};

result = system->set3DListenerAttributes(0,&listenerpos,NULL,&forward,&up);
ERRCHECK(result);

result = system->set3DSettings(1.0f, 1.0f, 1.0f);
ERRCHECK(result);

/*
    Load some sounds
*/

//**************************************************************
    result = system->createSound("C:/sounds/violin.wav", FMOD_3D, 0, &sound1);
    ERRCHECK(result);
    result = system->createSound("C:/sounds/violin.wav", FMOD_3D, 0, &sound2);
    ERRCHECK(result);
    result = system->createSound("C:/sounds/violin.wav", FMOD_3D, 0, &sound3);
    ERRCHECK(result);

    result = sound1->set3DMinMaxDistance(0.5f * DISTANCEFACTOR, 5000.0f * DISTANCEFACTOR);
    ERRCHECK(result);
    result = sound2->set3DMinMaxDistance(0.5f * DISTANCEFACTOR, 5000.0f * DISTANCEFACTOR);
    ERRCHECK(result);
    result = sound3->set3DMinMaxDistance(0.5f * DISTANCEFACTOR, 5000.0f * DISTANCEFACTOR);
    ERRCHECK(result);


    result = system->playSound(FMOD_CHANNEL_FREE, sound1, true, &channel1);
    ERRCHECK(result);
    result = system->playSound(FMOD_CHANNEL_FREE, sound2, true, &channel2);
    ERRCHECK(result);
    result = system->playSound(FMOD_CHANNEL_FREE, sound3, true, &channel3);
    ERRCHECK(result);


    /*result = channel1->set3DSpread(90);
    ERRCHECK(result);
    result = channel2->set3DSpread(90);
    ERRCHECK(result);
    result = channel3->set3DSpread(90);
    ERRCHECK(result);*/

    result = channel1->set3DAttributes(&pos1, NULL);
    ERRCHECK(result);
    result = channel2->set3DAttributes(&pos2, NULL);
    ERRCHECK(result);
    result = channel3->set3DAttributes(&pos3, NULL);
    ERRCHECK(result);

    result = channel1->setPaused(false);
    ERRCHECK(result);
    result = channel2->setPaused(false);
    ERRCHECK(result);
    result = channel3->setPaused(false);
    ERRCHECK(result);[/code:616gc6ts]
  • You must to post comments
0
0

Are you calling System::update() at regular intervals?

  • You must to post comments
0
0

No I don’t but I was thinking that update was just if you move either the source or the listener. Am I wrong?

  • You must to post comments
0
0

Calling System::update regularly is required for FMOD to operate correctly.

  • You must to post comments
0
0

Hello Nick,

I added the system::update:

[code:2bz9tfga]do{
system->update();

    Sleep(INTERFACE_UPDATETIME);

} while (key != 27);[/code:2bz9tfga]

It doesnt change anything unfortunately ….
I have the feeling that the 3d is not taken into account. Also, when I use single source and I set its position like this :
FMOD_VECTOR pos2 = {0.0f, 0.0f, -2.0f};
it doesnt react as if the source was behind the listener but in front. Is that normal?

I am pretty sure I do something wrong here, just I cant find out what !

  • You must to post comments
0
0

Hello again Nick,

Still no idea about this issue? 😥

Thank you for your help,

  • You must to post comments
Showing 8 results
Your Answer

Please first to submit.