Welcome to %s forums

BrainModular Users Forum

Login Register

Autopitch formula to fit sample to time/tempo of project (NOT Grain)

I need help on a Patch
Post Reply
lytz1
Member
Posts: 123
Contact:

Unread post by lytz1 » 20 Jun 2017, 02:16

Guys, I am looking for a way to pitch samples in the normal sampler automatically up/down to fit the project tempo.
Audiomulch can do this automatically so I guess there HAS to be a way to do this in HH as well. Would save me a lot of time.

(I want the pitch to change when changing tempo, I can't use timestretch/grain for what I have to do. In one case, for example, I need the sampler to play half-tempo of project-tempo resulting in playing back the loop an octave down.)


See below: Senso wrote this in 2006. I think this is exactly what I need but I have no idea how to patch this, because of the (...)'s.

Anyone an idea?

Thanks guys,
tL.


SENSO:
I think that the question could be asked like:

I have a sample with a length (let's say length_ini);
What pitch should I play this sample to fit to another length, for example the cycle length (let's say length_final).

The pitch can be calculated with:

Pitch = 12*LN(Length_ini/length_final)/LN(2)

LN=Logarithm
You can use the Math/Trunc module to get a rounded pitch if you need it.

In the User Library you can find a patch called "Sampler Adapt Pitch" witch does this kind of stuff.

User avatar
oli_lab
Member
Posts: 1263
Location: Brittany, France
Contact:

Unread post by oli_lab » 20 Jun 2017, 11:31

File uploaded: http://www.sensomusic.com/forums/upload ... 0pitch.pat

tell us how it goes !

cheers
http://oli-lab.org

Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces

follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social

lytz1
Member
Posts: 123
Contact:

Unread post by lytz1 » 20 Jun 2017, 22:08

Hey Oli, thanks a lot!

looks good so far, I just need to get it in sync somehow.

Also, do you know why the output always gives TWO values? (The output after the last divider alternates
between a positive and a negative one.)

Best,
tL.

User avatar
oli_lab
Member
Posts: 1263
Location: Brittany, France
Contact:

Unread post by oli_lab » 21 Jun 2017, 12:11

lytz1 wrote:do you know why the output always gives TWO values? (The output after the last divider alternates
between a positive and a negative one.)
Does not happen here

I did some mods :
it is log10(x) module to use, not ln(x)

you can use bar length or cycle length as you prefer

adding a sync

Image
http://oli-lab.org

Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces

follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social

lytz1
Member
Posts: 123
Contact:

Unread post by lytz1 » 21 Jun 2017, 23:37

Thanks again Oli, output is steady now.

Best,
tL.

Post Reply

Who is online

Users browsing this forum: No registered users and 48 guests