On Wed, Jul 10, 2013 at 3:06 PM, petah <mi...@djpetah.com> wrote:
> On Wed, 10 Jul 2013 14:47:42 -0400
> RJ Ryan <rryan-opwvymzfgylytjvyw6y...@public.gmane.org> wrote:
> > On Wed, Jul 10, 2013 at 2:05 PM, petah <
> mixxx-356rgwljecpbdgjk7y7...@public.gmane.org> wrote:
> >
> > > >Is there a reason to make a request/response setup rather than a
> broadcast
> > > >setup? Isn't your processing code constantly reading this data as the
> CD
> > > >spins?
> > >
> > > Yes, approx every 4 milliseconds. If I were to write a 64-byte SysEx
> MIDI
> > > message that often it'd likely overwhelm the system.
> >
> > That's 16000 bytes/sec. Which is really not that much data. MIDI (i.e the
> > wire protocol) has a max of 31.25kbits/s but MIDI over USB usually
> ignores
> > that limitation.
>
> it's actually soft-midi (running on localhost) so I'm guessing would be
> even faster.
>
> So the Javascript driver would keep up when called that often?
>
>
Depends on your hardware I guess? There's nothing that would prevent it
from running fast on fast hardware.
> > If you find it's an issue, you could just rate limit it on
> > your side.
>
> Is there a way to find out when a problem occurs? Otherwise my side of the
> code is blind (or deaf) and won't know when to rate-limit.
>
>
Nope, not yet.
> > > Since Mixxx doesn't need data that often and can only process it
> without
> > > glitches up to a certain point, as Owen pointed out, the "pull" model
> makes
> > > more sense.
> >
> > Maybe you should allow Mixxx to set the update interval via a sysex
> > message? Currently Mixxx doesn't have a way of telling how loaded it is.
>
> That would be a useful addition.
>
>
Yea, there aren't many good methods though. CPU usage is too course since
if the scheduler is a good scheduler it can still schedule high priority
threads under heavy CPU usage (e.g. we should be able to analyze a track
(which uses a lot of disk/CPU) and play it at the same time). Underrun
count is an after-the-fact measure of things going badly but definitely a
good one to use to know when to back off.
> > The controller processing thread runs at lower priority than the audio
> > processing callback so it really should not matter if the scheduler is
> > working correctly.
>
> It does matter on a few messages like Cue Play (dropmix), Owen's source
> code for the xwax driver also has a comment about it.
>
>
It shouldn't matter unless we have a priority inversion issue (which the
engine used to have much more of). We're still working on getting rid of
some of the places that can cause things like this. Maybe that comment is
out-dated? If you do find that changing a control rapidly causes buffer
underruns could you file a bug and include repro details?
> > Adding the wire overhead and latency of a request every time you want
> data
> > seems silly because the time to the next request is a function of time
> > alone and the request carries no information.
>
> Well I'm still unclear on what Mixxx's limit is wrt updating the play
> position. Owen mentioned that if updated too often it'd completely garble
> the sound which isn't a function of MIDI speed but some internal Mixxx
> factors. That's the variable I'd like to extract to make sure I never go
> beyond that limit.
>
As Owen mentioned, controlling Mixxx via playposition is not meant to be
used in the way you're talking about using it. That's meant for seeking to
a new position. Every time you seek to a new position you are resetting the
internal engine state (e.g. the time and pitch scaler state gets reset
which throws away work since some scalers such as the soundtouch /
rubberband scaler have to do a significant amount of readahead). The way
that vinyl control works is by controlling the rate. I agree with Owen --
you should control the rate and not the position.
hope that helps -- cheers,
rj
> If that limit is consistently beyond my update frequency then you're right
> and requesting an update from my driver makes no sense. I'd just need a
> reliable way to establish that's the case in the realtime since it may
> depend on Mixxx's current workload.
>
> thx,
>
> -- p
>
> > > >You could just continuously write messages to Mixxx and then parse
> > > >them in a Mixxx MIDI script.
> > > >
> > > >
> > > >On Wed, Jul 10, 2013 at 1:43 PM, petah <
> mixxx-356rgwljecpbdgjk7y7...@public.gmane.org> wrote:
> > > >
> > > >> I had this idea for a high-resolution MIDI interface and would like
> to
> > > >> know if it's doable/stupid before implementing it.
> > > >>
> > > >> My (software) device continuously updates a few high-res variables
> at
> > > high
> > > >> speed, i.e. it's not strictly event-oriented. There are two CDJs,
> each
> > > has
> > > >> the following variables:
> > > >>
> > > >> - track (unsigned int)
> > > >> - position_ms (unsigned int)
> > > >> - tempo (signed float)
> > > >> - pitch-bend (signed float)
> > > >>
> > > >> to keep it simple let's say each variable takes 32 bits, so that's
> 64
> > > >> bytes for both decks (and ignore other variables for now).
> > > >>
> > > >> if my software were to construct a MIDI SysEx message with this
> data as
> > > >> one binary blob, would a Mixxx javascript driver be able to query
> that
> > > blob
> > > >> to interface with my device?
> > > >>
> > > >> Since the data is real-time, Mixxx could query it as fast as it
> > > can/wants
> > > >> so there are no timing constraints on my end.
> > > >>
> > > >> thoughts?
> > > >>
> > > >> thx,
> > > >>
> > > >> -- p
> > > >>
> > > >>
> > > >>
> > >
> ------------------------------------------------------------------------------
> > > >> See everything from the browser to the database with AppDynamics
> > > >> Get end-to-end visibility with application monitoring from
> AppDynamics
> > > >> Isolate bottlenecks and diagnose root cause in seconds.
> > > >> Start your free trial of AppDynamics Pro today!
> > > >>
> > >
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
> > > >> _______________________________________________
> > > >> Get Mixxx, the #1 Free MP3 DJ Mixing software Today
> > > >> http://mixxx.org
> > > >>
> > > >>
> > > >> Mixxx-devel mailing list
> > > >> mixxx-devel-5nwgofrqmnerv+lv9mx5uipxlwaov...@public.gmane.org
> > > >> https://lists.sourceforge.net/lists/listinfo/mixxx-devel
> > > >>
> > >
> > >
> > >
> ------------------------------------------------------------------------------
> > > See everything from the browser to the database with AppDynamics
> > > Get end-to-end visibility with application monitoring from AppDynamics
> > > Isolate bottlenecks and diagnose root cause in seconds.
> > > Start your free trial of AppDynamics Pro today!
> > >
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
> > > _______________________________________________
> > > Get Mixxx, the #1 Free MP3 DJ Mixing software Today
> > > http://mixxx.org
> > >
> > >
> > > Mixxx-devel mailing list
> > > mixxx-devel-5nwgofrqmnerv+lv9mx5uipxlwaov...@public.gmane.org
> > > https://lists.sourceforge.net/lists/listinfo/mixxx-devel
> > >
> >
>
>
> ------------------------------------------------------------------------------
> See everything from the browser to the database with AppDynamics
> Get end-to-end visibility with application monitoring from AppDynamics
> Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
> _______________________________________________
> Get Mixxx, the #1 Free MP3 DJ Mixing software Today
> http://mixxx.org
>
>
> Mixxx-devel mailing list
> Mixxx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mixxx-devel
>
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org
Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel