{"is_private":null,"description":"function takes in collection as argument, and returns the ratio from the resultant monzo","name":"Monzo function","ancestor_list":[],"code":"// https://en.xen.wiki/w/Monzo\r\n//Monzo notation of JI ratios is often used in combination with Vals for temperament theory. I wrote this not for temperament, but rather to use monzos as a possible alternative to otonality and utonality, espescially when sonifying streams that include negative numbers.\r\n\r\n(//function that takes a collection representing a monzo as an argument, and outputs the ratio it encodes\r\n~zo = {\r\n\targ exponentCollection;\r\n\tvar ratio = 1;\r\n\texponentCollection.do({arg item, i; ratio = ratio * (i.nthPrime).pow(item);});\r\n\tratio;\r\n};\r\n)\r\n\r\n//5-limit\r\n~zo.([-1, 1]); // 3/2\r\n~zo.([-2, 0, 1]); // 5/4\r\n~zo.([-3, 2]); // 9/8\r\n~zo.([-4, 4, -1]); // 81/80\r\n~zo.([-4, 4, -1]); // 81/80\r\n\r\n//7-limit\r\n~zo.([-2, 0, 0, 1]); // 7/4\r\n~zo.([-1, -1, 0, 1]); // 7/6\r\n~zo.([0, 0, -1, 1]); // 7/5\r\n\r\n//fractional monzos\r\n~zo.([-1/2, 3.3, 4, -5]); //sure\r\n//it might be fun to do monzo glissandos in different places?","id":"1-5fT","author":"eli.rosenkim","labels":["monzo","tuning","just intonation","partch"]}