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

Reply
 
Thread Tools Display Modes
Old 01-01-2017, 07:42 PM   #1
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 1,030
Default Revised MIDI Velocity and Timing Humanizer (repeat note fix)

I know you can humanize notes within Reaper's MIDI editor, but where I can, I prefer to use Schwa's JSFX. Using the JSFX in lieu of the built in editor has a couple of features that I like:

1. I can leave my MIDI data pretty rigid in the editor (which makes it easier to read, filter, etc.) and still get a humanized effect.

2. I can automate the controls to create more variety in playback throughout the project.

3. I like the idea that my playback will never quite be the same (though some folks probably dislike that notion).

The problem I experienced with the native Reaper JSFX is that repeated notes would sometimes cut off earlier. The cause is that the randomized start times of notes would overlap the end times of previously played notes. The effect is that the note-off message for the first note might accidentally cutoff the second note if they were the same pitch.

You can see the impact of this in the rendered MIDI track below:


To demonstrate, I created a whole bunch of repeated 16th notes and quarter notes at C4 and A3 respectively. You can see in the arrange view that the repeating notes frequently get cutoff soon after they sound even though they look more or less fine in the MIDI editor.

My solution was to:
1: Include logic that sent a note-off message if a note of the same pitch was sent before the end of the prior pitch.

2: Sort the MIDI messages after they were randomized to ensure the process order matched the playback order.

You can see the result below:


You can still see some shifted start and end times due to humanize effect, but there is no overlap of notes of the same pitch. Thus, the MIDI in the arrange view looks very similar to the original (that is, no notes with abrupt note-off).

You can download my revision here:
https://stash.reaper.fm/29365/midi_humanizer_pcartwright


Feel free to leave comments or questions.
pcartwright is offline   Reply With Quote
Old 01-02-2017, 04:31 AM   #2
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,218
Default

Thanks! I'll try it out

This method is great too as you can always simply "render item to new take" to get a "frozen" version of the effect for those that like this effect but want to edit the randomness
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 01-02-2017, 09:03 AM   #3
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 1,030
Default

I should add that the note-off velocity is 127 in instances where there is a note overlap. I haven't sorted out a way to pull in the actual note-off velocity yet, but I'm not sure it would make much of a difference.
pcartwright is offline   Reply With Quote
Old 01-02-2017, 06:09 PM   #4
teniente powell
Human being with feelings
 
teniente powell's Avatar
 
Join Date: Oct 2016
Location: Spain
Posts: 324
Default

Nice. Thanks for that. Very useful in ostinato strings.
teniente powell 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 11:38 AM.


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