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-12-2022 (09-12-2022, 11:57 AM)TempodiBasic Wrote: PostScriptum: FORTRAN! I wonder if it will compile my programs from 10th grade computer class! RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - madscijr - 09-12-2022 (09-12-2022, 11:49 AM)TempodiBasic Wrote: and C++ Tempodi, Spriggsy converted the C to pure QB64 and it works! (Sort of!) Now the next challenge is, how do we convert the event-driven code to normal QB64? RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - Kernelpanic - 09-12-2022 (09-08-2022, 03:01 AM)madscijr Wrote:(08-26-2022, 04:24 AM)JRace Wrote: That compilable source includes a batch file to automate compilation using QB64's bundled MinGW. The latest version is here: MinGW 12.2.0 If you also want the assembler: NASM 2.15.05 Quote:Have you tried it with the previous 2.x build of QB64 or an earlier one like 1.5?No. RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - SpriggsySpriggs - 09-12-2022 Yo, @madscijr ... Does this help you with your WAV file stuff? This version is a direct C translation: Code: (Select All) Option Explicit And because I know you like to have things done with QB64 code, here is a version that produces the exact same file but uses only built-in functions: Code: (Select All) Option Explicit P.S. I personally dislike the naming scheme and case used in the original code but chose to use the same style and names so that it would be easier for you to see the relation. I typically prefer Pascal case for everything that isn't a TYPE or CONSTANT declaration. P.P.S I know that both code blocks produce the exact same file by doing a comparison in Notepad++. Also, both files play just fine in Windows. Had some issues at first with using strictly QB64 functions as I forgot that we use base 1 while C uses base 0. RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - mnrvovrfc - 09-12-2022 (09-12-2022, 12:32 PM)Kernelpanic Wrote: The latest version is here: MinGW 12.2.0Thank you for this link for MinGW. I had downloaded version 9 I think for 64-bit but couldn't do anything with it. But now I think the C/C++ compiler that comes with QB64 for Windows, or with a Linux distro is enough for me. LOL "Universal" CRT? This must be a lot like "musl" for example on Void Linux, while a great many things are compatible with "libc" instead. RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - mnrvovrfc - 09-12-2022 Learned something else: QB64 permits "DIM" statements inside a loop! I thought it was going to complain about "duplicate definition" for "t" although it's not an interpreter... (09-04-2022, 08:21 PM)madscijr Wrote: If this is about reading the mouse, QB64 has its own way of reading the mouse. When in Rome...! (09-08-2022, 03:29 AM)madscijr Wrote: That makes sense. All we need is C, so...I'm trying to help on this topic, but I don't like some of your answers. It seems my knowledge is inferior to others here and therefore I'm the only one being replied to in this manner. This is my last post in this topic for this reason. I'm not a C/C++ programmer and I don't want to be. I like to help people, but if I keep getting this kind of replies then I might stop participating on this forum. Until now I have contained myself, tried to be laid back like the guys having way more reputation on this forum than me. But it cannot go without saying any longer. "All we need is C" but I was going to reply "Without C++ you can't do anything with QB64 and what would you do then?" But I contained myself. I'm admitting it now because I like this place and the people in it. I'm not angry or anything but I'm not going to post on this topic any longer. >==> RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - SpriggsySpriggs - 09-12-2022 @mnrvovrfc Sure, out of context those might seem impolite. Going back and reading the posts, I'm not seeing how those replies were rude; intentionally or otherwise. I hope you continue to interact on future forum threads, though. Your knowledge of C should prove invaluable on certain projects. RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - madscijr - 09-12-2022 (09-12-2022, 05:34 PM)mnrvovrfc Wrote: Learned something else: QB64 permits "DIM" statements inside a loop! I thought it was going to complain about "duplicate definition" for "t" although it's not an interpreter... Sorry if you got the wrong idea from what I said, I'm not sure how my statements would be interpreted as rude, but no disrespect was intended. RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - Kernelpanic - 09-12-2022 Quote:mnrvovrfc - I had downloaded version 9 I think for 64-bit but couldn't do anything with it. But now I think the C/C++ compiler that comes with QB64 for Windows, or with a Linux distro is enough for me. Couldn't install it or don't know what to do with it? You can also generate color outputs with the GCC. Nice! RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - TempodiBasic - 09-14-2022 @MadSciJr Quote:Tempodi, Spriggsy converted the C to pure QB64 and it works! (Sort of!)sorry I have missed this code by Spriggsy! I see at #84 a code to manage WAV files. Where can I get the Spriggsy's code about MIDI? Waiting answers I thank you. |