How do I normalize a file and save it as a new file?

Apr 4, 2009 at 2:00am

How do I normalize a file and save it as a new file?

Hello all.

I am very new to Max/MSP and I have a question that is probably fairly noobish, but I’ll ask it anyways.

I want to create a patch that will read a sound file into a buffer, normalize it, and then write out the normalized sound into a new file. I know I can play the normalized sound file and then record it while it’s playing, but I’d prefer an automated process (my goal being to eventually create a patch that will be able to do a variety of sound file manipulations automatically, but I’m starting with something easy).

I’ve tried doing this any number of different ways but none seem to work. I’m sure there is a very easy answer to this, so I thought I would ask all of you nice people here.

Thanks,
mh

#43195
Apr 4, 2009 at 2:05am

If you load your soundfile into a [buffer~] you can then send the command the message “normalize 1.0″ (no quotes of course) to the [buffer~] and this will have the effect of normalizing to 0dB. Any float number can follow “normalize” and then the highest pick will be scaled to that value.

#154873
Apr 4, 2009 at 2:39am

To copy the buffer into another one, then normalize it, you may also use [mxj buf.Op]. Comes with a help file. Look at copyFrom and normalize methods.
J-F.

#154874
Apr 4, 2009 at 3:03am

Thanks,

I’ll give that one a try. I appreciate the help.
mh

Jean-Francois Charles wrote on Fri, 03 April 2009 19:39
To copy the buffer into another one, then normalize it, you may also use [mxj buf.Op]. Comes with a help file. Look at copyFrom and normalize methods.
J-F.
#154875
Apr 4, 2009 at 3:30am

[mxj buf.Op] is a handy object you should definitely check out, but if all you need to do is normalize your sound and save a new soundfile, using two [buffer~]s and [mxj buf.Op] is more than you need. For example:

– Pasted Max Patch, click to expand. –
#154876
Apr 4, 2009 at 3:42am

I knew there was an easy solution. Thanks very much!
mh

Roth wrote on Fri, 03 April 2009 20:30[mxj buf.Op] is a handy object you should definitely check out, but if all you need to do is normalize your sound and save a new soundfile, using two [buffer~]s and [mxj buf.Op] is more than you need. For example:

– Pasted Max Patch, click to expand. –
#154877
Apr 4, 2009 at 3:54am

No problem. It is a good thing I checked before giving you my first off the top of my head solution. I was going to have you use the [waveform~] object (also has a normalize command) because any of my patches that I’m dealing with needing to normalize a buffer has always been in situations where I’m using a [waveform~] with that [buffer~] and I have gotten into that habit.

I mention this because if you aren’t familiar with it yet, you should check out [waveform~] because I have a feeling you may want to use some of its features soon.

#154878
Apr 4, 2009 at 8:58am

Yeah, I like waveform~ a lot. Here’s a variation of what you did using waveform. Again, thanks for help.
mh

– Pasted Max Patch, click to expand. –

Roth wrote on Fri, 03 April 2009 20:54No problem. It is a good thing I checked before giving you my first off the top of my head solution. I was going to have you use the [waveform~] object (also has a normalize command) because any of my patches that I’m dealing with needing to normalize a buffer has always been in situations where I’m using a [waveform~] with that [buffer~] and I have gotten into that habit.

I mention this because if you aren’t familiar with it yet, you should check out [waveform~] because I have a feeling you may want to use some of its features soon.

#154879

You must be logged in to reply to this topic.