Old 01-28-2024, 04:25 AM   #1
guonaudio
Human being with feelings
 
guonaudio's Avatar
 
Join Date: Mar 2022
Location: UK
Posts: 7
Default GUtilitiesPlus - New & Improved

Hello again everyone~ I took all the feedback from the initial release of GUtilities and have come back with GUtilitiesPlus! In terms of core features, it's currently pretty much the same as its predecessor, but it's in a much better state to grow.

The following ReaScripts are included in the initial release:
  • Batch import
  • Batch replace source (beta)
  • Item alias generator
  • Item fader
  • Item renamer
  • Move selected items to track with same name
  • Set item length (after snap offset)
  • Set item length (before snap offset)
  • Source validator (export to CSV)
  • Source validator

The main change I've made is splitting up the code. Most of it has been rewritten in Lua, and the bits that I couldn't (or didn't want to) rewrite have been reworked into a public API. It's all open source under the MIT license, so use as much or as little as you need.

Next, I've provided Mac and Linux support. I've got machines running a version of each platform now, and it's all looking good, but please let me know if you come across any issues.

Finally, I've squashed loads of bugs and put in a good bit of time optimizing everything. If you experienced any bugs before, let me know if they've persisted to the new release.

I won't be jumping ahead on a V1 release This time around. So forewarning: the API is liable to change as I get more feedback. Please do try it out though 😄

Also, the scripts are developed using Lua 5.4 features, so you will need Reaper v7.0+. You can, however, tweak the code to make it work on earlier versions if you need to. Compatibility is probably as simple as searching+replacing "<const>" with "" and doing a slight refactor on any <close> attributes, calling the relevant close() code manually. But I quite like these new features, so I'm going to continue using them.

In any case, consider GUtilitiesPlus a complete replacement. You can uninstall GUtilities using ReaPack when you install GUtilitiesPlus.

The next step for me is figuring out how to create some nice documentation. Functions are exported with descriptions visible in Reaper's IDE, ReaScripts have a brief description at the top of the code to explain what they're for, and certain GUI scripts like "GU_Item renamer.lua" have some inbuilt documentation via the tooltips, but I appreciate that a lot of the functionality is still in my head.

Installation

To install this extension, paste the following link into ReaPack → Import repositories. Installing/updating extensions will require restarting Reaper.

Code:
https://github.com/gu-on/gutilitiesplus/raw/master/index.xml
Source code for API (C++) can be found here:
https://github.com/gu-on/GUtilitiesAPI

ReaScripts (Lua) | ReaPack repository can be found here:
https://github.com/gu-on/GUtilitiesPlus
__________________
Linktree | Donation
guonaudio is offline   Reply With Quote
Old 01-28-2024, 05:51 AM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,959
Default

Hi, tanks for sharing! Rewrite in Lua, and still open source, is nice 😊



I have put your API function doc into https://www.extremraym.com/cloud/reascript-doc/ so we can see what it's in it more clearly.


Just input "GU_" in the filter to see the related API function





I can see that some could be made with existing API like GU_Filesystem_EnumerateMediaFiles (filtering output of EnumerateMediaFiles and JS_File_Stat, but maybe it's more efficient your way ?), or GU_PCM_Source_HasRegion( source ) which seems to be a ligt version of CF_EnumMediaSourceCues.



GU_PCM_Source_IsMono( source ) in one line of code is for sure more concize too than in pure Lua, and having it in C++ is surely way more efficient.
GU_Filesystem_PathExists is a good alternative to native file_exists though cause it handle folder, though there is Lua way to do it, this is more concize as well, which I suppose is the role of most of these API functions.


I havent check the script themselves yet.


Cheers !
X-Raym is offline   Reply With Quote
Old 01-28-2024, 06:17 AM   #3
guonaudio
Human being with feelings
 
guonaudio's Avatar
 
Join Date: Mar 2022
Location: UK
Posts: 7
Default

Oh wow, thanks for adding it to your documentation! I only found the EnumerateMediaFiles solution near the end of my work on GU_Filesystem_EnumerateMediaFiles, haha. I'm not sure how they compare side-by-side, but I did optimise mine, ensuring it avoids duplicate work. In general, I like to use std::filesystem where possible, especially since a good bit of the functionality I have added comes from filesystem access currently. If it seems less trouble than it's worth, however, I will look at removing it and implementing the solution you have provided.

Thank you for the review! I will use the feedback as I iterate on it further, factoring in the future features I would like to support
__________________
Linktree | Donation
guonaudio is offline   Reply With Quote
Old 01-28-2024, 07:28 PM   #4
lachinhan
Human being with feelings
 
lachinhan's Avatar
 
Join Date: Nov 2014
Location: Can Tho - Viet Nam
Posts: 305
Default

utils_lib.lua:57: attempt to call a nil value (field 'GU_Config_Read')

Pls show me fix it
__________________
NK Recording Studio
Email: lachinhan@gmail.com or admin@thuamninhkieu.com
Website:nkpro.top and ntmusicpro.com
lachinhan is offline   Reply With Quote
Old 01-29-2024, 10:38 AM   #5
guonaudio
Human being with feelings
 
guonaudio's Avatar
 
Join Date: Mar 2022
Location: UK
Posts: 7
Default

Hey~ That error means that the "reaper_gutilitiesapi" plug-in isn't installed. If restarting Reaper doesn't fix the issue, it might mean that you haven't installed the dependencies in ReaPack.

To install it, go to Extensions → ReaPack → Browse Packages, and type GUtilitiesAPI in the Filter. Right-click and select install. Once installed, you should see a little "i" to the left of the package name. You should also install "GUtilities scripts config" if it isn't installed (following the same method), as it is responsible for including all the library files that the other scripts rely on. It seems like that probably is installed though, on account of the error.

You can double-check if it's installed by going to Options → Show REAPER resource path in explorer/finder, navigating to the UserPlugins folder, and checking if there is a plug-in called something like "reaper_gutilitiesapi-...".

If that doesn't work, there may be a platform incompatibility. In that case, would you mind letting me know what platform you are on?
__________________
Linktree | Donation
guonaudio is offline   Reply With Quote
Old 01-29-2024, 06:27 PM   #6
lachinhan
Human being with feelings
 
lachinhan's Avatar
 
Join Date: Nov 2014
Location: Can Tho - Viet Nam
Posts: 305
Default

Quote:
Originally Posted by guonaudio View Post
Hey~ That error means that the "reaper_gutilitiesapi" plug-in isn't installed. If restarting Reaper doesn't fix the issue, it might mean that you haven't installed the dependencies in ReaPack.

To install it, go to Extensions → ReaPack → Browse Packages, and type GUtilitiesAPI in the Filter. Right-click and select install. Once installed, you should see a little "i" to the left of the package name. You should also install "GUtilities scripts config" if it isn't installed (following the same method), as it is responsible for including all the library files that the other scripts rely on. It seems like that probably is installed though, on account of the error.

You can double-check if it's installed by going to Options → Show REAPER resource path in explorer/finder, navigating to the UserPlugins folder, and checking if there is a plug-in called something like "reaper_gutilitiesapi-...".

If that doesn't work, there may be a platform incompatibility. In that case, would you mind letting me know what platform you are on?
I reinstalled and everything worked, thank you
__________________
NK Recording Studio
Email: lachinhan@gmail.com or admin@thuamninhkieu.com
Website:nkpro.top and ntmusicpro.com
lachinhan 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 10:21 PM.


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