Exemplo n.º 1
0
 public Exception MmlError(MmlInputSource input, int line, string msg)
 {
     return new MmlException (msg, new MmlLineInfo (input.File, line));
 }
 SmfMusic CompileMmlToSong(string mml)
 {
     var compiler = new MmlCompiler ();
     compiler.Resolver = new AssetOrUrlResolver (this);
     var midiStream = new MemoryStream ();
     var source = new MmlInputSource ("", new StringReader (mml));
     compiler.Compile (false, Enumerable.Repeat (source, 1).ToArray (), null, midiStream, false);
     return SmfMusic.Read (new MemoryStream (midiStream.ToArray ()));
 }