[PD] dac object question

Lex Ein lex_ein at f-m.fm
Thu Jul 8 18:05:53 CEST 2004


mstamm at itin.fr wrote:
>  Hi, Sorry but I have another question in the same day...
>  I have a "dac object" and a "number" to variate its value. When the
>  number comes to a negative or positive number, the speaker generates
>  a "tac" sound, and I don't understand why. Can anyone help? Thanks,
>  Mickaël.

Yeah, it's all in the documentation, and in MSPs Intro to DSP book on 
his website.  So read on anyways.
http://www.crca.ucsd.edu/~msp/techniques.htm

Typically, you'd never connect a control, or DC source (number) directly 
to a signal [dac~] output.
Instead, you'd connect a signal object like oscillator [osc~] (or any ~ 
object) to the [dac~] outputs

[osc~  440]
|  \
|   \
[dac~]

In Pd, number objects are 'control' (static, outputs when prompted) 
objects, but [dac~] and all "~" objects are 'signal' (sampled, 
continuous) objects.  You're essentially sending a DC voltage to your 
speakers, then pushing the speaker cone from neutral (0)to full 
scale(1,-1) in one sample time (1/44100 of second), hence the click, 
just like connecting a 1.5V battery directly across the speaker contacts.

If you use the Shift key while scrolling your number object, you'll hear 
a much softer click, as it will increment/decrement in steps of 0.01 
(1%) of "full scale".

Luckily, most soundcard outputs are not DC coupled; so the speaker won't 
stay pushed out there. 
DC offset is a problem in analog and digital audio systems because it 
leads to asymmetrical clipping in the signal processing chain, which 
sounds pretty bad. Cheap sound cards often have a DC offset in their 
input circuitry. Sound editing software includes a "DC Offset Removal" 
filter for this. In high-power speaker systems DC offset can heat 
(perhaps overheat) the output transistors and speaker coils. Mixers and 
power amplifiers have "subsonic" filters to block DC.

In Pd, to block DC offsets, we frequently use the [hp~ 5] object, which 
passes all interesting audio, and blocks DC.







More information about the Pd-list mailing list