czardas Posted November 9, 2012 Share Posted November 9, 2012 (edited) Having had hardly any time to work any of my ongoing major projects in the last several months, this is the first code I've written in ages. It's really for my own personal use, but thought it might interest some guitarists (there is nothing fancy in the code). Please be careful.Instructions For UseIf you are a beginner then this program may not be for you.Only focus on the three and four note linear patterns and get a teacher.Do not attempt to practise any of these exercises if you experience any discomfort or pain.This is an advanced (weekly) exercise program and not a guitar lesson.I am not responsible for any injuries caused by bad technique.The linear patterns and alternating shapes are relevant to all guitarists.The arpeggios are relevant to classical flamenco and finger-style guitarists.Only the first eight notes are given to each sequence.It is necessary that the sequences be repeated on every string and at every fret position.It is best to shift one fret or string at a time.The three note linear patterns are useful in that they present a challenge to the right hand.You must alternate index and middle finger rest strokes (or use alternating up and down pick strokes).First practice this without the left hand (it's tricky).The three note patterns will always neglect one left hand finger.This neglect is counter-balanced in the five note linear patterns.The same equal overall distribution is also applied to the right hand arpeggio fingerings.Before attempting any of the arpeggios in the program, first study four note arpeggios.Spend a few months practising the six standard patterns Pima, Pami, Pmia, Piam Pmai, PaimThe arpeggios are to be repeated with a variety of bass note sequences (you can invent your own).It is best to keep the left hand as simple as possible when practising arpeggios.I use a diminished chord shape and slide up or down one fret after each full rendition.Run this program once every 7 to 10 days and spend 10 to 20 minutes per day repeating the generated exercises.expandcollapse popup#include <Array.au3> #include <String.au3> Dim $sGuitarProgram = _GuitarProgram() ConsoleWrite(@CRLF & $sGuitarProgram) Func _GuitarProgram() ; Three notes per string - linear patterns Local $aThreeSeq[2][4] = [ _ ["231","241","341","342"], _ ["312","412","413","423"]] ; Four notes per string - linear patterns Local $aFourSeq[9] = [ _ "1243","1324","1342", _ "1423","2413","2134", _ "2143","2314","3124"] ; Five notes per string - linear patterns Local $aFiveSeq[8][4] = [[7,4,4,7], _ ["14342","13243","12423","12413"], _ ["14243","13423","21324","13412"], _ ["24314","23143","21423","14312"], _ ["24134","23134","23124","14213"], _ ["24143", "", "","21314"], _ ["34124", "", "","21413"], _ ["34214", "", "","31214"]] ; Alternating Shapes - effective combinations Local $aAltShape[48] = [ _ "12342143","13423214","21341243","24314213", _ "12342413","13423124","21341423","24314123", _ "12343142","13424213","21431234","24131234", _ "12343412","13424123","21431324","24131324", _ "12432134","14323214","23141243","32412134", _ "12432314","14323124","23141423","32412314", _ "12434312","14324213","23413214","31421234", _ "12434132","14324123","23413124","31421324", _ "13242143","14232134","23414213","34121234", _ "13242413","14232314","23414123","34121324", _ "13243142","14234312","24313214","34212134", _ "13243412","14234132","24313124","34212314"] ; Five stroke arpeggios Local $aFiveArp[5][3] = [[4,2,4], _ ["Pimia","Pmiam","Piama"], _ ["Piaim","Pmaim","Pmaia"], _ ["Pmiai", "","Pamai"], _ ["Paimi", "","Paiam"]] ; Six stroke arpeggios Local $aSixArp[4][3] = [[3,2,3], _ ["Pmiama","Piamai","Pimiam"], _ ["Pmaiam","Paimia","Pmiaim"], _ ["Pamaim", "","Pmaimi"]] ; Seven stroke arpeggios Local $aSevenArp[6] = ["Pimiama","Piamaim","Pmiamai","Pmaimia","Pamaimi","Paimiam"] ; With each exercise program, no finger will be neglected. Local $aExercise[7] ; Random selection of exercises $iTemp = Random(0,3,1) $aExercise[0] = $aThreeSeq[Random(0, 1, 1)][$iTemp] $aExercise[1] = $aFourSeq[Random(0, 8, 1)] $aExercise[2] = $aFiveSeq[Random(1, $aFiveSeq[0][$iTemp], 1)][$iTemp] $aExercise[3] = $aAltShape[Random(0, 47, 1)] $iTemp = Random(0,2,1) $aExercise[4] = $aFiveArp[Random(1, $aFiveArp[0][$iTemp], 1)][$iTemp] $aExercise[5] = $aSixArp[Random(1, $aSixArp[0][$iTemp], 1)][$iTemp] $aExercise[6] = $aSevenArp[Random(0, 5, 1)] ; The selection of finger patterns are based on the most effective combinations For $i = 0 To 3 If Random(0,1,1) Then $aExercise[$i] = _StringReverse($aExercise[$i]) Next ; Tablature code Local $aFormat[7] = ["11122233","11112222","11111222","43214321","","",""] $aFormat[4] = "6" & StringRight($aExercise[4], 4) & "5" & StringMid($aExercise[4], 2, 2) $aFormat[5] = "6" & StringRight($aExercise[5], 5) & "5" & StringMid($aExercise[5], 2, 1) $aFormat[6] = "6" & StringRight($aExercise[6], 6) & "5" ; Associate RH fingering with strings For $i = 4 To 6 $aFormat[$i] = StringReplace($aFormat[$i], "i", "3") $aFormat[$i] = StringReplace($aFormat[$i], "m", "2") $aFormat[$i] = StringReplace($aFormat[$i], "a", "1") Next ; Only the first eight notes of each sequence are given For $i = 0 To 6 $aExercise[$i] = _StringModalSelect($aExercise[$i], 0, 8) Next ; Headings Local $aDescription[7] = _ [" Three Note Sequence", _ " Four Note Sequence", _ " Five Note Sequence", _ " Alternating Chord Shapes", _ " Five Stroke Arpeggio", _ " Six Stroke Arpeggio", _ " Seven Stroke Arpeggio"] Local $sRet = "" ; Return string For $i = 0 To 6 ; For each exercise $sRet &= $aDescription[$i] & @CRLF For $j = 1 To 6 ; For each string $sRet &= " " ; Add padding For $k = 1 To 8 ; For each format instruction If StringMid($aFormat[$i], $k, 1) = $j Then $sRet &= Chr(151) & Chr(151) & StringMid($aExercise[$i], $k, 1) ; Place fingering Else $sRet &= Chr(151) & Chr(151) & Chr(151) ; Leave empty EndIf Next $sRet &= Chr(151) & Chr(151) & @CRLF ; Next string Next $sRet &= @CRLF Next Return $sRet EndFunc Func _StringModalSelect($sString, $iShift = 0, $iChars = 1) ; Taken from Modal UDF If $sString = "" Or (Not IsString($sString)) Then Return SetError(1, 0, "") If Not IsInt($iShift) Then Return SetError(2, 0, "") If (Not IsInt($iChars)) Or $iChars <= 0 Then Return SetError(3, 0, "") ; Get the current position of the first character for the new string Local $iStringLen = StringLen($sString) $iShift = Mod($iShift, $iStringLen) If $iShift >= 0 Then $iStart = $iShift +1 Else $iStart = $iStringLen +$iShift +1 EndIf Local $iEnd = $iStart +$iChars -1 ; Get the projected end character position If $iEnd <= $iStringLen Then Return StringMid($sString, $iStart, $iChars) ; The return string is contained within the original string Else $sTemp = $sString For $i = 1 To Int($iEnd/$iStringLen) -1 $sTemp &= $sString ; repeat the modal string loop as required Next $sTemp = StringTrimLeft($sTemp, $iStart -1) ; remove surplus leading chars Return $sTemp & StringLeft($sString, Mod($iEnd, $iStringLen)) ; Add the final character sequence EndIf EndFunc ;==> _StringModalSelect Edited November 9, 2012 by czardas Xandy 1 operator64Â Â ArrayWorkshop Link to comment Share on other sites More sharing options...
guinness Posted November 9, 2012 Share Posted November 9, 2012 Very nice. Nothing more to add. czardas 1 UDF List:  _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
czardas Posted November 9, 2012 Author Share Posted November 9, 2012 (edited) Thanks guiness. I'm not sure if anyone will use it besides myself, but someone might want to use the idea and maybe adapt it to suit their own technical requirements. There was small a mistake in the code, which I have now fixed. Anyone trying this must realise that the patterns are not based on music, but rather they are geared towards finger dexterity, independance, muscle memory and stamina; It is also important to realise that progress takes place slowly and over long periods of regular practice. Edited November 14, 2012 by czardas operator64Â Â ArrayWorkshop Link to comment Share on other sites More sharing options...
JohnOne Posted November 9, 2012 Share Posted November 9, 2012 Not much to say right now except it's a great idea and one of my grandchildren is into strings, so will be checking this out. Thanks for share. AutoIt Absolute Beginners  Require a serial  Pause Script  Video Tutorials by Morthawt  ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
czardas Posted November 9, 2012 Author Share Posted November 9, 2012 (edited) Thanks John. Make sure they get a local teacher - seriously. The exercises are not progressive and some are quite difficult. For younger players, the first three exercises (linear patterns played along one string) are best to practise first. With good professional advice about technique, these exercises should speed up development. With bad technique, they won't be as effective and may possibly cause muscle damage. I can't overemphasize the importance of this. Edited November 9, 2012 by czardas operator64Â Â ArrayWorkshop Link to comment Share on other sites More sharing options...
czardas Posted November 12, 2012 Author Share Posted November 12, 2012 (edited) This has been driving me barmy all day. Missing from the exercises above are ligados (hammer ons and pull offs). The criteria for generating these patterns turns out to be more complicated. There are 12 possible finger pair combinations selecting from four fingers 1-2, 1-3, 4-2 etc... The ligados are split into sets of two or three fingers, and wherever possible each subsequent set must begin (sequentially) with the final finger of the previous set. (1-4) (4-3). The first finger of the fisrt set must always be different from the final finger of the last set: to accomodate a smooth transtion between strings when you repeat the exercise. I decided to spread the 12 finger combinations over four exercise patterns each containing 3 different combinations. At each random selection, the number of remaining patterns varies due to the complicated rules. Finally the last three finger combination pairs can not generally be arranged sequentially as described above, although certain selections will allow this. The code is rough and ready. expandcollapse popup#include <Array.au3> #include <String.au3> _Ligados() Func _Ligados() Local $aPatterns = _GetLigados() _ArraySwap($aPatterns[2], $aPatterns[0]) _ArraySwap($aPatterns[2], $aPatterns[1]) For $i = 0 To 3 Step 3 $aPatterns[$i] = Chr(151) & $aPatterns[$i] & _StringRepeat(Chr(151), 7) & @CRLF & _ " " & _StringRepeat(Chr(151), 19) & StringLeft($aPatterns[$i], 6) & Chr(151) Next For $i = 1 To 2 $aPatterns[$i] = Chr(151) & $aPatterns[$i] & _StringRepeat(Chr(151), 10) & @CRLF & _ " " & _StringRepeat(Chr(151), 16) & StringLeft($aPatterns[$i], 9) & Chr(151) Next Local $aDescription[4] = _ [" Sequential Ligados", _ " Double + Single Ligados", _ " Single + Double Ligados", _ " Random Ligado Sequence"] Local $s3To6 = "" For $i = 3 To 6 $s3To6 &= " " & _StringRepeat(Chr(151), 26) & @CRLF Next Local $ret = "" For $i = 0 To 3 $ret &= $aDescription[$i] & @CRLF $ret &= " " & $aPatterns[$i] & @CRLF & $s3To6 & @CRLF Next ConsoleWrite($ret) EndFunc ;==> _Ligados Func _GetLigados() Local $aLig3[72][2] = _ [["1213",11],["1214",13],["1232",145],["1234",273],["1242",1057],["1243",2081], _ ["1312",67],["1314",70],["1323",146],["1324",162],["1342",1282],["1343",2306], _ ["1412",517],["1413",518],["1423",1044],["1424",1060],["1432",2180],["1434",2308], _ ["2123",25],["2124",41],["2131",74],["2134",266],["2141",524],["2143",2060], _ ["2321",152],["2324",176],["2313",82],["2314",84],["2341",784],["2343",2320], _ ["2421",1064],["2423",1072],["2413",546],["2414",548],["2431",2144],["2434",2336], _ ["3231",208],["3234",400],["3212",137],["3214",140],["3242",1184],["3241",672], _ ["3132",194],["3134",322],["3121",73],["3124",97],["3142",1092],["3141",580], _ ["3432",2432],["3431",2368],["3421",1288],["3424",1312],["3412",769],["3414",772], _ ["4243",3104],["4241",1568],["4232",1168],["4231",1104],["4212",1033],["4213",1034], _ ["4342",3328],["4341",2816],["4323",2192],["4321",2184],["4312",2113],["4313",2114], _ ["4142",1540],["4143",2564],["4123",529],["4121",521],["4132",642],["4131",578]] Local $aPatterns[4] $iTemp = Random(0, 71, 1) $aPatterns[0] = $aLig3[$iTemp][0] $iLigFlag = $aLig3[$iTemp][1] $idx = 27 For $i = 1 To 4 If StringInStr($aLig3[$iTemp][0], $i, 0, 2) Then $idx += 4 Next Local $aTemp[$idx][2] _GetRemainingPatterns($aTemp, $idx, $aLig3, $iLigFlag) $aLig3 = $aTemp $iTemp = Random(0, UBound($aLig3) -1, 1) $aPatterns[1] = $aLig3[$iTemp][0] $iLigFlag = $aLig3[$iTemp][1] _GetRemainingPatterns($aTemp, $idx, $aLig3, $iLigFlag) ReDim $aTemp [$idx][2] $aPatterns[2] = $aTemp[Random(0, $idx -1, 1)][0] Local $aSelect[12] = ["12","13","14","21","23","24","31","32","34","41","42","43"] For $i = 11 To 0 Step -1 For $j = 0 To 2 If StringInStr($aPatterns[$j], $aSelect[$i]) Then _ArrayDelete($aSelect, $i) ExitLoop EndIf Next Next $aSelect = _ArrayPermute($aSelect) For $i = 6 To 1 Step -1 If StringLeft($aSelect[$i], 1) = StringRight($aSelect[$i], 1) Then _ArrayDelete($aSelect, $i) $aSelect[0] -= 1 EndIf Next $aPatterns[3] = $aSelect[Random(1, $aSelect[0], 1)] $aPatterns[0] = "(" & StringLeft($aPatterns[0], 3) & ")(" & StringRight($aPatterns[0], 2) & ")" $aPatterns[1] = "(" & StringLeft($aPatterns[1], 2) & ")(" & StringRight($aPatterns[1], 3) & ")" $aPatterns[2] = "(" & StringLeft($aPatterns[2], 2) & ")(" & StringMid($aPatterns[2], 2, 2) & ")(" & StringRight($aPatterns[2], 2) & ")" $aPatterns[3] = "(" & StringLeft($aPatterns[3], 2) & ")(" & StringMid($aPatterns[3], 3, 2) & ")(" & StringRight($aPatterns[3], 2) & ")" For $i = 0 To 3 $aPatterns[$i] = StringRegExpReplace($aPatterns[$i], "[1|2|3|4]", "$0" & Chr(151) & Chr(151)) $aPatterns[$i] = StringReplace($aPatterns[$i], Chr(151) & Chr(151) & ")", ")") Next Return $aPatterns EndFunc ;==> _GetLigados Func _GetRemainingPatterns(ByRef $aTemp, ByRef $idx, $aLig3, $iLigFlag) $idx = 0 For $i = 0 To UBound($aLig3) -1 If Not BitAND($aLig3[$i][1], $iLigFlag) Then $aTemp[$idx][0] = $aLig3[$i][0] $aTemp[$idx][1] = $aLig3[$i][1] $idx += 1 EndIf Next EndFunc ;==> _GetRemainingPatterns Edited November 12, 2012 by czardas operator64Â Â ArrayWorkshop Link to comment Share on other sites More sharing options...
czardas Posted November 13, 2012 Author Share Posted November 13, 2012 (edited) I started this training today. I thought I'd post the generated set so you can see what it produces. This is the first set of exercises ever printed (possibly ever created using this method). Week 1 expandcollapse popupExercise Program - Tue 13 Nov 2012 Three Note Sequence Four Note Sequence ——4——2——3————————————————— ——3——1——2——4—————————————— ———————————4——2——3———————— ——————————————3——1——2——4—— ————————————————————4——2—— —————————————————————————— —————————————————————————— —————————————————————————— —————————————————————————— —————————————————————————— —————————————————————————— —————————————————————————— Five Note Sequence Alternating Chord Shapes ——3——1——4——1——2——————————— ———————————3———————————1—— —————————————————3——1——4—— ————————1———————————3————— —————————————————————————— —————2———————————4———————— —————————————————————————— ——4———————————2——————————— —————————————————————————— —————————————————————————— —————————————————————————— —————————————————————————— Five Stroke Arpeggio Six Stroke Arpeggio ——————————————a——————————— ———————————a—————a———————— ————————m——————————————m—— —————m————————m————————m—— —————i—————i————————i————— ————————i————————————————— —————————————————————————— —————————————————————————— —————————————————P———————— ————————————————————P————— ——P——————————————————————— ——P——————————————————————— Seven Stroke Arpeggio Sequential Ligados ———————————a—————a———————— —(3——1)(1——4)(4——2)——————— —————m————————m——————————— ———————————————————(3——1)— ————————i———————————i————— —————————————————————————— —————————————————————————— —————————————————————————— ———————————————————————P—— —————————————————————————— ——P——————————————————————— —————————————————————————— Double + Single Ligados Single + Double Ligados —(3——4——3)(3——2)—————————— —(2——1)(1——2——4)—————————— ————————————————(3——4——3)— ————————————————(2——1)(1—— —————————————————————————— —————————————————————————— —————————————————————————— —————————————————————————— —————————————————————————— —————————————————————————— —————————————————————————— —————————————————————————— Random Ligado Sequence —(2——3)(1——3)(4——1)——————— ———————————————————(2——3)— —————————————————————————— —————————————————————————— —————————————————————————— —————————————————————————— Edited November 13, 2012 by czardas operator64  ArrayWorkshop Link to comment Share on other sites More sharing options...
Chimaera Posted November 13, 2012 Share Posted November 13, 2012 (edited) It looks mad but interesting Well done for something new and different Edited November 13, 2012 by Chimaera czardas 1 If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now