顯示頁面舊版反向連結Fold/unfold all回到頁頂 本頁是唯讀的,您可以看到原始碼,但不能更動它。您如果覺得它不應被鎖上,請詢問管理員。 ====== abc notation 轉出五線譜與 midi 系統安裝 ====== 不知道這是什麼東西, 請先看這裡 http://www.walshaw.plus.com/abc/ ===== - 預先安裝程式 ===== ==== - ImageMagick ==== * Centos 有包含在內, 如果沒安裝, 可透過 yum install ImageMagick * 主要用到 **/usr/bin/convert** ==== - Ghostscript's ps2pdf ==== * Centos 有包含在內, 如果沒安裝, 可透過 yum install ghostscript * 主要用到 **/usr/bin/ps2pdf** ===== - 主要安裝程式 ===== ==== - abcm2ps ==== <note> * 如果有安裝 rpmforege 可以直接下<code> yum isntall abcm2ps </code> * 主要安裝結果是 /usr/bin/abcm2ps </note> * 網站 : http://moinejf.free.fr/ * 下載 : http://moinejf.free.fr/abcm2ps-4.12.30.tar.gz ++++實際安裝語法| <file> wget http://moinejf.free.fr/abcm2ps-4.12.30.tar.gz tar -zxvf abcm2ps-4.12.30.tar.gz cd abcm2ps-4.12.30 ./configure make make install </file> ++++ * 主要安裝結果是 **/usr/local/bin/abcm2ps** ==== - abc2midi / midi2abc ==== * 網站 : http://abc.sourceforge.net/abcMIDI/ * 下載 : http://ifdo.pugmarks.com/~seymour/runabc/abcMIDI-2010-04-08.zip ++++實際安裝語法| <file> wget http://ifdo.pugmarks.com/~seymour/runabc/abcMIDI-2010-04-08.zip unzip abcMIDI-2010-04-08.zip cd abcmidi/ make make install </file> ++++ * 主要安裝結果是 **/usr/local/bin/abc2midi** , **/usr/local/bin/midi2abc** ===== - 產生中文歌詞的解決方式 ===== * 這部份只能解決中文歌詞問題, 標題與作者的部份還是只能英文 * 下載 chinese.tcl : http://moinejf.free.fr/chinese.tcl * 下載 cnprint 網站 : http://www.ywpw.com/cai/software/ - [[http://www.ywpw.com/cai/software/cnp/cnprint320.linux|cnprint for linux]] - [[http://www.ywpw.com/cai/software/cnp/cnprint.cmd | cnprint 參數檔]] - [[http://www.ywpw.com/cai/software/cnp/fonts/mssong.ttf.gz|中文宋體字]] - [[http://www.ywpw.com/cai/software/cnp/fonts/mshei.ttf.gz|中文黑體字]](option) ++++實際安裝與測試程序| * 安裝 chinese.tcl 至 /usr/local/bin <file> cd /usr/local/bin wget http://moinejf.free.fr/chinese.tcl chmod a+x chinese.tcl </file> * 安裝 cnprint 至 /usr/local/src/cnp <file> mkdir /usr/local/src/cnp cd /usr/local/src/cnp wget http://www.ywpw.com/cai/software/cnp/cnprint320.linux wget http://www.ywpw.com/cai/software/cnp/cnprint.cmd wget http://www.ywpw.com/cai/software/cnp/fonts/mssong.ttf.gz mv cnprint320.linux cnp chmod a+x cnp gunzip mssong.ttf.gz </file> * 測試轉含中文歌詞 abc notation 轉成 pdf 與 png 檔 <file> 假設 t.abc 內有中文歌詞 chinese.tcl t.abc ps2pdf Out.ps t.pdf convert Out.ps t.png </file> ++++ ===== - 實用的語法 ===== ==== - abc notation 轉出五線譜 ==== === - 轉出 pdf 的五線譜 === - 先使用 abcm2ps 將 abc notation 轉出 ps 格式檔 **abcm2ps xxx.abc -s 1 -O xxx.ps** - 再將 xxx.ps 檔透過 ps2pdf 轉成 pdf 格式檔 **ps2pdf xxx.ps** ++++實際使用範例| 假設已經編輯好 song.abc <file> abcm2ps song.abc -s 1 -O song.ps ps2pdf song.ps </file> 這樣就會產生 song.abc 的 song.ps 與 song.pdf 樂譜 ++++ === - 轉出 png/tif/jpg/gif 的五線譜 === - 先使用 abcm2ps 將 abc notation 轉出 eps 格式檔 **abcm2ps xxx.abc -s 1 -E -O tmp** - 再將 tmp001.eps 檔透過 im_convert 轉成圖檔 **convert tmp001.eps xxx.png** * 如果轉 eps 失敗, 就直接轉成 ps 應該會成功, 兩者差異是 eps 會依據實際樂譜大小調整圖片高度 * 直接轉 ps 語法就是去掉 -E 參數 **abcm2ps xxx.abc -s 1 -O xxx.ps** ++++實際使用範例| 假設已經編輯好 song.abc <file> abcm2ps song.abc -s 1 -E -O tmp convert tmp001.eps song.png convert tmp001.eps song.tif </file> 這樣就會產生 song.abc 的 song.ps 與 song.png, song.tif 樂譜圖檔 如果產生 eps 失敗, 就直接產生 ps 格式 <file> abcm2ps song.abc -s 1 -O song.ps convert song.ps song.png convert song.ps song.tif </file> ++++ ==== - abc 歌譜轉出 midi 檔 ==== * 使用 abc2midi 將 abc notation 轉出 midi 格式音樂檔 **abc2midi xxx.abc** ++++實際使用語法| * 假設已經編輯好 songx.abc <file> abc2midi songx.abc </file> 這樣就會依據 songx.abc 內的定義產生相對應的 songx.mid MIDI 檔((如果 abc 內定義多個樂譜, 就會產生多個 midi 檔)) ++++ ==== - midi 檔轉出 abc 歌譜 ==== * 使用 midi2abc 將 midi 格式音樂檔轉出 abc notation **midi2abc xxx.mid** ++++實際使用語法| * 假設已經編輯好 songy.mid <file> midi2abc songy.mid </file> 這樣就會依據 songy.mid 的內容產生出 songy.abc 檔 ++++ ===== - Sample 檔案 ===== * http://ifdo.pugmarks.com/~seymour/runabc/isra.abc * 轉換結果 https://www.ichiayi.com/wiki_file/isra.tar.gz {{tag>abc abc_notation midi 樂譜 安裝}} tech/abc.txt 上一次變更: 2018/05/20 15:04由 Jonathan Tsai