MUSIC FILES - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

MUSIC FILES

mr.programmermr.programmer Posts: 4Member
Can somebody out there compose for me any kind of music into pascal music tones(numbers) so that I can develope a program that plays that particular song when its compiled and run.
ie
sound()
delay()
nosound
sound()
delay()
etc
Help please im in a fix

Comments

  • PerranPerran Posts: 241Member
    : Can somebody out there compose for me any kind of music into pascal music tones(numbers) so that I can develope a program that plays that particular song when its compiled and run.
    : ie
    : sound()
    : delay()
    : nosound
    : sound()
    : delay()
    : etc
    : Help please im in a fix
    :
    :
    The parameter that sound() takes is a frequency in hertz. I'm sure the note played back is only approximate. The parameter that delay() takes is in milliseconds. So, make yourself a table of constants and define notes and timing like:
    [code]
    const
    Q = 300; {quarter note}
    H = 600; {half note}
    {etc...........}

    A = 440; {A440...duh}
    G = 392; {G}
    {etc...........}
    [/code]
    Then write yourself a procedure that will play each note for the specified time. You can pass it a frequency and duration. Piece of cake. I wouldn't be surprised if this is schoolwork, so you will need to hack away at it. If you run into problems, post your code back here and someone will help you.
  • delljohnbdelljohnb Posts: 81Member
    : : Can somebody out there compose for me any kind of music into pascal music tones(numbers) so that I can develope a program that plays that particular song when its compiled and run.
    : : ie
    : : sound()
    : : delay()
    : : nosound
    : : sound()
    : : delay()
    : : etc
    : : Help please im in a fix
    : :
    : :
    : The parameter that sound() takes is a frequency in hertz. I'm sure the note played back is only approximate. The parameter that delay() takes is in milliseconds. So, make yourself a table of constants and define notes and timing like:
    : [code]
    : const
    : Q = 300; {quarter note}
    : H = 600; {half note}
    : {etc...........}
    :
    : A = 440; {A440...duh}
    : G = 392; {G}
    : {etc...........}
    : [/code]
    : Then write yourself a procedure that will play each note for the specified time. You can pass it a frequency and duration. Piece of cake. I wouldn't be surprised if this is schoolwork, so you will need to hack away at it. If you run into problems, post your code back here and someone will help you.
    :



    I wish I'd had the internet to look for solutions when I took Pascal back in 1984. LOL.....maybe I'd have more hair still!!!!

    Delljohnb
Sign In or Register to comment.