<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[p5.js and Magic Mirror]]></title><description><![CDATA[<p dir="auto">Hello developeing Eng…<br />
I wondered about use way p5.js.<br />
I’m used raspberry pi 3B &amp; installed Magic Mirror and I also insert other modules .</p>
<p dir="auto">but I want to make a my custom module from p5.js.(or p5.js.example)<br />
How can I insert HTML.js to node.js and are there any way to insert Magic mirror?<br />
please give me any information about that…<br />
Thank you!</p>
]]></description><link>https://forum.magicmirror.builders/topic/6847/p5-js-and-magic-mirror</link><generator>RSS for Node</generator><lastBuildDate>Fri, 12 Jun 2026 11:09:42 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/6847.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Mar 2018 05:07:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to p5.js and Magic Mirror on Sun, 08 Apr 2018 12:30:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/leejaeuk" aria-label="Profile: leejaeuk">@<bdi>leejaeuk</bdi></a> You should create a GitHub repository for your code so that someone can have a look at it.</p>
]]></description><link>https://forum.magicmirror.builders/post/38129</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/38129</guid><dc:creator><![CDATA[raywo]]></dc:creator><pubDate>Sun, 08 Apr 2018 12:30:05 GMT</pubDate></item><item><title><![CDATA[Reply to p5.js and Magic Mirror on Thu, 05 Apr 2018 09:11:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/raywo" aria-label="Profile: raywo">@<bdi>raywo</bdi></a><br />
i’m still not solved this problem please help me…</p>
]]></description><link>https://forum.magicmirror.builders/post/37977</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/37977</guid><dc:creator><![CDATA[leejaeuk]]></dc:creator><pubDate>Thu, 05 Apr 2018 09:11:25 GMT</pubDate></item><item><title><![CDATA[Reply to p5.js and Magic Mirror on Thu, 29 Mar 2018 01:53:30 GMT]]></title><description><![CDATA[<p dir="auto">also i changed</p>
<pre><code>mic = new p5.AudioIn();
mic.start();
fft = new p5.FFT();
fft.setInput(mic);
</code></pre>
<p dir="auto">new p5.AudioIn(); ,new p5.FFT();  -&gt; p5.AudioIn(); p5.FFT();,<br />
and -&gt; pFive.AudioIn();  pFive.FFT();  and -&gt; new Five.AudioIn(); , new pFive.FFT();</p>
<p dir="auto">but all code didn’t work :(</p>
]]></description><link>https://forum.magicmirror.builders/post/37583</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/37583</guid><dc:creator><![CDATA[leejaeuk]]></dc:creator><pubDate>Thu, 29 Mar 2018 01:53:30 GMT</pubDate></item><item><title><![CDATA[Reply to p5.js and Magic Mirror on Thu, 29 Mar 2018 01:35:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/raywo" aria-label="Profile: raywo">@<bdi>raywo</bdi></a></p>
<p dir="auto">raywo, i tried your suggestion<br />
initially, your module(gameoflife) is well doing<br />
and i fixed your code.</p>
<p dir="auto">this is fixed code MMM-GameOfLife.js</p>
<pre><code>  var mic, fft;

  pFive.setup = function() {
    pFive.createCanvas(710,400);
    pFive.noFill();

    mic = new p5.AudioIn();
    mic.start();
    fft = new p5.FFT();
    fft.setInput(mic);
  };
</code></pre>
<p dir="auto">and</p>
<p dir="auto"><img src="/assets/uploads/files/1522287296526-b6f2966c-8941-4a66-ab9d-27ac2c701ccb-image.png" alt="0_1522287293605_b6f2966c-8941-4a66-ab9d-27ac2c701ccb-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">but it didn’t work well. So i just write createCanvas and pFive.background (255) then white 710 400 size window is display well in mirror but full code is not work. i think</p>
<pre><code>    mic = new p5.AudioIn();
    mic.start();
    fft = new p5.FFT();
    fft.setInput(mic);
</code></pre>
<p dir="auto">code is not appropriate… please fix my code !</p>
]]></description><link>https://forum.magicmirror.builders/post/37518</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/37518</guid><dc:creator><![CDATA[leejaeuk]]></dc:creator><pubDate>Thu, 29 Mar 2018 01:35:23 GMT</pubDate></item><item><title><![CDATA[Reply to p5.js and Magic Mirror on Wed, 28 Mar 2018 08:01:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/raywo" aria-label="Profile: raywo">@<bdi>raywo</bdi></a><br />
i will try it!<br />
i’m really thank you for your kindness<br />
really appreciate!</p>
]]></description><link>https://forum.magicmirror.builders/post/37515</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/37515</guid><dc:creator><![CDATA[leejaeuk]]></dc:creator><pubDate>Wed, 28 Mar 2018 08:01:27 GMT</pubDate></item><item><title><![CDATA[Reply to p5.js and Magic Mirror on Wed, 28 Mar 2018 07:41:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/leejaeuk" aria-label="Profile: leejaeuk">@<bdi>leejaeuk</bdi></a> The <code>getScript</code> function is responsible for making p5.js available to your code. Thats why it reads like</p>
<pre><code>getScripts: function() {
    return [
      "https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.0/p5.js"
    ];
  },
</code></pre>
<p dir="auto">Keep in mind that p5.js runs in the client. That’s why you need it in your module’s js file.</p>
<p dir="auto">The easiest way to incorporate your sound frequency code would be to insert it in the <code>makeSketch</code> function.</p>
<pre><code>makeSketch: function(conf) {
  return function(pFive) {
    YOUR CODE HERE
  }
}
</code></pre>
<p dir="auto">Your code will have a <code>setup</code> and a <code>draw</code> function. These need to be prefixed with <code>pFive</code>. Just look at my code to get the idea.</p>
]]></description><link>https://forum.magicmirror.builders/post/37513</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/37513</guid><dc:creator><![CDATA[raywo]]></dc:creator><pubDate>Wed, 28 Mar 2018 07:41:06 GMT</pubDate></item><item><title><![CDATA[Reply to p5.js and Magic Mirror on Wed, 28 Mar 2018 06:56:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/raywo" aria-label="Profile: raywo">@<bdi>raywo</bdi></a> Thank you for your response!<br />
i have seen that code and i have several question of your code!</p>
<p dir="auto">My insert code of p5.js is (<a href="https://p5js.org/examples/sound-frequency-spectrum.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://p5js.org/examples/sound-frequency-spectrum.html</a>)</p>
<p dir="auto">and your code, maybe “<a href="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.0/p5.js" target="_blank" rel="noopener noreferrer nofollow ugc">https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.0/p5.js</a>” is adding a p5.js library(right?)</p>
<p dir="auto">next, i think  function  : makeSketch is main code of p5.js.<br />
but i have no idea , how can i added  ‘sound-frequency-spectrum’ code. it is little bit complicate for me…</p>
<p dir="auto">is it okay just change [ pFive.setup = function(), pFive.draw = function()]?</p>
]]></description><link>https://forum.magicmirror.builders/post/37508</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/37508</guid><dc:creator><![CDATA[leejaeuk]]></dc:creator><pubDate>Wed, 28 Mar 2018 06:56:05 GMT</pubDate></item><item><title><![CDATA[Reply to p5.js and Magic Mirror on Wed, 28 Mar 2018 06:21:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/leejaeuk" aria-label="Profile: leejaeuk">@<bdi>leejaeuk</bdi></a> Have look at my <a href="https://github.com/raywo/MMM-GameOfLife" target="_blank" rel="noopener noreferrer nofollow ugc">GameOfLife</a> Module. It uses p5.js.</p>
]]></description><link>https://forum.magicmirror.builders/post/37507</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/37507</guid><dc:creator><![CDATA[raywo]]></dc:creator><pubDate>Wed, 28 Mar 2018 06:21:34 GMT</pubDate></item></channel></rss>