I am creating networks to visualize musical chords by assigning specific colours to each note of the various chords being played at different frames. I have a table of frames, chords and notes and use a trigger chop to move through the rows of the table as the music is played.
I can do this successfully as a manual process. See Screenshot-000
In order to make the workflow more adaptable for new music I am trying to streamline the network using a Replicator Comp. See Screenshot-001
However I have got stumped on a simple python reference that has so far eluded me.
I need an expression to index the value of each event in each of the event clones.
PS - for anybody interested - I discovered that Audacity has some great analysis addons called Chordino. One tool analyzes/extracts the chords across the timeline and another identifies the notes as midi numbers. This is how I built the chord and note table. There is probably some clever way to pull the data from Audacity directly into TouchDesigner but I’ll leave that query for another time.
And thanks for reading and even more thanks for any solutions.
Happy Boxing day!
Your expression is referencing the digit of the operator name of “project1” instead of “event0”
Using an expression on a parameter of a node inside event0:
parent() will return the operator /project1/event0
parent(2) will return the operator project1 - hence access to “/project1/table3” is possible this way but .digits will always be the digits of “/project1”
As these numbers can become confusing, it might be useful for you to employ “Parent Shortcuts”
You can define those on the Common Pages of COMPs and after you can use these to get to these components from within them by the specified name.
So let’s say you give /project1 the Parent Shortcut “MyProject” and every event component gets the Parent Shortcut “Event”. Now your expression shown in the second screenshot will become:
Markus - Thanks for taking the time to write me a reply.
I still cannot quite grasp the logic of the shortcut, and am doing something wrong.
If it’s not too much to ask - can you please take a look at the .toe and tweak as necessary.
PLM_StarFlower.14.toe (99.2 KB)
Unfortunately I can’t upload the audio file . . .
Thanks in advance.
Paul
what’s missing in your project is to set the Parent Shortcut parameters for both, /project1 as well as /project1/event0 before replicating everything again.
I see you filled in the Internal OP shortcut, but this again is something different. PLM_StarFlower.15.toe (78.2 KB)
cheers
Markus
PS: on the side, you could solve this with a single Trigger CHOP network. As you are triggering on a preset frame number, you could just subtract the trigger value from the current frame and trigger on 0 for all of them. Or even skip the trigger CHOP altogether as the Logic CHOP’s “On When Greater Than Zero” setting now essentially is your trigger.
Markus - thanks a lot for your two solutions.
The second one is VERY elegant!
And being simpler will be the one I use going forward.
BUT good to know about how to set up for the Replicator.
Really appreciate you taking the time to give me the benefit of your knowledge and skill.
Paul aka Magenta6