summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_ring_buffer.cc
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
2016-10-17Clean up MIDI debugging outputDavid Robillard
2016-09-13add back event offsetting into MidiRingBuffer::read() (even if we never ↵Paul Davis
really use it)
2016-09-13NOOP: spacing and indentationPaul Davis
2016-09-13show "this" in MidiRingBuffer::dump()Paul Davis
2016-09-13add a new DEBUG enum for MidiRingBufferPaul Davis
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-06-12We were 2 more debug "bits" away from overflow, so recast PBD::DEBUG ↵Paul Davis
mechanism away from a 64bit integer and toward std::bitset. Clean up a few minor related PBD::DEBUG issues along the way
2015-03-30note to midi devs.Robin Gareus
2015-03-30fix typo in skip/state-trackerRobin Gareus
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-30Clean up state tracking of raw MIDI.David Robillard
2014-10-23small round of compiler warning fixesRobin Gareus
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-28fix another semantically-significant statement buried in an assert() macroPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@14020 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-26fix breakage for optimized build caused by semantically critical statement ↵Paul Davis
inside an assert() git-svn-id: svn://localhost/ardour2/branches/3.0@14004 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-19Replace a bunch of potential crashes with graceful handling of the situation.David Robillard
We really need some kind of more sophisticated assert macro that can be switched to non-fatal logging mode for release builds. A log message, which is often all that would happen, is a lot better than a trainwrecked performance... git-svn-id: svn://localhost/ardour2/branches/3.0@13892 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-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
2012-05-24Compile cleanly with clang.David Robillard
To compile Ardour with LLVM/clang, do the usual thing but set the CXX and CC environment variables, e.g.: CC=/usr/bin/clang CXX=/usr/bin/clang++ ./waf configure build git-svn-id: svn://localhost/ardour2/branches/3.0@12418 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-07-08fix incorrect use of MidiBuffer::reserve() and MidiBuffer::write() if ↵Paul Davis
channel mask discards a MIDI event (fixes #4138) git-svn-id: svn://localhost/ardour2/branches/3.0@9811 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-06-01Fix broken whitespace. I'd apologize for the compile times if it was my ↵David Robillard
fault :D git-svn-id: svn://localhost/ardour2/branches/3.0@9654 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-04Fix broken whitespace (no functional changes).David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@9289 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
2011-01-10Make a couple of bits of debug conditional to avoid mallocs when they are ↵Carl Hetherington
turned off. git-svn-id: svn://localhost/ardour2/branches/3.0@8492 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
2010-09-23Fix assert. Remove some debug output.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@7833 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-08-13Hopefully fix dropped MIDI notes on loop. Fixes #3133.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@7613 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-09basically, fix all kinds of odds and ends with MIDI playback, including ↵Paul Davis
missed notes and applying gain git-svn-id: svn://localhost/ardour2/branches/3.0@7247 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-08Small cleanup.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@7242 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-08Update ring buffer read pointer correctly in case of a failure to insert an ↵Carl Hetherington
event into the MidiBuffer. git-svn-id: svn://localhost/ardour2/branches/3.0@7241 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-03-02the mega-properties/SequenceProperty patch. split is broken at present ↵Paul Davis
(right hand starts has start-in-source of zero) git-svn-id: svn://localhost/ardour2/branches/3.0@6718 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-20remove a couple of boost::signals2 trouble spots; fix some --strict compile ↵Paul Davis
time warnings git-svn-id: svn://localhost/ardour2/branches/3.0@6378 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-25make per-region note-tracking in MidiPlaylist work correctly, or something ↵Paul Davis
very close to it. note that locking isssues remain when regions (and thus note trackers) are removed git-svn-id: svn://localhost/ardour2/branches/3.0@5912 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-21(full commit): fix MIDI playback by not writing into the playback buffer ↵Paul Davis
from MidiDiskStream::process() unless recording. This has a negative impact on "monitoring" MIDI, but that needs a different, somewhat more expansive solution anyway git-svn-id: svn://localhost/ardour2/branches/3.0@5685 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-09-14fix up marshall/unmarshall of note data for MidiModel::DiffCommandPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@5662 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-08-27lots of MIDI editing stuff. to be explained on the website when its donePaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@5596 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-05Fix crash when playing back MIDI within a loop.David Robillard
Fixes mantis issue #0002570. git-svn-id: svn://localhost/ardour2/branches/3.0@5052 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-01Fix MIDI playback.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@5024 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-15Use nframes_t for timestamps of real (jack) time MIDI events (i.e. in ↵David Robillard
MidiBuffer and MidiRingBuffer). Use iterator interface of Sequence to read events in a MIDISource rather than Sequence::read, avoiding timestamp confusion. Disable no longer useful Sequence::read. git-svn-id: svn://localhost/ardour2/branches/3.0@4570 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-02Disable excessive console output (please comment this stuff before ↵David Robillard
committing...). git-svn-id: svn://localhost/ardour2/branches/3.0@4479 d708f5d6-7413-0410-9779-e7cbd77b26cf