NdefGui with multiple freq sliders in a Ringz or EQ

Hi

How can I make a NdefGui with pink noise as the source, Going into either Ringz or and Eq Object, But have multiple frequency and amplitude sliders for the EQ or Ringz Object.

I can’t find any help on this.

Thank you

1 Like

The simplest way might be something like this

Ndef(\myFX, {
    arg freq1=800, freq2=1200, freq3=2400, rq1=0.1, rq2=0.1, rq3=0.1, gain1=0.1, gain2=0.1, gain3=0.1;
    var source = PinkNoise.ar(0.5);
    var filter1 = Ringz.ar(source, freq1, rq1, gain1);
    var filter2 = Ringz.ar(source, freq2, rq2, gain2);
    var filter3 = Ringz.ar(source, freq3, rq3, gain3);
    filter1 + filter2 + filter3;
}).play;

Ndef(\myFX).gui;

But step back a bit and think about the filters you are using. try to calculate the best options for BPF using some math.

You can scale this up to build a Vocoder. That would be fun, Check the analog vocoders, their configuration can be a starting point. For example, 1/3 octave filter banks. Try something like this maybe.

Thank you! Very much I appreciate it.

Can pbinds be put into a Ndefs and be turned on and off?

I don’t work much with those things.

Added to the code
Sounds good; it needs Antialias Oscillators quark . I tried to get the same squidgy granulation with a simpler Oscillator but it didn’t work.
Thank you for the help

Ndef(\myFX, {
    arg phreak = 440, rr = 12.99, tt=3.4, freq1=800, freq2=1200, freq3=2400, rq1=0.1, rq2=0.1, rq3=0.1, gain1=0.03, gain2=0.01, gain3=0.01;
    var source = BlitB3Tri.ar(phreak,0.99,leak: LFPulse.kr(rr*2, iphase: 2),  leak2: LFTri.kr(tt));
    var filter1 = Ringz.ar(source, freq1+LFPulse.kr(rr*3, iphase: 2), rq1, gain1);
    var filter2 = Ringz.ar(source, freq2+LFTri.kr(tt), rq2, gain2);
    var filter3 = Ringz.ar(source, freq3, rq3, gain3);
   var sum =  filter1 + filter2 + filter3;
	
var rev = JPverb.ar(sum,
		  \t60.kr(1,           0.05),
        \damp.kr(0,          0.05),
        \size.kr(1,          0.05),
        \earlydiff.kr(0.707, 0.05),
        \mdepth.kr(5,        0.05),
        \mfreq.kr(2,         0.05),
        \lowx.kr(1,          0.05),
        \midx.kr(1,          0.05),
        \highx.kr(1,         0.05),
        \lowband.kr(500,     0.05),
        \highband.kr(2000,   0.05)
    );
	
	 Mix([rev]) * 0.1
}).play;

Ndef(\myFX).gui;
Ndef.clear; //clear all Ndefs