func main() {
	ctx := sound.DefaultContext

	/*
		seq := sound.NewSequencer(ctx)
		f0 := 110.0
		seq.Add(0,                 KarplusStrongSaw(ctx, f0*1.00, f0*1.00 * 16, 0.98))
		seq.Add(time.Second*12/40, KarplusStrongSaw(ctx, f0*1.25, f0*1.25 * 16, 0.98))
		seq.Add(time.Second*24/40, KarplusStrongSaw(ctx, f0*1.50, f0*1.50 * 16, 0.98))
		seq.Add(time.Second*36/40, KarplusStrongSaw(ctx, f0*2.00, f0*2.00 * 16, 0.98))
		seq.Add(time.Second*37/40, KarplusStrongSaw(ctx, f0*2.50, f0*2.50 * 16, 0.98))
		seq.Add(time.Second*38/40, KarplusStrongSaw(ctx, f0*3.00, f0*3.00 * 16, 0.98))
		seq.Add(time.Second*39/40, KarplusStrongSaw(ctx, f0*4.00, f0*4.00 * 16, 0.98))
		stream := seq.Play()
	*/

	stream := KarplusStrongSaw(ctx, 100.0, 1000.0, 0.98)
	stream = filter.RC(ctx, stream, filter.LowPass, 300.0)

	stream = ctx.TakeDuration(stream, time.Second*3/2, false)
	stream = ctx.MulInf(stream, ctx.Const(0.1))

	frontend.Main(ctx, stream)
}
Example #2
0
func main() {
	ctx := sound.DefaultContext
	left, right := Generate(ctx)
	frontend.Main(ctx, left, right)
}