Anyone did a simple 1 channel midi file import routine?


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2013
    Posts
    1,078

    Default Anyone did a simple 1 channel midi file import routine?

    Hello.
    I'm making an LED clock for my daughter, and she wants for alarm tune to be "never gonna give you up", played in 1 channel beeper sound.
    I have appropriate midi, and by looking into music editor, I can manually copy note heights, durations and pauses, but maybe there is some PBP friendly method, for converting midi sequence into sequence of data? like

    110=C3, 111=C3#, 112=D3 and so on.

  2. #2
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: Anyone did a simple 1 channel midi file import routine?

    I have a project/product that uses tones generated with NCO. I created a generic #include file that lists the T2PR, T2CON, and NCO1INCU_H_L values for each note over 3 octaves. When I want a note, I call that subroutine. I then PAUSE for the note duration (have to run the math for 1/8, 1/4, 1/2, whole, etc.). Entire ditties are "canned" into a subroutine.

    As for MIDI, I never worked with it. Nuts and Volts Magazine has featured several articles dealing with MIDI over the past couple years. I would assume you could equate a MIDI value to an NCO subroutine equivalent.

  3. #3
    Join Date
    Feb 2013
    Posts
    1,078


    Did you find this post helpful? Yes | No

    Default Re: Anyone did a simple 1 channel midi file import routine?

    I have no issues with generating the sound, I'm having issues with automating it's import into PBP. In fact, I need more a PC software, which will parse midi file and convert it to byte sequence.

Similar Threads

  1. Simple 4 channel DMX controller
    By eggman in forum Code Examples
    Replies: 19
    Last Post: - 18th July 2012, 02:40
  2. Simple "Time-out" routine
    By JacoMuller in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 4th May 2010, 10:16
  3. A Simple IOC Routine (Interrupt On Change)
    By lugo.p in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th March 2010, 20:53
  4. Replies: 0
    Last Post: - 3rd February 2009, 00:23
  5. convert .HEX file to .ASM or .BAS file ???
    By iugmoh in forum General
    Replies: 4
    Last Post: - 31st March 2008, 20:19

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