Supercollider tips, Q/A


#141

If you are thinking about diving into developing specific ideas on iOS (easier) as opposed to getting a general environment like supercollider running (much harder I’d imagine) then it might be worth checking out AudioKit.

http://audiokit.io


#142

Yes of course, and you’re right about “specific ideas” (which is my goal). But I’d prefer to be able to make use of existing code. We are about to see a lot more Supercollider-based innovation in the very near future. Rewrites and ports are always possible, but being able to directly use Supercollider seems like a potentially useful thing.


#143

I guess I should start with libpd and use it as an example of how to glue a library of that nature to the iOS development environment, then point that knowledge at the Supercollider AU repos above and correct any problems I assume must be lurking (due to the youth of those repos).


#144

SC AU wrapper is ancient in SC years though. (that repo is 8 years old, and the wrapper itself is probably older than github.)

haven’t tried it in ages but i remember it being a little fiddly but basically functional. it’s not the same as making stuff in sclang though - IIRC, the audiounit can host a single synthdef with its inputs broken out.


#145

That’s totally fine for my immediate purposes (just want to compile some effects I can drop into AUM).

Working my way through linker errors right now, hopefully I’ll have a working build in a few minutes…

EDIT: by “youthful” I guess I really meant, “not obviously widely adopted” (especially relative to libpd)


#146

Well, I’m apparently not smart enough for the build instructions found at

I’ve done everything under the first and third headings, but the build of the app itself continues to fail with a linker error.


#147

Yes I have done it. With an es-8.

The key is this:

SinOsc.ar(freq,0,0,pitch)

‘Freq’ can be anything, it’s not being used since ‘mul’ is set to zero. If I remember right setting mul to 0 might require you to set it with an argument…or else it won’t accept that the SinOsc is at audio rate.

Your pitch starts at 0, 0.1 is an octave up, 0.2 is two octaves up etc.

You can put that in a synthdef and send it midinotes or scale degrees and convert it within the synthdef or send the values directly.

Let me know if this is not clear enough and I could post an example later.


#148

yup! supercollider -> ES-3 -> modular is a total dream :slight_smile:

you need to tune it using a constant to get it to talk volts, but it wasn’t too hard to work out


#149

My question in regards to SC and modulars is whether anyone has created a way to directly Control the pitch of volt per octave oscillators with SC and implement a tuning algorithm as well? I have an ES-8 and Silent Way, but I hate running a DAW and SC at the same time. I’d prefer to just do it all in SC.


#150

yes this is totally possible. the way I did it was to store a constant that was equivalent to one octave (1V) in a global variable.

(
SynthDef (\staticSynth) {
	arg chan = 1, val = 0, lagTime = 0;
	var sig;
	sig = Lag.kr (val, lagTime);
	sig = K2A.ar (sig);
	Out.ar (chan, sig);
}.add;
)

~oct = 100 / 1030;  // tune the octave by incrementing this value

(
a = Synth (\staticSynth, [
	\chan, 1,
	\val, ~oct, // should give you one octave up
]);
)

a.set (\val, 0); 
a.set (\val, ~oct * 36 / 12); // 36 semitones up
// etc.

you might have to just fiddle a bit with ~oct to get it right, but this was the number for my set up.


#151

Thanks! I’ll try this out next week.


#152

I can’t give you specific instructions now (traveling away from kit), but I was messing around with the demo of silent way and my new es8 and found I was able to export the Silent Way v/oct tuning map from one of the auto-tune functions (sorry I can’t remember the name) and just use those values to map to an output from SC. If I remember correctly, it was a simple direct mapping once I corrected for any amplitude (ie volume) modifications in the signal path (eg server master volume).

You can try mapping a value directly to an output in sc for testing purposes.

Like, I’m pretty sure {Out.ar(0, 0.2)}.play will result in a positive 2v cv from output 1.

Can test when I’m back if you don’t figure it out.


#153

apologies, i totally missed the part where you said iOS. that’s a whole other kettle of fish. the AU wrapper in the main SC repo is pretty macos-specific.

iSCKit is pretty nifty, and “just works” for me (only tried with iphone 6s.) you certainly can’t skip building the static libs though… the app target would indeed fail to link without them.


#154

I’ll doublecheck paths tomorrow. Must have a typo or something somewhere.


#155

Wow. Thank you all for your knowledge!!! Definitely gonna check your ideas! It seems to be a rainy sunday. So perfect conditions to mess around with SC.


#156

Thanks for posting these examples. Do you think it’s also possible to interact with SC From the modular ? I have an ES-8 and a Pi3B+ running SC, I’m wondering if I could use the inputs of the soundcard to (CV) control some parameters of a SC file or trigger things, etc.


#157

Yes that should be possible. Look into Amplitude.kr to track the input level of a CV input on the ES-8 and then use something like SendTrig.kr to send a message from the server to the language. You would then set up an OSCdef or OSCFunc to respond to the message with some kind of behavior (start a synth, pattern, etc).

Another approach would be to map the CV input to an SC Bus and then use that bus to directly control a synthesis parameter within a SynthDef.


#158

Thank you ! That’s really helpful.


#159

Next week I’ll try to write up some code examples and post them.


#160

Managed to overcome all the “apple problems” (many GBs of downloading later) and get the test apps to build and make sound. Stability seems kinda poor on my iPhone 5s. Haven’t tried it on the iPad pro yet, which is really my target.

Nice to see it’s possible!