TO DO for Seq66 0.99.16
Chris Ahlstrom
2019-04-13 to 2024-12-03

Hottest:

    -   Test all comboboxes.
    -   Test and retest all previous issues in #128
    -   The seqtime bar re seqroll vertical lines do not always
        match up.

From Testing:

    -   #128 Recording type for loop button not working. Fixed, some
        tweaks still needed:
        -   Click-drag notes in expand-recording stops at the end of
            the pattern instead of expanding. Is this an important use-case?
        -   One-shot recording during playback acts like overdub.
            Worth fixing?
        -   There seems to be a very slight chance of too-longth notes in
            a chord if quantization (1/16) is on. Needs a better keyboard
            player (not me) to test it.
        -   When auto-step recording in an existing pattern, the modify
            flag "*" is not shown in the title, thought the
            "Save/Discard/Cancel" prompt appears at exit.
    -   There are some Qt warnings emitted when working with notes in the
        pattern editor and the event editor.
    -   Setting the PPQN obscures the 32 PPQN entry in the combo box. Minor.
    -   Get the 16-in-busses.midi file configured and working.
    -   Finish getting Windows builds in MSYS2 to work.

Playlists:

    -   Consider adding a configurable play-list auto-advance delay value?
    -   Set all contrib/midi and data/midi MIDI files to use port 0?

Ongoing efforts:

    -   Verify setmapper/setmaster for odd set sizes.
    -   Why does velocity change in data pane not work when starting from the
        left in barrage.midi? The Kepler34 "relative change" feature. This
        feature is macroed out for now. Perhaps should make it a Ctrl-Click or
        something to start it in addition to "would select".
    -   Fix and test new record/quantize handling, and verify that
        MIDI automation of these displays in the pattern editor.
    -   Make sure metronome buttons etc. still work. Recorded measures
        not saved.
    -   Make sure meta events are never sent via MIDI. What we see is
        that is_ex_data() events are skipped. We now allow SysEx to be
        sent, but we need a test file for it. Can improve this slightly.
    -   Add "make install" support to qbuild.sh. In progress.
    -   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.
    -   Make it center on notes if not visible.
    -   Can we distinguish note-insertion from movement snap, to avoid the
        "L"-then-snap-then-move samba?
    -   #111 Time signature changes does not get saved on .midi file
    -   #112 Send midi-control-out message when New Pattern is created in GUI
    -   #115 Accessing Non-Registered Parameter Numbers (NRPNs) possible?

ISSUES:

#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?
    1. When recording live sequence changes in song mode, turning "snap" mode
    off makes the pattern block start exactly when you press the button on the
    Launchpad, like you expect, but the end point always extends out to the
    next multiple of the pattern length when you mute it again.
    2. With "snap" mode enabled, live sequence changes always snap to pattern
    length  regardless of the snap size setting in the drop-down box. The snap
    size does work when dragging and resizing pattern blocks in the timeline -
    except.
    3. ...off-by-one error in the snap size drop-down. 1/1 and 1/2 are both 1/1,
    1/3 is actually 1/2, 1/4 is actually 1/3 etc.  FIXED.
    STATUS: Partially fixed.  One can now trigger manually
    in the perfnames pane, but there are still issues to resolve.

#52 Community / discussion place?
    STATUS: Partly supported now by using github.io, but much more to be done.

#63 Option to rotate pattern numbers?
    STATUS: It works for the live grid.
    New issue: Verify that it works in other settings.

#66 Toggle MIDI Recording via CC message
    I think modes generally should be triggerable individually. Especially if
    there will be more to come in the future, it will get messy when you
    only have a single button for them.  I think that a next candidate would
    be for copy and clear mode.  In copy mode, the first grid button press
    would highlight a pattern and the second one would paste it to the
    appropriate slot.  On clear mode, the patterns could be emptied or removed
    via the grid buttons on the controller.

    We could end up with a lot of modes, perhaps more than keystrokes could
    support.  If a MIDI controller can emit specific D2 data programmably from
    0 to 127 (for Notes, D1 is the note number and D2 is the velocity; for
    Controllers, D1 is the CC number and D2 is the value), then we could
    consolidate modes in one command (and preserve the stepping through the
    modes as an alternative for less flexible controllers).

    Ideally there would be an automation control for cycling through the modes
    and one for each mode separately.  Then people could chose if they want to
    set up a control that cycles through the options or set up a control that
    instantly activates a specific mode.

    Can we leverage continuous controllers (CC) to support modifying synth
    parameters through input automation? See the new "macro" facility.

    STATUS: Partly fulfilled.

#68 MIDI controller initialization step
    STATUS: Closed, some follow-on suggestions:

    Actually I have been thinking about the mode transition logic and it would
    be nice to have support for temporary transition.
    Here is my original suggested flow

    1. Controller button pressed
    2. MIDI CC message with `on value` sent
    3. Seq66 reacts to the message and changes modes
    4. Controller button released
    5. MIDI CC message with `off value` sent
    6. Seq66 does nothing
    7. ...
    8. Same controller button pressed
    9. MIDI CC message with `on value` sent
    10. Seq66 reacts to the message and changes to neutral mode
    11. Controller button released
    12. MIDI CC message with `off value` sent
    13. Seq66 does nothing

    A temporary transition would be engaged by holding a button down on the
    MIDI controller and then releasing it later.  While the button is held
    down, Seq66 switches to the configured mode, the grid buttons can then be
    used to engage with the mode. When the button is released,Seq66 switches
    back to the previous mode and not to the neutral one.  This could be
    implemented via a timer that starts when a CC from a button press is
    released. If the button is released under a threshold amount of time then
    the mode is toggled permamently. If no `button released` CC message is
    received within a threshold amount of time then the transition becomes
    temporary and when the `button released` CC message is finally received
    then Seq66 switches back to the previous mode.

    The idea is that with a MIDI controller you could assign different
    functions to a single button.  It would also fit nicely with a Launchpad
    where apart from the grid buttons, there are "mode" buttons on the side.

#76 MIDI Tempo Sync & Real Time Messages Not Behaving As Expected When SEQ66 is a MIDI Slave
    STATUS: Some fix(es) made, needs more testing.

#95 Velocity screen does not fully refresh when scrolling left or right.
    STATUS: Still need to duplicate.

#97 Investigate/resolve differences from Seq24.
    Seq24: Input from a keyboard when not playing advances like one-shot
    mode, but does not stop when looped back as in Seq66.
    STATUS: Fixed.  More:
    -   Grid-Solo-Click currently acts like Alt-Left-Click.
    -   Shift-Left-Click opens the corresponding external live grid.
    -   Ctrl-Left-Click wants to create a new pattern.
    -   Right-Ctrl-Left-Click does NOT do a queue action.
    -   Holding Alt is supposed to save the current snapshot, and then
        restore it when lifted.
    -   Holding Ctrl-Alt is supposed to ... cannot tell from SEQ24 doc.

#100 Seq66's MIDI timing completely falls apart at JACK buffer sizer larger than 128.
    STATUS: Added a timestamp to each message in the JACK
    ringbuffer (enabled by a C macro in libseq66/include/seq_features.h).
    This addes a notable burden on process and we can get buffer overflow
    errors.  Even with message timestamps disabled, the b4uacuse-stress.midi
    file can cause failure, especially when the next set is chosen.
    At minimum we should stop, clear out JACK, and panic. We found that
    there seems to be no way (using methods culled from other apps such as
    Ardour) to completely eliminate hiccups in the synchronization of
    note input and playback, due to the unavoidable lag between putting the
    note in the ringbuffer and taking it out in the JACK process callback.

#102 How can I use mutes?
    After some additional experimentation I found out that Seq66 has these
    features too with Windows build. However I am not able to to mute patterns
    using computer keyboard no matter what I try to do. I discovered mute tab,
    but I don't understand what's going on here and I am pretty sure that
    plain muting (with queue functionality) is good enough for me.
    Muting using mouse works reasonably well.
    I am using Windows 7 if this helps with platform specific bugs.
    STATUS: It turns out that we needed a different key-map for Windows.

#103 One-shot (repetitions != 0) patterns do not play
    This feature works, but requires the pattern to be armed before
    playback begins, either in Live or Song mode.  Should we make the loop
    auto-arm, or make this an option somehow? No.   
    STATUS: Closed.

#104 Really confusing usage
    This requires some improvements to the LaTeX documentation and the HTML
    tutorial.  One issue is Pipewire, which is unsupported; the user system
    employs pulseaudio-pw. Pushed off to version 2.
    STATUS: Closed.

#107 Can't increase clip length while transport is running
    Somehow disabled this feature on 2022-08-20, with no note why.

    Tried recording using "Expand", and it failed in a spectacular way.  Lets
    say I have Jack transport running for a while, so that the transport
    indicator says 096:X:xxx. (Had it running up to 800 or so and the same
    happens:

    When arming a pattern for recording using "Expand", the pattern becomes as
    long as the number (96 bars in this case) where I press down the keys on my
    keyboard.  It then loops being 96 bars, until I press down a couple other
    keys, where it again expands to whatever the transport indicates at that
    point (for example 142:X:xxx).

    When no more keys are being pressed, the pattern becomes 142 bars long,
    until I press some more keys.  And it seems to repeat like that until I
    press the Stop button, when it starts over on 001:X:xxx. The pattern length
    remains the same though.

    STATUS: Closed by the reporter. Undid the change and commented on it.
            Need to investigate the second part.

#110 Windows build download

    STATUS: works for 64-bit builds, but 32-bit builds work only in
            QtCreator, and too many things to do to build 32-bit on a 64-bit
            machine. A ton of refactoring and fixes for the damn MIDI Mapper.

#111 Time signature changes does not get saved on .midi file
     
    STATUS: In progress.
        -   Ctrl-Z in pattern editor works, but does not restore original
            view until pattern is reopened. Not sure why, it should work.
        -   Verify measure-count changes upon time-sig. In timesigs.midi,
            adding a time-sig 8/16 at 4:1 yields one at 10:1 !!!
        -   We could update the song editor to redraw sequences that
            have time signatures; more for appearances, really.
        -   Can we have time-signature changes shown during playback by
            modifying the combo boxes text?

#112 Send midi-control-out message when New Pattern is created in GUI

    When creating a new pattern with right click -> New pattern, the new
    pattern does not show up on my control surface upon creation. The new
    pattern is outlined in red.  The control surface does not show the newly
    created pattern until I press the button for the pattern itself (or
    arm/queue it by pressing w on the keyboard). Seq66 then sends Arm or Queue
    midi signals to the control surface, depending on if the keep-queue
    function is set (Q in the interface).

    STATUS: Added an announce_sequence() call to performer::new_sequence().
            Will test.

#114 [feature request] Include keyboard shortcut in setToolTip function?

    STATUS: Finished with this one. Also fixing some automation
            errors found during this task.

#115 Accessing Non-Registered Parameter Numbers (NRPNs) possible?

    STATUS: It works for this user. As a side issue, he would like to
            be able to set data values more easily (e.g. exact number)
            than by dragging the data line.

            Also found a bug: Open brecluse.mid and then pattern #1.
            Then attempt to modify the velocity in the data pane.
            We find that many of the events were not drawn in the
            data pane when the roll was moved by the arrow keys!
            Clicking in the event pane forces redrawing.
            Using the horizontal scrollbar refreshes properly.
            Added some tricky code [flag_dirty()], as already done
            in qstriggereditor.

#116 What happened to the "MIDI Ctrl Out (Display) Bus" setting?

    STATUS: Cannot duplicate.

#118 When enabling virtual ports, make those new ports enabled by default?
    Currently one has to tick the box to enable and enter the number of output
    and input ports, restart seq66, and then tick all the input port
    checkboxes in the list then restart seq66 again.

    STATUS: Done, not yet official.

#119 Quantized Record Active does not work
    Having this button active has no effect; tried changing snap size to
    different settings...  Post processing quantize works as expected (i,e,
    Ctrl-A then q)

    STATUS: Fixed.

#128 Recording type for loop button not working
    The button on the main page for recording styles Overdub, Overwrite,
    Expand and One Shot does not change the property of the pattern. The drop
    down menu in the pattern window works fine, although Overdub is called
    Merge here, which is not ideal.

    So, it is not quite as I thought. I tested it using step input and it is a
    bit hit and miss whether it turns off the record arm at the end of the
    loop. Mostly miss and it just overdubs. It also sometimes turns the record
    arm off instantly.

    This may or may not be related to a separate problem(s) I have found with
    step input where it does not loop properly on any mode. Step input seems
    to read the loop as one more step than it actually is. So on overdub the
    extra step will appear at the beginning of the loop and the subsequent
    loops second step will appear over the a step behind. On overwrite, it
    will not overwrite till the second step of the loop and again the step
    will one behind. Expand overdubs rather than expands on step input.

    Update: Been testing the WIP branch. I am getting an issue with the expand
    when recording live midi into it. When it gets to the ninth bar, it wipes
    all the midi recorded before it except the first bar.  The same then
    happens at bars,16, 17 and 24. Always all bars before except the first. I
    did not go longer than that but you get the idea. With step entry,  there
    is a pop up which warns that events will be dropped when you reach those
    bars.  Separately, The looping with step entry is better now.

    STATUS: All issues seem to be fixed, but need to be retested.

#129 Quantized Record Button problem 
    There is a button in the pattern window to turn on Quantized Record.  If
    the Record Active button to the left of it is set to on then this button
    does not  work. If the Record Active button is off then the Quantized
    Record button turns on both buttons without issue.

    STATUS: Fixed.

#131 NSM seems to get an announce from two processes
    It looks like it announces with two processes to the NSM daemon or
    something. 

    STATUS: Fixed in the "wip" branch, will be merged at the next release.

To close as pushed off to version 2:

     1 JACK Metadata MIDINAM support
    46 JACK port groups and order.
    62 PipeWire compatibility
    68 MIDI controller initialization step
    77 For building without JACK
    82 Tabs do not scale to window
    90 More consistent support for undo / redo / unmodify.
    96 MIDI Learn/Wizard as separate (?) app

MIDI version 2 considerations::

ALSA:
    -   When toggling a virtual input port, another port with the same
        number gets created.  Looks like this bug has been around for awhile.
        It also yields an ALSA unsubscribe error when disabling an input.
    -   Use const char * snd_asoundlib_version () to get the ALSA version.
JACK:
    -   Pulseaudio gone, so now the USB devices (without a2jmidid running)
        show up as "0:n system:midi_playback_n+1 'Device name'" (similar
        for 'playback') and qsynth as "1:4 qsynth:midi_00". True even if
        short port-naming.

Version 2 features:

    -   #100 Seq66's MIDI timing completely falls apart at JACK buffer sizes
        larger than 128. Added a timestamp to each message in the JACK, more to
        refactor
    -   Round-robin support for MIDI input.
    -   Use Meson/Ninja as the build system.
    -   Support for multiple languages in user-messages.
    -   Allow for building without JACK dev files installed.  Weak JACK
        support.  Seq66 dependence on the JACK ringbuffer is an issue here.
    -   Port refresh in ALSA and JACK at a minimum.
    -   #46 JACK port groups and order.
    -   Add option to start JACK if not running.
    -   #96 MIDI learn (and wizard) for creating controller maps. Separate app?
    -   Pipewire support.
    -   Live note mapping?
    -   Abletone Link support?
    -   Support for audio-clip patterns?
    -   Add keyboard configuration to MIDI Learn/Wizard.
    -   Move the Events, Playlist, Sets, and Mutes to a separate window
        (the Preferences editor?).
    -   Make main menu hide-able.
    -   Allow multiple instances of seq66.
    -   Allow multiple tunes to be loaded in seq66.
    -   #90 More consistent support for undo / redo / unmodify.
    -   Add console output for every user action.
    -   Add scripting language?
    -   Clean up kruft in setmapper/screenset.
    -   Support more than one tune?
    -   A way to lay out a pattern from one track into another tracks
        playback, to re-use the pattern on a differnt buss and channel.
    -   Support manual reconnecting, including of the control/display busses.
    -   Implement solo, FF, rewind, etc.
    -   Use std::numeric_limits instead of macros.
    -   LV2 MIDINAM support.
    -   Live note-mapping.
    -   Pattern Options (would be a new tab):
        -   New-pattern editor options (check-boxes)
        -   BPM display minimum and maximum
    -   Windows build and installer. 32-bit installer cannot work!
    -   Drag and drop MIDI files onto seq66 (see sequencer64 issue #137)
    -   Perfect the "background recording" feature.

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