![]() |
Audacity 3.2.0
|
A Track that is used for Midi notes. (Somewhat old code). More...
#include <NoteTrack.h>
Public Types | |
using | Holder = std::shared_ptr< NoteTrack > |
![]() | |
enum class | LinkType : int { None = 0 , Group = 2 , Aligned } |
For two tracks describes the type of the linkage. More... | |
using | ChannelGroupAttachments = ClientData::Site< ChannelGroupData, ClientData::Cloneable<>, ClientData::DeepCopying > |
Hosting of objects attached by higher level code. More... | |
using | AttachedObjects = ::AttachedTrackObjects |
Alias for my base type. More... | |
using | IntervalData = TrackIntervalData |
using | Interval = TrackInterval |
using | Intervals = std::vector< Interval > |
using | ConstInterval = ConstTrackInterval |
using | ConstIntervals = std::vector< ConstInterval > |
using | Holder = std::shared_ptr< Track > |
template<typename R = void> | |
using | Continuation = std::function< R() > |
Type of arguments passed as optional second parameter to TypeSwitch() cases. More... | |
using | Fallthrough = Continuation<> |
Type of arguments passed as optional second parameter to TypeSwitch<void>() cases. More... | |
![]() | |
using | DataType = ClientData |
using | DataPointer = Pointer< ClientData > |
using | DataFactory = std::function< DataPointer(Host &) > |
Type of function from which RegisteredFactory is constructed; it builds attachments. More... | |
Public Member Functions | |
NoteTrack () | |
NoteTrack (const NoteTrack &orig, ProtectedCreationArg &&)=delete | |
Copy construction hasn't been necessary yet. More... | |
virtual | ~NoteTrack () |
double | GetOffset () const override |
double | GetStartTime () const override |
double | GetEndTime () const override |
Alg_seq & | GetSeq () const |
void | WarpAndTransposeNotes (double t0, double t1, const TimeWarper &warper, double semitones) |
int | FindChannel (const wxRect &rect, int mx, int my) |
bool | LabelClick (const wxRect &rect, int x, int y, bool right) |
void | SetSequence (std::unique_ptr< Alg_seq > &&seq) |
void | PrintSequence () |
Alg_seq * | MakeExportableSeq (std::unique_ptr< Alg_seq > &cleanup) const |
bool | ExportMIDI (const wxString &f) const |
bool | ExportAllegro (const wxString &f) const |
Track::Holder | Cut (double t0, double t1) override |
Track::Holder | Copy (double t0, double t1, bool forClipboard=true) const override |
bool | Trim (double t0, double t1) |
void | Clear (double t0, double t1) override |
void | Paste (double t, const Track *src) override |
void | Silence (double t0, double t1) override |
void | InsertSilence (double t, double len) override |
bool | Shift (double t) |
QuantizedTimeAndBeat | NearestBeatTime (double time) const |
bool | StretchRegion (QuantizedTimeAndBeat t0, QuantizedTimeAndBeat t1, double newDur) |
int | GetBottomNote () const |
Gets the current bottom note (a pitch) More... | |
int | GetTopNote () const |
Gets the current top note (a pitch) More... | |
void | SetBottomNote (int note) |
Sets the bottom note (a pitch), making sure that it is never greater than the top note. More... | |
void | SetTopNote (int note) |
Sets the top note (a pitch), making sure that it is never less than the bottom note. More... | |
void | SetNoteRange (int note1, int note2) |
Sets the top and bottom note (both pitches) automatically, swapping them if needed. More... | |
void | ZoomAllNotes () |
Zooms so that all notes are visible. More... | |
void | ZoomMaxExtent () |
Zooms so that the entire track is visible. More... | |
void | ShiftNoteRange (int offset) |
Shifts all notes vertically by the given pitch. More... | |
void | ZoomOut (const wxRect &rect, int y) |
Zooms out a constant factor (subject to zoom limits) More... | |
void | ZoomIn (const wxRect &rect, int y) |
Zooms in a constant factor (subject to zoom limits) More... | |
void | Zoom (const wxRect &rect, int y, float multiplier, bool center) |
void | ZoomTo (const wxRect &rect, int start, int end) |
bool | HandleXMLTag (const std::string_view &tag, const AttributesList &attrs) override |
XMLTagHandler * | HandleXMLChild (const std::string_view &tag) override |
void | WriteXML (XMLWriter &xmlFile) const override |
unsigned | GetVisibleChannels () const |
void | SetVisibleChannels (unsigned value) |
bool | IsVisibleChan (int c) const |
void | SetVisibleChan (int c) |
void | ClearVisibleChan (int c) |
void | ToggleVisibleChan (int c) |
void | SoloVisibleChan (int c) |
const TypeInfo & | GetTypeInfo () const override |
Track::Holder | PasteInto (AudacityProject &) const override |
Find or create the destination track for a paste, maybe in a different project. More... | |
ConstIntervals | GetIntervals () const override |
Report times on the track where important intervals begin and end, for UI to snap to. More... | |
Intervals | GetIntervals () override |
![]() | |
AudioTrack () | |
AudioTrack (const Track &orig, ProtectedCreationArg &&a) | |
void | WriteXMLAttributes (XMLWriter &WXUNUSED(xmlFile)) const |
bool | HandleXMLAttribute (const std::string_view &, const XMLAttributeValueView &) |
![]() | |
TrackId | GetId () const |
template<typename Subclass = Track> | |
std::shared_ptr< Subclass > | SharedPointer () |
template<typename Subclass = const Track> | |
auto | SharedPointer () const -> std::enable_if_t< std::is_const_v< Subclass >, std::shared_ptr< Subclass > > |
std::shared_ptr< Track > | SubstitutePendingChangedTrack () |
std::shared_ptr< const Track > | SubstitutePendingChangedTrack () const |
std::shared_ptr< const Track > | SubstituteOriginalTrack () const |
virtual const TypeInfo & | GetTypeInfo () const =0 |
virtual const TypeNames & | GetTypeNames () const |
virtual bool | SupportsBasicEditing () const |
Whether this track type implements cut-copy-paste; by default, true. More... | |
virtual Holder | PasteInto (AudacityProject &) const =0 |
Find or create the destination track for a paste, maybe in a different project. More... | |
virtual ConstIntervals | GetIntervals () const |
Report times on the track where important intervals begin and end, for UI to snap to. More... | |
virtual Intervals | GetIntervals () |
virtual bool | LinkConsistencyFix (bool doFix=true, bool completeList=true) |
Check consistency of channel groups, and maybe fix it. More... | |
bool | LinkConsistencyCheck (bool completeList) |
Do the non-mutating part of consistency fix only and return status. More... | |
bool | HasOwner () const |
std::shared_ptr< TrackList > | GetOwner () const |
LinkType | GetLinkType () const noexcept |
bool | IsAlignedWithLeader () const |
Returns true if the leader track has link type LinkType::Aligned. More... | |
ChannelGroupData & | GetGroupData () |
const ChannelGroupData & | GetGroupData () const |
Track () | |
Track (const Track &orig, ProtectedCreationArg &&) | |
Track & | operator= (const Track &orig)=delete |
virtual | ~Track () |
void | Init (const Track &orig) |
virtual Holder | Duplicate () const |
const wxString & | GetName () const |
Name is always the same for all channels of a group. More... | |
void | SetName (const wxString &n) |
bool | GetSelected () const |
Selectedness is always the same for all channels of a group. More... | |
virtual void | SetSelected (bool s) |
void | EnsureVisible (bool modifyState=false) |
virtual double | GetOffset () const =0 |
void | Offset (double t) |
virtual void | SetOffset (double o) |
virtual Holder | Cut (double WXUNUSED(t0), double WXUNUSED(t1))=0 |
virtual Holder | Copy (double WXUNUSED(t0), double WXUNUSED(t1), bool forClipboard=true) const =0 |
virtual void | Clear (double WXUNUSED(t0), double WXUNUSED(t1))=0 |
virtual void | Paste (double WXUNUSED(t), const Track *WXUNUSED(src))=0 |
virtual void | SyncLockAdjust (double oldT1, double newT1) |
virtual void | Silence (double WXUNUSED(t0), double WXUNUSED(t1))=0 |
virtual void | InsertSilence (double WXUNUSED(t), double WXUNUSED(len))=0 |
bool | SameKindAs (const Track &track) const |
template<typename R = void, typename ... Functions> | |
R | TypeSwitch (const Functions &...functions) |
Use this function rather than testing track type explicitly and making down-casts. More... | |
template<typename R = void, typename ... Functions> | |
R | TypeSwitch (const Functions &...functions) const |
Use this function rather than testing track type explicitly and making down-casts. More... | |
virtual void | WriteXML (XMLWriter &xmlFile) const =0 |
virtual bool | GetErrorOpening () |
virtual double | GetStartTime () const =0 |
virtual double | GetEndTime () const =0 |
void | Notify (bool allChannels, int code=-1) |
bool | Any () const |
bool | IsSelected () const |
bool | IsLeader () const |
bool | IsSelectedLeader () const |
void | AdjustPositions () |
void | WriteCommonXMLAttributes (XMLWriter &xmlFile, bool includeNameAndSelected=true) const |
bool | HandleCommonXMLAttribute (const std::string_view &attr, const XMLAttributeValueView &valueView) |
![]() | |
XMLTagHandler () | |
virtual | ~XMLTagHandler () |
virtual bool | HandleXMLTag (const std::string_view &tag, const AttributesList &attrs)=0 |
virtual void | HandleXMLEndTag (const std::string_view &WXUNUSED(tag)) |
virtual void | HandleXMLContent (const std::string_view &WXUNUSED(content)) |
virtual XMLTagHandler * | HandleXMLChild (const std::string_view &tag)=0 |
void | ReadXMLEndTag (const char *tag) |
void | ReadXMLContent (const char *s, int len) |
XMLTagHandler * | ReadXMLChild (const char *tag) |
![]() | |
~Site () | |
Site () | |
Site (const Site &other) | |
Site & | operator= (const Site &other) |
Site (Site &&other) | |
Site & | operator= (Site &&other) |
size_t | size () const |
How many attachment pointers are in the Site. More... | |
template<typename Subclass = ClientData> | |
Subclass & | Get (const RegisteredFactory &key) |
Get reference to an attachment, creating on demand if not present, down-cast it to Subclass. More... | |
template<typename Subclass = const ClientData> | |
auto | Get (const RegisteredFactory &key) const -> std::enable_if_t< std::is_const< Subclass >::value, Subclass & > |
Get reference to an attachment, creating on demand if not present, down-cast it to Subclass. More... | |
template<typename Subclass = ClientData> | |
Subclass * | Find (const RegisteredFactory &key) |
Get a (bare) pointer to an attachment, or null, down-cast it to Subclass *; will not create on demand. More... | |
template<typename Subclass = const ClientData> | |
auto | Find (const RegisteredFactory &key) const -> std::enable_if_t< std::is_const< Subclass >::value, Subclass * > |
Get a (bare) pointer to an attachment, or null, down-cast it to Subclass *; will not create on demand. More... | |
template<typename ReplacementPointer > | |
void | Assign (const RegisteredFactory &key, ReplacementPointer &&replacement) |
Reassign Site's pointer to ClientData. More... | |
Static Public Member Functions | |
static NoteTrack * | New (AudacityProject &project) |
static void | DrawLabelControls (const NoteTrack *pTrack, wxDC &dc, const wxRect &rect, int highlightedChannel=-1) |
static const TypeInfo & | ClassTypeInfo () |
![]() | |
static const TypeInfo & | ClassTypeInfo () |
![]() | |
template<typename Subclass = Track> | |
static std::shared_ptr< Subclass > | SharedPointer (Track *pTrack) |
template<typename Subclass = const Track> | |
static std::shared_ptr< Subclass > | SharedPointer (const Track *pTrack) |
static const TypeInfo & | ClassTypeInfo () |
static void | FinishCopy (const Track *n, Track *dest) |
template<typename TrackType > | |
static void | checkTrackType () |
template<typename R , typename TrackType , typename... Functions> | |
static R | CallExecutor (R *, std::tuple<> *, TrackType &, const Functions &...) |
template<typename R , typename TrackType , typename... Functions, typename Executor , typename... Executors> | |
static R | CallExecutor (R *, std::tuple< Executor, Executors... > *, TrackType &track, const Functions &...functions) |
template<typename ... Executors> | |
static constexpr unsigned | UsedCases (std::tuple< Executors... > *) |
template<typename Tag , bool IsConst, typename R , typename ... TrackTypes, typename ... Functions> | |
static R | DoTypeSwitch (std::conditional_t< IsConst, const Track, Track > &track, TypeList::List< TrackTypes... >, const Functions &...functions) |
Deduce two packs from arguments. More... | |
![]() | |
static size_t | slots () |
How many static factories have been registered with this specialization of Site. More... | |
Private Types | |
enum | { MinPitch = 0 , MaxPitch = 127 } |
Private Member Functions | |
Track::Holder | Clone () const override |
void | AddToDuration (double delta) |
Private Attributes | |
std::unique_ptr< Alg_seq > | mSeq |
std::unique_ptr< char[]> | mSerializationBuffer |
long | mSerializationLength |
int | mBottomNote |
int | mTopNote |
float | mPitchHeight |
std::atomic< unsigned > | mVisibleChannels { ALL_CHANNELS } |
A bit set; atomic because it may be read by worker threads in playback. More... | |
std::weak_ptr< StretchHandle > | mStretchHandle |
Static Private Attributes | |
static const float | ZoomStep = powf( 2.0f, 0.25f ) |
Additional Inherited Members | |
![]() | |
std::pair< int, int > | vrulerSize |
![]() | |
void | SetLinkType (LinkType linkType, bool completeList=true) |
![]() | |
template<typename Function > | |
void | ForEach (const Function &function) |
Invoke function on each ClientData object that has been created in this . More... | |
template<typename Function > | |
void | ForEach (const Function &function) const |
Invoke function on each ClientData object that has been created in this . More... | |
template<typename Function > | |
ClientData * | FindIf (const Function &function) |
Return pointer to first attachment in this that is not null and satisfies a predicate, or nullptr. More... | |
template<typename Function > | |
const ClientData * | FindIf (const Function &function) const |
Return pointer to first attachment in this that is not null and satisfies a predicate, or nullptr. More... | |
void | BuildAll () |
For each RegisteredFactory, if the corresponding attachment is absent in this , build and store it. More... | |
![]() | |
std::weak_ptr< TrackList > | mList |
TrackNodePointer | mNode {} |
Holds iterator to self, so that TrackList::Find can be constant-time. More... | |
int | mIndex |
0-based position of this track in its TrackList More... | |
double | mOffset |
A Track that is used for Midi notes. (Somewhat old code).
Definition at line 61 of file NoteTrack.h.
using NoteTrack::Holder = std::shared_ptr<NoteTrack> |
Definition at line 73 of file NoteTrack.h.
|
private |
NoteTrack::NoteTrack | ( | ) |
Definition at line 122 of file NoteTrack.cpp.
References _, MaxPitch, mBottomNote, MinPitch, mSeq, mSerializationLength, mTopNote, and Track::SetName().
|
delete |
Copy construction hasn't been necessary yet.
|
virtual |
Definition at line 134 of file NoteTrack.cpp.
|
private |
Definition at line 726 of file NoteTrack.cpp.
References GetSeq().
Referenced by Paste(), and StretchRegion().
|
static |
Definition at line 699 of file NoteTrack.cpp.
References typeInfo().
|
override |
Definition at line 520 of file NoteTrack.cpp.
References GetOffset(), GetSeq(), Track::SetOffset(), and THROW_INCONSISTENCY_EXCEPTION.
Referenced by anonymous_namespace{EditMenus.cpp}::OnCut().
|
inline |
Definition at line 187 of file NoteTrack.h.
References CHANNEL_BIT.
|
overrideprivatevirtual |
Implements Track.
Definition at line 160 of file NoteTrack.cpp.
References GetOffset(), GetVisibleChannels(), mBottomNote, mSeq, mSerializationBuffer, mSerializationLength, mTopNote, safenew, SonifyBeginSerialize, and SonifyEndSerialize.
|
override |
Definition at line 473 of file NoteTrack.cpp.
References GetOffset(), GetSeq(), and THROW_INCONSISTENCY_EXCEPTION.
Referenced by anonymous_namespace{EditMenus.cpp}::OnCut().
|
override |
Definition at line 443 of file NoteTrack.cpp.
References GetOffset(), GetSeq(), and THROW_INCONSISTENCY_EXCEPTION.
Referenced by anonymous_namespace{EditMenus.cpp}::OnCut().
|
static |
Definition at line 254 of file NoteTrack.cpp.
References ThemeBase::Colour(), AColor::DarkMIDIChannel(), IsVisibleChan(), AColor::LightMIDIChannel(), AColor::Line(), AColor::MIDIChannel(), theTheme, and wxT().
Referenced by anonymous_namespace{NoteTrackControls.cpp}::MidiControlsDrawFunction().
bool NoteTrack::ExportAllegro | ( | const wxString & | f | ) | const |
Definition at line 891 of file NoteTrack.cpp.
References ImportExportPrefs::AllegroStyleSetting, GetOffset(), GetSeq(), and EnumSetting< Enum >::ReadEnum().
bool NoteTrack::ExportMIDI | ( | const wxString & | f | ) | const |
Definition at line 883 of file NoteTrack.cpp.
References MakeExportableSeq().
int NoteTrack::FindChannel | ( | const wxRect & | rect, |
int | mx, | ||
int | my | ||
) |
Definition at line 349 of file NoteTrack.cpp.
Referenced by LabelClick().
|
inline |
Gets the current bottom note (a pitch)
Definition at line 122 of file NoteTrack.h.
Referenced by NoteTrackDisplayData::NoteTrackDisplayData().
|
overridevirtual |
Implements Track.
Definition at line 211 of file NoteTrack.cpp.
References GetSeq(), and GetStartTime().
Referenced by GetIntervals(), and Paste().
|
overridevirtual |
Report times on the track where important intervals begin and end, for UI to snap to.
Some intervals may be empty, and no ordering of the intervals is assumed.
Reimplemented from Track.
Definition at line 712 of file NoteTrack.cpp.
References GetEndTime(), and GetStartTime().
|
overridevirtual |
This overload exposes the extra data of the intervals as non-const This overload exposes the extra data of the intervals as non-const
Reimplemented from Track.
Definition at line 719 of file NoteTrack.cpp.
|
overridevirtual |
Implements Track.
Definition at line 201 of file NoteTrack.cpp.
References Track::mOffset.
Referenced by Clear(), Clone(), Copy(), Cut(), anonymous_namespace{NoteTrackView.cpp}::DrawNoteBackground(), anonymous_namespace{NoteTrackView.cpp}::DrawNoteTrack(), ExportAllegro(), GetStartTime(), InsertSilence(), MakeExportableSeq(), NearestBeatTime(), Paste(), Silence(), Trim(), WarpAndTransposeNotes(), and WriteXML().
Alg_seq & NoteTrack::GetSeq | ( | ) | const |
Definition at line 138 of file NoteTrack.cpp.
References mSeq, mSerializationBuffer, and mSerializationLength.
Referenced by AddToDuration(), Clear(), Copy(), Cut(), anonymous_namespace{NoteTrackView.cpp}::DrawNoteBackground(), anonymous_namespace{NoteTrackView.cpp}::DrawNoteTrack(), ExportAllegro(), GetEndTime(), InsertSilence(), MakeExportableSeq(), NearestBeatTime(), Paste(), Shift(), Silence(), StretchRegion(), Trim(), WarpAndTransposeNotes(), WriteXML(), and ZoomAllNotes().
|
overridevirtual |
Implements Track.
Definition at line 206 of file NoteTrack.cpp.
References GetOffset().
Referenced by GetEndTime(), and GetIntervals().
|
inline |
Gets the current top note (a pitch)
Definition at line 124 of file NoteTrack.h.
Referenced by NoteTrackDisplayData::NoteTrackDisplayData().
|
overridevirtual |
Implements Track.
Definition at line 694 of file NoteTrack.cpp.
References typeInfo().
|
inline |
Definition at line 176 of file NoteTrack.h.
Referenced by Clone(), and WriteXML().
|
overridevirtual |
|
overridevirtual |
Implements XMLTagHandler.
Definition at line 912 of file NoteTrack.cpp.
References Track::HandleCommonXMLAttribute(), AudioTrack::HandleXMLAttribute(), anonymous_namespace{NoteTrack.cpp}::IsValidVisibleChannels(), mSeq, SetBottomNote(), Track::SetOffset(), SetTopNote(), and SetVisibleChannels().
|
override |
Definition at line 618 of file NoteTrack.cpp.
References GetOffset(), GetSeq(), and THROW_INCONSISTENCY_EXCEPTION.
Referenced by Paste().
|
inline |
Definition at line 182 of file NoteTrack.h.
References CHANNEL_BIT.
Referenced by DrawLabelControls(), anonymous_namespace{NoteTrackView.cpp}::DrawNoteTrack(), and anonymous_namespace{MIDIPlay.h}::Iterator::Unmuted().
bool NoteTrack::LabelClick | ( | const wxRect & | rect, |
int | x, | ||
int | y, | ||
bool | right | ||
) |
Definition at line 368 of file NoteTrack.cpp.
References FindChannel(), SoloVisibleChan(), and ToggleVisibleChan().
Alg_seq * NoteTrack::MakeExportableSeq | ( | std::unique_ptr< Alg_seq > & | cleanup | ) | const |
Definition at line 760 of file NoteTrack.cpp.
References staffpad::vo::copy(), GetOffset(), GetSeq(), mSeq, ROUND, Shift(), anonymous_namespace{NoteTrack.cpp}::swap(), and within().
Referenced by ExportMIDI().
QuantizedTimeAndBeat NoteTrack::NearestBeatTime | ( | double | time | ) | const |
Definition at line 675 of file NoteTrack.cpp.
References GetOffset(), and GetSeq().
|
static |
Definition at line 114 of file NoteTrack.cpp.
References TrackList::Get().
|
override |
Definition at line 553 of file NoteTrack.cpp.
References AddToDuration(), GetEndTime(), GetOffset(), GetSeq(), InsertSilence(), Track::SetOffset(), and Track::TypeSwitch().
|
overridevirtual |
Find or create the destination track for a paste, maybe in a different project.
use_count()
can tell whether it is new Implements Track.
Definition at line 704 of file NoteTrack.cpp.
void NoteTrack::PrintSequence | ( | ) |
Definition at line 384 of file NoteTrack.cpp.
void NoteTrack::SetBottomNote | ( | int | note | ) |
Sets the bottom note (a pitch), making sure that it is never greater than the top note.
Definition at line 988 of file NoteTrack.cpp.
References mBottomNote, MinPitch, and mTopNote.
Referenced by HandleXMLTag().
void NoteTrack::SetNoteRange | ( | int | note1, |
int | note2 | ||
) |
Sets the top and bottom note (both pitches) automatically, swapping them if needed.
Definition at line 1010 of file NoteTrack.cpp.
References MaxPitch, mBottomNote, MinPitch, and mTopNote.
Referenced by Zoom(), ZoomAllNotes(), and ZoomTo().
void NoteTrack::SetSequence | ( | std::unique_ptr< Alg_seq > && | seq | ) |
Definition at line 379 of file NoteTrack.cpp.
References mSeq.
Referenced by ImportMIDI().
void NoteTrack::SetTopNote | ( | int | note | ) |
Sets the top note (a pitch), making sure that it is never less than the bottom note.
Definition at line 1000 of file NoteTrack.cpp.
References MaxPitch, mBottomNote, and mTopNote.
Referenced by HandleXMLTag().
|
inline |
|
inline |
Definition at line 179 of file NoteTrack.h.
Referenced by HandleXMLTag().
bool NoteTrack::Shift | ( | double | t | ) |
Definition at line 648 of file NoteTrack.cpp.
References GetSeq(), and ROUND.
Referenced by MakeExportableSeq().
void NoteTrack::ShiftNoteRange | ( | int | offset | ) |
Shifts all notes vertically by the given pitch.
Definition at line 1028 of file NoteTrack.cpp.
References MaxPitch, mBottomNote, and mTopNote.
Referenced by NoteTrackMenuTable::OnChangeOctave().
|
override |
Definition at line 603 of file NoteTrack.cpp.
References GetOffset(), GetSeq(), and THROW_INCONSISTENCY_EXCEPTION.
|
inline |
Definition at line 193 of file NoteTrack.h.
References ALL_CHANNELS, and CHANNEL_BIT.
Referenced by LabelClick().
bool NoteTrack::StretchRegion | ( | QuantizedTimeAndBeat | t0, |
QuantizedTimeAndBeat | t1, | ||
double | newDur | ||
) |
Definition at line 738 of file NoteTrack.cpp.
References AddToDuration(), and GetSeq().
Referenced by StretchHandle::Stretch().
|
inline |
Definition at line 189 of file NoteTrack.h.
References CHANNEL_BIT.
Referenced by LabelClick().
bool NoteTrack::Trim | ( | double | t0, |
double | t1 | ||
) |
Definition at line 496 of file NoteTrack.cpp.
References GetOffset(), GetSeq(), and Track::SetOffset().
void NoteTrack::WarpAndTransposeNotes | ( | double | t0, |
double | t1, | ||
const TimeWarper & | warper, | ||
double | semitones | ||
) |
Definition at line 216 of file NoteTrack.cpp.
References GetOffset(), GetSeq(), mSeq, and TimeWarper::Warp().
|
overridevirtual |
Implements Track.
Definition at line 958 of file NoteTrack.cpp.
References GetOffset(), GetSeq(), GetVisibleChannels(), mBottomNote, mTopNote, AudioTrack::WriteXMLAttributes(), and wxT().
void NoteTrack::Zoom | ( | const wxRect & | rect, |
int | y, | ||
float | multiplier, | ||
bool | center | ||
) |
Zoom the note track around y. If center is true, the result will be centered at y.
Definition at line 1052 of file NoteTrack.cpp.
References mBottomNote, mTopNote, SetNoteRange(), and NoteTrackDisplayData::YToIPitch().
Referenced by ZoomTo().
void NoteTrack::ZoomAllNotes | ( | ) |
Zooms so that all notes are visible.
Definition at line 1087 of file NoteTrack.cpp.
References GetSeq(), MaxPitch, MinPitch, and SetNoteRange().
Referenced by ImportMIDI().
|
inline |
Zooms in a constant factor (subject to zoom limits)
Definition at line 142 of file NoteTrack.h.
Referenced by NoteTrackVRulerControls::HandleWheelRotation().
|
inline |
|
inline |
Zooms out a constant factor (subject to zoom limits)
Definition at line 140 of file NoteTrack.h.
void NoteTrack::ZoomTo | ( | const wxRect & | rect, |
int | start, | ||
int | end | ||
) |
Definition at line 1072 of file NoteTrack.cpp.
References PackedArray::end(), SetNoteRange(), NoteTrackDisplayData::YToIPitch(), and Zoom().
|
private |
Definition at line 230 of file NoteTrack.h.
Referenced by Clone(), NoteTrack(), SetBottomNote(), SetNoteRange(), SetTopNote(), ShiftNoteRange(), WriteXML(), and Zoom().
|
private |
Definition at line 238 of file NoteTrack.h.
|
mutableprivate |
Definition at line 221 of file NoteTrack.h.
Referenced by Clone(), GetSeq(), HandleXMLTag(), MakeExportableSeq(), NoteTrack(), PrintSequence(), SetSequence(), and WarpAndTransposeNotes().
|
mutableprivate |
Definition at line 222 of file NoteTrack.h.
|
mutableprivate |
Definition at line 223 of file NoteTrack.h.
Referenced by Clone(), GetSeq(), and NoteTrack().
|
private |
Definition at line 246 of file NoteTrack.h.
|
private |
Definition at line 230 of file NoteTrack.h.
Referenced by Clone(), NoteTrack(), SetBottomNote(), SetNoteRange(), SetTopNote(), ShiftNoteRange(), WriteXML(), and Zoom().
|
private |
A bit set; atomic because it may be read by worker threads in playback.
Definition at line 244 of file NoteTrack.h.
|
staticprivate |
Definition at line 241 of file NoteTrack.h.