<?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" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ creative coding - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ creative coding - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Mon, 25 May 2026 10:50:18 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/creative-coding/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ Everything you need to know about Insertion Sort algorithm ]]>
                </title>
                <description>
                    <![CDATA[ By Sanjula Madurapperuma Introduction Hi! I am Sanjula, and in this guide I hope to teach you a little bit about the Insertion Sort algorithm including: What is Insertion sort? Why is insertion sort important? Performance of Insertion Sort How does ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/everything-you-need-to-know-about-insertion-sort-algorithm/</link>
                <guid isPermaLink="false">66d460ee37bd2215d1e245c5</guid>
                
                    <category>
                        <![CDATA[ algorithms ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Backend Development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ coding ]]>
                    </category>
                
                    <category>
                        <![CDATA[ creative coding ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Java ]]>
                    </category>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technology ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Sun, 07 Jul 2019 13:32:38 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/06/image-44-1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Sanjula Madurapperuma</p>
<h3 id="heading-introduction"><strong>Introduction</strong></h3>
<p>Hi! I am <a target="_blank" href="https://www.linkedin.com/in/sanjula-madurapperuma/">Sanjula</a>, and in this guide I hope to teach you a little bit about the Insertion Sort algorithm including:</p>
<ul>
<li>What is Insertion sort?</li>
<li>Why is insertion sort important?</li>
<li>Performance of Insertion Sort</li>
<li>How does Insertion sort work?</li>
<li>Java Implementation of Insertion sort</li>
</ul>
<p>Let’s get started!</p>
<h3 id="heading-what-is-insertion-sort"><strong>What is Insertion sort?</strong></h3>
<p>It is a simple sorting algorithm that sorts an array one item at a time.</p>
<h3 id="heading-why-is-insertion-sort-important"><strong>Why is insertion sort important?</strong></h3>
<p>Insertion sort has several advantages including:</p>
<ul>
<li>The pure simplicity of the algorithm.</li>
<li>The relative order of items with equal keys does not change.</li>
<li>The ability to sort a list as it is being received.</li>
<li>Efficient for small data sets, especially in practice than other quadratic algorithms — i.e. O(n²).</li>
<li>It only requires a constant amount of additional memory space — O(1).</li>
</ul>
<h3 id="heading-performance-of-insertion-sort"><strong>Performance of Insertion Sort</strong></h3>
<ul>
<li>Worst-case performance of insertion sort is O(n²) comparisons and swaps.</li>
<li>Best-case performance is O(n) comparisons and O(1) swaps.</li>
<li>Average-case performance is O(n²) comparisons and swaps.</li>
</ul>
<h3 id="heading-how-does-insertion-sort-work"><strong>How does Insertion sort work?</strong></h3>
<p>In each iteration, insertion sort compares the current element with the next element and determines whether the current element is greater than the one it was compared to.</p>
<p>If this is <em>true</em>, then it leaves the element in its place and moves on to the next element. If it is <em>false</em>, then it finds its correct position in the sorted array and moves it to that position by shifting all the elements which are larger in the sorted array to one position ahead.</p>
<h3 id="heading-java-implementation-of-insertion-sort"><strong>Java Implementation of Insertion sort</strong></h3>
<p>P.S. — Try to implement it on your own first!</p>


<hr>
<p><strong>Congratulations!!!</strong> You have now absorbed the basic but essential knowledge about how Insertion Sort works.</p>
<p>For reference or reporting issues regarding the code above, use the following public GitHub Gist <a target="_blank" href="https://gist.github.com/sanjulamadurapperuma/25677635f216b9fa858d8051140e47f2">link</a>.</p>
<hr>
<p>Hope this was helpful. Thanks for reading! :)</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Creative Coding — How to create a VJ engine in JavaScript ]]>
                </title>
                <description>
                    <![CDATA[ By George Gally Learn how to dynamically inject JavaScript into webpages For years I’ve been using the browser for my performances and installations using my own simple homegrown VJ engine. And now, after you learn a few simple tricks, you can too… A... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-create-a-vj-engine-in-javascript-b63b7fb1c87b/</link>
                <guid isPermaLink="false">66c3511ad73001a6c0054beb</guid>
                
                    <category>
                        <![CDATA[ Art ]]>
                    </category>
                
                    <category>
                        <![CDATA[ creative coding ]]>
                    </category>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ learning to code ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technology ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 21 May 2018 09:37:10 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*2SwNYMIzezIXuauBXdNbHg.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By George Gally</p>
<h4 id="heading-learn-how-to-dynamically-inject-javascript-into-webpages">Learn how to dynamically inject JavaScript into webpages</h4>
<p>For years I’ve been using the browser for my performances and installations using my own simple homegrown VJ engine. And now, after you learn a few simple tricks, you can too…</p>
<h3 id="heading-a-quick-intro">A quick intro</h3>
<p>Firstly, what is a VJ engine? you might ask. And maybe even: what is a VJ? Here's a <a target="_blank" href="https://en.wikipedia.org/wiki/VJing">basic definition</a> of the characteristics of VJing:</p>
<blockquote>
<p>The creation or manipulation of imagery in realtime through technological mediation and for an audience, in synchronization to music.</p>
</blockquote>
<p>And a VJ engine is simply the software used for VJing.</p>
<p>But why would I build my own when there are so many VJ engines out there?</p>
<p>I never really loved VJ software — they always felt bloated and made everyone’s stuff look kinda the same. It’s kind of like when you first got your hands on Photoshop, and just blended a bunch of stuff together, added some filters, and it was cool (because it was the 90s). But most of all, I wanted tighter and better integration between developing content and the sound input frequencies.</p>
<p>I rarely VJ these days, but it still drives most of my installations and performances — anywhere I need multiple visualisations I use <em>RBVJ</em> (the <em>RB</em> is for <em>Radarboy</em> — that’s me) as a wrapper/player.</p>
<p><em>RBVJ</em> has gone through a number of iterations over the years, as I’ve bounced from Flash, to Processing, and finally now to JavaScript, all using the same simple system.</p>
<p>I had previously open sourced it and my content (before the days of Git and not really knowing there was a thing called open-source). It won a bunch of awards, and I saw my content being used in a whole bunch of places <a target="_blank" href="https://www.youtube.com/watch?v=XOhZgAPn_CU&amp;ab_channel=CalumRodger">which was nice</a>. So I thought it was time to make it available for others again, along with a bunch of content to show how I go about creative coding.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/zXTWFCVzeLIVWd0XKR5aH03BI647fO5gKJwb" alt="Image" width="1200" height="800" loading="lazy">
_from [radarboy3000 on Instagram](https://www.instagram.com/radarboy3000/" rel="noopener" target="<em>blank" title=")</em></p>
<p>Ok, that’s a long enough introduction. Show me the money, you say!</p>
<h3 id="heading-1-structuring-the-content">1. Structuring the Content</h3>
<p>Essentially, a VJ engine is just a fancy content browser and player. So what we really need is a way to retrieve and play our content.</p>
<p>You could just dump all your content in a folder, but this system is what has worked best for me, allowing a simple structure for keyboard control:</p>
<ul>
<li><strong>Shift 0–9 to change sets</strong></li>
<li><strong>Keys 0–9 to change banks</strong></li>
<li><strong>Keys a-z to choose content</strong> within the bank.</li>
</ul>
<p>This gives you 2,700 files to work with. If you really (really!?) wanted more, you could also double that by accessing another 26 files per bank with shift A-Z).</p>
<p>Like most HTML projects, I have a simple top-level structure, and keep the VJ content in a numbered structure inside the <strong>art</strong> folder, like so:</p>
<pre><code>index.html/css/js/art &lt;- content goes here
</code></pre><p>My content folder (/art) contains 10 numbered folders, which I refer to as <strong>sets</strong>. Inside each set are another 10 numbered folders representing <strong>banks</strong>. And inside each bank are 27 individual numbered content files, like so:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/9SfMeEsL-OHXdShxWbJ3ZlihlxiYXlNw0Oqx" alt="Image" width="564" height="1008" loading="lazy">
<em>Inside /art are 10 sets of folders. Each set contains 10 banks, inside each bank are 27 javascript files. Banks and sets are accessed by the number keys and the content through keys a-z</em></p>
<h3 id="heading-2-retrieving-and-playing-the-content">2. Retrieving and Playing the Content</h3>
<p>Now we just need a way to access our files, which is done by injecting content into our index page.</p>
<p>And it’s pretty simple to do this.</p>
<p>The magic happens in a function called I’ve <strong>loadJS().</strong> It creates a script tag within the page’s head and then injects some JavaScript into it (which would be our content). We trigger this function via a keypress (but could also be a midi or OSC signal) and pass the filename of the content we want into it. Then the script is available on the page.</p>
<pre><code><span class="hljs-comment">// INJECT JS ONTO PAGE</span>
</code></pre><pre><code><span class="hljs-keyword">var</span> my_script;
</code></pre><pre><code><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">loadJS</span>(<span class="hljs-params">filename</span>) </span>{
</code></pre><pre><code> <span class="hljs-comment">// delete injected JavaScript if there’s been some loaded in before if (my_script != undefined)   document.getElementsByTagName("head")[0].removeChild(my_script);</span>
</code></pre><pre><code> <span class="hljs-comment">// create a script element my_script = document.createElement(’script’); my_script.setAttribute("type", "text/javascript");</span>
</code></pre><pre><code> <span class="hljs-comment">// Load the file in and insert it into the page’s head tag my_script.setAttribute("src", filename); document.getElementsByTagName("head")[0].appendChild(my_script);</span>
</code></pre><pre><code>}
</code></pre><p>We listen for keypresses with an event listener, which calls a function called <strong>onKeyDown()</strong><em>,</em> like so:</p>
<pre><code><span class="hljs-built_in">window</span>.addEventListener( ’keydown’, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"> event </span>) </span>{   onKeyDown( event ); });
</code></pre><p>The listener passes the event object to the function, which contains a bunch of useful stuff. Here what we’re interested in: the <strong>event.keycode</strong>. Pressing the ‘a’ key gives us a <strong>keycode</strong> of 65, and pressing us a ‘z’ gives us a <strong>keycode</strong> of 90. So we simply subtract 65 from the <strong>keycode</strong> to give us the required file number and pass this value into a <strong>changeFile()</strong> function, which I’ll show in a bit.</p>
<p>Similarly we want keys 0–9 (keycodes 48 to 57, so subtract 48 ) to change banks. We also want test to see whether the shift key has been pressed to load sets. The event object has a handy <strong>event.shiftKey</strong> variable for this, so our <strong>onKeyDown</strong> function will look like so:</p>
<pre><code><span class="hljs-comment">// KeyPress Stuff</span>
</code></pre><pre><code><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">onKeyDown</span>(<span class="hljs-params"> event </span>) </span>{
</code></pre><pre><code>    <span class="hljs-keyword">var</span> keyCode = event.keyCode;
</code></pre><pre><code>   <span class="hljs-comment">// CHANGE FILE // keys a-z   if ( keyCode &gt;= 65 &amp;&amp; keyCode &lt;= 90 ) {      changeFile(keyCode - 65);</span>
</code></pre><pre><code>   <span class="hljs-comment">// CHANGE SET AND BANK // keys 0-9   } else if ( keyCode &gt;= 48 &amp;&amp; keyCode &lt;= 57 ) {</span>
</code></pre><pre><code>      <span class="hljs-comment">// Test whether the shift key is also being pressed      if( event.shiftKey ) {       changeBank( keyCode-48 );      } else {       changeSet( keyCode-48 );      }</span>
</code></pre><pre><code>   }
</code></pre><pre><code>}
</code></pre><p>The <strong>changeFile()</strong> function basically just takes the keypress and converts it into a URL. It calls our <strong>loadJS()</strong> function to inject the content into the page, and boom we’re away...</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/IzvgpLah3pAqNZ0KLPWx0rHgsqBWGLf916TP" alt="Image" width="800" height="496" loading="lazy">
_from [radarboy3000 on Instagram](https://www.instagram.com/radarboy3000/" rel="noopener" target="<em>blank" title=")</em></p>
<p>So our <strong>changeFile()</strong> function would look like this:</p>
<pre><code><span class="hljs-keyword">var</span> current_file = <span class="hljs-number">0</span>;<span class="hljs-keyword">var</span> current_set = <span class="hljs-number">0</span>;<span class="hljs-keyword">var</span> current_bank = <span class="hljs-number">0</span>;
</code></pre><pre><code><span class="hljs-keyword">var</span> art_location = <span class="hljs-string">"art/"</span>;
</code></pre><pre><code><span class="hljs-comment">// FILE LOADER FUNCTIONS</span>
</code></pre><pre><code><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">changeFile</span>(<span class="hljs-params">file</span>) </span>{
</code></pre><pre><code>  current_file = file;  <span class="hljs-keyword">var</span> loc = current_set + <span class="hljs-string">'/'</span> + current_bank + <span class="hljs-string">'/'</span> + current_file;  <span class="hljs-keyword">var</span> filename = contentLocation + loc + <span class="hljs-string">'.js'</span>;  loadJS(filename);  <span class="hljs-built_in">document</span>.location.hash = loc; <span class="hljs-comment">//console.log("File: " + loc);</span>
</code></pre><pre><code>}
</code></pre><p>I also have an <strong>art_location</strong> variable in case I want to have different collections of visuals (so I can have different folders for different shows and installations). I also add the filename as a hash (https://127.0.0.1/#set/bank/file) to the browser’s URL to make it easy to see where I am.</p>
<p>Our <strong>changeBank()</strong> and <strong>changeSet()</strong> functions set the <strong>current_bank</strong> and <strong>current_set</strong> variables. Then they just call the <strong>changeFile()</strong> function to pull up the correct file.</p>
<p>For housekeeping, I also reset all the counters — setting <strong>current_file</strong> back to 0 when I change banks, and the <strong>current_bank</strong> back to 0 when I change sets. This is so I know that when I change <strong>banks</strong>, the file playing will be the first file in the bank. Similarly, when I change <strong>sets,</strong> the file playing will reset to be be the first file from the first bank of the current set (<strong>current_set/0/0.js</strong>).</p>
<p>A bit of a mouthful, but the functions are actually super simple:</p>
<pre><code><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">changeSet</span>(<span class="hljs-params">set</span>) </span>{
</code></pre><pre><code>  current_set = set;  <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"changeSet: "</span> + current_set);
</code></pre><pre><code>  <span class="hljs-comment">// reset bank number  changeBank(0);</span>
</code></pre><pre><code>}
</code></pre><pre><code><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">changeBank</span>(<span class="hljs-params">bank</span>) </span>{
</code></pre><pre><code>current_bank = bank;  <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"changeBank: "</span> + current_bank);
</code></pre><pre><code>  <span class="hljs-comment">// reset file number and load new file  changeFile(0);</span>
</code></pre><pre><code>}
</code></pre><p>And so the complete code for your basic VJ engine looks like this:</p>
<pre><code><span class="hljs-comment">// FILE LOADER FUNCTIONS</span>
</code></pre><pre><code><span class="hljs-keyword">var</span> art_location = <span class="hljs-string">"/art"</span>;
</code></pre><pre><code><span class="hljs-keyword">var</span> fileref;<span class="hljs-keyword">var</span> current_file = <span class="hljs-number">0</span>;<span class="hljs-keyword">var</span> current_set = <span class="hljs-number">0</span>;<span class="hljs-keyword">var</span> current_bank = <span class="hljs-number">0</span>;
</code></pre><pre><code><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">changeFile</span>(<span class="hljs-params"> file </span>) </span>{  reset()  current_file = file;  <span class="hljs-keyword">var</span> loc = current_set + <span class="hljs-string">'/'</span> + current_bank + <span class="hljs-string">'/'</span> + current_file;  <span class="hljs-keyword">var</span> filename = <span class="hljs-string">'art/'</span> + loc + <span class="hljs-string">'.js'</span>;  loadJS( filename );  <span class="hljs-built_in">document</span>.location.hash = loc;  <span class="hljs-comment">//console.log("File: " + loc);}</span>
</code></pre><pre><code><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">changeSet</span>(<span class="hljs-params"> set </span>) </span>{  current_set = set;  current_bank = <span class="hljs-number">0</span>;  <span class="hljs-built_in">console</span>.log( <span class="hljs-string">"changeSet: "</span> + current_bank );  <span class="hljs-comment">// reset  changeFile( 0 );}</span>
</code></pre><pre><code><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">changeBank</span>(<span class="hljs-params"> bank </span>) </span>{  current_bank = bank;  <span class="hljs-built_in">console</span>.log( <span class="hljs-string">"changeBank: "</span> + current_bank );  changeFile( <span class="hljs-number">0</span> );}
</code></pre><pre><code><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">reset</span>(<span class="hljs-params"></span>)</span>{  ctx.clearRect( <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, w, h );  ctx2.clearRect( <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, w, h );  ctx3.clearRect( <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, w, h );  ctx.lineCap = <span class="hljs-string">"butt"</span>;}
</code></pre><pre><code><span class="hljs-comment">// INJECT JS ONTO PAGE</span>
</code></pre><pre><code><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">loadJS</span>(<span class="hljs-params"> filename </span>) </span>{
</code></pre><pre><code><span class="hljs-keyword">if</span> ( fileref != <span class="hljs-literal">undefined</span> ) <span class="hljs-built_in">document</span>.getElementsByTagName( <span class="hljs-string">"head"</span> )[ <span class="hljs-number">0</span> ].removeChild( fileref );  fileref = <span class="hljs-built_in">document</span>.createElement( <span class="hljs-string">'script'</span> );  fileref.setAttribute( <span class="hljs-string">"type"</span>, <span class="hljs-string">"text/javascript"</span> );  fileref.setAttribute( <span class="hljs-string">"src"</span>, filename );  <span class="hljs-built_in">document</span>.getElementsByTagName( <span class="hljs-string">"head"</span> )[ <span class="hljs-number">0</span> ].appendChild( fileref );
</code></pre><pre><code>}
</code></pre><p><img src="https://cdn-media-1.freecodecamp.org/images/XnCcboR0KFixjweg9JBvoGifwsfXUZqyMcyT" alt="Image" width="1200" height="800" loading="lazy">
_from [radarboy3000 on Instagram](https://www.instagram.com/radarboy3000/" rel="noopener" target="<em>blank" title=")</em></p>
<p>All that’s left to show you is how I structure the actual content files, which use an encapsulated function like so:</p>
<pre><code><span class="hljs-comment">// RBVJ art</span>
</code></pre><pre><code>rbvj = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
</code></pre><pre><code>  draw = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{     <span class="hljs-comment">// do some creative coding here  }</span>
</code></pre><pre><code>}();
</code></pre><p>The function <strong>rbvj()</strong> is what gets injected into the page. It’s reused, so that every time a new file is inserted into my page, the memory gets flushed from all previous content.</p>
<p>By encapsulating the code (see the ‘()’ after the function), any code inside the <strong>rbvj()</strong> function will run automatically when the file is injected into the page.</p>
<p>You’ll notice that inside the content, I have a <strong>draw()</strong> function (this one from my own <strong>creative_coding.js</strong> utility script). It’s just a simple loop that uses JavaScript’s <strong>requestAnimationFrame()</strong> and is able to vary the frame rate.</p>
<pre><code><span class="hljs-keyword">var</span> frame_number = <span class="hljs-number">0</span>;<span class="hljs-keyword">var</span> frame_rate = <span class="hljs-number">60</span>;<span class="hljs-keyword">var</span> last_update = <span class="hljs-built_in">Date</span>.now();
</code></pre><pre><code><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">loop</span>(<span class="hljs-params"></span>) </span>{
</code></pre><pre><code><span class="hljs-keyword">var</span> now = <span class="hljs-built_in">Date</span>.now();  <span class="hljs-keyword">var</span> elapsed_mils = now - last_update;
</code></pre><pre><code><span class="hljs-keyword">if</span> ((<span class="hljs-keyword">typeof</span> <span class="hljs-built_in">window</span>.draw == <span class="hljs-string">'function'</span>) &amp;&amp; (elapsed_mils &gt;= (<span class="hljs-number">1000</span> / <span class="hljs-built_in">window</span>.frame_rate))) {    <span class="hljs-built_in">window</span>.draw();    frame_number++;    last_update = now - elapsed_mils % (<span class="hljs-number">1000</span> / <span class="hljs-built_in">window</span>.frame_rate);  }  requestAnimationFrame(loop);
</code></pre><pre><code>};
</code></pre><p>And that’s pretty much it. You now have a working VJ engine in the bowser.</p>
<h3 id="heading-3-some-other-things-to-know-that-may-be-helpful">3. Some other things to know that may be helpful</h3>
<p>I normally just plug my computer’s sound input straight into an input from the venue’s mixer or amp (I use a version of my standard microphone input <strong>mic.js</strong> file, which you can read more about <a target="_blank" href="https://hackernoon.com/creative-coding-using-the-microphone-to-make-sound-reactive-art-part1-164fd3d972f3">here</a>). And I have keys setup (in my case, the <strong>plus</strong> and <strong>minus</strong> keys) to adjust the input levels up or down, so I don’t have to keep accessing the mixer.</p>
<p>Also note that for sound input, you’ll need a secure HTTPS connection — or if you use something like Atom’s Live Server, then that’s built in.</p>
<p>I also have a bunch of other keys set up for simple audio and visual filters (see how to make a pixelation filter <a target="_blank" href="https://hackernoon.com/creating-a-pixelation-filter-for-creative-coding-fc6dc1d728b2">here</a>).</p>
<p>I mostly don’t use a preview screen/interface, but it’s easy enough to build one. Just create a new HTML page and let the pages talk to each other through a socket.</p>
<p>And finally, one last tip: when developing content, simply make a function to read in the current hash value of the browser, and call the <strong>loadFile()</strong> function on page load. That way, when you’re working on a file and you reload the page, that file is automatically displayed.</p>
<p>And that’s pretty much it. Hope this helps you get out there and show more of your content. As I mentioned previously, I’ve included a whole bunch of content for you to play around with and test so you can get a feel of how I create my stuff. If you use or alter any of it, I’d love to see how, where, and what you did with it. So please drop me a line.</p>
<p><strong><em>Happy coding. And thanks for reading!</em></strong></p>
<p>As usual the full code is available <a target="_blank" href="https://github.com/GeorgeGally/rbvj">on Github</a>.</p>
<p><em>This article is part of an ongoing series of tutorials on learning creative coding in pure JavaScript. As yes, I should be doing this in ES6, but wanted to keep this as simple as possible to understand.</em></p>
<p>You can see previous all my previous creative coding tutorials <a target="_blank" href="https://medium.com/@radarboy3000">here</a>.</p>
<p><strong>And follow me here for updates, techniques and eye candy:</strong></p>
<p><a target="_blank" href="https://www.instagram.com/radarboy3000/"><strong>@radarboy3000 * Instagram photos and videos</strong></a><br><a target="_blank" href="https://www.instagram.com/radarboy3000/">_3,960 Followers, 843 Following, 1,082 Posts - See Instagram photos and videos from @radarboy3000_www.instagram.com</a><a target="_blank" href="https://twitter.com/radarboy_japan"><strong>George Gally (@radarboy_japan) | Twitter</strong></a><br><a target="_blank" href="https://twitter.com/radarboy_japan">_The latest Tweets from George Gally (@radarboy_japan). Media artist, technologist, tinkerer, dreamer. Motion reaction…_twitter.com</a><a target="_blank" href="https://www.facebook.com/radarboy3000"><strong>Radarboy</strong></a><br><a target="_blank" href="https://www.facebook.com/radarboy3000">_Radarboy. 130 likes · 7 talking about this. Art, design visualisation, hacks_www.facebook.com</a></p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
