Hi Jakob,

jlun...@imada.sdu.dk wrote:
> The debate goes on...

:-)

>>> For now, we could allow both ticks and ms offsets, and then decide later
>>> what happens if they're both present.
>> I wonder if maybe a union (frames OR ticks OR ms OR ticks+ms) might be
>> more appropriate.  Giving the inputs a choice of how it's scheduled.  I've
>> omitted the idea up to now because it sounds complicated.
> 
> Yes it does, but if that's what we want in the API, let's do that. The

I dunno... I was hoping more people would chime in on the subject.

> implementation can be optimized later if all goes well.. Personally I find
> unions (as in C) a bit ugly, perhaps we do it with overloaded functions,
> or just different function names? (ie. scheduleByTicks, scheduleByMs..)

Yes.  I meant 'union' in more of a conceptual way.

>> 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..."

> Aah, one more thing, about note off messages... Currently in Hydrogen
> (trunk that is), if there's no note off, a sample WILL play 'over its
> tail' in the sense that two or more instances of the sample can be playing
[snip]

OK.  Thanks for clearing that up.

Peace,
Gabriel

------------------------------------------------------------------------------
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
Hydrogen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel

Reply via email to