Edit - OK, I think I’ve figured this out. A blank instrument is inserted at the selected move slot, then the selected instrument is swapped there and the blank that was swapped is deleted. When the insertion is made the instrument table extends itself in Renoise, but doesn’t report this to the API through the observable so that you don’t see a bunch of irrelevant swaps.
The ‘renoise.song().instruments_observable’ will report the change made and to what instrument(s) by passing along a table.
renoise.song().instruments_observable:add_notifier(function(change) rprint(change) end)
renoise.song():insert_instrument_at(8)
renoise.song():delete_instrument_at(3)
renoise.song():swap_instruments_at(2, 7)
The odd thing though is the extra steps it’s reporting when a single move is manually made by the user in the Instrument Selector. Is this supposed to be happening?