How to MIDI map a samples start and end point?

I would like to map midi controllers to edit the start and end point of samples in the sample editor. Is this possible?

1 Like

It is not possible through the MIDI mapping of Renoise (does not go so far).

But it is very likely that it is possible to build a tool:

Terminal: oprint(renoise.song().selected_sample)

class: Sample
 properties:
    autofade
    autofade_observable
    autoseek
    autoseek_observable
    beat_sync_enabled
    beat_sync_enabled_observable
    beat_sync_lines
    beat_sync_lines_observable
    beat_sync_mode
    beat_sync_mode_observable
    device_chain_index
    device_chain_index_observable
    fine_tune
    fine_tune_observable
    interpolation_mode
    interpolation_mode_observable
    is_slice_alias
    loop_end
    loop_end_observable
    loop_mode
    loop_mode_observable
    loop_release
    loop_release_observable
    loop_start
    loop_start_observable
    modulation_set_index
    modulation_set_index_observable
    mute_group
    mute_group_observable
    name
    name_observable
    new_note_action
    new_note_action_observable
    oneshot
    oneshot_observable
    oversample_enabled
    oversample_enabled_observable
    panning
    panning_observable
    sample_buffer
    sample_buffer_observable
    sample_mapping
    slice_markers
    slice_markers_observable
    transpose
    transpose_observable
    volume
    volume_observable
 methods:
    __STRICT
    clear
    copy_from
    delete_slice_marker
    insert_slice_marker
    move_slice_marker

– Loops.
renoise.song().instruments.samples.loop_mode, _observable → [enum = LOOP_MODE]
renoise.song().instruments.samples.loop_release, _observable → [boolean]
renoise.song().instruments.samples.loop_start, _observable → [number, 1-num_sample_frames]
renoise.song().instruments.samples.loop_end, _observable → [number, 1-num_sample_frames]

– The sample frame count (number of samples per channel)
renoise.song().instruments.samples.sample_buffer.number_of_frames → [read-only, number]

The last three lines serve to control both extremes (start / end), which in any case cannot be crossed.

– Returns true when the given mapping already exists, otherwise false.
renoise.tool():has_midi_mapping(midi_mapping_name) → [boolean]

– Add a new midi_mapping entry as described above.
renoise.tool():add_midi_mapping(midi_mapping_definition_table)

– Remove a previously added midi mapping by specifying its name.
renoise.tool():remove_midi_mapping(midi_mapping_name)

And with this you will have access to the control of the functions in charge of modifying the start / end points. The access would be inside the Midi Mapping window of Renoise (CTRL+M).

It would be possible to do so with a LUA tool.

It might not be sample perfect in all cirurcumstances, but works quite well imo.

Thank you. It is possible to install the tool, but it seems, that it is no possible to “add loop control” from the sample list in renoise 3.21.

Thank you Raul. But I am not a programmer. I will read the lua documentation and check if I can try this.

You sure?

There is an entry in the context menu of the sample list here (inside the instrument. Don’t confuse it with the main instrument list). It will add the device to an instrument dsp chain (again, inside the instrument).

Do you mean this menu?

screenshot_2019-11-14_11-00-56

Nope.

https://tutorials.renoise.com/wiki/Sampler#Sample_List

Right click, select “Add Loop Control” far down, then go to the “Effects” tab in the instrument to find the device to control loop points.

(Don’t add it to an empty sample of zero length. I noticed it made the tool crash.)

1 Like

Thanks, this works for me.