ZynZilla - able to get it to appear, but not generate sound

OK, I read somewhere, on some post here in the forum, that adjusting the API value would quite often resuscitate ‘dead’ plugins. So I did - figured out how to update the manifest.xml, from 2.0 to 6.0. Now the ZynZilla plugin appears! Neato-beato.

But, Zynzilla does not produce any sound, nor does it generate any waveforms.

While I do not code in any language, I was able to figure out where to find the issue is, by viewing the Terminal feedback from the plugin. Here’s the message I got:

*** std::logic_error: ‘invalid sample index ‘0’. valid values are (1 to 1).’
*** stack traceback:
*** [C]: in function ‘insert_sample_at’
*** main.lua:537: in function ‘generate’
*** ./gui.lua:861: in function <./gui.lua:860>

Would anybody have any idea what I could copy/paste into the plugin, so we could all get this neat sound generator back?

looks like the function

insert_sample_at()

uses a loop or indexing that goes from 0 (zero)
but should go from 1 (one).

try searching for the function in main.lua and see if you can adjust the index or the FOR loop index on top to start or be 1.

Also, it’s maybe better to set the API version at 5, since Renoise itself can upgrade things from 5 to 6.

This is where it seems to be stemming from, but the only thing that looks suspicious to me, because I don’t code is the portion that says:

(int_sample_index), int_note-1, {0,119}, {0,127})

in particular: int_note-1

if current_mapping == nil then
current_mapping = instrument:insert_sample_mapping(LAYER_NOTE_ON,
(int_sample_index), int_note-1, {0,119}, {0,127})
else
current_mapping.base_note = int_note - 1
current_mapping.note_range = {0,119}
current_mapping.velocity_range = {0,127}
end

What might it be? The only thing I can figure is that maybe it’s a spacing issue. I tried adjusting that, but nothing changed.

I’m basically just grasping at straws :smiley:

something has changed in the new Renoise in the indexing.

The 0 in this portion of code should be changed to 1
the 119 maybe needs to be set to 120 (try it)
and the 127 to 128 (try it)

also, maybe the int_note-1 and the int_note - 1
should be replaced by int_note only (try it)

Did those changes

if current_mapping == nil then
current_mapping = instrument:insert_sample_mapping(LAYER_NOTE_ON,
(int_sample_index), int_note, {1,120}, {1,128})
else
current_mapping.base_note = int_note
current_mapping.note_range = {1,120}
current_mapping.velocity_range = {1,128}
end

Then got the same message.

*** std::logic_error: ‘invalid sample index ‘0’. valid values are (1 to 1).’
*** stack traceback:
*** [C]: in function ‘insert_sample_at’
*** main.lua:537: in function ‘generate’
*** ./gui.lua:861: in function <./gui.lua:860>

So, I’m wondering if the “0” in this bit (line 537) is the issue

if(int_samples == 0) then
sample_new = instrument:insert_sample_at(int_sample_index)
else
sample_new = renoise.song().selected_sample
end

buffer_new = sample_new.sample_buffer

if int_frames == 0 then
int_frames = SAMPLE_FREQUENCY / note_to_frequency(int_note)
end

I changed both zeros to ones, no dice. Maybe this plugin’s just dead :slight_smile: