var midi = require("../build/default/midi.node");

var output = new midi.output();
output.openVirtualPort("node-midi Virtual Output");
output.sendMessage([176,22,1]);
output.sendMessage([176,22,99]);
setTimeout(function() {
  output.closePort();
}, 10000);

var midi = require("../build/default/midi.node");

var output = new midi.output();
output.openVirtualPort("node-midi Virtual Output");
setTimeout(function() {
  output.sendMessage([144,64,90]);
}, 10000);
setTimeout(function() {
  output.sendMessage([128,64,40]);
}, 15000);
setTimeout(function() {
  output.closePort();
}, 20000);

Update the virtual output test file to take some time between messages so the results are visible.