osara icon indicating copy to clipboard operation
osara copied to clipboard

When reporting length of time selection in bars/beats, OSARA doesn't factor in tempo/time signature changes

Open MatejGolian opened this issue 2 years ago • 4 comments

Similarly to #249, Osara doesn't report the correct time selection length in bars/beats when there are tempo/time signature changes in the project. This issue is medium priority at most, but fixing it at some point would be nice.

MatejGolian avatar Jan 19 '23 11:01 MatejGolian

I'm gonna assign high priority. Sure this isn't something that every user is going to encounter every day, but inaccurate feedback raises it up the priorities IMO.

ScottChesworth avatar Jan 19 '23 11:01 ScottChesworth

That other issue was only medium, but that was related to reporting of MIDI note length and so when I think about it, giving this higher priority does make sense.

MatejGolian avatar Jan 19 '23 12:01 MatejGolian

In the other case, there was REAPER's length field to fall back on if in doubt. I'm not seeing an immediately obvious alternative to get accurate info in this case.

ScottChesworth avatar Jan 19 '23 12:01 ScottChesworth

I think we need to use the code in formatNoteLength whenever we report lengths in measures/beats, not just in the MIDI Editor. formatTime has a isLength parameter though, so we should find some way to reuse code here. I'm not sure whether that means integrating formatNoteLength into formatTime, or removing the existing measures/beats length code from formatTime and instead having formatTime delegate to formatNoteLength (renaming it of course).

jcsteh avatar Jan 24 '23 11:01 jcsteh

formatNoteLength matches Reaper's value in the note properties dialog. The number of bars is calculated using the time signature in affect at the note start time only, so it will be wrong for long notes that cross tempo markers with a change of time signature.

The length of items as shown in the item properties dialog is different. It shows the actual number of whole measures within the bounds of the item + any extra beats at each end.

I haven't investigated all the edge cases yet though.

I think the item behaviour is more correct for the time selection length, thoughts?

Testing would just involve running the action "Time selection: Set time selection to items" and comparing with the length in the item properties.

RDMurray avatar Mar 12 '24 01:03 RDMurray

fixed in #1026

RDMurray avatar Apr 05 '24 21:04 RDMurray