Exemplo n.º 1
0
 public static MmlTokenizerSource Parse(MmlCompiler compiler, IList<MmlInputSource> inputs)
 {
     var r = new MmlInputSourceReader (compiler);
     r.Process (inputs);
     return r.result;
 }
 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 ()));
 }
Exemplo n.º 3
0
 public MmlInputSourceReader(MmlCompiler compiler)
 {
     this.compiler = compiler;
 }
Exemplo n.º 4
0
 public static void Main(string [] args)
 {
     var p = new MmlCompiler ();
     p.Compile (args);
 }