Exemple #1
0
        public override Song Render()
        {
            var song = new Song("test.ogg");

            song.AddMeasure(1000);             // Empty lead-in time
            song.AddMeasure(2000);             // Measure

            song.AddPaletteChange(0, 0);

            var segment = new Segment();

            segment.AddLight(headerLayout.GetPositionLight(0, 0), 0, 1, 0x101010, 0x000000);
            song.AddSegment(segment, 0, 1, 1, 1);

            return(song);
        }
Exemple #2
0
        public override Song Render()
        {
            var song = new Song("hello.ogg");

            song.AddMeasure(32449);

            var hello = GetHello();

            song.AddSegment(hello, 0, hello.MaxTime(), 0, 1);
            return(song);
        }
Exemple #3
0
    void GenerateSong()
    {
        theoryMan = new TheoryManager();
        theoryMan.AddScale(key, feeling);
        Scale theoryScale = theoryMan.ManagedScale [0];

        theoryMan.CreateDiatonicChords(theoryScale);
        for (int i = 0; i < measures; i++)
        {
            GenerateChords(theoryScale);
            GenerateNotes(theoryScale);
            newSong.AddMeasure(workingMeasure);
            workingMeasure = null;
        }
    }
    void GetSongData(Song s)
    {
        song = new Song(s.title, s.measures.Length);
        Debug.Log(s.GetNoteCount());

        for (int i = 0; i < s.measures.Length; i++)
        {
            song.AddMeasure(s.measures[i]);

            for (int j = 0; j < s.measures[i].notes.Length; j++)
            {
                noteList.Add(s.measures[i].GetNote(j));
                Debug.Log(noteList[j]);
            }
        }
        return;
    }
Exemple #5
0
        public override Song Render()
        {
            var song = new Song("orchestra.ogg");

            song.AddMeasure(1000);             // Empty lead-in time
            song.AddMeasure(1220);             // Pickup
            song.AddMeasure(1890, 93);         // Measures
            // Beats appear quantized to 1/8

            // Lines (intro: 1; measures: 2)
            var lines = Lines();

            song.AddSegment(lines, 259, 382, 1, 1);
            song.AddSegment(lines, 0, 382, 2, 2, 4);
            song.AddPaletteChange(1, 0);
            song.AddPaletteChange(1, 2, 1);
            song.AddPaletteFade(4, 1000, 2);
            song.AddPaletteFade(6, 1000, 3);
            song.AddPaletteFade(8, 1000, 4);
            song.AddPaletteChange(10, 0);

            // BeatPattern (10)
            var beatPattern = BeatPattern(out int beatPatternTime);

            song.AddSegment(beatPattern, 0, beatPatternTime, 10, 15);

            // BeatCircles (25)
            var beatCircles = BeatCircles();

            song.AddSegment(beatCircles, 0, 15120, 25, 8);

            // Corners (33)
            var corners = Corners();

            song.AddSegment(corners, 0, 19, 33, 1, 12);
            song.AddPaletteChange(33, 0);
            song.AddPaletteFade(35, 1000, 1);
            song.AddPaletteFade(37, 1000, 2);
            song.AddPaletteFade(39, 1000, 3);
            song.AddPaletteFade(41, 1000, 4);
            song.AddPaletteFade(43, 1000, 5);
            song.AddPaletteChange(45, 0);

            // SquareCircles (45)
            var squareCircles = SquareCircles(out var squareCirclesTime);

            song.AddSegment(squareCircles, 100, 400, 45, 3);
            song.AddSegment(squareCircles, 0, 400, 48, 4, 2);
            song.AddPaletteChange(45, 0);
            new List <double> {
                0, 0.375, 0.75, 1.125, 1.5, 1.75, 2, 2.375, 2.75, 3.125, 3.5, 3.75, 4, 4.375, 4.75, 5, 5.375, 5.75, 6, 6.375, 6.75, 7, 7.375, 7.75, 8, 8.375, 8.75, 9, 9.375, 9.75, 10
            }.Skip(1).Select(x => x + 45).ForEach((x, index) => song.AddPaletteFade(x, 200, (index + 1) % 4));
            song.AddPaletteChange(56, 0);

            // BeatGrow (56)
            var beatGrow = BeatGrow();

            song.AddSegment(beatGrow, 0, 64, 56, 8);

            // Blinds (64)
            var blinds = Blinds();

            song.AddSegment(blinds, 0, 1440, 64, 6, 2);
            song.AddPaletteChange(64, 0);
            song.AddPaletteFade(68, 1000, 1);
            song.AddPaletteFade(72, 1000, 2);
            song.AddPaletteChange(76, 0);

            // Spiral (76)
            AddSpiral(song, 76);

            // BeatSquares (87)
            var beatSquares = BeatSquares();

            song.AddSegment(beatSquares, 0, 6400, 87, 8);

            // End (95)

            return(song);
        }
Exemple #6
0
		public override Song Render()
		{
			var song = new Song("popular.ogg");

			song.AddMeasure(1000); // Empty lead-in time
			song.AddMeasure(2424, 81); // Measures

			// PulseSquares (1)
			var pulseSquares = PulseSquares();
			song.AddSegment(pulseSquares, 0, 100, 1, 1, 4);
			song.AddPaletteChange(1, 0);
			song.AddPaletteChange(2, 1);
			song.AddPaletteChange(3, 2);
			song.AddPaletteChange(4, 3);
			song.AddPaletteChange(5, 0);

			// MoveSquares (5)
			var moveSquares = MoveSquares();
			song.AddSegment(moveSquares[0], 0, moveSquares[0].MaxTime(), 5, 1);
			song.AddSegment(moveSquares[1], 0, moveSquares[1].MaxTime(), 6, 1);
			song.AddSegment(moveSquares[1], moveSquares[1].MaxTime(), 0, 7, 1);
			song.AddSegment(moveSquares[0], moveSquares[0].MaxTime(), 0, 8, 1);
			song.AddSegment(moveSquares[0], 0, moveSquares[0].MaxTime(), 9, 1);
			song.AddSegment(moveSquares[1], 0, moveSquares[1].MaxTime(), 10, 1);
			song.AddSegment(moveSquares[1], moveSquares[1].MaxTime(), 0, 11, 1);
			song.AddSegment(moveSquares[0], moveSquares[0].MaxTime(), 0, 12, 1);
			song.AddPaletteChange(5, 0);
			song.AddPaletteFade(6, 1000, 1);
			song.AddPaletteFade(7, 1000, 2);
			song.AddPaletteFade(8, 1000, 3);
			song.AddPaletteFade(9, 1000, 4);
			song.AddPaletteFade(10, 1000, 5);
			song.AddPaletteFade(11, 1000, 6);
			song.AddPaletteFade(12, 1000, 7);
			song.AddPaletteChange(13, 0);

			// SyncSquares (13)
			var syncSquares = SyncSquares();
			song.AddSegment(syncSquares, 29588, 48980, 13, 8);

			// SineShine (21)
			var sineShine = SineShine();
			song.AddSegment(sineShine, 0, 1, 21, 1, 12);
			song.AddPaletteChange(21, 0);
			song.AddPaletteFade(25, 1000, 1);
			song.AddPaletteFade(29, 1000, 2);
			song.AddPaletteChange(33, 0);

			// Crowd (33)
			var crowd = Crowd();
			song.AddSegment(crowd, 0, 250 * 3, 33, 12);

			// Wavey (45)
			var wavey = Wavey();
			song.AddSegment(wavey, 0, 1, 45, 1, 8);
			song.AddPaletteChange(45, 0);
			song.AddPaletteFade(46, 500, 1);
			song.AddPaletteFade(47, 500, 2);
			song.AddPaletteFade(48, 500, 3);
			song.AddPaletteFade(49, 500, 4);
			song.AddPaletteFade(50, 500, 5);
			song.AddPaletteFade(51, 500, 6);
			song.AddPaletteFade(52, 500, 7);
			song.AddPaletteChange(53, 0);

			// RainbowSquare (53)
			var rainbowSquare = RainbowSquare();
			song.AddSegment(rainbowSquare, 0, 1000, 53, 1, 16);
			song.AddPaletteChange(53, 0);
			song.AddPaletteFade(57, 1000, 1);
			song.AddPaletteFade(61, 1000, 2);
			song.AddPaletteFade(65, 1000, 3);
			song.AddPaletteChange(69, 0);

			// Stairs (69)
			var stairs = Stairs();
			song.AddSegment(stairs, 0, 360, 69, 1, 13);
			song.AddPaletteChange(69, 0);
			song.AddPaletteFade(73, 1000, 1);
			song.AddPaletteFade(77, 1000, 2);
			song.AddPaletteChange(81.25, 81.5, 3);
			song.AddPaletteChange(82, 0);

			return song;
		}