Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Creating Scales
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Goatboy  
View profile  
 More options Apr 26 2009, 3:50 pm
From: Goatboy <goatboyrob...@gmail.com>
Date: Sun, 26 Apr 2009 12:50:09 -0700 (PDT)
Local: Sun, Apr 26 2009 3:50 pm
Subject: Creating Scales
Peter! I've managed to create extra sets of scales within the code
that I'm then able to access with a button now but I was wondering how
you created the system of numbers that represent the chromatic scale!
Is this from a formula?
and is there a chart somewhere on the web to facilitate putting scales
together more easily from this system?

   Thanks, Goatboy


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Knight  
View profile  
 More options Apr 26 2009, 4:37 pm
From: Peter Knight <cathed...@gmail.com>
Date: Sun, 26 Apr 2009 13:37:23 -0700 (PDT)
Local: Sun, Apr 26 2009 4:37 pm
Subject: Re: Creating Scales
You can save yourself some time by copying numbers from the midiTable
- which has MIDI pitches for all notes 0 - 127. Note 60 is middle C,
then it moves in semitones.

Mapping from frequency:
value = frequency(Hz) * 65536 / 31250

Mapping from MIDI note:
value = (65536 / 31250) * 440 * 2^((note-69)/12)

Those constants are:
65536: The counter for phase angle is 16 bits wide, so 65536 is one
full waveform cycle.
31250: Sample rate of the output in Hz.
440: Frequency of A above middle C. Most instruments standardise on
this being exactly 440Hz: "A440" tuning.
69: MIDI note of A above middle C.
12: Semitones in an octave
2: An octave note is a doubling of frequency.

Some worked examples:
A above middle C is 440Hz. Table entry is 440 * 65536 / 31500 =
922.75, so use the nearest whole number, "923".
Middle C is 261.63Hz. Table entry is: 261.625 * 65536 / 31250 =
548.67, so use "549".

You are limited to the values 1 (0.48Hz) to 32767 (15624.52Hz) -
although I doubt you want to be going up that high anyway! Past 32768,
pitch starts going down again.

Hope that helps!

Peter

On Apr 26, 8:50 pm, Goatboy <goatboyrob...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Knight  
View profile  
 More options Apr 26 2009, 4:38 pm
From: Peter Knight <cathed...@gmail.com>
Date: Sun, 26 Apr 2009 13:38:48 -0700 (PDT)
Local: Sun, Apr 26 2009 4:38 pm
Subject: Re: Creating Scales
Errata:

A above middle C is 440Hz. Table entry is 440 * 65536 / 31250 =
922.75, so use the nearest whole number, "923".

On Apr 26, 9:37 pm, Peter Knight <cathed...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Goatboy  
View profile  
 More options Apr 26 2009, 4:41 pm
From: Goatboy <goatboyrob...@gmail.com>
Date: Sun, 26 Apr 2009 13:41:33 -0700 (PDT)
Local: Sun, Apr 26 2009 4:41 pm
Subject: Re: Creating Scales
Thanks very much for that Peter!!!

On Apr 26, 9:38 pm, Peter Knight <cathed...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »