BASIC

Author Topic: [Windows Only] .mid - Midi file creation library.  (Read 2906 times)

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1577
  • Particle Hawk
    • View Profile
    • Silver Volumetric Software
This library was created by Björn Rosenthal AKA Moru, in 2008 for GLBasic.
Have fun with this,
-Neil
ps. midi structure is a bit cryptic, you should probably learn about midi format before attempting to make software with this lib.


edit: Aug 14, 2015
Version 14.002 can still compile this to run with success on windows 7.
« Last Edit: 2015-Aug-16 by Hemlos »
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

http://silver.binhoster.com/

Offline fuzzy70

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 828
  • Look left, Look right, LOOK OUT!!
    • View Profile
Re: Midi file creation library.
« Reply #1 on: 2013-Jan-12 »
Will give this one a good look over as I use midi a lot with VST's & other soft synths. May come in very handy for some midi file processing converting between the different midi file types or even splitting midi tracks into separate files. I have similar utils that I wrote myself years ago on the Amiga.

Thanks for posting this  =D

Lee
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3321
  • Integrated Brain
    • View Profile
Re: Midi file creation library.
« Reply #2 on: 2013-Jan-12 »
Yes I take a quick look, and it's very nice... I like the mode for creating sounds... this it's a point I like to know how do it... In the SFXR Port of Gernnot I saw the .wav, but I don't understood too much how do it...

Thanks I think this it's very Usefully, I think whit Arduino, it's possible make nice things...

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1577
  • Particle Hawk
    • View Profile
    • Silver Volumetric Software
Re: Midi file creation library.
« Reply #3 on: 2015-Aug-15 »
I updated this project to be compatible with GLBasic 12 and 14.
It compiles and runs with success on Windows 7.

Code is at the top of the thread.
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

http://silver.binhoster.com/

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1577
  • Particle Hawk
    • View Profile
    • Silver Volumetric Software
Re: Midi file creation library.
« Reply #4 on: 2015-Aug-15 »
I updated this again...aug 15 2015 @ 7:30 am est
the project demonstrates the midi file format better than the original version.
the midi lib is updated , thus i must upload the whole project not just the example file.
It plays the first few bars of twinkle twinkle little star with a trumpet.

Im no expert at midi format, HOWVER, because i understand and can convert/transpose sheet music, into midi notes.
Also, with this new project, it can push someone a little bit easier, into making some kind of composer program.
I would if i had time, but i really dont, and just need a couple simple midis, which i will convert to wav somehow later on.

Project is at the top of the thread as usual

ps. if you look have been studying this format here, you will notice in the new project i added 2 functions which simplify playing a note,
As time goes on this library could be enhanced and made more higher level of coding, thus making it easier to code some music.
Also i turned the file into a TYPE. And i added some if statements that were needed to more logically produce a midi file.

« Last Edit: 2015-Aug-15 by Hemlos »
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

http://silver.binhoster.com/