NWC 2.75+ is required.
-- rg_MasterTune.lua ver 1.0 <http://nwsw.net/-f9239>
-- This NWC user tool can be used to set the Master Tuning.
-- Playing the Song it creates alters the Master Tuning.
-- The change affects all windows for the current NWC session.
-- Options: Returns File Text [x], Prompts for User Input [x]
local msg = 'Enter new tuning in semitones'
local opt = nwcut.prompt(msg, '#[-12,12]', 0)
if opt then
local userObj = '|User|MIDIParm.nw|LSB:2|DataMSB:' .. opt + 64
for _, channel in ipairs{1,2,3,4,5,6,7,8,9,11,12,13,14,15,16} do
nwcut.writeline('|AddStaff')
nwcut.writeline('|StaffProperties|Channel:' .. channel)
nwcut.writeline(userObj)
end
end
See: MIDI Non-Registered (and Registered) Parameters for some idea of why this works