// Rate creates a new ugen at a specific rate.
// If rate is an unsupported value this method will cause
// a runtime panic.
553689
func (pink PinkNoise) Rate(rate int8) Input {
	CheckRate(rate)
	return NewInput("PinkNoise", rate, 0, 1)
}
462907
func (out OffsetOut) Rate(rate int8) Input {
	CheckRate(rate)
	return NewInput("OffsetOut", rate, 0, 1, out.Bus, out.Channels)
}
77892
func (xline XLine) Rate(rate int8) Input {
	CheckRate(rate)
	(&xline).defaults()
	return NewInput("XLine", rate, 0, 1, xline.Start, xline.End, xline.Dur, C(float32(xline.Done)))
}
18168
func (in In) Rate(rate int8) Input {
	CheckRate(rate)
	(&in).defaults()

	var (
		uin = NewInput("In", rate, 0, in.NumChannels, in.Bus)
		ins = make([]Input, in.NumChannels)
	)
	for i := range ins {
		ins[i] = uin
	}
	return Multi(ins...)
}
995244
func (ifft IFFT) Rate(rate int8) Input {
	CheckRate(rate)
	(&ifft).defaults()
	return NewInput("IFFT", rate, 0, 1, ifft.Buffer, ifft.WinType, ifft.WinSize)
}
1109360
func (saw Saw) Rate(rate int8) Input {
	CheckRate(rate)
	(&saw).defaults()
	return NewInput("Saw", rate, 0, 1, saw.Freq)
}
1109943
func (lfdn LFDNoise) Rate(rate int8) Input {
	CheckRate(rate)
	(&lfdn).defaults()
	switch lfdn.Interpolation {
	case InterpolationNone:
		return NewInput("LFDNoise0", rate, 0, 1, lfdn.Freq)
	case InterpolationLinear:
		return NewInput("LFDNoise1", rate, 0, 1, lfdn.Freq)
	case InterpolationCubic:
		return NewInput("LFDNoise3", rate, 0, 1, lfdn.Freq)
	default:
		panic("unknown interpolation value")
	}
}
451946
func (v Vibrato) Rate(rate int8) Input {
	CheckRate(rate)
	(&v).defaults()
	return NewInput("Vibrato", rate, 0, 1, v.Freq, v.Speed, v.Depth, v.Delay, v.Onset, v.RateVariation, v.DepthVariation, v.IPhase)
}
208279
func (dust2 Dust2) Rate(rate int8) Input {
	CheckRate(rate)
	(&dust2).defaults()
	return NewInput("Dust2", rate, 0, 1, dust2.Density)
}
380866
func (l LFClipNoise) Rate(rate int8) Input {
	CheckRate(rate)
	(&l).defaults()
	return NewInput("LFClipNoise", rate, 0, 1, l.Freq)
}
689585
func (k Klang) Rate(rate int8) Input {
	CheckRate(rate)
	(&k).defaults()

	specs := getArraySpecInputs(k.Spec)

	if len(specs) == 1 {
		ins := append(specs[0].inputs(false), k.FreqScale, k.FreqOffset)
		return NewInput("Klang", rate, 0, 1, ins...)
	}
	var klangs []Input
	for _, spec := range specs {
		ins := append(spec.inputs(false), k.FreqScale, k.FreqOffset)
		klangs = append(klangs, NewInput("Klang", rate, 0, 1, ins...))
	}
	return Multi(klangs...)
}
630937
func (m MouseY) Rate(rate int8) Input {
	CheckRate(rate)
	(&m).defaults()
	return NewInput("MouseY", rate, 0, 1, m.Min, m.Max, m.Warp, m.Lag)
}
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)
}
1224734
func (bal Balance2) Rate(rate int8) Input {
	if bal.L == nil || bal.R == nil {
		panic("Balance2 expects L and R to not be nil")
	}
	CheckRate(rate)
	(&bal).defaults()
	return NewInput("Balance2", rate, 0, 2, bal.L, bal.R, bal.Pos, bal.Level)
}
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)
}
1270102
func (s SampleDur) Rate(rate int8) Input {
	if rate != IR {
		panic("SampleDur only supports IR")
	}
	return NewInput("SampleDur", rate, 0, 1)
}
1156516
func (formlet Formlet) Rate(rate int8) Input {
	CheckRate(rate)
	if formlet.In == nil {
		panic("Formlet expects In to not be nil")
	}
	(&formlet).defaults()
	return NewInput("Formlet", rate, 0, 1, formlet.In, formlet.Freq, formlet.AttackTime, formlet.DecayTime)
}