What's new

Please help solve the problem with the arpeggiator

den shender

New Member
Hello!
Please help solve the problem with the arpeggiator.

On one note I have a four samples on a different layers. They are played simultaneously by pressing a key. The task is to set each layer its own unique frequency of the arpeggiator (rate), as well as the duration of the note (duration).

I tried to implement this through the NOTE_HELD cycle, but this causes an error in the calculations, if we count through triplets of whole notes triplets (for example, 3 pcs. 1/8T = 1 pcs. 1/4).
I tried to do it through the while loops in the buttons (as well as the on listener), but they do not take into account the fact that a key was pressed, causing asynchrony.

Examples of libraries where a similar arpeggiator was implemented: Heavyocity Mosaic Keys, Output Analog Strings
Thank you in advance for your help!
 
Use the listener callback, NI_SIGNAL_TIMER_BEAT at max 24.

This will allow you to use various different divisions of the same tempo... ie one track at 1/4, another at 1/8triplet, another at 1/16, etc.

If you want completely different tempos on each part it's a lot more complicated.
 
Use the listener callback, NI_SIGNAL_TIMER_BEAT at max 24.

This will allow you to use various different divisions of the same tempo... ie one track at 1/4, another at 1/8triplet, another at 1/16, etc.

If you want completely different tempos on each part it's a lot more complicated.

Thanks for reply!
How can I set the frequency of each layer (zone) individually on the listener? I think change_listener_par() will not help...
 
No you can't set the listener to more than one value, so just max it to 24. Then you need to use a different counter for each of your sequencer "tracks", and then use a tick modulo to find the subdivision to trigger that step of each sequence track.

ie.
tick mod 24 = a quarter note
tick mod 4 = a 8th triplet
tick mod 6 = a sixteenth
tick mod 8 = a quarter note triplet
tick mod 9 = a dotted sixteenth
tick mod 12 = an eighth
tick mod 18 = a dotted eighth
 
Last edited:
hmm, I guess it should rather be:

mod 16 = 1/4T (that's 6 ticks/bar),
mod 8 = 1/8T (12 ticks/bar) and
mod 4 = 1/16T (24 ticks/bar)

Or am I counting / hearing wrong?
 
Top Bottom