gordig
... I'm feeding a Phoneme CHOP , outputting the channel Phoneme, into a Channel Wrangle with the following code:
float ph = ch("Phoneme");
printf("%g", ph);
No matter what the value of Phoneme is at the time, the printf always outputs 0. I've tried changing multiple parameters on both CHOPs involved, tried changing the iteration on the Wrangle, even tried things like chattr, chop and chp, but nothing is doing the trick. What am I missing?
channel in Houdini refers to many things and it can get confusing, ch() is to sample channels of parameters, not CHOP channels
but since you are interested in a chop channel coming from input chop ( assuming you named your channel "phoneme" )you can use chinput():
float phoneme_value = chinput(0, "phoneme", I); // to read at the current sample or use custom sample number instead of I
float current_channel_value = V; // read current channel's value at current sample V = 5; //set current channel's value at current sample to 5