import javax.sound.midi.MidiMessage;\r
import javax.sound.midi.Sequence;\r
import javax.sound.midi.ShortMessage;\r
+import javax.sound.midi.SysexMessage;\r
import javax.sound.midi.Track;\r
// for ComboBoxModel implementation\r
import javax.swing.ComboBoxModel;\r
Track track = null;\r
FirstTrackSpec first_track_spec = null;\r
Sequence sequence = null;\r
- long min_note_ticks = 0;\r
+ long minNoteTicks = 0;\r
int pre_measures = 2;\r
+ /**\r
+ * トラック名なしでMIDIトラック仕様を構築します。\r
+ */\r
public AbstractTrackSpec() { }\r
+ /**\r
+ * トラック名を指定してMIDIトラック仕様を構築します。\r
+ * @param name\r
+ */\r
public AbstractTrackSpec(String name) {\r
this.name = name;\r
}\r
+ /**\r
+ * このオブジェクトの文字列表現としてトラック名を返します。\r
+ * トラック名がない場合はスーパークラスの toString() と同じです。\r
+ */\r
public String toString() {\r
- return name;\r
+ return name==null ? super.toString() : name;\r
}\r
- public Track createTrack( Sequence seq, FirstTrackSpec first_track_spec ) {\r
- this.first_track_spec = first_track_spec;\r
+ /**\r
+ * トラックを生成して返します。\r
+ * @param seq MIDIシーケンス\r
+ * @param firstTrackSpec 最初のトラック仕様\r
+ * @return 生成したトラック\r
+ */\r
+ public Track createTrack( Sequence seq, FirstTrackSpec firstTrackSpec ) {\r
+ this.first_track_spec = firstTrackSpec;\r
track = (sequence = seq).createTrack();\r
if( name != null ) addStringTo( 0x03, name, 0 );\r
- min_note_ticks = (long)( seq.getResolution() >> 2 );\r
+ minNoteTicks = (long)( seq.getResolution() >> 2 );\r
return track;\r
}\r
- public boolean addMetaEventTo( int type, byte data[], long tick_pos ) {\r
+ /**\r
+ * メタイベントを追加します。\r
+ * @param type メタイベントのタイプ\r
+ * @param data メタイベントのデータ\r
+ * @param tickPos tick位置\r
+ * @return {@link Track#add(MidiEvent)} と同じ\r
+ */\r
+ public boolean addMetaEventTo( int type, byte data[], long tickPos ) {\r
MetaMessage meta_msg = new MetaMessage();\r
try {\r
meta_msg.setMessage( type, data, data.length );\r
ex.printStackTrace();\r
return false;\r
}\r
- return track.add(new MidiEvent( (MidiMessage)meta_msg, tick_pos ));\r
+ return track.add(new MidiEvent(meta_msg, tickPos));\r
}\r
- public boolean addStringTo( int type, String str, long tick_pos ) {\r
+ /**\r
+ * 文字列をメタイベントとして追加します。\r
+ * @param type メタイベントのタイプ\r
+ * @param str 追加する文字列\r
+ * @param tickPos tick位置\r
+ * @return {@link #addMetaEventTo(int, byte[], long)} と同じ\r
+ */\r
+ public boolean addStringTo( int type, String str, long tickPos ) {\r
if( str == null ) str = "";\r
- return addMetaEventTo( type, str.getBytes(), tick_pos );\r
+ return addMetaEventTo( type, str.getBytes(), tickPos );\r
}\r
public boolean addStringTo( int type, ChordProgression.ChordStroke cs ) {\r
return addStringTo(type, cs.chord.toString(), cs.tick_range.start_tick_pos);\r
public void setChordSymbolText( ChordProgression cp ) {\r
cp.setChordSymbolTextTo( this );\r
}\r
+ public boolean addSysEx(byte[] data, long tickPos) {\r
+ SysexMessage msg = new SysexMessage();\r
+ try {\r
+ msg.setMessage( SysexMessage.SYSTEM_EXCLUSIVE, data, data.length );\r
+ } catch( InvalidMidiDataException ex ) {\r
+ ex.printStackTrace();\r
+ return false;\r
+ }\r
+ return track.add(new MidiEvent( msg, tickPos ));\r
+ }\r
}\r
\r
// 最初のトラック専用\r
for(\r
tick = range.start_tick_pos, mask = 0x8000;\r
tick < range.end_tick_pos;\r
- tick += min_note_ticks, mask >>>= 1\r
+ tick += minNoteTicks, mask >>>= 1\r
) {\r
for( i=0; i<beat_patterns.length; i++ ) {\r
if( (beat_patterns[i] & mask) == 0 )\r
}\r
}\r
\r
+ /**\r
+ * メロディトラック仕様\r
+ */\r
public static class MelodyTrackSpec extends AbstractNoteTrackSpec {\r
-\r
- Range range; // 音域\r
-\r
- // 音を出すかどうかを表すビット列\r
- int beat_pattern = 0xFFFF;\r
-\r
- // あとで音を出し続けるかどうかを表すビット列\r
- int continuous_beat_pattern = 0xEEEE;\r
-\r
- // ベース音を使う場合 true\r
- // それ以外のコード構成音を使う場合 false\r
- boolean is_bass = false;\r
-\r
- // 乱数メロディを作るかどうか\r
- boolean random_melody = false;\r
-\r
- // 乱数歌詞を作るかどうか\r
- boolean random_lyric = false;\r
-\r
+ /**\r
+ * 音域\r
+ */\r
+ Range range;\r
+ /**\r
+ * 音を出すかどうかを表すビット列\r
+ */\r
+ int beatPattern = 0xFFFF;\r
+ /**\r
+ * あとで音を出し続けるかどうかを表すビット列\r
+ */\r
+ int continuousBeatPattern = 0xEEEE;\r
+ /**\r
+ * ベース音を使う場合 true、それ以外のコード構成音を使う場合 false\r
+ */\r
+ boolean isBass = false;\r
+ /**\r
+ * 乱数メロディを作るかどうか\r
+ */\r
+ boolean randomMelody = false;\r
+ /**\r
+ * 乱数歌詞を作るかどうか\r
+ */\r
+ boolean randomLyric = false;\r
+ /**\r
+ * 乱数歌詞をNSX-39(ポケット・ミク)対応の\r
+ * システムエクスクルーシブを使って出力するかどうか\r
+ */\r
+ boolean nsx39 = false;\r
+ /**\r
+ * メロディトラック仕様を構築\r
+ * @param ch MIDIチャンネル\r
+ * @param name トラック名\r
+ */\r
public MelodyTrackSpec(int ch, String name) {\r
super(ch,name);\r
range = new Range(\r
SEMITONES_PER_OCTAVE * 5, SEMITONES_PER_OCTAVE * 6 );\r
}\r
+ /**\r
+ * 音域を指定してメロディトラック仕様を構築\r
+ * @param ch MIDIチャンネル\r
+ * @param name トラック名\r
+ * @param range 音域\r
+ */\r
public MelodyTrackSpec(int ch, String name, Range range) {\r
super(ch,name);\r
this.range = range;\r
}\r
-\r
+ /**\r
+ * コードの追加\r
+ * @param cp コード進行\r
+ */\r
public void addChords( ChordProgression cp ) {\r
int mask;\r
long tick;\r
- long start_tick_pos;\r
+ long startTickPos;\r
\r
// 音階ごとの生起確率を決める重みリスト(random_melody の場合)\r
- int i, note_no, prev_note_no = 1;\r
- int note_weights[] = new int[range.max_note - range.min_note];\r
+ int i, noteNumber, prevNoteNumber = 1;\r
+ int noteWeights[] = new int[range.max_note - range.min_note];\r
//\r
Key key = cp.key;\r
if( key == null ) key = new Key("C");\r
for( ChordProgression.Measure measure : line ) { // 小節単位の処理\r
if( measure.ticks_per_beat == null )\r
continue;\r
- ChordProgression.TickRange tick_range = measure.getRange();\r
- boolean is_note_on = false;\r
+ ChordProgression.TickRange tickRange = measure.getRange();\r
+ boolean isNoteOn = false;\r
//\r
// 各ビートごとに繰り返し\r
for(\r
- tick = start_tick_pos = tick_range.start_tick_pos, mask = 0x8000;\r
- tick < tick_range.end_tick_pos;\r
- tick += min_note_ticks, mask >>>= 1\r
- ) {\r
+ tick = startTickPos = tickRange.start_tick_pos, mask = 0x8000;\r
+ tick < tickRange.end_tick_pos;\r
+ tick += minNoteTicks, mask >>>= 1\r
+ ) {\r
// そのtick地点のコードを調べる\r
Chord chord = measure.chordStrokeAt(tick).chord;\r
int notes[] = chord.toNoteArray(range);\r
//\r
// 各音階ごとに繰り返し\r
if( Math.random() < 0.9 ) {\r
- if( (beat_pattern & mask) == 0 ) {\r
+ if( (beatPattern & mask) == 0 ) {\r
// 音を出さない\r
continue;\r
}\r
}\r
else {\r
// ランダムに逆パターン\r
- if( (beat_pattern & mask) != 0 ) {\r
+ if( (beatPattern & mask) != 0 ) {\r
continue;\r
}\r
}\r
- if( ! is_note_on ) {\r
+ if( ! isNoteOn ) {\r
// 前回のビートで継続していなかったので、\r
// この地点で音を出し始めることにする。\r
- start_tick_pos = tick;\r
- is_note_on = true;\r
+ startTickPos = tick;\r
+ isNoteOn = true;\r
}\r
if( Math.random() < 0.9 ) {\r
- if( (continuous_beat_pattern & mask) != 0 ) {\r
+ if( (continuousBeatPattern & mask) != 0 ) {\r
// 音を継続\r
continue;\r
}\r
}\r
else {\r
// ランダムに逆パターン\r
- if( (continuous_beat_pattern & mask) == 0 ) {\r
+ if( (continuousBeatPattern & mask) == 0 ) {\r
continue;\r
}\r
}\r
// このビートの終了tickで音を出し終わることにする。\r
- if( random_melody ) {\r
+ if( randomMelody ) {\r
// 音階ごとに出現確率を決める\r
- int total_weight = 0;\r
- for( i=0; i<note_weights.length; i++ ) {\r
- note_no = range.min_note + i;\r
- int m12 = mod12(note_no - chord.rootNoteSymbol().toNoteNumber());\r
+ int totalWeight = 0;\r
+ for( i=0; i<noteWeights.length; i++ ) {\r
+ noteNumber = range.min_note + i;\r
+ int m12 = mod12(noteNumber - chord.rootNoteSymbol().toNoteNumber());\r
int w;\r
- if( chord.indexOf(note_no) >= 0 ) {\r
+ if( chord.indexOf(noteNumber) >= 0 ) {\r
// コード構成音は確率を上げる\r
w = 255;\r
}\r
default:\r
w = 0; break;\r
}\r
- if( ! key.isOnScale( note_no ) ) {\r
+ if( ! key.isOnScale( noteNumber ) ) {\r
// スケールを外れている音は採用しない\r
w = 0;\r
}\r
}\r
// 乱高下軽減のため、前回との差によって確率を調整する\r
- int diff = note_no - prev_note_no;\r
+ int diff = noteNumber - prevNoteNumber;\r
if( diff < 0 ) diff = -diff;\r
if( diff == 0 ) w /= 8;\r
else if( diff > 7 ) w = 0;\r
else if( diff > 4 ) w /= 8;\r
- total_weight += (note_weights[i] = w);\r
+ totalWeight += (noteWeights[i] = w);\r
}\r
// さいころを振って音階を決定\r
- note_no = range.invertedNoteOf(key.rootNoteNumber());\r
+ noteNumber = range.invertedNoteOf(key.rootNoteNumber());\r
double r = Math.random();\r
- total_weight *= r;\r
- for( i=0; i<note_weights.length; i++ ) {\r
- if( (total_weight -= note_weights[i]) < 0 ) {\r
- note_no = range.min_note + i;\r
+ totalWeight *= r;\r
+ for( i=0; i<noteWeights.length; i++ ) {\r
+ if( (totalWeight -= noteWeights[i]) < 0 ) {\r
+ noteNumber = range.min_note + i;\r
break;\r
}\r
}\r
- // 決定された音符を追加\r
- addNote(\r
- start_tick_pos, tick + min_note_ticks,\r
- note_no, velocity\r
- );\r
- if( random_lyric ) {\r
- // ランダムな歌詞を追加\r
- addStringTo(\r
- 0x05,\r
- VocaloidLyricGenerator.getRandomLyric(),\r
- start_tick_pos\r
+ if( randomLyric ) {\r
+ // ランダムな歌詞を作成\r
+ int index = (int)(Math.random() * nsx39LyricElements.length);\r
+ if( nsx39 ) {\r
+ // ポケット・ミク用システムエクスクルーシブ\r
+ nsx39SysEx[6] = (byte)(index & 0x7F);\r
+ addSysEx(nsx39SysEx, startTickPos);\r
+ }\r
+ // 決定された音符を追加\r
+ addNote(\r
+ startTickPos, tick + minNoteTicks,\r
+ noteNumber, velocity\r
);\r
+ // 歌詞をテキストとして追加\r
+ addStringTo(0x05, nsx39LyricElements[index], startTickPos);\r
}\r
- prev_note_no = note_no;\r
+ else {\r
+ // 決定された音符を追加\r
+ addNote(\r
+ startTickPos, tick + minNoteTicks,\r
+ noteNumber, velocity\r
+ );\r
+ }\r
+ prevNoteNumber = noteNumber;\r
}\r
- else if( is_bass ) {\r
+ else if( isBass ) {\r
// ベース音を追加\r
int note = range.invertedNoteOf(chord.bassNoteSymbol().toNoteNumber());\r
addNote(\r
- start_tick_pos, tick + min_note_ticks,\r
+ startTickPos, tick + minNoteTicks,\r
note, velocity\r
);\r
}\r
// コード本体の音を追加\r
for( int note : notes ) {\r
addNote(\r
- start_tick_pos, tick + min_note_ticks,\r
+ startTickPos, tick + minNoteTicks,\r
note, velocity\r
);\r
}\r
}\r
- is_note_on = false;\r
+ isNoteOn = false;\r
}\r
}\r
}\r
\r
}\r
\r
- //\r
- // VOCALOID互換の音素単位で歌詞を生成するクラス\r
- //\r
- public static class VocaloidLyricGenerator {\r
- private static String lyric_elements[] = {\r
- /*\r
- "きゃ","きゅ","きょ",\r
- "しゃ","しゅ","しょ",\r
- "ちゃ","ちゅ","ちょ",\r
- "にゃ","にゅ","にょ",\r
- "ひゃ","ひゅ","ひょ",\r
- "みゃ","みゅ","みょ",\r
- "りゃ","りゅ","りょ",\r
- "ぎゃ","ぎゅ","ぎょ",\r
- "じゃ","じゅ","じょ",\r
- "ぢゃ","ぢゅ","ぢょ",\r
- "びゃ","びゅ","びょ",\r
- "ぴゃ","ぴゅ","ぴょ",\r
- */\r
- "あ","い","う","え","お",\r
- "か","き","く","け","こ",\r
- "さ","し","す","せ","そ",\r
- "た","ち","つ","て","と",\r
- "な","に","ぬ","ね","の",\r
- "は","ひ","ふ","へ","ほ",\r
- "ま","み","む","め","も",\r
- "や","ゆ","よ",\r
- "ら","り","る","れ","ろ",\r
- "わ","を","ん",\r
- "が","ぎ","ぐ","げ","ご",\r
- "ざ","じ","ず","ぜ","ぞ",\r
- "だ","ぢ","づ","で","ど",\r
- "ば","び","ぶ","べ","ぼ",\r
- "ぱ","ぴ","ぷ","ぺ","ぽ",\r
- };\r
- //\r
- // ランダムに音素を返す\r
- public static String getRandomLyric() {\r
- return lyric_elements[(int)(Math.random() * lyric_elements.length)];\r
- }\r
- /*\r
- // テキストを音素に分解する\r
- public static Vector<String> split(String text) {\r
- Vector<String> sv = new Vector<String>();\r
- String s, prev_s;\r
- int i;\r
- for( i=0; i < text.length(); i++ ) {\r
- s = text.substring(i,i+1);\r
- if( "ゃゅょ".indexOf(s) < 0 ) {\r
- sv.add(s);\r
- }\r
- else {\r
- prev_s = sv.remove(sv.size()-1);\r
- sv.add( prev_s + s );\r
- }\r
- }\r
- return sv;\r
- }\r
- */\r
- }\r
+ private static byte nsx39SysEx[] = {\r
+ 0x43, 0x79, 0x09, 0x11, 0x0A, 0x00, 0x00, (byte) 0xF7\r
+ };\r
+ private static String nsx39LyricElements[] = {\r
+ "あ","い","う","え","お",\r
+ "か","き","く","け","こ",\r
+ "が","ぎ","ぐ","げ","ご",\r
+ "きゃ","きゅ","きょ",\r
+ "ぎゃ","ぎゅ","ぎょ",\r
+ "さ","すぃ","す","せ","そ",\r
+ "ざ","ずぃ","ず","ぜ","ぞ",\r
+ "しゃ","し","しゅ","しぇ","しょ",\r
+ "じゃ","じ","じゅ","じぇ","じょ",\r
+ "た","てぃ","とぅ","て","と",\r
+ "だ","でぃ","どぅ","で","ど",\r
+ "てゅ","でゅ",\r
+ "ちゃ","ち","ちゅ","ちぇ","ちょ",\r
+ "つぁ","つぃ","つ","つぇ","つぉ",\r
+ "な","に","ぬ","ね","の",\r
+ "にゃ","にゅ","にょ",\r
+ "は","ひ","ふ","へ","ほ",\r
+ "ば","び","ぶ","べ","ぼ",\r
+ "ぱ","ぴ","ぷ","ぺ","ぽ",\r
+ "ひゃ","ひゅ","ひょ",\r
+ "びゃ","びゅ","びょ",\r
+ "ぴゃ","ぴゅ","ぴょ",\r
+ "ふぁ","ふぃ","ふゅ","ふぇ","ふぉ",\r
+ "ま","み","む","め","も",\r
+ "みゃ","みゅ","みょ",\r
+ "や","ゆ","よ",\r
+ "ら","り","る","れ","ろ",\r
+ "りゃ","りゅ","りょ",\r
+ "わ","うぃ","うぇ","を",\r
+ "ん","ん","ん","ん","ん",\r
+ };\r
\r
}\r
\r
Music.DrumTrackSpec dts = new Music.DrumTrackSpec(9, "Percussion track");\r
dts.velocity = 127;\r
addTrackSpec(dts);\r
- //\r
Music.MelodyTrackSpec mts;\r
- mts = new Music.MelodyTrackSpec(0, "Bass track", new Music.Range(36,48));\r
- mts.is_bass = true;\r
+ mts = new Music.MelodyTrackSpec(2, "Bass track", new Music.Range(36,48));\r
+ mts.isBass = true;\r
mts.velocity = 96;\r
addTrackSpec(mts);\r
mts = new Music.MelodyTrackSpec(1, "Chord track", new Music.Range(60,72));\r
addTrackSpec(mts);\r
- mts = new Music.MelodyTrackSpec(2, "Melody track", new Music.Range(60,84));\r
- mts.random_melody = true;\r
- mts.beat_pattern = 0xFFFF;\r
- mts.continuous_beat_pattern = 0x820A;\r
+ mts = new Music.MelodyTrackSpec(0, "Melody track", new Music.Range(60,84));\r
+ mts.randomMelody = true;\r
+ mts.beatPattern = 0xFFFF;\r
+ mts.continuousBeatPattern = 0x820A;\r
addTrackSpec(mts);\r
}};\r
/**\r
class TrackSpecPanel extends JPanel\r
implements PianoKeyboardListener, ActionListener, ChangeListener\r
{\r
- JComboBox<Music.AbstractNoteTrackSpec> trackSelecter =\r
- new JComboBox<Music.AbstractNoteTrackSpec>();\r
+ JComboBox<Music.AbstractNoteTrackSpec> trackSelecter = new JComboBox<>();\r
JLabel trackTypeLabel = new JLabel();\r
JTextField nameTextField = new JTextField(20);\r
MidiChannelComboSelecter chSelecter =\r
}};\r
JCheckBox randomMelodyCheckbox = new JCheckBox("Random melody");\r
JCheckBox bassCheckbox = new JCheckBox("Bass note");\r
- JCheckBox randomLyricCheckbox = new JCheckBox("Random lyrics");;\r
+ JCheckBox randomLyricCheckbox = new JCheckBox("Random lyrics");\r
+ JCheckBox nsx39Checkbox = new JCheckBox("NSX-39");;\r
BeatPadPanel beatPadPanel = new BeatPadPanel(this);\r
private MidiChannel[] midiChannels;\r
\r
add(randomMelodyCheckbox);\r
randomLyricCheckbox.addChangeListener(this);\r
add(randomLyricCheckbox);\r
+ nsx39Checkbox.addChangeListener(this);\r
+ add(nsx39Checkbox);\r
add(beatPadPanel);\r
trackSelecter.addActionListener(this);\r
chSelecter.comboBox.addActionListener(this);\r
Music.AbstractNoteTrackSpec ants = getTrackSpec();\r
if( ants instanceof Music.MelodyTrackSpec ) {\r
Music.MelodyTrackSpec mts = (Music.MelodyTrackSpec)ants;\r
- mts.is_bass = bassCheckbox.isSelected();\r
+ mts.isBass = bassCheckbox.isSelected();\r
}\r
}\r
else if( src == randomMelodyCheckbox ) {\r
Music.AbstractNoteTrackSpec ants = getTrackSpec();\r
if( ants instanceof Music.MelodyTrackSpec ) {\r
Music.MelodyTrackSpec mts = (Music.MelodyTrackSpec)ants;\r
- mts.random_melody = randomMelodyCheckbox.isSelected();\r
+ mts.randomMelody = randomMelodyCheckbox.isSelected();\r
}\r
}\r
else if( src == randomLyricCheckbox ) {\r
Music.AbstractNoteTrackSpec ants = getTrackSpec();\r
if( ants instanceof Music.MelodyTrackSpec ) {\r
Music.MelodyTrackSpec mts = (Music.MelodyTrackSpec)ants;\r
- mts.random_lyric = randomLyricCheckbox.isSelected();\r
+ mts.randomLyric = randomLyricCheckbox.isSelected();\r
+ }\r
+ }\r
+ else if( src == nsx39Checkbox ) {\r
+ Music.AbstractNoteTrackSpec ants = getTrackSpec();\r
+ if( ants instanceof Music.MelodyTrackSpec ) {\r
+ Music.MelodyTrackSpec mts = (Music.MelodyTrackSpec)ants;\r
+ mts.nsx39 = nsx39Checkbox.isSelected();\r
}\r
}\r
}\r
rangePanel.setVisible(false);\r
randomMelodyCheckbox.setVisible(false);\r
randomLyricCheckbox.setVisible(false);\r
+ nsx39Checkbox.setVisible(false);\r
bassCheckbox.setVisible(false);\r
}\r
else if( ants instanceof Music.MelodyTrackSpec ) {\r
keyboardPanel.keyboard.setSelectedNote(ts.range.min_note);\r
keyboardPanel.keyboard.setSelectedNote(ts.range.max_note);\r
keyboardPanel.keyboard.autoScroll(ts.range.min_note);\r
- randomMelodyCheckbox.setSelected(ts.random_melody);\r
- randomLyricCheckbox.setSelected(ts.random_lyric);\r
- bassCheckbox.setSelected(ts.is_bass);\r
+ randomMelodyCheckbox.setSelected(ts.randomMelody);\r
+ randomLyricCheckbox.setSelected(ts.randomLyric);\r
+ bassCheckbox.setSelected(ts.isBass);\r
randomMelodyCheckbox.setVisible(true);\r
randomLyricCheckbox.setVisible(true);\r
+ nsx39Checkbox.setVisible(true);\r
bassCheckbox.setVisible(true);\r
}\r
beatPadPanel.setTrackSpec(ants);\r
Music.MelodyTrackSpec mts = (Music.MelodyTrackSpec)track_spec;\r
for( beat=0, mask=0x8000; beat<MAX_BEATS; beat++, mask >>>= 1 ) {\r
r = beat_buttons[0][beat];\r
- if( (mts.beat_pattern & mask) != 0 )\r
+ if( (mts.beatPattern & mask) != 0 )\r
g2.fillRect( r.x, r.y, r.width, r.height );\r
else\r
g2.drawRect( r.x, r.y, r.width, r.height );\r
r = continuous_beat_buttons[0][beat];\r
- if( (mts.continuous_beat_pattern & mask) != 0 )\r
+ if( (mts.continuousBeatPattern & mask) != 0 )\r
g2.fillRect( r.x, r.y, r.width, r.height );\r
else\r
g2.drawRect( r.x, r.y, r.width, r.height );\r
Music.MelodyTrackSpec mts = (Music.MelodyTrackSpec)track_spec;\r
for( beat=0, mask=0x8000; beat<MAX_BEATS; beat++, mask >>>= 1 ) {\r
if( beat_buttons[0][beat].contains(point) ) {\r
- mts.beat_pattern ^= mask;\r
+ mts.beatPattern ^= mask;\r
repaint(); return;\r
}\r
if( continuous_beat_buttons[0][beat].contains(point) ) {\r
- mts.continuous_beat_pattern ^= mask;\r
+ mts.continuousBeatPattern ^= mask;\r
repaint(); return;\r
}\r
}\r