Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Any C programmers wanna help convert code to convert between MIDI + CSV?
#2
(08-23-2022, 05:41 PM)madscijr Wrote: 1.   Question
I was looking to have QB64 convert MIDI files to CSV and vice-versa and found some C code that looks like it does the job.

It's just 2 files (asc2mid.c and mid2asc.c) and I figure regular C code with no fancy OO, it should be pretty straightforward to convert to BASIC, right?


Answer:
do you know that your QB64 code will be translated into C/C++ that will be compiled  by G++ /gcc
that are the C/C++ gnu compilers in the folder named internal.
So you can open your C/C++ IDE or your multilanguage IDE (Notepad++, Visual Studio,  JetBrain/IntelliJ IDEA) and after setting IDE to work with the specific language you will be able to compile C/C++ programs.
Moreover you can build an header file to include original C/C++ code as External library.
 (this sentence answers also to the question 2)


2.
Which leads me to a second question - QB64 comes with a C compiler "bundled" with it, right? Is there some way to use it to compile straight C programs? 

Answer:
see answer to  question 1

3.
Question
Is anyone interested in helping make sense of some C code?  :-D

Answer:

your QB64 code will be translated into C/C++, why do you want to translate a C program in QB64 to be translated again in C/C++?
However it seems to me  straight C programs, but this doesn't means that it is easy to translate them into QB64...starting from the point that these 2 simple programs use these other programs (Libraries) written in C and used as included file!

-------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <assert.h>
#include <string.h>
--------------------------------------------
so do you want translate also these libraries or do you want include them as External Libraries?

Good thinking about this last point.
Reply


Messages In This Thread
RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - by TempodiBasic - 08-25-2022, 10:48 PM



Users browsing this thread: 27 Guest(s)