[chuck-users] function for creating 8 bit waveforms from expressions

Ronni Montoya ronni.montoya at gmail.com
Tue Dec 31 17:51:16 EST 2013

Hi again, these days i been experimenting with the code Joel posted, i
discovered some things and got some questions.

where is the time of the waveform defined?
i experimented changing all values and also with many expression and
the length of the waveform remains the same ( there is a waveform that
loops for ever) .
do anybody have an idea where the length of the waveform is defined
and how to change it?

Other thing i noticed is that changing the values in the expressions
changes the timbre ( or texture ? ) of the sound in a subtle way while
the structure remains the same.
So i was thinking that instead of having values in the expression, Is
it possible to have an oscilator or  brown noise generator?
.......having a brown noise generator instead of a value will  allow
that  the texture of the sound will change all the time.

Other thing i noticed is that the paper is posted before and the
algorithm for generating this kind of functions is based on the
implementation from the  links Michael posted before.
If you listen those examples you will notice that the sound changes
all the time, there is no repetitiveness , it creates sound structures
at different time scale and this is the potential in this way of
sonifying expression.

any idea why Joels implementation only generate a sound withouth
variability as the examples posted by Michael?

and my last question:

I been working  with other programming languages for sound as
supercollider and there are different ways of generating waveforms
from functions, basically the way i was doing this is that first i
create the function and then i call the function that creates the
whole waveform and then i just read my waveform but i see in the code
posted by Joel that it works in a different way : first i generate the
function and then i generate the waveform at the same time I generate
the sound calling the function each sample .
I was wondering is this something specific to chuck? I mean calling
the function each sample while it generates the sound.... is this
approach possible with other programming languages?

2013/12/29, Ronni Montoya <ronni.montoya at gmail.com>:
> hey, i found a link to the paper, i hope you enjoy it:
> http://cilab.math.upatras.gr/mikeagn/sites/cilab.math.upatras.gr.mikeagn/files/Kaliakatsos-Papakostas.pdf
> 2013/12/28, Michael Heuer <heuermh at gmail.com>:
>> Hello Ronni,
>> Might you have a link to the paper you are referring to?  Something is
>> lost to me in the specification of the algorithm.
>> I am reminded of this
>> http://createdigitalmusic.com/2011/10/entire-musical-compositions-made-from-just-one-line-of-code-are-glitchy-but-musical/
>> http://countercomplex.blogspot.com/2011/10/algorithmic-symphonies-from-one-line-of.html
>> http://countercomplex.blogspot.com/2011/10/some-deep-analysis-of-one-line-music.html
>> Cheers,
>>    michael
>> On Fri, Dec 27, 2013 at 1:46 AM, Ronni Montoya <ronni.montoya at gmail.com>
>> wrote:
>>> Hi list, i been reading a paper that talks about an approach for
>>> generating sound that uses functions to directly shape waveforms. The
>>> function receives "expresions" as argument and it generates different
>>> kind of 8 bit waveforms from the expressions.
>>> An expression can look like this:
>>> f(t) = t * ( t >> 8 * ( t >>15 | t >> 8) & 20 | ( t >>19) * 5 >> t | t
>>> >>
>>> 3))
>>> The paper describes the algorithm in this way:
>>> algorithm 1 :
>>> Construction of an 8-bit waveform of 8000Hz  sample rate:
>>> The function has 2 inputs :
>>> Input 1) a functional expresion f(t)
>>> Input  2 ) time durations in seconds (d)
>>> Output: the waveform of an audio signal with seconds duration
>>> for t = 1 to d8000 do
>>>      if f(t) ==NaN then
>>>          q(t)  <-- 0
>>>       else
>>>          q(t) <-- mod(f(t)), 256)
>>>      end if
>>>      s(t) <-- 2 q(t)/255 - 1
>>> end for
>>> If its possible to implement this approach for generating sound in
>>> chuck??
>>> cheers
>>> R.
>>> _______________________________________________
>>> chuck-users mailing list
>>> chuck-users at lists.cs.princeton.edu
>>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>> _______________________________________________
>> chuck-users mailing list
>> chuck-users at lists.cs.princeton.edu
>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users

More information about the chuck-users mailing list