-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.c
33 lines (30 loc) · 830 Bytes
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// main.c
// A test program for convertNoteToMidi C library
//
// v1.0
//
// G. Elvin White
// 22 November 2022
//
// Installation: Place convertNoteToMidi.h,
// convertNotetoMidi.c, and Makefile in the same directory as
// main.c. Notice the include statement modeled below. Then,
// run 'make convertNotetoMidi'. Examine the Makefile for
// the necessary compiling steps.
//
// Copyright (c) G. Elvin White, 2022. All rights reserved.
// Distributed under MIT License
//
// Includes
#include "convertNoteToMidi.h"
#include <stdio.h>
#include <string.h>
// Main Function
int main(void)
{
// An example usage of convertNoteToMidi with G# at octave -2
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);
}