[SOLVED] How to copy samplemappings[1][1] to samplemappings[2][1]

hi, i can’t seem to figure this out. [1][1] is 1st sample in note-on. [2][1] is 1st sample in note-off.

duplicate posts:

ok i ended up using the most simplest possible stupidest possible and most error prone and “no protections” type solution:

renoise.song().instruments[renoise.song().selected_instrument_index]:insert_sample_at(2)

renoise.song().selected_sample_index = 2
renoise.song().instruments[renoise.song().selected_instrument_index].samples[renoise.song().selected_sample_index]:copy_from(renoise.song().instruments[renoise.song().selected_instrument_index].samples[1])
renoise.song().instruments[renoise.song().selected_instrument_index].samples[renoise.song().selected_sample_index].sample_mapping.layer=2

so first i create a 2nd sample slot.
then i select the 2nd sample slot.
then i copy the 1st sample to 2nd slot
then i switch the layer from 1 to 2.

i ended up making the solution on my own since chatgpt seems to want to give me completely broken solutions and doesn’t want to learn from my solutions. even though chatgpt solution 1) doesn’t work 2) doesn’t work and my solution: works.

when i tried to make it so that it would take my code and iterate through the samples in the instruments, it still wouldn’t work properly. it’s pretty wild.
i think the thread i have with chatgpt has completely devolved and gotten corrupted since it constantly keeps hallucinating worse and worse solutions, none of which work.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.