YouTube影片請記得【開啟CC字幕】,顯示歌詞提示
-建立一個資料夾
-將要轉換為MusicXML格式的.mscz檔,複製進這個資料夾
-在這個資料夾內建立一個記事本,將右方淡黃色的代碼貼進記事本
-將記事本重新另存新檔,並將編碼格式設定為ANSI
-變更這份記事本的副檔名(.txt→.bat)
-執行這份.bat檔
-依照指示並等待轉檔(Export)即可
@echo off
REM ================================================================================================
REM 將MuseScore的原始檔,與這份bat檔放在相同資料夾(強烈建議先備份),然後再執行這份bat檔
REM ================================================================================================
set "GET_DEFAULT=[使用預設,請直接按下Enter鍵]"
REM 1. 請求使用者輸入 MuseScore CLI 執行檔路徑
set "DEFAULT_CLI=C:\Program Files\MuseScore 4\bin\MuseScore4.exe"
echo 請輸入主程式路徑(CLI執行檔) 預設 %DEFAULT_CLI%
echo [使用預設,請直接按下Enter鍵]
set /p MUSESCORE=
if "%MUSESCORE%"=="" set "MUSESCORE=%DEFAULT_CLI%"
REM 2. 請求使用者輸入主程式副檔名
set "DEFAULT_IN_EXT=.mscz"
echo 請輸入主程式副檔名 預設: %DEFAULT_IN_EXT%
echo %GET_DEFAULT%
set /p IN_EXT=
if "%IN_EXT%"=="" set "IN_EXT=%DEFAULT_IN_EXT%"
REM 3. 請求使用者輸入匯出檔副檔名
set "DEFAULT_OUT_EXT=.musicxml"
echo 請輸入匯出檔副檔名 預設: %DEFAULT_OUT_EXT%
echo %GET_DEFAULT%
set /p "OUT_EXT="
if "%OUT_EXT%"=="" set "OUT_EXT=%DEFAULT_OUT_EXT%"
REM 進入批次檔所在資料夾
pushd "%~dp0"
REM 逐一把 %IN_EXT% 轉成 %OUT_EXT%
for %%F in (*%IN_EXT%) do (
echo 處理:%%F
if "%OUT_EXT%"==".png" (
"%MUSESCORE%" -T TRIM=10 -r DPI=600 -o "%%~nF%OUT_EXT%" "%%F"
) else (
"%MUSESCORE%" -o "%%~nF%OUT_EXT%" "%%F"
)
)
REM 回到原本路徑
popd
echo.
echo ==== 全部轉換完成 ====
pause
說明:
Midi(.mid; Musical Instrument Digital Interface)格式開啟不易(需專用軟體),因此以MuseScore之MusicXML格式儲存,再以CSV(Comma-Separated Values)格式進行批量彙整,供有志之士協同處理、分析或改善(如有問題或建議,歡迎來信musicscore.simple@gmail.com)。
每一份CSV檔案內
-不同欄位,都是一份獨立的樂譜資訊。
-第1列為檔案名稱(歌曲名稱)
-第1列之後,即為MusicXML所記載之資訊,記載內容包含但不限於(樂譜抬頭、詞曲者、調號、聲部、音符屬性(音高/時值/休止等等)、和弦/和絃、歌詞......)
-CSV檔主供分析或批次處理等用途
(例如:撰寫後續程式碼(Excel VBA或Python等等),結合LilyPond或其它資源,批次產生格式一致的純簡譜或PPT(PowerPoint),即時應對各地不同需求)
Description:
Midi (.mid; Musical Instrument Digital Interface) format is not easy to open (it requires specialized software).
Therefore, files are saved in the MusicXML format via MuseScore and then batch-converted into CSV (Comma-Separated Values) format.
This allows interested individuals to collaboratively process, analyze, or enhance the data.
(For questions or suggestions, feel free to contact: musicscore.simple@gmail.com)
Each CSV file contains the following:
-Different column, represents a distinct set of musical score information.
-Row 1, contains the file name (i.e., the song title).
-Starting from the second row, the content corresponds to information extracted from the MusicXML file.
This includes but is not limited to: score title, composer/lyricist, key signature, parts, note attributes (pitch, duration, rest, etc.), chord/chords, and lyrics.
-The main purpose of the CSV files is for analysis or batch processing.
(For example: writing scripts in Excel VBA or Python, integrating with LilyPond or other tools to batch-generate consistent formats like simplified notation sheets or PowerPoint slides, thereby addressing diverse regional needs efficiently.)