Old 02-24-2022, 01:10 AM   #1
Six
Human being with feelings
 
Six's Avatar
 
Join Date: Jan 2012
Posts: 18
Default DockTuner - Dockable Tuner UI

DockTuner - Dockable Tuner UI
  • Floating or Dockable window
  • Fixed reference frequency of A=440
  • Infinitely scalable UI, from big blocky boi to sliver of light and still readable
  • UI automatically connects to first detected and active DockTuner JSFX instance


DockTuner is a JSFX plugin that detects frequency and a Lua script that draws the dockable UI. The UI docks at the top of the screen by default.

The UI script was written almost entirely from scratch with the exception of the code for right click context menu which was borrowed from the Track FFT script by Heda here

The JSFX frequency detector is the old JS: Meters Tuner plugin from this thread

The tuner is quite usable on guitars but there is some jitter. Maybe the reaper devs can give us an API call for the frequency detection that ReaTune uses ;-D


Typical Usage:
  • Put DockTuner JSFX on your guitar track and run the DockTuner lua script

Fancy Usage:
Let's assume we are going to record some guitars through hardware input 4
  • Create a new track and label it "TUNER"
  • Right click the record arm button and set the input to Input 4
  • Right click the record arm button and select "Record: disable (input monitoring only)
  • Open the routing options for the track and uncheck "Master Send", we don't need to hear this track
  • Add the DockTuner JSFX plugin to the track and run the DockTuner lua script
  • Arm the track

TODO:
  • Add variable reference pitch
  • Sweet talk the REAPER devs into giving us an API call to the algorithm that ReaTune uses
  • Improve or rewrite the frequency detector to smooth output
  • Option to put the UI to sleep during playback/recording/low input levels

Installation:
Do Options > Show REAPER resource path in explorer/finder... to open the REAPER resource folder

DockTuner UI lua script - Put this file in the scripts folder
https://stash.reaper.fm/v/43892/DockTuner.lua


DockTuner JSFX frequency detector - Put this file somewhere in the Effects folder or one of its subfolders
https://stash.reaper.fm/v/43891/DockTuner


BugFixes:
  • 2022-02-24 - Removed a call to reaper.ShowConsoleMsg() that was being used for debugging right click menu.
  • 2022-02-24 - Fix error on load if track count is zero







Last edited by Six; 02-24-2022 at 03:11 PM. Reason: Added usage detail
Six is offline   Reply With Quote
Old 02-24-2022, 01:17 AM   #2
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,334
Default

You didn't like my solution? Anyway, congratulations!
By the way, you don't need anything to add to the script for docking, if it is already has gfx window. Just right-click the titlebar and Dock.
vitalker is offline   Reply With Quote
Old 02-24-2022, 01:26 AM   #3
Six
Human being with feelings
 
Six's Avatar
 
Join Date: Jan 2012
Posts: 18
Default

Quote:
Originally Posted by vitalker View Post
You didn't like my solution? Anyway, congratulations!
By the way, you don't need anything to add to the script for docking, if it is already has gfx window. Just right-click the titlebar and Dock.

Thanks! I do like your solution actually lol. I have some ideas for how I might use that to build on (close all compressors, close all FX for guitar tracks etc). I was just bent on having a super low profile tuner and also needed a coding project.

The context menu was more of a "hey neat" sort of thing to allow extending options later without cluttering the UI. Also made debugging a lot easier.
__________________
DockTuner - Dockable Tuner
Six is offline   Reply With Quote
Old 02-24-2022, 01:40 AM   #4
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,334
Default

Quote:
Originally Posted by Six View Post
Thanks! I do like your solution actually lol. I have some ideas for how I might use that to build on (close all compressors, close all FX for guitar tracks etc). I was just bent on having a super low profile tuner and also needed a coding project.
It's also possible to search a substring, so any FX that has, for example, compressor in name won't be closed.
vitalker is offline   Reply With Quote
Old 02-24-2022, 02:04 PM   #5
User41
Human being with feelings
 
Join Date: Aug 2020
Posts: 243
Default

I downloaded this file and put it in my Effects/Scripts folder (under Utility and alongside many other JSFX plugins) but I can't find it in the Reaper FX browser.

DockTuner JSFX frequency detector
https://stash.reaper.fm/v/43891/DockTuner


Any ideas on what I am missing?
User41 is offline   Reply With Quote
Old 02-24-2022, 02:08 PM   #6
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,334
Default

Quote:
Originally Posted by User41 View Post
I downloaded this file and put it in my Effects/Scripts folder (under Utility and alongside many other JSFX plugins) but I can't find it in the Reaper FX browser.

DockTuner JSFX frequency detector
https://stash.reaper.fm/v/43891/DockTuner


Any ideas on what I am missing?
Why do you put it into Scripts folder? It should be in [Options->Show Reaper path]/Effects folder.
vitalker is offline   Reply With Quote
Old 02-24-2022, 02:59 PM   #7
Six
Human being with feelings
 
Six's Avatar
 
Join Date: Jan 2012
Posts: 18
Default

Quote:
Originally Posted by User41 View Post
I downloaded this file and put it in my Effects/Scripts folder (under Utility and alongside many other JSFX plugins) but I can't find it in the Reaper FX browser.

DockTuner JSFX frequency detector
https://stash.reaper.fm/v/43891/DockTuner


Any ideas on what I am missing?

The DockTuner file should go in the somewhere in the Effects folder as Vitalker suggests and is added to the track FX like any other plugin. I tested putting the file in the Utilities subfolder on my system and it does show up for me. You may need to scan for new plugins for it to show up in the FX browser. You can either press F5 to do that or go "FX > Scan for new plugins" from the FX browser window.

The DockTuner.lua file should go in the scripts folder and can be started from the "Actions > Show action list..." menu

It's not ideal to have the plugin in two parts but it's the only method I could find to allow the UI to be docked since we cannot embed or call a lua script from a JSFX plugin and cannot process samples or detect frequency from lua as far as I know.
__________________
DockTuner - Dockable Tuner
Six is offline   Reply With Quote
Old 02-25-2022, 06:14 AM   #8
User41
Human being with feelings
 
Join Date: Aug 2020
Posts: 243
Default

Thank you. I was able to get it to work. I had some older reaper effects folders for some reason but was able to use "find resource path" to locate the correct folder.
User41 is offline   Reply With Quote
Old 04-05-2022, 08:53 AM   #9
JonLinnarson
Human being with feelings
 
JonLinnarson's Avatar
 
Join Date: Jul 2020
Posts: 725
Default

I have the opposite problem where Reaper finds the JSFX just fine, but it doesn't see the LUA file :S I have never encountered this problem before so I have no idea what to do about it.
JonLinnarson is offline   Reply With Quote
Old 04-09-2022, 12:57 PM   #10
JonLinnarson
Human being with feelings
 
JonLinnarson's Avatar
 
Join Date: Jul 2020
Posts: 725
Default

Managed to get it working by loading the script from New action>Load ReaScript Don't know why Reaper didn't automatically detect the script though. Weird.
JonLinnarson is offline   Reply With Quote
Old 05-06-2022, 09:51 AM   #11
grandfougue
Human being with feelings
 
grandfougue's Avatar
 
Join Date: Sep 2016
Posts: 513
Default

Hello The Track should be named with "TUNER" or TUNER Please ?
It work for internal signal ?
Select input 4 is a external audio in ?

Last edited by grandfougue; 05-06-2022 at 10:00 AM.
grandfougue is offline   Reply With Quote
Old 05-18-2022, 05:46 AM   #12
JonLinnarson
Human being with feelings
 
JonLinnarson's Avatar
 
Join Date: Jul 2020
Posts: 725
Default

Quote:
Originally Posted by Six View Post
[b][size=+1][*]Sweet talk the REAPER devs into giving us an API call to the algorithm that ReaTune uses[*]Improve or rewrite the frequency detector to smooth output
I was reminded of this today when I was testing this JS: https://stash.reaper.fm/v/30507/pitch-follower

He used the YIN algorithm for pitch detection, developed by IRCAM (Institute for Research and Coordination in Acoustics/Music). His pitch follower plug-in works great so if you are looking to update your pitch detection algorithm it's maybe something to look into?

Here's the PDF he referenced: http://recherche.ircam.fr/equipes/pc...2_JASA_YIN.pdf

Or maybe this wouldn't be a upgrade at all? It's way above my level of knowledge so I can't tell.
JonLinnarson 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 06:10 PM.


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