Rough 'n Ready Audio Frequency extraction with a PIC


Results 1 to 34 of 34

Threaded View

  1. #7
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by scalerobotics View Post

    It looks like you are on the right track to me. If you like your decimals, use the 50 million instead of the 500,000. Then, when you go to print out your number, you can add your decimal back in like this.

    [code]
    LCDOut dec frequency/100,".",dec frequency//100," Hertz"[FONT=Verdana]
    Nice one & that suggestion of yours puts the decimal point in nicely...
    Code:
    Count    Converted to frequency...
    1935	258.39 Hertz
    1936	258.26 Hertz
    1936	258.26 Hertz
    1936	258.26 Hertz
    1935	258.39 Hertz
    1935	258.39 Hertz
    1935	258.39 Hertz
    1936	258.26 Hertz
    1936	258.26 Hertz
    1936	258.26 Hertz
    1936	258.26 Hertz
    1935	258.39 Hertz
    1935	258.39 Hertz
    1935	258.39 Hertz
    1937	258.13 Hertz
    1936	258.26 Hertz
    1936	258.26 Hertz
    1935	258.39 Hertz
    1935	258.39 Hertz
    (My sig gen actually shows 258.4 on its LED readout when the above was seen)

    The closest musical note to 258.3(ish)Hz is C (261.63Hz) ....the semi-tones either side of C, are B (246.94Hz) & C# (277.18Hz) ....so the error of ± 0.2Hz I'm seeing above isn't likely to be that much of a problem in the great scheme of things.

    Many thanks for all your input - I might now just go off on a tangent & have a dabble with guitar to midi!
    Last edited by HankMcSpank; - 28th August 2010 at 16:01.

Similar Threads

  1. Measuring change of frequency with PIC
    By Aussie in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 19th July 2007, 01:47
  2. PIC Audio
    By toofastdave in forum mel PIC BASIC Pro
    Replies: 28
    Last Post: - 27th June 2007, 13:49
  3. Pic driven digital audio delay
    By skimask in forum Off Topic
    Replies: 12
    Last Post: - 19th April 2007, 20:42
  4. Audio Encoding and playback in a PIC
    By Rob in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 24th March 2005, 08:56
  5. Frequency Counter using PIC and PicBasic
    By PICtron in forum mel PIC BASIC Pro
    Replies: 31
    Last Post: - 28th January 2005, 06:20

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts