TO DO for Seq66 0.99.18
Chris Ahlstrom
2019-04-13 to 2025-02-03

Backlog:

    -   Add a light version of glob(3) to use with Windows.
    -   Event editor:
        -   Can we add, perhaps a tooltip or dropdown to select the desired
            Control value (e.g. 7 for volume)?
        -   Weird error cropped up; a Qt update issue? When clicking in
            the event-editors event table, a message like this appears:
            "qt.accessibility.core: Cannot create accessible child interface
            for object:  QTableWidget(0x55eaaaf6b880, name =
            'eventTableWidget')  index:  8".  This does not happen in
            the table-widgets in other tabs. Nor does it happen on another
            computer.
    -   Get the 16-in-busses.midi file configured and working.
    -   Figure out issue #132, the libasound2 issue.
    -   QObject::setParent: Cannot set parent, new parent is in a different
        thread; this happens in sequence::modify(true) when recording with
        a pattern editor open.
    -   #115 Accessing Non-Registered Parameter Numbers (NRPNs) possible?
    -   Recording.
        -   One-shot recording during playback now works.  But one-shot reset
            then makes it act like overdub thereafter (because note-count == 1
            is the flag).
        -   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.
        -   Test overwrite etc. in the scenario where a recording mode can
            cause incomplete notes if one holds the note and releases it in
            the next iteration, leaving a partially-drawn note behind.
        -   When auto-step recording in an existing pattern, the modify
            flag "*" is not shown in the title, though the
            "Save/Discard/Cancel" prompt appears at exit. It works if
            playback running during recording.
    -   Consider adding time-bg/fg-color to the palette file, using
        the 'usr' version otherwise.
    -   Finish getting Windows builds in MSYS2 to work. Low priority.

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".
    -   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?

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?

#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.

#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.

#133 Pattern Length Change Issues

    In the pattern edit window, the reset pattern to 1 button no longer works
    properly. It either shrinks to some bar other than 1 or just does nothing
    at all.  FIXED. It will prompt for truncating notes.

    There is also a behaviour when you manually select or type the number of
    bars and it is smaller than the amount of already existing bars with notes
    in, the notes get deleted after a warning dialog.  This does not work when
    the Expand mode is selected.

	Steps to reproduce:

	1: Create two (or more) bars with notes in, with Expand mode selected.
	2: Shrink to one bar

	These have appeared since https://github.com/ahlstromcj/seq66/issues/128 so
	possibly connected. PARTLY FIXED. After even a selection of 1, must Enter
    or Tab out. Not sure why, as editing-finish slots have been added to
    the pattern editor.

    A third issue which occurred before was with manually editing the
    amount of bars with double digits. The bars refresh for each digit entered.
    For example So if you have 16 bars and you want to shrink to 14 bars, it
    will first shrink it to 1 bar as you type over. If the bars are full then
    the dialog will pop up about losing notes. If you then click ok, instead of
    cancel, you will lose anything in the latter 15 bars. FIXED.

    Make sure that canceling a measure change resets the combo-box to the
    previous value. FIXED.

    There might still be issues when making multiple time-signature changes.

#135 Dark theme tweak issues

    These are problems found when the "Tweak color for Dark theme" check box
    is marked.

    1.  Reset Pattern length to 1 button does not have inverted equivalent.
        FIXED.
    2.  The dotted lines are over the bar number (this is regardless of dark
        theme but more noticeable) making it not clear to read.
    3.  The beat lines are set to white and you cannot override this in the
        palette file. This makes them near invisible by default because the
        default background is white. When not in dark mode, the beat line
        also colours the bar lines (they probably should not?) but this
        does not happen in dark mode.

    4.  More color issues:

        a.  Why are grid slot colors are different in the Song editor?
        b.  Tweak the incrypt-66 palette so the four-lines are white.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

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.
    -   MIDI 2.0 support?
    -   Live note-mapping.
    -   Windows build and installer. 32-bit installer cannot work!
    -   Perfect the "background recording" feature.

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