インハーモニシティと同じく キー番号と弦長と番手(又は弦径)から
>> getTension(49, 390, 16.5) ans = 66.831
弦の張力を計算します。
function [gten, ten] = getTension(key, leng, ban) SM = 7.85; # 芯線密度 g/cm^3 NG = 9.80665204821; # 重力加速度 kgw mm = 1000; [dia, pitch] = GetDia(ban); freq = GetFreq(key, pitch); ten = pi*SM*mm*freq^2*(leng/mm)^2*(dia/mm)^2; gten = ten/NG; end function [dia, aa] = getDia(bante) ba = 12:0.5:25; dm = 1.25:0.05:1.500; da = 0.725:0.025:1.225; di = [da dm]; dia = -1; aa = 440; if (bante < 12 && bante > 0.1) dia = bante; aa = 415; else x = find(ba == bante); if (x > 0) dia = di(x); end end end # 番手から弦径を得ます function freq = getFreq(key, pitch) freq = pitch .* 2.^((key-49)./12); end # キー番号から周波数を算出します