"Locked In": soundscape in 25 lines of code

I was experimenting a bit with the lcm and gcd operators on the server following a discussion on the mailing list and based on some 8-bit music code I still had lying around (not sure where I got it from) in combination with randomized filter parameters I hit something surprisingly rich.

Locked In


Code for “Locked In”


I like it! And I just wanted to let you know that I liked it also (maybe somehow more…) without the reverb :drooling_face: But that’s me, I like them dry more often than not. And I respect the idea of a signal that is at the same time a sound and a control for its own reverb size and decay :exploding_head:

Thanks for listening!

I have the impression that youtube has altered the sound though, shaving off some “edges”. To my ears at least it sounds way better on my local computer (also with the reverb pedal) than on youtube.

In the spirit of “genetic algorithms” I sometimes try random combinations of elements without trying to reason about what will happen, and if it works, I roll with it.


quite awesome!!!
thank you for sharing!!
to me it sounds great the way it is - just the sc code, without extra reverb.

Thanks for sharing! Enjoying it now as background music as I plow through my work emails :slight_smile:

I wanted to learn from your code @shiihs so I broke it down a little to undestand what is happening:

	var t, u, sig, sig2, sum;

	t = PulseCount.ar(Impulse.ar(8e3));
	u = PulseCount.ar(Impulse.ar(7009));

	sig = (
		((t * 15) & (t >> 5)) |
		((t * 5) & (t >> [3, 4])) |
		((t * 2) & (t >> 9)) |
		((t * 8) & (t >> 11)) |
		(((t*t) & t) | (t >> 3))
		- 3 % 256
		) / 127-1 * 3 ;

	sig = HPF.ar(sig, 20) * 0.1 ;

	sig2 = gcd(t*u, u+t);
	sig2 = HPF.ar(sig2, WhiteNoise.ar() * 2000 + 1000);
	sig2 = LPF.ar(sig2, 20);
	sig2 = sig2 * sig;
    sum = Greyhole.ar(sig2, sig, 0.5, sig);
	sum = Limiter.ar(sum, 1);
	sum = sum.softclip;
	sum = sum * 0.5; 


I really like the sound and I want to figure it out how it comes about to it. So I feel there’s couple of components that seem to be working together in an interesting way, but there are some thing I cannot quite understand.

So, if I undestand correctly, the source signal - last sig2, that goes into Greyhole has some huge spikes going up to highlevels. This creates tails in the Greyhole reverberator that are brought up by Limiter.

What I don’t quite understand is the modulation of delayTime: and size: arguments to Greyhole with sig - which is the bytebeat. A very small delayTime & size at the same time seem to produce this long running resonance. The sig is a signal in the range of -0.5 and 0.5, but it’s moving very fast (relative to more LF signals used for modulation usually.

Concretely I have two questions: is there a minimum (towards 0) below which Greyhole refuses to accept for delayTime and size? And what happens if the (signal at) these arguments is negative?

I have managed to create a relatively similar effect but with more control over the signal:

Ndef(\aix, {
	var snd, revt;
	snd = Pulse.ar(freq: LFNoise0.ar([2,3]).exprange(50,5000));
	snd = snd * LFPulse.ar(
		freq: LFNoise0.ar(1).exprange(0.5,8),
		mul: LFNoise1.ar(3).exprange(0.01,1000));
	snd = HPF.ar(snd, 50);
	// reverb time - various optons:
	revt = LFNoise0.ar(1).exprange(0.0001,0.01);
	//revt = XLine.ar(1, 0.0001,30);
	//revt = LFTri.ar(1/10, 1).range(0.01, 0.0001);	
	//revt = 0.000001;

	snd = Greyhole.ar(snd, revt, 0.5, revt);
	snd = Limiter.ar(snd, 0.9);


EDIT: also previewable here: https://sonomu.club/@luka/105312490713667784

1 Like

Hi Luka,

I found your collection of noisevember pieces interesting to look/listen at.

I must confess I cannot answer any of the questions you are asking about the Greyhole UGen. I was merely playing with the system, and didn’t put too much thought into it. So I guess the only way to find out is to experiment indeed (or to try and understand its implementation).

My preference goes to versions with less control though, because the unpredictability (for a listener) is an important part of what makes it “work” for me.

1 Like