View Single Post
Old 06-09-2019, 01:48 PM   #1
Dafarkias
Human being with feelings
 
Dafarkias's Avatar
 
Join Date: Feb 2019
Location: Southern Vermont
Posts: 864
Default Dfk's Transient Guru (v1.1)

Disclaimer:
Test/use my scripts at your own risk. While it is atypical that a REAPER Lua script would damage or harm your hardware/software/data, I will not accept any liability if this were to occur. The download, installation, and operation of my scripting code and its structures are strictly an operative of free will, and signify an agreement to these terms. You are responsible for any damages that might occur, however unlikely. All my scripts are licensed as GPL v.3.

The script requires Reaper [5.978+], SWS/S&M [2.10.0+], and js_ReaScriptAPI [.987+].

Video (v1.02):



Goodies:

Accuracy:
Accuracy is the time-length of audio in samples used to formulate the average db and average frequency values. Left-click this button to set the "Accuracy" length to the length of your time selection. It is best to ensure this value is set large enough to maintain accurate transient detection, yet small enough to eliminate the possibility of reading transients that potentially may be nearby your stretch-markers (a.k.a., the ‘sweet spot’).
Threshold:
The threshold refers to the variable amount that each stretch-marker may differ from your chosen stretch-marker's average db or frequency (or else it will get removed!). For instance, a value of 10 threshold would mean that all stretch-markers within the workflow item must range within a multiplied variance of 10 in order to remain. Threshold defaults a 10000, which essentially just ensures that no stretch-markers are removed prior to a user deliberation.
Choose SM:
In order to select a stretch-marker, left-click the "Choose SM" button and hold: move your mouse over the desired stretch-marker inside your workflow item, and release.
[UP/DOWN] Keys:
These keys micro-adjust the threshold variable when the script window is focused. Focus the window simply by clicking inside the window, or on its title-bar.
Settings:
Settings contains three different options for calculation of/and stretch-marker removal.

1 (default): Calculation is based off both the average db and average frequency values.
2 (spectrum): Calculation is determined using only the average frequency data.
3 (volume): Calculation is determined using only the average db data.
Create Dyn. Midi:
Creates a MIDI track item and populates with midi notes correlating to stretch-marker data. These notes are velocity sensitive, and are PPQ accurate.
Extra Notes:
Right-click the "Threshold" value to adjust the db threshold used to calculate average frequency.

Right-click the "Accuracy" value to manually input a positive integer accuracy value.

Shoutout to X-Raym for the portion of his code I used to figure out the frequency detection portion of this script. https://forum.cockos.com/showthread.php?t=213286
Release Log:
[v1.01]
-Altered algorithm for transient detection.
-Fixed issue where mouse would active buttons on the GUI even if window wasn't focused.
-Removed the ability to input "0" as an accuracy value (pointless, and caused errors.)
-Added support for stereo tracks.
-Added "Update SM's" button to the GUI.
-Added support for pre-stretched stretch-markers.
[v1.02]
-Added "average frequency" detection.
-Added 3 settings for stretch-marker filtration.
-Added shadows to GUI.
-Added maximum-limit for accuracy setting of 1-second of samples (typically 44100+).
-Bolstered "Help" documentation.
-Removed minor bugs.
-Removed all calls to Main_OnCommand.
-Removed stretch-marker "Slope" viewer-detail.
-Improved script speed/efficiency
[v1.03]
-Removed "Fingerprint" nonsense, replaced with factual content.
-Configured “out-of-bound” stretch-marker message only to show when applicable.
-Added an undo point at startup of script for renewing any undesired removal of stretch-markers.
-Bolstered "Help" documentation.
[v1.1]
-NEW FEATURE: "Create Dyn. Midi"
-Optimized script. Now handles multiple items/tracks simultaneously.
-Enhanced overall script speed.
Attached Files
File Type: lua Dfk's Transient Guru.lua (32.1 KB, 238 views)

Last edited by Dafarkias; 03-26-2020 at 03:44 AM. Reason: N/A
Dafarkias is offline   Reply With Quote