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
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
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
--[[============================================================================ | |
main.lua | |
============================================================================]]-- | |
-------------------------------------------------------------------------------- | |
-- tool registration | |
-------------------------------------------------------------------------------- | |
--renoise.tool():add_menu_entry { | |
-- name = "Instrument Box:Random Renoise Kit...", |
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
// run this code first to set up synthDef | |
( | |
SynthDef(\mainSynth, { | |
arg attack=0.5,decay=0.5,sustain=0.5,release=0.5,gate=1,modulation_rate=1,depth=50,rate=100; | |
var envelope,modulator,frequencyModCarrier,amplitudeModCarrier,ringModCarrier,signal; | |
envelope = EnvGen.ar(Env.adsr(attack, decay, sustain, release), gate); | |
modulator=BufRd.ar(1,modulatorBuffer,Phasor.ar(0,BufRateScale.kr(modulatorBuffer)*modulation_rate*buffTime,0,BufFrames.kr(modulatorBuffer)),1)*depth; | |
ringModCarrier = BufRd.ar(1, carrierBuffer, Phasor.ar(0, BufRateScale.kr(carrierBuffer) * |
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; | |
// set up the Synth | |
( | |
SynthDef(\mainSynth, { | |
arg attack=0.5,decay=0.5,sustain=0.5,release=0.5,gate=1,modulation_rate=1,depth=50,rate=100; | |
var envelope,modulator,frequencyModCarrier,amplitudeModCarrier,ringModCarrier,signal, | |
// -------- I've had to add a modulatorType argument to the synth - the way things were it'd be impossible to change | |
modulatorType ; |
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
( | |
var bandwidth = 0.1; | |
var lowKernel; | |
var highKernel; | |
var bandKernel; | |
var maxValue = 0; | |
var ratio; | |
var normalize = 1; |
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
~synths = Array.fill(13, { Synth(\mainSynth) }); | |
~sequence = Array.fill(13, { Array.fill(16, 0) }) | |
// step through sequence | |
Tdef(\sequencePlayer, { | |
loop { | |
16.do { | |
arg i; | |
// here's the iterator for the different sequences |
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
CPU0 CPU1 | |
0: 1152406 1085120 IO-APIC-edge timer | |
1: 7 5 IO-APIC-edge i8042 | |
8: 0 1 IO-APIC-edge rtc0 | |
9: 1241 1265 IO-APIC-fasteoi acpi | |
12: 59 67 IO-APIC-edge i8042 | |
16: 31068 27982 IO-APIC-fasteoi uhci_hcd:usb6, yenta | |
17: 5 5 IO-APIC-fasteoi uhci_hcd:usb7, firewire_ohci | |
18: 0 0 IO-APIC-fasteoi uhci_hcd:usb8, mmc0, r592, r852 | |
19: 13562 14497 IO-APIC-fasteoi ehci_hcd:usb2 |
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
ljs.user=> Figwheel: Starting server at http://localhost:3449 | |
Figwheel: Serving files from '(dev-resources|resources)/public' | |
Compiling "resources/public/js/app.js" from ("src/cljs" "env/dev/cljs")... | |
WARNING: No such namespace: hm.core at line 1 src/cljs/little_drummer_boy/core.cljs | |
WARNING: Use of undeclared Var cljs.core.async/do-alts at line 62 file:/home/tris/.m2/repository/org/clojure/core.async/0.1.278.0-76b25b-alpha/core.async-0.1.278.0-76b25b-alpha.jar!/cljs/core/async/impl/ioc_helpers.cljs | |
WARNING: Bad method signature in protocol implementation, impl/Handler does not declare method called lock-id at line 214 file:/home/tris/.m2/repository/org/clojure/core.async/0.1.278.0-76b25b-alpha/core.async-0.1.278.0-76b25b-alpha.jar!/cljs/core/async.cljs | |
WARNING: Use of undeclared Var cljs.core.async.impl.protocols/lock-id at line 217 file:/home/tris/.m2/repository/org/clojure/core.async/0.1.278.0-76b25b-alpha/core.async-0.1.278.0-76b25b-alpha.jar!/cljs/core/async.cljs | |
WARNING: Bad method signature in protocol |