forked from ryo628/MyMidiPlayer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest.java
More file actions
45 lines (38 loc) · 743 Bytes
/
Copy pathTest.java
File metadata and controls
45 lines (38 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
class Test{
public static void main(String args[]) throws IOException, InterruptedException, InvalidMidiDataException
{
MyMidiPlayer c = new MyMidiPlayer();
int i = 0;
//読み込み
c.InitReadMidi( "hoge.mid" );
//再生
c.play();
/* 動作確認 */
//音量
while( i < 100 )
{
Thread.sleep(2000);
c.ChangeVelocity( 0, ( i++%2 == 1 )? 50:150 );
}
/*
//音色変更
while( i < 256 )
{
Thread.sleep(2000);
c.ChangeVoiceMessage( 0, i++ );
}
*/
/*
//テンポ変更
while( i < 100 )
{
Thread.sleep(4000);
c.ChangeBPM( ( i++%2 == 1 )? 60:120 );
}
*/
//再生停止
c.stop();
//シーケンサ開放処理
c.bye();
}
}