Hi Luis, On Thu, 2008-11-20 at 23:54 +0000, Luis de Bethencourt wrote: > Hello guys, > > Some of you will know me from IRC, but Im a little new to the project > but come from other opensource development communities. I recently > purchased a turntable and midi controller (x-session pro). I dont have > the money to buy second turntable and I dont see a point if we can get > one deck vinyl control working, which is my big goal right now (I've > been looking to the spec, the code and goint to tackle it). > http://www.mixxx.org/wiki/doku.php/single-deck_vinyl_control > > What the spec defines is an easy way to change whick track the vinyl > is controlling. In a brute way, the equivalent to going to preferences > and switching it manually. > But I want to comment some inconvenients I havent seen expressed in the > spec... > Problem 1: > Track A is playing controlled by the vinyl, you switch to track B... > what happens with Track A? It stops. > Track A was not in play mode in mixxx, so if you turn off the control > it the same as pausing it. > So this means first problem... when switching control from Track A to > Track B, we need to know if the Track was playing or not and continue > doing so (we want to follow Newton's first rule here :P). > OK, that developed or lets say we just assume it was playing and code > that to get some sloppy code to start with. >
Ok, yes, I never thought about this. I see the problem, and maybe there should be an extra layer of abstraction in the vinyl control code where a VinylControlProxy "latches" onto a player inside Mixxx or something. (Maybe this is bad advice, but I don't know of a way to fix this off the top of my head.) In the current vinyl control code, pitch control is done via the "scratch" ControlObject. Back when I was developing the code, I had originally coded it so that the pitch was controlled via the "rate" ControlObjects, which are hooked up to the pitch sliders in the GUI. It looked really weird, because when you scratched, the pitch sliders went crazy. It was also a problem because the speed of your scratching was limited to the max range on the pitch slider. Basically, the real turntable and virtual turntable paradigms start to conflict and you end up with weird behaviour unless you just use the "scratch" ControlObject, like I ended up doing. However, in order to use that ControlObject, I _think_ I needed to "stop" playback inside the engine. You probably know what I'm talking about since you've seen the vinyl control code. Poke at this stuff though - try commenting out the line that stops playback and see what scratching is like if we don't stop it. > Problem 2: > We switch control from A to B, and while doing it we trigger playing > in A smoothly. > But the pitch is wrong! > The pitch in mixxx's slider will probably not match the pitch in the > turntable. Solution? In vinyl control mode Mixxx has to know at what > pitch the turntable is working and adjust the slider appropiatly. > Making the analysis of the timecode vinyl input to know the playback > speed sounds far more complicated to me than the initial problem of > creating a switch of which track the vinyl controls. > > So the deck vinyl control seems more complicated than covered in the > spec. I want to tackle the problem as I said. But I really want to get > some feedback from Mixxx code experts, start brainstorming ideas of > how to solve the issue, etc Ok, well I half-answered this question above. What we may want to do is something a bit smarter here, like this (for example): - If the pitch from the vinyl is less than the max pitch range in Mixxx, then enable playback via the "playButton" object in VinylControlXwax, and set the "rateSlider" object to the appropriate pitch. - If the pitch from the vinyl is greater than or equal to the max pitch range in Mixxx, then pause playback and use the the "controlScratch" object in VinylControlXwax to control the pitch. Now that I've just written that, it sounds very familiar. I think I coded this behaviour at one time, but for one reason or another I removed it. It was a long time ago, and there were tons of other problems, so I may have removed it for simplicity or something. Does this help at all? Please feel free to ask for clarification... Thanks, Albert ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Mixxx-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mixxx-devel
