chrish Posted November 3, 2009 Share Posted November 3, 2009 I'm trying to find an hscript expression that will generate a pulse signal where the pulse interval and the pulse width can be easily controlled and vary with time. I've trying an expression like this . . . pulse(fit($F % (ch("pulsefreq") * rand($F)),0,ch("pulsefreq") * rand($F),0,1),ch("pulselow"),ch("pulsehi")) . . . using the modulo operator on frame values. I can get something close, but it is still difficult to control the width and interval of the pulses in an easy way. Any suggestions (using hscript) would be appreciated. Thanks, Chris Quote Link to comment Share on other sites More sharing options...
mrice Posted November 4, 2009 Share Posted November 4, 2009 would this work for the basic expression? if( $T*ch("freq") - floor($T*ch("freq")) > ch("width")*ch("freq"), 0, ch("amp") ) Quote Link to comment Share on other sites More sharing options...
chrish Posted November 5, 2009 Author Share Posted November 5, 2009 thanks, this works nicely. would this work for the basic expression? if( $T*ch("freq") - floor($T*ch("freq")) > ch("width")*ch("freq"), 0, ch("amp") ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.