Anyone did a simple 1 channel midi file import routine?


+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2013
    Posts
    625

    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
    Northeast
    Posts
    353

    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
    625

    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, 01:40
  2. Simple "Time-out" routine
    By JacoMuller in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 4th May 2010, 09: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, 19:53
  4. Replies: 0
    Last Post: - 2nd February 2009, 23:23
  5. convert .HEX file to .ASM or .BAS file ???
    By iugmoh in forum General
    Replies: 4
    Last Post: - 31st March 2008, 19:19

Posting Permissions

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