Author Topic: MIDI Player  (Read 4278 times)

0 Members and 1 Guest are viewing this topic.

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
MIDI Player
« on: November 04, 2006 »
Here is a simple C code to play MIDI music that I have used in my entry for CC Compo - "The Graveyard".

 I hope someone find it useful  :)


Compile with Dev-Cpp 4.9.9.2


 :cheers:


Challenge Trophies Won:

Offline taj

  • Bytes hurt
  • DBF Aficionado
  • ******
  • Posts: 4810
  • Karma: 189
  • Scene there, done that.
    • View Profile
Re: MIDI Player
« Reply #1 on: November 04, 2006 »
thanks rbraz :-) karma up!
Challenge Trophies Won:

Offline taj

  • Bytes hurt
  • DBF Aficionado
  • ******
  • Posts: 4810
  • Karma: 189
  • Scene there, done that.
    • View Profile
Re: MIDI Player
« Reply #2 on: November 04, 2006 »
OMG I never knew it was that small! Man you learn something everyday.
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: MIDI Player
« Reply #3 on: November 05, 2006 »
FWIW I used the same code to play the mp3 file in my demo.
Code: [Select]
mciSendString("open waveaudio pumpkin.mp3 alias mymp3");
mciSendString("play mymp3");

Fryer's demo does the same with his midi file.

Jim
Challenge Trophies Won:

Offline taj

  • Bytes hurt
  • DBF Aficionado
  • ******
  • Posts: 4810
  • Karma: 189
  • Scene there, done that.
    • View Profile
Re: MIDI Player
« Reply #4 on: November 05, 2006 »
lol if I loaded my synth code , you'd be here for days reading it...its so big it crosses multiple files.
Challenge Trophies Won:

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1315
  • Karma: 96
    • View Profile
Re: MIDI Player
« Reply #5 on: November 05, 2006 »
Ah, didn't know it could play mp3s. There's an example program for playing midis and wavs in freebasic at:

Freebasic->Examples->windows->winmm->winmmhlp.bas