Csound Csound-dev Csound-tekno Search About

[Csnd] GEN01???

Date2019-03-12 05:25
FromPete Goodeve
Subject[Csnd] GEN01???
AttachmentsNone  

Date2019-03-12 06:59
Fromjoachim heintz
SubjectRe: [Csnd] GEN01???
any code needs changes, and then errors can happen.

why don't you file a bug report at https://github.com/csound/csound/issues ?

for you to work, it should be easy to convert your .raw to .wav, i suppose.

	joachim



On 12/03/19 06:25, Pete Goodeve wrote:
> Hi,
> I have to say this is annoying.  I thought one of the tenets
> of Csound was backward compatibility...
>
> In my RotorOrgan, I generate a "Spring Reverb" with a
> convoluttion from an impulse file.  This is raw 32-bit float
> samples at 24000Hz (same as the csd's sample rate)
> It worked fine from Csound5 up to 6.04.  I just upgraded
> my Linux to 6.12, and it fails!
>
> I load the file with an ftgen, using GEN01:
>
>  	impulse ftgen 0, 0, 0, 1, "spring_reverb24.raw", 0, 6, 0
>
> with the '6' representing 32-bit float.
>
> In 6.12 I suddenly get:
>
> soundin cannot open spring_reverb24.raw: File contains data in an unknown format.
> ftable 102: Failed to open file spring_reverb24.raw
> f102     0.00     0.00     1.00  "spring_reverb24.raw" ...
> INIT ERROR in instr 10 line 871: ftgen error
>  from file hammond.csd (1)
> impulse	ftgen.iS	0	0	0	1	"spring_reverb24.raw"	06	0	
>
> Huh?
>
> I went to the 6.12 manual and see under GEN01:
>
>  format -- if positive it is ignored, but if negative specifies the audio format of a raw file.
>
>
>         -1 - 8-bit signed character
>         -2 - 8-bit A-law bytes
>         -3 - 8-bit U-law bytes
>         -4 - 16-bit short integers
>         -5 - 32-bit long integers
>         -6 - 32-bit floats
>         -7 - 8-bit unsigned character
>         -8 - 24-bit integers
>         -9 - 64-bit doubles
>
> *Negative*!! WHY?
>
> Anyway, I changed it to '-6'.  So now I get:
>
> ftable 102: invalid sample format: -6
> f102     0.00     0.00     1.00  "spring_reverb24.raw" ...
> INIT ERROR in instr 10 line 871: ftgen error
>  from file hammond.csd (1)
> impulse	ftgen.iS	0	0	0	1	"spring_reverb24.raw"	0-6	0	
>
> So now I have no idea...
> (And looking at the report, the 'skip' parameter before the format
> seems to haver disappeared!)
> 	-- Pete --
>
> 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

Date2019-03-12 11:37
FromJohn ff
SubjectRe: [Csnd] GEN01???
The change was heavily warned in the release notes.  After a number of tries we settled on raw files needing a negative format to avoid the large number of errors that happened with the original scheme.  Using libsndfile makes this area easier to use.  There are only a few incompatible changes in the 30 years of development.

==John ff

⁣Sent from TypeApp ​

On Mar 12, 2019, 07:00, at 07:00, joachim heintz  wrote:
>any code needs changes, and then errors can happen.
>
>why don't you file a bug report at
>https://github.com/csound/csound/issues ?
>
>for you to work, it should be easy to convert your .raw to .wav, i
>suppose.
>
>	joachim
>
>
>
>On 12/03/19 06:25, Pete Goodeve wrote:
>> Hi,
>> I have to say this is annoying.  I thought one of the tenets
>> of Csound was backward compatibility...
>>
>> In my RotorOrgan, I generate a "Spring Reverb" with a
>> convoluttion from an impulse file.  This is raw 32-bit float
>> samples at 24000Hz (same as the csd's sample rate)
>> It worked fine from Csound5 up to 6.04.  I just upgraded
>> my Linux to 6.12, and it fails!
>>
>> I load the file with an ftgen, using GEN01:
>>
>>  	impulse ftgen 0, 0, 0, 1, "spring_reverb24.raw", 0, 6, 0
>>
>> with the '6' representing 32-bit float.
>>
>> In 6.12 I suddenly get:
>>
>> soundin cannot open spring_reverb24.raw: File contains data in an
>unknown format.
>> ftable 102: Failed to open file spring_reverb24.raw
>> f102     0.00     0.00     1.00  "spring_reverb24.raw" ...
>> INIT ERROR in instr 10 line 871: ftgen error
>>  from file hammond.csd (1)
>> impulse	ftgen.iS	0	0	0	1	"spring_reverb24.raw"	06	0	
>>
>> Huh?
>>
>> I went to the 6.12 manual and see under GEN01:
>>
>>  format -- if positive it is ignored, but if negative specifies the
>audio format of a raw file.
>>
>>
>>         -1 - 8-bit signed character
>>         -2 - 8-bit A-law bytes
>>         -3 - 8-bit U-law bytes
>>         -4 - 16-bit short integers
>>         -5 - 32-bit long integers
>>         -6 - 32-bit floats
>>         -7 - 8-bit unsigned character
>>         -8 - 24-bit integers
>>         -9 - 64-bit doubles
>>
>> *Negative*!! WHY?
>>
>> Anyway, I changed it to '-6'.  So now I get:
>>
>> ftable 102: invalid sample format: -6
>> f102     0.00     0.00     1.00  "spring_reverb24.raw" ...
>> INIT ERROR in instr 10 line 871: ftgen error
>>  from file hammond.csd (1)
>> impulse	ftgen.iS	0	0	0	1	"spring_reverb24.raw"	0-6	0	
>>
>> So now I have no idea...
>> (And looking at the report, the 'skip' parameter before the format
>> seems to haver disappeared!)
>> 	-- Pete --
>>
>> 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

Date2019-03-12 12:21
FromVictor Lazzarini
SubjectRe: [Csnd] GEN01???
Looks like there is a bug where negative values are not being accepted as sample formats.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 12 Mar 2019, at 11:37, John ff  wrote:
> 
> The change was heavily warned in the release notes.  After a number of tries we settled on raw files needing a negative format to avoid the large number of errors that happened with the original scheme.  Using libsndfile makes this area easier to use.  There are only a few incompatible changes in the 30 years of development.
> 
> ==John ff
> 
> ⁣Sent from TypeApp ​
> 
> On Mar 12, 2019, 07:00, at 07:00, joachim heintz  wrote:
>> any code needs changes, and then errors can happen.
>> 
>> why don't you file a bug report at
>> https://github.com/csound/csound/issues ?
>> 
>> for you to work, it should be easy to convert your .raw to .wav, i
>> suppose.
>> 
>> 	joachim
>> 
>> 
>> 
>> On 12/03/19 06:25, Pete Goodeve wrote:
>>> Hi,
>>> I have to say this is annoying.  I thought one of the tenets
>>> of Csound was backward compatibility...
>>> 
>>> In my RotorOrgan, I generate a "Spring Reverb" with a
>>> convoluttion from an impulse file.  This is raw 32-bit float
>>> samples at 24000Hz (same as the csd's sample rate)
>>> It worked fine from Csound5 up to 6.04.  I just upgraded
>>> my Linux to 6.12, and it fails!
>>> 
>>> I load the file with an ftgen, using GEN01:
>>> 
>>> 	impulse ftgen 0, 0, 0, 1, "spring_reverb24.raw", 0, 6, 0
>>> 
>>> with the '6' representing 32-bit float.
>>> 
>>> In 6.12 I suddenly get:
>>> 
>>> soundin cannot open spring_reverb24.raw: File contains data in an
>> unknown format.
>>> ftable 102: Failed to open file spring_reverb24.raw
>>> f102     0.00     0.00     1.00  "spring_reverb24.raw" ...
>>> INIT ERROR in instr 10 line 871: ftgen error
>>> from file hammond.csd (1)
>>> impulse	ftgen.iS	0	0	0	1	"spring_reverb24.raw"	06	0	
>>> 
>>> Huh?
>>> 
>>> I went to the 6.12 manual and see under GEN01:
>>> 
>>> format -- if positive it is ignored, but if negative specifies the
>> audio format of a raw file.
>>> 
>>> 
>>>        -1 - 8-bit signed character
>>>        -2 - 8-bit A-law bytes
>>>        -3 - 8-bit U-law bytes
>>>        -4 - 16-bit short integers
>>>        -5 - 32-bit long integers
>>>        -6 - 32-bit floats
>>>        -7 - 8-bit unsigned character
>>>        -8 - 24-bit integers
>>>        -9 - 64-bit doubles
>>> 
>>> *Negative*!! WHY?
>>> 
>>> Anyway, I changed it to '-6'.  So now I get:
>>> 
>>> ftable 102: invalid sample format: -6
>>> f102     0.00     0.00     1.00  "spring_reverb24.raw" ...
>>> INIT ERROR in instr 10 line 871: ftgen error
>>> from file hammond.csd (1)
>>> impulse	ftgen.iS	0	0	0	1	"spring_reverb24.raw"	0-6	0	
>>> 
>>> So now I have no idea...
>>> (And looking at the report, the 'skip' parameter before the format
>>> seems to haver disappeared!)
>>> 	-- Pete --
>>> 
>>> 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

Date2019-03-12 23:06
FromPete Goodeve
SubjectRe: [Csnd] GEN01???
AttachmentsNone  

Date2019-03-12 23:56
FromJohn ff
SubjectRe: [Csnd] GEN01???
Example

⁣Sent from TypeApp ​

On Mar 12, 2019, 23:07, at 23:07, Pete Goodeve  wrote:
>On Tue, Mar 12, 2019 at 12:21:31PM +0000, Victor Lazzarini wrote:
>> Looks like there is a bug where negative values are not being
>accepted as sample formats.
>> ========================
>> Prof. Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952 
>> 
>> > On 12 Mar 2019, at 11:37, John ff  wrote:
>> > 
>> > The change was heavily warned in the release notes.  After a number
>of tries we settled on raw files needing a negative format to avoid the
>large number of errors that happened with the original scheme.  Using
>libsndfile makes this area easier to use.  There are only a few
>incompatible changes in the 30 years of development.
>> > 
>> > ==John ff
>> > 
>Yes, I suppose it does help to read the Release Notes (:-/)
>
>Unfortunately they really aren't much help when I did read them.
>Aside from a rather vague warning about backward compatibility,
>this is all I see:
>
>"GEN01 now uses format 0 to get the file type from the header;
>any other value indicates a raw file. THIS MAY BE INCOMPATIBLE.
>For most users the value of zero will be correct."
>
>No mention of negative values, or why they should be preferable.
>
>And I went to the source on github, and don't see any expectation
>of negative values in fgens.c:
>
>static const int gen01_format_table[10] = {
>    0,
>    AE_CHAR,    AE_ALAW,    AE_ULAW,    AE_SHORT,    AE_LONG,
>    AE_FLOAT,   AE_UNCH,    AE_24INT,   AE_DOUBLE
>};
>....
>     int   fmt = (int) MYFLT2LRND(ff->e.p[7]);
>     ......
>     if (UNLIKELY(fmt < 0 || fmt > 9))
>        return fterror(ff, Str("invalid sample format: %d"), fmt);
>     p->format = gen01_format_table[fmt];
>
>I feel that these changes were a bit hasty...
>Any chance of a  reversion?
>
>	-- Pete --
>
>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

Date2019-03-13 06:41
FromVictor Lazzarini
SubjectRe: [Csnd] GEN01???
Try GEN 01 with ftgen with any file using a
negative format code.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland
> On 12 Mar 2019, at 23:57, John ff  wrote:
> 
> Example
> 
> ⁣Sent from TypeApp ​
> 
>> On Mar 12, 2019, 23:07, at 23:07, Pete Goodeve  wrote:
>>> On Tue, Mar 12, 2019 at 12:21:31PM +0000, Victor Lazzarini wrote:
>>> Looks like there is a bug where negative values are not being
>> accepted as sample formats.
>>> ========================
>>> Prof. Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy,
>>> Maynooth University,
>>> Maynooth, Co Kildare, Ireland
>>> Tel: 00 353 7086936
>>> Fax: 00 353 1 7086952 
>>> 
>>>> On 12 Mar 2019, at 11:37, John ff  wrote:
>>>> 
>>>> The change was heavily warned in the release notes.  After a number
>> of tries we settled on raw files needing a negative format to avoid the
>> large number of errors that happened with the original scheme.  Using
>> libsndfile makes this area easier to use.  There are only a few
>> incompatible changes in the 30 years of development.
>>>> 
>>>> ==John ff
>>>> 
>> Yes, I suppose it does help to read the Release Notes (:-/)
>> 
>> Unfortunately they really aren't much help when I did read them.
>> Aside from a rather vague warning about backward compatibility,
>> this is all I see:
>> 
>> "GEN01 now uses format 0 to get the file type from the header;
>> any other value indicates a raw file. THIS MAY BE INCOMPATIBLE.
>> For most users the value of zero will be correct."
>> 
>> No mention of negative values, or why they should be preferable.
>> 
>> And I went to the source on github, and don't see any expectation
>> of negative values in fgens.c:
>> 
>> static const int gen01_format_table[10] = {
>>   0,
>>   AE_CHAR,    AE_ALAW,    AE_ULAW,    AE_SHORT,    AE_LONG,
>>   AE_FLOAT,   AE_UNCH,    AE_24INT,   AE_DOUBLE
>> };
>> ....
>>    int   fmt = (int) MYFLT2LRND(ff->e.p[7]);
>>    ......
>>    if (UNLIKELY(fmt < 0 || fmt > 9))
>>       return fterror(ff, Str("invalid sample format: %d"), fmt);
>>    p->format = gen01_format_table[fmt];
>> 
>> I feel that these changes were a bit hasty...
>> Any chance of a  reversion?
>> 
>>    -- Pete --
>> 
>> 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

Date2019-03-13 09:05
FromVictor Lazzarini
SubjectRe: [Csnd] GEN01???
Or this

 f1 0 0 1 "beats.wav" 0 -6 0


========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 13 Mar 2019, at 06:41, Victor Lazzarini  wrote:
> 
> Try GEN 01 with ftgen with any file using a
> negative format code.
> 
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
>> On 12 Mar 2019, at 23:57, John ff  wrote:
>> 
>> Example
>> 
>> ⁣Sent from TypeApp ​
>> 
>>> On Mar 12, 2019, 23:07, at 23:07, Pete Goodeve  wrote:
>>>> On Tue, Mar 12, 2019 at 12:21:31PM +0000, Victor Lazzarini wrote:
>>>> Looks like there is a bug where negative values are not being
>>> accepted as sample formats.
>>>> ========================
>>>> Prof. Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>> Maynooth University,
>>>> Maynooth, Co Kildare, Ireland
>>>> Tel: 00 353 7086936
>>>> Fax: 00 353 1 7086952 
>>>> 
>>>>> On 12 Mar 2019, at 11:37, John ff  wrote:
>>>>> 
>>>>> The change was heavily warned in the release notes.  After a number
>>> of tries we settled on raw files needing a negative format to avoid the
>>> large number of errors that happened with the original scheme.  Using
>>> libsndfile makes this area easier to use.  There are only a few
>>> incompatible changes in the 30 years of development.
>>>>> 
>>>>> ==John ff
>>>>> 
>>> Yes, I suppose it does help to read the Release Notes (:-/)
>>> 
>>> Unfortunately they really aren't much help when I did read them.
>>> Aside from a rather vague warning about backward compatibility,
>>> this is all I see:
>>> 
>>> "GEN01 now uses format 0 to get the file type from the header;
>>> any other value indicates a raw file. THIS MAY BE INCOMPATIBLE.
>>> For most users the value of zero will be correct."
>>> 
>>> No mention of negative values, or why they should be preferable.
>>> 
>>> And I went to the source on github, and don't see any expectation
>>> of negative values in fgens.c:
>>> 
>>> static const int gen01_format_table[10] = {
>>>  0,
>>>  AE_CHAR,    AE_ALAW,    AE_ULAW,    AE_SHORT,    AE_LONG,
>>>  AE_FLOAT,   AE_UNCH,    AE_24INT,   AE_DOUBLE
>>> };
>>> ....
>>>   int   fmt = (int) MYFLT2LRND(ff->e.p[7]);
>>>   ......
>>>   if (UNLIKELY(fmt < 0 || fmt > 9))
>>>      return fterror(ff, Str("invalid sample format: %d"), fmt);
>>>   p->format = gen01_format_table[fmt];
>>> 
>>> I feel that these changes were a bit hasty...
>>> Any chance of a  reversion?
>>> 
>>>   -- Pete --
>>> 
>>> 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

Date2019-03-13 14:29
Fromjohn
SubjectRe: [Csnd] GEN01???
OK; unfinished code.  dud work on diskin etc.  Will take a while to fix as 
a busy week


On Wed, 13 Mar 2019, Victor Lazzarini wrote:

> Or this
>
> f1 0 0 1 "beats.wav" 0 -6 0
>
>
> ========================
> Prof. Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
>
>> On 13 Mar 2019, at 06:41, Victor Lazzarini  wrote:
>>
>> Try GEN 01 with ftgen with any file using a
>> negative format code.
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>> On 12 Mar 2019, at 23:57, John ff  wrote:
>>>
>>> Example
>>>
>>> ⁣Sent from TypeApp ​
>>>
>>>> On Mar 12, 2019, 23:07, at 23:07, Pete Goodeve  wrote:
>>>>> On Tue, Mar 12, 2019 at 12:21:31PM +0000, Victor Lazzarini wrote:
>>>>> Looks like there is a bug where negative values are not being
>>>> accepted as sample formats.
>>>>> ========================
>>>>> Prof. Victor Lazzarini
>>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>>> Maynooth University,
>>>>> Maynooth, Co Kildare, Ireland
>>>>> Tel: 00 353 7086936
>>>>> Fax: 00 353 1 7086952
>>>>>
>>>>>> On 12 Mar 2019, at 11:37, John ff  wrote:
>>>>>>
>>>>>> The change was heavily warned in the release notes.  After a number
>>>> of tries we settled on raw files needing a negative format to avoid the
>>>> large number of errors that happened with the original scheme.  Using
>>>> libsndfile makes this area easier to use.  There are only a few
>>>> incompatible changes in the 30 years of development.
>>>>>>
>>>>>> ==John ff
>>>>>>
>>>> Yes, I suppose it does help to read the Release Notes (:-/)
>>>>
>>>> Unfortunately they really aren't much help when I did read them.
>>>> Aside from a rather vague warning about backward compatibility,
>>>> this is all I see:
>>>>
>>>> "GEN01 now uses format 0 to get the file type from the header;
>>>> any other value indicates a raw file. THIS MAY BE INCOMPATIBLE.
>>>> For most users the value of zero will be correct."
>>>>
>>>> No mention of negative values, or why they should be preferable.
>>>>
>>>> And I went to the source on github, and don't see any expectation
>>>> of negative values in fgens.c:
>>>>
>>>> static const int gen01_format_table[10] = {
>>>>  0,
>>>>  AE_CHAR,    AE_ALAW,    AE_ULAW,    AE_SHORT,    AE_LONG,
>>>>  AE_FLOAT,   AE_UNCH,    AE_24INT,   AE_DOUBLE
>>>> };
>>>> ....
>>>>   int   fmt = (int) MYFLT2LRND(ff->e.p[7]);
>>>>   ......
>>>>   if (UNLIKELY(fmt < 0 || fmt > 9))
>>>>      return fterror(ff, Str("invalid sample format: %d"), fmt);
>>>>   p->format = gen01_format_table[fmt];
>>>>
>>>> I feel that these changes were a bit hasty...
>>>> Any chance of a  reversion?
>>>>
>>>>   -- Pete --
>>>>
>>>> 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
>

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

Date2019-03-13 21:00
FromPete Goodeve
SubjectRe: [Csnd] GEN01???
AttachmentsNone  

Date2019-03-13 21:19
Fromjohn
SubjectRe: [Csnd] GEN01???
The bug report is in the issues.  It was opening files as raw when 
incorrect and thus generating nasty sounds.  The revised version ignores 
the format if positive (for backward compatability but with any header it 
is unnecssary) and if negative it uses the format negated with a raw 
format.  There were extensive discussions at the time; not sure if they 
were public or not.  This seemed (and still seens) the best solution.

Note there was a coding error in gen01 that gave an incorrect error if the 
format was negative; I think that is now corrected.



On Wed, 13 Mar 2019, Pete Goodeve wrote:

> Sorry to keep bugging on this, but as it definitely *does* break
> compatibility for me, I'd like to know the reason for the move
> to negative values,
>
> I dug back in the csound_dev archives to see if I could find
> any discussion, but all I can find is the release notes.
>
> I suppose that people might have specified a format for
> a file with a non-raw type, but does this hurt? They should match.
>
> How about keeping positive values, but only pay attention
> to them if the type is not determined?
>
> Thanks,
>
> 	-- Pete --
>
>
> On Wed, Mar 13, 2019 at 02:29:01PM +0000, john wrote:
>> OK; unfinished code.  dud work on diskin etc.  Will take a while to fix as
>> a busy week
>>
>>
>> On Wed, 13 Mar 2019, Victor Lazzarini wrote:
>>
>>> Or this
>>>
>>> f1 0 0 1 "beats.wav" 0 -6 0
>>>
>>>
>>> ========================
>>> Prof. Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy,
>>> Maynooth University,
>>> Maynooth, Co Kildare, Ireland
>>> Tel: 00 353 7086936
>>> Fax: 00 353 1 7086952
>>>
>>>> On 13 Mar 2019, at 06:41, Victor Lazzarini  wrote:
>>>>
>>>> Try GEN 01 with ftgen with any file using a
>>>> negative format code.
>>>>
>>>> Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>> Maynooth University
>>>> Ireland
>>>>> On 12 Mar 2019, at 23:57, John ff  wrote:
>>>>>
>>>>> Example
>>>>>
>>>>> ⁣Sent from TypeApp ​
>>>>>
>>>>>> On Mar 12, 2019, 23:07, at 23:07, Pete Goodeve
>>>>>>  wrote:
>>>>>>> On Tue, Mar 12, 2019 at 12:21:31PM +0000, Victor Lazzarini wrote:
>>>>>>> Looks like there is a bug where negative values are not being
>>>>>> accepted as sample formats.
>>>>>>> ========================
>>>>>>> Prof. Victor Lazzarini
>>>>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>>>>> Maynooth University,
>>>>>>> Maynooth, Co Kildare, Ireland
>>>>>>> Tel: 00 353 7086936
>>>>>>> Fax: 00 353 1 7086952
>>>>>>>
>>>>>>>> On 12 Mar 2019, at 11:37, John ff  wrote:
>>>>>>>>
>>>>>>>> The change was heavily warned in the release notes.  After a number
>>>>>> of tries we settled on raw files needing a negative format to avoid the
>>>>>> large number of errors that happened with the original scheme.  Using
>>>>>> libsndfile makes this area easier to use.  There are only a few
>>>>>> incompatible changes in the 30 years of development.
>>>>>>>>
>>>>>>>> ==John ff
>>>>>>>>
>>>>>> Yes, I suppose it does help to read the Release Notes (:-/)
>>>>>>
>>>>>> Unfortunately they really aren't much help when I did read them.
>>>>>> Aside from a rather vague warning about backward compatibility,
>>>>>> this is all I see:
>>>>>>
>>>>>> "GEN01 now uses format 0 to get the file type from the header;
>>>>>> any other value indicates a raw file. THIS MAY BE INCOMPATIBLE.
>>>>>> For most users the value of zero will be correct."
>>>>>>
>>>>>> No mention of negative values, or why they should be preferable.
>>>>>>
>>>>>> And I went to the source on github, and don't see any expectation
>>>>>> of negative values in fgens.c:
>>>>>>
>>>>>> static const int gen01_format_table[10] = {
>>>>>> 0,
>>>>>> AE_CHAR,    AE_ALAW,    AE_ULAW,    AE_SHORT,    AE_LONG,
>>>>>> AE_FLOAT,   AE_UNCH,    AE_24INT,   AE_DOUBLE
>>>>>> };
>>>>>> ....
>>>>>>  int   fmt = (int) MYFLT2LRND(ff->e.p[7]);
>>>>>>  ......
>>>>>>  if (UNLIKELY(fmt < 0 || fmt > 9))
>>>>>>     return fterror(ff, Str("invalid sample format: %d"), fmt);
>>>>>>  p->format = gen01_format_table[fmt];
>>>>>>
>>>>>> I feel that these changes were a bit hasty...
>>>>>> Any chance of a  reversion?
>>>>>>
>>>>>>  -- Pete --
>>>>>>
>>>>>> 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
>>>
>>
>> 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

Date2019-03-13 21:46
FromPete Goodeve
SubjectRe: [Csnd] GEN01???
AttachmentsNone