public ActionResult GetChord() { Note chord = new Note(); return Json(chord, JsonRequestBehavior.AllowGet); }
public JsonResult TabulateSong(Song song) { Tabulator.Tabulator tab = new SimpleTabulator(); Song s = new Song(); foreach (var page in song.Pages) { Page p = new Page(); p.Measures = new List<Measure>(); foreach (var measure in page.Measures) { Measure m = new Measure(); foreach (var note in measure.Notes) { Note n = new Note(); n.Beat = note.Beat; foreach (var tone in note.Tones) { n.Tones.Add(tone); n.TabTones.Add(tab.getTabNote(tone)); } m.Notes.Add(n); } p.Measures.Add(m); } s.Pages.Add(p); } Composition c = new Composition(); song.getMetaData(c); s.setMetaData(c); foreach (var p in s.Pages) { while (p.Measures.Count() < 28) { p.Measures.Add(new Measure()); } } return Json(s, JsonRequestBehavior.AllowGet); }