Hola senor
Instead of your patch, could you please try this
************
Index: libs/hydrogen/src/hydrogen.cpp
===================================================================
--- libs/hydrogen/src/hydrogen.cpp (revision 325)
+++ libs/hydrogen/src/hydrogen.cpp (working copy)
@@ -2694,7 +2694,8 @@
}
//~ jack transport master
void Hydrogen::triggerRelocateDuringPlay() {
- m_nPatternStartTick = -1; // This forces the barline position to be
recalculated in Pattern Mode.
+ if ( m_pSong->get_mode() == Song::PATTERN_MODE )
+ m_nPatternStartTick = -1; // This forces the barline position
to be recalculated in Pattern Mode.
}
void Hydrogen::togglePlaysSelected() {
***************
It disables the triggerRelocateDuringPlay function (which is what you
commented out because it messes with the position in song mode) while not in
pattern mode, and it appears to me that it does almost the same thing, but
without damaging the pattern mode ? (applying your patch broke syncing H2 with
Ardour as time master, while H2 in Pattern Mode).
Thanks
Jakob.
On Wednesday 13 August 2008 16:44:13 [EMAIL PROTECTED] wrote:
> hi jakob,
>
> I play a little bit with the transport.
>
> I get always the same problem.
>
> Here a way to reproduce.
> 1. Start Hydrogen
> 2. Enable jack transport.
> 3. Start in songmode with a song.
> 4. Hit the taptempo key "backslash" some times.
> On this point all works right. Tempochange do nothing.
> 5. Stop sequenzer and hit the "Backspace" key to reposition to start.
> 6. Start play.
> now the position is wrong.
> also in state playing taptempo makes jumping in timeline.
>
> I can fix the problem removing this lines of code in jack_output.cpp. see
> patch
>
> after removing this, you can use tap tempo in state playing without
> jumping. and backslash key go to the song beginning.
>
> Not working is use taptompo in the middle of a song in state STOPPED and
> jack transportmode is on. Then after tapping and start haydrogen jumps to
> an other position. But in state PLAYING it works well.
>
>
> --- libs/hydrogen/src/IO/jack_output.cpp (Revision 325)
> +++ libs/hydrogen/src/IO/jack_output.cpp (Arbeitskopie)
> @@ -213,8 +213,8 @@
>
> void JackOutput::locateInNCycles( unsigned long frame, int cycles_to_wait
> ) {
> - locate_countdown = cycles_to_wait;
> - locate_frame = frame;
> +// locate_countdown = cycles_to_wait;
> +// locate_frame = frame;
> }
>
> /// Take beat-bar-tick info from the Jack system, and translate it to a
> new internal frame position and ticksize. @@ -276,11 +276,12 @@
>
> void JackOutput::updateTransportInfo()
> {
> +/*
> if ( locate_countdown == 1 )
> locate( locate_frame );
> if ( locate_countdown > 0 )
> locate_countdown--;
> -
> +*/
> if ( Preferences::getInstance()->m_bJackTransportMode ==
> Preferences::USE_JACK_TRANSPORT ) { m_JackTransportState =
> jack_transport_query( client, &m_JackTransportPos );
>
> @@ -345,17 +346,17 @@
> WARNINGLOG( "Frame offset mismatch;
> triggering resync in 2 cycles" ); must_relocate = 2;
> } else {
> - if (
> Preferences::getInstance()->m_bJackMasterMode ==
> Preferences::NO_JACK_TIME_MASTER ) { +/* if (
> Preferences::getInstance()->m_bJackMasterMode ==
> Preferences::NO_JACK_TIME_MASTER ) { // If There's no timebase_master, and
> audioEngine_process_checkBPMChanged handled a tempo change during last
> cycle, the offset doesn't match, but hopefully it was calculated correctly:
> m_transport.m_nFrames = m_JackTransportPos.frame - bbt_frame_offset; // In
> jack 'slave' mode, if there's no master, the following line is needed to be
> able to relocate by clicking the song ruler (wierd corner case, but
> still...) if ( m_transport.m_status == TransportInfo::ROLLING )
> H->triggerRelocateDuringPlay(); - } else {
> + } else {*/
> ///this is experimantal... but it
> works for the moment... fix me fix :-) wolke // ... will this actually
> happen? keeping it for now ( jakob lund ) m_transport.m_nFrames =
> H->getHumantimeFrames() - getBufferSize(); -
> }
> + //}
> }
> }
>
> @@ -369,9 +370,9 @@
> if ( must_relocate == 1 ) {
> //WARNINGLOG( "Resyncing!" );
> relocateBBT();
> - if ( m_transport.m_status == TransportInfo::ROLLING
> ) { - H->triggerRelocateDuringPlay();
> - }
> +// if ( m_transport.m_status == TransportInfo::ROLLING
> ) { +// H->triggerRelocateDuringPlay();
> +// }
> }
>
> if ( must_relocate > 0 ) must_relocate--;
>
> > Hi List
> >
> > I have been trying to fix bugs in the transport / jack sync part of
> > Hydrogen for the last few days.
> >
> > I thought I was on the right track for a while, but after playing with it
> > for a while, it appears that the opposite is true.
> >
> > Hydrogen appears to be far from robust, when for instance, interacting
> > with buggy counterparts like seq24. Playback will jump back and forth
> > when adjusting the tempo, sudden segfaults happen etc.
> >
> > The reason for this is that the basic design of Hydrogen's audio engine
> > is too primitive to handle things like tempo changes etc, in a sensible
> > manner (see my mail from yesterday). The hacks required to build our
> > features on top of it, become too complicated and buggy. I honestly doubt
> > that we can meet the featureset that we currently plan for, in a
> > reasonably bug-free way, without rewriting major parts of the core
> > engine.
> >
> > Anyway I'm really fed up with i right now, and I can't keep debugging it
> > for fear that my head will explode :-)
> >
> > What's worse, I have no Idea whether my commits to the engine
> > (hydrogen.cpp and jack_output.cpp) have made matters better or worse
> > (though I think, better - I have been trying to test it, but I can't find
> > any real pattern in what triggers the bugs, sorry).
> >
> > Hrmpf.
> > - Jakob Lund.
> >
> >
> > -------------------------------------------------------------------------
> > 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
-------------------------------------------------------------------------
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