Bugs item #3575840, was opened at 2012-10-09 15:09 Message generated for change (Comment added) made by veplaini You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=564599&aid=3575840&group_id=81968 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: csound >Group: csound5 >Status: Closed >Resolution: Rejected Priority: 5 Private: No Submitted By: Oeyvind Brandtsegg (brandtsegg) >Assigned to: Victor Lazzarini (veplaini) Summary: conditional write to chn error Initial Comment: When using chnset inside a conditional (if ...then), the conditional seems to be skipped and the writing to chn occurs in all cases (regardless if the conditional is true or false). Replacing the chnset with a k-rate assignment works, so it seems the error is related to chn. ---------------------------------------------------------------------- >Comment By: Victor Lazzarini (veplaini) Date: 2012-10-17 08:08 Message: This is expected behaviour, since chnset is polymorphic, giving it a constant will call the i-time version of the opcode. If you change 1 and 2 for kval1 and kval2, it will work as expected. instr 1 kmetro metro 1 kcount init 1 kcount = kcount + kmetro ktrig1 trigger kcount, 2, 0 ktrig2 trigger kcount, 4, 0 kcount = kcount % 6 kval1 = 1 kval2 = 2 if ktrig1 == 1 then chnset kval1, "test" endif if ktrig2 == 1 then chnset kval2, "test" endif ktest chnget "test" printk2 ktest endin ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=564599&aid=3575840&group_id=81968 ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net