Notes about the "Fruity" Interaction Mode
Chris Ahlstrom
2016-06-09 to 2017-08-20

In this document we survey the fruity mode to learn how it works.
We found the following resource as well, which saves us a lot of research:

    http://www.subatomicglue.com/seq24/readme-subatomic.txt

    New Mouse Controls:

    "Fruity Mode"  (like the fruityloops piano roll mouse interaction)
    (selectable in options menu, in .seq24rc, and on command line)

    Sequencer Roll:

    Pencil (draw) or Selection (context sensitive)

     - Left click on empty space adds a note
     - Left click on note toggles note selection
     - Left click move from empty space draw many notes while moving
       pointer
	 - Left click move on a note moves/grows the selected note depending on
	   where pointer is

    Think of Ctrl like a selection modifier to default pencil pointer:

     - Left Ctrl click on empty space deselect all selected notes
     - Left Ctrl click on note adds to selection
	 - Left Ctrl click move in empty space starts selection box that only
       selects what is inside on button up
	 - Left Ctrl click move on a note make a copy of the selection (does
       copy/paste of selected notes)

    Think of Shift like an "add to selection" modifier

     - Left Ctrl Shift click on empty space nothing
     - Left Ctrl Shift click on note adds to selection
     - Left Ctrl Shift click move in empty space
       starts selection box that toggles selection on button up
     - Left Ctrl Shift click move on a note
       make a copy of the selection (does copy/paste of selected notes)

    Think of Right Click like an eraser or easy selection...

    Eraser
	 - Right click on note deletes note...  if you drag the mouse around it
       will delete other notes too.
	 - Right+Ctrl click on note delete all selected notes at once time
       including under the cursor

    Selection:
     - Right click on empty space deselect all notes
     - Right+Ctrl click on empty space nothing
	 - Right click move from empty space starts selection box that sets
       selection only to the notes inside it
	 - Right+Ctrl click move from empty space starts selection box that toggles
       selection on notes inside it

    Song Editor Window:

     - is kinda similar to the SequencerRoll mouse buttons, though more limited
       due to how the editor works...   you'll figure it out. :)

    Also added:

     - Ctrl A :  select All
     - Space bar starts/stops the main window's playback...

    But.....

https://www.image-line.com/support/FLHelp/html/basics_shortcuts.htm

    Ctrl+Left-click	        Select
    Ctrl+Shift+Left-click	Add to selection
    Double Left-click note	Open note properties
    Ctrl+Shift+Left-Click	Select multiple mixer tracks
    Left-Shift+Left-click   Add and resize notes (move mouse L/R after
                            click and hold to resize)
    Right-Shift+Left-click	Slice notes (click above/below note and drag vertical)
    Shift+Left-click	    Clone (drag while holding clip/pattern), release Shift
                            after dragging to unlock vertical movement

    Middle mouse button	    Pan view (hold and drag left/right)

    Ctrl+Right-click	    Zoom on selection/Drag to make zoom selection (zoom on
                            release)
    Double Right-click or	Swap to Ghost channel to edit the note.
    X1 button on Ghost note
    Left-Shift+Right-click	Pan view
    Left-Alt+Right-click	Audio preview
    Alt+ Right-click	    Audition the clip selected.
    Right-click	Delete      Selected Note/s
    Right-Alt+Right-click	Quantize selected
    Right-Shift+Right-click	Slice notes & delete smallest part (click above/below
                            note and drag vertical)

FruitySeqRollInput:

    The seqroll interactions supported are drag-pasting, selecting,
    moving, growing, and simple pasting.

    The mouse cursor icons used are stock GDK items:  CENTER_PTR,
    LEFT_PTR, PENCIL.

    paste:  ctrl-v+left-click

    paint:  If not on top of an existing note, left-click+left-drag;
            will add a note of length a little less than seqroll snap.

    select one: If on top of an existing note, left-click.
    select many: Otherwise prepare for drag ???
    select all:

            ???: ctrl+shift+left-click

    unselect one:
    unselect many:
    unselect all:  If not ctrl, left-click on note
            If not ctrl+shift, left-click

    seqroll function calls:

        sroll.convert_tn_box_to_rect()
        sroll.convert_xy()
        sroll.current_x()
        sroll.current_y()
        sroll.draw_selection_on_window()
        sroll.drop_x()
        sroll.drop_y()
        sroll.get_window()->set_cursor()
        sroll.grab_focus()
        sroll.m_seq.add_note()
        sroll.m_seq.get_selected_box()
        sroll.m_seq.grow_selected()
        sroll.m_seq.intersect_notes()
        sroll.m_seq.mark_selected()
        sroll.m_seq.move_selected_notes()
        sroll.m_seq.paste_selected()
        sroll.m_seq.push_undo()
        sroll.m_seq.remove_marked()
        sroll.m_seq.select_note_events()
        sroll.m_seq.set_dirty()
        sroll.m_seq.stretch_selected()
        sroll.m_seq.unpaint_all()
        sroll.m_seq.unselect()
        sroll.set_current_drop_x()
        sroll.set_current_drop_y()
        sroll.snap_x()
        sroll.snap_y()

    seqroll member usage:

        sroll.m_current_x
        sroll.m_current_y
        sroll.m_drop_x
        sroll.m_drop_y
        sroll.m_growing
        sroll.m_is_drag_pasting
        sroll.m_is_drag_pasting_start
        sroll.m_justselected_one
        sroll.m_move_snap_offset_x
        sroll.m_moving
        sroll.m_moving_init
        sroll.m_note_length      in sroll.m_seq.add_note()
        sroll.m_old.height
        sroll.m_old.width
        sroll.m_old.x
        sroll.m_old.y
        sroll.m_painting
        sroll.m_paste
        sroll.m_scroll_offset_x
        sroll.m_scroll_offset_y
        sroll.m_selected.height
        sroll.m_selected.width
        sroll.m_selected.x
        sroll.m_selected.y
        sroll.m_selecting
        sroll.m_seq

Seqroll:

    m_seq24_interaction and m_fruity_interaction are both created, and
    only one is used, depending on the "rc" interaction-method option.

# vim: sw=4 ts=4 wm=8 et ft=sh
