![]() |
#1 | |
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 4,526
|
![]()
The issue discribed here
https://forum.cockos.com/showthread.php?t=297349 In short, ApplyNudge() is indeed move Automation item, but doesn`t Quote:
Mentioned script: Code:
-- @description Duplicate items bar relative -- @version 2.0 -- @author MPL -- @website http://forum.cockos.com/showthread.php?t=188335 -- @changelog -- # overall cleanup -- # remove SWS dependency -- # handle bar correctly -- # handle time signatures and tempo variations ---------------------------------------------------------------------- function main() local it = reaper.GetSelectedMediaItem(0, 0) if not it then return end local it_last = reaper.GetSelectedMediaItem(0, reaper.CountSelectedMediaItems(0)-1) local bound_st = reaper.GetMediaItemInfo_Value(it, "D_POSITION") local bound_end = reaper.GetMediaItemInfo_Value(it_last, "D_POSITION") +reaper.GetMediaItemInfo_Value(it_last, "D_LENGTH") local retval, measures, cml, fullbeats_st, cdenom = reaper.TimeMap2_timeToBeats( 0, bound_st ) local retval, measures, cml, fullbeats_end, cdenom = reaper.TimeMap2_timeToBeats( 0, bound_end ) local tsmarker = reaper.FindTempoTimeSigMarker( 0, bound_st ) local retval1, timepos, measurepos, beatpos, bpm, timesig_num, timesig_denom, lineartempo = reaper.GetTempoTimeSigMarker( 0, tsmarker ) if retval1 == false then local test_time = reaper.TimeMap2_beatsToTime( 0, 0, 1 ) _, _, _, _, timesig_denom = reaper.TimeMap2_timeToBeats( 0, test_time ) end local barshift = math.max(math.ceil((fullbeats_end-fullbeats_st) / timesig_denom),1) reaper.ApplyNudge( 0,--project, 0,--nudgeflag, 5,--nudgewhat, 16,--nudgeunits, barshift,--value, false,--reverse, 0)--copies ) end reaper.Undo_BeginBlock2( 0 ) main() reaper.Undo_EndBlock2( 0, "Duplicate items bar relative", 0xFFFFFFFF ) Last edited by mpl; 06-15-2025 at 09:29 PM. |
|
![]() |
![]() |
![]() |
#2 |
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 4,526
|
![]()
Bump or just let me know "live with it" so I workaround this.
|
![]() |
![]() |
![]() |
#3 |
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 16,542
|
![]()
Let me see if I understand this - you want ApplyNudge, when duplicating, to only duplicate the parts of the AI that overlap with the item, but not the parts that do not overlap?
|
![]() |
![]() |
![]() |
#4 | |
Human being with feelings
Join Date: Feb 2017
Posts: 5,400
|
![]()
^^
according to him from a linked thread: Quote:
I noticed also that Nudge left and Nudge Right does not consider selected points or AIs, and i think it would be expected. Anyway I believe user using "Script: mpl_Duplicate items bar relative" basically just wants to duplicate content, but since there is no simple and intuitive workflow to: marquee select any element → copy selection, this simple operation brings all sorts of unexpected behaviours. Pasted from another thread: Why are all the selected points not being selected in a single drag? ![]() why Selected points dont move together? ![]() why Selected AI and points dont move together and points even gets unselected after moving AI? ![]() why Item and Ai and points dont move together since they all selected? ![]() why selected item and AI don't copy together? ![]() why Selected Item and Selected Ai dont stretch together? ![]() why selected AI and Item edges dont move together? ![]()
__________________
🙏🏻 Last edited by deeb; 06-09-2025 at 09:12 PM. |
|
![]() |
![]() |
![]() |
#5 |
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 4,526
|
![]()
right, just like if we move it by mouse drag when "automation follow items" enabled
|
![]() |
![]() |
![]() |
#6 |
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 16,542
|
![]() |
![]() |
![]() |
![]() |
#7 | ||
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 4,526
|
![]() Quote:
Quote:
Steps to reproduce: 1. create 1 bar long item 2. create exact same boundaries timing AI 3. enable "Automation follow items" 4a drag with mouse > item is moved, AI is moved to same amount of time 4b run Code:
reaper.ApplyNudge( 0,--project, 0,--nudgeflag, 5,--nudgewhat, 16,--nudgeunits, 16,--value, false,--reverse, 0)--copies ) |
||
![]() |
![]() |
![]() |
#8 | |
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 16,542
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#9 |
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 4,526
|
![]()
Thank you, I also changed description a bit at first post.
|
![]() |
![]() |
![]() |
#10 |
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 16,542
|
![]() |
![]() |
![]() |
![]() |
#11 |
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 4,526
|
![]()
Thanks, it is fixed for 7.40+dev0615
|
![]() |
![]() |
![]() |
Thread Tools | |
|
|