Old 04-11-2019, 03:46 PM   #1
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default Render Loop v1.0pre3 (2019-04-19)

Tool to render seamless loops. (work in progress)

It uses latest API rendering settings functions from v5.974 to generate the tail, and then render a second pass with the tail to create seamless loops. Or you can just create the tail in place for further editing if necessary.

Let me know if you would find it useful. I want it to add region rendering support, for now it works with time selection.


Last edited by heda; 04-18-2019 at 12:49 PM.
heda is offline   Reply With Quote
Old 04-12-2019, 01:53 AM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

This looks useful ! Game audio will love it :P
X-Raym is offline   Reply With Quote
Old 04-12-2019, 02:09 AM   #3
reapero
Human being with feelings
 
Join Date: Aug 2011
Posts: 517
Default

Thanks Heda! Lokking cool

In the clip you rendered in 2 passes. Would it be possible to just render one time (or at least cheat the user to think it was done in one time)?

So you would first select the amount of tail (in secs) you need in the settings and then select the looping portion with the time region, then export as a loop.

I am mostly thinking the case of making seamless looping musics, where the tail isnt actually needed anywhere else but at the beginning of the track itself
reapero is offline   Reply With Quote
Old 04-12-2019, 03:53 AM   #4
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

Quote:
Originally Posted by reapero View Post
Thanks Heda! Lokking cool

In the clip you rendered in 2 passes. Would it be possible to just render one time (or at least cheat the user to think it was done in one time)?

So you would first select the amount of tail (in secs) you need in the settings and then select the looping portion with the time region, then export as a loop.

I am mostly thinking the case of making seamless looping musics, where the tail isnt actually needed anywhere else but at the beginning of the track itself
I am making an option to define the number of seconds to render(from the end loop point) on the first pass to make the tail. And option to define the length of the tail too. Right now both are as the time selection which will work without thinking too much, but it can be optimized if rendering long loops.
heda is offline   Reply With Quote
Old 04-12-2019, 07:09 AM   #5
Kabraxis
Human being with feelings
 
Kabraxis's Avatar
 
Join Date: Feb 2015
Location: Turkey
Posts: 200
Default

Quote:
Originally Posted by X-Raym View Post
This looks useful ! Game audio will love it :P
This is the only feature I'm missing after migrating from FL Studio. I love it!
Kabraxis is offline   Reply With Quote
Old 04-12-2019, 10:23 AM   #6
Vagelis
Human being with feelings
 
Vagelis's Avatar
 
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 3,797
Default

I'd like to have that, seems very useful!
Vagelis is online now   Reply With Quote
Old 04-15-2019, 07:50 AM   #7
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

it turns out this is not as easy to automate... I am having problems with this method, because the cut on the samples may result in clicking sound due to not cutting on zero cross. The solution is to create tiny fade out in the first pass and fade in in the tail but it can be audible. Another option could be stretching the closest zero crossing to the end of the loop, for each channel. I need to think about it more.
heda is offline   Reply With Quote
Old 04-15-2019, 08:27 AM   #8
Ozman
Human being with feelings
 
Join Date: Feb 2015
Posts: 753
Default

It will be nice when this type of loop editing can be easily done in Reaper, with loop regions added to the rendered file, to drag into samplers for smoothly sustaining samples.

Last edited by Ozman; 04-16-2019 at 05:48 AM.
Ozman is offline   Reply With Quote
Old 04-16-2019, 05:41 AM   #9
todd_r
Human being with feelings
 
todd_r's Avatar
 
Join Date: Nov 2006
Posts: 855
Default

Brilliant
todd_r is online now   Reply With Quote
Old 04-16-2019, 07:57 AM   #10
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Quote:
Originally Posted by heda View Post
Another option could be stretching the closest zero crossing to the end of the loop, for each channel. I need to think about it more.
Or to extend time selection to closest zero crossing points. The end result will not match initial time selection length defined by user, but its not what is important. What is important is having seemless audio loop :P
X-Raym is offline   Reply With Quote
Old 04-16-2019, 08:26 AM   #11
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

@X-Raym
Time selection is important when we are doing music loops though. I'm having a bit of success with tiny fades. I'll make the fades adjustable.
edit:.. I think I got it now

Last edited by heda; 04-16-2019 at 12:47 PM.
heda is offline   Reply With Quote
Old 04-16-2019, 12:02 PM   #12
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default



released initial version for VIP members for testing. Let me know if you find any problem.


* v1.0pre1 (2019-04-16)
+ Master Output Time selection support.
+ Initial pre-release.
heda is offline   Reply With Quote
Old 04-17-2019, 02:04 AM   #13
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

Ooh. This looks very cool!

I'll give it a try later!

Two suggestions but these are based on not trying it yet

1. Option to not have that fade in or out. The reason is that when Equing something that is already a sample accurate loop, the eq slants the frequency response in time (due to phase distortion). This means you get holes in frequency response unless you fill them with a second pass. Be good to have unstick option for fade in to help with that.

2. Is it worth making the first pass (where you get the tail) to always be 32bit float? That way there's no quality loss. It's not a big issue though, just thought it might as well be.
__________________
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 04-17-2019, 03:20 AM   #14
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

Quote:
Originally Posted by musicbynumbers View Post
Ooh. This looks very cool!

I'll give it a try later!

Two suggestions but these are based on not trying it yet

1. Option to not have that fade in or out. The reason is that when Equing something that is already a sample accurate loop, the eq slants the frequency response in time (due to phase distortion). This means you get holes in frequency response unless you fill them with a second pass. Be good to have unstick option for fade in to help with that.

2. Is it worth making the first pass (where you get the tail) to always be 32bit float? That way there's no quality loss. It's not a big issue though, just thought it might as well be.
1. right now it has no fades... I'm not sure about them. Maybe if a loop needs them, it would be better to manually add them, so it would be a first button to create the first pass and position the tail and then manually make fades or stretch markers and then a second button to render the second pass. Maybe that would be ok for now.

2. totally agree. first pass should be 32 bit and at project sample rate. Thanks!
heda is offline   Reply With Quote
Old 04-17-2019, 08:38 AM   #15
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

Quote:
Originally Posted by heda View Post
1. right now it has no fades... I'm not sure about them. Maybe if a loop needs them, it would be better to manually add them, so it would be a first button to create the first pass and position the tail and then manually make fades or stretch markers and then a second button to render the second pass. Maybe that would be ok for now.

2. totally agree. first pass should be 32 bit and at project sample rate. Thanks!
Will give the fade thing a go when I'm back at the studio.
__________________
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 04-17-2019, 01:40 PM   #16
lowellben
Human being with feelings
 
lowellben's Avatar
 
Join Date: Aug 2010
Location: They put me in a home.
Posts: 3,432
Default

We can't try this out unless we're a VIP and pay you? Is that correct? I can't seem to download this script and test it.
__________________
47.8% of statistics are made up.
lowellben is offline   Reply With Quote
Old 04-17-2019, 03:06 PM   #17
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

Quote:
Originally Posted by lowellben View Post
We can't try this out unless we're a VIP and pay you? Is that correct? I can't seem to download this script and test it.
that is correct. VIP have access to pre-releases. This script is just starting to be tested... It is a work in progress. It is a bit like the Patreon model, where patrons have some advantages for supporting their artists/projects, but without patreon. I started patreon site first years ago, but they were taking a percentage of the donations for not really helping to promote or provide significant service.
heda is offline   Reply With Quote
Old 04-17-2019, 04:53 PM   #18
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default v1.0pre2 (2019-04-18)

update to render first pass with project sample rate and 64 bit.
REAPER v5.974+dev0417 is needed for this, because there was a bug that Justin fixed almost instantly. awesome support.

* v1.0pre2 (2019-04-18)
# fix: first pass rendered in 64 bit
# fix: first pass rendered in project sample rate
heda is offline   Reply With Quote
Old 04-18-2019, 03:45 AM   #19
todd_r
Human being with feelings
 
todd_r's Avatar
 
Join Date: Nov 2006
Posts: 855
Default

I gave it a try and it froze, I'm on v5.974 do I need v5.974+dev0417 for it to function at all?
todd_r is online now   Reply With Quote
Old 04-18-2019, 04:00 AM   #20
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

Quote:
Originally Posted by todd_r View Post
I gave it a try and it froze, I'm on v5.974 do I need v5.974+dev0417 for it to function at all?
Maybe yes... I haven't tested on 5.974
But very strange. Why would it freeze... I will test.
heda is offline   Reply With Quote
Old 04-18-2019, 04:28 AM   #21
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

tested 5.974, and it doesn't freeze. But it doesn't work well changing the sample rate. It really needs the latest dev update.
heda is offline   Reply With Quote
Old 04-18-2019, 04:39 AM   #22
todd_r
Human being with feelings
 
todd_r's Avatar
 
Join Date: Nov 2006
Posts: 855
Default

Quote:
Originally Posted by heda View Post
tested 5.974, and it doesn't freeze. But it doesn't work well changing the sample rate. It really needs the latest dev update.
Ok, I'm not able to test right now, but will again later...
todd_r is online now   Reply With Quote
Old 04-18-2019, 04:53 AM   #23
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Did you find a solution for the clicking problem at the edges of the loop without fadein/out?
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 04-18-2019, 05:25 AM   #24
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

not yet... I am adding the fades as an option in next update. Tiny fades are good many times. The only way I can think of to do it without fades is to do small stretch markers at the end and start. But I am not sure if that would work. If I put a stretch marker at closest zero crossing, and stretch it to the end of the item, would it render at zero at the edge of the item? I still need to test that.
heda is offline   Reply With Quote
Old 04-18-2019, 05:37 AM   #25
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

What about the following:
When you have rendered the first pass, you add the rendered file into the a project.
After that, you add the loop after the item as well, but move it toward the beginning by some samples, creating a crossfade.
This crossfade time must be cut away from the beginning of the first imported item.

That crossfade should do the trick and is, how I create seamless loops by hand.


To find the perfect ending of the crossfade-length, you can search for a zero-crossing.

Then, you render that item out again, including the crossfades at the end.

I have no idea, whether such a crossfade would be neccessary for the beginning as well.


Does my description make sense somehow?
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 04-18-2019, 09:31 AM   #26
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

The fades issue depends on how the resulting loop is going to be played/used. If the file is going to be used outside REAPER like in a game for example, then we will always need a tiny fade in at the start. And this makes a second fade out at the end necessary. Unless the game audio engine takes care of all this, which I doubt.
If we are going to use it in REAPER we could render without fades and insert the loop file in a track and loop it until needed. No fades necessary between loops but then we need to add one tiny fade in at the beginning of the item and fadeout at the end in this imported item.
So adding the fades or not will be a user choice.
heda is offline   Reply With Quote
Old 04-18-2019, 12:49 PM   #27
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default v1.0pre3 (2019-04-19)

* v1.0pre3 (2019-04-19)
+ Tiny fades option on second pass


update with tiny fades... on my small testing it works quite well.

heda is offline   Reply With Quote
Old 08-06-2019, 01:35 AM   #28
winbe
Human being with feelings
 
Join Date: May 2006
Posts: 1,361
Default

Hello,
funny as I just stumbled upon your script after having spent 1 hour last night explaining to another musician how to create seamless loops.

I use a good old basic method, copy paste and then cut and rearrange, totally seamless.
I tried your script as it would be a huge time saver, but I always have some clics, so for now I'll still use the manual method I guess

EDIT: To create a seamless loop, I copy my item, so now I have two items. My time selection is now double of the final one I want, but I render it. Now I cut the middle portion, and I have a perfect loop. For it to be really what I want, I have to cut it in half and swap the two parts.

I just tried it again, with a tricky one, just two notes of piano, with a huge reverb. I tried different settings with your script, and I always have a click, or the reverb tail is not natural. Using my manual technique it loops perfectly. I now just have to find the time/skills to create a script that does just that: copy the item after itself, render the two items as a wave, and cut it/rearrange it.

EDIT2: I tried your method, manually, to see if it can work in my extreme example, that is, just using the tail... it should/could work in theory... but with my example, either I get a slight click at the beginning... or an unatural cut of the reverb if I apply even a tiny fade in.

In conclusion, I'll stick to the good old method of copying the item at the end of itself.. !
__________________
Cedric Simon aka FrozenjaZz
Fresh beats - www.frozenjazz.com

Last edited by winbe; 08-06-2019 at 02:01 AM.
winbe is offline   Reply With Quote
Old 08-06-2019, 07:54 AM   #29
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

@winbe

I'm currently designing a function for my Ultraschall-API for loop-rendering and maybe you're interested in giving more details in my Ultraschall-API-thread(link in my signature), as the more I know about that, the better I can try making that work.

Your post is already quite enlightning.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 08-06-2019, 11:18 AM   #30
reapero
Human being with feelings
 
Join Date: Aug 2011
Posts: 517
Default

I can give you some input as well, mespotine
reapero is offline   Reply With Quote
Old 08-07-2019, 06:16 PM   #31
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Quote:
Originally Posted by reapero View Post
I can give you some input as well, mespotine
The more, the better
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 08-09-2019, 06:20 AM   #32
Travesty
Human being with feelings
 
Travesty's Avatar
 
Join Date: Nov 2014
Posts: 798
Default

Quote:
Originally Posted by heda View Post
The fades issue depends on how the resulting loop is going to be played/used. If the file is going to be used outside REAPER like in a game for example, then we will always need a tiny fade in at the start. And this makes a second fade out at the end necessary. Unless the game audio engine takes care of all this, which I doubt.
All game engines provide a way of applying volume changes to a sound, either via a fade in, or via an envelope. So fades aren't necessary on loops, and should be avoided.
Travesty is offline   Reply With Quote
Old 08-09-2019, 06:29 AM   #33
Travesty
Human being with feelings
 
Travesty's Avatar
 
Join Date: Nov 2014
Posts: 798
Default

@mespotine

The method I use is to chop off the end of a sound and place it over the start of the item, so that it crossfades into it.

X-raym has a good script for this, but I often do it manually, because it's quite trivial with a single sound.

Script: X-Raym_Create seamless loops from selected items sections inside time selection.lua

This one is cool because it works with multiple sounds, so it saves work if you need that functionality
Travesty is offline   Reply With Quote
Old 08-09-2019, 08:24 AM   #34
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

I guess I underestimated game audio engines then. Cool, but if we can make the audio files already with the fades then it probably is easier to work with for the game.

It would be nice if someone can provide an example audio project that doesn't work well with this method of using the tail rendering so I can test.
heda is offline   Reply With Quote
Old 11-03-2019, 02:03 PM   #35
Brookwood
Human being with feelings
 
Brookwood's Avatar
 
Join Date: May 2014
Location: Brooklyn
Posts: 52
Default This script has never worked for me

...but it may be worthwhile now to get it going.
Here is the message I receive when I try to run it:
Attached Images
File Type: png Screen Shot 11-03-19 at 04.01 PM.PNG (4.9 KB, 185 views)
Brookwood is offline   Reply With Quote
Old 11-03-2019, 04:14 PM   #36
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

Quote:
Originally Posted by Brookwood View Post
...but it may be worthwhile now to get it going.
Here is the message I receive when I try to run it:
what version of REAPER are you running?
REAPER 5.975 or later is required.
heda is offline   Reply With Quote
Old 11-04-2019, 08:11 AM   #37
Brookwood
Human being with feelings
 
Brookwood's Avatar
 
Join Date: May 2014
Location: Brooklyn
Posts: 52
Default

Quote:
Originally Posted by heda View Post
what version of REAPER are you running?
REAPER 5.975 or later is required.
Sorry- I thought I was up-to-date.
Thank you!
Brookwood 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 07:05 AM.


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