monome / softcut-lib

sample cutting library
GNU General Public License v3.0
35 stars 6 forks source link

fix pingpong logic again #53

Closed catfact closed 3 years ago

catfact commented 3 years ago

pingpong logic was still wrong. two commits:

    • was flipping the sign of the newly active subhead, instead of making sign of new head the inverse of sign of current head. (in practice: during pingpong looping, one subhead will always be going backwards, the other forwards. but whatever, we'll set them explicitly on each loop.)
    • was reading direction state from current frame (write target), rather than previous frame (from which the last phase update was calculated.)

changing these fixes, for me, the weird thing where fade time was effectively added to loop time.

  1. when exiting pingpong mode, the directions of the subheads were not being updated. this meant that one would always be going backwards compared to the current rate, making things all weird. now the direction is just set on every loop frame, regardless of loop mode.