Fixed the issue with space and enter not working to advance notes. Thanks @mwtab@2mb.social. Added 12 string for both 1 step down adn standard tunings. Added Mandolin.
This commit is contained in:
		
							
								
								
									
										12
									
								
								bashtuner.sh
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								bashtuner.sh
									
									
									
									
									
								
							| @@ -8,13 +8,18 @@ declare -A tuning=( | ||||
|   [6d]="D2 G2 C3 F3 A3 D4" | ||||
|   # Standard tuning | ||||
|   [6e]="E2 A2 D3 G3 B3 E4" | ||||
|   # 12 string dropped 1 step. | ||||
|   [12d]="D2 D3 G2 G3 C3 C4 F3 F4 A3 D4" | ||||
|   # 12 string standard tuning | ||||
|   [6e]="E2 E3 A2 A3 D3 D4 G3 G4 B3 E4" | ||||
|   # Mandolin | ||||
|   [mandolin]="G3 D4 A4 E5" | ||||
| ) | ||||
|  | ||||
| show_help() { | ||||
|   echo "Usage: $0 tune_id" | ||||
|   echo "Where tune_id is one of" | ||||
|   echo "${!tuning[@]}" | ||||
|   echo "To advance to the next note, press any letter, enter and space do not work." | ||||
| exit 0 | ||||
| } | ||||
|  | ||||
| @@ -29,10 +34,13 @@ exit 0 | ||||
| timeout=2 | ||||
| for i in ${tuning[$1]} ; do | ||||
|   unset continue | ||||
|   ifs="$IFS" | ||||
|   IFS="" | ||||
|   while [[ -z "$continue" ]]; do | ||||
|     ps $notePID &> /dev/null && kill $notePID &> /dev/null | ||||
|     play -qnV0 synth $timeout pl $i & | ||||
|     notePID="$!" | ||||
|     read -sn1 -t $timeout continue | ||||
|     read -sN1 -t $timeout continue | ||||
|   done | ||||
|   IFS="$ifs" | ||||
| done | ||||
|   | ||||
		Reference in New Issue
	
	Block a user