<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Midi to hz, and hz to midi formulas]]></title><description><![CDATA[<p>hello, its me again with more newbie questions.</p>
<p>im studying with johannes kreidler book and there is a formula on converting midi notes to hertz on chapter 3 (audio) that im not sure i understand.<br />
i know there are [mtof] and [ftom] objects but since its on the book as a formula im guessing its important and i wouldnt like to skip it just because the computer can do it for me.</p>
<p>according to the book the midi to hz formula using the [expr] object is<br />
expr 440*(pow (2, (($f1-69)/12)))</p>
<p>if the midi note is 39, the frequency is suppossed to be 77.78 but when i try to do it with my calculator i get a wrong result.</p>
<p>there is also the inverse formula for hz to midi which is</p>
<p>m= 69 + 12 . log2(f/440)</p>
<p>if someone could break these formulas down for me it would help me understand how these objects work.<br />
(i already know expr and variables, im sure im not reading the formulas right).</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4090/midi-to-hz-and-hz-to-midi-formulas</link><generator>RSS for Node</generator><lastBuildDate>Sat, 14 Nov 2026 09:02:26 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/4090.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 04 Aug 2010 09:19:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Midi to hz, and hz to midi formulas on Wed, 04 Aug 2010 09:19:00 GMT]]></title><description><![CDATA[<p>hello, its me again with more newbie questions.</p>
<p>im studying with johannes kreidler book and there is a formula on converting midi notes to hertz on chapter 3 (audio) that im not sure i understand.<br />
i know there are [mtof] and [ftom] objects but since its on the book as a formula im guessing its important and i wouldnt like to skip it just because the computer can do it for me.</p>
<p>according to the book the midi to hz formula using the [expr] object is<br />
expr 440*(pow (2, (($f1-69)/12)))</p>
<p>if the midi note is 39, the frequency is suppossed to be 77.78 but when i try to do it with my calculator i get a wrong result.</p>
<p>there is also the inverse formula for hz to midi which is</p>
<p>m= 69 + 12 . log2(f/440)</p>
<p>if someone could break these formulas down for me it would help me understand how these objects work.<br />
(i already know expr and variables, im sure im not reading the formulas right).</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4090/midi-to-hz-and-hz-to-midi-formulas</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4090/midi-to-hz-and-hz-to-midi-formulas</guid><dc:creator><![CDATA[Roaramburu]]></dc:creator><pubDate>Wed, 04 Aug 2010 09:19:00 GMT</pubDate></item><item><title><![CDATA[Reply to Midi to hz, and hz to midi formulas on Wed, 04 Aug 2010 17:24:49 GMT]]></title><description><![CDATA[<p>I don't know any formula for what you want, but just thought that you, or somebody else who visits this thread, might find the attached &quot;Pitch to Frequency Mappings&quot; file to be of some use along such lines.</p>
<p>Good luck, and keep well ~ Shankar</p>
<p><a href="http://www.pdpatchrepo.info/hurleur/0.Pitch-2-Frequency-Mappings.pdf" rel="nofollow">http://www.pdpatchrepo.info/hurleur/0.Pitch-2-Frequency-Mappings.pdf</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4090/midi-to-hz-and-hz-to-midi-formulas/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4090/midi-to-hz-and-hz-to-midi-formulas/2</guid><dc:creator><![CDATA[ShankarBaba]]></dc:creator><pubDate>Wed, 04 Aug 2010 17:24:49 GMT</pubDate></item><item><title><![CDATA[Reply to Midi to hz, and hz to midi formulas on Thu, 05 Aug 2010 00:04:30 GMT]]></title><description><![CDATA[<p>tried it also</p>
<p>this patch(as attach) would work</p>
<p>best regards</p>
<p>addisaden</p>
<p><a href="http://www.pdpatchrepo.info/hurleur/midi2ton.pd" rel="nofollow">http://www.pdpatchrepo.info/hurleur/midi2ton.pd</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4090/midi-to-hz-and-hz-to-midi-formulas/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4090/midi-to-hz-and-hz-to-midi-formulas/3</guid><dc:creator><![CDATA[addisaden]]></dc:creator><pubDate>Thu, 05 Aug 2010 00:04:30 GMT</pubDate></item><item><title><![CDATA[Reply to Midi to hz, and hz to midi formulas on Wed, 18 Feb 2015 14:26:55 GMT]]></title><description><![CDATA[<p>A few pointers, if you might allow me to expound:</p>
<p>The equation describes only equal temperament, and the 69 MIDI value is to correct for the value of the reference key of A4, above middle C.</p>
<p>The assumption of equal temperament proves a repetitious vexation, denotes ignorance, apathy, laziness, and/or unfamiliarity  with the math of music.  Worse, this assumption proves far too common among engineers / mathematicians / scientists / software programmers.  Which then deprives us musicians of useable tools, and the stupidity of the need for MIDI tuning standard / scala / etc, is the vacuum such engenders.</p>
<p>Troubling how in this modern age, they teach his geometric theorem, yet not his music, nor his math relevant to music.  Yet we laud him as the grandfather of the Western tradition of music, owing to his discovery and delineation of the mathematic definitions in ratios of the twelve notes of all of Western music.  Pythagoras of Samos might well concur: the math we teach is a decrepit wretch of an invalid -- incomplete, fragmented, not useful, and regarding certain fundamentals, dead wrong.</p>
<p>How few know how, when, and why the value of the third decimal onward ad infinitum of Pi needed to be re-evaluated, recalculated for better precision in the latter part of the 20th century, for instance.  Yet how few are taught the corrected, more precise value of Pi -- in any school or university in the land?  Pi had to be re-evaluated in the 1960s given the orbits of our species' earliest satellites resulted in the falling-back to earth of each one of them due to the value of Pi we were and still are taught in school is not precise after the second digit.  The circles we calculated the orbits to be proved each to be slightly short of a true, pure circle, thus returning the satellites to the ground.  Pi more precisely can be evaluated to 3.1446055, and not the perpetuation of imperfection, and the maintenance of ignorance still taught today.</p>
<p>Hope this helps,</p>
<p>F.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4090/midi-to-hz-and-hz-to-midi-formulas/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4090/midi-to-hz-and-hz-to-midi-formulas/4</guid><dc:creator><![CDATA[dangrondang]]></dc:creator><pubDate>Wed, 18 Feb 2015 14:26:55 GMT</pubDate></item><item><title><![CDATA[Reply to Midi to hz, and hz to midi formulas on Wed, 18 Feb 2015 21:04:41 GMT]]></title><description><![CDATA[<p>well, to contribute to the vile institution of equal temperament then:</p>
<p>in the first equation the input has 69 subtracted from it. This is in order to get the semitones difference between the input note and 69, which is the a above middle c, (the standard is that this note has a frequency of 440). Then this is divided by 12 in order to get the number of octaves that the input is different from a440 (linearly). 2 is then raised to this power.<br />
The reason for this is that if 2 were raised to the 1st power, 1 octave would be traversed upward. similarly, if 2 were raised to the -1 power the octave would be traversed down, because 2^-1 = 0.5, which is a frequency of the octave below.</p>
<p>And because the midi note 69 was the reference point, what is being determined is the ratio of the frequency difference between the input and a440. Therefore, once we know the frequency ratio between the input note and midi note number 69, it is multiplied by 440 in order to get the result</p>
<p>the next formula is this one in inverse:<br />
The input frequency is divided by 440 to get the frequency ratio between the input and 440. Then log2 is taken of it, which is the power that 2 needs to be raised by in order to get the ratio. So this will be the number of octaves difference between the 2 notes.<br />
The number is multiplied by 12 to convert to 1/2 steps, and then 69 is added to get back up to the note a above middle c because 440 was the reference point in the beginning</p>
<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/dangrondang">@dangrondang</a> out of curiosity, do you have any references for the accepted value of pi being wrong? for all of the talk about the sanctity of mathematics this other value does not seem to agree with mathematical principles relating to series convergence formulas for pi. A simple one of these formulas is <a href="http://en.wikipedia.org/wiki/Leibniz_formula_for_%CF%80" rel="nofollow">the Leibniz one</a>. There is a proof of it on the page also<br />
Regarding your putrid opinion on equal temperament, I would also be curious how you would modulate freely between keys on a keyboard instrument. Are you advocating for well-temperament? a system of pythagorean tuning with movable root? The reason equal temperament exists is mainly to create a system where all keys sound the same. Much of music by the mid-1800s e.g. Beethoven was already freely modulating to far away keys and that does NOT sound very good in pythagorean or even simple well temperament (although certain keyboards in the day had many &quot;versions&quot; of notes and scales)</p>
<p>edit: didn't realize this was such an old topic! oh well, perhaps useful still</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4090/midi-to-hz-and-hz-to-midi-formulas/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4090/midi-to-hz-and-hz-to-midi-formulas/5</guid><dc:creator><![CDATA[seb-harmonik.ar]]></dc:creator><pubDate>Wed, 18 Feb 2015 21:04:41 GMT</pubDate></item><item><title><![CDATA[Reply to Midi to hz, and hz to midi formulas on Wed, 18 Feb 2015 20:29:00 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/dangrondang">@dangrondang</a> wrote:</p>
<blockquote>
<p>The circles we calculated the orbits to be proved each to be slightly short of a true, pure circle, thus returning the satellites to the ground. Pi more precisely can be evaluated to 3.1446055, and not the perpetuation of imperfection, and the maintenance of ignorance still taught today.</p>
</blockquote>
<p>Sorry to be blunt, but what you are stating is awfully incorrect and the way you proclaim to know this &quot;hidden truth&quot; is really awufully ignorant. So you are stating that there is a mistake on the 3rd decimal digit of pi... It so happens that this decimal place was precisely calculated centuries ago, and the result still (obviously) stands today. There are tons of different approaches on how to get correct digits of pi, such as by using certain convergence series as mentioned by <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/seb-harmonik-ar">@seb-harmonik.ar</a>. One can <em>manually</em> calculate the 3rd digit of pi using these type of series, and this result has been known for more than a millennium (in the year 480, the value known was 3.1415926, which is way more precise than what you state. By the early 18th century, we knew <strong>100</strong> digits of pi, none of which have been &quot;corrected&quot; later on. See: <a href="https://en.wikipedia.org/wiki/Chronology_of_computation_of_%CF%80" rel="nofollow">https://en.wikipedia.org/wiki/Chronology_of_computation_of_π</a>). There is no way that in the 1960's pi had to be defined as 3.1446... instead of 3.1415..., that is just pure ignorance and witchery.</p>
<p>But reading about your number on the internet, I found that this 3.1446055 appears in several articles about satellites, pyramids and all that &quot;dark hidden world that nobody tells you about open your eyes sheep people controlled by the illuminati&quot; kind of talk, but not a single time in a serious mathematical or physics website/journal/wiki. Sorry but the world is not a dark place controlled by people with magic powers trying to keep you in the shadows... simply do not use random blogs as source of information.</p>
<blockquote>
<p>The assumption of equal temperament proves a repetitious vexation, denotes ignorance, apathy, laziness, and/or unfamiliarity with the math of music. Worse, this assumption proves far too common among engineers / mathematicians / scientists / software programmers. Which then deprives us musicians of useable tools, and the stupidity of the need for MIDI tuning standard / scala / etc, is the vacuum such engenders.</p>
</blockquote>
<p>As for the &quot;stupidity&quot; of using a tempered system, that is just as stupid as using a non-tempered one: it is simply a convention, upon which we built centuries of music. Western music has been based on it for long time (although contemporary composers, myself included, often choose to use micro-intervals), and the decision to create MIDI around this is as logical as it gets when you think what they were aiming at. Or should we have went through all sorts of trouble to incorporate all crazy stuff in the MIDI protocol (which is an Western creation), such as the possibility of having Indian micro-tonal scales? But wait, then what about gamelan scales? No wait, what about <em>&lt;insert ethnomusic genre here&gt;</em> scales?</p>
<p>From a practical point of view, you can still use MIDI cents, and you can also directly use frequencies if you want to precisely define the pitch of a sound. You can compose music in 12-tones, 27-tones or 193-tones if you wish to. The tools are here, and Pd allows you to do whatever you want with them (I myself have composed works using Pd <strong>and MIDI</strong>  that deals with microtones and microtonal glissandi in real-time).</p>
<p>I hope you won't get personally offended with my message, but I can't really read this type of statement, which tries to propagate pseudo-scientific kind of stuff, without writing a strong reply.</p>
<p>Best,<br />
Gilberto</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4090/midi-to-hz-and-hz-to-midi-formulas/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4090/midi-to-hz-and-hz-to-midi-formulas/6</guid><dc:creator><![CDATA[gsagostinho]]></dc:creator><pubDate>Wed, 18 Feb 2015 20:29:00 GMT</pubDate></item><item><title><![CDATA[Reply to Midi to hz, and hz to midi formulas on Wed, 18 Feb 2015 20:16:53 GMT]]></title><description><![CDATA[<p>As for the initial poster who wrote (5 years ago!):</p>
<blockquote>
<p>if the midi note is 39, the frequency is suppossed to be 77.78 but when i try to do it with my calculator i get a wrong result.</p>
</blockquote>
<p>The formula <strong>[expr 440*(pow (2, (($f1-69)/12)))]</strong> is correct and 77.78 Hz is what you are expected to get indeed. You probably are (or rather were) having some troubles with the order of the operations and parenthesis. Doing it part by part, you get:</p>
<p>39 - 69 = -30<br />
-30 / 12 = −2.5<br />
2^(-2.5) = 0.176776695<br />
440 x 0.176776695 = 77.7817458</p>
<p>Best,<br />
Gilberto</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4090/midi-to-hz-and-hz-to-midi-formulas/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4090/midi-to-hz-and-hz-to-midi-formulas/7</guid><dc:creator><![CDATA[gsagostinho]]></dc:creator><pubDate>Wed, 18 Feb 2015 20:16:53 GMT</pubDate></item><item><title><![CDATA[Reply to Midi to hz, and hz to midi formulas on Thu, 19 Feb 2015 04:28:19 GMT]]></title><description><![CDATA[<p>I've recently taken &quot;the tour&quot; to Mathematics Stack Exchange. Initially, I thought it was going to be some sort of light-hearted pics plus some words about the site. Fortunately, it was much better than that.</p>
<p>&quot;The tour&quot; is an interesting way of inviting you to read the rules. I think these rules also act as  a reminder, a reminder of the important stuff.</p>
<p>You can, of course, take the &quot;tour&quot; by yourself, but these are some of the things you can read there.</p>
<ul>
<li>Ask questions, get answers, no distractions.</li>
<li>This site is all about getting answers. It's not a discussion forum. There's no chit-chat.</li>
<li>Get answers to practical, detailed questions.</li>
<li>Focus on questions about an actual problem you have faced.</li>
<li>Not all questions work well in our format. Avoid questions that are primarily opinion-based, or that are likely to generate discussion rather than answers. Questions that need improvement may be closed until someone fixes them.</li>
</ul>
<p><a href="http://math.stackexchange.com/tour" rel="nofollow">http://math.stackexchange.com/tour</a></p>
<p>As <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/dangrondang">@dangrondang</a> (F.) said, hope this helps.</p>
<p>Cordially, Landon</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4090/midi-to-hz-and-hz-to-midi-formulas/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4090/midi-to-hz-and-hz-to-midi-formulas/8</guid><dc:creator><![CDATA[LandonPD]]></dc:creator><pubDate>Thu, 19 Feb 2015 04:28:19 GMT</pubDate></item></channel></rss>