Skip to content

mediatorviolet/bass-triad-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bass Triad API

API REST pour les triades de basse.

Utilisation

cargo run

Serveur: http://127.0.0.1:3000

Endpoint

GET /api/triad?root=C&type=major

Paramètres

  • root: Note fondamentale (A-G, avec # ou b)
  • type: Type de triade (major, minor, diminished, augmented)

Réponse

{
    "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"
        }
    ]
}

Développement

cargo test      # Tests unitaires
cargo build    # Compilation
cargo clippy   # Lint

About

API REST pour les triades de basse

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages