Determine Musical note

0 favourites
  • 6 posts
From the Asset Store
100+ Musical High Quality Sound Effects for your game!
  • Hey all. I could use some assistence.

    I'm looking for a solution or a resource to translate Audio to a musical note. I want to create a typing like game, but instead use an electric violin.

    So more like Rock Smith. The problem is that sound numbers boggle my mind. So I'm looking for an answer or at least some place I can try and put all these numbers in the Audio/UserMedia plugin to use.

    I appreciate the reply in advance.

  • Probably not what you are looking for

    I don't understand what it is you are trying to achieve exactly, but it sounds interesting nonetheless..

  • jayderyu : the answer to what you are looking for is in the Fast Fourier Transform operation. Using that mathematical algorithm, you can divide an audio sample in frequency bands. Each of those band can then be checked to see if there's something in it (usually a given note, C, D#, and so on...).

    You can't do that in pure javascript, it's too slow. But there are nodes in the WebAudio API that let you use it. I don't know if Ashley already exposed those nodes to the C2's interface.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I don't know if Ashley already exposed those nodes to the C2's interface.Yes, the analyzer effect provides you with FFT and access to individual frequency bins.

  • Pode

    thanks for the start. Appreciate. Got up to displaying the bands. I think. There is a sample in one of the web audio api's. I managed to link the mic to Audio using the analyzer effect. Using the sample I now have an effect array of frequency. however i'm not sure how to yank from a large number of frequency samples to determine which not is playing.

    But your insight did give me some ideas to test out.


    That's a helpful end point once I can determine the frequency currently being played :)

  • jayderyu : in theory, each note has a pure frequency, you can get those in lists like the one provided by In practice, no instrument or human voice is pure, so you'll get frequencies leaking in near bands. Furthermore, each note produced by an instrument has some harmonics, with are multiples of the base frequency, in different bands. To determine which bands are the base of the note, you need also to check the power (intensity) of the frequency.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)