Csound Csound-dev Csound-tekno Search About

[Csnd] Comment re: output to 24 vs 32 bit wav files

Date2023-01-28 05:16
FromScott Daughtrey
Subject[Csnd] Comment re: output to 24 vs 32 bit wav files
When using the fout option for real-time audio file output something like the following writes a 32 bit wav file:
fout "/sdcard/fileout.wav",16,allL,allR

Kind of deceiving as intuitively one might expect 16 indicates 16 bits but in reality 1 is wav format and 6 represents 32 bit float. But it does seem reasonably well documented in the manual, mentioning 32 bit int, float, 64 bit and other formats in some detail.

However in regards to the  command line flags, there is no mention in the manual of 32 bit, 64 bit etc. Not that I personally have a need for 64 bit file output but is seems odd these options only appear obviously available for real-time rendering but not offline: generally one might expect the opposite (less powerful devices not capable of processing higher bit/sample rates in real-time can therefore render offline). 

For  (command line) flags the manual does show: 

-3, --format=24bit.

It also mentions --format=type:format and there is a brief description. 

Knowing there is really no such thing as 24 bit float (it's fixed point) after a little experimentation, and having Csound crash numerous times in the process, I found:

-o/sdcard/fileout.wav -3 --format=wav:float

will give a 32 bit float output.

Granted some may scoff at the concept (24 vs 32 bit float), being able to output 32 bit float makes life easier for me in post-processing. I just find it a little odd that the fout descriptions seem reasonably clear but the manual explanations of  command line flags concerning file output seem a little confusing/convoluted and less descriptive than those for fout, probably more so to some who may be less familiar with audio file formats, not that I'm that knowledgeable.

Is this something that could possibly be revised in the future?

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2023-01-28 09:33
Fromjoachim heintz
SubjectRe: [Csnd] Comment re: output to 24 vs 32 bit wav files
can you make a pull request for the manual?  i think it should be this page:
https://github.com/csound/manual/blob/master/command/flags.xml

you can simply log in with your github account, and edit, and then send 
from there a pull request.

best -
	joachim


On 28/01/2023 06:16, Scott Daughtrey wrote:
> When using the fout option for real-time audio file output something like the following writes a 32 bit wav file:
> fout "/sdcard/fileout.wav",16,allL,allR
> 
> Kind of deceiving as intuitively one might expect 16 indicates 16 bits but in reality 1 is wav format and 6 represents 32 bit float. But it does seem reasonably well documented in the manual, mentioning 32 bit int, float, 64 bit and other formats in some detail.
> 
> However in regards to the  command line flags, there is no mention in the manual of 32 bit, 64 bit etc. Not that I personally have a need for 64 bit file output but is seems odd these options only appear obviously available for real-time rendering but not offline: generally one might expect the opposite (less powerful devices not capable of processing higher bit/sample rates in real-time can therefore render offline).
> 
> For  (command line) flags the manual does show:
> 
> -3, --format=24bit.
> 
> It also mentions --format=type:format and there is a brief description.
> 
> Knowing there is really no such thing as 24 bit float (it's fixed point) after a little experimentation, and having Csound crash numerous times in the process, I found:
> 
> -o/sdcard/fileout.wav -3 --format=wav:float
> 
> will give a 32 bit float output.
> 
> Granted some may scoff at the concept (24 vs 32 bit float), being able to output 32 bit float makes life easier for me in post-processing. I just find it a little odd that the fout descriptions seem reasonably clear but the manual explanations of  command line flags concerning file output seem a little confusing/convoluted and less descriptive than those for fout, probably more so to some who may be less familiar with audio file formats, not that I'm that knowledgeable.
> 
> Is this something that could possibly be revised in the future?
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>          https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2023-01-29 03:14
FromST Music
SubjectRe: [Csnd] Comment re: output to 24 vs 32 bit wav files
Thank you for the reply Joachim, I'll try to figure that out, still pretty new to how git works, 

Scott

On Sat, Jan 28, 2023, 4:33 AM joachim heintz, <jh@joachimheintz.de> wrote:
can you make a pull request for the manual?  i think it should be this page:
https://github.com/csound/manual/blob/master/command/flags.xml

you can simply log in with your github account, and edit, and then send
from there a pull request.

best -
        joachim


On 28/01/2023 06:16, Scott Daughtrey wrote:
> When using the fout option for real-time audio file output something like the following writes a 32 bit wav file:
> fout "/sdcard/fileout.wav",16,allL,allR
>
> Kind of deceiving as intuitively one might expect 16 indicates 16 bits but in reality 1 is wav format and 6 represents 32 bit float. But it does seem reasonably well documented in the manual, mentioning 32 bit int, float, 64 bit and other formats in some detail.
>
> However in regards to the <CsOptions> command line flags, there is no mention in the manual of 32 bit, 64 bit etc. Not that I personally have a need for 64 bit file output but is seems odd these options only appear obviously available for real-time rendering but not offline: generally one might expect the opposite (less powerful devices not capable of processing higher bit/sample rates in real-time can therefore render offline).
>
> For <CsOptions> (command line) flags the manual does show:
>
> -3, --format=24bit.
>
> It also mentions --format=type:format and there is a brief description.
>
> Knowing there is really no such thing as 24 bit float (it's fixed point) after a little experimentation, and having Csound crash numerous times in the process, I found:
>
> -o/sdcard/fileout.wav -3 --format=wav:float
>
> will give a 32 bit float output.
>
> Granted some may scoff at the concept (24 vs 32 bit float), being able to output 32 bit float makes life easier for me in post-processing. I just find it a little odd that the fout descriptions seem reasonably clear but the manual explanations of <CsOptions> command line flags concerning file output seem a little confusing/convoluted and less descriptive than those for fout, probably more so to some who may be less familiar with audio file formats, not that I'm that knowledgeable.
>
> Is this something that could possibly be revised in the future?
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>          https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2023-01-29 09:27
Fromjoachim heintz
SubjectRe: [Csnd] Comment re: output to 24 vs 32 bit wav files
thanks for your contribution.
if you need any help for it, just get back here.


On 29/01/2023 04:14, ST Music wrote:
> Thank you for the reply Joachim, I'll try to figure that out, still 
> pretty new to how git works,
> 
> Scott
> 
> On Sat, Jan 28, 2023, 4:33 AM joachim heintz,  > wrote:
> 
>     can you make a pull request for the manual?  i think it should be
>     this page:
>     https://github.com/csound/manual/blob/master/command/flags.xml
>     
> 
>     you can simply log in with your github account, and edit, and then send
>     from there a pull request.
> 
>     best -
>              joachim
> 
> 
>     On 28/01/2023 06:16, Scott Daughtrey wrote:
>      > When using the fout option for real-time audio file output
>     something like the following writes a 32 bit wav file:
>      > fout "/sdcard/fileout.wav",16,allL,allR
>      >
>      > Kind of deceiving as intuitively one might expect 16 indicates 16
>     bits but in reality 1 is wav format and 6 represents 32 bit float.
>     But it does seem reasonably well documented in the manual,
>     mentioning 32 bit int, float, 64 bit and other formats in some detail.
>      >
>      > However in regards to the  command line flags, there
>     is no mention in the manual of 32 bit, 64 bit etc. Not that I
>     personally have a need for 64 bit file output but is seems odd these
>     options only appear obviously available for real-time rendering but
>     not offline: generally one might expect the opposite (less powerful
>     devices not capable of processing higher bit/sample rates in
>     real-time can therefore render offline).
>      >
>      > For  (command line) flags the manual does show:
>      >
>      > -3, --format=24bit.
>      >
>      > It also mentions --format=type:format and there is a brief
>     description.
>      >
>      > Knowing there is really no such thing as 24 bit float (it's fixed
>     point) after a little experimentation, and having Csound crash
>     numerous times in the process, I found:
>      >
>      > -o/sdcard/fileout.wav -3 --format=wav:float
>      >
>      > will give a 32 bit float output.
>      >
>      > Granted some may scoff at the concept (24 vs 32 bit float), being
>     able to output 32 bit float makes life easier for me in
>     post-processing. I just find it a little odd that the fout
>     descriptions seem reasonably clear but the manual explanations of
>      command line flags concerning file output seem a little
>     confusing/convoluted and less descriptive than those for fout,
>     probably more so to some who may be less familiar with audio file
>     formats, not that I'm that knowledgeable.
>      >
>      > Is this something that could possibly be revised in the future?
>      >
>      > Csound mailing list
>      > Csound@listserv.heanet.ie 
>      > https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>     
>      > Send bugs reports to
>      > https://github.com/csound/csound/issues
>     
>      > Discussions of bugs and features can be posted here
> 
>     Csound mailing list
>     Csound@listserv.heanet.ie 
>     https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>     
>     Send bugs reports to
>     https://github.com/csound/csound/issues
>     
>     Discussions of bugs and features can be posted here
> 
> Csound mailing list Csound@listserv.heanet.ie 
>  
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND 
>  Send bugs reports to 
> https://github.com/csound/csound/issues 
>  Discussions of bugs and 
> features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here