Directive
enum Directive: String, CaseIterable
The directives Chord Provider supports
-
Meta-data directives
This directive defines the title of the song
Declaration
Swift
case t
-
Declaration
Swift
case t, title
-
This directive defines a subtitle of the song
Note
It will be used as artistDeclaration
Swift
case st
-
Declaration
Swift
case st, subtitle
-
This directive defines an artist
Declaration
Swift
case artist
-
This directive defines an album this song occurs on
Declaration
Swift
case album
-
The year this song was first published, as a four-digit number
Declaration
Swift
case year
-
This directive specifies the key the song is written in
Declaration
Swift
case key
-
This directive specifies a time signature
Declaration
Swift
case time
-
This directive specifies the tempo in number of beats per minute for the song
Declaration
Swift
case tempo
-
This directive specifies the capo setting for the song
Declaration
Swift
case capo
-
This directive specifies the instrument setting for the song
Declaration
Swift
case instrument
-
Formatting directives
This directive introduce a comment line
Declaration
Swift
case c
-
Declaration
Swift
case c, comment
-
Environment directives
Chorus
This directive indicates that the lines that follow form the song’s chorus
Declaration
Swift
case startOfChorus = "start_of_chorus"
-
This directive indicates that the lines that follow form the song’s chorus
Declaration
Swift
case soc
-
This directive indicates the end of the chorus
Declaration
Swift
case endOfChorus = "end_of_chorus"
-
This directive indicates the end of the chorus
Declaration
Swift
case eoc
-
This directive indicates that the song chorus must be played here
Declaration
Swift
case chorus
-
Verse
Specifies that the following lines form a verse of the song
Declaration
Swift
case startOfVerse = "start_of_verse"
-
Specifies that the following lines form a verse of the song
Declaration
Swift
case sov
-
Specifies the end of the verse
Declaration
Swift
case endOfVerse = "end_of_verse"
-
Specifies the end of the verse
Declaration
Swift
case eov
-
Bridge
Specifies that the following lines form a bridge of the song
Declaration
Swift
case startOfBridge = "start_of_bridge"
-
Specifies that the following lines form a bridge of the song
Declaration
Swift
case sob
-
Specifies the end of the bridge
Declaration
Swift
case endOfBridge = "end_of_bridge"
-
Specifies the end of the bridge
Declaration
Swift
case eob
-
Tab
This directive indicates that the lines that follow form a section of guitar TAB instructions
Declaration
Swift
case startOfTab = "start_of_tab"
-
This directive indicates that the lines that follow form a section of guitar TAB instructions
Declaration
Swift
case sot
-
This directive indicates the end of the tab
Declaration
Swift
case endOfTab = "end_of_tab"
-
This directive indicates the end of the tab
Declaration
Swift
case eot
-
Grid
This directive indicates that the lines that follow define a chord grid in the style of Jazz Grilles
Declaration
Swift
case startOfGrid = "start_of_grid"
-
This directive indicates that the lines that follow define a chord grid in the style of Jazz Grilles
Declaration
Swift
case sog
-
This directive indicates the end of the grid
Declaration
Swift
case endOfGrid = "end_of_grid"
-
This directive indicates the end of the grid
Declaration
Swift
case eog
-
Textblock
This directive indicates that the lines that follow define a piece of text that is combined into a single object that can be placed as an image
Declaration
Swift
case startOfTextblock = "start_of_textblock"
-
This directive indicates the end of the textblock
Declaration
Swift
case endOfTextblock = "end_of_textblock"
-
Chord diagrams
This directive defines a chord in terms of fret/string positions and, optionally, finger settings
Declaration
Swift
case define
-
This directive has the path to the music file
Declaration
Swift
case musicPath = "musicpath"
-
This directive defines a tag for the song
Declaration
Swift
case tag
-
Not a directive
Declaration
Swift
case none
-
Strum
This directive indicates that the lines that follow defines a strum pattern
Declaration
Swift
case startOfStrum = "start_of_strum"
-
This directive indicates that the lines that follow defines a strum pattern
Declaration
Swift
case sos
-
This directive indicates the end of the strum
Declaration
Swift
case endOfStrum = "end_of_strum"
-
This directive indicates the end of the strum
Declaration
Swift
case eos
-
The start and end of the directive
Declaration
Swift
var format: (start: String, end: String)
-
The raw label of the directive
Declaration
Swift
func label(_ directive: ChordPro.Directive) -> String
Parameters
directive
The
ChordPro/Directive
Return Value
The raw value as
String
-
The kind of directive (block, inline or optional label)
Declaration
Swift
var kind: Kind
-
The kind of directive (block or inline)
See moreDeclaration
Swift
enum Kind
-
Array of Metadata
ChordPro/Directive
Declaration
Swift
static var metaDataDirectives: [ChordPro.Directive]
-
Array of environment
ChordPro/Directive
Declaration
Swift
static var environmentDirectives: [ChordPro.Directive]
-
Array of
ChordPro/Directive
that can be edited by double click on it (macOS only)Declaration
Swift
static var editableDirectives: [ChordPro.Directive]