Help with Custom Wave Synth (Renoise Tool)

Help please?

An FM/wavetable single-cycle synth sound generator we have in Renoise Tools by @It-Alien

Unlike the other Tool called Generate Waveform, this one does update the sound while you’re working on it, but it does not maintain the “Loop Mode”. Every time I generate a new sound, it also resets the looping mode, which slows dow the process substantially, because it has to be reset to “Forward” every time.

Is there a quick way to adjust the code somewhere in the Tool to make this not happen, like the other Generate Waveform Tool?

1 Like

While this doesn’t answer the question about the code, if you haven’t already you can install a tool called “paketti” which adds the possibility to assign keyboard shortcuts to change the sample loop mode. This at least makes the process quite a bit faster compared to using a mouse to change the mode.

2 Likes

I will try this! I hope it works, because that waveform generator does some wicked FM/PM stuff that none of the others do. I contacted @It-Alien, maybe I’ll get a hint of what could be fixed/updated to create such a thing, maybe Paketti will do it. I’ll try right now.

Edit: Yep, does make the sample loop adjustment quicker! That being said, there is no way to hear a semi-live update of parameter changes, which I believe could be done if the loop was on constantly. I hope there’s a solution. If the MilkyWaves generator can do it, I believe this could also be applied to the Custom Wave Generator. The world may never know…

1 Like

Try a hack:

com.renoise.CustomWave_Rns310_V0.92.xrnx (10.5 KB)

1 Like

Perfect, thank you so much :slight_smile:

Now I can make all sorts of gonzo waveforms, this is incredible. With all the FM/PM going on in here. WOWEEEEE!!!

Ahhhh… crashed the Tool:

std::logic_error: ‘add notifier: the given function was already registered to this notifier.’
stack traceback:
[C]: in function ‘add_notifier’
./gui.lua:40: in function <./gui.lua:34>

yes, when i use in op2 type Morpher or wave then crash.

./operators.lua:137: attempt to index local 'buffer' (a number value)
stack traceback:
  ./operators.lua:137: in function '?'
  main.lua:326: in function 'operate'
  main.lua:431: in function 'process_data'
  main.lua:528: in function 'generate'
  ./gui.lua:572: in function <./gui.lua:569>

or

./operators.lua:27: attempt to index local 'arr_real_sources' (a number value)
stack traceback:
  ./operators.lua:27: in function '?'
  main.lua:326: in function 'operate'
  main.lua:431: in function 'process_data'
  main.lua:528: in function 'generate'
  ./gui.lua:572: in function <./gui.lua:569>

Probably buggy under 3.4.

Can you post an example xrns that will crash this? My attempts to replicate all seem to work fine. No crashing

Oh, I did manage a different error : )

'C:\Users\james\AppData\Roaming\Renoise\V3.4.0\Scripts\Tools\com.renoise.CustomWave.xrnx\main.lua' failed in one of its notifiers.

Please contact the author (Fabio Napodano | It-Alien (it-alien@renoise.com)) for assistance...

std::logic_error: 'trying to access a nil object of type 'class Sample'. the object is not or no longer available.'
stack traceback:
  [C]: ?
  [C]: in function '__index'
  [string "do..."]:37: in function <[string "do..."]:35>
  .\operators.lua:137: in function '?'
  main.lua:326: in function 'operate'
  main.lua:444: in function 'process_data'
  main.lua:528: in function 'generate'
  .\gui.lua:572: in function <.\gui.lua:569>
  [C]: ?
  [C]: in function '__newindex'
  [string "do..."]:22: in function <[string "do..."]:9>
  .\gui.lua:121: in function 'change_tab'
  .\gui.lua:987: in function 'show_dialog'
  main.lua:120: in function <main.lua:120>

This is after I was successful in creating a wav, and then going back to edit it. It crashes, and it seems the sample that was there vanishes.

I wish there were decent debugging tools for these sorts of things besides println and stuff.

1 Like

I will try again - the Morpher waveform is where it happened for me and for @martblek. For me, it first just went silent and would no longer generate sound, although I could get the waveform to show up and change.

I wasn’t able to crash it this time, but I do notice that the portion of the menu that the Morpher has - “Mod. Amplitude of” keeps resetting to “None”. May be part of the issue as well. Here’s an image and a file.

Screen Shot 2022-03-27 at 11.14.45 AM
Custom Wave Generator Hack-Test.xrns (8.6 KB)

1 Like

and another:

No matching overload found, candidates:
void (Slider*,custom [double])
stack traceback:
[C]: ?
[C]: in function ‘__newindex’
[string “do…”]:22: in function <[string “do…”]:9>
./gui.lua:110: in function ‘change_tab’
./gui.lua:526: in function <./gui.lua:525>

Custom Wave Generator Hack-Test Error 02.xrns (12.1 KB)

1 Like

hi,
little step forward.
I’m playing with wave type, first I had to create some wave in tool 1 (my previous first mistake). everything worked before I set “cycles” to more than 1.0.

wavgen_err

after adjusting the source code in gui.lua to a max value of 1.0 in cycles no crash yet.
fingers crossed :slight_smile:

@martblek Would love to have a copy of this, if you’ve got the time to share it! Next album is in the works and new waveforms are always a thing that is absolutely necessary :slight_smile:

yes, but samples will be very short with this hack :frowning:

Ah, I see. Still, I’d rather a crash-free version than get creative and have it fail :smiley:

@martblek Something that is also occurring to me, may be part of the issue. The amount of cycles via slider does not adjust via round numbers. Meaning, there’s a lot of decimal places. I wonder if the slider was adjusted to calculate only total cycles (1, 2, 5, 10, etc.) instead of say, 3.076, maybe it wouldn’t crash?

Not knowing anything about coding, but found this here:

max = SAMPLE_FREQUENCY/100, — to allow for finer tweaking, big values are too sluggish

Maybe, SAMPLE_FREQUENCY/100 is way too big, and has to do a lot of calculation. At what point, beyond human hearing, is this useful?

yes, this is it.
com.renoise.CustomWave_Rns310_V0.92_ugly_hack.xrnx (10.3 KB)