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.

1 Like

deleted this post

Here’s something simple:

function sampleslicesloopON()  
local si=renoise.song().selected_instrument  
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)  
end  
--Announce an informative Blöö.  
renoise.app():show_status("blöö")   
end  
  

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

1 Like

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) :)

1 Like

2l33t4me

:)

  
local sample = renoise.song().selected_sample  
  
if (not sample.sample_buffer.has_sample_data) then  
  
 renoise.app():show_warning('No sample data!')  
  
else  
  
 local samples_per_beat = nil  
  
 if (sample.beat_sync_enabled) then  
  
 local lpb = renoise.song().transport.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  
  
 else  
  
 local seconds_per_beat = 60 / renoise.song().transport.bpm  
 samples_per_beat = sample.sample_buffer.sample_rate * seconds_per_beat  
  
 end  
  
 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  
  
end  
  
1 Like

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

http://tools.renoise.com/tools/musical-programming-environment

Thanks dblue!

wow

cool!

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