|
There is an error on doppler.cpp
....
// Take care of default values.
if (*jSpeedOfSound == MYFLT(-1.0)) {
*jSpeedOfSound = MYFLT(340.29);
}
...
overwrites a -1 with 340.39 which can affect other uses of -1
Other examples of this problem exist. Just fixing now
==John
> Dear list,
>
> I came across a very strange behavior of Csound. I managed to isolate
> the problem and found that assigning a negative value to a variable
> may cause strange results if the doppler-opcode is used anywhere in
> the instrument. Usually one would expect these results printed:
>
> instr 50: itest = 1.600
> instr 50: itest = -1.600
>
>
> ...but what I get (with doppler commented out) is:
>
> instr 50: itest = 1.600
> instr 50: #i0 = -1.600
>
> And if doppler is active, it gets really strange:
>
> instr 50: itest = 1.600
> instr 50: #i0 = 544.464
>
> Changing the value to any other number also changes the result
> assigned to -itest in various ways. Here is the .csd that I have
> created for testing reasons.
> Can anyone confirm this strange behavior?
>
> Cheers,
>
> Jan Jacob
>
>
>
>
>
> sr=48000
> ksmps=1
> nchnls=2
> instr 50 ;Doppler + assign -test
> asig = 1
> kD = 1
> itest = 1.6 ; 1.6 is chosen arbitrary
> asig doppler asig, kD , 0 ; application of doppler effect
> print itest
> print -itest
> endin
>
>
> i50 0 0 1
> e
>
>
>
>
> Send bugs reports to the Sourceforge bug tracker
> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>
>
>
Send bugs reports to the Sourceforge bug tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|