You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
charlie roberts
charlieroberts
Primary developer of gibber, gibberish, genish, and other libraries. Co-developer of the gibberwocky live-coding environments.
A tutorial on using browserify with three.js and glslify.
IGM-531/790: browserify and modularizing code
There are a variety of systems for modularizing JS code, and a huge number of libraries have been created over the users for this. The simplest method is to check for the existence of a global object (we’ve used app for this previously) and place our code into this object. If it doesn’t exist, create it first. For example:
… but ignore the perlin noise so that we just have a sphere on the screen.
Simple translation
How do we move a primitive around the screen? We can do this by applying an offset to the current point being sampled by our raytracer. Remember that this point is passed to our doModel function in our shader. Our typical doModel for rendering a sphere is as follows:
2-op FM synthesis, beginning with low-frequency oscillation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Notes from a workshop on using gibberwocky for PLOrk
# PLOrk gibberwocky workshop 4/12/2018
Some important not-very-well documented aspects of gibberwocky
This section will mainly focus on writing custom patterns and pattern transformations, which should enable you, with a bit of time and programming knowledge to create any type of generative music system your heart desires in gibberwocky.
A sequence consists of a pattern for output and a pattern for scheduling (“values” and “timings”). Each pattern is just a function that returns a value.
When you pass arrays or special objects to any call to .seq, this objects are wrapped in functions. For example, consider the following sequence:
namespace('test').seq( [0,1,2,3], 1 )
The first array of numbers (0,1,2,3) is converted to a function that outputs each value, one at a time, progressing linearly and looping when it reaches the end of the arrray. The second argument to .seq is converted to a function that always outputs the same value, in this case 1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A brief description of genish, gibberish, and gibber.audio.lib
A JS audio ecosystem
Interested in both browser-based audio and in per-sample processing techniques
• the web audio api (WAAPI) only provides block-based nodes, with the exception of the ScriptProcessor node and the AudioWorklet.
• This precludes lots of important synthesis techniques (feedback, hard sync, audio rate modulation of scheduling etc.)
• The ScriptProcessor and the AudioWorklet let you write sample-level processing using JavaScript. How can we write DSP in a dynamic language like JavaScript that is efficient enough to explore such techniques?
Three libraries:
• genish.js: A collection of DSP helpers for dealing with phase, buffers, math operations, and control flow. Optimized for efficiency by avoiding branching, closures, and inheritance, and by only using a single block of memory. Loosely based on Gen for Max_MSP_Jitter.
• gibberish.js: Synths, effects, and sequencing using functions created with genish.js.
• gibber.audio.lib: Rapid development and live coding using synths and