Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 08-02-2019, 05:24 PM   #1
Birdy
Human being with feelings
 
Join Date: Oct 2013
Posts: 437
Default Is it possible to edit JSFX to make it NOT rely on buffer size for random values?

I have this plugin called "MIDI Velocity and Timing Humanizer".
I can't remember if it comes with Reaper or if I found it on this forum.
It's a great plugin, however, it relies on my buffer size in order to generate the random values.
Meaning it behaves differently every time I change my buffer size, making it inconsistent.
For example, when my buffer size is set to 128 samples, and the Timing Humanization is maxed to 10, I get around -3 to +3 ms of humanization, but increasing my buffer size will significantly increase these values as well.


Is it possible to edit this plugin so I will be able to just enter the timing humanization range in ms, regardless of the buffer size?
(And similarly with the velocity humanization)

Thank you!
Attached Images
File Type: jpg Capture.JPG (34.1 KB, 184 views)
Birdy is offline   Reply With Quote
Old 08-09-2019, 05:25 PM   #2
Birdy
Human being with feelings
 
Join Date: Oct 2013
Posts: 437
Default

bump!
Birdy is offline   Reply With Quote
Old 08-11-2019, 07:08 AM   #3
preferred.nomenclature
Human being with feelings
 
Join Date: Dec 2014
Posts: 371
Default

You're using this with Add 1 Beat Delay set to Off, yes? I'm not the author but I think there is a bug in the code.

Try changing line 44 from
Code:
max_pos = samplesblock - 1;
to
Code:
max_pos = bias_samples;
preferred.nomenclature is offline   Reply With Quote
Old 08-11-2019, 07:28 AM   #4
Birdy
Human being with feelings
 
Join Date: Oct 2013
Posts: 437
Default

Quote:
Originally Posted by preferred.nomenclature View Post
You're using this with Add 1 Beat Delay set to Off, yes? I'm not the author but I think there is a bug in the code.

Try changing line 44 from
Code:
max_pos = samplesblock - 1;
to
Code:
max_pos = bias_samples;
Yeah it’s set to “No”, just like in the screenshot, those are the exact settings I use.
Thank you for that info! I’ll try that and let you know if it works!
Birdy is offline   Reply With Quote
Old 08-11-2019, 07:34 AM   #5
preferred.nomenclature
Human being with feelings
 
Join Date: Dec 2014
Posts: 371
Default

Hmm, maybe I don't actually understand what the bias slider is supposed to do, but if you set it to a positive number and change that line of code, notes will get delayed by somewhere between zero and bias ms.

As the code was written, you'll never get a delay longer than however many samples are in your block when Add 1 Beat Delay is off.
preferred.nomenclature is offline   Reply With Quote
Old 08-28-2019, 08:02 AM   #6
Birdy
Human being with feelings
 
Join Date: Oct 2013
Posts: 437
Default

Quote:
Originally Posted by preferred.nomenclature View Post
Hmm, maybe I don't actually understand what the bias slider is supposed to do, but if you set it to a positive number and change that line of code, notes will get delayed by somewhere between zero and bias ms.

As the code was written, you'll never get a delay longer than however many samples are in your block when Add 1 Beat Delay is off.
Ok so I tried to change that line of code.
Bias still works like a normal bias (meaning the average random is the bias value rather than zero).
It does not work as a "max value".
Also it made the plugin apply timing humanization even when the timing humanization level is set to 0.
Birdy is offline   Reply With Quote
Old 08-31-2019, 06:11 AM   #7
preferred.nomenclature
Human being with feelings
 
Join Date: Dec 2014
Posts: 371
Default

Again, not sure exactly how this thing is supposed to work in the fist place, but try changing line 44 to
Code:
max_pos = max(samplesblock, (slider4 * srate / 1000));
preferred.nomenclature is offline   Reply With Quote
Old 09-07-2019, 07:40 AM   #8
Birdy
Human being with feelings
 
Join Date: Oct 2013
Posts: 437
Default

Quote:
Originally Posted by preferred.nomenclature View Post
Again, not sure exactly how this thing is supposed to work in the fist place, but try changing line 44 to
Code:
max_pos = max(samplesblock, (slider4 * srate / 1000));
Not sure what it did, but it didn't solve it, it's still dependent on the buffer size.
Birdy is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:02 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.