use of blue.services.render.RealtimeRenderServiceFactory in project blue by kunstmusik.
the class RealtimeRenderSettings method findRealtimeRenderServiceFactory.
private static RealtimeRenderServiceFactory findRealtimeRenderServiceFactory(String renderServiceName) {
RealtimeRenderServiceFactory[] services = getAvailableRealtimeRenderServices();
RealtimeRenderServiceFactory foundService = null;
if (renderServiceName == null || renderServiceName.isEmpty()) {
foundService = services[0];
} else {
for (RealtimeRenderServiceFactory service : services) {
if (service.toString().equals(renderServiceName)) {
foundService = service;
break;
}
}
if (foundService == null) {
foundService = services[0];
}
}
return foundService;
}
use of blue.services.render.RealtimeRenderServiceFactory in project blue by kunstmusik.
the class RealtimeRenderSettings method getAvailableRealtimeRenderServices.
public static RealtimeRenderServiceFactory[] getAvailableRealtimeRenderServices() {
Collection<? extends RealtimeRenderServiceFactory> services = Lookup.getDefault().lookupAll(RealtimeRenderServiceFactory.class);
ArrayList<RealtimeRenderServiceFactory> results = new ArrayList<>();
for (RealtimeRenderServiceFactory factory : services) {
if (factory.isAvailable()) {
results.add(factory);
}
}
return results.toArray(new RealtimeRenderServiceFactory[0]);
}
use of blue.services.render.RealtimeRenderServiceFactory in project blue by kunstmusik.
the class RealtimeRenderSettingsPanel method midiOutButtonActionPerformed.
// GEN-LAST:event_midiInButtonActionPerformed
private void midiOutButtonActionPerformed(java.awt.event.ActionEvent evt) {
// GEN-FIRST:event_midiOutButtonActionPerformed
String driver = null;
if (midiDriverCBox.isSelected()) {
driver = (String) midiDriverCombo.getSelectedItem();
}
String command = csoundExecText.getText();
RealtimeRenderServiceFactory factory = (RealtimeRenderServiceFactory) renderServiceComboBox.getSelectedItem();
DiskRenderService service = factory.createDiskRenderService();
List<DeviceInfo> vals = DriverUtilities.getMidiDevices(command, driver, service, false);
Object val = chooseDriver(vals);
if (val != null) {
DeviceInfo info = (DeviceInfo) val;
midiOutText.setText(info.getDeviceId());
fireUpdate();
}
}
use of blue.services.render.RealtimeRenderServiceFactory in project blue by kunstmusik.
the class RealtimeRenderSettingsPanel method audioInButtonActionPerformed.
// GEN-LAST:event_audioOutButtonActionPerformed
private void audioInButtonActionPerformed(java.awt.event.ActionEvent evt) {
// GEN-FIRST:event_audioInButtonActionPerformed
String driver = null;
if (audioDriverCBox.isSelected()) {
driver = (String) audioDriverCombo.getSelectedItem();
}
String command = csoundExecText.getText();
RealtimeRenderServiceFactory factory = (RealtimeRenderServiceFactory) renderServiceComboBox.getSelectedItem();
DiskRenderService service = factory.createDiskRenderService();
List<DeviceInfo> vals = DriverUtilities.getAudioDevices(command, driver, service, true);
Object val = chooseDriver(vals);
if (val != null) {
DeviceInfo info = (DeviceInfo) val;
audioInText.setText(info.getDeviceId());
fireUpdate();
}
}
use of blue.services.render.RealtimeRenderServiceFactory in project blue by kunstmusik.
the class RealtimeRenderSettingsPanel method midiInButtonActionPerformed.
// GEN-LAST:event_audioInButtonActionPerformed
private void midiInButtonActionPerformed(java.awt.event.ActionEvent evt) {
// GEN-FIRST:event_midiInButtonActionPerformed
String driver = null;
if (midiDriverCBox.isSelected()) {
driver = (String) midiDriverCombo.getSelectedItem();
}
String command = csoundExecText.getText();
RealtimeRenderServiceFactory factory = (RealtimeRenderServiceFactory) renderServiceComboBox.getSelectedItem();
DiskRenderService service = factory.createDiskRenderService();
List<DeviceInfo> vals = DriverUtilities.getMidiDevices(command, driver, service, true);
Object val = chooseDriver(vals);
if (val != null) {
DeviceInfo info = (DeviceInfo) val;
midiInText.setText(info.getDeviceId());
fireUpdate();
}
}
Aggregations