Any C programmers wanna help convert code to convert between MIDI + CSV? - 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: Help Me! (https://staging.qb64phoenix.com/forumdisplay.php?fid=10) +---- Thread: Any C programmers wanna help convert code to convert between MIDI + CSV? (/showthread.php?tid=803) |
RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - madscijr - 09-03-2022 (09-03-2022, 03:29 PM)mnrvovrfc Wrote:(09-03-2022, 03:25 PM)madscijr Wrote:Maybe it's not worth the effort. We have to try something else.(09-03-2022, 03:19 PM)mnrvovrfc Wrote: "DECLARE" is not needed in QB64 unless you define routines in mixed-language programming, such as the "direntry.h" file contributed by Steve. Otherwise is what I told you and what @Jack told you LOL, it uses "CALL ABSOLUTE" to load up assembly which works in 16-bit but not in our present time. Would have to run that code in M$QB or QBasic inside DOSBOX or something like that. Is this stuff necessary for reading & writing MIDI files or is it more for playback or other functionality outside of that? Again, not at my PC to really look, but for my purposes at least, all I need is to read & write MIDI, the other stuff can be done however. For playback, I'm just fine with shelling out to WinAmp even RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - mnrvovrfc - 09-03-2022 (09-03-2022, 04:49 PM)madscijr Wrote: Is this stuff necessary for reading & writing MIDI files or is it more for playback or other functionality outside of that? Again, not at my PC to really look, but for my purposes at least, all I need is to read & write MIDI, the other stuff can be done however. For playback, I'm just fine with shelling out to WinAmp evenSomebody else wanted to play MIDI files, with an application created from a BASIC programming system, even more than you did. It was @TempodiBasic trying to help out. He posted information about the "QMIDI" program and others including me commented about it. It was out of this post: https://staging.qb64phoenix.com/showthread.php?tid=803&pid=6182#pid6182 RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - TempodiBasic - 09-04-2022 Hi @MadSciJr don't matter about DECLARE that are needed for QBasic and not for QB64! @ for all interested friends Now I have had time to look into code of QMIDI.BAS.... it is clear that : 1 it had been used ASM in QBasic by Call Absolute! 2 it is clear that the authors claim some OS drivers that managed the MIDI files for playing them -- so the most interesting part of code is a long list of Hex(ASM) code valid for the OS that supports Interrupt at 16/32 bits. Nothing to use today at 64 bits. Well the first question is DOS had MIDIDrivers, and so Windows? Linux? MacOs?.... Is the program, that we must build to read MIDI, translate it to NMN of Jean Jacques Rousseau or SMN (classical pentagram) for a CSV file to edit or to pass to an editing program, translate back text file (both NMN both SMN) to MIDI playable, OS indipendent? Or must it call a library that is different for different OSes? this article tells about MIDI drivers but I think that those drivers are about an hardware MIDI tool that let you play your musical instrument and record it as MIDI file. https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/midi-and-directmusic-components the second question is if it is so (we need drivers to play MIDI files), was it useful to get from freebasic program the way to convert MIDI to PLAY instructions and viceversa? but taking a look into it, it seems not so helpful than I was hoping. So it remains the VB6 project of Utah that gives us sufficient informations to build our MIDI2txt translator for file MIDI with 1 track. And we need informations about multitrack MIDI file's structure. Let's go to collect more informations from your sources and from web! RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - TempodiBasic - 09-04-2022 @SMcNeill yes Steve I yhink you're right, it seems a clone of Qbasic MKL$! RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - Kernelpanic - 09-04-2022 If you put brackets around it, are there fewer mistakes. RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - madscijr - 09-04-2022 (09-04-2022, 06:10 PM)Kernelpanic Wrote: If you put brackets around it, are there fewer mistakes. One thing I learned in VBA is, if you're calling a routine that doesn't return a result (a sub), like mySub(param1, param2, param3) then leave off the parentheses: mySub param1, param2, param3 if you want the parentheses, then put Call before the routine name: call mySub(param1, param2, param3) I'm not sure if this makes a difference in QB64, but in VBA, the IDE doesn't complain about the syntax that way... RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - mnrvovrfc - 09-04-2022 (09-04-2022, 06:10 PM)Kernelpanic Wrote: If you put brackets around it, are there fewer mistakes.Put brackets around what?! RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - Kernelpanic - 09-04-2022 (09-04-2022, 06:51 PM)mnrvovrfc Wrote:(09-04-2022, 06:10 PM)Kernelpanic Wrote: If you put brackets around it, are there fewer mistakes.Put brackets around what?! Didn't you look at the source code? Source code RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - mnrvovrfc - 09-04-2022 All right, you forced me to say it. Didn't you read the two pages before this one and especially what I posted and what @Jack said? The source code doesn't work on QB64 on 32-bit and 64-bit computers because it uses "CALL ABSOLUTE". It builds up a string which is supposed to be machine language for 16-bit and then relies on an ancient routine loaded as QB.QLB by QuickBASIC, or by QBasic to "execute" it. QB64 could only emulate the mouse driver and probably very little else, out of doing such outdated stuff. Sadly, it prevents QB64 from being "100% compatible" while some people insist on throwing it any program that was created with QB or PDS... There's nothing to do with "QMIDI" except getting DOSBOX or something like that and actually using QB or QBasic to run it. RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - madscijr - 09-04-2022 (09-04-2022, 07:09 PM)mnrvovrfc Wrote: All right, you forced me to say it. Didn't you read the two pages before this one and especially what I posted and what @Jack said? If this is about reading the mouse, QB64 has its own way of reading the mouse. When in Rome...! If it's about playing back MIDI, I don't recall where, but I seem to recall folks posting native QB64 code for playing back MIDI. It may have been on the old qb64.org forums. If there is some other functionality we are trying to accomplish, please describe, and we can find a working QB64 way of accomplishing it... |