|
|
|
@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
|
|
|
|
|
using System; |
|
|
|
|
|
|
|
|
|
using System.Reflection; |
|
|
|
|
using Melanchall.DryWetMidi.Common; |
|
|
|
|
|
|
|
|
|
using SBRL.Utilities; |
|
|
|
@ -13,6 +13,7 @@ namespace MusicBoxConverter
@@ -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
@@ -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
@@ -62,8 +72,9 @@ namespace MusicBoxConverter
|
|
|
|
|
MusicBoxScoreGenerator converter = new MusicBoxScoreGenerator( |
|
|
|
|
inputFilename, |
|
|
|
|
MusicBox.Note30 |
|
|
|
|
); |
|
|
|
|
converter.Debug = debug; |
|
|
|
|
) { |
|
|
|
|
Debug = debug |
|
|
|
|
}; |
|
|
|
|
converter.Output(outputFilename); |
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|
|