68 Commits
Author SHA1 Message Date
Todd Naugle 47b1a5b222 Move WallClock transport master to ifdef since it breaks session compatibilty
The new enum causes sessions made with this version to "crash" older
versions.

ifdef out Wallclock TM and add an enum hack_table entry. Versions compiled
this way will be compatiable when Wallclock gets turned back on at a later
time.
2026-10-15 16:58:37 -05:00
Todd Naugle b5262cc6ff Control Surfaces: Short term hack for automatic activation deadlock.
The reader lock was added during probe to a cure rare crash that happened
when the control protocol info was in the process of being deleted while
probe was running.

This does not work because if automatic device activation is on and a
device with this ability is found (FaderPort), the activate/deactivate
calls from here will try to take the Write lock and trigger a deadlock.

This code is in the process of being reworked as part of a feature branch,
so apply a band-aid for now. Drop the lock before calling
activate/deactivate
2026-10-15 15:01:17 -05:00
Todd Naugle 3ad1a095c3 Make the splash window background a different color than the app.
NOP for Ardour.

Other products us a transparent logo image which leaves
the splash window the same color as the application background. That
makes the splash window have no delineation once the main up comes up.
2026-06-05 11:54:29 -05:00
Todd Naugle cdd0429d40 Remove unused ui_light and unused color aliases 2026-05-05 13:00:35 -05:00
Todd Naugle a483fc2675 NOP - Sort color files based on name attributes. 2026-05-05 12:16:11 -05:00
Todd Naugle 28b97e9bf5 Add boot messages and log information to Audio/MIDI device detection.
On Windows this can take many seconds and in error cases, minutes. Collect
some more infomation on how long this takes on various systems and
also tell the user what is going on.
2026-04-10 15:53:25 -05:00
Todd Naugle 8dd399709e Move splash creation to very early in the startup process.
On some Windows systems, detecting audio/MIDI devices can take a long time.
If something goes wrong, it can take minutes. This can leave the user
in the dark since nothing appears on the screen to confirm that the
program is running.

While other OSes don't have this problem, it seems like acknowledging
that we are running as early as possible is a good thing.
2026-04-10 15:53:25 -05:00
Todd Naugle 3a594ddb41 Leave the console/text receiver so log message go to both places.
This make debugging user issues better since running from the console
will have more progress steps and informaiton.
2026-04-10 15:53:25 -05:00
Todd Naugle 69987b563c ignore waf directory on msys builds. 2026-04-10 15:53:24 -05:00
Todd Naugle d220a1690d Add tooltips for Left/Right/Bottom Panel visibility buttons 2026-03-06 22:30:40 -06:00
Todd Naugle a651bc818b Fix open-with crash caused by adjusting the priority of the main thread. Windows
Opening a session using open-with or by double clicking the session
file in the system file browser would crash (abort). Starting
the program first and then opening the session file worked.

The abort was deep in gtk when it failed to create threads for
async operations (g_task_thread_pool_init). The failure was
due trying to create new threads with a priority that matched
the caller. In this case the caller was running with elevated
priority and the thread creation would fail.

The elevation of priority for the main thread happend during the engine
start process. Code in the MIDI input device callback was elevating the
priority of the thread that called the callback the first time. midiInOpen
calls the callback function with MIM_OPEN as part of the windows
MIDI open call. This meant that the main thread was being elevalted.

    at ../libs/backends/portaudio/winmmemidi_input_device.cc:224

    at ../libs/backends/portaudio/winmmemidi_input_device.cc:80

The main thread should not be running with elevalted priority and when
MIDI data is sent the callback is called from a windows driver thread.
We should not attempt to adjust the priority, so this code was removed.

During normal startup, the New Session dialog triggers the gtk filesystem
worker threads and since this was before the audio engine started
the prioriy had not been elevated yet and everyting worked fine.

If the system had no MIDI ports, this code was never executed and
open-with worked fine

During a normal startup (with MIDI)  the main thread would get set
to Class normal, Priority 17. If buffered IO was used in the audio
MIDI setup, the main thread would be Class high, Priority 12.
2026-02-21 15:54:56 -06:00
Todd Naugle 192a976cf9 Fix dll path when running from source with msys
For ardev to work on windows (msys) the enviroment variable for the
DLL path needs to be used.

Without this, ardour fails to find the VST(3) scanner programs.
2026-01-21 21:30:28 +01:00
Todd Naugle fbc4156eac Spelling Fix 2025-08-13 17:05:35 -05:00
Todd Naugle 0b50bec6f4 MCU: Update view modes for Cue, Foldback, and VCA
This changes the function of the Inputs, Instruments, and Outputs
buttons as follows:

Inputs = Cue Tracks
Instruments = VCA
Outputs = Foldback Busses
2023-03-13 12:21:49 -05:00
Todd Naugle db8262bd7b Mackie Control: Use view names from Mackie spec and define them all 2022-08-05 00:50:27 +02:00
Todd Naugle de0893cc8d backport to Ardour: Don't set the MCU Click led state from the button
Allow the update process to get the correct state and update the LED.
2022-08-05 00:43:02 +02:00
Todd Naugle d5113e6e91 Don't crash if the click is missing 2022-08-05 00:41:37 +02:00
Todd Naugle be90b4e0ca US2400 - fix crash when no strip is selected
first selected could be null, so check that first.
This is untested since I don't have a surface.
2022-05-10 09:17:33 -05:00
Todd Naugle 4e55c77d23 Speed up code signing during osx builds
Use xargs to parallelize calls to codesign for much faster results.
The thread count should really be turned into an env variable
or auto detected.
2022-03-14 23:02:33 -05:00
Todd Naugle f60c078805 Fix Windows installer welcome page for Mixbus products. 2022-03-11 12:12:12 -06:00
Todd Naugle dd1156e900 Improved reporting of glib throw errors during session creation 2022-02-23 17:32:09 -06:00
Todd Naugle 2217e8d9ce Log text passed to a dialog needs escaped to avoid markup errors
For example, the following log text creates a markup error that results in
the session loading dialog being completely empty.

WARNING: VST3<C:\Program Files\Common Files\VST3\Plugins.VST.Someplugin.vst3\Contents\x86-win\Plugins.VST.Someplugin.vst3>: Invalid Module Path
...

Gtk-WARNING **: 16:46:28.447: Failed to set text from markup due to error parsing markup: Error on line 7 char 40: ?Files\Common? is not a valid name: ?\?
2022-02-23 10:25:46 -06:00
Todd Naugle fa29647246 Fix dmg failure caused by out of space issue
With no clear reason why, copying the program to the dmg is running
out of space. Possibly a bug in latest catalina.

Instead of using a fixed extra space amount. Add 25% of the Product Dir
size to the dmg size.
2022-02-04 15:24:24 -06:00
Todd Naugle d2a5fa2d9f Fix trap error case
At this point TMPDMG already has .dmg added to it and
the original mktemp file was removed above.
2022-02-04 15:18:29 -06:00
Todd Naugle d04d25e7c7 Mackie Control: Clean up detection of QCon master display and meter.
Only enable the master display and meter modes for Qcon devices if this
surface is in the master position. Extenders don't have master meters
or master displays.
2021-12-13 21:26:45 -06:00
Todd Naugle d60a5187bd Mackie Control: Fix detection of QCon Extenders so 2nd LCD is correct
Logic to detect an extender has to be based on if this surface object is
the master position. Has master fader is true for all surfaces in this
"device".
2021-12-13 21:25:07 -06:00
Todd Naugle bd008fb87c Mackie Control: Fix logic in timecode display update
Old and new strings are compared before sending to keep traffic down. To
ensure that we send all the required characters be sure to init the last
value to characters that are never going to appear in a real string.

Space is a bad choice since it is a valid character. Use NUL instead.
2021-08-10 16:20:36 -05:00
Todd Naugle 4001fc2cff Mackie Control: Use space as replacement for invaild characters on TC disp 2021-08-10 16:17:11 -05:00
Todd Naugle 563309f6d1 Mackie Control: Fix one off error in timecode display that broke spaces
Ignored spaces and allowed character 0x60 which is not valid on the display
2021-08-10 16:16:08 -05:00
Todd Naugle 8cf7204917 Mackie Control: Use selected device's info when building the Keys dialog
The device info file allows key names and values to be configured in each
device file. Use that information when building the Functions Keys tab in
the Mackie protocol setup dialog.
2021-08-06 12:18:24 -05:00
Todd Naugle c1dddb1b25 Mackie Control: Be consistent and take the surfaces lock when iterating.
Some places in the code take the lock, others don't. This makes everyone
take the lock.
2021-08-03 16:26:26 -05:00
Todd Naugle a84543bcc7 Mackie Control: Don't crash when the master is on the right
While surfaces are being created it is possible to have surfaces, but
not have a master surface yet. This happens when the config calls
for extenders to the left of the master section.  Don't assume that
if we have surfaces, the master surface is available.
2021-08-03 16:26:26 -05:00
Todd Naugle 454b330950 Mackie Control: Hold the surfaces lock while resetting the master_surface 2021-08-03 16:26:26 -05:00
Todd Naugle a22fe3cdc8 Amend 285bb4ac7f: remove incomplete code 2021-07-19 20:32:11 -05:00
Todd Naugle 285bb4ac7f Mackie Control : Improve debug trace output by skipping meter write output 2021-07-19 12:25:27 -05:00
Todd Naugle 581589f080 Mackie Control: Don't call port write directly since it bypasses active chk
This keeps the master fader from sending midi output before everything
is initialized.
2021-07-19 12:24:36 -05:00
Todd Naugle ff1d5e7aeb When reconnecting ports, don't give up on first failure.
If there are multiple connections, one might fail due to missing hardware,
but the rest could still be valid.

An easy way to reproduce this was to route "mackie control out" to a device
and to the Midi tracer port. When you opened the session again, connection
from the "mackie control out" to the device would not get restored because
the Midi tracer port does not exist at session start.

This most likely caused other issues with connections when changing backends.
2021-07-13 17:47:33 -05:00
Todd Naugle 45f9b45bff Mackie Control Surface: Improved support for iCON QCon Pro X
Support the second LCD on the Pro X and use it for channel strip labels.

Support the stereo master meters on the Pro X
2021-07-02 16:00:51 -05:00
Todd Naugle 7a5ccdd3c3 Mackie Control Surface: Move meter deflection calc to a function. 2021-07-02 15:56:11 -05:00
Todd Naugle e94239cc92 Mackie Control Surface: Update the meters even when the transport is stopped 2021-07-02 15:53:20 -05:00
Todd Naugle 41ac0cb753 Mackie Control Surface: Correctly handle the Monitor section being removed.
Adding a Monitor section updated the surface but removing one did not.
2021-07-02 15:51:53 -05:00
Todd Naugle c63918ec68 Clear Mackie Control surfaces once connected.
This gets the surface in a known state. Otherwise a previous application
or run of ardour may have left LEDs on that are not being used.
2021-07-02 15:43:37 -05:00
Todd Naugle f212ace6f6 Change Mackie Control combined meter to use a peak meter with falloff
Mackie surfaces use a special peak meter type that returns the maximum
peak for all channels in the strip. The issue was that the implementation
of this meter did not follow the falloff the other peak meters. If a real
peak meter and a combined peak meter were displayed on the surface at the
same time the missing falloff was obvious.

Don't calculate the combined meter during run. Instead calculate it only
when needed based on the already existing individual peak meters.
2021-07-02 15:39:01 -05:00
Todd Naugle 944eae53e6 Add a Midi port per Midi Tracer window that can be connected to for debugging. 2021-06-23 17:54:58 -05:00
Todd Naugle 6f251f8b2f Fix Midi Tracer handling of different port types
Transport Masters and Async MIDI port already have a parser available, so
just connect to it.

Normal Midi ports are the only one that need to use the Midi Tracers parser.
2021-06-23 17:54:58 -05:00
Todd Naugle 89eab2714f Fix double call error in midi tracer handling
Only basic midi ports use the _trace_parser and they enter
here via cycle_start which will pass the _trace_parser to
this function. No need to double up calls.
2021-06-23 17:54:58 -05:00
Todd Naugle 5adbcd0673 Add function to find transport master by port and expose midi parser 2021-06-23 17:54:58 -05:00
Todd Naugle 1a1e67f595 Use Posix style return values for sem wait when on windows.
0 on success, -1 on error
2021-05-27 15:17:15 -05:00
Todd Naugle be6d0fa95c Do not use named semaphores on Windows since they are system wide
https://docs.microsoft.com/en-us/dotnet/standard/threading/semaphore-and-semaphoreslim#named-semaphores

Running multiple instances of Ardour or Ardour/Mixbus would fail in very
odd ways since they would signal each other. Unnamed sems are
correct for this use case.
2021-05-27 15:13:40 -05:00
Todd Naugle 3a3fcd0d2d Don't crash if master fader is not avaliable.
If the wrong device profile is selected (ex Xtouch One) but another device
is connected (Xtouch), it is possible to have a master fader on the
device, but not in the code. This would then cause a crash when the
master fader was touched.

This just protects from a wrong configuration.
2021-05-13 12:08:09 -05:00
Todd Naugle 4d815554dd Various Control Surfaces: Fix one off in calculation of fader position
MIDI pitch bend holds 14 bits (16384) which gives values of 0 to 16383.
2021-05-07 18:02:44 -05:00
Todd Naugle d2ba90b2c1 Fallback to the default export path when the saved export path is not found.
Previously we would end up with an export path of top level session
directory.
2021-05-07 12:25:42 -05:00
Todd Naugle 9e6b85f330 Don't save a leading slash when storing a relative export path.
It is not needed in the relative case and causes issues when taking
sessions between platforms.

On windows, the default path would be "\export". When that is used
on linux the resulting fullpath would end up as

/your/session/path/\export

which is then not found on the file system.

This change is consistent with how relative paths are normally written and
does cure the default path when moved across platforms.

It does not solve the larger issue of mixed directory separators.
A relative path of "export\myMixV1" will still fail when moving between
platforms.
2021-05-07 12:25:42 -05:00
Todd Naugle 8b18d7ab61 Add entitlements to get plugins working
Same settings as other signed DAWs
2021-03-17 15:16:22 -05:00
Todd Naugle 7cd1b2c64c Add support for signing and notarizing packages on MacOS 2021-03-15 09:51:57 -05:00
Todd Naugle 10a05d8769 Add entitlements file for OSX signing 2021-03-12 12:38:44 -06:00
Todd Naugle b3f019b8b7 Use the program icon for the uninstaller on windows.
Otherwise the default nsis one is used.
2021-02-08 10:36:21 -06:00
Todd Naugle f49aedaa39 Fix odd right click crash on master track.
To reproduce. Launch, right click in ruler area then drag down
until over the master track and let go.

#0  0x0000555555ba1d44 in boost::shared_ptr<ARDOUR::Route>::get() const (this=0x8) at /usr/include/boost/smart_ptr/shared_ptr.hpp:748
#1  0x0000555555ba0a2f in boost::dynamic_pointer_cast<ARDOUR::Track, ARDOUR::Route>(boost::shared_ptr<ARDOUR::Route> const&) (r=...)
    at /usr/include/boost/smart_ptr/shared_ptr.hpp:904
#2  0x000055555650b92b in RouteUI::track() const (this=0x0) at ../gtk2_ardour/route_ui.cc:1885
#3  0x0000555555d0b92f in Editor::popup_track_context_menu(int, int, ItemType, bool) (this=
    0x555557a3efd0, button=1, time=600214966, item_type=StreamItem, with_selection=false) at ../gtk2_ardour/editor.cc:1595
#4  0x0000555555e1a4cf in Editor::button_release_handler(ArdourCanvas::Item*, _GdkEvent*, ItemType) (this=0x555557a3efd0, item=
    0x555557b2fe00, event=0x7fffffffc310, item_type=StreamItem) at ../gtk2_ardour/editor_mouse.cc:1543
....
2020-03-03 13:49:04 -06:00
Todd Naugle 22e5374389 Always set the natural position timestamp when importing audio files.
If the file has a timestamp, it should be set in the region during import.
This keeps the BWF timestamp from being lost and allows the region context
menu item "Move to original Position" to work.

It does not affect where the region will be positioned during import. That
still follows the import dialog menu selection (playhead, session start,
etc). It just maintains data that the user can decided to use if needed.

This change also allows files to be imported to the source list and then
later placed on the timeline in the correct timestamped position.
2020-02-24 13:16:32 -06:00
Todd Naugle 06d4dc0ede Fix uninitialized member variable. 2020-02-24 13:16:32 -06:00
Todd Naugle ceea3e3311 NOP: No need to set this variable to itself. 2020-02-24 13:16:32 -06:00
Todd Naugle ba495e2051 Add a device for X-touch + two X-touch compact devices.
This also works for X-Touch with x-Touch extenders.
2019-06-14 13:36:56 -05:00
Todd Naugle ac4867089a Add mackie device for X-Touch + X-Touch Compact 2019-06-13 14:20:02 -05:00
Todd Naugle d4a089937b Populate the buffer size combo when connecting to jack that is already running.
This would crash (throw) if ardour was started with an invalid backend
(alsa with no devices avaliable) and then changec to an alredy running
jack. The invalid backend at the start would leave the buffer
size combo empty and switching to the running jack backend did not populate
buffer size list.
2017-08-10 09:49:22 -05:00
Todd Naugle cbd310ef65 Move check for detected bundle earlier in install process.
Previously if the bundle being installed did not support the detected
system the user would get an error message about the .size file
being missing.
2016-09-02 10:39:23 -05:00
Todd Naugle fd3772a40f Fix spelling 2016-02-10 13:25:14 -06:00
Todd Naugle cb0b22cb79 Hide create new item from Group Tab context menu
Creating a new empty group from the group tab area just looks broken since
nothing visible happens, so hide this item when the context menu is
triggered from this location.
2015-09-21 16:50:45 -05:00
Todd Naugle ad829239d6 fix typo in jack version messages 2013-05-16 08:58:10 -05:00