Module xPhraseManager
This class will assist in managing phrases, phrase mappings .
Note that some methods only work with the selected instrument. This is a API limitation which would stands until we can determine the selected phrase without having to rely on the global 'selectedphrase/index' property
See also: http://forum.renoise.com/index.php/topic/26329-the-api-wishlist-thread/?p=221484
Functions
get_available_slot (instr_idx, insert_range, insert_idx) | Retrieve the next available phrase mapping, based on current criteria |
auto_insert_phrase (instr_idx, create_keymap) | Automatically add a new phrase to the specified instrument |
select_previous_phrase () | Select previous phrase |
select_next_phrase () | Select previous/next phrase |
select_next_phrase_mapping () | Select next phrase mapping as it appears in phrase bar |
select_previous_phrase_mapping () | Select previous phrase mapping as it appears in phrase bar |
set_selected_phrase_by_mapping_index (idx) | API5: Using the mapping index to specify the selected phrase |
delete_selected_phrase () | Delete the currently selected phrase |
delete_selected_phrase_mapping () | Delete the currently selected phrase mapping TODO in API4+, delete phrase + mapping |
get_selected_mapping () | |
get_selected_mapping_index () |
Functions
- get_available_slot (instr_idx, insert_range, insert_idx)
-
Retrieve the next available phrase mapping, based on current criteria
Parameters:
- instr_idx (int), index of instrument
- insert_range (int), the size of the mapping in semitones
- insert_idx (int), start search from this phrase index (first, if nil)
Returns:
- table{} or nil (if not able to find room)
- int, the index where we can insert
- auto_insert_phrase (instr_idx, create_keymap)
-
Automatically add a new phrase to the specified instrument
Parameters:
- instr_idx (int), index of instrument
- create_keymap (bool), add mapping
Returns:
-
+ InstrumentPhrase, the resulting phrase object
+ int, the phrase index
or nil if failed
- select_previous_phrase ()
-
Select previous phrase
Returns:
-
int (phrase index) or nil if no phrase was selected
- select_next_phrase ()
-
Select previous/next phrase
Returns:
-
int (phrase index) or nil if no phrase was selected
- select_next_phrase_mapping ()
- Select next phrase mapping as it appears in phrase bar
- select_previous_phrase_mapping ()
- Select previous phrase mapping as it appears in phrase bar
- set_selected_phrase_by_mapping_index (idx)
-
API5: Using the mapping index to specify the selected phrase
Parameters:
- idx
- delete_selected_phrase ()
- Delete the currently selected phrase
- delete_selected_phrase_mapping ()
-
Delete the currently selected phrase mapping
TODO in API4+, delete phrase + mapping
Returns:
-
renoise.InstrumentPhraseMapping or nil
- get_selected_mapping ()
-
Returns:
- renoise.InstrumentPhraseMapping or nil
- int
- get_selected_mapping_index ()
-
Returns:
-
int