Csound Csound-dev Csound-tekno Search About

Re: csoundapi~ and csound5 on mac osx

Date2005-12-29 21:01
FromVictor Lazzarini
SubjectRe: csoundapi~ and csound5 on mac osx
When starting PD by double-clicking, it sets its working
directory to  the root  (/  or 'Macintosh HD'). Put the
csapi_demo.csd
there and csoundapi~ will find it. (or else give the
full-path to it,
but PD has a limit on the size of strings, so if the path is
too long,
it will not work).

Victor

>
>
>  >> Hello all,
>  >>
>  >> First of all I'd like to thank all who have helped me
> with
>  >> problems in the past and those who have contributed to
> the
>  >> release of csound5 which is truely inspiring. I had
> almost
>  >> given up using csound after changing from pc to mac,
> due
>  >> to the slownes of realtime performance. Recently I
>  >> installed the latest binary release of csound5 for osx
>  >> tiger. It seems to work much faster and more
> importantly
>  >> without crashing. I also love the fact that there can
> be
>  >> multi instances of csound.
>  >>
>  >> I do however have a few questions and would be very
>  >> grateful for any advice.
>  >>
>  >> 1- Everything seems to have been installed
> successfully (I
>  >> used the automatic full installation which includes
>  >> csoundapi~). I open the example file for Csoundapi~ in
> pd
>  >> and the external is recognized. However I am unable to
>  >> compile the csd example. I get the message compilation
>  >> failed every time. I have tried to write the full path
> of
>  >> the csd file but it does not make any difference.
> since
>  >> the fltk gui is particularly slow I would very much
> like
>  >> to use pd for controlling midi instruments but have
> not
>  >> yet been able to get it to work on os x.
>  >
>  >I'm not sure why it is failing, but if you transcribe
> here
>  >the
>  >error messages printed to the PD console, I can try and
>  >see what is the matter.
>  >
>  >> 2- I would be grateful for any suggestion as to what
> is
>  >> the best flagline for real-time performance using os x
>  >> coraudio? The usual line does not seem to work.
>  >-+rtaudio=coreaudio -+buffnos=2 -B512 -b512
>  >You can experiment with -B and -b to get the smallest
>  >values without dropouts (-B is generally >= -b)
>  >
>  >> 3- Because I am not yet very familiar to mac os I am
> not
>  >> sure what is the equivalent of the environmental
> variables
>  >> on os x. I am running csound from within blue so it
> would
>  >> be nice not to have to write the entire path.
>  >
>  >Add a .profile (if you are in10.4) file to your home
>  >directory,
>  >with the line
>  >
>  >export PATH=/usr/local/bin:$PATH
>  >
>  >to set the /usr/local/bin directory to your path (you
> can
>  >add other directories as well (separated by : )
>  >
>  >> I am sure I will have to come back with tons of
> questions
>  >> in the future (!) so apologies in advance for these
> newbie
>  >> questions. But any help is very much appreciated.
>
>  >Ask away!
>
>
>  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

Date2005-12-30 06:52
FromDavid Akbari
SubjectRe: csoundapi~ and csound5 on mac osx
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