Beispiel #1
0
        public Song(AudioUnit.AUGraph graph, int ioNode)
        {
            this.ins = new ArrangementInstruments(r, graph, ioNode);



            verse = new Section(r, ins);

            var verseNotes = Chord.Diminished7.GetNotes(verse.Progression.KeyTonic).ToList();
            var verseKey   = verse.Progression.KeyTonic;
            var chorusKey  = PickRandom(verseNotes);

            while (chorusKey == verseKey)
            {
                chorusKey = PickRandom(verseNotes);
            }
            chorusKey += 12 * (r.Next(2) - 1);              // Compensate for always going up on the scale
            var bridgeKey = PickRandom(verseNotes);

            while (bridgeKey == verseKey || bridgeKey == chorusKey)
            {
                bridgeKey = PickRandom(verseNotes);
            }
            bridgeKey += 12 * (r.Next(2) - 1);              // Compensate for always going up on the scale

            chorus = new Section(r, ins, new ChordProgression(r, verse.Progression.Bpm, chorusKey, verse.Progression.EndVel, -1), verse.Melody.OctaveShift);
            bridge = new Section(r, ins, new ChordProgression(r, verse.Progression.Bpm, bridgeKey, chorus.Progression.EndVel, verse.Progression.EndVel), verse.Melody.OctaveShift);
        }
Beispiel #2
0
 public Section(Random r, ArrangementInstruments ins, ChordProgression prog, int melodyOctave)
 {
     this.ins    = ins;
     Progression = prog;
     Melody      = new Melody(Progression, r, melodyOctave);
     Bassline    = new Bassline(Progression, r);
     Percussion  = new PercussionLine(Progression, r);
 }
Beispiel #3
0
 public Section(Random r, ArrangementInstruments ins)
     : this(r, ins, new ChordProgression(r), Melody.PickOctave(r))
 {
 }