13
0
Commit Graph

11660 Commits

Author SHA1 Message Date
9192a2e969 Add test for PBD::canonical_path on Windows using utf8 strings
This currently fails because the windows only realpath implementation in
pbd/pathexpand.cc, which is called from PBD::canonical_path to resolve the path
uses Glib::locale_from/to_utf8. As I demonstrated in the
testOpenFileUTF8Filename test case Glib::locale_from/to_utf8 are not the
correct functions to use for this use case as it converts to/from utf-8 to the
locale's current character encoding.  On Windows this is most often a single
byte encoding such as Windows-1252 and conversion will fail if the path
contains any characters that are not in system codepage.
2016-09-19 14:47:52 +10:00
aa77c2eb58 Give the Windows MMTimer test a better chance of passing
The default scheduling on windows seems fairly erratic or is at least in the
VM that I'm running these tests on, so increase the timing slack a bit so the
test has a better chance of passing. It is still quite easy for it to fail
though, especially if you for instance manipulate the terminal window somehow
while running the tests but it does not really matter in any case as this test
serves its purpose in testing the PBD::MMTimers API.
2016-09-19 14:47:52 +10:00
aca6e667a8 update a-plugins to use official lv2plug.in URI 2016-09-18 19:07:49 +02:00
e2b06156c9 add support for LV2 #coarseBlockLength and #enabled
this deprecated previously non-standard extensions
2016-09-18 19:06:59 +02:00
eaa1dacf5f ensure that Lua DSP scripts are configured (even with 0 channels)
This fixes an issue with dsp_configure not being when there are
only MIDI signals at the given insertion point.
2016-09-18 01:17:05 +02:00
ce16b5424f Fix crash when ExportDialog is hidden
The issue is that when ExportDialog is destroyed
ExportFileNotebook::FilePage::on_hide is called which in turn calls
ExportProfileManager::save_format_to_disk() in order to save changes to the
analysis and soundcloud upload checkboxes. This then causes the
ExportProfileManager::FormatListChanged signal to be emitted, which in all
other cases is emitted when the format list is modified so that the GUI can
rebuild the format selector menu in ExportFormatSelector::update_format_list
when a format is added or removed.

The problem when doing this in the destructor is that some of the widgets have
already been destroyed, specifically the issue was in
ExportFileNotebook::update_soundcloud_upload trying to access the
soundcloud_selector member that had already had its destructor called.

As it is not necessary to call this signal in the first place and it just
causes unnecessary GUI updates remove the signal emission.
2016-09-17 22:03:16 +10:00
ac4ad28b4f Fix indentation in ARDOUR::ExportProfileManager source file 2016-09-17 22:03:16 +10:00
6ad519ce8e VST threading: prevent concurrent effSetChunk and process()
This is a potential fix for unreliable preset load/restore.
(http://mixbus.harrisonconsoles.com/forum/thread-1970-post-21486.html#pid21486)

Since a Glib Mutex can't be copy-constructed an explicit copy c'tor
is needed.
2016-09-17 13:46:30 +02:00
a1fae47c15 NO-OP: whitespace 2016-09-16 22:38:14 +02:00
140c4bb115 re-do previous commit
* do not include _by_name() API. Port names are locale dependent
* proper whitespace (after comma, before bracket) and styleguide
2016-09-16 22:35:27 +02:00
2b8979647b Revert "Add convenience Lua bindings to access plugin controls"
This reverts commit faf4438646.
2016-09-16 22:31:43 +02:00
Thomas Brand
faf4438646 Add convenience Lua bindings to access plugin controls 2016-09-16 22:09:05 +02:00
8e36e9bf05 remove cruft - don't pollute global namespace
* remove unused functions
* don't globally export C functions that are only used locally
2016-09-16 22:05:43 +02:00
4042c234b1 Modify our MSVC project to use the newly introduced 'libarchive' library (libardour) 2016-09-15 14:46:33 +01:00
e9e412b989 Modify our MSVC project to use the newly introduced 'libarchive' library (libpbd) 2016-09-15 14:39:38 +01:00
9a0d4499f9 Fix passing ctrl-output data to lua inline display thread 2016-09-15 14:01:43 +02:00
ff53fa9806 Send/show error message if g_stat fails in Session::cleanup_sources
let the user/developer know if this does occur rather than just silently
skipping the file.

Fix some whitespace issues while we are changing indentation.
2016-09-15 21:27:55 +10:00
304b491a29 Use g_strerror() instead of ::strerror() in Session::cleanup_sources
The error is generated by a glib function so use the glib version of this
function(it also consistent with usage in the rest the file).
2016-09-15 21:27:55 +10:00
36d1d842df Use g_rename() instead of ::rename() in Session::cleanup_sources
The paths are in UTF-8 encoding and ::rename expects paths in the system
codepage encoding so ::rename will fail for any paths that contain characters
that aren't in the system codepage.

This fixes Flush Wastebasket on Windows where paths contain characters that
aren't in the system codepage(usually most non-ascii characters).
2016-09-15 21:27:55 +10:00
d36c41f128 Use g_strerror instead of strerror in ARDOUR::FileSource
For consistency when calling glib functions and to get UTF-8 strings for
display.
2016-09-15 21:27:55 +10:00
331bfef416 Use ::g_rename instead of ::rename in ARDOUR::FileSource class
The path is in UTF-8 encoding so use Glib functions to properly support paths
containing characters that aren't in the system codepage.

This fixes Clean-up Unused Sources on Windows where paths contain characters
that aren't in the system codepage(usually most non-ascii characters).
2016-09-15 21:27:55 +10:00
77bd398153 implement file-[un]archive progress report 2016-09-14 23:10:41 +02:00
b66d5e842b Add analyse and soundcloud-upload properties of ExportFormatSpecification to xml state 2016-09-14 20:36:03 +10:00
83b48f5cc4 Check a return value from 'g_stat()'
Some Mixbus users (on Windows) have reported seeing ludicrously high figures for the amount of disk space that'll be recovered if they choose to clean up unused sources. I can't see anything obviously wrong in Ardour's code - except for one situation where we don't check a return value after calling 'g_stat()'.

On Windows, the relevant path should be (hopefully!) in UTF8 format and the first thing that g_stat() does is to convert it to UTF16. If that conversion fails for some reason, g_stat() will return an error status and statbuf will be uninitialized - but at the moment, we're not checking this. As an experiment, let's check the returned value and find out if these user reports go away.

Unfortunately, if it does fix the problem then we've got an even bigger problem - because somehow, a Windows user can create source files with invalid names which can't be later deleted!!
2016-09-14 09:58:10 +01:00
Nathan Stewart
3b7cb8275a Fixes 7004 - Ardour crash on Just Quit when AudioEngine is stopped. AudioEngine::stop() if running() is not true and _backend->stop() is true, mutex was being unlocked without being locked. 2016-09-13 19:26:36 -05:00
f41bc70ee9 change all MIDI read-from-source to map all events into the loop-range for seamless looping (if using) 2016-09-13 14:11:29 -05:00
182e35235c debug output formatting 2016-09-13 14:11:29 -05:00
e942c389a7 do not call MidiRingBuffer::skip_to() when getting a MidiDiskstream's playback buffer, and do not use port offset to shift data in time either (it should be correct) 2016-09-13 14:11:29 -05:00
4fa0e3ee90 make MidiBuffer::read_from() use "dst_offset" correctly to alter the time of events read from the MidiBuffer 2016-09-13 14:11:29 -05:00
e05cb11bb0 extend Evoral::Range<T> to offer ::length() and ::squish()
The latter maps a T into a range, using loop semantics
2016-09-13 14:11:29 -05:00
c578fc724b add back event offsetting into MidiRingBuffer::read() (even if we never really use it) 2016-09-13 14:11:29 -05:00
1389fa9e22 NOOP: spacing and indentation 2016-09-13 14:11:29 -05:00
d5984c6c15 show "this" in MidiRingBuffer::dump() 2016-09-13 14:11:29 -05:00
6e59ff4229 slight DEBUG_TRACE enhancement for MidiPort::flush_buffers() output 2016-09-13 14:11:29 -05:00
e16d8637f8 NO-OP: indentation 2016-09-13 14:11:29 -05:00
fbc8504f9e Delivery::run() now offsets data delivered to MIDI ports by the global port offset
if the output is then re-used, MIDI data is readjusted to not use the global port offset
2016-09-13 14:11:29 -05:00
ab160ca748 use class-static method rather than pretend there is a per-member value for Port::port_offset() 2016-09-13 14:11:29 -05:00
21b919c210 provide Session::declick_out_pending() 2016-09-13 14:11:29 -05:00
368a091acd second part of: change offset arguments to various <T>Buffer::read/merge methods from framecnt_t to frameoffset_t 2016-09-13 14:11:29 -05:00
b32ca9e9d9 change offset arguments to various <T>Buffer::read/merge methods from framecnt_t to frameoffset_t 2016-09-13 14:11:29 -05:00
22a9031713 add a new DEBUG enum for MidiRingBuffer 2016-09-13 14:11:29 -05:00
f57e2f2fbe add option to skip unzipping bundled demo sessions 2016-09-13 18:53:29 +02:00
53ee3e2e72 Add support for built-in file/url unzip/untar
This introduces new build-dependency: libarchive
(http://www.libarchive.org/)
2016-09-13 16:14:40 +02:00
af15cf9ef7 Remove duplicate header include from libardour source file 2016-09-13 14:55:02 +10:00
d4a64299c5 Add missing header include guards in canvas library 2016-09-13 14:32:22 +10:00
937a175898 Put ARDOUR::SystemExec implementation inside ARDOUR namespace in source file 2016-09-13 14:32:22 +10:00
6c2aa7ffc5 Add missing include guards in libardour header files 2016-09-13 14:31:35 +10:00
Johannes Mueller
5eaec8c82d Expose Location::name() to Lua 2016-09-12 12:03:16 +02:00
656b3b9c28 Add a Lua wrapper to Glib::build_filename() 2016-09-12 12:02:07 +02:00
Johannes Mueller
e54ae02170 Expose Locations::remove() to Lua
Clearing location markers is a frequent task and should be automizable. For
example it is handy to clear all the markers when restarting the recording
from scratch after a failed recording.
2016-09-12 11:10:40 +02:00
Thomas Brand
98d9887adb add request_play_loop() & get_play_loop() to luabindings 2016-09-12 11:08:37 +02:00
f91e591f40 Fix #6774, Moving start/end markers doesn't set Session as modified/dirty
If a Session is saved and then the start or end session markers are moved,
closing the Session will not result in "Unsaved Session" dialog being presented
even though the Session has been modified. This change sets the Session as
modified when either the Session start or end markers are modified.
2016-09-11 21:24:56 +10:00
dbf86a495b for files imported without copy, _origin is a full path. We should use this when looking for the file at session load 2016-09-07 12:38:39 -04:00
9faf3e5556 correct comment for FileSource::find() 2016-09-07 12:22:15 -04:00
Johannes Mueller
8bef7623eb Expose record enable/disable to Lua bindings 2016-09-06 22:27:31 +02:00
nick_m
ab21b241f7 Fix incorrect estimate of future revision. 2016-09-07 00:32:02 +10:00
nick_m
3f4d49fd2f Load midi region length and start correctly in sessions modified by v5.0 -> 5.3-41 2016-09-07 00:18:35 +10:00
d6e0e75f3c remove duplicate enum -- copy/paste typo 2016-09-06 01:31:55 +02:00
c432c81148 expose PeakMeter Lua bindings 2016-09-06 01:26:47 +02:00
nick_m
5186c69bac Set start_pulse and length_pulse from state, neither need to be a PBD::Property. 2016-09-06 00:04:00 +10:00
nick_m
74a604d261 Fix the tempo note-type hallucination.
- after reports that a tempo with non-4.0 note type
	  would produce a ramp in the preceding section, an incorrect
	  assumption was made leading to a bogus 'fix' that redefined
	  Tempo's pulses_per_minute().
	  the real fix was simple:
	  the ramp's function constant was calculated using the note type
	  of the proceding tempo rather than the current one.

	- this patch reverts e82482e8e9 and a4d67279e0
	  and maintains the old definition of Tempo::pulses_per_minute()
2016-09-05 16:28:46 +10:00
nick_m
dd7c0cca6c Sanity check for TempoMap::get_grid () 2016-09-04 04:19:34 +10:00
nick_m
921024b79f Revert part of d50df82799. 2016-09-04 03:19:13 +10:00
nick_m
d50df82799 Fix various paste errors in tempo.cc. Should fix recent regressions. 2016-09-03 01:22:41 +10:00
nick_m
658699e318 Use the stored beat to recalculate pulse when setting position as sub_num is irrelevent. 2016-09-02 05:13:53 +10:00
nick_m
46858a2925 Consolidate the meaning of beat divisions.
- bar and beat snapping is BBT beat based while other
	  music divisions are quarter note based. Reflect this in
	  the way exact_beat/qn is calculated.
2016-09-02 05:10:32 +10:00
22d1f1268b OSC: don't restore User preset before writing new one 2016-08-31 19:56:48 -07:00
nick_m
4a953174c3 Attempt to clarify tempo map comments. 2016-09-01 04:01:29 +10:00
nick_m
d05bfa7206 Revert 894cdb6f5c.
- once again we snap to BBT beats when snapping to 'beat'.
2016-09-01 02:43:29 +10:00
nick_m
894cdb6f5c Snap to beat snaps to quarter note. 2016-09-01 01:35:53 +10:00
nick_m
b2190cc4ff TempoMap::pulse_at_frame() handles separated musical sections as per beat_at_frame(). 2016-08-31 23:12:11 +10:00
nick_m
e82482e8e9 Fix incorrect inclusion of note_type in Tempo::pulses_per_minute(). 2016-08-31 23:12:11 +10:00
nick_m
5113a492e0 Keep region beat and pulse separated, ensure pulse is updated when setting position. 2016-08-31 23:12:11 +10:00
nick_m
16ae7d9a6d Fix incorrect start_pulse in MidiRegion copy-with-offset ctor. 2016-08-31 23:12:11 +10:00
nick_m
11a68f7dd3 Amend f3c0c1a865 (Add quarter-note position methods). 2016-08-31 23:12:11 +10:00
nick_m
15045a2228 BeatsFramesConverter uses quarter-note 'beat' position. 2016-08-31 23:12:11 +10:00
nick_m
395183ee7b Add quarter-note position methods to TempoMap. 2016-08-31 23:12:11 +10:00
nick_m
21054f6d8d Add length_pulse to MidiSource, usr quarter-notes in midi_read().
- MidiSource _length_beats is in quarter notes.
	  Here we duplicate length_beats for backwards compatibility
2016-08-31 23:12:11 +10:00
nick_m
2c7a5815ee Add start_pulse and length_pulse to midi region for beat/note separation. 2016-08-31 23:12:11 +10:00
nick_m
c0344db37a Add a pulse property to region.
- separates ardour beat (meter-based) and note (pulse-based)
	  musical position.
2016-08-31 23:12:11 +10:00
0ff233d234 Update our MSVC project files to generate the most recent Ardour session file format (ver 5) rather than the older v3 format 2016-08-30 07:15:00 +01:00
350282598c Change (slightly) the previous modification to 'fluidsynth/config.h' 2016-08-28 13:54:16 +01:00
355fa64c79 fix Coreaudio Aggregate for separate devices with identical names 2016-08-28 13:44:30 +02:00
eeee70c32d undo modifications to upstream fluidsynth code 2016-08-28 13:23:18 +02:00
ffb3e9bb21 fix lv2 ttl 2016-08-28 13:18:48 +02:00
b90cfa7e39 Configure the new 'fluidsynth' library to be buildable with MSVC
(haven't built any fluidsynth plugins yet)
2016-08-28 10:31:43 +01:00
4d7eb04cf6 Fix a crash when toggling back and forth between a generic plugin GUI window and a VST plugin's own GUI 2016-08-28 10:26:02 +01:00
a3d2521b25 Accommodate newly introduced source(s) in our MSVC project (ardour_osc) 2016-08-28 10:20:56 +01:00
c6ef3a75d3 backwards compatible a-comp stereo sidechain ports 2016-08-27 18:08:46 +02:00
81542d20aa No discrimination against systems which don't have a PI define 2016-08-27 17:20:27 +02:00
f814e68e30 Prepare a-comp for click-free bypass/enable 2016-08-27 17:14:49 +02:00
d6952445ce click-free a-delay bypass/enable 2016-08-27 16:59:15 +02:00
0fa1123f82 NO-OP clean up plugin ttl 2016-08-27 16:01:16 +02:00
c64b8662a6 fix copy/paste typo in 1d7c14496 2016-08-27 15:53:38 +02:00
62de4d0c31 add NaN/Inf protection now that bypass no longer de/activates 2016-08-27 14:10:51 +02:00
36776bafcd click-free a-reverb bypass 2016-08-27 14:09:47 +02:00
935fd3b32f Add automatable click-free bypass/enable feature to a-eq 2016-08-27 13:23:25 +02:00
0189edcfb9 Expose PluginInfo bindings (eg plugin-type, unique id, etc)
processor:to_insert():plugin(0):get_info().type
2016-08-26 19:04:07 +02:00
a4da0747e1 allow to access data-members in weak/shared ptr classes 2016-08-26 19:01:09 +02:00
1d7c144967 add "sameinstance()" lua binding for all shared/weak ptrs 2016-08-26 18:25:15 +02:00
d696363021 Add Lua bindings for ProcessorVector (really ProcSelection) 2016-08-26 03:21:05 +02:00
f582f8595f increase pre-allocated Lua DSP memory pool size to 3MB
...now that bindings alone need approx 700K and some more complex DSP
scripts are showing up 2MB is not much :(
2016-08-26 01:47:05 +02:00
c9f0657c86 tweak lua GC (once again)
fixes OOM with extreme automation in HP/LP.
2016-08-26 01:18:48 +02:00
fa36ea6695 remove unneeded includes that may break with winegcc 2016-08-25 22:29:50 +02:00
48d085a569 wine-gcc hacks -- fixes #6984 2016-08-25 21:36:02 +02:00
aee5d24cfa a reverb is a reverb is a reverb 2016-08-24 23:45:02 +02:00
bd77b605f6 add missing include 2016-08-24 23:06:52 +02:00
d6e27bd439 fix copy/paste mistake 2016-08-24 22:46:36 +02:00
af786cf444 NO-OP: whitespace 2016-08-24 22:39:44 +02:00
ef59ea849b lessons learned from a-fluidsynth 2016-08-24 22:37:20 +02:00
7ccbc0ca73 OSC: Add preset loading to OSC GUI 2016-08-24 10:07:21 -07:00
427d9f888a reduce initial fluidsynth load 2016-08-24 17:51:15 +02:00
7bdf4e12ba Take process-lock before processor-lock
This [hopefully] fixes jack1 zombification on session-load with large
plugin-states. Previously it was possible to block
Route::process_output_buffers().
2016-08-24 17:21:43 +02:00
953b8ac99f prevent a unlikely race: concurrent restore() + work_response () 2016-08-24 15:38:36 +02:00
f5602adfe8 tweak a-fluidsynth reinit strategy.
reset synth in offline thread, queue panic on deactivate to be
called in run() after first re-activate.

Initial activation does not warrant a panic.
2016-08-24 13:05:47 +02:00
8a3b246bb3 strip down libfluidsynth a bit more 2016-08-24 13:05:47 +02:00
aa349d3f8c add support for reverb & chorus in a-fluidsynth 2016-08-24 05:33:18 +02:00
8da58c3da0 ARDOUR::FluidSynth automatically assign first 16 channels 2016-08-24 05:31:30 +02:00
870cb19737 a-fluidsynth 2016-08-24 03:18:14 +02:00
30afda5536 properly fix copy/paste typos 2016-08-24 02:26:39 +02:00
07653e13d8 fluidsynth 1.1.6 actually 2016-08-24 02:21:30 +02:00
3ab4f7ef82 fix windows build/runtime 2016-08-23 22:58:03 +02:00
5d597cdfeb add FluidSynth Lua Bindings 2016-08-23 22:21:03 +02:00
2d5166606b add basic libardour wrapper for fluidsynth (for Lua bindings) 2016-08-23 22:21:03 +02:00
ac05f05023 Import libfluidsynth into the Ardour codebase 2016-08-23 22:21:03 +02:00
nick_m
88f723e8d8 Tempo marker movement snaps to the future grid, rather than the current one.
- fixes jittery tempo movement when snapping within large gradients.
2016-08-24 03:38:46 +10:00
nick_m
9a66e1e2c6 Round to bar correctly in TempoMap::exact_beat_at_frame_locked(). 2016-08-24 03:23:04 +10:00
0a975eba29 Nyquist (pronounce it like Klopstock!) 2016-08-23 13:46:11 +02:00
4a831725af fix threaded state restore (duplicate calls to restore during init)
and also allow immediate work during use latency-compute runs.

At session load, Ardour calls a plugins "set default" state (GUI thread).
Some plugins may schedule work during state-restore. Ardour immediately
proceeded to restore the actual session plugin state without processing
the already scheduled work and without calling run() for a plugin
to apply state synchronously.
2016-08-23 13:46:11 +02:00
81c481f975 OSC: Tweak GUI to be more user obvious. 2016-08-22 13:23:04 -07:00
957f59f351 print a warning if CoreAudio falls back to non realtime priority 2016-08-22 17:38:45 +02:00
636522bd79 new libardour API for Session::new_route_from_template to allow specifying insertion point 2016-08-22 09:41:59 -04:00
88e98a63c7 OSC: populate check boxes with default settings at session start 2016-08-21 16:31:22 -07:00
1cfd8b2203 OSC: set global variables in global space - crash fix 2016-08-21 14:15:54 -07:00
adb492b914 OSC GUI: Add Strip types and feedback check boxes 2016-08-21 13:25:11 -07:00
7aa5ada0e0 Lua bind MonitorProcessor 2016-08-21 00:24:23 +02:00
d1ed84e44e OSC: Add setup to GUI 2016-08-19 14:22:55 -07:00
a83febb268 fix optimized build compilation 2016-08-19 22:38:10 +02:00
0016920347 and another typo gone in in 9702020 2016-08-19 17:22:09 +02:00
adf290446f fix typo in 9702020 2016-08-19 16:23:49 +02:00
972dc6aaca ad rest of Stripable API to lua 2016-08-19 09:40:20 -04:00
8e2d1c7f2a Move 'round()' / 'trunc()' etc so that they won't conflict with any versions already available in MSVC 2016-08-19 14:11:01 +01:00
4ece16f348 For MSVC, 'using namespace whatever' doesn't help us to differentiate between ambiguous type names
so... given that 'Rectangle' is a type name that's commonly found in several different namespaces, we'll need to specify explicitly which one we want.
2016-08-19 14:11:00 +01:00
a0b117b948 'roundf()' wasn't introduced in MSVC until VS2013 - so for the time being, let's emulate it using 'floorf()' 2016-08-19 14:11:00 +01:00
cdcccd8101 handle edge-case where jack-meta-data may be NULL, but the call succeeds
this fixes #6968
2016-08-19 14:38:37 +02:00
45cd3482a2 fix failure to remove keyvalue from Keyboard::state on key release 2016-08-19 08:32:44 -04:00
26f1578568 MIDI polyphonic pressure, part 2 2016-08-19 08:32:44 -04:00
d6691a80e9 attempt to handle poly-pressure (polyphonic aftertouch) similarly to other MIDI messages 2016-08-19 08:32:44 -04:00
c229e31720 OSC:: needs the .h file too... 2016-08-18 19:16:53 -07:00
7c43d2bb0e OSC: make remote port setting possible, add default surface variables 2016-08-18 19:15:57 -07:00
756674f4f9 initialize uninitialized variable 2016-08-19 03:32:07 +02:00
ba1058aca6 Update automated Plugin Controlls when seeking and not rolling 2016-08-19 03:32:07 +02:00
ef4facca11 fix Aux-Send Panner Linking 2016-08-19 01:14:21 +02:00
41cc35cf6e do not allow undo/redo while actively recording 2016-08-17 19:22:26 -04:00
nick_m
9702020929 Report quarter note rather than beat position to AU plugins. 2016-08-18 05:42:30 +10:00
nick_m
6d0208613d Use quarter pulses (quarter notes) for VST's ppqBar, ppqPos and cycleStart/EndPos. 2016-08-18 05:39:44 +10:00
nick_m
b243af48c7 Add methods for plugin APIs to obtsin quarter pulses ('beats' for AU) from the tempo map. 2016-08-18 05:36:24 +10:00
8708da2d19 OSC: Add value feedback to strip fader and trim 2016-08-17 08:24:57 -07:00
613ff66042 fix ramped BPM reporting to AU and VST plugins 2016-08-17 17:17:00 +02:00
b3cec2716e fix LV2 BPM report (use ramped tempo) 2016-08-17 17:04:02 +02:00
6bf40e3a44 a-Reverb: Fixed bug with the reverb all pass filters causing bad sound 2016-08-18 00:41:43 +10:00
08df4e1920 Fix anchored popups with separators in them
The code computing the position of the popup menu used to compare the
given string to each MenuItem::get_label() result, but that method
actually replaces the content (child) of the MenuItem if that child is
not already a Gtk::Label. In particular, this breaks menu separators.

Avoid the issue by checking by hand if the only child of the MenuItem is
a Label, and directly compare the label text.
2016-08-17 01:45:47 +02:00
6a985df81e Replace positioning function with popup helper
Because all uses of the function positioning menus anchored to a widget
were as callback argument to Gtk::Menu::popup() where the caller needed
to correctly bind arguments, this led to repeated and a bit obscure code.

Wrap the logic into an helper function that takes care of all that, and
update the callers.
2016-08-17 01:45:47 +02:00
18af0dc4cd Also send lv2:timePosition whenever BBT or Tempo changes
This mostly fixes an issue with notifying plugins about tempo-ramps
and BPM changes.

remaining to be fixed (in tempo.h):
```
_session.tempo_map().metric_at(frame_position).tempo().beats_per_minute()
```
currently returns the most recent *fixed* tempo at or before
`frame_position`. All other Plugin types are affected by this as well.
2016-08-16 13:11:49 +02:00
7b993ef138 turn comments into doxygen doc 2016-08-16 00:26:06 +02:00
bc0bb6cae9 extend lua-doc to show properties 2016-08-16 00:25:59 +02:00
29feb8dec7 add some missing enum bindings (for config variables) 2016-08-16 00:20:36 +02:00
11da4a83e4 expose SessionConfiguration as lua bindings 2016-08-15 22:25:56 +02:00
3b7dbdfeb8 Re-enable luabridge addProperty()
In preparation to expose ARDOUR::SessionConfiguration.
Also change the return-type to bool to match Ardour's set/get API
2016-08-15 22:25:56 +02:00
nick_m
4848cb6d42 Enforce rounding to beat as >= 0.0 2016-08-16 00:43:08 +10:00
46cbb9084e Expose Stripable Color & Ordering API to Lua
We can't easily use C++ references with Lua closures, so
new API (pointer to PresentationInfo) was added.
2016-08-15 16:37:44 +02:00
09ed9c44e7 change PBD::Transmitter code to use PBD::Signal<> not sigc::signal<>, since the latter is not thread safe 2016-08-14 08:33:23 -04:00
f77d1e0a36 Don't call any Transmitter from realtime context
This fixes a crash when TempoMap::bbt_at_frame_rt() is called
for a latent effect at position 00:00:00:00 and frame is < 0.
2016-08-14 00:47:03 +02:00
nick_m
c62026b567 Ensure RelevantModifierKeyMask is updated on each modifier change.
- fixes bug where changing prefs in User Interaction
	  only took effect on restart.
2016-08-14 03:04:54 +10:00
nick_m
3f24d5d96e Always send start property changes when a midi region trim alters position.
- ensures gui updates correctly.
2016-08-14 03:04:53 +10:00
nick_m
172bcc8165 Audio-locked midi region fixes.
- don't alter region frame length on tempo change or position change.

	- set region _start correctly (see comments) on tempo map change.

	- ensure audio-locked region's beat is set on tempo map change
2016-08-14 03:04:53 +10:00
nick_m
5c2ccc4f3e Allow negative return in TempoMap::beat_at_frame() and its exact_ variant.
- audio-locked midi regions can be start-trimmed properly
	  when close to 1|1|0
	- a midi region placed before the first meter
	  will continue the tempo curve and first meter.

Only a couple of callers require change, as bbt_at_beat() already
deals with this.
2016-08-14 03:04:53 +10:00
613ae0c110 Nobody expects the LV2 inquisition! 2016-08-13 14:51:57 +02:00
0fa106ef4b check for null pointer in Locations::remove() 2016-08-12 12:48:35 -04:00
c8c6bca658 fix crash when copy'ing latent plugins 2016-08-10 16:32:34 +02:00
e9752ff93e remove debug output 2016-08-09 21:26:27 -04:00
2b7a89ecff prefix blessed scripted DSP plugins with a-* 2016-08-10 03:11:49 +02:00
dd88461942 clean up plugin ttls - always add semicolon for compatibility 2016-08-09 22:00:38 +02:00
nick_m
00f12dc395 Fix test compilation error. 2016-08-10 03:16:49 +10:00
nick_m
13413c0b0f BBTTest::addTest() should add a meter rather than replacing the first one. 2016-08-10 01:56:55 +10:00
nick_m
9acfdb31a2 Make tempo tests use the api more correctly.
- TempoMap initially contains a tempo and meter.
	  using add_tempo/meter() using the position of an
	  existing section does the right thing, but prints a warning.
	  Use replace_tempo/meter().
2016-08-10 01:46:05 +10:00
nick_m
4ddb6b74f5 Allow -ve framepos handling in TempoMap::framepos_plus_beats()
- also handles frame positions previous to the initial
	  meter (beat_at_frame() would return 0 in this case).
2016-08-10 00:48:53 +10:00
b9cab93fb1 fix definition of PrimaryModifier for Keyboard for OS X 2016-08-08 17:59:11 -04:00
3d400f97dd fix display of modifiers on OS X in the bindings editor 2016-08-08 17:47:11 -04:00
a51cd8689f Move anchored menu placement strategy to Gtkmm2ext utils
So that it can be used by others.
2016-08-08 16:44:40 +02:00
448902f870 fix race condition when dropping Ports
Jack2 calls back from a notification thread and the callback (PortManager::connect_callback())
could end up holding the final reference on 1 or more ports. The ports would then be
unregistered as we leave the callback scope, which is illegal (no server calls from
a notification thread)
2016-08-08 09:27:21 -04:00
fdf63ace6a add explanatory comment 2016-08-08 09:27:21 -04:00
c803b81a2b Remove a no longer true comment
It should have been removed as part of 539c062ed2
(Make the configuration penalty subtler about inputs).
2016-08-07 10:00:26 +02:00
d04ca6d414 a few more Location related lua bindings 2016-08-06 22:12:39 +02:00
43cd3fd760 Use a default configuration instead of bailing out
If the script doesn't provide a dsp_ioconfig() function, or if it does
not return a table of tables, provide an empty table of table as
default, which means a single configuration with default values.
2016-08-06 19:38:09 +02:00
66470b96b7 Remove dsp_has_midi_*() in favor of dsp_ioconfig()
_has_midi_*put members of LuaProc will be set according to the actual
configuration chosen, for configure_io() and run() to use.
2016-08-06 19:38:09 +02:00
82e1ef5fb0 Refuse more configs with unmatched midi in if !imprecise
Since MIDI in should be
2016-08-06 19:38:09 +02:00
79f66a36b4 Take midi into account for penalty computation
Demote configurations if they have mismatched midi in or out with the
same mechanism as for audio, but with lower coefficients so that
mismatched midi has less influence than mismatched audio in selecting
the best configuration.

POLICY CHANGE.
2016-08-06 19:38:09 +02:00
5691abdf03 Remove ad-hoc handling of possible_out == 0
Just refuse configurations without any output at all, and let the
remaining logic take care of selecting configurations with no audio
output if they make sense and there are no better configurations.

POLICY CHANGE: configurations with no output might now be considered
even if they have audio inputs (e.g. a pure pitch detector without audio
passthrough), whereas they were skipped before.
2016-08-06 19:38:09 +02:00
539c062ed2 Make the configuration penalty subtler about inputs
Instead of uniformly demote configurations with a non-matching audio
input count (using a penalty offset of 1000), also grade the
impreciseness of the configuration so that those with the nearest input
count are preferred. As for outputs, give a slightly higher handicap to
configuration with too many inputs with regard to the actual audio
inputs that can be fed to the plugin.

POLICY CHANGE: when only imprecise configurations are found the actually
selected one can be different (better) than before this commit.
2016-08-06 19:38:09 +02:00