Skip to content

Instantly share code, notes, and snippets.

@esluyter
esluyter / super-ugens-overview.md
Last active September 16, 2021 17:21
SuperUGens Overview

SuperUGens Overview

This is a suite of UGens written to combat vanilla SuperCollider limitations on audio buffer access and playback, by enabling double precision UGen inputs and outputs.

The problem with BufRd

SCSynth only supports passing 32-bit floating point values to/from sclang and between UGens. Therefore the BufRd UGen takes a 32-bit float as an index into a buffer. The problem is that a 32-bit float only has about 7 digits of precision, which means that using BufRd to play an audio buffer at a playback rate of 0.3, I start noticing major artifacts around 2**20 samples in (20 seconds at 48k).

Because UGen ins and outs are 32-bit floats, the indexing accuracy progressively decreases the later into a buffer one tries to access using BufRd, resulting in progressively more audible artifacts over time.

Vanilla alternatives

@esluyter
esluyter / super-bufrd-spec.md
Last active January 31, 2020 17:47
UGens proposal: Subsample-accurate long sound buffer playback

UGens proposal: SuperBufRd et al. for subsample-accurate long sound buffer playback

This document is a spec for a set of new UGens for SuperCollider that will allow for arbitrary sub-sample indexing into audio buffers up to 2139095040 samples long (12.3 hours at 48k).

Work-in-progress implementation of this spec can be found here.

Current behavior -- what's wrong with BufRd?

BufRd currently accepts a 32-bit float as an index into a buffer. This is due to limitations of SuperCollider’s server architecture. This means, using BufRd to play an audio buffer at a playback rate of 0.3, I start noticing major artifacts around 2**20 samples in (20 seconds at 48k):