[Csnd] changed and changed2
Date | 2020-06-14 19:31 |
From | "Jeanette C." |
Subject | [Csnd] changed and changed2 |
Hey hey,when I included changed in my code I realised that this opcode is apparently deprecated. I do have a situation where I need a notification in the first cycle, it is to set up k-rate arrays in a UDO. Code snippet below: opcode Transform, k[], k[] kInputs[] xin kOutput[] init 3 if changed(kInputs[]) == 1 then kOutputs sorta kInputs ; further evaluation endif xout kOutputs endop Is there a way around it? Best wishes, Jeanette -- * Website: http://juliencoder.de - for summer is a state of sound * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g * SoundCloud: https://soundcloud.com/jeanette_c * Twitter: https://twitter.com/jeanette_c_s * Audiobombs: https://www.audiobombs.com/users/jeanette_c * GitHub: https://github.com/jeanette-c You might think that I won't make it on my own, But now I'm Stronger <3 (Britney Spears) 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 |
Date | 2020-06-14 20:48 |
From | Eduardo Moguillansky |
Subject | Re: [Csnd] changed and changed2 |
you can always use if timeinstk() == 1 || changed2(...) == 1 then ... endif On 14.06.20 20:31, Jeanette C. wrote: Hey hey,when I included changed in my code I realised that this opcode is apparently deprecated. |
Date | 2020-06-14 20:48 |
From | john |
Subject | Re: [Csnd] changed and changed2 |
Use changed and complain that it should not be deprecated? 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 |
Date | 2020-06-14 21:26 |
From | "Jeanette C." |
Subject | Re: [Csnd] changed and changed2 |
Jun 14 2020, john has written: > Use changed and complain that it should not be deprecated? :) That is an idea, though I am happy enough with Eduardo's solution. Instead of complaining, may I perhaps put in a feature request for changed2: an optional i-time argument that will serve as an "initial value" to compare to, when the opcode is first called? Would that make sense with changed2? Best wishes, Jeanette > > 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 > -- * Website: http://juliencoder.de - for summer is a state of sound * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g * SoundCloud: https://soundcloud.com/jeanette_c * Twitter: https://twitter.com/jeanette_c_s * Audiobombs: https://www.audiobombs.com/users/jeanette_c * GitHub: https://github.com/jeanette-c You might think that I won't make it on my own, But now I'm Stronger <3 (Britney Spears) 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 |
Date | 2020-06-14 21:27 |
From | "Jeanette C." |
Subject | Re: [Csnd] changed and changed2 |
Jun 14 2020, Eduardo Moguillansky has written: > you can always use > > if timeinstk() == 1 || changed2(...) == 1 then Nice one, simple and ellegant. Thanks! I see I still have a lot to learn. Best wishes, Jeanette > ... > endif > > On 14.06.20 20:31, Jeanette C. wrote: > >> Hey hey,when I included changed in my code I realised that this opcode is >> apparently deprecated. >> >> I do have a situation where I need a notification in the first cycle, it is >> to set up k-rate arrays in a UDO. Code snippet below: >> >> opcode Transform, k[], k[] >> kInputs[] xin >> >> >> kOutput[] init 3 >> if changed(kInputs[]) == 1 then >> kOutputs sorta kInputs >> ; further evaluation >> endif >> >> xout kOutputs >> endop >> >> Is there a way around it? >> >> Best wishes, >> >> Jeanette >> > > 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 > -- * Website: http://juliencoder.de - for summer is a state of sound * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g * SoundCloud: https://soundcloud.com/jeanette_c * Twitter: https://twitter.com/jeanette_c_s * Audiobombs: https://www.audiobombs.com/users/jeanette_c * GitHub: https://github.com/jeanette-c You might think that I won't make it on my own, But now I'm Stronger <3 (Britney Spears) 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 |
Date | 2020-06-14 22:31 |
From | "Dr. Richard Boulanger" |
Subject | Re: [Csnd] changed and changed2 |
Feature request is a nice idea - optional argument Dr. Richard Boulanger Professor Electronic Production and Design Berklee College of Music > On Jun 14, 2020, at 4:27 PM, Jeanette C. |
Date | 2020-06-14 22:35 |
From | "Dr. Richard Boulanger" |
Subject | Re: [Csnd] changed and changed2 |
Like changed I would love a toggle or midi toggle opcode / to use midi notes as triggers of clips or sub instruments or events. I play note number 60 and it triggers an event and I play note number 60 and it turns off an event. There are many ways to do it in code but it would be nice if it was super simple and clear as it is a common need and use. Dr. Richard Boulanger Professor Electronic Production and Design Berklee College of Music > On Jun 14, 2020, at 4:27 PM, Jeanette C. |