Fixing tunetof.pd
Today
 
Are you up on your tuning math?
 
yessirree bob
 
I have a question
 
what can i do you for
 
its in this scala to tun to frequency converter
ok it has a table lookup with frequency ratios
a midinotenum is modulo at notes per xtave
and the result is used to index the table
then
multiplied by (2^midinote/notesperxtave) * basefrequency
I figured that instead of 2 that the ratio for the xtave should be used instead
 
so what are yo utrying to find?
are you trying to convert from units?
 
a frequency of a note
known are frequency ratios of tuning in table, midinote, basefrequency, notesperxtave
the patch references xtave as octave, not sure if the person that wrote the patch was up on xenharmonic terms or whether xenharmonic terms were up with themselves when created
 
so can you give me an exact example?
you have a note like midi note 60, and you know you have a 5/4 in the scale, and you want to find out what the frequency of like 5/4 above midi note 60 is?
 
i'll try
 
try what
 
to write an example what is the syntax for mod()
 
?
 
modulo(x,y)?
 
in what language
 
our example language
 
x%y
 
x modulo y
midinote= 60
notesperxtave=13
basefrequency=32
(60%13 * 5/4) * (2^(60/13) )* 32
if the frame is 4/1 would not 2 be replaced by 4/1? to get frequency?
 
what do you mean by frame?
i still don't know exactly what you're trying to do
 
the period of te tuning
f=(60%13 * 5/4) * (2^(60/13) )* 32
 
i still don't know exactly what you're tryingto find
 
if 2 in that equation should be replaced with 4/1 if the tuning repeats at 4/1 instead of 2/1 is what I'm trying to find out
 
i don't know what the equation represents
 
haha
you want a picture?
the tuning table holds ratios instead of cents
i guess i can check it to find out by loading one of my tunings
the first inlet is a midinotenumber
i guess you could call that scale degree
I have no clue about all the terminology
 
so what are you trying to calculate?
 
frequency
 
what exactly are you trying to convert into frequency?
 
a midi note number
60
 
so 60 is C5, right?
therefore 69 is A5 and is 440 Hz
 
i dont know
base frequency is 32
 
are you using the standard?
note 69 is 440 hz?
 
no
doing base freqency like in your midi javascript
will add center note and frequency later
you just go backwards with thetable till you get to zero to get the base frequency
in this example basefrequency is 32 hz and located at midi note 0
 
ok
0 is 32 h
z
so then note 1 is 32*2^(1/12) hz
note 2 is 32*2^(2/12) Hz
in general, note n is 32*2^(n/12) Hz
so there's your formula
32*2^(n/12)
 
what if it's bp?
 
what if what is BP
 
the tuning?
 
you mean that midi note is 32 Hz, and then midi note 33 is just one BP step above that?
if your equivalence interval is "e"
and your divisions of that interval are "d"
then for some note "n," assuming note 0 is 32 Hz, the formula is 32*e^(n/d)
let's say that in fact, your base frequency for note 0 is "b" Hz
then it's b*e^(n/d)
"bend"
h0h0

 
just as i expected
so that is the next step to bend
well i guess i have to figure out how to operate this pd list first

and replace that 2 with the equivalence interva