MAX COMPRESSOR

Dryland studio's icon

Hi all, I built a compressor on max but it doesn't work! Where am I going wrong?

TFL's icon

Please post your patch in addition to the screenshot, so we can play with. Select all objects then Edit menu > Copy compressed. And paste here.

I can't say about the global logic, but here you should connect the [mstosamps~] outlet to the [int] leftmost outlet instead of its right one. Otherwise it wont output anything.


Dryland studio's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I tried deleting the int object but instead of compressing it increases the volume!

Roman Thilenius's icon

the lower atodb cries for becoming a dbtoa.

Dryland studio's icon

now it works I don't believe it was just this thing thanks!!

Can you explain the concepts of amplitude and decibels better?

What is the difference between dbtoa~ and atodb~??

Amplitude are the max numbers that go from -1 to 1 in the case of bipolar audio, while decibels are the audio conversion itself?

Roman Thilenius's icon

whoever made that patch wanted to use db for the internal workings, and to do so you would scale linear to db when the signal goes into the process - and the opposite when it goes out again.

if you do it two times in a row you produce nonsese numbers of no meaning, as the *~ wants 0 to 1 and not -∞ to -0

the conversion of linear to decibel is a logarithmic scaling, for example something like max((log10($f1)*20)\,-758.), to undo it you would use (pow(10.\, $f1*0.05))*($f1!=-758.)

you might have heard about the thumb rule that plus (roughly) 6 decibel makes a signal twice as powerful. that´s why some people like to use it in dynamics processes. the alternative is to scale all parameters and GUI controls likewise.

Peter Ostry's icon

DRYLAND STUDIO asked:

What is the difference between dbtoa~ and atodb~?

dbtoa = dB-to-analog = convert dB number to analog value.
atodb = analog-to-dB = convert analog value to dB number.

Audio people are used to thinking in dB and reading and evaluating these values. But because decibel is a relative unit for measuring sound, it cannot be used directly for calculations in electronics (and in digital programming). If something is to be set in dB, the given value must be converted into the analogue equivalent (dbtoa). If you want to output decibels after a process, you convert in the other direction (atodb).