Humanizing MIDI

So I’m looking for a way to add humanization - defined as, in descending order

  • maximum emphasis on the 1
  • emphasis on the beats that are played
  • de-emphasizing the ands of all beats
  • further de-emphasizing the e’s and a’s of all the beats played

Doing all that with some degree of randomization. On the album I just finished this was the most time consuming step and it would be nice to have a way of automating at least some of that. Is there a way with the tools in version 6.5? If those tools aren’t there, can that be programmed with a LUA script?

1 Like

i suppose, that the „humanization“ you describe could be scripted with lua (but I’m not yet able to help doing this). An other approach could be to create a (muted) synth-track which loudness follows your desires and to copy its loudness to your tracks via compressors…

But i doubt that the „humanization“ you describe would sound „human“… i suppose you’d need changing patterns of emphasis.

You’re right, it won’t sound completely human just more human than straight velocity 64 notes do.

I’m looking into scripting it with lua but it may take me a while to get to because I’m pretty busy. After I script it, where do I post it to get it uploaded to the next ardour release?

1 Like

If you have pads or a midi keyboard, you could track it then adjust the alignment or velocity issues. I find it faster than programming everything, with better results.

you could submit a pull request at or at when you became a core Ardour developer…

See #29 at

Patches are to be submitted as unified diff (e.g. diff -Naur or git diff, either to the bug-tracker at or via github pull-request (git pulling from similar services with public remote repositories is also fine).

Just to clarify: nobody gets to submit PR’s via

By contrast anyone can submit PR’s via github

Maybe try playing the notes yourself? :roll_eyes:

NOVEL! I mean, real musicianship?!

Really though, we’re not talking like a melody here, we’re talking percussion and drum parts. Difficult to program 3-4 parts at once using pads, even more difficult when using a keyboard. I found it to be simpler to program each note rather than edit an imperfect performance.

It depends. Some of the kids I used to teach in London were quite amazing at playing drums via a keyboard. It’s certainly the route I used to take as well although I wasn’t half as good. I’d follow up by de-humanizing a little after the fact. I find it better that way around versus expecting a MIDI editor to humanize in a truly human-like fashion.

Sounds like I better put in some practice then with writing a script and my playing. Thanks so much for the replies everybody

1 Like

Update on this, I’m going to have a few weeks to dive in here soon and want to get my ducks in a row. Where do I find the existing lua scripts for Ardour within both windows and Linux, and does anyone have a good set of LUA learning guides?

In your Ardour installation directory under share/scripts which for the official binary would be /opt/Ardour-6.5.0/share/scripts/ on Linux. I assume the same on Windows but under “Program Files”.

As for learning, I’m looking myself and so far have found but the paperback seems more up-to-date. There are also videos on YouTube like but until I start digging in I have no real sense of quality. I’m pretty sure the book is a good bet.

I found them - it’s under program files/ardour6/share/ardour6/scripts

As far as learning LUA … whoeee this is a bit above my programming knowledge right now but you know, that’s where learning really happens. I’m reading through the 5.0 edition of the book you posted (it’s free on there). Here’s to building professional skills!

What midi script that’s in the ardour files would be a good example script to start with?

I’d recommend you pick something that you want to use as is or want to tweak for your own purposes. It’s at least a jumping off point before trying to create something from scratch.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.