Exemple #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 ()));
 }
Exemple #3
0
 public MmlInputSourceReader(MmlCompiler compiler)
 {
     this.compiler = compiler;
 }
Exemple #4
0
 public static void Main(string [] args)
 {
     var p = new MmlCompiler ();
     p.Compile (args);
 }