Skip to content

Instantly share code, notes, and snippets.

@tado
Created Sep 29, 2022
Embed
What would you like to do?
My SuperCollider startup file
a = NetAddr.new("localhost", 3333);
OSCdef(\tidalplay, {
arg msg;
a.sendMsg(*msg);
}, '/dirt/play', n);
//SuperDirt setup
s = Server.local;
s.reboot {
s.options.sampleRate = 48000;
s.options.numBuffers = 1024 * 16;
s.options.memSize = 8192 * 16;
s.volume = -6.0;
s.waitForBoot {
~dirt = SuperDirt(2, s);
~dirt.loadSoundFiles;
~dirt.loadSoundFiles("C:/Users/tado/AppData/Local/SuperCollider/downloaded-quarks/samples-extra/*");
s.sync; // wait for samples
/*
//MIDI setup
MIDIClient.init;
~midiOut = MIDIOut.newByName("Elektron Model:Cycles", "Elektron Model:Cycles");
//~midiOut = MIDIOut.newByName("loopMIDI Port", "loopMIDI Port");
~midiOut.latency = 0.0;
~dirt.soundLibrary.addMIDI(\midi, ~midiOut);
*/
~dirt.start(57120, 0!8);
/*
//Ableton to Tidal
~dirt.soundLibrary.addSynth(\play, (play: {
~midiOut.control(3, 100, 127);
}));
~dirt.soundLibrary.addSynth(\stop, (play: {
~midiOut.control(3, 101, 127);
}));
~dirt.soundLibrary.addSynth(\rec, (play: {
~midiOut.control(3, 102, 127);
}));
*/
};
s.latency = 1.0;
};
/*
//OSC for p5dirt
OSCFunc({
arg msg, time, tidalAddr;
var addr, latency;
addr = NetAddr.new("127.0.0.1", 2020);
msg.postln;
addr.sendBundle(msg);
},
'/play2').fix;
*/
/*
// foward OSC from TidalCycles
a = NetAddr.new("127.0.0.1", 3333);
OSCFunc({ |msg, time, tidalAddr|
var latency = time - Main.elapsedTime;
msg = msg ++ ["time", time, "latency", latency];
a.sendBundle(msg, latency);
}, '/dirt/play').fix;
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment