[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference napalm::commusic_v1

Title:* * Computer Music, MIDI, and Related Topics * *
Notice:Conference has been write-locked. Use new version.
Moderator:DYPSS1::SCHAFER
Created:Thu Feb 20 1986
Last Modified:Mon Aug 29 1994
Last Successful Update:Fri Jun 06 1997
Number of topics:2852
Total number of notes:33157

2203.0. "Back to basics - calculating frequencies" by WOOF::DRIGIAN () Wed Dec 13 1989 16:58

    After reading a few of these notes I have figured out that the note
    A is played at 440hz.  How would one then calculate the frequencies
    for the rest of the scale, ie B C D E F G and the sharps and flats.
    
    I am aware of the calculations for octaves, 20hz, 40hz, 80hz... etc.
    But how is it posible to calculate the frequency needed to create a
    C in the octave between 20 and 40hz.  
    
    As you may now realize my knowledge in this area is pretty limited, but
    I am very willing to do whatever it takes to learn this stuff.  Feel
    free to point me toward other notes (I haven't found any yet) or
    send me mail off-line.  I have lots of other musicical--technical
    questions, but I'll try not to ask to many that may be answered by
    my earlier questions.
    
    
    						Bryon
    MALCMX::DRIGIAN
    WOOF::DRIGIAN
    NAC::DRIGIAN
T.RTitleUserPersonal
Name
DateLines
2203.1under vms: $ bas scale then $ lin scale $ run scaleVIKING::JANZENTom FXO-01/28 228-5421 MSI ECL TestWed Dec 13 1989 17:0124
    DECLARE REAL CONSTANT LOWC = 16.3516, A440 = 440.0
    DECLARE INTEGER CONSTANT NOTESPEROCTAVE = 12, TopnoteinOctave=11,TopOctave=7

    DECLARE REAL	PITCH
    DECLARE REAL	TemperedScale(0 TO TopOctave, 0 TO TopNoteInOctave)
    DECLARE STRING	NoteNames(0 TO TopNoteInOctave)
    
    RESTORE
    FOR Pitch = 0 to TopNoteInOctave
	READ NoteNames(Pitch)
    Next Pitch

    FOR Octave = 0 TO TopOctave STEP 1
	
	FOR Pitch = 0 TO NotesPerOctave-1 STEP 1
	    TemperedScale(TopOctave,Pitch)=LOWC*2**(((Octave*NotesPerOctave)+Pitch)/12)
            print "MIDI: ";Octave*NotesPerOctave + Pitch + 12;
	    PRINT "Pitch: ";NoteNames(Pitch);Octave;
	    print "Frequency: ";temperedscale(topoctave,pitch)
	NEXT Pitch
    NEXT Octave

DATA "C ", "C#", "D ", "D#", "E ", "F ", "F#", "G ", "G#", "A ", "A#", "B "
END PROGRAM 1
2203.2Good start, What's it all mean???WOOF::DRIGIANWed Dec 13 1989 17:135
    Slick,  I'll convert this into C (the language not the note) so I
    can use it with other programs.
    
    						Bryon
    
2203.4An Octave is A Dollar After Inflation?DRUMS::FEHSKENSThu Dec 14 1989 11:5120
    A little background that may make the algorithm more than just
    something to translate:
    
    What you'll get is an "even tempered" scale, which is what just
    about everybody uses today.  There are other scales, but that's
    a whole 'nother discussion.
    
    An even tempered scale divides the octave into 12 equal steps.
    As the ear/brain perceives pitch based on ratios of frequencies,
    this means that each successive note's frequency is the same multiple
    of the previous note's frequency.  Since there are 12 notes in the
    octave, there are 12 successive multiples, so we get r^12 = 2, or
    r = 2^(1/12).  The 12th root of two is about 1.06...
    
    Real pitchweenies talk about "cents".  A cent is 1/100 of a half
    step, or 1/1200 of an octave, i.e., the 1200th root of 2.  Cents
    are useful for talking about small pitch differences.
    
    len.
     
2203.5I cents understandingWOOF::DRIGIANThu Dec 14 1989 12:151
    This is beginning to make cents!
2203.6TOCATA::PICKETTDavid - Beware of the dogma.Thu Dec 14 1989 19:234
    34 Cents. Is that the standard 'Stretch' as in stertched octaves in
    piano tuning? If so, I'll experiment with my ESQ-1
    
    dp
2203.7-23 to +34 across the 88DDIF::EIRIKURThe best of tines, the worst of tinesThu Dec 14 1989 20:2716
Looking at the tuning chart for my Yamaha CP60M, which may be a bit different
from a "normal" piano (if there is such a thing), I see that the highest note
is to be tuned 35 cents sharp, and the lowest note 23 cents flat.  This is
obviously what stretch tuning is all about.

Having now tuned the beast, I can say that this doesn't seem to be unnatural.
It sounds right tuned this way, and when tuned dead-on, the extremes of the
keyboard beat against the middle octaves.  I will have to look up an
explanation for this effect.

	Eirikur

Roland is touting the stretch-tuning modes on their new Rhodes pianos.  I
wonder if this is really a relevant feature.  I somehow suspect that they don't 
produce "inharmonic" samples, which is *why* one would need to stretch-tune.
Maybe they do have special samples....
2203.8perfectly in tune=frigidMILKWY::JANZENTom FXO-01/28 228-5421 MSI ECL TestFri Dec 15 1989 13:0611
    Each piano is different.  You can't tune j-random piano to a frequency
    counter to math some other j-random piano.  It won't be right.
    It might work on electric pianos because their physics is simpler, I
    suspect.
    In the old scientific american article the physics of the piano I seem
    to recall that the 43rd harmonic of a piano tone was a perferct fourth
    high, roughly.  That's around 5+ octaves.  However, such a high
    harmonic is very hard to hear.  Lower harmonics, being louder, probably
    produce the beats we hear as normal piano sound, a kind of "warmth"
    when not excessive.
    Tom