I need some help for playing MIDI files. I have problems with the MidiFile Class, and I would like someone post some simple code to play a MIDI file, with the opening of each ports etc.
Someone can helps me ? I have finished the GUI after nearly 1 weew and now I’m blocking again on something else, with pointers etc. It’s boring
For now, I’m here :
[code]portMIDI = MidiOutput::openDevice(0);
fileHard = new File (T(“C:\Projets\Devcpp\file.mid”)); // (1)
fileInputStream = fileHard->createInputStream();
fileMIDI->readFrom(fileHard->createInputStream()); // (2)[/code]
The line with the (1) gives me a warning :
[quote][Warning] unknown escape sequence ‘\P’
[Warning] unknown escape sequence ‘\D’
[Warning] unknown escape sequence ‘\G’
[Warning] unknown escape sequence ‘\M’[/quote]
And I have problems with the (2) about pointers, i need a InputStream& in parameter, and I only have InputStream*…
There is a thing I don’t understand, the function for reading audio data from an InputStream is :
And for MIDI data that’s :
Why a “&” here and a “*” on the other ?