protected function execute(InputInterface $input, OutputInterface $output)
 {
     $sampler = new LinuxSampler('192.168.178.47');
     $output->writeln('Connecting to server...');
     $sampler->connect();
     $output->writeln('Sampler channels: ' . $sampler->getChannels());
     $channelsList = $sampler->getChannelList();
     $output->writeln('List:');
     foreach ($channelsList as $channel) {
         $output->writeln(' ' . $channel);
         $channelInfos = $sampler->getChannelInfos($channel);
         $output->writeln('  Engine Name: ' . $channelInfos->engine_name);
         $output->writeln('  Volume: ' . $channelInfos->volume);
         $output->writeln('  Audio output device: ' . $channelInfos->audio_output_device);
         $output->writeln('  Audio output channels: ' . $channelInfos->audio_output_channels);
         $output->writeln('  Audio output routing: ' . $channelInfos->audio_output_routing);
         $output->writeln('  Midi input device: ' . $channelInfos->midi_input_device);
         $output->writeln('  Midi input port: ' . $channelInfos->midi_input_port);
         $output->writeln('  Midi input channel: ' . $channelInfos->midi_input_channel);
         $output->writeln('  Instrument file: ' . $channelInfos->instrument_file);
         $output->writeln('  Instrument nr: ' . $channelInfos->instrument_nr);
         $output->writeln('  Instrument name: ' . $channelInfos->instrument_name);
         $output->writeln('  Instrument status ' . $channelInfos->instrument_status);
         $output->writeln('  Mute: ' . $channelInfos->mute);
         $output->writeln('  Solo: ' . $channelInfos->solo);
         $output->writeln('  Midi instrument map: ' . $channelInfos->midi_instrument_map);
     }
 }
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $sampler = new LinuxSampler('192.168.178.47');
     $output->writeln('Connecting to server...');
     $sampler->connect();
     $intrumentsFile = '/home/pi/linuxsampler/telecaster.gig';
     $instrumentId = 0;
     $output->writeln(sprintf('Loading instrument %s from file %s...', $instrumentId, $intrumentsFile));
     $res = $sampler->loadInstrument($intrumentsFile, $instrumentId, 0, true);
     $output->writeln('done');
 }
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $sampler = new LinuxSampler();
     $output->writeln('Connecting to server...');
     $sampler->connect();
     $output->writeln('Sending MIDI NOTE_ON...');
     $sampler->sendChannelMidiData(LinuxSampler::MIDI_MESSAGE_NOTE_ON, 0, 56, 112);
     $output->writeln('Waiting 2 seconds...');
     sleep(2);
     $output->writeln('Sending MIDI NOTE_OFF...');
     $sampler->sendChannelMidiData(LinuxSampler::MIDI_MESSAGE_NOTE_OFF, 0, 56, 112);
 }
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $sampler = new LinuxSampler();
     $output->writeln('Connecting to server...');
     $sampler->connect();
     $output->writeln('Available midi input devices: ' . $sampler->getMidiInputDevices());
     $deviceList = $sampler->getMidiInputDeviceList();
     $output->writeln('List:');
     foreach ($deviceList as $deviceId) {
         $output->writeln(' ' . $deviceId);
         $deviceSettings = $sampler->getMidiInputDeviceSettings($deviceId);
         $output->writeln('  Driver: ' . $deviceSettings->driver);
         $output->writeln('  Active: ' . $deviceSettings->active);
     }
 }
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $sampler = new LinuxSampler();
     $output->writeln('Connecting to server...');
     $sampler->connect();
     $output->writeln('Available output drivers: ' . $sampler->getAvailableAudioOutputDrivers());
     $driversList = $sampler->getAvailableAudioOutputDriverList();
     $output->writeln('List:');
     foreach ($driversList as $driver) {
         $output->writeln(' ' . $driver);
         $driverInfos = $sampler->getAudioOutputDriverInfo($driver);
         $output->writeln('  Description: ' . $driverInfos->description);
         $output->writeln('  Version: ' . $driverInfos->version);
         $output->writeln('  Parameters: ' . implode(', ', $driverInfos->parameters));
     }
 }
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $sampler = new LinuxSampler('192.168.178.47');
     $output->writeln('Connecting to server...');
     $sampler->connect();
     $output->writeln('Instruments in File ' . $sampler->getChannels());
     $instrumentsList = $sampler->listFileInstruments('/home/pi/linuxsampler/telecaster.gig');
     $output->writeln('List:');
     foreach ($instrumentsList as $instrument) {
         $output->writeln(' ' . $instrument);
         $instrumentInfo = $sampler->getFileInstrumentInfo('/home/pi/linuxsampler/telecaster.gig', $instrument);
         $output->writeln('  Name: ' . $instrumentInfo->name);
         $output->writeln('  Format family: ' . $instrumentInfo->format_family);
         $output->writeln('  Format version: ' . $instrumentInfo->format_version);
         $output->writeln('  Product: ' . $instrumentInfo->product);
         $output->writeln('  Artists: ' . $instrumentInfo->artists);
         $output->writeln('  Key bindings: ' . $instrumentInfo->key_bindings);
         $output->writeln('  Keyswitch bindings: ' . $instrumentInfo->keyswitch_bindings);
     }
 }
 public function testConnect()
 {
     $this->linuxsampler->connect();
 }
 public function testGetAvailableAudioOutputDrivers()
 {
     $res = $this->linuxsampler->getAvailableAudioOutputDrivers();
     $this->assertInternalType('int', $res);
 }