summaryrefslogtreecommitdiff
path: root/libs/ardour/import.cc
AgeCommit message (Collapse)Author
2010-05-19Use SMFSource static method to look for MIDI file extensions.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@7120 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-04-14Separate interthread progress window out into its own class and HIG-ify it a ↵Carl Hetherington
bit. Make the import progress bar report on the whole import rather than individual files. git-svn-id: svn://localhost/ardour2/branches/3.0@6894 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-04-10Fix import dialogue to correctly report (x of N) with multiple files, and ↵Carl Hetherington
slightly prettify it. Partially fixes #3064. git-svn-id: svn://localhost/ardour2/branches/3.0@6882 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-04-09Prevent clipping during the import of files from sources that haveCarl Hetherington
amplitudes greater than 1 when data is being stored in files that are clamped. e.g. when importing hot sources and resampling them when the session file format is integer. git-svn-id: svn://localhost/ardour2/branches/3.0@6879 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-03-22fix import of MIDI filesPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@6782 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-03-16changes from 2.X starting in march 2009 through oct 20 2009 (5826 inclusive)Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@6761 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-03-13"Ardour" -> PROGRAM_NAME change for libardour and setup for gtk2_ardourPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@6757 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-02-23Fix various code quality issues found by cppcheck (e.g. uninitialized ↵David Robillard
members, larger than necessary variable scope, memory leaks, etc). git-svn-id: svn://localhost/ardour2/branches/3.0@6710 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-30Trim session.h include dependency tree.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@5979 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-14Fix crash on MIDI import.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@5784 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-10-06Fix some compiler warnings.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@5746 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-01i/o button naming patch and imported file BWF timecode retention patch from ↵Paul Davis
nickm, both reworked for 3.0 git-svn-id: svn://localhost/ardour2/branches/3.0@5711 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-08-02Fix import dialog so that file number progress gets updated correctly. Stop ↵Carl Hetherington
a new progress dialog being popped up for each file. git-svn-id: svn://localhost/ardour2/branches/3.0@5451 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-08-02Improve import status messages slightly.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@5449 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-07-21Fix some unused parameter warnings.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@5403 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-07-13merge pre- and post-fader processor boxes; start removing Placement (not ↵Paul Davis
finished) ; add -DWAF_BUILD and use per-directory foobar-config.h to correctly pick up configure-time settings like HAVE_OGG ; check for libgiomm (part of upgrade to newer gtk stack); 32 bit marker reload fix from 2.X; audiounit IO config cache fix from 2.X; multi-add route template fix from 2.X; plugin GUI delete fix from 2.X; solo button labels are A or P for listen mode git-svn-id: svn://localhost/ardour2/branches/3.0@5344 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-18Patch from agorka to add some includes required for building with the GCC ↵Carl Hetherington
shipped with Ubuntu Karmic. git-svn-id: svn://localhost/ardour2/branches/3.0@5098 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-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-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-19Interpret tempo time based on read position (not source timeline position ↵David Robillard
which is more or less meaningless). Move time conversion into the region view rather than the source. Adapt MIDI (including controllers) regions to the destination tempo when moved (e.g. dragging a region to a location with half the tempo will make the notes twice as long). git-svn-id: svn://localhost/ardour2/branches/3.0@4635 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-17Fix the horrible mess that was anything related to sources and paths.David Robillard
Most significant changes: - Factor out FileSource from AudioFileSource, use for SMFSource too - Explicitly pass embedded rather than mysterious name mangling or whatever - Destroy a ton of duplicated or very-nearly-duplicated code - Clean up and document all that weird source stuff in session.cc git-svn-id: svn://localhost/ardour2/branches/3.0@4609 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-16Time unit translation for AutomationLine (correctly display MIDI controller ↵David Robillard
data). git-svn-id: svn://localhost/ardour2/branches/3.0@4597 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-16Move all beats <-> frames time conversion into a single object that can be ↵David Robillard
passed around. This has 3 main benefits: - All conversion code is in one place (less duplication, potential bugs) - The conversion method can be passed to things that are ignorant of the actual time units involved, information required, etc. (In the future it would be nice to have user selectable tempo/frame time) - It should be relatively simple now to support tempo changes part-way through a MIDI region (at least architecturally speaking) git-svn-id: svn://localhost/ardour2/branches/3.0@4594 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-15The Big Change: Store time in MidiModel as tempo time, not frame time.David Robillard
The time stamp of an event is now always tempo, from file to model and back again. Frame time is only relevant at playback or recording time, in the audio thread (MidiModel and MidiBuffer). I think perhaps we don't need to change the actual time from double (which is convenient for math), it is the time base conversion that caused problems. Using a correct equality comparison (i.e. not == which is not correct for floating point) should probably make the undo issues go away, in 99.99% of cases anyway. There's almost certainly some regressions in here somewhere, but they do not seem to be time related. The bugs I'm hitting in testing are old ones that seem unrelated now, so it's checkpoint time. This sets us up for fancy things like tempo map import and tempo/meter changes halfway through MIDI regions, but for now it's still assumed that the tempo at the start of the region is valid for the duration of the entire region. git-svn-id: svn://localhost/ardour2/branches/3.0@4582 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-15De-templatify Evoral::SMF which has no concept of time other than SMF time.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@4571 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-14MIDI robustness.David Robillard
- Separate SMF::open and SMF::create, more powerful interface for both. - Correctly handle note ons with velocity 0 as note offs in sequence. - Use SMF (i.e. libsmf) for MIDI import git-svn-id: svn://localhost/ardour2/branches/3.0@4558 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-12most of the 2.X->3.0 commit (up to rev 4299) except for ↵Paul Davis
gtk2_ardour/editor_canvas.cc; builds and runs and does a few specific things but expect it to be buggy for a while yet git-svn-id: svn://localhost/ardour2/branches/3.0@4313 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-09-30Separate low level details of SMF reading/writing from concept of 'midi ↵David Robillard
source in ardour'. git-svn-id: svn://localhost/ardour2/branches/3.0@3839 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-09-10merge from 2.0-ongoing @ 3581Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@3711 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-22Fix rounding errors in region/source length calculuation in import (regions ↵David Robillard
appearing slightly too short). git-svn-id: svn://localhost/ardour2/branches/3.0@3396 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-22Fix source/region length on MIDI import.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@3391 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-16Don't create tracks for empty MIDI channels on import (i.e. make import look ↵David Robillard
clean and sensible). Remove no longer useful debugging output. git-svn-id: svn://localhost/ardour2/branches/3.0@3365 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-04-11merge 3.0 from 2.0-ongoing@3243Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@3248 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
2008-03-17merge with 2.0-ongoing @ rev 3147Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@3152 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-02-21Fix timing on MIDI import.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@3093 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
2008-02-18Channel-aware note recording in MidiModel (i.e. multi-channel note input ↵David Robillard
doesn't cause stuck notes). Fix MIDI regions randomly displaying 100% stuck notes (uninitialized MidiPlaylist::_note_mode). git-svn-id: svn://localhost/ardour2/branches/3.0@3084 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-02-18Preliminary (read: kludgey) MIDI import support.David Robillard
Only really works when tracks contain only channel 1 data for now. git-svn-id: svn://localhost/ardour2/branches/3.0@3083 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-02-16Merge with 2.0-ongoing R3071.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@3074 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-01-10Merge libs/ardour and gtk2_ardour with 2.0-ongoing R2837.David Robillard
git-svn-id: svn://localhost/ardour2/trunk@2883 d708f5d6-7413-0410-9779-e7cbd77b26cf