Theory In Practice

Where was I? Oh yes, realistic audio level over distance.

Building upon the applications, the Audio Level over Distance Theory model was implemented into the Max patch. This segment that was created for an earlier experiment has formed most of this Max patch. The experiment was successful and allowed for the Max/MSP patch to not only create a more realistic attenuation model, but to simplify the part of the patch that receives and translates a playable character’s position.

The theory put into practice in this experiment creates a realistic simulation of audio level over distance and will be put into the final Max/MSP created application. An option to switch between the basic version and the theory version of this audio effect will also be implemented, to allow the end-user to compare the differences.


——–Application Downloads——–

Mac – Realistic Audio Level using Max/MSP –
Windows – Realistic Audio Level using Max/MSP –

Nodes are most definitely awesome

After a bit more play around with nodes, I have gotten the players position and the cubes position from the basic audio Unity 3D app mapped nicely onto the node object. Very wizard indeed.

If I have enough time at the end of the project, I will jazz it up a bit and use it as the basic audio over distance model on the final program.

It may also come in handy sooner than that. Although not next on the list, as I’m finishing off level over distance I’m researching more and more into reverb. Unity 3D uses something called reverb zones which are essentially triggers for different reverb settings. Why make something complicated if I can mangle this object to my will and have that create “reverb zones”

Nodes are awesome

Nodes are pretty wizard. I came across them in Max/MSP while working on a UI concept for the final program.

Basically, it’s a Max/MSP object that not only shows a mouse/cursor position on an XY pad… But circular objects can be placed on it too. The objects can be changed in size and can overlap each other. When the cursor is placed within one of these objects, the scale between 0. and 1. will increase/decrease in relation to the distance of the centre point of that circle.

Notice something?

It’s very similar to what I achieved with the basic level model. I may redo that model for the final program using this new method. It certainly looks better, it makes the Max patch more simple and it may save resources too.


You want to see the UI I’ve got in mind? Here is what I’m working on…


Theory comparison to Proximity plugin

As earlier research stated that with each doubling of distance from the audio source, the volume should attenuate by approximately 6 dB. I decided to compare the result to a very cool plugin called Proximity by Tokyo Dawn Labs and Vladg Sound.


The result is…. It works. Very well in fact. They are similar which means that Tokyo Dawn’s Proximity must use the same algorithm as the general free field conditions. Now to make it work with Unity 3D.

Audio Level Over Distance Theory

So I’ve found out that the decibel ratio calculation can be applied using the following calculation sourced from Angus and Howard (2006, pp.17)

Difference in dB = 20*log(Original reference distance/Distance from sound source)

It’s took a longer time than anticipated to form this calculation into a Max/MSP patch, mostly down to user error. Max/MSP is very particular of how things are spelt and expressed.

I also found an easier way to do the calculation along the way. Version 2 will be the version of the “real world” part used for the rest of the project.

——–Application Downloads——–
Mac – dB over distance conversion –
Windows – dB over distance conversion –

Angus, J. and Howard, D. (2006) Acoustics and Psychoacoustics. Great Britain: Focal Press

Max update, not to be… yet.

I’ve noticed that Max has an update that I’m not currently running.

For stability sake though I’m going to keep on Max 6.1.2… Like I done with Unity 3D. I know there “won’t” be any issues, but if something does go kapoop my project is over there and then.

I need to remind myself to upgrade and switch back to 64-bit mode once this project is complete though. What better place than here? consider yourself reminded, me.

Basic Audio Level using Max

I’ve got a basic version of audio level working in Max/MSP. Sound decreased the further away from the cube.

One thing I did note was that I was using + (addition) to combine the x and y axis together, which didn’t quite work out how I expected. It would be at its loudest point when directly on an axis than just off to the side of it. I then used the * (multiplication) object and it worked how I thought it would in the first place… You know what? just watch the videos it will make a lot sense than I think I am now.

The first video is using addition and the issue it creates, the second shows how that is fixed by using multiplication instead.

Looking back, it makes complete sense using * instead of +. Now I plan to make it even better, adding in the theory I learnt previously.


As always, here are the downloads to this experiment:

——–Application Downloads——–
Mac – Audio Level using Max/MSP –
Windows – Audio Level using Max/MSP –