Hi Dan, On Tue, 2008-04-29 at 21:40 -0400, Dan Gendreau wrote: > Albert Santoni wrote: > > Hi guys, > > > > I did a new vinyl control demo video this morning, this time showing off > > the improvements I've been making to the linear interpolation code over > > the last week. > Hi Albert, > Looks Nice. I am looking at the VinylControlXwax code for my MsPinky > implementation. > > Am I reading it wrong, or are you only updating the vinyl position and > velocity information once per buffer?
No, you read correctly, I only update the pitch/position controls once per buffer. The primary reason for this is that they're controlled through Mixxx's ControlObject framework, and those changes only ever get synchronized to the playback engine once per buffer. Everything in Mixxx only gets sync'ed once per buffer like that. I don't think it would improve responsiveness to sync more often. (I may be wrong here, so anyone should feel free to point out any flaws in my logic.) If, for example, we were to sync the ControlObjects twice per buffer, the second update of the position/pitch wouldn't do anything because the audio callback would likely be past the time/pitch stretching code, which really drives the whole playback engine. If both syncs were before the time/pitch stretch, then the first pitch/position update would simply get overwritten by the second. So the way we do it now (and I think this is the de facto way to do it in audio apps) is to "do everything" once per buffer. Please feel free to ask for clarification on anything, my explanation may not have been very clear. > > I would think there should be some way to send a stream of updates (at > something like 500-1000Hz?) to the Player engine so it can track the > vinyl more smoothly within a given output buffer. MsPinky gives > position > and velocity updates every 32 samples for example. Serato uses a 1000 Hz carrier wave (stereo), and the pitch can be determined by looking at a similar number of samples. In both cases, you're still limited by the latency (buffer size) of your soundcard. I should also mention that input and output occur synchronously (at least within PortAudio) - If the soundcard asks you for 1024 samples, it will give you 1024 samples from the input channels at the same time. That's the audio that gets fed into all the Xwax timecoder stuff (or the corresponding scratchlib code). Again, a practical way to do sub-latency pitch/position changes isn't immediately obvious to me. That being said, I'm open to suggestions here, although I think we're going to be limited by the latency no matter what. (This is why you need a good soundcard/fast CPU for vinyl control.) I'm also open to suggestions on all of the vinyl control code. It's an area of Mixxx that hasn't seen much peer-review, and I think there's lots of room for improvement there. Thanks, Albert ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Mixxx-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mixxx-devel
