Esempio n. 1
0
        public void RiffResolutionTest()
        {
            const int feel          = 4;
            var       timeSignature = new TimeSignature(8, 4);
            var       songInfo      = new SongInfo(timeSignature, feel);
            var       groove        = GrooveGenerator.GenerateGroove(songInfo);

            WriteRhythm("Original groove", groove.Beats, timeSignature.BeatCount, feel);

            for (var i = 1; i <= 10; i++)
            {
                var res       = 4.0 / i;
                var riffBeats = RiffGenerator.Rhythm(timeSignature, groove.Beats.ToList(), res, feel);
                WriteRhythm(string.Format("{0:0}% resolution", res * 100), riffBeats, timeSignature.BeatCount, feel);
            }
        }
Esempio n. 2
0
        internal SongSection(SongInfo songInfo, SectionType type, ChordProgression chordProgression)
        {
            Type      = type;
            _songInfo = songInfo;

            _measures  = songInfo.Parameters.MeasuresPerSection(type);
            Chords     = GetChordProgression(songInfo.Parameters.GuitarTuning.Pitches[0], chordProgression);
            _repeats   = songInfo.Parameters.RepeatsPerSection(type, _measures);
            Lead       = SoloLeadGenerator.GetSoloLead(_songInfo, _measures * _songInfo.TimeSignature.BeatCount, Chords);
            _drumstyle = songInfo.Parameters.DrumStyle(Type);
            var groove = GetGroove();

            _drumstyle.Generate(groove);
            var riff = RiffGenerator.Rhythm(songInfo.TimeSignature, groove.Beats.ToList(), songInfo.Parameters.RiffResolutionFunc(type), songInfo.Feel).ToList();

            _strummer = new RiffStrummer(riff);
        }