8-Step Arduino Sequencer

Can you show us a circuit diagram which incorporates your changes?

2 Likes

I will, but want to hold off until I’ve done some testing.

2 Likes

Ben Eater made a video that should explain this.

Maybe a question I have is, is it possible to gate the gates? Like give them a shorter on time? Cause I feel my summed gate isn’t triggering, because it’s constantly high… or am I missing something else? Can’t wait to see your additions… @analogoutput

1 Like

Lots of triggers together at speed always behave like gates. Unfortunately the output here is high until the next note. You could shorten it in the code. Add a delay of some sort but this would affect to output to the point that I may be too short to work with some analog devices. Capacitors and coils gum things up and take time to change state. Not a lot of time but enough to cause a persistent state a bit like pwm.
I suppose you could add an envelope to each gate and that takes us into very different waters. (Were going to need a bigger boat)

Gates are basically pulses, you know square wave stuff. You can alter the pulse width, or how long things are on vs off. This is called a duty cycle. A square wave pulse is when it is 50% on, 50% off, so a duty cycle of 50.

Visualization:
image

When you modulate or change this duty cycle, its called pulse width modulation or PWM. :slight_smile:

1 Like

Thanks @Caustic. We use a lot of acronyms on this site. That explanation should be bookmarked for a glossary. Perhaps it’s possible : admin?

1 Like

Thats actually a good idea, i think a glossary thread wouldnt go amiss.

1 Like

Wondering if a glossary thread is as flexible as maybe linking posts to the awful spell check this post editor has. Who is admin btw? Or are we under AI?

Or even just links to a good glossary elsewhere. Like a wiki

Let’s see if this works:

1 Like

Thanks for the quick input @fredrik .

Edit: Ignore this nonsense, I was misremembering how the kbd gate works.

I haven’t looked at it but I can see how that might occur. Each step gate is on for however long and then off again, but the next gate turns on just about simultaneously with the previous one turning off, so the logical or of all of them I would guess is essentially DC. It might be a good idea in the code to turn off all gates, delay a couple milliseconds, then turn on the new one.

1 Like

Breadboard test of modified code and “rotary switch” (actually just moving a jumper) to change sequence length. All seems to work.

3 Likes

I’ve taken your hint about reset and stepbutton1 being the same. I’ve got a rotary switch with 5 options hooked up to A0. Working on the code now to give me 5 types of sequences in each direction. Random backwards is still random, but hey, it’s there.

The modes I’m including:

Simple cycle 1-2-3-4-1-2-3-4
Inclusive rotate 1-2-3-4-4-3-2-1-1
Exclusive rotate 1-2-3-4-3-2-1-2-3
2x step repeat 1-1-2-2-3-3-4-4
Random

Working on the syntax to get this done but probably about half way there

1 Like

Nice, though incompatible with my sequence length selector! Due to having only one input pin free.

1 Like

I didnt even know discourse had a wiki capability thats dope.

2 Likes

I would also look into a switch debounce code. Occasionally (1 in 50) I will get a double step on the step selector. Not a big deal on something not used much but may as well throw it in

4 Likes

I was thinking you can do sequence length selection purely in hardware if you have a switch on each stage that sends the step signal to the reset pin instead of to the outputs.

That works, in forward mode. But it doesn’t do the right thing in backward mode, or in CTorp’s variant modes. So to have selectable lengths and patterns you need two rotary switches, which there’s not room for on the pins.

I think something like this could work, though, to replace the eight BUTTON inputs with a single analog input:

Kind of a poor man’s CV keyboard.

5 Likes

Poor mans keystep except it probably ends up costing about the same :rofl: oh well I’ve been having fun playing with this thing

1 Like