summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_track.cc
AgeCommit message (Collapse)Author
2016-12-07Save/Restore MIDI Automation Controls (current CC, PGM)Robin Gareus
2016-12-03Fix event type and parameter type confusionDavid Robillard
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.
2016-12-03Remove Evoral::MIDIEventDavid Robillard
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-10-14Revert "change return type of AutomationControl::actually_set_value() from ↵Paul Davis
void to bool, to indicate if value was changed." This reverts commit c104c9d4726f3ba1ecd352d13b88a57f2f964510.
2016-10-12change return type of AutomationControl::actually_set_value() from void to ↵Paul Davis
bool, to indicate if value was changed. Don't call Session::set_dirty() when no change occurs
2016-08-19MIDI polyphonic pressure, part 2Paul Davis
2016-07-14Consolidate delivery buffer flushing of all route typesJulien "_FrnchFrgg_" RIVAUD
Route::no_roll(), Route::roll(), Track::no_roll(), AudioTrack::roll() and MidiTrack::roll() all had the exact same loop for flushing buffers of their Delivery processors. That was a lot of replicated code that had to be kept synchronised by hand. Put that code into a protected method Route::flush_processor_buffers_locked() which is called instead.
2016-07-14enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.hPaul Davis
2016-06-25major internal plugin & processor API change:Robin Gareus
Pass current (latency compensated) cycle times to plugin. This fixes time-reporting to plugins and also fixes automation and when bouncing (the session->transport* is not valid) etc.
2016-06-08fix mute automation for busses & consolidate code.Robin Gareus
2016-05-31first vaguely working version using PresentationInfoPaul Davis
remote control ID and "order keys" have been removed.
2016-05-31move ever close to working master/slave logic, this time with audio testingPaul Davis
2016-05-31universal change in the design of the way Route/Track controls are designed ↵Paul Davis
and used. The controls now own their own state, rather than proxy for state in their owners. Massive changes all over the code to accomodate this. Many things are not finished. Consider this a backup safety commit
2016-05-31new API for route solo/mute state mgmtPaul Davis
Route now calls back into Session when solo/mute/listen state changes. All other interested parties must use the Route::{solo,mute,...}_control()->Changed() to be notified of changes. The Session requires more information than the Changed signal can provide, in order to propagate solo/mute changes across the entire Session correctly. Note that this uses an experimental use of CRTP to isolate a public API within Session
2016-05-07fix LocaleGuard contstructor (3dc77280)Robin Gareus
2016-05-05we always only use the "C" locale when saving.Robin Gareus
2016-05-04OMNIBUS COMMIT: prefer const XMLNode::property method (and provide a real one)Paul Davis
2016-01-31make Track::set_monitoring() use a GroupControlDisposition; expose an ↵Paul Davis
AutomationControl for track monitoring choice
2016-01-22first compiling, mostly working version of group controls changesPaul Davis
2016-01-02change Controllable::set_value() API to include grouped control consideration.Paul Davis
This also removes Route::group_gain_control() and associated machinery. Not yet tested with Mackie or other surfaces. More work to done to start using the group capabilities, and also potentially to add or derive more controls as RouteAutomationControls
2015-12-28add midi-track mute automationRobin Gareus
2015-11-29fix seamless midi-looping - fixes #5438Robin Gareus
well, now... - Midi-Ports have a midi-buffer. - Midi-Tracks have a midi-buffer. - Midi-tracks have a diskstream. - Midi-diskstream has a midi-ring-buffer. - Midi-tracks have a delivery - The delivery can get a reference to the actual backend-ports - The delivery calls the Midi-Port's flush() buffer to send out queued events at the end of a cycle all clear ? :) - when splitting the process-cycle: only the Ports are informed. all other objects see a "normal" short process cycle starting at "0". The offset needs to be applied early on, so that internally routed buffers push the event at the correct time when combining the buffer with immediate and async events. Luckily Port::port_offset() is a static member, available to all, objects, which allows to bridge the conceptual gap between the diskstream and the delivery. There's a snag: When there's a note-on directly at the beginning of the loop it coincides with the panic message sent when looping. The panic comes before note events, so it *should* be good. Also the final note-offs (state tracker end of loop/region) are sent 1 sample too early (smells like an off-by-one), and are hence dropped. (no matter we send a panic right after it). It should really be at the same time, just before the panic.
2015-10-21Add AutomationControl::set_value_unchecked() and ↵Paul Davis
AutomationControl::writable() and use them. Classes derived from AutomationControl now check ::writable() in their ::set_value() methods to ensure that they do not attempt to overwrite data sent to them while automation playback is underway.
2015-10-05NOOP, remove trailing tabs/whitespace.Robin Gareus
2015-10-04globally remove all trailing whitespace from ardour code base.Paul Davis
Paul Davis was responsible for introducing almost all of this.
2015-08-28fix crash with missing .midRobin Gareus
assert in ARDOUR::MidiRegion::control() boost::shared_ptr<ARDOUR::MidiModel>::operator-> invalid ptr. see http://pastebin.com/dTV10Zu6
2015-08-24Do not send non-automated MIDI-CCs on locate.Robin Gareus
If a "CC" automation lane was visible at least once, a Control Object is created and henceforth saved with the session: <Object id="automation TrackID TYPE" ../> It is currently not possible to remove this object. (Automation > clear will only zero all events, but not remove the Control itself. The bug: After showing a MIDI-CC lane at least once Events are sent for this CC. If there is no corresponding value in the .mid, it will be zero after session reload. see also 7e2c8ac Still ToDo: "Show existing automation" shows the lane even if there are no values nor any automation at all for the given CC.
2015-07-23avoid llabs ambiguityRobin Gareus
(old gcc has a built-in)
2015-06-29Tracks does not (want to) support destructive tracksPaul Davis
2015-06-16add Record-Safe feature to libardour (from Nikolay Polyanovskii)Paul Davis
2015-03-29Fix mute of MIDI tracks with channel forcing.David Robillard
This moves MIDI channel filtering into a reusable class and moves filtering to the source, rather than modifying the buffer afterwards. This is necessary so that the playlist trackers reflect the emitted notes (and thus are able to stop them in situations like mute). As a perk, this is also faster because events are just dropped on read, rather than pushed into a buffer then later removed (which is very slow). Really hammering on mute or solo still seems to produce stuck notes occasionally (perhaps related to multiple-on warnings). I am not yet sure why, but occasional beats always.
2015-03-26Follow MIDI control values with automation faders.David Robillard
Fixes bug #6166 (except record). This attempts to follow the "current" control value somewhat aggressively: * On locate, slider is set to the value from the top region at the new transport position. * Playback or MIDI input is followed "live". * Whenever the slider is moved (including automatically), that value is emitted as an immediate event to keep external gear in sync. General idea is that the Ardour slider should act as a mirror of an external hardware knob, and both should be synced to whatever the control is at the current transport position. Since we lack real playback/touch/etc modes for these for now, we must choose one behaviour, and this seems like the most reasonable one. Follow is handled in the audio thread, which is probably not ideal, but since these controls have no lists and do not record, should be fine. Probably.
2015-03-24Resolve only active notes when muted/non-soloed.David Robillard
Fixes bug #6206.
2015-02-12fix midi-capture filterRobin Gareus
diskstream reads directly from port, Route use prefilled buffer-set.
2015-01-19use C locale, because POSIX locale is not supported on windows, and ↵Ben Loftis
operation is undefined. C works on all platforms
2014-12-17MIDI bounce.David Robillard
2014-12-01Replace half-baked param metadata with descriptor.David Robillard
Among other things, this means that automation controls/lists have the actual min/max/normal/toggled of parameters, and not those inferred from the Parameter ID, which is not correct for things like plugin parameters. Pushing things down to the Evoral::ParmeterDescriptor may be useful in the future to have lists do smarter things based on parameter range, but currently I have just pushed down the above-mentioned currently used attributes.
2014-12-01Make it compile with C++11 support.Julien de Kozak
Reference : https://bugs.webkit.org/show_bug.cgi?id=59249
2014-11-02Automation of LV2 plugin properties.David Robillard
Work towards ParameterDescriptor being used more universally to describe control characteristics.
2014-10-22fix timestamps for immediate MIDI events to deal with split process cycle ↵Paul Davis
conditions
2014-10-16fix midi automation slidersRobin Gareus
Allow controls to work without a list. see also 34c1465 and b469cd2
2014-08-31Fix crash when changing automation mode for MIDI track control automation.David Robillard
Also some work towards tolerating automation controls with no automation list, towards actually doing something for these cases, though not required just to fix this crash (MidiTrack::set_parameter_automation_state() avoids those paths).
2014-06-04re-work bounce/freeze. Freezer stops at first active delivery.Robin Gareus
amend to 8f52bf7d9f
2014-01-23fix merge conflict with masterPaul Davis
2014-01-22remove cruftRobin Gareus
2013-09-05'libs/ardour' - Revert 'std::llabs' to 'llabs' until we find a ↵John Emmas
platform-neutral solution (MOTE - 'llabs' and '::llabs' are being used successfully in other parts of Ardour)
2013-09-03Merge branch 'master' into windowsPaul Davis
2013-09-02add std:: to clarify use of llabs on OS XPaul Davis
2013-08-24fix merge conflicts from masterPaul Davis
2013-08-04'libs/ardour' - Main body of changes required for building with MSVCJohn Emmas