I am working on a project in which I’m trying to visualize piano notes being played. The idea is that one instance corresponds to a piano key and that instance has to get triggered and animated upwards when triggering an actual key on the keyboard.
I converted the midi data into CHOP data and created a row of instances, one for every key. Also, I’ve managed before to animate the y-values of the instances. However, when a following key is pressed, this animation seems to interrupt the animation of the previously triggered instance. I started looking into the event CHOP, yet I can’t seem to figure out how I could get an specific instance with a fixed x position to animate on it’s y-axis when triggered and finish it’s animation. Anyone that might be able to help?
under the assumption that all the Midi Notes are coming in as seperate channels, you could use a Trigger CHOP as that would work for each channel independently. The Trigger CHOP can be followed up with your lookup if you like and then passed into a Shuffle CHOP where you’d set the Method Parameter to Sequence All Channels which’s result is the single channel with all the values necessary for instancing. On the Shuffle CHOP also turn on Use First Sample Only - as the Trigger CHOP is Timesliced, each channel might hold more than a single value potentially messing up the instancing.
The Event CHOP is interesting too but for each trigger it appends a sample to its output channels. Which channel triggered the event is stored in the index channel but the usagecase is a bit different. For example every time a midi note is hit, you would want a colored circle to appear and float up. When hitting the same note many times, you’d want many circles floating up… That’s were the Event CHOP comes in. For your example where it’s more simulating the playing of a piano with a set number of items that should be animated, the Trigger CHOP is of better use.