Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Q&A, Tips, Tricks and Howto

Reply
 
Thread Tools Display Modes
Old 06-20-2018, 07:08 AM   #1
nocturn
Human being with feelings
 
Join Date: Mar 2018
Posts: 46
Default misalignment when dragging out loops from glued bar, help?

ill have a bunch of fragments, i glue them and cut out an even, perfect 1 bar loop. i select it and glue it agian. now i have an item that looks like its length is exactly 1 bar. but when i grab the edge and drag the loops out across the song, zoom in to the last grid line, its misaligned. barely, but it is, and if extend out even further, its audible. i went back through all my tracks and its everywhere :_( now i know where the "feel" went...

im using the newest version but i havent bought a licence yet. could this be hidden crippleware? i have a whole list of little quirks im experiencing but this one is the most damaging, most aggravating, making one of reaper's cooler abilities, and modern musics most fundamental tools, unusable. please someone tell me i ticked something somewhere by mistake...

i work around it and zoom in, realigning using timestretch every time i extend a loop but imagine how annoying it is. i have years of tracks i made before i noticed this. anything else i might not have noticed but is also sabotaging all my floopin hard work?

i can record a screen capture of it happening but i think if this sounds bizarre, you should hurry home and see if you arent fredizled too. make a perfect 1 bar loop, glue it down as one item (sometimes the fragments are shifted in the new item btw but thats another issue), and drag the loops out to the right. effect visable past 20 bars, audible soon after. zoom all the way in. and if you think tiny little shifts like that dont make a difference, they make a tremendous difference when it comes to groove or phase, the timber of a chord, its harmony, the logic in your brain and its harmony...sigh, anyone? couldnt find anything related on these forums..

as long as youre working with only loops you wont notice because all your tracks are misaligned by the same amount, gradually as the song progresses. in time with each other but totally off the grid. and you have to zoom in all the way in to see it.
nocturn is offline   Reply With Quote
Old 06-20-2018, 07:45 AM   #2
serr
Human being with feelings
 
Join Date: Sep 2010
Posts: 12,557
Default

Bars and beats are a coarse unit of measure. The absolute length of a piece of audio is defined by samples.

Now, you can create a loop and it will be a definite length in samples that doesn't change. If you loop that, it still doesn't change. All good so far!

If it's misaligned with pre-existing audio after looping for a while, then you must have a tempo in existing tracks (or a click track or a grid) that is running at a slightly different rate. You need to understand that anything bigger than a sample is a coarse interval. You can't take something with merely the same rough BPM for example, and expect it to sync up with something else at that BPM. You need to zoom in and determine exactly how many samples long your time interval is. Then trim your new loop to exactly that length in samples.
serr is offline   Reply With Quote
Old 06-20-2018, 09:54 AM   #3
nocturn
Human being with feelings
 
Join Date: Mar 2018
Posts: 46
Default

serr, thanks for your reply. i think you misunderstood me. same things happens whatever unit of measurement i use. the loop is from one grid point to another. when i grab the right/left end and extend out the loops, down the line, after 10 or so repetitions, the grid points stop matching the loops length. there are no tempo changes, reaper is not sync'ed to my audio files tempo, and even if the sample length were to be greater than bar, im glueing the fragment down to a grid length. it should always be the same.
nocturn is offline   Reply With Quote
Old 06-20-2018, 10:20 AM   #4
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

Quote:
Originally Posted by nocturn View Post
could this be hidden crippleware? i have a whole list of little quirks im experiencing but this one is the most damaging, most aggravating, making one of reaper's cooler abilities, and modern musics most fundamental tools, unusable.
No; the evaluation version is the same as the licensed one.

Perhaps you could compress a simple problem project file (with the initial 1-bar loop and the reglued one) into a ZIP file and post it here as an attachment so that we can have a look at it and see what's (not) happening?

How to post attachments (in Post #1)
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is online now   Reply With Quote
Old 06-20-2018, 10:33 AM   #5
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,271
Default

Audio items pretty much have to begin and end on sample boundaries and it is only going to be accidental that your tempo is going to be an exact multiple of samples. They fixed this issue for MIDI items, but apparently it's still a thing for audio. The real problem is that glueing audio items creates new audio files which must be whole numbers of samples for what should be obvious reasons. There's no good reason that the item itself couldn't reference a piece of that audio file that doesn't land on sample, but we don't have any way to define an item length for looping like this except to glue, which creates new audio files which....

So like shrug I guess. It can't add up to enough to matter until it's been looping for a while. Maybe if you're running it parallel to the MDI track from which it was rendered. But if it does bother you, I think all you really can do is stretch it to fit.
ashcat_lt is offline   Reply With Quote
Old 06-20-2018, 11:24 AM   #6
serr
Human being with feelings
 
Join Date: Sep 2010
Posts: 12,557
Default

Quote:
Originally Posted by nocturn View Post
serr, thanks for your reply. i think you misunderstood me. same things happens whatever unit of measurement i use. the loop is from one grid point to another. when i grab the right/left end and extend out the loops, down the line, after 10 or so repetitions, the grid points stop matching the loops length. there are no tempo changes, reaper is not sync'ed to my audio files tempo, and even if the sample length were to be greater than bar, im glueing the fragment down to a grid length. it should always be the same.
And your grid interval is set to samples?

I suspect you have a grid set to bars/beats and you haven't zoomed in close enough to notice what I'm talking about.

For example: Lets say 1 bar of your song is 64,219 samples long. (Made up number for an example.) If you create a loop that is also 64,219 long, it will stay that way. Period.

Now, if you can show evidence that after drag-looping an item out that the length in samples changes... that would be a rather huge show stopping bug in Reaper! I do sample accurate work a lot and I say there is no bug like this. People would be screaming.

I think you'll discover what I said is going on though. Do a time selection on 1 bar. How long is it in samples? Do a time selection on your 1 bar sample. Is it the exact same number of samples? (Substitute actual length if 1 bar is not the unit in question.)

BTW, "sample" as in 1/96,000 or 1/44,100 of a second. What your sample rate clock is ticking at. Not "sample" as in a big ol' chunk of audio that a DJ would refer to as a "sample".


FYI, Reaper lets you work with multiple sample rate recorded audio in the same project. That means there is no hard smallest single sample interval that is ultimately snapped to in a grid by default like every other DAW. That means you need to pay attention to this!

Last edited by serr; 06-20-2018 at 11:33 AM.
serr is offline   Reply With Quote
Old 06-20-2018, 11:41 AM   #7
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,271
Default

Perhaps an option to snap/round all tempos to a given sample rate could help some?
ashcat_lt is offline   Reply With Quote
Old 06-20-2018, 04:04 PM   #8
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
Default

Quote:
Originally Posted by ashcat_lt View Post
Perhaps an option to snap/round all tempos to a given sample rate could help some?
It's there already (if I didn't misunderstand):
Project settings -> [x] Project sample rate, [x] Force project tempo...to occur on whole samples.

Now if you type say 103 BPM as project tempo it forces to 103.001 (at 44.1kHz)

Last edited by nofish; 06-20-2018 at 04:10 PM.
nofish is offline   Reply With Quote
Old 06-20-2018, 04:22 PM   #9
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,271
Default

Quote:
Originally Posted by nofish View Post
It's there already (if I didn't misunderstand):
Project settings -> [x] Project sample rate, [x] Force project tempo...to occur on whole samples.

Now if you type say 103 BPM as project tempo it forces to 103.001 (at 44.1kHz)
Oh! Well, there ya go then.
ashcat_lt is offline   Reply With Quote
Old 06-21-2018, 08:01 AM   #10
nocturn
Human being with feelings
 
Join Date: Mar 2018
Posts: 46
Default

fortunately i took my gfs laptop, installed reaper and cant recreate the problem. so that means i did or do something to my reaper. i say "do" because i went back to make that project file darkstar asked for and couldnt recreate the problem in a fresh project either. ive started to compare my config to default one on the laptop, menu by menu, and so far theyre the same in the areas you guys mentioned. force project tempo is off by default. should i have it turned on?
serr, should i set the grid interval to samples? it makes sense what youre saying but its set to measures/beats minutes/seconds by default, and the problem isnt happening. so far. i dont know why it isnt happening in a fresh project and im going to have wait for it to happen agian and analyse my behavior leading up to that moment. ill make a save and upload that. shouldnt have to wait too long, it happens all the time. meanwhile if theres any area in the configuration settings i should examine for changes that could be responsible for things of this nature, please tell me. so far, none of my tweaks seem related but theres enough of them that ive made over the years that i dont want to start over. dont remember half of them and i dont know, i mostly worried ill break older projects im in the process of finishing.
nocturn is offline   Reply With Quote
Old 06-23-2018, 12:09 PM   #11
nocturn
Human being with feelings
 
Join Date: Mar 2018
Posts: 46
Default

serr, nofish, ashcat_It, Darkstar, it happend. https://www.sendspace.com/file/h10mi4

i cant upload to these forums because it says it exceeds the file size. 1.6megs i can upload it somewhere else or is there something i need to do in the options? i dont want to change the sample rate or its length or anything in case thats part of the reason...i dont know how it happend. i already had a loop extended out and noticed an edit, did the edit, turned on grid snap, lined up the new loop, glued, extended and violacello...checked it on the laptops fresh reaper and its still there.
nocturn is offline   Reply With Quote
Old 06-24-2018, 05:19 AM   #12
bezusheist
Human being with feelings
 
bezusheist's Avatar
 
Join Date: Nov 2010
Location: Mullet
Posts: 829
Default

i checked your project out and your loop starts and ends between sample points, so it is being quantized/shifted. the loop is also about 3 samples shy of being the "correct" length. and you didn't check the checkbox that nofish mentions (...you are using a tempo that doesn't "coincide" with the sample rate.) or the checkbox for snap to sample rate. follow the advice already given and you should be able to fix this.
__________________
I like turtles

Last edited by bezusheist; 06-25-2018 at 12:50 AM.
bezusheist is offline   Reply With Quote
Old 06-25-2018, 04:28 AM   #13
nocturn
Human being with feelings
 
Join Date: Mar 2018
Posts: 46
Default

thank you very much! why isnt it snipping off those 3 samples when i glue? would rendering the loop change this? and should i be using "samples" in the timeline instead of beats/minutes to avoid this or just option no+fish mentioned? whats the other snap option youre refering to?
nocturn is offline   Reply With Quote
Old 06-25-2018, 05:14 AM   #14
bezusheist
Human being with feelings
 
bezusheist's Avatar
 
Join Date: Nov 2010
Location: Mullet
Posts: 829
Default

your loop is short 3 samples...so when you extend it, each time it gets shorter and shorter, thus falling further behind on the grid.
try what nofish suggested...and also try in "snap/grid settings" checking the box next to "snap to project sample rate".
those two settings should help keep things lined up on/to the grid.
__________________
I like turtles
bezusheist is offline   Reply With Quote
Old 06-25-2018, 05:51 AM   #15
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

A 2-bar loop at 95 bpm and 44,100 HZ sample rate is
2 x 4 x 60 / 95 * 44100 = 222,821.05 samples

So this loop, which has 222,821 samples, is actually very slightly short, at
7.9999982 beats (1.9999996 bars) !

The only solution I could find is to copy the original loop and paste it at 2-bar intervals.



But, the devs may be able to come up with a better solution.

PS Shift + Up arrow makes the waveform taller and easier to see.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is online now   Reply With Quote
Old 06-25-2018, 07:50 AM   #16
serr
Human being with feelings
 
Join Date: Sep 2010
Posts: 12,557
Default

First decide what your timing reference is going to be. Either based on the length of your loop or based on something else like a grid or click track.

If you go with the loop, you can 'drag it out' however long you please. Record/edit everything else to this. If you want to use a bars/beats grid after laying the loop for arrangement experimentation, understand that you would need to snap the grid to the loop. Not the other way around! A bit of PITA work, so don't fuss around laying grids down unless you really need to play with arrangements and it actually saves some editing time.

If you go with a grid or click as your reference, understand that you need to make your loop conform to the grid. The sample 'ruler' is the ultimate reference for audio. If you need to end up with little gaps between each loop to match to a grid that doesn't fall on sample divisions, make sure you trim your loop on zero crossings to avoid clicks.
serr is offline   Reply With Quote
Old 07-10-2018, 11:56 AM   #17
nocturn
Human being with feelings
 
Join Date: Mar 2018
Posts: 46
Default

thanks for helping me out everyone, been busy. i donno, ill try to do what youre saying serr but it looks like another workaround to me. i work alot with loops and traditional arrangement styles, so not having a bar based ruler to set stuff up on is gonna be tough but ill try it and see what its like. thanks. darkstar: i think its still moved after even two bars just not so noticeable. one cool thing is how regions work in reaper so im gonna try leaning on that. and yeah shift up works in alot of programs, i think its a cakewalk standard.
nocturn is offline   Reply With Quote
Old 04-27-2022, 05:56 AM   #18
Stevie Boy
Human being with feelings
 
Stevie Boy's Avatar
 
Join Date: Jan 2011
Location: The Jungle
Posts: 43
Default

Quote:
Originally Posted by ashcat_lt View Post
Audio items pretty much have to begin and end on sample boundaries and it is only going to be accidental that your tempo is going to be an exact multiple of samples. They fixed this issue for MIDI items, but apparently it's still a thing for audio. The real problem is that glueing audio items creates new audio files which must be whole numbers of samples for what should be obvious reasons. There's no good reason that the item itself couldn't reference a piece of that audio file that doesn't land on sample, but we don't have any way to define an item length for looping like this except to glue, which creates new audio files which....

So like shrug I guess. It can't add up to enough to matter until it's been looping for a while. Maybe if you're running it parallel to the MDI track from which it was rendered. But if it does bother you, I think all you really can do is stretch it to fit.
Aha, was doing some reading on this here cause I thought something was a bug, but now I'm guessing it isn't

I guess this is why if I make 2 consecutive one bar items at a tempo of say 170 at 44.100, & then render both of them separately. Even though they are the same ms in duration "1.411ms", the amount of samples (frames) are different - 62,258 for the first item rendered &62,259 for the second item rendered.

I'm guessing one of the items has to round up or down across the timeline cause beats/bars are so course & 170 isn't strictly compatible.

Snapping to sample rate/snap to project sample rate indeed solves this where its a compatible tempo of 169.997 & gives me 62,259 samples (frames) on both rendered items.

Making music these days on a computer, syncing things doesn't usually bother me, I wouldn't even think of it, especially not fret over a dropped/rounded up sample (frame) lol.

I do wonder though what the implications of delivering audio for other people to use as loops where the specification given is in specific bpm (170 for example) but a sample (frame) is dropped or added on different items. I suppose if everything is aligned left to a grid it doesn't go out by any perceptible amount when using smaller loops. But with longer stems between DAWS, thinking about it tempos & clocking & jitter has always been an issue over time hasn't it? with one devices 138 being another devices 137.999.

With what I'm doing it makes me wonder though, if every device has its own ideas, do we even need to strive for accuracy & consistency if that accuracy & consistency is going to be inaccurate & inconsistent elsewhere, lol

I guess its down to the user to make it fit but I at least want to work out if this practically matters before committing to a large project so have been mulling over the implications of it all...

Running the project to the specced bpm & having items of differing samples(frames)/inconsistency,

or

Forcing the project to the samplerate & having items of the same samples (frames)/consistency but delivering a bpm thats "different" than specced - not that anyone could tell if you labelled it 170bpm because I guess for all intents & purposes it is & there's not enough to be a noticeable difference. Want to make sure it's honest though.

trying to remind myself why I would chose inaccurate AND inconsistent, but then, then again, what's the reference point for that...
Stevie Boy is offline   Reply With Quote
Old 04-27-2022, 07:13 AM   #19
Stevie Boy
Human being with feelings
 
Stevie Boy's Avatar
 
Join Date: Jan 2011
Location: The Jungle
Posts: 43
Default

Also funnily enough come to think of it, I don't think I've come across this before as I tend to make music at more "mechanical" tempos - the sort like you'd see on a metronome timepiece, i.e 168 instead of 170, which seems to divide better naturally on whole numbers up until a point, 160,84,42,21 as opposed to 170,85,42.5,21.25, so it probably follows that mathematically it doesn't fit evenly when you drill down too, not that I have any idea about maths, though the patterns that form are fascinating.

Obviously in the real world people have just played the music at the tempo that sounded best to them without having to consider a lot of technical or mathematical stuff.

Fake Edit: Just tried two items like I did before at 168 (without forcing to sr) and they are both the same amount of samples! Whether over more items that changes, I haven't tested so far.
Stevie Boy is offline   Reply With Quote
Old 04-27-2022, 07:39 AM   #20
bezusheist
Human being with feelings
 
bezusheist's Avatar
 
Join Date: Nov 2010
Location: Mullet
Posts: 829
Default

I think it works like this…
168 / 60 = 2.8
44,100 / 2.8 = 15,750

170 / 60 = 2.833333333333333
44,100 / 2.833333333333333 = 15,564.70588235294 = 15,565
44,100 / 15,565 = 2.833279794410536
60 * 2.833279794410536 = 169.9967876646322
__________________
I like turtles

Last edited by bezusheist; 04-27-2022 at 07:48 AM.
bezusheist is offline   Reply With Quote
Old 04-27-2022, 09:34 AM   #21
Stevie Boy
Human being with feelings
 
Stevie Boy's Avatar
 
Join Date: Jan 2011
Location: The Jungle
Posts: 43
Default

Ah, interesting, thanks


I made a new project at 170bpm and made 128 blank items of 1 bar long in 4/4 on one continuous track all snapped to the beat grid
and rendered each selected item using "selected media items" with the tail off.

every rendered wav item has the duration of 0:01.411

and most items have 62,259 Samples (frames) except for

Item 001 - 62,258 samples (frames)
Item 007 - 62,258 ""
Item 018 - 62,258 ""
Item 024 - 62,258 ""
Item 035 - 62,258 ""
Item 041 - 62,258 ""
Item 052 - 62,258 ""
Item 058 - 62,258 ""
Item 069 - 62,258 ""
Item 075 - 62,258 ""
Item 086 - 62,258 ""
Item 092 - 62,258 ""
Item 103 - 62,258 ""
Item 109 - 62,258 ""
Item 120 - 62,258 ""
Item 126 - 62,258 ""

I tested this again 2 more times starting with a new project each time and it gave the exact same results, those specific items all were 1 less sample then the remainder.


Doing this same experiment but using "force to samplerate" at 170 shows the as BPM 169.997, all items this time come out as 62,260 samples (frames) with the duration of 0:01.411


I seem to work out the bpm from the duration as

240 / 0:01.411 - 170.0921332388377 though


I'm even more confused now lol
Stevie Boy is offline   Reply With Quote
Old 04-27-2022, 10:00 AM   #22
bezusheist
Human being with feelings
 
bezusheist's Avatar
 
Join Date: Nov 2010
Location: Mullet
Posts: 829
Default

Quote:
Originally Posted by Stevie Boy View Post

Doing this same experiment but using "force to samplerate" at 170 shows the as BPM 169.997, all items this time come out as 62,260 samples (frames) with the duration of 0:01.411


I seem to work out the bpm from the duration as

240 / 0:01.411 - 170.0921332388377 though


I'm even more confused now lol

You need more precision for the 1.411 figure, then it works out fine…
ie…62,260 / 44,100 = 1.411791383219955
__________________
I like turtles
bezusheist is offline   Reply With Quote
Old 04-27-2022, 10:01 AM   #23
Stevie Boy
Human being with feelings
 
Stevie Boy's Avatar
 
Join Date: Jan 2011
Location: The Jungle
Posts: 43
Default

ahhhhhhhh, thank you!

169.9967876646321!

totally skipped maths

Makes sense as being so precise with the other numbers too, was going by what it said in an audio editor, only to three places, I guess they are rounding up & down too, lol...

Last edited by Stevie Boy; 04-27-2022 at 10:10 AM.
Stevie Boy is offline   Reply With Quote
Old 04-27-2022, 10:27 AM   #24
Stevie Boy
Human being with feelings
 
Stevie Boy's Avatar
 
Join Date: Jan 2011
Location: The Jungle
Posts: 43
Default

So I gather then the Results from my first at 170 bpm on the reaper dial test were

16 of items the were at

62,258 samples / 44100 sr = 1.411746031746032 ms | 240 s / 1.411746031746032 ms = 170.0022487069934 bpm

and the remaining 112 items were at

62,259 samples / 44100 sr = 1.411768707482993 ms | 240 s / 1.411768707482993 ms = 169.9995181419554 bpm

.

And the second test when forced to sample rate (reaper showing 169.997) were all

62,260 samples / 44100 sr = 1.411791383219955 ms | 240 s / 1.411791383219955 ms = 169.9967876646321 bpm


.

I'll take it 170 on the dot doesn't exist then & the second test IS closest to it, more accurate, & consistent.

Edit:

Hang on, I might be wrong about that checking the differences from 170.0000000000000, but it IS more consistent

Edit 2:

Right, I think I got it. There is no 170 without a rounding error as being that 170 on the dot is 62,258.82352941176 samples with a calculator, but there is no sub sample/frame in PCM?, it HAS to be rounded up or thrown out. and over the timeline of bars and beats this is averaged out at certain tempos so is why I get a few items that are "off".

Maybe I'm going down a rabbithole I shouldn't lol. Everyone here on the forum have been really helpful with these sorts of things someone like me with a tiny brain has trouble with understanding.

Last edited by Stevie Boy; 04-27-2022 at 12:00 PM.
Stevie Boy 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 03:27 AM.


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