Skip to content

aelishRollo/chord-function-api

Repository files navigation

I've loved solving complex problems since I was a child. This love grew through my studies in Electrical Engineering, and now, as a full-stack developer, I enjoy creating and maintaining intuitive applications for music composition software

See my website for more information!

Chord Function API

Welcome to the Chord Function API! This API allows you to determine the chord function based on the key center, chord root, and chord quality.

How to Use

To use the API, make a POST request to the following URL:

https://chord-function-calculator-03b3fc20902a.herokuapp.com/API/:keyCenter/:chordRoot/:quality

Parameters

  • :keyCenter - The key center (e.g., C, G, D#)
  • :chordRoot - The root of the chord (e.g., C, G, D#)
  • :quality - The quality of the chord (e.g., Major, Major7, Minor)

Example

To get the chord function for a G Major7 chord in the key of C, you would make the following request:

POST https://chord-function-calculator-03b3fc20902a.herokuapp.com/API/C/G/Major7

Response

The response will be a JSON object containing the chord function:

{
    "chordFunction": "VIMajor7"
}

Testing the API

You can test the API using a tool like Postman or cURL.

Using cURL

curl -X POST https://chord-function-calculator-03b3fc20902a.herokuapp.com/API/C/G/Major7

Technologies

Optimizations

I plan to extend the scope of the currently existing testing and to make the error handling more robust:

This includes unit tests for chord calculations and input validation, integration tests for API endpoints and error responses, and performance tests to ensure quick response times. I will standardize error messages, and validate inputs thoroughly.

Future improvements include supporting more chord extended chords, optimizing scalability, providing comprehensive documentation, and enhancing security measures.

Lessons Learned:

I saw firsthand the value of test-driven-development! It greatly increased my development velocity as well as my confidence in the stability of my code.

I also learned that building an API is a lot more fun than I had imagined. I thought I'd like it but it was actually very enjoyable!

Finally, I learned about best practices for standardizing the way chords are represented in code.

Connect

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published