finally had some time to look at the snippet scripts in the starterpack,and was wondering if i could use this for scales/chords,if i modifyied it abit
– generate a simple arp sequence (repeating in the current
– pattern & track from line 0 to the pattern end)
local pattern_iter = renoise.song().pattern_iterator
local pattern_index = renoise.song().selected_pattern_index
local track_index = renoise.song().selected_track_index
local instrument_index = renoise.song().selected_instrument_index
local EMPTY_VOLUME = renoise.PatternTrackLine.EMPTY_VOLUME
local EMPTY_INSTRUMENT = renoise.PatternTrackLine.EMPTY_INSTRUMENT
local arp_sequence = {
{note=“C-4”, instrument = instrument_index, volume = 0x20},
{note=“E-4”, instrument = instrument_index, volume = 0x40},
{note=“G-4”, instrument = instrument_index, volume = 0x80},
{note=“OFF”, instrument = EMPTY_INSTRUMENT, volume = EMPTY_VOLUME},
{note=“G-4”, instrument = instrument_index, volume = EMPTY_VOLUME},
{note="—", instrument = EMPTY_INSTRUMENT, volume = EMPTY_VOLUME},
{note=“E-4”, instrument = instrument_index, volume = 0x40},
{note=“C-4”, instrument = instrument_index, volume = 0x20},
}
for pos,line in pattern_iter:lines_in_pattern_track(pattern_index, track_index) do
if not table.is_empty(line.note_columns) then
local note_column = line.note_columns[1]
note_column:clear()
local arp_index = math.mod(pos.line - 1, #arp_sequence) + 1
note_column.note_string = arp_sequence[arp_index].note
note_column.instrument_value = arp_sequence[arp_index].instrument
note_column.volume_value = arp_sequence[arp_index].volume
end
end