[chuck-users] 8-bit?

Kassen signal.automatique at gmail.com
Sun Nov 28 00:28:55 EST 2010


Hey, Tom.

When I was in Japan, after I gave a talk on ruck some Japanese folks
> in the audience had questions that I had trouble answering in English,
> Japanese, or pictures on paper. But once I demonstrated the answer
> with Ruby, everyone understood. :)
>
>
Victory!


> Me too! Though I just realized that 35 and 36 points correspond to
> coefs array sizes of 104 and 107. So I searched ChucK for "100" and
> found:
>
>  #define genX_MAX_COEFFS 100
>
> D'oh.
>
>
Ok... does that make any sense at all, as a limit? Wouldn't ChucK memory be
divided in some sort of blocks?



> Ohh, I'm definitely going to play with that. Was it logarithmic, or
> something less regular?
>
>
Well, say that we are using n bits to describe a range from 0V to 1V. First
we'll consider bit 0. Assume this one is the most significant one. If it's
high it should contribute .5V to the total. However, the resistors used
would be cheap and may have as much as a 10% error (medical and military
grade ones with smaller margins would be lots more expensive, if available).
Because of this and depending on the exact properties of the device in our
hands we'd get something like .47V instead. Let's consider bit 1 and say
it's high too. This should contribute .25V. In practice it might instead add
.26 . At this point the total value should be .750000 but instead it will be
(.47 + .26 =) .73 . Repeat for all bits.

I think you can assume the error per resistor to stay constant over the use
of the "dac", for pieces of a realistic length. I also think that a 10%
margin of error is about realistic, maybe we have members who used to solder
back in the mid 80's who will know more.

Oh, and of course these used plain analogue LPF's, not some sort of
phase-linear FIR filter over a over-sampled version of the signal like
modern soundcards. For the ultimate in realism of emulating old digital
stuff note that often compander (compressor / expander) chips were used
to suppress noise. Those might well be a bigger factor in the "punch"
instruments like the MPC brought to genres like HipHop than the low
bit-depth and rate on their own.

There is a whole world of fascinating phenomena there.



> Also, while turning the LiSa code into a UGen-like class, I realized
> that the ADSR in my original e-mail was not being quantized, and once
> I moved it inside, the sound became much less pleasant. The laser
> whizzing noises (aliasing?) become much more apparent. Interesting
> again with only 3 bits, though.
>
>
Yes, that makes a difference. I do think that real historical gear would
sometimes put the envelope last (where this is viable, of course, it would
be in the S612, not so in the gameboy) to suppress noise. This is why all
non-modular analogue synths have the ADSR after the filter, even if the
filter wouldn't ever self-oscillate. In anything hybrid I'd predict the
envelope would be last. In purely digital stuff the envelope would be before
the converter and it's trigger quantised to the bitrate. That last bit is a
bit obvious when you think about it, but it matters in how static the final
result will be perceived to be if we repeat the same drum a few times.

To conclude; it's not entirely unlikely that we'll have grey beards (where
appropriate) before we'll be able to perfectly emulate the sounds of our
youths¹.

;¬)
Kas.

¹Some might simply have greyer beards, but they may have to deal with tape
and tube-amp emulation so it evens out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20101128/837c5870/attachment-0001.html>


More information about the chuck-users mailing list