On Wednesday 05 August 2009 14:05:45 Gabriel M. Beddingfield wrote:
>
> >> But, JackTransportMaster is *the* internal timer for Hydrogen.  There is
> >> no other.  If the jack server doesn't provide B:b.t (or provides
> >> _invalid_ B:b.t), that class is responsible to provide a good fallback.
> >
> > Yes, and that will be something like "OK, where were we... Let's keep
> > going from there, whith the present tempo, possibly taking info from the
> > song and the playback state (looping, pattern or song) of Hydrogen into
> > account". And that exact same thing happens whether we have
> > JackTransportMaster, XXTransportMaster, or InternalMaster (or whatever
> > it'll be called when there's no external sync source). So it wouldn't
> > really make sense to have that functionality in all the -Master classes?
> >
> > I guess my suggestion here is to have that code in either Transport (what
> > is currently an abstract base class) or in H2Transport (which I think of
> > as some sort of proxy between the sequencer and the various transport
> > classes), if that makes any sense.
>
> Well, when I look at the code (so far) there's not that much to it.  90% of
> the real heavy lifting is being done by TransportPosition and the functions
> in song_helpers.cpp.  If things start to get too much more involved... I
> would rather share code through class inheritance or aggregation rather
> than mediation between classes.
>
> And what you propose in that last paragraph there *is* a 3-way mediation. 
> What we have currently in Hydrogen is also a 3-way mediation.  "This is the
> transport... but we need this *other* transport to think he's the
> transport... and in *this* situation we add this band-aid between them to
> keep everyone happy..."
>

Can you please explain that a little more?

If I understand correctly, the term 'aggregation' describes the technique used 
within H2Transport, which is treated (in sequencer code) as the actual 
transport, but really delegates the work to other transport objects.

I don't know what is meant by  3-way mediation (which is why I made that lame 
joke before) - and why does what I suggest imply... that?

IMO the current h2 is broken because the original design was too simple, and 
was repaired upon for too long using 'band-aid' style hacks. The new design 
should repair that, but without getting unnecessarily complicated.

What I was trying to do was to make tempo changes during playback (through the 
UI) possible, but I couldn't figure out where to put the code that looks into 
the Song to check its tempo... Transport being driven by SimpleTransport 
class, that was my first choice but that didn't seem to make sense, for the 
reasons I've tried to explain.

Cheerios
 -- Jakob

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Hydrogen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel

Reply via email to