summaryrefslogtreecommitdiff
path: root/libs/ardour/smf_source.cc
AgeCommit message (Collapse)Author
2010-12-09Use a weak_ptr rather than a bald pointer for _midi_source in MidiModel.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@8228 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-11-09add "origin" property to FileSource so that we can track multiple importsPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@7986 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-10-08Update recorded MIDI regions as notes arrive. Fixes one cause of infinite ↵Carl Hetherington
note-lengths during record. Fix various problems with multiple captures of MIDI during one pass. git-svn-id: svn://localhost/ardour2/branches/3.0@7887 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-10-05Improve GUI display during MIDI record in various ways.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@7875 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-09-17megaopus patch #2 for today: remove nframes64_t and sframes_t from sourcePaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@7792 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-09-14remove Glib::ustring from libardour; allow any characters except '/' and '\' ↵Paul Davis
in paths (may cause issues when loading creatively named 2.X sessions; fix a couple of details of name collection and usage from the startup dialog git-svn-id: svn://localhost/ardour2/branches/3.0@7772 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-09-01Clean up MidiSource::midi_read now that the signed type sframes_t is being ↵Carl Hetherington
used to pass positions around. git-svn-id: svn://localhost/ardour2/branches/3.0@7726 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-07-25Remove debug output from last commit.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@7486 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-07-25Add test for #3356.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@7485 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-07-20add note IDs and use them for looking up notes during a history rebuild. ↵Paul Davis
NOTE: INVALIDATES OLDER HISTORY FILES git-svn-id: svn://localhost/ardour2/branches/3.0@7449 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-07-16newly created files for use in recording appear in a .stubs folder, and are ↵Paul Davis
moved out of it when recording stops git-svn-id: svn://localhost/ardour2/branches/3.0@7426 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-07-14A few fixes to interpolation of MIDI controller data. Don't interpolateCarl Hetherington
when writing these data back to a source, otherwise surprising new interpolated points appear in MIDI automation. Similarly don't interpolate when reading the model during MIDI stretch. Fix handling of interpolation state; controllers that have been set by the user to use a different interpolation style are noted in the <Source> tag of the session file and this state is sprayed around to MidiModel and the GUI as necessary. git-svn-id: svn://localhost/ardour2/branches/3.0@7409 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-07-01add MidiModel::sync_to_source() to push model state into its existing ↵Paul Davis
source; mark SMFSource as non-removable after its called SMF::end_write(); some indentation fixes git-svn-id: svn://localhost/ardour2/branches/3.0@7350 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-07-01fix assumption that Session::_mmc != 0Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@7349 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-28Fix a couple of crashes on MIDI import.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@7308 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-26lots of details relating to MIDI file management; try to ignore ALSA ↵Paul Davis
sequencer MIDI ports named "Midi-Through" git-svn-id: svn://localhost/ardour2/branches/3.0@7305 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-01rationale pathways that add notes to Sequence<T> so that there is only final ↵Paul Davis
insertion step; when changing note properties that affect "indexing" within a Sequence<T> (i.e. via set<T,comparator> indexing/ordering/hashing), remove the note and add it back so that indexing stays consistent; fix marshalling of MidiModel::DiffCommand (boost::bind(&Object::method, reference_to_object) will COPY the reference, so use a pointer); fix MidiModel::find_note() to compare note properties not pointer addresses git-svn-id: svn://localhost/ardour2/branches/3.0@7203 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-05-30make trimming in region name (colored) highlight work even in internal edit ↵Paul Davis
mode; change enter/leave handler to return true by default (MIGHT HAVE UNINTENDED EFFECTS on mouse response), thus avoiding multiple stacked canvas items fighting over enter/leave git-svn-id: svn://localhost/ardour2/branches/3.0@7195 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-05-24Use debug macros for SMFSource.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@7150 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-05-24Note the time of the last event that was read by read_unlocked, so that the ↵Carl Hetherington
current time can be reset on a subsequent call. git-svn-id: svn://localhost/ardour2/branches/3.0@7148 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-05-16Move FileManager code into libpbd. Use it for SMF read/write.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@7108 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-11-30attempt to remove confusion and errors caused by unclear semantics of ↵Paul Davis
_is_embedded for FileSources; member renamed _within_session, and is now ALWAYS determined by the _path of the FileSource, never by the creator git-svn-id: svn://localhost/ardour2/branches/3.0@6213 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-26Remove idiocy.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@5930 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-25Remove Session dependency from BeatsFramesConverter.David Robillard
More constey TempoMap accessors. git-svn-id: svn://localhost/ardour2/branches/3.0@5916 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-24(FULL commit) start of a nominal debug tracing system, with 64 bits ↵Paul Davis
available for flags; track notes by region in MidiPlaylist, and resolve them if they are left hanging at region boundaries. note: MIDI playback is still not working 100% though its better now. git-svn-id: svn://localhost/ardour2/branches/3.0@5903 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-22Fix crash on save of MIDI data.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@5875 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-22Actually load MIDI data from disk on session load (kludgey, forces model to ↵David Robillard
always be loaded, this needs fixing later). Fix hilariously braindead non-lock in SMFSource::load_model. git-svn-id: svn://localhost/ardour2/branches/3.0@5869 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-22Fix deadlocks on MIDI record.David Robillard
More locking than is strictly necessary, but the assertion in MidiModel::write_lock is a nice check, at least for now... git-svn-id: svn://localhost/ardour2/branches/3.0@5868 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-21Fix MIDI rec regions.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@5842 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-21Disable excessive debug printing.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@5834 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-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-16remove existing attempts at optimizing MIDI event reading, to try to fix ↵Paul Davis
bugs that may be connected with it git-svn-id: svn://localhost/ardour2/branches/3.0@5667 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-05-07The great audio processing overhaul.David Robillard
The vast majority of Route signal processing is now simply in the list of processors. There are definitely regressions here, but there's also a lot of things fixed. It's far too much work to let diverge anymore regardless, so here it is. The basic model is: A route has a fixed set of input channels (matching its JACK input ports and diskstream). The first processor takes this as input. The next processor is configured using the first processor's output as input, and is allowed to choose whatever output it wants given that input... and so on, and so on. Finally, the last processor's requested output is used to set up the panner and create whatever Jack ports are needed to output the data. All 'special' internal processors (meter, fader, amp, insert, send) are currently transparent: they read any input, and return the same set of channels back (unmodified, except for amp). User visible changes: * LV2 Instrument support (tracks with both MIDI and audio channels) * MIDI in/out plugin support * Generic plugin replication (for MIDI plugins, MIDI/audio plugins) * Movable meter point Known Bugs: * Things seem to get weird on loaded sessions * Output delivery is sketchy * 2.0 session loading was probably already broken... but it's definitely broken now :) Please test this and file bugs if you have any time... git-svn-id: svn://localhost/ardour2/branches/3.0@5055 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-04Shut up.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@5040 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-04-30Rename 'position' parameter of MidiSource::midi_read to clearer 'source_start'.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@5021 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-04-16Revert stupid r4975.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@4984 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-04-14SMFSource: enhanced debugging output to reveal more of the problemHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@4976 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-04-14SMFSource: code readabilityHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@4975 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-04-14SMFSource / MIDISource: more readable variable names in ↵Hans Baier
read/write(_unlocked), added debugging output to diagnose recording bug (MIDI recording stops receiving events after a short while) git-svn-id: svn://localhost/ardour2/branches/3.0@4974 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-26Fix a bunch of warnings.David Robillard
Clean up. git-svn-id: svn://localhost/ardour2/branches/3.0@4668 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-20Make source length a dynamic thing.David Robillard
Update MIDI region length (actually and visually) when position changes. git-svn-id: svn://localhost/ardour2/branches/3.0@4644 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-19Introduce new time for session-relative frame time, and make source ↵David Robillard
interface capable of handling 64-bit long sessions. sframes_t is "session frames". The rules for time stamps are: - Anything relative to transport time, session position, etc, should be sframes_t - Anything relative to jack cycles, including the length thereof, should be nframes_t To support sessions which exceed UINT32_MAX frames, we need to replace all the uses of nframes_t for session time with sframes_t, and make sure the conversions are sound. This does not depend on jack's nframes_t; that we are using the same type at all right now was an oops. This is also be kinda nice for readability since the two different time bases have different types... git-svn-id: svn://localhost/ardour2/branches/3.0@4636 d708f5d6-7413-0410-9779-e7cbd77b26cf