Hello / 2d.wave questions
Hi there everyone. My first post here... getting back on the Max train and had (what i think is) a fairly simple 2d.wave question.
I like putting snippets of my music into a simple 2d.wave patch I created based on this:
I will mess with the various parameters (speed of phasors controlling X+Y position, # of rows, etc) to create a pleasing result which is often a wildly different pitch and bpm than the original file. Currently I am fine tuning the X phasor by ear so that the end result falls into a key, and using Pro Tools to measure the output loop for BPM, and TCEing the result to lock it to a integer tempo.
However it seems that there is a simple equation I could use to determine what the output tempo / pitch is.
For instance if I input a 1 bar 120 bpm (2000ms) file, and set the frequency of the X phasor to .5hz and the number of rows to 2, the resulting bpm / pitchchange is 60bpm / -12 semitones. As the numbers get weirder the math gets lost on me... what is the equation to get here, provided I know the original BPM and enter it manually? I imagine for you genius types it is very simple :)
Thanks! Hope y'all are having a good one.
Tim
A few thoughts...
120 bpm bar could be any length, depending on number of beats and beat value in a bar.
But, let's take 4/4 as reference so 2000 ms.
To calculate Tempo from one Bar length, assuming Bar is 4/4 {expr 60000./($f1/4.)}
To calculate phasor~ from Bar length in ms {expr 1000./$f1}
To calculate phasor~ from Tempo {expr 60./$f1} or {!/ 60.} ( again for 4/4 Bar)
To calculate phasor~ transposition ratio to semitones {expr log ($f1) * 17.31234}
To calculate semitones to phasor~transposition ratio {expr pow(2.,$f1/12)}
Anything left out ?
as example: if Audio File is 2345 ms long, phasor~ frequency is {expr 1000./2345.} = 0.426439
for the original loop speed.
If You want to change the speed 2 semitones up send 2. to {expr pow(2.,$f1/12)} = 1.122462
and multiply phasor freq with that, 0.426439 * 1.122462 = 0.478662 as new frequency
Hey thanks for that! In general I'm doing the reverse of your example ... as in messing with the phasor speeds wildly and then wondering "what bpm/pitch am I at now?" Rather than intending to alter it by a specific amt. But I will try to bust out my old algebra skills there :)
Another factor is the # of rows, but I think that part of the equation should be simpler I.e. a simple multiply or divide.
I'll try to fire up the ol brain and figure the remaining bits out.
But generally I'm looking for:
Inputs: Original bpm / x phasor speed / # of rows / clip length in ms
Output: new bpm / pitch change in semitones
I think those inputs should be sufficient to solve but if others (such as bar length) are needed please let me know!
Best
Tim