【问题标题】:music21 format stream as ABC+ and save as a filemusic21 格式流为 ABC+ 并保存为文件
【发布时间】:2017-03-20 14:33:38
【问题描述】:

我正在尝试将整个巴赫语料库(mxl 文件)转换为 abc 文件。 这在music21中可能吗?

谢谢! v

【问题讨论】:

    标签: xml file abc music21


    【解决方案1】:

    music21目前没有导出abc的能力,只能导入。

    【讨论】:

      【解决方案2】:

      你可以用 node 和 xml2abc 破解一些东西。 Mxl 是 zip 文件中的 musicxml。

      这是我在 zupfnoter 中使用的代码 sn-p;它

      function pasteXml(text){
                              try{
                                var xmldata = $.parseXML(text);
                               }
                              catch(ex){
                                #{$log.error(`ex.message`)}
                              }
      
                              var options = {
                                      'u': 0, 'b': 0, 'n': 0,    // unfold repeats (1), bars per line, chars per line
                              'c': 0, 'v': 0, 'd': 0,    // credit text filter level (0-6), no volta on higher voice numbers (1), denominator unit length (L:)
                              'm': 0, 'x': 0,           // with midi volume and panning (1), no line breaks (1)
                              'p': 'f'
                            };              // page format: scale (1.0), width, left- and right margin in cm
      
                            result = vertaal(xmldata, options);
                            return result;
      }
      
      function pasteMxl(text){
         zip = new JSZip(text);
         text = zip.file(/^[^/ ]*\.xml$/)[0].asText();
         pasteXml(text);
      }
      

      【讨论】:

        【解决方案3】:

        您是否尝试过此网络服务? http://www.mandolintab.net/abcconverter.php

        【讨论】:

        • 谢谢!但我需要一个自动化堆栈解决方案,我可以在其中处理一堆 mxl 文件。
        猜你喜欢
        • 2019-12-26
        • 2019-05-07
        • 1970-01-01
        • 2019-06-28
        • 1970-01-01
        • 2011-11-12
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多