platzhalter back to start platzhalter
platzhalter about platzhalter standard gear platzhalter analog diy gear platzhalter digital diy gear platzhalter music platzhalter contact platzhalter

Microcontrolled Analogue 8-Step Sequencer

In the meantime, i am really enerved by this CV-Gate-Cabling. I know about the downsides of midi concerning timing in comparison to cv/gate but i rarely ran into any timing-problems. I strictly prefer Midi because its so easy and clean to connect equipment. I mainly try to focus on composition not on experimenting or patching a modular system for hours. I want instant access to the features, my equipment offer when i need a certain sound or soundmanipulation.

One of these soundmanipulations is the typical 'Cutoff modulation by stepsequencer'. Pitch-mod by Stepsequencer is also a neverending source for finding new melodies. I got some analogue synths with a filter-CV-in and it's fun using them with stepsequenced CVs. I once built a somehow powerful 16step-analog-sequencer, but it as much to big to put it anywhere and had to much features to concentrate on the essentials for a quick on the fly modulations.

Thats why i always wanted a small, quick, batterypowered and ready-to-go analogue stepsequencer with sync over midi. Perfect project for learning µControlers.

Here are some videos of the finished sequencer:

Desired Features

I wanted the sequencer to have the following features:  

  • minimum of 8 steps
  • minimum of 2 rows
  • glide with adjustable glidetime
  • adjustable gatetime
  • batterypowered
  • simple one-wire Start/Stop/Sync over Midi, no CV-Inputs
  • as less electronic parts as possible
  • last Step modification to set uneven Numbers (e.g. 3, 5)
  • forward and random mode (i never used other modes on other equipment)
  • speed-selection for 4th, 8th, 16th AND (very important) 'advance by note' to let the thingy swing +play patterns
  • small box to put it on top of synths if space in studio is rare

There are always arising new questions and desired like 'why not 16-step?, why not 3 rows?, why not quantisized CVs?, why not add an adjustment for the cv-scale? why not a built in minimoog?....' - i wanted to concentrate on the essentials of a stepsequencer and make is as simple to use as possible. At least, this projects wanted to get finished somehow to make space for even more exiting ones.

 

the frontpanel will be manufactures by schaeffer. cost is about 60 EUR incl shipping+tax. Concerning the pain for drilling more than 30 holes through metal i think its a good price.

Hardware

The hardware consists of the following

  • frontpanel with glide-/gatetime-pots, gate-switches, dialswitches, midisocket, power- and mode-switch
  • pot-board with 2x8 Pots and LED-Buffers
  • digital-board with µControler for midiprocessing, input-ports from interface and out-port for the 8 LEDs
  • analogue-board with CV/Gate-Processing and buffers for the 3 busses CV1, CV2 and Gate

 

the pot-board. i grabbed a handful of these pots very cheap on the bay. because of their unconventional design i had to solder them on the backside of a holeboard  

on the otherside of the board are drivers for the LEDs. Same signal goes to the pot-steps and the gate-switches. good point to buffer the portsignal to prevent overloading them. simple bc547 transistors.

first revision of digitalboard. dont know if a 9v-block is to small concerning powerconsumption

Software

The software is written in assembly. I won't post the code here, i just started programming microcontrollers. I guess it makes more sense if i tell you about whats going on.

Mainloop

The frontpanelswitches are not debounced, no need to. They are continuously read in the mainloop. The rotaryswitches have +5V on the common pin. The other pins (4 for Speed and 7 for laststep) are led through lots of 1N4148-diodes to form the appropriate voltages for PortD's pins.

In the mainloop, the status of the switches are converted into a byte, stored in a sequencerstatus register.

Bits 0 and 1 of this register sets the timing which can have 4 states:

00 - Note advance

01 - 4th

10 - 8th

11 - 16th

Bit 2 holds the runningmode:

0 - Forward

1 - Random

Bits 3-5 hold the last step:

001 - last step = 2

010 - last step = 3

011 - last step = 4

100 - last step = 5

101 - last step = 6

110 - last step = 7

111 - last step = 8

Also in the mainloop i advance a counter (in consideration to lastStep) which constantly updates a randomNumber-register with LED-patterns of steps, e.g. 10000000, 01000000, 00100000 a.s.o. If an 'advance-step' happens, we have kind of random-step in our randomNumber-register which we only need to send to the LED-port.

Interrupt for midi

Midi is processed by UART-Interrupt. The interruptroutine analyes the incoming midibyte. All bytes except midiclock and note-On are ignored. start/stop/continue set or clear a flag to memorize the running status.

the pulses are counted and the current pulse-sum is compared to a variable which is set in the mainloop in consideration of the speed-bits in the sequencerstatus register. 24 pulses mean a 4th-note in midiprotocol. That means:

if sequencer is set to 4th, advance one step if pulsecount is 24.

if sequencer is set to 8th, advance one step if pulsecount is 12.

if sequencer is set to 16th, advance one step if pulsecount is 6.

if sequencer is set to notadvance, check if incoming noteOn is on our desired midichannel. If our midichannel is undefined, take the midichannel of the first incoming note-On.

In note-advance-forward-routine, we look if we reached the last step. If so, we reset the line to step 1.

In the note-advance-random-routine we take the byte which we find in our randomNumber-register.

 

 

left side we got a dc-PSU-plug and a battery compartment. with a 9V-accumulator it runs about 3 hours

to the right we got the jacks for CV1, CV2 and Gate

Final result 02/2009 (almost)

Current status: the digital part works perfectly but the Gate makes some trouble. Followed 'gate-on's result in a continuing gate-level. It should retrigger on every step instead. I could archive that with a AND-gate being feede with the gatebus and a triggersignal, the output of the gate would then give an 'interrupted' gate, triggering the gateprocessor (with its length-set-possibility) every step.

I dont use a 4017 here or something similar with a dedicated clocksignal. I must let the µController produce one. But all pins are in use and i definately want to keep things simple. The best way would be to use the Resetpin as an output. Using the Resetpin blocks in-system-programming and forces usage of highvoltageprogramming.... will be solved in future :-(

Update 03/2009

Works perfectly now. I set the fuse for using the reset-pin as an OutputPin and updated the code to send a short pulse out on every note advance. This clock signal is sent together with the actual gate-state to an AND-gate. The Gate only outputs +5 volt if both, Gate AND Colcksignal are High, otherwize Gate outputs 0 Volt.

The output of the AND-Gate is sent to the gateprocessor which sets gatelength in consideration of the length-pot or an incoming voltage on the gate-length-mod-jack. (The jack is one with a switch, sending 5 Volt to the length-pot if no plug is inserted).

Next time i should use a controller with more ports, using the reset-pin blocks the ability for in-system-programming (means: for reprogramming the controller must be ripped out of the socket and placed inside the programmer because i altered the connector port-pins).

Project finished.

 

 

the interiour. right inside is the digitalboard for handling midi, frontpanelswitches and led-signals

the final result. i guess the knobs dont fit together :)

Reset-Pin is now used as global clock-output on every note-advance

platzhalter