Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / 2D SMART SOUND PANNING TUTORIAL FOR N00BS :D

Author
Message
Starshyne Emir
7
Years of Service
User Offline
Joined: 27th Nov 2016
Location: Porto Alegre, southern Brazil
Posted: 6th Jun 2017 15:56
Hello there, beloved master devs and lovely coding beginners!

I was here messing around with SOUND functions and found out that a bit of sound panning may turn an otherwise boring experience into a fascinating headphone trip.
The problem I was experiencing was to produce the sound in the exat 2d coordinates of the event to produce a stereophonic effect.

And then I've come into this:



And then the sound was played exactly where it was supposed to be in 2D space, correctly alligned with my speakers.

Incredible, huh? With just that piece of code you can play a sound correctly panned!

I know it is pretty silly, but I took long before finding out the most efficient way to position sounds, and finding out this little workaround made it possible to me to produce more engaging experiences with my little projects.

Hope you all find it useful!
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 11th Jun 2017 03:52 Edited at: 11th Jun 2017 03:52
Very nice. I had never actually tried that command before. It works great with my little sprite shadow demo, attached below.

Send your parents to noisy sprite demo hell... enter the D-Zone

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-19 13:52:41
Your offset time is: 2024-04-19 13:52:41