{"id":1001,"date":"2010-02-15T14:39:15","date_gmt":"2010-02-15T06:39:15","guid":{"rendered":"http:\/\/www.ccttours.com\/blog\/?p=1001"},"modified":"2010-02-16T16:17:34","modified_gmt":"2010-02-16T08:17:34","slug":"mul%e5%92%8cadd%ef%bc%88%e4%bb%a5%e5%8f%8augen%e7%9a%84%e5%bc%95%e6%95%b0%ef%bc%89","status":"publish","type":"post","link":"https:\/\/learn.travelchinawith.me\/?p=1001","title":{"rendered":"SuperCollider\uff1aMul\u548cAdd\uff08\u4ee5\u53caUGen\u7684\u5f15\u6570\uff09"},"content":{"rendered":"<p>\u4e24\u4e2a\u5f15\u6570\u88ab\u91c7\u7528\u5728\u5f88\u591aUGen\u4e2d\uff0c\u6211\u4eec\u5c06\u5728\u8fd9\u4efd\u6559\u7a0b\u4e2d\u5c06\u5b83\u4eec\u5206\u5f00\u6765\u8bf4\u8bf4\u3002\u5b83\u4eec\u975e\u5e38\u6709\u7528\uff0c\u56e0\u4e3a\u5b83\u4eec\u63d0\u4f9b\u4e86\u4e00\u79cd\u4fdd\u6301\u4fe1\u53f7\u88ab\u9002\u5f53\u4fdd\u6301\u5728\u4e00\u4e2a\u5408\u9002\u7684\u8303\u56f4\u5185\u5e76\u4f5c\u4e3a\u8f93\u51fa\u7ed9\u5176\u5b83UGen\u4f7f\u7528\u7684\u65b9\u6cd5\u2014\u2014\u56e0\u4e3a\u7cfb\u7edf\u97f3\u9891\u8f93\u51fa\u7684\u6570\u503c\u662f\u5728-1\u52301\u4e4b\u95f4\uff0c\u540c\u65f6\u4e00\u4e2a\u9891\u7387\u4e5f\u8bb8\u8981\u6c42\u7684\u6570\u5b57\u662f20\u52302000\uff0c\u8fd9\u4e9b\u4e0d\u540c\u79cd\u7c7b\u7684\u6bd4\u4f8b\u754c\u5b9a\u662f\u901a\u8fc7\u00a0<em><strong>mul <\/strong><\/em>\u548c\u00a0<em><strong>add <\/strong><\/em>\u5f15\u6570\u6765\u89e3\u51b3\u7684\u3002<br \/>\n<!--more--><\/p>\n<pre class=\"brush:jfx\">\/\/ \u6211\u4eec\u5c06\u7ee7\u7eed\u4f7f\u7528internal server\u548c\u5b83\u7684\u56fe\u91ca\u5de5\u5177\r\nServer.default=s=Server.internal;\r\n\r\ns.boot;<\/pre>\n<hr \/>\n<p>\u5982\u679c\u4f60\u67e5\u770bUGen\u7684\u5e2e\u52a9\u6587\u6863\uff0c\u4f60\u5e38\u4f1a\u770b\u5230\u00a0<em><strong>mul <\/strong><\/em>\u548c\u00a0<em><strong>add <\/strong><\/em>\u4f5c\u4e3a\u6700\u540e\u7684\u5f15\u6570\uff1a<\/p>\n<pre class=\"brush:jfx\">\/\/ \u9009\u4e2d\u5e76cmd+d\r\n[SinOsc]<\/pre>\n<p>\u6ce8\u610f\u00a0<em><strong>mul <\/strong><\/em>\u662f\u7b2c\u4e09\u5f15\u6570\u800c\u00a0<em><strong>add <\/strong><\/em>\u662f\u7b2c\u56db\u5f15\u6570\u2014\u2014\u4f60\u53ef\u4ee5\u4f7f\u7528\u5192\u53f7\u8bed\u6cd5\u76f4\u63a5\u5c06\u90a3\u4e9b\u8f93\u5165\u653e\u5230\u632f\u8361\u5668\uff08\u90a3\u4e9b\u201c\u5f15\u6570\u201d\uff09\uff1a<\/p>\n<pre class=\"brush:jfx\">{SinOsc.ar(mul:1)}.scope<\/pre>\n<p>\u5bf9\u4e8e\u97f3\u9891\u8f93\u51fa\u6765\u8bf4\uff08ar\u91cc\u8fb9\u7684\u4e1c\u897f\uff0c\u8fd9\u4e9b\u662f\u6700\u540e\u4ece\u58f0\u5361\u51fa\u6765\u7684\u4e1c\u897f\uff09\uff0c\u6570\u503c\u5fc5\u987b\u4fdd\u6301\u5728-1\u548c1\u4e4b\u95f4\uff08\u5982\u679c\u5199\u00a0<em><strong>mul:0.1<\/strong><\/em>\uff0c\u4e4b\u524d\u7684\u58f0\u97f3\u5c06\u4fdd\u6301\u5728-0.1\u52300.1\u4e4b\u95f4\uff0c\u4f4d\u4e8e\u5b89\u5168\u8303\u56f4\u5185\uff09\u3002<\/p>\n<hr \/>\n<p>\u4e0b\u8fb9\u662f\u4e00\u4e2a\u8fc7\u8f7d\u7684\u58f0\u97f3\uff08\u8c28\u614e\u8046\u542c\uff09\uff1a<\/p>\n<pre class=\"brush:jfx\">\/\/ \u5927\u58f0\uff01\u9ed8\u8ba4440Hz\uff0c\u632f\u5e45\u500d\u52a02.0\r\n{SinOsc.ar(mul:2.0)}.scope<\/pre>\n<p>\u4e0b\u8fb9\u662f\u4e00\u4e2a\u5177\u6709\u66f4\u5408\u9002\u97f3\u91cf\u632f\u5e45\u7684\u58f0\u97f3<\/p>\n<pre class=\"brush:jfx\">{SinOsc.ar(mul:0.1)}.scope<\/pre>\n<p>\u7531\u4e0a\u53ef\u89c1\uff0c\u4ee3\u7801\u4e2d\u00a0<em><strong>mul: <\/strong><\/em>\u7684\u90e8\u5206\u5b9e\u9645\u4e0a\u662f\u5efa\u7acb\u4e86\u4e00\u4e2a\u632f\u5e45\u500d\u52a0\u5668\uff0c\u5373\uff0c\u5b83\u754c\u5b9a\u4fe1\u53f7\u5728y\u8f74\u7684\u6bd4\u4f8b\u3002<\/p>\n<pre class=\"brush:jfx\">\/\/ \u9f20\u6807\u754c\u5b9a\u632f\u5e45\u7684\u5c0f\u6837\r\n{SinOsc.ar(mul:MouseY.kr(1.0,0.1))}.scope<\/pre>\n<hr \/>\n<p>\u8fd8\u6709\u53e6\u5916\u4e00\u4e2a\u4f60\u5c06\u770b\u5230\u53d1\u751f\u5728\u4fe1\u53f7\u8eab\u4e0a\u7684\u4e8b\uff0c\u662f\u504f\u79fby\u8f74\u3002\u6211\u7528UGen\u7684\u00a0<em><strong>add <\/strong><\/em>\u8f93\u5165\u6765\u505a\u8fd9\u4e2a\u3002<\/p>\n<pre class=\"brush:jfx\">\/\/ \u9f20\u6807\u63a7\u5236\u504f\u79fb\u7684\u5c0f\u6837\r\n{SinOsc.ar(mul:0.1, add:MouseY.kr(0.9,-0.9))}.scope<\/pre>\n<hr \/>\n<p><em><strong>mul <\/strong><\/em>\u548c\u00a0<em><strong>add<\/strong> <\/em>\u63a7\u5236\u5e2e\u52a9\u754c\u5b9a\u4e00\u4e2a\u4f60\u60f3\u8981\u4f5c\u4e3a\u8f93\u5165\u7684\u4fe1\u53f7\u7684\u503c\u5230\u4e00\u4e2a\u4f60\u5e0c\u671b\u7684\u8303\u56f4\u5185\u3002<\/p>\n<pre class=\"brush:jfx\">\/\/ \u9f20\u6807\u63a7\u5236\u632f\u5e45\u754c\u5b9a\u5c0f\u6837\r\n{SinOsc.ar(mul:MouseX.kr(0.1,1.0), add:MouseY.kr(0.9,-0.9))}.scope<\/pre>\n<hr \/>\n<p>\u4f60\u53ef\u4ee5\u4f7f\u7528<strong>*<\/strong>\u548c<strong>+<\/strong>\u4f5c\u4e3a\u8bbe\u5b9a\u00a0<em><strong>mul <\/strong><\/em>\u548c\u00a0<em><strong>add <\/strong><\/em>\u7684\u6377\u5f84\u3002<\/p>\n<pre class=\"brush:jfx\">{0.1*SinOsc.ar}.scope<\/pre>\n<p>\u7b49\u540c\u4e8e<\/p>\n<pre class=\"brush:jfx\">{SinOsc.ar(mul:0.1)}.scope<\/pre>\n<p>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\n<pre class=\"brush:jfx\">{0.1*SinOsc.ar+0.5}.scope<\/pre>\n<p>\u7b49\u540c\u4e8e<\/p>\n<pre class=\"brush:jfx\">{SinOsc.ar(mul:0.1,add:0.2)}.scope<\/pre>\n<hr \/>\n<p>\u6211\u662f\u7528\u5192\u53f7\u8bed\u6cd5\u6765\u5c06\u503c\u4f5c\u4e3a<em><span style=\"color: #0000ff;\">SinOsc<\/span><\/em> UGen\u7684\u7279\u5b9a\u8f93\u5165\u3002\u6211\u4eec\u600e\u4e48\u77e5\u9053\u8fd9\u4e9b\u8f93\u5165\uff0c\u6216\u8005\u8fd8\u6709\u5176\u5b83\u4ec0\u4e48\u8fd0\u7528\u5b83\u4eec\u7684\u65b9\u6cd5\u5417?<\/p>\n<p><span style=\"color: #0000ff;\"><em>SinOsc<\/em><\/span>\u7684\u5f15\u6570\u662f<em>freq<\/em>\uff08\u9891\u7387\uff09, <em>phase<\/em>\uff08\u76f8\u4f4d\uff09, <em>mul<\/em>\uff08\u4e58\uff09, <em>add<\/em>\uff08\u52a0\uff09<br \/>\n\u6211\u600e\u4e48\u77e5\u9053\u7684\uff1f\u9009\u4e2d<em><span style=\"color: #0000ff;\">SinOsc<\/span><\/em>\u5e76\u6309cmd+d\u8c03\u51fa\u5e2e\u52a9\u6587\u6863\u6216\u8005\u6309cmd+j\u8c03\u51fa\u6e90\u4ee3\u7801\u8bbe\u5b9a\u3002<\/p>\n<hr \/>\n<p>\u56e0\u6b64\uff0c\u5982\u679c\u6211\u6e05\u695a\u7684\u5199\u51fa\u6574\u4e2aUGen\u7684\u8f93\u5165\uff1a<\/p>\n<pre class=\"brush:jfx\">SinOsc.ar(freq, phase, mul, add)<\/pre>\n<p>\u671f\u671b\u7684\u8f93\u5165\u503c\u53ef\u80fd\u4e3a\uff1a<br \/>\nfreq- 20 \u5230 10000 (Hz)<br \/>\nphase- 0.0 \u5230 1.0\u5faa\u73af<br \/>\nmul: 0.0 \u5230 1.0\uff0c\u632f\u5e45\u4ece\u65e0\u58f0\u5230\u6ee1\u6863<br \/>\nadd: 0.0 \u65e0\u504f\u79fb<\/p>\n<hr \/>\n<p>\u5728\u4ee3\u7801\u4e2d\u4f7f\u7528<span style=\"color: #0000ff;\"><em>SinOsc<\/em><\/span> UGen\uff0c\u6211\u5fc5\u987b\u7528\u5408\u9002\u7684\u503c\u6765\u66ff\u4ee3\u90a3\u4e9b\u8f93\u5165\u3002\u8fd9\u4e9b\u503c\u53ef\u4ee5\u662f\u56fa\u5b9a\u7684\u5e38\u6570\uff0c\u4e5f\u53ef\u4ee5\u662f\u5176\u5b83UGen\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5b83\u4eec\u53ef\u80fd\u4f1a\u662f\u968f\u65f6\u95f4\u53d8\u5316\u7684\u503c\u3002\u5982\u679c\u6211\u4e0d\u6307\u5b9a\u4e00\u4e2a\u7ed9\u5b9a\u7684\u8f93\u5165\uff0c\u9ed8\u8ba4\u503c\u5c06\u88ab\u4f7f\u7528\uff0c\u90a3\u6b63\u662f\u4f60\u5728\u4e0a\u8fb9\u6240\u542c\u5230\u7684\u58f0\u97f3\u3002<\/p>\n<p>\u4e3a\u6240\u6709\u8f93\u5165\u4f7f\u7528\u5e38\u6570\uff1a<\/p>\n<pre class=\"brush:jfx\">{SinOsc.ar(440, 0.0, 0.1, 0.0)}.scope<\/pre>\n<p>\u63d2\u5165\u4e00\u4e2aUGen\uff0c\u4e00\u4e2a<span style=\"color: #0000ff;\"><em>MouseX<\/em><\/span>\u63a7\u5236\uff0c\u5230\u9891\u7387\u8f93\u5165\uff1a<\/p>\n<pre class=\"brush:jfx\">{SinOsc.ar(MouseX.kr(440,880), 0.0, 0.1, 0.0)}.scope<\/pre>\n<p>\u8ba9\u9891\u7387\u7684\u53c2\u6570\u4fdd\u6301\u4e4b\u524d\uff08\u5b83\u662f\u7b2c\u4e00\u4e2a\u8f93\u5165\uff0c\u8bb0\u4f4f\uff09\uff0c\u4f7f\u7528\u5192\u53f7\u7ed9\u5230\u7279\u5b9a\u7684\u8f93\u51fa\u6bd4\u4f8b\uff0c\u5e76\u8ba9\u5176\u4ed6\u5f15\u6570\u4e3a\u9ed8\u8ba4\uff1a<\/p>\n<pre class=\"brush:jfx\">{SinOsc.ar(MouseX.kr(440,880), mul:0.1)}.scope<\/pre>\n<hr \/>\n<p>\u5b8c\u6210\u4e00\u4ef6\u4e8b\u7684\u65b9\u6cd5\u6c38\u8fdc\u4e0d\u6b62\u4e00\u4e2a\u3002\u6bd4\u5982\u8bf4\uff0c\u8981\u9650\u5236\u4e00\u4e2a\u5355\u72ec<span style=\"color: #0000ff;\"><em>SinOsc<\/em><\/span>\u7684\u97f3\u91cf\uff0c\u6211\u4eec\u53ef\u4ee5\u5199\uff1a<\/p>\n<pre class=\"brush:jfx\">\/\/ \u76f4\u63a5\u63d0\u4f9bfreq\u548cmul\u7684\u5f15\u6570\r\n{SinOsc.ar(440,0.0,0.1)}.scope<\/pre>\n<p>\u6216\u8005<\/p>\n<pre class=\"brush:jfx\">\/\/ \u4ec5\u8bbe\u7f6e\u500d\u52a0\u5668\u7684\u53c2\u6570\r\n{SinOsc.ar(mul:0.1)}.scope<\/pre>\n<p>\u6216\u8005<\/p>\n<pre class=\"brush:jfx\">{0.1*SinOsc.ar}.scope<\/pre>\n<p>\u6216\u8005<\/p>\n<pre class=\"brush:jfx\">\/\/ \u4f7f\u7528dB\uff01\u5728\u521d\u59cb\u5316UGen\u7684\u65f6\u5019\u8ba1\u7b97\u4ec5\u4e00\u6b21\u3002\r\n{SinOsc.ar(440, mul: -20.dbamp)}.scope<\/pre>\n<hr \/>\n<p>\u4e00\u6761\u8c03\u5236\u7684\u7b14\u8bb0\uff1a<\/p>\n<p><em><strong>mul <\/strong><\/em>\u548c\u00a0<em><strong>add<\/strong> <\/em>\u5bf9\u4e8e\u5efa\u7acb\u8c03\u5236\u5668(modulator)\u975e\u5e38\u6709\u7528\u3002<em><strong>mul <\/strong><\/em>\u8f93\u5165\u53ef\u4ee5\u83b7\u5f97\u7cbe\u786e\u7684\u8c03\u5236\uff0c\u5373\uff0c\u5c06\u4e0d\u540c\u7684\u4fe1\u53f7\u4e58\u5230\u4e00\u8d77\u3002<\/p>\n<p>\u4f7f\u7528\u4e00\u4e2a<span style=\"color: #0000ff;\"><em>SinOsc<\/em><\/span>\u8c03\u5236\u53e6\u4e00\u4e2a\u7684\u9891\u7387\uff1a<\/p>\n<pre class=\"brush:jfx\">{SinOsc.ar(SinOsc.ar(3,mul:40,add:440),0,0.1)}.scope<\/pre>\n<p>\u5185\u90e8\u7684<span style=\"color: #0000ff;\"><em>SinOsc<\/em><\/span>\u5c31\u662f\u4e00\u4e2a\u8c03\u5236\u5668\u3002\u6bcf\u79d2\u4e09\u6b21\uff0c\u5b83\u5728+-40\u95f4\u53d8\u5316\uff08\u7531\u00a0<em><strong>mul <\/strong><\/em>\u754c\u5b9a\uff09\u3002\u6211\u00a0<em><strong>add:440 <\/strong><\/em>\u4ee5\u4f7f\u8f93\u51fa\u503c\u5728400\u548c480\u4e4b\u95f4\u6e38\u8d70\u3002\u8fd9\u5bf9\u5916\u90e8<span style=\"color: #0000ff;\"><em>SinOsc<\/em><\/span>\u6765\u8bf4\uff0c\u662f\u4e00\u4e2a\u5408\u9002\u7684\u8f93\u5165\u53d8\u5316\u9891\u7387\u63a7\u5236\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e24\u4e2a\u5f15\u6570\u88ab\u91c7\u7528\u5728\u5f88\u591aUGen\u4e2d\uff0c\u6211\u4eec\u5c06\u5728\u8fd9\u4efd\u6559\u7a0b\u4e2d\u5c06\u5b83\u4eec\u5206\u5f00\u6765\u8bf4\u8bf4\u3002\u5b83\u4eec\u975e\u5e38\u6709\u7528\uff0c\u56e0\u4e3a\u5b83\u4eec\u63d0\u4f9b\u4e86\u4e00\u79cd\u4fdd\u6301\u4fe1\u53f7\u88ab\u9002\u5f53\u4fdd\u6301\u5728\u4e00\u4e2a\u5408\u9002\u7684\u8303\u56f4\u5185\u5e76\u4f5c\u4e3a\u8f93\u51fa\u7ed9\u5176\u5b83UGen\u4f7f\u7528\u7684\u65b9\u6cd5\u2014\u2014\u56e0\u4e3a\u7cfb\u7edf\u97f3\u9891\u8f93\u51fa\u7684\u6570\u503c\u662f\u5728-1\u52301\u4e4b\u95f4\uff0c\u540c\u65f6\u4e00\u4e2a\u9891\u7387\u4e5f\u8bb8\u8981\u6c42\u7684\u6570\u5b57\u662f20\u52302000\uff0c\u8fd9\u4e9b\u4e0d\u540c\u79cd\u7c7b\u7684\u6bd4\u4f8b\u754c\u5b9a\u662f\u901a\u8fc7\u00a0mul \u548c\u00a0add \u5f15\u6570\u6765\u89e3\u51b3\u7684\u3002<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[69],"tags":[70],"class_list":["post-1001","post","type-post","status-publish","format-standard","hentry","category-supercollider3","tag-supercollider"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/learn.travelchinawith.me\/index.php?rest_route=\/wp\/v2\/posts\/1001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/learn.travelchinawith.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/learn.travelchinawith.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/learn.travelchinawith.me\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/learn.travelchinawith.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1001"}],"version-history":[{"count":12,"href":"https:\/\/learn.travelchinawith.me\/index.php?rest_route=\/wp\/v2\/posts\/1001\/revisions"}],"predecessor-version":[{"id":1018,"href":"https:\/\/learn.travelchinawith.me\/index.php?rest_route=\/wp\/v2\/posts\/1001\/revisions\/1018"}],"wp:attachment":[{"href":"https:\/\/learn.travelchinawith.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/learn.travelchinawith.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/learn.travelchinawith.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}