-
Notifications
You must be signed in to change notification settings - Fork 47
Envelope point navigation gets stuck or skips points if there is more than one point at the same position #1242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The core problem here is that when I was working on OSARA's envelope point code, I made an assumption that you couldn't have multiple envelope points at precisely the same position. That assumption is very incorrect, and since the code reflects that assumption, all the things are broken. |
Just to make things more interesting, when you copy items, the envelope points REAPER creates aren't necessarily quite at the same position. Sometimes, they're a few samples apart, which causes additional problems with OSARA's envelope code because we increment the time slightly to ensure we don't get the point before the time we want, which REAPER tends to do sometimes. All the things are all broken. |
I have had this problem once or twice as well, but was never sure what was causing it hence never opened an issue. Definitely makes sense though - when I move items my envelope points move as well, so that explains a lot. |
Yeah, I think I'm going to end up having to rewrite big chunks of that code. That ought to be fun. The problem is that I still can't quite get my head around it, which makes it difficult to get anywhere. |
Current implementation thoughts (but I've gone through several iterations of contradictory thought on this, so this is subject to change): I think we need to do two things:
|
I didn't end up doing this. It didn't seem to be necessary in the end, but maybe some other bug will show up in future... |
For future reference, here's a project I used to test this. There's a track volume envelope: point 0 and 1 are in different positions, points 2 and 3 are at the same position, point 4 is almost at the same position as point 3 but just slightly after, and poin5 is further away. There's also a volume envelope on the second item with just a single point to test an envelope which doesn't begin at the start of the project. |
STR (synthetic):
While this is probably not something someone would do in practice, it demonstrates the issue easily. In practice, this can happen if you copy items which encompass track envelope points with Preferences -> Editing Behavior -> Envelope Display -> Automatically add edge points when editing: Media items checked, which is the default.
STR:
It seems that when you copy and paste items like this, REAPER inserts multiple points at the start and end of the item. This has been driving me wild for a long time, but I've never quite been able to work out wtf was going on.
I think this was one of the issues @Justinmac84 might have been encountering in #134, but I didn't have sufficient information to reproduce it back then.
The text was updated successfully, but these errors were encountered: