Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Feature Requests

View Poll Results: Would you use this feature?
Yes, I would use this feature! 3 75.00%
No, this wouldn't be useful for me! 1 25.00%
Don't know! 0 0%
Voters: 4. You may not vote on this poll

Reply
 
Thread Tools Display Modes
Old 12-11-2018, 12:09 PM   #1
henrys_cat
Human being with feelings
 
henrys_cat's Avatar
 
Join Date: Jun 2007
Posts: 27
Default Simple sample randomization in items

Description:
I work with game audio and often want to try out layering multiple samples layers in Reaper where I will have lots of sample variations in each layer - e.g. footsteps where you might have a shoe element and a surface element that you want to play in sync.

I'd like it if I could effectively drop in multiple samples in a single item and have the item randomize the sample it plays when it's hit.

I can currently achieve this using multiple takes and randomly selecting one each time I play back the audio (and could write a script to do this), but it's a little messy, plus samples of different lengths cause issues (turning off Loop source solves, but needs to be done a lot) and it wouldn't stop the same samples being selected repeatedly if used multiple times in the same project.

I've also created a random sampler driven by midi using Reaktor, but it feels like overkill for my needs, plus setting up the sample map is somewhat convoluted. Additionally you need a track for each sample type.

Potentially having an option on media items that allows the user to randomize the selected take as the item is played back would work here, but for this to be ideal, the user should be able to have multiple instances of the item and it would choose a different variant for each so the user doesn't hear the same sample back to back - potentially adding options for sequentially selecting samples versus shuffling would be great too.

Benefit:
This feature would allow simple sample randomization which can be really helpful for sound design uses when you want to make sure a series of assets play nicely together.

Reason:
This would improve my workflows in Reaper significantly, and I think would be an extremely helpful addition for anyone developing assets for use with games.

Implementation Suggestion:
Ideally I'd love it if this was a simple extension of media items, but I'd be happy with any implementation that makes this easier (and equally, if I'm being an idiot and this already exists, then I'd love for someone to tell me how to do it!)
henrys_cat is offline   Reply With Quote
Old 12-11-2018, 01:23 PM   #2
Masi
Human being with feelings
 
Join Date: Sep 2015
Posts: 690
Default

I'm not sure if you can set the active take at playback time, but I'm sure you can script it.

Here's a draft on how to set a random take for all selected items:

* Get the number of selected media items
* Iterate of them and do the following for each
- * Get the number of takes
- * Pick a suitable random numer
- * Set the take with the chosen number as active

Masi

https://www.reaper.fm/sdk/reascript/...ctedMediaItems
https://www.reaper.fm/sdk/reascript/...ectedMediaItem
https://www.reaper.fm/sdk/reascript/...tml#CountTakes
https://www.reaper.fm/sdk/reascript/...l#GetMediaItem
https://www.reaper.fm/sdk/reascript/...iaItemSelected
Masi is offline   Reply With Quote
Old 12-12-2018, 08:55 AM   #3
henrys_cat
Human being with feelings
 
henrys_cat's Avatar
 
Join Date: Jun 2007
Posts: 27
Default

Quote:
Originally Posted by Masi View Post
I'm not sure if you can set the active take at playback time, but I'm sure you can script it.

Here's a draft on how to set a random take for all selected items:

* Get the number of selected media items
* Iterate of them and do the following for each
- * Get the number of takes
- * Pick a suitable random numer
- * Set the take with the chosen number as active

Yeah, I could definitely do it like that fairly easily - I've written a few scripts to automate processes like this, but avoiding dupes would be tricky if you have multiple items with the same contents (I'm sure it's doable, but would probably take a lot of effort to implement well).
henrys_cat is offline   Reply With Quote
Old 12-13-2018, 01:33 AM   #4
Masi
Human being with feelings
 
Join Date: Sep 2015
Posts: 690
Default

Quote:
Originally Posted by henrys_cat View Post
but avoiding dupes would be tricky if you have multiple items with the same contents (I'm sure it's doable, but would probably take a lot of effort to implement well).
I wouldn't expect any algortithm that uses randomisation to implement duplication avoidance.

I guess there could also be different approaches like "not twice in a row" or "play only once".

I think the feature could also be employed for percussion samples.

Masi
Masi is offline   Reply With Quote
Old 12-13-2018, 06:41 AM   #5
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,773
Default

Such very specialized stuff should not be in the main program, but done by a script.

-Michael
mschnell is offline   Reply With Quote
Old 12-13-2018, 07:59 AM   #6
Masi
Human being with feelings
 
Join Date: Sep 2015
Posts: 690
Default

Quote:
Originally Posted by mschnell View Post
Such very specialized stuff should not be in the main program, but done by a script.
Thinking about it again, the proposal is actually a workaround for a multi-sample sampler with round-robin. Folks have been asking for that quite along time.

Masi
Masi is offline   Reply With Quote
Old 09-11-2019, 04:22 AM   #7
henrys_cat
Human being with feelings
 
henrys_cat's Avatar
 
Join Date: Jun 2007
Posts: 27
Default

I've been wishing for this again this week - I think for a lot of post / game audio users dealing with creating multiple variations of a sample it would be extremely useful.

To update, I can get most of the way there now by imploding a set of imported samples into a multiple-take item, turning off looping, then running a script that randomizes all of the selected takes in the project, however, this requires more setup than I'd like, and doesn't deal with round-robining (it could, but I think that that my Lua skills would be tested, and it would *not* be robust)

A while back I did try this via a sampler - I wrote a Reaktor sampler style plugin to do this, but it required a track-per-sample, fx setup, and midi items to trigger the sample - pretty clunky.
henrys_cat is offline   Reply With Quote
Old 09-11-2019, 01:34 PM   #8
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,773
Default

Quote:
Originally Posted by Masi View Post
a multi-sample sampler with round-robin.
Kontakt, or a bunch of others would apply.

-Michael
mschnell is offline   Reply With Quote
Old 03-05-2021, 04:16 AM   #9
andrescoca
Human being with feelings
 
andrescoca's Avatar
 
Join Date: Jul 2020
Location: Netherlands
Posts: 25
Default

Hi there!

What solutions did you find for this problem? I am thinking about something like this too.

Also, Ableton Live only, but check this out: https://youtu.be/pih193lRiX8

Cheers
__________________
Andres Coca
Sound Designer
www.andrescoca.com
andrescoca is offline   Reply With Quote
Old 03-08-2021, 03:28 AM   #10
henrys_cat
Human being with feelings
 
henrys_cat's Avatar
 
Join Date: Jun 2007
Posts: 27
Default

Hey - I ended up writing two scripts for this.

- The first implodes selected items into a single item with multiple takes
- The second selects a random take from selected containers, avoiding previously selected takes

It's still a bit clunky, but it does the job when I need it - it was actually a pretty useful tutorial on writing a more complex script than I'd previously attempted in lua.
henrys_cat 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 04:39 AM.


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