View Issue Details

IDProjectCategoryView StatusLast Update
0009825ardourbugspublic2024-10-15 05:45
Reportertaylor.fish Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
PlatformDebian GNUOSLinuxOS Version(any)
Product Version8.9 
Summary0009825: Automation data is corrupted/lost when LV2 plugin changes port indices
DescriptionIf an LV2 plugin changes the index of one or more of its (control) ports, existing Ardour sessions that contain automation data for those ports are not loaded correctly. The automation tracks for those ports may be entirely empty, or they may erroneously contain the automation data of a different parameter, and parameters that previously had no automation points may now contain some of the misplaced automation data from other parameters.

I believe this is an issue in Ardour because my understanding of the LV2 specification is that port indices are not considered constant and are allowed to change without being considered a breaking change [1].

I discovered this issue due to a change in LSP Filter [2]. A parameter was removed which caused the indices of many ports to be shifted down by one, and now any existing sessions that automate the cutoff frequency of LSP Filter no longer load correctly. (The frequency automation data incorrectly appears on "Filter slope", and because the lv2:maximum of that parameter is only 7 rather than 24000 for frequency, all the points are maxed out at "x16" slope.)

[1]: https://lv2plug.in/ns/lv2core#Port
[2]: https://github.com/lsp-plugins/lsp-plugins-filter/commit/17b7f292fddbf275ee639e27190973f510d36402#diff-d41d153f7ec730daa3d0d0b4bbbdc58026c8e3bb8ebad7ea66e93ac1f1e52463L119
Steps To Reproduce1. Compile and install the LV2 example amplifier plugin (eg-amp):
    git clone https://gitlab.com/lv2/lv2.git
    cd lv2
    meson setup build
    meson compile -C build
    ln -sr build/plugins/eg-amp.lv2 ~/.lv2/

2. Create a new session in Ardour.
3. On the Master bus, add an instance of eg-amp ("Simple Amplifier" by "Unknown").
4. Show the automation track for the Gain parameter of Simple Amplifier.
5. Add some random points to the automation track.
6. Save the session and quit Ardour.

7. Swap the indices of the "gain" and "in" ports in eg-amp and recompile (run these commands from the "lv2" directory cloned in step 1):
    sed -i '/enum/y/01/10/' plugins/eg-amp.lv2/amp.c
    sed -i '/lv2:index/y/01/10/' plugins/eg-amp.lv2/amp.ttl
    meson compile -C build

8. Start Ardour and open the session created in step 2.
9. Observe that the automation data for the Gain parameter of Simple Amplifier has disappeared.
Additional InformationTested on commit 2d0f472af5ebe427526093d276788d7a1514254e, 2024-10-15.
Tagsautomation, lv2

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2024-10-15 05:45 taylor.fish New Issue
2024-10-15 05:45 taylor.fish Tag Attached: automation
2024-10-15 05:45 taylor.fish Tag Attached: lv2