Become a Site Supporter and Never see Ads again!

Author Topic: can you flac a 4 channel polywav?  (Read 4022 times)

0 Members and 1 Guest are viewing this topic.

Offline Teen Wolf Blitzer

  • It's all ballbearings these days.
  • Trade Count: (6)
  • Needs to get out more...
  • *****
  • Posts: 5310
  • Gender: Male
  • I am Rattus Norvegicus.
    • Support Festival Radio
can you flac a 4 channel polywav?
« on: February 15, 2011, 03:18:30 PM »
I can't with TLH.  Is it possible?

Offline page

  • Trade Count: (25)
  • Needs to get out more...
  • *****
  • Posts: 8388
  • Gender: Male
  • #TeamRetired
Re: can you flac a 4 channel polywav?
« Reply #1 on: February 15, 2011, 03:33:57 PM »
I distinctly remember doing so for a sample I posted once, but I use the command-line process.

edit: I'll try it again when I get home and see if there is anything odd about the switches used.
« Last Edit: February 15, 2011, 03:51:12 PM by page »
"This is a common practice we have on the bus; debating facts that we could easily find through printed material. It's like, how far is it today? I think it's four hours, and someone else comes in at 11 hours, and well, then we'll... just... talk about it..." - Jeb Puryear

"Nostalgia ain't what it used to be." - Jim Williams

Offline Gutbucket

  • record > listen > revise technique
  • Trade Count: (16)
  • Needs to get out more...
  • *****
  • Posts: 15761
  • Gender: Male
  • "Better to love music than respect it" ~Stravinsky
Re: can you flac a 4 channel polywav?
« Reply #2 on: February 15, 2011, 04:25:33 PM »
Supposedly supports up to 8 channels.
Not sure the what switches are required to encode though.

Eventually I'll need to do the same, so please post here once you figure it out, thanks!
musical volition > vibrations > voltages > numeric values > voltages > vibrations> virtual teleportation time-machine experience
Better recording made easy - >>Improved PAS table<< | Made excellent- >>click here to download the Oddball Microphone Technique illustrated PDF booklet<< (note: This is a 1st draft, now several years old and in need of revision!  Stay tuned)

Offline Teen Wolf Blitzer

  • It's all ballbearings these days.
  • Trade Count: (6)
  • Needs to get out more...
  • *****
  • Posts: 5310
  • Gender: Male
  • I am Rattus Norvegicus.
    • Support Festival Radio
Re: can you flac a 4 channel polywav?
« Reply #3 on: February 15, 2011, 04:44:33 PM »
Ya I've never done it or tried.  I've always separated them ie. board and mics and then flac'd them.  Would love to see how it's done.  It would save me a bit of time.

Offline page

  • Trade Count: (25)
  • Needs to get out more...
  • *****
  • Posts: 8388
  • Gender: Male
  • #TeamRetired
Re: can you flac a 4 channel polywav?
« Reply #4 on: February 15, 2011, 08:23:33 PM »
Ok, sample file (1):
http://www.sendspace.com/file/9b9iv6  md5 = a8337fc85481ff8e7f017444b19f624f
(DO NOT PLAY IT, it's just 4 channels of noise, 10 second total).

so starting out:
- Get a copy of flac for the command line if you don't have one already (all further commands reference it).
- find what version of flac you have (I'm on 1.2.1)
Code: [Select]

flac -v


- (optional) test the ffp of the file: e9e9fd77a00f963daf8ef1bd2d58b664
Code: [Select]

metaflac --show-md5sum multi-channel.flac


- decode the file to wav:
Code: [Select]

flac -d multi-channel.flac


at this point, open either the resulting wav file or the original flac file in your audio editor of choice. Here is what I started with in Audacity:



http://img121.imageshack.us/i/multi1g.jpg/


Notice the difference between the noise channels (1&2) and the tone channels (3&4) and the volume differences. Also note the labels on the left hand side (L/R/Mono/mono). I did it this way so you can visually verify that things will map the way you want. Now, in Audacity, you can export multi-channel flac files natively, and that's ok, right as you're exporting, you end up being asked (unless you've selected not to in the preferences) how you want to map the channels (see below, again, note labels) and presto, it churns away for a bit (depending on size) and you have a multi-channel flac.



http://img11.imageshack.us/img11/4663/multi2g.jpg



Now, if you export to wav, you have a few more steps. Unfortunately when you export to wav (Audacity) doesn't use the mapping algorithm that flaclib is expecting so it barfs which I'm insinuating is sort of what happened with TLH and possibly with your audio editor of choice. (Here's what flac chucks back at me when I try it)

Quote
multi-channel.wav: ERROR: WAVE has >2 channels but is not WAVE_FORMAT_EXTENSIBLE; cannot assign channels

So what I did was I set flac to ignore the channel mapping and just assign stuff arbitrarily/unordered.

Code: [Select]

flac --best --channel-map=none -V multi-channel.wav


I've played with it a bit and I get the same results(2) that I got in the flac file out of Audacity which was mapped (or I think it was mapped at any rate, it worked) and I've decoded it via both Audacity and flac separately and compared the results with satisfaction(3) (in so far as it kept the order displayed as I had intended regardless of stereo association or poly-mono). I suggest you play around with your editor and see if 1) It will export flac natively and what happens when you do. 2) make sure you get satisfactory results if you do it by hand as shown above. One caveat is by using no channel mapping, you get 4 mono tracks, it doesn't keep the stereo association so make a note in your text file (or in the flac metadata, whatever floats your boat) what tracks are what.

Now, for bonus points, you could figure out how to do surround-sound and include those mappings so when you do a 4ch/5.1ch recording to encode it as a single flac file, but it would require you to figure out two things. A) What mapping settings to use presuming MicroSoft's WAVE_FORMAT_EXTENSIBLE setting is truely the "industry standard" which it seems to be even though very few use it and B) that your playback will read both the flac file and the mapping correctly and if there is any nuance there. That's a lot of work IMHO (without doing it as a job), but it's possible. Audacity might do it, I don't know.  :P


Footnotes:
(1) - If someone really wants me to, I'll upload the poly wav file I have, but I figured you could decode it. If you run into problems let me know.
(2) - I experienced some differences in the flac files of about 10kb, which is a hill of beans in a 1.7mb file, but it tells me that there is something different when doing it by hand and doing it via Audacity. That 10kb may be a mapping code irregularity, it may be a different flaclib, I don't know, but I know it works both ways so I didn't pursue it.
(3) - I did the following off of that original wav file:
  • Encode with audacity using it's mapping (testA)
  • Encode with flac without mapping (testB)
  • Decode testA using flac, verify resulting wav in Audacity
  • Decode testA using Audacity
  • Decode testB using Audacity (I got lazy, figured if it worked I was happy)
  • Import original wav file into Audacity
(4) - This took longer to type up than I had expected...
"This is a common practice we have on the bus; debating facts that we could easily find through printed material. It's like, how far is it today? I think it's four hours, and someone else comes in at 11 hours, and well, then we'll... just... talk about it..." - Jeb Puryear

"Nostalgia ain't what it used to be." - Jim Williams

Offline Gutbucket

  • record > listen > revise technique
  • Trade Count: (16)
  • Needs to get out more...
  • *****
  • Posts: 15761
  • Gender: Male
  • "Better to love music than respect it" ~Stravinsky
Re: can you flac a 4 channel polywav?
« Reply #5 on: February 16, 2011, 09:41:34 AM »
(4) - This took longer to type up than I had expected...

I bet.  Thanks for the thorough outline, Page. 
I'll get back to this when I eventually get around to flac containerizing my 4ch ambisonic B-format and 5ch surround recordings.  For now the raw recording files are simply flac'd as individual mono or stereo pairs.
musical volition > vibrations > voltages > numeric values > voltages > vibrations> virtual teleportation time-machine experience
Better recording made easy - >>Improved PAS table<< | Made excellent- >>click here to download the Oddball Microphone Technique illustrated PDF booklet<< (note: This is a 1st draft, now several years old and in need of revision!  Stay tuned)

Offline burris

  • Trade Count: (2)
  • Taperssection Regular
  • **
  • Posts: 93
  • Your favorite mics suck.
Re: can you flac a 4 channel polywav?
« Reply #6 on: February 16, 2011, 11:09:50 AM »
I use multitrack FLAC, works great but some editors might choke on it.  SoX can merge multiple files into a single one with the -M switch:

sox -M mono1.xxx mono2.xxx stereo3-4.xxx multitrack.flac

Bidule doesn't even blink at multitrack flac but I stopped using it for various reasons.  Reaper can handle the multitrack flac files no prob but you have to individually route each track out to where you want it to go.  If you select "explode multitrack file" it will then turn your multitrack flac into mono files again!  I import the multitrack, route out the non-b-format tracks to new channels "pre-fx" then put the amibsonic fx on the imported multitrack for the first 3/4 tracks and have that output to the master channel.  I'm sticking with Reaper now that it seems to be what I need, and Justin Frankel is a kewl d00d.

Flac only supports 8 tracks, unfortunately.

 

RSS | Mobile
Page created in 0.064 seconds with 31 queries.
© 2002-2024 Taperssection.com
Powered by SMF