Esempio n. 1
0
        /// <summary>
        /// Converts it back to its ust format.
        /// </summary>
        /// <returns></returns>
        public List <string> ToStringList()
        {
            var ans = new List <string> {
                "[#VERSION]", Version, "[#SETTING]"
            };

            ans.AddRange(ProjectInfo.ToStringList("="));

            foreach (var Notes in TrackData)//adding notes for each track.
            {
                for (int i = 0; i < Notes.Count; i++)
                {
                    USTNote n = Notes[i];
                    string  s = "" + i;
                    while (s.Length < 4)
                    {
                        s = "0" + s;
                    }
                    ans.Add("[#" + s + "]");
                    foreach (var l in n.ToStringList())
                    {
                        ans.Add(l);
                    }
                }
                ans.Add("[#TRACKEND]");
            }
            return(ans);
        }
Esempio n. 2
0
 /// <summary>
 /// Deep copy constructor.
 /// </summary>
 /// <param name="another"></param>
 public USTNote(USTNote another)
     : this(another.ToStringList())
 {
     //giving up....
     //this.attributes = new DictionaryDataObject(another.attributes);
     //this.Envelope = new Envelope(another.Envelope);
     //if (another.Portamento != null) this.Portamento = new Portamento(another.Portamento);
     //if (another.Vibrato != null) this.Vibrato = new Vibrato(another.Vibrato);
 }
Esempio n. 3
0
 /// <summary>
 /// Deep copy constructor.
 /// </summary>
 /// <param name="another"></param>
 public USTNote(USTNote another)
     : this(another.ToStringList())
 {
     //TODO: implement this more efficiently
     //this.attributes = new DictionaryDataObject(another.attributes);
     //this.Envelope = new Envelope(another.Envelope);
     //if (another.Portamento != null) this.Portamento = new Portamento(another.Portamento);
     //if (another.Vibrato != null) this.Vibrato = new Vibrato(another.Vibrato);
 }