Compare commits

...

10 Commits

Author SHA1 Message Date
theGreatWhiteShark a39e731593 reintegrating seeking in Engine::sync
it was relevant for internal synchronization since Non-timeline updates its transport pos *before* the JACK sync callback is triggered
2021-02-17 19:52:56 +01:00
theGreatWhiteShark 0edc6993da make printJackTransportPos static and public 2021-02-13 15:41:02 +01:00
theGreatWhiteShark d7237a9302 fix README + remove debugging message 2021-02-07 20:57:02 +01:00
theGreatWhiteShark 3539c3bbad
Merge pull request #1 from theGreatWhiteShark/fix_syncRelocation
Fix sync relocation
2021-02-07 16:11:46 +01:00
theGreatWhiteShark 96a6345cd0 fix bug in JACK transport relocation
the sync callback did take the first transport position provided by the JACK server when transport is in state JackTransportStarting, requests a relocation internally, and gives its okay to the JACK server.

However, if a client triggers both a relocation and the start of the transport at the same time, the JACK server will provide two cycles in state JackTransportStarting. The first one will still contain the old location and only the second will provide the new one. This makes the `timeline` seeking the first location (wrong) and missing the proper one. At the same the JACK position stored in the client is valid and the BBT data provided as JACK master will be legit (and out of sync with the Non-timeline internal state).

In the provided fix the internal relocation will always and exclusively be triggered if the transport position provided by the JACK server does not match the one stored in the client.
2021-02-07 15:54:03 +01:00
theGreatWhiteShark 604c959fdb add JACK debugging messages 2021-02-04 15:54:22 +01:00
theGreatWhiteShark 4915cbb864 switch to forked NTK 2021-02-04 14:42:56 +01:00
theGreatWhiteShark 3af53b904a fix resizing
A small, resizable box in the bottom of the legacy GUI allowed the tree containing the session list to be scaled to zero width and thus to disappear.
2021-02-04 14:38:45 +01:00
theGreatWhiteShark 8897005d0f make README Github compliant 2021-02-04 14:33:56 +01:00
theGreatWhiteShark 6265d3d1f9 Merge branch 'readme-update' 2021-02-04 14:18:57 +01:00
9 changed files with 108 additions and 98 deletions

2
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "lib/ntk"]
path = lib/ntk
url = git://git.tuxfamily.org/gitroot/non/fltk.git
url = git://github.com/theGreatWhiteShark/non-ntk

View File

@ -1,51 +0,0 @@
# -*- mode: org -*-
* Non-things build instructions
This repository contains all of the non-* software.
** Getting NTK
If you just cloned the non repository or just executed git pull, then
you should also run
git submodule update --init
to pull down the latest NTK code required by Non. Git does *not* do
this automatically.
** Building NTK
If you don't have NTK installed system-wide (which isn't very likely
yet) you *MUST* begin the build process by typing:
cd lib/ntk
./waf configure
./waf
Once NTK has been built you must install it system-wide before
attempting to build the non-* programs.
To install NTK type:
su -c './waf install'
** Build all projects
Typing:
./waf configure
./waf
su -c './waf install'
from the base of the checkout of the Non git repository will build and
install all of the non-* programs together.
** Build a single project
Typing:
./waf configure --project=[timline|sequencer|mixer|session-manager]
./waf
su -c './waf install'

59
README.md Normal file
View File

@ -0,0 +1,59 @@
# Non-things build instructions
This repository contains all of the `non-*` software.
## Getting NTK
If you just cloned the non repository or just executed git pull, then
you should also run
```bash
git submodule update --init
```
to pull down the latest `NTK` code required by Non. Git does *not* do
this automatically.
## Building NTK
If you don't have `NTK` installed system-wide (which isn't very likely
yet) you *MUST* begin the build process by typing:
```bash
cd lib/ntk
./waf configure
./waf
```
Once `NTK` has been built you must install it system-wide before
attempting to build the `non-*` programs.
To install NTK type:
```bash
su -c './waf install'
```
## Build all projects
Typing:
```bash
./waf configure
./waf
su -c './waf install'
```
from the base of the checkout of the Non git repository will build and
install all of the `non-*` programs together.
## Build a single project
Typing:
```bash
./waf configure --project=[timline|sequencer|mixer|session-manager]
./waf
su -c './waf install'
```

View File

@ -1,28 +0,0 @@
# -*- mode: org -*-
* Notes to Packagers
Non-Mixer, Non-DAW, and Non-Session-Manager, although stored in the
same repository, are completely independent programs which can be
built and packaged separately (see README.build)
If you're having trouble adapting to Non's build system, please
contact me directly or post to one of the Non mailing lists with your
issue rather than just attempting to hack past the build system.
Also, if your distribution has quirks prevent Non-* from building,
please send me a message about it, as I'd like to know about these
issues so that I can incorporate that knowledge into the build system
so those building Non-* directly from the repository on those
distributions can also benefit!
Also, please stop telling people I'm dead. I'm not dead--I'm just
practicing. If you were me, you might be dead, but I'm not. So,
seriously, stop it.
Thanks,
Jonathan Moore Liles <male@tuxfamily.net>
P.S. Furthermore, please quit listing crazy random stuff as dependencies.

@ -1 +1 @@
Subproject commit 2b8d73264304e571e63a73432a8f88113b3a520b
Subproject commit 71a410b2e1f79f89b453c91ead3c5d668f6a7d97

View File

@ -986,8 +986,7 @@ public:
/* Fl_Group::current()->resizable( o ); */
} // Fl_Scalepack
{ Fl_Box *o = new Fl_Box( X + 300, Y + 30, 100, H - ( 30 + SH ));
Fl_Group::current()->resizable(o);
{ new Fl_Box( X + 1000, Y + 30, 100, H - ( 30 + SH ));
}
{ Fl_Text_Display *o = status_display = new Fl_Text_Display( X, Y + H - SH, W, SH );

View File

@ -101,8 +101,13 @@ Engine::playback_latency ( void ) const
int
Engine::sync ( jack_transport_state_t state, jack_position_t *pos )
{
static bool seeking = false;
// When transport is starting the JACK server will ask all clients
// whether they are ready yet. If not, the next cycles will be in
// state JackTransportStarting as well. This variable indicates
// that Non-Timeline did already responded to an (internal)
// relocation.
static bool bSeekPending;
switch ( state )
{
case JackTransportStopped: /* new position requested */
@ -113,21 +118,22 @@ Engine::sync ( jack_transport_state_t state, jack_position_t *pos )
return 1;
case JackTransportStarting: /* this means JACK is polling slow-sync clients */
{
if ( ! seeking )
{
// In addition to internal relocations, the second clause
// checks whether an external client did request a change
// in transport position at the JACK server (this can very
// well happen during a depending seek after responding to
// the internal relocation).
if ( !bSeekPending || transport->frame != pos->frame ) {
request_locate( pos->frame );
seeking = true;
}
}
bool r = true;
if ( timeline )
r = timeline->seek_pending();
if ( ! r )
seeking = false;
return ! seeking;
// Check whether Non-timeline is still changing the
// transport position internally.
if ( timeline ){
bSeekPending = timeline->seek_pending();
}
return ! bSeekPending;
}
case JackTransportRolling: /* JACK's timeout has expired */
/* FIXME: what's the right thing to do here? */

View File

@ -21,6 +21,7 @@
#include "Transport.H"
#include "Timeline.H"
#include <iostream>
#include "Engine/Engine.H"
@ -262,9 +263,12 @@ Transport::poll ( void )
ts = engine->transport_query( this );
// printJackTransportPos( this );
rolling = ts == JackTransportRolling;
}
void
Transport::locate ( nframes_t frame )
{
@ -337,3 +341,21 @@ Transport::toggle ( void )
else
start();
}
void Transport::printJackTransportPos( const jack_position_t* pPos ) {
std::cout << "\033[36m[Non-Timeline] [JACK transport]"
<< " frame: " << pPos->frame
<< ", frame_rate: " << pPos->frame_rate
<< std::hex << ", valid: 0x" << pPos->valid
<< std::dec << ", bar: " << pPos->bar
<< ", beat: " << pPos->beat
<< ", tick: " << pPos->tick
<< ", bar_start_tick: " << pPos->bar_start_tick
<< ", beats_per_bar: " << pPos->beats_per_bar
<< ", beat_type: " << pPos->beat_type
<< ", ticks_per_beat: " << pPos->ticks_per_beat
<< ", beats_per_minute: " << pPos->beats_per_minute
<< ", frame_time: " << pPos->frame_time
<< ", next_time: " << pPos->next_time
<< "\033[0m" << std::endl;
}

View File

@ -81,6 +81,9 @@ public:
void start ( void );
void stop ( void );
void toggle ( void );
// Print JACK transport position for debugging purposes.
static void printJackTransportPos( const jack_position_t* pPos );
};
extern Transport* transport;