Old 03-01-2016, 02:49 PM   #1
Dstruct
Human being with feelings
 
Join Date: Jul 2006
Posts: 12,387
Default Insert new track (in folder vs end of tracklist)

REAPER 5.16rc1

-> track 1 = folder
-> track 2 = child track

-> select track 2

-> "Insert new track" or "Insert multiple tracks" (after last touched track)


Result: Track(s) inserted ouside of folder


Expected: Track(s) placed as last one(s) inside folder (becasuse track 2 selected)!

For placing them outside of the folder we would have no folder/child track selected or would use "Insert new track at end of tracklist" or "Insert multiple tracks" (at end of project)



Also "Insert multiple tracks" (at end of project) should be renamed to "Insert multiple tracks" (at end of tracklist) for consistency

Last edited by Dstruct; 03-01-2016 at 10:19 PM.
Dstruct is offline   Reply With Quote
Old 12-27-2021, 05:24 AM   #2
obet1289
Human being with feelings
 
obet1289's Avatar
 
Join Date: Nov 2020
Posts: 17
Default

hi,

Did you find a solution?
obet1289 is online now   Reply With Quote
Old 12-27-2021, 12:24 PM   #3
Dstruct
Human being with feelings
 
Join Date: Jul 2006
Posts: 12,387
Default

But that's not the issue.
Dstruct is offline   Reply With Quote
Old 12-27-2021, 12:25 PM   #4
Dstruct
Human being with feelings
 
Join Date: Jul 2006
Posts: 12,387
Default

Quote:
Originally Posted by obet1289 View Post
hi,

Did you find a solution?
No. Still happens in REAPER 6.43.
Dstruct is offline   Reply With Quote
Old 12-27-2021, 02:50 PM   #5
rncwalker
Human being with feelings
 
Join Date: Apr 2016
Location: South Fl.
Posts: 443
Default

Quote:
Originally Posted by Dstruct View Post
REAPER 5.16rc1

-> track 1 = folder
-> track 2 = child track

-> select track 2

-> "Insert new track" or "Insert multiple tracks" (after last touched track)


Result: Track(s) inserted ouside of folder
It's working like it should.
"Insert new track" or "Insert multiple tracks" (after last touched track)"
your last track was the end of the folder, so it should go outside of the folder.

Select the 1 track (Folder) and it works correctly!

Try it! it does work.

Robert
rncwalker is offline   Reply With Quote
Old 12-27-2021, 07:50 PM   #6
Dstruct
Human being with feelings
 
Join Date: Jul 2006
Posts: 12,387
Default

I disagree. The selected track was inside a folder and I expect the inserted track to be inside that folder.
Dstruct is offline   Reply With Quote
Old 12-27-2021, 09:39 PM   #7
rncwalker
Human being with feelings
 
Join Date: Apr 2016
Location: South Fl.
Posts: 443
Default

Quote:
Originally Posted by Dstruct View Post
I disagree. The selected track was inside a folder and I expect the inserted track to be inside that folder.
But it's the last track of the folder!

Reaper is telling you "Insert new track" or "Insert multiple tracks" (After Last Touched Track)"

After the last touched track is your "last folder track", so reaper will not put in in the folder.

Now if it said "Before the last touched track, then it should be in the folder.

There is a Reason for this behavior.



Robert
rncwalker is offline   Reply With Quote
Old 12-27-2021, 10:07 PM   #8
Dstruct
Human being with feelings
 
Join Date: Jul 2006
Posts: 12,387
Default

Quote:
Originally Posted by rncwalker View Post
Now if it said "Before the last touched track, then it should be in the folder.

There is a Reason for this behavior.
Why not? I'm inside the folder an the track shoulde be inside the folder. Why should be outside of the folder?
Dstruct is offline   Reply With Quote
Old 01-04-2022, 04:43 PM   #9
obet1289
Human being with feelings
 
obet1289's Avatar
 
Join Date: Nov 2020
Posts: 17
Default

I just want to multiply the number of child tracks in my folder. So I can add new items to that track. Yes I can add a new one at the top of all other child tracks But the problem is I always work left to right and top to bottom. And I think I am not alone. At least the designers in most of the other DAWs thinks like me. There is an action called ''add new track(s) to the end of the TCP list''. There should also be the same for folders.
obet1289 is online now   Reply With Quote
Old 01-04-2022, 04:50 PM   #10
obet1289
Human being with feelings
 
obet1289's Avatar
 
Join Date: Nov 2020
Posts: 17
Default

In ableton live

Right click on the last child track > insert new track > adds new child track
Right click on the empty TCP area > insert new track > adds new track

very basic
obet1289 is online now   Reply With Quote
Old 01-04-2022, 06:17 PM   #11
bodfum
Human being with feelings
 
bodfum's Avatar
 
Join Date: Oct 2017
Location: UK
Posts: 71
Default

Ask in the script forum if someone could help you out maybe.
bodfum is online now   Reply With Quote
Old 01-04-2022, 06:28 PM   #12
Dstruct
Human being with feelings
 
Join Date: Jul 2006
Posts: 12,387
Default

Quote:
Originally Posted by obet1289 View Post
In ableton live

Right click on the last child track > insert new track > adds new child track
Right click on the empty TCP area > insert new track > adds new track

very basic
Agreed.
Dstruct is offline   Reply With Quote
Old 01-04-2022, 07:52 PM   #13
Daodan
Human being with feelings
 
Join Date: Jan 2011
Posts: 355
Default

Quote:
Originally Posted by obet1289 View Post
Yes I can add a new one at the top of all other child tracks But the problem is I always work left to right and top to bottom. And I think I am not alone.
Exactly!
Would be great to just insert track where you want without extra drag and drop stuff.
Daodan is offline   Reply With Quote
Old 01-04-2022, 07:55 PM   #14
Daodan
Human being with feelings
 
Join Date: Jan 2011
Posts: 355
Default

Quote:
Originally Posted by bodfum View Post
Ask in the script forum if someone could help you out maybe.
It feels weird for me when scripts involved in such basic things.
Daodan is offline   Reply With Quote
Old 01-05-2022, 01:08 AM   #15
sockmonkey72
Human being with feelings
 
sockmonkey72's Avatar
 
Join Date: Sep 2021
Location: Berlin
Posts: 282
Default

Quote:
Originally Posted by Daodan View Post
It feels weird for me when scripts involved in such basic things.
That's just superstition and stubbornness talking. The script API is there to make REAPER work the way you think it should -- the ReaScript docs are in the top-level Help menu for a reason.

As for the problem at hand, yes, I think this could be solved with a script.

InsertTrackRespectingFolderEnd.eel

Code:
// InsertTrackRespectingFolderEnd.eel
// v0.1, 2021.1.5
// sockmonkey72 / Jeremy Bernstein
// Inserts track(s) to the right of the selected track(s)
// if the selected track is the end of a folder, the new track
// will be created inside of that folder

ct = CountSelectedTracks(0);
i = 1;
loop(ct,
  tr = GetSelectedTrack(0, ct - i); // iterate backward since we're modifying the selection
  tr ? (
    trnum = GetMediaTrackInfo_Value(tr, "IP_TRACKNUMBER"); // 1-based
    InsertTrackAtIndex(trnum, 1); // 0-based, so we can use the same number
    newtr = GetTrack(0, trnum);
    
    trdepth = GetMediaTrackInfo_Value(tr, "I_FOLDERDEPTH");
    trdepth < 0 ? (
      SetMediaTrackInfo_Value(newtr, "I_FOLDERDEPTH", trdepth);
      SetMediaTrackInfo_Value(tr, "I_FOLDERDEPTH", 0);
    );
    SetTrackSelected(tr, 0);
    SetTrackSelected(newtr, 1);
  );
  i += 1;
);
sockmonkey72 is online now   Reply With Quote
Old 01-05-2022, 05:38 PM   #16
obet1289
Human being with feelings
 
obet1289's Avatar
 
Join Date: Nov 2020
Posts: 17
Default

Quote:
Originally Posted by sockmonkey72 View Post
That's just superstition and stubbornness talking. The script API is there to make REAPER work the way you think it should -- the ReaScript docs are in the top-level Help menu for a reason.

As for the problem at hand, yes, I think this could be solved with a script.

InsertTrackRespectingFolderEnd.eel

Code:
// InsertTrackRespectingFolderEnd.eel
// v0.1, 2021.1.5
// sockmonkey72 / Jeremy Bernstein
// Inserts track(s) to the right of the selected track(s)
// if the selected track is the end of a folder, the new track
// will be created inside of that folder

ct = CountSelectedTracks(0);
i = 1;
loop(ct,
  tr = GetSelectedTrack(0, ct - i); // iterate backward since we're modifying the selection
  tr ? (
    trnum = GetMediaTrackInfo_Value(tr, "IP_TRACKNUMBER"); // 1-based
    InsertTrackAtIndex(trnum, 1); // 0-based, so we can use the same number
    newtr = GetTrack(0, trnum);
    
    trdepth = GetMediaTrackInfo_Value(tr, "I_FOLDERDEPTH");
    trdepth < 0 ? (
      SetMediaTrackInfo_Value(newtr, "I_FOLDERDEPTH", trdepth);
      SetMediaTrackInfo_Value(tr, "I_FOLDERDEPTH", 0);
    );
    SetTrackSelected(tr, 0);
    SetTrackSelected(newtr, 1);
  );
  i += 1;
);

Thank you. I knew I could do something with scripts, but I didn't know how much I could do. Because I was able to overcome most of the problems by doing some research on the forum. This reply renewed my curiosity and encouraged me to take the next step in Reaper. Also ReaScript documentation is amazing.
obet1289 is online now   Reply With Quote
Old 01-05-2022, 05:57 PM   #17
obet1289
Human being with feelings
 
obet1289's Avatar
 
Join Date: Nov 2020
Posts: 17
Default

And I combined your script with the SWS action ''Set selected track(s) to previous tracks color''
obet1289 is online now   Reply With Quote
Old 01-05-2022, 08:49 PM   #18
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 779
Default In Lua...

Oh I seen others have beat me to it.
This include the previous track's color and renaming...
Code:
--------------------------------------------------------------------
------------------|| HEADER ||--------------------------------------
--------------------------------------------------------------------
--[[
 * ReaScript Name: InsertTrackExtendingFolderIfSelected.lua
 * Description:
 * Instructions:
 * Author: Alex Paquette
 * Licence: GPL v3
 * Extensions Needed:
 * Version: 1.0
--]]


--------------------------------------------------------------------
------------------|| SETUP ||---------------------------------------
--------------------------------------------------------------------
local reaper = reaper


--------------------------------------------------------------------
------------------|| RUN FUNCTION ||--------------------------------
--------------------------------------------------------------------
local function run()
	local isReorder = false
	local target_id = reaper.CountTracks(0)
	local target_col = 0
	local seltrks = reaper.CountSelectedTracks(0)
	if seltrks > 0 then
		local tr = reaper.GetSelectedTrack(0, seltrks-1)
		target_col = reaper.GetMediaTrackInfo_Value(tr, 'I_CUSTOMCOLOR')
		local _, tr_nm = reaper.GetTrackName(tr)
		target_id = reaper.CSurf_TrackToID(tr, false)
		isReorder = true
	end
	reaper.InsertTrackAtIndex(target_id, false)
	local new_tr = reaper.GetTrack(0, target_id)
	reaper.SetMediaTrackInfo_Value(new_tr, 'I_CUSTOMCOLOR', target_col)
	reaper.SetOnlyTrackSelected(new_tr)
	if isReorder then 
		reaper.ReorderSelectedTracks(target_id, 1)
	end
	reaper.Main_OnCommand(40696, 0) -- rename track
end


--------------------------------------------------------------------
------------------|| RUNTIME ||-------------------------------------
--------------------------------------------------------------------
run()
lexaproductions is online now   Reply With Quote
Old 01-06-2022, 04:51 PM   #19
obet1289
Human being with feelings
 
obet1289's Avatar
 
Join Date: Nov 2020
Posts: 17
Default

Wow. Thank you!!!
obet1289 is online now   Reply With Quote
Old 01-06-2022, 05:05 PM   #20
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 779
Default

Quote:
Originally Posted by obet1289 View Post
In ableton live

Right click on the last child track > insert new track > adds new child track
Right click on the empty TCP area > insert new track > adds new track

very basic
Menu->Customize Menus/Toolbars...
You can add the script to both contexts "Track Control Panel" and "Empty TCP context" So that you can use the action with Right click.

You can even name them the same as in Ableton so that you can feel right at home.
lexaproductions is online now   Reply With Quote
Old 01-09-2022, 10:08 AM   #21
obet1289
Human being with feelings
 
obet1289's Avatar
 
Join Date: Nov 2020
Posts: 17
Default

Quote:
Originally Posted by lexaproductions View Post
so that you can feel right at home.
Haha Ableton lives user interface is very well designed. Even now I run Ableton live for many simple tasks. Sampler and synthsizers are very good and easy to do their job. Open an instrument > activate virtual keyboard > make a brrrfff sound > patch it to an audio track > record and export. Quick and easy. I am leaving the issues with Reapers virtual keyboard and routing screens to another discussion.

I started Reaper almost 2 years ago. As a learning strategy, I tried to make all the menus and panels look like those in Ableton Live. After that a expanded the menus and toolbars as I like. It worked really well actually.

Last edited by obet1289; 01-09-2022 at 10:35 AM.
obet1289 is online now   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 07:43 AM.


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