Dronecaster

was crow plugged in before launching dronecaster? i just tested this morning and it was working for me.

Apologes, reset everything and got it working.

Really great addition. Changing the CV while running it through Thyme and Space, leaving echos of the previous tones, beautiful :smiley:

2 Likes

I dont have a norns quite yet but if I have to teach myself super collider to bring the people some gay drones then so be it

6 Likes

DO ITTTTTT

also come join the norns discord! Discord Norns Study Group - #27 by tyleretters

4 Likes

Thank you!

How do we feel about
Bubblegum Sinkhole
Is sticky

1 Like

tone to drone in 60 seconds (a dronecaster tutorial)

the following is a tutorial to learn how to:

  1. make a drone supercollider
  2. add your drone to dronecaster.

I wrote this as reference for a future norns study group meetup.

before you begin

before starting, make sure you have supercollider and plugins (if you want). also, if you’d like, you can get a github account to make the addition to the dronecaster script!

if you have these basic things installed, you are good to go. everything else will be explained (including how to use supercollider, how to use git, etc.). however, if you are wanting to make a contribution i’m assuming you are okay using a terminal.

[supercollider tutorial] five steps to get in the drone zone

okay, we’ll start with supercollider. we’ll go from tone to drone in just five steps. we are going to make the drone called “Gristle”, a primal sawtooth drone:

1. the tone

first open supercollider and “boot the server” by selecting Server -> Boot Server from the menu.

now paste the following code as the starting drone. this drone is simply a C2 sine wave (C2 = 65.41 hz).

(
x = SynthDef("basic",
{
    arg hz=65.41, amp=0.5;
    var sig; // define variables we need

    // the drone zone!
    sig = SinOsc.ar(
            freq:hz,
            mul:amp,
    );

    // make two versions, one for left and one for right
    sig = sig.dup;

    // make sound!
    Out.ar(0,sig); 
}
).play;
)

to run this code, click your cursor anywhere in the code and press Ctl+<enter>. this runs all the code between the first and last parentheses. you should hear a very low sound (maybe use headphones to hear it!).

to stop it just press Ctl+<period>.

another cool trick is that you can change things while its playing, for instance we can change the frequency and volume (use Ctl+Enter to run each line).

x.set("hz",65.41*2); // up can octave
x.set("amp",0.01); // volume down

the reason this works is that we defined the drone into the x variable and defined arguments (see the line “arg hz=65.41, amp=0.5;”).

2. add overtones

now lets make it less boring with overtones. overtones are multiples of fundamental at lower volumes. when dealing with multiple anything, its useful to make an “array”. you can define all sorts of arrays in supercollider, for example here’s an array of powers of 2:

Array.fill(3,{arg i; 2**i}).postln
// -> [ 1.0, 2.0, 4.0 ]

we can use that array as the frequency in the SinOsc oscillator so it will automatically make 3 oscillators, each frequency doubled. we can multiply that array by the fundamental to scale the frequencies.

(
x = SynthDef("basic_w_overtones",
{
    arg hz=65.41, amp=0.5;
    var sig;

    // the drone zone!
    sig = Mix.ar(
        SinOsc.ar(
            freq: hz * Array.fill(3, {arg i; 2**i }),
            mul: amp * Array.fill(3, {arg i; (1/2)**i }),
        )
    );

    // another way to spread signal into stereo
    sig = Splay.ar(sig);

    // make sound!
    Out.ar(0,sig); 
}
).play;
)

similarly, i added in a array for the volume (mul) which scales each oscillator. also i wrapped the SinOsc.ar inside Mix.ar which simply “mixes” the signals by adding them up so that you get a single signal.

3. different oscillators!

Sine waves are nice, but there are lots of different oscillators we can use. we can swap out SinOsc.ar (sine wave) for VarSaw (sawtooth), SinOscFB (sine w/ feedback), Pulse, or many others. here i’ve opted for the saw wave:

(
x = SynthDef("basic_w_overtones_varsaw",
{
    arg hz=65.41, amp=0.5;
    var sig;

    // the drone zone!
    sig = Mix.ar(
        VarSaw.ar(
            freq: hz * Array.fill(3, {arg i; 2**i }),
            mul: amp * Array.fill(3, {arg i; (1/2)**i }),
        )
    );

    // another way to spread signal into stereo
    sig = Splay.ar(sig);

    // make sound!
    Out.ar(0,sig); 
}
).play;
)

try other oscillators! see what happens.

4. add modulation

modulation will bring in organic wavering to the drone. there are many ways to do this, but my favorite is to use a randomly oscillating sine wave with a long period.

we can get randomness by using the LFnoise0.kr:

{LFNoise0.kr(freq:10)}.plot(1)

lfnoise1

then we can make a sine wave which uses that stepped noise as its frequency:

{SinOsc.kr(freq:LFNoise0.kr(freq:2)*4)}.plot(4)

sin-lfnoise

the sine wave naturally has values between -1 and 1, so we might need to change that. its easy to change to any range you want with the .range(min,max) function (or by using LinLin.kr). here i can change it to 0-100:

{SinOsc.kr(freq:LFNoise0.kr(freq:1)).range(0,100)}.plot(4)

Screenshot from 2021-03-26 08-34-43

you can dream up any sort of modulation that you like. another of my favorite modulation sources of is a nice “drunken walk”:

VarLag.kr(LFNoise0.kr(5).range(0,100),1/5,warp:\sine)

you can easily swap in and out these modulations, just make sure to convert the .range(min,max) to the range you need it.

great, now throw those into the drone to modulate the frequencies of the oscillators by a fraction of the frequency:

(
x = SynthDef("basic_w_overtones_varsaw_modulation",
{
    arg hz=65.41, amp=0.5;
    var sig;

    // the drone zone!
    sig = Mix.ar(
        VarSaw.ar(
            freq: hz * Array.fill(3, {arg i; 2**i * 
                    SinOsc.kr(LFNoise0.kr(1)).range(0.99,1.01)
            }),
            mul: amp * Array.fill(3, {arg i; (1/2)**i }),
        )
    );

    // another way to spread signal into stereo
    sig = Splay.ar(sig);

    // make sound!
    Out.ar(0,sig); 
}
).play;
)

sounding good, but we can get better with one more step.

5. add filter + effects

filters and effects go a long way. there are lots of filters available: BPF (band pass), LPF (low pass), MoogFF (Moog VCF), HPF (high pass), to name a few. there are also some nice effects available like FreeVerb and Greyhole (extensions needed for latter). lets add these in.

here’s i’ve added a band-pass filter modulated by the mouse and a Greyhole delay modulated by the mouse.

(
x = SynthDef("basic_w_overtones_varsaw_modulation_filtereffects",
{
    arg hz=65.41, amp=0.5;
    var sig;

    // the drone zone!
    sig = Mix.ar(
        VarSaw.ar(
            freq: hz * Array.fill(3, {arg i; 2**i * 
                    SinOsc.kr(LFNoise0.kr(1)).range(0.99,1.01)
            }),
            mul: amp * Array.fill(3, {arg i; (1/2)**i }),
        )
    );
    // add filter
    sig = BPF.ar(sig,
            MouseX.kr(80,2000)
    );
    // add reverb
    sig = Greyhole.ar(sig,delayTime:MouseY.kr(0.1,0.4));

        
    // another way to spread signal into stereo
    sig = Splay.ar(sig);

    // make sound!
    Out.ar(0,sig); 
}
).play;
)

another trick when adding something is to use your mouse to play with parameters. we can do that here. simply change one of the parameters to MouseX.kr or MouseY.kr and moving your mouse will change that parameter.

you have entered the drone zone!

from here you can experiment with replacing bits and pieces with different oscillators/filters/effects, or replacing your Mouse parts with different sorts of modulations. for instance, you can replace the filter with a MoogLadder with random modulation in the filter and resonance:

// add filter
sig = MoogLadder.ar(sig,
        VarLag.kr(LFNoise0.kr(5).range(80,2000),1/5,warp:\sine),
        VarLag.kr(LFNoise0.kr(5).range(0,1.0),1/5,warp:\sine)
);

there are endless variations and permutations. explore!

6. (coda)

supercollider can seem intimidating, but a lot of things built in supercollider are bulit in pieces. the supercollider docs is a rich source of great pieces to add to your drone. for example, when looking up LocalOut they have a great example of a tape-style delay feedback. it didn’t take much to add that into a drone, for example the following:

(
x = SynthDef("tape-delay-panning",
{
        arg hz=265.41, amp=0.5;
		var sig;
		var local, ampcheck; // needed for tap-ish delay
		
		// any drone you want
        sig = SinOsc.ar(
            freq:hz,
            mul:amp,
        );
		// make sure its in stereo
        sig = Splay.ar(sig); 

		// tape-ish delay!
		ampcheck = Amplitude.kr(Mix.ar(sig));
		sig = sig * (ampcheck > 0.02); // noise gate
		local = LocalIn.ar(2);
		local = OnePole.ar(local, 0.4);
		local = OnePole.ar(local, -0.08);
		local = Rotate2.ar(local[0], local[1],0.2);
		local = DelayN.ar(local, 0.3, 0.25); // try varying the 0.25!
		local = LeakDC.ar(local);
		local = ((local + sig) * 1.25).softclip;
		
		// use Mouse to play with filter
		local = LPF.ar(local,MouseX.kr(40,16000));
		
		// use Mouse to play with feedback
		LocalOut.ar(local*MouseY.kr(0.5,1.5));
		
		
		// panning!
		local = Balance2.ar(local[0] ,local[1],SinOsc.kr(LFNoise0.kr(0.1).range(0.05,0.2)
	));
		
		
		// send it out
        Out.ar(0,local); 
}
).play;
)

[norns] adding a drone to dronecaster

now we will take the drone and add it to dronecaster/

fork dronecaster

lets first start by forking dronecaster and cloning it to our norns.

goto the dronecaster webpage: GitHub - northern-information/dronecaster: cast drones & record whatever returns

click the fork button. that’s it! now you have a copy of dronecaster you can create or destroy as you wish.

now ssh into your norns (click here for help with that). from here we will need to use a terminal.

to put your copy of dronecaster on your norns, first remove a previous copy by typing into the terminal:

rm -rf ~/dust/code/dronecaster

now clone your copy using (making sure to change with your user github name):

git clone https://github.com/<your github user name>/dronecaster ~/dust/code/dronecaster

add your drone

now you can edit the dronecaster code. the easiest way to do this is to mount the norns files on your computer and edit them as you would normally. click here for instructions on how to get your Mac or Windows computer to open up the norns drive.

once you have the norns drive on your computer, goto the dust/code/dronecaster folder. from here, goto the engines -> drones folder. now make a new drone - a file called <your name>.scd. open up that file and paste the following:

// @yourname
// your drone name
// how does your drone describe itself

{
    arg hz=440, amp=0.02;
    var sig; // define variables we need

    // the drone zone!
    sig = SinOsc.ar(
            freq:hz,
            mul:amp,
    );
    sig = sig.dup;
}

replace the drone zone as you need! basically you can copy-paste the whole thing but make sure to remove (or comment out with // the Out.ar(...) as that is not needed in dronecaster (it is handled within the script). also make sure to not use MouseX or MouseY when putting your drone in, as the norns doesn’t (yet) have mouse support.

to listen to your drone, just load up dronecaster and use E1 to find your drone. cast away!

push the drone

lets share your drone! the following instructions will take you through the steps to send your drone code back to the original repository so that everyone can share in the glory of your drone.

back in the terminal, go to the dronecaster repository.

cd ~/dust/code/dronecaster

now add the new drone to the git repository and commit it.

git add .
git commit -am "added <your drone name>"
git push

great, now you’ve uploaded your new code to the Github cloud. to finish up the share, goto your code’s website: https://github.com/<yourname>/dronecaster. click “Pull request” and then on the next page click “Create pull request”.

that’s it! give it time for Tyler to merge it.

now that you know this, what drone will you make?

58 Likes

this tutorial is insanely good, @infinitedigits. thank you so much for writing this. i’ll finally be able to learn how my own script works!! :sweat_smile:

8 Likes

we should really refactor this so that contributions just implement DroneZone and leave out the boilerplate

3 Likes

happy to amend the tutorial for this.

I agree it would be nice and simple if, for example, the Triangle.scd drone was simply

(LFTri.ar(hz_) * amp_).dup

but I looked into doing this and couldn’t really figure a good way to do it. one idea was to replace the drones[name] = e.fullPath.load with something that loaded just a dronezone as text and then prepended/appended the boilerplate to it around it so it becomes a supercollider function again and then load that text (somehow). but I feel like thats a bit too much of a hack…

Snippet can be a function that returns this, evaluated it in the synthdef

1 Like

perfect, thanks. got it :slight_smile:

i’m sure you don’t need it, but i made a quick demo/test of the technique

2 Likes

thanks! i did basically that: reduce boilerplate in drones · schollz/dronecaster@9574d15 · GitHub

you’re gist is extremely helpful though. I was looking for something like executeFile but didn’t get it! also your code helps me understand how to better utilize functions. I’m constantly wrapping things

1 Like

v1.0.2

all thanks to @schollz

  • add gristle
  • add dreamcrusher
  • making new drones is 3000% easier now
  • add params

saturday at the norns study group we’re going to make more drones together! come on by.

9 Likes

dreamcrusher

25 Likes

guhhhh that’s so beautifulllllll

Does anyone use UNREANTH on a regular basis? All of the other drones work for me, but for some reason whenever I select UNREANTH I just get silence.

I know it’s supposed to be an unreachable anthem, but…

1 Like

yea, dronecaster hangs sometimes and you have to switch back and forth between a drone. typically clears up. typically…

Yeah, I’ve observed that, and with the other drones there’s no problem getting them to kick in. But UNREANTH has never made any sound for me, no matter what I do.

The important takeaway though is: you don’t see the same problem, so it’s probably something up with my norns shield.

UNREANTH continues to work for me. it can push itself into territory with lots of phase cancellation, eventually leaving only a spiky crown of sawtooth residuals. but not silence

i wonder what is up with your build and/or installation. might try bypassing the Normalizer near end of chain.