Created
February 1, 2023 11:44
-
-
Save tado/69281cd3b56eac7cfb6d01d7d9865420 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//SuperDirt setup | |
s = Server.local; | |
s.reboot { | |
s.options.sampleRate = 48000; | |
//s.options.sampleRate = 192000; | |
s.options.numBuffers = 1024 * 256; // increase this if you need to load more samples | |
s.options.memSize = 8192 * 32; // increase this if you get "alloc failed" messages | |
s.options.numWireBufs = 64; // increase this if you get "exceeded number of interconnect buffers" messages | |
s.options.maxNodes = 1024 * 32; // increase this if you are getting drop outs and the message "too many nodes" | |
s.options.numOutputBusChannels = 2; // set this to your hardware output channel size, if necessary | |
s.options.numInputBusChannels = 2; // set this to your hardware output channel size, if necessary | |
s.volume = -6.0; | |
s.waitForBoot { | |
s.waitForBoot { | |
~dirt = SuperDirt(2, s); | |
~dirt.loadSoundFiles; | |
~dirt.loadSoundFiles("C:/Users/tadok/AppData/Local/SuperCollider/downloaded-quarks/samples-extra/*"); | |
~dirt.start(57120, 0! 12); | |
/* | |
//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); | |
*/ | |
/* | |
//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 = 0.1; | |
}; | |
a = NetAddr.new("localhost", 3333); | |
OSCdef(\tidalplay, { | |
arg msg; | |
a.sendMsg(*msg); | |
}, '/dirt/play', n); | |
/* | |
//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