digital LFO (+ digital noise)

Here’s a short sample of two (digital) lfsr used as percussion generator (thanks for Gordon’s comment which gave me the idea). I added a random vco and a kick drum just to add more movement in it.

It’s really digital nastiness but I love it ! It creates some very interesting textures! (think of it as the sonic landscape of Mario becoming totaly sicko and deciding to rape his brother with a pipe cutter). I may even make an entire module out of this 8bit nastiness!

It isn’t very relevant to put those kind of sound into a LFO oriented module but I’ve some space left for more code and as always I want the most out of it (reduce space and module number consideration). Could be nice in a small system. At the moment the module offers 4 modes for the two lfos :

1- slow lfo (0.0007Hz to 0.7Hz) with wavemorphing
2- fast lfo (0.120hz to 32hz (might be 60hz with a bit of bit_shifting) with wavemorfing
3- gated lfo
4- digital noise (frequency and decay time variable). What the sample is about.

of course, if I’ve some brain farts I may (and I want to) add more stuff.

Here’s the code for that noisy part.

uint8_t bit_noise(void)
phase_index_noise = (adc_value[1]>>4) + 5;
phase_accumulator_noise -= phase_index_noise;
phase_index_noise = phase_accumulator_noise >> 8; 
		if(bit_noise_pitch >= adc_value[0]>>6)
		    noise = lfsr_number_out(0);
		    if(noise > phase_index_noise) 
                   {noise %= phase_index_noise;}
		   bit_noise_pitch= 0; 
		if(phase_index_noise < 10)
		  gate_0 = 0;
	return noise;

I must admit that I didn’t know how to end the sound (hence the last if statement) and it is still not the thing to do. However, it creates some interesting pattern of sound because the phase_accumulator sometimes doesn’t go below 10 and restart with a larger value (you can hear the effect in the short sample).

basically, you generate a sample and return it from the fonction.

EDIT: actually, as always the output of the DACs will be much happier with some kind of low pass filtering (hence the two 10K resitors, stick a cap to ground in between). However, the digital noise is totally modified by it. compromises have to be done once again.



Filed under Uncategorized

2 responses to “digital LFO (+ digital noise)

  1. Gordon

    Glad that you found my comments useful. It really is gritty 8 bit computer nastiness, quite distinct from the usual analog percussion sounds.
    One day I will build all of the drum circuit ideas in a complete unit. What I don’t have is a means of sequencing the various drum circuits. I need to learn to write code again ( it’s been a long time! )

    • Actually the harshness is quite tamed by the low pass fitler needed after the dac. Without it, it sounds very nasty (and very cool).

      I’m planning to build a digital 8bit drum machine full of bitcrushed and lofi sound. I like the crunchness it brings.

      I’ve managed to build something with a drumbass loop sample and the result is interesting.

      I’m currently really into that sort of things actually.Linear feedback shift register in the digital world. Playing with the tap configuration can bring interesting movement.

      I might do something close to the zorlon cannon I think.

      Anyway, thanks for your interest Gordon !

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s