// 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 then this method will cause a runtime panic.
172243
func (hasher Hasher) Rate(rate int8) Input {
	CheckRate(rate)
	if hasher.In == nil {
		panic("Hasher requires an input signal")
	}
	return NewInput("Hasher", rate, 0, 1, hasher.In)
}
1005216
func (envgen EnvGen) Rate(rate int8) Input {
	CheckRate(rate)
	(&envgen).defaults()
	ins := []Input{
		envgen.Gate,
		envgen.LevelScale,
		envgen.LevelBias,
		envgen.TimeScale,
		C(float32(envgen.Done)),
	}
	ins = append(ins, envgen.Env.Inputs()...)
	return NewInput("EnvGen", rate, 0, 1, ins...)
}
1109360
func (saw Saw) Rate(rate int8) Input {
	CheckRate(rate)
	(&saw).defaults()
	return NewInput("Saw", rate, 0, 1, saw.Freq)
}
702947
func (t ToggleFF) Rate(rate int8) Input {
	CheckRate(rate)
	(&t).defaults()
	return NewInput("ToggleFF", rate, 0, 1, t.Trig)
}
1097622
func (l LFPar) Rate(rate int8) Input {
	CheckRate(rate)
	(&l).defaults()
	return NewInput("LFPar", rate, 0, 1, l.Freq, l.IPhase)
}
926122
func (lfsaw LFSaw) Rate(rate int8) Input {
	CheckRate(rate)
	(&lfsaw).defaults()
	return NewInput("LFSaw", rate, 0, 1, lfsaw.Freq, lfsaw.Iphase)
}
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)
}
620136
func (l Latch) Rate(rate int8) Input {
	CheckRate(rate)
	if l.In == nil {
		panic("Latch requires an input signal")
	}
	if l.Trig == nil {
		panic("Latch requires an trig signal")
	}
	return NewInput("Latch", rate, 0, 1, l.In, l.Trig)
}
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...)
}
755252
func (s Silent) Rate(rate int8) Input {
	CheckRate(rate)
	(&s).defaults()
	return NewInput("DC", rate, 0, s.NumChannels, C(0))
}
180200
func (lftri LFTri) Rate(rate int8) Input {
	CheckRate(rate)
	(&lftri).defaults()
	return NewInput("LFTri", rate, 0, 1, lftri.Freq, lftri.Iphase)
}
120545
func (g Gendy3) Rate(rate int8) Input {
	CheckRate(rate)
	(&g).defaults()
	return NewInput("Gendy3", rate, 0, 1, g.AmpDist, g.DurDist, g.ADParam, g.DDParam, g.Freq, g.AmpScale, g.DurScale, g.InitCPs, g.KNum)
}
390276
func (gv GVerb) Rate(rate int8) Input {
	CheckRate(rate)
	if gv.In == nil {
		panic("GVerb expects In to not be nil")
	}
	(&gv).defaults()
	return NewInput("GVerb", rate, 0, 2, gv.In, gv.RoomSize, gv.RevTime, gv.Damping, gv.InputBW, gv.Spread, gv.DryLevel, gv.EarlyRefLevel, gv.TailLevel, gv.MaxRoomSize)
}
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)

}
1270102
func (s SampleDur) Rate(rate int8) Input {
	if rate != IR {
		panic("SampleDur only supports IR")
	}
	return NewInput("SampleDur", rate, 0, 1)
}
1246380
func (sel Select) Rate(rate int8) Input {
	CheckRate(rate)
	inputs := append([]Input{sel.Which}, sel.Inputs...)
	return NewInput("Select", rate, 0, 1, inputs...)
}
151265
func (o VOsc3) Rate(rate int8) Input {
	CheckRate(rate)
	if o.BufNum == nil {
		panic("VOsc3 requires a buffer number")
	}
	(&o).defaults()
	return NewInput("VOsc3", rate, 0, 1, o.BufNum, o.Freq1, o.Freq2, o.Freq3)
}