{"id":254,"date":"2024-11-19T15:54:22","date_gmt":"2024-11-19T23:54:22","guid":{"rendered":"http:\/\/elliottjohnson.net\/blog\/?p=254"},"modified":"2024-11-19T15:55:07","modified_gmt":"2024-11-19T23:55:07","slug":"useq-api-less-documented","status":"publish","type":"post","link":"http:\/\/elliottjohnson.net\/blog\/useq-api-less-documented\/","title":{"rendered":"uSEQ API less documented"},"content":{"rendered":"\n<p>In working with uSEQ, I&#8217;ve seen reference to a few functions such as:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>FAST, SLOW, OFFSET<\/p>\n<\/blockquote>\n\n\n\n<p>These functions are not explicitly described in the current documentation, but used in various ways such as:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>(from-list [1 2 (from-list [1 2] bar)] (slow 2 bar))<\/p>\n<\/blockquote>\n\n\n\n<p><a href=\"https:\/\/github.com\/Emute-Lab-Instruments\/uSEQ\" data-type=\"link\" data-id=\"https:\/\/github.com\/Emute-Lab-Instruments\/uSEQ\">Being an opensource project, <\/a>I was able to fetch the source and looking at the file <code><a href=\"https:\/\/github.com\/Emute-Lab-Instruments\/uSEQ\/blob\/main\/uSEQ\/src\/uSEQ.cpp\" data-type=\"link\" data-id=\"https:\/\/github.com\/Emute-Lab-Instruments\/uSEQ\/blob\/main\/uSEQ\/src\/uSEQ.cpp\">uSEQ\/src\/uSEQ.cpp<\/a><\/code> I found the definitions for the above.<\/p>\n\n\n\n<p>From these definitions, I can see that the above functions take two arguments, the first of which is an array of two numbers and the second is an &#8220;environment&#8221;.  The concept of an Environment  is defined in <code><a href=\"https:\/\/github.com\/Emute-Lab-Instruments\/uSEQ\/blob\/main\/uSEQ\/src\/lisp\/environment.cpp\" data-type=\"link\" data-id=\"https:\/\/github.com\/Emute-Lab-Instruments\/uSEQ\/blob\/main\/uSEQ\/src\/lisp\/environment.cpp\">uSEQ\/src\/lisp\/Environment.cpp<\/a><\/code>, appears to me to be similar to the concept of lexical scope, and is basically handled by modulisp.  As a user the first argument&#8217;s two values are what is provided, one a number and the other a phasor.<\/p>\n\n\n\n<p>Looking at the meat of these functions, they perform the following:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>FAST:   multiplies by the provided factor<br>SLOW:   divides by the provided factor<br>OFFSET: adds the provided offset.<\/p>\n<\/blockquote>\n\n\n\n<p>The effect of this is to transform the &#8220;phasor&#8221; by applying the above rule in a new environment linked as a child to the original.  This allows for modifications to the parent to ripple down to the child environments.<\/p>\n\n\n\n<p>This does seem to imply that the global BPM is used throughout the system and defining systems with multiple BPMs is not currently not supported.  Something I&#8217;ll definitely ask about in the Discord server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In working with uSEQ, I&#8217;ve seen reference to a few functions such as: FAST, SLOW, OFFSET These functions are not explicitly described in the current documentation, but used in various ways such as: (from-list [1 2 (from-list [1 2] bar)] &hellip; <a href=\"http:\/\/elliottjohnson.net\/blog\/useq-api-less-documented\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"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,"footnotes":""},"categories":[11],"tags":[],"class_list":["post-254","post","type-post","status-publish","format-standard","hentry","category-personal"],"_links":{"self":[{"href":"http:\/\/elliottjohnson.net\/blog\/wp-json\/wp\/v2\/posts\/254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/elliottjohnson.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/elliottjohnson.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/elliottjohnson.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/elliottjohnson.net\/blog\/wp-json\/wp\/v2\/comments?post=254"}],"version-history":[{"count":4,"href":"http:\/\/elliottjohnson.net\/blog\/wp-json\/wp\/v2\/posts\/254\/revisions"}],"predecessor-version":[{"id":335,"href":"http:\/\/elliottjohnson.net\/blog\/wp-json\/wp\/v2\/posts\/254\/revisions\/335"}],"wp:attachment":[{"href":"http:\/\/elliottjohnson.net\/blog\/wp-json\/wp\/v2\/media?parent=254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/elliottjohnson.net\/blog\/wp-json\/wp\/v2\/categories?post=254"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/elliottjohnson.net\/blog\/wp-json\/wp\/v2\/tags?post=254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}