Idea: Loop Setter For Slices

The idea is simple:

When i automaticaly slice looped samples, i get every slice looped from beginning to end. Then i manually tweak every loop in every slice.

So i want little tool to apply loop markers from X to end in every slice automatically, for instant tails creation.

It can have some useful features, for example beat synced loop creation. It can optionally have orientations: from beggining to X / from X to end.

deleted this post

Here’s something simple:

function sampleslicesloopON()  
local number = (table.count(si.samples))  
for i=2,number do  
--Set Loop_mode Forward & On  
si.samples[i].loop_mode =2  
--Set Loop_start to Loop_end - Loop_end/10 (Probably doesnt work as well as it should.  
si.samples[i].loop_start = (si.samples[i].loop_end - si.samples[i].loop_end /10)  
--Announce an informative Blöö."blöö")   

I don’t think the loop_start_setting is exactly where you want it to be, but this should at least show you the technique used. I can tweak this for you, but you’ll have to give more instructions regards how you want the start_loop to be placed.

edited code slightly for the sake of brevity. … It wouldn’t be that hard to set the loop_start to be the sample_length-aspecific_amount_maybe_even_a_percentage_count…

Thank you, Esa!

I’ll try this later

Again, try it out and hit me back with what you actually wanted it to do…

OK. So i couldn’t even execute this snippet, sorry :) I’m really not into text-based programming/scripting.
So i decided to draw some wireframes to explain my point here.

This dialog should be spawned from context menu entry @ sample editor for parent (slices source) sample i think

snap is not available in lua

OK. So it should look like this

But a l33t coder could calculate the snap values manually, based on the song tempo and the sample rate of the sample (and also keep in mind the beatsync value, if necessary) :)



local sample =  
if (not sample.sample_buffer.has_sample_data) then'No sample data!')  
 local samples_per_beat = nil  
 if (sample.beat_sync_enabled) then  
 local lpb =  
 local beats_in_sample = sample.beat_sync_lines / lpb  
 local frames_in_sample = sample.sample_buffer.number_of_frames  
 samples_per_beat = frames_in_sample / beats_in_sample  
 local seconds_per_beat = 60 /  
 samples_per_beat = sample.sample_buffer.sample_rate * seconds_per_beat  
 local samples_per_128th_note = samples_per_beat / 32  
 local samples_per_64th_note = samples_per_beat / 16  
 local samples_per_32nd_note = samples_per_beat / 8  
 local samples_per_16th_note = samples_per_beat / 4  
 local samples_per_8th_note = samples_per_beat / 2  

are there such things as these sliders that read .observable-states?

Mmmm i might add this to the mpe if its ok with everybody. .Then you fan use the rotaries :)

That should can not fan, bloody phone!

Sure. Feel free

finally its here …midi mappable loop and select snap to beat

Thanks dblue!



but I still wouldn’t mind a tool specifically targeted for this, without the ‘bloat’.