Csound Csound-dev Csound-tekno Search About

[Csnd] Pyexec problem.

Date2009-09-19 11:39
Fromsounddesign3003@mail.ru
Subject[Csnd] Pyexec problem.
Hello!
What i'am doing wrong.
I have two files in same folder.






sr          =           44100
kr                      =                       441
ksmps       =           100
nchnls      =           1
                pyinit
                pyruni "import random"
                pyexeci  "py2.py"                       
instr 1
kcps    pycall "get_rand",32.0
aout    oscil 10000,kcps,1
                out aout


endin



f 1 0 16384 10 1
i 1 0 2





AND PYTHON FILE "py2.py"

def get_rand (x):
        return random.random ()*x

AND CSOUND OUTPUT:


            time resolution is 279.365 ns
PortMIDI real time MIDI plugin for Csound
PortAudio real-time audio module for Csound
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
Csound version 5.10 beta (float samples) Jan  8 2009
libsndfile-1.0.18pre24
Reading options from $CSOUNDRC: C:\Program Files\Csound\.csoundrc 
UnifiedCSD:  D:\!csplay\PY2_GE~1.CSD
STARTING FILE
Creating options
Creating orchestra
Creating score
orchname:  C:\DOCUME~1\athlon\LOCALS~1\Temp\cs31.orc
scorename: C:\DOCUME~1\athlon\LOCALS~1\Temp\cs32.sco
rtaudio: PortAudio module enabled ... using callback interface
rtmidi: PortMIDI module enabled
orch compiler:
14 lines read
        instr   1       
error:  illegal no of output args, line 20:
kcps    pycall "get_rand",32.0
1 syntax errors in orchestra.  compilation invalid
Csound tidy up: Segmentation violation


It's seems that pyexeci don't work or what...




-- 
С уважением,
 Sounddesign3003                          mailto:sounddesign3003@mail.ru



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-09-19 12:13
Fromvictor
Subject[Csnd] Re: Pyexec problem.
I think you want to use pycall1 instead.

Victor
----- Original Message ----- 
From: 
To: "csound" 
Sent: Saturday, September 19, 2009 11:39 AM
Subject: [Csnd] Pyexec problem.


Hello!
What i'am doing wrong.
I have two files in same folder.






sr          =           44100
kr                      =                       441
ksmps       =           100
nchnls      =           1
                pyinit
                pyruni "import random"
                pyexeci  "py2.py"
instr 1
kcps    pycall "get_rand",32.0
aout    oscil 10000,kcps,1
                out aout


endin



f 1 0 16384 10 1
i 1 0 2





AND PYTHON FILE "py2.py"

def get_rand (x):
        return random.random ()*x

AND CSOUND OUTPUT:


            time resolution is 279.365 ns
PortMIDI real time MIDI plugin for Csound
PortAudio real-time audio module for Csound
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
Csound version 5.10 beta (float samples) Jan  8 2009
libsndfile-1.0.18pre24
Reading options from $CSOUNDRC: C:\Program Files\Csound\.csoundrc
UnifiedCSD:  D:\!csplay\PY2_GE~1.CSD
STARTING FILE
Creating options
Creating orchestra
Creating score
orchname:  C:\DOCUME~1\athlon\LOCALS~1\Temp\cs31.orc
scorename: C:\DOCUME~1\athlon\LOCALS~1\Temp\cs32.sco
rtaudio: PortAudio module enabled ... using callback interface
rtmidi: PortMIDI module enabled
orch compiler:
14 lines read
        instr   1
error:  illegal no of output args, line 20:
kcps    pycall "get_rand",32.0
1 syntax errors in orchestra.  compilation invalid
Csound tidy up: Segmentation violation


It's seems that pyexeci don't work or what...



Date2009-09-19 17:19
Fromsounddesign3003@mail.ru
Subject[Csnd] Re: Re: Pyexec problem.
Здравствуйте, victor.

So why have not to use PYEXEC ?




> I think you want to use pycall1 instead.

> Victor
> ----- Original Message ----- 
> From: 
> To: "csound" 
> Sent: Saturday, September 19, 2009 11:39 AM
> Subject: [Csnd] Pyexec problem.


> Hello!
> What i'am doing wrong.
> I have two files in same folder.

> 
> 

> 
> 
> sr          =           44100
> kr                      =                       441
> ksmps       =           100
> nchnls      =           1
>                 pyinit
>                 pyruni "import random"
>                 pyexeci  "py2.py"
> instr 1
> kcps    pycall "get_rand",32.0
> aout    oscil 10000,kcps,1
>                 out aout


> endin
> 
> 

> f 1 0 16384 10 1
> i 1 0 2

> 
> 


> AND PYTHON FILE "py2.py"

> def get_rand (x):
>         return random.random ()*x

> AND CSOUND OUTPUT:


>             time resolution is 279.365 ns
> PortMIDI real time MIDI plugin for Csound
> PortAudio real-time audio module for Csound
> virtual_keyboard real time MIDI plugin for Csound
> 0dBFS level = 32768.0
> Csound version 5.10 beta (float samples) Jan  8 2009
> libsndfile-1.0.18pre24
> Reading options from $CSOUNDRC: C:\Program Files\Csound\.csoundrc
> UnifiedCSD:  D:\!csplay\PY2_GE~1.CSD
> STARTING FILE
> Creating options
> Creating orchestra
> Creating score
> orchname:  C:\DOCUME~1\athlon\LOCALS~1\Temp\cs31.orc
> scorename: C:\DOCUME~1\athlon\LOCALS~1\Temp\cs32.sco
> rtaudio: PortAudio module enabled ... using callback interface
> rtmidi: PortMIDI module enabled
> orch compiler:
> 14 lines read
>         instr   1
> error:  illegal no of output args, line 20:
> kcps    pycall "get_rand",32.0
> 1 syntax errors in orchestra.  compilation invalid
> Csound tidy up: Segmentation violation


> It's seems that pyexeci don't work or what...







-- 
С уважением,
 Sounddesign3003                          mailto:sounddesign3003@mail.ru



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-09-19 17:39
Fromvictor
Subject[Csnd] Re: Re: Re: Pyexec problem.
No, what I meant was that 'pycall' does not have any output
arguments. The opcode 'pycall1' has 1 output and that seems to
be what you want.

Victor
----- Original Message ----- 
From: 
To: "victor" 
Sent: Saturday, September 19, 2009 5:19 PM
Subject: [Csnd] Re: Re: Pyexec problem.


Здравствуйте, victor.

So why have not to use PYEXEC ?




> I think you want to use pycall1 instead.

> Victor
> ----- Original Message ----- 
> From: 
> To: "csound" 
> Sent: Saturday, September 19, 2009 11:39 AM
> Subject: [Csnd] Pyexec problem.


> Hello!
> What i'am doing wrong.
> I have two files in same folder.

> 
> 

> 
> 
> sr          =           44100
> kr                      =                       441
> ksmps       =           100
> nchnls      =           1
>                 pyinit
>                 pyruni "import random"
>                 pyexeci  "py2.py"
> instr 1
> kcps    pycall "get_rand",32.0
> aout    oscil 10000,kcps,1
>                 out aout


> endin
> 
> 

> f 1 0 16384 10 1
> i 1 0 2

> 
> 


> AND PYTHON FILE "py2.py"

> def get_rand (x):
>         return random.random ()*x

> AND CSOUND OUTPUT:


>             time resolution is 279.365 ns
> PortMIDI real time MIDI plugin for Csound
> PortAudio real-time audio module for Csound
> virtual_keyboard real time MIDI plugin for Csound
> 0dBFS level = 32768.0
> Csound version 5.10 beta (float samples) Jan  8 2009
> libsndfile-1.0.18pre24
> Reading options from $CSOUNDRC: C:\Program Files\Csound\.csoundrc
> UnifiedCSD:  D:\!csplay\PY2_GE~1.CSD
> STARTING FILE
> Creating options
> Creating orchestra
> Creating score
> orchname:  C:\DOCUME~1\athlon\LOCALS~1\Temp\cs31.orc
> scorename: C:\DOCUME~1\athlon\LOCALS~1\Temp\cs32.sco
> rtaudio: PortAudio module enabled ... using callback interface
> rtmidi: PortMIDI module enabled
> orch compiler:
> 14 lines read
>         instr   1
> error:  illegal no of output args, line 20:
> kcps    pycall "get_rand",32.0
> 1 syntax errors in orchestra.  compilation invalid
> Csound tidy up: Segmentation violation


> It's seems that pyexeci don't work or what...






Date2009-09-19 18:09
Fromsounddesign3003@mail.ru
Subject[Csnd] Re: Re: Re: Re: Pyexec problem.
Здравствуйте, victor.
Do you try to run it?
I replace 'pycall' with 'pycall1' and it's still dont work.
Is 'pyexeci' work ok?


time resolution is 279.365 ns
PortMIDI real time MIDI plugin for Csound
PortAudio real-time audio module for Csound
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
Csound version 5.10 beta (float samples) Jan  8 2009
libsndfile-1.0.18pre24
Reading options from $CSOUNDRC: C:\Program Files\Csound\.csoundrc 
UnifiedCSD:  D:\!csplay\PY2_GE~1.CSD
STARTING FILE
Creating options
Creating orchestra
Creating score
orchname:  C:\DOCUME~1\athlon\LOCALS~1\Temp\cs75.orc
scorename: C:\DOCUME~1\athlon\LOCALS~1\Temp\cs76.sco
rtaudio: PortAudio module enabled ... using callback interface
rtmidi: PortMIDI module enabled
orch compiler:
12 lines read
        instr   1       
Elapsed time at end of orchestra compile: real: 0.029s, CPU: 0.032s
sorting score ...
        ... done
Elapsed time at end of score sort: real: 0.030s, CPU: 0.032s
Csound version 5.10 beta (float samples) Jan  8 2009
displays suppressed
0dBFS level = 32768.0
Csound tidy up: Segmentation violation
inactive allocs returned to freespace
end of score.              overall amps:      0.0
           overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.357s, CPU: 0.360s



Вы писали 19 сентября 2009 г., 19:39:33:

> No, what I meant was that 'pycall' does not have any output
> arguments. The opcode 'pycall1' has 1 output and that seems to
> be what you want.





Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-09-19 18:35
Fromvictor
Subject[Csnd] Re: Re: Re: Re: Re: Pyexec problem.
This works

               pyinit
               pyruni  "import random"
               pyruni "def get_rand(x): return random.random()*x"
instr 1

kcps    pycall1 "get_rand",32.0
aout    oscil 10000,kcps,1
                out aout
endin


----- Original Message ----- 
From: 
To: "victor" 
Sent: Saturday, September 19, 2009 6:09 PM
Subject: [Csnd] Re: Re: Re: Re: Pyexec problem.


Здравствуйте, victor.
Do you try to run it?
I replace 'pycall' with 'pycall1' and it's still dont work.
Is 'pyexeci' work ok?


time resolution is 279.365 ns
PortMIDI real time MIDI plugin for Csound
PortAudio real-time audio module for Csound
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
Csound version 5.10 beta (float samples) Jan  8 2009
libsndfile-1.0.18pre24
Reading options from $CSOUNDRC: C:\Program Files\Csound\.csoundrc
UnifiedCSD:  D:\!csplay\PY2_GE~1.CSD
STARTING FILE
Creating options
Creating orchestra
Creating score
orchname:  C:\DOCUME~1\athlon\LOCALS~1\Temp\cs75.orc
scorename: C:\DOCUME~1\athlon\LOCALS~1\Temp\cs76.sco
rtaudio: PortAudio module enabled ... using callback interface
rtmidi: PortMIDI module enabled
orch compiler:
12 lines read
        instr   1
Elapsed time at end of orchestra compile: real: 0.029s, CPU: 0.032s
sorting score ...
        ... done
Elapsed time at end of score sort: real: 0.030s, CPU: 0.032s
Csound version 5.10 beta (float samples) Jan  8 2009
displays suppressed
0dBFS level = 32768.0
Csound tidy up: Segmentation violation
inactive allocs returned to freespace
end of score.              overall amps:      0.0
           overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.357s, CPU: 0.360s



Вы писали 19 сентября 2009 г., 19:39:33:

> No, what I meant was that 'pycall' does not have any output
> arguments. The opcode 'pycall1' has 1 output and that seems to
> be what you want.





Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
csound"= 



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-09-19 18:43
Fromsounddesign3003@mail.ru
Subject[Csnd] Re: Re: Re: Re: Re: Re: Pyexec problem.
Здравствуйте, victor.

Can  you just tell HOW to load external file. I don't wont to write in
solid  mix of text. How can editor make normal highlithing for all this
shit?  And python tabs... Can  I  just load external file (which for example contain 25 def's and
a lot of other shit)?


Вы писали 19 сентября 2009 г., 20:35:28:

> This works

>                pyinit
>                pyruni  "import random"
>                pyruni "def get_rand(x): return random.random()*x"
> instr 1

> kcps    pycall1 "get_rand",32.0
> aout    oscil 10000,kcps,1
>                 out aout
> endin


> ----- Original Message ----- 
> From: 
> To: "victor" 
> Sent: Saturday, September 19, 2009 6:09 PM
> Subject: [Csnd] Re: Re: Re: Re: Pyexec problem.


> Здравствуйте, victor.
> Do you try to run it?
> I replace 'pycall' with 'pycall1' and it's still dont work.
> Is 'pyexeci' work ok?


> time resolution is 279.365 ns
> PortMIDI real time MIDI plugin for Csound
> PortAudio real-time audio module for Csound
> virtual_keyboard real time MIDI plugin for Csound
> 0dBFS level = 32768.0
> Csound version 5.10 beta (float samples) Jan  8 2009
> libsndfile-1.0.18pre24
> Reading options from $CSOUNDRC: C:\Program Files\Csound\.csoundrc
> UnifiedCSD:  D:\!csplay\PY2_GE~1.CSD
> STARTING FILE
> Creating options
> Creating orchestra
> Creating score
> orchname:  C:\DOCUME~1\athlon\LOCALS~1\Temp\cs75.orc
> scorename: C:\DOCUME~1\athlon\LOCALS~1\Temp\cs76.sco
> rtaudio: PortAudio module enabled ... using callback interface
> rtmidi: PortMIDI module enabled
> orch compiler:
> 12 lines read
>         instr   1
> Elapsed time at end of orchestra compile: real: 0.029s, CPU: 0.032s
> sorting score ...
>         ... done
> Elapsed time at end of score sort: real: 0.030s, CPU: 0.032s
> Csound version 5.10 beta (float samples) Jan  8 2009
> displays suppressed
> 0dBFS level = 32768.0
> Csound tidy up: Segmentation violation
> inactive allocs returned to freespace
> end of score.              overall amps:      0.0
>            overall samples out of range:        0
> 0 errors in performance
> Elapsed time at end of performance: real: 0.357s, CPU: 0.360s



> Вы писали 19 сентября 2009 г., 19:39:33:

>> No, what I meant was that 'pycall' does not have any output
>> arguments. The opcode 'pycall1' has 1 output and that seems to
>> be what you want.





> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"= 



> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




-- 
С уважением,
 Sounddesign3003                          mailto:sounddesign3003@mail.ru



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-09-19 18:53
Fromvictor
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: Pyexec problem.
Well, this should be done with pyexec, but by the looks of it, it's broken. 
I bet
it's the call to PyRun_File() that is crashing csound, but it's the first 
time I look at
the code. Perhaps someone else (Michael?) would like to chip in?

Victor
----- Original Message ----- 
From: 
To: "victor" 
Sent: Saturday, September 19, 2009 6:43 PM
Subject: [Csnd] Re: Re: Re: Re: Re: Re: Pyexec problem.


Здравствуйте, victor.

Can  you just tell HOW to load external file. I don't wont to write in
solid  mix of text. How can editor make normal highlithing for all this
shit?  And python tabs... Can  I  just load external file (which for example 
contain 25 def's and
a lot of other shit)?


Вы писали 19 сентября 2009 г., 20:35:28:

> This works

>                pyinit
>                pyruni  "import random"
>                pyruni "def get_rand(x): return random.random()*x"
> instr 1

> kcps    pycall1 "get_rand",32.0
> aout    oscil 10000,kcps,1
>                 out aout
> endin


> ----- Original Message ----- 
> From: 
> To: "victor" 
> Sent: Saturday, September 19, 2009 6:09 PM
> Subject: [Csnd] Re: Re: Re: Re: Pyexec problem.


> Здравствуйте, victor.
> Do you try to run it?
> I replace 'pycall' with 'pycall1' and it's still dont work.
> Is 'pyexeci' work ok?


> time resolution is 279.365 ns
> PortMIDI real time MIDI plugin for Csound
> PortAudio real-time audio module for Csound
> virtual_keyboard real time MIDI plugin for Csound
> 0dBFS level = 32768.0
> Csound version 5.10 beta (float samples) Jan  8 2009
> libsndfile-1.0.18pre24
> Reading options from $CSOUNDRC: C:\Program Files\Csound\.csoundrc
> UnifiedCSD:  D:\!csplay\PY2_GE~1.CSD
> STARTING FILE
> Creating options
> Creating orchestra
> Creating score
> orchname:  C:\DOCUME~1\athlon\LOCALS~1\Temp\cs75.orc
> scorename: C:\DOCUME~1\athlon\LOCALS~1\Temp\cs76.sco
> rtaudio: PortAudio module enabled ... using callback interface
> rtmidi: PortMIDI module enabled
> orch compiler:
> 12 lines read
>         instr   1
> Elapsed time at end of orchestra compile: real: 0.029s, CPU: 0.032s
> sorting score ...
>         ... done
> Elapsed time at end of score sort: real: 0.030s, CPU: 0.032s
> Csound version 5.10 beta (float samples) Jan  8 2009
> displays suppressed
> 0dBFS level = 32768.0
> Csound tidy up: Segmentation violation
> inactive allocs returned to freespace
> end of score.              overall amps:      0.0
>            overall samples out of range:        0
> 0 errors in performance
> Elapsed time at end of performance: real: 0.357s, CPU: 0.360s



> Вы писали 19 сентября 2009 г., 19:39:33:

>> No, what I meant was that 'pycall' does not have any output
>> arguments. The opcode 'pycall1' has 1 output and that seems to
>> be what you want.





> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"=



> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
> csound"