[Csnd] i() behavior on PC / Mac
Date | 2012-01-27 17:42 |
From | Takahiko Tsuchiya |
Subject | [Csnd] i() behavior on PC / Mac |
Dear list and developers, I’ve encountered a csd file made by a friend, that uses a massive amount of i() casting with expression arguments, like this: gitable ftgen 1, 0, 16, -2, i(gka + gkb), i(gkc * .5 + gkd), etc... The file is somehow force-compiled and runs ok on Mac version of csound 5.15f, only with this message: “WARNING: i() should not be used with expression argument” However, it fails to compile on Windows 7 & csound 5.15d with the same warning sign but as an “error.” I guess these behaviors depend on the platform, but it could be the difference between the float and double. (I cannot test both right now...) Anyway, is there by any chance these behaviors will be addressed and changed in the future versions? Or should I just tell my friend to fix all the i()’s not to include math expressions? Takahiko ; example code |
Date | 2012-01-27 20:11 |
From | joachim heintz |
Subject | Re: [Csnd] i() behavior on PC / Mac |
hi takahiko - just to cite the manual (http://www.csounds.com/manual/html/opi.html): "Using i() with a k-rate expression argument is not recommended, and can produce unexpected results." seems to be true ... joachim Am 27.01.2012 18:42, schrieb Takahiko Tsuchiya: > Dear list and developers, > > I’ve encountered a csd file made by a friend, that uses a massive amount of i() casting with expression arguments, like this: > > gitable ftgen 1, 0, 16, -2, i(gka + gkb), i(gkc * .5 + gkd), etc... > > The file is somehow force-compiled and runs ok on Mac version of csound 5.15f, only with this message: > > “WARNING: i() should not be used with expression argument” > > However, it fails to compile on Windows 7 & csound 5.15d with the same warning sign but as an “error.” > > I guess these behaviors depend on the platform, but it could be the difference between the float and double. (I cannot test both right now...) Anyway, is there by any chance these behaviors will be addressed and changed in the future versions? Or should I just tell my friend to fix all the i()’s not to include math expressions? > > Takahiko > > > ; example code > |
Date | 2012-01-27 20:16 |
From | "Dr. Richard Boulanger" |
Subject | Re: [Csnd] i() behavior on PC / Mac |
Is there a way to make this work/possible without more complex reinit designs? ___________________________________ Dr. Richard Boulanger, Ph.D. Professor of Electronic Production and Design Professional Writing and Music Technology Division Berklee College of Music 1140 Boylston Street Boston, MA 02215-3693 617-747-2485 (office) 774-488-9166 (cell) ____________________________________ ____________________________________ ____________________________________ On Jan 27, 2012, at 3:11 PM, joachim heintz wrote:
|
Date | 2012-01-27 21:38 |
From | Tito Latini |
Subject | Re: [Csnd] i() behavior on PC / Mac |
Attachments | None |
Date | 2012-01-28 04:03 |
From | Takahiko Tsuchiya |
Subject | Re: [Csnd] i() behavior on PC / Mac |
Hi Joachim and Tito, Thanks for the comments and the solution idea. Also good to know the behavior on GNU/Linux too. Seems I may have to tell the coder to fix them manually... it's just that there are dozens of them. Takahiko On Jan 27, 2012, at 4:38 PM, Tito Latini wrote: > It works (5.15 single and double float, gnu/linux) > > gitable ftgen 1, 0, 4, -2, i(gka), i(gkb) + i(gkc), i(gkd) * .5 + i(gke), i(gkf) > > Tomorrow I can try to see if there is an alternative > > tito > > > 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" |
Date | 2012-01-28 18:29 |
From | Adam Puckett |
Subject | Re: [Csnd] i() behavior on PC / Mac |
The CSD is being "force"-compiled with the --no-expression-opt option. This option makes it possible to write i(ka+kb) expressions although I personally don't use these. On 1/27/12, Takahiko Tsuchiya |
Date | 2012-01-28 19:31 |
From | Takahiko Tsuchiya |
Subject | Re: [Csnd] i() behavior on PC / Mac |
Hi Adam, I checked and it did force-compile the csd on Windows. I agree it's not recommended, but saved us a huge amount of time in this case. Thanks a lot. Takahiko On Jan 28, 2012, at 1:29 PM, Adam Puckett wrote: > The CSD is being "force"-compiled with the --no-expression-opt option. > This option makes it possible to write i(ka+kb) expressions although I > personally don't use these. > > On 1/27/12, Takahiko Tsuchiya |
Date | 2012-01-28 20:14 |
From | Adam Puckett |
Subject | Re: [Csnd] i() behavior on PC / Mac |
I think maybe something you didn't realize is the fact that Csound can take a .csoundrc file, which your friend may have modified or put one in the current tirectory, and since you didn't say anything about a .csoundrc file, chances are the original wwas modified or replaced unless Csound defaults to --no-expression-opt, which I don't think is the case. On 1/28/12, Takahiko Tsuchiya |
Date | 2012-01-28 20:43 |
From | Takahiko Tsuchiya |
Subject | Re: [Csnd] i() behavior on PC / Mac |
There was no .csoundrc file included in the current directory. And I have not modified them on my PC / Mac. It might actually be the that the default option of "expression optimiztion" in Windows version of Csound differs from the others? Takahiko On Jan 28, 2012, at 3:14 PM, Adam Puckett wrote: > I think maybe something you didn't realize is the fact that Csound can > take a .csoundrc file, which your friend may have modified or put one > in the current tirectory, and since you didn't say anything about a > .csoundrc file, chances are the original wwas modified or replaced > unless Csound defaults to --no-expression-opt, which I don't think is > the case. > > On 1/28/12, Takahiko Tsuchiya |
Date | 2012-01-29 11:02 |
From | Tito Latini |
Subject | Re: [Csnd] i() behavior on PC / Mac |
Attachments | None |
Date | 2012-01-29 13:22 |
From | Andres Cabrera |
Subject | Re: [Csnd] i() behavior on PC / Mac |
Hi, I think this is an interesting issue which begs the question, should opcodes that modify k-rate vairables always make the first value available during the init-pass? If they do, and it's considered a bug not to, it would be very convenient and it would avoid a lot of unexpected behavior with if-thens and reinits, however, It can also be problematic performance wise to have to run a control pass as part of initialization. I recently spent a long while trying to debug a problem due to this, so specifying a default behavior, and an easy way to know whether a control-rate opcode updates the k-variables during the init pass would be great! What do you all think? Cheers, Andrés On Sun, Jan 29, 2012 at 11:02 AM, Tito Latini |