Designing a white, pink & blue noise generator from scratch
Вставка
- Опубліковано 2 сер 2024
- Support the channel...
... through Patreon: / moritzklein
... by buying my DIY kits: www.ericasynths.lv/shop/diy-k...
In this episode, we're torturing an NPN transistor into creating some white noise - which we'll then filter to also get some pink and blue noise. If you want to build along, here's the bill of materials:
1x TL074 quad op amp
1x BC548 transistor
1x 1M resistor
6x 100k resistor
1x 51k resistor
1x 22k resistor
2x 10k resistor
1x 2k resistor
3x 1k resistor
1x 680Ω resistor
1x 1µF foil capacitor
1x 33nF foil capacitor
1x 3.3nF foil capacitor
3x 1nF capacitor
1x 330pF foil capacitor
Chapters
00:00 Intro & what is noise?
03:00 Transistor breakdown & white noise
10:51 Shelf filters & pink noise
19:09 Limited high pass & blue noise - Наука та технологія
When I was 12 years old (55 years ago) an uncle gave me an analog synthesizer kit. I remember the noise source circuit included a transistor with no connection to the base input. Now I understand why! Thanks.
I love this channel so much. Thankyou for feeding my engineer brain a delicious 3 course meal.
Just thought of this, but a less cruel analogy for the breakdown voltage might be waves breaking over rocks. 🌊🪨 The rock (transistor) will block a wave up to a certain height (amplitude), but water above that height will crest and crash over the rock (breakdown). Going a step further with this analogy, over time, the waves crashing will erode the rock down (burn out the transistor). How quickly that happens depends on how big the waves are, and how strong the rock is. Love these simple filter circuits! 👍️
I love how complete and clear your explanations are! This video helped me understand a lot about high and low pass filters.
Mate, I have learned so much from you. Keep doing what you are doing and I will always support!
astonishing quality moritz! Thank you for all the top tier content.
I've learned so much from your videos, thanks.
such simple clear explanations, awesome content
Thanks for adding shelf filters to my bag of analog tricks!
I already knew about the "overvolted transistor as a noise source" thing but the filter stuff was new to me and really interesting.
I need to get myself an audio range spectrum analyzer now ...
I made something almost exactly like this a couple of years ago, trying to make a noise generator function for a function generator (I'm still) building. It was most instructive learning how to do that, but I wish I had your video back then to explain it to me, as this is the best explanation I've seen all together in one place. I'll add a blue noise function now too (I just had white and pink before). For the pink noise, I did try a 6-stage shelf filter to try and get more accurate, but it never seemed to work as well as the 3 stage one... probably because the attenuation was too much.
Thank you so much! I've been wanting to learn about analog noise generation for a while!
Excellently explained! I have never seen this made so clear. Thanks!
woo, been looking forward to this one!
Fantastic video as always Moritz, thank you so much for your efforts. Excellent explanations and demonstrations.
thanks, james!
Wow, you explained this so well! Thanks for sharing, very informative.
Great work as always amigo
Hello mister Moritz Klein,
WOW, so many smart explaining and analogies in this video, I learned so much from only two of your video's... Amazing.
Great explanation and instructions and the video's themselves (the production) is exceptional, you earned yourself another subscriber !!
Awesome 👏🏻 as usual !
I love the content. Very well done.
One minor point. The sine wave is a single bin in the frequency spectrum. If it's more than one bin, that is a side effect of how the data is sampled. The only reason I think this is significant is because it further accentuates your point that a sine wave is very frequency specific, as opposed to the noise.
Thanks so much for the great content.
Thank you very much, Moritz, thanks to your Channel i started creating my modular synth:according your video and shemes already assembled and working 2 vco(first one is not so stable keeping octave, seems because of component) second vco is stable tested with external midi keyboard +doepfer midi to cv or with korg sequenser with cv/gate out, also assembled VCA, ad/sr, and most Hard for me - ladder FILTER, all works good, some moments out of range - but it is because of components i used.
And now I finally understood what noise is! Thanks so much!
Excellent video!
Nicely done!
so in depth!
19:36 thank you, had little hop that this video about electronics would actually help me in Image processing both are signals after all.
Thank you Mortiz😁✌️
I love these videos and they are always super high quality and easy to understand. The explanations really do showcase the fundamentals of audio circuits!
I wonder if you could improve your top-down shots with a Telecentric Lens? It would remove the perspective distortion on your breadboard, allowing the viewer to see the circuit in "2d", orthogonal view. So the resistors and cap leads aren't out of place. I suppose you could get the same effect much more cheaply with a telephoto lens placed far away, at a high zoom...
Fascinating, thank you Moritz! I'd have just tapped into the noise source, let it run through a 6db/oct filter and then mixed the source and the filtered output together - having watched the video I'm confident that that wouldn't work now 😁
hmm maybe if you weigh the two signals 2:1 in the mix? something to try!
@@MoritzKlein0 if I had more of a clue than I have and a way to test properly I would now that you've said that!
I am not 100 sure but this may not work perfectly, becase there is phase shifting from by the filtering the signal. worth trying though
it should again look like a shelf filter, so I don't think you will see much in component savings
ah yes thats true. log scalle kinda missleads you there if you dont know what you are looking at
Love it
Creative video, thanks :)
You're like the ben eater of analog
Hi! Can you please make big comparsion between various noise sources in controllable breakdown mode? Such as zener, detector diodes, transistors; both silicon and old germanium ones. And also LEDs with different semiconductor types. I wonder for differences in spectrum.
Tone changes both with the type of semiconductor, and the current it is driven at. Because of this your request is difficult to fulfill, but if you search sites of guitar distortion effect builders you will find volumes have been written on this topic. Often, guitar players have multiple noise generating effects which operate on PN junction breakdown because of their different qualities. You should experiment and select based on your likes. Noise is very individual.
Nice that exactly what I looked for actually exists
It should be noted that synth makers tested their transistors and hand selected the worst, dirtiest transistors for use as noise sources. Some makers even switched noise sources as the task of selecting proper noise transistors got harder because of expanded sales volume and improvements in transistor manufacturing. The two most common substitutes were Zener diodes and shift register based digital noise chips. All have different tone and texture, but transistors are the most variable in manufacturing.
LFSR is by far the easiest and most controllable way to do it, yeah, but I guess many people might find it boring
When doing the schematic myself, I was wondering why the noise was off-centered. I finally understood by comparing with Rene Schmitz schematics. We need a 220nF capacitor betweeen the 680 ohms resistor and ground to compensate for the offset. Seems the zero is not perfect on op amps, and it is very noticeable due to the high gain. At least this is my interpretation for that issue.
Interesting how a high-pass filter and an AC coupling capacitor are basically the same arrangement. Presumably with a coupling capacitor, you pick a value so that the cutoff is well below audible frequencies?
It's not just basically the same, it is 100% the same
yes, and in fact a DC offset shows up as a 0Hz frequency in a fourier transform. with a coupling cap the resistor part of the HP filter is distributed as parasitic resistances to ground in the nearby components.
hell yeah, trans noise generator
Lol
Hey Moritz :)
Thanks you soo much for your awsome and also inspiring videos. I'm fully pumped building my own stuff along with your vids.
One thing that is rather confusing for me though is, ordering all the components. I mean, i know how placing internet orders work :D but I mean, do you buy your components normally in bundles? What sources can you recommend (in germany / austria) and what kind of kit (like resistors, capacitors, potis, diodes etc.) would you recommend for a beginner like me?
Thx in advance
Amazing video as always! Would love to see this noise hooked to a quantizer and generating random melodies.
You need also S&H for this.
i really want to revisit quantizing once the erica synths collaboration is through!
@@mpingo91 luckily, if i remember correctly, moritz already did a video on a s&h.
Nice! Will be looking forward to the sawtooth to triangle video. I have built your oscillator with the old saw to triangle converter, but it kinda has some high frequency content due to the transition between up and down not being perfect
i found a fix for that in a previous livestream - will work it into the new design.
@@MoritzKlein0 awsome!
Great videos. How do you get your voice-over sounding so slick? A good mic with a compressor?
Great video, thanks. Is the junction breakdown really a white noise source, how do we know it isn't coloured already (by the physics of electrons etc)? A pseudo-random generator such as a 32-bit binary shift register with XOR gates could be another way to generate an effective large-amplitude audio white noise source.
To make a 3db/oct slope.
- Make a parallel section: one side with the unfiltered noise signal, one side with the 6db/oct slope filter
- Invert the phase of the filtered signal, and reduce the amplitude by whatever factor is equivalent to 6 decibels of perceived loudness (possibly 50%?)
- Recombine the signals, and you'll have a 3db/oct slope filter.
Thats how i would do it in my DAW if i needed to make a 3db/oct filter and only had access to a 6db filter.
It'd be the same as routing the audio from a parent track to a parallel send track, putting a 6db/oct filter on the send, inverting the phase and lowering the output by 6 decibels.
:D
After noise comes S&H, usually. PS, nicely explained
He’s already done a s&h video
ua-cam.com/video/kIJqzkRe4do/v-deo.html
I don't understand, on the schematics it seems like the emitter should be connected to +V through the resistor but on the breadboard it is connected to ground (the blue breadboard rail). How can this still work?
I love this, do you know how to make a sample and hold circuit for this? I'm trying to sample to a capacitor, but it loose it's charge quite fast 😅
Usually, white noise is noise containing random frequencies with equal energy per frequency, whereas pink noise is noise containing random frequencies with equal energy per octave, so, pink noise tends to sound like it has more bass frequencies in it than white noise does, blue noise basically contains random high frequencies in it, red noise contains random low frequencies in it, there's also brown noise, or Brownian noise too.
Great video! As all your previous, love them! Just wondering, the "white noise" inputs to pink and blue, are they directly connected to the white output or through a buffer? My feel from the video is that there is no buffer in between, just straight on from the white output?
yeah, since both filters have a pretty high input impedance, i don’t think an additional buffer is necessary.
Heh, the sine in your drawing is what we used to call a nine wave in college.
*Nearly* a sine wave 😉
i was debating wether or not i should re-do it, but i realized that the next attempt wouldn't have been better necessarily
@@MoritzKlein0 you should see mine ...
The classic way noise is generated in a Synthesizer is by the use of a reverse-biased Diode junction, or a reversed-biased transistor B-E junction, you do have to hand-select a diode or transistor to find one that generates a good amount of noise though.
amplifying the BJT signal is a form of coloring the noise because the op-amp is bandlimited
great. before this I knew only how to design punk noise
Can all 3 noise sources be built into one module by combining their filter inputs after the first buffer and using a switch to select the outputs? It seems like the filters might interact.
Thanks for making this! I'm curious - does abusing the transistor like this shorten its lifespan at all?
Not if you keep the current low. Moritz is using a 100k resistor here, which will only let about 50-60 uA flow.
exactly - should’ve mentioned this in the video!
I've been playing around with this circuit for a couple of days. I am using a 2N3904 transistor so it "could" be different from the BC548 or others.
I needed a lot more gain in the white noise to get good enough levels. I added a second gain stage with a voltage gain of 32 to get close to what I expected (about 7.5V peak).
The GBW of the transistor is 3 MHz. The gain in the White noise part of the video is set to 148 (100K feedback, 680 to GND. With the 3 MHz GBW, that would be a bandwidth of 22 KHz. Seems OK for Audio.
However, with a gain of 148, and an offset voltage of, say 3 mV, is a DC offset in the output of around 0.5V, which is what I measured. I tried a TL084 with slightly better results. I ended up adding an additional 100 ohms to ground (dropped the 680 to 560) and a 50K trim pot with 220K to the wiper (the classic circuit for trimming out offset errors). This was enough to easily trim out the offset voltage error.
Using the White output to drive the unity gain of the Blue output didn't have enough amplitude. For that I changed the unity gain buffer to a gain of about 3 (24K feedback, 12K to ground), That was about right.
The pink level was WAY too low. I added amplification there as well. Something around 16x was too much (100K/6.8K). I'll probably raise the resistor to ground to 10K and call it good.
All of this to ask this question - I expected that the RC values in the Pink noise circuit would be somewhere near the corner frequencies but they are WAY off what I expected. For instance, R=2000 and C=330pF is up around 1.5MHz. The other end R=51K, C=33nF is at 594 Hz.
What am I missing here?
I ran an LTSpice simulation and the Pink circuit works just as described in the video.
I re-did the RC calculations adding in the 100K and got something like the video (corners at 200Hz, 2.7KHz, and 29KHz.) Perhaps that 'sthe right way for me to see the "why" this circuit works.
unfortunately, the 2N3904 produces barely any noise. i've run into the same issue. if you switch it for a BC548/547, you should get much better results.
@@MoritzKlein0 That makes sense. It's not the typical transistor here in the US, but I'll add some to my Mouser cart for next order.
i‘m not sure this covers your other concerns, though
@@MoritzKlein0 It might because the noise itself might be better.
Hi, nice series. Can I connect to output next OP as headphones amp or output is to high (+-10V)? Thank you.
These videos are really great Moritz, but one thing that's missing (unless I missed it) is what kind of output module we need to connect our audio to an amp, headphones, or computer's audio in without blowing anything up. Some YT videos just say "don't worry, connect it up", but having 10V p-p signals going into a laptop or audio amp sounds like it might do some damage....?
PS: A red wire connecting to ground on the breadboard? I thought you were better than that.... ;)
you can use something like this to scale 10 V pp signals down to consumer audio line level: tinyurl.com/29kcbouk
@@MoritzKlein0 Great and INTERACTIVE answer, very cool - thanks! I finally signed up for your Patreon. :)
I've used all your components and have used the exact breadboard layout for the white noise circuit. I get white noise but it's very quiet. I'm using an 8ohm speaker for my output. Any suggestions on how to make this much loider
So interesting ! Maybe we are ready for an analog drum machine ;)
definitely on my list!
Twin T's are probably a really great place to start, combined with the blue"ish" noise, you are on the way to old school transistor rhythm machines. I wish the days of old with electronic magazines "build your own rhythm box" were still commonplace. While they were still published when I was really young, by the time my teens rolled around, It was the sparse articles in electronic musician (diy level converters and the like)
Would another way to get a 3dB/oct filter be to have a 6db low pass signal mixed with the dry signal? Could that cause phasing issues?
What could you add to make a brown noise output? A steeper filter with a lower cutoff frequency than the pink noise filter?
yeah, i think brown noise is just white noise sent through a standard 6 db/oct low pass filter!
Hm, the avalanche breakdown noise is in fact shot noise with a certain characteristic. The charge carriers have to overcome a certain potential barrier to initiate a cascade of secondary charge carrieres. This means, shot noise is allready "coloured". I prefer thermal noise (of a metall film resistor or a low power light bulb) as source for a white noise generator, because this is real white noise with an even frequency distribution.
Is it possible to miniaturize this (white only) to fit into an earbud (as an outside noise masking for sleeping)?
yeah, if you go SMT!
@@MoritzKlein0 Is there a site/service where I could upload the schematics and they'd produce the entire devices with SMT components, not just the board?
Hey Moritz, with Conrad closing down, where will you get parts and tools and enclosures and stuff?
i usually go to a small store called “segor electronics” here in berlin. can recommend!
I hopped for an introduction to DSP theory
I would like to see a 7/15 bit LFSR digital noise generator. I tried with what i had, a 74HC595, it didnt work well, using external clocks would make the chips unpredictable. Im gunna try again with a CD4094
15 bits is probably too small and the pseudorandom pattern will repeat every second for a 32KHz clock. Use a 32bit LSFR or bigger for a more random output. This is even easier with a small micro and a bit of code.
@@mustang2440 I see 32bit too big for audio purpose, yes it can give a cleaner sounding "white" noise with more randomness, but I mostly care about the harsh digital noise. I'm using 15bit because its only 2 chips and flipping a switch turns it into a 7bit for harsher metallic sound. the usually clock I use ranges from 0.1Hz to 10kHz so the repetition is minutes to seconds and with modulation that's even less noticeable. I have the schematic if your interested
@@leomorev8912ok yes makes sense for a harsher sound but any clock below 20Hz you won't hear as sound, but as clicks.
Awesome, Moritz!! Thank you!
Moritz, what type of capacitor do you use and are they better suited for the purpose of audio?
I would like to see a brown noise circuit *and* a circuit that will give an animated sweeping effect with variable rate. As well as a gated input. *Please.*
You can try to use any type on non polarised capacitors(so electrolytic and tantalum don’t work) for audio, even the cheap ceramic ones in most cases. The one he uses are called film capacitors or foil capacitors, they are meant to be better for audio but are also significantly more expensive. It maybe worth trying to use the ceramic ones on a breadboard or something, if the circuit sounds fine you can save some money
Also for brown noise, it’s just a simple 6db/oct filter of white noise en.m.wikipedia.org/wiki/Brownian_noise .
so. A simple 1pole passive low pass filter with 1 resistor and 1 capacitor will work
@@woosix7735 the main downside of ceramic capacitors is that they are microphonic.
The really cheap ones have terrible tolerance, temperature coefficient, and voltage coefficient too.
18:49 What program and setup did you use to get the spectral view of your signal?
this is the stock spectrum analyzer plug-in from ableton! i take a screen capture, and then i combine it with the breadboard footage.
I've tried to simulate the white noise circuit on TINA TI and i cant get the same response that you seen on the osciloscope, can you help me with that. I am trying to build and white noise generator to simulate the response of a Sallen-Key low pass filter.
yay ! white blue and pink !🏳⚧
Are all the resistors 1/2 watt? If not what voltage are they
I looked up the BC548 datasheet and it lists a breakdown voltage of 30V but you are supplying the white noise circuit with 12V? Without an oscilloscope how could I know when this threshold is reached with my transistor?
That sounds like the C-B breakdown voltage. He's using the B-E junction which has a lower breakdown voltage.
I loved the video, but have a question. You said the high pass filter had a cutoff of 1.6hz. I've been working on a random LFO that outputs voltage from 0v to 3.3v (arduino based) and I would like to shift it so it is centered on 0 volts. Could the capacitor/resistor be changed to allow much longer periods in the + or -, like 20-30s? I'm guessing not, but I'm a noob when it comes to designing circuits.
Or could the arduino be run at 1.65+ as the positive and -1.65v at the ground?
yes sure, that'll work. just use a bigger resistor or capacitor. you can calculate the cutoff frequencies of different r/c combinations with this tool: sim.okawa-denshi.jp/en/CRtool.php
The shelf filter is a really cool concept that I’d never really heard of, and it was really well-explained. But why can’t you just mix the original input (the white noise) with the 6db/oct filtered output so it’s like only 50% filtered, 50% dry signal? Wouldn’t that be an easier way to get 3db/oct, hardware-wise?
Exactly my thoughts, then with a few pots you could vary from -6dB HP to -6 dB LP, sweeping through blue and pink spectra and getting a BP filter too. I imagine you don't have to worry about phase issues at all since we're just mixing noise.
That's basically what a single shelf filter is doing. But on its own, it's not very close to the 3db/oct curve, hence stacking them.
Curious what a band pass filter in here would look like!
Good idea. There's still an unused opamp on the chip.
@@RayMcNamaraMusic Yes! But the more I thought about it.... wouldn't you need two more op amps? When I picture it in my head I'm visualizing basically building everything in the video again.
@@mathieumartin9344 You don't have to build the whole thing in duplicate just for another filter type. You could use the same white noise source and send it to the BP filter, which is basically a LP and HP in series. You could pull that off with a single opamp.
6:41 On the breadboard the emitter is now connected to ground through the 100k resister and the gray wire. I'm a bit confused. Very informative video nontheless!
yeah i messed up there. should‘ve gone into to positive rail!
@@MoritzKlein0 Haha at 16:05 I see the correction 😅 Thanks for the great video!
I wonder how the noise colors were decided.
white noise is an analogy to white light. in white light, every wavelengthe(frequency) is present with the same amplitude. with white noise, all the frequencys are also present with equal amplitude. for the other colours of noise dont realy have an optical analogue, but blue light is higher frequency and red light is lower frequency, so kinda similar to noise colours.
Could I skip the amplifier step and just use a pedal with any sort of boost? (boost, distortion, etc)
if they‘re input buffered, yes!
@@MoritzKlein0 i...think so? Pedals that ARENT true bypass are buffered aren't they?
@@MoritzKlein0 also curious what the 100k resistor is doing, maybe i misunderstood that part of the video. what would happen if its a different value? or there was no resistor at all? im trying to put together a white noise circuit of my own, but i have a different transistor on hand so im curious what part it plays.
Ive made this circuit with correct values, white is working well and is stable, pink works but after about 15seconds it starts breaking down into a crackle, dropping from 4v peak to peak to 0v. I didn’t have foil caps for the filter, so I used 2 film caps and a ceramic… could this be the problem? Turning the power off and back on brings the pink noise back but it only lasts a few seconds.
Worked it out… it was a faulty TL072 or bad connection on the opamp. Changed it and it’s works fine now
Looks like
red wire is +12v
Green wire is -12v
And black clip is ground (white wire)
Can this work with 9v? I need to change components?
why do you connect your emitter to the ground but say it's the supply voltage? This circuit is confusing me.
the white noise is the same noise than a television whitout antenna , and looking at osciloscope, the white noise rises amplitude in high frequencies, and pink noise has all frequencies at same level ...
Hallo Moritz. Is it possible to obtain a blue noise output, by feeding + an - opamp inputs with white and pink noise respectively, in a differenciator configuration ? Just an idea to save some components. And what would be the result with pink and blue ? White output again ? Thank you.
The fourier transform is linear, so I would expect subtracting pink from white to work if the amplitudes match up. Not sure how it would work out in practice though with the filtering involved etc
Pink noise should be enough to make blue noise, and vice versa:
-3 dB/octave is hard and 3 dB/octave is also hard, but if you have one then you should be able to get the other using simple filtering.
So at least in theory, if you pass the pink noise through a 6 dB/octave high pass filter (differentiator), then you should get blue noise.
And if you pass blue noise through a 6 dB/octave low pass filter (integrator), you should get pink noise.
It doesn't have to be a perfect integrator/differentiator, just act more or less like it over the frequency range that you care about.
In practice, you might get some trouble because some parts of the input signal are quite weak, and those are the ones that you would be amplifying the most, but I think it could work.
Hi, Is j112 can be used if no j113?
For sample&hold sheme
yup, no problem!
When I listen to white pink and blue noise... 🏳⚧
is the 12v ac or dc?
it’s dc.
@@MoritzKlein0 awesome thank you
ua-cam.com/video/0yB_h_wFkh4/v-deo.html - Why was that transistor connected to the ground from 2 sides?
And better question: Why was it still working?
good question! because i started recording video and audio separately, and i messed up here. (the audio take is from
a working version of the circuit setup.)
Brown noise? 😃
Hi! Greetings from BR :))) 🇧🇷
Please, put "making white noise" on this video tags for more people then me discovery this content
aww man, this doesn't work very well with 9v batteries, just tried it, it needs the 12V.
Edit: you can hack it to work by connecting the base of the transistor(middle pin) to the negative supply insted of groud. It jusses the transister up with 18V insted of 9V
oh good to know! have you also tried using a weaker resistor between the supply voltage and emitter?
@@MoritzKlein0 no I havent tried that. thinking about this probably every transistor is going to have different brekdown voltage and noise volume charecteristics, because it's not an intended use and is not spesified by the manufacurer. you just have to try a bunch of stuff untill it works i guess
I've just made the white noise schematic with tl072 op-amp but no noise output. I'm getting 11.3volts at the output but no audible noise. Any suggestions, anyone?
The schematic visible at 8 minutes
How about red or infrared noise, especially as connected to a Sample/Hold?
I think a S&H is one of the modules that's promised to be coming up in the series?
If you substract pink from white, you get blue
I don't quite understand the color choices for these noises 🤣
afaik those are just the result of a mapping between the audio and light spectrums
🤍
who is that of blue pink and white 🏳️⚧️?? aca se dice celeste blanco amarillo 🇦🇷🇦🇷🇦🇷🇦🇷
I could have sworn the next video would be about subtractive synthesis my bad
Dude became German at 3:35
I think you need and extra stage in your blue noise filter system to extend the high end to 20kHz.
I need brown noise generator.