public class Track extends Object
一个Track
占据数据的
打层次中等水平:音序器播放序列,其中包含曲目,其中包含MIDI事件。音序器可以提供控制,静音或独奏单曲。Sequencer
跟踪轨道的定时信息和分辨率,并存储在包含轨道的序列中。一个给定的Track
是属于特定的
维持它的时机。为此,一个新的(空的)轨道是通过调用Sequence
方法创建的,而不是直接调用Sequence.createTrack()
Track
构造函数。
的Track
类提供了通过添加或去除从它的MidiEvent
对象编辑跟踪方法。这些操作保持在正确的时间顺序中的事件列表。方法也包括获得轨道的大小,无论是事件的数量,它包含或它的持续时间在蜱。
public boolean add(MidiEvent event)
event
-事件添加
true
如果事件已经不在轨道的存在和加入,否则
false
public boolean remove(MidiEvent event)
event
-事件移除
true
如果在轨道存在的事件和被删除,否则
false
public MidiEvent get(int index) throws ArrayIndexOutOfBoundsException
index
-在活动载体所需的事件的位置
ArrayIndexOutOfBoundsException
-如果指定的索引是消极或不低于本跟踪当前大小。
size()
public int size()
public long ticks()
Sequence
定时分辨率确定并通过音乐的节奏是由音序器。)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.