Sync playback to the actual beat count rather than relying on BPM #5

Open
ratijas wants to merge 43 commits from ratijas/muzika-gromche:work/r/beats into master
1 changed files with 22 additions and 0 deletions
Showing only changes of commit 2df7d28d43 - Show all commits

View File

@ -263,6 +263,28 @@ namespace MuzikaGromche
}
return new Palette(colors);
}
public static Palette operator +(Palette before, Palette after)
{
return new Palette([.. before.Colors, .. after.Colors]);
}
public static Palette operator *(Palette palette, int repeat)
{
var colors = Enumerable.Repeat(palette.Colors, repeat).SelectMany(x => x).ToArray();
return new Palette(colors);
}
public Palette Stretch(int times)
{
var colors = Colors.SelectMany(color => Enumerable.Repeat(color, times)).ToArray();
return new Palette(colors);
}
public Palette Use(Func<Palette, Palette> op)
{
return op.Invoke(this);
}
}
public class Track