// Rate creates a new ugen at a specific rate.
// If rate is an unsupported value this method will cause a runtime panic.
// If the input signal is nil this method will panic.
760709
func (r RunningSum) Rate(rate int8) Input {
	CheckRate(rate)
	if r.In == nil {
		panic("RunningSum requires an input signal")
	}
	(&r).defaults()
	return NewInput("RunningSum", rate, 0, 1, r.In, r.NumSamp)
}
1098108
func (hpf HPF) Rate(rate int8) Input {
	if hpf.In == nil {
		panic("HPF expects In to not be nil")
	}
	CheckRate(rate)
	(&hpf).defaults()
	return NewInput("HPF", rate, 0, 1, hpf.In, hpf.Freq)
}
534006
func (pan PanB2) Rate(rate int8) Input {
	CheckRate(rate)
	if pan.In == nil {
		panic("PanB2 requires an input")
	}
	(&pan).defaults()
	return NewInput("PanB2", rate, 0, 3, pan.In, pan.Azimuth, pan.Gain)

}
1320119
func (pan Pan4) Rate(rate int8) Input {
	CheckRate(rate)
	if pan.In == nil {
		panic("Pan4 requires an input")
	}
	(&pan).defaults()
	in := NewInput("Pan4", rate, 0, 1, pan.In, pan.XPos, pan.YPos, pan.Level)
	return Multi(in, in, in, in)

}
718453
func (ds DetectSilence) Rate(rate int8) Input {
	if ds.In == nil {
		panic("DetectSilence expects In to not be nil")
	}
	CheckRate(rate)
	(&ds).defaults()
	return NewInput("DetectSilence", rate, 0, 1, ds.In, ds.Amp, ds.Time, C(float32(ds.Done)))
}
755252
func (s Silent) Rate(rate int8) Input {
	CheckRate(rate)
	(&s).defaults()
	return NewInput("DC", rate, 0, s.NumChannels, C(0))
}
1207391
func (m Median) Rate(rate int8) Input {
	CheckRate(rate)
	if m.In == nil {
		panic("Median requires an input signal")
	}
	(&m).defaults()
	return NewInput("Median", rate, 0, 1, m.Length, m.In)
}
204367
func (s SyncSaw) Rate(rate int8) Input {
	CheckRate(rate)
	(&s).defaults()
	return NewInput("SyncSaw", rate, 0, 1, s.SyncFreq, s.SawFreq)
}
507441
func (a *StandardEWMA) Rate() float64 {
	a.mutex.Lock()
	defer a.mutex.Unlock()
	return a.rate * float64(1e9)
}
103526
func (pulse Pulse) Rate(rate int8) Input {
	CheckRate(rate)
	(&pulse).defaults()
	return NewInput("Pulse", rate, 0, 1, pulse.Freq, pulse.Width)
}
405646
func (s *Sample) Rate() int64 {
	return int64(float64(s.JobMsgCnt) / s.Duration().Seconds())
}
831449
func (blip Blip) Rate(rate int8) Input {
	CheckRate(rate)
	(&blip).defaults()
	return NewInput("Blip", rate, 0, 1, blip.Freq, blip.Harm)
}
1308135
func (ldc LeakDC) Rate(rate int8) Input {
	CheckRate(rate)
	if ldc.In == nil {
		panic("LeakDC requires an input signal")
	}
	ldc.rate = rate
	(&ldc).defaults()
	return NewInput("LeakDC", rate, 0, 1, ldc.In, ldc.Coeff)
}
461289
func (b Spring) Rate(rate int8) Input {
	CheckRate(rate)
	(&b).defaults()
	return NewInput("Spring", rate, 0, 1, b.In, b.Spring, b.Damp)
}
553689
func (pink PinkNoise) Rate(rate int8) Input {
	CheckRate(rate)
	return NewInput("PinkNoise", rate, 0, 1)
}
366414
func (decay2 Decay2) Rate(rate int8) Input {
	CheckRate(rate)
	if decay2.In == nil {
		panic("Decay2 expects In to not be nil")
	}
	(&decay2).defaults()
	return NewInput("Decay2", rate, 0, 1, decay2.In, decay2.Attack, decay2.Decay)
}
326276
func (lfnoise LFNoise) Rate(rate int8) Input {
	CheckRate(rate)
	(&lfnoise).defaults()
	switch lfnoise.Interpolation {
	case NoiseStep:
		return NewInput("LFNoise0", rate, 0, 1, lfnoise.Freq)
	case NoiseLinear:
		return NewInput("LFNoise1", rate, 0, 1, lfnoise.Freq)
	case NoiseQuadratic:
		return NewInput("LFNoise2", rate, 0, 1, lfnoise.Freq)
	default:
		panic(fmt.Sprintf("Unknown Interpolation value for LFNoise: %d", lfnoise.Interpolation))
	}
}