Esempio n. 1
0
        private IEnumerable <double> GenerateSoundData(Tune tune)
        {
            if (tune == null)
            {
                throw new ArgumentNullException();
            }

            double period = ComputePeriod(tune.Tempo ?? 120);

            foreach (var tuneElement in tune.TuneElementList)
            {
                foreach (var item in GenerateSoundData(tuneElement, period))
                {
                    yield return(item);
                }
            }
        }
Esempio n. 2
0
        private void PutCharInternal(char c, int position)
        {
            var index = nokiaComposerTuneElementList.GetIndexElementAtStringPosition(position);

            if (index < 0)
            {
                index = 0;
            }

            if (c >= '0' && c <= '7')
            {
                InsertNewTuneElement(c, index);
            }
            else
            {
                index = Math.Min(index, nokiaComposerTuneElementList.Count - 1);
                EditExistingTuneElement(c, index);
            }

            var tune = new Tune(nokiaComposerTuneElementList.Select(s => s.TuneElement).ToList());

            Partition = nokiaComposerConverter.ToString(tune);
        }
Esempio n. 3
0
 public Stream ToneToMp3Stream(Tune tune)
 {
     return(null);
 }