Skip to content

Latest commit

 

History

History
92 lines (74 loc) · 4.64 KB

README.md

File metadata and controls

92 lines (74 loc) · 4.64 KB

Contributors Forks Stargazers Issues MIT License

convertNoteToMidi

convertNoteToMidi is a useful C library that converts any single musical note value and octave to a midi note. I created it to create a simple means to integrate string-based musical notes in my C based musical projects. This library could be useful for anyone needing to type note values like C#, Bb, or D into your C programs and need to get a precise midi note.

char *note = "G#";
int octave = -2;
int test = convertNoteToMidi(note, octave);
printf("The midi value of %s at octave %i is: %i\n", note, octave, test);
The midi value of G# at octave -2 is: 8

Built With

  • Clang

Installation

  1. Download this repo to your local drive.
  2. Open a terminal.
  3. Navigate in your terminal to the folder containing this repo.

Usage

  1. First, run make convertNoteToMidi.
  2. Second, execute ./main. Oogle at the output.
  3. Third, open main.c and modify the note and octave to your liking.
  4. Fourth, run make convertNoteToMidi again.
  5. Fifth, execute ./main again and see the output.
  6. Finally, modify main.c for your use. Make sure you look at the text of the Makefile so you understand how to bring in external libraries into your own C program.

Contributing

Your contributions to this project are very much appreciated. If you would like to help make this project better, fork to repo and create a pull request. Alternatively, you can open an issue with the tag "request." Please star this project!

  1. Fork the Project and make a branch with your feature (git checkout -b feature/myFeature).
  2. Commit your Changes (git commit -m 'Added myFeature').
  3. Push to the Branch (git push origin feature/myFeature).
  4. Open a Pull Request.

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

www.gelvinwhite.com