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

  • SEARCH
  • Home
  • 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 6630813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:27:34+00:00 2026-05-25T22:27:34+00:00

I am programming a small synthesizer application and I input musical notes by clicking

  • 0

I am programming a small synthesizer application and I input musical notes by clicking along the length of a bar. Now, the musical scale is logarithmic and my question is, how do I convert the position of the mouse to a relevant pitch. At the moment I calculate a ratio. It works, sort of, but I get a wide range of closely packed low notes, and at the far end I takes of with just a few pixels translating into multiple octaves.
Basically I want, if I click at the center of the bar (1/2), the frequency is doubled, and 1/4 is another double in freq. etc…
I’m being stupid here!

  • 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-25T22:27:35+00:00Added an answer on May 25, 2026 at 10:27 pm

    Frequencies of musical notes are indeed logarithmic. The frequency doubles when you go one octave higher, and halves when you go one octave lower. A standard A is exactly 440Hz.

    So, you need a power law to translate location into a frequency. Something like f*2.0^(x/w) where w is the width of an octave, f is a scale factor and ^ is the power operator.

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

Sidebar

Related Questions

If you were programming a small database application in .NET 2008 right now would
This question is about programming small microcontrollers without an OS. In particular, I'm interested
When programming in Eclipse I use small vertical bar on the right side of
I'm programming a small app with opengl for the iphone, and now I want
I'm currently trying to make a small testing application for various programming tasks. It
I am beginner in C# programming. I have encountered small problem during building application
I have just started programming and have made a few small applications in C
In Karl Seguin's Foundations of Programming there is a small section on using the
I am just new to programming in Unix and have a small issue that
I am having a small problem. I am a beginner to iPhone programming so

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.