tmhglnd / mercury-playground

The Mercury live coding environment running in the browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to play sample in reverse with speed < 0?

tmhglnd opened this issue · comments

commented

The speed() method should allow values less than 0 to reverse the playback. For example speed(-2) is reverse and 2x as fast. Using the this.sample.reverse = true does reverse the sample, but reverse the buffer every time, making it play in the normal direction for the next playback, resulting in alternating reverse, normal, reverse, normal, etc...

commented

Fixed by creating a unique copy of the buffer with .slice(0) in ff1c213