<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.emc23.com/?action=history&amp;feed=atom&amp;title=Build_a_synth_in_Chrome_Browser</id>
	<title>Build a synth in Chrome Browser - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.emc23.com/?action=history&amp;feed=atom&amp;title=Build_a_synth_in_Chrome_Browser"/>
	<link rel="alternate" type="text/html" href="https://wiki.emc23.com/?title=Build_a_synth_in_Chrome_Browser&amp;action=history"/>
	<updated>2026-04-10T22:46:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.38.2</generator>
	<entry>
		<id>https://wiki.emc23.com/?title=Build_a_synth_in_Chrome_Browser&amp;diff=135&amp;oldid=prev</id>
		<title>77.95.96.123: Created page with &quot;* WebMidi.js * P5.js     [code]   function setup() {   // put setup code here     WebMidi.enable(function (err) {         if (err) {                 console.log(&quot;WebMidi could...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.emc23.com/?title=Build_a_synth_in_Chrome_Browser&amp;diff=135&amp;oldid=prev"/>
		<updated>2019-06-26T12:36:12Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;* WebMidi.js * P5.js     [code]   function setup() {   // put setup code here     WebMidi.enable(function (err) {         if (err) {                 console.log(&amp;quot;WebMidi could...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;* WebMidi.js&lt;br /&gt;
* P5.js&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  [code]&lt;br /&gt;
  function setup() {&lt;br /&gt;
  // put setup code here&lt;br /&gt;
    WebMidi.enable(function (err) {&lt;br /&gt;
        if (err) {&lt;br /&gt;
                console.log(&amp;quot;WebMidi could not be enabled.&amp;quot;, err);&lt;br /&gt;
                } else {&lt;br /&gt;
&lt;br /&gt;
                        console.log(&amp;quot;WebMidi enabled!&amp;quot;);&lt;br /&gt;
                        console.log(WebMidi.inputs);&lt;br /&gt;
                        //console.log(WebMidi.outputs);&lt;br /&gt;
                        // Retrieve an input by name, id or index&lt;br /&gt;
                        //var input = WebMidi.getInputByName(&amp;quot;Launch Control&amp;quot;);&lt;br /&gt;
                        var input = WebMidi.getInputById(&amp;quot;input-0&amp;quot;);&lt;br /&gt;
                   &lt;br /&gt;
                        input.addListener(&amp;#039;controlchange&amp;#039;, &amp;quot;all&amp;quot;,&lt;br /&gt;
                            function (e) {&lt;br /&gt;
                              console.log(&amp;quot;Received &amp;#039;controlchange&amp;#039; message.&amp;quot;, e.data[2]);&lt;br /&gt;
                         //        console.log(&amp;quot;Received &amp;#039;controlchange&amp;#039; message.&amp;quot;, e);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                            }&lt;br /&gt;
                          );&lt;br /&gt;
                          // Check for the presence of an event listener (n such cases, you cannot use anonymous functions).&lt;br /&gt;
                          function test(e) { &lt;br /&gt;
                            console.log(e);&lt;br /&gt;
                           }&lt;br /&gt;
                        //  input.addListener(&amp;#039;programchange&amp;#039;, 12, test);&lt;br /&gt;
                        input.addListener(&amp;#039;controlchange&amp;#039;, &amp;quot;all&amp;quot;,function(e) {&lt;br /&gt;
                            console.log(&amp;quot;value: &amp;quot; + e.value);&lt;br /&gt;
                            draw(e)&lt;br /&gt;
                        });&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    );&lt;br /&gt;
  }&lt;br /&gt;
  function draw(e) {&lt;br /&gt;
   ellipse(50, 50, 80, e.value);&lt;br /&gt;
  // put drawing code here&lt;br /&gt;
  }&lt;br /&gt;
  [/code]&lt;/div&gt;</summary>
		<author><name>77.95.96.123</name></author>
	</entry>
</feed>