オープンソース・ソフトウェアの開発とダウンロード

CVS リポジトリの参照

Diff of /perldocjp/docs/modules/MIDI-Perl-0.8/MIDI/Score.pod

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2 by makamaka, Thu May 15 14:32:49 2003 UTC revision 1.3 by makamaka, Sun May 18 10:51:33 2003 UTC
# Line 6  MIDI::Score - MIDIスコア Line 6  MIDI::Score - MIDIスコア
6    
7  =head1 概要  =head1 概要
8    
9    # 話せば長くなるので、下をみよ。it's a long story; see below    # 話せば長くなるので、下をみよ。
10    
11  =head1 説明  =head1 説明
12    
# Line 17  functions in here.) Line 17  functions in here.)
17    
18  このモジュールはMIDIスコアを扱うための機能を提供する。  このモジュールはMIDIスコアを扱うための機能を提供する。
19  MIDI::Simpleの全ての機能の基として利用されている。  MIDI::Simpleの全ての機能の基として利用されている。
20  ちなみに、MIDI::Opusのdraw()メソッドもこのモジュールの機能の一部を利用している。  ちなみに、MIDI::Opusのdraw()メソッドもこのモジュールの機能の
21    一部を利用している。
22    
23  Whereas the events in a MIDI event structure are items whose timing  Whereas the events in a MIDI event structure are items whose timing
24  is expressed in delta-times, the timing of items in a score is  is expressed in delta-times, the timing of items in a score is
# Line 25  expressed as an absolute number of ticks Line 26  expressed as an absolute number of ticks
26  Moreover, pairs of 'note_on' and 'note_off' events in an event structure  Moreover, pairs of 'note_on' and 'note_off' events in an event structure
27  are abstracted into a single 'note' item in a score structure.  are abstracted into a single 'note' item in a score structure.
28    
29  MIDIイベント構造の中に入っている各イベントは、デルタタイムで表される時間間隔を  MIDIイベント構造体の中に入っている各イベントは、デルタタイムで表される
30  持った要素である。これに対してスコアの中の要素が持つ時間間隔は、そのトラックの  時間間隔を持った要素である。これに対してスコアの中の要素が持つ時間間隔は、
31  開始時間から計ったティックの絶対値として表現される。さらに、イベント構造内の  そのトラックの開始時間から計ったティックの絶対値として表現される。
32  'note_on'と'note_off'は、スコアの中では単体の'note'へと抽象化される。  さらに、イベント構造内で対になっているノートオン('note_on')と
33    ノートオフ('note_off')は、スコアの中では単体のノート('note')へと
34    抽象化される。
35    
36  'note' takes the following form:  'note' takes the following form:
37    
38  'note'は次の形式をとる:  ノート('note')は次の形式をとる:
39    
40   ('note_on', I<start_time>, I<duration>, I<channel>, I<note>, I<velocity>)   ('note', I<start_time>, I<duration>, I<channel>, I<note>, I<velocity>)
41    
42  The problem that score structures are meant to solve is that 1)  The problem that score structures are meant to solve is that 1)
43  people definitely don't think in delta-times -- they think in absolute  people definitely don't think in delta-times -- they think in absolute
44  times or in structures based on that (like 'time from start of measure');  times or in structures based on that (like 'time from start of measure');
45  2) people think in notes, not note_on and note_off events.  2) people think in notes, not note_on and note_off events.
46    
47  スコア構造によって次の問題が解決する。  スコア構造体によって次の問題が解決する。
48  (1)人々は明らかにデルタタイムでは考えない。絶対時間か上に述べたような構造  (1)人々は明らかにデルタタイムでは考えない。絶対時間か、上に述べた
49  (スタートからの時間)でもって考える。  ような構造(スタートからの時間)でもって考える。
50  (2)人々はノート(音符)で考えるのであって、ノートオンやノートオフでではない。  (2)人々はノート(音符)で考えるのであって、ノートオンやノートオフで
51    ではない。
52    
53  So, given this event structure:  So, given this event structure:
54    
55  そこで、次のようなイベント構造があるとする:  そこで、次のようなイベント構造体があるとする:
56    
57   ['text_event', 0, 'www.ely.anglican.org/parishes/camgsm/chimes.html'],   ['text_event', 0, 'www.ely.anglican.org/parishes/camgsm/chimes.html'],
58   ['text_event', 0, 'Lord through this hour/ be Thou our guide'],   ['text_event', 0, 'Lord through this hour/ be Thou our guide'],
# Line 91  So, given this event structure: Line 93  So, given this event structure:
93    
94  here is the corresponding score sctructure:  here is the corresponding score sctructure:
95    
96  これに対応するスコア構造は:  これに対応するスコア構造体は:
97    
98   ['text_event', 0, 'www.ely.anglican.org/parishes/camgsm/chimes.html'],   ['text_event', 0, 'www.ely.anglican.org/parishes/camgsm/chimes.html'],
99   ['text_event', 0, 'Lord through this hour/ be Thou our guide'],   ['text_event', 0, 'Lord through this hour/ be Thou our guide'],
# Line 140  The only exception to this is in the cas Line 142  The only exception to this is in the cas
142  where two (or more) score items happen I<at the same time> and where one  where two (or more) score items happen I<at the same time> and where one
143  affects the meaning of the other.  affects the meaning of the other.
144    
145  二つ以上のスコア要素が同時に発生し、かつ、一つが他方の意味に影響を与える場合。  二つ以上のスコア要素が同時に発生し、かつ、一つが他方の意味に
146    影響を与える場合。
147    
148    
149  =head1 スコアの中に何があるのか  =head1 スコアの中に何があるのか
# Line 153  delta-time in ticks, but instead denotes Line 156  delta-time in ticks, but instead denotes
156  from the start of the track.  from the start of the track.
157    
158  (先に述べた)C<note>以外に、スコア構造体が持ちうる構成要素をもとめると:  (先に述べた)C<note>以外に、スコア構造体が持ちうる構成要素をもとめると:
159  イベント構造に現れるものは何でもスコア構造に現れうるということだ。  イベント構造体に現れるものは何でもスコア構造体に現れうるということだ。
160  要素が保持する第二パラメータはティックで表現されるデルタタイムではなく、  要素が保持する第二パラメータはティックで表現されるデルタタイムではなく、
161  トラック開始からの絶対的なティックの数を意味している。  トラック開始からの絶対的なティックの数を意味している。
162    
# Line 162  occasionally refer to items in a score s Line 165  occasionally refer to items in a score s
165  not they are actually C<note> commands.  This leaves "event" to  not they are actually C<note> commands.  This leaves "event" to
166  unambiguously denote items in an event structure.  unambiguously denote items in an event structure.
167    
168  "スコア構造の要素"などという回りくどい言い方は避けたいので、私はしばしば  「スコア構造体の要素」などという回りくどい言い方は避けたいので、
169  これを"notes"と呼ぶ。それが本当にC<note>命令なのかどうかは関係ない。  私はしばしばこれをノート("notes")と呼ぶ。それが本当にC<note>コマンド
170  "event"の方は、明確にイベント構造の要素を意味するよう、そのままにしておく。  なのかどうかとは関係ない。"event"の方は、明確にイベント構造体の要素を
171    意味するよう、そのままにしておく。
172    
173  These, below, are all the items that can appear in a score.  These, below, are all the items that can appear in a score.
174  This is basically just a repetition of the table in  This is basically just a repetition of the table in
# Line 174  so refer to L<MIDI::Event> for an explan Line 178  so refer to L<MIDI::Event> for an explan
178  As far as order, the first items are generally the most important:  As far as order, the first items are generally the most important:
179    
180  以下はスコアに登場する全項目である。  以下はスコアに登場する全項目である。
181  基本的にL<MIDI::Event>にあった表の繰り返しでしかない。デルタタイムの代わりに  基本的にL<MIDI::Event>にあった表の繰り返しでしかない。デルタタイムの
182  スタート時からのタイムに置き換わってはいるが。だから、データタイプ  代わりにスタート時からのタイムに置き換わってはいるが。だから、
183  ("velocity"や"pitch_wheel"など)の説明はL<MIDI::Event>を参照して欲しい。  データタイプ("velocity"や"pitch_wheel"など)の説明はL<MIDI::Event>を
184  順番に限っていえば、一般的に最初のほうに出てくるものが最も重要である。  参照して欲しい。順番に限っていえば、一般的に最初のほうに出てくるものが
185    最も重要である。
186    
187  =over  =over
188    
# Line 282  also returns a second value, a count of Line 287  also returns a second value, a count of
287  structure takes to play (i.e., the end-time of the temporally last  structure takes to play (i.e., the end-time of the temporally last
288  item).  item).
289    
290  この関数はスコア構造体へのリファレンスを引数にとってイベント構造体に変換し、  この関数はスコア構造体へのリファレンスを引数にとってイベント構造体に
291  そのリファレンスを返す。リストコンテキストでは、二つ目の値も返す。これは  変換し、そのリファレンスを返す。リストコンテキストでは、二つ目の値も
292  その構造体が演奏に要するティックの総数(時間的に最後の項目の終了時間)  返す。これはその構造体が演奏に要するティックの総数(時間的に最後の
293  である。  項目の終了時間)である。
294    
295  =item $score2_r = MIDI::Score::sort_score_r( $score_r)  =item $score2_r = MIDI::Score::sort_score_r( $score_r)
296    
297  This takes a I<reference> to a score structure, and returns a  This takes a I<reference> to a score structure, and returns a
298  I<reference> to a sorted (by time) copy of it. Example usage:  I<reference> to a sorted (by time) copy of it. Example usage:
299    
300  この関数はスコア構造体へのリファレンスを引数にとり、(時間によって)ソート  この関数はスコア構造体へのリファレンスを引数にとり、(時間によって)
301  されたコピーへのリファレンスを返す。例えば:  ソートされたコピーへのリファレンスを返す。例えば:
302    
303            @sorted_score = @{ MIDI::Score::sort_score_r( \@old_score ) };            @sorted_score = @{ MIDI::Score::sort_score_r( \@old_score ) };
304    
# Line 307  list context, also returns a count of th Line 312  list context, also returns a count of th
312  structure takes to play (i.e., the end-time of the temporally last  structure takes to play (i.e., the end-time of the temporally last
313  item).  item).
314    
315  この関数はイベント構造体へのリファレンスを引数にとってスコア構造体に変換し、  この関数はイベント構造体へのリファレンスを引数にとってスコア構造体に
316  そのリファレンスを返す。リストコンテキストでこの関数を呼び出すと、  変換し、そのリファレンスを返す。リストコンテキストでこの関数を
317  その構造体が演奏に要するティックの総数(時間的に最後の項目の終了時間)  呼び出すと、その構造体が演奏に要するティックの総数(時間的に最後の項目の
318  を返す。  終了時間)を返す。
319    
320  =item $ticks = MIDI::Score::score_r_time( $score_r )  =item $ticks = MIDI::Score::score_r_time( $score_r )
321    
# Line 326  a count of the number of ticks that stru Line 331  a count of the number of ticks that stru
331  This dumps (via C<print>) a text representation of the contents of  This dumps (via C<print>) a text representation of the contents of
332  the event structure you pass a reference to.  the event structure you pass a reference to.
333    
334  この関数は(C<print>を通じて)イベント構造体の中身をテキスト表記で  この関数は(C<print>を通じて)リファレンス先のイベント構造体
335  ダンプする。  [訳補足:スコア構造体の間違い?]の中身をテキスト表記でダンプする。
336    
337  =back  =back
338    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26