[PD] making scales from frequency values

Lorenzo lsutton at libero.it
Tue Jul 21 11:29:36 CEST 2009


A couple of thoughts.

It might be useful to think in terms ratios instead of absolute 
frequency values if you want to generalise your model so instead of 912, 
2434, 4575 etc. 1, 2.66..., 5.01 and thus expressing all the frequencies 
you found experimentally as ratios.

This can help when dealing with scales and 'musical' (esp. tonal) 
intervals because our perception of pitch is not linear (so for example 
the interval between 110 Hz and 220 Hz is perceived as an octave 
'difference', and so is the one between 220 and 440, yet their 
mathematical difference is respectively 110 and 220).

Just to complicate things :)... Also keep in mind that for 'realistic' 
modelling of instruments you have to consider how partial presence and 
quality changes with the changing of the fundamental pitch for many 
various reasons some of which related to the intrinsic features of that 
particular instrument (frequencies involved, meterials, shapes etc.)
A good intuitive example of this is the piano where you can clearly hear 
that lower the pitches (played keys) sound 'richer', than higher ones.
(I think this article might be interesting in this regard: 

Kind regards,

Andrew Turley wrote:
> The ratios are maintained because you're multiplying (I'm not quite
> sure what you mean by "even out"). But yes, you could also convert to
> MIDI and then use addition, and then convert back to set the
> oscillator. Six of one, half-a-dozen of the other.
> andy
> On Mon, Jul 20, 2009 at 7:06 PM, Mike Moser-Booth<mmoserbooth at gmail.com> wrote:
>> How do these objects even out your ratios (or, I guess, what do you mean by
>> that)? Finding the difference between two frequencies after converting them
>> to a MIDI value allows you to work linearly instead of logarithmically,
>> which is just easier--well, for me anyway. For example, after converting
>> 912Hz and 1081Hz to MIDI and getting the difference, you come up with
>> 2.9431. Now you can just think of them as 2.9431 half-steps apart, and that
>> one number will work starting from any pitch. If you stick to the frequency
>> realm, you'll have to consider them a ratio of 912:1081, which is fine, but
>> a little ugly and not as easy.
>> As far as filling in the gaps, I don't know if this will help at all or not,
>> but it might be something to think about. When you look at how the major
>> scale is constructed, it can be seen as taking advantage of the first few
>> harmonics in the harmonic series. I'll use the C major scale to (try to)
>> illustrate. Going up from C in the harmonic series, you get an octave, a
>> fifth (G), another octave, a major third (E), and another fifth [1]. Those
>> last three notes are a C major triad (C-E-G). Now, stepping back a bit, the
>> first note other than C in the series is G, the fifth, or dominant, in the
>> scale. If you go the other way, down a fifth, you get F, the subdominant.
>> Now, taking the intervals from the C major chord and applying them to G and
>> F, you get G-B-D and F-A-C, respectively. The notes in those chords are what
>> is used to fill in the gaps, and now you have all of the notes of a C major
>> scale: C-D-E-F-G-A-B.
>> I mention all of that because you're already working with partials. So
>> perhaps working with an interval or ratio between two of your partials and
>> applying that to another of your partials to generate new frequencies might
>> get you somewhere. Or it might suck, who the fuck knows :-). Either way,
>> this sounds like an interesting project, and I'd be interested in seeing
>> where you go with all of this.
>> Best of luck,
>> .mmb
>> [1] http://en.wikipedia.org/wiki/Harmonic_series_(music)
>> J bz wrote:
>> Dear Mike and Andrew,
>> Thank you for your speedy responses, though I think I am not explaining
>> myself very well.  I don't want to use mtof or ftom as these objects even
>> out my ratios.  What I'm looking to do is create a scale (say 12 notes for
>> example) out of these ratio's with the possibility of filling in the
>> consonant gaps whilst preserving the original frequencies and ratio's.  The
>> 1st number in each group is the strongest partial so: 912Hz, 1081Hz, 1211Hz
>> etc.  If I'm saying that these frequencies are 'good' to my ear, is there a
>> way of creating equally 'good' sounding notes to fill in the gaps in, say
>> for example, a 12 note scale based on these notes scaling from the lowest to
>> the highest without doing the whole thing 'by ear'?
>> Cheers for weighing in,
>> Jbz
>> On Mon, Jul 20, 2009 at 11:16 PM, Andrew Faraday <jbturgid at hotmail.com>
>> wrote:
>>> Hey Jbz
>>> I'm not sure if this is what you want, but if you convert a midi note to
>>> frequency [mtof] then multiply by integers, you get the natural partials.
>>> So if you multiply the outlet of [mtof] by 2 3 4 5 and 6. then you can
>>> change the multiplication figure, etc. I think that's the effect you're
>>> after.
>>> God bless
>>> Andrew
>>> ________________________________
>>> Date: Mon, 20 Jul 2009 22:24:05 +0100
>>> From: jbeezez at googlemail.com
>>> To: pd-list at iem.at
>>> Subject: [PD] making scales from frequency values
>>> Dear all,
>>> I have five chimes.  I've worked out the frequencies (using Audacity) of
>>> the 5 strongest partials of each chime.  I now want to be able to work out
>>> how to change the octaves of the various partials?  My original intention
>>> was to find the nearest midinote and just use those but after listening to
>>> the results I would much prefer to keep the original ratio's whilst being
>>> able to alter the 'inversions'.
>>> Here's the list that I have already:
>>> BT1
>>>     912Hz
>>>   2434Hz
>>>   4575Hz
>>>   7175Hz
>>> 11584Hz
>>> BT2
>>>   1081Hz
>>>   2861Hz
>>>   5339Hz
>>>   8325Hz
>>> 15209Hz
>>> BT3
>>>   1211Hz
>>>   3196Hz
>>>   5935Hz
>>>   9199Hz
>>> 15206Hz
>>> BT4
>>>   1347Hz
>>>   3553Hz
>>>   6569Hz
>>> 10128Hz
>>> 18139Hz
>>> BT5
>>>   1812Hz
>>>   4699Hz
>>>   8525Hz
>>> 13264Hz
>>> 15469Hz
>>> Is there one piece of mathematrical wizardy that can sort this in Pd?
>>> Cheers,
>>> Jbz
>>> ________________________________
>>> Windows Live Messenger: Happy 10-Year Anniversary—get free winks and
>>> emoticons. Get Them Now
>> ________________________________
>> _______________________________________________
>> Pd-list at iem.at mailing list
>> UNSUBSCRIBE and account-management ->
>> http://lists.puredata.info/listinfo/pd-list
>> _______________________________________________
>> Pd-list at iem.at mailing list
>> UNSUBSCRIBE and account-management ->
>> http://lists.puredata.info/listinfo/pd-list
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20090721/6e82c950/attachment.htm>

More information about the Pd-list mailing list