API REST pour les triades de basse.
cargo runServeur: http://127.0.0.1:3000
GET /api/triad?root=C&type=major
root: Note fondamentale (A-G, avec # ou b)type: Type de triade (major,minor,diminished,augmented)
{
"root": "C",
"triad_type": "major",
"notes": [
"C",
"E",
"G"
],
"positions": [
{
"string": 0,
"fret": 0,
"note": "E",
"role": "third"
},
{
"string": 0,
"fret": 3,
"note": "G",
"role": "fifth"
},
{
"string": 0,
"fret": 8,
"note": "C",
"role": "root"
},
{
"string": 0,
"fret": 12,
"note": "E",
"role": "third"
},
{
"string": 0,
"fret": 15,
"note": "G",
"role": "fifth"
},
{
"string": 0,
"fret": 20,
"note": "C",
"role": "root"
},
{
"string": 0,
"fret": 24,
"note": "E",
"role": "third"
},
{
"string": 1,
"fret": 3,
"note": "C",
"role": "root"
},
{
"string": 1,
"fret": 7,
"note": "E",
"role": "third"
},
{
"string": 1,
"fret": 10,
"note": "G",
"role": "fifth"
},
{
"string": 1,
"fret": 15,
"note": "C",
"role": "root"
},
{
"string": 1,
"fret": 19,
"note": "E",
"role": "third"
},
{
"string": 1,
"fret": 22,
"note": "G",
"role": "fifth"
},
{
"string": 2,
"fret": 2,
"note": "E",
"role": "third"
},
{
"string": 2,
"fret": 5,
"note": "G",
"role": "fifth"
},
{
"string": 2,
"fret": 10,
"note": "C",
"role": "root"
},
{
"string": 2,
"fret": 14,
"note": "E",
"role": "third"
},
{
"string": 2,
"fret": 17,
"note": "G",
"role": "fifth"
},
{
"string": 2,
"fret": 22,
"note": "C",
"role": "root"
},
{
"string": 3,
"fret": 0,
"note": "G",
"role": "fifth"
},
{
"string": 3,
"fret": 5,
"note": "C",
"role": "root"
},
{
"string": 3,
"fret": 9,
"note": "E",
"role": "third"
},
{
"string": 3,
"fret": 12,
"note": "G",
"role": "fifth"
},
{
"string": 3,
"fret": 17,
"note": "C",
"role": "root"
},
{
"string": 3,
"fret": 21,
"note": "E",
"role": "third"
},
{
"string": 3,
"fret": 24,
"note": "G",
"role": "fifth"
}
]
}cargo test # Tests unitaires
cargo build # Compilation
cargo clippy # Lint