Skip to content

Instantly share code, notes, and snippets.

View rapofran's full-sized avatar

Juan Francisco Raposeiras rapofran

View GitHub Profile
@rapofran
rapofran / startup.sc
Last active November 4, 2019 15:14
SuperCollider startup file, connect JACK and define a basic FM Synth with SuperDirt :) <3
(
"-> Loading SuperDirt".postln;
s.options.memSize = 8192 * 128;
s.options.numBuffers = 1024 * 128;
s.options.numOutputBusChannels = 8;
s.waitForBoot {
~dirt = SuperDirt(2, s);
s.sync;
~dirt.start(57120, [0, 2, 4, 6]);
3.wait;
@rapofran
rapofran / fm.sc
Created February 13, 2018 17:24
FM SuperCollider
(SynthDef(\fm, {
|out, amp=1, attack=0.001, sustain=1, accel, carPartial=1, modPartial=1, index=3, mul=0.25, detune=0.1, pan=0, freq|
var env, mod, car, sig;
//amp = amp * 0.9;
env = EnvGen.ar(Env.perc(attack, 0.999, 1, -3), timeScale: sustain / 2, doneAction:2);
mod = FSinOsc.ar(freq * modPartial * Line.kr(1,1+accel, sustain), 0, freq * index * LFNoise1.kr(5.reciprocal).abs);
car = SinOsc.ar(([freq, freq+detune] * carPartial) + mod, 0, mul);
sig = car * env;
//OffsetOut.ar(out, Pan2.ar(sig, pan, amp));
OffsetOut.ar(out, DirtPan.ar(sig * amp, ~dirt.numChannels, pan, env));
@rapofran
rapofran / impro.tidal
Created January 15, 2018 07:06
tidal livecoding
d1 $ degradeBy 0.8 $ slow 2 $ stack [
striate 64 $ s "juno:11",
striate 64 $ cat [s "juno:10", s "juno:9"]
] # room 0.2
# size 0.2
# gain 0.9
# pan 0.5
# orbit 0
d2 $ slow 3 $ s "[casio casio?] casio:2"
@rapofran
rapofran / xi_first_tries.rb
Last active December 27, 2017 14:46
Xi Lang, livecoded
melody = [1,4,7,8,9]
scale = [Scale.iwato, Scale.jiao]
fm.set degree: melody.p(0.5),
gate: :degree,
detune: [0.2, 0.1],
sustain: [5,3,10],
accelerate: [0, 0.1],
octave: [3,3,2,4].p(1/3),
scale: scale.p(1/2)

Keybase proof

I hereby claim:

  • I am rapofran on github.
  • I am rapofran (https://keybase.io/rapofran) on keybase.
  • I have a public key ASAwm9FDg4DG4Mf-BTtEY6EcrnVODrEjA4iHJfZto3xQLgo

To claim this, I am signing this object:

@rapofran
rapofran / sc_error.log
Created June 7, 2017 18:36
sc error log when superdirt starts with options
SuperDirt
loading synthdefs in /home/frank/.local/share/SuperCollider/Extensions/SuperDirt/classes/../synths/core-modules.scd
---- core synth defs loaded ----
loading synthdefs in /home/frank/.local/share/SuperCollider/Extensions/SuperDirt/classes/../synths/core-synths.scd
loading synthdefs in /home/frank/.local/share/SuperCollider/Extensions/SuperDirt/classes/../synths/default-synths.scd
loading synthdefs in /home/frank/.local/share/SuperCollider/Extensions/SuperDirt/classes/../synths/try-load-extra-synths.scd
loading synthdefs in /home/frank/.local/share/SuperCollider/Extensions/SuperDirt/classes/../synths/tutorial-synths.scd
loading synthdefs in /home/frank/.local/share/SuperCollider/Extensions/SuperDirt/classes/../synths/core-modules.scd
ERROR: Primitive '_BasicNew' failed.
Index not an Integer
@rapofran
rapofran / animate_svg.html
Created September 6, 2016 20:27
Simple animation of SVG with events, letters A and S
<html>
<head>
<script src="https://code.jquery.com/jquery-git.min.js"></script>
<style>
body {
font-family: "Helvetica Neue", Helvetica;
width: 90%;
font-weight: 200;
letter-spacing: 1px;
margin: 25px auto 0 auto;