Can Parallels direct output to a USB device?

Discussion in 'Windows Virtual Machine' started by catdad, Aug 9, 2010.

  1. catdad

    catdad Member

    Messages:
    24
    I have WinUAE (an Amiga emulator for Windows) running under Windows 7 on my MacBook Pro running OS 10.6. I hope to be able to play MIDI sequences (files) to a USB MIDI interface but before I buy one I need to
    know if Parallels can send data from an emulated OS to a USB device.

    I have connected a flash drive and started WinUAE, but it only sees the pre-installed Windows
    software on the drive. Is there some Parallels USB setting that I need to adjust further?
     
  2. joevt

    joevt Forum Maven

    Messages:
    1,207
    Is the flash drive selected in the Devices -> USB menu? What else is it supposed to see on the drive besides the pre-installed Windows software?

    I think Parallels can do most anything to a USB device that a normal PC can while the USB device is connected to the virtual machine. So you should first ask if what you want to do can be done on a normal PC.

    Does WinUAE support USB MIDI devices on normal PC's?

    Do Amigas have USB ports? I think UAE only emulates serial and parallel ports so that would mean the USB MIDI interface would need to be usable as a serial port device and UAE would need to be able to setup the serial port correctly for MIDI.
     
  3. catdad

    catdad Member

    Messages:
    24
    WinUAE does emulate serial ports. Since my MacBookPro and indeed just about all computers made in the last decade
    have only USB ports I am looking to buy a USB MIDI interface...assuming output from the emulated Amiga can identify and reach it.
     
  4. joevt

    joevt Forum Maven

    Messages:
    1,207
    Normal serial ports send and receive asynchronous serial data using a UART attached to a 3.67-3.69 Mhz clock to produce baud rates like 19200, 28800, 38400, or 57600 bps.

    MIDI also uses asynchronous serial data but requires a baud rate of 31250 bps. To get 31250 bps the UART needs a clock of 500 kHz, 1 MHz, 2 MHz, 4 MHz, or 8 MHz depending on the clock mode (x16, x32, or x64) and whether or not you bypass the baud rate generator which adds at least a factor of 4.

    Mac serial ports and most USB serial adapters have a 3.67-3.69 MHz clock but can be clocked by an external clock to support MIDI. Maybe your USB MIDI adapter has a built in clock appropriate for MIDI data rates.

    If the Amiga software can use the emulated Amiga serial port for MIDI, and the emulated Amiga serial port can be connected to a PC serial port, and the MIDI USB device gives the PC a serial port, and all of them will allow the serial port to work at whatever baud rate it uses, and that baud rate works with your MIDI devices, then maybe it will work.

    I think you should first ask (elsewhere) - does WinUAE support USB MIDI devices on normal PC's?

    You may have timing issues (latency, stuttering) going through USB and 2 emulation levels.
     
  5. catdad

    catdad Member

    Messages:
    24
    Yes, I verified that WinUAE supports MIDI before installing it. Indeed, that's why I chose it over Macintosh-based emulators, which don't, despite the extra level of emulation.

    The following was posted on the WinUAE section of an Amiga board by a WinUAE developer:

    "Serial port data is simply dropped ("cable not connected" mode) if emulated serial port is not configured.

    Serial emulation includes simple hack: all data is redirected to MIDI Out (if configured) if Amiga's internal serial port data rate is set to standard MIDI rate.

    Emulation does not care if port is USB or normal serial, anything that is "serial port"-like are supported. ("real", USB, bluetooth virtual, whatever)"

    (I have "none" selected in the WinUAE configuration for serial device and "default MIDI output device" selected in the separate MIDI Out box). I guess I'll have to load a more complex MIDI sequence and see what happens when I try to play it.
     
  6. joevt

    joevt Forum Maven

    Messages:
    1,207
    Sounds like MIDI Out is an Amiga emulator configuration option and the emulated Amiga has one emulated serial port and this serial port can be directed to a PC serial port (COM port of any kind) or to the PC device pointed to by the MIDI Out configuration if the emulated serial port data rate is set to standard MIDI rate?

    That leaves "default MIDI output device" which I guess is a PC device? How is that configured? I see a MIDI music playback default device setting in my Windows XP Sounds and Audio Devices Properties window which is set to Microsoft GS Wavetable SW Synth. I guess you can tell if your Amiga MIDI is being played through this SW Synth by looking at the speaker icon at the bottom of the virtual machine window and by adjusting the SW Synth volume or balance in the Volume settings.
     
  7. catdad

    catdad Member

    Messages:
    24
    I'm just a poor user, not a programmer, so I don't know much about configuation other than the choices I made above.
    Here's the WinUAE help file, if that helps YOU: http://www.vware.at/winuaehelp/
     
  8. joevt

    joevt Forum Maven

    Messages:
    1,207
    http://www.vware.at/winuaehelp/gui/ports.htm is the relevant documentation page. It agrees with most of what I said from your previous information. From the screen shot on that page, it looks like the the MIDI Out option of "default MIDI output device" that you selected would point to the same device selected in "Sound and Audio Devices Properties" in the Windows control panel. In WinUAE, you can select "default MIDI output device" or explicitly choose a playback device such as the "Microsoft GS Wavetable SW Synth". This means the MIDI data does not go to the Mac but is converted by the "Microsoft GS Wavetable SW Synth" into audio data which is sent to the virtual machine speaker output.

    Next question is: Does a USB MIDI device appear as a MIDI music playback default device option in "Sounds and Audio Devices Properties" and therefore also the "MIDI Out" option of WinUAE? If so then you're all set and you won't have to worry about having a COM port. Maybe you can read the USB MIDI interface documentation to find out how the device presents itself to Windows and therefore how you'll be able to connect it to WinUAE.
     
  9. catdad

    catdad Member

    Messages:
    24
    Inasmuch as I haven't yet bought a USB MIDI interface I can't answer the question, focusing as I have been on whether MIDI data would reach the USB port through a virtualization and then an emulation.

    As for "Sounds and Audio Devices Properties", where would I find that window?

    I chose MIDI output, not "Microsoft GS wavetable SW Synth" yet I got the appropriate sound anyway, even without selecting which sound I wanted (perhaps I was just lucky that it defaults to program 0, Grand Piano)
     
  10. joevt

    joevt Forum Maven

    Messages:
    1,207
    Sometimes you don't need to buy a product to read it's documentation. You can usually go to the product website and get documentation there. If the documentation tells you that the USB MIDI device shows up as a MIDI playback device, then it will probably work with the Amiga emulator since the Amiga emulator was able to output midi data to the "Microsoft GS wavetable SW Synth" playback device. If the documentation tells you that the USB MIDI device shows up as a serial COM port then the Amiga emulator may still be able to send MIDI data too it since the Amiga Emulator supports serial output.

    In Windows XP goto Control Panel -> category view -> Sounds, Speech, and Audio Devices -> then click any of "Adjust the system volume", "Change the sound scheme", "Change the speaker settings", or "Sounds and Audio Devices" -> then click on the Audio tab of the "Sounds and Audio Devices Properties" window. In that tab is the MIDI music playback Default device option which is probably set on your virtual machine as "Microsoft GS wavetable SW Synth".

    In Windows Vista, it's at Control Panel, Control Panel Home, Hardware and Sound, Sound, Manage Audio Devices, Playback, right click speakers. It shows "About Software MIDI Synthesizer". This appears for the default device or the only device if you have only one sound device (speakers output).

    There's no option to change it in Vista and Windows 7. Google "Vista midi" and see what people are talking about. They say you need a 2nd speaker card so you can change the default device or edit the registry to change the SW synth option http://www.youtube.com/watch?v=QsRtduINN8I. There's a third party control panel called VISTA MIDI Mapper that edits the registry for you. There's also Vista MIDI Tool and Vista Midi Picker.

    It would be possible for Parallels to create a MIDI playback device for Windows that could send MIDI data to and from a MIDI endpoint such as one setup in the IAC Driver in Audio MIDI Setup.app.

    Another way to get MIDI data from the PC to the Mac is to first install on the PC side a playback device that outputs MIDI to the serial port. I don't know if such a playback device exists. This step can be skipped by programs that output MIDI data directly to the serial port. Then on the Mac side you need a way to get the serial data to a MIDI endpoint. The virtual machine serial port is a named socket file stored at "/Library/Parallels/Parallels Service.app/Contents/PlugIns/Parallels VM.app/Contents/MacOS/". A program like MultiCom can be used to pass data between the socket file and a pseudo terminal which can be used by the screen command line tool in Terminal.app. The screen command line tool make the Terminal window behave like ZTerm. There have been programs in the past (Serial MIDI, Stealth MIDI, etc.) that pass data from a Mac serial port to a MIDI endpoint but they don't work on pseudo terminals or socket files.
     
  11. catdad

    catdad Member

    Messages:
    24
    ---Quote (Originally by catdad)---
    Inasmuch as I haven't yet bought a USB MIDI interface I can't answer the question, focusing as I have been on whether MIDI data would reach the USB port through a virtualization and then an emulation.
    ---End Quote---
    Sometimes you don't need to buy a product to read its documentation. You can usually go to the product website and get documentation there. If the documentation tells you that the USB MIDI device shows up as a MIDI playback device, then it will probably work with the Amiga emulator since the Amiga emulator was able to output midi data to the "Microsoft GS wavetable SW Synth" playback device. If the documentation tells you that the USB MIDI device shows up as a serial COM port then the Amiga emulator may still be able to send MIDI data too it since the Amiga Emulator supports serial output.

    The following as recommended to me but the manufacturer didn't give much technical information

    http://www.m-audio.com/products/en_us/MIDISPORT4x4.html

    ---Quote (Originally by catdad)---
    As for "Sounds and Audio Devices Properties", where would I find that window?
    ---End Quote---
    In Windows XP goto Control Panel -> category view -> Sounds, Speech, and Audio Devices -> then click any of "Adjust the system volume", "Change the sound scheme", "Change the speaker settings", or "Sounds and Audio Devices" -> then click on the Audio tab of the "Sounds and Audio Devices Properties" window. In that tab is the MIDI music playback Default device option which is probably set on your virtual machine as "Microsoft GS wavetable SW Synth".

    In Windows Vista, it's at Control Panel, Control Panel Home, Hardware and Sound, Sound, Manage Audio Devices, Playback, right click speakers. It shows "About Software MIDI Synthesizer". This appears for the default device or the only device if you have only one sound device (speakers output).

    There's no option to change it in Vista and Windows 7...

    My first post said I'm using Windows 7

    ---Quote (Originally by joevt)---
    This means the MIDI data does not go to the Mac but is converted by the "Microsoft GS Wavetable SW Synth" into audio data which is sent to the virtual machine speaker output.
    ---End Quote---
    It would be possible for Parallels to create a MIDI playback device for Windows that could send MIDI data to and from a MIDI endpoint such as one setup in the IAC Driver in Audio MIDI Setup.app.

    Another way to get MIDI data from the PC to the Mac is to first install on the PC side a playback device that outputs MIDI to the serial port...

    Mmm, you're talking about the virtual serial port on the Amiga, right?

    It seems my potential problems will revolve around the issue of latency. I did find this encouraging information about USB and latency:

    http://en.wikipedia.org/wiki/Musical_Instrument_Digital_Interface#USB

    and a footnote to this article:

    http://www.soundonsound.com/sos/Oct02/articles/pcmusician1002.asp (noting
    that this footnote is from 2002!)
     
    Last edited: Aug 16, 2010
  12. joevt

    joevt Forum Maven

    Messages:
    1,207
    Right, I just wanted to point out the differences for other people doing MIDI work. The utilities that modify the registry for Vista do the same job for Windows 7. You might not need the utility depending on what Windows apps you use.

    Right. You want to get the Amiga output to a USB MIDI device connected to the virtual machine. I was talking about getting the Amiga output or anything that uses the Windows MIDI playback device from the virtual machine to the Mac in case you want to use Mac MIDI software or hardware. Last night I did manage to get the Windows MIDI output to the virtual machine serial port using Serial MIDI and MIDI Yoke. I played a .MID file from the Microsoft Office clip art folder using Windows Media Player and the MIDI output appeared on Parallels Desktop's serial port file socket. It shouldn't be too difficult to modify the Serial MIDI source code to read MIDI data on the Mac side from the file socket or more simply a pseudo terminal created by MultiCom that connects to the file socket (since a pseudo terminal more closely resembles a serial port device).
     
  13. joevt

    joevt Forum Maven

    Messages:
    1,207
    I got so focused on the serial port that I neglected to look up networking as a means of getting MIDI data from the virtual machine to the Mac. I found software for both Mac and PC that can create MIDI devices that communicate over the LAN. They are ipMIDI and MIDIoverLAN CP. Mac OS X has an implementation of RTP MIDI but there doesn't seem to be any freely available general purpose Windows driver for it.

    I tried ipMIDI and it worked with my virtual machine using Bridged Networking. Unlike Serial MIDI, it supports more than just NoteOn, NoteOff, and Control commands.

    I don't have any MIDI hardware but none is not required to actually use MIDI. This is what I used:

    Windows:
    ipMIDI - MIDI over LAN MIDI playback device.
    Windows Media Player - plays .MID files to the default MIDI playback device.
    C:\Program Files\Microsoft Office\CLIPART\PUB60COR - contains .MID song files. You can find .MID files all over - in games, on the internet, etc.
    Sounds and Audio Devices properties - to switch the default MIDI playback device between Microsoft GS Wavetable SW Synth and Ethernet MIDI.

    Mac OS X:
    Audio MIDI Setup.app - where you setup ipMIDI and IAC Driver (the Network device is for RTP MIDI which I didn't try since it only works between Macs).
    MidiKeys - turns your keyboard into a MIDI input device.
    SimpleSynth - MIDI output device that converts MIDI data to sound like Microsoft GS Wavetable SW Synth. I can't say which sounds better.

    Other Mac OS X stuff:
    MIDI Monitor - lets you see MIDI traffic to and from MIDI devices and apps.
    MIDI Patchbay - lets you hook up MIDI software and hardware and pass MIDI data between them, applying assorted filters on the way.
    QMidi - MIDI music player. Can play .MID files to a MIDI device.

    A virtual machine could use this to communicate with a USB MIDI device attached to the Mac instead of the virtual machine so you don't need to depend on a Windows USB driver for the device.
     
  14. Dewdman42

    Dewdman42 Junior Member

    Messages:
    11
    Try rtpMidi, its free
     

Share This Page