{"id":200,"date":"2013-06-23T15:38:09","date_gmt":"2013-06-23T22:38:09","guid":{"rendered":"http:\/\/www.earlevel.com\/main\/?p=200"},"modified":"2016-12-08T16:16:23","modified_gmt":"2016-12-09T00:16:23","slug":"envelope-generators-adsr-widget","status":"publish","type":"post","link":"https:\/\/www.earlevel.com\/main\/2013\/06\/23\/envelope-generators-adsr-widget\/","title":{"rendered":"Envelope generators\u2014ADSR widget"},"content":{"rendered":"<div id=\"container20130623\" style=\"width:600px; height:200px;\"><\/div>\n<p><script type=\"text\/javascript\" src=\"\/main\/wp-content\/uploads\/2013\/06\/ADSR.js\"><\/script><script type=\"text\/javascript\" src=\"\/main\/wp-content\/uploads\/2013\/06\/drawADSR.js\"><\/script><script type=\"text\/javascript\" src=\"\/scripts\/utils\/flotr2.min.js\"><\/script><\/p>\n<style type=\"text\/css\">\ntable#controls {\n    background: transparent;\n    border: 0;\n    border-collapse: separate;\n    border-spacing: 0;\n}\ntable#controls td {\n    border: none;\n    white-space: nowrap;\n}\n<\/style>\n<table id=\"controls\">\n<tr>\n<td>\n<input type=\"range\" min=\"0\" max=\"200\" value=\"100\" name=\"attackSlider\" id=\"attackSlider\" title=\"attack slider\" onchange='envADSR.setAttackRate(value); drawADSR();' oninput='envADSR.setAttackRate(value); drawADSR();'> Attack<br \/>\n<input type=\"range\" min=\"0\" max=\"200\" value=\"200\" name=\"decaySlider\" id=\"decaySlider\" title=\"decay slider\" onchange='envADSR.setDecayRate(value); drawADSR();' oninput='envADSR.setDecayRate(value); drawADSR();'> Decay<br \/>\n<input type=\"range\" min=\"0\" max=\"200\" value=\"120\" name=\"sustainSlider\" id=\"sustainSlider\" title=\"sustain slider\" onchange='envADSR.setSustainLevel(value\/200); drawADSR();' oninput='envADSR.setSustainLevel(value\/200); drawADSR();'> Sustain<br \/>\n<input type=\"range\" min=\"0\" max=\"200\" value=\"200\" name=\"releaseSlider\" id=\"releaseSlider\" title=\"release slider\" onchange='envADSR.setReleaseRate(value); drawADSR();' oninput='envADSR.setReleaseRate(value); drawADSR();'> Release\n<\/td>\n<td>\n<input type=\"range\" min=\"0\" max=\"200\" value=\"0\" name=\"ratioASlider\" id=\"ratioASlider\" title=\"ratio A slider\" onchange='envADSR.setTargetRatioA(0.001 * (Math.exp(12.0*value\/200)-1.0)); drawADSR();' oninput='envADSR.setTargetRatioA(0.001 * (Math.exp(12.0*value\/200)-1.0)); drawADSR();'> Attack Curve<br \/>\n<input type=\"range\" min=\"0\" max=\"200\" value=\"0\" name=\"ratioDRSlider\" id=\"ratioDRSlider\" title=\"ratio DR slider\" onchange='envADSR.setTargetRatioDR(0.001 * (Math.exp(12.0*value\/200)-1.0)); drawADSR();' oninput='envADSR.setTargetRatioDR(0.001 * (Math.exp(12.0*value\/200)-1.0)); drawADSR();'> Decay\/Release Curve<br \/>\nPlot:<select name=\"PlotType\" id=\"PlotType\" onchange=\"drawAllADSR()\"><option value=\"linear\">linear<\/option><option value=\"log\">log<\/option><\/td>\n<\/table>\n<p>This is the widget I used in making the ADSR video. It&#8217;s a JavaScript recreation of my C++ source code.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Attack Decay Sustain Release Attack Curve Decay\/Release Curve Plot:linearlog This is the widget I used in making the ADSR video. It&#8217;s a JavaScript recreation of my C++ source code.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,23,30],"tags":[],"_links":{"self":[{"href":"https:\/\/www.earlevel.com\/main\/wp-json\/wp\/v2\/posts\/200"}],"collection":[{"href":"https:\/\/www.earlevel.com\/main\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.earlevel.com\/main\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.earlevel.com\/main\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.earlevel.com\/main\/wp-json\/wp\/v2\/comments?post=200"}],"version-history":[{"count":4,"href":"https:\/\/www.earlevel.com\/main\/wp-json\/wp\/v2\/posts\/200\/revisions"}],"predecessor-version":[{"id":962,"href":"https:\/\/www.earlevel.com\/main\/wp-json\/wp\/v2\/posts\/200\/revisions\/962"}],"wp:attachment":[{"href":"https:\/\/www.earlevel.com\/main\/wp-json\/wp\/v2\/media?parent=200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.earlevel.com\/main\/wp-json\/wp\/v2\/categories?post=200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.earlevel.com\/main\/wp-json\/wp\/v2\/tags?post=200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}