I think it comes down to PD's horrible selection of array types. Having arrays with multi dimensions that can be a choice between int and float types signed and unsigned without conversion is what you need otherwise you will run into this wall all over the place and you're looking at a c compiler or interpreted language external to make what exists in almost every other language (ie make 16 arrays with 127 dimensions for each note with byte alignment containing n points or whatever) as three lines of code doable on a system that has only 2d arrays and float types. 

On Mon, Oct 26, 2020, 4:12 AM Christof Ressi <info@christofressi.com> wrote:

I agree that we really need a way to read/write binary data. I have already thought about doing a PR to add such functionality to graphical arrays. It would be as simple as adding a flag to the [read( and [write( methods.

In theory, it would be possible then to implement a MIDI file reader/writer as a Pd abstraction. But to be honest, I think only a masochist would do that :-)

On the other hand, mrpeach's [midifile] has always served me well and it's one of those things that don't really get obsolete. So I don't think that Pd really needs built-in MIDI file support. After all, even a kitchen-sink language like Supercollider doesn't come with built-in MIDI file support.

Christof

On 26.10.2020 11:11, Roman Haefeli wrote:
On Mon, 2020-10-26 at 03:32 -0300, Alexandre Torres Porres wrote:

It feels to me Vanilla should be able to read/write MIDI files, but I
wonder how. Any ideas on how this could work in a "vanilla way"
(light and simple)?
To use Miller's words from another thread, I think reading/writing MIDI
files would be an application for which the infrastructure is still
missing: reading from/writing to binary files (unless I missed some
recent development).

Both would be cool, accessing them from disk directly and load/dump
them to/from tables.

Roman

_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list