ardour.git
7 years agorework locking (fa07233a, 112fba182)
Robin Gareus [Wed, 14 Dec 2016 12:42:45 +0000 (13:42 +0100)]
rework locking (fa07233a112fba182)

For now: use a single lock, which should fix all related crashes.
optimize (with less contended partial locks) if this works.

7 years agoGUI changes to allow user to specify how/if to use SMF track/instrument names during...
Paul Davis [Wed, 14 Dec 2016 12:31:16 +0000 (12:31 +0000)]
GUI changes to allow user to specify how/if to use SMF track/instrument names during import

7 years agochange ordering of options for multichannel import
Paul Davis [Wed, 14 Dec 2016 11:45:37 +0000 (11:45 +0000)]
change ordering of options for multichannel import

7 years agotemporary default value for ImportStatus.midi_track_name_source
Paul Davis [Wed, 14 Dec 2016 11:45:18 +0000 (11:45 +0000)]
temporary default value for ImportStatus.midi_track_name_source

7 years agouse SMF track or instrument names in imported MIDI track names, if requested
Paul Davis [Wed, 14 Dec 2016 11:44:40 +0000 (11:44 +0000)]
use SMF track or instrument names in imported MIDI track names, if requested

7 years agoadd new member to ImportStatus object to allow specifying how to name new MIDI tracks
Paul Davis [Wed, 14 Dec 2016 11:44:01 +0000 (11:44 +0000)]
add new member to ImportStatus object to allow specifying how to name new MIDI tracks

7 years agoadd a new enum to identify how SMF data should be used when naming imported MIDI...
Paul Davis [Wed, 14 Dec 2016 11:43:23 +0000 (11:43 +0000)]
add a new enum to identify how SMF data should be used when naming imported MIDI tracks

7 years agoadd API to Evoral::SMF to retrieve all track/instrument names for use when importing
Paul Davis [Wed, 14 Dec 2016 11:42:54 +0000 (11:42 +0000)]
add API to Evoral::SMF to retrieve all track/instrument names for use when importing

7 years agoextract track and instrument names from SMF while loading
Paul Davis [Wed, 14 Dec 2016 11:42:10 +0000 (11:42 +0000)]
extract track and instrument names from SMF while loading

7 years agoadd braces and warning for unlikely error
Paul Davis [Wed, 14 Dec 2016 11:41:09 +0000 (11:41 +0000)]
add braces and warning for unlikely error

7 years agofix incorrect test for textual meta events in libsmf
Paul Davis [Wed, 14 Dec 2016 11:40:44 +0000 (11:40 +0000)]
fix incorrect test for textual meta events in libsmf

7 years agobraces please
Paul Davis [Wed, 14 Dec 2016 11:40:27 +0000 (11:40 +0000)]
braces please

7 years agobraces, please
Paul Davis [Wed, 14 Dec 2016 11:40:07 +0000 (11:40 +0000)]
braces, please

7 years agofree track name/instrument string memory when necessary
Paul Davis [Wed, 14 Dec 2016 11:38:31 +0000 (11:38 +0000)]
free track name/instrument string memory when necessary

7 years agoadd track and instrument name members to smf_track_t
Paul Davis [Wed, 14 Dec 2016 11:37:35 +0000 (11:37 +0000)]
add track and instrument name members to smf_track_t

7 years agoimproving logic/flow for SMF type 1 files part 1:
Paul Davis [Tue, 13 Dec 2016 16:48:20 +0000 (16:48 +0000)]
improving logic/flow for SMF type 1 files part 1:

check num tracks for type1 and offer multichannel option if appropriate

7 years agorelease locks before deleting record
Robin Gareus [Wed, 14 Dec 2016 01:25:13 +0000 (02:25 +0100)]
release locks before deleting record

7 years agoamend prev commit
Robin Gareus [Tue, 13 Dec 2016 23:51:40 +0000 (00:51 +0100)]
amend prev commit

7 years agomutex 'er up
Robin Gareus [Tue, 13 Dec 2016 22:46:55 +0000 (23:46 +0100)]
mutex 'er up

Some overzealous locking to track down RequestObject related crashes.

bc0fa4d689a4 wrongly locked the current event loop's
request_invalidation_lock instead of the invalidation's list lock.

Also Abstract UI is able to delete requests concurrently with with
EventLoop invalidation.
e.g. PortManager::PortRegisteredOrUnregistered  and GlobalPortMatrixWindow
so the lock needs to be exposed.

If this solves various issues, mutexes should to be consolidated
(request_buffer_map_lock + request_invalidation_lock) and be chosen
such that there is as little contention as possible.

7 years agotest diff for patch change performance when caching colours.
nick_m [Tue, 13 Dec 2016 17:05:08 +0000 (04:05 +1100)]
test diff for patch change performance when caching colours.

7 years agowhen dragging or copying multiple regions, respect position lock style.
nick_m [Tue, 13 Dec 2016 15:08:59 +0000 (02:08 +1100)]
when dragging or copying multiple regions, respect position lock style.

- music-locked regions are moved by drag beat distance
  (will conform to tempo changes over the drag distance)
  audio-locked regions are moved by frame distance.

7 years agochanges to adapt to modified version of GTK/Quartz which uses only MOD2 for Command...
Paul Davis [Tue, 13 Dec 2016 11:22:51 +0000 (06:22 -0500)]
changes to adapt to modified version of GTK/Quartz which uses only MOD2 for Command, everywhere.

The default version of GTK2/Quartz uses MOD2+META for keys and MOD2 for scroll, which is
basically insane

7 years agoFurther fixes to non-cxx11 enabled builds
Tim Mayberry [Tue, 13 Dec 2016 07:10:30 +0000 (17:10 +1000)]
Further fixes to non-cxx11 enabled builds

Hopefully all that is necessary this time

7 years agoFix for non-cxx11 enabled builds
Tim Mayberry [Tue, 13 Dec 2016 06:50:41 +0000 (16:50 +1000)]
Fix for non-cxx11 enabled builds

7 years agoAdd option to Zoom to Selection on double click
Tim Mayberry [Tue, 13 Dec 2016 02:02:57 +0000 (12:02 +1000)]
Add option to Zoom to Selection on double click

Currently implemented for Region and Range selections.

The new option is false/off by default to maintain existing behaviour. I'm not
sure it should require another option, perhaps Zoom to Selection should be the
default and accessing the region properties dialog can be via Modifier+double
click, but further changes can be made on user feedback etc.

Related: #7112

7 years agoChange Zoom to Selection action (Z key) to zoom on both axes
Tim Mayberry [Mon, 12 Dec 2016 23:20:44 +0000 (09:20 +1000)]
Change Zoom to Selection action (Z key) to zoom on both axes

Add Zoom to Selection (Horizontal) action to access previous behavior.

Remove Editor::temporal_zoom_region as it was duplicate code and broken for
both_axes

Should Resolve: #7112

7 years agoFix layered-record undo, include changes to existing region(s)
Robin Gareus [Tue, 13 Dec 2016 01:33:07 +0000 (02:33 +0100)]
Fix layered-record undo, include changes to existing region(s)

7 years agoFix possible crash when removing ports with jack1
Robin Gareus [Mon, 12 Dec 2016 21:47:16 +0000 (22:47 +0100)]
Fix possible crash when removing ports with jack1

7 years agoAdd Slavable::AssignmentChanged signal to notify when a slavable is assigned/unassign...
Paul Davis [Mon, 12 Dec 2016 18:43:47 +0000 (18:43 +0000)]
Add Slavable::AssignmentChanged signal to notify when a slavable is assigned/unassigned to/from a master

7 years agoUI tweak for the spacer at the bottom of the master bus.
Ben Loftis [Mon, 12 Dec 2016 18:16:43 +0000 (12:16 -0600)]
UI tweak for the spacer at the bottom of the master bus.

7 years agoonly update MidiRegion length_beats in partial copy ctor if there is an offset.
nick_m [Mon, 12 Dec 2016 17:36:07 +0000 (04:36 +1100)]
only update MidiRegion length_beats in partial copy ctor if there is an offset.

7 years agoonly set the exact musical position of the primary region for move/copy drag.
nick_m [Mon, 12 Dec 2016 17:33:58 +0000 (04:33 +1100)]
only set the exact musical position of the primary region for move/copy drag.

7 years agoonly recalculate MidiRegion start_beats if there is an offset in the 'part-of' ctor.
nick_m [Mon, 12 Dec 2016 15:15:34 +0000 (02:15 +1100)]
only recalculate MidiRegion start_beats if there is an offset in the 'part-of' ctor.

- when drag-copying MIDI regions, a partial region ctor is used
  which can lead to _start_beats being off by a sample.
  this in turn leads to 7168 happening, but only if magnetic snap
  is used and the regions are copied as a group.
  this should fix 7168, but the magnetic snap part is not yet addressed.

7 years agoTowards making tape-tracks work again..
Robin Gareus [Mon, 12 Dec 2016 02:20:29 +0000 (03:20 +0100)]
Towards making tape-tracks work again..

7 years agoFix a potential deadlock/crash (here tape-track peak-file)
Robin Gareus [Mon, 12 Dec 2016 02:13:16 +0000 (03:13 +0100)]
Fix a potential deadlock/crash (here tape-track peak-file)

read_peaks_with_fpp() already holds _lock, build_peaks_from_scratch()
takes the _lock again.

Depending on glib[mm] and the threading lib it may either result in a
deadlock, or with EDEADLK in undefined behavior when a
non-recursive lock is released twice.

7 years agoFix potential deadlock on session-load
Robin Gareus [Sun, 11 Dec 2016 23:09:24 +0000 (00:09 +0100)]
Fix potential deadlock on session-load

7 years agodisallow placement of audio-locked tempi within a frame of any other.
nick_m [Sun, 11 Dec 2016 15:37:26 +0000 (02:37 +1100)]
disallow placement of audio-locked tempi within a frame of any other.

7 years agosort tempo curves initially as well.
nick_m [Sun, 11 Dec 2016 15:03:19 +0000 (02:03 +1100)]
sort tempo curves initially as well.

7 years agofix loop/crash when dragging an audio-locked tempo over a music-locked one while...
nick_m [Sun, 11 Dec 2016 15:01:12 +0000 (02:01 +1100)]
fix loop/crash when dragging an audio-locked tempo over a music-locked one while snapped to grid.

7 years agono-op - rename TempoMap::set_active_tempos -> TempoMap::set_active_tempi
nick_m [Sun, 11 Dec 2016 14:59:23 +0000 (01:59 +1100)]
no-op - rename TempoMap::set_active_tempos -> TempoMap::set_active_tempi

7 years agoclean up some odd logic.
nick_m [Sun, 11 Dec 2016 14:57:41 +0000 (01:57 +1100)]
clean up some odd logic.

7 years agoamend previous commit
nick_m [Thu, 24 Nov 2016 14:39:22 +0000 (01:39 +1100)]
amend previous commit

7 years agorename MetricSection movable -> initial, but of course initial is !movable..
nick_m [Thu, 24 Nov 2016 14:38:19 +0000 (01:38 +1100)]
rename MetricSection movable -> initial, but of course initial is !movable..

7 years agoAdd support for MacVST hidden/favorites
Robin Gareus [Sun, 11 Dec 2016 14:46:53 +0000 (15:46 +0100)]
Add support for MacVST hidden/favorites

7 years agoAdd a small tool to experiment with libcanvas
Robin Gareus [Sun, 11 Dec 2016 14:45:42 +0000 (15:45 +0100)]
Add a small tool to experiment with libcanvas

7 years agothere is no need to do a full set_colors() in MidiGhostRegion ctor.
nick_m [Sun, 11 Dec 2016 12:57:50 +0000 (23:57 +1100)]
there is no need to do a full set_colors() in MidiGhostRegion ctor.

7 years agotempo curve fiddling.
nick_m [Sun, 11 Dec 2016 12:55:13 +0000 (23:55 +1100)]
tempo curve fiddling.

7 years agogo back to always interpolating framed curve points.
nick_m [Sun, 11 Dec 2016 12:54:03 +0000 (23:54 +1100)]
go back to always interpolating framed curve points.

7 years agomake TempoMap::dump slightly more readable.
nick_m [Sun, 11 Dec 2016 12:51:00 +0000 (23:51 +1100)]
make TempoMap::dump slightly more readable.

7 years agofix incorrect audio-locked tempo position when setting bbt via tempo dialog.
nick_m [Sun, 11 Dec 2016 12:49:02 +0000 (23:49 +1100)]
fix incorrect audio-locked tempo position when setting bbt via tempo dialog.

7 years agofix flickering in tempo curve when markers are reordered.
nick_m [Sun, 11 Dec 2016 12:46:49 +0000 (23:46 +1100)]
fix flickering in tempo curve when markers are reordered.

7 years agoconstify TempoCurve::tempo().
nick_m [Sun, 11 Dec 2016 12:44:25 +0000 (23:44 +1100)]
constify TempoCurve::tempo().

7 years agofix bar renumbering for audio-locked metrum.
nick_m [Sun, 11 Dec 2016 12:42:26 +0000 (23:42 +1100)]
fix bar renumbering for audio-locked metrum.

7 years agofix typo in 914224f
Robin Gareus [Sun, 11 Dec 2016 03:36:08 +0000 (04:36 +0100)]
fix typo in 914224f

7 years agoRevert "Pixel hunt cairo-packer (status-bar, selection-clock border)"
Robin Gareus [Sun, 11 Dec 2016 01:19:10 +0000 (02:19 +0100)]
Revert "Pixel hunt cairo-packer (status-bar, selection-clock border)"

This reverts commit 6015481377bc7c96d7e09b263a18b285fe2fc282.

7 years agoPixel hunt cairo-packer (status-bar, selection-clock border)
Robin Gareus [Sun, 11 Dec 2016 00:31:31 +0000 (01:31 +0100)]
Pixel hunt cairo-packer (status-bar, selection-clock border)

7 years agoCheck for reserved i/o that are not routes, fixes #7171
Robin Gareus [Sat, 10 Dec 2016 23:03:44 +0000 (00:03 +0100)]
Check for reserved i/o that are not routes, fixes #7171

7 years agoCairoPacker draws outside of its widget allocation
Robin Gareus [Sat, 10 Dec 2016 19:48:57 +0000 (20:48 +0100)]
CairoPacker draws outside of its widget allocation

This fixes fixes TimeInfoBox packing when the InfoBox position changes.

7 years agoAdd editor actions to set tempo and meter
Robin Gareus [Sat, 10 Dec 2016 15:01:20 +0000 (16:01 +0100)]
Add editor actions to set tempo and meter

7 years agoTweak transport icons
Robin Gareus [Sat, 10 Dec 2016 14:56:47 +0000 (15:56 +0100)]
Tweak transport icons

7 years agoBlack selection & punch clock bg
Robin Gareus [Sat, 10 Dec 2016 00:12:35 +0000 (01:12 +0100)]
Black selection & punch clock bg

7 years agoFix video-monitor "sync-source" changes
Robin Gareus [Fri, 9 Dec 2016 22:43:37 +0000 (23:43 +0100)]
Fix video-monitor "sync-source" changes

7 years agoAdd support for Pango Markup to ArdourButton
Robin Gareus [Sat, 10 Dec 2016 14:52:48 +0000 (15:52 +0100)]
Add support for Pango Markup to ArdourButton

7 years agoConsistent ArdourButton sizing for elements with LED
Robin Gareus [Sat, 10 Dec 2016 01:21:36 +0000 (02:21 +0100)]
Consistent ArdourButton sizing for elements with LED

7 years agoSpeed up recent-session display with lots of snapshots.
Robin Gareus [Thu, 8 Dec 2016 19:33:04 +0000 (20:33 +0100)]
Speed up recent-session display with lots of snapshots.

Given that a session can easily have >100 snapshots and one cannot change
the sample-rate anymore, it's mostly useless to parse them all.

7 years agoAdd LIBPBD_API to a function declaration
John Emmas [Thu, 8 Dec 2016 17:27:12 +0000 (17:27 +0000)]
Add LIBPBD_API to a function declaration

The new specialisation for ConfigVariable<float>::set_from_string() needs to be exportable (it gets used somehow by ARDOUR::SessionConfiguration).

If adding LIBPBD_API causes a problem for gcc, we could change it to LIBPBD_TEMPLATE_MEMBER_API

7 years agoAdd some doc/comments to the timecode example script
Robin Gareus [Thu, 8 Dec 2016 14:42:11 +0000 (15:42 +0100)]
Add some doc/comments to the timecode example script

7 years agoremove dups.
Robin Gareus [Thu, 8 Dec 2016 14:41:21 +0000 (15:41 +0100)]
remove dups.

7 years agoFor building with MSVC, std::strtof() didn't get introduced until VS2013
John Emmas [Thu, 8 Dec 2016 13:57:23 +0000 (13:57 +0000)]
For building with MSVC, std::strtof() didn't get introduced until VS2013

(use std::strtod() in earlier versions)

7 years agoI can't find a source file called MIDIXML.cpp (??)
John Emmas [Thu, 8 Dec 2016 13:55:11 +0000 (13:55 +0000)]
I can't find a source file called MIDIXML.cpp (??)

7 years agoAdd missing enum bindings
Robin Gareus [Thu, 8 Dec 2016 12:21:00 +0000 (13:21 +0100)]
Add missing enum bindings

7 years agoAdd timecode example script
Robin Gareus [Thu, 8 Dec 2016 11:45:25 +0000 (12:45 +0100)]
Add timecode example script

7 years agoClarify "frames" (video, timecode) vs "samples" (audio)
Robin Gareus [Thu, 8 Dec 2016 11:26:41 +0000 (12:26 +0100)]
Clarify "frames" (video, timecode) vs "samples" (audio)

7 years agoadd Lua bindings for Timecode conversion
Robin Gareus [Thu, 8 Dec 2016 11:44:36 +0000 (12:44 +0100)]
add Lua bindings for Timecode conversion

7 years agobraces, please
Paul Davis [Thu, 8 Dec 2016 09:44:26 +0000 (09:44 +0000)]
braces, please

7 years agoSpeed up recent session display (for many large sessions)
Robin Gareus [Thu, 8 Dec 2016 09:36:12 +0000 (10:36 +0100)]
Speed up recent session display (for many large sessions)

- don't parse XML into XMLTree
- only read the file, extract relevant elements
- don't read session-template contents, only test file

7 years agoa-fluidsynth process events even when no sf2 is loaded.
Robin Gareus [Wed, 7 Dec 2016 18:48:52 +0000 (19:48 +0100)]
a-fluidsynth process events even when no sf2 is loaded.

Keep track of program-changes, re-apply Bank/PGM once the
soundfont is loaded. fluidsynth itself keeps track of CCs.

7 years agoamend 581c7b6 -Wparentheses
Robin Gareus [Wed, 7 Dec 2016 18:47:29 +0000 (19:47 +0100)]
amend 581c7b6 -Wparentheses

7 years agoSave/Restore MIDI Automation Controls (current CC, PGM)
Robin Gareus [Wed, 7 Dec 2016 18:47:04 +0000 (19:47 +0100)]
Save/Restore MIDI Automation Controls (current CC, PGM)

7 years agoFurther tweaks to EngineDialog z-axis stacking
Robin Gareus [Wed, 7 Dec 2016 13:50:17 +0000 (14:50 +0100)]
Further tweaks to EngineDialog z-axis stacking

When there's no main window (initial setup, no transient parent),
preset a normal window listed in the task-bar.

The duality the Engine Dialog being used as Ardour-WM managed non-modal
Window (Menu > A/M Setup) and modal Dialog (AudioEngineSetupRequired)
complicates this a bit.

7 years agoSpeed up unloading large sessions.
Robin Gareus [Wed, 7 Dec 2016 11:50:35 +0000 (12:50 +0100)]
Speed up unloading large sessions.

7 years agoSet MidiPgmChangeAutomation control value
Robin Gareus [Wed, 7 Dec 2016 11:45:01 +0000 (12:45 +0100)]
Set MidiPgmChangeAutomation control value

7 years agoAdd Lua bindings to inspect MidiTrack::MidiControl
Robin Gareus [Wed, 7 Dec 2016 10:30:40 +0000 (11:30 +0100)]
Add Lua bindings to inspect MidiTrack::MidiControl

7 years agoFix another crash at exit.
Robin Gareus [Wed, 7 Dec 2016 00:58:58 +0000 (01:58 +0100)]
Fix another crash at exit.

7 years agofix copy/paste typo in prev. commit
Robin Gareus [Wed, 7 Dec 2016 00:06:22 +0000 (01:06 +0100)]
fix copy/paste typo in prev. commit

7 years agoWork around silence-trim config 0dBFS (7b1f97bf)
Robin Gareus [Wed, 7 Dec 2016 00:03:46 +0000 (01:03 +0100)]
Work around silence-trim config 0dBFS (7b1f97bf)

7 years agoRevert "Fix export silence threshold by using a constant value for now"
Robin Gareus [Tue, 6 Dec 2016 23:56:14 +0000 (00:56 +0100)]
Revert "Fix export silence threshold by using a constant value for now"

This reverts commit 6784923a0587e9549f129faa7c75d784028d11a1.

7 years agofix parsing "-inf" in config variables
Robin Gareus [Tue, 6 Dec 2016 23:50:00 +0000 (00:50 +0100)]
fix parsing "-inf" in config variables

The default for export-silence-threshold is -INFINITY, written
as "-inf" (by cfgtool) into system_config. Yet parsing the config using
a std::stringstream results in "0" (due to bugs in various libc++).

7 years agoDon't assume patch-banks are populated.
Robin Gareus [Tue, 6 Dec 2016 21:55:50 +0000 (22:55 +0100)]
Don't assume patch-banks are populated.

7 years agoAllow sparse CC lists.
Robin Gareus [Tue, 6 Dec 2016 21:51:55 +0000 (22:51 +0100)]
Allow sparse CC lists.

7 years agoa-fluid synth: label Reverb & Chorus sends.
Robin Gareus [Tue, 6 Dec 2016 21:34:07 +0000 (22:34 +0100)]
a-fluid synth: label Reverb & Chorus sends.

Also globally enable Reverb + Chorus FX (so that sends work by default)

7 years agocreate_drum_tracks lua script by Phillip Smith
Ben Loftis [Mon, 5 Dec 2016 20:53:44 +0000 (14:53 -0600)]
create_drum_tracks lua script by Phillip Smith

7 years agoadd_filters lua script by Phillip Smith
Ben Loftis [Mon, 5 Dec 2016 18:20:42 +0000 (12:20 -0600)]
add_filters lua script by Phillip Smith

7 years agoAllow to send Immediate Patch Changes
Robin Gareus [Tue, 6 Dec 2016 17:48:36 +0000 (18:48 +0100)]
Allow to send Immediate Patch Changes

7 years agoa-fluid synth: list all bank/programs
Robin Gareus [Tue, 6 Dec 2016 15:59:57 +0000 (16:59 +0100)]
a-fluid synth: list all bank/programs

7 years agoTurn a-fluidsynth into C++
Robin Gareus [Tue, 6 Dec 2016 15:00:42 +0000 (16:00 +0100)]
Turn a-fluidsynth into C++

7 years agorough-in a-fluid synth midnam support
Robin Gareus [Tue, 6 Dec 2016 14:56:36 +0000 (15:56 +0100)]
rough-in a-fluid synth midnam support

7 years agoFix #6753
Julien ROGER [Thu, 1 Dec 2016 23:05:58 +0000 (00:05 +0100)]
Fix #6753

Fix "Illegal instruction" due to recursive acquisition/multi release on a RWLock

See #6753 notes

7 years agoFix crash when track creation failed draging region
Julien ROGER [Fri, 2 Dec 2016 05:17:51 +0000 (06:17 +0100)]
Fix crash when track creation failed draging region

Add more check when creating a new track from a region drag into editor's empty area.

Fix #6496

7 years agoInclude last sample in reverse test for nonsilence in end trim during export
Tim Mayberry [Tue, 6 Dec 2016 10:55:17 +0000 (20:55 +1000)]
Include last sample in reverse test for nonsilence in end trim during export