.
This commit is contained in:
parent
1fb3df1403
commit
115a30cc5b
2 changed files with 189 additions and 96 deletions
147
data.py
Normal file
147
data.py
Normal file
|
@ -0,0 +1,147 @@
|
||||||
|
# (product name, unit weight)
|
||||||
|
|
||||||
|
# D'Addario stock via http://www.daddario.com/upload/tension_chart_13934.pdf
|
||||||
|
# Circle K String stock http://circlekstrings.com/CKSIMAGES/UnitWeightChart130105.pdf
|
||||||
|
|
||||||
|
# Circle K strings lack offical names, so were given
|
||||||
|
|
||||||
|
daddario_plain_steel = (
|
||||||
|
('DAPL007' , .00001085),
|
||||||
|
('DAPL008' , .00001418),
|
||||||
|
('DAPL0085', .00001601),
|
||||||
|
('DAPL009' , .00001794),
|
||||||
|
('DAPL0095', .00001999),
|
||||||
|
('DAPL010' , .00002215),
|
||||||
|
('DAPL0105', .00002442),
|
||||||
|
('DAPL011' , .00002680),
|
||||||
|
('DAPL0115', .00002930),
|
||||||
|
('DAPL012' , .00003190),
|
||||||
|
('DAPL013' , .00003744),
|
||||||
|
('DAPL0135', .00004037),
|
||||||
|
('DAPL014' , .00004342),
|
||||||
|
('DAPL015' , .00004984),
|
||||||
|
('DAPL016' , .00005671),
|
||||||
|
('DAPL017' , .00006402),
|
||||||
|
('DAPL018' , .00007177),
|
||||||
|
('DAPL019' , .00007997),
|
||||||
|
('DAPL020' , .00008861),
|
||||||
|
('DAPL022' , .00010722),
|
||||||
|
('DAPL024' , .00012760),
|
||||||
|
('DAPL027' , .00014975),
|
||||||
|
)
|
||||||
|
|
||||||
|
daddario_nickle_wound = ( # XL
|
||||||
|
('DANW017' , .00005524),
|
||||||
|
('DANW018' , .00006215),
|
||||||
|
('DANW019' , .00006947),
|
||||||
|
('DANW020' , .00007495),
|
||||||
|
('DANW021' , .00008293),
|
||||||
|
('DANW022' , .00009184),
|
||||||
|
('DANW024' , .00010857),
|
||||||
|
('DANW025*', .00011875), # from the EXL110BT, an approximation
|
||||||
|
('DANW026' , .00012671),
|
||||||
|
('DANW028' , .00014666),
|
||||||
|
('DANW030' , .00017236),
|
||||||
|
('DANW032' , .00019347),
|
||||||
|
('DANW034' , .00021590),
|
||||||
|
('DANW036' , .00023964),
|
||||||
|
('DANW038' , .00026471),
|
||||||
|
('DANW039' , .00027932),
|
||||||
|
('DANW042' , .00032279),
|
||||||
|
('DANW044' , .00035182),
|
||||||
|
('DANW046' , .00038216),
|
||||||
|
('DANW048' , .00041382),
|
||||||
|
('DANW049' , .00043014),
|
||||||
|
('DANW052' , .00048109),
|
||||||
|
('DANW054' , .00053838),
|
||||||
|
('DANW056' , .00057598),
|
||||||
|
('DANW059' , .00064191),
|
||||||
|
('DANW060' , .00066542),
|
||||||
|
('DANW062' , .00070697),
|
||||||
|
('DANW064' , .00074984),
|
||||||
|
('DANW066' , .00079889),
|
||||||
|
('DANW068' , .00084614),
|
||||||
|
('DANW070' , .00089304),
|
||||||
|
('DANW072' , .00094124),
|
||||||
|
('DANW074' , .00098869),
|
||||||
|
('DANW080' , .00115011),
|
||||||
|
)
|
||||||
|
|
||||||
|
circle_k_plain = (
|
||||||
|
('CKPL008', .000014240),
|
||||||
|
('CKPL009', .000018022),
|
||||||
|
('CKPL010', .000022252),
|
||||||
|
('CKPL011', .000026925),
|
||||||
|
('CKPL012', .000032039),
|
||||||
|
('CKPL013', .000037605),
|
||||||
|
('CKPL014', .000043607),
|
||||||
|
('CKPL015', .000050050),
|
||||||
|
('CKPL016', .000056961),
|
||||||
|
('CKPL017', .000064300),
|
||||||
|
('CKPL018', .000072088),
|
||||||
|
('CKPL019', .000080360),
|
||||||
|
('CKPL020', .000089031),
|
||||||
|
('CKPL021', .000098155),
|
||||||
|
('CKPL022', .000107666),
|
||||||
|
('CKPL023', .000117702),
|
||||||
|
)
|
||||||
|
|
||||||
|
circle_k_hybrid_wound = (
|
||||||
|
('CKHW021', .000093873),
|
||||||
|
('CKHW022', .000103500),
|
||||||
|
('CKHW023', .000113985),
|
||||||
|
('CKHW024', .000124963),
|
||||||
|
('CKHW025', .000136054),
|
||||||
|
('CKHW026', .000144691),
|
||||||
|
('CKHW027', .000153146),
|
||||||
|
('CKHW028', .000161203),
|
||||||
|
('CKHW029', .000178551),
|
||||||
|
('CKHW031', .000198902),
|
||||||
|
('CKHW033', .000223217),
|
||||||
|
('CKHW035', .000249034),
|
||||||
|
('CKHW037', .000276237),
|
||||||
|
('CKHW039', .000304788),
|
||||||
|
('CKHW041', .000334965),
|
||||||
|
('CKHW043', .000366357),
|
||||||
|
('CKHW045', .000404956),
|
||||||
|
('CKHW047', .000447408),
|
||||||
|
('CKHW049', .000475438),
|
||||||
|
('CKHW051', .000512645),
|
||||||
|
('CKHW053', .000551898),
|
||||||
|
('CKHW055', .000584407),
|
||||||
|
('CKHW057', .000625704),
|
||||||
|
('CKHW059', .000679149),
|
||||||
|
('CKHW061', .000720293),
|
||||||
|
('CKHW063', .000765973),
|
||||||
|
('CKHW065', .000821116),
|
||||||
|
('CKHW067', .000870707),
|
||||||
|
('CKHW070', .000939851),
|
||||||
|
('CKHW073', .001021518),
|
||||||
|
('CKHW076', .001110192),
|
||||||
|
('CKHW079', .001188974),
|
||||||
|
('CKHW082', .001293598),
|
||||||
|
('CKHW086', .001416131),
|
||||||
|
('CKHW090', .001544107),
|
||||||
|
('CKHW094', .001677765),
|
||||||
|
('CKHW098', .001831487),
|
||||||
|
('CKHW102', .001986524),
|
||||||
|
('CKHW106', .002127413),
|
||||||
|
('CKHW112', .002367064),
|
||||||
|
('CKHW118', .002616406),
|
||||||
|
('CKHW124', .002880915),
|
||||||
|
('CKHW130', .003154996),
|
||||||
|
('CKHW136', .003441822),
|
||||||
|
('CKHW142', .003741715),
|
||||||
|
('CKHW150', .004051506),
|
||||||
|
('CKHW158', .004375389),
|
||||||
|
('CKHW166', .005078724),
|
||||||
|
('CKHW174', .005469937),
|
||||||
|
('CKHW182', .006071822),
|
||||||
|
('CKHW190', .006605072),
|
||||||
|
('CKHW200', .007311717),
|
||||||
|
('CKHW210', .008037439),
|
||||||
|
('CKHW222', .009091287),
|
||||||
|
('CKHW232', .009888443),
|
||||||
|
('CKHW244', .010907182),
|
||||||
|
('CKHW254', .011787319),
|
||||||
|
)
|
138
strings.py
138
strings.py
|
@ -1,117 +1,61 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
from data import *
|
||||||
|
|
||||||
|
stock = []
|
||||||
|
stock += daddario_plain_steel
|
||||||
|
stock += daddario_nickle_wound
|
||||||
|
#stock += circle_k_plain
|
||||||
|
#stock += circle_k_hybrid_wound
|
||||||
|
|
||||||
mm_to_in = 0.03937
|
mm_to_in = 0.03937
|
||||||
scale_length = 648*mm_to_in
|
scale_length = 648*mm_to_in
|
||||||
|
|
||||||
string_sets = {
|
string_sets = {
|
||||||
'regular light': (
|
'regular light': (
|
||||||
# (desired note, tension, and type)
|
# (desired note, tension, and type)
|
||||||
('E4' , 16, 'PL'),
|
('E4' , 16, 'P'),
|
||||||
('B3' , 16, 'PL'),
|
('B3' , 16, 'P'),
|
||||||
('G3' , 16, 'PL'),
|
('G3' , 16, 'P'),
|
||||||
('D3' , 16, 'NW'),
|
('D3' , 16, 'W'),
|
||||||
('A2' , 16, 'NW'),
|
('A2' , 16, 'W'),
|
||||||
('E2' , 16, 'NW'),
|
('E2' , 16, 'W'),
|
||||||
),
|
),
|
||||||
'jazz light': (
|
'jazz light': (
|
||||||
('E4' , 24, 'PL'),
|
('E4' , 24, 'P'),
|
||||||
('B3' , 24, 'PL'),
|
('B3' , 24, 'P'),
|
||||||
('G3' , 24, 'NW'),
|
('G3' , 24, 'W'),
|
||||||
('D3' , 24, 'NW'),
|
('D3' , 24, 'W'),
|
||||||
('A2' , 24, 'NW'),
|
('A2' , 24, 'W'),
|
||||||
('E2' , 24, 'NW'),
|
('E2' , 24, 'W'),
|
||||||
),
|
),
|
||||||
'regular light (DADGAD)': (
|
'regular light (DADGAD)': (
|
||||||
('D4' , 16, 'PL'),
|
('D4' , 16, 'P'),
|
||||||
('A3' , 16, 'PL'),
|
('A3' , 16, 'P'),
|
||||||
('G3' , 16, 'PL'),
|
('G3' , 16, 'P'),
|
||||||
('D3' , 16, 'NW'),
|
('D3' , 16, 'W'),
|
||||||
('A2' , 16, 'NW'),
|
('A2' , 16, 'W'),
|
||||||
('D2' , 16, 'NW'),
|
('D2' , 16, 'W'),
|
||||||
),
|
),
|
||||||
'regular light (open G, 6)': (
|
'regular light (open G, 6)': (
|
||||||
('D4' , 16, 'PL'),
|
('D4' , 16, 'P'),
|
||||||
('B3' , 16, 'PL'),
|
('B3' , 16, 'P'),
|
||||||
('G3' , 16, 'PL'),
|
('G3' , 16, 'P'),
|
||||||
('D3' , 16, 'NW'),
|
('D3' , 16, 'W'),
|
||||||
('B2' , 16, 'NW'),
|
('B2' , 16, 'W'),
|
||||||
('D2' , 16, 'NW'),
|
('D2' , 16, 'W'),
|
||||||
),
|
),
|
||||||
'regular light (open G, 7)': (
|
'regular light (open G, 7)': (
|
||||||
('D4' , 16, 'PL'),
|
('D4' , 16, 'P'),
|
||||||
('B3' , 16, 'PL'),
|
('B3' , 16, 'P'),
|
||||||
('G3' , 16, 'PL'),
|
('G3' , 16, 'P'),
|
||||||
('D3' , 16, 'NW'),
|
('D3' , 16, 'W'),
|
||||||
('B2' , 16, 'NW'),
|
('B2' , 16, 'W'),
|
||||||
('G2' , 16, 'NW'),
|
('G2' , 16, 'W'),
|
||||||
('D2' , 16, 'NW'),
|
('D2' , 16, 'W'),
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
# D'Addario stock via http://www.daddario.com/upload/tension_chart_13934.pdf
|
|
||||||
stock = (
|
|
||||||
# (product name, unit weight)
|
|
||||||
# plain steel
|
|
||||||
('PL007' , .00001085),
|
|
||||||
('PL008' , .00001418),
|
|
||||||
('PL0085', .00001601),
|
|
||||||
('PL009' , .00001794),
|
|
||||||
('PL0095', .00001999),
|
|
||||||
('PL010' , .00002215),
|
|
||||||
('PL0105', .00002442),
|
|
||||||
('PL011' , .00002680),
|
|
||||||
('PL0115', .00002930),
|
|
||||||
('PL012' , .00003190),
|
|
||||||
('PL013' , .00003744),
|
|
||||||
('PL0135', .00004037),
|
|
||||||
('PL014' , .00004342),
|
|
||||||
('PL015' , .00004984),
|
|
||||||
('PL016' , .00005671),
|
|
||||||
('PL017' , .00006402),
|
|
||||||
('PL018' , .00007177),
|
|
||||||
('PL019' , .00007997),
|
|
||||||
('PL020' , .00008861),
|
|
||||||
('PL022' , .00010722),
|
|
||||||
('PL024' , .00012760),
|
|
||||||
('PL027' , .00014975),
|
|
||||||
|
|
||||||
# nickelplated steel round wound (XL)
|
|
||||||
('NW017' , .00005524),
|
|
||||||
('NW018' , .00006215),
|
|
||||||
('NW019' , .00006947),
|
|
||||||
('NW020' , .00007495),
|
|
||||||
('NW021' , .00008293),
|
|
||||||
('NW022' , .00009184),
|
|
||||||
('NW024' , .00010857),
|
|
||||||
('NW025*', .00011875), # from the EXL110BT, an approximation
|
|
||||||
('NW026' , .00012671),
|
|
||||||
('NW028' , .00014666),
|
|
||||||
('NW030' , .00017236),
|
|
||||||
('NW032' , .00019347),
|
|
||||||
('NW034' , .00021590),
|
|
||||||
('NW036' , .00023964),
|
|
||||||
('NW038' , .00026471),
|
|
||||||
('NW039' , .00027932),
|
|
||||||
('NW042' , .00032279),
|
|
||||||
('NW044' , .00035182),
|
|
||||||
('NW046' , .00038216),
|
|
||||||
('NW048' , .00041382),
|
|
||||||
('NW049' , .00043014),
|
|
||||||
('NW052' , .00048109),
|
|
||||||
('NW054' , .00053838),
|
|
||||||
('NW056' , .00057598),
|
|
||||||
('NW059' , .00064191),
|
|
||||||
('NW060' , .00066542),
|
|
||||||
('NW062' , .00070697),
|
|
||||||
('NW064' , .00074984),
|
|
||||||
('NW066' , .00079889),
|
|
||||||
('NW068' , .00084614),
|
|
||||||
('NW070' , .00089304),
|
|
||||||
('NW072' , .00094124),
|
|
||||||
('NW074' , .00098869),
|
|
||||||
('NW080' , .00115011),
|
|
||||||
)
|
|
||||||
|
|
||||||
A = 440
|
A = 440
|
||||||
notes = {
|
notes = {
|
||||||
'C' : 0,
|
'C' : 0,
|
||||||
|
@ -187,7 +131,9 @@ def print_ideal_stock(strings):
|
||||||
|
|
||||||
closest = ('n/a', 0)
|
closest = ('n/a', 0)
|
||||||
for name, stock_uw in stock:
|
for name, stock_uw in stock:
|
||||||
if kind and name[:len(kind)] != kind:
|
if kind == 'P' and name[2] != 'P':
|
||||||
|
continue
|
||||||
|
if kind == 'W' and name[3] != 'W':
|
||||||
continue
|
continue
|
||||||
if abs(stock_uw - uw) < abs(closest[1] - uw):
|
if abs(stock_uw - uw) < abs(closest[1] - uw):
|
||||||
closest = (name, stock_uw)
|
closest = (name, stock_uw)
|
||||||
|
|
Loading…
Reference in a new issue