I have been trying to build a simple function to be able to permute the content of two adjoining phrases.
I have built this function to see if the miracle occurs. But it does not work:
local function phm_swap_phrase_down() local idx=song.selected_phrase_index local ssi=song.selected_instrument if (idx<#ssi.phrases) then local current_phrase=ssi:phrase(idx) local next_phrase=ssi:phrase(idx+1) next_phrase,current_phrase=current_phrase,next_phrase --NOT WORK! end end
This kind of permutation only works with simple information (variables), such as swapping a string or numbers (A=B and B=A).
– Copy contents from another phrase.
renoise.song().instruments.phrases:copy_from(other renoise.InstrumentPhrase object)
This serves to copy the content of a phrase into another phrase.
If there was a simple way to store everything in a temporary clipboard, maybe it could be solved.