Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 07-02-2017, 04:01 AM   #41
Bri1
Human being with feelings
 
Bri1's Avatar
 
Join Date: Dec 2016
Location: England
Posts: 902
Default

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.
Bri1 is offline   Reply With Quote
Old 07-02-2017, 06:09 AM   #42
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,241
Default

Quote:
Originally Posted by Bri1 View Post
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.
juliansader is offline   Reply With Quote
Old 07-02-2017, 06:45 AM   #43
James HE
Human being with feelings
 
James HE's Avatar
 
Join Date: Mar 2007
Location: I'm in a barn
Posts: 4,254
Default

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
James HE is offline   Reply With Quote
Old 07-02-2017, 08:32 AM   #44
srdmusic
Human being with feelings
 
Join Date: Dec 2016
Posts: 245
Default

Quote:
Originally Posted by juliansader View Post
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.
srdmusic is offline   Reply With Quote
Old 07-02-2017, 08:34 AM   #45
srdmusic
Human being with feelings
 
Join Date: Dec 2016
Posts: 245
Default

Quote:
Originally Posted by James HE View Post
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.
srdmusic is offline   Reply With Quote
Old 07-02-2017, 09:22 AM   #46
Bri1
Human being with feelings
 
Bri1's Avatar
 
Join Date: Dec 2016
Location: England
Posts: 902
Default

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..
Bri1 is offline   Reply With Quote
Old 07-02-2017, 09:24 AM   #47
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 19,528
Default

Quote:
Originally Posted by Bri1 View Post
^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.
EvilDragon is online now   Reply With Quote
Old 07-02-2017, 03:37 PM   #48
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,241
Default

Quote:
Originally Posted by srdmusic View Post
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.
juliansader is offline   Reply With Quote
Old 07-03-2017, 11:48 AM   #49
srdmusic
Human being with feelings
 
Join Date: Dec 2016
Posts: 245
Default

Quote:
Originally Posted by juliansader View Post
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.
srdmusic is offline   Reply With Quote
Old 07-03-2017, 12:56 PM   #50
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 19,528
Default

Quote:
Originally Posted by srdmusic View Post
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.
EvilDragon is online now   Reply With Quote
Old 08-06-2017, 02:23 PM   #51
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,241
Default

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.
juliansader is offline   Reply With Quote
Old 08-09-2017, 07:40 AM   #52
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Just outside of Glacier National Park
Posts: 10,835
Default

Quote:
Originally Posted by juliansader View Post
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"?
__________________
Kontakt Vid Tutorials->Create Outputs / Create Templates -|- SMDrums Free drums
Elk Videos->Opening / Snooze / Bull Fight / End Credits
Tod's Music->1st Recording (1965) / My Daughter / A Little Country
Tod is online now   Reply With Quote
Old 08-11-2017, 12:54 AM   #53
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 6,254
Default

Quote:
Originally Posted by juliansader View Post
I have updated the "Insert empty beats" script with the following features:
Really appreciated.
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music
G-Sun is offline   Reply With Quote
Old 08-30-2017, 01:47 AM   #54
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 6,254
Default

Quote:
Originally Posted by juliansader View Post
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 View Post
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 8.1
G-Sun.no - Music Blog - My music
G-Sun is offline   Reply With Quote
Old 08-30-2017, 01:56 AM   #55
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,241
Default

Quote:
Originally Posted by G-Sun View Post
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.
juliansader is offline   Reply With Quote
Old 08-30-2017, 02:56 AM   #56
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 6,254
Default

Quote:
Originally Posted by juliansader View Post
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 8.1
G-Sun.no - Music Blog - My music
G-Sun is offline   Reply With Quote
Old 08-30-2017, 05:23 AM   #57
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,241
Default

Quote:
Originally Posted by G-Sun View Post
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.
juliansader is offline   Reply With Quote
Old 08-30-2017, 05:28 AM   #58
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 6,254
Default

Quote:
Originally Posted by juliansader View Post
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 8.1
G-Sun.no - Music Blog - My music
G-Sun is offline   Reply With Quote
Old 09-23-2017, 07:32 AM   #59
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,241
Default

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.
juliansader is offline   Reply With Quote
Old 09-23-2017, 11:05 AM   #60
srdmusic
Human being with feelings
 
Join Date: Dec 2016
Posts: 245
Default

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.
srdmusic is offline   Reply With Quote
Old 09-23-2017, 11:09 AM   #61
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,241
Default

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.
juliansader is offline   Reply With Quote
Old 09-23-2017, 03:19 PM   #62
srdmusic
Human being with feelings
 
Join Date: Dec 2016
Posts: 245
Default

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?
srdmusic is offline   Reply With Quote
Old 09-23-2017, 03:24 PM   #63
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,241
Default

Quote:
Originally Posted by srdmusic View Post
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?)
juliansader is offline   Reply With Quote
Old 09-26-2017, 10:11 AM   #64
srdmusic
Human being with feelings
 
Join Date: Dec 2016
Posts: 245
Default

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.
srdmusic is offline   Reply With Quote
Old 10-21-2017, 01:53 PM   #65
srdmusic
Human being with feelings
 
Join Date: Dec 2016
Posts: 245
Default

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.
srdmusic is offline   Reply With Quote
Old 10-21-2017, 02:00 PM   #66
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,241
Default

Quote:
Originally Posted by srdmusic View Post
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 View Post
# 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.
juliansader is offline   Reply With Quote
Old 10-21-2017, 02:14 PM   #67
srdmusic
Human being with feelings
 
Join Date: Dec 2016
Posts: 245
Default

Oh! That's perfection!
srdmusic is offline   Reply With Quote
Old 10-21-2017, 07:19 PM   #68
foxAsteria
Human being with feelings
 
foxAsteria's Avatar
 
Join Date: Dec 2009
Location: Axis Mundi
Posts: 4,052
Default

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).
__________________
TwilightMysterySchool
foxAsteria is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:26 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.