Feature Request: Lossless Compression in SGW Files

Enhancing Packed Song Format

In the current version of n-Track, the Save As Packed Song File feature allows one to instantly “zip” a project’s waves, peaks, and song file into a single, easy to extract file.

It offers the option of compressing the wave files in Ogg Vorbis format. You can also choose to leave them uncompressed.

What I’d like to see is the implementation of any type of mathematically lossless compression scheme (APE, FLAC, WMA9 Lossless, etc.). I believe it would make this feature even more useful.

What does everyone else think?

Sure…I could go for that… :cool:

Tony

Im currently using FLAC in my computer instead of APE. It has a not so high compression Ratio like APE, but have some advantages. One of them is that it dont involves (AFAIK) license issues. Also, FLAC appear to be less CPU consumer than APE, and can be good also for support when tracking. By example, the Krystal freebie multitrack using it. Another reason is that appear to be that FLAC has a better encoding for avoid corruption, i mean, in the past i have been using APE, but for some reason (disk failures i believe) they become corrupt. If the APE file become corrupt in the first seconds of the song, ALL the song become un-useable. Flac has a way it encodes that avoid that.
But, looking the “compatible” side, WMA will win (isnt?)

Well, this must be said, if you want compression for backup…mmm… get a DVDRW. If you want compression for collaboration trough internet, it can be ok.

Well, all this info is not from a technical guy, maybe some data is not totally accurate, but i believe that the idea is ok.

I’v never had a need or wish for it…

I use the pack feature to archive to CD or DVD.

Never had a sgw file that didn’t fit onto a DVD.

If I wanted to reduce the file size you can just zip the sgw file…
Not sure how the compression ratio of zip compares to APE or FLAC…

[edit] Using APE, FLAC etc will take more CPU to play back unless you convert back to wav when you unpack… in which case you may as well just zip the sgw and then unzip it later[/edit]

Rich

Quote (RichLum @ May 24 2005,19:44)
If I wanted to reduce the file size you can just zip the sgw file…
Not sure how the compression ratio of zip compares to APE or FLAC…

Zipping isn’t really the most effective method for losslessly compressing audio files. Here’s an example using Midnight Toker’s song On A Roll from the download page

Song Directory (no packing or compression) - 154 MB
Song Directory (zipped) - 110 MB
Packed Song File (no compression) - 153 MB
Packed Song File (zipped) - 109 MB
Song Directory (using WMA9 Lossless Compression) - 64.9 MB

As you can see, the lossless WMA directory is significantly smaller than the zipped song directory. That could save hours of upload/download time in some cases.

Keep in mind that the 109 MB zipped Packed Song File is the exact same quality as the 64.9 MB Lossless directory. Only the file sizes are different.

<!–QuoteBegin>
Quote
Using APE, FLAC etc will take more CPU to play back unless you convert back to wav when you unpack…

n-Track does this already, as it can only play wave files.

Example:

1. Use n-Track to pack a song with OGG compression.

2. Open the resulting Packed Song File.

3. Note that the OGG files are automatically converted to waves.

I hope this made sense. If it didn’t, lemme know!

Hi J…

I not sure if were on the same page but the OV compression method (Ogg Vorbis as well as a Canadian beer called Old Vienna) does allow for lossless compression. My writing partner lives about 60 miles away so when we are working on a song independently we send .sgw files back and forth to keep us in sync regarding the mix using the internet. When you access the File>Save as Packed Song file utility and you slide the Compression Setting button all the way over to the right the display indicates “no compression”. Keep in mind that if your song file contains six tracks of wave files and the average size of each file is 40 meg then the related .sgw file will be at least 240 meg plus the the related .sng file size.

What we have been doing to get around the file size issue regarding e-mail is to transfer the file using Skype. If both parties are using hi speed the transfer speed is about 4 meg per minute. The 240 meg .sgw file would take about an hour to transfer but it sure beats driving or using couriers.

As I mentioned earlier if your attemting file transfer without loss then the above works for me…

Chris

Yeah, but if you could accomplish the same thing with a file that was a quarter the size, that would be probably make the whole trading completed files over the internet thing that much more useful. Then people could pass the same song back and forth in 15 minutes.

KS

Quote (chrisd @ May 25 2005,01:34)
Hi J…

When you access the File>Save as Packed Song file utility and you slide the Compression Setting button all the way over to the right the display indicates “no compression”.

Hi C (haha, yet another beverage reference),

Ogg Vorbis actually doesn’t offer lossless compression. From the official Ogg Vorbis FAQ:
<!–QuoteBegin>
Quote
As always, if you need CD-quality sound, neither Vorbis nor MP3 (nor any other lossy audio codec) can provide exact reproduction; instead, consider using a lossless audio compression scheme like FLAC.

The no compression setting acutally means no compression!

A quick way to test:

1. Import a single wave file into a song.

2. Pack it.

3. Compare the file size of the Packed Song File with the original wave file.

My test…
Mahavishnu.wav = 96.5 MB
Mahavishnu.sgw = 96.6 MB

On the other hand, this same file in Lossless WMA format is only 54.5 megs.

And for those of you who want more info regarding lossless codecs, I posted a little experiment over at AudioMinds a little while ago regarding the integrity of the lossless compressed files. The link is here, but I’ll go ahead and paste it:

The Tools:
dBpowerAMP Music Converter
PrestoSoft ExamDiff Visual File Comparison Tool
Visualization Software Spectrogram

The Music:
I grabbed my Mahavishnu Orchestra CD entitled The Lost Trident Sessions. (Side note: worst album cover ever.) I picked this song:

Trilogy
i. The Sunlit Path
ii. La Mere de la Mer
iii. Tomorrow’s Story Not The Same

I chose this not because of the pretentious ####### song title, but because it is dynamic, has a broad frequency range, and was recorded on tape (which obviously has no brickwall ceiling). It clocks in at 9 minutes and 33 seconds (and ain’t none of it wanking, dammit!).

The Process:
1. Using dBpowerAMP Music Converter, I ripped the track to a 16 bit 44.1kHz wave file.

2. I immediately converted this file to a WMA 9.1 Lossless audio file, leaving the wave file intact.

3. Next, I immediately re-converted this Lossless WMA file back to a 16 bit 44.1kHz wave file. I saved this one to a different directory, because I didn’t want to rename the file and risk screwing up the whole experiment.

4. I pulled up this file comparison utility called ExamDiff to compare the two wave files. The result:

It says the files are absolutely identical.

5. Just to be sure, I ran good ol’ GRAM.EXE on both wave files. They seemed identical, and both contained information in the 16 - 20 kHz area.

The Summary:
It appears that WMA 9.1 Lossless compression truly does not affect the sound quality of a wave file. Additionally, the lossless files were significantly smaller than the waves:

Either Wave file - 96.5 MB
WMA Lossless file - 54.5 MB

That’s a 42 meg difference. Multiply that by 16 tracks in a song, and that’s 672 MB! (And remember, these are only 16/44.1 files.)

So, to me it seems that lossless compression could definitely be valuable for non-destructively transferring exact audio copies over the internet - at least until increased speed & bandwidth makes 672 megs a moot point.

BUT!

If there’s anything anybody would like to add to this (or debunk) please feel free to do so!

Some good info there Jason.

I would probably use the lossless compression to transfer files if it was available (would obviously need both sides to be using n-track… I don’t actually write with anyone else that uses n-track… we usually just use mp3 mixes to work through ideas)

For archiving though I’d leave uncompressed for safety and simplicity.

Thanks for doing the tests

Rich

Hey J,

Thanks for the update…nice choice of music for your test! I wonder what John McLaughlin is doing now…? I also did the same test before I sent the message. I took a .wav track in n-track and saved it as a .sgw with no compression or at least thats what the request box indicates. When I compared the track .wav file size is was just slightly smaller than the related .sgw. I just assumed that because the .sgw was slightly larger that there wasn’t any compression being applied. But it appears that “no compression” and “no loss” are two different issues. I’ll have to investigate this further. The nice thing about the .sgw file is that when loaded on a different machine the n-track .sng env is also restored.

I used to use dbPoweramp to compress the stereo .wav file created by n-track to a .wma file for transferring test mixes.

When someone pointed out that n-track can create a .wma file I just started using that process.

I wasn’t aware of the lossless .wma codec. I think that when I am originally transfering the tracks over the internet I will try the lossless .wma codec. Although I pay a flat monthly rate for my hi speed connection saving personal time is worth something.

Once again, thanks for the information…

Chris

I’m all for lossless compression, but there’s one thought that’s a bit of bothering.

Now, let’s assume somebody wants to make a boxed set of my music, say, twenty years from now. They dig out the cdr disks, that, by a miracle, are stil in readable - or at least recoverable - condition. They probably have an really old computer with Windows ZQ that still works and can read the disks. So, what is in those disks?

If there are a set of .wav files and .sng files, no problem. Wav is such a common format at least some program can still read it. As I habitually record all of my (keeper) .wavs straight from the beginning of the song, they have no problems with track offsets, either. They probably won’t even bother with the .sng file anyway, because it’s pretty probable they don’t have the plugins I once had (not to mention a working UAD-1 card with working software).

If there are a (multi-volume) .zip or .rar file with .wavs in, probably everything’s okay. Those common formats probably survive, at least with some legacy unpacking program they can buy with a serious wad of yuans or rupees. .flac or .ape might be a bit trickier, but still doable.

Now, if there’s just a one big .sgw file, the project might be in a big trouble. While nTS is a great great program, it’s not that common, and even the file extension is pretty cryptic: if the cdrs don’t mention the name of the software, they might never find a way to open the file.

Maybe it would be better to burn a copy of nTS installation file (same version you used with the song) to every archive cdr and hope Flavio’s s/w still works on Windows ZQ.

I am all for having lossless compression built into the packed song format.

At the moment, I tend to back up by converting all the .wav files to .ape, and just burning the song folders to CD (don’t have a DVD burner yet!). In this way, I can usually get two complete song folders on a single disk compared to less than one complete song folder with uncompressed .wavs.

To restore the song, I just copy the whole folder back from the CD, re-convert the .apes to .wavs (maximum 4-5 mouse clicks using dBPowerAMP) and away we go.

Being able to do that within n by just packing/unpacking the song would be great, but actually it isn’t that hard or time-consuming to do without it.

I now need to take a look at FLAC and WMA lossless obviously.

Cheers,
Dave

Mwah, the simple solution to your issue is to save n-Track and dBPowerAmp (plus codec) downloads onto the archive disks. They’re small (er, at least, n-Track used to be …). But you’re right that for long term archival purposes, fewer conversions means lower likelihood of problems.

First of all, there is no such thing as “lossless” compression.

You don’t get nuthin’ for nuthin’.

Sure, you can zip up a music file, then unzip it and compare the before and after, and you’ll have an exact bit by bit match, but, you do lose something in the compression process.

How could it possibly be otherwise?

And the thing that you lose is the soul of the music. (Remember, music is not just 1’s and 0’s).

For proof, here’s some comparisons using the IEEE Otis Redding Soul Scale (with standard blue weighting).

Artist Before After
Aretha Franklin 9 6
James Brown 10 5
Steve Cropper 8 7
Britney Spears 0 1

(N.B. The last result is spurious, and does not mean that soul has been added. It’s just an artifact of the Fourier analysis within the cochlea, and whatever other weird things are going on inside your own brain).

Ali :cool:

Not that it will alter Ali’s findings that much but, the IEEE Otis Redding Soul Scale or IEEE-ORSS is now IEEE-ORSS.34.05.67.1b It seems a Congressional Committee got involved…

Just thought you’d wanna know. :)

TG

Chris:
I read an interview with McLaughlin a few years ago - I think he resurrected his Shatki project (and scalloped the neck of his guitar). I believe they released a couple new live albums over the past few years, but I’ve never seen or listened to them. I bet they’re really freaking good though.

Mwah:
I thought you weren’t posting here anymore because you were sick of all the “Yank crap”? :p

Yeah, I’m kinda wary about using Packed Song Format for long-term archival purposes. I mean, wouldn’t it suck if somehow the file became corrupted and you couldn’t extract anything at all from the SGW file? At least with a directory you can actually see the wave files!

I definitely do think that Packed Song Format is a very handy internet collaboration tool though.

Ali:
Whatchu smokin’?!?!?!?

----------

I’d also like to note that I’m not really lobbying for any specific lossless format - FLAC and APE are fine with me. I mainly mentioned WMA because:

1. n-Track currently supports WMA encoding, and
2. Packed Song Format used to support WMA compression.

In any case, I’m glad that everyone took the time to comment!

- Former Memberj

Jason, I’m still posting if I think I have something to contribute :p And, luckily, any political (or “political”) discussion have moved to the “Anything else” forum from here.