Returns a FoscTimespan.
Timespan.
Timespans are closed-open intervals.
Timespans are immutable.
| axis | Arithmetic mean of startOffset and stopOffset. |
| duration | Duration of timespan. |
| isWellFormed | Is true when timespan start offset preceeds timespan stop offset. |
| offsets | Timespan offsets. |
| startOffset | Timespan start offset. |
| stopOffset | Timespan stop offset. |
| == | (abjad: eq) |
| >= | (abjad: ge) |
| > | (abjad: gt) |
| <= | (abjad: le) |
| < | (abjad: lt ) |
| asCompileString | Formats timespan. |
| format | Formats timespan. |
| hash | Hashes timespan. |
| illustrate | Illustrates timespan. |
| show | |
| size | Defined equal to 1 for all timespans. |
| - | (abjad: sub, -) |
| sect | (abjad: and, &) |
| symmetricDifference | (abjad: xor, ^) |
| union | (abjad: or, |
| containsTimespanImproperly | Is true when timespan contains timespan improperly. |
| curtailsTimespan | Is true when timespan curtails timespan. |
| delaysTimespan | Is true when timespan delays timespan. |
| getOverlapWithTimespan | Gets duration of overlap with timespan. |
| happensDuringTimespan | Is true when timespan happens during timespan. |
| intersectsTimespan | Is true when timespan intersects timespan. |
| isCongruentToTimespan | Is true when timespan is congruent to timespan. |
| isTangentToTimespan | Is true when timespan is tangent to timespan. |
| overlapsAllOfTimespan | Is true when timespan overlaps all of timespan. |
| overlapsOnlyStartOfTimespan | Is true when timespan overlaps only start of timespan. |
| overlapsOnlyStopOfTimespan | Is true when timespan overlaps only stop of timespan. |
| overlapsStartOfTimespan | Is true when timespan overlaps start of timespan. |
| overlapsStopOfTimespan | Is true when timespan overlaps stop of timespan. |
| partitionByRatio | (abjad: divide_by_ratio) |
| reflect | Reflects timespan about axis. |
| roundOffsets | Rounds timespan offsets to multiple of multiplier. |
| scale | Scales timespan by multiplier. |
| setDuration | Sets timespan duration to duration. |
| setOffsets | Sets timespan start offset to startOffset and stop offset to stopOffset. |
| splitAtOffset | Split into two parts when offset happens during timespan. |
| splitAtOffsets | Split into one or more parts when offsets happens during timespan. |
| startsAfterOffset | Is true when timespan overlaps start of offset. |
| startsAfterTimespanStarts | Is true when timespan starts after timespan starts. |
| startsAfterTimespanStops | Is true when timespan stops after timespan stops. |
| startsAtOffset | Is true when timespan starts at offset. |
| startsAtOrAfterOffset | Is true when timespan starts at or after offset. |
| startsBeforeOffset | Is true when timespan starts before offset. |
| startsBeforeOrAtOffset | Is true when timespan starts before or at offset. |
| startsBeforeTimespanStarts | Is true when timespan starts before timespan starts. |
| startsBeforeTimespanStops | Is true when timespan starts before timespan stops. |
| startsDuringTimespan | Is true when timespan starts during timespan. |
| startsWhenTimespanStarts | Is true when timespan starts when timespan starts. |
| startsWhenTimespanStops | Is true when timespan starts when timespan stops. |
| stopsAfterOffset | Is true when timespan stops after offset. |
| stopsAfterTimespanStarts | Is true when timespan stops after timespan starts. |
| stopsAfterTimespanStops | Is true when timespan stops after timespan stops. |
| stopsAtOffset | Is true when timespan stops at offset. |
| stopsAtOrAfterOffset | Is true when timespan stops at or after offset. |
| stopsBeforeOffset | Is true when timespan stops before offset. |
| stopsBeforeOrAtOffset | Is true when timespan stops before or at offset. |
| stopsBeforeTimespanStarts | Is true when timespan stops before timespan starts. |
| stopsBeforeTimespanStops | Is true when timespan stops before timespan stops. |
| stopsDuringTimespan | Is true when timespan stops during timespan. |
| stopsWhenTimespanStarts | Is true when timespan stops when timespan starts. |
| stopsWhenTimespanStops | Is true when timespan stops when timespan stops. |
| stretch | Stretches timespan by multiplier relative to anchor. |
| translate | Translates timespan by translation. |
| translateOffsets | Translates timespan start offset by start_offset_translation and stop offset by stop_offset_translation. |
| trisectsTimespan | Is true when timespan trisects timespan. |
Arithmetic mean of startOffset and stopOffset.
Example
FoscTimespan(0, 10).axis.cs;FoscOffset(5, 1)Duration of timespan.
Example
FoscTimespan(0, 10).duration.cs;FoscDuration(10, 1)Is true when timespan start offset preceeds timespan stop offset.
Example
FoscTimespan(0, 10).isWellFormed;trueTimespan offsets.
Example
FoscTimespan(0, 10).offsets.collect { |each| each.cs };[ "FoscOffset(0, 1)", "FoscOffset(10, 1)" ]Timespan start offset.
Example
FoscTimespan(0, 10).startOffset.cs;FoscOffset(0, 1)Timespan stop offset.
Example
FoscTimespan(0, 10).stopOffset.cs;FoscOffset(10, 1)(abjad: eq)
Is true when timespan is a timespan with equal offsets. Otherwise false:
Returns true or false.
Example
FoscTimespan(1, 3) == FoscTimespan(1, 3);true
FoscTimespan(1, 3) == FoscTimespan(2, 3);false(abjad: ge)
Is true when argument start offset is greater or equal to timespan start offset. Otherwise false:
Returns true or false.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(5, 12);
c = FoscTimespan(-2, 2);
b >= c;true
a >= b;false(abjad: gt)
Is true when argument start offset is greater than timespan start offset. Otherwise false:
Returns true or false.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(5, 12);
c = FoscTimespan(-2, 2);
b > c;true
a > b;false(abjad: le)
Is true when argument start offset is less than or equal to timespan start offset. Otherwise false:
Returns true or false.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(5, 12);
c = FoscTimespan(-2, 2);
b <= c;false
a <= b;true(abjad: lt )
Is true when argument start offset is less than timespan start offset. Otherwise false:
Returns true or false.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(5, 12);
c = FoscTimespan(-2, 2);
b < c;false
a < b;trueFormats timespan.
Returns string.
Example
FoscTimespan(1, 3).cs;FoscTimespan(1/1, 3/1)Formats timespan.
Returns string.
Example
FoscTimespan(0, 10).format;FoscTimespan(0/1, 10/1)Hashes timespan.
Illustrates timespan.
Returns Lilypond file.
Defined equal to 1 for all timespans.
Returns positive integer.
(abjad: sub, -)
Subtract timespan from receiver.
Returns timespan list.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(5, 12);
c = FoscTimespan(-2, 2);
d = FoscTimespan(10, 20);
x = a - a;
x.items.collect { |each| each.cs };[ ]
x = a - b;
x.items.collect { |each| each.cs };[ "FoscTimespan(0/1, 5/1)" ]
x = a - c;
x.items.collect { |each| each.cs };[ "FoscTimespan(2/1, 10/1)" ]
x = a - d;
x.items.collect { |each| each.cs };[ "FoscTimespan(0/1, 10/1)" ]
x = b - a;
x.items.collect { |each| each.cs };[ "FoscTimespan(10/1, 12/1)" ]
x = b - b;
x.items.collect { |each| each.cs };[ ]
x = b - c;
x.items.collect { |each| each.cs };[ "FoscTimespan(5/1, 12/1)" ]
x = b - d;
x.items.collect { |each| each.cs };[ "FoscTimespan(5/1, 10/1)" ]
x = c - a;
x.items.collect { |each| each.cs };[ "FoscTimespan(-2/1, 0/1)" ]
x = c - b;
x.items.collect { |each| each.cs };[ "FoscTimespan(-2/1, 2/1)" ]
x = c - c;
x.items.collect { |each| each.cs };[ ]
x = c - d;
x.items.collect { |each| each.cs };[ "FoscTimespan(-2/1, 2/1)" ]
x = d - a;
x.items.collect { |each| each.cs };[ "FoscTimespan(10/1, 20/1)" ]
x = d - b;
x.items.collect { |each| each.cs };[ "FoscTimespan(12/1, 20/1)" ]
x = d - c;
x.items.collect { |each| each.cs };[ "FoscTimespan(10/1, 20/1)" ]
x = d - d;
x.items.collect { |each| each.cs };[ ](abjad: and, &)
Intersection of receiver and timespan (Logical AND).
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(5, 12);
c = FoscTimespan(-2, 2);
d = FoscTimespan(10, 20);
x = a.sect(b);
x.items.collect { |each| each.cs };[ "FoscTimespan(5/1, 10/1)" ]
x = a.sect(c);
x.items.collect { |each| each.cs };[ "FoscTimespan(0/1, 2/1)" ]
x = a.sect(d);
x.items.collect { |each| each.cs };[ ]
x = b.sect(c);
x.items.collect { |each| each.cs };[ ]
x = b.sect(d);
x.items.collect { |each| each.cs };[ "FoscTimespan(10/1, 12/1)" ]
x = c.sect(d);
x.items.collect { |each| each.cs };[ ](abjad: xor, ^)
Symmetric difference of receiver and timespan (Logical XOR).
Returns timespan list.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(5, 12);
c = FoscTimespan(-2, 2);
d = FoscTimespan(10, 20);
x = a.symmetricDifference(b);
x.items.collect { |each| each.cs };[ "FoscTimespan(0/1, 5/1)", "FoscTimespan(10/1, 12/1)" ]
x = a.symmetricDifference(c);
x.items.collect { |each| each.cs };[ "FoscTimespan(-2/1, 0/1)", "FoscTimespan(2/1, 10/1)" ]
x = a.symmetricDifference(d);
x.items.collect { |each| each.cs };[ "FoscTimespan(0/1, 10/1)", "FoscTimespan(10/1, 20/1)" ]
x = b.symmetricDifference(c);
x.items.collect { |each| each.cs };[ "FoscTimespan(-2/1, 2/1)", "FoscTimespan(5/1, 12/1)" ]
x = b.symmetricDifference(d);
x.items.collect { |each| each.cs };[ "FoscTimespan(5/1, 10/1)", "FoscTimespan(12/1, 20/1)" ]
x = c.symmetricDifference(d);
x.items.collect { |each| each.cs };[ "FoscTimespan(-2/1, 2/1)", "FoscTimespan(10/1, 20/1)" ](abjad: or, |)
Union of receiver and timespan (Logical OR).
Returns timespan list.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(5, 12);
c = FoscTimespan(-2, 2);
d = FoscTimespan(10, 20);
x = a.union(b);
x.items.collect { |each| each.cs };[ "FoscTimespan(0/1, 12/1)" ]
x = a.union(c);
x.items.collect { |each| each.cs };[ "FoscTimespan(-2/1, 10/1)" ]
x = a.union(d);
x.items.collect { |each| each.cs };[ "FoscTimespan(0/1, 20/1)" ]
x = b.union(c);
x.items.collect { |each| each.cs };[ "FoscTimespan(-2/1, 2/1)", "FoscTimespan(5/1, 12/1)" ]
x = b.union(d);
x.items.collect { |each| each.cs };[ "FoscTimespan(5/1, 20/1)" ]
x = c.union(d);
x.items.collect { |each| each.cs };[ "FoscTimespan(-2/1, 2/1)", "FoscTimespan(10/1, 20/1)" ]Is true when timespan contains timespan improperly.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(5, 10);
a.containsTimespanImproperly(a);true
a.containsTimespanImproperly(b);true
b.containsTimespanImproperly(a);false
b.containsTimespanImproperly(b);trueIs true when timespan curtails timespan.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(5, 10);
a.curtailsTimespan(a);false
a.curtailsTimespan(b);false
b.curtailsTimespan(a);true
b.curtailsTimespan(b);falseIs true when timespan delays timespan.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(5, 15);
c = FoscTimespan(10, 20);
a.delaysTimespan(b);true
b.delaysTimespan(c);true
b.delaysTimespan(a);falseGets duration of overlap with timespan.
Example
a = FoscTimespan(0, 15);
b = FoscTimespan(5, 10);
c = FoscTimespan(6, 6);
d = FoscTimespan(12, 22);
a.getOverlapWithTimespan(a).cs;FoscDuration(15, 1)
a.getOverlapWithTimespan(b).cs;FoscDuration(5, 1)
a.getOverlapWithTimespan(c).cs;FoscDuration(0, 1)
a.getOverlapWithTimespan(d).cs;FoscDuration(3, 1)
b.getOverlapWithTimespan(b).cs;FoscDuration(5, 1)
b.getOverlapWithTimespan(c).cs;FoscDuration(0, 1)
b.getOverlapWithTimespan(d).cs;FoscDuration(0, 1)
c.getOverlapWithTimespan(c).cs;FoscDuration(0, 1)
c.getOverlapWithTimespan(d).cs;FoscDuration(0, 1)
d.getOverlapWithTimespan(d).cs;FoscDuration(10, 1)Is true when timespan happens during timespan.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(5, 10);
a.happensDuringTimespan(a);true
a.happensDuringTimespan(b);false
b.happensDuringTimespan(a);true
b.happensDuringTimespan(b);trueIs true when timespan intersects timespan.
code:: a = FoscTimespan(0, 10); b = FoscTimespan(5, 15); c = FoscTimespan(10, 15);
a.intersectsTimespan(a);
code:: a.intersectsTimespan(b);
code:: a.intersectsTimespan(c);
Is true when timespan is congruent to timespan.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(5, 15);
a.isCongruentToTimespan(a);true
a.isCongruentToTimespan(b);false
b.isCongruentToTimespan(a);false
b.isCongruentToTimespan(b);trueIs true when timespan is tangent to timespan.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(10, 20);
a.isTangentToTimespan(a);false
a.isTangentToTimespan(b);true
b.isTangentToTimespan(a);true
b.isTangentToTimespan(b);falseIs true when timespan overlaps all of timespan.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(5, 6);
c = FoscTimespan(5, 10);
a.overlapsAllOfTimespan(a);false
a.overlapsAllOfTimespan(b);true
b.overlapsAllOfTimespan(c);falseIs true when timespan overlaps only start of timespan.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(-5, 5);
c = FoscTimespan(4, 6);
d = FoscTimespan(5, 15);
a.overlapsOnlyStartOfTimespan(a);false
a.overlapsOnlyStartOfTimespan(b);false
a.overlapsOnlyStartOfTimespan(c);false
a.overlapsOnlyStartOfTimespan(d);trueIs true when timespan overlaps only stop of timespan.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(-5, 5);
c = FoscTimespan(4, 6);
d = FoscTimespan(5, 15);
a.overlapsOnlyStopOfTimespan(a);false
a.overlapsOnlyStopOfTimespan(b);true
a.overlapsOnlyStopOfTimespan(c);false
a.overlapsOnlyStopOfTimespan(d);falseIs true when timespan overlaps start of timespan.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(-5, 5);
c = FoscTimespan(4, 6);
d = FoscTimespan(5, 15);
a.overlapsStartOfTimespan(a);false
a.overlapsStartOfTimespan(b);false
a.overlapsStartOfTimespan(c);true
a.overlapsStartOfTimespan(d);trueIs true when timespan overlaps stop of timespan.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(-5, 5);
c = FoscTimespan(4, 6);
d = FoscTimespan(5, 15);
a.overlapsStopOfTimespan(a);false
a.overlapsStopOfTimespan(b);true
a.overlapsStopOfTimespan(c);true
a.overlapsStopOfTimespan(d);false(abjad: divide_by_ratio)
Partitions timespan by ratio.
Returns array of timespans.
Example
a = FoscTimespan(1/2, 3/2);
b = a.partitionByRatio(#[1,2,1]);
b.collect { |each| each.cs };[ "FoscTimespan(1/2, 3/4)", "FoscTimespan(3/4, 5/4)", "FoscTimespan(5/4, 3/2)" ]Reflects timespan about axis.
Returns a new FoscTimespan.
Reverse timespan about timespan axis.
a = FoscTimespan(3, 6).reflect;
a.cs;FoscTimespan(3/1, 6/1)Reverse timespan about arbitrary axis.
a = FoscTimespan(3, 6).reflect(10);
a.cs;FoscTimespan(14/1, 17/1)Rounds timespan offsets to multiple of multiplier.
Returns a new FoscTimespan.
Example
a = FoscTimespan(1/5, 4/5);
b = a.roundOffsets(1);
b.cs;FoscTimespan(0/1, 1/1)Example
a = FoscTimespan(1/5, 4/5);
b = a.roundOffsets(2);
b.cs;FoscTimespan(0/1, 2/1)Example
a = FoscTimespan(1/5, 4/5);
b = a.roundOffsets(2, anchor: 'right');
b.cs;FoscTimespan(-2/1, 0/1)Example
a = FoscTimespan(1/5, 4/5);
b = a.roundOffsets(2, anchor: 'right', mustBeWellFormed: false);
b.cs;FoscTimespan(0/1, 0/1)Scales timespan by multiplier.
Returns a new FoscTimespan.
Scale timespan relative to timespan start offset.
a = FoscTimespan(3, 6);
b = a.scale(2);
b.cs;FoscTimespan(3/1, 9/1)Scale timespan relative to timespan stop offset.
a = FoscTimespan(3, 6);
b = a.scale(2, anchor: 'right');
b.cs;FoscTimespan(0/1, 6/1)Sets timespan duration to duration.
Returns a new FoscTimespan.
Example
a = FoscTimespan(1/2, 3/2);
b = a.setDuration(3/5);
b.cs;FoscTimespan(1/2, 11/10)Sets timespan start offset to startOffset and stop offset to stopOffset.
Returns a new FoscTimespan.
Example
a = FoscTimespan(1/2, 3/2);
b = a.setOffsets(stopOffset: 7/8);
b.cs;FoscTimespan(1/2, 7/8)Subtract negative startOffset from existing stop offset.
a = FoscTimespan(1/2, 3/2);
b = a.setOffsets(startOffset: -1/2);
b.cs;FoscTimespan(1/1, 3/2)Subtract negative stopOffset from existing stop offset.
a = FoscTimespan(1/2, 3/2);
b = a.setOffsets(stopOffset: -1/2);
b.cs;FoscTimespan(1/2, 1/1)Split into two parts when offset happens during timespan.
Returns a FoscTimespanList.
Example
a = FoscTimespan(0, 5);
b = a.splitAtOffset(2);
b.items.collect { |each| each.cs };[ "FoscTimespan(0/1, 2/1)", "FoscTimespan(2/1, 5/1)" ]Returns a FoscTimespanList with a copy of receiver when offset does not happen during timespan.
a = FoscTimespan(0, 5);
b = a.splitAtOffset(12);
b.items.collect { |each| each.cs };[ "FoscTimespan(0/1, 5/1)" ]Split into one or more parts when offsets happens during timespan.
Returns a FoscTimespanList.
Example
a = FoscTimespan(0, 10);
b = a.splitAtOffsets(#[1,3,7]);
b.items.collect { |each| each.cs };[ "FoscTimespan(0/1, 1/1)", "FoscTimespan(1/1, 3/1)", "FoscTimespan(3/1, 7/1)", "FoscTimespan(7/1, 10/1)" ]Returns a FoscTimespanList with a copy of receiver when offset does not happen during timespan.
a = FoscTimespan(0, 10);
b = a.splitAtOffsets(#[-100]);
b.items.collect { |each| each.cs };[ "FoscTimespan(0/1, 10/1)" ]Is true when timespan overlaps start of offset.
Example
a = FoscTimespan(0, 10);
a.startsAfterOffset(-5);true
a.startsAfterOffset(0);false
a.startsAfterOffset(5);falseIs true when timespan starts after timespan starts.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(5, 15);
a.startsAfterTimespanStarts(a);false
a.startsAfterTimespanStarts(b);false
b.startsAfterTimespanStarts(a);true
b.startsAfterTimespanStarts(b);falseIs true when timespan stops after timespan stops.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(5, 15);
c = FoscTimespan(10, 20);
d = FoscTimespan(15, 25);
a.startsAfterTimespanStops(a);false
b.startsAfterTimespanStops(a);false
c.startsAfterTimespanStops(a);true
d.startsAfterTimespanStops(a);trueIs true when timespan starts at offset.
Example
a = FoscTimespan(0, 10);
a.startsAtOffset(-5);false
a.startsAtOffset(0);true
a.startsAtOffset(5);falseIs true when timespan starts at or after offset.
Example
a = FoscTimespan(0, 10);
a.startsAtOrAfterOffset(-5);true
a.startsAtOrAfterOffset(0);true
a.startsAtOrAfterOffset(5);falseIs true when timespan starts before offset.
Example
a = FoscTimespan(0, 10);
a.startsBeforeOffset(-5);false
a.startsBeforeOffset(0);false
a.startsBeforeOffset(5);trueIs true when timespan starts before or at offset.
code:: a = FoscTimespan(0, 10);
a.startsBeforeOrAtOffset(-5);
code:: a.startsBeforeOrAtOffset(0);
code:: a.startsBeforeOrAtOffset(5);
Is true when timespan starts before timespan starts.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(5, 15);
a.startsBeforeTimespanStarts(a);false
a.startsBeforeTimespanStarts(b);true
b.startsBeforeTimespanStarts(a);false
b.startsBeforeTimespanStarts(b);falseIs true when timespan starts before timespan stops.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(5, 15);
a.startsBeforeTimespanStops(a);true
a.startsBeforeTimespanStops(b);true
b.startsBeforeTimespanStops(a);true
b.startsBeforeTimespanStops(b);trueIs true when timespan starts during timespan.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(5, 15);
a.startsDuringTimespan(a);true
a.startsDuringTimespan(b);false
b.startsDuringTimespan(a);true
b.startsDuringTimespan(b);trueIs true when timespan starts when timespan starts.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(5, 15);
a.startsWhenTimespanStarts(a);true
a.startsWhenTimespanStarts(b);false
b.startsWhenTimespanStarts(a);false
b.startsWhenTimespanStarts(b);trueIs true when timespan starts when timespan stops.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(10, 20);
a.startsWhenTimespanStops(a);false
a.startsWhenTimespanStops(b);false
b.startsWhenTimespanStops(a);true
b.startsWhenTimespanStops(b);falseIs true when timespan stops after offset.
Example
a = FoscTimespan(0, 10);
a.stopsAfterOffset(0);true
a.stopsAfterOffset(5);true
a.stopsAfterOffset(10);falseIs true when timespan stops after timespan starts.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(10, 20);
a.stopsAfterTimespanStarts(a);true
a.stopsAfterTimespanStarts(b);false
b.stopsAfterTimespanStarts(a);true
b.stopsAfterTimespanStarts(b);trueIs true when timespan stops after timespan stops.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(10, 20);
a.stopsAfterTimespanStops(a);false
a.stopsAfterTimespanStops(b);false
b.stopsAfterTimespanStops(a);true
b.stopsAfterTimespanStops(b);falseIs true when timespan stops at offset.
Example
a = FoscTimespan(0, 10);
a.stopsAtOffset(0);false
a.stopsAtOffset(10);true
a.stopsAtOffset(20);falseIs true when timespan stops at or after offset.
Example
a = FoscTimespan(0, 10);
a.stopsAtOrAfterOffset(0);true
a.stopsAtOrAfterOffset(10);true
a.stopsAtOrAfterOffset(20);falseIs true when timespan stops before offset.
Example
a = FoscTimespan(0, 10);
a.stopsBeforeOffset(0);false
a.stopsBeforeOffset(10);false
a.stopsBeforeOffset(20);trueIs true when timespan stops before or at offset.
Example
a = FoscTimespan(0, 10);
a.stopsBeforeOrAtOffset(0);false
a.stopsBeforeOrAtOffset(10);true
a.stopsBeforeOrAtOffset(20);trueIs true when timespan stops before timespan starts.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(15, 20);
a.stopsBeforeTimespanStarts(a);false
a.stopsBeforeTimespanStarts(b);true
b.stopsBeforeTimespanStarts(a);falseIs true when timespan stops before timespan stops.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(15, 20);
a.stopsBeforeTimespanStops(a);false
a.stopsBeforeTimespanStops(b);true
b.stopsBeforeTimespanStops(a);falseIs true when timespan stops during timespan.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(10, 20);
a.stopsDuringTimespan(a);true
a.stopsDuringTimespan(b);false
b.stopsDuringTimespan(a);false
b.stopsDuringTimespan(b);trueIs true when timespan stops when timespan starts.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(10, 20);
a.stopsWhenTimespanStarts(a);false
a.stopsWhenTimespanStarts(b);true
b.stopsWhenTimespanStarts(a);false
b.stopsWhenTimespanStarts(b);falseIs true when timespan stops when timespan stops.
• stopsWhenTimespanStops
Is true when timespan stops when timespan stops.
Stretches timespan by multiplier relative to anchor.
Returns a new FoscTimespan.
Stretch relative to timespan start offset.
a = FoscTimespan(3, 10);
b = a.stretch(2);
b.cs;FoscTimespan(3/1, 17/1)Stretch relative to timespan stop offset.
a = FoscTimespan(3, 10);
b = a.stretch(2, anchor: a.stopOffset);
b.cs;FoscTimespan(-4/1, 10/1)Stretch relative to offset prior to timespan.
a = FoscTimespan(3, 10);
b = a.stretch(2, anchor: 0);
b.cs;FoscTimespan(6/1, 20/1)Stretch relative to offset after timespan.
a = FoscTimespan(3, 10);
b = a.stretch(3, anchor: 12);
b.cs;FoscTimespan(-15/1, 6/1)Stretch relative to offset that happens during timespan.
a = FoscTimespan(3, 10);
b = a.stretch(2, anchor: 4);
b.cs;FoscTimespan(2/1, 16/1)Translates timespan by translation.
Returns a new FoscTimespan.
Example
a = FoscTimespan(5, 10);
b = a.translate(2);
b.cs;FoscTimespan(7/1, 12/1)Translates timespan start offset by start_offset_translation and stop offset by stop_offset_translation.
Returns a new FoscTimespan.
Example
a = FoscTimespan(1/2, 3/2);
b = a.translateOffsets(startOffsetTranslation: -1/8);
b.cs;FoscTimespan(3/8, 3/2)Is true when timespan trisects timespan.
Example
a = FoscTimespan(0, 10);
b = FoscTimespan(5, 6);
a.trisectsTimespan(a);false
a.trisectsTimespan(b);false
b.trisectsTimespan(a);true
b.trisectsTimespan(b);false