[Stk] (no subject)

greg kellum greg_kellum@hotmail.com
Sun, 25 May 2003 19:13:06 +0000


Hello

I've written a polyphonic score parsing application for the Synthesis 
Toolkit that supports a score file syntax that is a little friendlier for 
certain ways of composing music than SKINI is. The score files are similar 
to CMusic scores; they contain declarations of notes with durations rather 
than note on and note off declarations among other differences to the SKINI 
syntax. I've run into a wall on a few features though, and I was hoping that 
someone out there might be able to answer a few questions for me...

One problem I've been having is generating stereo sound files. The way I 
understood the WavOut class is that if you want to generate a stereo file 
you give the tickFrame() method an array where the n value is the left 
channel and the n + 1 value is the right channel. So if you just wanted to 
output one stereo sample value you'd give tickFrame an array like this: 
{leftValue, rightValue} along with the array size, 2.  When I tried this 
though, the output file couldn't be played. Have I misunderstood the way 
tickFrame() works?

Another problem I've been having is getting an envelope to end at the end of 
a note's duration. With the ADSR class the envelope reaches 0.0 before it 
actually should. I looked into the class and noticed the release rate is set 
by the following line:
releaseRate = 1.0 / ( aTime * Stk::sampleRate() );
Since the envelope is not at 1 but at the sustain level when the release 
phase kicks in, shouldn't this actually be: releaseRate = sustainLevel / ( 
aTime * Stk::sampleRate() ) ?

Another point was brought up when I tried to trigger midi synthesizers with 
the same score files. I wrote some code for outputting midi notes and used 
the RtWvIn class to record the sound coming in from the midi synthesizer. 
One thing I noticed while doing this is that the default number of buffers 
in RtWvIn and their sizes didn't work with my sound card. So I changed them 
for my specific sound card. Is there a way though to programmatically ask a 
sound card how many buffers it wants and what sizes they should be? 
Otherwise it doesn't look like one would be able to generically support all 
sound cards.

Anyway, thanks for any help anyone is able to give me.
Greg Kellum

P.S. I will post this application to http://www.artassault.org/software.html 
in about a month should anyone out there find it potentially useful.

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*  
http://join.msn.com/?page=features/virus