Csound - 31-TET on ratio 5


  • Description

    This project shows one probability for dividing the traditional major 17th in just intonation, which has the frequency ratio of 5, into 31 steps. For each step the ratio would be 5^(1/31). In this project, not all 31 steps are used because I was also trying to experiment with a system of tonality and scale.

    While reading the code, always note the difference between scale and pitch number: the former means the order within the scale, while the latter means the number of steps. Variables that presents pitch number would have postfix "PN" within its name.

  • Term to be used
    • Step: the smallest interval in this temperament, frequency ratio of 5^(1/31)
    • Scale: the mode used in this piece (not all 31 pitches are used here)
    • SD(Scale degree): the order(begin at 0) which the pitch has within the scale
    • PN(Pitch number): number of steps between the pitch and the lowest note
    • PO(pseudo-octave): the interval whose frequency is 5:1
    • Cycle: a complete scale within a PO
  • Problems unsolved
    1. There's no guarantee that adding a PO to a consonant interval makes a consonant interval.
    2. I don't know the way to dynamically decide the length of output file. For now, a long enough p3 for i-statement is used.

怎麼算出哪幾個音是和諧音呢?照理說平均律裡除了需要定義的八度之外是不會有符合純率的和諧音的,但是人耳其實可以接受有些許誤差的和諧音,所以就可以這樣算出來(以JavaScript為例): function ETConsonance(ratio, divider) {
var str = '<table border="1"><tr><td> </td>';
var ratioArr = new Array();
for(var i = 1; i <= divider; i++) {
ratioArr[i] = Math.pow(ratio,i/divider);
str += '<th>' + i + '</th>';
}
str += '</tr>';
for(var j = 1; j < 10; j++) {
str += '<tr><th>' + j + '</th>';
for(i = 1; i <= divider; i++) {
var times = j * ratioArr[i];
var style = (Math.abs(times-Math.round(times))<0.05) ? ' style="font-weight: bold;"' : '';
str += '<td' + style + '>' + times.toString().substr(0, 5) + '</td>';
}
str += '</tr>';
}

document.writeln(str);
}
ETConsonance(5, 31);
// 換成2和12就可以得到平常用的12-EDO,你可能會很驚訝3和8跟純律的差距竟是這麼大
結果就會是:

如上,粗體字就是可以考慮的"接近"和諧的音程。如第三音的六倍頻接近基準音的七倍,即3個最小音程的頻率比接近7:6;依此類推8個最小音程的頻率比接近3:2
至於建構在主音上要怎麼配置音階,我參考了12平均律中大調音階的一些現象:
  1. 3和4(半因數)都是和諧音程,但是與主音相差三個和四個半音的兩個音並不會同時出現
  2. do到fa的關係同於sol到高音do的關係(馬老師提到的某種對稱性,我忘記專有名詞了..QQ)

由第一點可知會造成"風格"的音階通常不會把所有跟主音成和諧關係的所有音級都用進去;至於第二點我則決定不在此次使用(但是我另外有考慮到不同於大調音階,而是改用反向對稱的方式)。

但是目前為止仍然有一些其他的問題。首先由於一個音階的循環(又稱假八度pseudo-octave,於本例中頻率比是5,以下簡稱PO)並不是2的倍數,所以把某個音移高一個PO所得到的音並不一定跟原本的狀態類似。舉例來說某兩個音的頻率成7:6的關係,若將高音者一高一個PO之後會得到35:6,原則上雖然仍接近整數比,但是和諧度卻是變低了。「和諧度變低」的另一個佐證是把傳統西樂的兩個完全五度相疊會得到不太和諧的大二度,而若由此推論,可知移高傳統的八度也會造成和諧度變低,只是因為2是最小的質數,所以和諧度的差異沒有那麼大。(事實上,隨著音程的增大,不和諧的感覺也會由於低音的泛音不足以與高音者產生交互作用而減少)
其他發現:12-EDO中,若X和Y成和諧關係(半音數3, 4, 5, 7, 8, 9),則將其中一音移高和移低大三度的結果勢必至少有一仍是和諧。

後記:
馬老師說我這學期可以用這個抵其他的作業。花了整整兩天證明自己仍然是個菜鳥,很多想要的功能都弄不出來。很難得的這次寫程式雖然不太順,但寫得還蠻平心靜氣的(也許是因為剛好穿著資工系服的關係^^|||b)。我想當初跟學長姐們一起學Csound的時候,其實我並沒有比較厲害或是花了比較少的時間,只是因為比較習慣寫程式而且有自信可以做完想要做的功能,所以壓力比較小吧。看樣子下學期還是要跟著上Csound才好(當然是期中之後再說XD)

iJigg我一直連不上,shopping前幾天也說她連不到Blog上面的內嵌播放器..總之我後來還是用經由Hans教的方法:把Box.net當免空用

話說這篇花了我兩個小時(HTML碼就接近11KB...orz),有點想乾脆拿來當論文題材XD..不過音律的問題大概早在幾百年前就被研究到爛掉了,就算是電腦應用上也..也許來個任意律制的自動作曲?

然後我還邀請了馬老師來看這篇..希望推論過程不會被批說太慘(其實看了幾遍之後就覺得寫這樣的東西還蠻小兒科的)

沒有留言: