{"id":4810,"date":"2017-05-19T22:24:25","date_gmt":"2017-05-19T21:24:25","guid":{"rendered":"http:\/\/www.celesteh.com\/blog\/?p=4810"},"modified":"2017-05-19T22:24:25","modified_gmt":"2017-05-19T21:24:25","slug":"domifare-classes","status":"publish","type":"post","link":"https:\/\/www.celesteh.com\/blog\/2017\/05\/19\/domifare-classes\/","title":{"rendered":"Domifare Classes"},"content":{"rendered":"<p>Key still had some problems with transposition that related to frequency quanitsation, so those are (hopefully?) now sorted. I got rid of the gravity argument for freqToDegree because it doesn&#8217;t make sense, imo and calculating it is a tiny bit of a faff.<\/p>\n<p>For Domifare, as with a spoken language, breaks between commands are articulated as pauses, so I&#8217;ve added a DetectSilence ugen. The threshold will need to be connected to a fader to actually be useful, as the margin of background noise will vary massively based on environment.<\/p>\n<p>The next step is parsing. It&#8217;s been a loooong time since I&#8217;ve worried about how to do this&#8230; IxiLang uses a switch statement with string matching.<\/p>\n<p>I need to draw out how this is going to work, since the repeat and the chance commands both take commands as arguments.<\/p>\n<p>This might work as a statement data array:<\/p>\n<p><code>[key, min_args, max_args, [types], function]<\/code><\/p>\n<p>Types can be: \\var, \\number, \\operator, \\data. If it&#8217;s \\operator, then the operator received will be the key for another statement, and the parser will listen for that too&#8230;.  If it&#8217;s \\data, that means start the fucntion asap&#8230;.<\/p>\n<p>Also, since variables are actually loop holders, I&#8217;m going to need to make a class for them.<\/p>\n<p>My original plan to was to use pitch recognition to enter in midi notes, but that&#8217;s not going to work, so some commands are now defunct.<\/p>\n<p><code><br \/>\n(<br \/>\nvar lang, vars, numbers;<br \/>\nvars = (solfasire:nil, solfasisol:nil, soldosifa:nil);<br \/>\nnumbers = (redodo: 1, remimi:2, refafa: 3, resolsol: 4, relala: 5, resisi: 6, mimido: 7, mimire:8);<br \/>\nlang = (<br \/>\n\tlarelasi: [\\larelasi, 2, 2, [\\var, \\data], nil], \/\/ func adds the name to the var array, runs the recorder<br \/>\n\tdolamido: [\\dolamido, 0, 1, [\\var], nil], \/\/ func stops names loop or all loops<br \/>\n\tdomilado: [\\domilado, 0, 1, [\\var], nil], \/\/ func resumes named loop or all loops<br \/>\n\tmifasol: [\\mifasol, 0, 1, [\\var], nil], \/\/ func raises an octave, which is probably impossible<br \/>\n\tsolfami: [\\solfami, 0, 1, [\\var], nil], \/\/ func lowers an octave- also impossible<br \/>\n\tlamidore: [\\lamidore, 2, 2, [\\var, \\data], nil], \/\/ add notes to existing loop<br \/>\n\tdosolresi: [\\dosolresi, 1, 1, [\\var], nil], \/\/ shake the loop, which is possible with recordings also...<br \/>\n\tmisisifa: [\\misisifa, 0, 1, [\\var], nil], \/\/ next rhythm<br \/>\n\tfasisimi: [\\fasisimi, 0, 1, [\\var], nil], \/\/previous rhythm<br \/>\n\tmisoldola: [\\misoldola, 0, 1, [\\var], nil], \/\/random rhytm<br \/>\n\trefamido: [\\refamido, 0, 0, [], nil], \/\/ die<br \/>\n\tsifala: [\\sifala, 2, 2, [\\number, \\operator], nil], \/\/ repeat N times (1x\/bar)<br \/>\n\tlarefami: [\\larefami, 2, 2, [\\number, \\operator], nil] \/\/ X in 8 chance of doing the command<br \/>\n);<br \/>\n<\/code><\/p>\n<p>After pondering this for a bit, I decided to write some classes, because that&#8217;s how I solve all my problems. I created a github project. This is the state of <a href=\"https:\/\/github.com\/celesteh\/Domifare\/commit\/76977e89ea5f3e6b9165476beffc3113bd47e921\">the sole file today<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Key still had some problems with transposition that related to frequency quanitsation, so those are (hopefully?) now sorted. I got rid of the gravity argument for freqToDegree because it doesn&#8217;t make sense, imo and calculating it is a tiny bit of a faff. For Domifare, as with a spoken language, breaks between commands are articulated &hellip; <a href=\"https:\/\/www.celesteh.com\/blog\/2017\/05\/19\/domifare-classes\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Domifare Classes<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[1],"tags":[77,366,59],"class_list":["post-4810","post","type-post","status-publish","format-standard","hentry","category-uncategorised","tag-creative-pact","tag-domifare","tag-live-code"],"_links":{"self":[{"href":"https:\/\/www.celesteh.com\/blog\/wp-json\/wp\/v2\/posts\/4810","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.celesteh.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.celesteh.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.celesteh.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.celesteh.com\/blog\/wp-json\/wp\/v2\/comments?post=4810"}],"version-history":[{"count":1,"href":"https:\/\/www.celesteh.com\/blog\/wp-json\/wp\/v2\/posts\/4810\/revisions"}],"predecessor-version":[{"id":4811,"href":"https:\/\/www.celesteh.com\/blog\/wp-json\/wp\/v2\/posts\/4810\/revisions\/4811"}],"wp:attachment":[{"href":"https:\/\/www.celesteh.com\/blog\/wp-json\/wp\/v2\/media?parent=4810"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.celesteh.com\/blog\/wp-json\/wp\/v2\/categories?post=4810"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.celesteh.com\/blog\/wp-json\/wp\/v2\/tags?post=4810"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}