Skip to content

Instantly share code, notes, and snippets.

View drart's full-sized avatar

Adam Tindale drart

View GitHub Profile
@drart
drart / miditest-old.js
Created October 11, 2017 20:12
Old example of MIDI and Flocking I found on my hard drive. Not in a working state.
var fluid = require("infusion"),
flock = fluid.require("flocking");
flock.init();
flock.midiAmp = function (velocity) {
return velocity / 127;
};
flock.midiVibrato = function (value) {
@drart
drart / additiveBandedFilters.js
Created September 9, 2017 01:30
A flocking example of additive synthesis bandpass filters
var noises = [];
for (var i=0; i<10;i++) {
var ugenDef = {
ugen: "flock.ugen.filter.biquad.bp",
freq : (100 * i) + 300,
q: 10,
source: {
ugen: "flock.ugen.whiteNoise"
}
<!DOCTYPE html>
<head>
<title>Test BOPPAD GLITCHING</title>
</head>
<body>
<script src="../node_modules/flocking/dist/flocking-all.js"></script>
<script>
@drart
drart / index.html
Created July 20, 2017 02:22
Node.js to Browser using osc.js using websockets without Express server
<!DOCTYPE html>
<html>
<head>
<title>osc.js Web Sockets</title>
<meta charset="UTF-8" />
<script src="node_modules/osc/dist/osc-browser.min.js"></script>
</head>
<body>
<script>
@drart
drart / C4Workspace.m
Created November 27, 2016 22:02
An old example of using the iPhone/iPad Accelerometer with C4ios. Enjoy.
//
// C4WorkSpace.m
// C4 + Accelerometer
// [You must add the CoreMotion Framework in order to get this to compile]
// Created by Adam Tindale on 2013-02-19.
//
// Adapted from this example:
// http://eencae.wordpress.com/ios-tutorials/coremotion/cmmotionmanager/
#import <CoreMotion/CoreMotion.h>
@drart
drart / Channel Controller Demo.amxd
Created November 26, 2016 18:46
Demo Max4Live channel controller.
ampfaaaametaptchDa{
"patcher" : {
"fileversion" : 1,
"rect" : [ 527.0, 44.0, 852.0, 729.0 ],
"bglocked" : 0,
"defrect" : [ 527.0, 44.0, 852.0, 729.0 ],
"openrect" : [ 0.0, 0.0, 0.0, 169.0 ],
"openinpresentation" : 1,
"default_fontsize" : 10.0,
"default_fontface" : 0,
@drart
drart / test.html
Created November 23, 2016 19:51
Basic PubNub communication test. V4 API
<html>
<body>
<p> copy and paste these into the console to try communication
<p>pubnub.publish({channel:'hello', message:'fjfjfjf'});
<p>pubnub.publish({channel:'hello', message:{'jfjfj':'fjfj'}});
<script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.3.1.min.js"></script>
<script>
var pubnub = new PubNub({
subscribeKey: "yours",
@drart
drart / Workspace.swift
Created February 7, 2016 20:54
Simple animated circles. Checking out new C4 syntax.
import UIKit
class WorkSpace: C4CanvasController {
var circles : [C4Circle]!
var timer: C4Timer?
var cwidth: Double = 0.0
var cheight: Double = 0.0
override func setup() {
@drart
drart / Workspace.swift
Created January 18, 2016 02:55
First Swift C4. Trying out the new animation system.
import UIKit
class WorkSpace: C4CanvasController {
var circles : [C4Circle]!
override func setup() {
circles = [C4Circle]()
for var i = 0; i < 10; i++
void setup(){
size(720,480);
textAlign(CENTER);
background(0);
}
void draw(){
textSize(random(48));
text("Art's Birthday", random(width), random(height));