Synthesis challenge liquid bubbly texture

hey, does somebody know how to create this liquid bubbly texture in sc.
was thinking about FM, Latch and RLPF with resonance cranked up into a resonator.
dont know.

2 Likes

This babbling brook code, from the SuperCollider examples, could give some ideas:

thanks a lot i think this is going in a good direction. but its way less pronounced and sounds kind of flat and noisy. the fx from example is really defined. i dont think its made with filtered noise. It has a kind of melodic quality to it.

Sounds like the Formlet FOF-like filter with some version of it recorded into a buffer and played forwards and backwards.

Or the whole thing is an 808-style kick drum played back at various speeds, forwards and back.

({ 
	i = Impulse.ar(1, 0.5);
	Formlet.ar(i, TRand.ar(30, 50, i), 0.01, 2) 
}.play;)

({ 
	i = Impulse.ar(20, 0.5);
	Formlet.ar(i, Rand(300,1000), 0.01, Rand(0.05, 0.2)) 
}.play;)

({ 
	i = Impulse.ar(20, 0.5);
	Formlet.ar(i, TRand.ar(30,100, i), 0.01, TRand.ar(0.05, 0.2, i)) 
}.play;)

Sam

hey thanks alot. the sound has definetly a bit of that “moisture” quality.
the formlet filter seems really great for designing bass drums :slight_smile:

i have run it into a BLowPass with resonace cranked up. maybe you have some addional ideas for even more moisture liquidness in relation to the original?
ive also tried some buffer modulation techniques with some fast accelaration warping effects but i dont really like to work with buffered sounds.

(
SynthDef(\liquid, {

	var trig = Impulse.ar(1, 0.5);
	var sig, freq, ffreq, rq, gainEnv, modEnv;

	trig = Trig.ar(trig, SampleDur.ir);

	gainEnv = EnvGen.ar(Env([0, 0, 1, 0], [0.001, \atk.kr(0.001), \rel.kr(0.4)], [0, 4.0, -4.0]).delay(0.003), trig);
	modEnv = EnvGen.ar(Env([0, 0, 1, 0.3, 1, 0], [0.001, TRand.ar(0.04, 0.09, trig).poll, 0.001, 0.03, 0.001], [0.0, 4.0, -4.0, 4.0, -4.0]), trig);
	modEnv = modEnv * PinkNoise.ar(1!2).range(0.1, 1.0).lag(0.1);

	freq = \freq.kr(415.305) + modEnv.linlin(0, 1, 0, \freqEnvAmount.kr(-207.652));
	ffreq = \ffreq.kr(207.652) + modEnv.linlin(0, 1, 0, \ffreqEnvAmount.kr(8000));

	rq = \rq.kr(0.05);

	sig = Formlet.ar(trig, freq, 0.001, TRand.ar(0.1, 0.5, trig));

	sig = BLowPass.ar(sig, ffreq, rq, 1 / rq.sqrt);

	sig = sig * gainEnv * \amp.kr(0.25);

	sig = Splay.ar(sig);

	//sig = CombN.ar(sig, 0.2, 0.2, 4);

	sig = LeakDC.ar(sig);
	//sig = SafetyLimiter.ar(sig);
	Out.ar(\out.kr(0), sig);
}).play;
)

https://sccode.org/1-5cZ

not exactly your example but maybe an inspiration…my first lines of code in SC :slight_smile: some stuff doesn’t make sense (arguments that won’t change once it runs)

modulated ringing bandpass filters are a good starting point for bubbly stuff.

cheers, Benu

hey, thanks alot :slight_smile: actually i already found it during my research.
and some other examples like these:

(
{
	var sig, trig, trigMod, slope;
	trigMod = SinOsc.kr(TRand.kr(9, 12, Dust.kr(3))).lag(1);
	trig = LFPulse.kr(2, 0, 1, 4);
	trig = LagUD.kr(trig, 0.2, 0.8) * trigMod;

	slope = Slope.kr(trig);
	sig = Trig.kr(trig, 0.24) * SinOsc.ar(trig ** slope!2)
}.play;
)

(
{
	var mod, freq, ampMod, sig;

	mod = {LFNoise0.ar(170)}!2;

	freq = mod.linexp(-1, 1, \lowFreq.kr(200, 8), 2400).lag(0.01); //  * Line.kr(1, 0.01, 40);
	ampMod = 0.5 + mod.linlin(-1, 1, 0.5, 0).lag(0.1);

	ampMod = ampMod * AmpComp.ar(freq);

	sig = LPF.ar(SinOsc.ar(
		freq,
		0.6,
		ampMod
	), 4000);

	sig = sig * \amp.kr(0.1);
}.play;
)

but unfortunately there is more to the example sound than just BPF / RLPF with resonace.

Just for fun…

(
s.waitForBoot({
	SynthDef(\bubble, {
		| out=0, amp=1, filterFreq, baseFreq = 20 |
		var env = EnvGen.ar(Env.new(levels:[1, WhiteNoise.ar().range(20,500), 0], times:[0.04, 0.3], curve:[5,-500]), doneAction:2);
		var sig = amp*HPF.ar(BPF.ar(LFCub.ar(baseFreq*env), filterFreq, 0.1), 260);
		Out.ar(out, sig!2);
	}).add;
	
	s.sync;
	
	fork {
		loop {
			Synth(\bubble, [\filterFreq, 70 + bilinrand(20)].debug);
			(0.07 + bilinrand(0.03)).wait;
		}
	}
});
)
1 Like

this is pretty nice! i will try to work on the pattern.

got now a version im satisfied with:


(
SynthDef(\bubbles, {

	var sig, trig, gainEnv, freqEnv, freq, noise;

	trig = Maths2.ar(\rise.kr(0.1), \fall.kr(0.005), \linExp.kr(0.5))[1];

	gainEnv = EnvGen.ar(Env([0, 1, 0], [\atk.kr(0.001), \rel.kr(0.4)], [4.0, -2.0]), doneAction: Done.freeSelf);
	freqEnv = Maths2.ar(0.1, 0.005, 0.9, 0, 1, trig)[0];

	noise = WhiteNoise.ar(1).range(1, \freqEnvAmount.kr(25));
	noise = Latch.ar(noise, trig);
	freqEnv = noise * freqEnv * PinkNoise.ar(1!2).range(0.1, 1.0).lag(0.1);
	freq = \freq.kr(440) * freqEnv;

	sig = Squine.ar(freq, clip:0.0, skew: 0.0);

	sig = BPF.ar(sig, \ffreq.kr(70), \rq.kr(0.1));
	sig = HPF.ar(sig, 500);

	sig = sig * 40.dbamp;

	sig = sig * gainEnv * \amp.kr(0.25);
	
	sig = Splay.ar(sig);

	//sig = DelayC.ar([sig], SinOsc.ar(0.3, [0, 1, 2] * 2pi / 3).linlin(-1, 1, 0, 5e-3)).sum;
	
	sig = LeakDC.ar(sig);
	sig = SafetyLimiter.ar(sig);
	Out.ar(\out.kr(0), sig);
}).add;
)

(
Pdef(\bubbles,
	Pbind(
		\instrument, \bubbles,

		\legato, 0.8,
		\dur, Pfunc { 2 + bilinrand(0.6) },

		\rise, 0.1,
		\fall, Pexprand(0.005, 0.01),
		\linExp, Pwhite(0.1, 0.4),

		\atk, 0.001,
		\rel, 1.2,

		\fAtk, 0.1,
		\fRel, 0.3,
		\freqEnvAmount, 25,

		\freq, 440,
		\ffreq, Pfunc { 70 + bilinrand(20) },
		\rq, 0.1,

		\amp, 0.25,
		\out, 0,
	);
).play;
)
1 Like

Older post, but I got a water drop effect tweaking parameters on a preexisting synthdef I had that I’m pretty happy with. Not perfect though.

(
SynthDef(\twotube2,{
		var sig, env, senv;
		//k from -1 to 1
	senv = EnvGen.ar(Env([1,1,0,0],[(\delay1.kr(100)+\delay2.kr(50))/SampleRate.ir,0.0,1.0]));
	sig = WhiteNoise.ar(\preamp.kr(0)) * senv;
	env = EnvGen.ar(Env([0,1,1,0],[0.001]++((\dur.kr(0.5)-0.001)*[0.4,0.6])),doneAction:2);
	sig = TwoTube.ar(sig,\k.kr(0.0),\loss.kr(0.999),\delay1.kr(100),\delay2.kr(50));
		sig = BPF.ar(
			sig,
		LFNoise1.kr({LFNoise1.kr(0.13).exprange(\minBpfHz.kr(0.02),\maxBpfHz.kr(0.25))}!8).exprange(\minCf.kr(30), \maxCf.kr(6000)),
		LFNoise1.kr({LFNoise1.kr(0.08).exprange(0.08,0.35)}!8).range(\minRq.kr(0.005), \maxRq.kr(0.04))
		);
		sig = sig * env * \amp.kr(1);
		sig = Pan2.ar(sig,\pan.kr(0));
	Out.ar(\out.kr(0),sig);
	}).add;
);


(
Pbind(\instrument, \twotube2,
	\dur,Pn(Pshuf([1,1,1,1,6,3,3,3,3,9]/12,3),inf),
	\k, 0.2,
	\preamp,Pseq([1,2].mirror*10,inf),
	\amp,0.8,
	\maxRq,0.1,
	\minBpfHz,3,
	\maxBpfHz,4, //31
	\delay1,1,
	\delay2,2,
	\out,0,
).play
);

The synthdef is a take on a post by @poison0ak on sccode. A shorter duration should make it more bubbly.

1 Like