protoplug icon indicating copy to clipboard operation
protoplug copied to clipboard

EBM generator [broken]

Open severak opened this issue 4 years ago • 2 comments

I modified your atonal MIDI generator to generate some EBM riffs. It somewhat works, but I ran into some some issues:

  • for some unknown reason it does not send note off when stopped
  • I am not able to figure out how to change parameter from interval to number of steps (per bar)

See ebmgen.lua

severak avatar Sep 14 '21 19:09 severak

I don't know, but one thought on your first problem.

The "changed" function in the "Is playing" param is trying to turn the note off by calling noteOff which updates newEvents.

But is all this in scope from within the param code?

I presume it stops, because is_playing is successfully changed within that handler. But is_playing is declared as local within the plugin. OTOH, newEvents is just created inside plugin.processBlock ... I wonder what its scope is and if it's visible within the "Is playing" parameter's "changed" method (which might be running in a different thread)

interstar avatar Sep 14 '21 23:09 interstar

@interstar good points! I updated code using your findings and now it actually works. Thanks a lot!

severak avatar Sep 16 '21 12:09 severak