| As I said I am being thick!
I looked at the code and at initialisatio time it calculates the time for
the first printing as 0.1s from oneset, but not being in the conditional
means it does not tr printng unti relesae, thn it thinks it is past time
so it prints on every k-cycle ntil it has caught up.
At least tta is how I read the code. What it shoud do I have no idea.
The code has been extensivelt reworked at some stage as it was buggy.
Hum...
==John
On Wed, 15 May 2019, pete.goodeve@COMPUTER.ORG wrote:
> On Wed, May 15, 2019 at 07:46:42PM +0100, john wrote:
>> I may be being thick but I read it that the printks is in a conditional on
>> the value "are we in a releas?" determined by the variable krel. So each
>> k-cycle it prints the message.
>
> But if it's set to print every 1/10 sec, it should never print every k-cycle, should it?
> The expected behaviour is if it has just printed, it should always wait 1/10 sec
> befor priinting again. It's certainly not my desired behaviour -- I don't want to see
> all those extraneous values. If I'd used 1/100 sec instead, there'd have been
> an awful lot of them!
>
> It seems to be counting time as 'absolute' from the note initialization, rather than
> relative from the last time it printed.
>
>
>>
>> CS5 is so long ago that I do not remember what has changed and when....but
>> I will look to see if it is obvious.
>>
>> On Wed, 15 May 2019, pete.goodeve@COMPUTER.ORG wrote:
>>
>>> The problem is that the printks is inside a conditional, which inhibits
>>> any printout until the release phase of the note. However, when it *is*
>>> de-inhibited, it prints a line for every 1/10 second since the *beginning*
>>> of the note! But *not* every 1/10 of a second. It prints once every
>>> k-cycle. (Look at the time values in the first few lines. They're a
>>> millisec
>>> apart, not 1/10. Only the final -- correctly output -- values are 1/10 sec
>>> apart.)
>>>
>>> There is nothing wrong wit the printf line.
>>>
>>> (And as I noted, this didn't happen in Csound 5.19.)
>>>
>>> -- Pete --
>>>
>>> On Wed, May 15, 2019 at 05:26:28PM +0100, john wrote:
>>>> I keep reasding this and cannot see what is your problem. printf only
>>>> runs when the trigger ois nt zero and different from the previos value
>>>> according to the manual so it appears once. printks prints every 0.1sec
>>>> as you see.
>>>>
>>>>
>>>>
>>>> On Wed, 8 May 2019, Pete Goodeve wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Following the FoF discussion, I wanted to clarify my understanding
>>>>> of instrument duration and release under MIDI, so I made this test
>>>>> file:
>>>>>
>>>>>
>>>>>
>>>>> -m0 -d -L stdin -odac
>>>>>
>>>>>
>>>>>
>>>>> sr = 48000
>>>>> ksmps = 48
>>>>> 0dbfs = 1.0
>>>>> nchnls = 2
>>>>>
>>>>> instr 1
>>>>> prints "instr start\n"
>>>>> itim times
>>>>> midinoteonkey, p4, p5 ; dummy to activate MIDI
>>>>> kadsr madsr 0.1, 0.2, 1.0, 0.5
>>>>> krel release
>>>>> if krel > 0 then
>>>>> ktim times
>>>>> printf "release at %f\n", krel, ktim - itim
>>>>> printks "ramp %f at %f\n", 0.1, kadsr, ktim - itim
>>>>> endif
>>>>> endin
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> The idea was to show me the time course of the extended
>>>>> release time (with the half-second adsr). When I run it (under
>>>>> Csound 6.12 or 6.13) I actually get this:
>>>>>
>>>>> instr start
>>>>> release at 0.519000
>>>>> ramp 1.000000 at 0.519000
>>>>> ramp 0.998000 at 0.520000
>>>>> ramp 0.996000 at 0.521000
>>>>> ramp 0.994000 at 0.522000
>>>>> ramp 0.992000 at 0.523000
>>>>> ramp 0.990000 at 0.524000
>>>>> ramp 0.836000 at 0.601000
>>>>> ramp 0.636000 at 0.701000
>>>>> ramp 0.436000 at 0.801000
>>>>> ramp 0.236000 at 0.901000
>>>>> ramp 0.036000 at 1.001000
>>>>> instr start
>>>>> release at 1.046000
>>>>> ramp 1.000000 at 1.046000
>>>>> ramp 0.998000 at 1.047000
>>>>> ramp 0.996000 at 1.048000
>>>>> ramp 0.994000 at 1.049000
>>>>> ramp 0.992000 at 1.050000
>>>>> ramp 0.990000 at 1.051000
>>>>> ramp 0.988000 at 1.052000
>>>>> ramp 0.986000 at 1.053000
>>>>> ramp 0.984000 at 1.054000
>>>>> ramp 0.982000 at 1.055000
>>>>> ramp 0.980000 at 1.056000
>>>>> ramp 0.890000 at 1.101000
>>>>> ramp 0.690000 at 1.201000
>>>>> ramp 0.490000 at 1.301000
>>>>> ramp 0.290000 at 1.401000
>>>>> ramp 0.090000 at 1.501000
>>>>>
>>>>> with some unexpected initial printouts -- at 1 per k-cycle --
>>>>> before it prints the expected release ramp every 1/10 sec.
>>>>> (If I change ksmps, the number of lines changes appropriately.)
>>>>>
>>>>> I went back to Csound 5, and there I just see the expected
>>>>> printouts for the release phase only.
>>>>>
>>>>> I guess this is a bug?
>>>>>
>>>>> -- 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 |