Yes that should be possible as the headroom is an observable value. This means you can attach a notifier to it so that when it changes you can change other value/s in renoise. The other values being the gainer volume amounts, in this case.
You will need to open the scripting editor in renoise, to get started:
-Go to renoise help menu
-Choose Show the Preferences Folder..
-Close renoise
-Open Config.XML from the preferences folder in notepad or a text editor
-Do an F3 search for: ShowScriptingDevelopmentTools
-Change this value to true and save the file and exit notepad.
-Open renoise and in the tools menu you should find an entry for Scripting Terminal Editor… should be there
-Click it
Here is the code of the script aswell which you will find in the terminal as you have it installed already, Its fairly simple in that it doesnt have an loops or conditional statements (if statements). It just calls API values and functions. I don`t know if you have any coding background and if any of that makes sense, but hopefully it can get you started.
--script adds a gainer at the beginning and the end of a DSP chain to drive it by the renoise
--set track headroom adjustment, then re-adjust for post track processing
--i.e. if the global headroom is -6dB the first gainer is + 6db and the second -6db
--keybinding
renoise.tool():add_keybinding {
name = "Global:Tools:Add Headroom Compensating Gainers",
invoke = function()add_gainers()
end
}
function add_gainers()
--song object
local song = renoise.song()
--first headroom compensating gainer inserted at pos 2 (track vol pan always at pos 1)
local gainer_device = song.selected_track:insert_device_at("Audio/Effects/Native/Gainer", 2)
gainer_device.display_name = "Headroom Boost"
--set volume 1/headroom
gainer_device:parameter(1).value = (1/song.transport.track_headroom) --math.lin2db
--hide volume slider in mixer
gainer_device:parameter(1).show_in_mixer = false
--minimize in DSP lane
gainer_device.is_maximized = false
--insert re-adjusting gainer to get pre track levels
local gainer_device_2 = song.selected_track:insert_device_at("Audio/Effects/Native/Gainer", #song.selected_track.devices + 1)
gainer_device_2.display_name = "Headroom Reset"
--set volume to (+) headroom
gainer_device_2:parameter(1).value = (song.transport.track_headroom) --math.db2lin
--hide volume slider in mixer
gainer_device_2:parameter(1).show_in_mixer = false
--minimize in DSP lane
gainer_device_2.is_maximized = false
end
By spam I guess you mean press repeatedly? It should remove “MON” each time. It seems to work ok here no matter how many presses or how quickly. Is this happening all the time or in a certain situation?
Regarding the scripting stuff - lovely, ta! I’ll begin down the brainache road shortly. I’d love to get into it. My coding background is rather patchy (ie, getting to chapter 7 of 50 in the C for idiots books and then getting bored and going back to making silly noises in various DAWs).
The Lua stuff/renoise permutation seems a bit more doable with my wetware, so who knows!
Regarding the MON spamming, yes I meant pressing it repeatedly. Hmm… seems to work fine now. Maybe it just needed a restart.
Will keep my eye on that though and see if I can find a repro.
No probs, yes it helps having a motivation of something useful for yourself at the end of the hard work. I hadn`t coded atall before scripting. Not saying it was easy learning but very satisfying to get some stuff in renoise working the way I wanted!
*** .\cas_additions.lua:114: attempt to perform arithmetic on local ‘num’ (a nil value)
*** stack traceback:
*** .\cas_additions.lua:114: in function ‘insert_send_dest’
*** .\cas_additions.lua:158: in function <.\cas_additions.lua:125>
v1.21
–added shortcut GTS Throw To Send, which takes the selected track DSP and puts it on a new send track. The DSP is replaced with a send device pointing to that new send track.
Yes. May i also suggest a preference dialogue where you can tick what menus you want to show. If you only install the tool for one sole purpose, you should be able to avoid adding what might be percieved as ‘clutter’ to that user.
Goto send track v1.21 sometimes produces the follow error message.
EDIT: This happens if I click on a send track.
'/Users/Ju/Library/Preferences/Renoise/V3.0.1/Scripts/Tools/ledger.scripts.GoToSendTrack.xrnx/main.lua' failed in one of its notifiers.
The notifier will be disabled to prevent further errors.
Please contact the author (Ledger) for assistance...
main.lua:233: attempt to index field '?' (a nil value)
stack traceback:
main.lua:233: in function 'get_send_pos_and_routing'
main.lua:410: in function 'add_menus'
main.lua:482: in function <main.lua:482>
Goto send track v1.21 sometimes produces the follow error message.
EDIT: This happens if I click on a send track.
'/Users/Ju/Library/Preferences/Renoise/V3.0.1/Scripts/Tools/ledger.scripts.GoToSendTrack.xrnx/main.lua' failed in one of its notifiers.
The notifier will be disabled to prevent further errors.
Please contact the author (Ledger) for assistance...
main.lua:233: attempt to index field '?' (a nil value)
stack traceback:
main.lua:233: in function 'get_send_pos_and_routing'
main.lua:410: in function 'add_menus'
main.lua:482: in function <main.lua:482>
Hi Jurek,
Does this happen in all songs or is it in a specific xrns?
This bug appears to be to do with the script trying to get the name of the send track and it not being existant or available. I have tried deleting and renaming sends but I can not reproduce it here, so any other conditions that you can whittle down would be helpful.