Help, return a function when a note play in pattern editor

I have been seeing that it is relatively simple to execute commands with the LUA API to write or insert this and that, applying from a button, checkbox, valuebox, etc. But what happens when I want Renoise to return functions in certain cases, when reproducing what is happening in the song?

A concrete example:

When playing the song, the pattern editor reproduces a C-4 note on the first line of the first note column , in track 01 (a concrete position).

This note is “C-4”, at the time of starting the notefor return a specific function (a specific code for this), for example:

  • That a button changes color with vb.views[‘xxx’].color
  • The name of the note appears in a text box, or the desired text.
  • Things like that…

If the note is D # 2, you must return another function, etc…

If possible with a note, I suppose it will also work with specific parameters, instrument, volume, panning, delay, effects…

If this were possible, I could do many things with the code.I’ve been studying the API, but I have not been able to go this way.

Is this approach possible with the LUA API? Any way to do it with a simple example?

Thanks!

Note: It happens the same with OSC Server.I do not get a code to return X function when OSC Server receives any message. I guess with OSC Server it is not possible, but perhaps the example of the pattern editor and a note is possible…

Nope, not possible ATM. There are no notifications for notes or song position.

Although you can monitor playback yourself it would be limited to the usual idle loop notification frequency (usually 10-20 per second, nowhere near the precision of the playback engine).
I have done this for a few tools to provide a rough visual feedback as notes are playing.

Nope, not possible ATM. There are no notifications for notes or song position.

Although you can monitor playback yourself it would be limited to the usual idle loop notification frequency (usually 10-20 per second, nowhere near the precision of the playback engine).
I have done this for a few tools to provide a rough visual feedback as notes are playing.

Wow, I seem to be navigating around the limitations of the API.A pity that there is no way to pick up a signal that the note is triggered, in order to launch a particular function.Then there is no way to react a virtual piano (for example), as the notes are played, or a sample is played.

If a sample is reproduced, there is no way to return a function?Listen! This sample is ringing, do this…

Well… Just for arguments sake, it’s possible to do some pretty cool hacks like this by using dsp parameter notifiers. But I won’t endorse it (or help you with the details), and it’s only a solution to be used if it is really justified, clear and unobtrusive to the user.

The hackish approach, if you want to get a reaction time faster than the idle-notifier, would be to hook up a notifier to an inserted keytracker device (or rather to an arbritrary output of a keytracker device). This would only provide you with the note values, but would do it pretty instantly. This approach can be seen in this experiment:

Click to view contents

https://www.youtube.com/watch?v=brBhjArLsEo

For fetching effect values you would have to use an idle-notifier, though. I’d go with the idle notifier approach for fetching both note values and effect values, and see if it’s good/fast enough. Fetch the current line (fastest is lines_in_range()) on every play_pos change and interpret the data as you wish. Good luck :slight_smile:

Well… Just for arguments sake, it’s possible to do some pretty cool hacks like this by using dsp parameter notifiers. But I won’t endorse it (or help you with the details), and it’s only a solution to be used if it is really justified, clear and unobtrusive to the user.

The hackish approach, if you want to get a reaction time faster than the idle-notifier, would be to hook up a notifier to an inserted keytracker device (or rather to an arbritrary output of a keytracker device). This would only provide you with the note values, but would do it pretty instantly. This approach can be seen in this experiment:

Click to view contents

https://www.youtube.com/watch?v=brBhjArLsEo

For fetching effect values you would have to use an idle-notifier, though. I’d go with the idle notifier approach for fetching both note values and effect values, and see if it’s good/fast enough. Fetch the current line (fastest is lines_in_range()) on every play_pos change and interpret the data as you wish. Good luck :slight_smile:

^^ ^^ ^^ ^^ ^^ ^^ Renoise in disco mode!!!

Maybe i’ll do some research, but if the API does not support or have no specific command to solve this topic,I’d rather not do experiments, at least to place them inside a tool…Maybe to test codes and see how far things can be done like this or similar.

At first, I believed that existed a command in Renoise.Song.API.lua as this:

song.patterns.tracks.lines.note_columns.note_play = range 0 - 127 (is a concrete position)

if return “0” is C-0 (note played), if return “127” is B-9, “128” is Note-OFF (stop note),or something like that…

But, I’m surprised by the video.I like it! :clownstep: :clownstep: :clownstep: (the video, music is another issue).