Last updated:

REAPER Scripts : Take Properties Randomization



Working on realistic composite audio ambiances is a difficult process.

Recently, I had to do a science-fiction clones factory ambiance. A deep rumble was the base sound, but I had to manually add a lot of other sounds to create life, dynamism and interest. Motors, bips, bloups, air pressure, machinery… I added a lot of things to make it work. There is more than 230 audio clips for 5 minutes.

The fact is… I didn’t have a lot of source audio files. Actually, I couldn’t use 50 different motors sounds, or the ambiances would be like a sound pack demo. I had to choose carefully few motors that I liked… And I actually finished with less than 10 motors sounds, each from 1 to 4 seconds, which I needed to spread over the stereo to create a sense of space.

Ambience’s tracks of the episode 07 of my project Alien 2347, before any randomization. All of this need some randomization, essentially on pan.

You guessed it : copy pasting is would not be good enough to make a realistic ambiance.

As in graphic art, motion design (especially with particles system), and in video games audio environment, I thought about randomization : add random modifications to few clips to make the listener think that they are listen to many different sounds, coming from all over the stereo. What we could modulated : pan, playrate (speed), pitch.

The basic way to do it is to do it manually. But this is a very long process. Think about it, all this sound, with 3 parameters to modulate… And no real control about the distribution.

Few DAWs allow randomization process. They are more and more centered on music composition workflow, where randomization is pretty rare. Sure some samplers have randomization functionalities, but I wanted full control on the randomization result, with specific distributions. I don’t know any sampler which allows that.  Moreover, I wanted, and needed, to keep the editing functionalities of my DAW… I just needed to add a bit of random to it.

So, I write a detailed feature request about it on REAPER forum.

And here is when spk77 came to play.

Our Custom EEL Take Properties Randomization Scripts

This passionated coder (several pages of scripts on REAPER Stash !!) generously decided to help me on this. And he did it so well that he overpassed all my hopes. His scripts help me to understand the basic rules of EEL programming (based on C language) and scripting on REAPER via the API. I’m not ready to develop script for REAPER alone but I have definitely a more precise understanding of how this works, and can tweak some custom actions if needed.

I will not detailed all our reflection process,  but I invite you to read our thread on the REAPER forum if you are interested. Several useful custom scripts (REAPER actions), with or without GUI, with or without normal distribution approximation, and other great things, resulted from our discussion :

  • Create take pan envelope from take pan
  • Create take pitch envelope (random points – with GUI)
  • Pan active takes randomly (normal distribution)
  • Pan active takes randomly (normal distribution, one seed)
  • Pan active takes randomly (normal distribution, with GUI)
  • Pan active takes randomly (normal distribution, with GUI, one seed)
  • Randomize take playback rate
  • Randomize take playback rate (normal distribution)
  • Reset take pan to center

As you can see, some of these scripts have a GUI ! This is another brilliant work of spk77, who used his famous EEL Simple Slider Class for some of these actions.

Pan active takes randomly (normal distribution – with GUI), by spk77. Other randomization script are based on this.

Go Further

The scripts that we (and mostly he for the hard work on code) developed are essentially about panoramization which was our main playground but they can easily be tweaked for other purpose if needed, for example to have a variation with or without GUI for any of the destination parameters, with our without normal distribution, or to have the same seed for all the selected items.

Some feature could also be implemented :

  • Re-click on Apply Button a second time use the same seed but with a different a item distribution.
  • Multiple influence points on normal distribution
  • Negative influence points on normal distribution
  • Non-symmetrical distribution around the mean point
  • Randomize pitch correction on/off if there is time stretching

Simples tricks for some of this request :

  • Randomize items selection (see the SWS action about that) and split and put the selected items on several tracks. Perfom the action on each track, with a different mean number if it involved randomization. More info => #20

Volume randomization is far more difficult than expected, because of its logarithmic scale, but we can also also think about it. For the moment, I still use randomisation on track via LFO in random mod.


You can download the scripts on my GitHub directory dedicated to REAPER custom scripts ! To use them, open the Action Panel and import the script into REAPER ! 🙂

If you want to help us develop more variations of these scripts, feel free to create reports, pull requests and forks.

Thank you again very much to spk77 for making all of this possible ! (you rock !!)
GIF illustration in the article : spk77