Skip to content

Commit

Permalink
autoformat correction
Browse files Browse the repository at this point in the history
  • Loading branch information
thelowsunoverthemoon committed Jan 12, 2024
1 parent 0165bb2 commit 1b7e5f6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
3 changes: 2 additions & 1 deletion ex/chart.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
C1 D1 E1 F1 G1 A1 B1 C2
*/

int main(void)
int
main(void)
{
struct mah_note sc_notes[8];
struct mah_scale scale = mah_get_scale(
Expand Down
8 changes: 5 additions & 3 deletions ex/fifth.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@

void gen_circle_fifths(struct mah_note buf[], int iter);

int main(void)
int
main(void)
{

struct mah_note buf[GEN_SIZE];
Expand All @@ -35,11 +36,12 @@ int main(void)
}
}

void gen_circle_fifths(struct mah_note buf[], int iter)
void
gen_circle_fifths(struct mah_note buf[], int iter)
{
struct mah_note prev = (struct mah_note) { MAH_C, MAH_NATURAL, 0 };
buf[0] = prev;

buf[0] = prev;
for (int i = 1; i < iter; i++)
{
buf[i] = prev = mah_get_inter(prev, (struct mah_interval) { 5, MAH_PERFECT }, NULL);
Expand Down
6 changes: 4 additions & 2 deletions ex/trans.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

void transpose(struct mah_note mel[], struct mah_note buf[], int size, struct mah_interval inter);

int main(void)
int
main(void)
{
struct mah_note mel[] = {
{ MAH_C, MAH_NATURAL, 3 },
Expand All @@ -29,7 +30,8 @@ int main(void)
}
}

void transpose(struct mah_note* mel, struct mah_note* buf, int size, struct mah_interval inter)
void
transpose(struct mah_note* mel, struct mah_note* buf, int size, struct mah_interval inter)
{
for (int i = 0; i < size; i++)
{
Expand Down
4 changes: 2 additions & 2 deletions src/chord/chord.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ mah_get_chord(
for (int i = 1; i < type->size; i++)
{
enum mah_error inter_err = MAH_ERROR_NONE;
notes[i] = base[i] =
mah_get_inter(notes[i - 1], type->steps[i - 1], &inter_err); // - 1 b/c interval starts at note before

notes[i] = base[i] = mah_get_inter(notes[i - 1], type->steps[i - 1], &inter_err); // - 1 b/c starts at prev note
if (inter_err != MAH_ERROR_NONE)
{
RETURN_EMPTY_STRUCT_ERR(mah_chord, inter_err);
Expand Down

0 comments on commit 1b7e5f6

Please sign in to comment.