#author("2022-09-11T08:32:53+00:00","","")
Muse は Microsoft Windows 用のソフトウェアですが、[[Wine:http://ja.wikipedia.org/wiki/Wine]] というソフトウェアを使用することで、[[Linux:http://ja.wikipedia.org/wiki/Linux]] 上でも実行することができます。

#contents

*Wine とは [#c4e6d1fb]
*Wine とは [#t8bcd8b9]

[[Wine:http://ja.wikipedia.org/wiki/Wine]] は、[[80x86:http://ja.wikipedia.org/wiki/80x86]]([[IA-32:http://ja.wikipedia.org/wiki/IA-32]]) CPU で動作する[[広義の UNIX:http://ja.wikipedia.org/wiki/UNIX#UNIX.E3.81.AE.E5.AE.9A.E7.BE.A9]] 上で Windows API を実行するプロジェクトです。

具体的には、[[Linux:http://ja.wikipedia.org/wiki/Linux]]、[[FreeBSD:http://ja.wikipedia.org/wiki/FreeBSD]]、[[Mac OS X:http://ja.wikipedia.org/wiki/Mac_OS_X]]、[[Solaris:http://ja.wikipedia.org/wiki/Solaris]] などをターゲットとしているので、これらの全ての OS 上で Muse が動作する可能性があります。

*Wine のインストール [#ie3dd41c]
*Wine のインストール [#f7267ed3]

[[Wine HQ:http://www.winehq.com/]] → [[Get Wine Now:http://www.winehq.com/site/download]] と辿って、お使いの Linux ディストリビューション用のバイナリパッケージがあれば、それをインストールします。

なければ、更に [[SourceForge.net:http://sourceforge.net/project/showfiles.php?group_id=6241]] を辿ってソース(Source Packages)を入手します。~
ソースからのインストールの場合、

 tar jxf wine-0.9.23.tar.bz2
 cd wine-0.9.23
 ./configure --with-x
 tar jxf wine-x.x.x.tar.bz2
 cd wine-x.x.x
 ./configure
 make depend
 make
 su
 make install
 exit

という手順でいけると思います。~
もちろん、事前に README と ./configure --help をよく読んで下さい。

インストールが終了したら、

 winemine

を実行してみましょう(マインスイーパです)。

実行してみると、延々と、
*Muse のインストール [#i374140b]

 Font metrics: xx.x% done
[[MUSE WORLD:http://atomic.world.coocan.jp/muse/muse.htm]] → ダウンロード と辿って、MUSE.ZIP をダウンロードします。

というメッセージが出て、何回か 100% に達してからやっとマインスイーパが実行されます。~
何度やっても、毎回この作業が繰り返されます。~
私は、
MUSE.ZIP を適当なディレクトリで展開します。

 cd ~/.wine/drive_c/windows/fonts/
 cp /usr/X11R6/lib/X11/fonts/TrueType/ipa*.ttf .

で幸せになれました。

*Muse のインストール [#c7d2c96f]

[[MUSE WORLD:http://homepage3.nifty.com/~atomic/muse/muse.htm]] → ダウンロード と辿って、Muse Ver '''X.X''' をダウンロードします。

muse'''XXX'''.exe を適当なディレクトリで展開します。

私は、~/lib/muse/ にインストールしました。

 mkdir -p ~/lib/muse
 cd ~/lib/muse
 lha e ~/muse491.exe
 rm ! $
 unzip ~/MUSE.ZIP

早速、Muse を起動してみましょう。

 wine muse.exe

ハードウェア音源があって適切に設定されていれば、Windows 環境と同様に音がなるはずです。

音源がなくて音がならない場合、一旦 Muse を終了して、

 timidity -iA &

として、TiMidity++ を ALSA シーケンサ クライアントモードで起動してから上記を実行します。

timidity -iA でエラーが出る、つまり、TiMidity++ のコンパイル時に ALSA シーケンサ クライアントモードインタフェイスを組み込んでいない、または、そもそも TiMidity++ がインストールされていない場合には、適切なパッケージを拾ってきてインストールするか、[[TiMidity++:http://timidity.sourceforge.net/]] からソースをダウンロードしてきて、./configure に --enable-audio=alsa --enable-alsaseq のオプションをつけてコンパイル・インストールして下さい。

 cd ~/lib/muse
 wine muse.exe sample1.mus
ただし、Wine + Muse + TiMidity++ では、それなりのマシンパワーがないと、演奏・表示に多少のもたれが出ます。

で、最後の拍手(applause.wav)が再生されない場合、
Muse にオプションを渡す場合、オプションをクォーテーションで括ってやらないとおかしなことになります~
これは、例えば *e というオプションはシェルによって末尾が e の全てのファイルに展開されるからです~
これを防ぐために、ダブルクォーテーションかシングルクォーテーションで括ります

 winecfg
 wine muse.exe "*f" "*m" "*p" "*q" "*s" sample1.mus

で、オーディオ タブを選択して、ALSA Driver にチェックを入れてみましょう。
ダブルクォーテーションとシングルクォーテーションの働きの違いは、この場合には問題になりませんので、どちらを使ってもかまいません~
2つの働きの違いについては、シェルについての参考書やサイトを参照して下さい。~
なお、Museはオプションの列挙記述が可能なので、上記は以下のようにも書けます。

ただし、Wine + Muse + TiMidity++ では、かなりのマシンパワーがないと、演奏・表示にもたれが出ます。
 wine muse.exe "*fmpqs" sample1.mus

*muse コマンドの作製 [#of3d3407]
*muse コマンドの作製 [#hd2f2f83]

毎回々々 wine ~/lib/muse/muse.exe hogehoge.mus などと打ち込むのは面倒だし、Muse のコマンドオプションは *a などの形式で、UNIX のシェルと相性が悪いので、~/bin/muse という下記のコマンドを作ってみました。~
毎回々々 wine ~/lib/muse/muse.exe hogehoge.mus などと打ち込むのは面倒だし、Muse のコマンドオプションは UNIX のシェルと相性が良くないので、~/bin/muse という下記のコマンドを作ってみました。~
chmod u+x ~/bin/muse で実行属性をつけます。~
muse.exe *a *e *p *s sample3.mus なら muse -aeps sample3.mus とまとめて指定できます。
wine muse.exe "*f" "*m" "*p" "*q" "*s" sample3.mus なら muse -fmpqs sample3.mus とまとめて指定できます。

 #! /usr/local/bin/ruby
 #! /usr/bin/ruby
 WINE = 'wine'
 MUSE = '~/lib/muse/muse.exe'
 REDIRECTION = '> /dev/null 2>&1'
 VERSION = "2.0"
 def usage()
   print <<EOM
 Usage:
   muse [options] [filename]
 Options:
   -a    Flip score automatically
   -e    Exit Muse just after the performance
   -f    Show finger meter dialog
   -h    Show this help
   -i    Run Muse with minimized window
   -m    Show member color dialog
   -o    Compile muse data file into MIDI
   -p    Start performance after activation
   -s    Show score monitor window
   -x    Inhibit multi-activation
  -b    Compile muse data file into MP3 (with VSTi/SoundFont)
  -c    Compile muse data file into PDF (music score)
  -e    Compile muse data file into MIDI
  -f    Show finger meter dialog
  -h    Show this help
  -i    Run Muse with minimized window
  -l    Compile muse data file into LilyPond data
  -m    Show member color dialog
  -n    Ignore last sound source choice
  -p    Start performance after activation
  -q    Exit Muse just after the performance
  -r    Inhibit dialogs while batch execution (output muse.rep)
  -s    Show score monitor window
  -t    Omit text data into MIDI
  -u    Output Unicode text data into MIDI
  -v    Inhibit reallocation on start-up
  -w    Compile muse data file into WAVE (with VSTi/SoundFont)
  -x    Inhibit multi-activation
  -y    Output landscape music score
  -0    Output A0 size music score
  -1    Output A1 size music score
  -2    Output A2 size music score
  -3    Output A3 size music score
  -4    Output A4 size music score
 EOM
 end
 require 'getopts'
 command = "#{WINE} #{File.expand_path(MUSE)} "
 unless getopts('aefhimopsx', 'help')
   abort("Invalid option(s).\nTry muse --help for more information.\n")
 require 'optparse'
 opts = ""
 begin
   params = ARGV.getopts('bcefhimpqstuvwxy01234', 'help', 'version')
   if params['h'] or params['help']
     usage()
     exit(0)
   end
   if params['version']
     print "muse.rb version #{VERSION}\n"
     exit (0)
   end
   params.each {|opt|
     opts += opt[0] if opt[1]
   }
 rescue OptionParser::InvalidOption => ex
   abort <<EOM
 Invalid option [#{ex.args[0]}].
 Try muse --help for more information.
 EOM
 end
 if $OPT_h or $OPT_help
   usage()
   exit(0)
 end
 if $OPT_a then command += "'*a' " end
 if $OPT_e then command += "'*e' " end
 if $OPT_f then command += "'*f' " end
 if $OPT_i then command += "'*i' " end
 if $OPT_m then command += "'*m' " end
 if $OPT_o then command += "'*o' " end
 if $OPT_p then command += "'*p' " end
 if $OPT_s then command += "'*s' " end
 if $OPT_x then command += "'*x' " end
 command += "#{ARGV.join(' ')} #{REDIRECTION}"
 musepath = File.expand_path(MUSE)
 opts = '*' + opts if '' != opts
 args = ARGV.join(' ')
 command = "#{WINE} #{musepath} #{opts} #{args} #{REDIRECTION}"
 system(command)


実行には [[Ruby:http://www.ruby-lang.org/]] が必要です。

最初の 4行をそれぞれの環境に合わせて修正すれば、大抵動作すると思います。

Let's happy musing !


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS