calling sequencers builders...

Started by swt, August 29, 2004, 01:16:55 PM

Previous topic - Next topic

swt

Hi guys!. I've been following the seq threads and wanna know if you could fix the bugs. Also, does the udrand from geofex work ok for up or down seqs?. I want to build a seq but the random stuff is going to be generated by the psycho lfo, or something like that. Thanks a lot!!

Arno van der Heijden

Yes, it works fine for the up and down settings, no bugs.

R.G.

And while we're on that...

The pseudorandom thing seems to keep getting difficult.  If I were reading my own posts, I might say that Mother Nature is trying to tell me something... 8-)

Here's where it stands.

To do a linear feedback shift register PR setup, you need three things: a shift register of N stages, an XOR or XNOR function to do the feedback, and a means of keeping it from getting into the lockup state of all 0's. (I'm ignoring the clock, which comes from other places.)

My first two-chip foray didn't work all that well. I used eight stages, and that's not enough. It gives only 15 different states, and worse, it repeats every 15 clicks of the clock. The pattern is easy to hear.

With 16 stages, you get 65535 states, and the repeat is every 65535/10 = 6553 seconds, or every two hours. Good enough. But it added a chip.

But getting it to not lock up in all 0's turned out to be hard. The simple non-locks all had problems with the quite slow data rates of a sequencer, so I had to go to a circuit that I can preset to "1" at power on. That added another chip; total is now four.

This one seems to be a good candidate. It uses a shift register made from one CD4013 and two CD4094's. The XOR is done by a CD4070. All the chips are available at Digikey for about $0.50 - $0.60 each. It has 18 stages, so there are 262143 states, and the repeat with a 10 Hz clock is every 73 hours.

The only thing that really needs some resolution is that I'm thinking of using the remaining parts of the 4070 for the power-on-reset tick to preset the 4013 to "1's". That may or may not work well.

I've posted the current state of the design. You can see it here:
http://geofex.com/FX_images/pseudorandom2.pdf

The clock is the clock from the LFO counter, and A, B, and C are the outputs to the pins of the latch.

Notice that this thing is not restricted to making random sequences. If you feed a 50kHz signal to the clock, you get audio noise out of either output. The repeat time in that case is about every 5 seconds, usually long enough for the mind to think of it as random. Pinking filters can make pink noise out of this pretty easily.

This design points up the advantages of microcontrollers, too. The four chips cost about $2.20 all together, and take up a couple of square inches of board space. A single 12C508 PIC in an eight pin DIP package will do a better job, at the same price.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Paul Perry (Frostwave)

Quote from: R.G.This design points up the advantages of microcontrollers, too. The four chips cost about $2.20 all together, and take up a couple of square inches of board space. A single 12C508 PIC in an eight pin DIP package will do a better job, at the same price.
As I've said before,. I don't know why someone who likes programming doesn't make a bunch of preprogrammed 'random' PICs or whatever & sell them thru Steve or someone. Once you could buy noise chips!! I'd happly pay for the suckers, I'm not a programmer!

mikeb

Maybe it's because the people who like programming generally hate having to program numerous PICs, test them, package them, ship them off etc etc etc? ;)

I'm sure I remember reading that some suppliers could sell PICs pre-programmed with your code in them .... hmmm .....

Mike

niftydog

because "programmed random" is an oxymoron.

Fill up an eeprom with random numbers, hook the address lines to a binary counter, hook the data lines to a multiplexer, outputs of multiplexer to a ladder network... just an idea off the top of my head.

A big enough eeprom would appear to be random, because by the time it cycled, you'd have forgotten the pattern!
niftydog
Shrimp down the pants!!!
“It also sounded something like the movement of furniture, which He
hadn't even created yet, and He was not so pleased.” God (aka Tony Levin)

mikeb

I reckon you could use a 'floating' input on a PIC as a hack 'seed value' for a random number gen, or otherwise come up with some simple (and cheap!) 'real-world' interface to introduce some randomness to the pattern generated. Certainly, a code-only approach wouldn't be random at all (but still might be 'good enough' for practical applications).

Mike

niftydog

hell yes, real world influence!

I suggested an antenna connected to a  wide band amplifier circuit with no filtering. Pick up every RF frequency in the vicinity at once! That's gotta be pretty random!

Even tuning into an unused portion of the FM band will give you plenty of noise!
niftydog
Shrimp down the pants!!!
“It also sounded something like the movement of furniture, which He
hadn't even created yet, and He was not so pleased.” God (aka Tony Levin)

R.G.

QuoteAs I've said before,. I don't know why someone who likes programming doesn't make a bunch of preprogrammed 'random' PICs or whatever & sell them thru Steve or someone. Once you could buy noise chips!! I'd happly pay for the suckers, I'm not a programmer!
The code for the 12C508 noise generator is on the net at
Quotehttp://www.electronicsinfoline.com/go.php?out=http://www.e-insite.net/ednmag/index.asp?layout=article&stt=000&articleid=CA200385&pubdate=3/21/2002&spacedesc=designideas
and
http://ww1.microchip.com/downloads/en/AppNotes/6_005.pdf
and
Quotehttp://chip.aeug.org/noise508.asm
to note just a few.
QuoteFill up an eeprom with random numbers, hook the address lines to a binary counter, hook the data lines to a multiplexer, outputs of multiplexer to a ladder network... just an idea off the top of my head.

A big enough eeprom would appear to be random, because by the time it cycled, you'd have forgotten the pattern!
That turns out to be surprisingly hard to do. The human memory for cycles is pretty good. A pattern of noise that repeats, say, every few seconds is easy to hear as a 'beat'. Big enough would turn out to be several megabytes - which exists, of course, but four CMOS chips is cheaper and easier for a beginner to get right.

That's where the sequence generators come in. By replacing one chip in the design I have here, you can make a sequence generator that won't repeat for almost 600 million years. Of course, battery life might be a problem... 8-)
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Arno van der Heijden

R.G.,

I was reading through the archive and found some comments by Zachary Vex regarding the random mode on his ooh-wah:

Quotei realized pretty quickly that the multiple clocks in my "random" circuit were creating aliasing as they went naturally in and out of sync, so patterns would evolve, so i decided to go to the varying-rf route.

Quotethe ooh-wah has an additional control board which has a constantly-varying number of rf pulses which are clocked and gated to create a pseudo-random selection of the output control channels. three oscillators are employed to accomplish this... one operates sub-Hz to continuously vary a second RF oscillator's center frequency, and the third one is a 2 ms gating pulse that controls the other two, causing the channels to momentarily "spin" like a roulette wheel.

Quotein developing the circuit i manually moved the RF generator's center frequency with a pot and eventually controlled it with a crude transistor "pinch" across the R in the RC combination, driven by a tri-wave generator.

I was thinking about how to implement this, but I can't get my head around it. Maybe it gives you some ideas...

swt

thanks a lot for your interest, and replies.