Scratch LIVE Help
Need help with Serato Scratch LIVE? Ask here.
Getting USB dropouts under Windows?
Am I getting USB dropouts?
A USB dropout in Scratch LIVE is shown by the USB dropout indicator lighting. If you're getting audio glitches, and the indicator isn't lit, this thread is not applicable to you.
What is a USB dropout?
Scratch LIVE creates what's known as an isochronous stream of audio data over the USB bus. That is, it is 'fed' at precise intervals from our USB buffer. If for some reason what is in the buffer can not be fed onto the bus, the USB dropout indicator will light, and more often than not, you will hear an audible click or glitch in the audio. This is a USB dropout.
What causes USB dropouts?
As explained above, maintaining an isochronous stream requires 'stuff' to happen at a certain time, with a 1ms USB buffer size Scratch LIVE only needs to send about 350 Bytes of data each ms over USB, but this needs to happen every millisecond, otherwise you'll (obviously) experience a dropout.
The work is done by the CPU and the USB controller, which are under the control of a few co-operative things; the operating system, the BIOS, and drivers, ultimately at the request of the Scratch LIVE application. If one of these isn't behaving correctly, or can't perform it's work in time, you can guess the result.
The first thing is to check if the CPU is busy doing something else, or is not up to the task of feeding the buffer and feeding the buffer to the USB.
Open up the task manager - en.wikipedia.org (Ctrl+Alt+-Del)
and click on the processes tab, check what your overall CPU usage is like and percentage Scratch LIVE is using.
If your overall usage is close to 100% and you're getting dropouts, try raising the size of your USB buffer. Giving your CPU more time to do the work of streaming the audio over USB.
If your overall usage is not near 100%, and especially if it's nothing like being close to capacity, you should use the following technique to check what is happening inside the Windows kernel and causing dropouts.
The RATT Trace Processing tool
RATT (Richard and Aaron's Tracing Tool) is a tool for logging the time taken for interrupts within Windows XP. An interrupt in this context is basically when the windows kernel halts execution of applications while some work needs to be performed by a driver - en.wikipedia.org
Problems for Scratch LIVE can arise when the hardware drivers don't hand back control in short enough a time to allow for us to maintain the USB stream. From Scratch LIVE's perspective, it has just lost some time suddenly, as during interrupts the processors state is saved and restored, as if nothing has happened. Hence the need to trace interrupts using a 3rd party tool which can look inside the kernel.
Using RATT
Download RATT from: www.microsoft.com
Run the installer
1) From the RATT system tray icon menu, turn off "Loop Mode"
2) Choose "Stop Monitoring"
3) Open the directrory "C:\WINDOWS\system32\LogFiles\RATTV3" (assuming that you've got Windows installed to C:\WINDOWS)
4) Delete the files in that directory (if they won't delete, make sure you've stopped monitoring, and that loop mode is off)
5) Choose "Start Monitoring" from the RATT system tray icon menu
6) Run Scratch LIVE for a few minutes
7) Choose "Stop Monitoring" from the RATT system tray icon menu
8) Open a new help discussion for your USB dropouts, posting as much system information as you can, then:
9) Upload the file called "<your_computer_name>.cswa-accumulator-report.txt" from "C:\WINDOWS\system32\LogFiles\RATTV3" ... go here to upload it: www.scratchlive.net and paste a link to your new discussion from step 8 into description.
We will get your upload, and post advice for trying to help the dropouts on your system.
A USB dropout in Scratch LIVE is shown by the USB dropout indicator lighting. If you're getting audio glitches, and the indicator isn't lit, this thread is not applicable to you.
What is a USB dropout?
Scratch LIVE creates what's known as an isochronous stream of audio data over the USB bus. That is, it is 'fed' at precise intervals from our USB buffer. If for some reason what is in the buffer can not be fed onto the bus, the USB dropout indicator will light, and more often than not, you will hear an audible click or glitch in the audio. This is a USB dropout.
What causes USB dropouts?
As explained above, maintaining an isochronous stream requires 'stuff' to happen at a certain time, with a 1ms USB buffer size Scratch LIVE only needs to send about 350 Bytes of data each ms over USB, but this needs to happen every millisecond, otherwise you'll (obviously) experience a dropout.
The work is done by the CPU and the USB controller, which are under the control of a few co-operative things; the operating system, the BIOS, and drivers, ultimately at the request of the Scratch LIVE application. If one of these isn't behaving correctly, or can't perform it's work in time, you can guess the result.
The first thing is to check if the CPU is busy doing something else, or is not up to the task of feeding the buffer and feeding the buffer to the USB.
Open up the task manager - en.wikipedia.org (Ctrl+Alt+-Del)
and click on the processes tab, check what your overall CPU usage is like and percentage Scratch LIVE is using.
If your overall usage is close to 100% and you're getting dropouts, try raising the size of your USB buffer. Giving your CPU more time to do the work of streaming the audio over USB.
If your overall usage is not near 100%, and especially if it's nothing like being close to capacity, you should use the following technique to check what is happening inside the Windows kernel and causing dropouts.
The RATT Trace Processing tool
RATT (Richard and Aaron's Tracing Tool) is a tool for logging the time taken for interrupts within Windows XP. An interrupt in this context is basically when the windows kernel halts execution of applications while some work needs to be performed by a driver - en.wikipedia.org
Quote:
an interrupt is an asynchronous signal from hardware indicating the need for attention or a synchronous event in software indicating the need for a change in execution. A hardware interrupt causes the processor to save its state of execution via a context switch, and begin execution of an interrupt handler.Problems for Scratch LIVE can arise when the hardware drivers don't hand back control in short enough a time to allow for us to maintain the USB stream. From Scratch LIVE's perspective, it has just lost some time suddenly, as during interrupts the processors state is saved and restored, as if nothing has happened. Hence the need to trace interrupts using a 3rd party tool which can look inside the kernel.
Using RATT
Download RATT from: www.microsoft.com
Run the installer
1) From the RATT system tray icon menu, turn off "Loop Mode"
2) Choose "Stop Monitoring"
3) Open the directrory "C:\WINDOWS\system32\LogFiles\RATTV3" (assuming that you've got Windows installed to C:\WINDOWS)
4) Delete the files in that directory (if they won't delete, make sure you've stopped monitoring, and that loop mode is off)
5) Choose "Start Monitoring" from the RATT system tray icon menu
6) Run Scratch LIVE for a few minutes
7) Choose "Stop Monitoring" from the RATT system tray icon menu
8) Open a new help discussion for your USB dropouts, posting as much system information as you can, then:
9) Upload the file called "<your_computer_name>.cswa-accumulator-report.txt" from "C:\WINDOWS\system32\LogFiles\RATTV3" ... go here to upload it: www.scratchlive.net and paste a link to your new discussion from step 8 into description.
We will get your upload, and post advice for trying to help the dropouts on your system.
At 2:30 AM 3 November 2006
To post on the forum you need to log in. Click here to log in, or if you do not yet have an account then click here to create an account.
