Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 9 additions & 36 deletions documentation/source/usersGuide/usersGuide_31_clefs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Pitch objects generally do not have `.tie` attributes, and While we can assign an attribute to almost any object, `music21` looks for the `.tie` attribute on Notes or Chords, not Pitches. So to do this properly, we need to know that internally, Chords store not just pitch objects, but also Note objects, which you can access by iterating over the Chord:"
"Pitch objects generally do not have `.tie` attributes, and while we can assign an attribute to almost any object, `music21` looks for the `.tie` attribute on Notes or Chords, not Pitches. So to do this properly, we need to know that internally, Chords store not just pitch objects, but also Note objects, which you can access by iterating over the Chord:"
]
},
{
Expand Down Expand Up @@ -1167,7 +1167,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"And that works rather well. But maybe you don't want to bother remembering which note number in a chord refers to the particular note you want tied? You can also get Notes out of a chord by treating passing in the pitch name of the Note to the chord:"
"And that works rather well. But maybe you don't want to bother remembering which note number in a chord refers to the particular note you want tied? You can also get Notes out of a chord by passing in the pitch name of the Note to the chord:"
]
},
{
Expand All @@ -1194,7 +1194,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Note that this only works properly if the chord does not have any repeated pitches. We are safe here. We can also retrieve and specify information directly in the chord from the index:"
"Note that this only works properly if the chord does not have any repeated pitches. We are safe here. Since we get back the Note itself, we can read its tie directly:"
]
},
{
Expand All @@ -1214,34 +1214,7 @@
}
],
"source": [
"ch2['D4.tie']"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Or alternatively (though note that this is a string):"
]
},
{
"cell_type": "code",
"execution_count": 45,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<music21.tie.Tie start>"
]
},
"execution_count": 45,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ch2['0.tie']"
"ch2['D4'].tie"
]
},
{
Expand All @@ -1257,7 +1230,7 @@
"metadata": {},
"outputs": [],
"source": [
"ch2['A4.tie'] = tie.Tie('start')"
"ch2['A4'].tie = tie.Tie('start')"
]
},
{
Expand Down Expand Up @@ -1289,8 +1262,8 @@
}
],
"source": [
"ch3['D4.tie'] = tie.Tie('start')\n",
"ch3['A4.tie'] = tie.Tie('start')\n",
"ch3['D4'].tie = tie.Tie('stop')\n",
"ch3['A4'].tie = tie.Tie('stop')\n",
"\n",
"s.show()"
]
Expand Down Expand Up @@ -1326,7 +1299,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The chord returns information from the highest note. So if we delete the tie on D4, we get the same answer:"
"The chord returns the tie of the first note that has one, here D4. So if we delete the tie on D4, we get A4's tie, which is also a start:"
]
},
{
Expand All @@ -1346,7 +1319,7 @@
}
],
"source": [
"ch2['D4.tie'] = None\n",
"ch2['D4'].tie = None\n",
"ch2.tie"
]
},
Expand Down
Loading