This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function update_pattern(instrument_i, track_i, pos) | |
local song_pos = rs().transport.playback_pos | |
local pattern_i = rs().sequencer:pattern(song_pos.sequence) | |
local track = rs():pattern(pattern_i):track(track_i) | |
track:clear() | |
local next_line = track:line(song_pos.line + 1) | |
next_line:note_column(1).note_value = 48 | |
next_line:note_column(1).instrument_value = instrument_i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule WesternNotation.NoteSigil do | |
@moduledoc ~S""" | |
Module that allows notes from western music notation succinctly | |
""" | |
notes = %{ | |
c: 0, d: 2, e: 4, f: 5, g: 7, a: 9, b: 11 | |
} | |
def sigil_n(string, []) do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Euclidean do | |
import List, only: [duplicate: 2] | |
import Enum, only: [take: 2, drop: 2] | |
import Stream, only: [cycle: 1] | |
def rotate(pattern, amount) do | |
drop(pattern, amount) ++ take(pattern, amount) | |
end | |
def pattern(hitLength, length \\ 16, rotation \\ 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ 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)’: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
euclideanBeat :: Int -> Int -> [Int] | |
euclideanBeat hitSpacing length = take length (cycle ([1] ++ replicate (hitSpacing - 1) 0)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import processing.pdf.*; | |
import triss.colourlovers.*; | |
ArrayList<PVector> points; | |
ArrayList<Line> lines; | |
color[] colours; | |
int c = 0; | |
int quant = 3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/triss/colourlovers | |
import triss.colourlovers.*; | |
color[] colours; | |
int c; | |
void setup() { | |
size(1000, 1000); | |
noLoop(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |