public SongWindow(SongMeta meta) { _song = SongLoader.Load(meta); InitializeComponent(); Text = $"Score: {meta.Artist} - {meta.Name} [{meta.Instrument}]"; albumArtwork.Image = _song.GetCover(); score1.SetSong(_song); _player = _song.GetSongPlayer(); for (int x = 0; x < _player.Channels; x++) { AddFader(x); } seekBar1.Samples = (long)(_player.Length.TotalSeconds * 44100.0 + 0.5); seekBar1.OnSliderDrop += i => _player.Position = TimeSpan.FromSeconds(i); _timer = new Timer(); _timer.Interval = 30; _timer.Tick += TimerTick; _timer.Start(); waveform1.WaveData = _song.GetWaveform(); waveform1.Sections = _song.Sections; waveform1.Beats = _song.Beats; waveform1.Looper.OnLoop += d => _player.Position = TimeSpan.FromSeconds(d); }