# Kria: How to create "longer" sounds and faster gates

good question - i don’t have the bandwidth to test but will be happy to provide another build if the number is still too high (it’s used in calculating step duration, and as @freqout said making it too low might cause tied notes even with lower duration values).

It’s just a scalar value that I adjusted until (i thought) i had it creating tied notes at the highest setting.

On the same line of code you’ll also see `clock_deltas[trackNum]` which is the amount of time (in ms) between clocks for that particular track so it does also factor in clock speed.

So it should work at any arbitrary clock speed. Tbh, it might be best to err on the safe side to ensure you can always get a tied note even if it eats into the 15th column, but let’s see how it tests out in the field.

1 Like

i’m not totally convinced this is right… hang on one sec…

… yeah ok. @freqout @scanner_darkly so again i don’t have euro stuff and this is just theorycrafting. so take w/ grain of salt. (*) but i don’t see how the arbitrary scaling factor can work consistently for all settings of clock mul and duration.

the scaled gate duration is the red surface. the clock duration is the blue plane. when the surface is above the plane, we got “note tie.” the scaling factor changes the steepness of the surface, but i don’t see how it can prevent them from crossing at some point.

(i’m assuming gate duration multiplier is ==1 btw.)

matlab:

``````n = 100;
c = linspace(50, 1000, n);  % clock duration un ticks
a = 380;                    % clock scaling factor
d = linspace(50, 1000, n);  % duration

g = zeros(n, n);             % scaled gate duration

for i=1:n
for j=1:n
g(i,j) = c(i) / a * d(j);
end
end

surf(c, d, g, 'FaceColor','r', 'FaceAlpha',0.4, 'EdgeColor','r', 'EdgeAlpha', 0.7)
dplane = zeros(n, n);
for i=1:n
dplane(i,:) = d;
end
hold on;
surf(c, d, dplane, 'FaceColor','b', 'FaceAlpha',0.4, 'EdgeColor','b', 'EdgeAlpha', 0.7)
hold off;

xlabel('clock duration')
ylabel('step duration')
zlabel('scaled gate duration')
``````

i guess i would implement “note tie” feature differently, with brute force. when user sets gate duration to max, just don’t set the gate-off timer.

(*) i am also frankly kind of slow and hungover today, and could be easily be making some very stupid error or assumption. like about how stage durations even work.

1 Like

yeah, i think that the easiest solution is simply not adding a timer for `kria_off` if the setting for the note is at the maximum.

can’t tell though what’s the right condition to check (or how to calculate the delay properly) without getting deep into the code which is frankly what i’m trying to avoid - too many other projects on the go to get deep into another one… i’ll be happy to rebuild the firmware if @freqout could tell me what would be the right condition to check.

`track->dur_mul == 16 && track->dur[pos[trackNum][mDur]] == 5`?

this works, will post new version in a bit.

ehh, i’m dumb - kria doesn’t have arbitrary stage durations. (right?) so the scaler is probably fine? but it still will always send gate-off if there is a gap in the pattern.

and of course if the clock rate slows, you will get gate-offs from the firing of a timer that was set from a previous clock.

so yea - i think skipping the timer altogether is the ticket. assuming, of course, that this is a behavior everyone wants.

ok here is the new build that disables the off timer altogether if the duration settings are at the max. tested with internal clock (with one rate only) and external clock (at 30, 120 and 300 bpm), testing was done with oscilloscope trigger detection.

ansible.zip (79.7 KB)
ansible.hex (246.5 KB)

also posted the updated ansible earthsea version

1 Like

oh interesting so does that mean at max, a note will drone (gate high) until another note on the pattern plays?

20 characters of yes

1 Like

A post was merged into an existing topic: Ansible Earthsea

A post was merged into an existing topic: Ansible Earthsea

For what it’s worth, my interpretation of tie in step sequencer basically says “trigger the gate and keep it high for duration of this step and next”. Some examples(assuming each step is a 1/16th):

x - o - o = trigger on step 1. duration <= 1/16th
x(tie) - o - o = trigger on step 1 and hold through step 2 until step 3. duration = 1/8th

x(tie) - x - o = also trigger on step 1 and hold until step 3. duration = 1/8th. the trigger on step 2 is consumed and irrelevant.

x(tie) - x(tie) - 0 = trigger on step 1 hold until step 4. duration = 3/16th

Do these examples meet anyone else’s expectations?

1 Like

I’m playing with kria 2.0.0 now. From messing about and looking at the code you have above, i believe where is this landed is that to enable note tie you must BOTH set the duration to the max length(5) AND set the duration’s time modifier to max(16).

Is this correct?

not sure to be honest - there were many changes since then, not sure where it landed. a question for @csboling!

This appears to be how it works, yeah. The change in 2.0.0 was to tweak a scaling factor (from 384 down to 380) that previously would not tie all the way.

1 Like

It definitely seems to work now which is great. The part I’m struggling with now is that if crank duration and duration-time to max, yes, now ties work but i can’t really control which notes get tied and which don’t. Because the duration-time is set to 16, you can’t really associate a given duration value with a specific trigger – kria is reading through the durations at 1/16th the rate of the triggers. The result is that any adjacent notes get tied. Am I missing something here?

With duration and time all the way up I’m still getting random gates being sent out where steps should be tied. Is this a known issue?

1 Like

wondering if this is actually working at this stage thanks!

To be personally honest, I gave up, sold kria, bought a vector sequencer and it just works. If reliable gate ties are an important feature to you, i would recommend you do the same thing I did.

2 Likes

Sorry, this slipped through the cracks I think. Build which does not set note-off when duration is set to max is posted here.

1 Like

Many Thanks!!!

I actually did try it out yesterday and note tie is possible. this was on the offical version 2.0.0

Need to set the duration to the far right (top corner) and each lane has to go all the way down for each step.

Note : f you want a new gate to be triggered , the last note of the gate ties needs to be shorter. if that makes sense. I think it can be documented a bit clearly on the manual so people don’t get confused.

As I understand csboling had made a change and anyone interested can check it out at the link listed in his reply above.