|
|
|
09-18-2020, 10:09 AM
|
#1
|
Human being with feelings
Join Date: Jan 2019
Posts: 51
|
Destructive normalize
Hi, I always thought that was kind of a hassle when you've just rendered something out and you need to normalize it, but you also want to keep the same name, instead of naming it "my awesome track-normalized.wav" or renaming the old file "my awesome track-unnormalized.wav", dragging it back into your project, and rendering it as my "awesome track.wav", but then of course sending it off, only to realize that when you dragged it back into the project, you forgot to turn off the mastering, and so it got mastered twice.
Now that I know some Reascript, I've made a solution!
https://github.com/bosterho/Reascrip...0normalize.lua
It works the same way as Melodyne. When you make a new render it renames the old un-normalized file to "my awesome track-orig0.wav", incrementing the number if you normalize more than once.
Last edited by Ben Osterhouse; 10-03-2020 at 10:34 PM.
|
|
|
09-18-2020, 03:52 PM
|
#2
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
Does it preserve all metadata chunk ?
Cause that was something I experimented with ffmpeg-normalize etc.
|
|
|
09-18-2020, 05:04 PM
|
#3
|
Human being with feelings
Join Date: Jan 2019
Posts: 51
|
No it doesn't. I found your script Set selected items sources TagLib metadatas.lua, so I see it's possible to write previous metadata to the newly normalized file.
I was just thinking about ffmpeg for this actually! If you could normalize the audio from a video without having to render the video again that would save a lot of time.
Couldn't you just have the Reascript re-write the metadata after it runs ffmpeg normalization?
|
|
|
09-18-2020, 05:19 PM
|
#4
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
This TagLib still works but taglib is just id3, not the other chunk,
FFmpeg surprisingly enough doesn't preserve all chunks either,
I end up building up my own "inject all metatdata chunk from one source to another" script, and it works very nicely, I think it is the only solution I found who does it all. I'll surely make a script pack for it.
|
|
|
09-18-2020, 05:34 PM
|
#5
|
Human being with feelings
Join Date: Jan 2019
Posts: 51
|
Ok interesting. I looked and didn't find any functions for getting the metadata state chunk. Do you have to read it straight from the wav file or something? That would be very difficult I'm sure.
|
|
|
09-19-2020, 01:47 AM
|
#6
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
Yes exactly, I needed to decode wave files chunks to be able to recreate a new file with them.
I spent a lot time on various wav file definition pages... ^^ but now the copy is bit perfect and have extra feature like updating cue markers or even dxChannelMask... all preserving other chunks.
|
|
|
09-19-2020, 06:18 AM
|
#7
|
Human being with feelings
Join Date: Jan 2019
Posts: 51
|
Very cool!
|
|
|
09-19-2020, 02:14 PM
|
#8
|
Human being with feelings
Join Date: Jan 2019
Posts: 51
|
I tried normalizing with ffmpeg, and when I used loudnorm to do a double pass on a longer video, it took almost as long as it would have to just re-render the video in Reaper. O well.
I'm just realizing, you probably had to find all the metadata for all the different formats (mp3, mkv, mp4) too! That's a lot.
|
|
|
09-19-2020, 04:13 PM
|
#9
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
@Ben Osterhouse
Oh no, I just care about WAV !
All format... this would be quite hard.
|
|
|
10-03-2020, 10:02 PM
|
#10
|
Human being with feelings
Join Date: Sep 2016
Location: Toronto
Posts: 744
|
Awesome stuff, Ben. Any chance of a version that works on the selected item in the media explorer?
|
|
|
10-03-2020, 11:26 PM
|
#11
|
Human being with feelings
Join Date: Jan 2019
Posts: 51
|
I suppose it would be possible to make an action where it would put files from the media explorer into the current project, do the normalization, then take them back out again, but I'm not sure --Maybe something to try sometime.
|
|
|
10-04-2020, 01:54 PM
|
#12
|
Human being with feelings
Join Date: Jan 2019
Posts: 51
|
Ok I tried it, and actually it's totally possible! I put it on my github if you want to give it a try: https://github.com/bosterho/Reascripts
Note that it uses the Ultrashall Api.
|
|
|
10-04-2020, 04:39 PM
|
#13
|
Human being with feelings
Join Date: Sep 2016
Location: Toronto
Posts: 744
|
Thanks Ben for taking a crack at this!
I ran it and am getting an error:
...EAPER\Scripts\Media explorer normalize selected item.lua:44: attempt to index a nil value (local 'filenamebuf')
I wonder if it's because I'm on the recent dev version of REAPER with the Media Explorer changes.
|
|
|
10-04-2020, 04:53 PM
|
#14
|
Human being with feelings
Join Date: Jan 2019
Posts: 51
|
That's strange --Somehow it's not getting the filename of the item after inserting it. I haven't checked out the development builds yet, but yeah, maybe it would work on a normal build.
|
|
|
10-04-2020, 06:09 PM
|
#15
|
Human being with feelings
Join Date: Jan 2019
Posts: 51
|
A simple feature like this probably isn't worth sorting out haha, but still, it does make me wonder... so I got the development build. I'd been meaning to check that out at some point anyways. I still didn't get the error you got. I wonder if it has to do with the operating system --I'm on Windows. I also found it freezes up Reaper if you try to do it to mp3's :P
|
|
|
10-04-2020, 06:31 PM
|
#16
|
Human being with feelings
Join Date: Sep 2016
Location: Toronto
Posts: 744
|
Very bizarre- I'm not getting the error at all now, but the script wasn't working, so I edited the first ultraschall.mediaexplorer_oncommand to action ID
41001 "insert item on new track"
and it works great now! So confused but happy it's working. Thanks so much for this, Ben.
|
|
|
10-04-2020, 06:35 PM
|
#17
|
Human being with feelings
Join Date: Jan 2019
Posts: 51
|
Cool! Yeah that action makes more sense.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 07:17 PM.
|