Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a monotonous behaviour to 'slowly approach if jump to big' #12

Closed
jackmau opened this issue Aug 4, 2020 · 7 comments
Closed

Add a monotonous behaviour to 'slowly approach if jump to big' #12

jackmau opened this issue Aug 4, 2020 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jackmau
Copy link

jackmau commented Aug 4, 2020

Hi,

As much as I am fun of soft-takeover, I don't like the way it works in Realearn, I'd much prefer a situation in which target always follows the same direction of the source and converges to the source value. For example, suppose in 7-bit context, using the same notation as in realearn y = 63 and x=0. While increasing x, I'd expect y to increase as well, so that the two meet up at 127 (or before, I have no strong feelings on the topic). If I reverse the input direction while I am half way (suppose y = 95 and x = 63), I'd expect a mirror behaviour, so that x and y would meet at 0 or before.

In EEL2, I would expressed it as (I have not tested thoroughly, and it supposes the controller doesn't skip values, but it's just to get an idea of what I mean):

y_old != x_old ? (
  x > x_old ? (y = y_old + (127-y_old)/(127-x_old)) :
                    (y = y_old - y_old/x_old)
) : (y = x)

Unfortunately in the current EEL control transformation I don't have any way to access x_old, so I had to write my own EEL feedbacking realearn input, but I'd prefer a native implementation

@helgoboss
Copy link
Owner

I see what you mean. Would make sense as an alternative soft-takeover variant. The reason why I didn't implement this already is exactly because of the fact that a mapping then needs to memorize the previous x value (basically to calculate a relative increment from two subsequent absolute values). But in the new ReaLearn a mode is allowed to have state, so memorizing the previous x value is easy now.

@helgoboss helgoboss added the enhancement New feature or request label Aug 9, 2020
@helgoboss helgoboss added the good first issue Good for newcomers label Jan 23, 2021
@helgoboss
Copy link
Owner

@jackmau This is actually a good first issue if you want to contribute because you don't even need to fully dive into ReaLearn in order to implement the basic logic. The Mode concept (including the jump logic) is implemented in a standalone crate named helgoboss-learn. It shouldn't be so hard to start there because this crate is very minimal, no REAPER, no FFI, no VST, no UI, very few dependencies, pretty straight-forward Rust. And it has lots of unit tests that illustrate how the structs are supposed to be used and which results are expected. You could get familiar with basic Rust development and then have a look at the code that handles jumps.

The integration into ReaLearn in terms of UI/persistence can happen after that.

@helgoboss
Copy link
Owner

@jackmau How is it going with Rust? :) Please let me know if you plan to work on this feature. If not, I might give it a try in some days.

@jackmau
Copy link
Author

jackmau commented Mar 1, 2021

@helgoboss slowly, and painfully, but I have started the Rust Book, my C++ (and core programming skills) are quite _Rust_ed. The code is pretty self-explanatory, the build process less so :) bu tthank you for having updated the guide on the build process, I had'nt seen that but that should simplify my life a lot

@libertyrock
Copy link

soft-take over is implemented now?

@helgoboss
Copy link
Owner

I will give it a shot tomorrow. I want to combine it with the more generic "Make relative" option.

@libertyrock
Copy link

it's better a virtual midi out device that will do this, no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants