summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_region.cc
AgeCommit message (Collapse)Author
2018-02-11SoloSelection: libardour part.Ben Loftis
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-08-23Update "separate_by_channel" API & add Lua bindingsRobin Gareus
This breaks compilation (GUI)
2017-04-19Use PBD string conversion functions in PBD::Property classTim Mayberry
2017-03-07announce what changed correctly in MidiRegion::model_shifted()nick_m
2017-03-06more linked midi region trim drag fixes.nick_m
- freeze the correct playlists on fiorst move. - only update the start offset of linked regions once the drag has finished.
2017-03-05fix uninitialised variable (fixes linked midi region negative start oatch)nick_m
2017-03-04offset linked regions to compensate for negative start after trim drag.nick_m
- should fix 7105
2017-02-13fix missing position property in MidiRegion::clone()nick_m
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.
2017-01-07amend massive thinko in last commit (actually works).nick_m
2017-01-07fix incorrect _start after a split.nick_m
- when splitting a region where quantized notes start on the split point, the notes would sometimes vanish due to us deriving an exact quarter-note from the supplied frame. this only affects midi regions, as other region types have contents which are completely frame-based.
2017-01-03MidiRegion::clone() needs to ensure that the model is loaded before calling ↵Paul Davis
MidiSource::write_to()
2016-12-13only update MidiRegion length_beats in partial copy ctor if there is an offset.nick_m
2016-12-13only recalculate MidiRegion start_beats if there is an offset in the ↵nick_m
'part-of' ctor. - when drag-copying MIDI regions, a partial region ctor is used which can lead to _start_beats being off by a sample. this in turn leads to 7168 happening, but only if magnetic snap is used and the regions are copied as a group. this should fix 7168, but the magnetic snap part is not yet addressed.
2016-11-18remove thinko in MidiRegion::post_set().nick_m
- should fix incorrect midi region length on split.
2016-11-11rename Region pos_beats -> quarter_notenick_m
2016-11-11ensure non-zero midi region length when tempo map changes.nick_m
2016-11-11rename Region pulse to pos_beats. use new beat distance api where required.nick_m
- add more debugging output detecting regions whose beat and frame position do not align on a playlist. this is required as a check as we have never used frame rounding on constant tempi before 8884a5723dc
2016-11-11MidiRegion _start/_length beats are frame based only when lock style is ↵nick_m
Audiotime
2016-11-10#include <ardour/midi_cursor.h> in a couple of placesJohn Emmas
I'm not entirely sure why it's needed in 'smf_source.cc' but MSVC fails to link the compiled module if I don't #include it ?!?
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-10-25don't mix framepos with quarter notes when calculating _start frames.nick_m
- quarter note precision is greater than the frame-based _position. using it as a reference may cause a rounding error if the region is locked to MusicTime. - also fixes a _start position bug when trimming midi regions. - we really need a better api for this kind of thing. - in combination with the previous two patches, this should fix various missing first note issues.
2016-10-10Interpret start & length_beats properties as double rather than Evoral::Beats.nick_m
- Evoral::Beats operator!= would prevent an increment of start_beats by intervals of less than a tick, so its possible that other subtle problems existed due to this kind of thing.
2016-10-09Ensure midi region start trim always sets _start_beats.nick_m
- Property::set() requires that new_val != current for a change to occur, but Beats::operator!= has tick resolution. i think this is pretty good evidence that _start/_length_beats should actually be double rather than Evoral::Beats (adjusting a region by increments of less than a tick is desirable).
2016-10-09Fix logic fail when setting midi region position, rework midi region start ↵nick_m
trimming.
2016-10-01Add MidiRegion _start to the list of things we leave alone on session load.nick_m
2016-09-29Prevent overwriting of MidiRegion length and length_beats during session load.nick_m
- .
2016-09-29Add headless-chicken session utility.nick_m
- provides an upgrade path for sessions affected by a nasty bug present in some 5.0 - 5.3 MIDI sessions. If testing from source, it can be run from the session_utils directory using ./run ardour5-headless-chicken -h
2016-09-23Remove _midi_regions_use_bbt_beats from Session, _start_pulse and ↵nick_m
_length_pulse from MidiRegion. - _start/length_beats are now quarter notes regardless of loaded session version. - also restores note colour update
2016-09-13change all MIDI read-from-source to map all events into the loop-range for ↵Paul Davis
seamless looping (if using)
2016-09-07Load midi region length and start correctly in sessions modified by v5.0 -> ↵nick_m
5.3-41
2016-09-06Set start_pulse and length_pulse from state, neither need to be a PBD::Property.nick_m
2016-08-31Fix incorrect start_pulse in MidiRegion copy-with-offset ctor.nick_m
2016-08-31Add start_pulse and length_pulse to midi region for beat/note separation.nick_m
2016-08-14Always send start property changes when a midi region trim alters position.nick_m
- ensures gui updates correctly.
2016-08-14Audio-locked midi region fixes.nick_m
- don't alter region frame length on tempo change or position change. - set region _start correctly (see comments) on tempo map change. - ensure audio-locked region's beat is set on tempo map change
2016-07-20Fix previous commitJulien "_FrnchFrgg_" RIVAUD
A spurious space change was included by mistake.
2016-07-20Make bus's trim control also affect sends to the busJulien "_FrnchFrgg_" RIVAUD
The trim processor was moved to the front after the internal return was, so the trim setting was applied before the signal coming from other tracks/busses sends was mixed in. Change the order so that trim applies to audio from internal sends as well.
2016-07-20Add a dedicated export method to MidiRegionJulien "_FrnchFrgg_" RIVAUD
To export a MIDI region to a file, the code used MidiRegion::clone() since it takes care of creating a new file-backed source with the wanted contents. Nevertheless, it had several side-effects: - it created and registered a new region which is confusing to users - it only exported notes that were in the region range, but didn't remove the region start offset from MIDI events, essentially producing a spurious silence at the beginning of the exported file (this is not a problem for region cloning because the newly created region is made aware of the offset and caters for it). Add a dedicated code path for export, that uses the new offsetting capabilities of MidiModel::write_section_to().
2016-07-14enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.hPaul Davis
2016-07-10remove reference "const int32_t&" -> const int32_t"Robin Gareus
this simplifies lua-bindings and also let's the compiler worry about constant primitive types.
2016-07-10Back to using exact beats for midi region start_beats calculation when trimming.nick_m
- seems to work quite well, but not tested on live recording.
2016-07-10Fix bad comment.nick_m
2016-07-10Use frame-based (non-exact) beat calculation to set new start in midi region ↵nick_m
trim.
2016-07-10Experimental patch to ensure playback buffer bounds use minimal beat->frame ↵nick_m
rounding.
2016-07-10Only update midi regions having a playlist after tempo map change, fix 0 ↵nick_m
length regions from drawing tool.
2016-07-10Quick fix to get trim working again (bahaving oddly during trim right now)nick_m
2016-07-10Remove frame conversion for MidiRegionView::note_in_region_range(), speed up ↵nick_m
tempo dilation