Class Neck
Neck definition of string instrument (violin, guitar, bass, ukulele, bouzouki...).
- Number of courses: one string or two or more adjacent strings that are closely spaced relative to the other strings.
- List of courses with their properties:
- Number of strings per course: 1 for guitar, 2 for mandolin
- Number of fret per course
- Beginning of the course, in number of frets
- Relative pitch of each string of the course: 0=unison, 12=octave higher, -12=octave lower
- Tuning and alternative tunings
Section
Section | Summary |
---|---|
InstrumentsClassifications | Musical instrument classifications |
Summary
Field | Type | Summary |
---|---|---|
Courses | Collection | table of courses of the neck. |
NbFretsAmateur | int | Number of frets playable by amateur musicians. |
NbFretsProfessional | int | Number of frets playable by professional musicians. |
NeckName | string | Neck name |
NumberOfCourses | int | Number of courses on the neck |
Tunings | Map | Possible tunings |
Return type | Function and summary |
---|---|
addTuning(string tuningName, table tuningNotes) Add a tuning to the neck | |
string, string, string, string, string | getTuningNotesAndRanges(string tuningName) Return string notes and played range for the given tuning. |
Collection | getTuningsName() Return a Collection of the tunings' name |
Fields
string Neck:NeckName
Neck name
int Neck:NumberOfCourses
Number of courses on the neck
Collection Neck:Courses
table of courses of the neck.
Browse it from 1 to NumberOfCourses. On a guitar, first is the one near the player's head, last is the one near the ground.
int Neck:NbFretsProfessional
Number of frets playable by professional musicians.
int Neck:NbFretsAmateur
Number of frets playable by amateur musicians.
Methods
Neck:addTuning(string tuningName, table tuningNotes)
Add a tuning to the neck
Parameter | Type | Default | Description |
---|---|---|---|
tuningName | string | tuningName | |
tuningNotes | table | A table of note names whose length must equals neck's number of course. Example: {"G3","D4","A4","E5"} for violin. |
Neck:getTuningNotesAndRanges(string tuningName)
Return string notes and played range for the given tuning.
Parameter | Type | Default | Description |
---|---|---|---|
tuningName | string | nil returns default or last used tuning. |
- Returns
- string: All strings notes. Courses are seperated by a coma, strings of a same course are separated by a space.
Example: G3 G3, D4 D4, A4 A4, E5 E5 for mandolin. - string: Lowest playable and writeable notename. Lower octave string of a course is ignored.
- string: Highest playable and writeable note name. Higher octave string of a course is ignored.
- string: Lowest note in frequency, the lowest string note in all courses.
- string: Highest note in frequency, the last fret of highest note of all courses.