gists/string_tensions/run2.py
2018-10-11 16:45:37 +02:00

84 lines
1.3 KiB
Python
Executable file

#!/usr/bin/python
from strings import print_tensions
in_mm = 25.4
default_scale_length = 648/in_mm
sets = """
E standard (super light balanced)
E4 DAPL009
B3 DAPL012
G3 DAPL015
D3 DANW022
A2 DANW030
E2 DANW040
E standard (medium balanced)
E4 DAPL011
B3 DAPL015
G3 DAPL019
D3 DANW028
A2 DANW037
E2 DANW050
C standard (medium balanced)
C4 DAPL011
G3 DAPL015
D#3 DAPL019
A#2 DANW028
F2 DANW037
C2 DANW050
C standard (jazz medium)
C4 DAPL013
G3 DAPL017
D#3 DANW026
A#2 DANW036
F2 DANW046
C2 DANW056
C standard (CKS-G6-14-59mb)
C4 CKPL014
G3 CKPL019
D#3 CKHW025
A#2 CKHW033
F2 CKHW045
C2 CKHW059
B standard (CKS-G6-14-59mb)
B3 CKPL014
F#3 CKPL019
D3 CKHW025
A2 CKHW033
E2 CKHW045
B1 CKHW059
D standard drop C (medium balanced)
D4 DAPL011
A3 DAPL015
F3 DAPL019
C3 DANW028
G2 DANW037
C2 DANW050
"""
string_sets = {}
sets = sets+'\n\n'
title = None
for line in sets.splitlines():
if not line:
title = None
continue
if not title:
title = line
string_sets[title] = []
else:
note, string = line.split()
string_sets[title].append((note, string))
print('for a scale length of {:>5.2f} inches'.format(default_scale_length))
for name, strings in sorted(string_sets.items()):
print()
print('"{}"'.format(name))
print_tensions(strings, default_scale_length)