PLAYMID.BAS and MIDI file. - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3) +---- Forum: Works in Progress (https://staging.qb64phoenix.com/forumdisplay.php?fid=9) +---- Thread: PLAYMID.BAS and MIDI file. (/showthread.php?tid=557) Pages:
1
2
|
RE: PLAYMID.BAS and MIDI file. - a740g - 06-26-2022 (06-16-2022, 04:02 AM)Robert Claypool Wrote: I wrote this and compiled it on 0.8.2 but the MIDI file won't play for me. I would not recommend using older versions of QB64. If you are writing a Windows only program, then look at https://github.com/a740g/AlienAlleyQB64 I got MIDI working using a tiny C header library that I put together. C header: MIDIPlayer.h Code: (Select All) Declare Library "./MIDIPlayer" See the following routine in AlienAlley.bas to see how this is used. Code: (Select All) Sub PlayMIDIFile (fileName As String) Hopefully, soon we'll have native MIDI playback in QB64 using Timidity or FluidSynth. RE: PLAYMID.BAS and MIDI file. - Steffan-68 - 06-28-2022 The program is great. Only as a MIDI payer alone does it work very well. I'm very happy about that. I also have a lot of MOD sound files, but I can't find any way to include them in my programs. Which is actually a shame because they are very small and contain good sound. RE: PLAYMID.BAS and MIDI file. - a740g - 06-30-2022 (06-28-2022, 04:06 PM)Steffan-68 Wrote: The program is great. Thank you! Well, you are in for a treat. If the files are just AMIGA Protracker compatible MODs then you can try a740g/QB64-MOD-Player: A ProTracker (and compatible) MOD player & library written in QB64 (github.com) If you've got S3M, XM & IT then try a740g/QB64-LibXMPLite: LibXMP Player and Library for QB64 (github.com) The second one is based off a similar library by RhoSigma you can find here: https://staging.qb64phoenix.com/showthread.php?tid=29 RE: PLAYMID.BAS and MIDI file. - Steffan-68 - 07-01-2022 (06-30-2022, 09:42 PM)a740g Wrote:(06-28-2022, 04:06 PM)Steffan-68 Wrote: The program is great. Thank you for your prompt reply The first MOD Player is already very good and I like it. I would like the second ( LIBXMP Player ) better but it causes a compiler error for me. The attached EXE runs great. At the moment I just can't find the error why it isn't compiled. Tried it with QB64PE 0.8.2 and QB64 2.0.2 in 64 bit but it always crashes with an error. RE: PLAYMID.BAS and MIDI file. - a740g - 07-03-2022 (07-01-2022, 02:23 PM)Steffan-68 Wrote:(06-30-2022, 09:42 PM)a740g Wrote:(06-28-2022, 04:06 PM)Steffan-68 Wrote: The program is great. From the screenshots you have shared, it seems like QB64 cannot file the required files. Assuming you have extracted the files to its own folder, open QB64 (latest x64 version) and then ensure "Run > Output EXE to Source Folder" is checked. Then load XMPlayer.bas and compiler. You can also download the files again from GitHub. I've submitted some new changes. RE: PLAYMID.BAS and MIDI file. - a740g - 07-03-2022 I have also submitted a new cross-platform MIDI player. Find it here https://github.com/a740g/QB64-MIDI-Player RE: PLAYMID.BAS and MIDI file. - a740g - 07-03-2022 (07-01-2022, 02:23 PM)Steffan-68 Wrote:(06-30-2022, 09:42 PM)a740g Wrote:(06-28-2022, 04:06 PM)Steffan-68 Wrote: The program is great. Ah. I remember why it gives the 12555 error. It's a bug in QB64. I submitted a bug report. However, there is a workaround. See Linking to static libraries does not work on Windows · Issue #112 · QB64-Phoenix-Edition/QB64pe (github.com) And this one https://discord.com/channels/975381912350752819/975383819848912926/985214420487655454 The workaround is in the Discord thread. You'll have to make the changes to the QB64 IDE source code and recompile it. If you want, you can also download the one that I compiled (attachment below). This is for QBPE 0.8.2. Download, then run a virus scan (VirusTotal - Home) and then replace qb64.exe in the QB64 folder with this one. Thank you for calling this out. I've updated the LibXMP GitHub README.md with a note on this bug. RE: PLAYMID.BAS and MIDI file. - Steffan-68 - 07-03-2022 Thanks for your answer. It worked now with this change. I compiled the QB64.exe again and it works great. I have another question, my EXE still has the original size (8.39MB) yours is only smaller (7.96 MB) what else did you change there? RE: PLAYMID.BAS and MIDI file. - a740g - 07-03-2022 (07-03-2022, 12:31 PM)Steffan-68 Wrote: Thanks for your answer. I compiled with Options > C++ Compiler Settings > Compile programs with C++ optimization flag - enabled. Fair warning: Compiling with this enabled, takes a really long time. Also, this will reset some QB64 settings (recent list, stuff under run, etc.) |