# Usine HH7 - Release Notes 7.1.261203

On Apple Silicon Macs, the racks routed to an audio out device play again: they were silent since 7.1.261126. With 'floating window for patches', the patch editor now opens up to 8 windows: [CTRL/CMD] + double click opens a patch in a new window, and each window has its own history, as in a web browser. The period key no longer deletes the selection on Windows and Linux. The audio recorder can save without dialog, and it stops cleanly when its rack is deleted or the workspace changes. The AI assistant (MCP) has 115 tools: it records what it built, reaches every voice of a polyphonic sub-patch, shows the patch it changes and no longer changes a patch it did not choose. Fixes in Delay Amplitude Time, Multi Bandpass, Chunk Item Get, Light Fixture, the array editors and the Matrix.

Check your patches that use Delay Amplitude Time with 'sources to process' set to some of the sources only: the delay, amplitude and crossfade arrays now follow the order of that list, as the manual says. Re-learn the keys learned on the period: they now react to the Delete key only.

## Patch Editor - Several Windows
- Windows - with the setup line 'floating window for patches' (taken into account at the next start of Usine), the patch editor can open up to 8 windows:
  - a patch opens in the first window; [CTRL/CMD] + double click on a patch of a rack, a sub-patch module, its control panel or a procedure call opens it in a new window (a closed window is used first, then the next window in turn);
  - a sub-patch opened by a double click, the parent patch reached back and the history arrows stay in the same window;
  - a patch is shown in one window at a time: opening it again brings its window to the front;
  - the title of each window is the path of its patch, and a new window is placed beside the active one;
  - a patch moved to another rack keeps its window, and undo, redo and reload show the sub-patches again in their windows.
- Without the setting, one docked editor as before.
- History - the arrows go back and forward as in a web browser, each window with its own history. The previous arrow switched between the last two patches and the next arrow jumped to the oldest one.
- Arrange patch - the button asks for a confirmation. Patches with long wires no longer come out very tall (a sub-patch of 64 modules was 6000 units tall, 1820 now), and most library patches get fewer crossings.
- A module user name of up to 8 characters stays on the header line (6 before).
- Fixed on the way, docked editor included: the kiosk mode hides the editor; a refused password no longer empties the editor; the edit button of a patch panel opens the editor at the first press; after a drag of a patch to another rack, the editor shows the moved patch.

## Keyboard
- The period (main keyboard or numeric keypad) no longer runs the Delete command on Windows and Linux. Typed outside a text field, it deleted the selection (modules, notes, grid elements, a rack or a patch), and a key learned on the period was named 'Del'. Plug-in editors included.

## Audio Recorder
- New setting 'autosave without prompt': at the stop, the files go to the folder of the recorded audio files without the save dialog, named after the workspace and the date. ' (2)', ' (3)'... are added instead of writing over a former file.
- Deleting a rack that is being recorded, or clearing or loading the workspace, stops the recording and saves its files without dialog. The item of a deleted rack leaves the recorder (it stayed as an invalid item).
- An item being recorded can no longer be removed by its trash or the clear command (warning W052).
- The stop waits until the recorder has written its last buffer: the end of a file could be garbled.
- An item placed after an invalid one is no longer lost when the workspace is reloaded.
- A recording that fails to start deletes its temporary files.

## Audio Modules
- Delay Amplitude Time and Delay Amplitude Time Full:
  - the delay, amplitude, crossfade size and crossfade type arrays follow the order of 'sources to process' and 'speakers to process', as the manual says (with '3,1', source 3 comes first). The values of a source were read at the place of its number;
  - a number out of range, or already in the list, is ignored: a number above the last source became the last source, and a single negative number gave all the sources. When every number is ignored (-1), the outputs are silent;
  - a running crossfade keeps its progress when its size changes, and no longer skips its fades or jumps ahead when 'sources to process' changes;
  - a 'speakers to process' list that does not start at 1 no longer mutes a source.
- Multi Bandpass - a band without frequency (past the end of the frequency array) or out of range stays off: a gain change switched it on again.
- Oscillators Simple, Digital and Wavetable - an amplitude array shorter than the audio block no longer cuts their output. The same holds for the user modules that multiply audio by an array through the SDK.

## Array Editors and Matrix
- Array Editor String:
  - the texts keep their line and column when 'nb lines' or 'nb columns' changes and when the patch is reloaded. They were rebuilt from the panel and could be mixed up;
  - a text typed in a cell just before a change of size is kept;
  - the position outlet gives the text of the cell itself (a text holding a comma came quoted, an empty cell as "");
  - a text shorter than the grid is saved to a file with empty cells: the save raised an error and left the file open.
- Array Editor Data - 'clicked index' is -1 on a header (a line header gave the last cell of the line above). Loading a file without headers whose lines are longer than the columns no longer shifts the next lines.
- Matrix - the random of the exclusive modes (one per line, one per column) sets the right cells on a grid that is not square, and no freeze when 'nb columns' is set to 0 in the column mode.
- Array editors - the colors by cell go to the right cells on a grid that is not square.

## Chunks
- Chunk Item Get:
  - several indexes give one element each, in their order. Only the element of the last index was kept;
  - an index past the end of the item empties the output when it is alone, and gives 0 (an empty field for a text) at its place among several; 'items valid' is then 0. A text item gave a stale number or the codes of its characters;
  - text fields that hold commas and double quotes are given as the item holds them (x"a,b" was split in two).

## Light
- Light Fixture - an array wired to a parameter of a compact group gives one value per fixture of the group. Only its first value was used, for every fixture.

## MIDI
- Song Position Pointer - a position received from a MIDI device places the transport at the right beat: from bar 9 on, it landed a few sixteenth notes early.

## Patches and Files
- Last edit - each top patch saves a line 'modified=by <user> at <date and time>': the user of the activation of Usine and the time of its last edit. Loading a patch, moving a value, recalling a preset, a randomize or a reset are no edit.
- Media paths - loading and saving a library workspace keeps its media paths relative to the Usine folder ('.\Resources\...'). It wrote the full path of the computer, and the workspace lost its media on another computer.
- The OSC translator file is found as the other media files when its folder has moved.
- Deploy - 'use local temp path' set in the additional-setup.ini of a Deploy folder is taken into account.

## Stability
- Markdown to HTML - a Markdown text no longer goes through a file of the temporary folder, and a Markdown file has its folder searched once, only for the images and videos it names. Usine could freeze for minutes at the start of a workspace when the temporary folder was large.
- macOS and Linux - the audio threads that wait for each other no longer give up their processor for up to 10 ms (possible dropouts under a heavy load).

## Interface
- A window on a display placed under or above the main one is no longer pushed back up.
- The caption of a panel keeps its left margin.

## AI - MCP
- New tools - 115 tools, 3 more than in 7.1.261130:
  - get_audio_recorder and set_audio_recorder record racks and audio devices; the stop saves without dialog and gives the paths of the wav files, so that the assistant can check what it built;
  - get_mcp_activity follows what the other assistants connected to Usine do.
- Show the patch changed - the patch editor opens the patch that the assistant changes at the first change of a series, when no editor shows it (new setting 'show patch changed by MCP' of the AI tab, on by default).
- Target patch - when the workspace holds several patches, the assistant can no longer change a patch it did not choose (the one shown in the editor), until it chooses it. An assistant that reconnects with a new key within 15 minutes keeps its target patch.
- Polyphonic sub-patches - every voice can be reached (the order path '5[3].12', set_target_patch with a voice, all_voices on get_parameter, set_parameter, watch_parameter and find_modules), and 'nb polyphony' is set by set_parameter and create_module. The structure of the voices 2 and up, copies of the voice 1, cannot be changed.
- Modules - a text of digits that is the order of a module and the user name of another is refused (the assistant renamed the wrong module), and a number is an order in every tool. The pins of a sub-patch or a procedure follow the modules that the assistant adds, removes or moves inside (an input created inside made no pin).
- Files - a library patch or rack loaded by the assistant is never written over by the save command: the dialog asks for another file. save_patch and save_rack keep the name that the assistant gave.
- One Usine per port - a second Usine no longer takes the port 3100 of the first one silently: it says that the port is in use.
- Answers:
  - rack_name is the name alone, without the number of the rack;
  - list_modules_in_patch and find_modules give the caption of a module in the control panel (control_caption);
  - get_module_info gives the colors as $AARRGGBB, and the inputs that receive an array as 'array [n]: ...';
  - the answer of a switch says whether it is on and whether it is inverted, and a value changed back at once by the module is noted.
- Building and testing:
  - create_link warns at once when the ranges of the two ports do not match, and delete_link gives back the value that the inlet had before the wire;
  - check_patch says when to start the engine and which calls test the patch;
  - watch_parameter counts each audio block once, and outputs=true reads the audio outputs;
  - press_keys sends letters and digits outside a text field, to test a Keyboard module or a key learn;
  - get_available_modules ranks the modules better, and get_module_description gives the ports by default.
- get_name_usage follows the names through wires and the paths written by scripts, reads the lists as regular expressions and lists the unresolved names on demand.
- The library holds about 600 patches and racks, and its index is rebuilt when the library changes.
- Each line of the log names its client (#N).

## Internal Messages (IML)
- SHOW_PANEL PATCH opens the patch in its window. HIDE_PANEL PATCH closes the window of the target patch (with several windows).

## Library
- GRAIN Ritual finds its granulator on every computer: it named the full path of the author's computer.
- Tutorial 18-Files/tuto 01-Files and Paths reads a file that exists on every computer.

# Usine HH7 - Release Notes 7.1.261130

64 new video modules add glitch, time, grading, compositing, mapping, analysis and neural detection effects (hands, faces, bodies, objects, background removal without a green screen), with ten new video tutorials. The video engine holds much less memory, starts each video job at once instead of at the next tick of the video thread, and its heaviest 4K effects are faster; Linux gets the native video library. The AI assistant (MCP) has 112 tools: it can test what it builds (audio levels, MIDI, transport), recall and store presets, reorder and duplicate racks and patches, and read and change the setup, and each assistant now works in a target patch of its own. Several freezes are fixed (wire monitor breakpoints, procedures, network modules, scripts), the mute of the rack routes works, and the overdub and circular buffer record modes of the samplers are repaired.

Check your setup if you raised 'video frame lifetime': the setting now goes from 100 to 300 ms (default 200 ms). Update the MCP bridge of your assistants (Resources/AI/mcp-bridge.js) to give each one its own target patch.

## Video - New Modules
- 64 new modules, in the folders of the browser:
  - Glitch (new folder) - RGB Shift, Slices, Scanlines, Pixel Sort, Datamosh.
  - Time (new folder) - Slit Scan, Echo, Time Displace, Frame Difference, Freeze, Looper (records and loops video in memory at any speed and direction), Posterize Time, Feedback Zoom. Delay, Frame Buffer, Stutter, Blur Feedback and Blur Smoother move to this folder.
  - Color - Curves, Lift Gamma Gain, HSL Qualifier, White Balance, False Color, Color Match, Gamma (for LEDs, with dithering), Equalize (whole frame or tiles), Channels, Channel Split, Channel Merge, Morphology, Adaptive Threshold.
  - Blur - Radial, Median, Bilateral, Denoise.
  - Stylize - Glow, Canny, Halftone.
  - Geometric - Fit (contain, cover, stretch, center), Mirror, Lens Distortion.
  - Mapping - Offset, Edge Blend (overlapping projectors), Homography.
  - Mix - Over, Set Matte, Matte Choker, Despill, Transition (dissolve, wipes, iris, clock, slide, push), Background Removal.
  - Generators - Noise, Test Pattern, Ticker.
  - Detection - Background Subtraction, Blob Tracker, Contours, Feature Points, Markers (ArUco and AprilTag), Histogram, Scopes (waveform, RGB parade, vectorscope), Zones (up to 64), Template Match.
  - Detection with neural models - Hands (up to 4, 21 points each), Faces, Pose Multi (up to 6 people), Objects (80 classes).
  - Players Recorders - Snapshot (saves the incoming frame as PNG, JPG or BMP). Various - Meter (frame rate, intervals, latency, size and alpha of a flow). Conversion - To LED Strips.
- The neural modules run ONNX models with permissive licenses, installed with their license in Resources/Medias/Onnx: YuNet (Faces), MediaPipe palm and hand (Hands), MediaPipe pose (Pose Multi), NanoDet and YOLOX (Objects), MODNet (Background Removal).
- Ten new tutorials, 11-Video/tuto 15 to tuto 24 (Glitch, Time, Smooth and Stylize, Color Grading, Compositing, Surface and Mapping, Generators and Utilities, Analysis, Tracking, Neural Detection), show every new module. The image Resources/Medias/Images/Markers ArUco 4x4.png holds markers for Video Detection Markers.

## Video - Engine
- Frame lifetime - 'video frame lifetime' (Video tab of the setup) is 200 ms by default (300 before) and goes from 100 to 300 ms (up to 3000 before). A frame is no longer handed to another module while a module, a panel, a thumbnail, the video output, a shader or a neural model still reads it, however long it takes: the shorter lifetime is safe and holds less memory. On a show of 45 video modules, the frames in use take 0.85 GB at 200 ms against 1.4 GB at 300 ms.
- Memory given back:
  - the frames that no module uses are given back to the system after 10 s, and all of them when the workspace is cleared. While a stream of the same size ran, the idle frames were reused in turn and never given back: deleting a 4K Frame Buffer of 128 frames now frees its 4.3 GB within 20 s;
  - the work frames of the modules (resize, letterbox, video output window...) go back to the pool as soon as the module has finished with them, instead of after a whole frame lifetime.
- Latency - a video module starts its work when the audio block that asked for it ends, instead of at the next tick of the video thread: the wait goes from about 5 ms to 0.12 ms, and the frames reach Video Out 6 ms old instead of 10 on a show of 45 modules, at the same audio load. A request made while the module is busy runs right after its current run.
- Video off - with 'video active' off, or in kiosk mode without video, no video job runs; the requests wait and run when the video is on again.
- Speed - the video library (libuFrame, API 19) is faster at 4K: Video Displacement Map 27 to 14 ms per frame, Video Zone Detection 19 to 14 ms. The new Radial Blur, Morphology, Glow, Feedback Zoom, Time Displace, Bilateral, Denoise, Lens Distortion and Background Subtraction got the same work before their release (Radial Blur from 10 to about 30 frames per second). Each module still runs on one core.

## Video - Fixes
- Deleting the last wire of a video inlet empties it. The module went on processing the last frame of that wire, and later the picture of another module. Wired again to a paused source, the inlet gets its frame at once.
- Video Out no longer shows a black frame for one cycle about once a minute under a heavy load.
- A missing input - Video Out keeps one black frame of the last size. It took a new one at each job, about twenty 256 MB frames at 8192 x 8192 while a source was paused.
- The modules no longer change the frame of their input, which other modules read too: on a video with transparency, Mix Combine, an inlet fed by several wires and the resizes (Video Out included) applied that transparency to the input frame itself, and the OpenGL Shader blacked it out at its first render.
- The frame shown by a paused or stopped Video Player or Player Image can no longer be handed to other modules (another picture could appear on its panel or its thumbnail).
- Player Image - a snapshot without input does nothing, loading a file, taking a snapshot and changing the dimmer no longer run on the image at the same time, and the thumbnail no longer leaks memory.
- Panel OpenGL - the frame drawn can no longer be replaced while it is drawn.
- ML Inference - its video input frame stays valid until the inference ends, however long it takes.

## AI - MCP
- New tools - 112 tools, 13 more than in 7.1.261126:
  - watch_parameter measures the level of an audio port (peak and RMS in dB) or follows a value over time, to check what was built;
  - send_midi plays notes, controllers and other messages into the patch; get_transport and set_transport read and set the tempo, the time signature, the bar list and play;
  - list_presets and set_preset recall, store, add, rename and delete the presets of a patch, a rack or the workspace, with a fade;
  - move_rack, move_patch, duplicate_rack and duplicate_patch reorder and copy racks and patches, without touching the user's clipboard;
  - set_chunk_item writes an item of a chunk;
  - get_setup gives the tabs of the setup, their settings and values; set_setup changes settings and presses buttons as the setup panel does, then saves the setup file. It refuses the hidden and read-only lines, the MCP connection settings, the kiosk mode, the key activation, the import of an old setup and the stress and memory tests, and says when a setting needs a restart.
- Target patch - each client now has a target patch of its own: the bridge sends a key of its own (USINE_MCP_CLIENT, 'none' for none), the same when it reconnects. Two assistants on one Usine built in each other's patch. The clients without key still share one target patch.
- Racks, patches and routes:
  - set_rack_state also sets the mute, solo, always process, name and color of a rack, and set_patch_state the color of a patch;
  - set_rack_routing sets the gain, mute and on/off of a route (adding it when missing), and its pre fader, solo and panel; list_rack_routing gives the gain and mute of each route;
  - set_target_patch enters procedures, names the patch it selects and refuses an ambiguous name.
- Values:
  - set_parameter, get_parameter and watch_parameter take texts and port names as they are written: a text or a port named like an IML variable got the value of that variable;
  - a trigger set to 1 goes back to off by itself after 2 blocks of its patch: a sampler play left on restarted the sampler at each block. A second press waits for the release;
  - a list item named by a number ('57600') is selected by its name before the text is read as an index, [] gives an empty array, a 6-digit color is opaque, a switch takes only its two values, and a warning comes when a minimum is above its maximum;
  - set_variable refuses an empty, numeric or color name.
- Files - load_patch, load_rack and load_workspace check the kind of the file before replacing anything (a rack file loaded as a workspace emptied it). The save tools refuse relative paths and wrong extensions.
- Creation:
  - create_patch no longer fills the last empty patch again, and create_patch and create_rack no longer create every rack up to a large index; both give the index created;
  - a user name shared by two modules is refused, with the modules that hold it;
  - the sub-patches and procedures are listed under their name.
- Dialogs - close_dialog, and the time-out of show_message and ask_user, close a box without Cancel button with its harmless button (the box stayed open and the server was blocked).
- Add-ons - the library index and the module descriptions include the installed add-ons (paths starting with Addons/), so that the assistant can find and load them. A new 'scan add-ons' button of the AI tab updates them.
- Setup AI tab - 'trace MCP messages' and 'show MCP activity' come first, followed by the groups 'MCP on network' (network access and token) and 'MCP and add-ons'.
- Engine status - get_engine_status gives the video frame pool and the memory committed by Usine (Windows).
- Protocol and robustness:
  - a client that stops reading its answers no longer freezes Usine: after 10 s its connection is closed (Windows);
  - a text that is not JSON, or an array of requests, gets an error instead of no answer;
  - list_links gives the alternative names of the ports, and get_name_usage also searches the script sources;
  - 36 new usual argument names are accepted (bpm, play, volume, muted, preset_name...).

## Audio and Samplers
- Record modes of Sampler Recorder, Timeline, Grain Cloud, Grain Legacy and MIDI Legacy:
  - Grain Legacy records in the overdub and circular buffer modes (it recorded nothing);
  - clear rec in circular buffer 'vari size' starts the next take from an empty loop (it kept the former length), a clear during an overdub take no longer leaves that take silent, and the next take starts at the beginning of the buffer;
  - a take that starts at a position that is not a multiple of the block size no longer writes past the end of the buffer (possible crash), and the overdub no longer writes one block past the loop at each lap;
  - changing 'max rec time' while recording or playing is safe: the buffer could be reallocated while it was written or read;
  - [record pos] of MIDI Legacy and Grain Legacy follows the take on their 0 to 100 scale (it stayed near 0).

## Rack Routing and Mixer
- The mute button of an output route now mutes it (it did nothing), also on a route between two racks after a gain change on the other side.
- Mixer - a double click on a VCA slot no longer minimizes every rack, a deleted VCA removes its own slot (the first strip was removed), and 'show only active racks' no longer fails on a VCA slot.

## Patch Editor
- Redo - after several fast undos (Ctrl+Z), redo goes back one step at a time. It jumped back past several undos.
- Patch settings - the Info tab (breadcrumb, number of modules and of wires) is shown in every mode (god mode only before).

## Controls and Interface
- Color faders - a double click edits the color as hexadecimal text ($AARRGGBB, #AARRGGBB, $RRGGBB or #RRGGBB); a single click still opens the color chooser.
- Fonts on Windows - the font lists show the families as Skia and Direct2D draw them: no vertical '@' families, no names cut at 31 characters, no single-weight families that were drawn with the default font. Draw Text and Ticker find their font by name when a patch is opened: on another computer, the index saved pointed to another font.
- macOS - a click opens or closes a folder of the browser at once (it took up to three clicks), and the first click into an inactive window no longer closes the folder clicked before.
- Hidden strings - the letters typed are forgotten after 4 s without a key (they never were). On macOS and Linux, typing EXPLORER or FULLSCREEN no longer blocks the other strings (QUIT, SETUP...).
- Translations - the messages of the Add-ons Manager and the dialogs to rename a global array and to duplicate fixtures are translated.

## Modules
- New Comma Text to Text (String/Comma Text) - turns a comma text into a text of several lines, one per element.
- Text Editor - new [text] outlet: the text as lines, computed from the comma text.
- The [reset] and [randomize] inlets of the modules (faders, switches, lists, XY, array editors, step sequencer...) act on the main thread (they acted inside the audio block).
- Network FTP Put File - the host port goes from 1 to 65535 (it stopped at 100).
- Network TCP Server - the count of the clients no longer blocks the audio while a message is sent to a client that does not read.
- Network WebSocket - changing the port or deleting the module while a client connects no longer freezes Usine.

## Stability
- Wire monitor breakpoints:
  - while the engine is stopped at a breakpoint, Usine no longer freezes: keys, curves, devices, loading a workspace, the MCP tools and the continue button work;
  - deleting the wire monitor that stopped the engine lets it run again;
  - clearing a patch that holds wire monitors no longer stalls the engine.
- Procedures - updating the ports of a Procedure Call while its procedure runs no longer freezes Usine, and a procedure deleted while it runs in a thread stops and releases its locks (they stayed held).
- Network - no freeze when KNX connects and disconnects, during two FTP uploads at once, or when Art-Net, sACN or the OSC servers are changed under heavy traffic.
- Scripts - AddConnection and DelConnection called from Process give up after 50 ms when another thread holds the target patch, with a warning: two scripts patching each other's patch froze Usine.
- Changing the file of a Video Player or Player Image while the module is deleted no longer freezes Usine.
- The trace log file is created once when two threads write the first line at the same time.

## Internal Messages (IML)
- SET_TARGET_PATCH also enters procedures, not only sub-patches.

## User Modules (SDK)
- The input frames of a video user module stay valid until the end of its job, however long it takes, and sdkGetNewFrame never gives one of them.
- SetDimmerFrame on an input dims a copy of the module's own, which becomes its input: the frame read by the other modules is no longer changed.
- CreateParam, RecreateParam and SetParamVisible called from another thread while the user edits the patch give up with an error trace instead of freezing Usine.

## Library
- New GRAIN Ritual (Audio Granular): live granulation over a Euclidean sub. GROOVE Mangle updated.
- See Video - New Modules for the ten new video tutorials.

## Platforms
- Linux - the native video library (libuFrame) is installed: the video modules no longer run their slower Pascal fallbacks. The vector library (libuVector) gets its AVX2 version and native versions of the three functions that ran in Pascal (hash, conversions between floats and 16-bit integers).
- macOS and Windows - the video library is updated to API 19.

# Usine HH7 - Release Notes 7.1.261126

The AI assistant connected to Usine (MCP server) now has 99 tools and works with other AI clients than Claude. Each client gets its own answers, a wrong argument name is explained instead of ignored, and many calls can go in one batch. Usine places, lays out and checks the patches the assistant builds, stores undo points by itself, and offers about a hundred working scripts to start from. Script modules get time limits, so an endless loop no longer freezes Usine. A new arrange patch button lays a patch out along its wires. The library gains 66 patches from the HH4 to HH6 packs and 57 tutorials, and all its files were reviewed. Texts and icons are sharper with the Skia graphic engine. The AI tab is now in every edition except Player, and the Free and Starter editions allow twice as many racks.

Check your scripts that use ptRightLed, WriteFileContents, SetModuleValue or GetModuleValue, and your patches that use the auto restart of the Piano Roll: their behaviour changed (see Scripts and MIDI).

## AI - MCP
- Several clients - each client connected to the server gets its own answers. Before, the last client connected received every answer and each new connection reset the server, so a short second connection could leave the first client waiting. All the clients still share one target patch. The request of a client that has left is not run.
- New tools - 99 tools, 11 more than in 7.1.261118:
  - batch runs 1 to 100 calls in one request (20 to 40 advised), each one checked as a single call;
  - arrange_patch lays a patch out along its wires (see Patch Editor);
  - check_patch reports the problems of a patch without changing it: invalid modules, broken wires, modules switched off, audio channel mismatches, values out of range, outputs that go nowhere, overlaps, wires going back, default captions, script errors;
  - check_script compiles a script text without creating anything;
  - search_script_examples and get_script_example give working scripts to start from (about 100 examples in Resources/AI/scripts);
  - copy_modules and paste_modules copy modules with their wires, through a clipboard separate from the user's;
  - set_rack_state and set_patch_state switch a rack or a patch on or off, minimize it and set the output gain of a rack, and the list tools give these states;
  - delete_rack removes a rack, and saves a rack that is not empty to the trash first.
- Arguments:
  - every argument name is checked: an unknown name is refused with the list of the valid parameters, a missing one with its description;
  - 122 usual guesses are accepted (x and y for the position, port for parameter_name...);
  - a value can be a number, a boolean, a text or an array. "true" or "on" on a switch sets 1 (it stored 0). A text on a list selects the item of that name. An array reaches an array port as an array (before, [0,2] became 0.2);
  - a text port takes a text that starts with # or $ as a text, not as a color;
  - set_parameter reads the value back and says when the port limited it.
- Building patches:
  - create_module never opens the query dialog: it uses the defaults of the class and says so. It refuses a query value out of range and a user name already used in the patch. It places the module beside the previous one, and reports a module that could not be created instead of answering success;
  - create_link and delete_link check that the wire exists afterwards, and warn about several wires on one inlet or incompatible flows;
  - recreate_module changes the query values (the number of channels, for example) and lists the wires it had to remove.
- Scripts:
  - create_script compiles first, and creates nothing when the text does not compile;
  - a compile error comes with help: the lines around it with a caret under the column, the close names, the rows of the scripting reference and examples that use them;
  - set_script changes nothing unless the new text compiles. It keeps the values of the ports, reaches the scripts inside sub-patches, refuses while the script editor holds text that is not compiled, and stores its own undo point;
  - the answers tell whether the script compiled, its Init error and its run-time errors, and get_script gives the entry points stopped by the time limit.
- Undo - the server stores an undo point itself before the first change of a series, and always before clear_patch, load_patch, reload_patch, arrange_patch and recreate_module. There is none for a value or an automation.
- Results - they carry the facts the assistant needs at the moment it needs them: close library files at its first creation, a check summary when the engine starts or the patch is saved, the advice to use a batch or a script, the new errors of the scripts.
- Library and manual - the library index is rebuilt when a library file is added, removed or renamed (before, only when a file was more recent). The scripting pages of the manual are read from Resources/AI/scripts/manual.
- Instructions - the instructions sent to each client are shortened to about 2000 characters. get_guidelines comes first in the list of tools and gives the rules by section: Essentials by default, 16 sections in all.
- Interface tools - the mouse, keyboard, screenshot, dialog and automation tools are no longer refused for one second after the server stored an undo point. While a dialog is open, a refused request names the dialog.
- Security:
  - the clients of another computer must give the MCP token of the AI tab, in an 'Authorization: Bearer' header or as ?token= in the address; without it they get the error 401. The clients of the same computer need no token;
  - the new 'MCP token' setting is created when 'open MCP to the network' is turned on, and the new 'new MCP token' button replaces it. A new token restarts the server, which closes every connection;
  - the bridge reads the token from USINE_MCP_TOKEN, and the install scripts take --token.
- Protocol - messages split over several WebSocket frames are read (they were dropped and the client never got an answer). Large request ids keep their value, a malformed request gets an error, and an unknown tool name gets the names of the close tools.

## Scripts
- Time limits - an entry point that runs too long is stopped and stays off until the next compile, with one trace line that names the setting. Before, an endless loop froze Usine.
  - New settings in the 'scripts' section of the Expert tab, 0 = no limit: 'script Init time limit' 10000 ms, 'script main thread time limit' 5000 ms (callbacks, ProcessIDLE, OnReset, Destroy), 'script other threads time limit' 1000 ms (Process, immediate callbacks, chunk callbacks).
  - ProcessThread is never timed, nor the time spent in a dialog that the script opened.
- Errors:
  - a run-time error is traced once, on one line ('script error : Process : ...'), at most one line per second per entry point, with the count of the others;
  - a run-time error no longer moves the cursor of the script editor;
  - a successful compile no longer reports an old error.
- Compile:
  - it no longer starts the loading protection of the patch: the patch, its sub-patches and its procedures pause during the compile;
  - it waits at most 2 s for the runs of the other threads, and traces 'script busy' when they do not end;
  - the Destroy procedure of the former program runs before a recompile (before, only when the module was deleted).
- Delete - the chunk subscriptions of a deleted script are removed.
- DefaultValue - called in Init, it also sets the current value of number, switch, list and other data parameters (they started at 0).
- Callbacks:
  - immediate callbacks run at most 64 per block, the next ones in the following block;
  - chunk notifications run the script callback on their own runner (two threads could run it at once);
  - cbVideo, cbRealTime and cbNetwork are not available for the callbacks of a script: they give cbMainThread with a warning.
- Protections:
  - SendUsineMsg and SendUsineMsgFile called from Process or from an immediate callback give an error and do nothing (Usine could freeze);
  - a script can no longer delete or replace itself or the sub-patch or procedure that holds it, nor load, clear, undo or delete the patch, rack or workspace that holds it, also through internal messages.
- SetModuleValue, GetModuleValue, SetModuleArrayValue - each version converts its argument for the port. Before, the port type decided how the argument was read, which could give wrong values or a crash.
  - A text sets a text port as it is, a color written $AARRGGBB or #AARRGGBB, a list item by its name or its index, and a number on the other ports.
  - A number on a text port is written as a text.
  - GetModuleValue as a text gives $AARRGGBB for a color and the item text for a list.
  - A value that does not fit sets nothing and gives a warning.
- Global arrays:
  - new GetGlobalArrayColor, SetGlobalArrayColor, GetGlobalArrayString, SetGlobalArrayString and SetGlobalArrayTrigger;
  - GetGlobalArrayFloat, SetGlobalArrayFloat, GetGlobalArraySize and SetGlobalArraySize find their arrays again (in 7.1.261118 they found none);
  - a wrong array type and a write to a global constant give a script error.
- Files:
  - ReadFileContents reads read-only files and files open in another program, and reads UTF-8 (each accent came out as two characters);
  - WriteFileContents writes UTF-8 (the characters missing from the code page became '?');
  - CopyFile copies a read-only file;
  - scripts are saved in UTF-8, and their accented texts reach the compiler as typed.
- LED constants - ptRightLed now creates a LED on the right (it created a LED on the left). New ptLeftLed. ptLed is unchanged.
- The MIDI Tools scripts of the browser (MIDI Arpeggiator, MIDI Accumulator...) now have the extension .usine-script.

## Patch Editor
- Arrange patch - new button in the header of the patch window, next to the history arrows. It lays the modules out from left to right along the wires:
  - each group of wired modules on its own, with few crossings and free bands for the long wires;
  - the unwired modules underneath, the comments next to their module.

  It stores an undo point first, keeps the user names and does not enter the sub-patches. It is not available on a polyphonic voice.
- Copy and paste - the pasted modules are selected after the paste. A wire that leaves a module with its own control panel, a text panel for example, is pasted with it (it could be lost).
- Undo and redo no longer give the patch a new uid.

## Graphic Engine
- Skia - texts and icons are sharper:
  - an image drawn at its own size is drawn pixel for pixel (it was blurred by half a pixel);
  - an icon drawn smaller than its file (module headers, buttons, lists, grid) uses a copy reduced to its size, kept in memory;
  - at a display scale of 100 %, the letters start on whole pixels;
  - with 'graphic quality' set to best, the texts of the windows use ClearType on Windows.
- Setup - a change of 'graphic quality' applies at once.
- The Skia library (libskia) is updated.

## Controls and Panels
- Quick color - the background of a control colored in quick mode is a dark shade of its color (it was a fixed gray), and switches get a border of that color.
- Empty panels show their tip ('drop modules from the browser here'...) only while the mouse is over them.
- Panel headers - the title starts right after the buttons shown.
- Presets panel - the popup list is sized for its presets and fits the display. With many presets, the last ones were out of reach.
- Floating panels - a zoomed floating panel no longer changes size at each reorganization.
- Mixer - the designs of the strips are also applied while a workspace loads, and the output gain fader has its own design.
- Cluster name - a control whose only remote setting is its cluster name keeps it on save (it was lost).
- Crash fixes - a color chooser open on a settings line that is freed, and a combobox freed with its owner.
- Start page - the Downloads tile comes right after Manual and YouTube.
- Inspector - the Log tab reads the log in UTF-8. On macOS and Linux one invalid character left the tab empty, and on Windows accents showed as two characters.
- Panel Embedded Web Page:
  - the ports of HH6 are back: [messages] and [received] get what the page sends with sendUsine(text) in JavaScript (objects as JSON), and [execute] runs the [javascript] text in the page;
  - a url or html set before the browser is ready is loaded once it is ready (the html was lost). On macOS the url was never loaded, and on Windows a page hidden at once, in a sub-patch for example, never finished its creation;
  - new tutorial 28-Network/tuto 01-Web Page communication.

## Sub-patches and Procedures
- Sub-patch settings - a value typed in the settings panel of a sub-patch, nb polyphony for example, is kept. It came back to its former value after a click in the sub-patch.
- Procedure - while a script of its patch compiles, a Procedure Call waits and runs after the compile. A skipped run does not fire [finished].

## Data and Operators
- Flow Sample Hold - the value is taken in the block of the trigger, whatever the order in which the wires were created.
- String Float to String - a [format] such as 'value = %.2f' works: the module rounded to an integer when the text held a d, u or x anywhere. A format that does not fit uses [precision].
- String Integer to String - a [format] that does not fit an integer gives the plain integer instead of an error.

## Global Arrays
- Global constants - the set modules, scripts, user modules and the network can no longer write a constant (an access violation before), and a constant no longer takes the values of an array of the same name on another computer.
- An array that grows by a write past its end has 0 in its new elements (older values came back), and its module gets the new size.
- String arrays - a negative index or an index above the maximum is ignored, and the size follows the number of strings.
- A name could designate another array after an array was deleted or renamed, or after a workspace change.

## Chunks
- Chunk Get - an index past the end gives no value and [items valid] 0 (it gave an old value).
- Deleting a chunk removes its entries from usine-chunks-list.
- Chunk Get Concat reads outside the lock of the patch (less audio blocking), follows only the items it concatenates, and no longer misses a write made meanwhile.
- Faster:
  - no notification for a chunk that nobody watches;
  - regular expressions compiled once;
  - indexed texts written in one pass;
  - 3D Model publishes its items once at the end.

## MIDI
- Piano Roll:
  - 'auto restart' (ON by default) works: when the synchro restarts while playing, the sequence goes back to its start. Before, the switch did nothing;
  - changing 'play button mode' no longer acts as a click on play.

## Grid
- Dragging the border of the info line resizes the info line only, up to 300 px, and a press on its border no longer changes its height.
- Several selected elements dragged up or down move together.
- Resizing the grid panel scales the lines correctly.

## Internal Messages (IML)
- New DELETE_RACK rack_index: removes a rack and its patches, and saves a rack that is not empty to the trash first.
- The commands sent by a script module that would free that script (DELETE_MODULE, CLEAR_PATCH, LOAD_PATCH, LOAD_WORKSPACE...) are refused with a message in the console.
- SET_VALUE with a list of numbers on a data port sets the whole array.
- RECREATE_MODULE returns an error when it fails.

## User Modules (SDK)
- The user modules shipped with Usine are rebuilt with SDK 7.3.7: Reverb, ReverbConvolver, ReverbGenerator, Granulator, Database Creation, Database Player, ArrayDistance, MotionRecognition, MDNS-Lister, MDNS-Service and UltraLeap.
  - Each module that traces reports has its own 'verbosity level' setting, in the Report section with all the parameters, saved with the patch. Before, one level was shared by all the instances of a module.
  - MDNS-Lister and MDNS-Service are rewritten.
  - Database Creation - a file longer than [max file duration] is reported as information, not as an error.
- A ctNone parameter gets no callback (it got them).
- A user module with a control panel no longer gets each of its settings twice.
- GlobalArrayGetSize returns the right size (it returned garbage), and GlobalArrayGetHash finds an array whatever the case of its name.

## Files and Loading
- Old patches (before save version 129) - Array Display shows its values (it loaded empty), and the lists of item=value pairs load the value (they loaded the position).
- The log file is written in UTF-8 on every platform (on macOS some characters became '?').

## Library
- 66 new patches converted from the HH4 to HH6 packs:
  - Audio Brain (11 ABRAIN patches), Mogger (7), Surround (7), Sequenced (5 SEQ), Delay (5);
  - SYNTH MatryX, OS-Synth-A, OS-Synth-C and Tea Organ;
  - GROOVE Mangle and Slicer, LOOPER Peak Slicer, REVERB Generator 2.0, MIDI Targix Generator;
  - the Interface Z sensors (10 patches).

  The library holds no .pat file any more.
- 57 new tutorials, with the new chapters 28-Network and 29-Global Arrays and Constants: the modules that had no tutorial now have one.
- Every tutorial was reviewed:
  - a main comment at the top left (title, ports in brackets, TRY lines) and one comment per group;
  - the colors of its chapter;
  - 76 tutorials renamed with clearer English names.
- The 206 other library files were reviewed (main comment, description, captions, units) and repaired where they did not work as described, for example:
  - DYN Gate, MIDI CC To CV (jacks crossed), Mogger Auto Wah and Low Pass Filter (slow and fast swapped), Mixer Stereo, Video Shaders FX and Seq 1-8;
  - the REVERB switch of SYNTH OS-Synth-C and MatryX now switches the reverb (it added 1 dB).
- The library descriptions name the generative and ambient patches.

## Editions
- The AI tab and the MCP server are available in Free, Starter, Pro and Expert (Expert only before), not in Player.
- Free - 16 racks and 16 sections (8 before). Starter - 32 racks and 32 sections (16 before).

## Platforms
- Linux - the math library is loaded as libm.so.6, which every glibc provides (libm-2.31.so no longer exists since glibc 2.34).
- Linux - the Panel Embedded Web Page no longer leaks memory at each navigation and message.

## Other Improvements
- Add-ons Manager - a file larger than 512 MB is refused before the upload starts, and before 'update' removes the former add-on. The upload timeouts go to 3 minutes.

## Removed
- The WebSocket example page Resources/Remote/webSocketExample.html is no longer installed.

# Usine HH7 - Release Notes 7.1.261119

The AI assistant connected to Usine (MCP server) now has 86 tools. It can see every panel and window, use the mouse and the keyboard, answer dialogs, record and write automations, and search the library and the manual. The video modules have clearer names after a naming review, and saved patches keep their wires and values. Serial Port and Touch Fader are now built into Usine and also run on Linux. 3D Lines can be thicker than one pixel, and translucent 3D objects are drawn in the right order. Usine starts again on Intel Macs running macOS 10.13 to 10.15, and it no longer collects any usage data.

Computers that share data over the network (SHARE) must all run this version: see Network.

## AI - MCP
- See the interface - get_screenshot captures every panel and window of Usine, not only patches: racks, workspace, a module, the mixer, the setup, the menus, the start page, the master light, an automation curve and so on. Its patch structure mode gives the boxes, ports and wires of a patch in pixels. list_windows lists the open windows, front first, and set_patch_view zooms and scrolls the patch editor.
- Use the interface - mouse_move, mouse_click, mouse_drag and mouse_wheel act on the controls as the user would, and type_text and press_keys type into Usine. get_input_status and cancel_input follow or stop a gesture. close_dialog answers a dialog. While a dialog is open, the tools that see or act on it still work. While a gesture holds a mouse button, the real mouse does not disturb it.
- Automations - set_automation_recording turns the rec automation switch on or off, get_automation reads the automation of a control, write_automation writes one without the mouse and delete_automation removes it.
- Library and manual - search_library searches the about 500 patches, racks and workspaces of the library. get_library_item reads one of them without loading it, and load_library_item adds it to the workspace. search_manual and get_manual_page search and read the about 300 pages of the manual. get_guidelines gives the rules an assistant follows when patching.
- Routing - list_rack_routing and set_rack_routing read and change the inputs and outputs of the racks. list_modular_ports, create_modular_wire and delete_modular_wire handle the modular wires between racks.
- Inspection:
  - get_trace captures MIDI in, MIDI out, OSC and global array traffic;
  - get_log reads the log file;
  - find_modules finds modules by class, port or value;
  - get_name_usage tells which modules use a global array, a bus, a chunk, a quick link or a procedure;
  - get_global_array and set_global_array read and write global arrays;
  - list_scripts and list_comments list the scripts and comments of a patch;
  - move_module moves a module as the mouse does.
- Security - the server only accepts connections from the same computer unless the new 'open MCP to the network' setting of the AI tab is on (off by default). The new -nomcp command line switch and the nomcp setup line turn the server off and hide the AI tab.
- show_panel - a sub-patch protected against edition is refused outside god mode. The settings of a module are searched only in the target patch and its sub-patches. The presets panel of a rack or a patch opens even with the IB hidden.

## Video
- Video modules renamed - 35 modules have a new name and some have moved to another folder of the browser (see the table below). Saved patches keep their wires and values. The renamed ports keep their old name as saved name. An Usine Object address (scripts, Usine Object Get, OSC /uobject/, remote) that ends with an old port name no longer finds the port when the module has a user name. The old port names are height-map, spray, exclude, extract, flow-x, flow-y, grid-density, array-points-density and cameras-list.
- Bulge - a positive amount now bulges: the middle of the circle is magnified, as the manual says. Before, a positive amount pinched the image, so saved patches with a positive amount now render the other way.
- Captions corrected - Random Noise, Crop Resize, Pose Estimation (was Pos Estimation), Draw Fill Path and Video to 3D Points.
- Help - the more info button of a renamed module opens the manual page of its module.

### Renamed video modules
| Before | Now | Renamed ports |
|---|---|---|
| Video Color Extract | Video Keep Color | extract -> color |
| Video Color Exclude | Video Color to Black | exclude -> color |
| Video Color Change Pixel Mode | Video Color Channel Order | |
| Video Color Threshold | Video Color Luma Gate | |
| Video Color Black and White | Video Color Binary Threshold | |
| Video Color Semi Opaque | Video Stylize Pixel Grid | |
| Video Color Contour | Video Stylize Contour | |
| Video Color Dilate | Video Stylize Dilate | |
| Video Color Erode | Video Stylize Erode | |
| Video Color Chroma Key | Video Mix Chroma Key | |
| Video Color Luma Key | Video Mix Luma Key | |
| Video Blur Height Map | Video Geometric Luma Displace | height map -> amount |
| Video Blur Spray | Video Stylize Scatter | spray -> amount |
| Video Blur Shuffle Pixels | Video Stylize Shuffle Pixels | |
| Video Blur Soft Border | Video Mapping Soft Edge | |
| Video Stylize Sharpen | Video Sharpen (Blur folder) | |
| Video Anti Aliasing (Various folder) | Video Anti Aliasing (Blur folder) | |
| Video OpenGL Shader (Players Recorders folder) | Video OpenGL Shader (Generators folder) | |
| Video Geometric Mirror Vertical | Video Geometric Mirror Left | |
| Video Geometric Mirror Horizontal | Video Geometric Mirror Top | |
| Video Geometric Pixels Distribution | Video Stylize Dither | |
| Video Geometric Oversample | Video Geometric Upsample | |
| Video Detection Optical Flow | Video Detection Motion Grid | flow X, flow Y -> motion X, motion Y |
| Video Detection | Video Zone Detection | |
| Video Pixel Density | Video Luma Grid | grid density -> grid luma, array points density -> array points luma |
| Video Draw Line To Path | Video Draw Polyline | |
| Video Generator Fill Color | Video Generator Solid Color | |
| Video Mapping Vignette | Video Mapping Inset | |
| Video Mapping Multi | Video Mapping Multi Crop | |
| Video Mapping Path | Video Mapping Path Mask Inside | |
| Video Mapping Path Mask | Video Mapping Path Mask Outside | |
| Video Mix Auto FadeIn | Video Mix Auto Fade In | |
| Video Mix CrossFade | Video Mix Crossfade | |
| Video Mix Incrustation | Video Mix Picture in Picture | |
| Video Player Flow | Video Player Stream | |
| Video Player Image Multi | Video Player Image Sequence | |
| Video NDI Camera | Video NDI Receive | cameras list -> sources list |
| Video Strobe | Video Stutter | |

## 3D
- 3D Lines - new thickness inlet, from 1 to 20 pixels, with one value for all the segments or one per segment. Lines were always 1 pixel wide, and DX11 and Metal could not draw them wider. Above 1, each segment keeps its width on screen at any distance, in perspective and in orthographic views.
- Translucent objects - the 3D viewer draws the opaque objects first, then the ground, then the translucent objects from the farthest to the nearest, and translucent objects are hidden by the opaque objects in front of them.
  - Before, the order was reversed (nearest first), and a translucent mesh was painted over everything in front of it.
  - A translucent ground disk no longer hides the objects beyond it.
  - The grid lines are hidden by the opaque objects in front of them.
  - A mesh filled from a chunk is ordered by the middle of its geometry, not by its origin.
- 3D Lines - lines drawn on the faces of a mesh (wireframes) are no longer cut by the faces, and their color no longer changes as the camera turns. Translucent lines, points and triangles are drawn after the translucent meshes.
- 3D Points, 3D Lines, 3D Triangles, 3D Quads, 3D Billboard Sphere - faster with several colors: each draw sends only the points of its color. No more errors when the patch changes the points or the colors while they are drawn.
- 3D Mesh:
  - deleting the chunk it watches empties the meshes, and a new chunk of that name rebuilds them;
  - an empty chunk name designates the default chunk;
  - a mesh missing from the chunk is empty (it took the geometry of the previous mesh);
  - a mesh whose index list points past its vertices no longer freezes Usine or raises errors (the error is traced once).
- 3D Mesh, 3D Model - the normals of the faces that start on one of the last two vertices are computed (they were skipped).
- Arc Quad - large chords no longer give an arc collapsed to its middle.
- Hit test - with the hit test switch OFF, the instances added when the number of instances grows are not hit-testable either.

## Graphic Engine
- First start - with no setup file yet, Usine starts on Skia on every platform where the Skia library is present (Skia Metal on macOS), and on the native canvas otherwise. Before, the first session always ran on the native canvas.
- Skia - a control that shows only a part of an image, for example a zoomed or scrolled multi-touch panel, draws that part at its place, as the native canvas does (Skia stretched it over the whole control).

## Controls and Panels
- Module header - the user name of a module is shown on a second line of its header, which is one line taller (it was in parentheses after the caption). The header of a polyphonic sub-patch shows its number of voices.
- Hints:
  - every hint is laid out in lines of 80 characters at most, keeping the indent of its lines (only module hints were cut, at 60 characters);
  - the hints of modules and ports come from the module descriptions written for the manual, and a numbered port such as 'in 2' shows the description of 'in' when it has none of its own;
  - user modules (SDK) show their description as written, and the description of each inlet and outlet (SDK 7.3.4 and later).
- Borders - the border of a control is drawn exactly inside its edge with square corners, and the caption of a panel header is placed inside the border. On a panel with a border, XY and XYZ pads, Trajectory and Touch Fader no longer place their objects one border width too low.
- Array Editor Data, Array Editor string, Panel Matrix, Audio Mix Matrix, MIDI Mix Matrix - new 'cursor width' design setting, from 1 to 20 pixels (the cursor was always 1 pixel). 'items margin' and 'adjust client size' move to the 'cells' section.
- Array Editor Data - the cursor mode and position are applied as soon as the values are set (array in, load, resize).
- Array Editor - a cursor past the visible lines or columns is no longer painted outside the grid. 'items height' and 'items margin' at 0 no longer raise an error.
- XY pad, XY Draw, XYZ pad, XYZ Draw, Panner - deleting the module no longer traces one E032 error per object.
- Info Editor - the default text of a new info editor shows its dashes and stars correctly on Windows.
- Listbox, file lists - a folder dropped with files is no longer added as an item, and its hint says that its files will be added.
- Remote panel - clicking a DMX line opens the settings of its own control, and a double-click finds that control in the patch (both pointed to another line).

## Audio
- Phase Vocoder - Phase Voc Forward and Phase Voc Inverse are now sub-patches in Audio > FFT, on every platform. The former Phase-Vocoder-Forw and Phase-Vocoder-Inv user modules leave the browser.
- ASIO - a change of buffer size is applied (the sample rate code ran instead).
- FFT - raising the audio block size while running no longer writes the block before the start of the buffer.
- Delay Amp-Time, Delay Amp-Time Full - after a change of sample rate while running, the delay stays inside its buffer, and long delays are limited to the buffer size. Delay Amp-Time Full no longer makes every block wait when its source raises an error.
- Linux - Reverb, ReverbConvolver, ReverbGenerator, Granulator, Audio Analysis Descriptors, Database Creation and Database Player are available on Linux.

## MIDI
- Piano Roll:
  - copy, delete and paste always act on the events selected on screen (after a clear, a load, an import or an inlet change they could copy or delete other events, or raise an error);
  - deleted events are not pasted;
  - undo is safe and faster with many deleted events.
- MIDI file import (Piano Roll):
  - a track with a sequence number event is read correctly (the rest of the track was read out of step);
  - a track no longer comes out empty at random;
  - unusual time signatures, note numbers above 127 and endless beats no longer stop the load;
  - a malformed file is closed.
- MIDI Sampler panel - dragging an element below note 0 stops it there, and dragging its velocity edge near 0 keeps a valid range (the range wrapped around).
- MIDI input - SysEx messages of 64 KB or more are no longer cut.
- MIDI Generator Random, MIDI Generator Random Note On - a min above 1 saved in a patch is kept on reload (it came back as 1).

## Data and Operators
- Data Generator Random - a min above 1 saved in a patch is kept on reload (it came back as 1).
- Has Changed - fires when the number of values of its input changes, even when the values are equal.
- string Hash - the 'basic' algorithm hashes the text itself, so it gives other values than before.
- Seq Step, Seq Lines, Seq Points, Array Display, Mapper Curve - a preset recalled with a fade time fades the steps and points to their stored values (they did not move, and memory could be damaged).
- Step - Ctrl+Shift pressed during a drag scales the values from that moment, not from an earlier gesture. Invalid values no longer raise errors.
- Array Editor string - loading a file no longer stops with an error on each line, and the file is no longer locked until Usine quits after an error.
- Time - no tick just after the patch is activated: the first tick comes at the next change of second.

## Scripts
- SetModuleValue, GetModuleValue, SetModuleArrayValue, AddConnection, DelConnection, CopyModuleValueToParameter, CopyParameterToModuleValue - a port given by name is looked up by the caption shown first. On the mixers, whose inputs show 'in 0' but are saved as 'in 1', 'in 1' is now the input that shows 'in 1' (it was the first input). The internal messages SET_VALUE, GET_VALUE, GET_STRING_VALUE, GET_TERMINAL_INDEX, CREATE_LINK and DELETE_LINK do the same.

## Internal Messages (IML) and Templates
- New HIDE_PANEL command, the opposite of SHOW_PANEL.
- SHOW_PANEL opens new panels:
  - START_PAGE, DEVICES, MASTER_LIGHT, TRASH and MAIN_MENU;
  - PLOT "n" for plot n (it always showed the first plot);
  - SETTINGS "module" for the settings of a module of the target patch;
  - SETUP "tab" for a tab of the setup;
  - INSPECTOR "console" or "log";
  - PRESETS for the workspace, a rack or the patch;
  - PATCH_STRUCTURE and PATCH_EDITOR as other names of PATCH.

  An unknown name lists the valid ones, and the command returns an error when the panel cannot be shown (kiosk mode, Player, a version without mixer).
- SHOW_PANEL fixes:
  - MIXER no longer opens an empty floating window;
  - TRACE stays shown;
  - PATCH shows the patch as a double click does, and refuses a patch protected by a password;
  - WORKSPACE no longer resets the layout when the racks are already on screen;
  - IB and GRID leave the start page first.
- CREATE_MODULE - a user module can be named without its file extension ('Reverb'). After a module created this way is deleted, its user name no longer points to the deleted module. RENAME_MODULE moves the name to the renamed module.
- DELETE_PATCH - removes the patch (it stayed). A name that is not found reports 'patch not found' instead of deleting the target patch. The only patch of a rack is cleared and stays in its rack.
- SAVE_PATCH, SAVE_RACK, SAVE_WORKSPACE - an invalid file name returns an error, and SAVE_PATCH and SAVE_RACK report an error when the file was not written (they always reported success). LOAD_WORKSPACE returns an error when the workspace was not opened.
- Template menus - a template made for every flow appears only on the terminals. Before, the wire menus showed Flow Pass and the other all-flow templates twice, plus Quicklink Set, and the fader menu of the grid showed flow items. In the terminal menus, Input/Output Data and Input/Output Array come first.
- Drop templates - the templates offered for a dropped file need its exact extension, so a .jpeg no longer offers the video template as well. The right-click and wire menus no longer offer the templates of the last dropped file.
- The Video In template of the generators is named Video Generator Solid Color.

## Sub-patches
- Polyphony:
  - a value above 256 sent by a wire, a script, IML or MCP is brought back to 256;
  - a polyphony change asked during a load, a save or another change is applied 100 ms later (it was dropped while the setting showed the new number of voices);
  - a wired polyphony out of range or not an integer no longer rebuilds the voices at every block;
  - after the polyphony is lowered, Poly Voice Dispatcher MIDI no longer picks a voice that no longer exists;
  - each voice runs its own end of load (that of voice 1 ran again for every voice).
- Multi-thread mode - an error in a voice no longer makes the audio wait 5 s for that thread.
- Procedure - a Poly Voice Dispatcher MIDI inside a procedure no longer raises an error on activation, panic or all notes off.

## Chunks
- Deleting a chunk while Usine runs (inspector, Chunk Operation 'destroy chunk', SDK) no longer frees it under the modules that use it. The chunk modules and 3D Mesh let it go and find a new chunk of the same name.
- Chunk Watch - no more question at insertion (it asked for a number of items it did not use), and no change is missed any more.

## Global Arrays
- GA Data OSC - the values of a message go to the indexes that follow the index of the address (messages with several values could write to the wrong indexes), and 'is a pair' writes the next group. An address with a number of 10 digits or more no longer raises an error at every block and blocks the next messages.
- GA Save Load File - the busy led goes off once the file is written or loaded, and the next save or load waits until then.
- GA Refresh - 'send all' pressed while a send runs is refused with a 'busy' warning (two sends ran at once).
- Trace - with 'trace global-arrays errors' ON, the trace no longer shows 'global array not found' for arrays that exist.

## Light and Laser
- Laser - the speed setting goes from 1000 to 65535 pps (the maximum was 100000). The Helios DAC refused the frames above 65535 pps and nothing was drawn, with no message. A higher value from an older setup is brought back to 65535.
- Laser Player ILDA - with the palette 'standard (256 colors)', the indexed colors are right (their green and blue were read from the 64-color table).
- Spline to Laser - a large input or many spline points no longer write past the end of the laser frame.
- DMX plots:
  - answering No to the clear question when opening a plot loads nothing (it loaded anyway), and there is no question when every plot is empty;
  - a dropped plot file opens as a plot, not as a plots group;
  - Light Fixture modules are bound again to their fixtures after an open or a drop.
- Fixture groups:
  - the fixtures that a group takes its parameters from are saved with their channels and values (they came back with channel and value 0);
  - a group that loses its last fixture updates its settings and its Light Fixture modules;
  - a group can no longer be dropped into another group, nor a fixture of another plot;
  - switching a loaded group to compact works the first time.
- Light Fixture:
  - a module bound to its fixture by caption no longer becomes an invalid fixture after a reload, an undo or a redo;
  - only the modules of the workspace that holds the fixture are recreated;
  - a failed recreation no longer blocks the audio of the patch;
  - a parameter that a group no longer has is ignored (it raised an error at every block).
- Send Channel Name - follows every change of the plot, and traces 'Fixture not found' only when the names change (it traced every name at each open, undo or redo).
- Grid - a fixture or a group placed on the grid no longer takes over the settings of the fixture itself.
- Fixtures - the Complete List and Led CMY Dimmer fixture libraries are no longer installed with Usine; the fixture database is on www.brainmodular.com.

## Network
- SHARE - this version uses SHARE protocol 3. A computer running an earlier Usine exchanges no global array, bus or MIDI with it, and the trace asks to update Usine on that computer. A bus packet with a wrong checksum is dropped.
- OSC - the size of a blob is counted in bytes, as OSC 1.0 says (it was a number of values). An empty array sends an empty blob, a blob too large for the packet is cut and traced, and a received blob is checked against the packet. Blobs exchanged with an earlier Usine are not read correctly: update both sides.
- Network adapters - adapters without a hardware address, such as VPN tunnels, are listed without error.

## New Modules
- Serial Port (External Devices) - now built into Usine, on Windows, macOS and Linux (the former user module existed for Windows and macOS only).
  - Same controls, settings and three receive modes (blocks of a fixed size, up to a delimiter byte, every byte); patches with the Serial-Port user module load it with their values and wires.
  - New 'ports' list and 'rescan ports' button.
  - Changing the port while 'on' reconnects to the new port.
  - Baudrate, parity, char size and stop bits are applied to the open port at once.
  - 'connected' lights once the port is really open, and errors are traced.
  - In delimiter mode a full receive buffer is emptied and lights 'rx buffer overflow'.
- Touch Fader (Interface Design) - now built into Usine, on Windows, macOS and Linux. Its seven modes are fader, button, switch, encoder, XY pad, range fader and listbox. Patches with the TouchFader user module load it with their mode, parameters, settings and presets.
  - Each skin list keeps its own skin.
  - The 'LB text' output is always refreshed.
  - The captions, settings and default list are now in lower case ('x out', 'lb text', a..z).
- ArrayDistance (Machine Learning) - compares the shapes of two arrays of any size (dynamic time warping) and gives their distance.
- MotionRecognition (Machine Learning) - records up to 8 movements on its data inputs and recognizes them in real time.

## Files and Browser
- Workspaces - only one workspace opens at a time: a second open from the start page, the grid, Load Workspace, IML or MCP is refused, or tried again later by the grid and Load Workspace.
  - Answering No to 'open workspace?' leaves the current workspace untouched.
  - A container folder without its workspace file no longer clears the current workspace.
  - Load Workspace flashes 'loaded' only when the workspace was opened.
- Patch Open command - answering Yes to 'save modifications?' saves the patch before the open dialog (it was not saved).
- Extensions - a dropped file matches a list of extensions only when its extension is exactly one of them ('list' no longer matches .usine-playlist). Extensions with several dots and masks with * work in drops as in the dialogs.
- File List Manager - 'all files' and an empty extension list accept every file, so a dropped folder adds its files.
- Folder scans - the .git, .claude, .vscode and .vc folders are skipped.
- Browser - the fixtures tab also lists .txt files and files without extension.

## Library
- The library patches, racks and tutorials are saved in the current version (save version 136).
- New SYNTH Lorenz Bell Garden patch.
- The video racks follow the new module names: Video Mapping Scale, Video Mapping Translation and Video Stylize Scatter (was Video Blur Spray).

## Platforms
- macOS Intel - Usine starts again on macOS 10.13 to 10.15. Since 7.1.261026 the system refused to launch it because the Skia library needs macOS 11. On those versions Usine now uses the native canvas, and the setup shows 'skia metal (not available)'.
- macOS - Skia is loaded from its own library (libskia.dylib) on Intel and Apple silicon. The minimum versions are macOS 10.13 on Intel and macOS 11.0 on Apple silicon.
- Linux - Serial Port, Touch Fader, the audio user modules listed in Audio, MDNS-Lister, MDNS-Service, ArrayDistance and MotionRecognition are available.

## Other Improvements
- Privacy - Usine no longer collects or sends any usage data. The 'anonymous telemetry' setting of the AI tab and the 'create json file' button of the info tab of a patch are removed.
- Loading protection - a workspace load stays protected until its end. Before, a rack or panel file read during the load ended the protection: scripts were compiled at once, 'object not found' errors were traced and network commands ran during the rest of the load. An error while loading the setup, a workspace or a rack no longer leaves Usine in the loading state until it restarts.
- ESC - with the grid running, ESC reaches the preset fades and the other operations it cancels (zip, FTP, conversions), which could miss it.
- Command line - new -nomixer and -norecordaudio options start Usine without the mixer or without audio recording.
- Messages - the warning and error codes are unique, several texts are corrected, and five messages that showed their internal key now show their text.
- Setup - 'CPU count' shows the number of processors (it showed the maximum number of threads).

## Removed Modules
- Video Color Split Light - removed from the browser: Video Geometric Luma Displace does the same, and its amounts 0.589, 0.527, 0.487, 0.457 and 0.432 give the settings 1 to 5 of Split Light. Patches that use Split Light still load it.
- Serial-Port and TouchFader user modules - replaced by the native Serial Port and Touch Fader modules, which load the old patches.
- Phase-Vocoder-Forw and Phase-Vocoder-Inv user modules - replaced by the Phase Voc Forward and Phase Voc Inverse sub-patches.

## Bug Fixes
- Rack - the 'calculated at the end' option is saved with the rack (it came back OFF after a reload) and has its caption in the rack settings.
- -nolight mode - switching to the other workspace no longer raises an error.
- Web Page (Windows) - deleting the module, or closing a text, script or shader editor, before it is fully created no longer crashes.
- Arrays - an array emptied by another thread while it is read no longer gives a division by zero.
- Cluster in the grid - a member added after the grid element was activated no longer raises an error during a fade.
- Sonogram - a display taller than 1290 pixels shows the frequencies correctly.
- Screenshots - an error during a capture no longer leaves the selected modules drawn as unselected.
- Memory - the automation recording, the inspector (every 2 s) and the log files no longer leak memory or file handles.
- HID - loading a patch with the old HID user module warns 'HID module has changed' (it named the Draw-Trajectory module).

# Usine HH7 - Release Notes 7.1.261104

This version is mostly about video: the Video Player, the Video Recorder, the Draw modules, the Video Mapping grids and the video thumbnails of the browser were reviewed line by line and about a hundred defects are fixed below. The video modules work again on Linux (Ubuntu 24.04). The XY and XYZ pads follow the mouse smoothly, the Clock interval mode is exact, scripts run faster and get a new function, and the MCP server gets two tools.

## Graphic Engine
- Skia - on Windows the skia canvas repaints only the parts of the window that changed, as the native canvas does. Each repaint redrew the whole window, which slowed down the interface while an object was dragged (an XY pad, for example) and made the outputs move by jumps.

## Video Player
- Length and position - a Matroska, WebM, FLV or NUT file whose video stream has no duration takes the duration of the file (it had 500000 frames: the position stayed near 0, an end pos below 1 was never reached, a start pos above 0 gave the last image). A Matroska or WebM file whose video ends before its audio has the length of its video. An MP4 or QuickTime file cut without re-encoding (a trim made on a phone or in QuickTime) takes the length of its stream instead of the frames hidden by its edit list. The position, the frame number and the seeks count from the first frame of the file (MPEG program and transport streams start after 0, so the first image had a position above 0 and the seeks were shifted).
- Raw streams - the .h264 and .264 files of the Video Recorder, which have no time stamps, are timed correctly (the media clock ran fast and the position was negative), and a seek that fails is tried again to the key frame before its target, then to the start of the data (such a file played once in the loop and then nothing, and nothing at all with the play button). A stream without an average frame rate (raw Motion JPEG, raw MPEG-4, NUT, IVF, Ogg) takes the rate that FFmpeg guesses, else 25 (the loop restarted after every second image).
- End of file - the images that the decoder still holds at the end of the file are shown (the last 6 to 8 images of an H.264, HEVC or VP9 file were never shown, and a file of fewer frames showed nothing). The last image of a pass is shown for its period instead of one audio block. In the free loop the file starts again at its end with freeze last frame on stop ON (it played once and held its last image for ever).
- Restart - a restart wakes the video thread at once: the play button, a restart at the end pos, the synchronized loop modes and the file buttons showed their first image 100 ms late.
- Fast videos - a video of 128 fps and more started every pass at its image 256 and leaked frames.
- IP Camera - the end of a stream (a camera or a server that closes it) no longer raises an error every 16 ms in the video thread, and the reconnection takes place.
- Memory - the Video Player and the IP Camera no longer allocate an unused buffer of about 25 MB at each load of a file. A deleted Video Player Image releases its frames (a 1920 x 1080 image left 8 MB and its thumbnail in the pool for good).
- Crashes - deleting the module during a long seek or while an IP camera stream stalls no longer kills the video thread inside FFmpeg. Clearing the file list during a seek or a change of size reduction factor no longer frees the decoding contexts twice.
- Video Player Image - clear list and an emptied list clear the video out and the panel when FFmpeg is not loaded.

## Video Recorder
- End of a recording - the frames that the encoder still holds are written at the stop: every recording lost its last frames (8 to 10 with H.264, 24 with VP9, 1 or 2 with MPEG-1 and MPEG-2) and a recording that short had no picture at all. The first frame is at time 0 (every recording started one frame late).
- Background finalisation - the stop and the deletion of the module no longer wait for the end of the recording, which froze the interface for seconds with VP9 and at large sizes. The file is complete a moment later. A recording started on the file of the previous one waits until that file is complete, a minute at most. Usine waits for the files still being finalised when it quits, shuts down or reboots the computer, a minute at most.
- Formats - .mjpeg and .gif record (they recorded nothing). .qt and .hap record QuickTime movies, HAP with the HAP codec, and .m4p an MPEG-4 file (they recorded a raw H.264 stream). An odd width or height records in H.264 (the picture is padded to the next even size; half of the sizes recorded nothing in .mp4, .mov, .m4v, .mkv and .h264).
- File names - a name keeps its extension only when it is exactly a video extension. A name ending with .jpeg recorded its first image as a JPEG file and then failed at each frame.
- Errors - a recording that cannot start (missing encoder, refused size or framerate, file that cannot be created) stops at its first error, traced once, instead of tracing two errors per frame or crashing. A recording without FFmpeg loaded traces that FFmpeg is not loaded instead of an access violation.

## Draw Modules
- Draw Pixel, Draw Line, Draw Line To, Draw Line To Path, Draw Rect, Draw Fill Rect - a translucent color is drawn over the video with its alpha as opacity, so a grid fade fades the drawing into the video. The color was drawn darker and black at alpha 0. Opaque colors draw as before.
- Mode addition - Draw Line To and Draw Fill Rect take the mode addition switch into account (it was ignored). In addition mode each pixel is added once: the corners of Draw Rect were added twice and the joints of Draw Line To Path too.
- Antialiased lines - they are drawn over the video (every antialiased line had a dark edge on a bright video and a black pixel beside each end). A line whose two ends fall on the same pixel is drawn there (it was drawn at the top of the frame). A steep line no longer writes one column past the right edge of a frame narrower than high.
- Coordinates - the coordinate 1 is the last column and row of the image for every point of every draw module: in Draw Pixel and Draw Line To, and for the start point of Draw Line, Draw Rect and Draw Fill Rect, it fell one pixel outside the frame (a point or a line on the right or bottom edge was not drawn). Draw Fill Rect includes its two corners, so the default corners fill the whole image (the last column and row stayed unfilled). A point that falls just left of or above the image no longer breaks a Draw Line To Path path.
- Far coordinates - a point, a line or a rectangle far outside the image could be drawn inside it, and a line between two far points hung the video thread for ever. Two modules drawing lines at the same time on frames of different sizes no longer clip with each other's rectangle.

## Video Mapping
- Mapping Grid, Mapping Grid Projection, Mapping Perspective - the grid is drawn over the video with the alpha of its line color (a translucent grid was drawn opaque), each pixel once. The right and bottom lines of the grid are drawn on the last column and row of the image (they were not drawn). The caption of Mapping Perspective is spelled right.

## Other Video Improvements
- Frame Buffer - the position fader is reversed: 1, the default, outputs the live frame and 0 the oldest frame (the default position output the oldest frame).
- Video Recorder - the last frame of a recorded .mov, .mp4, .m4v, .qt or .hap file is no longer dropped by the players (its duration was left at 0, which made the edit list one frame short).
- Player Image - the short filename and long filename outputs are updated when an image is loaded.
- Average Color - the R, G and B outputs are shown with three decimals instead of as integers.
- Kaleidoscope - the pattern stays centered on a frame that is not square: the sector on the axis of the long side of the frame keeps the picture in place and the other sectors show it turned or mirrored.
- Linux - Usine ships its own FFmpeg 4.4.8 for Ubuntu 24.04. The libraries of the previous packages were those of Ubuntu 22.04, which do not load on 24.04, so every FFmpeg module was inert there.
- macOS - the native video kernels (libuFrame) are included in the Intel and Apple silicon bundles.
- Memory - the frame pool is purged after a workspace clear.
- Out of memory - when the frame pool cannot allocate a frame, the video filters and mixers, the Mapping modules, Blur Smoother, Blur Feedback, Color Contour, Video To Laser, ML Inference, Pose Estimation, NDI Camera, NDI Send, the Video Recorder and the SDK video modules publish an empty frame instead of writing through a nil pointer (access violations, a video thread that ended).
- Apple silicon - a video outlet, a wire or a panel could show a frame before its pixels were written, on every video module. Fixed.
- 3D to Video - the frame is drawn before it is published (the outlet could get a black frame or the pixels of its last user).
- Recreating a video module (a change of its query, CreateModule from a script on an existing module) no longer freezes Usine for 5 s and then crashes.

## Controls and Panels
- XY Pad, XYZ Pad - while the objects are dragged, their positions and the X and Y outputs follow the mouse continuously instead of moving by jumps. The objects are bounded to the 0..1 square of the view after a zoom and a scroll (an object could leave the square on one side and was stopped before the edge on the other). Several objects selected with the lasso stop at the edges together, as a group (the other objects of the selection went far out of the frame).
- XYZ Polygon - an empty array received on coords Z clears it, as coords X and coords Y already did.
- Trajectory Spline, Trajectory Spline 3D, Spline to Laser - dragging a point no longer writes past the end of the coords arrays when they hold fewer values than the spline has points, and empty coords arrays no longer raise an error. The pos Y out output can no longer be dragged by hand. Spline to Laser loses its unused laser status to merge inlet.
- Points Path - a point with a negative Y is no longer taken as inside the path.
- Oscilloscope XY - the last point of the trace is drawn in the line and the pixel modes (the trace stopped one point early).
- Combobox, Listbox, List Btn - after a patch is loaded, the text and num elements outputs are computed from the loaded list and the selected item instead of their saved values.
- Main Menu - the CHECKBOX items get their saved state back when the patch is loaded. A line nested deeper than the maximum depth is reported as an error instead of corrupting the menu.
- Master Vu-Meters - the hold linear scale outputs the held peaks of the inputs and outputs (it fell back to the plain value).
- Master Light Settings - the sACN mode setting is numbered per DMX plot like the other plot settings (several plots shared one label).
- Text Editor - the default type is PlainText (the list was off by one).
- Trace Data - the unused on change switch is removed.

## 3D
- 3D Viewer - the objects added while the viewer or a parent panel was updating are drawn when the update ends (they stayed invisible), and a removed object leaves the rendering list at once. Deleting a 3D Viewer no longer frees the meshes of the 3D object modules, which move to the next viewer: no more crash when a viewer is deleted or recreated with 3D objects in the patch.
- 3D Mesh - a reset fired from the patch rebuilds the meshes on the main thread instead of while they may be drawn or freed.
- 3D Model - the bounding box starts from the first mesh that has vertices instead of the origin, so a model that does not contain the origin gets the right center and scale.
- 3D Stroke Cube - changing the color no longer cancels the opacity fader: the opacity is the fader times the alpha of the color, as for the other 3D objects.

## Audio
- Compressor, Gate - each channel has its own level detector and gain. One shared state was carried from channel to channel on multi-channel instances. The gain reduction meter of the Compressor averages the channels.
- Crusher - each channel keeps its own held sample and all the channels run on the same sample-and-hold clock (the channels shared one held value and advanced the clock one after another).
- Tube Saturation - the DC blocker removes the offset created by bias (it added it back), and tone keeps its own state per channel, so tone and mix behave the same on every channel.
- Foldback - the signal is left unchanged while it stays within the fold range and is reflected only beyond its edges (the fold also altered the signal inside the range).
- WaveShaper - in the array curve mode a full-scale input reaches the last point of the curve (it stopped one point short).
- Multi BandPass - Q is applied as displayed. It was multiplied by 20 internally, so the bands were far narrower than shown.
- Dynamic EQ - in freq mode the band swept by the envelope has a +12 dB boost. It was built with 0 dB, so the mode left the sound unchanged.
- Cross Fade - the smooth switch is honoured: when OFF the fade jumps to the new value.
- MS Decoder - the right output is Mid minus Side times stereo width (it added the Side signal instead of the Mid).
- Stereo Panner - the left channel uses the same constant-power curve as the right, so the level stays even across the pan range.
- Oscil FM - the sync button resets the phase of the oscillator (it was ignored).
- ADSR - with inverse ON the audio passes while the envelope is idle (it was cut whenever the envelope was not playing).
- Power Scale - values outside 0..1 are clamped to the ends of the curve instead of being extrapolated beyond the output range.
- BPM Detector, Tuner - the detectors follow a change of the audio sample rate (they kept the rate they were created with).
- Audio to MIDI - NOTE OFF messages are sent when the level falls 20 dB below the onset peak, before a new note and when the module is switched off (notes hung). A confirmed onset on the same note re-triggers it. The pitch bend is sent before the note it applies to and reset to the center when a bend of a previous note is still active.
- Partial Tracker - midi out sends NOTE OFF before a new note, after 100 ms without pitch and when the module is switched off (only NOTE ON was sent). The output note is clamped to 0..127 after shift, and the partial arrays are emptied when no peak is found.
- Device In Audio Select - when input number receives an array of several inputs, the first input of the array is no longer skipped in the mix.
- Phaser - low frequency and high frequency read their own values in the patches saved by old versions (both read the same one).
- Grain Sampler - speed mode and window default to their first item. Grain Sampler Legacy - the window list gets an inlet.

## MIDI
- Setup - MIDI - the MSC format list of the MIDI show control section wrote into the MSC device ID setting. It has its own setting, and its first item is all formats.
- MSC Decoder - the device ID and the command are read from the right bytes (one byte too far before), only MIDI Show Control messages are accepted, the Setup MSC format filters the accepted formats (a general format accepts its whole family), and ALL OFF stops the engine when it is running (the condition was inverted).
- MSC Generator - editing Q number, Q list or Q path refreshes the MIDI output device list of the module.
- MTC Generator - the timecode offset of the module settings is applied to the generated MTC.
- MIDI Split - the messages that carry no note or controller number (program change, pitch bend...) are forwarded to every output (they were lost).
- SysEx Editor - send sends the values as edited in the grid, and the values are saved with the patch and read back on load, even with the don't save large in/outlets setting ON (Mapper Values keeps its arrays the same way).
- MIDI Out Name - the first MIDI output device (ID 0) is accepted (it was reported as an invalid device name). With an empty device name the messages go to every active MIDI output.
- Rand MIDI note ON - with channel set to all channels the note is sent on the 16 channels (it was sent on channel 0).
- Swing - new events are stored in the slot the player reads next (they were written one slot past it) and the buffer uses its full capacity.
- Color Out - inside a sub-patch the poly value outlet is no longer hidden.

## Synchro
- Clock - in interval mode the ticks are spaced exactly by the interval. The period was rounded up to a whole number of audio blocks (500 ms gave 502 ms at 44.1 kHz with 128 samples, 511 ms with 512) and the error added up at every tick. More than one interval late, the clock resyncs.

## Data and Operators
- Hysteresis - each element of an input array has its own hysteresis state (one state was shared by all the elements).
- Filter Spring - the simulation is sub-stepped, so a high stiffness or damping with a small mass no longer makes the output unstable.
- Scaling Fold - the fold is computed in one step, so a very large input no longer freezes the module. A NaN or infinite input outputs the minimum.
- Burst Generator - the intervals are counted in fractional milliseconds instead of whole milliseconds per block, so the timing no longer depends on the block size.
- Euclidean Rhythm - the pattern starts on a pulse (x..x..x. instead of .x..x..x), so the downbeat is on step 0 before rotation.
- Perlin Noise - with several octaves the noise is normalized by the sum of the octave amplitudes, so the output stays within 0..1 whatever the persistence. With one octave the frequency is applied (it was ignored). The octaves slider is linear.
- Grain (data) - in random cloud mode a given density value triggers grains six times less often than before: the density is now about a number of grains per minute instead of per 10 seconds.
- Generator Pattern - in constant mode the output is clamped to 1 when param exceeds 1.
- Seq Step, Seq Switch, Seq Triggers - num of steps accepts 1 (the minimum was 2).
- Smooth (color) - honours the no smooth on activation setting like the data Smooth.
- Moving Average - the force enqueue button is available (it was hidden).
- Mapper Curve - in power curve mode the exponent is coeff/25 instead of (coeff-50)/25: a coeff below 50 no longer gives a negative exponent, and the curve drawn for a given coeff changes.
- Mapper Values - mapping in values and mapping out values are also outlets and are saved as regular arrays (older patches still load). The output is recomputed on load and the values grid follows the inlets even while hidden.
- / and Div - dividing by 0 outputs the numerator instead of 0, and dividing by an empty array outputs the numerator instead of an empty array. Power, Exp Scale - a negative base outputs the base unchanged instead of leaving the previous output.
- Operators - cos, sin and the other single-input operators, the comparisons (=, <...) and the bitwise operators compute their output when they are created or loaded, so a new module shows the right value at once (cos showed 0 instead of 1). The two-input bitwise operators, Bit SHL and Bit SHR fed with a single value and an array write every output element (only the first was written). Int to Bit clamps a negative input to 0.
- Multi Compare - the equal index output is -1 for every element without a match (only the first was initialized).
- Color to RGB Legacy - the A outlet is filled with 255 (it was left unset). Change Format - in YUV mode U and V are centered on 128 and clamped to 0..255. * Color - a factor of 1 or more leaves the color unchanged (it was slightly darkened at every pass).
- DBAP Amplitude 2D - speaker area defaults to 1. VBAP Amplitude 2D - both speakers of the active pair use the constant-energy curve, as the Stereo Panner does.
- One by One - moving the speed fader recalculates the copy timing at once (a new speed was ignored until a reset).
- Limit Size - when bypassed the whole input array is passed through (the limit was still applied).
- Array to Ptr - an empty input array signals the change too, so the modules downstream see the array emptied.
- Collection List - insert respects the capacity like add and ignores an empty input. Collection Queue - pushing an empty flow no longer traces a false exceed capacity error.
- CommaTxt to Floats - a comma text holding more values than the module has outputs no longer writes past the last output (the extra values are ignored).
- 3D Editor - the values edited in the grid are written to 3D array in as well as to 3D array out. Points To Matrix Arr - a point mapped to the last cell of the matrix is written (it was excluded). Matrix Arr To 3D - the X and Y of the points are column/rows and line/lines, so the points span 0..(n-1)/n instead of 0..1.
- Str Replace - the replacement is done when the pattern matches only with a different case ('ABC' in 'abc' was left untouched). Str Random - the generated strings can contain the letter s, which was missing from the character set.
- JSON Create - an inlet whose field name is empty shows value-N instead of an empty caption.
- MIDI Selector - the MIDI routing runs at each block (the module was flagged as not needing processing, so it never ran). Mixer (color) - the unused ignore alpha switch is removed.
- Bulk Bus - channel index goes up to 192, and the buses separator is shown above the first bus channel.
- Procedure - new rack + patch num option in the name suffix setting: the procedure name gets the rack and patch numbers appended.

## Global Arrays
- GA Get Value, GA Get Array, GA Get Value Color, GA Get Value string - with output only if changed, the first value read after the module is created or bound to another array is always emitted, even when it equals the initial 0, '' or [0] (the outlet stayed stale). GA Get Value - the patch num - 1 auto index gives the patch order minus 1, as labelled.
- Writing beyond the current size of a global array enlarges it, from GA Trigger, scripts and the SDK alike (it wrote outside the array memory), and reading beyond the size returns 0.

## Chunks
- Faster - the subscriptions are stored per chunk and per item, so a notification on a chunk that nobody watches costs one lookup, and deleting or re-subscribing a module no longer scans every subscription. Loading a chunk file publishes one item list per chunk instead of one per item, a new item notifies its subscribers once with its value (twice before, once empty), and the notifications are posted after the chunk's lock is released, so the threads block each other less.
- Chunk Items List, Chunk Get, Chunk Watch, Chunk List By Item - the modules re-read only the chunks whose items changed, and re-resolve their item patterns only when an item added or removed changes which items the pattern designates. Chunk List By Item handles its two filter inlets on the real-time queue, so a wired filter no longer runs the pass inside the audio thread. Chunk Operation publishes the items added or removed by one operation once per chunk instead of once per item.
- Loading - the patches saved before save version 134 with a chunk name resolve and watch their chunk on load (the name was read but stayed unresolved), and a chunk name pattern starts watching the chunk list as soon as the name changes.
- Reliability - a chunk is removed from the directory under the directory lock, an item added while a chunk is cleared is freed, and nothing is published through the chunk list once it is destroyed at shutdown.
- Statistics - typing the hidden string CHUNKSTATS starts counters on the chunk subscriptions, items, locks and the real-time queue; typing it again traces the report. While it runs, any measured section slower than 50 ms is traced with its thread.

## Scripts
- Faster scripts - the script engine dispatches its opcodes through a table and fuses the most common opcode pairs (compare and branch, index, call). The TParameter methods (AsFloat, AsInteger, AsString, AsArray, AsColor, Length, Caption, Min, Max, ReadFromChunk, WriteToChunk, CopyFromModule...), the TStringList methods and MinS, MaxS, MinI, MaxI are native functions instead of script-level wrappers, so each call no longer costs a script call on top of the native one. Same names, signatures and results.
- New SetGlobalArraySize(name, newsize) procedure. The GA not found errors of the global array functions name the function that raised them.
- New OnReset procedure - called when the script module is reset with its patch or its rack (reset button of the toolbar, reset command of the context menu, reset patch inlet of the Usine Patch Settings module). The script module gets the can be reset option in its properties.
- Send Internal Msg, MCP - in the internal message language a terminal written X1 or X2 is no longer taken for the index 1 or 2 (only digits are indexes), so the terminals named X1 and X2 are found by name. A command sent after SET_TARGET_PATCH to a patch deleted since reports Target patch deleted instead of crashing. DELETE_PATCH, SAVE_WORKSPACE and SHOW_PANEL MIXER act on the current workspace instead of the main one.

## Light and Laser
- Laser Player ILDA - changing the palette re-reads the loaded file and applies it at once, keeping the current frame. The frames of ILDA format 1 (2D indexed) use their own color index (the index of format 0 was read, which gave wrong colors). The short filename and long filename outputs are set when a file is loaded, and setting a position no longer lands one frame off.
- ArtNet SACN In - the universe output reports the universe of the packet being output (it reported the previous packet).
- Clear DMX channels - the channel range starts at 1 instead of 0.
- Set DMX Bus - the on/off switch really stops writing to the bus when OFF, and with send to shared computers ON the DMX values are sent to the network at each new engine cycle.
- DMX plot - the border color computed from a fixture name always falls inside the palette.

## External Devices
- Keyboard - the force shift, force ctrl and force alt switches triggered a panic instead of applying (they shared the callback of the panic button).
- HID-Device - the preferred device saved in the patch is re-selected on load even when it is the first of the list.
- Sensors - the address 1, address 2 and multi values state labels are spelled right.
- PowerShell - the result output starts empty instead of showing script.ps1.

## Network
- MQTT Client - the payload bytes N output receives the bytes of topic N (they all went to payload bytes 1). The topic assigned to each topic out output is saved with the patch, so after a reload each topic comes out on the same output.
- RTTrPM - with * in names to receive, the names output lists the trackable names instead of * for every trackable.

## Files and Browser
- File types - a file is a video, an image, an audio, a MIDI, an ILDA or a shader file only when its extension is exactly one of the list. The test found the extension anywhere inside the list, so a .jpeg was a video (part of mjpeg): the browser gave it the duration and codec of a video, the media export put it into the Video folder, and files named .a, .mp, .p4, .d, .i and so on were accepted as audio, video, MIDI or ILDA files by the drops, the players, the sampler and the export.
- Video extensions - .ts, .m2t and .264 are video extensions: the video tab of the browser lists them (the recordings of the Video Recorder among them), the video dialogs show them, File Lister finds them and a folder dropped onto a files list adds them. The video dialogs also show the .mpg and .mjpeg files, which only a typed name could open.
- Image extensions - .tif and .jpe are image extensions: the browser lists them, the image dialogs show them, File Lister and Video Player Image Multi find them.
- Drop templates - a .mpg, .hap, .webm, .h264, .m2ts, .ts, .m2t or .264 file dropped onto a patch opens the Video template, a .ico or .webp file the Image template and a .bwf file the four audio player templates. Before, the drop did nothing, or added an empty rack onto the racks of a workspace.
- File List Manager - the 3D model file type had its dialog filter and its extension list swapped: the dialog showed no filter and a dropped folder added none of its .dae and .obj files.
- Video thumbnails - a video of fewer than 10 frames gets a thumbnail (its last frame). A video whose pixel format cannot be converted no longer crashes the browser. The thumbnails leaked a scaling context, two frames and, for a broken or audio-only file, a file handle at each selection, and allocated 8 times the memory they needed (66 MB for a 1080p video, 1 GB at 8K).

## AI - MCP
- New tools - save_workspace_as_container saves the current workspace as a container folder, and set_engine_status starts or stops the audio engine, as the main on-off switch of the master panel.
- get_engine_status - reports engine_on, the state of the main on-off switch, and memory_usage_mb, the working set of the Usine process.
- Connection - when a second client connects while one is still connected, the last connected client receives the answers, and the disconnection of either no longer frees a socket still in use. A client killed without closing its connection (the bridge of an assistant session that ends) no longer logs a WebSocket error in the trace.

## Other Improvements
- Smaller files - the values of the hidden controls that have neither inlet nor outlet are no longer written in the patch, rack and workspace files in many modules. The files are smaller and easier to compare in a version control system. Save version is now 136.
- File Lister, File Lister Split - the 3D models and usine chunk files types of the file type list were merged into one entry. They are two choices again.
- File Copy - with an empty destination the module stops after tracing destination not set instead of raising an error.
- Call Procedure - in the 'in a thread' and 'exclusive' processing modes the comma-text outputs of a repeat-for-each procedure are filled item by item (the output was the last item followed by empty items). The comma-text parameters are prepared whatever the order of creation of the parameters, and the results of an execution in a thread are published from the process.
- Workspace containers - the user files of a container (README, .gitignore) are kept on save.
- Undo - the screenshot of the patch is no longer saved in the undo files, which makes an undo step faster. Undo, redo and trash file names include the milliseconds, so two steps recorded within the same second no longer overwrite each other.
- Real-time queues - the real-time message queues are processed every 10 ms whatever the refresh speed setting.
- Patch and Sub Patch - in god mode the info tab of the settings shows the breadcrumb of the patch, and the Sub Patch settings show the info tab of their internal patch.

## Removed Modules
- Time Precise ms - the patches that contain it load a Time ms module instead.
- Panel Patching Matrix - the browser entry is removed; it had no module behind it.

## Bug Fixes
- Control modules - a button or a list module keeps its uid from one load to the next (it took a new one at every load, so the uid written in the file changed at every save).
- File Zip - pressing ESC during a zip stops it and no longer leaves the ESC state set for the next operation.


# Usine HH7 - Release Notes 7.1.261026

This version moves the video engine onto native kernels, which makes most video modules several times faster, brings Skia as the graphic engine on Windows and macOS, ships an MCP package to drive Usine from an AI assistant, and lets the Chunk modules work on several chunks at once. It also fixes a long list of video bugs: crashes and freezes when a video module is deleted, memory leaks, and wrong or missing pixels.

## Graphic Engine
- Setup - graphic engine - the hardware acceleration setting is renamed graphic engine. On Windows the choices are native, skia, skia openGL and skia vulkan (skia vulkan falls back to openGL when Vulkan 1.1 is not available), and skia is the default of a new installation. On macOS the choices are native, skia metal and metal. The Direct2D and GPU canvas choices are removed.
- Usine now starts when the Skia library is missing: it uses the native graphic engine and the log says that the Skia library was not found.

## Video
- Native video kernels - the video filters, mixers, generators, mapping, blur, stylize, geometric, analysis and conversion modules now run on optimized native code, with a Pascal fallback. Most of them are several times faster; the biggest gains are on Video Detection, Blob, Geometric Shuffle, Displacement Map, the generators (Gradient, Checkerboard, Color Bars) and the Video to Color Arr, Video to Data Arr and Color Arr to Video conversions.
- Soft Border - every side now fades to black symmetrically, down to its outermost pixel, with a new curve setting: linear, smooth (the default) or edge blend. Patches saved before open with smooth and can look different.
- Kaleidoscope - a sample point outside the frame is mirrored back into it: the black polygons and the streaks of the edge pixels become a reflected picture.
- Fish Eye - the lens is capped and the points outside the frame are mirrored: the black crescents of the default lens are gone.
- Displacement Map - the inlets are named after what they take: video in 1 (the picture) and displacement map (the map). Patches saved before keep their wires. A map whose proportions differ from the picture is now stretched to it instead of being letterboxed.
- Pixels Distrib - white areas stay white.
- Blob - the min size fader no longer shows a % sign: its value is a fraction of the image (0.01 = 1 % of the pixels).

## 3D
- 3D Text, Path, Ellipse and Rectangle - the shapes are built once per change instead of at every frame, which lowers their drawing cost a lot. The 3D Text font size follows its factor over the whole range.
- 3D Viewer grid, stroke cubes, Billboard Sphere and Quads - built once and drawn in fewer calls.
- 3D Mesh - the instances that show the same chunk item share their geometry, and a position change no longer rebuilds them.

## Audio
- Equalizer - a plateau band gets a third selector in its middle, which moves the whole plateau along the frequency axis and sets its gain. The low and high selectors of a plateau move on the frequency only, the mouse wheel on the mid selector changes both orders, and the plateau order defaults to 16. The draw plateau horizontal lines setting is removed.

## Chunks
- Chunk modules - the chunk name inlet accepts several chunk names and regular expressions, as comma text. Chunk Get gives one payload per item of each chunk, Get Concat concatenates across the chunks, Operation writes to every chunk, Watch triggers on any of them and Items List concatenates their lists.
- Scripts - new DeleteChunkItem function.

## AI - MCP
- MCP package - the Resources/AI folder holds everything needed to drive Usine from Claude Desktop, Claude Code or any MCP client: a bridge that only needs Node.js, install scripts, prompts, and a README with a prompt that lets your assistant do the installation. Turn on enable MCP in the AI tab of the Setup panel.
- New tools - get_engine_status, list_chunks, get_chunk_items and get_chunk_item. set_parameter and get_parameter handle arrays and read the value back.
- get_patch_structure and get_module_info - each port reports its direction and whether it is connected, each module its audio inputs, outputs and channels. A detail parameter (full, terminals, connected or modules) keeps the answer small on large patches.
- The bridge reconnects by itself when Usine restarts.

## Other Improvements
- Workspace containers - media files are searched in the container folder first.
- Floating windows - minimize and maximize buttons.
- Inspector - in the search list, moving with Shift opens the module.
- Module hints - they keep the line breaks and code blocks of the manual pages.
- Memory manager - mimalloc is updated and is now used on macOS too.
- DMX - the DMX device engine is updated to build 7.261026 on Windows and macOS.
- Scripts - DeleteModule, CreateModule when it replaces a module, and SetModuleValue, SetModuleArrayValue or CopyParameterToModuleValue on a setting only work on the main thread. Called from the audio thread they now trace an error and do nothing, instead of freezing Usine. The error tells you to call them from a callback in cbMainThread mode or from ProcessIDLE.
- User modules (SDK) - drag and drop callbacks (AcceptDragOver, DragDrop), GetBlockSize and GetBlockDuration (BlocSize is deprecated), and chunk access through float pointers.

## Removed Modules
- Panel Patching Matrix.
- The legacy Convolution, FDN and Plate reverb modules.

## Bug Fixes
- Deleting a video module, or closing its patch, while it is processing no longer crashes or freezes Usine. This covers the video filters, mixers and generators, Video Out, Player Image while it records, and the SDK video modules.
- XY Pad and Panner - deleting one with the physics engine on no longer crashes.
- Inspector - once the inspector has been opened, an error raised on another thread while a module is being deleted no longer freezes Usine.
- Video frames - under heavy load (4K, 8K, a busy main thread) a module could output the picture of another module or a damaged frame. Fixed in the video filters and mixers, Concat, Selector, Mix Split, the Mapping modules, Video Device Out, Video Mapper Multi, Pixel Mapper, Video Detection, Video To Laser, Video To 3D Points, ML Inference and the SDK video modules.
- Video Delay, Frame Buffer and Strobe - the stored frames are kept when the input pauses or comes slower than the frame lifetime.
- Gradient, Checkerboard, Color Bars and Player Image Multi - no more half-filled or black frames while the picture is regenerated.
- Memory leaks - fixed in Player Image (with video preload images on), Player Image Multi, Color Arr to Video, ML Inference (about 1 MB per inference), the image pool and the video thumbnails of the file browser.
- Video Recorder - deleting it while it records now finalizes the file, which plays. A width that is not a multiple of 8 (1366 x 768, for example) is no longer recorded sheared.
- Video Player, Video Flow, IP Camera and the video thumbnails - with a width that is not a multiple of 8 (854 x 480, 1366 x 768...) the last columns of the picture were black or showed old pixels on Windows, macOS Intel and Linux.
- Video Flow - some streams (1-bit formats, a camera switching to a larger size) wrote past their buffer and could crash.
- A picture fitted into a frame of nearly the same proportions no longer leaves a black row at the bottom or a black column at the right (two-input filters, video inlets with several wires, Recorder, Video Device Out, thumbnails).
- Color Bars - the bars are in the standard SMPTE and EBU order (yellow and cyan, red and blue were swapped).
- Blur Feedback - the trails fade to black again.
- Blur - it keeps the transparency of its source.
- Mapping Perspective, Projection and Grid - hi quality no longer darkens the picture; a quad with three corners on a line and the cells left of the frame are drawn correctly.
- Video Detection - zones no longer vanish or become full-height zones.
- Get Pixel Color - no longer hangs with empty X and Y arrays.
- Pose Estimation - the network saw the picture transposed (left and right swapped, legs often lost).
- ASCII Art - red and blue were swapped on macOS and Linux.
- Shuffle Pixels - every pixel moves near the side edges too, and the pattern is drawn again after a width and height swap.
- Video Device Out - at low quality, a source larger than the window is drawn whole.
- Video Mapper Multi - no output when it is off or has no input (it repeated an old frame), and an empty input no longer crashes.
- Color Arr to Video - the frame is built again when the width, the height or the on/off switch changes.
- Color Arr to ArtNet - no longer writes past its DMX buffer with a start channel near 512 or too many pixels per universe (crash), and no more flickering when the start channel is edited.
- Video to Color Arr, Video to Data Arr and Color Arr to Video - no more crash when a large array grows.
- Video Mix Concat - no crash when memory runs out.
- 3D - changing the color mode no longer crashes on a stroke cube, and the single-color Billboard Spheres are no longer zoomed twice.
- Value editing - after an inline editor closed on its timer or by a click in another window, the keys still went to it instead of the shortcuts.
- Chunk modules - the chunk and item names of patches saved with older versions are loaded.
- Scripts - DeleteModule finds the module in the target patch of the calling script.
- Grid - a standalone grid follows the fade of its parent.
- Serial Port - the user module is back to its 8 October build, and macOS no longer shows two Serial Port modules.

# Usine HH7 - Release Notes 7.1.261014

This version brings three native Comma Text modules and a Chunk filter module, an orthographic camera for the 3D viewer, faster delay lines, and a large revision of the video modules: about forty bugs found while auditing their pixel code are fixed below.

## New Modules
- String / Comma Text / Comma Text Concat;  Comma Text To Array; Array To Comma Text. These three native modules replace the Comma Text scripts, which are removed from the browser.
- Chunks / Chunk Get List By Item - lists the chunks that contain at least one item whose name matches a filter. 

## Improvements
- 3D Viewer - orthographic camera - a new orthographic camera setting replaces the perspective by a parallel projection. In this mode the mouse zoom changes the visible height instead of moving the camera, and the default framing matches the perspective at the pivot plane.
- Object3D Lines, Points and Triangles - the three modules share one rendering path and group the consecutive primitives of the same color, which lowers the drawing cost of large objects.
- Faster Audio Delay - a constant delay time is now processed by vectors.
- Delay Cloud - the pan of each delay is a position between two consecutive outputs, computed once per delay instead of once per output channel.
- Audio Sampler - choosing a file in the files list no longer resets the start position. After the next, previous or random file buttons, the sampler restarts at once in play button synchro mode and keeps its stop-and-play state in loop mode.
- Faster Random modules 
- Setup - CPU count - the number of CPUs used by the engine is shown as a read-only line.
- Setup - don't save large in/outlets - when ON, the inlets and outlets whose array is longer than large in/outlets limit size (1024 by default) are not saved in the patch files. This keeps the files small when a patch holds big arrays.
- Setup - video frame lifetime - the default is raised from 300 ms to 500 ms.
- Workspaces, racks and patches - Large files load faster.
- Ruler - the value labels are sized from the ruler font and aligned on their tick.
- Grid - the element setting snap-to-grid is renamed snap-to-timeline-grid, so it is no longer confused with the snap to grid setting of the panel.
- Procedure - the settings panel no longer shows the filename, general, global and CPU lines of its internal patch, and the description lines are moved to the end. The panel of the internal patch cannot be shown or redesigned.
- Sub Patch - the settings panel no longer shows the filename, name and general lines, and the description lines are moved to the end.
- Modular Connected and network client modules - the connection LED is named connected on all of them.
- Browser - the information of user modules is read from the module again.
- Splash screen - the engine version line is removed.
- User modules (SDK) - float array parameters accept an empty array as input.
- DMX - the Windows 64 DMX device engine is updated to build 7.261002.

## Bug Fixes
- Joystick - A joystick plugged in after Usine started is now picked up without reloading the patch.
- Value editing - clicking inside the inline editor opened on a control did nothing: the caret was not placed and the selection not collapsed. The editor also never closed on inactivity and kept the keyboard focus, which blocked the shortcuts. It now closes after 10 s without typing.
- Plot - cut fixture - the cut command removed the fixture without copying it. It now copies then removes.
- Procedure - the procedure name is saved as entered. The displayed caption, with its patch or user suffix, no longer ends up in the saved name.
- Various video engine and effect corrected.

# Usine HH7 - Release Notes 7.1.261002

## Improvements
- Array Shuffle - amount - moving the amount fader no longer draws a new random order. The order is drawn only when shuffle is pressed, and the amount applies it progressively: the same amount always gives the same order, and raising it adds swaps without undoing the ones already applied.
- Array Shuffle - reset - the reset inlet restores the original order until the next shuffle.
- Array Shuffle - size change - when the size of the input array changes, the elements already shuffled keep their order. Only the new elements are drawn.
- Array Shuffle - the shuffle is now uniform: every order is equally likely. Before, at full amount, an element could never stay at its own position.
- Grid - the fade processing of the grid elements has been rewritten in separate steps (cursor inside the element, cursor outside, fade level, target update). The behaviour is the same apart from the fixes listed below.
- Sub Patch - polyphony - after a polyphony change, the settings panel is refreshed only when it is showing the sub-patch, and the refresh is done by the main thread instead of rebuilding the panel on the spot.
- Switches and LEDs - a flash requested while the previous one is still lit is no longer ignored. Every trigger is taken into account, and a switch that sends its on value on flash sends it each time.

## Bug Fixes
- Grid - fade out - the target of an element now receives the last value of the fade out before the element is closed. The end of the fade was detected before the value was sent.
- Grid - fade out - the fade out level is kept between 0 and 1. It could become negative when the cursor went past the end of the fade.
- Grid - fade out - an element left by the cursor when no fade out applies now silences its target at once. The target was keeping its last level.
- Grid - fade out - an element whose fade out is finished stays silent while the cursor is paused on its end, instead of returning to its full level.
- Grid - fade in - a fade in no longer starts from the level left by an earlier fade out when the element is activated again or when that fade out was finished.
- Grid - ESC - after a fade cancelled with ESC, an element taken over by another cursor fades normally again.
- Step panel - on some macOS versions, dragging a step below the control with a log or exp vertical scale made the step rise instead of staying at its minimum.

# Usine HH7 - Release Notes 7.1.260930

## Improvements
- Global Array - name suffix - a new rack + patch num option in the name suffix list appends both the rack number and the patch number to the array name (for example `MYARRAY-2-3`). The same Global Array can now be unique per patch across several racks.
- Video Analysis - the trigger output is replaced by a motion switch. It stays on as long as the detected energy is above the threshold, instead of firing a single trigger on each block.
- Sub Patch - the settings of a sub-patch are now created together with its controls, so its settings panel is complete as soon as the module exists and no longer depends on a polyphony change.
- Floating windows - the plot panel, the wire monitor, the piano roll, the pixel mapper and the MIDI sampler editor now use the standard resizable window frame, like the other floating windows since version 260921. Their title bar follows the dark theme.
- Display Control - the caption of the control placed on the form is refreshed each time the name is applied, even when the text looks unchanged, so the form always shows the current name.

## Bug Fixes
- Global Array - text arrays - a text array received over the network could write past its buffer when the total number of characters was larger than the number of elements. The buffer is now sized to the full text, packets out of range are ignored, and an error during the update is traced instead of stopping the flow.
- Network - a truncated or foreign packet received on the Global Array and bus ports is now dropped instead of being read past its end.
- MIDI Sampler Legacy - the previous and next buttons of the waveform toolbar now reach the module. They were sending identifiers that did not match the module's buttons.
- Settings-backed controls - a control backed by a settings line (user modules, sub-patch settings) is now checked against the settings count before every access. This fixes a possible crash when the patch description is exported while a module is being rebuilt.
- Patch description - the JSON description of the patch (telemetry, AI/MCP) is no longer generated while a polyphony change is in progress, and an error on one port no longer aborts the whole description.
- Buttons - a mouse press on a button whose owner was being destroyed could crash. The owner is now checked instead of the wrapper control.

# Usine HH7 - Release Notes 7.1.260926

This version focuses on stability. Most of the work is invisible in daily use: it protects Usine against the situations where a patch could freeze, crash or lose its content.

## Stability
- Empty lists - asking for the first or the last element of an empty list no longer crashes. This case could happen in many places (patches, racks, arrays, presets), often at load time or when the last element of something was removed.
- Global Array - the module was thoroughly revised. Its faders and its name field are checked before use, so a Global Array that is partly built, hidden or being deleted no longer brings the patch down. Triggers are now released on the next block instead of staying held.
- Global Constant - the Get Value and Set Value modules (data, color and text) are protected the same way.
- User modules - a user module is now checked before each mouse action and before its settings are created, so closing a patch while the mouse is over one of its modules is safe.
- Images - an image is always released properly, even when an error occurs while it is being drawn. Repeated operations on images no longer leave them locked.
- Memory - graphical controls (waveform, oscilloscope, piano roll, step sequencer, trajectory, spline, shape, grid, XYZ, polygon) only reserve their drawing data when they are really displayed. Large workspaces use less memory, and activating a big patch is smoother.
- Internal checks - the safety checks on internal data access are now active in every version and on every platform. A faulty access is caught and reported instead of silently corrupting memory.

# Usine HH7 - Release Notes 7.1.260923

## Improvements
- User modules - file name - the settings panel of every user module now has an Info tab showing the full path of the module file (read only).
- User modules - settings - settings defined by a user module are now created for all module types, not only simple modules.
- User modules - mouse - each mouse callback (down, up, move) is now checked on its own, so a module that handles only some mouse events still receives them.
- Color settings - color lines in the settings panels show their value on mouse over, and color faders use a smaller value font.
- Text editors - the listbox editor and the info editor now take their text color from the ModernDark style. The buttons of the listbox editor get a lighter background.
- Hints - hints are now positioned and sized relative to the window they appear in, so they display correctly in floating windows.
- Time Ms - the elapsed time is now read from the system clock at each block instead of a cached value, for a more precise output.

## Bug Fixes
- Time - hours and minutes are no longer recomputed on the first block after a patch is activated.
- Additional Input - the rack input/output created by the module is now freed when the module is removed, including when the rack is being destroyed.
- About - two entries of the acknowledgements list were merged because of a missing separator.


# Usine HH7 - Release Notes 7.1.260921 & 7.1.260918

## New Features
- Dark interface everywhere - on Windows, title bars, menu bars, popup menus and dialog boxes now follow the Usine dark palette instead of the system colors. On macOS, the dark appearance is applied application-wide and every window gets a title bar in the Usine palette. Stock controls (addons manager, script editor) use a new global ModernDark style on all platforms.
- Message dialogs - message boxes are now drawn by Usine in its own colors rather than by the system. On Windows, they always show the same title bar icon, and the close cross is grayed when the dialog has no Cancel button.
- Comma Text modules - five new native modules replace the former scripts: Comma Text Remove Duplicates, Comma Text Remove Empty, Comma Text Reverse, Comma Text Sort and Comma Text Split. The Sort CommaText script is removed in favour of the native module.
- Bitwise Get Bit - new module to read a single bit of a value.
- Inspector - search in scripts - new Scripts search option looking into the caption, source code and address of script modules.
- Setup - disable internet connection - new setup line to turn off all internet features (news feed, addons list, online release note). These features are also skipped automatically when no real connection is available.
- SDK - parameters created at runtime - new CreateParam callback letting user modules add parameters after their creation.
- New addons modules - Serial Port (macOS) and UltraLeap.
- AVX2 - the vector library now uses AVX2 instructions when the processor supports them, with automatic fallback to AVX/SSE.

## Improvements
- Math modules - clearer names - Math Addition, Math Subtraction, Math Multiplication, Math Division, Math Int Division, Math Negation, Math X Plus 1, Math X Minus 1, Math 1 Minus X (were Add, Sub, Mult, Div, Int DIV, Minus, Plus 1, Minus 1, 1 Minus). Existing patches load unchanged.
- Logical modules - clearer names - Logical Superior, Logical Inferior, Logical Superior Or Equal, Logical Inferior Or Equal, Logical Different (were Sup, Inf, Sup Equal, Inf Equal, Diff). Bitwise Count becomes Bitwise Pop Count, and Array Remove Duplicate becomes Array Remove Duplicates.
- Division modules - dividing by zero now outputs 0.
- 3D viewport - the 3D view is rendered at the actual zoom level of its panel (up to a 4096 px texture), so it stays sharp when the interface is zoomed.
- 3D Text - the font size factor can now go up to 120.
- Floating windows - floating panels and the trace window are now regular resizable windows; settings and tool panels have a fixed single border.
- Startup - the news feed, addons descriptions and online release note are fetched on a background thread and no longer block the interface at startup.
- Addons manager - faster download of the addons list.
- Workspaces - the loading thread pool is capped at twice the number of CPU cores.
- Trash - backup files and workspace folders are now named with a sortable date stamp (YYMMDD-HHMMSS), and the automatic cleanup only removes date-stamped entries, oldest first. The minimum trash size is lowered to 1.
- MIDI filter - the ON-OFF-BEND-AFT filter of MIDI Input and MIDI Filter now also covers key and channel aftertouch and all notes off.
- Scripts - faster interpreter - the instruction handlers of the script engine can now be inlined by the compiler.
- Scripts - exceptions raised while compiling a script are now reported in the console with their position.
- User modules - drawing paths are only allocated for the modules that really draw paths, and every SDK callback validates its module before use.
- Video Player - the resampling setting is renamed video resampling quality.
- Remote - buttons now send their on value instead of always 1.
- Reliability - range and overflow checks are now kept in release builds on all platforms, and many internal accesses were made safe against destroyed or empty objects.
- macOS / Linux - real-time thread priorities are now set correctly (proper SCHED_RR range, capped at 80 on Linux).

## Bug Fixes
- Floating windows - fixed the white flash when opening a floating window or navigating into a sub-patch on Windows.
- Text - CJK characters - characters with a code above $8000 (Chinese, Japanese, Korean...) were corrupted when passing through text ports.
- 3D viewport - dolly to mouse was vertically mirrored.
- Comma Text - fixed trimming of items, a crash on a negative insert position, and an out-of-range count in Combine.
- Scripts - the ProcessThread procedure was not found because of a case-sensitive lookup.
- Scripts - SetMIDIArrayValue wrote to the wrong index.
- Additional Input - fixed a crash when removing an additional input from a rack.
- MIDI To String - fixed a crash on an empty MIDI flow.
- Faders - invalid (NaN) values are now rejected.
- Switch groups - groups defined in form templates were not registered.
- Grid - wrong number of lines after inserting a line; the height is now adapted after realignment.
- Light Fixture - inherited settings were lost.
- Video Transform - the angle list showed a corrupted degree sign.
- Accented characters - removing accents from file names could produce invalid characters.


# Usine HH7 - Release Notes 7.1.260904

## New Features
- Dark window chrome - Usine now looks dark from edge to edge. On Windows, title bars, the menu bar, popup menus and message dialogs follow the Usine palette instead of the system light theme. On macOS, the dark appearance is applied application-wide and every window gets a title bar in the Usine palette. Stock dialogs (Add-ons, Script Editor) use a new global dark style.
- Comma Text modules - five new native modules in String / Comma Text: Remove Duplicates, Remove Empty, Reverse, Sort (ascending or descending) and Split, which cuts each element at a separator and outputs the parts before and after it as two comma texts. Comma Text Sort replaces the former Sort CommaText script.
- Inspector - Scripts search - new Scripts search option listing the script modules of the workspace, matched on their caption, source code or address.
- Setup - disable internet connection - new setup line to keep Usine fully offline. News, add-ons list and online release note are also skipped automatically when no real internet connection is available.
- SDK - CreateParameters - user modules can export a new optional CreateParameters callback to add parameters at runtime, after the module is created.
- External devices - new SerialPort user module for macOS and UltraLeap user module for Windows.

## Improvements
- 3D viewport - the 3D view is now rendered at the real zoom scale of its panel (up to a 4096 px texture) and drawn with bilinear filtering, so it stays sharp when the patch or the panel is zoomed.
- Startup - news, add-ons descriptions and the online release note are fetched on a background thread. Usine no longer freezes at startup on a slow or missing network.
- Performance - AVX2 - the vector math library now has an AVX2 variant, loaded automatically on compatible CPUs (Windows and macOS Intel), with fallback to AVX / SSE.
- Performance - engine - faster access to data values inside the event container, script opcode handlers can now be inlined by the compiler, the workspace thread pool is capped at twice the CPU count, and the legacy software buffered canvas path has been removed.
- User modules - drawing paths are created only for the modules that really draw and are reused from one paint to the next, and bitmap blits no longer allocate memory on each call. All SDK drawing callbacks now validate the module they receive.
- Reliability - range and overflow checks are now kept in release builds on Windows, macOS and Linux, and many guards were added on destroy paths (grid targets, trace panel, switch groups, module panels, rack device lists).
- Trash - cleanup reworked: backup files and trashed workspace folders are named with a sortable YYMMDD-HHMMSS date stamp, and only date-stamped entries are purged, oldest first. The minimum trash size can now be set to 1.
- MIDI Input / MIDI Filter - the ON-OFF-BEND-AFT filter now also includes key aftertouch, channel aftertouch and all-notes-off messages.
- Scripts - exceptions raised while compiling are now reported in the script console with their position.
- Math modules - division modules output 0 on a divide by zero.
- Add-ons - downloads use a single request instead of two.
- macOS / Linux - real-time thread priorities are now set correctly (valid SCHED_RR range, capped on Linux, errors traced).
- Array Remove Duplicates - the Array Remove Duplicate module is renamed for consistency with the new Comma Text Remove Duplicates.
- Video Player - the resampling setting is renamed video resampling quality.
- 3D Text - the font size factor now goes up to 120.

## Bug Fixes
- Floating windows - fixed the white flash that appeared when opening a floating panel or navigating into a sub-patch shown in a floating window on Windows.
- Text - CJK characters - characters with a code above $8000 (Chinese, Japanese, Korean...) were corrupted when travelling through text flows. Fixed.
- Text - accents - removing accents from a string replaced decomposed accented letters with an invalid character instead of the plain letter.
- 3D viewport - dolly to mouse was mirrored vertically.
- Scripts - SetMIDIArrayValue wrote to the wrong index.
- Comma Text - fixed element trimming, a negative insert index is now ignored, and the combine size is clamped to a valid range.
- Grid - wrong number of lines after inserting a line; the grid is now realigned before its height is adapted.
- Additional Input - fixed a possible crash when removing the module while the rack device lists were being rebuilt.
- Switch groups - switch groups are now registered correctly for controls created from form templates.
- Fader - invalid (NaN) values are now ignored.
- Light Fixture - inherited settings are kept.
- MIDI To String - fixed a possible crash on an empty MIDI flow.
- Remote - user remote buttons now send their on value instead of always 1.
- System Shell - the killall command was broken on Linux by a corrupted character.
- Video Transform - the angle list showed a corrupted degree sign.

## New Features
- Trigger Cascade - new module in the Data category: on start, fires its outputs one after the other, separated by an adjustable interval (ms). Suspend pauses the sequence, cancel stops it, is playing reports the state. From 2 to 64 outputs, chosen when inserting the module.
- Scripts - compiler hints - compiler hints (unused variable, result not set...) are now shown in the script console. The "parameter not used" hint is deliberately silenced, since Usine callbacks have fixed signatures.
- Scripts - exceptions - `try ... except ... finally` blocks and the standard exception helpers are now available in scripts.
- Scripts - Round with precision - new overload Round(x, precision) rounding to a given number of decimals.

## Improvements
- Scripts - per-thread execution - each thread that runs script code now owns its own execution stack: audio Process, main-thread Callback / ProcessIDLE, and ProcessTHREAD. Stacks are allocated on first use only, and never inside the real-time thread.
- Scripts - faster interpreter - the abort flag is no longer polled on every instruction but only on jumps, loops and calls. Scripts run faster and can still be stopped within a few instructions.
- Scripts - buses - GetBusValue now matches SetBusValue (case-insensitive bus names). Previously a name in a different case silently created a second bus.
- Scripts - FastCallback is now marked deprecated; use CallbackMode instead.
- Settings - settings are now looked up case-insensitively when loading a patch, so renamed settings keep their saved value. Many settings gained explicit default values so the reset to default action behaves consistently (fader width and cursor, knob, listbox, switch, wave display, XYZ, trajectory, oscilloscope, step, pixel mapper, video detection...).
- Settings - clearer names - several settings were renamed for consistency, with backward-compatible loading of old files: timecode (was time code), clear bind control, position percent X/Y, width/height percent, top bar selector color/opacity/width, loop selector width, group mouse wheel enabled, nearest & snap to touch selection mode. Video player and waveform panels only show the top bar and show timecode settings when they apply.
- Poly Voice Dispatcher MPE - the MPE Dispatcher MIDI module is renamed and moved with the other poly voice tools.
- Bitwise modules - renamed to Bitwise Get Bit, Bitwise Set Bit and Bitwise Swap Bytes.
- Modbus Client - holding reg N inputs are now named holding register N.
- Interface - the can animate property of controls is renamed mouse over effect, which describes what it does.
- Scripts - the developer-only fixed location script setting has been removed.

## Bug Fixes
- Scripts - VarArrayCreate built arrays with wrong bounds (for example `[0, 4]` was read as `[0, 0]`), and VarArrayRedim ignored its new high bound. Both are fixed.
- Scripts - `VarArrayGet(A, [i])` and `VarArraySet(A, [i], v)` no longer fail with an ambiguous overload error.
- Racks - fixed a double lock when rebuilding a rack that left the section owned forever on Windows and deadlocked on macOS/Linux.
- Remote - the value range used for remote scaling was computed as max - max instead of max - min.
- Video Player - the legacy color and wave color settings are now correctly removed from the video player panel.
- Master Light - master dimmer now defaults to 1 and DMX USB device to 1.

# Usine HH7 - Release Notes 7.1.260831

## New Features
- Scripts - chunk existence checks - two new functions ChunkExist(name) and ChunkItemExist(name, item) to test whether a chunk or a chunk item exists, without creating it as a side effect.
- Scripts - color arrays - new asColorArray(index) getter and setter on parameters to read and write color array items element by element, like asArray but for colors.
- Scripts - multi-dimensional arrays - array types can now be declared with several dimensions in one go: `array [1..10, 1..10] of integer` is equivalent to the nested form `array [1..10] of array [1..10] of integer`, with any number of dimensions.
- Scripts - float literals - exponent notation without a decimal point is now accepted: `1E-9`, `1E9` and `1.0E9` all work (previously only `1.0E-9` compiled).
- SDK - chunk existence checks - new sdkChunkExist and sdkChunkItemExist functions for module developers, mirroring the script functions. Modules built against older SDK headers remain fully compatible.
- 3D Viewer - new global variables mouse-3d-left/middle/right-down-triangle-index giving the index of the triangle that was clicked in a mesh, alongside the existing vertex and mesh indexes.

## Improvements
- Wire monitor - now displays up to 256 values of an array (was 16).

## Bug Fixes
- Faders - fixed a problem when editing values directly on faders.
- Modules - the query window (shown when inserting a module to choose, for example, the number of channels) was not working.
- Camera - fixed a bitrate value handling issue in the camera library.

# Usine HH7 - Release Notes 7.1.260827

## New Features
- KNX modules - three new modules in the Network category to talk to KNX building-automation installations (lights, dimmers, blinds, sensors) through a KNXnet/IP interface:
  - KNX Connection - manages the tunneling connection to the KNX/IP gateway.
  - KNX Group Send - writes values to a KNX group address (switch, dimming, temperature, etc.).
  - KNX Group Receive - listens to a KNX group address and outputs incoming values.
- 3D Viewer - new global variables mouse-3d-left/middle/right-down-mesh-index to know which mesh was clicked in the 3D scene, and a new camera modified with the mouse setting.

## Improvements
- Modbus Client - major rework: each module now uses its own connection, contiguous registers are grouped into single read/write requests (much faster with many registers), proper connect/read timeouts, and a clean reconnection when the host or port changes.
- Add-ons Manager - action buttons are now disabled while an operation is in progress (no more accidental double actions), and download failures are clearly reported.
- MQTT Client - default broker is now mqtt.brainmodular.com, with a 30 s keep-alive.


## Bug Fixes
- Data Mix Mixer - the mix values array is now applied as a true input × output matrix: each output uses its own set of mix values instead of all outputs reusing the first ones. Mix values now default to 1 (signal passes) instead of 0.
- Audio Mix Volume - the mute switch now fully silences the output in all situations.
- Fixed a possible crash when rebuilding polyphonic sub-patches (for example when changing the polyphony count).
- Grid - tempo is now applied correctly with bar lists, and the tempo is reset when clearing the workspace.
- Video Mix - the incrustation mode now renders correctly (it was using an additive blit).
- Fixed the fit size button and the show grid at startup setting not responding.
- Fixed positioning issues when editing a control's text in place.
- The interface stays responsive while a dialog box is open.

# Usine HH7 - Release Notes 7.1.260727

## Improvements
- Contrast bulk commands - the contrast + / contrast - bulk procedures in the Setup ▸ Debug tab are now available in release versions.
- Troubleshooting - new expert setting disable all user modules: skips loading of user modules at startup, handy to isolate a problematic module.

## Bug Fixes
- Usine Remote - trigger buttons with no attached module (like grid next/previous) are now properly released after being pressed from the remote.
- Usine Remote - more robust startup and shutdown: no more possible crash when the remote asks for status before the workspace is ready, or when closing the connection.
- Fixed flicker when the settings panel rebuilds (for example when re-editing a control from the contextual menu).
- Fixed a possible crash related to the control panel lifetime, especially with polyphonic sub-patches.

# Usine HH7 - Release Notes 7.1.260723

## Improvements
- Modular wires - wires are now drawn as true hanging cables (catenary curve): they fall naturally from both connectors

## Bug Fixes
- Fixed wrong scale calculations in the ruler.
- Modular wires were not drawn during drags.

# Usine HH7 - Release Notes 7.1.260722

## New Modules
- Network ▸ TUIO Receive - receive multitouch data from any TUIO 1.1 source (touch tables, tablets, tracking software). 
- MIDI ▸ MPE Dispatcher - spreads an incoming MPE stream over polyphonic voices, with per-note pitch-bend, slide and pressure outputs. 

## Improvements
- Tab navigation between faders - faders have a new tab order setting; while editing a value, press Tab / Shift+Tab to jump to the next/previous fader, including inside sub-patches.
- Very large audio files - WAV recording and playback now support the RF64 format, removing the 4 GB limit for long recordings and huge sample files.
- MIDI sampler - a new current PB parameter exposes the pitch bend, and lets the patch set it directly.
- 3D viewport - mouse picking on 3D objects now also returns the vertex index that was hit.
- Faster networking - sending all Global Array values to remote machines no longer blocks the sender, and network adapter selection is more reliable.
- Array Expand/Compress - the factor range is extended from 0.01–20 to 1/128–128.
- Patch comments now use a fixed-width font for cleaner alignment.
- Updated device engines (Audio, MIDI, DMX, Laser, Plugin wrapper) for all platforms.

## Bug Fixes
- Fixed a rare case where two polyphonic voices could grab the same note at the same time.
- Fixed hanging notes when a mono voice was stolen by an overlapping note-on (MPE and mono modes).
- The bar start position is now reported correctly to VST/AU plugins, improving bar/beat synchronization inside plugins.
- Audio vu-meter: the control now shows the correct audio wire color.
- OSC bundles are not handled properly.
- Multi channel audio recording with large number of audio channels.
- Various GUI details.
- Many stability improvements in the patch engine.
