summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/midi_playlist.h
AgeCommit message (Collapse)Author
2017-09-24convert codebase to use Temporal for various time typesPaul Davis
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
2017-02-15Don't copy-construct MusicFrame, pass const reference.Robin Gareus
2017-02-04rework snapnick_m
snap now fills in a struct (MusicFrame) which contins a snapped frame along with a music divisor. this gives useful information wrt magnetic snap which may or may not have rounded to an exact musical position. region position may now be set musically (using quarter notes for now). this patch fixes several problems in the current code: - dragging a list of music-locked regions now maintains correct musical offsets within the list. - splitting regions using magnetic snap works correctly (#7192) - cut drag should now work correctly with magnetic snap. - musical length of split midi regions is no longer frame based.
2016-11-08Support multiple readers for MIDI source/modelDavid Robillard
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.
2016-09-13change all MIDI read-from-source to map all events into the loop-range for ↵Paul Davis
seamless looping (if using)
2016-03-21Trim dependence on evoral types.hpp and Beats.hppDavid Robillard
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-05Handle edits while playing precisely.David Robillard
This avoids stuck notes if active notes are edited, but without stopping all active notes in the region on any edit as before. This implementation injects note ons in places that aren't actually note starts. Depending on how percussive the instrument is, this may not be desired. In the future, an option for this would be an improvement, but there are other places where "start notes in the middle" is a reasonable option. I think that should be handled universally if we're to do it at all, so not considering it a part of this fix for now.
2015-03-05Clean up MidiPlaylist::read, kill copy-paste code.David Robillard
Towards putting more advanced logic here, where two copies of everything will get even more hairy. The two cases of reading from one or many regions are not very different in the read phase, the only difference is the target. So, point a reference to the appropriate target, use the same read code in either case, then sort/etc afterwards only if necessary.
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-20Clean up some MIDI code.David Robillard
2013-10-18Merge remote-tracking branch 'remotes/origin/exportvis' into windows+ccJohn Emmas
Conflicts (hopefully resolved): gtk2_ardour/wscript libs/ardour/ardour/audioregion.h libs/ardour/ardour/debug.h libs/ardour/ardour/directory_names.h libs/ardour/ardour/filesystem_paths.h libs/ardour/ardour/session_event.h libs/gtkmm2ext/gtkmm2ext/utils.h libs/panners/1in2out/wscript libs/panners/2in2out/wscript libs/panners/vbap/wscript libs/pbd/pbd/debug.h libs/pbd/pbd/file_utils.h libs/pbd/pbd/pathexpand.h libs/pbd/pbd/ringbuffer.h libs/pbd/pbd/ringbufferNPT.h libs/pbd/pbd/search_path.h libs/pbd/pbd/stacktrace.h libs/pbd/pbd/uuid.h libs/pbd/pbd/uuid_boost.h libs/surfaces/control_protocol/control_protocol/basic_ui.h libs/surfaces/control_protocol/control_protocol/control_protocol.h
2013-10-17add export visibility macros across libardourPaul Davis
2013-08-04'libs/ardour' - Main body of changes required for building with MSVCJohn Emmas
2012-04-16Fairly major change to the way in which crossfades are handled;Carl Hetherington
they are now done with region fades, rather than separate objects. After this commit, Ardour will try to convert your session files to the new crossfade format, but will make a backup in your session folder first. If you have works in progress using Ardour 3 it is ***STRONGLY RECOMMENDED*** that you back up session files before updating to this commit. git-svn-id: svn://localhost/ardour2/branches/3.0@11986 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-05-29totally untested initial code for MidiPlaylistSource, to provide for ↵Paul Davis
compound MIDI regions. putting it into SVN because my system might crash overnight :) git-svn-id: svn://localhost/ardour2/branches/3.0@9626 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-04-06Fix my name :)David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@9302 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-02-19change PropertyChange from a bitfield into a real object, with all the many ↵Paul Davis
widespread changes that causes git-svn-id: svn://localhost/ardour2/branches/3.0@6701 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-02-18the Properties & 64bit region commitPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@6695 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-02-10Move ARDOUR::Change into PBD so that Stateful can be aware ofCarl Hetherington
what Change a State reflects. Hence allow Stateful to do some of the work of set/get_state in Region. git-svn-id: svn://localhost/ardour2/branches/3.0@6671 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-24Fix needlessley explodey MidiPlaylist constructor.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@5909 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-19track notes at the region level in MidiPlaylist; resolve them (deliver note ↵Paul Davis
offs) if a note spans the end of the region git-svn-id: svn://localhost/ardour2/branches/3.0@5804 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-15rework Stateful::set_state() patch to avoid default version argumentPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@5787 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-15Part 1 of loading 2.X sessions; some things work, some things don't, hacks ↵Carl Hetherington
a-plenty. LOADING 2.X SESSIONS WITH THIS COMMIT IN PLACE WILL (PROBABLY) CORRUPT THE .ardour FILE, MAKING THE SESSION UNLOADABLE ON 2.X AND LOSING INFORMATION. So don't do that unless you make a backup of the session file first. git-svn-id: svn://localhost/ardour2/branches/3.0@5786 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-05-12Remove most using declarations from header files.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@5069 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-27Remove some unused code.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@4707 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-25*** NEW CODING POLICY ***David Robillard
All #include statements that include a header that is a part of a library bundled with ardour MUST use quotes, not angle brackets. Do this: #include "ardour/types.h" NOT this: #include <ardour/types.h> Rationale: This is best practice in general, to ensure we include the local version and not the system version. That quotes mean "local" (in some sense) and angle brackets mean "system" (in some sense) is a ubiquitous convention and IIRC right in the C spec somewhere. More pragmatically, this is required by (my) waf (stuff) for dependencies to work correctly. That is: !!! FAILURE TO DO THIS CAN RESULT IN BROKEN BUILDS !!! Failure to comply is punishable by death by torture. :) P.S. It's not that dramatic in all cases, but this (in combination with some GCC flags specific to the include type) is the best way I have found to be absolutely 100% positive the local ones are being used (and we definitely want to be absolutely 100% positive on that one). git-svn-id: svn://localhost/ardour2/branches/3.0@4655 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-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-09-29Can't call the wrong function when there's only one of them: remove ↵David Robillard
ARDOUR::Parameter and just use Evoral::Parameter (move Ardour specific functionality to EventTypeMap where it belongs). Less than pretty in places but easily seddable just in case... git-svn-id: svn://localhost/ardour2/branches/3.0@3838 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-02-19Less crash-happy MIDI reading on weird MIDI files.David Robillard
Make "show existing automation" create/show automation tracks for all contained CC in MIDI tracks. Fix staggered time when importing multi-track MIDI files. git-svn-id: svn://localhost/ardour2/branches/3.0@3086 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-07-28Use 'show contents' note range by default (fix uninitialized value).David Robillard
Obey note mode on playback (note offs are not sent in Percussive mode). Vary note colour/opacity with velocity (needs theization/tweaking, but hey, it's something). git-svn-id: svn://localhost/ardour2/trunk@2184 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-06-03Fix MIDI region loading.David Robillard
Add model loading and destroying to SMFSource. Load and display MIDI region data on session load. git-svn-id: svn://localhost/ardour2/trunk@1947 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-05-03optimize some performance bottlenecks; remove jack_nframes_t that crept back ↵Paul Davis
into the code git-svn-id: svn://localhost/ardour2/branches/midi@1779 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-01-09Merged with trunk R1283.David Robillard
NOTE: Compiles, but broken (crash on adding MIDI track). git-svn-id: svn://localhost/ardour2/branches/midi@1292 d708f5d6-7413-0410-9779-e7cbd77b26cf
2006-10-21Merged with trunk R999.David Robillard
git-svn-id: svn://localhost/ardour2/branches/midi@1000 d708f5d6-7413-0410-9779-e7cbd77b26cf
2006-08-29Merged with trunk R861David Robillard
Possible new bugs - not very thoroughly tested, but at least functional at first glance git-svn-id: svn://localhost/ardour2/branches/midi@870 d708f5d6-7413-0410-9779-e7cbd77b26cf
2006-08-16Progress on the disk side of things:David Robillard
- MidiRingBuffer implementation - MidiDiskstream reading from playlists - MidiPlaylist reading from regions - MidiRegions returning random notes for the time being, but the inter-thread stuff works.. Horrible awful mess, not really commit worthy, but I need to move machines. Nothing to see here.. :) git-svn-id: svn://localhost/ardour2/branches/midi@835 d708f5d6-7413-0410-9779-e7cbd77b26cf
2006-08-14More solid "fake" recording and serializationDavid Robillard
git-svn-id: svn://localhost/ardour2/branches/midi@825 d708f5d6-7413-0410-9779-e7cbd77b26cf
2006-08-11- Changed IO's vector<Port*>'s to PortListDavid Robillard
- Added new Port classes, code to drive them - Added PortList, which is a filthy mess ATM (nevermind that, it's the interface that's important at this stage) - Added ChanCount, though it isn't very thoroughly used yet. That's the next step.... - Fixed a few bugs relating to loading sessions saved with trunk - Fixed a few random other bugs Slowly working towards type agnosticism while keeping all the former code/logic intact is the name of the game here Warning: Removing ports is currently (intentionally) broken due solely to laziness. git-svn-id: svn://localhost/ardour2/branches/midi@786 d708f5d6-7413-0410-9779-e7cbd77b26cf
2006-06-26Actually added the code mentioned in my last commit. Whoops.David Robillard
git-svn-id: svn://localhost/ardour2/branches/midi@643 d708f5d6-7413-0410-9779-e7cbd77b26cf