|
|
|
07-02-2017, 04:01 AM
|
#41
|
Banned
Join Date: Dec 2016
Location: England
Posts: 2,432
|
Quote:
Maybe there is a misunderstanding
|
Ok-so what is that script doing? that nudge/set is not?
Thanking juliansader-i'm certainly not knocking anything people share.
|
|
|
07-02-2017, 06:09 AM
|
#42
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Quote:
Originally Posted by Bri1
Ok-so what is that script doing? that nudge/set is not?
Thanking juliansader-i'm certainly not knocking anything people share.
|
Nudge is perfect for shifting the position of a few selected items (and their accompanying automation) within a project.
Insert time/beats is used to shift the position of *everything* in the project that is to the right of the insertion point, including tempo/timesig markers and items-less automation, and it also splits items at the insertion point.
EDIT: I (and apparently everyone else too) forgot about ripple editing! Nudging -- or even plain click-drag of items -- can indeed do the trick, if combined with "Ripple edit all tracks" and "Ripple edit all affects tempo map".
Activate ripple editing and snap-to-grid, select all items, split all items at cursor, and then select one item (immediately to the right of the split point) and click-drag or nudge that item.
If the split point falls within a linear tempo segment, nudging does not calculate beats correctly, but click-dragging can still easily be used.
The script has the advantages of 1) optionally not changing locked items, and 2) not splitting MIDI items, so the script can be used from within the MIDI editor.
Last edited by juliansader; 10-21-2017 at 12:34 PM.
|
|
|
07-02-2017, 06:45 AM
|
#43
|
Human being with feelings
Join Date: Mar 2007
Location: I'm in a barn
Posts: 4,467
|
looking into scripting something here. already finding little user preferences that can screw up the logic I'd like to use. If the project preference to force time sig / tempo changes to occur on whole samples is checked, things get real wacky.
I have this on for my default project - and I can't remember why? I guess it's for proper looping?
research continues
|
|
|
07-02-2017, 08:32 AM
|
#44
|
Human being with feelings
Join Date: Dec 2016
Posts: 876
|
Quote:
Originally Posted by juliansader
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.
|
What I'm intending is that Reaper copy exactly the same meter that is in the time selection. For example,
If the time selection has 1 bar of 4/4, 1 bar or 7/8 and then one bar of 2/4, I want Reaper to insert exactly those time signatures and move the content of everything in the time selection and beyond to the start of the newly inserted bars.
If that's not quite possible then perhaps there should be two actions. One that works with beats and one that allows the user to specify how many bars, tempo and meters they want inserted.
|
|
|
07-02-2017, 08:34 AM
|
#45
|
Human being with feelings
Join Date: Dec 2016
Posts: 876
|
Quote:
Originally Posted by James HE
looking into scripting something here. already finding little user preferences that can screw up the logic I'd like to use. If the project preference to force time sig / tempo changes to occur on whole samples is checked, things get real wacky.
I have this on for my default project - and I can't remember why? I guess it's for proper looping?
research continues
|
I don't have that preference selected because I work mainly with midi and need to make cuts that are exactly on the grid. I can see why this would totally screw up the logic of your script.
Thanks for taking a look into this to find a solution.
|
|
|
07-02-2017, 09:22 AM
|
#46
|
Banned
Join Date: Dec 2016
Location: England
Posts: 2,432
|
Quote:
I don't have that preference selected because I work mainly with midi and need to make cuts that are exactly on the grid. I can see why this would totally screw up the logic of your script.
Thanks for taking a look into this to find a solution.
|
^This is what I don't quite understand-- surely being a `film composer+video editor` you realise there's 0 reason for any tempo mappings at all.
Especially using midi-the note divisions,miditicks and note lengths can determine a tempo-I thought that was obvious to any competent composer/producer?
I think your complicating your own editing matters-go eeezy!
The only time I can see where you might need an actual map- is if the audio is completely out of sync=== poor or incorrect recording techniques,or pre-editings problems.
So what's the actual problem?
Apologies this being quite offrequestish..
|
|
|
07-02-2017, 09:24 AM
|
#47
|
Human being with feelings
Join Date: Jun 2009
Location: Croatia
Posts: 24,790
|
Quote:
Originally Posted by Bri1
^This is what I don't quite understand-- surely being a `film composer+video editor` you realise there's 0 reason for any tempo mappings at all.
|
Of course they matter if you need to later submit written score, in that case tempos and time signatures are extremely important for proper MIDI export into a notation application. That's basically all the time when you're writing to picture.
|
|
|
07-02-2017, 03:37 PM
|
#48
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Quote:
Originally Posted by srdmusic
What I'm intending is that Reaper copy exactly the same meter that is in the time selection. For example,
If the time selection has 1 bar of 4/4, 1 bar or 7/8 and then one bar of 2/4, I want Reaper to insert exactly those time signatures and move the content of everything in the time selection and beyond to the start of the newly inserted bars.
|
This should be possible by copying the points before inserting empty space (insert time, not beats), and then pasting the points back into the empty space.
Copy points within time selection may be particularly useful if the time selection doesn't begin on a tempo/timesig marker, since these "within time selection" actions do not only copy points, but also remember the empty space surrounding them.
A potential problem is the bug in Options: Add edge points when ripple editing or inserting time. If activated, it will delete any time signature change at the beginning of the time selection. For accurate shifting of other envelopes, though, it may be necessary. Fortunately, the damage caused by this bug can be repaired by simply pasting the copied points over the moved points (perhaps after first deleting some of the moved points to avoid having two different tempo markers at the same position).
(Timebases for everything (markers as well as items) should be set to time.)
Last edited by juliansader; 07-03-2017 at 04:04 AM.
|
|
|
07-03-2017, 11:48 AM
|
#49
|
Human being with feelings
Join Date: Dec 2016
Posts: 876
|
Quote:
Originally Posted by juliansader
Copy points within time selection may be particularly useful if the time selection doesn't begin on a tempo/timesig marker, since these "within time selection" actions do not only copy points, but also remember the empty space surrounding them.
(Timebases for everything (markers as well as items) should be set to time.)
|
I think you are onto something with the copy points suggestion. How do I go about inserting those points or pausting them once they are copied? I'm assuming you're suggesting to create a macro action that includes the copy points within time selection action.
Setting the timebase to time for everything seems to cause problems when exporting midi to a notation software. My guess is that tempo information is not being writing the Standard MIDI file when the timebase is set to time instead of beats. I could change the timebase of the session when I need to export MIDI but it seems like this could cause potential problems if I forget.
|
|
|
07-03-2017, 12:56 PM
|
#50
|
Human being with feelings
Join Date: Jun 2009
Location: Croatia
Posts: 24,790
|
Quote:
Originally Posted by srdmusic
My guess is that tempo information is not being writing the Standard MIDI file when the timebase is set to time instead of beats.
|
And that guess is wrong. I've just set the project timebase to Time for everything, and added some tempo/timesig changes, exported project MIDI, then loaded it. All tempo/timesig changes loaded correctly in a new empty project...
Gotta make sure that checkbox to [x] Embed project tempo/time signature changes is enabled when exporting project MIDI.
|
|
|
08-06-2017, 02:23 PM
|
#51
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
I have updated the "Insert empty beats" script with the following features:
# Tempo map
The tempo envelope is duplicated into the empty space, so that inserted space is equal to both 1) selected time and 2) selected beats.
# Insert position
The script can insert the empty beats/space on either the left of the right of the time selection, depending position of the edit cursor relative to the time selection.
# Locked items
The script will also detect locked items and can optionally protect such items against moving or splitting.
# MIDI items
MIDI items will *not* be split. Instead, the MIDI will be shifted *inside* the item. The script can therefore be used in the MIDI editor
# Timebase
The user does not need to make any changes to the timebase before or after running the script. Items will be moved as if Timebase=Time for all tracks, items and envelopes.
(This was a surprisingly tricky script to code, so please let me know if there are any bugs.)
EDIT: What to do with notes that extend into the inserted space? Should they be extended, trimmed, or left as is? In v0.96, the script will work as follows:
* Notes that start before the time selection and extend into but not beyond the selection, will be left as is.
* Notes that start before the time selection and extend beyond, will be extended along with the inserted space.
Last edited by juliansader; 08-08-2017 at 12:42 PM.
|
|
|
08-09-2017, 07:40 AM
|
#52
|
Human being with feelings
Join Date: Jan 2010
Location: Kalispell
Posts: 14,745
|
Quote:
Originally Posted by juliansader
I have updated the "Insert empty beats" script with the following features:
|
Thanks much juliansader, I assume this is the "js-Time selection-Insert empty beats at time selection"?
|
|
|
08-11-2017, 12:54 AM
|
#53
|
Human being with feelings
Join Date: May 2010
Location: Norway
Posts: 7,318
|
Quote:
Originally Posted by juliansader
I have updated the "Insert empty beats" script with the following features:
|
Really appreciated.
__________________
Reaper x64, win 11
Composer, text-writer, producer
Bandcamp
|
|
|
08-30-2017, 01:47 AM
|
#54
|
Human being with feelings
Join Date: May 2010
Location: Norway
Posts: 7,318
|
Quote:
Originally Posted by juliansader
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.
|
Quote:
Originally Posted by juliansader
I have updated the "Insert empty beats" script with the following features:
# Tempo map
The tempo envelope is duplicated into the empty space, so that inserted space is equal to both 1) selected time and 2) selected beats.
# Insert position
The script can insert the empty beats/space on either the left of the right of the time selection, depending position of the edit cursor relative to the time selection.
# Locked items
The script will also detect locked items and can optionally protect such items against moving or splitting.
# MIDI items
MIDI items will *not* be split. Instead, the MIDI will be shifted *inside* the item. The script can therefore be used in the MIDI editor
# Timebase
The user does not need to make any changes to the timebase before or after running the script. Items will be moved as if Timebase=Time for all tracks, items and envelopes.
(This was a surprisingly tricky script to code, so please let me know if there are any bugs.)
EDIT: What to do with notes that extend into the inserted space? Should they be extended, trimmed, or left as is? In v0.96, the script will work as follows:
* Notes that start before the time selection and extend into but not beyond the selection, will be left as is.
* Notes that start before the time selection and extend beyond, will be extended along with the inserted space.
|
I can't find this in Reapack
Need to insert 4bars after edit cursor with linear tempo around.
__________________
Reaper x64, win 11
Composer, text-writer, producer
Bandcamp
|
|
|
08-30-2017, 01:56 AM
|
#55
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Quote:
Originally Posted by G-Sun
I can't find this in Reapack
Need to insert 4bars after edit cursor with linear tempo around.
|
The script should be in the Main section of the Actions list.
|
|
|
08-30-2017, 02:56 AM
|
#56
|
Human being with feelings
Join Date: May 2010
Location: Norway
Posts: 7,318
|
Quote:
Originally Posted by juliansader
The script should be in the Main section of the Actions list.
|
Browsing the ReaPack I found it
Not installed, because of beta?
__________________
Reaper x64, win 11
Composer, text-writer, producer
Bandcamp
|
|
|
08-30-2017, 05:23 AM
|
#57
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Quote:
Originally Posted by G-Sun
Browsing the ReaPack I found it
Not installed, because of beta?
|
Strange... it should install like all the other scripts, even though the version number is not yet v1.00. I tested ReaPack synchronization a few minutes ago, and it installed/updated OK.
BTW, I have realized that there is one special case that may trip up the script: when an item in the time selection is of mixed type, with MIDI takes as well as audio takes or envelope automation.
|
|
|
08-30-2017, 05:28 AM
|
#58
|
Human being with feelings
Join Date: May 2010
Location: Norway
Posts: 7,318
|
Quote:
Originally Posted by juliansader
Strange... it should install like all the other scripts, even though the version number is not yet v1.00. I tested ReaPack synchronization a few minutes ago, and it installed/updated OK.
BTW, I have realized that there is one special case that may trip up the script: when an item in the time selection is of mixed type, with MIDI takes as well as audio takes or envelope automation.
|
Thanks!
Didn't test it now, as I sorted my case.
(But huh, those edits are nasty)
__________________
Reaper x64, win 11
Composer, text-writer, producer
Bandcamp
|
|
|
09-23-2017, 07:32 AM
|
#59
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
For a native solution (that doesn't require a script), ripple editing can be used:
* Activate snapping to grid, "Ripple edit all tracks" and "Ripple edit all affects tempo map",
* Select all items and split all items at cursor,
* Select an item immediately to the right of the split point and click-drag or nudge that item.
If the split point falls within a linear tempo segment, nudging does not calculate beats/measures correctly, but click-dragging can still easily be used.
(Look out for this bug: Ripple edit of tempo map persists after switching off ripple edit. There are also some idiosyncracies when the tempo map is moved across a locked item.)
Last edited by juliansader; 09-23-2017 at 12:28 PM.
|
|
|
09-23-2017, 11:05 AM
|
#60
|
Human being with feelings
Join Date: Dec 2016
Posts: 876
|
I found a bug that I can't seem to get around. If a user wants to add bars to the beginning of the session there are adverse affects with this script and the native one in Reaper.
Test:
1) set left locator to bar 1
2) set right locator to bar 5
3) trigger the insert empty space or js empty bars script
Reaper adds 4 bars of an incorrect tempo ( as in not the same tempo as what's in bar 1-4.
I believe it's because Reaper doesn't know what the tempo is for any bars before bar 1 so it defaults to whatever the default session tempo is set to.
|
|
|
09-23-2017, 11:09 AM
|
#61
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
The native "Insert empty space" action will use the tempo *preceding* the time selection, so when you insert space at the beginning a project, it will (probably?) use whatever the default tempo is.
What happens when you use the script? (It is supposed to work fine at the beginning of projects.)
Ripple edit is also easy to use at the beginning of projects.
Last edited by juliansader; 09-23-2017 at 11:39 AM.
|
|
|
09-23-2017, 03:19 PM
|
#62
|
Human being with feelings
Join Date: Dec 2016
Posts: 876
|
It seems like you are right about the script grabbing the default project tempo and not the tempo at the left locator in insert. IMHO the intention of the script should be to only look at what is within the locators and insert exactly that. Is there any way to modify the script in that way?
|
|
|
09-23-2017, 03:24 PM
|
#63
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Quote:
Originally Posted by srdmusic
It seems like you are right about the script grabbing the default project tempo and not the tempo at the left locator in insert. IMHO the intention of the script should be to only look at what is within the locators and insert exactly that. Is there any way to modify the script in that way?
|
The native "Insert empty space" will grab the default tempo; my script should duplicate the tempos exactly.
What happens when you use the script? (If there is a bug, could you post a screenshot?)
|
|
|
09-26-2017, 10:11 AM
|
#64
|
Human being with feelings
Join Date: Dec 2016
Posts: 876
|
Interesting. I must have an older version of your script on my home rig. It's working perfectly as expected here on my studio rig. Sorry for the false alarm.
|
|
|
10-21-2017, 01:53 PM
|
#65
|
Human being with feelings
Join Date: Dec 2016
Posts: 876
|
Is there a way of switching where reaper inserts empty bars? currently it seems to insert bars at the right locator. that's find accept I need it to insert bars at left locator instead.
This is especially important when inserting bars at the beginner of a session. Currently if I want to add a bar to the beginning the script inserts bars at the right locator and keeps the data at bar one still at bar 1. So it seems I add bars to the beginning of the session with this current script.
If there is a line I can edit in the script please let me know and I'll make a custom change.
|
|
|
10-21-2017, 02:00 PM
|
#66
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Quote:
Originally Posted by srdmusic
Is there a way of switching where reaper inserts empty bars? currently it seems to insert bars at the right locator. that's find accept I need it to insert bars at left locator instead.
|
It should work as you describe if the edit cursor is to the left of the time selection:
Quote:
Originally Posted by juliansader
# Insert position
The script can insert the empty beats/space on either the left or the right side of the time selection, depending on the position of the edit cursor relative to the time selection.
|
Last edited by juliansader; 10-21-2017 at 11:18 PM.
|
|
|
10-21-2017, 02:14 PM
|
#67
|
Human being with feelings
Join Date: Dec 2016
Posts: 876
|
Oh! That's perfection!
|
|
|
10-21-2017, 07:19 PM
|
#68
|
Human being with feelings
Join Date: Dec 2009
Location: Oblivion
Posts: 10,254
|
Yea thanks for this! I had a lot of custom actions that depended on inserting time and it seems like the native action got broken at some point (at least when there are multiple tempos involved).
|
|
|
04-09-2018, 04:41 PM
|
#69
|
Human being with feelings
Join Date: Jan 2018
Posts: 4
|
Quote:
Originally Posted by juliansader
I whipped up a quick script and uploaded it to ReaPack: "js_Time selection - Insert empty beats at time selection (moving later items).lua"
|
Thanks so much for this. It's been bugging me for a while as I use the 'insert empty space' action and tempo markers a lot.
My way around it has been to change the tempo marker before so its the same as the tempo marker at the time selection, and then change it back after the insert.
Last edited by cs759; 04-09-2018 at 04:42 PM.
Reason: spelling
|
|
|
04-13-2018, 02:51 AM
|
#70
|
Human being with feelings
Join Date: Dec 2014
Location: The Dutch Mountains
Posts: 389
|
Quote:
Originally Posted by juliansader
I have updated the "Insert empty beats" script with the following features:
# Tempo map
The tempo envelope is duplicated into the empty space, so that inserted space is equal to both 1) selected time and 2) selected beats.
# Insert position
The script can insert the empty beats/space on either the left of the right of the time selection, depending position of the edit cursor relative to the time selection.
# Locked items
The script will also detect locked items and can optionally protect such items against moving or splitting.
# MIDI items
MIDI items will *not* be split. Instead, the MIDI will be shifted *inside* the item. The script can therefore be used in the MIDI editor
# Timebase
The user does not need to make any changes to the timebase before or after running the script. Items will be moved as if Timebase=Time for all tracks, items and envelopes.
(This was a surprisingly tricky script to code, so please let me know if there are any bugs.)
EDIT: What to do with notes that extend into the inserted space? Should they be extended, trimmed, or left as is? In v0.96, the script will work as follows:
* Notes that start before the time selection and extend into but not beyond the selection, will be left as is.
* Notes that start before the time selection and extend beyond, will be extended along with the inserted space.
|
Yes, this script is a lifesaver. Using it all the time. Thanks!
|
|
|
06-01-2018, 07:17 PM
|
#71
|
Human being with feelings
Join Date: Jun 2012
Posts: 2,173
|
Important script. I was going to say maybe SWS/S&M: Insert silence (measures.beats) action could use it's code, but I just tried that and it didn't fail the way it used to when encountering a tempo change. It does fail when used on a tempo ramp...
I found a bug in the script, I believe: If used at a point in project (which is not at project settings BPM) where no tempo points are to be found after the insertion, it seems the project settings BPM is used at the end of the insertion, and following things can come off the grid. Inserting a point at the end of the time selection first before running the script makes everything turn out ok.
|
|
|
06-02-2018, 06:41 AM
|
#72
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Quote:
Originally Posted by FnA
I found a bug in the script, I believe: If used at a point in project (which is not at project settings BPM) where no tempo points are to be found after the insertion, it seems the project settings BPM is used at the end of the insertion, and following things can come off the grid. Inserting a point at the end of the time selection first before running the script makes everything turn out ok.
|
Oops, thanks, fixed! (Please let me know if everything now works OK.)
|
|
|
06-02-2018, 05:17 PM
|
#73
|
Human being with feelings
Join Date: Jun 2012
Posts: 2,173
|
I think you got it. Thanks/hats off.
|
|
|
06-02-2018, 06:13 PM
|
#74
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
Julian, seriously, what would Reaper be without you, thank you so much!
|
|
|
09-26-2018, 02:47 AM
|
#75
|
Human being with feelings
Join Date: Sep 2018
Posts: 8
|
When I try to use the script i get the following error:
"...t empty beats at time selection (moving later items).lua:67: 'reaper.APIExists' is unknown"
I'd really like to make it work, as it seems like just the tool I need. I am using a lot of different time signatures and tempos, so I have a history of ruining the entire project by inserting empty space!
|
|
|
09-26-2018, 03:10 AM
|
#76
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
What version of REAPER are you using?
The script uses the APIExists function to check that REAPER is up to date, but APIExists itself requires v5.23 or later.
|
|
|
09-26-2018, 04:16 AM
|
#77
|
Human being with feelings
Join Date: Sep 2018
Posts: 8
|
Ah. I don't know, but havn't updated in a while actually. That might be the problem! I'll try to update.
|
|
|
09-26-2018, 04:58 AM
|
#78
|
Human being with feelings
Join Date: Sep 2018
Posts: 8
|
Alright. So I updated reaper and it told me to download a SWS-extension, so I did that as well.
Now I get this error:
"...t empty beats at time selection (moving later items).lua:340: bad argument #1 to 'GetSetMediaItemTakeInfo_String' (MediaItem_Take expected)"
|
|
|
09-26-2018, 08:45 AM
|
#79
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Ah, thanks for finding this bug! Apparently empty takes don't return valid MediaItem_Takes.
I uploaded a new version 1.10 to ReaPack that should fix this (and hopefully I didn't break anything else in the process).
|
|
|
09-27-2018, 08:25 AM
|
#80
|
Human being with feelings
Join Date: Sep 2018
Posts: 8
|
Works perfectly now (so far). Damn, this is sweet!
Hopefully, I won't have to spend time fixing the mess "insert empty space" always made. Wish I knew about this sooner, thanks!
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 09:25 AM.
|