argra****@users*****
argra****@users*****
2013年 5月 4日 (土) 05:17:24 JST
Index: docs/modules/MIDI-Perl-0.8/MIDI.pod diff -u docs/modules/MIDI-Perl-0.8/MIDI.pod:1.6 docs/modules/MIDI-Perl-0.8/MIDI.pod:1.7 --- docs/modules/MIDI-Perl-0.8/MIDI.pod:1.6 Thu Jan 27 22:14:57 2011 +++ docs/modules/MIDI-Perl-0.8/MIDI.pod Sat May 4 05:17:24 2013 @@ -1,10 +1,14 @@ =encoding euc-jp -=head1 名前 +=head1 NAME + +=begin original MIDI - read, compose, modify, and write MIDI files +=end original + MIDI - MIDIファイルの読み込み、作成、修正、書き出し =head1 概要 @@ -27,25 +31,37 @@ =head1 説明 +=begin original + This suite of modules provides routines for reading, composing, modifying, and writing MIDI files. +=end original + このモジュールセットは、MIDIファイルの読込・作成・修正・書出を行う ルーチンを提供する。 +=begin original + From FOLDOC (C<http://wombat.doc.ic.ac.uk/foldoc/>): +=end original + FOLDOC (C<http://wombat.doc.ic.ac.uk/foldoc/>) から引用: B<MIDI, Musical Instrument Digital Interface> +=begin original + E<lt>multimedia, file formatE<gt> (MIDI /mi'-dee/, /mee'-dee/) A hardware specification and protocol used to communicate note and effect information between synthesisers, computers, music keyboards, controllers and other electronic music devices. [...] +=end original + B<MIDI, Musical Instrument Digital Interface> E<lt>マルチメディア、ファイルフォーマットE<gt> (MIDI 発音はミディ @@ -53,64 +69,94 @@ 制御装置、その他の電子音楽機器の間で、音符と効果の情報をやりとりするために 使われるハードウェアの仕様及び、プロトコルのこと。… +=begin original + The basic unit of information is a "note on/off" event which includes a note number (pitch) and key velocity (loudness). There are many other message types for events such as pitch bend, patch changes and synthesizer-specific events for loading new patches etc. +=end original + 情報の基本単位はノートナンバー(音階)とキーベロシティ(音の強さ)を含む "ノート オン/オフ"イベント。それ以外にも多くのメッセージタイプがある。 ピッチベンド、パッチチェンジや、新しいパッチをロードするシンセサイザー特有の イベント等々。 +=begin original + There is a file format for expressing MIDI data which is like a dump of data sent over a MIDI port. [...] +=end original + MIDIデータを表現するためのファイルフォーマットがある。このデータは MIDIポートへ送られるデータダンプのようなものである。… =head1 構成 +=begin original + The MIDI-Perl suite consists of these modules: +=end original + MIDI-Perlパッケージは以下のモジュールで構成される。 +=begin original + L<MIDI> (which you're looking at), L<MIDI::Opus>, L<MIDI::Track>, L<MIDI::Event>, L<MIDI::Score>, and L<MIDI::Simple>. All of these contain documentation in pod format. You should read all of these pods. +=end original + L<MIDI> (あなたが今読んでいる), L<MIDI::Opus>, L<MIDI::Track>, L<MIDI::Event>, L<MIDI::Score>, L<MIDI::Simple>。 これら全てのモジュールにPODドキュメントが含まれている。 全てのPODに目を通してもらいたい。 +=begin original + The order you want to read them in will depend on what you want to do with this suite of modules: if you are focused on manipulating the guts of existing MIDI files, read the pods in the order given above. +=end original + ドキュメントを読む順番は、あなたがこのモジュールを使って何をしたいかによって 決まる。もし既存のMIDIファイルの中身を弄繰り回すことに関心があるなら、 上にあげた順番で読めばよい。 +=begin original + But if you aim to compose music with this suite, read this pod, then L<MIDI::Score> and L<MIDI::Simple>, and then skim the rest. +=end original + だが、もしこのパッケージを使って作曲をするのが目的なら、 このドキュメントの次にL<MIDI::Score>と L<MIDI::Simple>を読んで欲しい。 それから残りはざっと目を通せばよい。 +=begin original + (For your reference, there is also a document in pod format which is not itself an actual module: L<MIDI::Filespec>. It is an old version of the MIDI file specification.) +=end original + (参考:パッケージの中にもう一つPODドキュメントがあるが、これは実際には 使われていないモジュールL<MIDI::Filespec>のもの。これはMIDIファイル仕様の 古いバージョンだ。) =head1 はじめに +=begin original + This suite of modules is basically object-oriented, with the exception of MIDI::Simple. MIDI opuses ("songs") are represented as objects belonging to the class MIDI::Opus. An opus contains tracks, which are @@ -120,6 +166,8 @@ opuses and tracks are objects, and the events in a track comprise a LoL (and if you don't know what an LoL is, you must read L<perllol>). +=end original + このモジュールパッケージはMIDI::Simpleを除いて基本的にオブジェクト指向である。 MIDIのオプス(ソング)はMIDI::Opusクラスに属するオブジェクトを表す。 一つのオプスはトラックを有する。トラックはMIDI::Trackクラスに属する @@ -130,18 +178,24 @@ 場合はL<perllol>を読むこと)。 +=begin original + Furthermore, for some purposes it's useful to analyze the totality of a track's events as a "score" -- where a score consists of notes where each event is a list consisting of a command, a time offset from the start of the track, and some number of parameters. This is the level of abstraction that MIDI::Score and MIDI::Simple deal with. +=end original + さらに、何かの目的でトラックイベント全体を"スコア"として分析すると便利だ。 スコアはノート(音符)から構成される。ノートとはイベントであり、 このイベントはコマンド、トラック開始からの時間経過、そしていくつかの パラメータからなるリストである。 これがMIDI::ScoreとMIDI::Simpleが扱う抽象的なレベルである。 +=begin original + While this suite does provide some functionality accessible only if you're comfortable with various kinds of references, and while there are some options that deal with the guts of MIDI encoding, you can (I @@ -150,6 +204,8 @@ this documentation, to point out what things are not likely to be of use to the casual user. +=end original + もしもあなたが様々な種類のリファレンスに満足した場合にのみ、 このパッケージは使いやすい機能を提供することになる。また、 MIDIエンコードの内幕を扱うためにいくつかの選択肢がある。 @@ -161,10 +217,16 @@ =head1 TO DO +=begin original + Maybe have a MIDI cookbook of commonly used short scripts? +=end original + MIDIは広く利用されるような便利なショートスクリプト集を持っているだろうか? +=begin original + B<A PLEA>: Currently this suite can only read/write MIDI data from/to MIDI I<files>. However, it would be desirable to have realtime access to a MIDI device -- at least on systems where a MIDI device (whether @@ -178,6 +240,8 @@ pretty good idea of how it should work -- but as always, the proof is as much in the pudding as the devil is in the details. +=end original + B<いいわけ>:現在、このパッケージはMIDI I<ファイル>に対してのみ、 MIDIデータの読み書きができる。だがMIDI機器へリアルタイムにアクセス出来た 方が望ましい。少なくともMIDI機器(ハードウェアポートを通じてなのか、 @@ -196,10 +260,14 @@ =head1 小物 +=begin original + The bare module MIDI.pm doesn't I<do> much more than C<use> the necessary component submodules (i.e., all except MIDI::Simple). But it does provide some hashes you might find useful: +=end original + 単なるモジュールであるMIDI.pmは、必要となるサブモジュール (つまりMIDI::Simple以外全部)をC<use>する以上のことはI<しない>。とはいえ、 MIDI.pmはいくつかのハッシュを提供する。これはたぶんあなたの役に立つだろう。 @@ -208,33 +276,45 @@ =item C<%MIDI::note2number> と C<%MIDI::number2note> +=begin original + C<%MIDI::number2note> correponds MIDI note numbers to a more comprehensible representation (e.g., 68 to 'Gs4', for G-sharp, octave 4); C<%MIDI::note2number> is the reverse. Have a look at the source to see the contents of the hash. +=end original + C<%MIDI::number2note>は、MIDIノートナンバーをより理解しやすい表現 (例:68→'Gs4'…オクターブ4のG#)に対応させる。C<%MIDI::note2number>は その逆だ。ハッシュの内容を知りたいならソースを一瞥すること。 =item C<%MIDI::patch2number> と C<%MIDI::number2patch> +=begin original + C<%MIDI::number2patch> correponds General MIDI patch numbers (0 to 127) to English names (e.g., 79 to 'Ocarina'); C<%MIDI::patch2number> is the reverse. Have a look at the source to see the contents of the hash. +=end original + C<%MIDI::number2patch>はGMのパッチナンバー(0〜127)を英語名(例:79→'Ocarina') に対応させる。C<%MIDI::patch2number>はその逆。ハッシュの内容を知りたいなら ソースを一瞥すること。 =item C<%MIDI::notenum2percussion> と C<%MIDI::percussion2notenum> +=begin original + C<%MIDI::notenum2percussion> correponds General MIDI Percussion Keys to English names (e.g., 56 to 'Cowbell') -- but note that only numbers 35 to 81 (inclusive) are defined; C<%MIDI::percussion2notenum> is the reverse. Have a look at the source to see the contents of the hash. +=end original + C<%MIDI::notenum2percussion>はGMのパーカッションキーを英語名に対応させる (例:56→'Cowbell')。ただし定義されている番号は35〜81までだ。 C<%MIDI::percussion2notenum>はその逆。ハッシュの内容を知りたいなら @@ -244,138 +324,212 @@ =head1 簡単な用語集 +=begin original + This glossary defines just a few terms, just enough so you can (hopefully) make some sense of the documentation for this suite of modules. If you're going to do anything serious with these modules, however, you I<should really> invest in a good book about the MIDI standard -- see the References. +=end original + この用語集は若干の語が定義されている。このモジュールセットのドキュメントを 利用する上で必要な分だけである。だが、あなたがこれらのモジュールを使って それなりのことをやろうというなら、標準MIDIに関する良書で I<実際に勉強しなければならない>。"参考文献"を参照して欲しい。 +=begin original + B<channel>: a logical channel to which control changes and patch changes apply, and in which MIDI (note-related) events occur. +=end original + B<チャンネル>:コントロールチェンジとパッチチェンジ[訳補足:プログラム チェンジともいう]が適用される論理チャンネル。 チャンネル内で(ノートに関わる)MIDIイベントが現れる。 +=begin original + B<control>: one of the various numeric parameters associated with a given channel. Like S registers in Hayes-set modems, MIDI controls consist of a few well-known registers, and beyond that, it's patch-specific and/or sequencer-specific. +=end original + B<コントロール>:与えられたチャンネルと関わる様々な数値パラメータのうちの一つ。 ヘイズモデムにおけるSレジスタのように、MIDIコントロールは少しは名の知られた レジスタで構成されている。そのほかにパッチ独自、かつ・あるいはシーケンサー 独自のコントロールがある。 +=begin original + B<delta-time>: the time (in ticks) that a sequencer should wait between playing the previous event and playing the current event. +=end original + B<デルタタイム>:直前と現在の演奏の合間にシーケンサが待たなければならない 時間(単位:ティック)。 +=begin original + B<meta-event>: any of a mixed bag of events whose common trait is merely that they are similarly encoded. Most meta-events apply to all channels, unlike events, which mostly apply to just one channel. +=end original + B<メタイベント>:その共通特性が同じようにエンコードされているだけ、という イベントの寄せ集め。ほとんどのメタイベントは、イベントと違って全ての チャンネルに適用される。イベントの方は大概一つのチャンネルにだけに適用される。 +=begin original + B<note>: my oversimplistic term for items in a score structure. +=end original + B<ノート>:私によって過度に簡略化された、スコア構造体に含まれる項目を表す言葉。 +=begin original + B<opus>: the term I prefer for a piece of music, as represented in MIDI. Most specs use the term "song", but I think that this falsely implies that MIDI files represent vocal pieces. +=end original + B<オプス>:MIDIでいうところの「曲」を表す私が好んで使う用語。 大概の仕様書では"ソング"が使われるが、これだとMIDIファイルが 歌曲を表すような誤解を与えるように私は思う。 +=begin original + B<patch>: an electronic model of the sound of a given notional instrument. +=end original + B<パッチ>:観念的楽器の音の電子モデル。 +=begin original + B<running status>: a form of modest compression where an event lacking an event command byte (a "status" byte) is to be interpreted as having the same event command as the preceding event -- which may, in turn, lack a status byte and may have to be interpreted as having the same event command as I<its> previous event, and so on back. +=end original + B<ランニングステータス>:緩やかな圧縮形式。イベントコマンドバイト (ステータスバイト)が欠落しているイベントを、先行するイベントと同じ ステータスバイトを持っていると解釈させる。 この先行イベントもステータスバイトを持たず、I<その>前のイベントの ステータスバイトを持っていると解釈されているかもしれない。以下同様に続いていく。 +=begin original + B<score>: a structure of notes like an event structure, but where notes are represented as single items, and where timing of items is absolute from the beginning of the track, instead of being represented in delta-times. +=end original + B<スコア>:イベント構造体に似た、ノートからなる構造体。 ただし、ノートは単一のアイテムとして表され、アイテムの時間間隔は デルタタイムの代わりに、トラック開始からの絶対時間となる。 +=begin original + B<song>: what some MIDI specs call a song, I call an opus. +=end original + B<ソング>: MIDIの仕様によってはソングと呼ぶが私はオプスと呼ぶ。 +=begin original + B<sequencer>: a device or program that interprets and acts on MIDI data. This prototypically refers to synthesizers or drum machines, but can also refer to more limited devices, such as mixers or even lighting control systems. +=end original + B<シーケンサ>:MIDIデータを解釈し演奏する装置ないしはプログラム。 もともとシンセサイザーやドラムマシーンと関連がある。しかしまた、 ミキサーや照明制御装置のようなより限定的な装置とも関わりあっている。 +=begin original + B<status>: a synonym for "event". +=end original + B<ステータス>:イベントの同義語。 +=begin original + B<sysex>: a chunk of binary data encapsulated in the MIDI data stream, for whatever purpose. +=end original + B<システムエクスクルーシブメッセージ>:どんな目的にも使える MIDIデータストリームに包まれたバイナリデータのチャンク。 +=begin original + B<text event>: any of the several meta-events (one of which is actually called 'text_event') that conveys text. Most often used to just label tracks, note the instruments used for a track, or to provide metainformation about copyright, performer, and piece title and author. +=end original + B<テキストイベント>:テキストを運ぶメタイベントの総称(そのうちの一つは実際に 'text_event'という)。トラック名や楽器の注釈をするのに使われたり、著作権、 演奏者、作品タイトルや作者などのメタ情報を提供するのに使われることが多い。 +=begin original + B<tick>: the timing unit in a MIDI opus. +=end original + B<ティック>:MIDIオプスにおける時間単位。 +=begin original + B<variable-length encoding>: an encoding method identical to what Perl calls the 'w' (BER, Basic Encoding Rules) pack/unpack format for integers. +=end original + B<可変長データエンコード>:Perlで整数値に対し使われる'w' pack/unpack フォーマットと同じエンコード方法。 =head1 参考文献 +=begin original + Christian Braut. I<The Musician's Guide to Midi.> ISBN 0782112854. [This one is indispensible --SMB] +=end original + Christian Braut. I<The Musician's Guide to Midi.> ISBN 0782112854. [これは必携の書 --SMB] +=begin original + Langston, Peter S. 1998. "Little Music Languages", p.587-656 in: Salus, Peter H,. editor in chief, /Handbook of Programming Languages/, vol. 3. MacMillan Technical, 1998. [The volume it's in is probably @@ -383,15 +537,21 @@ article anyway. It's not often you see 70 pages written on music languages. --SMB] +=end original + Langston, Peter S. 1998. "Little Music Languages", p.587-656 in: Salus, Peter H,. editor in chief, /Handbook of Programming Languages/, vol. 3. MacMillan Technical, 1998. [たぶんこの巻は値段に見合わないだろう。 だがとにかくこの記事にざっと目を通すことができるかどうかやってみるとよい。 音楽言語に関して70ページ書かれたものにお目にかかることはめったにないのだ。 --SMB] +=begin original + I'll keep a list of other references and good stuff at the URL C<http://www.speech.cs.cmu.edu/~sburke/pub/perl_midi/> +=end original + C<http://www.speech.cs.cmu.edu/~sburke/pub/perl_midi/> から 他の参考文献や素晴らしい素材のリストを得ている。