Sounds: Panning, what values do what?
-
@iTap-Development @Aidan-Oxley @Murtaza
Found the problem:
The audio engine can only pan Mono sounds, not stereo sounds.
When it's playing a stereo sound it ignores panning values -> completely.
With a mono sound, as (I think it was Aidan) said, 100 is full right, -100 is full left.
Works on iPad Pro, headphones, everything. Furthermore, it's polyphonically instancing each play of the same sound. Meaning it lets each instance of a playing a sound finish, even if you initiate another playing of the same sound.
Not sure how many sounds it will play at once before it gives up, probably varies from CPU to CPU.
-
@Deeeds so garage band is mono sound?
-
@iTap-Development No, probably not. More modern sound engines are capable of panning stereo sounds in all sorts of fun and interesting ways.
Old sound engines are not. And I'd bet that OpenAL is what's being used in hyperPad, probably an old version, without Stereo sample panning facilities.
The other thing that's gotta be considered, in regards to Garage Band, many of its sounds aren't just samples, but are synthesised in various ways, wherein the limits of samples goes right out the window.
-
@iTap-Development I can describe this better:
A stereo sample (.wav) is already panned by the producer. Some of the sound is set to come out the left, some to the right.
Any sound engine that's going to provide further panning control must make one of three choices:
Does panning diminish the sound from one side of the sample, or steer and add sound from one side to the other side? Or, really ugly, blend left and right as if it's a mono recording and then split on demand.
Early sound engines didn't bother making this choice, or providing these choices for the user to decide from.
Quite infamously, this problem existed in Unity for a long time, just as it does in hyperPad, wherein panning simply wouldn't do anything if handed a stereo sample. I had forgotten about this as I've avoided using Unity for quite some time.
-
@Deeeds ok I see.
If that’s the case I would agree an audio engine upgrade would be good. -
@iTap-Development Yeah, audio is the secret sauce of all great entertainment. The best of the reasonable options, far and away, is this: https://www.fmod.com
And they're very nice people, too. Truly passionate and committed to their art and craft.
-
Here's a secret... We're actually switching the audio engine :).
We're working on swapping to this engine for audio: http://audiokit.io/We're going to start by swapping over existing functionality, then overtime add the other cool features that audiokit enables.
-
@Murtaza Have you tested it? I vaguely remember seeing rumours concerned about its performance when contrasted with others.
-
@Deeeds
We've done some early tests and it was fine. Since in our case we're not really using it at the scale of other game engine it was performing fine.Additionally, since we're starting with limited functionality (just replacing existing audio in hyperPad) we're using the "simple" stuff the audio engine provides. They've also been advancing quite a bit over the past year.
-
@Murtaza I just checked, it's a queuing issue and decompression issue for compressed files I'd read about (mp3 etc) so perhaps add a feature that decompresses user files that are compressed and I think it's otherwise good.
-
@Murtaza I think a really cool feature would be to be able to creat and export an audio file to send or save on iPad. So basically being able to make an app like garage band.
And even export images from a drawing app. -
@iTap-Development Even cooler would be using hyperPad as an audio mixer and funneling it into garageband in real time :wink: