PS. In fact both links point to the same "MIDI class" package except
that the first one is 12-year old and the second one has been updated on
GIThub 4 years ago…
-----------
We do need to import MIDI files when editing a sound-object prototypes,
and this takes place on the PHP interface at the moment.
It's not complicated. I downloaded "MIDI class" by Fluxus:
https://www.phpclasses.org/package/1362-PHP-Read-write-and-manipulate-MIDI-files-and-data.html
but that one is more recent:
https://github.com/robbie-cao/midi-class-php
Their code looks familiar and promising! It is true that we could
request the console to do the conversion and send back the time-stamped
MIDI codes, but using a more advanced package might give access to
advanced methods.
The console will be invoked to play the sound-object that is being
edited, or an arbitrary polymetrric structure that may first be
interpreted by the grammar. For this we'll only need a "--startstring"
option. If the option to write a Csound output is set, the same will be
used for converting MIDI codes to Csound, using either the default BP2
Csound orchestra or a "-cs" file defining an orchestra.
Bernard
Anthony Kozar wrote on 24/07/2020 00:22:
>> I am now tempted to work on the import of MIDI files into sound object
>> prototypes, and converting MIDI sequences to Csound. Looking at the C
>> code should make it easy.
>
> These operations might be good to implement as actions in BP console.
> That way we can use the existing code instead of "reinventing the wheel".
>
> Anthony
|