summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_region.cc
AgeCommit message (Collapse)Author
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
2016-07-10Paste uses exact beats. rework _start_beats calculation in copy-with-offset ↵nick_m
ctor.
2016-07-10Exact beat - provide audio->music mapping for region split.nick_m
- for those not in the know, this series provides a way to remove the temporal distortion introduced when using an audio frame-based gui for music-locked objects. In short, the gui uses an audio frame representation to move objects. It displays the object using frame_at_beat(), quantizing the time value to audio frames. This is fine until the user selects that frame but expects it to be interpreted as a beat. Thus beat_at_frame() would not produce the user-expected beat (temporal quantization error of up to 0.5 audio samples). This is one method of mapping audio time to music time accurately.
2016-07-10Make some musical operations on music-locked regions operate in beats.nick_m
- use exact beats to determine frame position. - see comments in tempo.cc for more. - this hasn't been done for split yet, but dragging and trimming are supported.
2016-06-11Unused variable - no-op.nick_m
2016-06-11Fix many offset errors when drawing notes in midi regions that have been edited.nick_m
- hopefully this can close bugs such as 6270 & 6793
2016-06-07MidiRegion ctor inherits length_beats.nick_m
- fixes incorrect length on drag-copying and pasting midi regions.
2016-06-07Fix midi region split, trim and move operations.nick_m
- there is still the problem of being unable to drag a trimmed region to the left when it's source (not it's position) would end up on a negative beat.
2016-06-06Consolidate notifications when MidiRegion changes length due to position change.nick_m
2016-06-06Midi regions recalculate their length in frames when moved/copied.nick_m
- should fix 6793
2016-05-27Rwbi ramps - midi regions resize when tempo map changed.nick_m
2016-03-21Trim dependence on evoral types.hpp and Beats.hppDavid Robillard
2015-10-17Remove all the now unused functions in the MidiModel class.André Nusser
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-01-07MusicalTime => Beats.David Robillard
2014-12-29Avoid another potential deadlock for good measure.David Robillard
Firing these signals while locked is not a good idea, Sequence/ControlList need a better design for this that accounts for recording and lockedness.