--[[------------------------------------------------------------------------- OctaveDoubling.nw.nwcut.lua Version 0.1 This tool will double all individual notes in the selection, converting them into a chord with a second note that is one octave lower. $NWCUT$CONFIG: ClipText $ --]]------------------------------------------------------------------------- local function filterProc(item) if item:IsFake() then return end if item:Is('Note') then local objPos = item:Get('Pos') local p2 = nwcNotePos.new(tostring(objPos)) p2.Position = p2.Position - 7 item.ObjType = 'Chord' objPos[2] = p2 end end nwcut.loadFile() :forSelection(filterProc) :save()