Creating Pattern FX Commands?

Hello everyone! I’ve just gotten into using renoise recently and I really like the program. In particular, I’ve been really getting into creating custom instrument samples so that I can take advantage of the numerous sample commands that can be accessed from the pattern editor like vibrato/pitch slides/etc.

That said, there are some commands that I’d like to be able to do more than they currently can. I’m no stranger to programming (I’ve made a few basic kontakt instruments of my own that I don’t use anymore), so I thought I’d dive into the tools to see what I could do.

My question is: Can I create my own custom effect that can be accessed from the pattern editor (eg. -Uxx, -Axy, etc.)? Right now, my main goal is to create a Fine Tune command that would function similarly to -Uxx/-Dxx, except that it would be 1/100 of a semitone instead of 1/16. The reasoning, if you’re curious, is that I like messing around with micro-tuning stuff and the current pitch commands don’t give the kind of control I want. I have some more ideas I’d like to try, like different vibrato types, or enhancing the volume control, but I wanted to see if this was even possible first.

I have looked through the introduction to renoise scripting as well as the entire renoise.song document to see if I could find anything that would let me do this, but no luck. I know I can’t modify any existing renoise things, but everything I read seemed to suggest that you can do most anything else. Does adding an effect command count as modifying existing renoise stuff (making it impossible to do)? Or did I just miss how to do it when I was searching through things?

nope, that’s not a thing.

and I am with you 100% on a fine tune command. that would be super useful

I’ve once requested a finetune effect, but it didn’t happen. My best shot (non lua) would be to bind a macro to a device in the pitch envelope. Then you are able to control this macro with device effect commands. The drawback is that pitch value will be set to absolutes, and would not function in the oldschool incremental way.

you can use the formula device to define kind of commands (i.e. extract the two hex digits from the parameter value), and map the formula device to a macro parameter (i.e. pitch macro). you cannot use the standard sample comands, only what dsp devices or macros or modulation could do with parameter sliders. the trick is just to warp/process one or two parameters with logic, so it works like a command usually would.

this is something for programmers though, and every solution needs its own formula device. it is advanced usage of renoise.

making an exact finetuner or kind of hi res note glide with defined behaviour to pattern commands is possible this way. but only on a level of per-tick timing resolution, I think. I can try to demonstrate it tonight.

Ok, I read again. You wish to microtune via a fx command. I think the main problem is, it will only work monophonic or for all playing notes of that instrument at once. Because the pitch modulation via a macro affects all currently playing notes.

You could try to sacrifice pitch modulation and velocity handling for using velocity to create different tunings on a per note level in polyphony. But then you couldn’t use the formula device to further define the behaviour of each value:

You could use the velocity with a velocity tracker in the pitch modulation graph to offset the note’s pitch in 0x7f = +/- 63 steps. A calculator and manual/keyboard entry of pitch range and operands and the values in the velocity tracker could help to make the tunings exact.

maybe there’s other methods of per-note-modulation that will leave velocity intact, like (ab)using the stepper device in combination with others?

Renoise itself has no way to script how pattern fx commands act on the sample, other than what modulation, dsp, and the formula device can bring. You could offline process pattern data with a lua tool, and then synthesize an instrument with the right tunings, but this again wouldn’t allow realtime preview or total freeform tuning.

You could try to sacrifice pitch modulation and velocity handling for using velocity to create different tunings on a per note level in polyphony.

Going into the keyzone, disabling the velocity tracking and then adding a modulation device (velocity tracker)which manipulates pitch?Good idea.

A similar idea would be sacrifice the modulation envelope and using the Exx command to set the pitch. Should work on all time-based modulation devices.

Nice idea, the “0Exx” command can be used to bring back velocity/volume per note after abusing the vel tracker for microtuning.

Microtuning with velocity also seems to “work”, you need a velocity tracker in “scale” mode set to min “14” max “114”, and an operand multiplying it by 0.5, and then set the pitch envelope range to “1” (0.5 won’t work). You can then scale each note with the velocity up or down by 50 cent in 1 cent steps, from velocity “0x0D” which is 14 up to “0x72” which is 114, and “0x40” is the neutral middle position. Shitty numbers, but better than nothing. Maybe only scaling upwards by 100 (hex 0x00…0x64) steps is the more comfortable way to tune exact to cents, or you live with a 1/127 value stepping and use the hex like it is supposed to.