The task is to define a function in a C# file. The C# file should be buildable by the CodeLab plugin of Paint.Net. See here for more info on CodeLab and Paint.Net.
http://www.freelancer.com/projects/NET-Windows/Simple-Plug-for-Paint-Net.html
The mentioned function should take a "note" structure (see below), overtone count, a line width (in pixels), distance (or "gap") between the first two tones (in pixels), and Color (as [login to view URL]) understands it.
Here's a prototype for the desired draw function:
void Draw(Note note, int overtoneCount, int lineWidth, int firstGap, Color color);
enum Letter
{
C, D, E, F, G, A, B;
}
struct Note
{
Letter letter;
int octave;
int semitoneOffset; // like -1 would mean "flat" and "1" would mean "sharp"
}
Attached is a simple example of what I think it would probably look like.
Here's some more info on overtones, you should grab the formula from there. Make sure to translate the [login to view URL] into the right frequency (even given the semitone offset). Use the most typical tuning schema that exists for Western music.
[login to view URL]
Frequency Order Name 1 Name 2 Name 3
1 · f = 440 Hz n = 1 fundamental tone 1st harmonic 1st partial
2 · f = 880 Hz n = 2 1st overtone 2nd harmonic 2nd partial
3 · f = 1320 Hz n = 3 2nd overtone 3rd harmonic 3rd partial
4 · f = 1760 Hz n = 4 3rd overtone 4th harmonic 4th partial
Include a sample so that the function is actually exercised when the CodeLab filter is applied from [login to view URL] itself. Middle-C would be fine. You might even include an example that included two overtone stacks (like one for middle-C and one for G in the same octave) of different colors (say the Primary and Secondary color from the [login to view URL] environment) :)
Thanks!