13
0
Commit Graph

11392 Commits

Author SHA1 Message Date
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
0f64e5ce84 Remove ad-hoc handling of possible_in == 0
Just make the code responsible for possible_in > 0 also handle
possible_in == 0 since it nearly does the same thing.

The only difference is that the possible_in == 0 case didn't check at
all for audio_in, essentially acting as if possible_in was audio_in.
There is thus a small POLICY CHANGE, but the selected configuration will
stay the same unless a better matching configuration is available.
2016-08-06 19:38:09 +02:00
93aa03ee2a Change column width in macros 2016-08-06 19:38:09 +02:00
8b2c2df840 Set \midi_out when selecting a configuration...
...instead of at the very beginning, so that it can depend on the loop
iteration.
2016-08-06 19:38:09 +02:00
2dc7b5189c Merge pass 2 (imprecise) into pass 1
Still no policy change, since when a configuration is chosen that would
have belonged to the second pass, then its penalty will be increased by
1000 and it will be selected only as last recourse.
2016-08-06 19:38:09 +02:00
b90baf2176 Move MIDI filters imprecise handling from 2nd pass to 1st
This doesn't change the policy since configurations are given an
additional 1000 penalty if audio_in != possible_in, and will thus be
trumped by any "precise" configuration (unless the latter has 1000
excess or missing outputs which should be less than likely).
2016-08-06 19:38:09 +02:00
946a99f554 Rearrange condition for pure midi plugins 2016-08-06 19:38:09 +02:00
19b82b8a83 Use FOUNDCFG* instead of setting the configuration by hand 2016-08-06 19:38:09 +02:00
8311607e5c Enable overriding the configuration penalty
This is useful for exact matches that would otherwise need to duplicate
the bookeeping done by FOUNDCFG()
2016-08-06 19:38:09 +02:00
80541de283 Introduce a macro for imprecise configurations
It enables only setting the imprecise audio channel count if the
configuration is indeed selected.
2016-08-06 19:38:09 +02:00
961b9c8be8 Set \imprecise midi channel count in FOUNDCFG
So that it can depend on the actual configuration selected.
2016-08-06 19:38:09 +02:00
08f3ef4ecd Set \imprecise when a configuration is chosen
Instead of setting \imprecise at the end of the loop if a configuration
was found (which clobbered valuable information, see dae2406187), set it
each time a new configuration is chosen.

In the second loop that tries harder, resetting \imprecise also avoids a
previous "imprecise->set(AUDIO, 0)" to last even if another
configuration is chosen later.

Last but not least, it will enable correctly setting the midi input
count hoped for by the configuration.
2016-08-06 19:38:09 +02:00
865ab375d6 Merge some cases to avoid duplicated logic
Merge the cases in == -1 and in == -2 since those are both wildcards,
almost symmetric in the AU spec, and handled completely symmetrically by
the code here considering it accepts invalid or unspecified demands.

Also merge the cases in > 0 and in < -2 since they are handled exactly
the same as far as outputs are concerned.
2016-08-06 19:38:09 +02:00
f7c3156960 Remove code with no actual effect
That code modifies \imprecise if it is not NULL, but
 - if a configuration is found, \imprecise will be set to in, clobbering
   the tentative changes done here;
 - if a configuration is not found, a last-resort loop will be run that
   will set the same member of \imprecise, also clobbering our changes.

Remove it since it does nothing that is looked at before being
forgotten. A way to get the intended outcome will be introduced later.
2016-08-06 19:38:09 +02:00
0f00d51471 Move a MIDI test in the table handling loop...
...to later enable that condition truthiness to depend on the
loop iteration. The goal here is to prepare for the upcoming rewrite,
without introducing any policy change for now.

There is no behavior change because if all loop iterations are skipped,
then \found will be false, and with \imprecise being null the last
attempt will be skipped and we will return false.
2016-08-06 19:38:09 +02:00
4c7242545b Replace the exact_match logic by a negative penalty
Instead of doing an initial loop for detection of exact matches, then
letting the following loop set \audio_out yet ignore its value, merge
the two loops but give exact matches a negative penalty so that the
\audio_out value they set won't change afterwards.

No policy change.
2016-08-06 19:38:09 +02:00
dde13d288e Remove wrong asserts 2016-08-06 19:38:09 +02:00
b6c3e55372 LuaProc::can_support_io_configuration: don't mix int and int32_t 2016-08-06 19:38:09 +02:00
a992ac0b75 OSC: make sure this is c++98 compatible. 2016-08-06 09:25:57 -07:00
Edgar Aichinger
595684ddf7 update german translation 2016-08-06 16:49:41 +02:00
8da9000cbc C++98 compat for 032139ac3 2016-08-06 14:40:18 +02:00
f0a54d0f9c mark session dirty when changing plugin presets 2016-08-06 14:28:45 +02:00
032139ac30 osc: provide human readable reading for gain. 2016-08-05 19:08:43 -07:00
e78a177dbb OSC: provide human readable level for sends. 2016-08-05 17:24:09 -07:00
Nils Philippsen
65c2e089ab workaround changes in glibmm 2.49.x
Glib::RefPtr defines the operator bool() as explicit which breaks
comparisons like "some_ref_ptr == 0" or "... != 0".

https://bugzilla.gnome.org/show_bug.cgi?id=769502
2016-08-04 09:52:22 +02:00
d6fd0486ae add support for VST default values (instantiation time value) 2016-08-03 20:53:49 +02:00
3cda7bcbfb ptformat: Decrypt ptf files exported from ptx sessions 2016-08-02 22:25:20 +10:00
480e0b2a5f make Session::get_remote_nth_stripable() ignore hidden stripables unless asked.
this more closely matches the semantics of ye olde get_*_by_rid() from ardour 4.x and earlier
2016-08-01 12:02:30 -04:00
e168664167 Be more tolerant to missing values or errors in io_config() 2016-08-01 09:46:20 +02:00
91414f52e2 Remove redundant condition
Since can_replicate is true at loop start, and in the loop body there is
a break; after every can_replicate=false, there's no point to test its
value in the loop condition.
2016-08-01 09:46:20 +02:00
eb7a364628 Remove duplicate setters that don't affect the outcome
There is no code that read the set value in between the removed line and
its exact counterpart below. There is no similar duplicate in the
AudioUnit code due to the way AudioUnit handles midi.
2016-08-01 09:46:20 +02:00
ae599f0a79 Fix state features array 2016-07-31 22:48:15 -04:00
7c23026515 Support thread-safe LV2 state restoration
The original LV2 state extension required that run() is suspended during
restore().  Ardour violates this rule, which can lead to crashes and
other issues.

The state extension has been updated to allow restoring state in a
thread-safe way by using the worker to enqueue state changes.  This
commit supports that new specification, i.e. supports dropout-free state
restoration properly.

However, the bug with old plugins that do not use this facility is still
not fixed.
2016-07-31 21:59:21 -04:00
ae71e57e24 Support LV2 log trace messages 2016-07-31 20:58:47 -04:00
4805747260 Fix possible ringbuffer overflow 2016-07-31 20:06:51 -04:00
pablus
68b78ac357 Update Spanish translation 2016-07-30 12:52:58 +02:00
46a69ade78 Update French translation 2016-07-29 22:10:49 +02:00
3f88a660b3 OSC: make send enables work in MB 2016-07-28 17:51:12 -07:00
7c5a8dea7c OSC: eq bands off by one fix 2016-07-28 08:51:15 -07:00
04029a656e OSC: MB spelling mistakes stopped compile fix 2016-07-28 07:44:58 -07:00
f93f388845 Fix whitespace 2016-07-28 07:51:55 -04:00
8419c7b79c initialize uninitialized variable 2016-07-28 13:28:38 +02:00
316e9409d0 fix thinko-typo in SoloControl::soloed_by_others() 2016-07-26 21:47:04 -04:00
c10e57129d OSC: Fix cut-n-paste mistake 2016-07-26 14:47:12 -07:00
69752813db OSC: Make sends work for MB. Add pan to /path/strip 2016-07-26 14:11:06 -07:00
9079a6002c Call Plugin::load_preset() from LuaProc::load_preset()
So that the plugin knows that a preset has been loaded, and can send the
signal accordingly.
2016-07-26 18:35:28 +02:00
c2f5abc91e OSC: Fix forward detection to include >0 and <1 2016-07-26 08:02:03 -07:00
b36192aba8 OSC: Remove redux control 2016-07-26 08:00:04 -07:00
ca7d4447de Add missing locale guard for luadsp preset loading
That caused truncation of parameters to int when the decimal separator
is not a period in the user's locale.
2016-07-26 09:52:42 +02:00
43e20fd3e8 add Sidechain change handler for automatically added initial SC ports 2016-07-26 04:20:18 +02:00
7cc2e8c969 add initial midi sidechain if plugin has one. 2016-07-26 04:20:18 +02:00
5f994c07a8 32bit compat (amend 90a67d04) 2016-07-26 02:26:42 +02:00
90a67d04d5 another attempt to fix playhead position with varispeed. 2016-07-25 19:46:19 +02:00
eec294a97e the endless quest to plug memory leaks -- episode 378 2016-07-25 17:16:32 +02:00
3953879d4d add a timeout to flush_pending()
In some circumstances UI::flush_pending never returns, and all UI
interactive ends up being driven by
   while (gtk_events_pending()) { gtk_main_iteration(); }
This has various implications depending on the caller and usually results
in a crash at session-close or exit.
2016-07-25 14:13:52 +02:00
23a2cc4b71 prepare region RMS (loudness) normalization 2016-07-24 20:30:23 +02:00
80bd3e7279 OSC: Make pan controls work properly with MB too. 2016-07-24 09:06:59 -07:00
c21ba6f457 libs/ardour: update UK English localisation 2016-07-24 16:11:46 +01:00
85746c528f export rate formatting:
* use the locale (44.1 vs 44,1)
* do not encourage translating SI units and prefixes)
2016-07-24 16:54:08 +02:00
a76607486c kilo is a lower-case 'k' 2016-07-24 16:54:08 +02:00
bcee4e1518 add a lua timer callback signal 2016-07-24 13:00:15 +02:00
nick_m
299709cbbc Make Region's _beat a PBD::Property.
- fixes incorrect beat setting on undo for various region operations.
2016-07-23 02:23:08 +10:00
87c38e1a26 properly handle meter channel count changes
* reset peak when switching type (audio/midi) or total count
* clamp to +40dBFS to prevent endless falloff for HUGE signals
2016-07-22 12:57:24 +02:00
d53d0faf93 a more reliable/robust/less complex version of previous commit 2016-07-21 14:00:18 -04:00
3bf7c4ef49 do not delete MIDIControllable* when dealing with pending MIDI Control requests - the MIDIControllable belongs to the surface code in controllables 2016-07-21 13:42:11 -04:00
bd80b2f144 fix issue with solo-in-place
Monitor outs cannot be muted by other soloing. Duh.
2016-07-21 13:16:05 -04:00
78296d2c18 tentative fix for a crash that occurs when switching backends.
Session::process() returns early with Session::_silent set to true. AudioBuffer::set_data()
was never set for (at least) the LTC output port. PortManager::cycle_end() calls
AudioBuffer::silence() which used to assume that get_buffer() must have been called. But it
was not, because that should have happened in Session::process().

So check AudioBuffer::data() and call get_buffer() if required.
2016-07-20 23:26:50 -04:00
9c323c59ef messages sent to info/warning/error/fatal should end with endmsg, not endl 2016-07-20 16:34:00 -04:00
54730c2aa5 remove long-lived debug output related to RT-setting of controls 2016-07-20 16:21:03 -04:00