Jump to content

Custom SEQ clock division?


Metrophage
 Share

Recommended Posts

Reading the main SEQ page, I see that the clock divisions are all even. Is it a straightforward thing to change them in the firmware code, so I could get odd number divisions and primes? I don't usually do even-meter stuff, so I am usually stuck doing this by computer, or with lots of analog modules. I'd love to tweak the clock divisions live to my MIDI gear with something like this.

Is it just something like changing an "X/16" to something else, like "X/11", or is it more involved? This is my first PIC experience, so I don't know how such stuff works exactly.

M

Link to comment
Share on other sites

Independent BPM rates would require dedicated hardware timers for each track --- this is not possible, all timers of the PIC are allocated.

But you could customize the BPM divider if you want. Currently only even numbers are provided, since they can be easily derived from a bitmask.

I haven't taken odd numbers into account, but there is only one place in the sequencer core which needs to be changed:


SEQ_CORE_Clk_NextStep_No1st
;; increment SEQ_TRKSTEPx and save new value in TMP1
movlw SEQ_TRKSTEPx
incf PLUSW0, F
movff PLUSW0, TMP1
;; check for max value which depends on divider setting
movlw SEQ_TRKDIVLENx
movf PLUSW0, W
;; 0->1, 1->2, 2->4, 3->8, 4->16... hey, thats simply the output of MIOS_HLP_GetBitORMask
call MIOS_HLP_GetBitORMask
[/code]

so, if you would call an own jumptable function instead of MIOS_HLP_GetBitORMask, you could realize any divider.

up to 16 different divider settings are possible, this means that for the case BPM/1 ... BPM/16 you could just replace "call MIOS_HLP_GetBitORMask" by "andlw 0x0f" and "addlw 1", this will work without  changing the data structures

Best Regards, Thorsten.

Link to comment
Share on other sites

This is really excellent to hear! I was guessing that completely separate tempo would require multiple sequencers (not such a bad thing!). Indeed, it was more varied clock divisions which I was thinking of. I am delighted to read that this can be implemented relatively easily! This more or less cinches that I will try to start making on of these projects soon!

Thanks so much Thorsten!

M

Link to comment
Share on other sites

I think I will change this in the next official release, because it really allows more variations than the current BPM divider settings.

This would mean that BPM/32 and BPM/64 won't be available anymore. However, if somebody needs this (I don't think so), then he is always allowed to reverse the change ;-)

Best Regards, Thorsten.

Link to comment
Share on other sites

Cheater - we are talking about sequencing in real time, with software VS dedicated hardware.

On a lot of gear and software, complex rhythmic tweaks aren't available in real time, if at all. But there are some, it just takes creative people to make it. I have a lot of software, now I am looking for real time hardware sequencer for MIDI and CV. That's why I am here!

CJ

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...

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...