Commit Graph

78 Commits

Author SHA1 Message Date
Paul Davis 86c3b70c54 add some utility functions to Buffers and BufferSets to allow some kinds of debugging easily 2024-05-14 12:25:58 -06:00
Robin Gareus 64e2f16e06
LV2: apply offset to MIDI events 2023-06-30 17:12:16 +02:00
David Robillard 91f15300b8 Remove support for deprecated LV2 event extension 2020-12-01 11:40:35 +01:00
Robin Gareus f9cdf533ba
Event API consistency; reorder arguments (time, type, payload) 2020-09-20 19:18:09 +02:00
Robin Gareus c5014d9d9e
Remove unused LV2 ifdef 1/3
LV2 has been mandatory since 6.0 (04ccd328dc)
2020-09-15 17:01:32 +02:00
Paul Davis 903c3ec5a0 rename BufferSet::get* to BufferSet::get_available*
This tries to make it clear what the BufferSet limit semantics really are
2019-09-26 18:39:56 -06:00
Robin Gareus a22f918d9d
Update libardour GPL boilerplate and (C) from git log 2019-08-03 15:53:16 +02:00
Paul Davis 28f8772c3a remove aeffectx.h; use vestige.h 2018-06-04 17:38:41 -04:00
Paul Davis 30b087ab3d globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
2017-09-18 12:39:17 -04:00
Paul Davis 5c1efd864c fix type warning 2017-02-05 10:58:10 +01:00
Dobroslav Slavenskoj 5f0857620e Fixing LV2_SUPPORT #ifdefs 2017-01-05 09:24:40 +00:00
David Robillard bfbc4566ad Fix warnings 2016-12-03 15:27:38 -05:00
David Robillard 08fffeffec Remove Evoral::MIDIEvent
It is slightly questionable whether type specific methods like
velocity() belong on Event at all, these may be better off as free
functions.  However the code currently uses them as methods in many
places, and it seems like a step in the right direction, since, for
example, we might some day have events that have a velocity but aren't
stored as MIDI messages (e.g. if Ardour uses an internal musical model
that is more expressive).

In any case, the former inheritance and plethora of sloppy casts is
definitely not the right thing.
2016-12-03 15:18:21 -05:00
Robin Gareus 8b93fb02f3 Mac VST-2.x support 2016-11-13 16:35:06 +01:00
Robin Gareus a32a272709 VST buffer paranoia 2016-11-11 16:40:01 +01:00
Robin Gareus 22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
Paul Davis 4dc63966f0 globally remove all trailing whitespace from ardour code base.
Paul Davis was responsible for introducing almost all of this.
2015-10-04 14:51:05 -04:00
Robin Gareus 69ff6d0507 fix mismatched delete/free 2015-09-13 04:09:24 +02:00
Robin Gareus eb998b3264 plug some memory leaks in libs 2015-09-12 20:05:25 +02:00
David Robillard 8a128b33d3 Automation of LV2 plugin properties.
Work towards ParameterDescriptor being used more universally to describe control characteristics.
2014-11-02 02:10:24 -05:00
Robin Gareus 0f6686eea9 remove unused API to explicitly set/unset buffer silent flag 2013-12-28 13:43:57 +01:00
Paul Davis d1cc7e5a50 fix up a bunch of confusion regarding the size/capacity/allocation of audio & midi buffers 2013-11-29 22:26:33 -05:00
Paul Davis 55e52bcbd5 remove another naming that refers to JACK 2013-08-09 13:38:09 -04:00
Paul Davis 8960ebcdf9 remove another naming that refers to JACK 2013-08-09 13:27:05 -04:00
Robin Gareus a1d0093bfa honor LV2 rsz:minimumSize for Atom Event buffers 2013-06-03 00:48:17 +02:00
Robin Gareus db39613238 Forward midi feedback from LV2 plugins and allow to chain LV2 midi plugins. 2013-05-19 17:19:01 +02:00
David Robillard b47619c458 Deliver MIDI events to atom ports that support it, merged with transport events.
Eliminate delivery of non-MIDI events to Ardour MIDI buffers.
Fix the general mess of LV2 port flags and types.
Unify old MIDI API and new atom API MIDI stuff.

Making this work required changing the way we do LV2 MIDI slightly: instead of
BufferSet::get_lv2_midi doing the translation automatically, it returns an
empty buffer and the caller is responsible for actually filling it.  This
allows the LV2 code to iterate over the MIDI and transport changes in one go to
merge them into the buffer at the correct times.

Synth plugins using the new atom API now work and can get accurate transport
information along with the MIDI that drives them.


git-svn-id: svn://localhost/ardour2/branches/3.0@13522 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-18 04:35:31 +00:00
David Robillard 4c5ef5318e Sent precise transport information to LV2 plugins via events.
We send the full transport state (frame position, BBT time, transport speed,
meter) to the plugin:

 * At the start of a cycle whenever a relocate or transport speed change has
   occurred

 * On every occurrence of a meter change within a cycle

This means the plugin gets a sample accurate meter/tempo map, even if the meter
changes in the middle of a cycle.  However, this is not quite right yet: things
can get wonky if the tempo map is edited while rolling, since this code will
not detect the change and fail to update the plugin at the start of the cycle.

Other changes:

 * Factor out TempoMetric::set_metric() and simplify some tempo functions
 * Clean up LV2 URID stuff


git-svn-id: svn://localhost/ardour2/branches/3.0@13513 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-17 18:41:19 +00:00
David Robillard 3696f98e6f Re-implement URIMap to tolerate broken plugins that use the wrong context to
map MIDI event types (fix #4889).

All uri-map contexts are now just ignored, and equivalent to urid (which is
equivalent to uri-map with context NULL).  We now just hope that no event types
are mapped after UINT16_MAX URIs have been mapped, and die horribly otherwise.
This is exceedingly unlikely to happen any time in the next several years, if
ever.


git-svn-id: svn://localhost/ardour2/branches/3.0@12462 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-27 23:05:45 +00:00
Carl Hetherington 80095b7c9d Missing include.
git-svn-id: svn://localhost/ardour2/branches/3.0@12433 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-24 17:43:13 +00:00
David Robillard 6fa6514cfd Remove over 500 unnecessary includes (including 54 of session.h).
It's slightly possible that this causes trivial build failures on different
configurations, but otherwise shouldn't cause any problems (i.e. no actual
changes other than include/naming/namespace stuff).  I deliberately avoided
removing libardour-config.h since this can mysteriously break things, though a
few of those do seem to be unnecessary.

This commit only targets includes of ardour/*.h.  There is also a very large
number of unnecessary includes of stuff in gtk2_ardour; tackling that should
also give a big improvement in build time when things are modified.


git-svn-id: svn://localhost/ardour2/branches/3.0@12420 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-24 06:09:29 +00:00
David Robillard 8de887f378 Update to latest LV2 atom extension.
git-svn-id: svn://localhost/ardour2/branches/3.0@11548 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-02-29 03:21:37 +00:00
David Robillard f122504784 Support LV2 atom sequence ports alongside old event ports.
git-svn-id: svn://localhost/ardour2/branches/3.0@11517 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-02-25 04:16:42 +00:00
Paul Davis ed2beaffee main fix: when transport stops, clear per-region per-playlist note trackers even if there is no capture data to process; side effects: remove unused MidiBuffer::merge() and add DEBUG::MidiTrackers as well as more and better MIDI debug tracing facilities
git-svn-id: svn://localhost/ardour2/branches/3.0@11057 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-22 20:14:47 +00:00
David Robillard 7adac311b4 Fix whitespace.
git-svn-id: svn://localhost/ardour2/branches/3.0@10951 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-09 19:36:20 +00:00
Paul Davis 5aa4d95f59 rename a Buffer/BufferSet method to be a little clearer as to its intent (is_silent(bool) => set_is_silent(bool))
git-svn-id: svn://localhost/ardour2/branches/3.0@10867 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-02 19:53:33 +00:00
Carl Hetherington d98b2b6039 Use same aeffectx.h for windows and linux VSTs.
git-svn-id: svn://localhost/ardour2/branches/3.0@10757 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-11-22 01:28:27 +00:00
Carl Hetherington d9a3c6b89f Rename windows VST stuff with a Windows prefix.
git-svn-id: svn://localhost/ardour2/branches/3.0@10738 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-11-21 17:42:29 +00:00
Carl Hetherington c7d2497e2b Discard MIDI when sending to the monitor bus. Fixes
#4372.


git-svn-id: svn://localhost/ardour2/branches/3.0@10212 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-10-17 20:35:55 +00:00
Paul Davis d4433b9ab3 (native) Linux VST support from LinuxDSP
git-svn-id: svn://localhost/ardour2/branches/3.0@10101 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-09-20 20:29:47 +00:00
Paul Davis 862972eaaa use std::vector::assign() in BufferSet::attach_buffers() rather than an explicit loop; minor formatting touchups
git-svn-id: svn://localhost/ardour2/branches/3.0@9912 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-07-22 15:44:13 +00:00
Carl Hetherington 16db8b5972 Add a couple of missing attach_buffers() calls after _ports has been changed. I think this fixes #3856.
git-svn-id: svn://localhost/ardour2/branches/3.0@9858 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-07-13 01:00:53 +00:00
David Robillard a473d630eb Fix broken whitespace. I'd apologize for the compile times if it was my fault :D
git-svn-id: svn://localhost/ardour2/branches/3.0@9654 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-06-01 16:50:12 +00:00
David Robillard c78528dcea Use LV2_SUPPORT define instead of HAVE_SLV2.
git-svn-id: svn://localhost/ardour2/branches/3.0@9510 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-05-14 17:59:16 +00:00
Carl Hetherington 110311e186 Re-fix compile failure with --no-nls (#3111).
git-svn-id: svn://localhost/ardour2/branches/3.0@9415 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-04-23 03:34:42 +00:00
Paul Davis 665f3bea5a fix all manner of wrongness with port buffer offsets
git-svn-id: svn://localhost/ardour2/branches/3.0@9098 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-03-07 19:06:42 +00:00
Paul Davis c9e78d432f some LV2 debug tracing
git-svn-id: svn://localhost/ardour2/branches/3.0@9078 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-03-05 23:14:39 +00:00
Carl Hetherington dd7caa0165 Optimise BufferSet::attach_buffers code to avoid memory allocation in the RT thread and speed things up a bit.
git-svn-id: svn://localhost/ardour2/branches/3.0@8490 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-01-10 16:23:54 +00:00
Carl Hetherington 73192bc1a7 Remove all use of nframes_t.
git-svn-id: svn://localhost/ardour2/branches/3.0@8166 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-03 22:26:29 +00:00
Carl Hetherington d86000efd0 Fix crash when running an analysis of a plugin with MIDI IO.
git-svn-id: svn://localhost/ardour2/branches/3.0@7889 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-10-09 12:17:46 +00:00