Skip to content

Commit 59acadf

Browse files
authored
Update README.md
1 parent de6d343 commit 59acadf

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Fretboard
2+
3+
![Logo](https://github.com/itsmeichigo/Fretboard/blob/main/logo.png?raw=true)
4+
25
Lightweight guitar chords in SwiftUI.
36

47
Supports iOS 13 and MacOS 10.15 upwards.
@@ -8,7 +11,7 @@ Supports iOS 13 and MacOS 10.15 upwards.
811

912
🌗 Light / Dark modes
1013

11-
🎸 Guitar chords with basic tunings
14+
🎸 Guitar & ukulele chords with basic tunings
1215

1316
⏳ More to come
1417

@@ -19,5 +22,25 @@ Add https://github.com/itsmeichigo/Fretboard.git as the source and you're good t
1922
#### Manual install
2023
Copy contents from Sources folder to your project.
2124

25+
## Usage
26+
Get your desired instrument:
27+
```Swift
28+
let guitar = Instrument.guitar
29+
let ukulele = Instrument.ukulele
30+
```
31+
32+
Each instrument comes with their own name, keys, suffixes and chords. Get a list of positions for a chord using key and suffix:
33+
```Swift
34+
let dAug9Positions = guitar.findChordPositions(key: "D", suffix: "aug9")
35+
let cMajorUkuPositions = Instrument.ukulele.findChordPositions(key: "C", suffix: "major")
36+
```
37+
38+
Display any chord by sending it to `FretboardView`:
39+
40+
```Swift
41+
FretboardView(position: dAug9Positions)
42+
.frame(width: 100, height: 200)
43+
```
44+
2245
## Demo app
2346
![screenshot](https://github.com/itsmeichigo/Fretboard/blob/main/screenshot.png?raw=true)

0 commit comments

Comments
 (0)