There shouldn't even be the possibility of tempo markers being moved off the grid unless you explicitly choose that. If snap is on, stuff needs to stay on the grid. Always. Anything else is a disaster.
However, I am not sure that the example in this thread is in fact a bug. Instead, it demonstrates an unavoidable incompatibility between beats and time.
"Time selection: Insert empty space at time selection (moving later items)" inserts a certain length of *time*, not beats. Everything, including tempo changes, will be shifted to the right the same amount of time, not beats.
If your time selection happens to be snapped to beats (as in your screenshots) it may seem as if REAPER will insert a certain number of beats, but this is misleading. REAPER will insert empty space that is equal to *time* duration of the time selection.
If the time selection is not an exact multiple of beats (calculated in the tempo preceding the insert point), the tempo changes will necessarily shift away from the beat.
Perhaps there should be a feature request for a new *beat-based* Action that inserts empty space, calculated as a number of beats?
(EDIT: Alternatively, if you are using square tempo shapes, it should be straightforward to code a script that sets the time selection equal to a user-specified number of beats, in the tempo preceding the time selection.)
I also agree with above. The actions are obviously inserting/removing TIME, not BEATS, and that's where the disconnect happens.
So yeah, new actions are in order for this, methinks. However, for scripting an action to REMOVE a certain amount of beats, I see that as a potentially really big can of worms. What if time selection spans many different tempo changes and timesig changes, and especially if beats change from quarters to eighths etc (like going from 4/4 to 5/8, for example)? Seems like an awful lot of stuff to handle...
However, I am not sure that the example in this thread is in fact a bug. Instead, it demonstrates an unavoidable incompatibility between beats and time.
I'm confused here because literally every other DAW I've used I can work in timecode and beats simultaneously and these type of issues never come up. The correct calculations are made automatically. Why should time be so incompatible with beats? They are both obviously intertwined. Go down the line - Cubase, Pro Tools, Logic, Digital Performer, etc. all of them do this correctly whether it's time or beats we are talking about. From what you are saying, and please correct me if I'm making a bad assumption here, that Reaper's timebase has been fundamentally flawed since day one and would need a major rework in order to function correctly.
But even then… I understand the incompatibility, but if REAPER does not insert bars but time, should the markers not always stay on the grid? It is impossible to use this function with a tempo map (native) It will trip up a lot of users, and indeed no other DAW functions this way…
__________________
Hackintosh - OSX 10.13.5 - Apollo Twin
Go down the line - Cubase, Pro Tools, Logic, Digital Performer, etc. all of them do this correctly whether it's time or beats we are talking about.
REAPER is actually doing it correctly, and I am pretty sure all other DAWs will do the same: If you tell the DAW "Insert a certain duration of TIME here", they will do exactly that. And if that time duration is not equal to an exact multiple of beats, then all later events will lose their beat positions.
REAPER is actually doing it correctly, and I am pretty sure all other DAWs will do the same: If you tell the DAW "Insert a certain duration of TIME here", they will do exactly that. And if that time duration is not equal to an exact multiple of beats, then all later events will lose their beat positions.
So how do you tell REAPER to insert beats?
__________________
Hackintosh - OSX 10.13.5 - Apollo Twin
I whipped up a quick script and uploaded it to ReaPack: "js_Time selection - Insert empty beats at time selection (moving later items).lua".
(Warning: The script is not fully compatible with linear tempo changes. The tempo change that precedes the time selection should be square, as should the tempo map's default point shape.)
For users that don't use MIDI, an "insert time" action is usually more suitable than "insert beats", but it is good to have both options.
Thanks so much, Julian. Is there an equivalent delete beats option as well?
In my experience, the existing action "Time selection: Remove contents of time selection (moving later items)", works fine even with MIDI beats and timesig/tempo markers.
Working!! Thanks so much, Julian. Delete beats works with the native function
But... "This is a super big problem for us film composers as we need to be able to cut or insert time when we get new picture that we need music to sync to"
Sometimes you need to insert time, not beats and the markers should stay on the grid?
__________________
Hackintosh - OSX 10.13.5 - Apollo Twin
“This is a super big problem for…” Was a quote from srdmusic…
Beats are working for me.
Movie works with time not beats, if a scene has changes and gets longer you need to insert time to keep stuff in sync, but the markers always should stay on the grid.
__________________
Hackintosh - OSX 10.13.5 - Apollo Twin
REAPER is actually doing it correctly, and I am pretty sure all other DAWs will do the same: If you tell the DAW "Insert a certain duration of TIME here", they will do exactly that. And if that time duration is not equal to an exact multiple of beats, then all later events will lose their beat positions.
I agree that Reaper do it right.
I felt I could insert space and move a region - which made me a same size hole if I wanted.
Just select region, insert space as selection and then move region. And tempo map move with it.
But an option to maybe exclude tempo map or something could help those wanting other functionality.
Or I don't fully grasp what the issue is....
__________________
-- Windows 11 Pro, i7-12700F 2.1GHz 32G, RME Digiface USB Audient ASP800 Lexicon MX200, Reaper 4.78 --
Partial measures are even more buggy and cause problems if you're trying to record live players. We found this out the hard way last week where we exported midi from the session which looked like it was on the grid but was in fact not. When importing the midi into Sibelius for the live players it was all over the place.
When trying to record the player directly into Reaper the Clicks cut cut off half way through the bar before the start of a new meter change. That's really hard for a player to follow clicks when they are out of sync with the grid.
In my experience, the existing action "Time selection: Remove contents of time selection (moving later items)", works fine even with MIDI beats and timesig/tempo markers.
Not in my experience. If you delete bars with odd time signatures like 7/8 it moves later bars to incorrect positions.
In my example it would be nice if reaper corrected the tempo markers like how most other DAWs do.
In my example Reaper correctly change the 4/4 bar to 2/4 but then moved the 150 tempo change to beat 4 of bar 5. What it should have done is converted the 7/8 bar to 4/8 and left the 150 at bar 5.
I hope that makes sense.
Julian, if you wrote a script that cut bars instead of time would this fix the problem?
Thank you very very much for working out the insert bars script.
Thank you very very much for working out the insert bars script.
Does the nudge/set features not work for you then?
Reason {for eg} has close to 0 automatic tempo/insert functions-(but then that is not `most daws) -ireckon people create a lot of problems for themselves tbh.
Does the nudge/set features not work for you then?
Reason {for eg} has close to 0 automatic tempo/insert functions-(but then that is not `most daws) -ireckon people create a lot of problems for themselves tbh.
Not sure what you mean by the nudge/ set features. If there is a way of inserting or deleting bars with the nudge tools I'm all ear.
appropriate actions (or scripts) would be - "remove measures within time selection"
It's not really a bug, it's a missing feature.
A script could do it, might not be too hard to do. If I'm up at 1 am, I might give it a shot tonight
JAMES! YOU DA MAN!!!!
That would be amazing. It looks like julian did a similar script for inserting bars. Perhaps it's easy enough to modify his script. Don't want you to have to reinvent the wheel if you don't have to.
Not in my experience. If you delete bars with odd time signatures like 7/8 it moves later bars to incorrect positions.
I'm seeing the same behavior. Julian, any chance you would be able to do a delete beats script as well? You would be an absolute hero.
Also have to add what an invaluable help everyone is here on the forum. There's multiple times I've posted an issue and someone literally posts a script or code fixing the issue. I haven't seen anything like it anywhere else.
Not in my experience. If you delete bars with odd time signatures like 7/8 it moves later bars to incorrect positions.
In my example it would be nice if reaper corrected the tempo markers like how most other DAWs do.
In my example Reaper correctly change the 4/4 bar to 2/4 but then moved the 150 tempo change to beat 4 of bar 5. What it should have done is converted the 7/8 bar to 4/8 and left the 150 at bar 5.
Removing fragments of measures can indeed cause hassles. (At least there should not be any of the beats vs time issues.)
A potential problem for a script is that one solution may not fit all situations. In your own example, for instance, it may sometimes be preferable to combine the two remaining short measures (2/4 and 4/8) into a single 4/4 measure. (Ideally, a DAW should perhaps recognize such situations and offer the user a choice.)
To prevent shifting of the measures, you can try to add a "protective" time signature marker at the measure immediately after the time selection (with "Allow partial measure" checked), before running the "Remove contents" action. This should result in one 2/4 measure, one partial 7/8 measure, and then full 7/8 measures at their original positions.
In case of a script, what should the ideal behavior be? Should the script do anything beyond what the protective time signature marker does?
I whipped up a quick script and uploaded it to ReaPack: "js_Time selection - Insert empty beats at time selection (moving later items).lua"..
Thank you for working on this. Your script works brilliantly when the user is dealing with stander quarter note meters like 4/4 or 3/4.
It produces something unexpected when working with meters eight note meters like 5/8 or 7/8.
Here's an example:
1) Time selections is set to 2 bars of 7/8.
2) process the 'js_time selection - insert empty beats at times selection' action
3) Reaper inserts 1 bar of 4/4 and 1 bar of 3/4 instead of 2 bars of 7/8
In case of a script, what should the ideal behavior be?
ideal behavior is the hard part. If I'm writing this i think...
first check if the time selection starts and ends at a measure start / end. alert the user if it doesn't, ask to proceed and extend time selection to nearest measures, proceed with no changes, or just cancel the script.
if the user proceeds with no changes, the script could possibly just create a new measure with the left over bit(s)
I personally have not dealt with the API regarding time / tempo markers - I'm assuming enough is there to do this. But yeah I think the thing to do is to break it up into individual time selections - from one marker to the other, and remove those bits one at a time.
1) Time selections is set to 2 bars of 7/8.
2) process the 'js_time selection - insert empty beats at times selection' action
3) Reaper inserts 1 bar of 4/4 and 1 bar of 3/4 instead of 2 bars of 7/8
This is indeed the intended behavior. The script inserts the selected number of beats in the tempo/timesig that *precedes* the time selection. (2 bars of 7/8 are 7 beats, so the script inserts 4/4 + 3/4.) If there are no bpm tempo changes in the time selection, there should be no difference between the "Insert beats" and "Insert space" actions.
The time selection is simply a facile way to specify the number of beats, so that the script has a similar look and feel as the native action.
Although, come to think of it, it may be better to use a dialog box in which the user can specify the number of beats as well as the time signature and the bpm.
EDIT: I should warn anyone using this script that it is in no way intended as a workaround to any of REAPER's tempo/timesig bugs. You are virtually guaranteed to run into some of the weird monsters that make tempo editing in REAPER such an exciting adventure.
Not sure what you mean by the nudge/ set features. If there is a way of inserting or deleting bars with the nudge tools I'm all ear.
I don't think you can add or subtract any beats or bars in any programme.
In reaper you can warp the grid-otherwise your breaking the timeline,which seems daft to me.
"This is a super big problem for us film composers" -< if your a film composer then you should be able to manage these issues you created with a 'workflow'?
Maybe there is a misunderstanding with semantics, but in just about every DAW you can insert and subtract bars…. Via Julian’s script you can in REAPER, it was just a missing function. A function that by and large should have been native a long time ago.
__________________
Hackintosh - OSX 10.13.5 - Apollo Twin