-- rg_ColorNotesMIDI.Lua ver 1.0 User Tool local map = {[0] = 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0} local playContext = nwcPlayContext.new() for item in nwcut.items() do for notepos in item:AllNotePositions() do notepos.Color = map[playContext:GetNoteMidiPitch(notepos) % 12] end playContext:put(item) nwcut.writeline(item) end