Finally identify what every note is for real!

This commit is contained in:
Starbeamrainbowlabs 2019-02-22 00:34:17 +00:00
parent 5c81eabebe
commit eeb11e1bf7
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
3 changed files with 68 additions and 5 deletions

View file

@ -62,6 +62,57 @@ namespace MusicBoxConverter
//return string.Format("[MusicBox: Name={0}, ValidNotes={1}]", Name, ValidNotes);
}
/*
* Real Life Music Box Printed
*
*
* Middle C4 G
* D4 A
* E4 B
* F4 C
* G4 D
* A5 E
*
* A#5 F
* B5 F#
* C G
* D A
*
*
*
*
* F#3
* G3
* C4
* D4
* E4
* F4
* G4
* A5
* A#5
* B5
* C5
* C#5
* D5
* D#5
* E5
* F5
* F#5
* G5
* G#5
* A6
* A#6
* B6
* C6
* C#6
* D6
* D#6
* E6
* F6
* G6
* A7
*/
/// <summary>
/// A 30 note music box.
/// @Starbeamrainbowlabs has one of these - it was the part of the

View file

@ -72,12 +72,13 @@ namespace MusicBoxConverter
);
svg.UnitSuffix = "mm";
for(float i = 0; i < area.Y; i += ScaleFactor.Y)
{
// Draw the note lines
for(float i = 0; i < area.Y; i += ScaleFactor.Y) {
Vector2 start = Offset.Add(new Vector2(0, i));
svg.WriteLine(start, start.Add(new Vector2(area.X, 0)), "darkgreen", 0.75f);
}
// Draw a red box around everything
svg.WriteRectangle(Offset, area, "red", 0.75f);
foreach(Note note in AllNotes())

View file

@ -1,5 +1,5 @@
using System;
using System.Reflection;
using Melanchall.DryWetMidi.Common;
using SBRL.Utilities;
@ -13,6 +13,7 @@ namespace MusicBoxConverter
string inputFilename = "";
string outputFilename = "";
bool debug = false;
MusicBox targetMusicBox = MusicBox.Note30;
for(int i = 0; i < args.Length; i++)
{
@ -39,6 +40,15 @@ namespace MusicBoxConverter
debug = true;
break;
case "--box":
targetMusicBox = (MusicBox)typeof(MusicBox).GetField(
args[++i],
BindingFlags.GetField |
BindingFlags.Static |
BindingFlags.Public
).GetValue(null);
break;
case "-h":
case "--help":
Console.Error.WriteLine(EmbeddedFiles.ReadAllText("MusicBoxConverter.Help.txt"));
@ -62,8 +72,9 @@ namespace MusicBoxConverter
MusicBoxScoreGenerator converter = new MusicBoxScoreGenerator(
inputFilename,
MusicBox.Note30
);
converter.Debug = debug;
) {
Debug = debug
};
converter.Output(outputFilename);
return 0;