huhu,
the incredible transport :-)
> * When Hydrogen is the timebase master, it supplies the B:B:T info based on
> info supplied by the Hydrogen instance.
hydrogen send information's based nframes
nframes = H->getTimeMasterFrames();
=========================================================================
unsigned long Hydrogen::getTimeMasterFrames()
{
float allframes = 0 ;
if ( m_pAudioDriver->m_transport.m_status == TransportInfo::STOPPED ){
int oldtick = getTickPosition();
for (int i = 0; i <= getPatternPos(); i++){
float framesforposition =
(long)getTickForHumanPosition(i) *
(float)m_pAudioDriver->m_transport.m_nTickSize;
allframes = framesforposition + allframes;
}
unsigned long framesfortimemaster = (unsigned int)(allframes +
oldtick * (float)m_pAudioDriver->m_transport.m_nTickSize);
m_nHumantimeFrames = framesfortimemaster;
return framesfortimemaster;
}else
{
return m_nHumantimeFrames;
}
}
====================================================================================
also hydrogen sends information's over position beat type and bpm and test
position
pos->valid = JackPositionBBT;
pos->beats_per_bar = H->getTickForHumanPosition( posi )/48;
pos->beat_type = 4;
pos->ticks_per_beat = (long)H->getTickForHumanPosition( posi );
pos->beats_per_minute = H->getNewBpmJTM();
also hydrogen sends bbt infos computed from hydrogen tick informations
pos->bar =
pos->beat =
pos->tick =
pos->bar_start_tick = pos->bar * pos->beats_per_bar *
pos->ticks_per_beat;
> * When Hydrogen is the timebase slave, it ignores the B:B:T info supplied
> by the timebase master. Instead, it only looks for changes in
> jack_position_t::beats_per_minute and calculates frame offsets from
> that. (It also looks for a couple of relocate events.)
take a look into the JackOutput::relocateBBT() function
here hydrogen gets bbt infos from jack
if ( S->get_mode() == Song::SONG_MODE ) {
bar_ticks = H->getTickForPosition(
m_JackTransportPos.bar-1 ); // (Reasonable?) assumption that one pattern is
_always_ 1 bar long!
if ( bar_ticks < 0 ) bar_ticks = 0; // ignore error
NOTE This is wrong -- if loop state is off, transport should just stop ??
}
float hydrogen_ticks_to_locate = bar_ticks +
( m_JackTransportPos.beat-1 )*hydrogen_TPB + m_JackTransportPos.tick
*( hydrogen_TPB/m_JackTransportPos.ticks_per_beat ) ;
and here the important ticksize!!!!!
Song * S = H->getSong();
float fNewTickSize = getSampleRate() * 60.0 / m_transport.m_nBPM /
S->__resolution;
today i have talk with mauser about the transport problems. think we have to
discus the transport a little bit. because we need a table of things which are
important for testing and debugging.
e.g. sync to application's, tempo change from both sides. then the jack
transport api
talk about some news (loops fast forward and so on), also they talk about the
new jack_midi.
i am not sure but to get a super transport we need collaboration with other jack
applications and they all need one jack transport reference.
sorry about my english is :-).
gretings wolke
>
> Hi guys,
>
> I was looking into the transport code (because I was having sync. issues with
> another app), and here's how I understand it:
>
> * When Hydrogen is the timebase master, it supplies the B:B:T info based on
> info supplied by the Hydrogen instance.
>
> * When Hydrogen is the timebase slave, it ignores the B:B:T info supplied
> by the timebase master. Instead, it only looks for changes in
> jack_position_t::beats_per_minute and calculates frame offsets from
> that. (It also looks for a couple of relocate events.)
>
> * The info supplied by jack_position_t is communicated to the Hydrogen
> instance through a TransportInfo object. This object only contains
> status, a frame offset, the tick size, and the current tempo.
>
> * It doesn't look like Hydrogen has any way to recover the downbeat if the
> BPM calculations drift.
>
> Is this the current state of things? If so -- I have a few problems with
> that,
> but I'll hold my comments until I understand what is happening.
>
> Peace,
> Gabriel
>
> -------------------------------------------------------------------------
> 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=/
> _______________________________________________
> Hydrogen-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hydrogen-devel
>
-------------------------------------------------------------------------
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=/
_______________________________________________
Hydrogen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel