MUFF WIGGLER Forum Index

 FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 
WIGGLING 'LITE' IN GUEST MODE

MIDI clock to various divisions of analog clock kit?
MUFF WIGGLER Forum Index -> Music Tech DIY  
Author MIDI clock to various divisions of analog clock kit?

qfactor

In my haste to "stock up" on un-buffered mults at every corner of my modular, several months ago, I realized now that I may have over done it (have 8 mults on 2 cases!! eek! )

Looking at the 4x4x4 mult, I'm wondering if there are kits I could build into this that would take a MIDI clock, output several divisions of analog clocks (specifically four divisions) so that I could have the 4x4x4 split the 4 clock divisions to 4 outputs, each.
I'm looking to building this, not buying a ready made module, though.

Any suggestions? seriously, i just don't get it
Thanks!


euromorcego

i know of no midi clock to analogue clock kit (but it would be very useful). There are some tutorials for the arduino available. To interface an arduino with a midi input is not too difficult.

Have a look here:
https://www.muffwiggler.com/forum/viewtopic.php?t=32983
https://www.muffwiggler.com/forum/viewtopic.php?t=33010

Code seems straightforward and simple enough (but I don't know about the reliability of timing).
if (count%6 == 0){ // do something every 16th note}
if (count%12 == 0){ // do something every 8th note }
if (count%24 == 0){ // do something every quarter note }

In addition, there are quite a few (non-midi) clock dividers available, for example from CGS, YuSynth, Barton, etc ...
http://www.cgs.synth.net/modules/cgs22v2_master_divider.html
http://www.bartonmusicalcircuits.com/vcclock/

In any case, the 4x4x4 mult won't help much. It is just a panel and a few jacks.


euromorcego

if you want to turn the 4x4x4 mult into something (more) useful, consider build a passive OR (very simple, instructions are on the doepfer homepage) to combine gates, or a small 2-->2 CV mixer. The latter is a bit more elaborate but should also be possible on a piece of veroboard.


mxmxmx

the closest to kit i can think of is the 4ms RCD kit.

the UART is unused, allegedly it's even broken out on the pcb (i haven't looked for it, but then it doesn't even matter). you'd just need to attach a DIN socket etc to PD0 (as per some of the tutorials mentioned). plus adapt the code to deal with midi clock - https://github.com/4ms/RCD/blob/master/clocker.c.


diablojoy

dave Kendal and Matthias herman ( fonik ) collaborated to produce a midi to clock board a few years back check fonik's place on EM for details
Its probably too much for what you want but could be stripped back somewhat

see http://electro-music.com/forum/topic-47703.html

also http://www.electro-music.com/forum/topic-48167.html


widdly

Pretty easy if you can program a microcontroller. I made one using a 16f84 based on Colin Frasers midi-cv code.

Otherwise Blacet sells a pre-programmed chip.. http://www.blacet.com/MSdata.html


diablojoy

there is also the boogdish BMC24 midi to gate
8 outputs could work well for you perhaps
easy enough to do a midi sequence for timing in your favourite daw program

https://www.muffwiggler.com/forum/viewtopic.php?t=116223&start=0&postd ays=0&postorder=asc&highlight=&sid=74dc3e7400391eef7a15de682f280114


qfactor

diablojoy wrote:
there is also the boogdish BMC24 midi to gate
8 outputs could work well for you perhaps
easy enough to do a midi sequence for timing in your favourite daw program

https://www.muffwiggler.com/forum/viewtopic.php?t=116223&start=0&postd ays=0&postorder=asc&highlight=&sid=74dc3e7400391eef7a15de682f280114


Yeah, I've just completed making this but it's not clock but gate outs which are assigned to specific MIDI note numbers only, not MIDI clock seriously, i just don't get it

And I'm a relative noob in electronics or programming, hence as much as I'd like to, there will be a steep learning curve to get those suggestions going!

Well, will look around more since you guys have made some good suggestions on where I could look for these. Pity the fonik/David PCB is not available anymore d'oh!

thumbs up thumbs up


Dave Kendall

Hi.

I'd be happy to help with advice for anyone building the MIDI2CLOCK on perfboard. The first two prototypes were built this way.
The only unusual chip used is the UART, which is still in production. Once you have the core, it's easy to experiment with extra outputs and functions, as there is no programming needed - it's all CMOS and regular components and ICs smile

It can be pretty simple if you want it to be, and be expanded later as you wish.

cheers,
Dave


qfactor

Dave Kendall wrote:
Hi.

I'd be happy to help with advice for anyone building the MIDI2CLOCK on perfboard. The first two prototypes were built this way.
The only unusual chip used is the UART, which is still in production. Once you have the core, it's easy to experiment with extra outputs and functions, as there is no programming needed - it's all CMOS and regular components and ICs smile

It can be pretty simple if you want it to be, and be expanded later as you wish.

cheers,
Dave


Hey Dave,

Thanks for your response! applause
I'd love to give it a try on perfboard! Do you have any documentation on which parts I need to cut on the perfboard and component placing etc?
Also, what's a good online place to order the UART?
I'm based in Singapore and these components are sometimes hard to come by locally cry

Thanks again! thumbs up


widdly

That midi2clock uses an IM6402 uart. You will be able to find that at Sim Lim Tower.

IMHO that midi2clock circuit is a bit silly. Almost all of the parts could be replaced by a single uC that would cost less than the UART. I can burn you a PIC with a midi clock firmware if you want.

Something like this..
http://m.bareille.free.fr/mc628/mc628.html


qfactor

widdly wrote:
That midi2clock uses an IM6402 uart. You will be able to find that at Sim Lim Tower.

IMHO that midi2clock circuit is a bit silly. Almost all of the parts could be replaced by a single uC that would cost less than the UART. I can burn you a PIC with a midi clock firmware if you want.

Something like this..
http://m.bareille.free.fr/mc628/mc628.html


This sounds exactly what I'm after!! It's peanut butter jelly time! nanners Rockin' Banana!
I'll,PM you for more details?
Meanwhile, I'll,also keep this thread updated as to how things turn out!
Thanks all!

thumbs up


Dave Kendall

Qfactor - glad you're sorted and it was cool of widdly to sort you out, although he's not on my xmas card list any more. . . . sad banana

The choice of a UART-based design has it's advantages. OK, the core uses 4 more chips than the PIC solution, but there's no programming needed. The design has tons of I/O and expansion headers with already decoded raw MIDI data and useful timing /control signals, and a traditional modular-style interface - a rotary switch and toggles control *all* functions in real time.

To add switches and so on for real-time control of division, buffered outputs and so on to a PIC-based MIDI to clock design to get the same functionality as the M2C would likely make the end circuit just as large. I don't know whether that would interfere with a PIC circuit's timing, but the M2C is rock-solid, and can be expanded heavily without affecting the core timing at all. Even CLOCK and CV to MIDI can be added - the necessary input ports and jumpers are right in the design. Only new hardware add-ons would need be designed, and the exsiting hardware needs no modification to do that.
So, it's not silly - it's a full-featured, user-friendly design that can act as a flexible MIDI decoder platform. Just build 'em and bolt 'em on. . .

Anyway, I'm glad you've found a solution with widdly's help. Good luck with it.

cheers,
Dave


widdly

Sorry Dave, I was a bit harsh. It is a neat design and, you are right, it probably gives better timing than a uc. Since I got a decent pic programmer I'm thinking PIC's for everything.

Have you seen the MFOS midi-cv?

http://musicfromouterspace.com/analogsynth_new/THE_CAVE/MIDI%20to%20CV %20Old%20Design%20I/midi2cv.htm

hmmm.....


Dave Kendall

Hey widdly - no worries. The Marc Bareiile circuit is probably a much quicker build for the basic circuit, so better for q-factor. Nothing to stop some hardware clock dividers from being added once it's up and running too. That would make the unit more "hands-on" in a modular environment.

PICs are quite remarkable little things - I really like what Tom Wiltshire of Electric Druid has done with them - the compactness and stability of a VC digital oscillator is particularly appealing. I doubt I'll ever have the time and dedication to learn PICs though. Oh well.

The MFOS MIDI to CV? I looked at that long ago. Wow. . . . Kudos to Ray for using working out how to use shift registers and different clocks. Very impressive - it's a pretty complicated beast of a circuit. It must have been a hell of a job to work it all out. Looks like it would likely have problems in some circumstances, due to the way it handles incoming MIDI notes. . . . . . But. . . MIDI notes are the most difficult MIDI messages to decode, due to their 3 or 6 byte size (a decoder needs to be able to deal with two types of NOTE-OFF handling), running status, note stacks for a monophonic output, and provision for "all notes off" and so on.
MIDI clocks and stop/start etc. are easy by comparison 8_)

cheers,
Dave


diablojoy

Quote:
Yeah, I've just completed making this but it's not clock but gate outs which are assigned to specific MIDI note numbers only, not MIDI clock seriously, i just don't get it

clock , gate not much difference sometimes, check the voltage level and duration needed for what you are clocking , most modules these days only need a positive pulse above a certain specified voltage to clock from so a gate signal will usually do fine . think of it this way if you sat there with a midi keyboard hitting say C1 at a constant beat then a BMC24 will send out on output one a regular signal much like a clock would do
I use LIVE for recording and in that and most other programs of similar ilk you can draw in specific notes, timing and note duration on a midi piano roll then loop it and send it to a specific midi channel.
there used to be stand alone midi piano roll programs if you haven't a DAW program, should still be some out there probably free . not a midi clock as such but it can actually work better in a way certainly more flexible and more direct , just consider your midi notes as clock outputs so if you want 16 clock ticks per bar you just draw them for the midi note you want and therefore the particular BMC24 output , if you want one clock tick every 4 bars you can do that too if you want some variation over time draw say 4 bars with 16 clock ticks and then 2 bars of with 8 on the same midi note ,syncopation is really easy just play with the spacings .
It is perhaps a bit painful to spend the time initially drawing them in but copy and paste helps a bit then you can save it and use it whenever you want . do a bunch of different ones.
so if you have midi out from a computer in any way shape or form you could go down that path
and its something you already have.

edit : oh almost forgot also down a similar path is the highly liquid MD24
if you wanted 24 outputs, (may need buffering on the outputs)


Quote:
Pity the fonik/David PCB is not available anymore d'oh!

If you really want to go down this path I have a couple, sadly still languishing in my backlog d'oh! I could maybe be persuaded to let one go


qfactor

diablojoy

I'm thinking a "poor person's" MIDI to analog clock module, at worst or a "smart person's" MIDI to analog clock module, at best!! hihi Sort of like a manual car as opposed to an automatic!! hyper

Since I just built the BMC24, perhaps I should bump this idea around a little bit before I decide whether to go for the "real deal" of a clocking module later, PIC or otherwise! Dead Banana


The Big Ear

I've used an arduino and this code.
There is one 4 position pot for selecting 3 fixed divisions or the manual division. The fixed division is selected with a second 6 position pot.
There is one analog pot for selecting the manual division.
You should be able to change this code easily for fixed division rates.
HTH
Cheers,
ToAd


byte midi_start = 0xfa;
byte midi_stop = 0xfc;
byte midi_clock = 0xf8;
byte midi_continue = 0xfb;
int play_flag = 0;
byte data;
int ledPin2 = 12;
int ledPin1 = 13;
unsigned long counter = 0;
int potPin1 = 2;
int potPin2 = 1;
int potPin3 = 0;
int val1 = 0;
int val2 = 0;
int val3 = 0;

void setup() {
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);
Serial.begin(31250);
}

void loop() {
if(Serial.available() > 0) {
data = Serial.read();
if(data == midi_start || data == midi_continue) {
play_flag = 1;
digitalWrite(ledPin2,HIGH);
delay(5);
digitalWrite(ledPin2,LOW);
}
else if(data == midi_stop) {
play_flag = 0;
digitalWrite(ledPin2,HIGH);
delay(5);
digitalWrite(ledPin2,LOW);
}
else if((data == midi_clock) && (play_flag == 1)) {
Sync();
}
}
}

void Sync() {
val3 = analogRead(potPin3);
val3 = val3 / 256;
if (val3 < 1) {
DivA ();
}
if (val3 == 1) {
DivB ();
}
if (val3 == 2) {
DivC ();
}
if (val3 > 2) {
DivM ();
}
counter = counter ++;
}

void DivA() {
val1 = analogRead(potPin1);
val1 = val1 / 171;
if (val1 < 1) {
int x;
x = counter % 3;
if(x==0){
digitalWrite(ledPin1,HIGH);
delay(5);
digitalWrite(ledPin1,LOW);
}
}
if (val1 == 1) {
int x;
x = counter % 6;
if(x==0){
digitalWrite(ledPin1,HIGH);
delay(5);
digitalWrite(ledPin1,LOW);
}
}
if (val1 == 2) {
int x;
x = counter % 12;
if(x==0){
digitalWrite(ledPin1,HIGH);
delay(5);
digitalWrite(ledPin1,LOW);
}
}
if (val1 == 3) {
int x;
x = counter % 24;
if(x==0){
digitalWrite(ledPin1,HIGH);
delay(5);
digitalWrite(ledPin1,LOW);
}
}
if (val1 == 4) {
int x;
x = counter % 48;
if(x==0){
digitalWrite(ledPin1,HIGH);
delay(5);
digitalWrite(ledPin1,LOW);
}
}
if (val1 > 4) {
int x;
x = counter % 96;
if(x==0){
digitalWrite(ledPin1,HIGH);
delay(5);
digitalWrite(ledPin1,LOW);
}
}
}

void DivB() {
val1 = analogRead(potPin1);
val1 = val1 / 171;
if (val1 < 1) {
int x;
x = counter % 9;
if(x==0){
digitalWrite(ledPin1,HIGH);
delay(5);
digitalWrite(ledPin1,LOW);
}
}
if (val1 == 1) {
int x;
x = counter % 18;
if(x==0){
digitalWrite(ledPin1,HIGH);
delay(5);
digitalWrite(ledPin1,LOW);
}
}
if (val1 == 2) {
int x;
x = counter % 36;
if(x==0){
digitalWrite(ledPin1,HIGH);
delay(5);
digitalWrite(ledPin1,LOW);
}
}
if (val1 == 3) {
int x;
x = counter % 72;
if(x==0){
digitalWrite(ledPin1,HIGH);
delay(5);
digitalWrite(ledPin1,LOW);
}
}
if (val1 == 4) {
int x;
x = counter % 144;
if(x==0){
digitalWrite(ledPin1,HIGH);
delay(5);
digitalWrite(ledPin1,LOW);
}
}
if (val1 > 4) {
int x;
x = counter % 288;
if(x==0){
digitalWrite(ledPin1,HIGH);
delay(5);
digitalWrite(ledPin1,LOW);
}
}
}

void DivC() {
val1 = analogRead(potPin1);
val1 = val1 / 171;
if (val1 < 1) {
int x;
x = counter % 15;
if(x==0){
digitalWrite(ledPin1,HIGH);
delay(5);
digitalWrite(ledPin1,LOW);
}
}
if (val1 == 1) {
int x;
x = counter % 30;
if(x==0){
digitalWrite(ledPin1,HIGH);
delay(5);
digitalWrite(ledPin1,LOW);
}
}
if (val1 == 2) {
int x;
x = counter % 60;
if(x==0){
digitalWrite(ledPin1,HIGH);
delay(5);
digitalWrite(ledPin1,LOW);
}
}
if (val1 == 3) {
int x;
x = counter % 120;
if(x==0){
digitalWrite(ledPin1,HIGH);
delay(5);
digitalWrite(ledPin1,LOW);
}
}
if (val1 == 4) {
int x;
x = counter % 240;
if(x==0){
digitalWrite(ledPin1,HIGH);
delay(5);
digitalWrite(ledPin1,LOW);
}
}
if (val1 > 4) {
int x;
x = counter % 280;
if(x==0){
digitalWrite(ledPin1,HIGH);
delay(5);
digitalWrite(ledPin1,LOW);
}
}
}

void DivM() {
val2 = analogRead(potPin2);
val2 = val2 / 22;
int x;
x = counter % val2;
if(x == 0){
digitalWrite(ledPin1,HIGH);
delay(5);
digitalWrite(ledPin1,LOW);
}
}


qfactor

Whoa!! eek! eek! eek!


ErikOostveen

Hi; perhaps this DIY, Arduino, MIDI clock can offer a solution -- it has analog outputs:

http://www.erikoostveen.co.uk/#anchor2

Cheers, Erik

MUFF WIGGLER Forum Index -> Music Tech DIY  
Page 1 of 1
Powered by phpBB © phpBB Group