Module xKeyZone

Static methods for working with instrument keyzones (a.k.a.

sample mappings) .

Functions

shift_by_semitones (instr, sample_idx_from, amt) [Static] Shift samples by amount of semitones, starting from the sample index TODO use "mappings" array (support )
memoize_mappings (mappings) memoize a keyzone layer
find_mapping (mappings, note_rng, vel_rng, layer) Locate a sample-mapping that match the provided information
get_samples_mapped_to_note (instr, note) [Static] Figure out which samples are mapped to the provided note
distribute () same as 'distribute' in the keyzone editor [[
layer () same as 'layer' in the keyzone editor
create_multisample_layout (layout, instr) create layout from the provided settings table is ordered same way as Renoise: bottom up, velocity-wise, and left-to-right, note-wise note: specify 'instr' to define the 'sample' property for the returned xSampleMappings
compute_multisample_velocities (vel_steps, vel_min, vel_max)
compute_multisample_notes (note_steps, note_min, note_max, extend)


Functions

shift_by_semitones (instr, sample_idx_from, amt)
[Static] Shift samples by amount of semitones, starting from the sample index TODO use "mappings" array (support )

Parameters:

  • instr (renoise.Instrument)
  • sample_idx_from (int)
  • amt (int)
memoize_mappings (mappings)
memoize a keyzone layer

Parameters:

  • mappings (table)

Returns:

    table, ordered by
find_mapping (mappings, note_rng, vel_rng, layer)
Locate a sample-mapping that match the provided information

Parameters:

  • mappings (table), can be ordered by memoized keys
  • note_rng (table)
  • vel_rng (table)
  • layer (number, renoise.Instrument.LAYERNOTEXX), defaults to LAYERNOTEON

Returns:

    xSampleMapping or nil
get_samples_mapped_to_note (instr, note)
[Static] Figure out which samples are mapped to the provided note

Parameters:

  • instr
  • note

Returns:

    table (sample indices)
distribute ()
same as 'distribute' in the keyzone editor [[
layer ()
same as 'layer' in the keyzone editor
create_multisample_layout (layout, instr)
create layout from the provided settings table is ordered same way as Renoise: bottom up, velocity-wise, and left-to-right, note-wise note: specify 'instr' to define the 'sample' property for the returned xSampleMappings

Parameters:

  • layout (xKeyZoneLayout)
  • instr (renoise.Instrument), if included, this will add 'sample' property

Returns:

    table
compute_multisample_velocities (vel_steps, vel_min, vel_max)

Parameters:

  • vel_steps (number), the number of velocity layers to create
  • vel_min (number)
  • vel_max (number) return table{number,number}
compute_multisample_notes (note_steps, note_min, note_max, extend)

Parameters:

  • note_steps (number), create a new mapping for every Nth note
  • note_min (number)
  • note_max (number)
  • extend (boolean), extend "outside" mapped region return table{number,number}
generated by LDoc 1.4.2