Csound Csound-dev Csound-tekno Search About

[Csnd] Feature request: filebit

Date2009-06-13 18:21
FromJacob Joaquin
Subject[Csnd] Feature request: filebit
Hello everybody.  I've been writing csound csds for the purpose of batch
processing dozens or hundreds of samples at a time from the command-line. 
And I've run up against a small wall.

As far as I can tell, there is no way of getting the bit depth of an audio
file.  I propose an opcode called filebit, that returns this information.  I
believe this would be an obvious fit with the existing opcodes filelen,
filenchnls, filepeak, filesr.

The Csound utility sndinfo provides bit depth information.  Perhaps some of
the code from sndinfo can be repackaged as an opcode?

Best,
Jake
-- 
View this message in context: http://www.nabble.com/Feature-request%3A-filebit-tp24014498p24014498.html
Sent from the Csound - General mailing list archive at Nabble.com.


Date2009-06-13 19:51
Fromvictor
Subject[Csnd] Re: Feature request: filebit
I suppose it's just a matter of using libsndfile. I don't
think it's a problem at all. We'll look after it.
Victor
----- Original Message ----- 
From: "Jacob Joaquin" 
To: 
Sent: Saturday, June 13, 2009 6:21 PM
Subject: [Csnd] Feature request: filebit


>
> Hello everybody.  I've been writing csound csds for the purpose of batch
> processing dozens or hundreds of samples at a time from the command-line.
> And I've run up against a small wall.
>
> As far as I can tell, there is no way of getting the bit depth of an audio
> file.  I propose an opcode called filebit, that returns this information. 
> I
> believe this would be an obvious fit with the existing opcodes filelen,
> filenchnls, filepeak, filesr.
>
> The Csound utility sndinfo provides bit depth information.  Perhaps some 
> of
> the code from sndinfo can be repackaged as an opcode?
>
> Best,
> Jake
> -- 
> View this message in context: 
> http://www.nabble.com/Feature-request%3A-filebit-tp24014498p24014498.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
> csound" 


Date2009-06-13 21:26
FromJacob Joaquin
Subject[Csnd] Re: Feature request: filebit
Thanks for looking at it.

It might also be worth looking into other potentially useful data that can
be grabbed from an audio file.  The only other thing that comes to mind is
the number of sample frames.  I've been calculating this by multiplying the
output of filesr and filelen.  I've never tested to see if this is sample
accurate or not.  Either way, a fileframes might not be a bad idea.

Best,
Jake


Victor.Lazzarini wrote:
> 
> I suppose it's just a matter of using libsndfile. I don't
> think it's a problem at all. We'll look after it.
> Victor
> ----- Original Message ----- 
> From: "Jacob Joaquin" 
> To: 
> Sent: Saturday, June 13, 2009 6:21 PM
> Subject: [Csnd] Feature request: filebit
> 
> 
>>
>> Hello everybody.  I've been writing csound csds for the purpose of batch
>> processing dozens or hundreds of samples at a time from the command-line.
>> And I've run up against a small wall.
>>
>> As far as I can tell, there is no way of getting the bit depth of an
>> audio
>> file.  I propose an opcode called filebit, that returns this information. 
>> I
>> believe this would be an obvious fit with the existing opcodes filelen,
>> filenchnls, filepeak, filesr.
>>
>> The Csound utility sndinfo provides bit depth information.  Perhaps some 
>> of
>> the code from sndinfo can be repackaged as an opcode?
>>
>> Best,
>> Jake
>> -- 
>> View this message in context: 
>> http://www.nabble.com/Feature-request%3A-filebit-tp24014498p24014498.html
>> Sent from the Csound - General mailing list archive at Nabble.com.
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
>> csound" 
> 
> 
> 
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
> 
> 

-- 
View this message in context: http://www.nabble.com/Feature-request%3A-filebit-tp24014498p24016070.html
Sent from the Csound - General mailing list archive at Nabble.com.


Date2009-06-13 22:00
Fromvictor
Subject[Csnd] Re: Re: Feature request: filebit
Done, in CVS now.
The filebit opcode will return the number of bits of a file if PCM. If a 
different
encoding, it will return a code indicating what the encoding is (always 
negative):

         SF_FORMAT_ULAW         =  -16,       /* U-Law encoded. */
          SF_FORMAT_ALAW         =  -17,       /* A-Law encoded. */
          SF_FORMAT_IMA_ADPCM    = -18,       /* IMA ADPCM. */
          SF_FORMAT_MS_ADPCM     = -19,       /* Microsoft ADPCM. */

          SF_FORMAT_GSM610       = -32,       /* GSM 6.10 encoding. */
          SF_FORMAT_VOX_ADPCM    = -33,       /* Oki Dialogic ADPCM 
encoding. */

          SF_FORMAT_G721_32      = -48,       /* 32kbs G721 ADPCM encoding. 
*/
          SF_FORMAT_G723_24      = -49,       /* 24kbs G723 ADPCM encoding. 
*/
          SF_FORMAT_G723_40      = -50,       /* 40kbs G723 ADPCM encoding. 
*/

          SF_FORMAT_DWVW_12      = -64,       /* 12 bit Delta Width Variable 
Word encoding. */
          SF_FORMAT_DWVW_16      = -65,       /* 16 bit Delta Width Variable 
Word encoding. */
          SF_FORMAT_DWVW_24      = -66,       /* 24 bit Delta Width Variable 
Word encoding. */
          SF_FORMAT_DWVW_N       = -67,       /* N bit Delta Width Variable 
Word encoding. */

          SF_FORMAT_DPCM_8       = -80,       /* 8 bit differential PCM (XI 
only) */
          SF_FORMAT_DPCM_16      = -81,       /* 16 bit differential PCM (XI 
only) */

----- Original Message ----- 
From: "Jacob Joaquin" 
To: 
Sent: Saturday, June 13, 2009 9:26 PM
Subject: [Csnd] Re: Feature request: filebit


>
> Thanks for looking at it.
>
> It might also be worth looking into other potentially useful data that can
> be grabbed from an audio file.  The only other thing that comes to mind is
> the number of sample frames.  I've been calculating this by multiplying 
> the
> output of filesr and filelen.  I've never tested to see if this is sample
> accurate or not.  Either way, a fileframes might not be a bad idea.
>
> Best,
> Jake
>
>
> Victor.Lazzarini wrote:
>>
>> I suppose it's just a matter of using libsndfile. I don't
>> think it's a problem at all. We'll look after it.
>> Victor
>> ----- Original Message ----- 
>> From: "Jacob Joaquin" 
>> To: 
>> Sent: Saturday, June 13, 2009 6:21 PM
>> Subject: [Csnd] Feature request: filebit
>>
>>
>>>
>>> Hello everybody.  I've been writing csound csds for the purpose of batch
>>> processing dozens or hundreds of samples at a time from the 
>>> command-line.
>>> And I've run up against a small wall.
>>>
>>> As far as I can tell, there is no way of getting the bit depth of an
>>> audio
>>> file.  I propose an opcode called filebit, that returns this 
>>> information.
>>> I
>>> believe this would be an obvious fit with the existing opcodes filelen,
>>> filenchnls, filepeak, filesr.
>>>
>>> The Csound utility sndinfo provides bit depth information.  Perhaps some
>>> of
>>> the code from sndinfo can be repackaged as an opcode?
>>>
>>> Best,
>>> Jake
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/Feature-request%3A-filebit-tp24014498p24014498.html
>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>>
>
> -- 
> View this message in context: 
> http://www.nabble.com/Feature-request%3A-filebit-tp24014498p24016070.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
> csound" 


Date2009-06-14 15:34
FromJacob Joaquin
Subject[Csnd] Re: Re: Feature request: filebit
Wow, that was fast.  Thanks a million!


Victor.Lazzarini wrote:
> 
> Done, in CVS now.
> The filebit opcode will return the number of bits of a file if PCM.
> 

-- 
View this message in context: http://www.nabble.com/Feature-request%3A-filebit-tp24014498p24022235.html
Sent from the Csound - General mailing list archive at Nabble.com.


Date2009-06-14 15:57
FromAndres Cabrera
Subject[Csnd] Re: Re: Re: Feature request: filebit
Is there any way of knowing if it is a 32 bit float PCM file?

Cheers,
Andrés

On Sat, Jun 13, 2009 at 4:00 PM, victor wrote:
> Done, in CVS now.
> The filebit opcode will return the number of bits of a file if PCM. If a
> different
> encoding, it will return a code indicating what the encoding is (always
> negative):
>
>        SF_FORMAT_ULAW         =  -16,       /* U-Law encoded. */
>         SF_FORMAT_ALAW         =  -17,       /* A-Law encoded. */
>         SF_FORMAT_IMA_ADPCM    = -18,       /* IMA ADPCM. */
>         SF_FORMAT_MS_ADPCM     = -19,       /* Microsoft ADPCM. */
>
>         SF_FORMAT_GSM610       = -32,       /* GSM 6.10 encoding. */
>         SF_FORMAT_VOX_ADPCM    = -33,       /* Oki Dialogic ADPCM encoding.
> */
>
>         SF_FORMAT_G721_32      = -48,       /* 32kbs G721 ADPCM encoding. */
>         SF_FORMAT_G723_24      = -49,       /* 24kbs G723 ADPCM encoding. */
>         SF_FORMAT_G723_40      = -50,       /* 40kbs G723 ADPCM encoding. */
>
>         SF_FORMAT_DWVW_12      = -64,       /* 12 bit Delta Width Variable
> Word encoding. */
>         SF_FORMAT_DWVW_16      = -65,       /* 16 bit Delta Width Variable
> Word encoding. */
>         SF_FORMAT_DWVW_24      = -66,       /* 24 bit Delta Width Variable
> Word encoding. */
>         SF_FORMAT_DWVW_N       = -67,       /* N bit Delta Width Variable
> Word encoding. */
>
>         SF_FORMAT_DPCM_8       = -80,       /* 8 bit differential PCM (XI
> only) */
>         SF_FORMAT_DPCM_16      = -81,       /* 16 bit differential PCM (XI
> only) */
>
> ----- Original Message ----- From: "Jacob Joaquin" 
> To: 
> Sent: Saturday, June 13, 2009 9:26 PM
> Subject: [Csnd] Re: Feature request: filebit
>
>
>>
>> Thanks for looking at it.
>>
>> It might also be worth looking into other potentially useful data that can
>> be grabbed from an audio file.  The only other thing that comes to mind is
>> the number of sample frames.  I've been calculating this by multiplying
>> the
>> output of filesr and filelen.  I've never tested to see if this is sample
>> accurate or not.  Either way, a fileframes might not be a bad idea.
>>
>> Best,
>> Jake
>>
>>
>> Victor.Lazzarini wrote:
>>>
>>> I suppose it's just a matter of using libsndfile. I don't
>>> think it's a problem at all. We'll look after it.
>>> Victor
>>> ----- Original Message ----- From: "Jacob Joaquin"
>>> 
>>> To: 
>>> Sent: Saturday, June 13, 2009 6:21 PM
>>> Subject: [Csnd] Feature request: filebit
>>>
>>>
>>>>
>>>> Hello everybody.  I've been writing csound csds for the purpose of batch
>>>> processing dozens or hundreds of samples at a time from the
>>>> command-line.
>>>> And I've run up against a small wall.
>>>>
>>>> As far as I can tell, there is no way of getting the bit depth of an
>>>> audio
>>>> file.  I propose an opcode called filebit, that returns this
>>>> information.
>>>> I
>>>> believe this would be an obvious fit with the existing opcodes filelen,
>>>> filenchnls, filepeak, filesr.
>>>>
>>>> The Csound utility sndinfo provides bit depth information.  Perhaps some
>>>> of
>>>> the code from sndinfo can be repackaged as an opcode?
>>>>
>>>> Best,
>>>> Jake
>>>> --
>>>> View this message in context:
>>>>
>>>> http://www.nabble.com/Feature-request%3A-filebit-tp24014498p24014498.html
>>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>>
>>>>
>>>>
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>> csound"
>>>
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Feature-request%3A-filebit-tp24014498p24016070.html
>> Sent from the Csound - General mailing list archive at Nabble.com.
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>



-- 


Andrés


Date2009-06-14 18:50
Fromvictor
Subject[Csnd] Re: Re: Re: Re: Feature request: filebit
No, currently, it will just report the number of bits used. Does
this need to be implemented? If so, I would have to adjust it.

Victor
----- Original Message ----- 
From: "Andres Cabrera" 
To: 
Sent: Sunday, June 14, 2009 3:57 PM
Subject: [Csnd] Re: Re: Re: Feature request: filebit


Is there any way of knowing if it is a 32 bit float PCM file?

Cheers,
Andrés

On Sat, Jun 13, 2009 at 4:00 PM, victor wrote:
> Done, in CVS now.
> The filebit opcode will return the number of bits of a file if PCM. If a
> different
> encoding, it will return a code indicating what the encoding is (always
> negative):
>
> SF_FORMAT_ULAW = -16, /* U-Law encoded. */
> SF_FORMAT_ALAW = -17, /* A-Law encoded. */
> SF_FORMAT_IMA_ADPCM = -18, /* IMA ADPCM. */
> SF_FORMAT_MS_ADPCM = -19, /* Microsoft ADPCM. */
>
> SF_FORMAT_GSM610 = -32, /* GSM 6.10 encoding. */
> SF_FORMAT_VOX_ADPCM = -33, /* Oki Dialogic ADPCM encoding.
> */
>
> SF_FORMAT_G721_32 = -48, /* 32kbs G721 ADPCM encoding. */
> SF_FORMAT_G723_24 = -49, /* 24kbs G723 ADPCM encoding. */
> SF_FORMAT_G723_40 = -50, /* 40kbs G723 ADPCM encoding. */
>
> SF_FORMAT_DWVW_12 = -64, /* 12 bit Delta Width Variable
> Word encoding. */
> SF_FORMAT_DWVW_16 = -65, /* 16 bit Delta Width Variable
> Word encoding. */
> SF_FORMAT_DWVW_24 = -66, /* 24 bit Delta Width Variable
> Word encoding. */
> SF_FORMAT_DWVW_N = -67, /* N bit Delta Width Variable
> Word encoding. */
>
> SF_FORMAT_DPCM_8 = -80, /* 8 bit differential PCM (XI
> only) */
> SF_FORMAT_DPCM_16 = -81, /* 16 bit differential PCM (XI
> only) */
>
> ----- Original Message ----- From: "Jacob Joaquin" 
> 
> To: 
> Sent: Saturday, June 13, 2009 9:26 PM
> Subject: [Csnd] Re: Feature request: filebit
>
>
>>
>> Thanks for looking at it.
>>
>> It might also be worth looking into other potentially useful data that 
>> can
>> be grabbed from an audio file. The only other thing that comes to mind is
>> the number of sample frames. I've been calculating this by multiplying
>> the
>> output of filesr and filelen. I've never tested to see if this is sample
>> accurate or not. Either way, a fileframes might not be a bad idea.
>>
>> Best,
>> Jake
>>
>>
>> Victor.Lazzarini wrote:
>>>
>>> I suppose it's just a matter of using libsndfile. I don't
>>> think it's a problem at all. We'll look after it.
>>> Victor
>>> ----- Original Message ----- From: "Jacob Joaquin"
>>> 
>>> To: 
>>> Sent: Saturday, June 13, 2009 6:21 PM
>>> Subject: [Csnd] Feature request: filebit
>>>
>>>
>>>>
>>>> Hello everybody. I've been writing csound csds for the purpose of batch
>>>> processing dozens or hundreds of samples at a time from the
>>>> command-line.
>>>> And I've run up against a small wall.
>>>>
>>>> As far as I can tell, there is no way of getting the bit depth of an
>>>> audio
>>>> file. I propose an opcode called filebit, that returns this
>>>> information.
>>>> I
>>>> believe this would be an obvious fit with the existing opcodes filelen,
>>>> filenchnls, filepeak, filesr.
>>>>
>>>> The Csound utility sndinfo provides bit depth information. Perhaps some
>>>> of
>>>> the code from sndinfo can be repackaged as an opcode?
>>>>
>>>> Best,
>>>> Jake
>>>> --
>>>> View this message in context:
>>>>
>>>> http://www.nabble.com/Feature-request%3A-filebit-tp24014498p24014498.html
>>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>>
>>>>
>>>>
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body 
>>>> "unsubscribe
>>>> csound"
>>>
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Feature-request%3A-filebit-tp24014498p24016070.html
>> Sent from the Csound - General mailing list archive at Nabble.com.
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>



-- 


Andrés


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
csound"= 


Date2009-06-15 13:34
FromAndres Cabrera
Subject[Csnd] Re: Re: Re: Re: Re: Feature request: filebit
Not necessarily, just curious...

Cheers,
Andrés

On Sun, Jun 14, 2009 at 12:50 PM, victor wrote:
> No, currently, it will just report the number of bits used. Does
> this need to be implemented? If so, I would have to adjust it.
>
> Victor
> ----- Original Message ----- From: "Andres Cabrera" 
> To: 
> Sent: Sunday, June 14, 2009 3:57 PM
> Subject: [Csnd] Re: Re: Re: Feature request: filebit
>
>
> Is there any way of knowing if it is a 32 bit float PCM file?
>
> Cheers,
> Andrés
>
> On Sat, Jun 13, 2009 at 4:00 PM, victor wrote:
>>
>> Done, in CVS now.
>> The filebit opcode will return the number of bits of a file if PCM. If a
>> different
>> encoding, it will return a code indicating what the encoding is (always
>> negative):
>>
>> SF_FORMAT_ULAW = -16, /* U-Law encoded. */
>> SF_FORMAT_ALAW = -17, /* A-Law encoded. */
>> SF_FORMAT_IMA_ADPCM = -18, /* IMA ADPCM. */
>> SF_FORMAT_MS_ADPCM = -19, /* Microsoft ADPCM. */
>>
>> SF_FORMAT_GSM610 = -32, /* GSM 6.10 encoding. */
>> SF_FORMAT_VOX_ADPCM = -33, /* Oki Dialogic ADPCM encoding.
>> */
>>
>> SF_FORMAT_G721_32 = -48, /* 32kbs G721 ADPCM encoding. */
>> SF_FORMAT_G723_24 = -49, /* 24kbs G723 ADPCM encoding. */
>> SF_FORMAT_G723_40 = -50, /* 40kbs G723 ADPCM encoding. */
>>
>> SF_FORMAT_DWVW_12 = -64, /* 12 bit Delta Width Variable
>> Word encoding. */
>> SF_FORMAT_DWVW_16 = -65, /* 16 bit Delta Width Variable
>> Word encoding. */
>> SF_FORMAT_DWVW_24 = -66, /* 24 bit Delta Width Variable
>> Word encoding. */
>> SF_FORMAT_DWVW_N = -67, /* N bit Delta Width Variable
>> Word encoding. */
>>
>> SF_FORMAT_DPCM_8 = -80, /* 8 bit differential PCM (XI
>> only) */
>> SF_FORMAT_DPCM_16 = -81, /* 16 bit differential PCM (XI
>> only) */
>>
>> ----- Original Message ----- From: "Jacob Joaquin"
>> 
>> To: 
>> Sent: Saturday, June 13, 2009 9:26 PM
>> Subject: [Csnd] Re: Feature request: filebit
>>
>>
>>>
>>> Thanks for looking at it.
>>>
>>> It might also be worth looking into other potentially useful data that
>>> can
>>> be grabbed from an audio file. The only other thing that comes to mind is
>>> the number of sample frames. I've been calculating this by multiplying
>>> the
>>> output of filesr and filelen. I've never tested to see if this is sample
>>> accurate or not. Either way, a fileframes might not be a bad idea.
>>>
>>> Best,
>>> Jake
>>>
>>>
>>> Victor.Lazzarini wrote:
>>>>
>>>> I suppose it's just a matter of using libsndfile. I don't
>>>> think it's a problem at all. We'll look after it.
>>>> Victor
>>>> ----- Original Message ----- From: "Jacob Joaquin"
>>>> 
>>>> To: 
>>>> Sent: Saturday, June 13, 2009 6:21 PM
>>>> Subject: [Csnd] Feature request: filebit
>>>>
>>>>
>>>>>
>>>>> Hello everybody. I've been writing csound csds for the purpose of batch
>>>>> processing dozens or hundreds of samples at a time from the
>>>>> command-line.
>>>>> And I've run up against a small wall.
>>>>>
>>>>> As far as I can tell, there is no way of getting the bit depth of an
>>>>> audio
>>>>> file. I propose an opcode called filebit, that returns this
>>>>> information.
>>>>> I
>>>>> believe this would be an obvious fit with the existing opcodes filelen,
>>>>> filenchnls, filepeak, filesr.
>>>>>
>>>>> The Csound utility sndinfo provides bit depth information. Perhaps some
>>>>> of
>>>>> the code from sndinfo can be repackaged as an opcode?
>>>>>
>>>>> Best,
>>>>> Jake
>>>>> --
>>>>> View this message in context:
>>>>>
>>>>>
>>>>> http://www.nabble.com/Feature-request%3A-filebit-tp24014498p24014498.html
>>>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>>
>>>>> Send bugs reports to this list.
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>> "unsubscribe
>>>>> csound"
>>>>
>>>>
>>>>
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>> csound"
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Feature-request%3A-filebit-tp24014498p24016070.html
>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>
>
>
> --
>
>
> Andrés
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"=
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>



-- 


Andrés


Date2009-06-16 11:26
Fromjoachim heintz
Subject[Csnd] Re: Re: Re: Re: Re: Feature request: filebit
Actually it would be great to have the distinction between 32 bit  
float and 32 bit ints. We have this distiction in the output options  
(for instance in fout), and if one wants to take an input file, to  
perform some manipulations, and finally to write this as a file with  
the same bit format, it is needed.
If I understood right, Jacob also proposed an addition to filelen,  
which directly gives the number of sample frames (instead of seconds  
with possible roundoff errors). I'd find this useful, too.
Thanks for writing filebit, Victor. It's great to have it.
Best -
	joachim


Am 14.06.2009 um 19:50 schrieb victor:

> No, currently, it will just report the number of bits used. Does
> this need to be implemented? If so, I would have to adjust it.
>
> Victor
> ----- Original Message ----- From: "Andres Cabrera"  >
> To: 
> Sent: Sunday, June 14, 2009 3:57 PM
> Subject: [Csnd] Re: Re: Re: Feature request: filebit
>
>
> Is there any way of knowing if it is a 32 bit float PCM file?
>
> Cheers,
> Andrés
>
> On Sat, Jun 13, 2009 at 4:00 PM, victor  
> wrote:
>> Done, in CVS now.
>> The filebit opcode will return the number of bits of a file if PCM.  
>> If a
>> different
>> encoding, it will return a code indicating what the encoding is  
>> (always
>> negative):
>>
>> SF_FORMAT_ULAW = -16, /* U-Law encoded. */
>> SF_FORMAT_ALAW = -17, /* A-Law encoded. */
>> SF_FORMAT_IMA_ADPCM = -18, /* IMA ADPCM. */
>> SF_FORMAT_MS_ADPCM = -19, /* Microsoft ADPCM. */
>>
>> SF_FORMAT_GSM610 = -32, /* GSM 6.10 encoding. */
>> SF_FORMAT_VOX_ADPCM = -33, /* Oki Dialogic ADPCM encoding.
>> */
>>
>> SF_FORMAT_G721_32 = -48, /* 32kbs G721 ADPCM encoding. */
>> SF_FORMAT_G723_24 = -49, /* 24kbs G723 ADPCM encoding. */
>> SF_FORMAT_G723_40 = -50, /* 40kbs G723 ADPCM encoding. */
>>
>> SF_FORMAT_DWVW_12 = -64, /* 12 bit Delta Width Variable
>> Word encoding. */
>> SF_FORMAT_DWVW_16 = -65, /* 16 bit Delta Width Variable
>> Word encoding. */
>> SF_FORMAT_DWVW_24 = -66, /* 24 bit Delta Width Variable
>> Word encoding. */
>> SF_FORMAT_DWVW_N = -67, /* N bit Delta Width Variable
>> Word encoding. */
>>
>> SF_FORMAT_DPCM_8 = -80, /* 8 bit differential PCM (XI
>> only) */
>> SF_FORMAT_DPCM_16 = -81, /* 16 bit differential PCM (XI
>> only) */
>>
>> ----- Original Message ----- From: "Jacob Joaquin" > >
>> To: 
>> Sent: Saturday, June 13, 2009 9:26 PM
>> Subject: [Csnd] Re: Feature request: filebit
>>
>>
>>>
>>> Thanks for looking at it.
>>>
>>> It might also be worth looking into other potentially useful data  
>>> that can
>>> be grabbed from an audio file. The only other thing that comes to  
>>> mind is
>>> the number of sample frames. I've been calculating this by  
>>> multiplying
>>> the
>>> output of filesr and filelen. I've never tested to see if this is  
>>> sample
>>> accurate or not. Either way, a fileframes might not be a bad idea.
>>>
>>> Best,
>>> Jake
>>>
>>>
>>> Victor.Lazzarini wrote:
>>>>
>>>> I suppose it's just a matter of using libsndfile. I don't
>>>> think it's a problem at all. We'll look after it.
>>>> Victor
>>>> ----- Original Message ----- From: "Jacob Joaquin"
>>>> 
>>>> To: 
>>>> Sent: Saturday, June 13, 2009 6:21 PM
>>>> Subject: [Csnd] Feature request: filebit
>>>>
>>>>
>>>>>
>>>>> Hello everybody. I've been writing csound csds for the purpose  
>>>>> of batch
>>>>> processing dozens or hundreds of samples at a time from the
>>>>> command-line.
>>>>> And I've run up against a small wall.
>>>>>
>>>>> As far as I can tell, there is no way of getting the bit depth  
>>>>> of an
>>>>> audio
>>>>> file. I propose an opcode called filebit, that returns this
>>>>> information.
>>>>> I
>>>>> believe this would be an obvious fit with the existing opcodes  
>>>>> filelen,
>>>>> filenchnls, filepeak, filesr.
>>>>>
>>>>> The Csound utility sndinfo provides bit depth information.  
>>>>> Perhaps some
>>>>> of
>>>>> the code from sndinfo can be repackaged as an opcode?
>>>>>
>>>>> Best,
>>>>> Jake
>>>>> --
>>>>> View this message in context:
>>>>>
>>>>> http://www.nabble.com/Feature-request%3A-filebit-tp24014498p24014498.html
>>>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>>
>>>>> Send bugs reports to this list.
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>>>> "unsubscribe
>>>>> csound"
>>>>
>>>>
>>>>
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>>> "unsubscribe
>>>> csound"
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Feature-request%3A-filebit-tp24014498p24016070.html
>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>> "unsubscribe
>>> csound"
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe
>> csound"
>>
>
>
>
> -- 
>
>
> Andrés
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"=
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"
>



Date2009-06-16 11:32
FromVictor.Lazzarini@nuim.ie
Subject[Csnd] Re: Re: Re: Re: Re: Re: Feature request: filebit
AttachmentsNone  None  

Date2009-06-16 19:35
Fromvictor
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: Feature request: filebit
Ok, so 32-bit floats PCM will give you a -1 code and
64-bit floats PCM will give you -2.
 
Is that OK?

Victor
----- Original Message -----
Sent: Tuesday, June 16, 2009 11:32 AM
Subject: [Csnd] Re: Re: Re: Re: Re: Re: Feature request: filebit

I'll give it a negative code then.

----- Original Message -----
From: joachim heintz <jh@joachimheintz.de>
Date: Tuesday, June 16, 2009 11:26 am
Subject: [Csnd] Re: Re: Re: Re: Re: Feature request: filebit
To: csound@lists.bath.ac.uk

> Actually it would be great to have the distinction between 32
> bit 
> float and 32 bit ints. We have this distiction in the output
> options 
> (for instance in fout), and if one wants to take an input file,
> to 
> perform some manipulations, and finally to write this as a file
> with 
> the same bit format, it is needed.
> If I understood right, Jacob also proposed an addition to
> filelen, 
> which directly gives the number of sample frames (instead of
> seconds 
> with possible roundoff errors). I'd find this useful, too.
> Thanks for writing filebit, Victor. It's great to have it.
> Best -
> joachim
>
>
> Am 14.06.2009 um 19:50 schrieb victor:
>
> > No, currently, it will just report the number of bits used. Does
> > this need to be implemented? If so, I would have to adjust it.
> >
> > Victor
> > ----- Original Message ----- From: "Andres Cabrera"
> <mantaraya36@gmail.com
> > >
> > To: <csound@lists.bath.ac.uk>
> > Sent: Sunday, June 14, 2009 3:57 PM
> > Subject: [Csnd] Re: Re: Re: Feature request: filebit
> >
> >
> > Is there any way of knowing if it is a 32 bit float PCM file?
> >
> > Cheers,
> > Andrés
> >
> > On Sat, Jun 13, 2009 at 4:00 PM,
> victor<Victor.Lazzarini@nuim.ie> 
> > wrote:
> >> Done, in CVS now.
> >> The filebit opcode will return the number of bits of a file
> if PCM. 
> >> If a
> >> different
> >> encoding, it will return a code indicating what the encoding
> is 
> >> (always
> >> negative):
> >>
> >> SF_FORMAT_ULAW = -16, /* U-Law encoded. */
> >> SF_FORMAT_ALAW = -17, /* A-Law encoded. */
> >> SF_FORMAT_IMA_ADPCM = -18, /* IMA ADPCM. */
> >> SF_FORMAT_MS_ADPCM = -19, /* Microsoft ADPCM. */
> >>
> >> SF_FORMAT_GSM610 = -32, /* GSM 6.10 encoding. */
> >> SF_FORMAT_VOX_ADPCM = -33, /* Oki Dialogic ADPCM encoding.
> >> */
> >>
> >> SF_FORMAT_G721_32 = -48, /* 32kbs G721 ADPCM encoding. */
> >> SF_FORMAT_G723_24 = -49, /* 24kbs G723 ADPCM encoding. */
> >> SF_FORMAT_G723_40 = -50, /* 40kbs G723 ADPCM encoding. */
> >>
> >> SF_FORMAT_DWVW_12 = -64, /* 12 bit Delta Width Variable
> >> Word encoding. */
> >> SF_FORMAT_DWVW_16 = -65, /* 16 bit Delta Width Variable
> >> Word encoding. */
> >> SF_FORMAT_DWVW_24 = -66, /* 24 bit Delta Width Variable
> >> Word encoding. */
> >> SF_FORMAT_DWVW_N = -67, /* N bit Delta Width Variable
> >> Word encoding. */
> >>
> >> SF_FORMAT_DPCM_8 = -80, /* 8 bit differential PCM (XI
> >> only) */
> >> SF_FORMAT_DPCM_16 = -81, /* 16 bit differential PCM (XI
> >> only) */
> >>
> >> ----- Original Message ----- From: "Jacob Joaquin"
> <jacobjoaquin@gmail.com
> >> >
> >> To: <csound@lists.bath.ac.uk>
> >> Sent: Saturday, June 13, 2009 9:26 PM
> >> Subject: [Csnd] Re: Feature request: filebit
> >>
> >>
> >>>
> >>> Thanks for looking at it.
> >>>
> >>> It might also be worth looking into other potentially useful
> data 
> >>> that can
> >>> be grabbed from an audio file. The only other thing that
> comes to 
> >>> mind is
> >>> the number of sample frames. I've been calculating this
> by 
> >>> multiplying
> >>> the
> >>> output of filesr and filelen. I've never tested to see if
> this is 
> >>> sample
> >>> accurate or not. Either way, a fileframes might not be a bad idea.
> >>>
> >>> Best,
> >>> Jake
> >>>
> >>>
> >>> Victor.Lazzarini wrote:
> >>>>
> >>>> I suppose it's just a matter of using libsndfile. I don't
> >>>> think it's a problem at all. We'll look after it.
> >>>> Victor
> >>>> ----- Original Message ----- From: "Jacob Joaquin"
> >>>> <jacobjoaquin@gmail.com>
> >>>> To: <csound@lists.bath.ac.uk>
> >>>> Sent: Saturday, June 13, 2009 6:21 PM
> >>>> Subject: [Csnd] Feature request: filebit
> >>>>
> >>>>
> >>>>>
> >>>>> Hello everybody. I've been writing csound csds for the
> purpose 
> >>>>> of batch
> >>>>> processing dozens or hundreds of samples at a time from the
> >>>>> command-line.
> >>>>> And I've run up against a small wall.
> >>>>>
> >>>>> As far as I can tell, there is no way of getting the bit
> depth 
> >>>>> of an
> >>>>> audio
> >>>>> file. I propose an opcode called filebit, that returns this
> >>>>> information.
> >>>>> I
> >>>>> believe this would be an obvious fit with the existing
> opcodes 
> >>>>> filelen,
> >>>>> filenchnls, filepeak, filesr.
> >>>>>
> >>>>> The Csound utility sndinfo provides bit depth
> information. 
> >>>>> Perhaps some
> >>>>> of
> >>>>> the code from sndinfo can be repackaged as an opcode?
> >>>>>
> >>>>> Best,
> >>>>> Jake
> >>>>> --
> >>>>> View this message in context:
> >>>>>
> >>>>> http://www.nabble.com/Feature-request%3A-filebit-
> tp24014498p24014498.html>>>>> Sent from the Csound - General
> mailing list archive at Nabble.com.
> >>>>>
> >>>>>
> >>>>>
> >>>>> Send bugs reports to this list.
> >>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with
> body 
> >>>>> "unsubscribe
> >>>>> csound"
> >>>>
> >>>>
> >>>>
> >>>> Send bugs reports to this list.
> >>>> To unsubscribe, send email sympa@lists.bath.ac.uk with
> body 
> >>>> "unsubscribe
> >>>> csound"
> >>>>
> >>>>
> >>>
> >>> --
> >>> View this message in context:
> >>> http://www.nabble.com/Feature-request%3A-filebit-
> tp24014498p24016070.html>>> Sent from the Csound - General
> mailing list archive at Nabble.com.
> >>>
> >>>
> >>>
> >>> Send bugs reports to this list.
> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with
> body 
> >>> "unsubscribe
> >>> csound"
> >>
> >>
> >>
> >> Send bugs reports to this list.
> >> To unsubscribe, send email sympa@lists.bath.ac.uk with
> body 
> >> "unsubscribe
> >> csound"
> >>
> >
> >
> >
> > --
> >
> >
> > Andrés
> >
> >
> > Send bugs reports to this list.
> > To unsubscribe, send email sympa@lists.bath.ac.uk with
> body 
> > "unsubscribe csound"=
> >
> >
> > Send bugs reports to this list.
> > To unsubscribe, send email sympa@lists.bath.ac.uk with
> body 
> > "unsubscribe csound"
> >
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> "unsubscribe csound"

Dr Victor Lazzarini, Senior Lecturer, Dept. of Music,National University of Ireland, Maynooth

Date2009-06-16 21:54
FromMichael Gogins
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: Re: Feature request: filebit
-32, -64.

Regards,
Mike

On 6/16/09, victor  wrote:
> Ok, so 32-bit floats PCM will give you a -1 code and
> 64-bit floats PCM will give you -2.
>
> Is that OK?
>
> Victor
>   ----- Original Message -----
>   From: Victor.Lazzarini@nuim.ie
>   To: csound@lists.bath.ac.uk
>   Sent: Tuesday, June 16, 2009 11:32 AM
>   Subject: [Csnd] Re: Re: Re: Re: Re: Re: Feature request: filebit
>
>
>   I'll give it a negative code then.
>
>   ----- Original Message -----
>   From: joachim heintz 
>   Date: Tuesday, June 16, 2009 11:26 am
>   Subject: [Csnd] Re: Re: Re: Re: Re: Feature request: filebit
>   To: csound@lists.bath.ac.uk
>
>   > Actually it would be great to have the distinction between 32
>   > bit
>   > float and 32 bit ints. We have this distiction in the output
>   > options
>   > (for instance in fout), and if one wants to take an input file,
>   > to
>   > perform some manipulations, and finally to write this as a file
>   > with
>   > the same bit format, it is needed.
>   > If I understood right, Jacob also proposed an addition to
>   > filelen,
>   > which directly gives the number of sample frames (instead of
>   > seconds
>   > with possible roundoff errors). I'd find this useful, too.
>   > Thanks for writing filebit, Victor. It's great to have it.
>   > Best -
>   > joachim
>   >
>   >
>   > Am 14.06.2009 um 19:50 schrieb victor:
>   >
>   > > No, currently, it will just report the number of bits used. Does
>   > > this need to be implemented? If so, I would have to adjust it.
>   > >
>   > > Victor
>   > > ----- Original Message ----- From: "Andres Cabrera"
>   >    > > >
>   > > To: 
>   > > Sent: Sunday, June 14, 2009 3:57 PM
>   > > Subject: [Csnd] Re: Re: Re: Feature request: filebit
>   > >
>   > >
>   > > Is there any way of knowing if it is a 32 bit float PCM file?
>   > >
>   > > Cheers,
>   > > Andrés
>   > >
>   > > On Sat, Jun 13, 2009 at 4:00 PM,
>   > victor
>   > > wrote:
>   > >> Done, in CVS now.
>   > >> The filebit opcode will return the number of bits of a file
>   > if PCM.
>   > >> If a
>   > >> different
>   > >> encoding, it will return a code indicating what the encoding
>   > is
>   > >> (always
>   > >> negative):
>   > >>
>   > >> SF_FORMAT_ULAW = -16, /* U-Law encoded. */
>   > >> SF_FORMAT_ALAW = -17, /* A-Law encoded. */
>   > >> SF_FORMAT_IMA_ADPCM = -18, /* IMA ADPCM. */
>   > >> SF_FORMAT_MS_ADPCM = -19, /* Microsoft ADPCM. */
>   > >>
>   > >> SF_FORMAT_GSM610 = -32, /* GSM 6.10 encoding. */
>   > >> SF_FORMAT_VOX_ADPCM = -33, /* Oki Dialogic ADPCM encoding.
>   > >> */
>   > >>
>   > >> SF_FORMAT_G721_32 = -48, /* 32kbs G721 ADPCM encoding. */
>   > >> SF_FORMAT_G723_24 = -49, /* 24kbs G723 ADPCM encoding. */
>   > >> SF_FORMAT_G723_40 = -50, /* 40kbs G723 ADPCM encoding. */
>   > >>
>   > >> SF_FORMAT_DWVW_12 = -64, /* 12 bit Delta Width Variable
>   > >> Word encoding. */
>   > >> SF_FORMAT_DWVW_16 = -65, /* 16 bit Delta Width Variable
>   > >> Word encoding. */
>   > >> SF_FORMAT_DWVW_24 = -66, /* 24 bit Delta Width Variable
>   > >> Word encoding. */
>   > >> SF_FORMAT_DWVW_N = -67, /* N bit Delta Width Variable
>   > >> Word encoding. */
>   > >>
>   > >> SF_FORMAT_DPCM_8 = -80, /* 8 bit differential PCM (XI
>   > >> only) */
>   > >> SF_FORMAT_DPCM_16 = -81, /* 16 bit differential PCM (XI
>   > >> only) */
>   > >>
>   > >> ----- Original Message ----- From: "Jacob Joaquin"
>   >    > >> >
>   > >> To: 
>   > >> Sent: Saturday, June 13, 2009 9:26 PM
>   > >> Subject: [Csnd] Re: Feature request: filebit
>   > >>
>   > >>
>   > >>>
>   > >>> Thanks for looking at it.
>   > >>>
>   > >>> It might also be worth looking into other potentially useful
>   > data
>   > >>> that can
>   > >>> be grabbed from an audio file. The only other thing that
>   > comes to
>   > >>> mind is
>   > >>> the number of sample frames. I've been calculating this
>   > by
>   > >>> multiplying
>   > >>> the
>   > >>> output of filesr and filelen. I've never tested to see if
>   > this is
>   > >>> sample
>   > >>> accurate or not. Either way, a fileframes might not be a bad idea.
>   > >>>
>   > >>> Best,
>   > >>> Jake
>   > >>>
>   > >>>
>   > >>> Victor.Lazzarini wrote:
>   > >>>>
>   > >>>> I suppose it's just a matter of using libsndfile. I don't
>   > >>>> think it's a problem at all. We'll look after it.
>   > >>>> Victor
>   > >>>> ----- Original Message ----- From: "Jacob Joaquin"
>   > >>>> 
>   > >>>> To: 
>   > >>>> Sent: Saturday, June 13, 2009 6:21 PM
>   > >>>> Subject: [Csnd] Feature request: filebit
>   > >>>>
>   > >>>>
>   > >>>>>
>   > >>>>> Hello everybody. I've been writing csound csds for the
>   > purpose
>   > >>>>> of batch
>   > >>>>> processing dozens or hundreds of samples at a time from the
>   > >>>>> command-line.
>   > >>>>> And I've run up against a small wall.
>   > >>>>>
>   > >>>>> As far as I can tell, there is no way of getting the bit
>   > depth
>   > >>>>> of an
>   > >>>>> audio
>   > >>>>> file. I propose an opcode called filebit, that returns this
>   > >>>>> information.
>   > >>>>> I
>   > >>>>> believe this would be an obvious fit with the existing
>   > opcodes
>   > >>>>> filelen,
>   > >>>>> filenchnls, filepeak, filesr.
>   > >>>>>
>   > >>>>> The Csound utility sndinfo provides bit depth
>   > information.
>   > >>>>> Perhaps some
>   > >>>>> of
>   > >>>>> the code from sndinfo can be repackaged as an opcode?
>   > >>>>>
>   > >>>>> Best,
>   > >>>>> Jake
>   > >>>>> --
>   > >>>>> View this message in context:
>   > >>>>>
>   > >>>>> http://www.nabble.com/Feature-request%3A-filebit-
>   > tp24014498p24014498.html>>>>> Sent from the Csound - General
>   > mailing list archive at Nabble.com.
>   > >>>>>
>   > >>>>>
>   > >>>>>
>   > >>>>> Send bugs reports to this list.
>   > >>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with
>   > body
>   > >>>>> "unsubscribe
>   > >>>>> csound"
>   > >>>>
>   > >>>>
>   > >>>>
>   > >>>> Send bugs reports to this list.
>   > >>>> To unsubscribe, send email sympa@lists.bath.ac.uk with
>   > body
>   > >>>> "unsubscribe
>   > >>>> csound"
>   > >>>>
>   > >>>>
>   > >>>
>   > >>> --
>   > >>> View this message in context:
>   > >>> http://www.nabble.com/Feature-request%3A-filebit-
>   > tp24014498p24016070.html>>> Sent from the Csound - General
>   > mailing list archive at Nabble.com.
>   > >>>
>   > >>>
>   > >>>
>   > >>> Send bugs reports to this list.
>   > >>> To unsubscribe, send email sympa@lists.bath.ac.uk with
>   > body
>   > >>> "unsubscribe
>   > >>> csound"
>   > >>
>   > >>
>   > >>
>   > >> Send bugs reports to this list.
>   > >> To unsubscribe, send email sympa@lists.bath.ac.uk with
>   > body
>   > >> "unsubscribe
>   > >> csound"
>   > >>
>   > >
>   > >
>   > >
>   > > --
>   > >
>   > >
>   > > Andrés
>   > >
>   > >
>   > > Send bugs reports to this list.
>   > > To unsubscribe, send email sympa@lists.bath.ac.uk with
>   > body
>   > > "unsubscribe csound"=
>   > >
>   > >
>   > > Send bugs reports to this list.
>   > > To unsubscribe, send email sympa@lists.bath.ac.uk with
>   > body
>   > > "unsubscribe csound"
>   > >
>   >
>   >
>   >
>   > Send bugs reports to this list.
>   > To unsubscribe, send email sympa@lists.bath.ac.uk with body
>   > "unsubscribe csound"
>
>   Dr Victor Lazzarini, Senior Lecturer, Dept. of Music,National University
> of Ireland, Maynooth
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"


-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com


Date2009-06-16 22:08
Fromvictor
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: Re: Re: Feature request: filebit
-32 and -64 are already taken.

Victor
----- Original Message ----- 
From: "Michael Gogins" 
To: 
Sent: Tuesday, June 16, 2009 9:54 PM
Subject: [Csnd] Re: Re: Re: Re: Re: Re: Re: Re: Feature request: filebit


-32, -64.

Regards,
Mike

On 6/16/09, victor  wrote:
> Ok, so 32-bit floats PCM will give you a -1 code and
> 64-bit floats PCM will give you -2.
>
> Is that OK?
>
> Victor
>   ----- Original Message -----
>   From: Victor.Lazzarini@nuim.ie
>   To: csound@lists.bath.ac.uk
>   Sent: Tuesday, June 16, 2009 11:32 AM
>   Subject: [Csnd] Re: Re: Re: Re: Re: Re: Feature request: filebit
>
>
>   I'll give it a negative code then.
>
>   ----- Original Message -----
>   From: joachim heintz 
>   Date: Tuesday, June 16, 2009 11:26 am
>   Subject: [Csnd] Re: Re: Re: Re: Re: Feature request: filebit
>   To: csound@lists.bath.ac.uk
>
>   > Actually it would be great to have the distinction between 32
>   > bit
>   > float and 32 bit ints. We have this distiction in the output
>   > options
>   > (for instance in fout), and if one wants to take an input file,
>   > to
>   > perform some manipulations, and finally to write this as a file
>   > with
>   > the same bit format, it is needed.
>   > If I understood right, Jacob also proposed an addition to
>   > filelen,
>   > which directly gives the number of sample frames (instead of
>   > seconds
>   > with possible roundoff errors). I'd find this useful, too.
>   > Thanks for writing filebit, Victor. It's great to have it.
>   > Best -
>   > joachim
>   >
>   >
>   > Am 14.06.2009 um 19:50 schrieb victor:
>   >
>   > > No, currently, it will just report the number of bits used. Does
>   > > this need to be implemented? If so, I would have to adjust it.
>   > >
>   > > Victor
>   > > ----- Original Message ----- From: "Andres Cabrera"
>   >    > > >
>   > > To: 
>   > > Sent: Sunday, June 14, 2009 3:57 PM
>   > > Subject: [Csnd] Re: Re: Re: Feature request: filebit
>   > >
>   > >
>   > > Is there any way of knowing if it is a 32 bit float PCM file?
>   > >
>   > > Cheers,
>   > > Andrés
>   > >
>   > > On Sat, Jun 13, 2009 at 4:00 PM,
>   > victor
>   > > wrote:
>   > >> Done, in CVS now.
>   > >> The filebit opcode will return the number of bits of a file
>   > if PCM.
>   > >> If a
>   > >> different
>   > >> encoding, it will return a code indicating what the encoding
>   > is
>   > >> (always
>   > >> negative):
>   > >>
>   > >> SF_FORMAT_ULAW = -16, /* U-Law encoded. */
>   > >> SF_FORMAT_ALAW = -17, /* A-Law encoded. */
>   > >> SF_FORMAT_IMA_ADPCM = -18, /* IMA ADPCM. */
>   > >> SF_FORMAT_MS_ADPCM = -19, /* Microsoft ADPCM. */
>   > >>
>   > >> SF_FORMAT_GSM610 = -32, /* GSM 6.10 encoding. */
>   > >> SF_FORMAT_VOX_ADPCM = -33, /* Oki Dialogic ADPCM encoding.
>   > >> */
>   > >>
>   > >> SF_FORMAT_G721_32 = -48, /* 32kbs G721 ADPCM encoding. */
>   > >> SF_FORMAT_G723_24 = -49, /* 24kbs G723 ADPCM encoding. */
>   > >> SF_FORMAT_G723_40 = -50, /* 40kbs G723 ADPCM encoding. */
>   > >>
>   > >> SF_FORMAT_DWVW_12 = -64, /* 12 bit Delta Width Variable
>   > >> Word encoding. */
>   > >> SF_FORMAT_DWVW_16 = -65, /* 16 bit Delta Width Variable
>   > >> Word encoding. */
>   > >> SF_FORMAT_DWVW_24 = -66, /* 24 bit Delta Width Variable
>   > >> Word encoding. */
>   > >> SF_FORMAT_DWVW_N = -67, /* N bit Delta Width Variable
>   > >> Word encoding. */
>   > >>
>   > >> SF_FORMAT_DPCM_8 = -80, /* 8 bit differential PCM (XI
>   > >> only) */
>   > >> SF_FORMAT_DPCM_16 = -81, /* 16 bit differential PCM (XI
>   > >> only) */
>   > >>
>   > >> ----- Original Message ----- From: "Jacob Joaquin"
>   >    > >> >
>   > >> To: 
>   > >> Sent: Saturday, June 13, 2009 9:26 PM
>   > >> Subject: [Csnd] Re: Feature request: filebit
>   > >>
>   > >>
>   > >>>
>   > >>> Thanks for looking at it.
>   > >>>
>   > >>> It might also be worth looking into other potentially useful
>   > data
>   > >>> that can
>   > >>> be grabbed from an audio file. The only other thing that
>   > comes to
>   > >>> mind is
>   > >>> the number of sample frames. I've been calculating this
>   > by
>   > >>> multiplying
>   > >>> the
>   > >>> output of filesr and filelen. I've never tested to see if
>   > this is
>   > >>> sample
>   > >>> accurate or not. Either way, a fileframes might not be a bad idea.
>   > >>>
>   > >>> Best,
>   > >>> Jake
>   > >>>
>   > >>>
>   > >>> Victor.Lazzarini wrote:
>   > >>>>
>   > >>>> I suppose it's just a matter of using libsndfile. I don't
>   > >>>> think it's a problem at all. We'll look after it.
>   > >>>> Victor
>   > >>>> ----- Original Message ----- From: "Jacob Joaquin"
>   > >>>> 
>   > >>>> To: 
>   > >>>> Sent: Saturday, June 13, 2009 6:21 PM
>   > >>>> Subject: [Csnd] Feature request: filebit
>   > >>>>
>   > >>>>
>   > >>>>>
>   > >>>>> Hello everybody. I've been writing csound csds for the
>   > purpose
>   > >>>>> of batch
>   > >>>>> processing dozens or hundreds of samples at a time from the
>   > >>>>> command-line.
>   > >>>>> And I've run up against a small wall.
>   > >>>>>
>   > >>>>> As far as I can tell, there is no way of getting the bit
>   > depth
>   > >>>>> of an
>   > >>>>> audio
>   > >>>>> file. I propose an opcode called filebit, that returns this
>   > >>>>> information.
>   > >>>>> I
>   > >>>>> believe this would be an obvious fit with the existing
>   > opcodes
>   > >>>>> filelen,
>   > >>>>> filenchnls, filepeak, filesr.
>   > >>>>>
>   > >>>>> The Csound utility sndinfo provides bit depth
>   > information.
>   > >>>>> Perhaps some
>   > >>>>> of
>   > >>>>> the code from sndinfo can be repackaged as an opcode?
>   > >>>>>
>   > >>>>> Best,
>   > >>>>> Jake
>   > >>>>> --
>   > >>>>> View this message in context:
>   > >>>>>
>   > >>>>> http://www.nabble.com/Feature-request%3A-filebit-
>   > tp24014498p24014498.html>>>>> Sent from the Csound - General
>   > mailing list archive at Nabble.com.
>   > >>>>>
>   > >>>>>
>   > >>>>>
>   > >>>>> Send bugs reports to this list.
>   > >>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with
>   > body
>   > >>>>> "unsubscribe
>   > >>>>> csound"
>   > >>>>
>   > >>>>
>   > >>>>
>   > >>>> Send bugs reports to this list.
>   > >>>> To unsubscribe, send email sympa@lists.bath.ac.uk with
>   > body
>   > >>>> "unsubscribe
>   > >>>> csound"
>   > >>>>
>   > >>>>
>   > >>>
>   > >>> --
>   > >>> View this message in context:
>   > >>> http://www.nabble.com/Feature-request%3A-filebit-
>   > tp24014498p24016070.html>>> Sent from the Csound - General
>   > mailing list archive at Nabble.com.
>   > >>>
>   > >>>
>   > >>>
>   > >>> Send bugs reports to this list.
>   > >>> To unsubscribe, send email sympa@lists.bath.ac.uk with
>   > body
>   > >>> "unsubscribe
>   > >>> csound"
>   > >>
>   > >>
>   > >>
>   > >> Send bugs reports to this list.
>   > >> To unsubscribe, send email sympa@lists.bath.ac.uk with
>   > body
>   > >> "unsubscribe
>   > >> csound"
>   > >>
>   > >
>   > >
>   > >
>   > > --
>   > >
>   > >
>   > > Andrés
>   > >
>   > >
>   > > Send bugs reports to this list.
>   > > To unsubscribe, send email sympa@lists.bath.ac.uk with
>   > body
>   > > "unsubscribe csound"=
>   > >
>   > >
>   > > Send bugs reports to this list.
>   > > To unsubscribe, send email sympa@lists.bath.ac.uk with
>   > body
>   > > "unsubscribe csound"
>   > >
>   >
>   >
>   >
>   > Send bugs reports to this list.
>   > To unsubscribe, send email sympa@lists.bath.ac.uk with body
>   > "unsubscribe csound"
>
>   Dr Victor Lazzarini, Senior Lecturer, Dept. of Music,National University
> of Ireland, Maynooth
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"


-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
csound"=