Ejemplo n.º 1
0
        private void ControlButton_Click(object sender, System.EventArgs e)
        {
            TrackInfo trackInfo = NowSoundTrackAPI.Info(_trackId);

            if (!trackInfo.IsTrackLooping)
            {
                NowSoundTrackAPI.FinishRecording(_trackId);
                _muteButton.Enabled = true;
            }
            else
            {
                _trackRowPanel.Parent.Controls.Remove(_trackRowPanel);
                _removeAction(_trackId);
                NowSoundGraphAPI.DeleteTrack(_trackId);
            }
        }
Ejemplo n.º 2
0
        public void Update()
        {
            TrackInfo          trackInfo  = NowSoundTrackAPI.Info(_trackId);
            NowSoundSignalInfo signalInfo = NowSoundTrackAPI.SignalInfo(_trackId);

            NowSoundTrackAPI.GetFrequencies(_trackId, _fftBuffer);
            Utilities.RenderFrequencyBuffer(_fftBuffer, _builder);

            _label.Text = $"Track {_trackId}: start {trackInfo.StartTimeInBeats}, duration {trackInfo.DurationInBeats}, current {trackInfo.LocalClockBeat}, "
                          + $"maxsignal {signalInfo.Max:F4}, avgsignal {signalInfo.Avg:F4}, fft {_builder.ToString()}";

            if (trackInfo.IsTrackLooping)
            {
                _controlButton.Text = "Delete";
            }
            else
            {
                _controlButton.Text = "Finish";
            }
        }