private void SetTime(TimeSpan time)
{
int _stime = SynthHelper.getSampleFromTime(synth.SampleRate, (float)time.TotalSeconds);
if (_stime > sampleTime)
{
SilentProcess(_stime - sampleTime);
}
else if (_stime < sampleTime)
{//we have to restart the midi to make sure we get the right temp, instrument, etc
synth.Stop();
Array.Clear(currentPrograms, 0, currentPrograms.Length);
ResetControllers();
_MidiFile.BeatsPerMinute = 120;
SilentProcess(_stime);
}
}