Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6718237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:56:44+00:00 2026-05-26T08:56:44+00:00

As we go up the musical scale the note frequency increases; #define A4 440

  • 0

As we go up the musical scale the note frequency increases;

    #define A4 440 // These are the frequencies of the notes in herts
    #define AS4 466
    #define B4 494
    #define C5 523
    #define CS5 554
    #define D5 587

I am generating the tones mechanically, I tell a step motor to step, delay, step, delay etc etc very quickly.

The longer the delay between steps, the lower the note. Is there some smart maths I could use to inverse the frequencies so as I climb up the scale the numbers come out lower and lower?

This way I could use the frequencies to help calculate the correct delay to generate a note.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:56:44+00:00Added an answer on May 26, 2026 at 8:56 am

    So what you’re saying is you want the numbers to represent the time between steps rather than a frequency?

    440 Hz means 440 cycles/second. What you want is the number of seconds/cycle (i.e. time between steps). That’s just 1 / <frequency>. That means all you have to do is define your values as 1/440, 1/466, etc. (or, if you want the values to be milliseconds, 1000/440, 1000/466 etc.)

    If that is too fast (or doesn’t match the actual notes), you can multiply each value by a scale factor and the relationships between the audible tones should remain the same.

    For example, lets say that you empirically discover that for your machine to make an “A4” tone, the delay between steps is 10 milliseconds. To figure out the scale factor, solve for x:

    x / 440 = 10
    x = 4400
    

    So define scale = 4400, and define each of your notes as scale / 440, scale / 466 etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for a Windows library that can draw musical notes on the screen
I have the following Play method for playing musical notes stored in an arraylist:
I am interested in how to take musical notes (e.g A, B, C#, etc)
I am trying to use ANN for pitch detection of musical notes. The network
Is there an up-to-date Windows Library which allows the playing of individual musical notes?
The class below is supposed to represent a musical note. I want to be
I'm wondering if I can extract a sequence of musical notes from a recorded
How would you model a simple musical score for a single instrument written in
The challenge The shortest code by character count, that will output musical notation based
I'm developing a musical game, it's like a singstar but instead of singing, you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.