Old 04-25-2018, 04:08 PM   #1
Triode
Human being with feelings
 
Triode's Avatar
 
Join Date: Jan 2012
Posts: 1,185
Default Is group editing via midi item possible this way too?

I like the idea of editing audio using a midi item on a folder. A bit like this thread: https://forum.cockos.com/showthread.php?t=205731
But not using item groups

I'm wondering if it's possible to modify SPK77's script below slightly to add the "folder item" functionality in - using the SWS select children and parent tracks commands in the script and setting the folder track to record a midi item while the child tracks are recording audio.

At the moment the script selects all the items on the folder's child tracks to a depth of one folder (I have it set as the default click). If the parent track's items were always selected as well (while the child track's items are also selected in the case of clicking on the folder item) it would add to that scripts functionality.

I really like the idea of editing takes looking at the wave file of the composite audio of the whole folder - Especially if it was reliable enough to be able to collapse the folder and still affect the contained audio!

Code:
Undo_BeginBlock2(0);
last_touched_track = GetLastTouchedTrack();

i = 0;
cur_depth = 0;
is_child_track = 0;
tr_c = CountTracks(0);

while(is_child_track == 0 && i < tr_c) (
  track = GetTrack(0, i);
  depth_change = GetMediaTrackInfo_Value(track, "I_FOLDERDEPTH");
  cur_depth += depth_change;
  track == last_touched_track && depth_change <= 0 && cur_depth >= 0 ? is_child_track = 1;
  cur_depth == 0 && depth_change == 0 ? is_child_track = 0;
  i += 1;
);

PreventUIRefresh(1);
is_child_track == 1 ? (
  Main_OnCommand(NamedCommandLookup("_SWS_SELPARENTS2"), 0);
  Main_OnCommand(NamedCommandLookup("_SWS_SELCHILDREN"), 0); // sel only children tracks
  Main_OnCommand(NamedCommandLookup("_XENAKIOS_SELITEMSUNDEDCURSELTX"), 0);
) : SetOnlyTrackSelected(last_touched_track);
PreventUIRefresh(-1);

Undo_EndBlock2(0, "Select items under edit cursor (in a folder)", -1);
__________________
Mixing / Brush and Beater Drums Online: www.outoftheboxsounds.com
Triode 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 05:14 PM.


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