Csound Csound-dev Csound-tekno Search About

[Csnd] csnd Python API not working for me

Date2013-02-07 21:04
Fromzappfinger
Subject[Csnd] csnd Python API not working for me
I have tried several examples of the csnd API (Gogins, simple ones, etc.),
but none work here.
I get no error messages, but csound seems to hang at section 1:

Csound version 5.19.00 (double samples) Jan 16 2013
WARNING: could not open library
'/Library/Frameworks/CsoundLib64.framework/Versions/5.2/Resources/Opcodes64/libjacko.dylib'
(-1)
WARNING: could not open library
'/Library/Frameworks/CsoundLib64.framework/Versions/5.2/Resources/Opcodes64/libjackTransport.dylib'
(-1)
WARNING: could not open library
'/Library/Frameworks/CsoundLib64.framework/Versions/5.2/Resources/Opcodes64/librtjack.dylib'
(-1)
UnifiedCSD: simple.csd
Creating options
Creating orchestra
Creating score
graph init 
using callback interface
Parsing successful!
Sorting score
displays suppressed
0dBFS level = 1.0
orch now loaded
audio buffered in 1024 sample-frame blocks
PortAudio V19-devel (built Oct  3 2012 09:31:53)
PortAudio: available output devices:
   0: Built-in Output
   1: Soundflower (2ch)
   2: Soundflower (16ch)
PortAudio: selected output device 'Built-in Output'
writing 2048 sample blks of 64-bit floats to dac 
SECTION 1:

No idea what causes this.

Richard




--
View this message in context: http://csound.1045644.n5.nabble.com/csnd-Python-API-not-working-for-me-tp5719981.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2013-02-07 21:26
FromVictor Lazzarini
SubjectRe: [Csnd] csnd Python API not working for me
did you try shapes.py? If you edit shapes.csd and a -g to the CsOptions it should work.

It does here.

Victor
On 7 Feb 2013, at 21:04, zappfinger wrote:

> I have tried several examples of the csnd API (Gogins, simple ones, etc.),
> but none work here.
> I get no error messages, but csound seems to hang at section 1:
> 
> Csound version 5.19.00 (double samples) Jan 16 2013
> WARNING: could not open library
> '/Library/Frameworks/CsoundLib64.framework/Versions/5.2/Resources/Opcodes64/libjacko.dylib'
> (-1)
> WARNING: could not open library
> '/Library/Frameworks/CsoundLib64.framework/Versions/5.2/Resources/Opcodes64/libjackTransport.dylib'
> (-1)
> WARNING: could not open library
> '/Library/Frameworks/CsoundLib64.framework/Versions/5.2/Resources/Opcodes64/librtjack.dylib'
> (-1)
> UnifiedCSD: simple.csd
> Creating options
> Creating orchestra
> Creating score
> graph init 
> using callback interface
> Parsing successful!
> Sorting score
> displays suppressed
> 0dBFS level = 1.0
> orch now loaded
> audio buffered in 1024 sample-frame blocks
> PortAudio V19-devel (built Oct  3 2012 09:31:53)
> PortAudio: available output devices:
>   0: Built-in Output
>   1: Soundflower (2ch)
>   2: Soundflower (16ch)
> PortAudio: selected output device 'Built-in Output'
> writing 2048 sample blks of 64-bit floats to dac 
> SECTION 1:
> 
> No idea what causes this.
> 
> Richard
> 
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/csnd-Python-API-not-working-for-me-tp5719981.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





Date2013-02-07 21:43
FromVictor Lazzarini
SubjectRe: [Csnd] csnd Python API not working for me
Attachmentskeys.csd  keys.py  shapes.csd  shapes.py  
Try the attached examples.

Victor


On 7 Feb 2013, at 21:26, Victor Lazzarini wrote:

> did you try shapes.py? If you edit shapes.csd and a -g to the CsOptions it should work.
> 
> It does here.
> 
> Victor
> On 7 Feb 2013, at 21:04, zappfinger wrote:
> 
>> I have tried several examples of the csnd API (Gogins, simple ones, etc.),
>> but none work here.
>> I get no error messages, but csound seems to hang at section 1:
>> 
>> Csound version 5.19.00 (double samples) Jan 16 2013
>> WARNING: could not open library
>> '/Library/Frameworks/CsoundLib64.framework/Versions/5.2/Resources/Opcodes64/libjacko.dylib'
>> (-1)
>> WARNING: could not open library
>> '/Library/Frameworks/CsoundLib64.framework/Versions/5.2/Resources/Opcodes64/libjackTransport.dylib'
>> (-1)
>> WARNING: could not open library
>> '/Library/Frameworks/CsoundLib64.framework/Versions/5.2/Resources/Opcodes64/librtjack.dylib'
>> (-1)
>> UnifiedCSD: simple.csd
>> Creating options
>> Creating orchestra
>> Creating score
>> graph init 
>> using callback interface
>> Parsing successful!
>> Sorting score
>> displays suppressed
>> 0dBFS level = 1.0
>> orch now loaded
>> audio buffered in 1024 sample-frame blocks
>> PortAudio V19-devel (built Oct  3 2012 09:31:53)
>> PortAudio: available output devices:
>>  0: Built-in Output
>>  1: Soundflower (2ch)
>>  2: Soundflower (16ch)
>> PortAudio: selected output device 'Built-in Output'
>> writing 2048 sample blks of 64-bit floats to dac 
>> SECTION 1:
>> 
>> No idea what causes this.
>> 
>> Richard
>> 
>> 
>> 
>> 
>> --
>> View this message in context: http://csound.1045644.n5.nabble.com/csnd-Python-API-not-working-for-me-tp5719981.html
>> Sent from the Csound - General mailing list archive at Nabble.com.
>> 
>> 
>> Send bugs reports to the Sourceforge bug tracker
>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>> 
> 
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
> 
> 
> 
> 
> 
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Date2013-02-08 15:00
FromMark Millikan
SubjectRe: [Csnd] csnd Python API not working for me
Are you by any chance running the 10.7 pkg on a 10.7.* version of osx?
I had to install the 10.6 pkg.

On Thu, Feb 7, 2013 at 4:43 PM, Victor Lazzarini
 wrote:
> Try the attached examples.
>
> Victor
>
>
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>
>
> On 7 Feb 2013, at 21:26, Victor Lazzarini wrote:
>
>> did you try shapes.py? If you edit shapes.csd and a -g to the CsOptions it should work.
>>
>> It does here.
>>
>> Victor
>> On 7 Feb 2013, at 21:04, zappfinger wrote:
>>
>>> I have tried several examples of the csnd API (Gogins, simple ones, etc.),
>>> but none work here.
>>> I get no error messages, but csound seems to hang at section 1:
>>>
>>> Csound version 5.19.00 (double samples) Jan 16 2013
>>> WARNING: could not open library
>>> '/Library/Frameworks/CsoundLib64.framework/Versions/5.2/Resources/Opcodes64/libjacko.dylib'
>>> (-1)
>>> WARNING: could not open library
>>> '/Library/Frameworks/CsoundLib64.framework/Versions/5.2/Resources/Opcodes64/libjackTransport.dylib'
>>> (-1)
>>> WARNING: could not open library
>>> '/Library/Frameworks/CsoundLib64.framework/Versions/5.2/Resources/Opcodes64/librtjack.dylib'
>>> (-1)
>>> UnifiedCSD: simple.csd
>>> Creating options
>>> Creating orchestra
>>> Creating score
>>> graph init
>>> using callback interface
>>> Parsing successful!
>>> Sorting score
>>> displays suppressed
>>> 0dBFS level = 1.0
>>> orch now loaded
>>> audio buffered in 1024 sample-frame blocks
>>> PortAudio V19-devel (built Oct  3 2012 09:31:53)
>>> PortAudio: available output devices:
>>>  0: Built-in Output
>>>  1: Soundflower (2ch)
>>>  2: Soundflower (16ch)
>>> PortAudio: selected output device 'Built-in Output'
>>> writing 2048 sample blks of 64-bit floats to dac
>>> SECTION 1:
>>>
>>> No idea what causes this.
>>>
>>> Richard
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://csound.1045644.n5.nabble.com/csnd-Python-API-not-working-for-me-tp5719981.html
>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>>
>>
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>>
>>
>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>

Date2013-02-08 17:03
Fromzappfinger
Subject[Csnd] Re: csnd Python API not working for me
Mark,

I am running on OS X 10.6.8.
But I just tried Victor's samples and they seem to work, so I will dive
deeper in my code.
I had to use the shebang line '#!/usr/local/bin/python2.7' as first line in
the sample .py files, since otherwise csnd won't be imported.

Richard



--
View this message in context: http://csound.1045644.n5.nabble.com/csnd-Python-API-not-working-for-me-tp5719981p5720015.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2013-02-08 17:31
Fromzappfinger
Subject[Csnd] Re: csnd Python API not working for me
I'm afraid it is still a mystery.
Here is the simple code I have (session.py):

#!/usr/local/bin/python2.7
import csnd
cs = csnd.Csound()
res = cs.Compile("fluidcomplex.csd")
perf = csnd.CsoundPerformanceThread(cs)
perf.Play()

fluidcomplex loads a midi file, and a sound font and plays it. First I had
relative paths and I thought that was  the problem, but even all the files
in the same folder as the session.py, it does not work.

When I run csound64 fluidcomplex.csd from the terminal it works...

Richard
fluidcomplex.csd
  
GmC7.mid   
sf_GMbank.sf2
  
session.py   



--
View this message in context: http://csound.1045644.n5.nabble.com/csnd-Python-API-not-working-for-me-tp5719981p5720016.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2013-02-08 18:01
FromSteven Yi
SubjectRe: [Csnd] Re: csnd Python API not working for me
Hi Richard,

I just tried this. I think the problem is that you're using a
CsoundPerformanceThread and calling Play, but you're not waiting for
it to finish.  You could try using:

perf.Join()

at the end of your session.py script.

steven

On Fri, Feb 8, 2013 at 5:31 PM, zappfinger  wrote:
> I'm afraid it is still a mystery.
> Here is the simple code I have (session.py):
>
> #!/usr/local/bin/python2.7
> import csnd
> cs = csnd.Csound()
> res = cs.Compile("fluidcomplex.csd")
> perf = csnd.CsoundPerformanceThread(cs)
> perf.Play()
>
> fluidcomplex loads a midi file, and a sound font and plays it. First I had
> relative paths and I thought that was  the problem, but even all the files
> in the same folder as the session.py, it does not work.
>
> When I run csound64 fluidcomplex.csd from the terminal it works...
>
> Richard
> fluidcomplex.csd
> 
> GmC7.mid 
> sf_GMbank.sf2
> 
> session.py 
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/csnd-Python-API-not-working-for-me-tp5719981p5720016.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>

Date2013-02-08 18:15
Fromzappfinger
Subject[Csnd] Re: csnd Python API not working for me
Hi Steven,

Of course! I also added a sleep:

import csnd
import time
cs = csnd.Csound()
res = cs.Compile("fluidcomplex.csd")
perf = csnd.CsoundPerformanceThread(cs)
perf.Play()
time.sleep(300)
perf.join

works fine now!

Richard



--
View this message in context: http://csound.1045644.n5.nabble.com/csnd-Python-API-not-working-for-me-tp5719981p5720018.html
Sent from the Csound - General mailing list archive at Nabble.com.