Skip to content

Instantly share code, notes, and snippets.

View r618's full-sized avatar

r618

View GitHub Profile
@r618
r618 / notes_glitch.rb
Created November 12, 2015 09:39
#SonicPi #Unity3d OSC reaktion test
# SonicPi <-> Unity OSC test
# https://www.youtube.com/watch?v=7hYmcYg4WEY
notes = (ring :E4, :Fs4, :B4, :Cs5, :D5, :Fs4, :E4, :Cs5, :B4, :Fs4, :D5, :Cs5 )
live_loop :slow do
#stop
#sync :moon_bass
use_synth :beep
with_fx :reverb, room: 1 do
play notes.tick, release: 0.125
@r618
r618 / BWV1007.rb
Last active November 9, 2015 13:34
bit crushed vibrato on BWV1007 in #SonicPi
# The Bach robot plays BWV murder
# Suite No.1 in G Major BWV 1007 MIDI notes (on only)
notes = (ring
43, 50, 59, 57, 59, 50, 59, 50, 43, 50, 59, 57, 59, 50, 59, 50,
43, 52, 60, 59, 60, 52, 60, 52, 43, 52, 60, 59, 60, 52, 60, 52,
43, 54, 60, 59, 60, 54, 60, 54, 43, 54, 60, 59, 60, 54, 60, 54,
43, 55, 59, 57, 59, 55, 59, 55, 43, 55, 59, 57, 59, 55, 59, 54,
43, 52, 59, 57, 59, 55, 54, 55, 52, 55, 54, 55, 47, 50, 49, 47,
@r618
r618 / builtin_profiler_usage.cs
Created October 24, 2015 14:47
builint profiler usage in Unity
using UnityEngine;
using System.Collections;
using System.Runtime.CompilerServices;
public class Tester : MonoBehaviour
{
const int kRuns = 10000000;
const string
@r618
r618 / TransformAccessTester.cs
Last active October 24, 2015 12:47
simple cached vs. non cached transform access measurement in Unity
Results:
========================================================
iPod Touch 4th gen
========================================================
===== seconds avg / frame batches ( * 100 actual frames )
========================================================
Unity 4.6.9
@r618
r618 / OSCclient.rb
Last active December 10, 2018 18:46
#SonicPi #OSC #Reaktion
# adopted from https://github.com/repl-electric/live-coding-space
require 'osc-ruby'
def reaktion(endpoint, *args)
args = [endpoint] + args
endpoint = :reaktion
endpoint = "/#{endpoint}"
@client ||= OSC::Client.new('localhost', 9000)
begin
args = args.map{|a| a.is_a?(Symbol) ? a.to_s : a}
# MIDI notes ~~
anote = play :C4, sustain: 60
anote.pause
sleep 1
anote.run
sleep 1
@r618
r618 / trance_of_an_old_clockwork.rb
Last active October 23, 2015 00:40
#SonicPi #compo
#set_mixer_control! lpf: 100, lpf_slide: 32
#set_mixer_control! amp: 0, amp_slide: 32
#set_mixer_control! amp: 2, amp_slide: 32
# Trance of an old clockwork
use_bpm 60
# ---------------------------------------------------------------------------------------
# Beats