Csound Csound-dev Csound-tekno Search About

[Csnd] Re: software bus linux

Date2008-08-31 17:05
Fromvictor
Subject[Csnd] Re: software bus linux
you don't need this line
 
chn_k "pitch", 1
 
If you are using doubles, compile your host with -DUSE_DOUBLE; use a
float or double constant when assigning *pvalue.
 
Otherwise it should work.
 
Victor
----- Original Message -----
Sent: Saturday, August 30, 2008 10:42 PM
Subject: [Csnd] software bus linux


Hi,
I'm stuck on software bus on linux.  Works on MinGW, but I can't seem to pass something on Linux.  Not sure what's failing.  The .csd plays but prints '0' or default for "pitch".  Seems like the string is going thru, but maybe not the ptrtoptr?  Spout etc. works fine on Linux.  Just can't seem to get software bus firing off.  Tried also chani, and both C and C++ approaches to csoundGetChannelPtr.  No joy.  Not sure what it needs on Linux to fire the software bus.

thank you.
----
int main(void)
{
    CSOUND *csound = csoundCreate(0);
       const char *argv[] = {"csound", "ChnGet.csd" };
    int result= csoundCompile(csound, 2, (char **)argv);
    MYFLT *pvalue;
   
    if(!result)
    {
     while(csoundPerformKsmps(csound)==0){
                                      
    if (csoundGetChannelPtr(csound, &pvalue, "pitch",
       CSOUND_INPUT_CHANNEL | CSOUND_CONTROL_CHANNEL) == 0)
       *pvalue = 400;
     
       } 
   
    }
    csoundDestroy(csound);
    return result;
}
======
;sco
chn_k "pitch", 1

gifn ftgen 1, 0, 16384, 10, 1

    instr    1   
k1 chnget "pitch"
    printk2 k1
asig oscili 5000,k1, 1
out asig
endin




See what people are saying about Windows Live. Check out featured posts. Check It Out!

Date2008-08-31 19:01
Fromjhearon
Subject[Csnd] Re: software bus linux
Great.   Excellent catch.  I was going dingy trying to figure out difference
between MinGW and Linux vers.  I overlooked MinGW was float build and Linux
was double build.  I added precompiler USE_DOUBLE, made sure *pvalue was
float or double and it works now.  I've been all up in Kdev, KDbg trying to
figure this out.  So glad I was able to get help for this one.
-- 
View this message in context: http://www.nabble.com/software-bus-linux-tp19237469p19244514.html
Sent from the Csound - General mailing list archive at Nabble.com.