lapinbily
03-21-2006, 09:20 PM
hello all
i' m into using maya for VJ shows, real-time .
i ve come up with a setup where things begin to act nicely , maya being remote controlled by MIDI using the mayaMIDI device driver . i'm stuck at the point where i want to trigger curve - based animations by playing a note . ive got it kinda working but not perfect .
here is where i'm at :
a note ( key 36 ) is attached to an attribute ( key36.rotateZ ) . when played , the value is set to the velocity of the note which comes back to zero on release .
so i made a goal attribute ( pTorus1.ltime_goal ) that gets incremented each time the note is played :
this is for telling how long i want my curve-based animation to be
if (key36.rotateZ > 0.10 ){
pTorus1.ltime_goal = pTorus1.ltime_goal -10;
}
if (key38.rotateZ > 0.10 ){
pTorus1.ltime_goal = pTorus1.ltime_goal +10;
}
Then i made a second attribute ( pTorus1.ltime ) that is moving towards this goal (This is the valus i'll use as time for the animation ) : here is the expression :
if (pTorus1.ltime > pTorus1.ltime_goal ){
pTorus1.ltime = pTorus1.ltime -1;
}
else {
if (pTorus1.ltime < pTorus1.ltime_goal ) {
pTorus1.ltime = pTorus1.ltime +1;
}
}
then i plug the result of the last expression into some curve .
the result i have is that when the timeline is stopped , the second expression gets evalued a random bunch of times (usualy between 2 and 4 ) so when ltime 's value is 0 and i press key 38, it becomes 4 or 5 ..
when time is running, the animation goes trough the curve, but does not match the intended result sometimes it does it right, sometimes it goes 3-4 times too far in the timing, in short i cannot predict for how many frames the animation is going to roll .
i know i've used some primitive expressions and wonder if i should use MEL instead of expressions , or if i can specify how often should the expression evaluate themselves ...
Thanx for any help on this .
Guilhem
i' m into using maya for VJ shows, real-time .
i ve come up with a setup where things begin to act nicely , maya being remote controlled by MIDI using the mayaMIDI device driver . i'm stuck at the point where i want to trigger curve - based animations by playing a note . ive got it kinda working but not perfect .
here is where i'm at :
a note ( key 36 ) is attached to an attribute ( key36.rotateZ ) . when played , the value is set to the velocity of the note which comes back to zero on release .
so i made a goal attribute ( pTorus1.ltime_goal ) that gets incremented each time the note is played :
this is for telling how long i want my curve-based animation to be
if (key36.rotateZ > 0.10 ){
pTorus1.ltime_goal = pTorus1.ltime_goal -10;
}
if (key38.rotateZ > 0.10 ){
pTorus1.ltime_goal = pTorus1.ltime_goal +10;
}
Then i made a second attribute ( pTorus1.ltime ) that is moving towards this goal (This is the valus i'll use as time for the animation ) : here is the expression :
if (pTorus1.ltime > pTorus1.ltime_goal ){
pTorus1.ltime = pTorus1.ltime -1;
}
else {
if (pTorus1.ltime < pTorus1.ltime_goal ) {
pTorus1.ltime = pTorus1.ltime +1;
}
}
then i plug the result of the last expression into some curve .
the result i have is that when the timeline is stopped , the second expression gets evalued a random bunch of times (usualy between 2 and 4 ) so when ltime 's value is 0 and i press key 38, it becomes 4 or 5 ..
when time is running, the animation goes trough the curve, but does not match the intended result sometimes it does it right, sometimes it goes 3-4 times too far in the timing, in short i cannot predict for how many frames the animation is going to roll .
i know i've used some primitive expressions and wonder if i should use MEL instead of expressions , or if i can specify how often should the expression evaluate themselves ...
Thanx for any help on this .
Guilhem
