Can you show us a circuit diagram which incorporates your changes?
I will, but want to hold off until I’ve done some testing.
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
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.
When you modulate or change this duty cycle, its called pulse width modulation or PWM.
Thanks @Caustic. We use a lot of acronyms on this site. That explanation should be bookmarked for a glossary. Perhaps it’s possible : admin?
Thats actually a good idea, i think a glossary thread wouldnt go amiss.
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:
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.
Breadboard test of modified code and “rotary switch” (actually just moving a jumper) to change sequence length. All seems to work.
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
Working on the syntax to get this done but probably about half way there
Nice, though incompatible with my sequence length selector! Due to having only one input pin free.
I didnt even know discourse had a wiki capability thats dope.
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
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:
Poor mans keystep except it probably ends up costing about the same oh well I’ve been having fun playing with this thing