| 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 |