51 |
int mDev, aDev, chn; |
int mDev, aDev, chn; |
52 |
|
|
53 |
// Creates new MIDI input device using the first availble MIDI driver |
// Creates new MIDI input device using the first availble MIDI driver |
54 |
mDev = client.createMidiInputDevice(client.getMidiInputDrivers()[0]); |
mDev =client.createMidiInputDevice ( |
55 |
|
client.getMidiInputDrivers()[0].getName() |
56 |
|
); |
57 |
|
|
58 |
// Creates new audio output device using the first audio output driver |
// Creates new audio output device using the first audio output driver |
59 |
aDev = client.createAudioOutputDevice(client.getAudioOutputDrivers()[0]); |
aDev = client.createAudioOutputDevice ( |
60 |
|
client.getAudioOutputDrivers()[0].getName() |
61 |
|
); |
62 |
|
|
63 |
// Creates new sampler channel |
// Creates new sampler channel |
64 |
chn = client.addSamplerChannel(); |
chn = client.addSamplerChannel(); |
70 |
client.setChannelAudioOutputDevice(chn, aDev); |
client.setChannelAudioOutputDevice(chn, aDev); |
71 |
|
|
72 |
// Setting the engine type |
// Setting the engine type |
73 |
client.loadSamplerEngine(client.getEngines()[0], chn); |
client.loadSamplerEngine(client.getEngines()[0].getName(), chn); |
74 |
|
|
75 |
// Loading instrument |
// Loading instrument |
76 |
client.loadInstrument(args[0], Integer.parseInt(args[1]), chn); |
client.loadInstrument(args[0], Integer.parseInt(args[1]), chn); |