33 TimeRange getRange()
const;
36 float getStretchRatio()
const;
37 float getTranspose()
const;
39 bool hasFadeIn()
const;
40 bool hasFadeOut()
const;
42 bool isFollowedBySilence()
const;
43 HashCode getHashCode()
const;
45 bool operator== (
const Segment&)
const;
46 bool operator!= (
const Segment&)
const;
50 SampleCount startSample = 0, lengthSample = 0;
51 float stretchRatio = 1.0f, transpose = 0;
52 bool fadeIn =
false, fadeOut =
false;
53 bool followedBySilence =
false;
60 TimeDuration getLength()
const {
return getEnd() - getStart(); }
61 TimeDuration getCrossfadeLength()
const {
return crossfadeTime; }
63 bool operator== (
const AudioSegmentList&)
const noexcept;
64 bool operator!= (
const AudioSegmentList&)
const noexcept;
68 AudioSegmentList (AudioClipBase&);
69 AudioSegmentList (AudioClipBase&,
bool relativeTime,
bool crossfade);
71 void chopSegmentsForChords();
72 void chopSegment (Segment&, TimePosition at,
int insertPos);
76 TimeDuration crossfadeTime;
77 bool relativeTime =
true;
79 void build (
bool crossfade);
80 void buildAutoTempo (
bool crossfade);
81 void buildNormal (
bool crossfade);
82 float getPitchAt (TimePosition);
83 void removeExtraSegments();
84 void crossFadeSegments();
85 void mergeSegments (
double sampleRate);
86 void initialiseSegment (Segment&, BeatPosition startBeat, BeatPosition endBeat,
double sampleRate);