Settings

Theme

Show HN: MeloCraft – Pitch detection in real-time

melocraft.net

36 points by robhack 10 years ago · 22 comments

Reader

robhackOP 10 years ago

Hello, I made this tool when I started learning the violin and wanted to correct my pitch despite not having a musical ear. I figured it might be useful to other people (:

  • SwellJoe 10 years ago

    So, has it helped you "tune" your ear? i.e., are you able to correct your pitch without the tool now that you've spent time practicing with it? I've often wondered about that. I learned guitar at such a young age, that I don't have a good recollection of the process of learning to have a reasonably good ear, or if it was something I already had and had to just learn to listen to.

    As an adult, I've often gone years without seriously practicing music, and yet the basic ability to hear notes and tune instruments remains strong, no matter what. The ability to name notes and recognize chords on demand (so-called "relative pitch") does require me to refresh my memory with practice whenever I take a long break from music, but recognizing when things are sharp or flat, and by how much, seems to be permanent and require no practice no matter how long it's been. So, I theorize (and have read about science on the subject) that there may be a variety of parts of the mind that handle these subjects. But, I don't recall reading if they're all in-born skills or are acquired. Perfect pitch may be teachable to the very young...but not adults, so maybe my tuning ability simply developed and "stuck" because I was young. I dunno.

    • robhackOP 10 years ago

      Hard to say, I feel it helped a little, as in, when I'm playing with my teacher (without MeloCraft), I more often get the feeling « oh, that doesn't quite sound right, I should move my fingers a little bit ». But that's N=1 and I didn't do any meaningful before/after tests.

      That said, even if the tool doesn't help for the musical earing directly, it can still help to correct the position of your fingers, and that's very important for muscle memory. So instead of training for hours on the wrong finger position because I don't have a musical ear, I can correct myself and properly train my muscle memory correctly.

      Well, you're very lucky to have a relative pitch, I think you can still train for it as an adult, but it may require more time and still might not be possible for everyone. Don't take my word for it thought, I don't recall any solid research on the subject.

      • SwellJoe 10 years ago

        Relative pitch is definitely learnable as an adult. So-called perfect pitch is the ability that has been thought to be something you're born with, or not, but more recent research indicates that kids can have it "turned on", or at least, kids can develop relative pitch that is good enough to be indistinguishable from perfect pitch, for all intents and purposes (the listener just has to refresh their pitch memory with a reference pitch now and then...maybe once a day).

  • elihu 10 years ago

    For violin, I would recommend placing your horizontal guide lines to correspond to a just scale rather than 12-tone equal temperament.

    Another type of tuning visualization that only works with just-tuned instruments is to have something like an oscilloscope, with the vertical axis connected to a microphone or pickup and the horizontal sweep set to be the same frequency as the root of your key. An interesting thing that happens is that, for any note that makes a whole-number ratio with respect to the horizontal sweep rate, you get a standing wave. If it's drifting to one side, it's sharp, and if it's drifting the other way it's flat.

    I experiment with just-tuned guitars, and this is what I do with an old analog oscilloscope to check if my intonation is right.

    • robhackOP 10 years ago

      That's very smart, thanks for the suggestion, it also shouldn't be too hard to add (:

      Just-intonation and other tunings will be my top priority, there was a lot of demand for it in the violonist reddit.

  • adam-a 10 years ago

    Hi, nice tool. I just gave it a go and it seems reasonably accurate. I've recently been developing something similar - I'm detecting singing pitch for use in a game. I wonder did you use any particular method for detecting the pitch?

    • robhackOP 10 years ago

      It's FFT-based. Then I do some basic computation to try and guess the « best » peak, taking the harmonics into account. Still need lots of work and I suck at math.

    • xyzzy_plugh 10 years ago

      Not sure about OP, but I've always loved the simplicity of counting the zero cross-overs in one direction (E.g. positive to negative) with some gutter. With raw PCM this is trivial to implement in any language -- I last did this in bash. Then you just do a look up from frequency to note and you're done. It's also not very CPU intensive, and you can even sample less frequently and get pretty great results.

an_ko 10 years ago

Asking me to subscribe to get a download link, with the only way to avoid it being a link that doesn't look like a link seems evil to me. Please reconsider.

  • robhackOP 10 years ago

    I'm sorry you feel this way, as brudgers wrote, there is still a small link at the bottom to download without subscribing.

    Getting some subscribers is very important to me because I make this tool in my free time, and the only way I can justify spending more time on it is if I have some users who care about the tool. If I shall burn in hell for this, then so be it.

  • brudgers 10 years ago

    There is a link to display the download links in small text under the subscribe.

    Calling a signup 'evil' is a bit over the top. People who don't spend their days on the web are less familiar with the less obvious ways of gleaning user data...e.g. current Google or Facebook logins, third party trackers, etc.

    • pconner 10 years ago

      > Calling a signup 'evil' is a bit over the top.

      On HackerNews, the word "evil" might as well mean "kind of annoying." Use Mailinator or a similar throwaway email service if you don't want to sign up.

nacs 10 years ago

Crashes instantly on start (on Windows):

  Fault Module Name:	Qt5Gui.dll
  Exception Code:	c0000005
  Exception Offset:	00044856
  • robhackOP 10 years ago

    That's odd, can I ask what version of Windows you're running? How much RAM you got?

    I only tested it on Win7 and had a friend test it on Win8 and Win10.

josh-wrale 10 years ago

Looks like it would be good for setting intonation on a guitar or similarly stringed instrument. Cool!

rasz_pl 10 years ago

so its like http://sdr.osmocom.org/trac/wiki/fosphor but limited to audio?

  • pdkl95 10 years ago

    While it hasn't been updated in a while (get ready for OSS and JACK support only (use jack)) and the website has a few missing images, it's hard to beat baudline for frequency analysis.

    http://www.baudline.com/what_is_baudline.html

    • robhackOP 10 years ago

      I’m on Windows so I can’t test this one, but seeing from the screenshots, it does not seem to be aimed at musical notes and musicians.

      I don't aim to be the best at frequency analysis. My goal is to help beginner musicians to get more confidence about their pitch accuracy.

  • robhackOP 10 years ago

    I only took a quick look for now, but this doesn't seem to give you musical note names? MeloCraft is mainly aimed at musicians, not really for general-purpose spectrogram analysis.

    Also, no Windows binaries available? I understand it's open-source, but that's not very user-friendly imo.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection