// Rate queries the current video bit rate.
770315
func (d *Driver) Rate() (err error) {
	buf, _ := d.createPacket(videoRateQuery, 0x48, 0)
	d.seq++
	binary.Write(buf, binary.LittleEndian, d.seq)
	binary.Write(buf, binary.LittleEndian, CalculateCRC16(buf.Bytes()))

	_, err = d.cmdConn.Write(buf.Bytes())
	return
}
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...)
}
363132
func (x LinXFade2) Rate(rate int8) Input {
	CheckRate(rate)
	(&x).defaults()
	// Not sure why Level doesn't show up in sclang's synthdefs that use LinXFade2
	return NewInput("LinXFade2", rate, 0, 1, x.A, x.B, x.Pan)
}
732799
func (gate Gate) Rate(rate int8) Input {
	CheckRate(rate)
	if gate.In == nil {
		panic("Gate expects In to not be nil")
	}
	(&gate).defaults()
	return NewInput("Gate", rate, 0, 1, gate.In, gate.Trig)
}
1035199
func (limiter Limiter) Rate(rate int8) Input {
	CheckRate(rate)
	(&limiter).defaults()
	return NewInput("Limiter", rate, 0, 1, limiter.In, limiter.Level, limiter.Dur)
}
626596
func (t TRand) Rate(rate int8) Input {
	CheckRate(rate)
	(&t).defaults()
	return NewInput("TRand", rate, 0, 1, t.Lo, t.Hi, t.Trig)
}
726508
func (l LFGauss) Rate(rate int8) Input {
	CheckRate(rate)
	(&l).defaults()
	done := C(float32(l.Done))
	return NewInput("LFGauss", rate, 0, 1, l.Duration, l.Width, l.IPhase, l.Loop, done)
}
420608
func (pd PulseDivider) Rate(rate int8) Input {
	CheckRate(rate)
	(&pd).defaults()
	return NewInput("PulseDivider", rate, 0, 1, pd.Trig, pd.Div, pd.Start)
}
112866
func (delay Delay) Rate(rate int8) Input {
	CheckRate(rate)
	if delay.In == nil {
		panic("Delay expects In to not be nil")
	}
	if delay.MaxDelayTime == nil {
		delay.MaxDelayTime = C(0.2)
	}
	if delay.DelayTime == nil {
		delay.DelayTime = C(0.2)
	}
	switch delay.Interpolation {
	case InterpolationNone:
		return NewInput("DelayN", rate, 0, 1, delay.In, delay.MaxDelayTime, delay.DelayTime)
	case InterpolationLinear:
		return NewInput("DelayL", rate, 0, 1, delay.In, delay.MaxDelayTime, delay.DelayTime)
	case InterpolationCubic:
		return NewInput("DelayC", rate, 0, 1, delay.In, delay.MaxDelayTime, delay.DelayTime)
	default:
		panic(fmt.Errorf("invalid interpolation %d", delay.Interpolation))
	}
}
126528
func (b Ball) Rate(rate int8) Input {
	CheckRate(rate)
	(&b).defaults()
	return NewInput("Ball", rate, 0, 1, b.In, b.Gravity, b.Damp, b.Friction)
}
462907
func (out OffsetOut) Rate(rate int8) Input {
	CheckRate(rate)
	return NewInput("OffsetOut", rate, 0, 1, out.Bus, out.Channels)
}
461289
func (b Spring) Rate(rate int8) Input {
	CheckRate(rate)
	(&b).defaults()
	return NewInput("Spring", rate, 0, 1, b.In, b.Spring, b.Damp)
}
1275880
func (l Lag) Rate(rate int8) Input {
	CheckRate(rate)
	if l.In == nil {
		panic("Lag requires an input signal")
	}
	return NewInput("Lag", rate, 0, 1, l.In, l.LagTime)
}
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)
}
926122
func (lfsaw LFSaw) Rate(rate int8) Input {
	CheckRate(rate)
	(&lfsaw).defaults()
	return NewInput("LFSaw", rate, 0, 1, lfsaw.Freq, lfsaw.Iphase)
}
233211
func (gn GrayNoise) Rate(rate int8) Input {
	CheckRate(rate)
	return NewInput("GrayNoise", rate, 0, 1)
}
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)))
}