Returns a FoscLogicalTie.
A selection of components in a logical tie.
| head | Reference to element 0 in logical tie. |
| isPitched | Is true when logical tie head is a note or chord. |
| isTrivial | Is true when length of logical tie is less than or equal to 1. |
| leaves | Leaves in logical tie. |
| tail | Reference to element -1 in logical tie. |
| writtenDuration | Sum of written duration of all components in logical tie. |
| writtenPitch | Written pitch of logical tie if logical is pitched. |
| writtenPitch_ | Sets written pitch of logical tie if logical is pitched. |
| asCompileString | |
| at | Gets item at index in container. Traverses top-level items only. |
| copySeries | Gets item at indices in container. Traverses top-level items only. |
| toTuplet | Changes logical tie to tuplet. |
Reference to element 0 in logical tie.
Returns component.
Example
a = FoscContainer([FoscNote(60, 1/4), FoscNote(60, 1/4)]);
b = FoscLogicalTie(a[0..]);
b.head;FoscNote('C4', 1/4)Is true when logical tie head is a note or chord.
Returns true or false.
Example
a = FoscLogicalTie([FoscNote(60, 1/4), FoscNote(60, 1/4)]);
a.isPitched;trueExample
a = FoscLogicalTie([FoscRest(1), FoscRest(1)]);
a.isPitched;falseIs true when length of logical tie is less than or equal to 1.
Returns true or false.
Example
a = FoscLogicalTie([FoscNote(60, 1/4), FoscNote(60, 1/4)]);
a.isTrivial;falseExample
a = FoscLogicalTie([FoscNote(60, 1/4)]);
a.isTrivial;trueLeaves in logical tie.
Returns selection.
Example
a = FoscLogicalTie([FoscNote(60, 1/4), FoscNote(60, 1/4)]);
a.leaves;FoscSelection([ FoscNote(FoscPitch("C4"), FoscDuration(1, 4)), FoscNote(FoscPitch("C4"), FoscDuration(1, 4)) ])Reference to element -1 in logical tie.
Returns component.
Example
a = FoscLogicalTie([FoscNote(60, 1/4), FoscNote(60, 1/4)]);
a.tail;FoscNote('C4', 1/4)Sum of written duration of all components in logical tie.
Returns duration.
Example
a = FoscLogicalTie([FoscNote(60, 1/4), FoscNote(60, 2/4)]);
a.writtenDuration.cs;FoscDuration(3, 4)Written pitch of logical tie if logical is pitched.
Returns pitch.
Example
a = FoscLogicalTie([FoscNote(60, 1/4), FoscNote(60, 2/4)]);
a.writtenPitch.cs;FoscPitch('C4')Sets written pitch of logical tie if logical is pitched.
Example
a = FoscLogicalTie([FoscNote(60, 1/4), FoscNote(60, 2/4)]);
a.writtenPitch_(61);
a.writtenPitch.cs;FoscPitch('C#4')Example
m = FoscStaff(FoscLeafMaker().(#[60,60,62,nil], [1/4,2/4,5/4,3/4]));
m.selectLeaves[0..1].tie;
t = [];
m.doLogicalTies { |each| t = t.add(each.cs) };
t.postln;[ "FoscLogicalTie([
FoscNote('C4', 1/4),
FoscNote('C4', 1/2)
])", "FoscLogicalTie([
FoscNote('D4', 1/1),
FoscNote('D4', 1/4)
])", "FoscLogicalTie([
FoscRest(3/4)
])" ]Gets item at index in container. Traverses top-level items only.
Returns component or selection.
Example
a = FoscLogicalTie([FoscNote(60, 1/4), FoscNote(60, 1/4)]);
a[0].str;c'4
b = a[[0, 1]];[ FoscNote(FoscPitch("C4"), FoscDuration(1, 4)), FoscNote(FoscPitch("C4"), FoscDuration(1, 4)) ]Gets item at indices in container. Traverses top-level items only.
Returns component or selection.
Example
a = FoscLogicalTie([FoscNote(60, 1/4), FoscNote(60, 1/4)]);
b = a[0..];
b.items;[ FoscNote(FoscPitch("C4"), FoscDuration(1, 4)), FoscNote(FoscPitch("C4"), FoscDuration(1, 4)) ]Changes logical tie to tuplet.
Example
a = FoscStaff(FoscLeafMaker().(#[60,62,64], [1/8, 5/16, 1/4]));
a.show;
m = a[1].prGetLogicalTie;
m.toTuplet(#[-2,1,1,1,2]);
a.show;