Skip to content

Instantly share code, notes, and snippets.

@timcowlishaw
timcowlishaw / ARViewController.swift
Created March 1, 2022 17:17
Cenatus PHASE blog post snippet 4
// before calling self.phaseEngine.start();
self.phaseListener = PHASEListener(engine: self.phaseEngine)
try! self.engine.rootObject.addChild(self.phaseListener)
@timcowlishaw
timcowlishaw / ARViewController.swift
Created March 1, 2022 17:14
Cenatus PHASE blogpost snippet 2
// ARViewController.swift
class ViewController : UIViewController : {
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
self.phaseEngine.stop()
}
}
@timcowlishaw
timcowlishaw / ARViewController.swift
Last active March 1, 2022 17:12
Cenatus Apple Phase blogpost snippet 1
// ARViewController.swift
import PHASE
// [ other imports elided ]
class ViewController : UIViewController {
var phaseEngine : PHASEEngine!
override func viewDidLoad() {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import ddf.minim.*;
import ddf.minim.analysis.*;
Minim minim;
AudioPlayer song;
BeatDetect beat;
float bottomSpeed = random(1.0);
float topSpeed = random(1.0);
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
int t = 0;
float r = 50.0;
float r2 = 400.0;
float k1 = 10 * exp(1);
float k2 = 0.1 * PI;
float x;
float y;
float offsetX = 500;
float offsetY = 500;
color from;
/**
Arduino Real-Time Slack Bot
Copyright (C) 2016, Uri Shaked.
Licensed under the MIT License
https://github.com/urish/arduino-slack-bot
@timcowlishaw
timcowlishaw / stuff_for_sale.txt
Created September 28, 2018 12:46
stuff_for_sale :: [Object] -> Money
Right folks, I'm getting rid of a bunch of the noise-making gear i've acumulated over the years, plus one decent computer monitor. Grab yourself a bargain! Looking to shift the below. Couple more pedals and eurorack bits to come too.
--- PEDALS ---
Behringer Ultra Feedback / Distortion pedal: £10
Mooer Pitch Box pitch-shifter pedal: £20
Behringer Ultra Octaver pedal: £10
#!/bin/bash
TEXT=`curl https://www.lcdf.org/indeterminacy/s/ | pup 'table tbody tr td table tbody tr td p text{}'`
COUNT=`echo $TEXT | wc -w`
echo $TEXT | say -r $COUNT