Muff's Modules & More Forum Index Muff's Modules & More
we weren't even testing for that
 
 FAQ & Terms Of UseFAQ & Terms Of Use   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Information
Hello! This is a message to everyone who emailed or PM'ed me asking for an exemption to the '100-post rule' for our Buy-Sell-Trade forum. You didn't get a reply from me because you aren't above the rules. The rules are the same for everyone. I understand your position and I'm sorry I can't help you, but I can't help you. Thanks for understanding! Please enjoy our lovely forum.


Open player

Search for at
Muff's Modules & More Advanced Search

Your voluntary donation helps support the community!
MIDI Beat Clock (Arduino-powered) - details
Goto page 1, 2  Next [all]
 
Post new topic   Reply to topic    Muff's Modules & More Forum Index -> Music Tech DIY
View previous topic :: View next topic  
Author MIDI Beat Clock (Arduino-powered) - details
Tombola
Ultra Wiggler


Joined: 23 Jan 2011
Last Visit: 23 May 2013

Posts: 902
Location: London, England

PostPosted: Thu Apr 14, 2011 6:52 pm    Post subject: MIDI Beat Clock (Arduino-powered) - details Reply with quote Add User to Ignore List

A couple of people asked for some details on the Midi beat clock mentioned here

I built it using a proto kit and faceplate from http://synovatron.blogspot.com/ - had to drill out a few of the holes, but it's much easier than starting from scratch.

The circuit is super simple, and I haven't drawn out a proper schematic. There are 4 parts to it

ARDUINO: The supporting circuitry for the Atmega 328 chip is surprisingly straightforward- +5v power, ground, one resistor, one 16mhz crystal, two caps, a press switch and some header. I used this Boarduino schematic from LadyAda.

I bought an ATmega with the bootloader already in place. You then need an FTDI cable to program it - it works exactly like a normal arduino. You can power the module over USB while programming it - presumably not a good idea to attach USB and the power ribbon at the same time! There is supposed to be a way to use a normal arduino board as an FTDI cable, I didn't try that.

Once it's in place, it's easy to attach a couple of pots (+5 and GND on each side, the centre lug going to an analog input), a switch (rigged as a voltage divider giving three levels on an analog input) and a pulse input (a 3.5mm jack going straight into an analog input with a pull down resistor to filter out noise when it's not connected)

OUTPUT: You can clock a sequencer, trigger a Maths or ping a Qmmg using a digital pulse straight from the digital out of an arduino. So the outputs are just a digital pin connected to a 3.5mm socket, with an LED going to ground through a resistor. I'm sure it would be better to buffer everything properly, but I didn't.

POWER: You can pull 5v from your case. Buy the little doepfer/makenoise adaptor, or make one from a 7805 regulator, a heat sink, perfboard, header and a capacitor.

MIDI: The Midi In schematic is in this thread. I think the original handrawn schematic has the midi pins the wrong way round. I certainly had to try a couple of times to get it working. I used a CNY14-4 optocoupler.

Midi goes into the serial RX pin on the Arduino. You can't have Midi playing while you upload code to the board. I had some weirdness with my board and my FTDI cable (I needed a 5v version, had a 3.3v version) that meant I had to halve the baud rate. YMMV.


Untitled by Tom.Whitwell, on Flickr

CODE:

I'm not going to post all my code here because it's too gruesome. If you want it, I'll happily send it to you.

It's all built on the sample code here at Little Scale. The arduino listens for a clock. When it hears a clock pulse, it triggers a subroutine.

The clock divider itself is simple: Set a counter running when the clock starts - midi clock comes 24 times per quarter note - then divide down using modulus
Code:
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  }


The swing is a bit fiddly - I used the technique apparently used in the TR707, which just shifts within the 24ppqn of the midi clock, rather than trying anything cleverer.

That's it. It was fun, and I learned lots.
Back to top
View user's profile Send private message
Luka
Super Deluxe Wiggler


Joined: 15 Jul 2008
Last Visit: 23 May 2013

Posts: 4910
Location: melbourne

PostPosted: Thu Apr 14, 2011 9:50 pm    Post subject: Reply with quote Add User to Ignore List

nice work
_________________
.
.
.

melbourne australia
soundcloud
lastfm
vimeo


wtb:
220/230/240v Broken Dp4
20x20 ghielmetti matrix

taking offers on (melbourne pickup)
revox pr99 mk2
allenheath zed420
Back to top
View user's profile Send private message
widdly
Wiggling with Experience


Joined: 21 Jan 2009
Last Visit: 23 May 2013

Posts: 486
Location: singapore

PostPosted: Thu Apr 14, 2011 11:21 pm    Post subject: Reply with quote Add User to Ignore List

Cool. It would be handy if it captured FA on the midi and output a start trigger. That way you could reset your sequencer on midi start.
Back to top
View user's profile Send private message
limpmeat
Veteran Wiggler


Joined: 08 Feb 2011
Last Visit: 23 May 2013

Posts: 602
Location: Melbourne

PostPosted: Thu Apr 14, 2011 11:39 pm    Post subject: Reply with quote Add User to Ignore List

good idea
Back to top
View user's profile Send private message
falafelbiels
still learning to wiggle


Joined: 04 Aug 2009
Last Visit: 23 May 2013

Posts: 2686
Location: Rotterdamm son

PostPosted: Fri Apr 15, 2011 5:26 am    Post subject: Reply with quote Add User to Ignore List

I am keeping an eye on this...
Back to top
View user's profile Send private message
Tombola
Ultra Wiggler


Joined: 23 Jan 2011
Last Visit: 23 May 2013

Posts: 902
Location: London, England

PostPosted: Fri Apr 15, 2011 7:14 am    Post subject: Reply with quote Add User to Ignore List

widdly wrote:
Cool. It would be handy if it captured FA on the midi and output a start trigger. That way you could reset your sequencer on midi start.

Would be easy to do - reserve one of the ouput pins and only flash it on the start trigger.
Unfortunately my seq doesn't have a reset in, so I didn't bother...
Back to top
View user's profile Send private message
wetterberg
Super Deluxe Wiggler


Joined: 24 Jul 2008
Last Visit: 16 Mar 2013

Posts: 7656
Location: Copenhagen, Denmark.

PostPosted: Fri Apr 15, 2011 2:24 pm    Post subject: Reply with quote Add User to Ignore List

nice. Thanks for the update. Now, I'm not all that savvy on the tech here; what would happen if you accidentally sent *in* a 12v pulse to an output? You'd fry the ATmega, wouldn't you?
Back to top
View user's profile Send private message AIM Address MSN Messenger
nickciontea
brownshoesonly


Joined: 03 Feb 2010
Last Visit: 23 May 2013

Posts: 1080
Location: Chicago

PostPosted: Fri Apr 15, 2011 2:27 pm    Post subject: Reply with quote Add User to Ignore List

i've given my analog ins severely wrong voltage and my original arduino is still pounding away..

seems to me they can take some abuse. Dead Banana

plus you can always use a diode

_________________
http://brownshoesonly.com |
Back to top
View user's profile Send private message AIM Address
Tombola
Ultra Wiggler


Joined: 23 Jan 2011
Last Visit: 23 May 2013

Posts: 902
Location: London, England

PostPosted: Fri Apr 15, 2011 4:57 pm    Post subject: Reply with quote Add User to Ignore List

nickciontea wrote:

seems to me they can take some abuse.


That's certainly my impression - I've definitely fed them +/- 6v with no trouble.

Put the Atmel 328 in a socket and the worst that can happen is you loose a few quid.
Back to top
View user's profile Send private message
falafelbiels
still learning to wiggle


Joined: 04 Aug 2009
Last Visit: 23 May 2013

Posts: 2686
Location: Rotterdamm son

PostPosted: Sun Apr 17, 2011 10:43 am    Post subject: Reply with quote Add User to Ignore List

Tombola wrote:
widdly wrote:
Cool. It would be handy if it captured FA on the midi and output a start trigger. That way you could reset your sequencer on midi start.

Would be easy to do - reserve one of the ouput pins and only flash it on the start trigger.
Unfortunately my seq doesn't have a reset in, so I didn't bother...


Does anybody happen to be working on this? I suck at programming but I need some clock divider and this seems to be a real life saver. Would it be possible to have n/3, n/5, n/6 and n/7 as in the CGS pulse divider? Would be a dream come true!
Back to top
View user's profile Send private message
falafelbiels
still learning to wiggle


Joined: 04 Aug 2009
Last Visit: 23 May 2013

Posts: 2686
Location: Rotterdamm son

PostPosted: Sun May 01, 2011 11:35 am    Post subject: Reply with quote Add User to Ignore List

no?
Back to top
View user's profile Send private message
Tombola
Ultra Wiggler


Joined: 23 Jan 2011
Last Visit: 23 May 2013

Posts: 902
Location: London, England

PostPosted: Tue May 03, 2011 2:34 pm    Post subject: Reply with quote Add User to Ignore List

falafelbiels wrote:
Tombola wrote:
widdly wrote:
Cool. It would be handy if it captured FA on the midi and output a start trigger. That way you could reset your sequencer on midi start.

Would be easy to do - reserve one of the ouput pins and only flash it on the start trigger.
Unfortunately my seq doesn't have a reset in, so I didn't bother...


Does anybody happen to be working on this? I suck at programming but I need some clock divider and this seems to be a real life saver. Would it be possible to have n/3, n/5, n/6 and n/7 as in the CGS pulse divider? Would be a dream come true!


If you build the hardware, I can do that code - is a 5 minute job
Back to top
View user's profile Send private message
falafelbiels
still learning to wiggle


Joined: 04 Aug 2009
Last Visit: 23 May 2013

Posts: 2686
Location: Rotterdamm son

PostPosted: Tue May 03, 2011 4:07 pm    Post subject: Reply with quote Add User to Ignore List

OK, I have plenty excuses not to do this right now, but I will PM you when I have the time, OK?

5 minute job, I really must learn to do this stuff...
Back to top
View user's profile Send private message
knob_alchemist
Common Wiggler


Joined: 22 Jan 2012
Last Visit: 23 May 2013

Posts: 201
Location: Bolzano, Italy

PostPosted: Fri Feb 17, 2012 4:01 am    Post subject: Reply with quote Add User to Ignore List

Very interesting project, I have an unused Arduino and I will try to do this instead to buy an A-160.....Is possibile to use also the 6 PWM outputs as a 6 sub-divided clock signal outputs??
Back to top
View user's profile Send private message
Tombola
Ultra Wiggler


Joined: 23 Jan 2011
Last Visit: 23 May 2013

Posts: 902
Location: London, England

PostPosted: Fri Feb 17, 2012 5:40 am    Post subject: Reply with quote Add User to Ignore List

Yes, all outputs are digital, would work for pulses
_________________
http://musicthing.co.uk/modular/
Back to top
View user's profile Send private message
sicpaul
Common Wiggler


Joined: 22 Dec 2011
Last Visit: 23 May 2013

Posts: 84
Location: Berlin

PostPosted: Fri Feb 17, 2012 6:23 am    Post subject: Reply with quote Add User to Ignore List

Cool project! love

I wish I was able to understand how to put all these fragments together to get a full schematic by now ... the time will come ... one day

FA (Start) will be a great feature, indeed.

And maybe the possibility to have a switch choosing CV-Clock instead of MIDI to increase the flexibility.

Again: great work, Tom


best regards
Paul
Back to top
View user's profile Send private message
sanders
Wiggling with Experience


Joined: 03 Feb 2009
Last Visit: 31 Jan 2013

Posts: 374

PostPosted: Sun Feb 19, 2012 6:24 am    Post subject: Reply with quote Add User to Ignore List

I just bought an Arduino from Radio Shack with the intention to build some kind of MiDI to pulse/trigger for triggering some korg and rhythm ace drum boards (most of the drum sounds seem to trigger on 4 or 5v, some seem to want -4v or so). I don't have code or a schematic, but I figured someone must have done something like this already.

But I haven't found anything after immediate searches. Can anyone point me to a drum trigger/ pules/ gate output project?

Tombola wrote:
falafelbiels wrote:
Tombola wrote:
widdly wrote:
Cool. It would be handy if it captured FA on the midi and output a start trigger. That way you could reset your sequencer on midi start.

Would be easy to do - reserve one of the ouput pins and only flash it on the start trigger.
Unfortunately my seq doesn't have a reset in, so I didn't bother...


Does anybody happen to be working on this? I suck at programming but I need some clock divider and this seems to be a real life saver. Would it be possible to have n/3, n/5, n/6 and n/7 as in the CGS pulse divider? Would be a dream come true!


If you build the hardware, I can do that code - is a 5 minute job


What about a multiplier? Would that be easy to do also? Dividers are easily done with CMOS. Cheaper and maybe easier w cmos. Multipling is not possible without processing I don't think-- this would pretty cool to have code for.
I'd love to be able to take a regular audio source, from a mic, or line level, like live drums, and derive a synced clock plus multiples, like triplets, 16th notes, etc. That would be pretty amazing for live synth processing.
Back to top
View user's profile Send private message
krz
Veteran Wiggler


Joined: 18 May 2010
Last Visit: 23 May 2013

Posts: 634
Location: A van- down by the river

PostPosted: Sun Feb 19, 2012 9:06 pm    Post subject: Reply with quote Add User to Ignore List

[quote="sanders"]But I haven't found anything after immediate searches. Can anyone point me to a drum trigger/ pules/ gate output project?[/quote]

just on the off chance u haven't searched here...

http://www.arduino.cc/playground/Main/MIDILibrary
Back to top
View user's profile Send private message
knob_alchemist
Common Wiggler


Joined: 22 Jan 2012
Last Visit: 23 May 2013

Posts: 201
Location: Bolzano, Italy

PostPosted: Mon Feb 20, 2012 1:45 pm    Post subject: Reply with quote Add User to Ignore List

Hey what do you think, is possible a simple clock divider like this using your project/code? simple put in an LFO to one analog input and the 6 PWM ouputs give the divided clock...What do you think?

Back to top
View user's profile Send private message
EMwhite
Veteran Wiggler


Joined: 08 Feb 2012
Last Visit: 23 May 2013

Posts: 694
Location: NY Metro area

PostPosted: Mon Feb 20, 2012 10:34 pm    Post subject: Reply with quote Add User to Ignore List

I never messed with the *duino stuff but had a question.

I'm after a small / inexpensive or DIY device with a 3 digit LED display for BPM (tempo), a pot to change (from 40..240 possibly), that could output SYNC24 and have a clock divider. Is the platform above a good starting point?

Ideally, I'd like it to ALSO send Midi clock and have not only Run/Stop button, but also a positioning for Reset and Record that simply sends a predefined MMC command.

Any help in understanding how easy or difficult would be welcome. I was interested in the TeenageEngineering kit that they just released but zero details on the API and aside from not yet being available, it's $299 USD which is a bit much.

Thank you.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Muff's Modules & More Forum Index -> Music Tech DIY All times are GMT - 5 Hours
Goto page 1, 2  Next [all]
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum



Mark all forums read
Powered by phpBB © 2001, 2005 phpBB Group