I've now completed a major hardware upgrade including a game-changing 32" 4K monitor* and am tinkering (this time) with a chord aide-mémoire (some might remember the exotic chord namings I was playing with a couple of years ago). This time I'm trying to nail down so called voicings to incorporate into a bash script. A randomly selected note/mood would pop up to prompt for a given chord to be played. Some chords remain out of bounds for lack of interest and some for lack of fingers to do them but there still remains a fairly rich field of possibilities.
So for B as an example with D-Tuning the shapes I can manage are these 3:
- A shape with root on string 3 (fret6)
- F shape with root on string 4 (fret11)
- C shape with root on string 5 (fret4)
The random pop-up in the above F case would just say "B 4" meaning a B (major) with root on string 4. The prompt would wait a user-settable number of seconds and then morphe into the full color chord diagram with the fret number and an audio sample. I've done something similar with my jam videos in folder 'jam-tracks'
Code: Select all
#!/bin/bash
# repopulate promt directory from standard
cp /0/data/music/chordquiz/promptsrc/* /0/data/music/chordquiz/prompt
directory_path="/0/data/music/chordquiz/prompt"
while [ "$(ls -A "$directory_path")" ]
do
cd /0/data/music/chordquiz/prompt
array=( * ) #make new array from directory contents
#
#echo "${array[@]}" # will dump all elements of the array
size=${#array[@]} # assign size of array to variable 'size'
rfromsize=$(($RANDOM % size)) # # Pick an array element, rfromsize WAS 'index'before
echo $rfromsize $size > ~/r1-size1.txt
longelement=${array[$rfromsize]}
element=${longelement::-4} # remove (.png) extension extension from longelement to make element
#
# SHOW the PROMT image for element:
###################################
feh -x -g 540x924+1500+500 --zoom 300 /0/data/music/chordquiz/prompt/$element.png &
pid=$! # get pid of THIS command now backgrnd process
sleep 1s # wait X seconds
kill $pid # close this pid
#
# show image 2 of element:
feh -x -g 540x1596+1500+300 --zoom 300 /0/data/music/chordquiz/diags/$element.png &
pid2=$! # get pid of THIS command now backgrnd process
sleep 10s # wait X seconds
#
# LOOP the mp3 XY times while still showing image 2 of element
#mpg123 --loop 3 /0/data/music/chordquiz/mp3/$element.mp3
# only have the 1 mp3 so far
#mpg123 --loop 3 /0/data/music/chordquiz/mp3/B_3.mp3
pid3=$! # get pid of THIS command now backgrnd process
kill $pid # close this pid
kill $pid2 # close this pid
kill $pid3 # close this pid
#
# remove file from prompt directory
rm /0/data/music/chordquiz/prompt/"$longelement"
done
exit
Problem with the above is that it WORKS with brute force and uneklegantly because my bash skills are short of poor and re-remembering do it it Perl would take weeks.
Is the string # for root note enough to uniquely identify the (guitar) voicing or can there be several voicings with the root on the same string (AFAIK the root is always the lowest note in the subject triad in the chord)? What would generic (any instrument) voicings be called?
- There's a sweet-spot for monitor size/resolution and if I want to be working at my desk with the chair rolled back a couple of feet to make room for a guitar in front of me then such a monitor works out pretty good.