view id V1 string "Found!\nRed = Don't play string.\nGreen = Play string open.\nYellow = Fret string as shown.\nBasefret = lowest fret of the chord fingering.\nWait until this text changes before inputing another chord!"
if line.i = "" then leave
parse var line.i chord.i '[' fret.i ']'
end
call close('ch')
shft = 0
do k = 1 to i-1
fret = fret.k
call notefind
call base
if basefret > 1 then shft = basefret-1
text id TG||k label basefret
if k = 1 then ide = "L"
if k = 2 then ide = "M"
if k = 3 then ide = "N"
ch = ""
do j = 1 to 6
note = word(fret,j)
if basefret > 1 then if (upper(note) ~= "X" & upper(note) ~= "0") then note = note-shft
if upper(note) ~= "X" then ident = ide||note||j
if upper(note) = "X" then ident = ide||"0"||j
if upper(note) = "0" then object class "TWFmultiLED.mcc" id ident ATTRS MUIA_TWFmultiLED_Colour MUIV_TWFmultiLED_Colour_OK
if upper(note) = "X" then object class "TWFmultiLED.mcc" id ident ATTRS MUIA_TWFmultiLED_Colour MUIV_TWFmultiLED_Colour_Panic
if upper(note) > 0 & upper(note) < 15 then object class "TWFmultiLED.mcc" id ident ATTRS MUIA_TWFmultiLED_Colour MUIV_TWFmultiLED_Colour_Error
ch = ch note
end
end
address command 'delete' "ram:found" 'quiet'
address command 'wait 5'
view id V1 string "Type the name of the chord you want to see in the 'search chord' input field. Up to 3 fingerings will be shown, depending on the chord."