Exemplo n.º 1
0
        public JcfMedia LoadMedia(Model.SongInfo song)
        {
            string tracksPath = Path.Combine(dataDirectory, "Tracks");
            string songPath   = Path.Combine(dataDirectory, "Tracks", $"{song.Id}".ToUpper() + ".jcf");

            var result = new JcfMedia(song, songPath);

            // Load length
            var beatArray  = PropertyListParser.Parse(Path.Combine(songPath, "beats.plist")) as NSArray;
            var dictionary = beatArray[beatArray.Count - 1] as NSDictionary;
            var position   = dictionary.Double("position") ?? 0;

            result.Length = TimeSpan.FromSeconds(position);

            LoadTracks(result, songPath);

            LoadBeats(result, songPath);

            LoadSections(result, songPath);

            LoadScoreNodes(result, songPath);

            return(result);
        }
Exemplo n.º 2
0
 public static string PositionKey(Model.SongInfo song)
 {
     return($"Song/{song.Sku}/Position");
 }
Exemplo n.º 3
0
 public static string SoloTrackKey(Model.SongInfo song)
 {
     return($"Song/{song.Instrument}/SoloTrack");
 }
Exemplo n.º 4
0
 public static string MixerCollapsedKey(Model.SongInfo song)
 {
     return($"Song/{song.Sku}/MixerCollapsed");
 }
Exemplo n.º 5
0
 public static string SelectedScoreKey(Model.SongInfo song)
 {
     return($"Song/{song.Sku}/SelectedScore");
 }