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
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
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
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
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
- Don't play note a bajillion times when touch selecting
- Don't spawn a thread for each note off (schedule an idle handler instead)
- Play notes when rect selecting
git-svn-id: svn://localhost/ardour2/branches/3.0@4392 d708f5d6-7413-0410-9779-e7cbd77b26cf
Don't abuse/leak selection when editing velocity (fix editing velocity of a single note actually editing velocity of every note who's velocity had previously been edited).
Properly preserve selection for MIDI operations in general.
Less crap method of delineating scroll events to canvas items (no exhaustive type cases needed in editor_canvas_events.cc).
Fix silly comment style in midi_region_view.h (hans: please note this and follow in the future).
git-svn-id: svn://localhost/ardour2/branches/3.0@4343 d708f5d6-7413-0410-9779-e7cbd77b26cf
* implemented choosing patches with context menu on the program change flag
* added convenience method and a little refactoring in midi_patch_manager.h
Conflicts:
.cproject
build-tmp.sh
git-svn-id: svn://localhost/ardour2/branches/3.0@4338 d708f5d6-7413-0410-9779-e7cbd77b26cf
* commented out a crash line in ardour_ui2.cc (added a warning message).
(I thought, it may be fairly efficient to keep issues as code instead of putting
them in the tracker where hardly ever one would notice the needle in the haystack)
* forgot to clear two other collections on MidiPatchManager::refresh()
git-svn-id: svn://localhost/ardour2/branches/3.0@4312 d708f5d6-7413-0410-9779-e7cbd77b26cf
* created ArdourCanvas::CanvasFlag as a base class for flags
* removed obsolete cruft from midi_model
* made MidiTimeAxisView and MidiRegionView work together to display program changes as
names by means of MidiPatchManager
git-svn-id: svn://localhost/ardour2/branches/3.0@4307 d708f5d6-7413-0410-9779-e7cbd77b26cf
Only resize vertically (don't reaload model) on range changes.
Keep track of range in model while loading (writing to model), rather than double display MIDI regions to find out.
Don't go crazy and chew CPU blinking around and doing nothing on initial show of MIDI track context menu.
Change radio 'full range' and 'contents range' menu items to non-radio actions that just set the range appropriately.
Fix crashes on some esoteric case of control data I can't figure out, but fixed anyway, so I guess it all worked out well in the end for everybody.
git-svn-id: svn://localhost/ardour2/branches/3.0@3794 d708f5d6-7413-0410-9779-e7cbd77b26cf
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
Fix track y positioning and initial region size/location.
Fix automation click-to-add-points (i.e. points actually show up where you click).
Fancy whiz-bang dynamic resize 2.0 professional edition support for MIDI/CC/Automation tracks/regions.
git-svn-id: svn://localhost/ardour2/branches/3.0@3769 d708f5d6-7413-0410-9779-e7cbd77b26cf
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
Make copy and brush operations type generic (i.e. fix brushing for MIDI regions).
git-svn-id: svn://localhost/ardour2/branches/3.0@3724 d708f5d6-7413-0410-9779-e7cbd77b26cf
Fix selection preservation across MIDI model editing commands (for both note moving and resizing).
Fix selection breakage introduced by old selection preservation stuff (fix zombie selection).
git-svn-id: svn://localhost/ardour2/branches/3.0@3381 d708f5d6-7413-0410-9779-e7cbd77b26cf
Handle stuck notes more gracefully in the view (probably should show up as a diamond though?).
git-svn-id: svn://localhost/ardour2/branches/3.0@3359 d708f5d6-7413-0410-9779-e7cbd77b26cf
* fixed corruption bugs due to allocation hell of MidiModel::const_iterator::_event: Changed it into boost::shared_ptr
* fixed MidiModel::const_iterator bugs:
-First note on lost, if an automation event comes first
-corrupt MidiEvent compared to automation event if there are no notes in the region
* (hopefully) fixed possible race condition
* fixed range check in MidiDiskstream::set_state for channel mask
* treating notes with duration 0 more gently in MidiRegionView (warning instead of assertion)
git-svn-id: svn://localhost/ardour2/branches/3.0@3345 d708f5d6-7413-0410-9779-e7cbd77b26cf
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
* bugfix: midi_util.h only considered channel events up to E0, but had to be EF
* bugfix: parameter.h operator == should also compare channel (drobilla, correct me if I am wrong)
* added some assert() guards
git-svn-id: svn://localhost/ardour2/branches/3.0@3330 d708f5d6-7413-0410-9779-e7cbd77b26cf