SpecScript 1.8 - 5.1 AND 7.1 upmix scripts and utilities (now 1.9)

QuadraphonicQuad

Help Support QuadraphonicQuad:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

zeerround

Moderator
Staff member
Moderator
QQ Supporter
Joined
Apr 11, 2010
Messages
937
Here is the third public release of the next generation of my Spectral Upmix tools.

https://surroundbyus.com/sbu/download/SpecScript 1.9 Release.zip

The 1.9 change is due to the different cmd/terminals available in windows 11. SpecWeb needs the older version, which is no longer the default. Version 1.9 creates desktop shortcuts that use that older version, so you don't have to change your default, if you don't want to.​
There is also a bug fix, in 1.9, with at least one user reporting "[results are] far more better" with 1.9.​

First (circa 2006) there was "Spec" in Plogue Bidule, Then "SpecWeb" standalone in windows, and now in 2022 a set of opensource windows batch scripts and utilities for upmixing stereo to 5.1 and 7.1 surround.

Just Drag and Drop one or more stereo files the SpecScript.bat file and choose an upmix methos. I suggest you start with “5.1 feeling lucky upmix”, as it will automatically choose the "best" option for your input from the 6 other 5.1 methods, the two 7.1 methods, and the latest SpecWeb 5.1 method.

The output will be a multichannel flac file (6 or 8 channels as appropriate) with all tags and artwork copied from the stereo source.

SpecScript, by default, automatically measure the dynamics of the Stereo and Upmixed files, and set the parameters of a mastering limiter VST, such that the final upmix output loudness and peak levels should match that of the original Stereo to within 0.5dB (an in-audible difference).

The output files will be in the same directory as the input files. Output files are named such that you can tell which script/method was used.

Installation

If you have previously installed any version of SpecWeb, and use any Dot Net programs, there is likely nothing to install. Just unzip the distribution and you are ready to go.

If not, double click on "Install_SpecWeb.bat", and follow the instructions to install any needed libraries.
Parts of SpecScript (CenterCut) also need dot net 3.5. Windows should prompt you if you need it.

Please see the SpecScript 1.8.pdf file for more information.

Thanks to the QQ and SurroundByUs users that helped in getting SpecScript to this point. Over 1200 stereo tracks upmixed and tested to date.
 
Last edited:
Here is the first public release of the next generation of my Spectral Upmix tools.

Download: https://surroundbyus.com/sbu/download/SpecScript 1.7 Release.zip

First (circa 2006) there was "Spec" in Plogue Bidule, Then "SpecWeb" standalone in windows, and now in 2022 a set of opensource windows batch scripts and utilities for upmixing stereo to 5.1 and 7.1 surround.

Just Drag and Drop one or more stereo files onto one of the scripts. I suggest you start with “5.1 feeling lucky upmix”, as it will automatically choose the "best" option for your input from the 6 other 5.1 scripts, and the latest SpecWeb 5.1 method.

“5.1 feeling lucky upmix”, "SpecScript Balanced.bat", "SpecScript Phantom Side.bat", "SpecScript Wide Center.bat", "SpecScript Wide Front.bat", "SpecScript Wide Rear.bat" and "SpecScript Wide Center w Balanced Rear.bat" will output a 5.1 flac file.​

"SpecScript 7.1 sides first.bat" and "SpecScript rears first.bat" will output 7.1 flac files.

SpecScripts, by default, automatically measure the dynamics of the Stereo and Upmixed files, and set the parameters of a mastering limiter VST, such that the final upmix output loudness and peak levels should match that of the original Stereo to within 0.5dB (an in-audible difference).

The output files will be in the same directory as the input files. Output files are named such that you can tell which script/method was used.

Installation

If you have previously installed any version of SpecWeb, and use any Dot Net programs, there is likely nothing to install. Just unzip the distribution and you are ready to go.

If not, double click on "Install_SpecWeb.bat", and follow the instructions to install any needed libraries.
Parts of SpecScript (CenterCut) also need dot net 3.5. Windows should prompt you if you need it.

Please see the SpecScript 1.7.pdf file for more information.

Thanks to the QQ and SurroundByUs users that helped in getting SpecScript to this point. Over 1200 stereo tracks upmixed and tested to date.
Out of curiosity clicked on the link and get
1658007791575.png
 

More Detail​

SpecScript 5.1 Feeling Lucky upmix.bat

Automatically chooses a method from the 6 different 5.1 upmix scripts, and from SpecWeb, included here, based on the most equal channel loudness (whole track). This may not be the "best" possible upmix choice, depending on your taste or specific stereo mix, but is going to spread the stereo mix the most evenly across the 5 channels.​
It will also choose SpecWeb (Mode4) as an upmix method if it detects a track where SpecScript would result in a center channel that is lower in loudness than the fronts.​

"SpecScript Balanced.bat" splits the stereo soundfield into 5 equal parts and assigns them to the 5 surround output channels.

An LFE signal, <=90Hz -11dB below the other channels, is included for 5.1 completeness, and is properly time/phase aligned, but also low enough not to mess with the full range signal in the other channels (The applies to all the SpecScript upmix scripts).

The rest of the SpecScript scripts split the stereo soundfield into 7 parts. Output channel assignment of the parts is as follows (given the split parts as lf, rf, c, lss, rss, ls, rs, where "ss" = "side surround". Output channels are in upper case):

SpecScript Phantom Side.bat​
C = c​
LF = lf + 0.5 lss​
RF = rs + 0.5 rss​
LS = 0.5 lss + ls​
RS = 0.5 rss + rs​
SpecScript Wide Center.bat​
C = c + lf + rf​
LF = lss​
RF = rss​
LS = ls​
RS = rs​
SpecScript Wide Center w Balanced Rear.bat​
C = c + lf + rf​
LF = lss​
RF = rss​
LS = ls from the balanced 5.1 script​
RS = rs from the balanced 5.1 script​
SpecScript Wide Front.bat​
C = c​
LF = lf + lss​
RF = rs + rss​
LS = ls​
RS = rs​
SpecScript Wide Rear.bat​
C = c​
LF = lf​
RF = rs​
LS = lss + ls​
RS = rss + rs​
SpecScript 7.1 sides first.bat​
Channels are assigned 1:1​
Channel order in output file is LF, RF, C, LFE, LSS, RSS, LS, RS​
SpecScript 7.1 rears first.bat​
Channels are assigned 1:1​
Channel order in output file is LF, RF, C, LFE, LS, RS, LSS, RSS​

The stereo files: "LR Sweep Noise.wav" and "11 ch Left to Right Mixdown.wav", are included as a way to illustrate the workings of all the scripts.

Drag and drop these files on the upmix scripts and then listen to and view the input and output waveforms in the audio tool of your choice, to visualize what is going on.
 

11 Slices Visualization​

Here are some graphics to help you visualize the operation of the different upmix scripts (The stereo file "11 ch Left to Right Mixdown.wav" is included with SpecScript)::
Slide2.PNG


Slide3.PNG
Slide4.PNG
Slide5.PNG


Sweep Noise Visualizations​

(using the included L R Noise Sweep file):
Slide7.PNG


Here is what happens with the 5 different 5.1 Upmix scripts (now there is a 6th script and also SpecWeb):

Slide8.PNG
Slide9.PNG
Slide10.PNG


The two 7.1 Upmix scripts are the same, they just have different channel orders, in case your system is set up one way or the other (there really isn't a standard):

Slide11.PNG



So it's really quick and fun to drop a stereo file on the different scripts, and check out the different results. Easy to pick the "best" for each stereo track.

Dropping the "11 ch Left to Right Misxdown.wav" file on each of the SpecScript upmix scripts, and listening to the results is a great way to get familiar with SpecScript.
 
Excellent job and visuals Z!! Thanks so much for all your hard work my friend! Been using them both for a while and always impressed with the new additions! Can’t wait until you can do it up to Atmos mixes!!!
 
Thanks Zeerround,
I'm really enjoying making new upmixes with these various Specscripts.
My favorite is the Phantom side. bat, Some trippy things occur with the soundscape when using
it on various tracks.

 
So I took a song I recently mixed from stems and compared to the "feeling lucky.bat" output. Not bad, but seemed pretty loud.
The stereo LUFS as measured by Audition was -21. The mch one from SpecScript was -14.xx LUFS.
What are you using to measure the loudness with?
 
You can drag the stereo and upmixes onto "SpecScript - 1.7 Release\Measure-Levels.bat"

To see an apples to apples comparison.

That uses GitHub - jiixyj/libebur128: A library implementing the EBU R128 loudness standard. for the EBU R 128 standard measurements and it seems to track with LUFS VSTs out there.

ASFAIK the LUFS measurement in Audition says "Legacy" so I don't know what it's doing.

That said, in the next version of SpecScript, all the mastering VST parameters will be adjustable in the ini file, if one should desire less "loud" than the default of matching the stereo LUFS.

Hmm, maybe I should include an loudness offset, so you could still automatically set the loudness, from the stereo, but quieter (or louder) by X LUFS?
 
You can drag the stereo and upmixes onto "SpecScript - 1.7 Release\Measure-Levels.bat"

To see an apples to apples comparison.

That uses GitHub - jiixyj/libebur128: A library implementing the EBU R128 loudness standard. for the EBU R 128 standard measurements and it seems to track with LUFS VSTs out there.

ASFAIK the LUFS measurement in Audition says "Legacy" so I don't know what it's doing.

That said, in the next version of SpecScript, all the mastering VST parameters will be adjustable in the ini file, if one should desire less "loud" than the default of matching the stereo LUFS.

Hmm, maybe I should include an loudness offset, so you could still automatically set the loudness, from the stereo, but quieter (or louder) by X LUFS?
OK. I'm just trying to figure out the best way to normalize my mixes, and frankly I guess I don't know what Audition does either, but I think by "legacy" they are talking about the rms values Audition also shows in several flavors.
The song that measured so low in LUFS in stereo was pretty much par for the course for Audition's measurements of several songs from that album. It's the SACD of America's first album, and the one I mixed/tested was Riverside, although I know at least Sandman is pretty low as measured in Audition.

You know way more than I do about such things, it's just that i use Audition a lot for mixing/resampling/etc so that's what I've been going by.

I'm about ready to just set everything at -15 LUFS and be done with it. lol.
 
OK just to verify, your utility and Audition agree with each other. So Riverside is at about -20 LUFS and after upmixing was -14.
So there is no correlation with the original as far as loudness.
The problem, as you know isn't even solved by using the original stereo measurement if you have a mixed bag of songs. e.g. some Riverside stereo is pretty loud and the previously referenced America is not.
========================================================================
I was only half joking when I said I want to just normalize everything to -15 LUFS. If you have to keep adjusting the volume on your listening device, then with a mix of different songs it could be tedious I guess, but this thought has nothing to do directly with specscript, just my own musings.
 
Last edited:
I wanted to know more about LUFS in audition. Guess there is more than just the "Legacy" per channel measurements I was referring to in "Stats"

Top search hit was this short YoutTube on matching loudness across tracks:

In SpecScript 1.7 you can turn the mastering limiter off, and then master in audition, if you prefer. Same for SpecWeb.

Again, by default SpecScript and SpecWeb match the surround loudness to the Stereo to within 0.5 LUFS (typically), which should be an in audible difference.
 
OK just to verify, your utility and Audition agree with each other. So Riverside is at about -20 LUFS and after upmixing was -14.
So there is no correlation with the original as far as loudness.
The problem, as you know isn't even solved by using the original stereo measurement if you have a mixed bag of songs. e.g. some Riverside stereo is pretty loud and the previously referenced America is not.
========================================================================
I was only half joking when I said I want to just normalize everything to -15 LUFS. If you have to keep adjusting the volume on your listening device, then with a mix of different songs it could be tedious I guess, but this thought has nothing to do directly with specscript, just my own musings.
That's what "replay gain" is about I guess. I don't use it but then I don't do much casual listening.

If there is a "replay gain" tag in the stereo, it will get copied to the upmix by SpecScript/SpecWeb, and should still be fine, based on the loudness of the stereo and the upmix being as close as possible. The upmix can always be retagged via whatever replay gain utilities you have.

I'm curious as to which "Riverside" track you are referring to.

FYI in SpecScript, things that have a max stereo peak below -6dB are handled differently than louder stuff. Is the track you are talking about one of those?
 
That's what "replay gain" is about I guess. I don't use it but then I don't do much casual listening.

If there is a "replay gain" tag in the stereo, it will get copied to the upmix by SpecScript/SpecWeb, and should still be fine, based on the loudness of the stereo and the upmix being as close as possible. The upmix can always be retagged via whatever replay gain utilities you have.

I'm curious as to which "Riverside" track you are referring to.

FYI in SpecScript, things that have a max stereo peak below -6dB are handled differently than louder stuff. Is the track you are talking about one of those?
Well the track I did comparisons between was the song "Riverside" from the SACD of America's first album. This is the one with the low LUFS value of -20. Actually I think most if not all tracks from that SACD are fairly quiet (LUFS values around -20)

The other reference, to Riverside having loud tracks is the Polish band Riverside, like the one I sent you previously mixed from stems. The album is "Riverside - 20 The Shorts and the Longs", and some are mastered pretty darn loud, especially the radio edits.

Time is always the enemy but I hope to check out all the methods in SpecScript soon. I have done a sort of "blended" mixing from the old Plogue SPEC with stems before, and I see myself doing that more with SpecScript + stems as SpecScript is more adept at pulling out some elements than demucs stems.
Mix paste function in Audition especially helpful (for me) as you can set the level to be applied instead of the kludgy way I was doing it in Plogue.

Apologies for veering a little from the topic here I guess but much of what I incorporate into mixing is garnered from tips and/or methods you've made, just my process is a little different and I'm still a novice.
Now with the evolution of SPEC into SpecScript it could be like having a whole new toolbox to work with.

Big time appreciation & Kudo's for tying so many elements together in an automated program!
 
Re: America's Riverside. It took me a while to find the SACD source with "-20" LUFS. The Tidal and CD sources were both -14.

Anyway, here are the SACD stereo source loudness measurements:

1659205805063.png


SpecScript "feeling lucky" chose SpecWeb as the best upmix. Here is the dynamics results from that:

1659205897368.png


That is over my target 0.5 LUFS difference between stereo and upmix, but not 4 or 5 LUFS as reported.

I'm looking at ffmpeg loudnorm as an option to the VST limiter. (Manually) using that instead of the VST we get:

1659206608209.png


So for LUFS and TP that is more accurate, but it did compress the dynamic range by ~0.5dB (should be no biggy).

I just don't know yet if the sound quality of ffmpeg loudnorm is as good as with the VST. Perhaps in SpecScript 1.8 I will make using loudnorm, vs. the VST, optional.
 
Still....I get the same repeatable results of -14.xx LUFS. Already confirmed specScript's measurements same as Auditions. So what now chief? I already have to do it all manually with stems so not a big issue for me.
Why we both get different results is unknown to me. I am working at 88.2 from the SACD rip, but that should make no difference, right? When downsampled to 44.1 I haven't seen any differences in dynamics.
 
Mystery solved. Boondocks stereo source looks like this:

1659290828617.png


Note the True Peak and max peaks of his source are at ~-9.3 where as my source (with similar loudness) had peaks of ~-4.1.

SpecScript/Web treats sources with max peaks below -6 differently than other tracks. It sets the max peak to -6 for those, rather than keeping it the same as the source. I honestly don't remember why, other than my loudness matching test of Styx AD 1928 and Rockin' The Paradise where AD 1928 is really quiet but ends mid word and Rockin' the Paradise is "loud' but starts on the next syllable of the word. SpecScript/Web will process those two tracks so it each syllable of Pa-ra-dise is equal loudness.

Also I think my assumption was that stereo sources with peaks below -6 are pretty unusual. Boondock's comes from an SACD 352KHz rip, so...

Even "quiet" classical tracks I have seen have peaks louder than -6. Anyway the result for Boonkock's version was the upmix loudness measures higher because the whole thing was made louder by 3.33 dB, the dynamic range doesn't change (much) so I think the way things are working is fine.

I'll look at adding an ini flag to keep the max peaks of all tracks the same as the stereo, however, if anybody wants that.

FYI for those of you with me deep in the loudness weeds, after a day of messing with ffmpeg's loudnorm it's pretty much a bust. One of my regular test tracks comes out with horrible loudness "pumping", so the Unlimited VST is still the best (free) approach for dynamics processing.
 
Back
Top