Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are soundcard synths detected as an output port? - i.e. What is considered an output port? #195

Closed
mstram opened this issue Oct 21, 2018 · 1 comment

Comments

@mstram
Copy link

mstram commented Oct 21, 2018

I've been searching everywhere and have not found the answer, so am posting here.

Are soundcard "synths" detected as output midi ports?

I'm running Win 7 Pro Sp 1 on a Lenova r500 - chrome version 70.0.3538.67.

I'm not sure what the sound hardware is, the device manager just reports it as a "High Definition Audio device"

I've tried running Anvil Studio, and MidiBar / Midi-OX, with either the "Default Mapper" or "Microsoft GS WaveTable Synth" as the output device, neither are detected

Running the following code gives "size 0" for MIDIOutputMap.

navigator.requestMIDIAccess().then(onSuccess, onMIDIFailure);

function onSuccess(interface){
console.log('onSuccess :interface :',interface);

//outputs: MIDIOutputMap
//size: 0

var iter = interface.outputs.values();
console.log('iter :',iter);

for (var i = iter.next(); i && !i.done; i = iter.next()) {
 outputs.push(i.value);
 }

console.log('outputs :',outputs);

outputs : 
 length: 0
@cwilso
Copy link
Contributor

cwilso commented Oct 22, 2018

  1. You would have to ask for "software" devices* when requestMIDIAccess is called for the Microsoft GS synth to appear, but...
  2. software synthesizers are currently disabled in Chrome for security reasons. (This is unfortunate, but some of them can cause crashes, and in order to sandbox them we will eventually need to build a sandbox around the entire process. In the meantime, you can use libraries like https://github.com/mudcube/MIDI.js/ to provide a software device.)
  • Note that the GS synth is a software device; very few if any modern devices have actual synth hardware. You would request MIDI software devices like this:

    navigator.requestMIDIAccess( { sysex: true } ).then( onMIDISuccess, onMIDIFailure );

@cwilso cwilso closed this as completed Oct 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants