Skip to content

Instantly share code, notes, and snippets.

@triss
triss / run flags and error.
Created December 24, 2011 14:23
processing not unning with opengl
cd /home/tris/installs/processing-1.5.1/TestEmacs/ && /home/tris/installs/processing-1.5.1/java/bin/java -cp "/home/tris/installs/processing-1.5.1/java/lib/rt.jar:/home/tris/installs/processing-1.5.1/java/lib/tools.jar:/home/tris/installs/processing-1.5.1/lib/antlr.jar:/home/tris/installs/processing-1.5.1/lib/core.jar:/home/tris/installs/processing-1.5.1/lib/ecj.jar:/home/tris/installs/processing-1.5.1/lib/jna.jar:/home/tris/installs/processing-1.5.1/lib/pde.jar:/home/tris/installs/processing-1.5.1/modes/java/libraries/opengl/library/gluegen-rt.jar:/home/tris/installs/processing-1.5.1/modes/java/libraries/opengl/library/opengl.jar:/home/tris/installs/processing-1.5.1/modes/java/libraries/opengl/library/jogl.jar:." processing.core.PApplet TestEmacs
Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1
digraph fsm {
label = "[abc]*c";
rankdir=LR;
node [shape = doublecircle]; Q_0;
node [shape = circle]; Q_1;
Q_0 -> Q_1 [ label = "c" ];
Q_1 -> Q_0 [ label = "c" ];
Q_0 -> Q_0 [ label = "a", side = l ];
Q_1 -> Q_1 [ label = "a", side = r ];
Q_0 -> Q_0 [ label = "b" ];
@triss
triss / gist:6248658
Created August 16, 2013 09:59
find last recorded sample in renoise
-- find last recorded sample's instrument index
local function find_last_recorded_sample_instrument_index()
local max = 0
local last_recorded_i
for i, inst in ipairs(rs.instruments) do
local recording_num = string.match(inst.name, "Recorded Sample (%d+)")
if recording_num then
if max < recording_num then
@triss
triss / Grabbing sounds and mangling them
Created October 23, 2013 16:15
Grabbing sounds and mangling them
s.boot;
// ----------------------------------
// grabbing sound and playing it back
// ----------------------------------
// in supercollider we usually store sound in buffers...
// we'll need to allocate an empty one... this one's 10 seconds long
~buffer = Buffer.alloc(s, 10 * s.sampleRate);
@triss
triss / gist:8883949
Last active August 29, 2015 13:56
fractal 0.1
// https://github.com/triss/colourlovers
import triss.colourlovers.*;
color[] colours;
int c;
void setup() {
size(1000, 1000);
noLoop();
import processing.pdf.*;
import triss.colourlovers.*;
ArrayList<PVector> points;
ArrayList<Line> lines;
color[] colours;
int c = 0;
int quant = 3;
@triss
triss / core.clj
Created May 25, 2014 19:16
euclidean beat sin clojure
(ns clojtest.core)
(defn rotate-left
([coll] (rotate-left 1 coll))
([n coll] (concat (drop n coll) (take n coll))))
(defn euclidean-beat
([hit-length length rotation]
(rotate-left rotation
(euclidean-beat hit-length length)))
euclideanBeat :: Int -> Int -> [Int]
euclideanBeat hitSpacing length = take length (cycle ([1] ++ replicate (hitSpacing - 1) 0))
@triss
triss / gist:d5080adbfd8e4322e99f
Created August 24, 2014 10:57
SC plugins build issue on Ubuntu 14.04
[ 97%] Building CXX object source/CMakeFiles/TagSystemUgens.dir/TagSystemUGens/TagSystemUgens.cpp.o
/home/tris/sources/sc3-plugins-src-2012-05-26/source/TagSystemUGens/TagSystemUgens.cpp:78:0: warning: "GET_BUF" redefined [enabled by default]
#define GET_BUF \
^
In file included from /usr/include/SuperCollider/plugin_interface/SC_PlugIn.h:26:0,
from /home/tris/sources/sc3-plugins-src-2012-05-26/source/TagSystemUGens/TagSystemUgens.cpp:26:
/usr/include/SuperCollider/plugin_interface/SC_Unit.h:251:0: note: this is the location of the previous definition
#define GET_BUF \
^
/home/tris/sources/sc3-plugins-src-2012-05-26/source/TagSystemUGens/TagSystemUgens.cpp: In function ‘void DbufTag_end(DbufTag*, int, int)’:
@triss
triss / gist:e889de731f46fcee25d6
Created August 24, 2014 20:29
soundfileview kaboom
ERROR: Primitive '_QObject_InvokeMethod' failed.
Failed.
RECEIVER:
Instance of QSoundFileView { (0x28b4f38, gc=B4, fmt=00, flg=00, set=06)
instance variables [38]
qObject : RawPointer 0x26d3e00
finalizer : instance of Finalizer (0xfaa3218, size=2, set=1)
virtualSlots : nil
wasRemoved : false
font : nil