[PD] [readanysf~] and so called interleaved wav files.

august august at alien.mur.at
Wed Dec 16 14:53:48 CET 2009


> 
> > 
> > Can you put the files online somewhere so I can download them and test
> > them?
> 
> Of course:
> 
> this plays fine:
> http://romanhaefeli.net/8ch_does_play.wav
> 
> this plays, but no sound:
> <don't know if i can post that link on the list>

Why does that link not go through to the list?  hmm.

Anyway, if you set up readanysf~ with 8 channel output, both DO play
just fine.  The second one is playing, but is VERY soft....just jack up
the amplitude multiplication on it.    Readanysf~ doesn't normalize your
audio for you.


> BTW: Is there some documentation about how [readanysf~] (or the
> underlying layer) tries to assign the channels, when the number of
> channels created and the number of channels of the loaded file do not
> match?
> 

no.  this is all undefined as it comes from gavl.  Thank you for
bringing it up though.  I am now in discussion with the developer about
making an arbitrary mix matrix for mixing channels.   I also found a bug
in gavl that makes readanysf~ crash if you start it with, say, 4
channels, but feed it an 8 channel audio.

So, this will have to change for the next version.

----

Here is what I plan...let me know what y'all think.

Because of how PD works, I can only define the number of out channels at
object creation. (right?)  I cannot match the output number of channels
to the input number of channels for any given file.

The way I would like it to work by default is:

for mono output:
		* for all input except stereo, just the first channel is played
		* for stereo input, it is downmixed

for stereo output:   
		* mono input will be upmixed to stereo
		* 3 or more channel input will just drop the channels after the
		first two

for 2+ channel output:
		*  mono input is upmixed to stereo, remaining channels are empty
		*  if input has less channels than output, all input channels are
		sent to output in order.  any remaining output channels are left
		empty
		*  if input has more channels thant output, all output channels
		are filled with corresponding input channel.  the remaining input
		channels are not sent to output.


I don't know if it makes sense to have special default cases for mono
and stereo.

-august.




More information about the Pd-list mailing list