Old 02-19-2015, 03:09 AM   #41
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,823
Default

it seems SWS auto coloring can't update the colors of the regions or markers when my script is constantly updating them in realtime.

This new version 0.4 is compatible with SWS auto color. But read instructions inside the file to enable or disable redrawing of the regions.

* v0.4 2015-02-19
+ option to enable/disable compatibility with SWS auto color
+ option to enable/disable realtime updating regions/markers
+ option to scan for suffix in tracks only once for improving realtime performance

download updated in first post.
heda is offline   Reply With Quote
Old 02-19-2015, 03:13 AM   #42
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,823
Default

Quote:
Originally Posted by timothys_monster View Post
Would you mind having a look at it? Do you think it would be possible to solve?
Solved in v0.4.. in a hacky way... but at least it works... Normal redraw of the regions was not possible.
Thanks for reporting
Basically it will update the regions after you close the window.
If you need to be updated also in realtime when moving items, then you must open the script and modify one line
find realtime_redraw_regions_by_hack = 0;
and set it to realtime_redraw_regions_by_hack = 1;

I hope it works now. Let me know.
heda is offline   Reply With Quote
Old 02-19-2015, 06:34 AM   #43
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: Xalapa, Mexico
Posts: 748
Default

Whoohoo will test when I'm home. Thanks!!!
timothys_monster is offline   Reply With Quote
Old 02-19-2015, 06:37 AM   #44
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,568
Default

Just gave this my first proper go and it's awesome to be able to do this!

The "but" (and there's always a "but") is it's taking up 13% on a quad I7 at 4.3ghz and causing my mackie MCU emulator screens (that tell me what tracks are assigned to my fake BCF2000 screens) to flicker like old school ravers!

I'm looking at the options in the script now for optimising this now but any advice would be good

awesome though!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.

Last edited by musicbynumbers; 02-19-2015 at 06:42 AM.
musicbynumbers is offline   Reply With Quote
Old 02-19-2015, 06:54 AM   #45
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,568
Default

Got it working well

I changed the options and now it only takes up 2% when the script is open but seems to react the same to mutes and empty item adjustments.

I suspect it was the scanning of the track names that was causing the issue

This is very useful!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 02-19-2015, 07:10 AM   #46
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,823
Default

Quote:
Originally Posted by musicbynumbers View Post
Got it working well

I changed the options and now it only takes up 2% when the script is open but seems to react the same to mutes and empty item adjustments.

I suspect it was the scanning of the track names that was causing the issue

This is very useful!

yes one of the optimizations in v0.4 is the scan_tracks_once = 1;
so it only scans for suffix in tracks when you first execute the script. If you add another suffix then you must execute the script again. I think it is fair since we are not constantly adding suffixes for regions or markers tracks. Also realtimeupdates = 0; and realtime_redraw_regions_by_hack = 0; should eat less cpu if needed.
There may be still more optimizations to do.


This version of the script that runs in the bacground. So we don't need to have the window open in this version. It will constantly run in the background until you execute the script again and click yes to stop it. Experimental. If you have big CPU use then use the regular version.
Regions & Markers from items in background:https://stash.reaper.fm/23322/HeDa_Re...Background.eel

Last edited by heda; 02-19-2015 at 08:42 AM. Reason: corrected link
heda is offline   Reply With Quote
Old 02-19-2015, 08:28 AM   #47
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,823
Default

CPU testing the version that runs in the background in old first generation i7. So there is no window.
low CPU use. Not bad. And that also counts licecap recording the video.

heda is offline   Reply With Quote
Old 02-19-2015, 08:38 AM   #48
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,442
Default

@heda
It is impressive how successfully you overpass all problems Good job, heda \o/

(just one problem left: bad URl !)
X-Raym is offline   Reply With Quote
Old 02-19-2015, 08:43 AM   #49
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,823
Default

Quote:
Originally Posted by X-Raym View Post
@heda
It is impressive how successfully you overpass all problems Good job, heda \o/

(just one problem left: bad URl !)
oops thanks. I copied the wrong thing. corrected
heda is offline   Reply With Quote
Old 02-19-2015, 03:36 PM   #50
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: Xalapa, Mexico
Posts: 748
Default

Everything works as described. Very good!

I was thinking of this one to overcome problems with autocoloring vs. taking colors from items:
Would it be possible to autocolor the items? Then the markers/regions would simply use these colors. and don't have to fight between the two possibilities.
timothys_monster is offline   Reply With Quote
Old 02-19-2015, 04:10 PM   #51
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,823
Default

Quote:
Originally Posted by timothys_monster View Post
Everything works as described. Very good!

I was thinking of this one to overcome problems with autocoloring vs. taking colors from items:
Would it be possible to autocolor the items? Then the markers/regions would simply use these colors. and don't have to fight between the two possibilities.
I'm glad it is working.
You are right that would solve the issue too. I guess this would fit better in a feature request for SWS extensions.
If not, I would have to think how to do it. Maybe reading the sws-autocoloricon.ini and matching the regions and markers colors to item's notes.
heda is offline   Reply With Quote
Old 02-19-2015, 04:15 PM   #52
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,568
Default

great job, thanks!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 02-20-2015, 03:33 PM   #53
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,488
Default

Maybe this trick would help lowering the cpu usage:

(bigger red value = lower cpu usage)
Code:
realtimeupdates == 1 ? (
  time_precise() - t1 > 0.5 ? ( // execute code when at least 0.5 seconds has passed
    mute_state[i] == 0 ? (
      Delete_Markers_from_tracks(MarkerTracksArray[i],isregion);
      Create_Markers_from_tracks(MarkerTracksArray[i],isregion);
      realtime_redraw_regions_by_hack==1 ? ( 
        redrawregionshack();
      );
    );
    time_precise(t1); // "reset" timer
  );
);
spk77 is offline   Reply With Quote
Old 02-20-2015, 05:24 PM   #54
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,823
Default

Quote:
Originally Posted by spk77 View Post
Maybe this trick would help lowering the cpu usage:

(bigger red value = lower cpu usage)
Code:
realtimeupdates == 1 ? (
  time_precise() - t1 > 0.5 ? ( // execute code when at least 0.5 seconds has passed
    mute_state[i] == 0 ? (
      Delete_Markers_from_tracks(MarkerTracksArray[i],isregion);
      Create_Markers_from_tracks(MarkerTracksArray[i],isregion);
      realtime_redraw_regions_by_hack==1 ? ( 
        redrawregionshack();
      );
    );
    time_precise(t1); // "reset" timer
  );
);
Thank you spk77. Thank you for looking at the code. I am going to include this in next version.
Thanks! It will help for the version that runs in the background if you want to enable the realtime updates in it.
heda is offline   Reply With Quote
Old 02-20-2015, 05:45 PM   #55
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,488
Default

I hope that the timer trick works well enough

There is one downside when using "time_precise": there is a delay when regions are moving to a new position.
spk77 is offline   Reply With Quote
Old 02-22-2015, 06:35 AM   #56
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,823
Default

I have v0.5 almost ready. With spk77 time interval addition as a configurable setting. So you can make the realtime updates to be each second for example, making the background version so CPU efficient that I have decided that the main script should be the background version. Now the alternative version is the one that has the window, and I am thinking some features for this one, like to have a clickable mute/unmute list of the tracks there so you don't even have to scroll to the region/markers tracks to mute/unmute them. It can also have realtime updates with time interval set to 0 for instant update feedback, while the main background version can have its own settings.

I need to make sure you can run it and still open the UI version without stopping the background version. Once I do this I will upload v0.5.

I am thinking to rename the script to
Region/Marker Tracks
heda is offline   Reply With Quote
Old 02-22-2015, 07:14 AM   #57
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: Xalapa, Mexico
Posts: 748
Default

Another idea that came to my mind:

For existing projects where I only have regions but also want to hide them...

Ist it possible to do it the other way around? Creating empty items from regions so I can mute the track to hide the regions?
timothys_monster is offline   Reply With Quote
Old 02-22-2015, 08:10 AM   #58
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,442
Default

I like the actual name. There is all necessary keywords for efficient filter search, and it is clear
X-Raym is offline   Reply With Quote
Old 02-22-2015, 11:52 AM   #59
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,823
Default

Quote:
Originally Posted by timothys_monster View Post
Another idea that came to my mind:

For existing projects where I only have regions but also want to hide them...

Ist it possible to do it the other way around? Creating empty items from regions so I can mute the track to hide the regions?
It's certainly possible, annotating this for v0.6

I'm waiting too for SWS devs reply me to see if there is a way to redraw auto color of regions in a more effective way.



Quote:
Originally Posted by X-Raym View Post
I like the actual name. There is all necessary keywords for efficient filter search, and it is clear
It's not that the current name is bad. But the script has evolved from one that creates markers from items, to one that creates markers or regions from items, to one that is more like a Regions/Markers manager using tracks and items.
heda is offline   Reply With Quote
Old 02-23-2015, 05:07 AM   #60
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: Xalapa, Mexico
Posts: 748
Default

This is what happens when I use the background version 0.5 together with autocoloring:



Is there any option I could set to avoid the flickering (have the script to default settings now)?

Is it intended behaviour that I can't remove markers and region when the script is running in background?
timothys_monster is offline   Reply With Quote
Old 02-23-2015, 07:11 AM   #61
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,823
Default

Quote:
Originally Posted by timothys_monster View Post
This is what happens when I use the background version 0.5 together with autocoloring:

Is there any option I could set to avoid the flickering (have the script to default settings now)?

Is it intended behaviour that I can't remove markers and region when the script is running in background?
the background version is configured now to use realtime updates but each second so it doesn't consume too much CPU but still having realtime updating.. but less realtime that the UI version that ahs time_interval set to 0, thus updating as fast as it can, not each second. You can configure the interval inside the script changing the "Time_Interval = 1.0;" if you want the background version as in v0.4 you can disable realtimeupdates "realtime_updates = 0;" I hope SWS devs can provide a solution to this auto coloring issue.

It's normal that you can't remove markers while the script is running in the background, because it is actually deleting them all and creating them again each second to update its positions if you moved some empty items. That's the realtime setting that can be disabled.
__________________
HeDaScripts for REAPER | VIP Donations
heda is offline   Reply With Quote
Old 02-23-2015, 07:24 AM   #62
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: Xalapa, Mexico
Posts: 748
Default

Quote:
Originally Posted by heda View Post
the background version is configured now to use realtime updates but each second so it doesn't consume too much CPU but still having realtime updating.. but less realtime that the UI version that ahs time_interval set to 0, thus updating as fast as it can, not each second. You can configure the interval inside the script changing the "Time_Interval = 1.0;" if you want the background version as in v0.4 you can disable realtimeupdates "realtime_updates = 0;" I hope SWS devs can provide a solution to this auto coloring issue.

It's normal that you can't remove markers while the script is running in the background, because it is actually deleting them all and creating them again each second to update its positions if you moved some empty items. That's the realtime setting that can be disabled.
Thanks!
timothys_monster is offline   Reply With Quote
Old 02-25-2015, 07:24 PM   #63
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,823
Default

one of the new things I am working for v.06 is to mute/unmute from the UI window too. This will allow to quickly change regions without having to scroll to find the region track
__________________
HeDaScripts for REAPER | VIP Donations
heda is offline   Reply With Quote
Old 02-27-2015, 06:55 AM   #64
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,823
Default

new feature also coming in next version

__________________
HeDaScripts for REAPER | VIP Donations
heda is offline   Reply With Quote
Old 02-27-2015, 07:32 AM   #65
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,442
Default

So powerful!!
X-Raym is offline   Reply With Quote
Old 03-01-2015, 07:53 AM   #66
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,568
Default

indeed!

awesome stuff!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 03-07-2015, 03:26 PM   #67
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,823
Default

UPDATE: new zip file of v0.6 with new version 0.6 and installation instructions of toggle button and missing cursor file.
* v0.6 (2015-03-05)
+ UI clickable tracks
__________________
HeDaScripts for REAPER | VIP Donations
heda is offline   Reply With Quote
Old 03-08-2015, 04:09 AM   #68
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,442
Default

Excellent
X-Raym is offline   Reply With Quote
Old 03-08-2015, 04:25 AM   #69
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,823
Default

Quote:
Originally Posted by X-Raym View Post
Excellent
Thanks X-Raym.

see the instructions txt for the toggle button in REAPER 5? That's another issue of having random command ID for scripts. A user has to edit manually the script with the command id. Not very friendly for installing.
__________________
HeDaScripts for REAPER | VIP Donations
heda is offline   Reply With Quote
Old 03-08-2015, 05:37 AM   #70
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,442
Default

@heda
This is madness! ^^
X-Raym is offline   Reply With Quote
Old 03-08-2015, 09:58 AM   #71
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,823
Default

0.6b has a fix for the new UI. Now it should work. sorry. Just replace the HeDa_Regions & Markers from Items UI.eel
__________________
HeDaScripts for REAPER | VIP Donations
heda is offline   Reply With Quote
Old 03-11-2015, 03:22 PM   #72
Pasajeromoronmoreno
Human being with feelings
 
Join Date: Nov 2013
Location: Argentina
Posts: 324
Default

Incredible tool Heda! Eternally grateful. Your script saves me recently of a situation with 350+ markers and my needs of moving all of them simultaneously. Again, Awesome!
__________________
Living la vida loca
Pasajeromoronmoreno is offline   Reply With Quote
Old 03-11-2015, 03:48 PM   #73
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Location: Croatia
Posts: 1,902
Default

Quote:
Originally Posted by heda View Post
I hope SWS devs can provide a solution to this auto coloring issue.
I'll see what can be done (marker coloring is achieved through timer too, that's probably the reason for this)

In the mean time - did you try disabling auto color while applying changes and then resetting it back (automatically withing script with SWS actions and their toggle states) ?
Breeder is offline   Reply With Quote
Old 03-12-2015, 12:45 AM   #74
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,823
Default

Quote:
Originally Posted by Breeder View Post
I'll see what can be done (marker coloring is achieved through timer too, that's probably the reason for this)

In the mean time - did you try disabling auto color while applying changes and then resetting it back (automatically withing script with SWS actions and their toggle states) ?
Than you Breeder

No I didn't try that. I will look into it.
I was thinking more a solution of coloring the items of the track with SWS color settings. So there wouldn't be a mismatch in colors.

The only solution I found is activated setting a variable inside the script. realtime_redraw_regions_by_hack = 1;
This enables a hack I found that forces redraw of the regions with SWS colors. But it consumes more CPU so it is disabled by default. At least it should be disabled for the version of the script that runs in the background. Maybe for the UI version one could enable it.
I am going to try your suggestion to see if it redraws better than my hack.
__________________
HeDaScripts for REAPER | VIP Donations

Last edited by heda; 03-12-2015 at 01:00 AM.
heda is offline   Reply With Quote
Old 03-12-2015, 01:03 AM   #75
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,823
Default

After pre16, we won't need the complicated method of installing the toggle button script that I introduced in latest update. I will wait to pre17 to see what happens with that and will update the script accordingly.
__________________
HeDaScripts for REAPER | VIP Donations
heda is offline   Reply With Quote
Old 03-18-2015, 08:40 AM   #76
mim
Human being with feelings
 
Join Date: Mar 2009
Posts: 346
Default

It seems this script is able to exit without asking the terminating question in REAPER.

I think the trick is in this bunch of code, but I'm not sure, :

Code:
cmd_section = "RegionsMarkersFromItems"; 


get_action_context(#fn, sec, cmd);
state = GetToggleCommandStateEx(sec, cmd);

state <= 0 ? (
		commandid = NamedCommandLookup(Command_ID);
		defer("Main_OnCommand(commandid, 0);");

		SetToggleCommandState(sec, cmd, 1);
		RefreshToolbar2(sec, cmd);
		SetProjExtState(0, cmd_section, "togglestate", "1");
		SetProjExtState(0, "heda", "temp_data", "");

):(

  SetToggleCommandState(sec, cmd, 0);
  RefreshToolbar2(sec, cmd);
  SetProjExtState(0, cmd_section, "togglestate", "0");
  SetProjExtState(0, "heda", "temp_data", "");
);
I think it is not compatible R4, right ?
Is there a way to terminate a difer script silently in R4 ?

Thank you
mim is offline   Reply With Quote
Old 03-18-2015, 08:50 AM   #77
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,823
Default

@mim
yes that's only for REAPER 5.
I will see if I can make another workaround for REAPER 4.

that's a workaround I did to avoid the prompt window. But in latest v5 pre, they have changed this and now it won't be necessary to have another script launching the bacnground script. so you can only launch the main script and in the first prompt you can tell REAPER to remember and close the script. So next time it won't be prompted.
__________________
HeDaScripts for REAPER | VIP Donations

Last edited by heda; 03-18-2015 at 08:57 AM.
heda is offline   Reply With Quote
Old 03-18-2015, 09:13 AM   #78
mim
Human being with feelings
 
Join Date: Mar 2009
Posts: 346
Default

Quote:
Originally Posted by heda View Post
@mim
yes that's only for REAPER 5.
I will see if I can make another workaround for REAPER 4.

that's a workaround I did to avoid the prompt window. But in latest v5 pre, they have changed this and now it won't be necessary to have another script launching the bacnground script. so you can only launch the main script and in the first prompt you can tell REAPER to remember and close the script. So next time it won't be prompted.
OK; Got it !

Thanks!
mim is offline   Reply With Quote
Old 03-24-2015, 07:45 AM   #79
ADDIKTION
Human being with feelings
 
ADDIKTION's Avatar
 
Join Date: Jun 2009
Location: London, UK
Posts: 414
Default

Hi guys, this script just rocks!! So powerful.

I am using Reaper 4, do you know how to use take names strings instead of notes, to name the regions?


I use the label processor to name my items, I would need those names to appear in the regions.
Couldn't find an action that copies item names in item notes neither..

Thanks for any help!
__________________
Sound Design & Music
ADDIKTION is offline   Reply With Quote
Old 03-24-2015, 07:58 AM   #80
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,823
Default

Hi ADDIKTION
Thanks for your comment

The script is mainly designed to be used with empty items with notes. On some test I did it also works on MIDI items, but I cannot guarantee that it would work with all MIDI items.
But I was thinking now.. that maybe it would make more sense to use the label as you say, for normal items, and notes for empty items. I may do this on next update if I can.
Thanks!
__________________
HeDaScripts for REAPER | VIP Donations
heda 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:07 AM.


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