Jump to content

Clockbox


TK.
 Share

Recommended Posts

  • Replies 82
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Hi Ziggy,

here's a first version, you can divide the bpm by 1,2,3,4 (more divisors are possible)

since I didn't want to change my existing hardware I've made some changes to the handling:

* the play button now acts as a play/pause button

* the pause button cycles through the encoder modes: BPM, track select, divisor select (for selected track)

it's possible to add a multiplier (change resolution to 96ppq, divide the normal output by 4)

but I don't have the time to implement this now...

I hope the version with division will be useful:

clockbox_v1_1_w_divison.zip

If you have questions about the code just ask :-)

Michaël

Link to comment
Share on other sites

  • 2 months later...

heya,

I was just plain' around with the clockbox class and extending it with a MASTER/SLAVE mode, so that it automatically switches to SLAVEmode if a CLOCK is detected on the MIDI-IN and falls back to MASTER if no more clocks are received. (ohh, I'm so excited, it works so great!!!)  ;D ;D 8) 8)

Because I want my app to be able to run for a veeeeery long time, I checked the meter count and think I discovered a small bug:

unsigned char mclock_ctr_measures; // counts the measures (up to 65535)

I guess this should be an [tt]unsigned int[/tt].

It's a great template, btw! :D

This was just what I needed right now for the magic speakjet interface and the upcoming quatizer module :D

Cheers,

Michael

Link to comment
Share on other sites

I was just plain' around with the clockbox class and extending it with a MASTER/SLAVE mode, so that it automatically switches to SLAVEmode if a CLOCK is detected on the MIDI-IN and falls back to MASTER if no more clocks are received. (ohh, I'm so excited, it works so great!!!)  ;D ;D 8) 8)

LMFAO that is spooooooky.... Guess what I started doing last night..... Same thing! Fortunately for me I never finished it off or I'd have been kicking myself right now.... Don't suppose you feel  in a sharing mood? ;)

Because I want my app to be able to run for a veeeeery long time, I checked the meter count and think I discovered a small bug:

unsigned char mclock_ctr_measures; // counts the measures (up to 65535)

I guess this should be an [tt]unsigned int[/tt].

It's a great template, btw! :D

Right you are. I removed that functionality (the tracks in the seq take care of that) so I never noticed :)

Link to comment
Share on other sites

Haha, yes, I ignored this neat little application (template) much too long :)

Don't suppose you feel in a sharing mood?

of course, I do :)

As soon as my current project is finished and all bugs ruled out, I'll put up the sources (as always).

Maybe later a small standalone Quantize Box  8) Who knows? ;D

Or are you interested only in the master/slave part personally?

I could post the relevant code sections here...

Cheers,

Michael

Link to comment
Share on other sites

  • 2 weeks later...

i recently finished the clockbox incl. the hardware for the multi out option.

i recompiled the application with the multi out flag, programmed the pic but the multi outs seem not working properly.

the leds are lighting up fine, midi clock comes out of the 8 additional midi outs, but the play and stop buttons do not work.

the play buttons just do nothing, the stop buttons stop some random outs (incl. turning off some leds which do not correspond to the stopped midi outs).

i checked the connections to the core module and tested the pushbuttons seperately. seems right.

does anyone have a clue, where to look for the bug? i don't know where to look elsewhere in the hardware for the bug.

have i missed something in the applications code?

thanks

Link to comment
Share on other sites

No, a special configuration is not required to get the buttons working. The random behaviour on stop button changes indicate, that there is a problem with the shift register connections.

A troubleshooting guide for the DIN registers can be found here: http://www.midibox.org/dokuwiki/doku.php?id=din_module

Hope it helps - if not, just write about your observations during the tests.

Best Regards, Thorsten.

Link to comment
Share on other sites

okay here are my test-results:

one button on the second shift register triggered all 128 midi notes in the midio128 application. okay next i started measurements with the srio_interconnection_test.

i measured the SC and RC levels directly at the 74HC165 pins. as far as i could see, they seemed to be all right. so nothing good here.

after all that mess i tried another DIN module and now - well: the midibox works (midi out ports and corresponding LEDs are messed up in order, but in general the box works).

so: the error is within the DIN module. but i did not manage to locate it with the srio_interconnection_test - do you have any further recommondations?

Link to comment
Share on other sites

So, if the RC and SC signal is available, the only possibility I could imagine is that the 74HC165s are not powered (bad soldering at pin 8, 15 or 16). Could you please check this with removed chips? Because otherwise it could happen that you measure an "output voltage" caused by internal nets instead of the "input voltage" from the power supply.

Best Regards, Thorsten.

Link to comment
Share on other sites

  • 1 month later...

though having not tested the defective module any further (this will be done as soon as i begin putting together the modules for the midibox seqv3, i'll need the module there) i have a question:

i'd like to set the start- and stoppoints for the multi midi outputs to the next measure instead of the next quarter.

i guess i have found it - in the MCLOCK_TICK() i moved a #if multiclock part from the 

if( ++mclock_ctr_24 == 24 ) {
loop to the
if( ++mclock_ctr_beats == 4 )

{ loop

regards,

florian

Link to comment
Share on other sites

while i am playing around with the code i'd like to show some pics of the hardware prototype:

DSC00087.JPG

the fader is planned to work as a pitchbender and is fitted to center position via springs. this is however not implemented in the firmware yet ;) in the next step i will configure the computer-keys to work as combined start-stop keys. i plan to set up an array which contains the actual state of the channel and with every hit to a key i invert the corresponding state. but i guess i won't even need to programm that array, i might have seen an array with exactly the same function on friday when i had a first look to the sourcecode...

Link to comment
Share on other sites

  • 6 months later...

Yes, should work ok, but it could make sense to use a low-drop regulator instead of the 7805, so that the unusued power won't be transfered into heat.

Unfortunately I cannot give you recommendations for "known good parts"...

Best Regards, Thorsten.

Link to comment
Share on other sites

  • 4 months later...

Hi,

I've built a Clockbox with a slightly changed hardware (4 additional buttons for menu handling) and changed / improved the software to met my requirements.

As a starting point I've used the "clockbox_v1_1_w_divisor" provided by mess.

This is my first project coded in C (and first time coding for a microcontroller), so please forgive me if some additions to the code are not best practice. Hints are welcome.

General config:

If you dont have the mentioned additional 4 buttons, you can set the define "MENU_BUTTONS" in main.h to "0" to keep the handling of mess' version. You could/should set "NUMBER_OF_SRIO" back to 3 then, also.

Note: MULTI_CLOCK_OPTION is to "0" for security measures, set it back to "1" if multiple outs are used.

Some words about the shuffle:

Each shuffle-pattern consists of 12 bytes, each bit can be seen as a (virtual) tick in a 96ppqn-sheme. The 12 bytes represent a 1/4 note. If every 4th bit is set (binary 10001000 or 136 in decimal) you get a straight

normal timing. Shifting the bits of the single bytes here and there brings up the wanted shuffling. When doing your own shuffle-pattern ensure that there should be exactly 24 set bits per pattern or it would run async.

Compatibility note:

At low bpm-settings and/or high divisions and/or some shuffle-patterns some seqencer may have problems to follow the clock and switch to internal clock-signal. I had this problem with a Electribe R-MKII and

first thougt of a bug in my shuffle-function but on further inspection it was the fallback-function of the Electribe.

Another tested sequencer, the MAM SQ16, didnt show this behavior.

My changelog:

Changed: Migrated to SDCC v2.7.0
Changed: Stripped MTC-code (As there were no changes to this branch, someone can use clockbox 1.1)
Changed: Slave-Outs should not get a START- or STOP-Message when in inactive mode.
Fixed: SONG-POSITION was not sent to slave-outs when master-play is activated.
Changed: When a slave-out is activated, further play-button presses should not send START-Messages.
Changed: When a slave-out is inactive, further stop-button presses should not send STOP-Messages.
Changed: (De)activating of outputs when not in run-mode now possible.
Changed: Reordered the screen-elements to get space for the menue.
Added: Added a simple menu-structure using buttons on DIN-Pins 24-27.
Changed: Stop-button works now as a shift-key to swap menu-pages with encoder; shift-pause is stop now.
Changed: Menu is only shown when shift-key is pressed to save display-space.
Changed: Resolution is set to 96ppqn, main out has fixed devision of 4, other outs are devided through shuffle.
Added: Shuffle function implemented, 7 pattern + pattern 0 for no shuffle. (Menu: SFL)
Added: Option to use old handling without additional buttons.
Changed: Shift+Play on a certain slave-out selects this track for edit
Added:  Configure-option if an slave-out uses stop/start or stop/continue (Menu: SCS)
Added: Configure-option if start/stop toggles on next bar or beat (Menu: BBC)
Added: Configure-option if SONG-POSITION is sent to slave-outs on activation of this out (Menu: SPC)
Changed: Shuffle and divisor-settings get active on next beat to prevent asyncronicity; direct, when not running
Added: Save and load settings to/from eeprom. (4 patches each with 64 bytes (not fully used yet)) (Menu: SAV / LOA)  

Planned: Save and load config to/from bankstick and formatting bankstick (not working yet)

I hope, someone can use this.

Cheers,

Mike

IMG_0066s_thumb.jpg

clockbox_v1_5ekx.zip

2262_IMG_0066s_jpg4f16617c9b842f9c94e2b1

clockbox_v1_5ekx.zip

Link to comment
Share on other sites

Hi Mike,

great work! I really like it when an application evolves this way! :)

Are you interested to publish your variant in the new project repository?

As you can see here, we've a much more clean directory structure meanwhile. You could create a new directory, and maintain the application on the SVN server in future :)

We've a special board where you can read about the details (and get write access to the SVN server). Just drop me a mail to get programmers status :)

Best Regards, Thorsten.

Link to comment
Share on other sites

  • 8 months later...

I just recently tried to sync some of my gear and experienced problems (drifting). So I decided to build an clockbox to take care of it. I tested it with x0xb0x and PC ans seams it`s working fine. I`ll go with Mike`s code modification. Thanks Mike.

This is work in progress design of the unit itself. For buttons and caps I decided to recycle PC keyboard as it seams most durable for the job and cost me almost nothing.

Some advice or suggestion is very welcome

EDIT: picture changed

3060533063_41dba705f7.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share


×
×
  • Create New...