[CinCV TNG] lazy insertion point movement when using keypad

Frederic Roenitz ml1 at aimvis.de
Sat Aug 26 15:03:13 CEST 2017


Hi everybody,

My intent with this text is to create a good foundation on which we
can easily exchange our ideas.

Until now this was quite difficult, mainly due to different
vocabulary that we used.


This might seem to be a quite long post, but I hope it's a quick and
easy read. :)



A short intro to my approach:

When first using cinelerra I thought that the 'insertion point cursor'
was something that in kdenlive is called 'the playhead'.

The playhead would always prompt to the position in the timeline that
the compositor displays.

But currently in cinelerra-gg, instead of a playhead-concept there is
the 'next frame/unit'-concept. It has resemblances to the playhead
concept but is different (one concept might maybe be called an
implicit concept an the other one might maybe be called an explicit
concept ... if that helps to get the point).


So for me the first revelation was to learn that:

insertion point != playhead

(With: "!=", as in: "not equal".)


Even though there currently is no explicit 'playhead' in cinelerra-gg,
I will use the term 'playhead' anyway, because it makes things easier
and quicker to understand (at least for me ;).


By the way, for the following, I renamed "separator" (used it once
previously) to "timeline position".




Now, let's first have a look at some basic definitions. This should
(hopefully) be intuitively comprehensible, so you might just skim
through it and come back to it as needed.


Definition of "playing" and "seeking"
*************************************

I am only talking about the main window and the compositor window,
here.

The viewer window behavior might be added later.


*playing* is done by:

1. pressing the space key

2. pressing the numpad-keys

3. clicking the "playback"-buttons ...

3.1 in the main window, near the top left of
     the main window.

3.2 in the compositor window.

(3.3 in the viewer window.)


*seeking* is done by:

1. clicking "into" the timeline. Where "into" can be on the header or
    on the body of the timeline in the compositor window, while in "cut
    and paste editing" mode. Or only on the header, while in "drag and
    drop editing" mode.

2. entering a value in the [how is this type of field called]
    "Selection start time" near the bottom right of the compositor
    window.


What playing and seeking actually *is* or *does* follows below.


ascii timeline pictogram (representing the timeline in the main window)
***********************************************************************

      vo
  0 1 2 3 4 5
  |_|_|_|_|_|
   0 1 2 3 4


Explanations
============

v == insertion point
o == frame that is displayed in the compositor / the "playhead"
_ == one frame
| == timeline position, always located between two frames


timeline position 0 ==
0
|

timeline position 1 ==
1
|

frame 0 ==
_
0

frame 1 ==
_
1


Example 1
=========

      vo
  0 1 2 3 4 5
  |_|_|_|_|_|
   0 1 2 3 4

example sentences:

  Timeline position 2 is located between frame 1 and frame 2.

  Timeline position 2 is located at 'the end' of frame 1 and at 'the beginning' of frame 2.

  Timeline position 5 is located at the end of frame 4.

  There is no frame 5.

  The insertion point cursor is located at timeline position 2.

  The playhead is at frame 2.

  The compositor shows frame 2 (because the playhead is at frame 2).


Example 2
=========

     ov
  0 1 2 3 4 5
  |_|_|_|_|_|
   0 1 2 3 4

  The insertion point is at timeline position 2.

  The playhead is at frame 1.



Rules
=====

The compositor shows the frame where the playhead is currently located.

The insertion point cursor is always at a timeline positions and never on or at a frame.
The playhead is always on or at a frame and never at a timeline position.





Concepts and cinelerra-gg vocabulary
====================================

insertion point

playhead

previous and next frame/sample

frame/sample == unit


seek target:

  the next unit equals the seek target


position is set by a seek operation

'position' == timeline position and insertion point cursor position

A "seek operation" sets the insertion point cursor at the specified timeline position.


strategy rules


Reference for orientation (in the code) is the 'timeline
position'. The timeline position "has" a previous and a next frame:
_|_

Example:

   2
  _|_
  1 2

The "previous" frame of timeline position 2 is frame 1.

The "next" frame of timeline position 2 is frame 2.




Using all this to bring light into the chaos
********************************************
********************************************


Cases - current situation
*****

case 1: play one frame forward after seek (the "ov"-case)
=========================================

"seek frame 2" as shorthand for "setting the insertion point cursor at timeline position 2":

  timeline:

      vo
  0 1 2 3 4 5
  |_|_|_|_|_|
   0 1 2 3 4


  compositor shows frame 2.


play one frame forward:

  timeline:

       ov
  0 1 2 3 4 5
  |_|_|_|_|_|
   0 1 2 3 4


  compositor shows frame 2.


... I would expect that it shows frame 3, like when playing one frame
backwards:


case 2: play one frame backwards after seek
===========================================

"seek frame 2" as shorthand for "setting the insertion point cursor at timeline position 2":

  timeline:

      vo
  0 1 2 3 4 5
  |_|_|_|_|_|
   0 1 2 3 4


  compositor shows frame 2.


play one frame backwards:

  timeline:

    vo
  0 1 2 3 4 5
  |_|_|_|_|_|
   0 1 2 3 4


  compositor shows frame 1.


Summary
*******

Intuitively I would expect the relation between the insertion point
cursor and the playhead to always be: "vo".

... but currently it is not.

Their relation can currently also be: "ov".


Often while editing I have my eyes on the compositor.

Then, some times while editing, I need to know where the insertion
point cursor is currently located by deducing it from what I currently
see in the compositor window.

Currently I can only know where it is, when I know what play/seek
operations I was doing right beforehand. Or by looking at an
appropriately zoomed in timeline.

Both ways are slowing me down and taking my attention away.


Ideas for a solution
********************

  1. Always "vo".

  2. Having an always visible playhead cursor.

  3. Insertion point cursor giving a hint where the playhead is.

     By the way:

     Currently the insertion point cursor is blinking after a seek when
     it is done by clicking with the mouse 'in the timeline'. It is not
     blinking when the seek is done by entering a value in the
     "Selection start time" field.

     The insertion point cursor is solid (not blinking) after a play
     operation (and while playing, too).

     ... but this is not clear enough for me to be helpful/usable.



Ok, that's it for now.

There are still a couple of details missing (like: what does a "play"
operation do). If it's some important detail needed to get things
done, please tell me and I will update the text.

But this hopefully gives a good foundation for exchanging ideas.

And if you like, put some/all of it into some documentation!



Kind greetings

Frederic




More information about the Cinelerra mailing list