Few questions about multi-channel ogg files and Sox

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Few questions about multi-channel ogg files and Sox

TrojanNemo
Sox is undoubtedly one of the most advanced tools I've used, so I'm glad I've been able to get as much out of it as I have, but I have a few questions that maybe you guys can help with.

First, all of that I use Sox for is to work with, in one way or another, with ogg files, which vary from 1 to as many as 18 channels.

1) When playing back these files in a very basic form, I can get almost identical results with

play file.ogg remix - -

and

play file.ogg -c 2
 
But understanding that one is down-mixing and the other is creating two mono channels, I suspect there's a difference in quality or what will be played. Playing the same file back to back with each format, my untrained ear hasn't noticed a difference yet. Which one is the better solution?

If I simply do

play file.ogg

only the first two channels play, which is not what I need, I need all channels to play at once.


2) Is there a way to display a spectrogram of sorts as the audio file plays? The Play command shows a tiny animation but it doesn't seem to go with the music very well, and reading that via StandardError and displaying on my program is delayed even when doing it at 100ms intervals.

3) What's the fastest way to split a multi-channel ogg into its component ogg files? My code easily determines what channels should go where, the problem is the separation itself takes nearly a minute per ogg file on my SSD and i7 processor.

Right now I run Sox as many times as there should be component ogg files and send the arguments to split each file, when that finishes, do the next, etc. Seeing how wonderful Sox is, I don't doubt there's a faster way to have Sox split things that I'm missing. If so, I would love to know!

Thanks for any help. Once again, this tool is very very helpful, but the documentation is in no way beginner friendly, so I've struggled to get as much as I do now to work with Sox. Now i'm hoping to improve on it with the insight of the pros.
Reply | Threaded
Open this post in threaded view
|

Re: Few questions about multi-channel ogg files and Sox

Jan Stary
On Dec 07 15:44:17, [hidden email] wrote:
> First, all of that I use Sox for is to work with, in one way or another,
> with ogg files, which vary from 1 to as many as 18 channels.

Where do these 18-channel OGG files come from?

> 1) When playing back these files in a very basic form,
> I can get almost identical results with
>
> play file.ogg remix - -

This outputs a stereo file, with both the left and the right channel
containing a (1/N)-weighted mix of all the N channels.

> and
>
> play file.ogg -c 2

This tells SoX that the file contains 2 channels,
overriding whatever the OGG header says.

> But understanding that one is down-mixing
> and the other is creating two mono channels,

Downmixing with 'remix - -' IS creating two mono channels,
namely the left and right channel, each containing a mixdown
of all the 18 input channels. Perhaps you want that,
I can only speculate on the number of ears you have.

The second invocation is hardly right. It tells SoX
that file.ogg has 2 audio channels, which it doesn't.

Try it. This creates a 3-channel file:

  $ sox -b 16 -n file.wav synth 10 sin 220 sin 440 sin 880

First play the individual channels, then play the mixdown,
then play with -c 2 as you do:

  $ play -V file.wav remix 1
  $ play -V file.wav remix 2
  $ play -V file.wav remix 3
  $ play -V file.wav remix - -
  $ play -V file.wav remix -
  $ play -V -c 2 file.wav

You can hear that the last is wrong. The file has 3 channels,
but you have told SoX it's 2 channels. It's playing at 2/3 the speed.

You need to read the excellent SoX manpage.

> I suspect there's a difference in quality or what will be played.
> Playing the same file back to back with each format, my untrained
> ear hasn't noticed a difference yet.

Can you put one of those files up for download?

> Which one is the better solution?

The first is right, if a mixdown of all the channels is what you want.
The second is clearly wrong.

> If I simply do
>
> play file.ogg
>
> only the first two channels play, which is not what I need, I need all
> channels to play at once.

How exactly do you want the N channels of audio to enter your M ears?

> 2) Is there a way to display a spectrogram of sorts as the audio file plays?
> The Play command shows a tiny animation but it doesn't seem to go with the
> music very well,

You probably mean the soundwave, not a spectrogram.
SoX is a command-line application, it doesn't "display" much.
See if 'ffplay -shownode 1 file.ogg' is what you want.

> and reading that via StandardError and displaying on my
> program is delayed even when doing it at 100ms intervals.

We don't know what "program" of yours is doing what.

> 3) What's the fastest way to split a multi-channel ogg into its component
> ogg files? My code easily determines what channels should go where,

This is exactly what the 'remix' effect is for.
See the manpage for an example.

> the problem is the separation itself takes nearly a minute
> per ogg file on my SSD and i7 processor.

This depends on the file size of course. If your OGG files really have
18 channels, it's about 3 seconds to extract one channel.
What makes you say that one minute is a problem?

> Right now I run Sox as many times as there should be component ogg files and
> send the arguments to split each file, when that finishes, do the next, etc.
> Seeing how wonderful Sox is, I don't doubt there's a faster way to have Sox
> split things that I'm missing. If so, I would love to know!

The example given in the manpage extracts the individual channels one by one.
The 'sndfile-deinterleave' tool of libsndfile writes all the output files
in parallel. Splitting a long multichannel WAV file into individual WAV files
is considerably faster with sndfile-deinterlave than with sox remix.

> Thanks for any help. Once again, this tool is very very helpful, but the
> documentation is in no way beginner friendly

I find the manpage of SoX to be a great piece of documentation.

        Jan


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Few questions about multi-channel ogg files and Sox

Colin Sheaff-2
> If I simply do
>
> play file.ogg
>
> only the first two channels play, which is not what I need, I need all
> channels to play at once.

How exactly do you want the N channels of audio to enter your M ears?

Your N to M analogy is flawed since your "M" ears are not fixed (well technically they're fixed to your head, but that swivels on your neck, I hope) so your stereo input devices (ears) act more like a continuously variable array of microphones in space and time.

Pedantry aside, it's not about N channels to M ears. This could be audio for an art installation that uses tens of speakers, or an unusual way of encoding isolated instruments from a multi-track recording session. This is probably a more portable file format than a ProTools session or even Audacity.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Few questions about multi-channel ogg files and Sox

Jan Stary
On Dec 09 10:06:41, [hidden email] wrote:

> > > If I simply do
> > >
> > > play file.ogg
> > >
> > > only the first two channels play, which is not what I need, I need all
> > > channels to play at once.
> >
> > How exactly do you want the N channels of audio to enter your M ears?
>
> Your N to M analogy is flawed since your "M" ears are not fixed (well
> technically they're fixed to your head, but that swivels on your neck, I
> hope) so your stereo input devices (ears) act more like a continuously
> variable array of microphones in space and time.

Point taken.
So how is the 18 channels gonna be played?
On what device?


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Few questions about multi-channel ogg files and Sox

TrojanNemo
In reply to this post by Jan Stary
Alright, obviously I need to go a lot more in depth to clarify some of the questions and confusion obvious in the replies.


Jan Stary wrote
Where do these 18-channel OGG files come from?
They're multi-track songs. I control two tools: one allows users to create custom content for a music game. It accepts up to 9 stereo or mono WAV files, that are then mixed into a N channel interleaved PCM file, which is then encoded to ogg and then has a custom header attached. I can't change this, it's how the game expects it. We have to live with that.


Jan Stary wrote
Downmixing with 'remix - -' IS creating two mono channels, namely the left and right channel, each containing a mixdown of all the 18 input channels. Perhaps you want that, I can only speculate on the number of ears you have.
I guess this takes explaining. Making all 18 channels into a mono channel, then sending that to the right and left channel, is not better than properly mixing things down. The game gets considerably more information than sox, so it knows which channels should be on the left, and which should be on the right. I'm playing this on a stereo system, but I'm sure you understand than a stereo file should be treated as what is left goes on the left, what is right goes on the right. Imagine that what sox is doing is taking a stereo sound file and playing both channels out of both speakers, rather than properly sending each channel to each speaker. For a quick example, on the more typical multitrack audio we use, channels 0 and 1 are the stereo drums, channels 2 and 3 are the stereo bass, channels 4 and 5 are the stereo guitar, channels 6 and 7 are the stereo keyboard/synth, channels 8 and 9 are the stereo vocals and channels 10 11 are the stereo backing (as I said, goes up to max 18 channels, not always). In the game, left speakers play channels 0, 2, 4, 6, 8 and 10, and right speakers play 1, 3, 5, 7, 9, 11. It's not playing a mono mix of all 12 channels on each speaker, which is what Sox does when remixing to mono. My question was: is there a better way to play these N channels? I tried telling sox to play the correct channels per speaker, but it failed, I guess because of how many channels and in such a weird combination that was being sent to sox.


Jan Stary wrote
First play the individual channels, then play the mixdown,
then play with -c 2 as you do:

  $ play -V file.wav remix 1
  $ play -V file.wav remix 2
  $ play -V file.wav remix 3
  $ play -V file.wav remix - -
  $ play -V file.wav remix -
  $ play -V -c 2 file.wav

You can hear that the last is wrong. The file has 3 channels,
but you have told SoX it's 2 channels. It's playing at 2/3 the speed.
That's not correct. I said "play file.ogg -c 2", not "play -c 2 file.ogg". The first plays all channels, in correct speed. The second gives me an error to the effect of "sorry, can't play 2 channels, playing N channels" and it proceeds to play the first two channels of the audio, as if just doing play file.ogg.


Jan Stary wrote
The first is right, if a mixdown of all the channels is what you want.The second is clearly wrong.
 I wouldn't waste your good people's time with something that is "clearly wrong." I don't know if your confusion is from misreading the commands I'm using (see above), but if the audio was anything more than minimally different, I would have noticed. Maybe when I said "my untrained ear" you assumed I was a dolt who can't hear anything. Let's just say I was being humble. The audio playback with the two commands I said I'm using is nearly identical. Hence my confusion, hence my posting here.


Jan Stary wrote
> If I simply do
>
> play file.ogg
>
> only the first two channels play, which is not what I need, I need all
> channels to play at once.

How exactly do you want the N channels of audio to enter your M ears?
I hope that has now been answered. The first two channels of a multitrack anything (be a song, or a 7.1 movie track, or whatever else) is not the full audio. Why that would be confusing to you, I have to wonder.


Jan Stary wrote
This depends on the file size of course. If your OGG files really have 18 channels, it's about 3 seconds to extract one channel. What makes you say that one minute is a problem?
I didn't say it was a problem. Throwing the multi-channel track at Audacity and manually separating the tracks was much more time consuming than the current automated process. I was just asking if there was a "wow dude, try this other way that is 5x faster than what you're doing" situation. It wouldn't be the first time I do things the hard way when there already is a better, easier way.


Jan Stary wrote
The example given in the manpage extracts the individual channels one by one.
The 'sndfile-deinterleave' tool of libsndfile writes all the output files in parallel. Splitting a long multichannel WAV file into individual WAV files is considerably faster with sndfile-deinterlave than with sox remix.
I'll take a look at that tool. Thanks. Though it begs the question if it'll be faster to convert the ogg to wav, then use that tool, than just use remix with Sox. I guess I'll find it out by trying.


Jan Stary wrote
I find the manpage of SoX to be a great piece of documentation.
Again, it's helpful, but only if you already have a good understanding of a lot of things. So for you, or anyone familiar with sox, going to the documentation page to remember something is easy. As an introductory page to someone starting from scratch, it's very obtuse. The same goes for NAudio's MIDI documentation, and just like with sox, I smacked my head enough times until it made sense.


I am a member of many many forums (my wife jokes that I should try to log in before trying to make an account), and I'm used to asking questions, as well as providing help to others. I really hope that this first response from the Sox community is not representative of what I can expect from others. Maybe I'm too sensitive, but Jan's response came across very rude and short. Still, I thank you for taking the time to answer.
Reply | Threaded
Open this post in threaded view
|

Re: Few questions about multi-channel ogg files and Sox

Jan Stary
> > Where do these 18-channel OGG files come from?
>
> They're multi-track songs. I control two tools: one allows users to create
> custom content for a music game. It accepts up to 9 stereo or mono WAV
> files, that are then mixed into a N channel interleaved PCM file, which is
> then encoded to ogg and then has a custom header attached. I can't change
> this, it's how the game expects it. We have to live with that.

OK.

> Jan Stary wrote
> > Downmixing with 'remix - -' IS creating two mono channels, namely the left
> > and right channel, each containing a mixdown of all the 18 input channels.
> > Perhaps you want that, I can only speculate on the number of ears you
> > have.
>
> I guess this takes explaining. Making all 18 channels into a mono channel,
> then sending that to the right and left channel, is not better than properly
> mixing things down.

I'm not saying it's better. I'm just saying that's what you are doing.

> The game gets considerably more information than sox, so
> it knows which channels should be on the left, and which should be on the
> right. I'm playing this on a stereo system, but I'm sure you understand than
> a stereo file should be treated as what is left goes on the left, what is
> right goes on the right.

Ypu only mentioned "18 channels" previously, no left-and-right information.
How exactly is the information available about what "goes left"
and "goes right" from the 18 channels file?

> Imagine that what sox is doing is taking a stereo
> sound file and playing both channels out of both speakers, rather than
> properly sending each channel to each speaker. For a quick example, on the
> more typical multitrack audio we use, channels 0 and 1 are the stereo drums,
> channels 2 and 3 are the stereo bass, channels 4 and 5 are the stereo
> guitar, channels 6 and 7 are the stereo keyboard/synth, channels 8 and 9 are
> the stereo vocals and channels 10 11 are the stereo backing (as I said, goes
> up to max 18 channels, not always).

OK. Where is this information stored?
>From an OGG header's point of view,
these are just 12 channels of audio, right?

> In the game, left speakers play channels
> 0, 2, 4, 6, 8 and 10, and right speakers play 1, 3, 5, 7, 9, 11. It's not
> playing a mono mix of all 12 channels on each speaker, which is what Sox
> does when remixing to mono. My question was: is there a better way to play
> these N channels?

$ play file.ogg remix 0,2,4,6,8,10 1,3,5,7,9,11
Obviously, you need to know the exact channels,
in particular, what's mono and what's stereo.
Where is that information stored? How does your
application know that, say, 4 channels is two stereo files,
and not, say, stereo drums, mono guitar, and mono vocal?

> I tried telling sox to play the correct channels per
> speaker, but it failed, I guess because of how many channels and in such a
> weird combination that was being sent to sox.

What exactly have you tried,
and how exactly has SoX "falied"?

> > First play the individual channels, then play the mixdown,
> > then play with -c 2 as you do:
> >
> >   $ play -V file.wav remix 1
> >   $ play -V file.wav remix 2
> >   $ play -V file.wav remix 3
> >   $ play -V file.wav remix - -
> >   $ play -V file.wav remix -
> >   $ play -V -c 2 file.wav
> >
> > You can hear that the last is wrong. The file has 3 channels,
> > but you have told SoX it's 2 channels. It's playing at 2/3 the speed.
>
> That's not correct. I said "play file.ogg -c 2", not "play -c 2 file.ogg".

My bad, sorry.

> Jan Stary wrote
> > The example given in the manpage extracts the individual channels one by
> > one.
> > The 'sndfile-deinterleave' tool of libsndfile writes all the output files
> > in parallel. Splitting a long multichannel WAV file into individual WAV
> > files is considerably faster with sndfile-deinterlave than with sox remix.
>
> I'll take a look at that tool. Thanks. Though it begs the question if it'll
> be faster to convert the ogg to wav, then use that tool, than just use remix
> with Sox. I guess I'll find it out by trying.

Will you need to split the multi-channel file into the individual channels,
even after the playback of the multichannel file works the way you want?

> I really hope that this first response from the
> Sox community is not representative of what I can expect from others. Maybe
> I'm too sensitive, but Jan's response came across very rude and short.

That was not my intention.

Please try to specify all the relevant context in your future questions.
For example, how would one know that there is an inherent left-and-right
structure in your files, when you only say "18 channels of OGG"?


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Few questions about multi-channel ogg files and Sox

TrojanNemo
Thanks for the follow up.

Jan Stary wrote
You only mentioned "18 channels" previously, no left-and-right information. How exactly is the information available about what "goes left" and "goes right" from the 18 channels file?
Jan Stary wrote
OK. Where is this information stored?
Jan Stary wrote
>From an OGG header's point of view,these are just 12 channels of audio, right?
Jan Stary wrote
Obviously, you need to know the exact channels,in particular, what's mono and what's stereo.
Where is that information stored? How does yourapplication know that, say, 4 channels is two stereo files,and not, say, stereo drums, mono guitar, and mono vocal?
Yes, the audio is stored as N amount of mono channels in the audio file itself. But the game takes much more than just audio, including a very detailed metadata file which specifies which instrument gets which channels, as well as individual attenuation and panning values per channel. My tool readily accesses all this information, so at the time I'm sending the audio to sox I have the channels readily accessible and will try your suggestion.

Jan Stary wrote
What exactly have you tried,and how exactly has SoX "falied"?
I tried the command you suggested, with the channels separated by commas. It failed by saying something along the lines of it couldn't find a file and listed one of the channels as the file it was looking for, so it was probably my syntax was incorrect.


Jan Stary wrote
Will you need to split the multi-channel file into the individual channels, even after the playback of the multichannel file works the way you want?
Yes, the playback is one new feature I'm integrating now. The separating into component tracks is something that I've been doing for months, but using the system I mentioned. So it works now, my only concern would be improving it, if possible.


I will work on implementing your suggestion and will report if it works as intended. I'm concerned Sox might have a fit over the total number of channels. Let's see.
Reply | Threaded
Open this post in threaded view
|

Re: Few questions about multi-channel ogg files and Sox

TrojanNemo
Got it working. My problem was I was counting from 0, so doing

play file.ogg remix 0,2,4,6,8,10 1,3,5,7,9,11

would fail and give me the format instructions. but doing

play file.ogg remix 1,3,5,7,9,11 2,4,6,8,10,12

works!

The sound is richer and fuller this way, compared to using -c 2. I also have it successfully working when drums has more than 2 channels (can have up to 6), by using the range marker as indicated in the documentation, as well as using the same channel on both speakers for mono tracks.

Now to decide if I want to mess with converting the dB attenuation values from the metadata into vol-spec values to use with the remix command. The values I'm dealing with vary from -15.0 dB up to 0.0 dB. Is there a way to convert that to vol-spec as the documentation says?


Still have to look at separating the tracks using the other tool. Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Few questions about multi-channel ogg files and Sox

Jan Stary
> > Obviously, you need to know the exact channels,in particular, what's mono
> > and what's stereo.
> > Where is that information stored? How does yourapplication know that, say,
> > 4 channels is two stereo files,and not, say, stereo drums, mono guitar,
> > and mono vocal?
>
> Yes, the audio is stored as N amount of mono channels in the audio file
> itself. But the game takes much more than just audio, including a very
> detailed metadata file which specifies which instrument gets which channels,
> as well as individual attenuation and panning values per channel.

Out of curiosity, what kind of file is this.
Is it some standardized format to describe a basix "mix" likethis,
or is it something particular to you application?

> My tool readily accesses all this information, so at the time
> I'm sending the audio to sox I have the channels readily accessible
> and will try your suggestion.
Does that mean you are developing a computer game
where the audio is played via SoX, meaning sox the commandline tool?

> I tried the command you suggested, with the channels separated by commas. It
> failed by saying something along the lines of it couldn't find a file and
> listed one of the channels as the file it was looking for, so it was
> probably my syntax was incorrect.

Please always quote the full and exact command you tried
and the full and exact response of SoX.


On Dec 09 13:10:18, [hidden email] wrote:

> Got it working. My problem was I was counting from 0, so doing
> play file.ogg remix 0,2,4,6,8,10 1,3,5,7,9,11
> would fail and give me the format instructions. but doing
> play file.ogg remix 1,3,5,7,9,11 2,4,6,8,10,12
> works!
>
> The sound is richer and fuller this way, compared to using -c 2. I also have
> it successfully working when drums has more than 2 channels (can have up to
> 6), by using the range marker as indicated in the documentation, as well as
> using the same channel on both speakers for mono tracks.
>
> Now to decide if I want to mess with converting the dB attenuation values
> from the metadata into vol-spec values to use with the remix command. The
> values I'm dealing with vary from -15.0 dB up to 0.0 dB. Is there a way to
> convert that to vol-spec as the documentation says?

It's right there:

     By default, where an output channel is mixed from multiple (n)
     input channels, each input channel will be scaled by a factor of /n.
     Custom mixing volumes can be set by following a given input channel
     or range of input channels with a vol-spec (volume specification).
     This is one of the letters p, i, or v, followed by a volume number,
     the meaning of which depends on the given letter and is defined
     as follows:

        Letter Volume number Notes
        p      power adjust in dB 0 = no change
        i      power adjust in dB As `p', but invert the audio
        v      voltage multiplier 1 = no change, 0.5 ~= 6dB attenuation

So if your drums are channels 1 and 2,
and you want them attenuated by 3dB:

  $ play file.ogg remix 1p-3,2p-3 (etc)

> Still have to look at separating the tracks using the other tool. Thanks.

I still don't understand why you need to separate them
now that the playback works as you want.


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Few questions about multi-channel ogg files and Sox

TrojanNemo
Jan Stary wrote
Out of curiosity, what kind of file is this. Is it some standardized format to describe a basix "mix" likethis, or is it something particular to you application?
It's particular to the video game. It's fairly standardized now, but it's gotten a lot of changes since the first release of the game first came out in 2007 or so. Custom created content using my tool follows the standard of the latest release, but my tools parse all old versions as well. This is a sample one on the newest format:
www.keepitfishy.com/files/songs.dta - open it with any text editor, it's plain text.


Jan Stary wrote
Please always quote the full and exact command you tried and the full and exact response of SoX.
Noted. I couldn't replicate the error so I was trying to remember what it said. But I get it.


Jan Stary wrote
It's right there:
Don't know how I read the first part, but missed the explanation of what the p, v and i were used for. Sorry. Will try that.


Jan Stary wrote
> Still have to look at separating the tracks using the other tool. Thanks.

I still don't understand why you need to separate them now that the playback works as you want.
The file that the game accepts is multi-channel ogg, with a custom header, that is encrypted (known as a mogg file). This is how the game accepts it on the Xbox 360, the PS3 and the Wii. We also provide these for users of the PC alternative game, which can't play the mogg files, and instead requires the audio separated per instrument and in decrypted ogg format, as well as different metadata and album art formats. My tool takes care of all of it. It became immensely easier when I found sox and was able to make the conversion process fully automated (before someone would manually have to process the audio file in Audacity).


Jan Stary wrote
The 'sndfile-deinterleave' tool of libsndfile writes all the output files in parallel. Splitting a long multichannel WAV file into individual WAV files is considerably faster with sndfile-deinterlave than with sox remix.
I looked at snd-file and it's a nice tool, but snd-deinterleave doesn't seem to be available in Windows binary form, so I'm unable to use it. I did manage to play with the available binaries and I can convert the multi-channel ogg to multi-channel wav with a simple command and in very short time, but unless I can then split the WAV file, i'm still in the same place.


Jan Stary wrote
SoX is a command-line application, it doesn't "display" much. See if 'ffplay -shownode 1 file.ogg' is what you want.
My question was if I could show that with sox as it's playing back the audio file. It's not useful to me at all to rely on ffplay since I'd need it while sox is playing. I can live without it, not a big deal :-)

Thanks for taking the time to answer.
Reply | Threaded
Open this post in threaded view
|

Re: Few questions about multi-channel ogg files and Sox

TrojanNemo
I wanted to follow up and confirm that I have now the playback exactly how I want it. Each channel is assigned to its corresponding speaker correctly, each channel gets its attenuation value as per the metadata, so the relative volumes of each channel are correct. I found this gave me a much louder overall volume, even with the leading -a, but I figured that by applying an attenuation of n channels dB, I get excellent overall volume, while achieving everything else I wanted. The user can choose to play the entire song or only what the game shows, which the metadata also picks and applies a similar fade in and out as in game. In short, everything I wanted as far as playback I've achieved with your help. Thanks.

This is a sample (working) argument line created by the program after reading everything for a 12-channel song:

play file.ogg remix -a 1p-3.00,3p-5.00,5p-3.00,7p-3.00,9p-2.00,11p-2.00 2p-3.00,4p-5.00,6p-3.00,8p-3.00,10p-2.00,12p-2.00 trim 5 30 vol -12.0dB fade t 2.0 0 2.0



TrojanNemo wrote
Jan Stary wrote
It's right there:
Don't know how I read the first part, but missed the explanation of what the p, v and i were used for. Sorry. Will try that.
Checked the website again, and here's why I didn't see it: it's not on that website. At least, not the one I'm checking. Is there another?
http://linux.die.net/man/1/sox

The text as I see it says

This is one of the letters p, i, or v, followed by a volume number, the meaning of which depends on the given letter and is defined as follows:
And then it moves on to something else. The explanation portion you quoted is not there. But thanks to you, now it's done.

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Few questions about multi-channel ogg files and Sox

Jan Stary
> >> It's right there:
> > Don't know how I read the first part, but missed the explanation of what
> > the p, v and i were used for. Sorry. Will try that.
>
> Checked the website again, and here's why I didn't see it: it's not on that
> website. At least, not the one I'm checking. Is there another?

As usual in the UNIX world, binaries are accompanied by man pages.
If you are on any kind of UNIX system (BSD, MacoSX, Linux, ...),
"man sox" will display the manual page of SoX that comes with it.

On lesser systems, there is at least is sox.txt manual present.

What is your system and how exactly have you installed SoX?

> http://linux.die.net/man/1/sox

This is a random web page, not affiliated with the SoX project
in any way whatsoever. read the actual web page that comes with
your installation.


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Few questions about multi-channel ogg files and Sox

Jan Stary
On Dec 10 09:49:00, [hidden email] wrote:

> > >> It's right there:
> > > Don't know how I read the first part, but missed the explanation of what
> > > the p, v and i were used for. Sorry. Will try that.
> >
> > Checked the website again, and here's why I didn't see it: it's not on that
> > website. At least, not the one I'm checking. Is there another?
>
> As usual in the UNIX world, binaries are accompanied by man pages.
> If you are on any kind of UNIX system (BSD, MacoSX, Linux, ...),
> "man sox" will display the manual page of SoX that comes with it.
>
> On lesser systems, there is at least is sox.txt manual present.
>
> What is your system and how exactly have you installed SoX?
>
> > http://linux.die.net/man/1/sox
>
> This is a random web page, not affiliated with the SoX project
> in any way whatsoever. read the actual web page

aargh, I mean man page, of course.

> that comes with your installation.
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> _______________________________________________
> Sox-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Few questions about multi-channel ogg files and Sox

Pascal Giard
On Wed, Dec 10, 2014 at 8:03 AM, Jan Stary <[hidden email]> wrote:

> On Dec 10 09:49:00, [hidden email] wrote:
>> > >> It's right there:
>> > > Don't know how I read the first part, but missed the explanation of what
>> > > the p, v and i were used for. Sorry. Will try that.
>> >
>> > Checked the website again, and here's why I didn't see it: it's not on that
>> > website. At least, not the one I'm checking. Is there another?
>>
>> As usual in the UNIX world, binaries are accompanied by man pages.
>> If you are on any kind of UNIX system (BSD, MacoSX, Linux, ...),
>> "man sox" will display the manual page of SoX that comes with it.
>>
>> On lesser systems, there is at least is sox.txt manual present.
>>
>> What is your system and how exactly have you installed SoX?
>>
>> > http://linux.die.net/man/1/sox
>>
>> This is a random web page, not affiliated with the SoX project
>> in any way whatsoever. read the actual web page
>
> aargh, I mean man page, of course.
>
>> that comes with your installation.

FYI, the manpage is also available in HTML form on the official website.
Head to:
http://sox.sourceforge.net/sox.html

Also see:
http://sox.sourceforge.net/Docs/Documentation

-Pascal
--
Homepage (http://organact.mine.nu)
Debian GNU/Linux (http://www.debian.org)
COMunité/LACIME: École de technologie supérieure (http://www.comunite.ca)
ISIP Laboratory: McGill (http://www.isip.ece.mcgill.ca)

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Few questions about multi-channel ogg files and Sox

TrojanNemo
Definitely going to bookmark that page. I had no idea why I found the other site and not the default site.

As to my setup, Windows 8.1 Pro 64-bit.

Thanks everyone for the help.
Reply | Threaded
Open this post in threaded view
|

Re: Few questions about multi-channel ogg files and Sox

Jan Stary
In reply to this post by Pascal Giard
> FYI, the manpage is also available in HTML form on the official website.
> http://sox.sourceforge.net/sox.html

That's the manpage of the latest version of SoX,
which is not necessarily the OP's installed version.


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users