melody


Closed Thread
Results 1 to 6 of 6

Thread: melody

  1. #1
    jojokatada's Avatar
    jojokatada Guest

    Default melody

    hi i would like to use pic16f84a to generate some tones

    in the sound command of the pBP manual from 1 to 127 are tones ragne from 78hz to 10,000hz
    while the piano has 88 tones from 27hz to 4,186hz

    anybody have experience in using the sound command to generate some tones.

    or i want to know in 128 tones from the sound command which range is the correspondingthe the 88 tones of the piano.

    appreciate for suggestion,help

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    to generate multiple specific tone frequency, i'll really prefer to use the 16 bit internal timer.

    Since you know your frequency range... it's a bit easy to calculate the according period you'll need. Use this period to get the according timer interrupt and VOILA.

    OR have a variable external Oscilator and vary the frequency using a digital potentiometer like those microchip MCP42010 or else...

    I figure SOUND statement is mostely use to drive piezo transducer.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    jojokatada's Avatar
    jojokatada Guest


    Did you find this post helpful? Yes | No

    Default

    apreciate for the suggestion

    can i use the sound command to drive a speaker small 8ohm
    do i need any other component?

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    a few uF capacitor in serie with your speaker can do the job... see PBP manual
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Feb 2005
    Location
    Revelstoke BC Canada
    Posts
    14


    Did you find this post helpful? Yes | No

    Default

    The sound command outputs specific tones, none of which coinside with the notes on the piano, or with midi note numbers. If you want to output specific tones, use the FREQOUT command. Here is a link that will give you the note name, frequency and midi number for all the notes on an 88 note piano.

    http://www.phys.unsw.edu.au/~jw/notes.html

    Dave

  6. #6
    jojokatada's Avatar
    jojokatada Guest


    Did you find this post helpful? Yes | No

    Default

    thank DWV for the link

Similar Threads

  1. Making Music Still........
    By Mathy Knaapen in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 28th May 2007, 07:54

Members who have read this thread : 1

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