A complete reimplementation of AudioGrapher::SilentTrimmer::process to support
trimming the beginning and end in the same processing block
Fix export with trim end enabled to actually trim silent frames
Only add silence to beginning or end of export data if data was written
Should resolve: #6412
Unlike many of the other uses of the term "frame" this is actually returning
the index to the first sample in the interleaved frame that contains
non-silence.
With end trim enabled, the only case that would successfully export was if
there was at least some samples above the silence threshold in the last export
processing block.
The issue was that the EndOfInput flag was not being passed to
AudioGrapher::SndFileWriter::process which would then call sf_write_sync and
emit the FileWritten signal to start post processing. Fix that by always
passing the EndOfInput flag in the last export process cycle.
Related: #6412
All float values defined in the CONFIG_VARIABLE macro seem like they are cast
to at some stage before writing (another issue that needs addressing). The
default value for export-silence-threshold (-INFINITY) is converted to a value
of 0 and as a result nothing is exported with trim enabled.
Use the same fixed silence threshold as Mixbus until proper bounds checking and
GUI is in place.
Related: #6412
Just an update to slightly rotten wscripts, shouldn't be any changes during an
ardour build. Motivation being a short development cycle for working on evoral
and/or its test suite.
Note the old Note::operator= was unsafe, since it made shallow copies of the on
and off events, which results in a double delete of events when the notes are
destructed.
I'm not sure if this is really the best way to do event types (should it
just be a completely static enum in evoral, or completely dynamic and
provided by the type map, or a mix like currently?), but previously the
event type was frequently set to either total garbage, or parameter
types, which are a different thing.
This fixes all those cases, and makes Evoral::EventType an enum so the
compiler will warn about implicit conversions from int.
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.
fbc8504f9e swapped the iterators: Instead of iterating over output
buffers like BufferSet::read_from(), the new code iterates over
the current buffers. In case of 1 in -> 2 out, only the 1st channel
was be copied. Also unlike BufferSet::read_from() the ChanCount was
not updated.
Processors after a Delivery e.g. out-meter, AFL processor did not see
all channels.
This no longer emits Changed() unless a change was made, and more
importantly, calls AutomationControl::actually_set_value() if
the self-soloed value needs to be changed
Moves global update of solo state and emission of Session::SoloChanged to
a single point after 1 to N solo controls are changed.
Also avoid unnecessarily emitted Activated() signal for listen controls,
though Process::{activate,deactive}() should probably be redesigned to
avoid this in a "deeper" way
Fixes an issue with corrupted std::lists<> due to concurrent writes
to the invalidation list which eventually resulted in
EventLoop::invalidate_request() not invalidating requests.
Concurrency sucks rocks hard.
This issue is not always reproducible but when it does occur it happens
somewhat consistently on both 32bit and 64bit builds(Tested on Windows 7).
The midiOutReset call does not return (or it takes so long that it might as
well be indefinite) and as it is not strictly necessary just remove it.
Resolves: http://tracker.ardour.org/view.php?id=7095
There are a couple of header files where we use a reference to class ARDOUR::MidiCursor (rather than a pointer). To keep MSVC happy we need to #include its header file, rather than simply using a forward reference.
- in an ideal world, this wouldn't be here at all,
but is required to support framewalk_to_qn().
if Beats are at tick resolution, the frame-induced
temporal rounding is acceptable.
- adds quarter_notes_per_minute(), note_divisions_per_minute (double)
pulses_per_minute() and frames_per_quarter_note()
- this should be a no-op except for the use of tempo by
the vst callback which definitely uses quarter notes per minute.
- the XML node for TempoSection named 'beats-per-minute'
has been renamed.
- Tempo beats_per_minute() is currently implemented as note types per minute.
a further patch will change Tempo to reflect this and provide some helpers.
- add more debugging output detecting regions whose
beat and frame position do not align on a playlist.
this is required as a check as we have never used
frame rounding on constant tempi before 8884a5723dc
- moves frame rounding up to TempoMap, which is needed
in order to calculate pulse distance without frame rounding.
- the time unit for tempo is still minute, but this now also
applies to meter sections. (new audio locked meter sections no
longer require a frame position).
- there is no longer a discontinuity
in the pulse for audio-locked meter/tempi.
- temporarily add debugging output in Region::set_position()
to test for region beat not matching region frame.
* expose Route IOs, Panner and Instrument
* add plugin + processor ChanCount
* bind IOPortDescription
* remove Port::**(Port*) API because there's no Port* but only
boost::shared_ptr<Port>
Fixes the multiple reader issue #6541 properly without resorting to a
linear search kludge.
All the read state has been pulled out into a MidiCursor which the
caller is required to pass. The playlist keeps cursors for all the
regions it is reading, any number of cursors are allowed at a time.
MidiCursor should probably be made a smarter and more fool-proof
object (and/or possibly merged with some of the other tracker/fixer
stuff) but for now I wanted to keep it simple.
Windows key generates Mod4+Super (at least with the version of Gdk we use on
linux) so for bindings using the Windows key to work, GDK_SUPER_MASK has to be
added to modifier mask.
- quarter note precision is greater than the frame-based
_position. using it as a reference may cause a rounding error
if the region is locked to MusicTime.
- also fixes a _start position bug when trimming midi regions.
- we really need a better api for this kind of thing.
- in combination with the previous two patches, this should fix
various missing first note issues.
This allows to flush an async MIDI port's ringbuffer at cycle-start,
to makes its data available as "input/source" during process(), while
collecting data in the background for the next cycle.
This facilitates virtual MIDI Ports for eg. Control Surface Pads:
output from a surface, input to Ardour channels.
eg. import a .mid that has a CC later in the file.
Arodur wrongly added an initial point, effectively moving the event
backwards to "0" (no virgin territory)
- when the timeline displays many bars, zoom/autoscroll
speed is improved by calculating the bbt ruler scale first
then requesting a suitably scaled grid.
This can occur when the MIDI readahead time is too low and events get
pushed into the MidiRingBuffer after the corresponding read. In this
case, skip_to() gets called (as it does before every read) and the
events are silently dropped.
This is a Very Bad Thing(TM), so warn about it. I am not sure which
other scenarios can skip events that aren't problematic, but there's
probably some. A more sophisticated detection/reporting (or maybe even
dynamic reconfiguration) scheme would be nice here, but some false
positive messages are at least better than silently failing to play
notes and the like.
cc121.cc: In member function 'void ArdourSurface::CC121::encoder_handler(MIDI::Parser&, MIDI::EventTwoBytes*)':
cc121.cc:413: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
/usr/include/architecture/i386/math.h:343: note: candidate 1: double pow(double, double)
/usr/include/c++/4.2.1/cmath:357: note: candidate 2: float std::pow(float, float)
shared_ptr<Port> now uses a deleter functor which pushes Port* to a lock-free FIFO so that the Port is
always deleted (and thus unregistered with the PortEngine/backend) in a safe context w.r.t. various
callbacks in the host. Currently the auto_connect_thread in Session has been tasked with doing these
deletions.
If some plugin-internal state changes (GUI <> Plugin e.g. load a sample)
no ports change and the host does not know that the plugin state has
changed. The session may be closed without save.
This is a prototype using an ardour.org URI, pending upstream lv2plug.in
The issue was introduced in dbf86a495b, forcing must_exist = true
for *all* files that have a absolute _origin, including stub
SilentFileSources.
If an external file is no longer available and a user chooses to
"ignore, skip" an SilentFile is created instead of the actual source,
The SilentFileSource has the same XML state which includes _origin.
ARDOUR::SilentFileSource::SilentFileSource () c'tor calls
AudioFileSource::AudioFileSource (,.., must_exit = false)
but since the file has an absolute _origin, the AudioFileSource c'tor sets
must_exist = true; throws and the session cannot be loaded.