Csound Csound-dev Csound-tekno Search About

[Csnd] athenaCL in Csound

Date2013-01-05 19:58
Frommenno
Subject[Csnd] athenaCL in Csound
Hi,

can someone see if this "python exception" is a python error or a csound
error or my error?
Here is the csd from the Csound Journal:

  

; Select audio/midi flags here according to platform
-odac    ;;;realtime audio out
;-iadc    ;;;uncomment -iadc if realtime audio input is needed too
; For Non-realtime ouput leave only the line below:
; -o athena.wav -W ;;; for file output any platform

 
sr     = 44100  
ksmps  = 100        
nchnls = 2

pyinit  
pyruni {{ 
from athenaCL.libATH.libPmtr import parameter 
fq = parameter.factory(["waveSine", "time", 2, 0, 100, 400]) 
}}  

instr 100 
   iStart = p2 
   iDur = p3 
   iAmp = ampdbfs(p4) 

   kPhaseRt    line      iStart, iDur, iStart+iDur 
   kPhaseEv    line      0, iDur, iDur               

   kFq         pycall1   "fq", kPhaseEv 
   aSig        oscili    iAmp, kFq, 1 
               outs       aSig, aSig  
endin 
  

  
f1    0 16384 10 1     
i100  0 10 -18 
  
  

and here is the some of the output:

Parsing successful!
Elapsed time at end of orchestra compile: real: 0.055s, CPU: 0.010s
Sorting score
Elapsed time at end of score sort: real: 0.062s, CPU: 0.010s
The available MIDI out devices are:
   0: Midi Through Port-0 (ALSA)
   1: M Audio Audiophile 24/96 MIDI (ALSA)
....
displays suppressed
sample rate overrides: esr = 48000.0000, ekr = 1500.0000, ksmps = 32
0dBFS level = 32768.0
INIT ERROR in instr 0: pyruni: python exception
	pyruni	" 
from athenaCL.libATH.libPmtr import parameter 
fq = parameter.factory(["waveSine", "time", 2, 0, 100, 400]) 
"	
Traceback (most recent call last):
  File "", line 2, in 
ImportError: No module named athenaCL.libATH.libPmtr
header init errors
inactive allocs returned to freespace
end of score.		   overall amps:      0.0      0.0
	   overall samples out of range:        0        0
2 errors in performance
Elapsed time at end of performance: real: 0.419s, CPU: 0.090s
menno@xubuntu:/usr/bin$ 








--
View this message in context: http://csound.1045644.n5.nabble.com/athenaCL-in-Csound-tp5719206.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2013-01-05 20:04
FromMichael Gogins
SubjectRe: [Csnd] athenaCL in Csound
Make sure you can execute your snippet of pyruni code in regular Python in the same environment you are running Csound from. Probably the athenaCL package is not in the PYTHONPATH, or else the import statement is incorrect.

If the snippet executes from Python and the import statement is correct, then athenaCL is trying to grab something that Csound already has grabbed. In that case, you will need to pass appropriate options to athenaCL, or even modify its code.

Hope this helps,
Mike


On Sat, Jan 5, 2013 at 2:58 PM, menno <nabob_cd@yahoo.com> wrote:
Hi,

can someone see if this "python exception" is a python error or a csound
error or my error?
Here is the csd from the Csound Journal:

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
-odac    ;;;realtime audio out
;-iadc    ;;;uncomment -iadc if realtime audio input is needed too
; For Non-realtime ouput leave only the line below:
; -o athena.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>
sr     = 44100
ksmps  = 100
nchnls = 2

pyinit
pyruni {{
from athenaCL.libATH.libPmtr import parameter
fq = parameter.factory(["waveSine", "time", 2, 0, 100, 400])
}}

instr 100
   iStart = p2
   iDur = p3
   iAmp = ampdbfs(p4)

   kPhaseRt    line      iStart, iDur, iStart+iDur
   kPhaseEv    line      0, iDur, iDur

   kFq         pycall1   "fq", kPhaseEv
   aSig        oscili    iAmp, kFq, 1
               outs       aSig, aSig
endin
</CsInstruments>

<CsScore>
f1    0 16384 10 1
i100  0 10 -18
</CsScore>
</CsoundSynthesizer>

and here is the some of the output:

Parsing successful!
Elapsed time at end of orchestra compile: real: 0.055s, CPU: 0.010s
Sorting score
Elapsed time at end of score sort: real: 0.062s, CPU: 0.010s
The available MIDI out devices are:
   0: Midi Through Port-0 (ALSA)
   1: M Audio Audiophile 24/96 MIDI (ALSA)
....
displays suppressed
sample rate overrides: esr = 48000.0000, ekr = 1500.0000, ksmps = 32
0dBFS level = 32768.0
INIT ERROR in instr 0: pyruni: python exception
        pyruni  "
from athenaCL.libATH.libPmtr import parameter
fq = parameter.factory(["waveSine", "time", 2, 0, 100, 400])
"
Traceback (most recent call last):
  File "<string>", line 2, in <module>
ImportError: No module named athenaCL.libATH.libPmtr
header init errors
inactive allocs returned to freespace
end of score.              overall amps:      0.0      0.0
           overall samples out of range:        0        0
2 errors in performance
Elapsed time at end of performance: real: 0.419s, CPU: 0.090s
menno@xubuntu:/usr/bin$








--
View this message in context: http://csound.1045644.n5.nabble.com/athenaCL-in-Csound-tp5719206.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"




--
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com

Date2013-01-05 20:09
FromVictor Lazzarini
SubjectRe: [Csnd] athenaCL in Csound
It's a Python error, the athenaCL python module cannot be found
ImportError: No module named athenaCL.libATH.libPmtr

maybe it's not installed?

Victor
On 5 Jan 2013, at 19:58, menno wrote:

> Hi,
> 
> can someone see if this "python exception" is a python error or a csound
> error or my error?
> Here is the csd from the Csound Journal:
> 
>   
> 
> ; Select audio/midi flags here according to platform
> -odac    ;;;realtime audio out
> ;-iadc    ;;;uncomment -iadc if realtime audio input is needed too
> ; For Non-realtime ouput leave only the line below:
> ; -o athena.wav -W ;;; for file output any platform
> 
>  
> sr     = 44100  
> ksmps  = 100        
> nchnls = 2
> 
> pyinit  
> pyruni {{ 
> from athenaCL.libATH.libPmtr import parameter 
> fq = parameter.factory(["waveSine", "time", 2, 0, 100, 400]) 
> }}  
> 
> instr 100 
>   iStart = p2 
>   iDur = p3 
>   iAmp = ampdbfs(p4) 
> 
>   kPhaseRt    line      iStart, iDur, iStart+iDur 
>   kPhaseEv    line      0, iDur, iDur               
> 
>   kFq         pycall1   "fq", kPhaseEv 
>   aSig        oscili    iAmp, kFq, 1 
>               outs       aSig, aSig  
> endin 
>   
> 
>   
> f1    0 16384 10 1     
> i100  0 10 -18 
>   
>   
> 
> and here is the some of the output:
> 
> Parsing successful!
> Elapsed time at end of orchestra compile: real: 0.055s, CPU: 0.010s
> Sorting score
> Elapsed time at end of score sort: real: 0.062s, CPU: 0.010s
> The available MIDI out devices are:
>   0: Midi Through Port-0 (ALSA)
>   1: M Audio Audiophile 24/96 MIDI (ALSA)
> ....
> displays suppressed
> sample rate overrides: esr = 48000.0000, ekr = 1500.0000, ksmps = 32
> 0dBFS level = 32768.0
> INIT ERROR in instr 0: pyruni: python exception
> 	pyruni	" 
> from athenaCL.libATH.libPmtr import parameter 
> fq = parameter.factory(["waveSine", "time", 2, 0, 100, 400]) 
> "	
> Traceback (most recent call last):
>  File "", line 2, in 
> ImportError: No module named athenaCL.libATH.libPmtr
> header init errors
> inactive allocs returned to freespace
> end of score.		   overall amps:      0.0      0.0
> 	   overall samples out of range:        0        0
> 2 errors in performance
> Elapsed time at end of performance: real: 0.419s, CPU: 0.090s
> menno@xubuntu:/usr/bin$ 
> 
> 
> 
> 
> 
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/athenaCL-in-Csound-tp5719206.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-01-05 20:56
Frommenno
Subject[Csnd] Re: athenaCL in Csound
PYTHONPATH was not set correctly
it works now  - thanks for the help

bye



--
View this message in context: http://csound.1045644.n5.nabble.com/athenaCL-in-Csound-tp5719206p5719209.html
Sent from the Csound - General mailing list archive at Nabble.com.