summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/midi_ring_buffer.h
AgeCommit message (Collapse)Author
2017-09-18globally change all use of "frame" to refer to audio into "sample".Paul Davis
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
2015-03-24Resolve only active notes when muted/non-soloed.David Robillard
Fixes bug #6206.
2015-03-12cont’d work on a16dd7c, fixes #6170Robin Gareus
2014-12-20Maintain correct tracker state on MIDI overwrite.David Robillard
This is a little hard-edged in that edits while rolling will prematurely chop off any playing notes, but at least the state of things actually reflects reality. More sophisticated solution hopefully to come...
2014-11-30Move EventRingBuffer to libardour.David Robillard
This is not used anywhere in Evoral and is just a wrapper around the PBD RingBuffer anyway. Towards a (once again?) independently buildable/testable Evoral and fewer cross-dependencies.
2014-11-30Clean up state tracking of raw MIDI.David Robillard
2014-01-14'libs/ardour' - DLL visibility stuff and associated changes needed for ↵John Emmas
building with MSVC. Currently includes debugging information and things that are just commented out until we have known compatibility with the other platforms (i.e. contains stuff to be removed at a later date)
2013-10-17add export visibility macros across libardourPaul Davis
2013-03-27Squashed commit of the following:Paul Davis
commit fdbae82077db53add90df7448a06869dac89acc6 Author: Paul Davis <paul@linuxaudiosystems.com> Date: Wed Mar 27 21:45:28 2013 -0400 mammoth changes in basic signal flow, total redesign of MIDI channel filtering and more. commit 59343a8283698e02bc0f622313b29e98f449e4c8 Author: Paul Davis <paul@linuxaudiosystems.com> Date: Wed Mar 27 01:58:53 2013 -0400 initial working version after changes to MIDI channel filtering. may affect metering input too. testing not yet finished this commit merges many deep changes in ardour's internal architecture, combined with a total redesign of how MIDI channel filtering works. data in a track used to flow from JACK port buffers to diskstream's ringbuffers and was then copied from the ringbuffers into a BufferSet for use during Route::process_output_buffers(). The butler thread would handle the movement of data between the ringbuffers and disk. with this commit, data now flows from JACK port buffers into the BufferSet used for Route processing, and is copied from the BufferSet into the diskstream's ringbuffers (the butler thread continues to handle interactions with disk as usual). this change allowed a dramatic consolidation of code and simplification of most aspects of Track/Route::roll() and Track/Route::no_roll(). in particular, see Route::fill_buffers_with_input() which now concisely describes how we move data from JACK port buffers into the BufferSet for all Route types (including Tracks). this work was initially motivated by changing MIDI channel filtering so that we can process capture and playback independently. there is now a very clean pathway for this - see MidiTrack::roll() (NOTE: This needs implementing in the no-roll case too - a TODO item). the channel selector for MIDI tracks has been moved out of the track header and is now accessible via the context menu. more work is likely here, to make it (more) obvious to the user when filtering is going on.
2013-01-21Trim the include tree a bit.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@13941 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-08tentative redesign of MIDI looping, will probably fix #5050 but needs more ↵Paul Davis
extensive testing; remove several unused parameter names git-svn-id: svn://localhost/ardour2/branches/3.0@13810 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-10-11implement missing midi event filtering during recordingHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@13243 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-10-10whitespaceHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@13222 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-18make switching between input+disk monitoring work "right" for MIDI tracks; ↵Paul Davis
also fix a bug that led to messages about notes already being on at program start because of a double seek with no read in between git-svn-id: svn://localhost/ardour2/branches/3.0@12762 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-26a grab bag of changes correcting and improving the way MIDI note on/off ↵Paul Davis
tracking is done. may/should fix a number of problem with spurious note-offs under a variety of circumstances git-svn-id: svn://localhost/ardour2/branches/3.0@11074 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-06-21change default overlapping note strategy to "relax" (i.e. do nothing); fix ↵Paul Davis
crash when looping with MIDI data; add back note-off resolution at loop point (if it was actually there) so that notes are turned off (but don't forget Ye Olde Sustain Pedal/Controller) when looping; minor other non-functional tweaks git-svn-id: svn://localhost/ardour2/branches/3.0@9753 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-05-29detect buffer "overflow" when delivering immediate events and queue ↵Paul Davis
remainder for delivery next time (though without actually requeing - just leave ringbuffer ptrs/indexes where they are. required some deep but minor changes in how MidiRingBuffer::read() works, so that we can detect if we're going to be able to deliver an event before we actually read any of its data. Peek FTW! git-svn-id: svn://localhost/ardour2/branches/3.0@9629 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-04-04reimplement MidiRingBuffer::dump()Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@9283 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-03-26remove Evoral::RingBuffer, which was (a) duplicating PBD::RingBufferNPT and ↵Paul Davis
(b) broken; replace it with PBD::RingBufferNPT git-svn-id: svn://localhost/ardour2/branches/3.0@9212 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-03Remove all use of nframes_t.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@8166 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-14Strip trailing whitespace and fix other whitespace errors (e.g. space/tab ↵David Robillard
mixing). Whitespace changes only. Vimmers, try let c_space_errors = 1 in your .vimrc to highlight this kind of stuff in red. I don't know the emacs equivalent... git-svn-id: svn://localhost/ardour2/branches/3.0@5773 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-09-16do not allow smf_source's reads to stomp on cached read_end position in ↵Paul Davis
parent class, which creates chaos by being out of sync with MidiSource::_model_iterator. this doesn't totally fix MIDI playback, but it helps git-svn-id: svn://localhost/ardour2/branches/3.0@5665 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-02Make (MIDI) event time stamp type a template parameter.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@4473 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-12-29* fixed bug introduced in revision 3335: Hibyte lost in channel mask when ↵Hans Baier
restoring state from XML git-svn-id: svn://localhost/ardour2/branches/3.0@4356 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-12-27Move MidiRingBuffer::read into .cc file to avoid the 2 hour dev cycle (no ↵David Robillard
functional changes). git-svn-id: svn://localhost/ardour2/branches/3.0@4352 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-11-22* added XML deserialisation for control and program changesHans Baier
* added pointer checks * fixed typos in comments git-svn-id: svn://localhost/ardour2/branches/3.0@4234 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-10-13Fix pollution of global namespace by Evoral.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@3947 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-10-12MIDI looping fixes from torbenh.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@3932 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-10-10Apply MIDI looping patch from torbenh, with minor changes.David Robillard
General idea: use internal events to mark loop boundaries in MIDI buffers so readers can make sense of timestamps. git-svn-id: svn://localhost/ardour2/branches/3.0@3905 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-10-08Fix MIDI playback while looping (ignore events with out of range time stamps ↵David Robillard
gracefully in MIDI ring buffer). git-svn-id: svn://localhost/ardour2/branches/3.0@3885 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-09-22Move event specific ringbuffer stuff to evoral.David Robillard
Sane event type interface between evoral and libardour (no more shared magic numbers). Cleanup Evoral::Sequence iterator, fix bugs, probably introduce new ones. Move MIDI specific event functions to Evoral::MIDIEvent (is-a Evoral::Event). git-svn-id: svn://localhost/ardour2/branches/3.0@3785 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-09-19Factor out sequencing related things into an independant new library: "evoral".David Robillard
Anything related to the storage of events/values over a range of time lives in evoral. This includes MidiModel (Evoral::Sequence) and automation data (AutomationList (Evoral::ControlList), Automatable (Evoral::ControlSet), etc). libs/evoral synced with http://svn.drobilla.net/lad/trunk/evoral r1511. git-svn-id: svn://localhost/ardour2/branches/3.0@3754 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-06-02rollback to 3428, before the mysterious removal of libs/* at 3431/3432Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@3435 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-06-02remove empty sigc++2 directoryDoug McLain
git-svn-id: svn://localhost/ardour2/branches/3.0@3432 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-23Remove pointless Byte typedef that didn't really match any other typedef in ↵David Robillard
ardour anyway. git-svn-id: svn://localhost/ardour2/branches/3.0@3409 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-21More petty clean ups of MIDI stuff.David Robillard
Use more complete header I had laying around for MIDI controller names / depollute Automatable. git-svn-id: svn://localhost/ardour2/branches/3.0@3378 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-16* Fixed crash on closing MIDI automation tracks, because ↵Hans Baier
ARDOUR::Parameter::operator< violated strict weak ordering, which is necessary for std::set to work correctly * few small style guide corrections git-svn-id: svn://localhost/ardour2/branches/3.0@3363 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-12* fixed various event size bugsHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@3336 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-12Fix various MIDI corruption bugs.David Robillard
Re-enable MIDI CC controller bars and other immediate output (hans commented out, tsk tsk). Write channel mode as textual enumeration instead of magic number. Better atomic (almost) channel mode switching on MIDI ring buffer (was a possible, if unlikely, source of corruption). Handle some cases of broken MIDI, and oversized events, more gracefully. git-svn-id: svn://localhost/ardour2/branches/3.0@3335 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-11* disabled some debugging outputHans Baier
* fixed (my) bugs in MidiRingBuffer: aborted reading on corrupted events and event does not match channel mask git-svn-id: svn://localhost/ardour2/branches/3.0@3333 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-11* Added a couple of guards to prevent MIDI::Events with NULL buffers to ↵Hans Baier
enter into ring buffers git-svn-id: svn://localhost/ardour2/branches/3.0@3332 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-09* adjusted formatting a bit to style guideHans Baier
* fixed: velocity value left on canvas * fixed: end-of-track problem still showed up sometimes * enabled heaps of debugging output in order to debug MidiModel corruption git-svn-id: svn://localhost/ardour2/branches/3.0@3329 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-04-22* disabled some debugging outputHans Baier
* make record buttons appear in MIDI mixer strips git-svn-id: svn://localhost/ardour2/branches/3.0@3280 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-04-21*fixed bug: channel mask not set in MidiRingBufferHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@3274 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-04-21* UI fixes for track channel selectionHans Baier
* implemented 'forcing midi events into a single channel' * see http://www.flickr.com/photos/24012642@N02/2430165889/ git-svn-id: svn://localhost/ardour2/branches/3.0@3273 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-04-19* first prototype for track based channel selection worksHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@3267 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-04-03* implemented editing velocities (http://tracker.ardour.org/view.php?id=2148)Hans Baier
* added MIDI panic button (http://tracker.ardour.org/view.php?id=2118) * bugfix: moving notes above midi 127 or below 0 does not wrap around anymore * bugfix: deadlock on editing notes after playback (http://tracker.ardour.org/view.php?id=2140) due to unbalanced lock acquire/release * bugfix: First note off lost in playback (http://tracker.ardour.org/view.php?id=2132) * bugfix: Last note off lost in saving MIDI files (http://tracker.ardour.org/view.php?id=2132) * bandaid fix for http://tracker.ardour.org/view.php?id=1985 (Cannot reopen session because jack ports are not unregistered on session close) * bandaid fix: replaced conf.CheckPKGExists ('\"slv2 >= 0.6.0\"') by conf.CheckPKGExists ('slv2') in SConstruct, because the former would fail, even if SLV 0.6.0 was installed * added/enabled debugging output for debugging MIDI model (might be removed later) git-svn-id: svn://localhost/ardour2/branches/3.0@3211 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-03-18refactor JACK MIDI port to allow writing from a non-process() thread, and ↵Paul Davis
move ARDOUR::MidiEvent into MIDI namespace along with midi_events.h header git-svn-id: svn://localhost/ardour2/branches/3.0@3155 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-08-31Reading of MIDI CC from MIDI regions (MidiModel). UI still needs work though..David Robillard
Various fixes for linear/integer AutomationList interpolation (for CC). git-svn-id: svn://localhost/ardour2/trunk@2359 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-08-16Make SMFSource suck significantly less.David Robillard
Read from MidiRingbuffer directly into model, don't read MidiRingBuffer into a new midi buffer, then into the model. Pass rec data to UI via model instead of a separate buffer. Read MIDI CC data into MidiModel (though not actually used yet). Made quantization toggle edited flag so model is saved. git-svn-id: svn://localhost/ardour2/trunk@2308 d708f5d6-7413-0410-9779-e7cbd77b26cf