<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>20415</bug_id>
          
          <creation_ts>2012-12-17 17:21:11 +0000</creation_ts>
          <short_desc>Add a serializer to MIDIPort</short_desc>
          <delta_ts>2013-01-18 15:50:57 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>AudioWG</product>
          <component>MIDI API</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>NEEDSINFO</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>TBD</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jussi Kalliokoski">jussi.kalliokoski</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>cwilso</cc>
    
    <cc>w3c</cc>
          
          <qa_contact>public-audio</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>80289</commentid>
    <comment_count>0</comment_count>
    <who name="Jussi Kalliokoski">jussi.kalliokoski</who>
    <bug_when>2012-12-17 17:21:11 +0000</bug_when>
    <thetext>See this thread: http://lists.w3.org/Archives/Public/public-audio/2012OctDec/0697.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80298</commentid>
    <comment_count>1</comment_count>
    <who name="Chris Wilson">cwilso</who>
    <bug_when>2012-12-17 18:51:13 +0000</bug_when>
    <thetext>Can you describe exactly what feature you&apos;re trying to get from this (i.e. user scenario)?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80308</commentid>
    <comment_count>2</comment_count>
    <who name="Marcos Caceres">w3c</who>
    <bug_when>2012-12-17 20:57:09 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Can you describe exactly what feature you&apos;re trying to get from this (i.e.
&gt; user scenario)?

See &quot;9.2 Enumerating Inputs and Outputs&quot; example:
https://dvcs.w3.org/hg/audio/raw-file/tip/midi/specification.html#enumerating-inputs-and-outputs

That&apos;s pretty common... with toJSON, it becomes something like:

function showPorts( midiAccess ) {
  function show(port, i){
     console.log(&quot;Input port #&quot; + i + &quot; &quot; + port.toJSON());
  }
  midiAccess.enumerateInputs().forEach(show);
  midiAccess.enumerateOutputs().forEach(show);
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80309</commentid>
    <comment_count>3</comment_count>
    <who name="Chris Wilson">cwilso</who>
    <bug_when>2012-12-17 21:01:25 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; (In reply to comment #1)
&gt; &gt; Can you describe exactly what feature you&apos;re trying to get from this (i.e.
&gt; &gt; user scenario)?
&gt; 
&gt; See &quot;9.2 Enumerating Inputs and Outputs&quot; example:
&gt; https://dvcs.w3.org/hg/audio/raw-file/tip/midi/specification.
&gt; html#enumerating-inputs-and-outputs
&gt; 
&gt; That&apos;s pretty common... with toJSON, it becomes something like:
&gt; 
&gt; function showPorts( midiAccess ) {
&gt;   function show(port, i){
&gt;      console.log(&quot;Input port #&quot; + i + &quot; &quot; + port.toJSON());
&gt;   }
&gt;   midiAccess.enumerateInputs().forEach(show);
&gt;   midiAccess.enumerateOutputs().forEach(show);
&gt; }

That sample was just enumerating the parameters for debugging purposes, though - serialization implies deserialization.  I don&apos;t think the &quot;serialize everything in the input/output object&quot; is a particularly interesting scenario, unless you&apos;re trying to imply that fromJSON() could re-create the port - and this is a &quot;magic host object&quot;.  :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80314</commentid>
    <comment_count>4</comment_count>
    <who name="Marcos Caceres">w3c</who>
    <bug_when>2012-12-17 23:16:20 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; That sample was just enumerating the parameters for debugging purposes,
&gt; though - serialization implies deserialization.  I don&apos;t think the
&gt; &quot;serialize everything in the input/output object&quot; is a particularly
&gt; interesting scenario, unless you&apos;re trying to imply that fromJSON() could
&gt; re-create the port - and this is a &quot;magic host object&quot;.  :)

Ok, fair call. I currently don&apos;t have a case for serialization (apart form using it as a stringifier in debugging). 

I think there might be a case for storing serialized versions of previously used ports, etc. But I need to encounter the actual use case through playing around a bit more with the API.... 

Can we mark this as RESOLVED/NEEDSINFO?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81572</commentid>
    <comment_count>5</comment_count>
    <who name="Olivier Thereaux">olivier.thereaux</who>
    <bug_when>2013-01-18 15:50:57 +0000</bug_when>
    <thetext>Batch-closing RESOLVED MIDI issues. Reminder: midi issues now tracked at https://github.com/WebAudio/web-midi-api/issues</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>