changed2 Instrument Control:Sensing and Control changed2 changed2 k-rate signal change detector. Description This opcode outputs a trigger signal that informs when any one of its k-rate arguments has changed, or a value in an array. Useful with valuator widgets or MIDI controllers. Syntax ktrig changed2 kvar1 [, kvar2,..., kvarN] ktrig changed2 karr[] ktrig changed2 aarr[] Performance ktrig - Outputs a value of 1 when any of the k-rate signals has changed, or any value in the array, otherwise outputs 0. kvar1 [, kvar2,..., kvarN] - k-rate variables to watch for changes. xarray - any array type. Unlike the opcode changed this opcode will never report the first cycle as a change. Examples Here are two examples of the changed2 opcode. They use the files changed2.csd and changed2a.csd. Example of the changed2 opcode. Its output should include lines like: i 1 time 0.00267: 0.00000 i1 0.00000 i1 1.00000 i1 0.00000 i 1 time 0.20267: 1.00000 i 1 time 0.40267: 1.00000 i1 1.00000 i1 0.00000 i 1 time 0.60267: 1.00000 i 1 time 0.80267: 1.00000 i1 1.00000 i1 0.00000 i 1 time 1.00000: 0.00000 i1 1.00000 i1 0.00000 i 1 time 1.20267: -1.00000 i 1 time 1.40267: -1.00000 i1 1.00000 i1 0.00000 i 1 time 1.60267: -1.00000 i 1 time 1.80000: -1.00000 i1 1.00000 i1 0.00000 i 1 time 2.00000: -0.00000 i1 1.00000 i1 0.00000 ......... Example of the changed2 opcode. See also Sensing and Control: Tempo and Sequencing Credits Written by &namejohn;. Example written by &nameandres;. New in Csound 6.7