Gas Pedal, Gas Pedal

I made a gas pedal-style video speed controller / interface in Max/MSP. When you press down on the mouse, it accelerates the playback speed of the video. When the mouse is released, the throttle eases back towards 1x speed:

The acceleration rates and deceleration rates can also be changed with the two sliders in the middle.

While the throttle is visually reflecting the effect I intended, the video isn’t playing back exactly correctly. Perhaps this has something to do with the mismatch of bangs to the gas pedal versus the video (controlled through the qmetro object).

The actual mouse-pressing mechanism was based on patches from my #prof and this forum post.

From this forum I also learned about this cool text-based way of sharing patches. You can have the patch I made in the video above by copy pasting the code below into Max/MSP:

<pre><code> ----------begin_max5_patcher---------- 2455.3oc0bs0iiaaE94Y+UPXTTjfLxlWzMGzGx1jhzEcS1AMaJvh1fEzRzd3 NxhtTRiGmf7eu7h7XqYjkoikVO8gwFGIJwy249gjd9sWc0nYhGXEi.eM3eCt 5pe6UWck4R5KbUM8UiVReHIiVXF1nDwxkr7xQWauWI6gRy0Ko2w.TPoXwhLF 3dZVEC7EPveFf9R.MOETvTePAyn4K.hpRP4sLPFadolHiUBVeKKG.A7Bfjkv 32yRMOViwK4KtsDvyeb7T.Z+mXKSkwyYIhpbCmQpuXd0R6TYvAr9pqnkI2xy W7Q06nzJGlFEMFdMfDSzegCLT9pOA+R8CwSMPVL6SdX+sSZQ4lLl45i1MiFd 0LgH8098W8J8GW6nrV8BlwjiZE.35qZuT4lULK2qlcvHsTaziraaXzhJBJV+ U.zfTb6PLbziuGIcIqjI+HKmNyBV3vg9CYo8dVVlwbPINJXEkzRFPwmJror9 .zjRkoP1FvJQ8vRpjR06wNb684kaF2SFKA3wAJYGLT+EJvuKiknQe9kV+zd9 cFeFsHw.DPlflVLF7l4fMhJPhXkRnQKTRStx8hqjd4r6YxFdtUJdrnvN9LgV bptmjIVs+KdL3C56SyAohJkchZn7j6L2uVOoYjx83DkOblH4NkOuRCZlOEKP WP44spkhOYsTbnVuDMU+IJHv7ExucsDZPcoYqUywyidJVvRWvNQWciatSt6X zdgzrFoGxcGELfveox5gtCmOhesyZ6fGcv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v9XlbJ0Moy3JDrYmlhhslS1eKM6SX Cuus5tyO7NxolT5CoSfykicPoyTho3EejoDfX6u1flT0ki4OsmJGC4TVoiv1 gA6y1SidNUuy1DnqAuQm8T4hhsWhNgbJ7c2EYpq00DV15HAsa9SCpZeLqqXi eOG8T+cnyOMzivv1DxNh9tENDpGj4pxgZJyeF0vKyQmuLeKLFbYNzkLIaKl4 Lmp.maQ+XqRUcwu9v5ibXCJagv5eU38TgvH3YqP0+KT3.Jzyi0bI1a6q4Abv mXzAVskmupszUqtmIKpebyjNZI8SByvit1PxysjlcKYjjcOe638MWgJStkWx RJqj1UL9gX6IIazRgZhyq30ysZl+8W8+.rV4Jb. -----------end_max5_patcher----------- </code></pre>

One thought on “Gas Pedal, Gas Pedal”

  1. You seem to have a really good handle on approaching this and the code is super solid. I mentioned this in class but for any kind of file rate stuff with jit.movie it’s best to use photo-jpg codecs for your movies. You might also consider using the frame attribute rather than the rate attribute. You can calculate the number frames in the movie file and then use a counter object to step through frame by frame. The speed of the counter object outputting frame numbers could be combined with your gas pedal effect.

    Also, the $1 convention is only used with messages and not with objects. So the qmetro doesn’t need the $1, you can just give it an initial value or override that by sending an integer to the second inlet.

    https://cycling74.com/forums/fast-playback-rate-in-jit-movie

Leave a Reply

Your email address will not be published. Required fields are marked *