[Stk] STK Problem

Chris B largowhinch at googlemail.com
Thu Jun 3 13:20:35 PDT 2010


Hello,

my name is Christopher Bartels and I am a student of electrical engineering
at the university of Hannover, Germany. I am currently working on a my
student research project, a sonification of human movement, and I am trying
to implement STK for this matter. I am not sure if I am addressing the
correct persons for this problem, and, case I am wrong, I would be happy if
you could direct me in the right direction.

I am seriously trying on my own, but since about three days I am hitting a
wall. I have tried all the tutorials on the STK website and I even managed
to find a couple more. Nevertheless, I am still troubling with a very basic
issue: monophonic sound. I can succeed in sending only on sound sample to
only on channel. I tried the sine function, which should sample a monophonic
sound, but it doesn't. I get the sine on both speakers, left and right. I
realized that the sine.tick(stkframes, channel) function should tick the
samples only on one channel, but when I try this I either get a clean sine
sound on both speakers or a modulated sine (it doesn't sound really well and
I think what I am hearing IS in fact a modulated sine). I read through the
class definitions, I even tried to change the functions of tick in the
RtAudio/RtWvOut classes,but I am seriously stuck. My ultimate goal should be
something like this:

left speaker: Sine, rising amplitude with movement of the arm in horizontal
axis to the left
right speaker: Sine, rising amplitude with movement of the arm in horizontal
axis to the right

Since it is only a modification of the amplitude I should be fine with
something like **sample++  -> (StkFloat * "My amplitude modifier")*

My question:

How can I implement this in a very simple way? How should the data "be
ticked"? How shall the buffer be written? I think I have to write the data
interleaved, since it's the default stream parameter, so first comes left,
then right, then left and so on. But I can't figure out the correct way. Any
help you could offer would be much appreciated.

Sincerely, Christopher Bartels
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ccrma-mail.stanford.edu/pipermail/stk/attachments/20100603/5542cfa7/attachment.html 


More information about the Stk mailing list