Support Rane Serato TTM57SL Mixer Audio Card

Bug #785939 reported by Owen Williams
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mixxx
Confirmed
Wishlist
Unassigned

Bug Description

We briefly had access to a Serato mixer and discovered that while it works with Mixxx, we were unable to configure the mixer to tell it which audio channels to send over USB audio. The mixer has multiple modes, including sending out raw input, mixed output, etc. No options show up in Alsa-mixer, so our guess is that there are simple USB signals that the Serato software sends to the mixer to change these settings. It would be really cool if Mixxx could talk to this mixer and change its settings. (It would be even cooler if this were implemented as part of an ALSA driver...)

Fixing this bug will require expertise and hardware:

* Someone needs a TTM57SL mixer to play around with
* This person also needs Windows, with Serato installed (free download)
* This person also needs to be able to debug the USB bus to determine what messages are getting sent to the mixer

Once we identify the USB messages, it should be possible to implement them in Mixxx and duplicate this functionality.

Tags: hid
RJ Skerry-Ryan (rryan)
tags: added: hid
Changed in mixxx:
status: New → Confirmed
Revision history for this message
francois.martorello (francois-martorello) wrote :

I have a rane ttm 57 to help, I have already plug it on linux, alsa recognise only one input output mixer, but there is two input to plug the decks and one output.
I think I should develop usb alsadriver for the mixer or perhaps I can use alsadriver parameter to recognise other input ???
I must test midi mode on mixer if it is midi-usb compatible...

How can I do to help for the alsa driver ?? Do you know any people wich can help me ?

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Do we have a contact person at RANE? They might have a personal interest to make their hardware work with Linux.

Revision history for this message
Alan Millard (millard-alan) wrote :

I'd like to help out with this if I can, as I've just bought a Rane TTM57SL mixer, and I'd like to get it working properly with Mixxx. I'm running Mixxx under Ubuntu 11.10, and I've got Serato installed and working with the TTM57SL under Windows.

Can anyone tell me what software I can use to debug the USB bus, in order to determine what messages are being sent to/from the mixer?

Revision history for this message
Alan Millard (millard-alan) wrote :

I've used USBTrace (http://www.sysnucleus.com) to log USB traffic to/from the mixer.

I plugged in the TTM57SL, started logging, and then started Serato. After 125 messages the log got repetitive, so I assume all of the relevant control commands for configuring mixer output occur within these first few messages.

I've attached the log in USBTrace format and as an exported .txt file, as well as the exported device information. Is this helpful to anyone?

Revision history for this message
Owen Williams (ywwg) wrote :

HI alan, thanks so much for your help! Can you give me the output of "aplay -l" when the Rane mixer is attached to the system?

Revision history for this message
Alan Millard (millard-alan) wrote :

No problem :) I'm happy to help in whatever way I can.

Here's the output of "aplay -l" when the mixer is connected:

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VB Analog [ALC269VB Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: TTM57SL [TTM57SL], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: TTM57SL [TTM57SL], device 1: USB Audio [USB Audio #1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I should mention that I'm able to get some functionality with this mixer and xwax/Mixxx. The problem is that I have to set the mixer to output the control tone, so that xwax/Mixxx can pick up the signal. Unfortunately, this means that the control tone is affected by the crossfader, so it cuts out and prevents vinyl position tracking.

When I'm using the mixer with Serato, I set the mixer to output the digital signal coming back from Serato, which carries the overlayed audio. In this set up, the control tone is unaffected by the crossfader, only the overlayed audio is (which is what we want to happen with xwax/Mixxx).

Is this simply a case of mimicking the initial USB communication between Serato and the TTM57SL, within Mixxx, or is this something for the ALSA development team?

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

Doesn't that mixer also send control signals a la MIDI? Please plug it in to your Linux system, do sudo lsusb -v, then copy and post just the section about that mixer (it'll probably be quite long.)

Revision history for this message
Alan Millard (millard-alan) wrote :
Download full text (14.9 KiB)

Here's the mixer section of the output of "sudo lsusb -v":

Bus 002 Device 004: ID 13e5:0003 Rane
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 1.10
  bDeviceClass 0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 8
  idVendor 0x13e5 Rane
  idProduct 0x0003
  bcdDevice 3.20
  iManufacturer 1 Serato
  iProduct 2 TTM57SL
  iSerial 3 TTM.01.00
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 371
    bNumInterfaces 7
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0xc0
      Self Powered
    MaxPower 100mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 0
      bInterfaceClass 1 Audio
      bInterfaceSubClass 1 Control Device
      bInterfaceProtocol 0
      iInterface 4 TTM57SL Line 1
      AudioControl Interface Descriptor:
        bLength 10
        bDescriptorType 36
        bDescriptorSubtype 1 (HEADER)
        bcdADC 1.00
        wTotalLength 52
        bInCollection 2
        baInterfaceNr( 0) 1
        baInterfaceNr( 1) 2
      AudioControl Interface Descriptor:
        bLength 12
        bDescriptorType 36
        bDescriptorSubtype 2 (INPUT_TERMINAL)
        bTerminalID 1
        wTerminalType 0x0101 USB Streaming
        bAssocTerminal 0
        bNrChannels 2
        wChannelConfig 0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames 0
        iTerminal 0
      AudioControl Interface Descriptor:
        bLength 9
        bDescriptorType 36
        bDescriptorSubtype 3 (OUTPUT_TERMINAL)
        bTerminalID 2
        wTerminalType 0x0301 Speaker
        bAssocTerminal 0
        bSourceID 1
        iTerminal 0
      AudioControl Interface Descriptor:
        bLength 12
        bDescriptorType 36
        bDescriptorSubtype 2 (INPUT_TERMINAL)
        bTerminalID 3
        wTerminalType 0x0201 Microphone
        bAssocTerminal 0
        bNrChannels 2
        wChannelConfig 0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames 0
        iTerminal 0
      AudioControl Interface Descriptor:
        bLength 9
        bDescriptorType 36
        bDescriptorSubtype 3 (OUTPUT_TERMINAL)
        bTerminalID 4
        wTerminalType 0x0101 USB Streaming
        bAssocTerminal 0
        bSourceID 3
        iTerminal 0
    Interface Descriptor:
      bLength ...

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

Excellent! "bInterfaceClass 3 Human Interface Device" means it should work fine as a control surface with the features_controllerAbstraction branch.

Revision history for this message
Owen Williams (ywwg) wrote :

I've seen DJs click checkboxes inside Serato to select what mixer outputs to use. I think there are four checkboxes and they can pick two. So my question is, are there any special USB packets sent when the user clicks these checkboxes?

Revision history for this message
Alan Millard (millard-alan) wrote :

I know which checkboxes you mean Owen. Under the Hardware tab in the Setup screen of Serato, there's a section called Control Source, with two checkboxes for Deck A - 1 and 2, and two checkboxes for Deck B - 3 and 4.

I'm having trouble checking whether clicking these checkboxes sends any special USB packets, because USBTrace isn't able to capture in real-time once it gets past the initial handshake between the mixer and Serato, due to the large volume of messages being sent back and forth. I can filter the messages by type, but I'm not sure what I'm looking for. Do you have any idea what kind of USB packets I should be checking for?

To make matters worse, USBTrace keeps crashing and giving me the blue screen of death, forcing me to reboot, so it's taking me ages to do this by trial and error. Can you recommend any other USB traffic analysis software that might be more stable?

Revision history for this message
Owen Williams (ywwg) wrote :

I really don't know what to look for, I don't know anything about USB :/. The output of aplay -l shows only two audio devices so somehow Serato is talking to the mixer and asking for the correct audio feeds. The only other idea I had is, if you set up Serato to work correctly, leave the mixer on, and then hook up a linux computer, do the audio inputs work as expected under linux? Or do the audio inputs always reset to the master/headphone output, which is what I think it's sending?

Maybe you can select the correct audio inputs in Serato running in Wine or something crazy like that?

Revision history for this message
francois.martorello (francois-martorello-gmail) wrote : Re: [Bug 785939] Re: Support Rane Serato TTM57SL Mixer

I think you should interest to alsa drivers create new driver or add
support to the driver. There is already a driver for traktor scratch. Does
any one can help to write alsa driver ?

2012/4/11 Owen Williams <email address hidden>

> I really don't know what to look for, I don't know anything about USB
> :/. The output of aplay -l shows only two audio devices so somehow
> Serato is talking to the mixer and asking for the correct audio feeds.
> The only other idea I had is, if you set up Serato to work correctly,
> leave the mixer on, and then hook up a linux computer, do the audio
> inputs work as expected under linux? Or do the audio inputs always
> reset to the master/headphone output, which is what I think it's
> sending?
>
> Maybe you can select the correct audio inputs in Serato running in Wine
> or something crazy like that?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/785939
>
> Title:
> Support Rane Serato TTM57SL Mixer
>
> Status in Mixxx:
> Confirmed
>
> Bug description:
> We briefly had access to a Serato mixer and discovered that while it
> works with Mixxx, we were unable to configure the mixer to tell it
> which audio channels to send over USB audio. The mixer has multiple
> modes, including sending out raw input, mixed output, etc. No options
> show up in Alsa-mixer, so our guess is that there are simple USB
> signals that the Serato software sends to the mixer to change these
> settings. It would be really cool if Mixxx could talk to this mixer
> and change its settings. (It would be even cooler if this were
> implemented as part of an ALSA driver...)
>
> Fixing this bug will require expertise and hardware:
>
> * Someone needs a TTM57SL mixer to play around with
> * This person also needs Windows, with Serato installed (free download)
> * This person also needs to be able to debug the USB bus to determine
> what messages are getting sent to the mixer
>
> Once we identify the USB messages, it should be possible to implement
> them in Mixxx and duplicate this functionality.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mixxx/+bug/785939/+subscriptions
>

Revision history for this message
Alan Millard (millard-alan) wrote : Re: Support Rane Serato TTM57SL Mixer

I just tried running Serato in Wine, but unfortunately it's unable to communicate to the mixer over USB. I just get the message "Rane Hardware Disconnected". From a quick Google, this seems to be a common problem, I don't think anyone has managed to get Serato working with Wine.

I also tried what you suggested Owen - setting up the mixer with Serato, leaving the mixer on, then disconnecting the USB cable and plugging it into a Linux machine. This doesn't work either - Mixxx still needs me to change the mixer input to the analogue signal from the turntable, so that the control signal gets output over USB. I guess this means that the initial USB communication with Serato isn't enough to persistently configure the mixer? When I'm using Serato, I have the mixer input set to the digital signal coming back from Serato, and somehow the analogue signal from the turntable is being routed through to Serato over USB behind the scenes.

I've found some better software called HDD Software USB Monitor (http://www.hhdsoftware.com/usb-monitor), so I might be able to get more information about the USB traffic, if someone can tell me what I should be looking for. There's a constant stream of packets to/from the mixer after the initial handshake, of types:

URB_FUNCTION_GET_CURRENT_FRAME_NUMBER
URB_FUNCTION_ISOCH_TRANSFER
URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER

I've tried filtering these out, and then playing around with the checkboxes in Serato, and there doesn't seem to be any USB packets of types other than these being sent when I do it. This means that either there is no communication between Serato and the mixer when you tick the checkboxes, or that it uses one of the above packet types that I've filtered out. Perhaps all of the mixer outputs are always available to Serato, and it just chooses which to use rather than instructing the mixer to provide a particular output?

Maybe this is a fundamental problem at the ALSA driver level? If I run "alsamixer" and select the TTM57SL as the sound card, it just says "This sound device does not have any controls."

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

Since the thing speaks HID, you might be looking at too low a level. Try getting an HID sniffer and see if that gives you any clues. (HID packets are sent on interrupt transfers.) BTW, if you have Scratch Live running on internal mode, then yank the USB connection, does it notice immediately or will it keep working?

Revision history for this message
Alan Millard (millard-alan) wrote :

This USB Monitor software is part of Device Monitoring Studio, which is also able to capture HID traffic. I just noticed that the mixer shows up differently before/after I start Scratch Live.

Before starting Scratch Live:

Universal Serial Bus controllers
    USB Composite Device
        Port_#0002.Hub_#0004
        (Standard USB Host Controller)

Sound, video and game controllers
    USB Audio Device
        0000.001d.0000.001.002.000.000.000.000
        (Generic USB Audio)
    USB Audio Device
        0000.001d.0000.001.002.000.000.000.000
        (Generic USB Audio)

Human Interface Devices
    USB Input Device
        0000.001d.0000.001.002.000.000.000.000
        (Standard system devices)

After starting Scratch Live:

Universal Serial Bus controllers
    Rane TTM 57SL
    Port_#002.Hub_#0004
    Serato

The mixer goes from being a composite USB device, comprising 2 audio devices and an HID device, to a single Rane TTM 57SL device. The configuration before starting Scratch Live looks similar to the output of "sudo lsusb -v" under Linux. I think Scratch Live installs a new driver for the mixer when it starts up. This seems to be mentioned in the manual (http://serato.com/downloads/files/67733/Scratch_Live_TTM_57SL_Manual.pdf): "Additional Windows Drivers: Once Scratch Live is installed, any additional hardware that is connected will be recognized and the drivers will be automatically installed."

I've tried setting up the software to sniff packets for the HID device, but as soon as Scratch Live starts up, the capture stops because the devices change. If I monitor the new Rane TTM 57SL device, then there are various "views" available: Raw Data View, URB View, Packet View, HID View. I see a constant stream for each view except HID, which is blank, even when I play around with the checkboxes in Scratch Live, so it doesn't look like any HID packets are being sent.

I think if there are any important control signals, they should be in that log of the initial handshake that I posted earlier? However, I expect a lot of it might just be querying the mixer to figure out which driver to install. I should mention that the Rane TTM 57SL device driver that gets installed once Scratch Live starts, only persists for as long as the USB cable is connected. If I unplug it, and then plug it back in, the mixer goes back to being detected as a composite USB device.

Sean: If Scratch Live is running in internal mode, then it does notice immediately when the USB cable is disconnected, and stops working until you plug it back in. I think this is partly due to the fact that Scratch Live only outputs audio via the mixer (since there's no option to output audio locally, like in Mixxx). What does this tell us?

Revision history for this message
Owen Williams (ywwg) wrote :

It sounds like the Rane mixer behaves like a standard USB Audio device *until* Scratch talks to it, activates a proprietary driver, and says "ok, time to turn on all the cool features." So my conclusion is the mixer must be dual-mode and will require a special driver in order to work with Mixxx. Since the Rane/Serato people give away the Scratch software for free (they make money on these mixers and hardware), maybe we should ask them about the possibility of opening up the spec? The argument being, it will allow even more people to use/buy their hardware. Or will they think it's possible to use that information to create new hardware that would allow Scratch to run on non-Serato sound cards? (No one would actually do that, since making hardware has never been open source's strong suit and it would be an obvious lawsuit target)

Revision history for this message
Alan Millard (millard-alan) wrote :

That sounds plausible Owen.

I think Serato might be more concerned about losing Scratch Live users to Mixxx, since they've recently released The Bridge (http://serato.com/thebridge/) for use with Ableton Live. While Scratch Live is free software, Ableton Live isn't, and I expect Serato and Ableton have some kind of financial agreement based on the premise that Scratch Live will bring in new Ableton Live customers.

Rane may also have a contract with Serato which ties their hardware to Scratch Live? That being said, I think it's definitely worth approaching Rane about opening up the spec - you never know unless you ask. As you say, it's in their interest to provide Linux support, so that more people buy their hardware. There probably just isn't enough demand for Rane to bother developing a Linux driver themselves, but giving us the spec shouldn't be too much hassle for them.

Does anyone know who to contact within Rane about this?

Revision history for this message
Alan Millard (millard-alan) wrote :

Out of interest, I just tried getting Mixxx to work on Windows, and ran into similar issues. Scratch Live now comes packaged with ASIO drivers for the Rane TTM57SL, so you can use it with software other than Scratch Live. Unfortunately, by default, the driver is configured to output the post-fader signal for both channels, and there doesn't appear to be a way to configure the driver directly through Windows.

However, I found a thread on the Serato forums (http://serato.com/forum/discussion/110139), which explains how to configure the ASIO driver via Ableton Live. By following these instructions, I was able to select the pre-fader signals for both channels. This configuration is persistent, so I can then close Ableton Live and open Mixxx, and Mixxx will receive the pre-fader control signal, so it is able to track the position of the vinyl even when the crossfader is closed :)

Sadly, this is still limited to a single-turntable setup, since the mixer must be explicitly set to output the analogue control signal, otherwise Mixxx won't hear it (unlike Scratch Live, which is somehow able to listen to the analogue signal even when the mixer is set to output the digital overlayed audio).

This would seem to confirm that the problems experienced under Linux are indeed due to driver issues, and that Scratch Live isn't communicating with the mixer over USB to tell it which signals to output.

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

Please test the mixer on Mixxx v1.11.0-alpha1 or later and let us know if it shows up as an HID device under Controllers in Mixxx. If so, run Mixxx with --controllerDebug and see if you can figure out the control packet format.

Revision history for this message
Alan Millard (millard-alan) wrote :

The mixer shows up as an HID device under Controllers in Mixxx 1.11.0-alpha2 (if run with root privileges, for write access to USB HID controllers). This initially showed up as “TTM57SL 1.00_6”, but after enabling it and restarting Mixxx, it showed up as “TTM BOOT 1.00_0”. I then selected Load Preset: EKS Otus.

This seemed to communicate with the mixer, but then all of the red skull LEDs on the mixer lit up, and it became unusable. Fortunately, I was able to fix this by connecting to the mixer using Serato Scratch Live under Windows. I think the HID communication with Mixxx caused the mixer to reset. This is probably unlikely to cause any permanent damage, but I'm not willing to continue playing around with this, since the mixer cost me a lot of money, and I don't want to break it. Sorry, guys.

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

Okay, great to hear that it is an HID device!

It's never recommended to load presets for other devices to avoid exactly what you experienced, as HID packet formats can vary widely between devices and nobody wants to risk permanent damage. So please delete the EKS Otus xml file from .mixxx/controllers/.

However, you can safely run Mixxx with the --controllerDebug parameter, enable the device but don't choose a preset, then as you manipulate it, the HID packets it sends will show on the console. If you're interested, you can look closely at it to see which byte(s) change(s) for each control.

It sounds like the main problem though is enabling time code to go to Mixxx while Mixxx's audio comes out the 57's outputs. For this, I'm afraid we will either need to contact Rane, or use an HID sniffer on SSL.

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

For reference, apparently the TTM-57SL shows up as two separate sound cards. See the bottom part of http://dj.rane.com/support/knowledge-base/how-to-setup-rane-hardware-with-virtual-dj

Revision history for this message
Owen Williams (ywwg) wrote :

This mixer is now EOL by Serato (it won't work with their new software) so a bunch of these might be coming on the used market soon. If Mixxx can support them that would breathe new life into old hardware!

Revision history for this message
synthead (synthead1) wrote :

I just purchased a Rane TTM-57SL and am very interested in seeing support for this hardware. I use both Linux and Windows environments and would be glad to upload any data that would be helpful.

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

Synthead: I saw your comment in IRC. You actually don't need to load a preset at all.
First give your user account write access to HID devices, see http://mixxx.org/wiki/doku.php/troubleshooting#mixxx_says_i_have_no_hid_controllers_attached_even_though_i_do
Then run Mixxx with --controllerDebug and just Enable the controller that appears.
Then, while watching the console, start moving knobs & pressing buttons and you should see hex dumps of the packets the device sends on the screen. This is where the detective work begins: you need to see which numbers change and how with each control. Note that some devices also send time stamps so a few bytes may always change even if you do nothing. Ignore these for now.
Let us know on mixxx-devel what you find and we can continue to help from there.

Revision history for this message
Owen Williams (ywwg) wrote :

This bug is for supporting the Rane's audio card, not any HID knobs. If it's possible to get controller information from the Rane and that's what's being asked for, please file a separate bug.

Owen Williams (ywwg)
summary: - Support Rane Serato TTM57SL Mixer
+ Support Rane Serato TTM57SL Mixer Audio Card
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/5904

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.