A tool to randomise start point within a range?

I’d like to make my hi hats more appealing by SLIGHTLY adjusting their start time. At the moment I’m using the S command and writing 0-9 in the unit column and 0-1 in the tens column by hand.

So

S00 to S19

Is there a tool which allows you to set a random start time within a selected range?

Can you make a screenshot of the pattern editor of what the result would be? If there is no tool to do it, I know it is very easy to build…

The Randomize option in the Selection does not allow working with a specific range. It is possible to easily add a Randomize option within the range: “Randomize (within Range)” in the same drop-down menu.

1 Like

A randomiser with proper options would be good, but the humanizer function isn’t too bad in this case. If you set all S to 10 then humanize another 10 you should pretty much get what you asked for.

2 Likes

Right, very well seen!

Hi,

I once used this crappy doofer, and it is working for me surprisingly well on a kick (you could use a chorus 100% wet, 0 modulation instead):
http://tstlab.virtualcreations.de/renoisetools/Ju%20Drum%20Random%20Delayer.xrdp

image

Awesome, I’d really appreciate that - I think we all would. I just made this example and it sounded AMAZING!!! It would be useful to apply to a whole track, or selection if possible.

2 Likes

The function would be relatively simple.
Detect the start line and the final line of the selection, which will establish the range. Check that there is a concrete effect in these 2 lines and a quantity (they are two quantities that determine the range to randomize). Apply a random value within the range in all the lines within the selection that have that specific effect, ignoring the rest of the effects that could have.
To work, you need a previous selection, and open the drop-down menu to execute the function. Initially, randomization would apply to all selected sub-columns. It really is strange that this does not exist natively.

@midierror If you want a quicker way of doing it by hand in mean time, my sequencer tool allows you to input patern commands with sliders. Just select the offset command from the relevant popup on the bottom row of buttons:

sam%20offset

1 Like

Here is the first version of the new RandomRangeTrack tool:

--
-- Menu Tool: "Random Range Track"
-- Version: 1.0 build 001
-- Release Date: January 2019
-- Compatibility: Renoise 3.1.1
-- Programmer: ulneiz
--
-- Description: This double function randomizes the notes or values of the selected range within the selected track.
--              First it is necessary to select an area in the pattern editor.
--              The first line and the last line selected must have different notes/values,  which define the
--              minimum and maximum notes/values of the range to randomize.
--              Use "ALT + mouse select" to the precise selection.
--
--              Access: "Pattern Editor/Selection/Randomize Notes... (or Randomize Effects...)".
--



--randomize notes (C-0 to B-9)
local function random_range_track_notes()
  local song=renoise.song()
  local spt=song.selected_pattern_track
  local sel=song.selection_in_pattern
  local range={sel.start_line,sel.end_line}
  --rprint(range)
  if (sel~=nil) then
    for lne=range[1],range[2] do
      --note columns (notes only)
      for ncl=1,12 do
        local nte_col=spt:line(lne):note_column(ncl)
        if (nte_col.is_selected) then
          --note
          if (nte_col.note_value<120) then
            local val_1=spt:line(range[1]):note_column(ncl).note_value
            local val_2=spt:line(range[2]):note_column(ncl).note_value
            print(val_1,val_2)
            if (val_1<120) and (val_2<120) then
              if (val_1<val_2) then
                nte_col.note_value=math.random(val_1,val_2)
              elseif (val_1>val_2) then
                nte_col.note_value=math.random(val_2,val_1)
              end
            end
          end
        end
      end
    end
  end
end



--randomize effect values (volume, panning, delay, sample effects & effect columns)
local function random_range_track_effect()
  local song=renoise.song()
  local spt=song.selected_pattern_track
  local sel=song.selection_in_pattern
  local range={sel.start_line,sel.end_line}
  --rprint(range)
  if (sel~=nil) then
    for lne=range[1],range[2] do
      --note columns (vol,pan,dly,sfx)
      for ncl=1,12 do
        local nte_col=spt:line(lne):note_column(ncl)
        if (nte_col.is_selected) then
          --volume
          if (nte_col.volume_string~="..") then
            local val_1=spt:line(range[1]):note_column(ncl).volume_value
            local val_2=spt:line(range[2]):note_column(ncl).volume_value
            if (val_1<=127) and (val_2<=127) then
              if (val_1<val_2) then
                nte_col.volume_value=math.random(val_1,val_2)
              elseif (val_1>val_2) then
                nte_col.volume_value=math.random(val_2,val_1)
              end
            end
          end
          --panning
          if (nte_col.panning_string~="..") then
            local val_1=spt:line(range[1]):note_column(ncl).panning_value
            local val_2=spt:line(range[2]):note_column(ncl).panning_value
            if (val_1<=127) and (val_2<=127) then
              if (val_1<val_2) then
                nte_col.panning_value=math.random(val_1,val_2)
              elseif (val_1>val_2) then
                nte_col.panning_value=math.random(val_2,val_1)
              end
            end
          end
          --delay
          if (nte_col.delay_string~="..") then
            local val_1=spt:line(range[1]):note_column(ncl).delay_value
            local val_2=spt:line(range[2]):note_column(ncl).delay_value
            if (val_1<=256) and (val_1>0) and (val_2<=256) and (val_2>0) then            
              if (val_1<val_2) then
                nte_col.delay_value=math.random(val_1,val_2)
              elseif (val_1>val_2) then
                nte_col.delay_value=math.random(val_2,val_1)
              end
            end
          end
          --sample effects
          if (nte_col.effect_number_string==spt:line(range[1]):note_column(ncl).effect_number_string) then
            local val_1=spt:line(range[1]):note_column(ncl).effect_amount_value
            local val_2=spt:line(range[2]):note_column(ncl).effect_amount_value
            if (val_1<val_2) then
              nte_col.effect_amount_value=math.random(val_1,val_2)
            elseif (val_1>val_2) then
              nte_col.effect_amount_value=math.random(val_2,val_1)
            end
          end
        end
      end
      --effect columns
      for ecl=1,8 do
        local eff_col=spt:line(lne):effect_column(ecl)
        if (eff_col.is_selected) then
          if (eff_col.number_string==spt:line(range[1]):effect_column(ecl).number_string) then
            local val_1=spt:line(range[1]):effect_column(ecl).amount_value
            local val_2=spt:line(range[2]):effect_column(ecl).amount_value
            if (val_1<val_2) then
              eff_col.amount_value=math.random(val_1,val_2)
            elseif (val_1>val_2) then
              eff_col.amount_value=math.random(val_2,val_1)
            end
          end
        end
      end
    end
  end
end



--menu entry
renoise.tool():add_menu_entry{
  name=("Pattern Editor:Selection:Randomize Notes (Range Track)"),
  invoke=function() random_range_track_notes() end
}
renoise.tool():add_menu_entry{
  name=("Pattern Editor:Selection:Randomize Effects (Range Track)"),
  invoke=function() random_range_track_effect() end
}

This tool is also able to randomize ranges of notes through the selection, in addition to the effect values. As soon as I have time I will upload it as an official tool on renoise.com.

Cool, thank you… please let me know how I can use it!

Thanks, I’m having trouble finding this !

@midierror if you are talking about sequencer tool, here is a reposted link without default forum formatting (the quote box at bottom of previous post)

Link repost

If you mean @Raul 's tool, that’s just the source he posted, and he needs to package it up and upload when he has the time.

The new Random Range Track tool can be discussed here:

The two randomization functions could still be more aggressive, preventing more than repeated values being repeated. Test the tool thoroughly. I should do exactly what you ask for. It is valid for any volume, panning, delay and sfx subcolumns and effect columns. In addition, a range of notes can be randomized separately.

It is limited to working within a pattern-track on purpose. Try to be precise in the selection (top line and bottom line).

Try using the maYbe command in mutually exclusive mode within a phrase. You can spread different notes and/or effect values over the 12 available note columns, so that the maYbe command will play a random column each time the note is triggered. Tip: You can also weight each note column differently to give more or less importance to certain values.

Example: 2019-01-30-maybe-sample-attack.xrns (166.7 KB)

3 Likes

The new Random Range Track tool has been updated to version 2.0. Download the new version and delete the old one.

AWSOME!!! thanks so much this is why I love the renoise community!!

I just had an even better idea… could it be locked it to a certain number of steps in the range (eg 10s) ??

Then it’ll work brilliantly as a randomised beat make using the S command!

EG

“Randomise between 00 and F0 in steps of 16” would result in

10 20 30 40 50 60 70 80 A0 B0 C0 D0 E0 OR F0

It is possible to create a table of specific numerical values and return randomly for each line only the values that are within this table.
For example
table={00,10, 20, 30, 40, 50, 60, 70, 80, 90, A0, B0, C0, D0, E0, F0}

Result:
Line1=70
Line2=00
Line3=D0
Line4=20
Line5=30
Line6=B0
Line7=80
Line8=D0
Line9=10
Line10=20
Line11=A0
Line12=90
Line13=00
Line14=60
Line15=C0
Line16=C0

It would only be valid for effects that accept 256 values. The volume or the panning only accept 128. We are spinning very fine already.

The pattern editor has a basic randomize function that works like this.

You can randomize the selected blocked, the current track, current column, and so on.

  • ALT + F7 : Randomize block selection
  • LSHIFT + F7 : Randomize track
  • CTRL + F7 : Randomize pattern
  • Etc.

Search for “randomize” in the key preferences :slight_smile:

Thats good, and it does work. But i dont think it randomises within a range…?