<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>
      <blockquote type="cite">a choice between int and float types
        signed and unsigned without conversion is what you need</blockquote>
      Many scripting languages have a single number type. The only
      "problem" with Pd is that this number type is a float and not a
      double, so it's easy to run into precision issues. But for bytes,
      a float is large enough ;-) Yes, you waste some space, but who
      cares?</p>
    <p>Also, you can create multidimensional arrays with data
      structures, if you really need it (yes, it is awkward, but it is
      certainly possible). On the other hand, if all subarrays are the
      same size, it is trivial to embed them in a single flat array...</p>
    <p>Apart from that, a MIDI file parser is not something you would
      typically write in a visual programming language. That's why we
      have a C external for that ;-)<br>
    </p>
    <p>Christof<br>
    </p>
    <div class="moz-cite-prefix">On 26.10.2020 13:56, Josh Moore wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+AZ=uqZSs_YQAdpKVp4aXMFxZsOi9Og6nVOnoJ_EF7g5PsJZQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="auto">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. </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Mon, Oct 26, 2020, 4:12 AM
          Christof Ressi <<a href="mailto:info@christofressi.com"
            target="_blank" rel="noreferrer" moz-do-not-send="true">info@christofressi.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div>
            <p>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.</p>
            <p>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 :-)</p>
            <p>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. </p>
            <p>Christof<br>
            </p>
            <div>On 26.10.2020 11:11, Roman Haefeli wrote:<br>
            </div>
            <blockquote type="cite">
              <pre>On Mon, 2020-10-26 at 03:32 -0300, Alexandre Torres Porres wrote:

</pre>
              <blockquote type="cite">
                <pre>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)?
</pre>
              </blockquote>
              <pre>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
</pre>
              <br>
              <fieldset></fieldset>
              <pre>_______________________________________________
<a href="mailto:Pd-list@lists.iem.at" rel="noreferrer noreferrer" target="_blank" moz-do-not-send="true">Pd-list@lists.iem.at</a> mailing list
UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer noreferrer" target="_blank" moz-do-not-send="true">https://lists.puredata.info/listinfo/pd-list</a>
</pre>
            </blockquote>
          </div>
          _______________________________________________<br>
          <a href="mailto:Pd-list@lists.iem.at" rel="noreferrer
            noreferrer" target="_blank" moz-do-not-send="true">Pd-list@lists.iem.at</a>
          mailing list<br>
          UNSUBSCRIBE and account-management -> <a
            href="https://lists.puredata.info/listinfo/pd-list"
            rel="noreferrer noreferrer noreferrer" target="_blank"
            moz-do-not-send="true">https://lists.puredata.info/listinfo/pd-list</a><br>
        </blockquote>
      </div>
    </blockquote>
  </body>
</html>