Hit a Drum Pad to Cycle Through 4 Texture Maps |
||||||||||
Using this technique, you hit the drum pad once, you get texture map 1, you hit it again and you get texture map 2. When the texture map is 4 and you hit the pad, you get texture 1 again. And so on. The first CHOP, keyboard3, simply converts any keys of your ASCII keyboard into CHOP channels. A channel is 1 when the key is pressed, and 0 when it is not. At the IDC, this was replaced by a Midi In CHOP, which gave channels that were 1 while the drum pad was being hit, and 0 othewise. The lower channel on the graph represents the keyboard being pressed. The count3 CHOP counts the number of times its input goes from 0 to 1, so it acts as a hit counter. The middle channel on the graph is the output of the count1 CHOP and steps up evey hit.
The limit1 CHOP simply takes numbers and makes them cycle between 1 and 4 because the background images are numbered 1 to 4. The is the upper channel of the above graph. The to_material CHOP changes the name of the channel so it connects to the image number of a material containing a texture image. Below left is a network from the COP (Composite Operators) Editor, where we prepare images. Here we take four images and seqeuence them as a 4-frame sequence, frames 1 to 4. The material's texture1 (below right) selects the COP sequence and uses the frame number from the CHOP. This technique gives an enormous amount of flexibility in connecting realtime input devices to texture maps.
Cycling Through 4 Text Strings When you Hit a Drum Pad
|
||||||||||
|