Hi, I used to have this nice little script that would take the first sample of the instrument (yep, most of my instruments are 1 sample only), create a new renoise song, paste it in. But it no longer works.
function WipeRetain()
local tmpvariable=os.tmpname("wav")
local s=renoise.song()
s.instruments[s.selected_instrument_index].samples[1].sample_buffer:save_as(tmpvariable, "wav")
if not renoise.tool().app_new_document_observable:has_notifier(WipeRetain_) then
renoise.tool().app_new_document_observable:add_notifier(WipeRetain_) else
renoise.tool().app_new_document_observable:remove_notifier(WipeRetain_)end
renoise.app():new_song()
end
function WipeRetain_()
local s=renoise.song()
s.instruments[s.selected_instrument_index].samples[1].sample_buffer:load_from(tmpvariable)
renoise.app().window.active_middle_frame=4
renoise.app():show_status(tmpvariable)
os.remove(tmpvariable)
renoise.tool().app_new_document_observable:remove_notifier(WipeRetain_)
end
I’m wondering what would be required to make this work again in 3.1.1?