Skip to content

Instantly share code, notes, and snippets.

View charlieroberts's full-sized avatar

charlie roberts charlieroberts

View GitHub Profile
@charlieroberts
charlieroberts / AFrame.tutorial.md
Last active March 26, 2019 22:22
A-Frame tutorial

A-Frame Tutorial

#aframe #webvr #imgd-5100

This tutorial is designed to get you up to speed with controlling A-Frame entities in JavaScript, including basic interaction. For other tasks, see the examples and hundreds of other A-Frame tutorials out there.

Basic Setup

  1. So, the easiest way to get started is probably to go to the A-Frame website, click on the first Example (Hello WebVR), and then click the “View Source” button in the upper right corner. This will open the project up in Glitch. If you then scroll down, you can click on the “Remix your own” button to start creating working on your own copy of the project. You should see three geometries and a plane.
  2. For purposes of this tutorial, go ahead and delete everything between the <body> and </body> tags in the index.html file. Hit the “Show Live” button to see your (now blank) composition in another tab. Drag that tab out to another window for easier editing / hot reloading.
  3. Let’s add some stuff! Everything in
@charlieroberts
charlieroberts / imgd-slack-code-of-conduct.md
Created February 5, 2019 21:20
A code of conduct for the WPI IMGD Slack

WPI IMGD Slack: Code of Conduct

Welcome!

The WPI IMGD Slack channel is intended for current and former students and faculty in the Interactive Media and Game Development Program at WPI. It’s a place for us to share works in progress, project ideas, and opportunities for engaging with the broader community. And we can chat about life at WPI, make lunch plans, etc.

The current admins are:

@charlieroberts
charlieroberts / designForOthers.markdown
Created November 5, 2018 15:27
design for others demo day

Design for Others Demo Day

For prototype observers

  1. Each group will setup a laptop to display their prototype.
  2. In a similar fashion to the paper prototypes demo day, you will raise your hand when you are ready to pair up with another group. However, in this case you are looking for a group that is <= 4 in distance from your group number (given a group count of 20). Thus, if you are group 2, you can work with groups 18,19,20,1,3,4,5,6. If you are group 10, you can work with groups 6–14.
  3. Unlike last class, when we needed two people to run prototypes / record observations, in this case our prototypes should mostly run themselves. This means we can have two people record observations. You can either have observers assigned to monitor different types of interactions, or have both do more general monitoring… there’s a good chance each observer will have different insights on the decisions that each user makes.
  4. After each user has gone through the prototype project, ask them to make a guess as to wh
@charlieroberts
charlieroberts / proxy.delay.html
Created July 25, 2018 05:01
an example of delaying execution of methods / property setters on an JS object using Proxies
<!doctype html>
<html lang='en'>
<body></body>
<script>
const makeAnObjectAndDelayStuffWithIt = function() {
const obj = {
__queue__:[],
__initialized__:false,
@charlieroberts
charlieroberts / audio.browser.notes.md
Last active October 4, 2018 20:35
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

@charlieroberts
charlieroberts / audio.browser.notes.md
Created May 18, 2018 17:07
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 
@charlieroberts
charlieroberts / gulpfile.js
Created April 24, 2018 14:11
gulpfile running browserify, babel, and uglify
// import libraries installed via NPM
var gulp = require('gulp'),
rename = require('gulp-rename'),
uglify = require('gulp-uglify'),
notify = require('gulp-notify'),
browserify = require('browserify'),
transform = require('vinyl-transform'),
source = require('vinyl-source-stream'),
gutil = require( 'gulp-util' ),
babelify = require( 'babelify' ),
@charlieroberts
charlieroberts / gibberwocky.plork.workshop.md
Last active April 15, 2018 03:00
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.

@charlieroberts
charlieroberts / fm.echo.verb.waapi.js
Created March 29, 2018 14:03
web audio API FM echoes with reverb
window.onload = function() {
const gui = new dat.GUI()
const ctx = new AudioContext()
const delayLine = ctx.createDelay()
delayLine.delayTime.value = .25
const delayGain = ctx.createGain()
delayGain.gain.value = .65