Class Neck

Neck definition of string instrument (violin, guitar, bass, ukulele, bouzouki...).

Section

SectionSummary
InstrumentsClassificationsMusical instrument classifications

Summary

FieldTypeSummary
CoursesCollectiontable of courses of the neck.
NbFretsAmateurintNumber of frets playable by amateur musicians.
NbFretsProfessionalintNumber of frets playable by professional musicians.
NeckNamestringNeck name
NumberOfCoursesintNumber of courses on the neck
TuningsMapPossible tunings
Return typeFunction and summary
 addTuning(string tuningName, table tuningNotes)
Add a tuning to the neck
string, string, string, string, stringgetTuningNotesAndRanges(string tuningName)
Return string notes and played range for the given tuning.
CollectiongetTuningsName()
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.

Map Neck:Tunings

Possible tunings

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

ParameterTypeDefaultDescription
tuningNamestring tuningName
tuningNotestable A table of note names whose length must equals neck's number of course.
Example: {"G3","D4","A4","E5"} for violin.

Neck:getTuningsName()

Return a Collection of the tunings' name

Return
Collection: Collection

Neck:getTuningNotesAndRanges(string tuningName)

Return string notes and played range for the given tuning.

ParameterTypeDefaultDescription
tuningNamestring 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.