renoise.InstrumentPhrase

General remarks: Phrases do use renoise.PatternLine objects just like the pattern tracks do. When the instrument column is enabled and used, not instruments, but samples are addressed/triggered in phrases.

Constants

KeyTrackingMode

{
    KEY_TRACKING_NONE: integer = 1,
    KEY_TRACKING_TRANSPOSE: integer = 2,
    KEY_TRACKING_OFFSET: integer = 3,
}

MAX_NUMBER_OF_LINES : integer

Maximum number of lines that can be present in a phrase.

MIN_NUMBER_OF_NOTE_COLUMNS : integer

Min/Maximum number of note columns that can be present in a phrase.

MAX_NUMBER_OF_NOTE_COLUMNS : integer

MIN_NUMBER_OF_EFFECT_COLUMNS : integer

Min/Maximum number of effect columns that can be present in a phrase.

MAX_NUMBER_OF_EFFECT_COLUMNS : integer


Properties

name : string

Name of the phrase as visible in the phrase editor and piano mappings.

name_observable : renoise.Document.Observable

Track changes to document properties or general states by attaching listener functions to it.

mapping : renoise.InstrumentPhraseMapping

(Key)Mapping properties of the phrase or nil when no mapping is present.

is_empty : boolean

READ-ONLY Quickly check if a phrase has some non empty pattern lines.

is_empty_observable : renoise.Document.Observable

Track changes to document properties or general states by attaching listener functions to it.

number_of_lines : integer

Default: 16, Range: (1 - renoise.InstrumentPhrase.MAX_NUMBER_OF_LINES) Number of lines the phrase currently has.

number_of_lines_observable : renoise.Document.Observable

Track changes to document properties or general states by attaching listener functions to it.

lines : renoise.PatternLine[]

READ-ONLY Get all lines in a range [1, number_of_lines_in_pattern]

visible_note_columns : integer

Range: (MIN_NUMBER_OF_NOTE_COLUMNS - MAX_NUMBER_OF_NOTE_COLUMNS) How many note columns are visible in the phrase.

visible_note_columns_observable : renoise.Document.Observable

Track changes to document properties or general states by attaching listener functions to it.

visible_effect_columns : integer

Range: (MIN_NUMBER_OF_EFFECT_COLUMNS - MAX_NUMBER_OF_EFFECT_COLUMNS) How many effect columns are visible in the phrase.

visible_effect_columns_observable : renoise.Document.Observable

Track changes to document properties or general states by attaching listener functions to it.

key_tracking : renoise.InstrumentPhrase.KeyTrackingMode

Phrase's key-tracking mode.

key_tracking_observable : renoise.Document.Observable

Track changes to document properties or general states by attaching listener functions to it.

base_note : integer

Range: (0 - 119) where C-4 is 48 Phrase's base-note. Only relevant when key_tracking is set to transpose.

base_note_observable : renoise.Document.Observable

Track changes to document properties or general states by attaching listener functions to it.

looping : boolean

Loop mode. The phrase plays as one-shot when disabled.

looping_observable : renoise.Document.Observable

Track changes to document properties or general states by attaching listener functions to it.

loop_start : integer

Range: (1 - number_of_lines) Loop start. Playback will start from the beginning before entering loop

loop_start_observable : renoise.Document.Observable

Track changes to document properties or general states by attaching listener functions to it.

loop_end : integer

Range: (loop_start - number_of_lines) Loop end. Needs to be > loop_start and <= number_of_lines

loop_end_observable : renoise.Document.Observable

Track changes to document properties or general states by attaching listener functions to it.

autoseek : boolean

Phrase autoseek settings

autoseek_observable : renoise.Document.Observable

Track changes to document properties or general states by attaching listener functions to it.

lpb : integer

Range: (1 - 256) Phrase local lines per beat setting. New phrases get initialized with the song's current LPB setting. TPL can not be configured in phrases.

lpb_observable : renoise.Document.Observable

Track changes to document properties or general states by attaching listener functions to it.

shuffle : number

Range: (0 - 1) Shuffle groove amount for a phrase. 0.0 = no shuffle (off), 1.0 = full shuffle

shuffle_observable : renoise.Document.Observable

Track changes to document properties or general states by attaching listener functions to it.

instrument_column_visible : boolean

Column visibility.

instrument_column_visible_observable : renoise.Document.Observable

Track changes to document properties or general states by attaching listener functions to it.

volume_column_visible : boolean

volume_column_visible_observable : renoise.Document.Observable

Track changes to document properties or general states by attaching listener functions to it.

panning_column_visible : boolean

panning_column_visible_observable : renoise.Document.Observable

Track changes to document properties or general states by attaching listener functions to it.

delay_column_visible : boolean

delay_column_visible_observable : renoise.Document.Observable

Track changes to document properties or general states by attaching listener functions to it.

sample_effects_column_visible : boolean

sample_effects_column_visible_observable : renoise.Document.Observable

Track changes to document properties or general states by attaching listener functions to it.


Functions

clear(self)

Deletes all lines.

copy_from(self, phrase : renoise.InstrumentPhrase)

Copy contents from another phrase.

line(self, index : integer)

->renoise.PatternLine

Range: (1 - renoise.InstrumentPhrase.MAX_NUMBER_OF_LINES) Access to a single line by index. Line must be in Range: (1 - MAX_NUMBER_OF_LINES). This is a !lot! more efficient than calling the property: lines[index] to randomly access lines.

lines_in_range(self, index_from : integer, index_to : integer)

->renoise.PatternLine[]

Get a specific line range

has_line_notifier(self, func : PhraseLineChangeCallbackWithContext, obj : table | userdata)

->boolean

Check/add/remove notifier functions or methods, which are called by Renoise as soon as any of the phrases's lines have changed. See: renoise.Pattern.has_line_notifier for more details.

add_line_notifier(self, func : PhraseLineChangeCallbackWithContext, obj : table | userdata)

remove_line_notifier(self, func : PhraseLineChangeCallbackWithContext, obj : table | userdata)

has_line_edited_notifier(self, func : PhraseLineChangeCallbackWithContext, obj : table | userdata)

->boolean

Same as line_notifier above, but the notifier only fires when the user added, changed or deleted a line with the computer keyboard. See: renoise.Pattern.has_line_editoed_notifier for more details.

add_line_edited_notifier(self, func : PhraseLineChangeCallbackWithContext, obj : table | userdata)

remove_line_edited_notifier(self, func : PhraseLineChangeCallbackWithContext, obj : table | userdata)

column_is_muted(self, column : integer)

->boolean

Note column mute states.

column_is_muted_observable(self, column : integer)

->renoise.Document.Observable

set_column_is_muted(self, column : integer, muted : boolean)

column_name(self, column : integer)

->string

Note column names.

column_name_observable(self, column : integer)

->renoise.Document.Observable

set_column_name(self, column : integer, name : string)

swap_note_columns_at(self, index1 : integer, index2 : integer)

Swap the positions of two note columns within a phrase.

swap_effect_columns_at(self, index1 : integer, index2 : integer)

Swap the positions of two effect columns within a phrase.


Local Structs

PhraseLinePosition

Line iterator position.


Properties

line : integer


Local Aliases

PhraseLineChangeCallbackWithContext

(obj : table | userdata, pos : PhraseLinePosition)