MIDIbox Forum: Clockbox - MIDIbox Forum

Jump to content

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Clockbox Rate Topic: -----

#1 User is offline   TK. 

  • MIDIbox Guru
  • View gallery
  • Group: Administrators
  • Posts: 9,507
  • Joined: 01-January 01
  • LocationGermany

Posted 12 November 2005 - 20:36

From the readme.txt:

[tt]
Clockbox V1.0                          © 2005 Thorsten Klose (tk@midibox.org)
===============================================================================

This application sends a MIDI clock and outputs a 24ppqn signal at CORE::J14
from 48 to 255 BPM

It is also capable of sending the MIDI song position to sequencers which are
able to parse this message (F2 pos_L pos_H)

The user interface consists of an encoder for BPM selection,
a Stop/Pause/Play/Rev and Fwd button, and a LCD, which displays the
selected BPM and the current song position

The hardware is the same like for MIDIbox SID CS Step A (without the SID module)

===============================================================================

A precompiled binary is already part of this package:
  o project.hex (can be loaded into MIOS Studio)
  o project.syx (can be loaded into any SysEx upload tool)

Following tools are required to recompile the code:
  o SDCC v2.5.0
  o gputils
  o perl

The details are described under http://www.ucapps.de/mios_c.html

===============================================================================

Required hardware:
  o one MBHP_CORE module
  o one DINX1 module (or just a 74HC595 shift register + pull-up resistors)
  o one rotary encoder
  o 5 buttons
  o 2x16 LCD

===============================================================================

Configuration steps:

  o check the "general application settings" in main.h if changes are
    required for your hardware setup (normaly not)

  o check the encoder type in mios_wrapper/mios_tables.inc
    By default, the DETENTED2 type is selected

  o the application can be rebuilt with the "make.bat" file
    (type "make" in a DOS command shell)

===============================================================================

Description about the most important files:

  - mios_wrapper\mios_wrapper.asm and mios_wrapper\mios_tables.inc:
    The MIOS wrapper code and MIOS specific configuration tables

  - pic18f452.c: exports PIC18F452 specific SFRs

  - main.c: the main program with all MIOS hooks

  - mclock.c: the MIDI clock handler

There are additional .h files for all .c files which contain
general definitions and the declaration of global functions/variables
These .h files must be included into the program parts which
get use of these globals

===============================================================================
[/tt]

Download: http://www.ucapps.de...s_download.html
Interconnections: http://www.ucapps.de/mios/clockbox.pdf
LCD view:
Posted Image

Btw.: this application includes the basics to create a C based sequencer or arpeggiator!
Have fun! :)

Best Regards, Thorsten.


#2 User is offline   Captain_Hastings 

  • MIDIbox Addict
  • PipPip
  • View blog
  • Group: Members
  • Posts: 208
  • Joined: 17-September 02

Posted 16 November 2005 - 10:02

Cool! Another one on my build list...  :)

#3 User is offline   DrBunsen 

  • MIDIbox Guru
  • PipPipPipPip
  • Group: Members
  • Posts: 973
  • Joined: 17-February 03

Posted 26 November 2005 - 16:57

This is a very cool little implementation!

Reluctant as I might be to shout "Hey Thorsten! How about adding Impossible Feature X??", would it be difficult to add in the shuffle function from the SEQ?  Whether added by you or by the user.  Because a DIN sync clock with shuffle would rule ...

It would also be nice to be able to put out 48 ppq (Korg) sync and 4 ppq (16 pulses per bar), or optionally to read clock from any of these sources or MIDI and output to any other.

#4 User is offline   TK. 

  • MIDIbox Guru
  • View gallery
  • Group: Administrators
  • Posts: 9,507
  • Joined: 01-January 01
  • LocationGermany

Posted 27 November 2005 - 16:13

I will keep this in mind for the case that I feel boring ;-)

Shuffle function: the outgoing clock has to be delayed with the same patterns used in MBSEQ
48ppqn: timer has to be invoked with double frequency, 48ppqn pulse has to be generated on each tick, MIDI clock has to be sent on each second tick
4 ppqn: requires a clock divider
Read clock and convert it: similar to MBSEQ (must work like a PLL (phase locked loop))

Best Regards, Thorsten.



#5 User is offline   DrBunsen 

  • MIDIbox Guru
  • PipPipPipPip
  • Group: Members
  • Posts: 973
  • Joined: 17-February 03

Posted 27 November 2005 - 16:57

Quote

Btw.: this application includes the basics to create a C based sequencer or arpeggiator


As usual, TK, your timing is perfect, pardon the pun.  I've been looking into building a simple 16 step sequencer with some borrowed MIOS code recently.

I've started a new thread to discuss it.

#6 User is offline   TK. 

  • MIDIbox Guru
  • View gallery
  • Group: Administrators
  • Posts: 9,507
  • Joined: 01-January 01
  • LocationGermany

Posted 27 November 2005 - 20:13

Fine - so just call your functions from MCLOCK_Tick() in mclock.c - it contains all events you need to control a sequencer (Start/Stop/Pause/Clock) :)

Best Regards, Thorsten.


#7 User is offline   sneakthief 

  • MIDIbox Addict
  • PipPip
  • Group: Programmer
  • Posts: 118
  • Joined: 24-January 06
  • LocationBerlin

Posted 04 February 2006 - 10:42

I moved my question here: http://www.midibox.o...hp?topic=6122.0

cheers,
michel

#8 User is offline   Rigo 

  • MIDIbox Newbie
  • Pip
  • Group: Members
  • Posts: 74
  • Joined: 07-January 04
  • LocationUSA

Posted 26 July 2006 - 20:57

Is it possible to have two midi outs using the LTC module to sync two Laptops to the midiclock box?

#9 User is offline   raphael 

  • MIDIbox Guru
  • PipPipPipPip
  • View blog
  • Group: Frequent Writer
  • Posts: 587
  • Joined: 25-September 03
  • LocationGermany

Posted 26 July 2006 - 21:59

Quote

Is it possible to have two midi outs using the LTC module to sync two Laptops to the midiclock box?

Yes, no problem ;D

#10 User is offline   sneakthief 

  • MIDIbox Addict
  • PipPip
  • Group: Programmer
  • Posts: 118
  • Joined: 24-January 06
  • LocationBerlin

Posted 26 July 2006 - 23:13

or you can live life on the wild side and connect two midi outputs-jacks to the single output on the core board :)

i've been using this technique successfully for a while now, but it's not recommended fot all situations and may not work with all midi devices.

cheers,
michel

#11 User is offline   Rigo 

  • MIDIbox Newbie
  • Pip
  • Group: Members
  • Posts: 74
  • Joined: 07-January 04
  • LocationUSA

Posted 28 July 2006 - 23:50

Quote

or you can live life on the wild side and connect two midi outputs-jacks to the single output on the core board

i've been using this technique successfully for a while now, but it's not recommended fot all situations and may not work with all midi devices.



Do you think it will work with two laptops each using a 2x2 m-audio usb midi interface?

#12 User is offline   sneakthief 

  • MIDIbox Addict
  • PipPip
  • Group: Programmer
  • Posts: 118
  • Joined: 24-January 06
  • LocationBerlin

Posted 29 July 2006 - 00:04

i don't see why not - give it a try!

i would imagine that the biggest concern in your case might be midi-data drop-outs. let us know how it works out for you.

#13 User is offline   bionix 

  • MIDIbox Newbie
  • Pip
  • View blog
  • Group: Members
  • Posts: 23
  • Joined: 25-July 06

Posted 10 August 2006 - 10:35

hmm. i made some nice connections over lan to sync and use 2 pc's and 2 laptops (pc's are just my vst hosts) via ipmidi (nerds.de) and of course some midi cables ;-) but it seems that ipmidi isn't able to send/receive clock data.... :-( now i wanna build the little clockbox to kill that problem ;)

#14 User is offline   mess 

  • MIDIbox Addict
  • PipPip
  • View blog
  • Group: Programmer
  • Posts: 141
  • Joined: 15-April 04
  • LocationBelgium

Posted 10 August 2006 - 11:51

Hi Bionix,
I did some tests quick with midi over lan yesterday
and midi sync works using tobybear's midibag toolkit and midi yoke.
It seems to work ok...

my test setup:
pc1
fruityloops (enable send sync)-> midiyoke -> net2mid

pc2
mid2net -> midiyoke -> fruityloops (enable midiyoke as controller)

I used fruitystudio for a quick test but this should also work for other hosts


on the other hand a clockbox is a nice alternative, no network headaches :-)

#15 User is offline   TK. 

  • MIDIbox Guru
  • View gallery
  • Group: Administrators
  • Posts: 9,507
  • Joined: 01-January 01
  • LocationGermany

Posted 13 August 2006 - 21:20

The clockbox got a new "multi MIDI Out option" based on an idea of Braintu.
It allows to enable/disable the MIDI clocks of up to 8 MIDI clock slaves (sequencers, drum machines, synths) seperately and in a synchronized manner (clock will be enabled/disabled exactly on the next beat)

[tt]
Update V1.1:
A "multi clock out" option has been added which supports 8 additional
MIDI Outs. The clocks which are sent can be enabled/disabled with
8 seperate play and stop buttons. Changes will be synchronized to
the beat (1/4 note)

This option is based on an idea of Braintu, his full concept can be
found under http://www.midibox.o...midimasterclock
Only the stop/play function has been implemented yet, he will continue
on this project.

Technical details about this option: the 8 MIDI outs are available at
J5 of the core module. This port is normaly used as analog input. In
order to ensure, that no short circuit happens if a user uploads this
application on a MIDIbox which has pots or AIN modules at J5, the
MULTI_CLOCK_OPTION flag in main.h is disabled (0) by default.
It has to be set to 1 to get the MIDI outs working

MIDI events are sent over these outputs with the "bit banging" method.
(see mclock.c, MCLOCK_SendMultiPort)

The enabled MIDI clock channels are displayed with 8 LEDs

There is a special schematic which describes the additional
connections: http://www.ucapps.de...ckbox_multi.pdf
[/tt]

Download: http://www.ucapps.de...s_download.html
Interconnections: http://www.ucapps.de...ckbox_multi.pdf

Best Regards, Thorsten.


#16 User is offline   stryd_one 

  • MIDIbox Guru
  • PipPipPipPip
  • Group: Frequent Writer
  • Posts: 8,850
  • Joined: 25-February 03
  • LocationMelbourne, Victoria, Australia

Posted 14 August 2006 - 12:47

Awesome, thanks TK and braintu!

I've been watching that project in the german forums, I was wondering what was going on ;)

#17 User is offline   sneakthief 

  • MIDIbox Addict
  • PipPip
  • Group: Programmer
  • Posts: 118
  • Joined: 24-January 06
  • LocationBerlin

Posted 18 August 2006 - 16:19

hey, that's a great implementation! i'm quite impressed.

regards,
michel

#18 User is offline   Modul 

  • MIDIbox Newbie
  • Pip
  • View blog
  • Group: Members
  • Posts: 9
  • Joined: 21-August 06

Posted 22 August 2006 - 20:53

Yeah! Very cool and useful guys.. And could someone build a custom clockbox for a private order for selling it...we really need one..but we can buld it because we don't have any experience..

#19 User is offline   stryd_one 

  • MIDIbox Guru
  • PipPipPipPip
  • Group: Frequent Writer
  • Posts: 8,850
  • Joined: 25-February 03
  • LocationMelbourne, Victoria, Australia

Posted 23 August 2006 - 14:11

I think you would need to get TK's approval, selling would be commercial use.

You could always use a multi-port MIDI interface and route midi clock out of your mac/pc. This could be done for a similar price... But a MIDIBox is not so hard if you are willing to spend a little time... So like they say, time is money... You just have to choose which one you will spend ;)

Disclaimer: No guarantees. Mac/PC timing may leave you wishing you had built the ClockBox ;D

#20 User is offline   Modul 

  • MIDIbox Newbie
  • Pip
  • View blog
  • Group: Members
  • Posts: 9
  • Joined: 21-August 06

Posted 23 August 2006 - 16:04

We need an external hardware device.. Not a routed signal from a pc/mac. And what's the worst we don't have any time at all to spend=) So we have to spend money you see.. So

Share this topic:


  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users