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

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

Video (v1.02):


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’).
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 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.
Script Release Notes:

-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.
-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
-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.
-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, 35 views)

Last edited by Dafarkias; 09-15-2019 at 01:50 PM. Reason: N/A
Dafarkias is offline   Reply With Quote