Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML import/export #89

Open
j-bresson opened this issue Oct 4, 2019 · 6 comments
Open

XML import/export #89

j-bresson opened this issue Oct 4, 2019 · 6 comments
Labels
Score About score objects and editors

Comments

@j-bresson
Copy link
Member

j-bresson commented Oct 4, 2019

Todo:

  • import
  • export
  • Menus in score editors
@j-bresson j-bresson added the Score About score objects and editors label Oct 4, 2019
@j-bresson
Copy link
Member Author

j-bresson commented Oct 20, 2019

MusicXML Import done and commited in: c6fa2e9

@j-bresson
Copy link
Member Author

j-bresson commented Oct 27, 2019

Notes about MusicXML export

Most of the code is already there (in musicxml-export.lisp) but needs some cleanup and rewriting (and testing!).

In particular: the whole duration/subdivision system (e.g. for groups, beams, etc.) needs to be rewritten. There is no more extent/qvalue in OM# musical objects: in principle this is all more "flat" and simple, with the slots "symbolic-date" and "symbolic-dur" that are bound to chords and rests according to the tree at initializing/updating the voice.
The resulting code for export-musicxml should be much simpler / more readable than the current one.

@j-bresson
Copy link
Member Author

j-bresson commented Apr 25, 2021

@smoge
Copy link

smoge commented Feb 15, 2024

@j-bresson
Copy link
Member Author

j-bresson commented Feb 18, 2024

@smoge moving your comment and pointer here:

For reference, if the module is the same one from openmusic, this discussion is relevant, and points out some problems that need attention (for example: dorico supports musixml 3+, and some applications have problems with rationals, that would need to be checked again today)
https://discussion.forum.ircam.fr/t/xml-and-dorico/2449/3

@smoge
Copy link

smoge commented Feb 20, 2024

Thanks. I think there is no point in "disputing" the correct implementation.

Since musicxml is a bad standard, one must be pragmatic. I think we should avoid using rational numbers, this way we avoid some problems. And also, it would be important to adopt the musicxml3 or musicxml4 standard, for dorico compatibility. I believe nested tuplets just works on musescore and dorico:


<measure number="23">
   <note>
      <pitch>
         <step>C</step>
         <octave>5</octave>
      </pitch>
      <duration>24</duration>
      <voice>1</voice>
      <type>quarter</type>
      <time-modification>
         <actual-notes>3</actual-notes>
         <normal-notes>2</normal-notes>
      </time-modification>
      <stem default-y="-50">down</stem>
      <notations>
         <tuplet bracket="yes" number="1" placement="above" type="start"/>
      </notations>
   </note>
   <note>
      <pitch>
         <step>B</step>
         <octave>4</octave>
      </pitch>
      <duration>24</duration>
      <voice>1</voice>
      <type>quarter</type>
      <time-modification>
         <actual-notes>3</actual-notes>
         <normal-notes>2</normal-notes>
      </time-modification>
      <stem default-y="-55">down</stem>
   </note>
   <note>
      <pitch>
         <step>A</step>
         <octave>4</octave>
      </pitch>
      <duration>8</duration>
      <voice>1</voice>
      <type>eighth</type>
      <time-modification>
         <actual-notes>9</actual-notes>
         <normal-notes>4</normal-notes>
         <normal-type>quarter</normal-type>
      </time-modification>
      <stem default-y="10">up</stem>
      <beam number="1">begin</beam>
      <notations>
         <tuplet number="2" bracket="no" placement="above" type="start">
            <tuplet-actual>
               <tuplet-number>3</tuplet-number>
               <tuplet-type>eighth</tuplet-type>
            </tuplet-actual>
            <tuplet-normal>
               <tuplet-number>1</tuplet-number>
               <tuplet-type>quarter</tuplet-type>
            </tuplet-normal>
         </tuplet>
      </notations>
   </note>
   <note>
      <pitch>
         <step>G</step>
         <octave>4</octave>
      </pitch>
      <duration>8</duration>
      <voice>1</voice>
      <type>eighth</type>
      <time-modification>
         <actual-notes>9</actual-notes>
         <normal-notes>4</normal-notes>
         <normal-type>quarter</normal-type>
      </time-modification>
      <stem default-y="8">up</stem>
      <beam number="1">continue</beam>
   </note>
   <note>
      <pitch>
         <step>F</step>
         <octave>4</octave>
      </pitch>
      <duration>8</duration>
      <voice>1</voice>
      <type>eighth</type>
      <time-modification>
         <actual-notes>9</actual-notes>
         <normal-notes>4</normal-notes>
         <normal-type>quarter</normal-type>
      </time-modification>
      <stem default-y="5">up</stem>
      <beam number="1">end</beam>
      <notations>
         <tuplet number="1" type="stop"/>
         <tuplet number="2" type="stop"/>
      </notations>
   </note>
</measure>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Score About score objects and editors
Projects
None yet
Development

No branches or pull requests

2 participants