[Stk] Drummer example not producing sound

Stephen Sinclair sinclair at music.mcgill.ca
Tue Dec 18 11:03:57 PST 2012


On Tue, Dec 18, 2012 at 8:34 AM, Ioannis Chionidis <ichionid at gmail.com> wrote:
> Hi all,
>
> I am trying to run a simple example like the following one:
>
> Drummer drummer;
>     StkFloat bass_drum = 36;
>     for (int i = 0; i < 10; i++) {
>         drummer.noteOn(36
> , 1.0);
>         h->wait(400);//helper class's function
>         drummer.noteOff(2
> .0);
>         h->wait(400);//helper class's function
>     }
>
> Should I be getting a sound output??
> If not any idea of what should I add?

I'm afraid this is not at all how STK works.  You need to drive the
audio somehow, at least calling the Drummer's tick() method and
passing the results to the sound system.  I suggest you follow the
on-line tutorials.

https://ccrma.stanford.edu/software/stk/fundamentals.html


Steve



More information about the Stk mailing list