From 12caf446b4d17ac845c036dc8574ec8a3bf98d12 Mon Sep 17 00:00:00 2001 From: RiffLord Date: Mon, 11 Jan 2021 19:13:35 +0100 Subject: [PATCH] Clean directory structure --- README.md | 15 +++++++++++---- ms.c => src/ms.c | 0 2 files changed, 11 insertions(+), 4 deletions(-) rename ms.c => src/ms.c (100%) diff --git a/README.md b/README.md index 5f51aee..1342a62 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # ms ms is a simple command line program which calculates musical note duration in milliseconds. The program is intended to work like a typical command, with the user specifying a mandatory BPM value (as an integer or double) -and two optional commands, one for a note value (whole note through two hundred fifty-sixth note) and one to +and two optional commands: one for a note value (whole note through two hundred fifty-sixth note) and one to specify that the note should be dotted. The syntax follows standard Linux commands with short and long options. Type ./ms --help or ./ms -? to view the full list of options. If only the BPM value is provided the program will calculate the duration of a standard quarter note. @@ -11,15 +11,22 @@ The purpose of this program is to provide a quick and easy reference to the dura note values, for example to set parameters of time-based effects such as reverb and delay so that the tails and echoes stay in sync with the tempo of one's composition (the greater your use of these effects the more this helps keep a clear mix). Although many time-based effects (especially VST plugins) have options -to sync to a track's tempo, sometimes you might want to fine tune to a specific amount. +to sync to a track's tempo, sometimes you might want to fine tune to a specific amount for finer control. ## Implementation The program calculates the duration of a note length with a function that accepts a BPM value and a measure subdivision as parameters. It then returns the result of the following calculation as a double value, rounded to 2 decimal points: -(60000 / BPM) / subdivision + -If no subdivision parameter is provided, it calculates a quarter note (or one beat) by default: (60000 / BPM). +If no subdivision parameter is provided, it calculates a quarter note (or one beat) by default: +
+ +
For shorter notes the subdivision parameter assumes values that are multiples of 2. For half and whole notes, subdivision assumes the value 0.5 and 0.25 respectively. diff --git a/ms.c b/src/ms.c similarity index 100% rename from ms.c rename to src/ms.c