I'm trying to create a sort of audio 'map' based on where an object is related to another; It's alternating between the player_character active, and an invisible central node; Still trying to decide if it's better to do it from the character perspective of the player or the character.
Distance from an object has an effect on pan and volume. This part I've got done and it works perfectly. My challenge is changing the pitch of a sound based on it's vertical (Y axis) position in the frame.
Objects that emit sound positioned higher than the player would have a higher pitch and those positioned lower would have a lower pitch. As the player comes near to those objects the pitch would normalize and change appropriately as their relation to the player via positioning.
I've got some idea of how-how to do it, I've got what I think is the math for raising the pitch. but not for lowering it.
Here's an example of my event(s)
This will raise the pitch as the emitter gets higher above the player, and it will normalize as they get closer. but the sample will immediately cut out once they get above it. I'm not sure what the math for that would be;
Not sure on this one; doesn't seem to work.
I plan to make the adjustment more subtle; I'm using /6 and *6 to make the changes more obvious during testing.
Maybe there's another equation I could be using entirely?