L2Ork Tweeter by Ivica Ico Bukvic <ico@bukvic.net>
ico.bukvic.net
l2ork.bukvic.net

Released under the GPL v3 License
https://www.gnu.org/licenses/gpl-3.0.en.html



CHANGELOG (Date Format: DD-MM-YYYY)
-----------------------------------
27-10-2025 0.87
*Implemented ability for online users to take control of multiple parts. Reworked most of the networking core, primarily focusing on myclientnum, to accommodate this change. Implemented Part-Mapper.pd widget responsible for mapping parts to users.
*myclientnum fixes across L2Ork Tweeter (approx. 10)
*clean-up r myclientnum for preset/loop operations (only use first arg to start)
  *filter-my-parts
  *load-save-session
  *local-copy-logic
  *track-redraw
  *update Sync-Controls.pd to apply to all currently activated parts that have keyboard enabled (see the1 guts subpatch).
*Save session without name should open a file browser
*Part mapper auto-refreshes upon opening and upon connection.
*Increased delay from 250 to 500ms between disconnection and reconnection. Also, added a 100ms delay for disconnection after sending the disconnect message to the server.
*Implement support for presets per part, so that multiple presets and loops can be saved and recalled.
  *Added MULTI option that uses glob-multi-lp send that enables this option.
  *Added loading to multiple parts when MULTI is off (only loading, since saving would be confused by what part to pick to save if multiple parts have keyboard enabled--this is because the original approach is to save only one file).
*Fixed bug where copying from secondary part enables primary part playback (only when the keyboard is enabled).
*Immediately remove intentionally disconnected user from the server's ping mechanism (may need to revisit later to further improve upon this, namely by increasing the delay between disconnect and reconnect--see above).
*Made observer -1 instead of 15 (to allow for easier future scaling beyond 14 performers).
*Fixed bugs when connecting as a guest:
  *error: 0-override-solo: no such object.
  *error: 0-manual-toggle-tracker: no such object.
*Removed L2Orkmote support since we are not using those interfaces anymore. See version 0.86 for the last included version of those.

*TODO:
  *Sometimes reconnecting keeps the playback going? Looks like this may be a side-effect of quick disconnect and reconnect. Needs to be further tested.
    *Also affects Teacher widget.
  *Explore the slowness of the Teacher widget, particularly in respect to the array changes. This is particularly visible on the WebPdL2Ork, likely due to context sharing. More importantly, this is an issue on hte desktop, where it should be addressed first before exploring any additional issues associated with the WebPdL2Ork.

28-04-2025 0.86
*Increased number of players to 14 and changed zoom level to make everything fit.
*Fixed server bug where joining with part 15 (audience) doesn't get the data from other parts, but joining using any other part does (assuming you connect to a part that is already taken which then automatically bumps you to the audience).
*Improved handshake logic to ensure that WebPdL2Ork version works even when dealing with long delays in opening HTML sockets (contributed by William Furgerson).
*Improved logic of saving and distributing sessions through the Teacher widget.

12-11-2024 0.85
*Updated array size syntax based on the updated expr object.
*Added Interstellar piece with its parts and score.

09-10-2024 0.84
*Fixed a bug where saving a session to online clients via the teacher interface misreported a number of lines saved.
*Fixed a bug where loading sessions does not erase old notes from the track (the problem were text files edited in notepad that automatically replace non-standard characters with spaces).
*Implemented a workaround where every time a loop is loaded or before it is written, we erase a potential extra note (beat 64). LATER: consider exploring why this happened in the first place (potentially a leftover during the optimization of the tracker logic).
*Implemented the newfound interactive option for the dropdown object.

30-09-2024 0.83
*A major overhaul of the synchronization engine, bunch of bug fixes and optimizations, and smaller additions/improvements, including re-syncing of the works folder. Software updates include:
  *reset all, session-sync, sync-controls, and click-to-sync controls now all ensure perfect sync across all the clients
  *Introduced optimization for populating notes (text) on the track
  *Reworked all net-io abstractions to simplify the patch and utilize interactive option
  *Fixed tracker and time offset abstraction
  *Fixed bug where after session loading auto-sync does not work
  *Updated copyright message
  *Implemented better session report that copies from one client, rather than polling all clients
  *Fixed hiccup when a new client connects and ensured that everyone remains in sync due to disconnect or reconnect
  *Optimized server-side session state pull by only pulling from the oldest connected client
  *Refined tracker positioning and accuracy of placing new notes in hover mode

01-04-2024 0.82
*Updated L2Orkmote functionality to:
  *Include tempo changes (see the documentation of the L2Orkmote-Interface.pd).
  *Moved dry level adjustment to mode 6 (to allow room for tempo changes).
  *Fixed bug where overdrive level from the previous release did not get updated correctly to reflect new control approach.

26-03-2024 0.81
*Fixed a long-standing bug where session saving missed some of the data (upped the number of data points from 1884 to waiting for the 1st part's reverb type output, which appears to be the safest way to identify the end of the stream). TODO: why is the output size varied under certain circumstances (so far we've seen 1884, 1918, and 1922).
*Separated audio files from patches for Transcontinental Grapevine and 8-bit Petal to save space.
*Updated Transcontinental Grapevine work, including fixing folder names and file organization.
*Added Territorio Prismatico and 8-bit Petal works.
*Added missing L2Orkmote abstraction.
*Fixed L2Orkmote bugs and refined control mapping.
  *Made middle dead (default) space of the left hand joystick area a commit command when activating different presets and loops. Letting go of the buttons 2 and 3 that control modification of presets and loops now does nothing.
  *Clearing of the loop (backspace) is now possible by the left hand jolt without any buttons pressed.
  *Switched the order on the left hand buttons in mode 1 to prioritize loop and preset changing (1 stays the same, 3 and 4 become 2 and 3, while 4 now serves as a continual change of presets and loops without requiring for the joystick to be re-centered on every commit).
  *Ensured that user is able to change both loop and instrument at the same time (holding 2 and 3 together).
  *Instead of holding 2 on the left hand in mode 1 to adjust the overdrive level, the new configuration now uses hand pitch in combination with joystick off-center dislocation without any buttons pressed.
  *Fixed a bug where transposing down (button 2 on the right hand) also erroneously repositioned the timebar location.
  *Documentation updates.

29-11-2023 0.80
*Fixed regression where solo did not work in offline mode. Now, when user clicks on another part to enable solo, they also automatically switch to that part being their primary. For group soloing users will want to use future event automation.
*Set the stage for future automation by introducing offline-messages receive in network-io subpatch.
*Fixed imperfect sync issues when one user tries to sync with another using one of the mouse multiclick options that are invoked by clicking on the instrument/part number the user wishes to sync with.
*Del is by default also moving pattern?
  No. Just when the shift is held and focus lost is when things break down.
  Consider resetting keyboard modifiers on refocus? No. This was a bug fixed on 2023-11-29 that pertained to exclusive focus of gatoms, where shift release was not received by pd because it was only passed onto the gatom with exclusive focus.

16-11-2023 0.79
*Fixed bug where Sync-Controls did not allow for decimal tempo value.
*Fixed bug where L2OrkTweet was failing to update overdrive and instrument name.

09-11-2023 0.78
*Introduced Sync-Controls supporting widget. Users can now use F1-F10 to recall those via keyboard (the keyboard control needs to be toggled). This object currently requires a server operation as offline mode can be easily synced using multiclick option. The patch is available as part of the widgets subpatch.
*Reworked how sync is taking place across clients.
*Bug-fixes pertaining to sync.
*Optimized report sharing that now bypasses retriggering everything locally.
*Made numeric options have exclusive focus.
*Made more than 4 clicks still count as 4 clicks.
*Reworked how inputs are disabled. Now we use interactive option available in pd-l2ork that prevents tampering with other user's parts, as doing so could potentially nudge parts out-of-sync, as well as cause a cascading array of challenges.
*Consolidated L2OrkTweet and L2OrkTweetDISIS into one patch for easier maintenance.
*Reworked offline mode to allow for concurrent use of multiple parts.
*Code clean-up.

30-10-2023 0.77
*Expanded loop length box width to allow room for decimal values.
*Updated netserver and netclient default buffer size from 32768 to 131072 (128KB).
*Added coloring of the session panel when receiving remote request to save session (green for success and orange for receiving an incorrect number of lines).

19-10-2023 0.76
*Reworked session saving logic and corrected the insert bugfix to ensure error-free operation.

18-10-2023 0.75
*Fixed long-standing bug of session files not being properly saved.
*Fixed long-standing bug with the tracker insert command that propagated differently on other clients.

09-08-2023 0.74
*Version bump due to incremental changes that did not include version change, to prevent confusion with 0.73.
*Inclusion of the Transcontinental Grapevine Score and Parts.

13-04-2023 0.73
*Added Loop-Preset-Widget.pd widget for easier access to more loops and presets than the keyboard allows.
*Added widgets subpatch to main Tweeter window where most common conductor and performer widgets can be easily accessed.
*Cleaned-up top-right corner of the main Tweeter window.
*Overhauled ediable option. Now can toggle patch editability with Shift+Ctrl+Alt (with Alt being the last key to be pressed).
*Introduced glob-recall-preset, glob-save-preset, glob-recall-loop, and glob-recall-preset, used by the aforesaid Loop-Preset-Widget.pd.

12-04-2023 0.72
*Fixed a session saving bug and other refinements to Transcontinental Grapevine.

18-12-2022 0.71
*Fixed regression due to a bug fix in the disis/patch_name.pd abstraction.

30-11-2022 0.70
*Implemented editable option to prevent accidental edit mode.
*Refinements to the Grapevine patches.

28-11-2022 0.69
*Added Transatlantic Grapevine (WIP) with supporting patches.
*Added l2ork-custom server command for customizing various aspects of the Tweeter.
*Enabled automation on the main output multiplier slider (found in the top-right corner).
*Added new Transatlantic Grapevine sessions.
*Documentation fix to the Conductor-Commands.pd.
*Code clean-up.

09-11-2022 0.68
*Fixed bugs in the L2Orkmote-Interface.pd, L2OrkTweet-L2Orkmote.pd, and L2Orkmote-Tweeter.pd:
  *Loop number updates on the main window when the user is using joystick
  *Preset number updates on the main window when the user is using joystick
  *Fixed clearing of the loop not working when the joystick is centered.
  *Added dynamic ability to cycle between loops and presets by holding LH button 2.
  *Fixed a bug where preset selection button erroneously also loaded the last loop selection.
  *Transposition now works (both octaves via buttons and the fine adjustment using joystick).
  *Made joystick-based transposition microtonal.
  *Fixed a bug where dry out did not adjust using the joystick (in the appropriate mode).

18-10-2022 0.67
*Fixed double delete bug when networked.
*Added Harmonicity and Mod Amp auto-update when using arrows up and down to change values.
*Improved wording on the description of various multi-click sync options.
*Added 6 instrument presets to L2Ork Tweeter. 

07-09-2022 0.66
*Introduced initial implementation of the L2Orkmote L2Ork Tweeter interface.

07-12-2021 0.65
*Fixed a bug where a user who connects after all the slots have been taken is immediately made into a guest but whose id is erroneously set to -1, resulting in user's inability to receive select server messages.
*Fixed a server bug dealing with the sequence of disconnecting clients, simplifying the flow.
*Updated documentation in the server patch.
*Updated 4th Beat score.

02-12-2021 0.64
*Fixed server bug where l2ork-sync-* messages did not get passed to the guest users.
*Updated Tweeter 4th Beat's conductor shortcuts patch.
*Cleaned up L2OrkTweet.pd abstraction to minimize redundant maintenance of the version it is associated with.

01-12-2021 0.63
*Fixed a bug where inst-level-all-at and inst-level-at server messages did not work under certain circumstances.
*Added a l2ork-inst-level-list-at message that allows for levels for each instrument individually provided as a list.
*Updated Conductor-Commands.pd patch, documenting the new command.
*Updated the conductor-shortcuts.pd patch for the "4th beat" composition.
*Added supporting files for the "4th beat" composition.
*Refactored "Into the Abyss" to match the new formatting for the purpose of future automatic retrieval.
*Bug fixes reenabling Tweeter's chat admin messages and fixing the l2ork-free-slot server command.

19-11-2021 0.62
*Initialized load preset value to 11 to avoid having to cycle by default through empty presets.
*Refactored admin commands to make them easier to edit and expand. Re-tested each of the admin messages and addressed bugs for obfuscation, loading/saving error messages, proper socket detection for the password change, filtering of messages that get printed out, and disabling of ping timeout for a user who got bumped to an audience/guest status via server command.
*Improved handling of title-less sessions and announcing of user session loading when online.
*Refactored select init calls to make them easier to locate inside the L2Ork-Tweeter.pd patch.
*Added brute force disconnection when disconnection occurs to address the issue of potential stale sockets.
*Added l2ork-inst-level-at l2ork-inst-level-all-at admin commands to the Server and Tweeter client. Expanded the L2OrkTweet to accommodate new functionality.
*Updated Conductor-Commands documentation, adding new server commands.
*Added loadbang to (re)send main out levels to every instantiated L2OrkTweet.pd abstraction to prevent no volume issue.
*Reworked the overdrive-override logic to prevent some of the buggy behavior between the keyboard shortcuts and the levels sent by the server.

13-11-2021 0.61
*Expanded documentation for the Conductor-Commands patch.
*Further refinement of the "4th beat" work sessions, conductor-shortcuts patch, and presets.
*Minor bug-fixes to the L2OrkTweet and the L2Ork-Tweeter-Server.

06-11-2021 0.60
*Added l2ork-conduct server message (synonymous with l2ork-teach). This now enables conductor patches to affect every aspect of every instrument remotely and synchronously.
*Enabled session sync offset to ensure that a saved session can be (re)synced at any given point in time.
*Disabled sending data to the server from the Teacher widget when using user 0 (which is treated as disabled mode).
*Reorganized patch locations. Server-Commands-Example was renamed to Conductor-Commands and moved in the admin subfolder. "Into the Abyss" work presets, loops, and score have been moved into a newly created works subfolder. This has also freed-up the creation of new presets past the preset 110.
*Added documentation on conductor control variables and added overdrive-override that can override user level toggle (e.g. using ' or return keys).

05-11-2021 0.59
*Reworked local copy logic, replacing original 6 options with 8, with 4 and 8 (quadruple click and shift+quadruple click) being identical (copy everything). The new addition is syncing the tracker position and loop-length only (loop-all variables). Also, made the basic/common elements require fewer clicks. See the supplemental documentation subpatcher in the top-right corner for additional info.
*Added local main out level control, located in the right corner of the top bar.
*Added sessions for the "4th Beat" work-in-progress.
*Small bug-fix ensuring that the session sync does not trigger a benign error report in the console.

03-11-2021 0.58
*Made all session loading and sync requests (invoked from the Teacher widget) server secure, requiring a server password.
*Fixed a bug that prevented proper syncing when copying another client's loop with sync (shift+doubleclick or shift+tripleclick).
*Implemented filtering of the session sync request server-side to allow messages to pass only for clients that are currently connected.
*Optimized the way Teaching widget deals with session sync requests by relying on its own iteration of the coll object and ensuring that the session is not redundantly reloaded if the user is looking to sync to the same session. This implementation allows for the user to load one session to all clients and then use sync from another session. This has proved useful when working collaboratively developing a piece and saving sections as distinct sessions. In the process of developing new ideas, it is possible that clients intentionally move away from an earlier session's sync. This way the new material can be preserved (assuming it is not sync-sensitive), while reverting to an earlier session's sync.
*Cosmetic fixes to the Dante main out controls.
*Added a couple new work-in-progress sessions and two new presets.

01-11-2021 0.57
*Reworked the local time-synced copying of another client, ensuring that syncing to another client (whether requested locally or remotely) is accurate.

28-10-2021 0.56
*Fixed a bug pertaining to session saving and the session being polluted by superfluous tracker information.
*Made session saving deterministic.
*Added a new snare drum preset, accompanying loop, and a session.
*Expanded server commands example.

27-10-2021 0.55
*Implemented synced session saving where master client sends its literal session to others, to offset for any potential latency-induced inconsistencies.
*Added ability for the Teacher widget to (re)sync based on the last loaded session.
*Bunch of small Teacher widget bug-fixes.
*Fixed obscure bug in the tracker-time logic that prevented perfect sync from happening while online.
*Refactored the session sync all highlighting logic, so that it appropriately shows up on all clients.
*Added L2OrkTweet abstraction designed for use in DISIS (L2OrkTweetDISIS.pd found in the core folder).
*Included DISIS Dante mixer widget (DISIS-Dante-Out-Controls.pd found in the admin folder) since the DISIS Dante system does not have an easy way of adjusting levels.

23-10-2021 0.54
*Added ability to request your client number to enable greater flexibility in supporting widgets, such as the Teacher widget.
*Further improvements to the Teacher widget, including fixing the double output by the user monitored through the teacher widget and other out-of-sync issues, refining the session load and adding the save option, preloading delay and other values, toggling the metro off after it has been on when transitioning to a user that does not have tracker on, and visually acknowledging that you cannot control your own part through the teacher widget.
*Further improvements to the audio level toggles, so that they are not affected by the remote session loading.

20-10-2021 0.53
*Fixed a bug that occurred during changing the instrument while having the levels manually disabled (feature introduced in 0.51) and which resulted in the newly loaded instrument still sounding out.

18-10-2021 0.52
*Update sessions that don't have parts 11 and 12.
*Improved server-invoked load session to also include sync. Expanded server command vocabulary accordingly, adding l2ork-load-sync-delay.
*Made insert/reset/clear non-interactive (delete is manually handled using legacy code inside net-io).
*L2OrkTweet version bump.
*Updated Teacher widget to allow for convenient loading of sessions and sync-all.

16-10-2021 0.51
*Added ability to disable changes to the instrument level/overdrive when changing instruments by holding the Return/Enter key. Upon releasing the Return/Enter key, the level will revert to the one associated with the new instrument.
*Included username in saving the session.
*Created a "teacher" patch that adds ability for the instructor to alter others' settings.
*Cleaned up sessions.

11-10-2021 0.50
*Requires 20211011 build of pd-l2ork or newer.
*Fixed bug where shift+delete deleted twice.
*Added hover mode ability to add notes based on the mouse (as opposed to the time bar) position. Made erasing using delete and shift+delete to support the hover mode. Also made insert (shift+` or ~) to support the hover mode.
*Updated and optimized the left panel to make room for the hover mode option.
*Updated server to also support the hover mode.
*Swapped tab and alt key functions to make play button easier to access.
*Cleaned up and optimized L2OrkTweet.pd abstraction.
*Improved version printout for both client and server.
*Made sure that the timebar is only accessible on your own track, or on all tracks in offline mode.
*Other small bug-fixes.
*Added additional template session and 2 more presets.

01-10-2021 0.46
*Fixed inaccurate positioning of notes when manually adjusting the tracker bar location.
*Added ability to provide name for your client and enabled server handling of the same.
*Added ability for the user to copy another user's instrument preset, loop, as well as sync and all other data. See the supplemental documentation subpatch for more info.

24-09-2021 0.45
*Reversed use of ' and return keys for adjusting audio levels to minimize unwanted muting of the instrument when typing (and forgetting to disable the keyboard).
*Added more presets (new total is 90) and one new session.

10-09-2021 0.44
*Requires 20210910 build of pd-l2ork or newer.
*Reworked synth pitch transposition to allow for keyboard-based detuning without retriggering a note.

07-09-2021 0.43
*Increased maximum number of players to 12.
*Added a few more presets.

18-04-2021 0.42
*Updated patch to support new pd-l2ork 2.16 features.

19-11-2020 0.41
*Changed and improved the overdrive level keyboard shortcuts (see the documentation widget for more info).
*Added panning keyboard shortcuts and changed the loop length keyboard shortcuts to leave room for the panning shortcuts. 
*Other small cosmetic fixes.

11-11-2020 0.4
*Requires Pd-L2Ork 2.15.2 or newer.
*Based on the new preset_hub and preset_node mechanisms that allow for easier editing of the original L2OrkTweet patch.
*Improved overdrive instrument audio level slider to allow turning off the sound output with supporting keyboard shortcuts.
*Added supplemental documentation with additional keyboard shortcuts located in the top right corner of the window.
*Now includes 72 instrument presets and dozens of loops.
*Bunch of small bug fixes and cosmetic tweaks.

22-09-2020 0.36
*Requires Pd-L2Ork 2.15 or newer.
*Changed carrier and modulator to use dropdown option which will allow for addition of new waveforms.
*Added square wave and pink noise as the fourth and fifth available waveforms for both carrier and modulator.
*Added ability to open sessions via file browser.
*Increased room for decimal pitch transposition to accomodate microtonal tuning.
*Increased room for instrument name.
*Fixed a bug where L2OrkTweet.pd abstraction got dirty every time a preset is saved.
*Added server-side ability to obfuscate key chars created on the tracker.
*47+ new instrument presets, a couple new loops, and a new demo session.
*Changed default port to 9002 since Microsoft Windows10 now has 9001 reserved system-wide.
*Ensured that the default saved and recalled loops and presets are 1, not 0.
*Minor cosmetic fixes.

16-05-2020 0.35
*Added link info in the server response as to where to download the latest version in case the client has an outdated version.
*Updated nlr abstraction to make it compatible with Pd-L2Ork 2.11 or newer.
*Fixed regression/incompatibility with the Pd-L2Ork 2.11 where the output level does not come up when activating instrument for the first time.
*Small typo fix in the comment.

15-05-2020 0.34
*In offline mode enabled the use of the buttons on all instruments and changed the instrument number colors to orange on the instruments that are not selected as the primary to reflect this. This should allow for a better solo live jamming setup. 
*Auto-enabled the keyboard when switching between instruments in offline mode (LATER: consider doing the same for the online connection).

06-05-2020 0.33
*Added ability to insert and delete empty notes while also reindexing all events after the time bar (keys ~ and shift+delete, respectively). This is in addition to the regular delete function that only erases the spot where the time bar is located without reindexing notes after it. You can also delete a range of values by holding delete key and sliding your slider across the tracker, as well as insert and delete at a precise location by clicking and relocating the tracker time bar before activating either action.
*Added ability to save session title using the chat message--enter the chat message before saving the session and the same will be announced both locally and over the network via console when it is recalled.
*Added ability for the server to log the number of new manually played notes (recalled loops are counted only once at the time they are recalled).
*Added server admin functions to set the same loop length for all users, or provide user-specific lengths in a form of a 10-value array.
*Cleaned-up presets and updated session files to include titles.
*Made the instrument name widget smaller to make room for the transposition number, placed the transposition number within the instrument synth parameters panel (middle upper row of the main instrument panel), and expanded the darker purple panel on the left control panel to make room for the insert control button (~ key).
*Bunch of small functional and cosmetic bug-fixes.

04-05-2020 0.32 First Public Stable Release
