Csound Csound-dev Csound-tekno Search About

Re: csoundapi~ and csound5 on mac osx

Date2005-12-30 09:32
FromVictor Lazzarini
SubjectRe: csoundapi~ and csound5 on mac osx
The RC1 package has sorted the OPCODEDIR issue,
by releasing the library as a framework and putting the
opcodes inside it. The location then defaults to that.

His problem, which I replicated here, was that the
working directory on PD defaults to the root, when
PD is started as a double-click Acqua app. If you
start it in the command-line (you'd have to have it
installed in /usr/local/bin or somewhere), then
the working dir is where you started PD.

Victor
>
> What is happening in this situation is simply that any
> opcode libraries  not found in the static libcsound.a (the
> opcodes listed if OPCODEDIR is  not set) are not being
> loaded by Pd since no environment variable is  set. Could
> it be possible to use the .profile as a mechanism to set
> environment variables ?
>
> Anyway, you can prove that it's simply an issue of opcode
> libraries  being loaded by running a simple orchestra that
> has only an oscil  generated sine wave - the
> csapi_demo.csd has a flanger opcode (and one  other I
> think) which is not a part of the static libcsound.a and
> subsequently requires the external libraries be loaded.
>
> Peiman, see if .csd this works in your Pd:
>
> 
>
> 
>
> sr        =    44100
> kr        =    441
> ksmps    =    100
> nchnls    =    2
>
> itmp    ftgen    1, 0, 16384, 10, 1, 0.5, 0.333333
>
> /*--- ---*/
>
>         instr 1
>
> al    oscil    10000, 420, 1
>
>     outs        al, al
>
>         endin
>
> /*--- ---*/
> 
>
> 
> i1    0    3600
>
> e
> 
> ; #EOF
> 
>
> with this Pd patch
>
> #N canvas 390 305 552 216 10;
> #X obj 149 109 csoundapi~ 2;
> #X obj 171 186 dac~;
> #X obj 194 158 *~;
> #X obj 234 132 hsl 128 15 0 1 0 0 empty empty empty -2 -6
> 0 8 -262144 -1 -1 0 1;
> #X obj 171 158 *~;
> #X obj 68 72 openpanel;
> #X msg 68 93 open \$1;
> #X obj 68 23 bng 45 250 50 0 empty empty empty 0 -6 0 8
> -262144 -253788 -1;
> #X text 10 6 click to select .csd file;
> #X msg 183 65 run \$1;
> #X msg 183 86 reset;
> #X obj 237 43 tgl 15 0 empty empty empty 0 -6 0 8 -262144
> -1 -1 0 1 ;
> #X msg 238 74 \; pd dsp \$1;
> #X text 270 148 volume;
> #X text 276 18 --% Simple csoundapi~ diagnostic %--;
> #X text 241 109 << Thanks for this \, Victor !!;
> #X connect 0 0 4 0;
> #X connect 0 1 2 0;
> #X connect 2 0 1 1;
> #X connect 3 0 2 1;
> #X connect 3 0 4 1;
> #X connect 4 0 1 0;
> #X connect 5 0 6 0;
> #X connect 6 0 0 0;
> #X connect 7 0 5 0;
> #X connect 9 0 0 0;
> #X connect 10 0 0 0;
> #X connect 11 0 9 0;
> #X connect 11 0 12 0;
>
> Good luck!
>
> -David
>
> >> Dear Victor,
> >>
> >>   Many thanks for your replayl. It is much appreciated.
> >> Below is the  error message I get in pd when opening
> >> help-csoundapi~.pd.
> >>
> >>
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> >> xxxxxxxxxxxx >>   csoundapi~ 1.0
> >>
> >>
> >>   A PD csound class using the Csound 5.00.0 API
> >>
> >>
> >>   (c) V Lazzarini, 2005
> >>
> >>
> >>
> >>  csapi_demo.csd
> >>  csoundapi~ warning: could not compile
> >>  help-csoundapi~.pd 4 0 39 3 (adc~->csoundapi~)
> connection >> failed
> >>  help-csoundapi~.pd 4 1 39 3 (adc~->csoundapi~)
> connection >> failed
> >>  help-csoundapi~.pd 39 3 0 1 (csoundapi~->dac~)
> connection >> failed
> >>  help-csoundapi~.pd 39 4 24 0 (csoundapi~->message)
> >> connection failed
> >>  help-csoundapi~.pd 39 5 25 0 (csoundapi~->bng)
> connection >> failed
> >>  csoundapi~ run: 1
> >>  csoundapi~ warning: orchestra not compiled
> >>
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> >> xxxxxxxxxxx >>
> >>   It looks like the .csd file is not located or
> >> recognized. But it is in  fact in the same folder as
> the >> pd help file so there shouldn't be a  problem. I
> did >> install pd after installing csound perhaps it is
> related >> (?). I will be very happy when this works!
> >>
> >>  Thanks again for your help
> >>  All the best
> >>
> >>   Peiman
>
> --
> Send bugs reports to this list.
> To unsubscribe, send email to
> csound-unsubscribe@lists.bath.ac.uk