TO DO for Seq66 0.93.0 (Sequencer64 refactored for C++14 and Qt)
Chris Ahlstrom
2019-04-13 to 2021-04-23

From: zigmhount <notifications@github.com>
Subject: [Question/Feature request] Live midi pattern recording (#188)

    I have followed closely the development of the midi control output to
    use with my Akai APC Mini - awesome. The only think I miss now is to
    easily record a midi pattern in an empty slot without too much
    fiddling with the mouse or keyboard, as in a live setup.

    My ideal feature would be e.g.

    1. when an empty pattern is selected (on the control surface)
    2. to automatically open the pattern editor
    3. automatically activate Dump Data to MIDI Bus
    4. automatically activate Midi pass-through
    5. automatically activate Record Midi data
    6. automatically set Merge to Expand the sequence to fit recording
    7. and manually select the midi output to the synth.

    How easy/difficult would it be to implement keyboard or midi shortcuts
    to these buttons (steps 2 to 6), or preset them for every new pattern
    editor?

    TODO:  See what have done with this one so far....

Loops:

    Remove the old-style Live grid completely and deprecate that option in
    the 'usr' file.

    Remove the old qseqeditframe and the use-new-seqedit option (now the
    default).

NSM:

    I add a new pattern, add a couple notes, then click File / Save to
    save the tune.  It DOES NOT save the tune, because at that point it
    does not have a name.  [I consider this to be a BUG, there should be a
    default file-name already in place, or a prompt for a filename.]

    I edit an in-session config to load the latest file, which is not part
    of the session.  Seq66 does not get to the UI when first starting the
    session.  It does do it the next time, loading the file.  The actual
    operation should be in import, I think.

Port-Mapping:

    No issues noted at present.

    Running qpseq66 on Linux:  "QSynth" is named "PortMidi"!

Main Window:

    No issues noted at present.

UI:

    The Event Pane also does not perform as documented.  Need to be able
    to edit in it similarly to the piano roll. It is not really practical to
    edit Note-Ons and Note-Offs in the event editor.  However, one can now
    delete linked notes with one command.

    See the mouse wheel scroll event requests for both the song and
    pattern editors.

Automation:

    Tap BPM key (F9) works now, but it should cause the Tap BPM button to
    show the tap count.

    Look into the "nativeVirtualKey" functionality to support
    locale-independent key processing.

From Testing:

    Make sure MIDI import does not import the SeqSpec sections of a Seq66
    MIDI file.

    When loading the recent files list: (1) eliminate files that no longer
    exist; (2) figure out how to display files that differ only in path.

    When zooming, try to keep the same viewport in view.  Got this working
    for horizontal seqroll and perfroll, but not for vertical (refactoring
    needed).

    Try to center vertically on notes in the viewport.  

    When muting/unmuting a pattern in the song editor, when focus changes
    the tracks are shown in the bright color.

    Time-zoom and seqroll zoom can get out of sync.  Workaround: move the
    scrollbar to beginning.

    Can we distinguish note-insertion from movement snap, to avoid the
    "L"-then-snap-then-move mamba?

    Tempo display needs to be worked on for the perfroll and qloopbuttons.

    In File / Save As, put the current name in for starters.

    Song Mode:  make Follow-progress the default.

    Merge Pattern?  Similar to Paste Pattern with no need to copy and no
    change in time.

    Consider the use of Win32 API timeBeginPeriod(1)/timeEndPeriod(1)
    before/after input_func()/output_func(). See seq32/src/perform.cpp.

    Consider a configurable metronome functionality.  In seqtime?

    Should we make mastermidibase::dump_midi_input() accept a reference
    instead of event copy?

Others to Consider:

    When filling the file line in the live grid with the MIDI filename (not
    from playlist), use the realpath() result.

    In main frame, try to highlight the start/stop/pause buttons
    appropriately.

    Should qskeymaps be moved to Seqtool?

    Should the old-style qsliveframe be removed?

    Remove the old-style qseqeditframe.
    
Backports to Sequencer64:

    qseqedit 800x480 feature if successful

EXTANT ISSUES:

    #1: JACK Metadata MIDINAM support.  LV2 MIDNAM has been around for a
    while. There has been discussion on #lad, and, now JACK 2 has metadata
    implemented, Carla has started offering that MIDNAM information as
    metadata on the midi-in port for a connecting sequencer to use.
    STATUS: Not yet started.

    #3: Open loop Pattern Editor window.
    On mouse wheel scroll event we expect the piano-roll and notes sheet to
    scroll vertically.
    STATUS: We had to disable mouse-wheel scrolling for this reason: In
    qseqkeys, we did not want the scroll wheel to accidentally scroll the
    piano keys vertically.  Same for qscrollmaster, qseqeditframe64, except
    that we note wheelEvent() is not called for some reason.  One way around
    this issue might be to some pass child scrolling up to the qscrollmaster
    class.

    #12: Note rendering problem.
    Having a long note, scrolling it out of vision and back again leads to a
    problem.  (Only the first snap division and last snap division of the note
    appears.  STATUS:  Weird, will do.

#16 Ableton Live transport support?
    Go to this issue in Github to see the thread.

#17 Connect midi devices by name
    Currently midi devices are mapped by bus number. This is a problem when
    devices are added and removed, which happens a lot for me. Why not storing
    and connecting midi devices by name instead?
    This could even be backwards-compatible: when the configuration file has a
    bus number, use that, if it is a string, connect by name.
    STATUS:  A "port-mapping" configuation in the 'rc' file is now supported.
    Mostly tested; works for patterns and for MIDI I/O control.

#18 Mute Group does not toggle
    Also I have noticed that when I activate a mute group I am not able to
    activate patters that do not belong to the activated mute group. It is normal?
    STATUS: I want to double-check this one.

#24 Release notes in release tag message?
    I would d like to add seq66 to https://libreav.org/updates
    Could I request that the release change notes are used in the release
    message? Then they could be syndicated via the releases.atom.
    Either using the release description box in the Create Release feature on
    GitHub (which can accept markdown) or with something like git tag -a v0.4
    -m "$(cat RELNOTES.md)" (which GH does not detect markdown from).
    Might it be possible to edit
    (https://github.com/ahlstromcj/seq66/releases) to pop the release
    notes in?

    It's just that it's time sensitive as GitHub has [malformed releases.atom
    feeds](https://github.com/isaacs/github/issues/1892) that only have an
    updated  date not a published date, so any change to the release details
    will change the date in the feed that is used by libreav.org.
    STATUS: Not sure this is worth doing. Do not know about "atom".

#29 Play patterns from different sets at the same time
    STATUS: Provisional support in 0.91.3.  One more feature to add soon.

#30 Managing pattern colors with a pallette
    STATUS: Basically complete, works.  May be a few more places to add
    configuration coloring.  Also added usage of Qt style-sheets.

#32 NSM: Save session
    save session, should be renamed to just 'save' I think. I should just save
    the application, not the total NSM session. I assume it just saves seq66,
    but then the naming is somewhat confusing.
    STATUS: Renamed "Save Session" back to "Save".

#33 NSM not working here
    STATUS:  Will start retesting soon.  I believe I found some nasty bugs in
    0.91.2 that I have already fixed, but 0.91.3 is not quite ready yet.

#34 seq66 doesn't follow jack_transport tempo changes (and so also doesn't
    work with jack_link)
    STATUS:  Fixed.

#39 Arm Build - Pattern editor doesnt open
    STATUS:  Should be closed.

#40 NSM: seq66 in a new session should provide a blank project
    Currently it imports the previously used MIDI file.

#41 NSM: hide seq66 on closing window, don't exit?
    If closing the window, rather than quitting the app, could change the its
    visibility state to hidden.

#42 MIDI Input window doesn't handle large port count
    STATUS:  Added scroll bars "as needed".

#44 "Record live sequence changes" functionality
    Currently the "record live sequence changes" only adds patterns into the
    song timeline as whole loops, starting at the last pattern loop and ending
    at the next, and ignoring queueing completely (queueing a pattern just
    adds it to the song immediately). It seems to me that a live-oriented
    sequencer like Seq66 should have the ability to record a live performance
    as accurately as possible, so that a user can simply hit the record enable
    and do their live performance, knowing that can then go back and replay it
    exactly (if they want to do a recording session for example, or perform
    the same track while focussing entirely on knob tweaking etc.) The song
    timeline already supports arbitrary start/end points for pattern "chunks",
    so it seems like this should already be possible. Thoughts?

PATTERNS:

    -   Support a non-channel pattern (e.g. to contain patch info).
    -   Set pattern editor focus to grid at start unless it is a new one.
    -   Make it center on notes if not visible.
    -   Still some weird note events in 2rock, above measure 20, when scrolling
        via the scrollbar; okay when clicking the scrollbar. Fine when scrolling
        during playback.
    -   Make sure Esc/Space work in pattern editor.  Consider adding the
        start/stop buttons.
    -   When loading 2rock pattern 10(1) into the editor, adjust the length
        dropdown to match!

Tons of TO DOs in performer!

    Do:

        -   After importing to a set, reload that set to make changes visible.

    Load a song with Song triggers; go to the song tab; select File/New. Note
    that the perfroll clears, but not the perfnames!  We need to derive all
    qperf GUIs from qperfbase.  Actually, they both clear, only if clicked on.

    When copying a large track and pasting into a smaller one, consider altering
    the length of the smaller track to match.

List of To-Do Items for the Refactoring.  An asterisk means it should also be
fixed in Seq64.

seq_portmidi/src/finddefault.c *:

    Eliminate find_default_device().  We do not want to use Java user preferences
    for configuration information.

seq_portmidi/src/pmwinmm.c *:
seq_portmidi/src/pmmacosxcm.c *:

    Figure out the proper client and port values for calls to pm_add_device().

seq_portmidi/src/mastermidibus.cpp *:

    Implement api_set_ppqn().
    Implement api_set_beats_per_minute().
    Declare and Implement api_flush().
    Declare and Implement api_start().
    Declare and Implement api_stop().
    Declare and Implement api_continue_from().
    Declare and Implement api_port_start().

seq_rtmidi/src/midi_alsa_info.cpp *:

    In api_get_midi_event(), implement support for:

        SND_SEQ_EVENT_PORT_START.
        SND_SEQ_EVENT_PORT_EXIT.
        SND_SEQ_EVENT_PORT_CHANGE (could be difficult).

Seq66qt5/seq66qt5.cpp *:

    Implement gui_palette_qt5::load_inverse_palette().

Seqtool/src/optionsfile.cpp (a low priority):

    parse():  Investigate and fix all the TO DOs.

seq_qt5/src/qlfoframe.cpp:

    on_focus_out_event():  Implement undo of calculations.

seq_qt5/src/qseqbase.cpp:

    set_scroll_y(): Use m_unit_height.

seq_qt5/src/qseqbase.cpp:

    mouseReleaseEvent():  Implement undirtying when undoing.

seq_qt5/src/qsliveframe.cpp:

    new_seq(): handle reenable/disable of the editor for each new sequence.
    cut_seq(): add the warning dialog.
    delete_seq(): add the warning dialog.

seq_qt5/src/qperfroll.cpp:

    Investigate the note at the top about passing values to constructors.
    paintEvent(): handle DRAW_TEMPO

libseq66/src/play/setmapper.cpp:
libseq66/src/play/screenset.cpp:

    Reconcile the two classes select_triggers_in_range() functions.

libseq66/src/play/performer.cpp:

    Implement solo, FF, rewind, and many more.  Investigate!!!

    Implement error handling in various places.

    put_settings(): Implement the to-do.

libseq66/src/midi/editable_event.cpp:

    set_status_from_string(): Implement the to-do functionality if practical.

libseq66/src/midi/wrkfile.cpp:

    Implement the to-dos.

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