ArrayArrayArrayArrayArrayArrayArray BrainModular BrainModular Users Forum 2014-03-21T09:53:01+02:00 https://brainmodular.org/forums/app.php/feed/topic/99 2014-03-21T09:53:01+02:00 2014-03-21T09:53:01+02:00 https://brainmodular.org/forums/viewtopic.php?t=99&p=29177#p29177 <![CDATA[Converting pitch to time ratio.]]>

Statistics: Posted by niggles — 21 Mar 2014, 08:53


]]>
2006-06-11T10:43:54+02:00 2006-06-11T10:43:54+02:00 https://brainmodular.org/forums/viewtopic.php?t=99&p=407#p407 <![CDATA[Converting pitch to time ratio.]]> it's the inverse of the first formula

Statistics: Posted by senso — 11 Jun 2006, 10:43


]]>
2006-06-08T10:03:48+02:00 2006-06-08T10:03:48+02:00 https://brainmodular.org/forums/viewtopic.php?t=99&p=403#p403 <![CDATA[Converting pitch to time ratio.]]>
original_length / 2^(pitch/12) = shifted_length

A fifth up:
300 / 2^(7/12) = 200.225978126....

A perfect fifth up (I used Olivier's example):
300 / 2^(7.01955000865387/12) = 200

Please correct me if I'm wrong...

Statistics: Posted by bsork — 08 Jun 2006, 10:03


]]>
2006-06-08T09:36:38+02:00 2006-06-08T09:36:38+02:00 https://brainmodular.org/forums/viewtopic.php?t=99&p=402#p402 <![CDATA[Converting pitch to time ratio.]]>
I'm mapping loop length (in ms) to tempo - that in itself is quite simple. If I want the loop to be for instance a quarter note that would be:
60000 / loop_length = tempo
60000 / 500 = 120

But when the sampler is not playing at original pitch, I need to calculate the new loop length. At whole octaves up or down, the equation can be made quite simple:

original_length / 2^octave_shift = shifted_length
2 octaves down: 500 / 2^-2 = 2000
2 octaves up: 500 / 2^+2 = 125

But for other pitch values I don't understand how to calculate the new loop length...

Statistics: Posted by bsork — 08 Jun 2006, 09:36


]]>
2006-06-07T18:54:06+02:00 2006-06-07T18:54:06+02:00 https://brainmodular.org/forums/viewtopic.php?t=99&p=397#p397 <![CDATA[Converting pitch to time ratio.]]> Statistics: Posted by laserbeak43 — 07 Jun 2006, 18:54


]]>
2006-06-07T13:22:39+02:00 2006-06-07T13:22:39+02:00 https://brainmodular.org/forums/viewtopic.php?t=99&p=394#p394 <![CDATA[Converting pitch to time ratio.]]>
schoolday knowledge has gone a long time ago....
Me too!

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.

Statistics: Posted by senso — 07 Jun 2006, 13:22


]]>
2006-06-07T11:16:58+02:00 2006-06-07T11:16:58+02:00 https://brainmodular.org/forums/viewtopic.php?t=99&p=392#p392 <![CDATA[Converting pitch to time ratio.]]>
I've been messing around with the Kaos Player, and trying to find different ways of adding functionality to that concept. Yesterday I patched up modules so that the length of the loop would set the synchro tempo, with a list to choose whether the loop length should represent a cycle, a bar, 1/4, 1/8 or 1/16. I also managed to take into account octave shifts, so that if the sampler is playing at eg +12 semitones the time is halfed.

What I would like help with, is the patching (and math) required to use semitones instead of whole octaves when recalculating the length in milliseconds of the loop.

I know I have to use logarithms in one way or another, but must admit that most of that schoolday knowledge has gone a long time ago....


Bj?rn S

Statistics: Posted by bsork — 07 Jun 2006, 11:16


]]>
BrainModular BrainModular Users Forum 2014-03-21T09:53:01+02:00 https://brainmodular.org/forums/app.php/feed/topic/99 2014-03-21T09:53:01+02:00 2014-03-21T09:53:01+02:00 https://brainmodular.org/forums/viewtopic.php?t=99&p=29177#p29177 <![CDATA[Converting pitch to time ratio.]]>

Statistics: Posted by niggles — 21 Mar 2014, 08:53


]]>
2006-06-11T10:43:54+02:00 2006-06-11T10:43:54+02:00 https://brainmodular.org/forums/viewtopic.php?t=99&p=407#p407 <![CDATA[Converting pitch to time ratio.]]> it's the inverse of the first formula

Statistics: Posted by senso — 11 Jun 2006, 10:43


]]>
2006-06-08T10:03:48+02:00 2006-06-08T10:03:48+02:00 https://brainmodular.org/forums/viewtopic.php?t=99&p=403#p403 <![CDATA[Converting pitch to time ratio.]]>
original_length / 2^(pitch/12) = shifted_length

A fifth up:
300 / 2^(7/12) = 200.225978126....

A perfect fifth up (I used Olivier's example):
300 / 2^(7.01955000865387/12) = 200

Please correct me if I'm wrong...

Statistics: Posted by bsork — 08 Jun 2006, 10:03


]]>
2006-06-08T09:36:38+02:00 2006-06-08T09:36:38+02:00 https://brainmodular.org/forums/viewtopic.php?t=99&p=402#p402 <![CDATA[Converting pitch to time ratio.]]>
I'm mapping loop length (in ms) to tempo - that in itself is quite simple. If I want the loop to be for instance a quarter note that would be:
60000 / loop_length = tempo
60000 / 500 = 120

But when the sampler is not playing at original pitch, I need to calculate the new loop length. At whole octaves up or down, the equation can be made quite simple:

original_length / 2^octave_shift = shifted_length
2 octaves down: 500 / 2^-2 = 2000
2 octaves up: 500 / 2^+2 = 125

But for other pitch values I don't understand how to calculate the new loop length...

Statistics: Posted by bsork — 08 Jun 2006, 09:36


]]>
2006-06-07T18:54:06+02:00 2006-06-07T18:54:06+02:00 https://brainmodular.org/forums/viewtopic.php?t=99&p=397#p397 <![CDATA[Converting pitch to time ratio.]]> Statistics: Posted by laserbeak43 — 07 Jun 2006, 18:54


]]>
2006-06-07T13:22:39+02:00 2006-06-07T13:22:39+02:00 https://brainmodular.org/forums/viewtopic.php?t=99&p=394#p394 <![CDATA[Converting pitch to time ratio.]]>
schoolday knowledge has gone a long time ago....
Me too!

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.

Statistics: Posted by senso — 07 Jun 2006, 13:22


]]>
2006-06-07T11:16:58+02:00 2006-06-07T11:16:58+02:00 https://brainmodular.org/forums/viewtopic.php?t=99&p=392#p392 <![CDATA[Converting pitch to time ratio.]]>
I've been messing around with the Kaos Player, and trying to find different ways of adding functionality to that concept. Yesterday I patched up modules so that the length of the loop would set the synchro tempo, with a list to choose whether the loop length should represent a cycle, a bar, 1/4, 1/8 or 1/16. I also managed to take into account octave shifts, so that if the sampler is playing at eg +12 semitones the time is halfed.

What I would like help with, is the patching (and math) required to use semitones instead of whole octaves when recalculating the length in milliseconds of the loop.

I know I have to use logarithms in one way or another, but must admit that most of that schoolday knowledge has gone a long time ago....


Bj?rn S

Statistics: Posted by bsork — 07 Jun 2006, 11:16


]]>