How to set all Phrases to default settings set by user?

Hi, I’d like to figure out how to set a global setting that every Phrase created will automatically only show one track, no delays, no volumes, no effects, no nothing, just one tiny column of data. how can i do that?

i would prefer that everytime i start a new track, any new phrase i create will be “minimal”, so to speak.

Not possible, but you could recall a phrase preset.

Can be scripted too (I’m saying this because you know ;))

Not possible, but you could recall a phrase preset.

Can be scripted too (I’m saying this because you know ;))

Ok, I’ll try and see what I could show or make disappear in the phrase editor, thanks for the headsup. I tried my usual grep on the documentation but didn’t immediately see much relating to _is_visible in the phrase editor

From what I’ve gathered there is an observable for detecting when new phrases are inserted, moved or deleted. This could be used for quickly setting the phrasetrack properties according to saved preferences.

The only thing to be mindful of is to not modify any new phrases that are created by the native “duplicate” feature. This can be detected by checking the name of the phrasetrack, as far as I can tell.

Ok, I’ll try and see what I could show or make disappear in the phrase editor, thanks for the headsup. I tried my usual grep on the documentation but didn’t immediately see much relating to _is_visible in the phrase editor

I think I remember that I read in a Renoise forum that the documentation for the phrases is not very developed. But it is very similar to the pattern editor.

However, the equivalent of selected_line_index for the phrases has been requested by several people, which is not available.

It is 100% possible through scripting:

Define the selected phrase:

song = renoise.song()

sph = song.selected_phrase

Then you can read this:

  • sph. number_of_lines = A
  • sph. visible_note_columns = B
  • sph. visible_effect_columns = C
  • sph. volume_column_visible = D
  • sph. panning_column_visible = E
  • sph. delay_column_visible = F
  • sph. sample_effects_column_visible = G
  • etc.

All. Pattern editor and phrase editor are very similar.You can also clean the whole phrase.This is fine for new phrases.Make sure that the phrase exists, before launching this function.

Not possible, but you could recall a phrase preset.

Hi danoise, I tried to save an Init preset but seems like that is ignored when creating a new phrase. What am I doing wrong? What’s the official name for “Phrase Template”, much like you can save a module as a Renoise template?

Do I need to go code on this so that "when phrase generated, set specific settings (specific columns visible etc)?

Hi, I’m also trying to rename the Phrase to it’s index (there really is no need to write “Phrase #4” when I can only see “Phr”… how do I do this? I tried (and failed) to get this to work:

renoise.song().selected_phrase.name=renoise.song().selected_phrase_index

but for some reason it just shoots

*** No matching overload found, candidates:
*** void <unknown>(InstrumentPhrase&,custom [class String] const&)
*** stack traceback:
*** [C]: ?
*** [C]: in function '__newindex'
*** [string "do..."]:22: in function <[string "do..."]:9>
*** [string "renoise.song().selected_phrase.name=renoise..."]:1: in main chunk

but when I do an oprint(renoise.song().selected_phrase_index) I get “4” or something into the Terminal.

So how do I convert the selected_phrase_index into something that can be written as the name?

This is what I currently have:

renoise.tool():add_keybinding{name="Phrase Editor:Paketti:Init Phrase Settings",invoke=function()
renoise.song().selected_phrase.visible_note_columns=1
renoise.song().selected_phrase.visible_effect_columns=0
renoise.song().selected_phrase.volume_column_visible=false
renoise.song().selected_phrase.panning_column_visible=false
renoise.song().selected_phrase.delay_column_visible=false
renoise.song().selected_phrase.sample_effects_column_visible=false

local renamephrase_to_index=renoise.song().selected_phrase_index
renoise.song().selected_phrase.name=renamephrase_to_index
renoise.song().selected_phrase.name=renoise.song().selected_phrase_index

end}

renoise.song().selected_phrase.name = tostring(renoise.song().selected_phrase_index)

Sometimes you’ll have to “convert” a number to a string this way. I’m guessing that the phrase.name setter has an assertion that checks that input is of the correct type (string).

renoise.song().selected_phrase.name = tostring(renoise.song().selected_phrase_index)

Sometimes you’ll have to “convert” a number to a string this way. I’m guessing that the phrase.name setter has an assertion that checks that input is of the correct type (string).

thanks, i had no idea that tostring exists

Not possible, but you could recall a phrase preset.

Can be scripted too (I’m saying this because you know ;))

this is all your fault. no hang on, i mean thanks!