Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Looking for a MIDI solution
#5
(09-02-2023, 07:17 PM)SagaraS Wrote: The Music.mid is in an archive at offset address &H400.
For example, I want to load the data into an array and send it to an API like Winmm. Is that possible? And if so how?
In addition to what the others have said about QB64-PE's native MIDI support (using `$Unstable:Midi` and `$MidiSoundFont`), QB64-PE also has the ability to load music files (such as MIDI) from a string rather than a file, see the notes on using the `"MEMORY"` capability with _SNDOPEN.

Point being, you can open your archive file yourself, seek to `&H400` and read the contents of `Music.mid` into a `String`, and then pass that `String` directly to `_SNDOPEN` to be able to play it. Doing it that lets you play the sound without `Music.mid` being in a separate file. You can see an example of this at the bottom of the `_SNDOPEN` page, it reads the sound from `DATA` statements rather than from within a separate file but the concept is the same.
Reply


Messages In This Thread
Looking for a MIDI solution - by SagaraS - 09-02-2023, 07:17 PM
RE: Looking for a MIDI solution - by bplus - 09-02-2023, 07:35 PM
RE: Looking for a MIDI solution - by SMcNeill - 09-02-2023, 07:41 PM
RE: Looking for a MIDI solution - by SMcNeill - 09-02-2023, 07:43 PM
RE: Looking for a MIDI solution - by DSMan195276 - 09-02-2023, 08:22 PM
RE: Looking for a MIDI solution - by SagaraS - 09-03-2023, 12:40 AM
RE: Looking for a MIDI solution - by SMcNeill - 09-03-2023, 12:43 AM
RE: Looking for a MIDI solution - by SagaraS - 09-03-2023, 01:27 AM
RE: Looking for a MIDI solution - by mnrvovrfc - 09-03-2023, 01:37 AM
RE: Looking for a MIDI solution - by SagaraS - 09-03-2023, 01:52 AM
RE: Looking for a MIDI solution - by SMcNeill - 09-03-2023, 02:22 AM
RE: Looking for a MIDI solution - by SagaraS - 09-03-2023, 02:36 AM
RE: Looking for a MIDI solution - by SMcNeill - 09-03-2023, 09:30 PM
RE: Looking for a MIDI solution - by grymmjack - 09-06-2023, 12:07 AM
RE: Looking for a MIDI solution - by SMcNeill - 09-03-2023, 02:33 AM
RE: Looking for a MIDI solution - by DSMan195276 - 09-03-2023, 03:09 AM
RE: Looking for a MIDI solution - by mnrvovrfc - 09-03-2023, 03:13 AM
RE: Looking for a MIDI solution - by MasterGy - 09-03-2023, 06:48 AM
RE: Looking for a MIDI solution - by grymmjack - 09-03-2023, 02:18 PM
RE: Looking for a MIDI solution - by SagaraS - 09-03-2023, 11:26 AM
RE: Looking for a MIDI solution - by a740g - 09-03-2023, 12:09 PM
RE: Looking for a MIDI solution - by grymmjack - 09-03-2023, 02:27 PM
RE: Looking for a MIDI solution - by SagaraS - 09-03-2023, 06:37 PM
RE: Looking for a MIDI solution - by mnrvovrfc - 09-05-2023, 04:40 PM
RE: Looking for a MIDI solution - by grymmjack - 09-06-2023, 12:10 AM
RE: Looking for a MIDI solution - by mnrvovrfc - 09-06-2023, 07:05 AM



Users browsing this thread: 20 Guest(s)