Csound Csound-dev Csound-tekno Search About

[Csnd] problem with python opcodes

Date2020-11-02 21:15
FromStefan Thomas
Subject[Csnd] problem with python opcodes
Dear communty,
I have a problem with pyrun and pyruni opcodes. The following patch is more or less the same as https://csound.com/docs/manual/pyrun.html
When I run the patch I get an error messages:
0dBFS level = 32768.0
--Csound version 6.14 (double samples) May  1 2020
[commit: d412a4d95fa545f32b187d5b3e2ed78035cd3108]
libsndfile-1.0.28
Reading options from $HOME/.csound6rc
WARNING: [mcould not open library '/usr/local/lib/csound/plugins64-6.0/libpy.so' (/usr/local/lib/csound/plugins64-6.0/libpy.so: undefined symbol: PyFile_AsFile) [m
[mUnifiedCSD:  pythontest.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled

error: syntax error, unexpected NEWLINE  (token "
") from file pythontest.csd (1)
 line 12:
>>>pyinit <<<
Unexpected untyped word pyinit when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure [m
[mcannot compile orchestra [m
[mend of score.   overall amps:      0.0
  overall samples out of range:        0
1 errors in performance
Does someone know, how I can get that patch running?
Here is the patch:
<CsoundSynthesizer>
<CsOptions>
-odac  -m0d
</CsOptions>
; ==============================================
<CsInstruments>

sr = 44100
;ksmps = 100
nchnls = 1
0dbfs = 1
pyinit
pyruni "import random"
instr 1
  ; This message is stored in the main namespace
        ; and is the same for every instance
        pyruni  "message = 'a global random number: %f' % random.random()"
        pyrun   "print message"

        ; This message is stored in the private namespace
        ; and is different for different instances
        pylruni "message = 'a private random number: %f' % random.random()"
        pylrun  "print message"
endin

</CsInstruments>
; ==============================================
<CsScore>
i1 0 0.1
</CsScore>
</CsoundSynthesizer>



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-11-02 21:20
FromTarmo Johannes
SubjectRe: [Csnd] problem with python opcodes
Hi!

Is your Csound built with Python support? Can you see any python opcodes when you run
csound -z
?

tarmo

Kontakt Stefan Thomas (<kontrapunktstefan@gmail.com>) kirjutas kuupäeval E, 2. november 2020 kell 23:15:
Dear communty,
I have a problem with pyrun and pyruni opcodes. The following patch is more or less the same as https://csound.com/docs/manual/pyrun.html
When I run the patch I get an error messages:
0dBFS level = 32768.0
--Csound version 6.14 (double samples) May  1 2020
[commit: d412a4d95fa545f32b187d5b3e2ed78035cd3108]
libsndfile-1.0.28
Reading options from $HOME/.csound6rc
WARNING: [mcould not open library '/usr/local/lib/csound/plugins64-6.0/libpy.so' (/usr/local/lib/csound/plugins64-6.0/libpy.so: undefined symbol: PyFile_AsFile) [m
[mUnifiedCSD:  pythontest.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled

error: syntax error, unexpected NEWLINE  (token "
") from file pythontest.csd (1)
 line 12:
>>>pyinit <<<
Unexpected untyped word pyinit when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure [m
[mcannot compile orchestra [m
[mend of score.   overall amps:      0.0
  overall samples out of range:        0
1 errors in performance
Does someone know, how I can get that patch running?
Here is the patch:
<CsoundSynthesizer>
<CsOptions>
-odac  -m0d
</CsOptions>
; ==============================================
<CsInstruments>

sr = 44100
;ksmps = 100
nchnls = 1
0dbfs = 1
pyinit
pyruni "import random"
instr 1
  ; This message is stored in the main namespace
        ; and is the same for every instance
        pyruni  "message = 'a global random number: %f' % random.random()"
        pyrun   "print message"

        ; This message is stored in the private namespace
        ; and is different for different instances
        pylruni "message = 'a private random number: %f' % random.random()"
        pylrun  "print message"
endin

</CsInstruments>
; ==============================================
<CsScore>
i1 0 0.1
</CsScore>
</CsoundSynthesizer>



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-11-02 21:36
FromStefan Thomas
SubjectRe: [Csnd] problem with python opcodes
Dear Tarmo,
thanks for Your reply.
You are right, csound is installed without python opcodes.
How can I do this?
Stefan

Am Mo., 2. Nov. 2020 um 22:20 Uhr schrieb Tarmo Johannes <trmjhnns@gmail.com>:
Hi!

Is your Csound built with Python support? Can you see any python opcodes when you run
csound -z
?

tarmo

Kontakt Stefan Thomas (<kontrapunktstefan@gmail.com>) kirjutas kuupäeval E, 2. november 2020 kell 23:15:
Dear communty,
I have a problem with pyrun and pyruni opcodes. The following patch is more or less the same as https://csound.com/docs/manual/pyrun.html
When I run the patch I get an error messages:
0dBFS level = 32768.0
--Csound version 6.14 (double samples) May  1 2020
[commit: d412a4d95fa545f32b187d5b3e2ed78035cd3108]
libsndfile-1.0.28
Reading options from $HOME/.csound6rc
WARNING: [mcould not open library '/usr/local/lib/csound/plugins64-6.0/libpy.so' (/usr/local/lib/csound/plugins64-6.0/libpy.so: undefined symbol: PyFile_AsFile) [m
[mUnifiedCSD:  pythontest.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled

error: syntax error, unexpected NEWLINE  (token "
") from file pythontest.csd (1)
 line 12:
>>>pyinit <<<
Unexpected untyped word pyinit when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure [m
[mcannot compile orchestra [m
[mend of score.   overall amps:      0.0
  overall samples out of range:        0
1 errors in performance
Does someone know, how I can get that patch running?
Here is the patch:
<CsoundSynthesizer>
<CsOptions>
-odac  -m0d
</CsOptions>
; ==============================================
<CsInstruments>

sr = 44100
;ksmps = 100
nchnls = 1
0dbfs = 1
pyinit
pyruni "import random"
instr 1
  ; This message is stored in the main namespace
        ; and is the same for every instance
        pyruni  "message = 'a global random number: %f' % random.random()"
        pyrun   "print message"

        ; This message is stored in the private namespace
        ; and is different for different instances
        pylruni "message = 'a private random number: %f' % random.random()"
        pylrun  "print message"
endin

</CsInstruments>
; ==============================================
<CsScore>
i1 0 0.1
</CsScore>
</CsoundSynthesizer>



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-11-03 07:17
FromTarmo Johannes
SubjectRe: [Csnd] problem with python opcodes
AttachmentsNone  None  

Date2020-11-03 07:47
FromFrancois PINOT
SubjectRe: [Csnd] problem with python opcodes
Hello,

Actually the Python opcodes in the Csound sources are obsolete because they're intended to be used with Python 2.x which is no longer supported since January 1st, 2020. I did a Python3 port of these opcodes here: https://github.com/csound/plugins. You can clone this repo in your system and build the Python opcodes from this plugin repository.

Regards

François

Le mar. 3 nov. 2020 à 08:17, Tarmo Johannes <trmjhnns@gmail.com> a écrit :
Hi,

First you need to install python development packages and then make sure building python opcodes is enabled in the cmake configuration. I think it is easiest to do with cmake-gui (assuming you are on Linux), usually:
$ cmake-gui ../
from your build directory

Hope it helps!
tarmo


On Nov 2 2020, at 11:36 pm, Stefan Thomas <kontrapunktstefan@gmail.com> wrote:
Dear Tarmo,
thanks for Your reply.
You are right, csound is installed without python opcodes.
How can I do this?
Stefan

Sent from Mailspring
Am Mo., 2. Nov. 2020 um 22:20 Uhr schrieb Tarmo Johannes <trmjhnns@gmail.com>:
Hi!

Is your Csound built with Python support? Can you see any python opcodes when you run
csound -z
?

tarmo

Kontakt Stefan Thomas (<kontrapunktstefan@gmail.com>) kirjutas kuupäeval E, 2. november 2020 kell 23:15:
Dear communty,
I have a problem with pyrun and pyruni opcodes. The following patch is more or less the same as https://csound.com/docs/manual/pyrun.html
When I run the patch I get an error messages:
0dBFS level = 32768.0
--Csound version 6.14 (double samples) May  1 2020
[commit: d412a4d95fa545f32b187d5b3e2ed78035cd3108]
libsndfile-1.0.28
Reading options from $HOME/.csound6rc
WARNING: [mcould not open library '/usr/local/lib/csound/plugins64-6.0/libpy.so' (/usr/local/lib/csound/plugins64-6.0/libpy.so: undefined symbol: PyFile_AsFile) [m
[mUnifiedCSD:  pythontest.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled

error: syntax error, unexpected NEWLINE  (token "
") from file pythontest.csd (1)
 line 12:
>>>pyinit <<<
Unexpected untyped word pyinit when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure [m
[mcannot compile orchestra [m
[mend of score.   overall amps:      0.0
  overall samples out of range:        0
1 errors in performance
Does someone know, how I can get that patch running?
Here is the patch:
<CsoundSynthesizer>
<CsOptions>
-odac  -m0d
</CsOptions>
; ==============================================
<CsInstruments>

sr = 44100
;ksmps = 100
nchnls = 1
0dbfs = 1
pyinit
pyruni "import random"
instr 1
  ; This message is stored in the main namespace
        ; and is the same for every instance
        pyruni  "message = 'a global random number: %f' % random.random()"
        pyrun   "print message"

        ; This message is stored in the private namespace
        ; and is different for different instances
        pylruni "message = 'a private random number: %f' % random.random()"
        pylrun  "print message"
endin

</CsInstruments>
; ==============================================
<CsScore>
i1 0 0.1
</CsScore>
</CsoundSynthesizer>



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-11-03 11:48
FromPeter Burgess
SubjectRe: [Csnd] problem with python opcodes
That's awesome! I've hoped for python 3 support in Csound for ages. Python 3 already existed when I started learning Python years back, so it felt like devolution when I tried to use python in Csound recently

On Tue, 3 Nov 2020, 07:48 Francois PINOT, <fggpinot@gmail.com> wrote:
Hello,

Actually the Python opcodes in the Csound sources are obsolete because they're intended to be used with Python 2.x which is no longer supported since January 1st, 2020. I did a Python3 port of these opcodes here: https://github.com/csound/plugins. You can clone this repo in your system and build the Python opcodes from this plugin repository.

Regards

François

Le mar. 3 nov. 2020 à 08:17, Tarmo Johannes <trmjhnns@gmail.com> a écrit :
Hi,

First you need to install python development packages and then make sure building python opcodes is enabled in the cmake configuration. I think it is easiest to do with cmake-gui (assuming you are on Linux), usually:
$ cmake-gui ../
from your build directory

Hope it helps!
tarmo


On Nov 2 2020, at 11:36 pm, Stefan Thomas <kontrapunktstefan@gmail.com> wrote:
Dear Tarmo,
thanks for Your reply.
You are right, csound is installed without python opcodes.
How can I do this?
Stefan

Sent from Mailspring
Am Mo., 2. Nov. 2020 um 22:20 Uhr schrieb Tarmo Johannes <trmjhnns@gmail.com>:
Hi!

Is your Csound built with Python support? Can you see any python opcodes when you run
csound -z
?

tarmo

Kontakt Stefan Thomas (<kontrapunktstefan@gmail.com>) kirjutas kuupäeval E, 2. november 2020 kell 23:15:
Dear communty,
I have a problem with pyrun and pyruni opcodes. The following patch is more or less the same as https://csound.com/docs/manual/pyrun.html
When I run the patch I get an error messages:
0dBFS level = 32768.0
--Csound version 6.14 (double samples) May  1 2020
[commit: d412a4d95fa545f32b187d5b3e2ed78035cd3108]
libsndfile-1.0.28
Reading options from $HOME/.csound6rc
WARNING: [mcould not open library '/usr/local/lib/csound/plugins64-6.0/libpy.so' (/usr/local/lib/csound/plugins64-6.0/libpy.so: undefined symbol: PyFile_AsFile) [m
[mUnifiedCSD:  pythontest.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled

error: syntax error, unexpected NEWLINE  (token "
") from file pythontest.csd (1)
 line 12:
>>>pyinit <<<
Unexpected untyped word pyinit when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure [m
[mcannot compile orchestra [m
[mend of score.   overall amps:      0.0
  overall samples out of range:        0
1 errors in performance
Does someone know, how I can get that patch running?
Here is the patch:
<CsoundSynthesizer>
<CsOptions>
-odac  -m0d
</CsOptions>
; ==============================================
<CsInstruments>

sr = 44100
;ksmps = 100
nchnls = 1
0dbfs = 1
pyinit
pyruni "import random"
instr 1
  ; This message is stored in the main namespace
        ; and is the same for every instance
        pyruni  "message = 'a global random number: %f' % random.random()"
        pyrun   "print message"

        ; This message is stored in the private namespace
        ; and is different for different instances
        pylruni "message = 'a private random number: %f' % random.random()"
        pylrun  "print message"
endin

</CsInstruments>
; ==============================================
<CsScore>
i1 0 0.1
</CsScore>
</CsoundSynthesizer>



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-11-03 13:29
FromStefan Thomas
SubjectRe: [Csnd] problem with python opcodes
Thanks, I will try it out, as soon as possible!

Am Di., 3. Nov. 2020 um 08:17 Uhr schrieb Tarmo Johannes <trmjhnns@gmail.com>:
Hi,

First you need to install python development packages and then make sure building python opcodes is enabled in the cmake configuration. I think it is easiest to do with cmake-gui (assuming you are on Linux), usually:
$ cmake-gui ../
from your build directory

Hope it helps!
tarmo


On Nov 2 2020, at 11:36 pm, Stefan Thomas <kontrapunktstefan@gmail.com> wrote:
Dear Tarmo,
thanks for Your reply.
You are right, csound is installed without python opcodes.
How can I do this?
Stefan

Sent from Mailspring
Am Mo., 2. Nov. 2020 um 22:20 Uhr schrieb Tarmo Johannes <trmjhnns@gmail.com>:
Hi!

Is your Csound built with Python support? Can you see any python opcodes when you run
csound -z
?

tarmo

Kontakt Stefan Thomas (<kontrapunktstefan@gmail.com>) kirjutas kuupäeval E, 2. november 2020 kell 23:15:
Dear communty,
I have a problem with pyrun and pyruni opcodes. The following patch is more or less the same as https://csound.com/docs/manual/pyrun.html
When I run the patch I get an error messages:
0dBFS level = 32768.0
--Csound version 6.14 (double samples) May  1 2020
[commit: d412a4d95fa545f32b187d5b3e2ed78035cd3108]
libsndfile-1.0.28
Reading options from $HOME/.csound6rc
WARNING: [mcould not open library '/usr/local/lib/csound/plugins64-6.0/libpy.so' (/usr/local/lib/csound/plugins64-6.0/libpy.so: undefined symbol: PyFile_AsFile) [m
[mUnifiedCSD:  pythontest.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled

error: syntax error, unexpected NEWLINE  (token "
") from file pythontest.csd (1)
 line 12:
>>>pyinit <<<
Unexpected untyped word pyinit when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure [m
[mcannot compile orchestra [m
[mend of score.   overall amps:      0.0
  overall samples out of range:        0
1 errors in performance
Does someone know, how I can get that patch running?
Here is the patch:
<CsoundSynthesizer>
<CsOptions>
-odac  -m0d
</CsOptions>
; ==============================================
<CsInstruments>

sr = 44100
;ksmps = 100
nchnls = 1
0dbfs = 1
pyinit
pyruni "import random"
instr 1
  ; This message is stored in the main namespace
        ; and is the same for every instance
        pyruni  "message = 'a global random number: %f' % random.random()"
        pyrun   "print message"

        ; This message is stored in the private namespace
        ; and is different for different instances
        pylruni "message = 'a private random number: %f' % random.random()"
        pylrun  "print message"
endin

</CsInstruments>
; ==============================================
<CsScore>
i1 0 0.1
</CsScore>
</CsoundSynthesizer>



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-11-03 13:30
FromStefan Thomas
SubjectRe: [Csnd] problem with python opcodes
Oh, this seems really interesting. I also prefer python3!

Am Di., 3. Nov. 2020 um 08:48 Uhr schrieb Francois PINOT <fggpinot@gmail.com>:
Hello,

Actually the Python opcodes in the Csound sources are obsolete because they're intended to be used with Python 2.x which is no longer supported since January 1st, 2020. I did a Python3 port of these opcodes here: https://github.com/csound/plugins. You can clone this repo in your system and build the Python opcodes from this plugin repository.

Regards

François

Le mar. 3 nov. 2020 à 08:17, Tarmo Johannes <trmjhnns@gmail.com> a écrit :
Hi,

First you need to install python development packages and then make sure building python opcodes is enabled in the cmake configuration. I think it is easiest to do with cmake-gui (assuming you are on Linux), usually:
$ cmake-gui ../
from your build directory

Hope it helps!
tarmo


On Nov 2 2020, at 11:36 pm, Stefan Thomas <kontrapunktstefan@gmail.com> wrote:
Dear Tarmo,
thanks for Your reply.
You are right, csound is installed without python opcodes.
How can I do this?
Stefan

Sent from Mailspring
Am Mo., 2. Nov. 2020 um 22:20 Uhr schrieb Tarmo Johannes <trmjhnns@gmail.com>:
Hi!

Is your Csound built with Python support? Can you see any python opcodes when you run
csound -z
?

tarmo

Kontakt Stefan Thomas (<kontrapunktstefan@gmail.com>) kirjutas kuupäeval E, 2. november 2020 kell 23:15:
Dear communty,
I have a problem with pyrun and pyruni opcodes. The following patch is more or less the same as https://csound.com/docs/manual/pyrun.html
When I run the patch I get an error messages:
0dBFS level = 32768.0
--Csound version 6.14 (double samples) May  1 2020
[commit: d412a4d95fa545f32b187d5b3e2ed78035cd3108]
libsndfile-1.0.28
Reading options from $HOME/.csound6rc
WARNING: [mcould not open library '/usr/local/lib/csound/plugins64-6.0/libpy.so' (/usr/local/lib/csound/plugins64-6.0/libpy.so: undefined symbol: PyFile_AsFile) [m
[mUnifiedCSD:  pythontest.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled

error: syntax error, unexpected NEWLINE  (token "
") from file pythontest.csd (1)
 line 12:
>>>pyinit <<<
Unexpected untyped word pyinit when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure [m
[mcannot compile orchestra [m
[mend of score.   overall amps:      0.0
  overall samples out of range:        0
1 errors in performance
Does someone know, how I can get that patch running?
Here is the patch:
<CsoundSynthesizer>
<CsOptions>
-odac  -m0d
</CsOptions>
; ==============================================
<CsInstruments>

sr = 44100
;ksmps = 100
nchnls = 1
0dbfs = 1
pyinit
pyruni "import random"
instr 1
  ; This message is stored in the main namespace
        ; and is the same for every instance
        pyruni  "message = 'a global random number: %f' % random.random()"
        pyrun   "print message"

        ; This message is stored in the private namespace
        ; and is different for different instances
        pylruni "message = 'a private random number: %f' % random.random()"
        pylrun  "print message"
endin

</CsInstruments>
; ==============================================
<CsScore>
i1 0 0.1
</CsScore>
</CsoundSynthesizer>



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-11-05 16:58
FromRichard van Bemmelen
SubjectRe: [Csnd] problem with python opcodes
I followed the build instructions, but after that csound still had no Python opcodes...


Op di 3 nov. 2020 om 08:48 schreef Francois PINOT <fggpinot@gmail.com>:
Hello,

Actually the Python opcodes in the Csound sources are obsolete because they're intended to be used with Python 2.x which is no longer supported since January 1st, 2020. I did a Python3 port of these opcodes here: https://github.com/csound/plugins. You can clone this repo in your system and build the Python opcodes from this plugin repository.

Regards

François

Le mar. 3 nov. 2020 à 08:17, Tarmo Johannes <trmjhnns@gmail.com> a écrit :
Hi,

First you need to install python development packages and then make sure building python opcodes is enabled in the cmake configuration. I think it is easiest to do with cmake-gui (assuming you are on Linux), usually:
$ cmake-gui ../
from your build directory

Hope it helps!
tarmo


On Nov 2 2020, at 11:36 pm, Stefan Thomas <kontrapunktstefan@gmail.com> wrote:
Dear Tarmo,
thanks for Your reply.
You are right, csound is installed without python opcodes.
How can I do this?
Stefan

Sent from Mailspring
Am Mo., 2. Nov. 2020 um 22:20 Uhr schrieb Tarmo Johannes <trmjhnns@gmail.com>:
Hi!

Is your Csound built with Python support? Can you see any python opcodes when you run
csound -z
?

tarmo

Kontakt Stefan Thomas (<kontrapunktstefan@gmail.com>) kirjutas kuupäeval E, 2. november 2020 kell 23:15:
Dear communty,
I have a problem with pyrun and pyruni opcodes. The following patch is more or less the same as https://csound.com/docs/manual/pyrun.html
When I run the patch I get an error messages:
0dBFS level = 32768.0
--Csound version 6.14 (double samples) May  1 2020
[commit: d412a4d95fa545f32b187d5b3e2ed78035cd3108]
libsndfile-1.0.28
Reading options from $HOME/.csound6rc
WARNING: [mcould not open library '/usr/local/lib/csound/plugins64-6.0/libpy.so' (/usr/local/lib/csound/plugins64-6.0/libpy.so: undefined symbol: PyFile_AsFile) [m
[mUnifiedCSD:  pythontest.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled

error: syntax error, unexpected NEWLINE  (token "
") from file pythontest.csd (1)
 line 12:
>>>pyinit <<<
Unexpected untyped word pyinit when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure [m
[mcannot compile orchestra [m
[mend of score.   overall amps:      0.0
  overall samples out of range:        0
1 errors in performance
Does someone know, how I can get that patch running?
Here is the patch:
<CsoundSynthesizer>
<CsOptions>
-odac  -m0d
</CsOptions>
; ==============================================
<CsInstruments>

sr = 44100
;ksmps = 100
nchnls = 1
0dbfs = 1
pyinit
pyruni "import random"
instr 1
  ; This message is stored in the main namespace
        ; and is the same for every instance
        pyruni  "message = 'a global random number: %f' % random.random()"
        pyrun   "print message"

        ; This message is stored in the private namespace
        ; and is different for different instances
        pylruni "message = 'a private random number: %f' % random.random()"
        pylrun  "print message"
endin

</CsInstruments>
; ==============================================
<CsScore>
i1 0 0.1
</CsScore>
</CsoundSynthesizer>



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-11-05 17:07
FromFrancois PINOT
SubjectRe: [Csnd] problem with python opcodes
After the build you have to copy libpy.so into the Csound plugins repository. If you built the plugins from the root of the plugin dir then a sudo make install should do it.
François

Le jeu. 5 nov. 2020 à 17:58, Richard van Bemmelen <zappfinger@gmail.com> a écrit :
I followed the build instructions, but after that csound still had no Python opcodes...


Op di 3 nov. 2020 om 08:48 schreef Francois PINOT <fggpinot@gmail.com>:
Hello,

Actually the Python opcodes in the Csound sources are obsolete because they're intended to be used with Python 2.x which is no longer supported since January 1st, 2020. I did a Python3 port of these opcodes here: https://github.com/csound/plugins. You can clone this repo in your system and build the Python opcodes from this plugin repository.

Regards

François

Le mar. 3 nov. 2020 à 08:17, Tarmo Johannes <trmjhnns@gmail.com> a écrit :
Hi,

First you need to install python development packages and then make sure building python opcodes is enabled in the cmake configuration. I think it is easiest to do with cmake-gui (assuming you are on Linux), usually:
$ cmake-gui ../
from your build directory

Hope it helps!
tarmo


On Nov 2 2020, at 11:36 pm, Stefan Thomas <kontrapunktstefan@gmail.com> wrote:
Dear Tarmo,
thanks for Your reply.
You are right, csound is installed without python opcodes.
How can I do this?
Stefan

Sent from Mailspring
Am Mo., 2. Nov. 2020 um 22:20 Uhr schrieb Tarmo Johannes <trmjhnns@gmail.com>:
Hi!

Is your Csound built with Python support? Can you see any python opcodes when you run
csound -z
?

tarmo

Kontakt Stefan Thomas (<kontrapunktstefan@gmail.com>) kirjutas kuupäeval E, 2. november 2020 kell 23:15:
Dear communty,
I have a problem with pyrun and pyruni opcodes. The following patch is more or less the same as https://csound.com/docs/manual/pyrun.html
When I run the patch I get an error messages:
0dBFS level = 32768.0
--Csound version 6.14 (double samples) May  1 2020
[commit: d412a4d95fa545f32b187d5b3e2ed78035cd3108]
libsndfile-1.0.28
Reading options from $HOME/.csound6rc
WARNING: [mcould not open library '/usr/local/lib/csound/plugins64-6.0/libpy.so' (/usr/local/lib/csound/plugins64-6.0/libpy.so: undefined symbol: PyFile_AsFile) [m
[mUnifiedCSD:  pythontest.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled

error: syntax error, unexpected NEWLINE  (token "
") from file pythontest.csd (1)
 line 12:
>>>pyinit <<<
Unexpected untyped word pyinit when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure [m
[mcannot compile orchestra [m
[mend of score.   overall amps:      0.0
  overall samples out of range:        0
1 errors in performance
Does someone know, how I can get that patch running?
Here is the patch:
<CsoundSynthesizer>
<CsOptions>
-odac  -m0d
</CsOptions>
; ==============================================
<CsInstruments>

sr = 44100
;ksmps = 100
nchnls = 1
0dbfs = 1
pyinit
pyruni "import random"
instr 1
  ; This message is stored in the main namespace
        ; and is the same for every instance
        pyruni  "message = 'a global random number: %f' % random.random()"
        pyrun   "print message"

        ; This message is stored in the private namespace
        ; and is different for different instances
        pylruni "message = 'a private random number: %f' % random.random()"
        pylrun  "print message"
endin

</CsInstruments>
; ==============================================
<CsScore>
i1 0 0.1
</CsScore>
</CsoundSynthesizer>



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-11-05 17:19
FromRichard van Bemmelen
SubjectRe: [Csnd] problem with python opcodes
What Csound plugins repository do you mean?
Richard

Op do 5 nov. 2020 om 18:07 schreef Francois PINOT <fggpinot@gmail.com>:
After the build you have to copy libpy.so into the Csound plugins repository. If you built the plugins from the root of the plugin dir then a sudo make install should do it.
François

Le jeu. 5 nov. 2020 à 17:58, Richard van Bemmelen <zappfinger@gmail.com> a écrit :
I followed the build instructions, but after that csound still had no Python opcodes...


Op di 3 nov. 2020 om 08:48 schreef Francois PINOT <fggpinot@gmail.com>:
Hello,

Actually the Python opcodes in the Csound sources are obsolete because they're intended to be used with Python 2.x which is no longer supported since January 1st, 2020. I did a Python3 port of these opcodes here: https://github.com/csound/plugins. You can clone this repo in your system and build the Python opcodes from this plugin repository.

Regards

François

Le mar. 3 nov. 2020 à 08:17, Tarmo Johannes <trmjhnns@gmail.com> a écrit :
Hi,

First you need to install python development packages and then make sure building python opcodes is enabled in the cmake configuration. I think it is easiest to do with cmake-gui (assuming you are on Linux), usually:
$ cmake-gui ../
from your build directory

Hope it helps!
tarmo


On Nov 2 2020, at 11:36 pm, Stefan Thomas <kontrapunktstefan@gmail.com> wrote:
Dear Tarmo,
thanks for Your reply.
You are right, csound is installed without python opcodes.
How can I do this?
Stefan

Sent from Mailspring
Am Mo., 2. Nov. 2020 um 22:20 Uhr schrieb Tarmo Johannes <trmjhnns@gmail.com>:
Hi!

Is your Csound built with Python support? Can you see any python opcodes when you run
csound -z
?

tarmo

Kontakt Stefan Thomas (<kontrapunktstefan@gmail.com>) kirjutas kuupäeval E, 2. november 2020 kell 23:15:
Dear communty,
I have a problem with pyrun and pyruni opcodes. The following patch is more or less the same as https://csound.com/docs/manual/pyrun.html
When I run the patch I get an error messages:
0dBFS level = 32768.0
--Csound version 6.14 (double samples) May  1 2020
[commit: d412a4d95fa545f32b187d5b3e2ed78035cd3108]
libsndfile-1.0.28
Reading options from $HOME/.csound6rc
WARNING: [mcould not open library '/usr/local/lib/csound/plugins64-6.0/libpy.so' (/usr/local/lib/csound/plugins64-6.0/libpy.so: undefined symbol: PyFile_AsFile) [m
[mUnifiedCSD:  pythontest.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled

error: syntax error, unexpected NEWLINE  (token "
") from file pythontest.csd (1)
 line 12:
>>>pyinit <<<
Unexpected untyped word pyinit when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure [m
[mcannot compile orchestra [m
[mend of score.   overall amps:      0.0
  overall samples out of range:        0
1 errors in performance
Does someone know, how I can get that patch running?
Here is the patch:
<CsoundSynthesizer>
<CsOptions>
-odac  -m0d
</CsOptions>
; ==============================================
<CsInstruments>

sr = 44100
;ksmps = 100
nchnls = 1
0dbfs = 1
pyinit
pyruni "import random"
instr 1
  ; This message is stored in the main namespace
        ; and is the same for every instance
        pyruni  "message = 'a global random number: %f' % random.random()"
        pyrun   "print message"

        ; This message is stored in the private namespace
        ; and is different for different instances
        pylruni "message = 'a private random number: %f' % random.random()"
        pylrun  "print message"
endin

</CsInstruments>
; ==============================================
<CsScore>
i1 0 0.1
</CsScore>
</CsoundSynthesizer>



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-11-06 07:37
FromFrancois PINOT
SubjectRe: [Csnd] problem with python opcodes
The directory pointed by the OPCODE6DIR64 environment variable. On Debian/Ubuntu systems it's /usr/local/lib/csound/plugins64-6.0. It's the location where the install script copies the plugin libs.

Regards

François

Le jeu. 5 nov. 2020 à 18:19, Richard van Bemmelen <zappfinger@gmail.com> a écrit :
What Csound plugins repository do you mean?
Richard

Op do 5 nov. 2020 om 18:07 schreef Francois PINOT <fggpinot@gmail.com>:
After the build you have to copy libpy.so into the Csound plugins repository. If you built the plugins from the root of the plugin dir then a sudo make install should do it.
François

Le jeu. 5 nov. 2020 à 17:58, Richard van Bemmelen <zappfinger@gmail.com> a écrit :
I followed the build instructions, but after that csound still had no Python opcodes...


Op di 3 nov. 2020 om 08:48 schreef Francois PINOT <fggpinot@gmail.com>:
Hello,

Actually the Python opcodes in the Csound sources are obsolete because they're intended to be used with Python 2.x which is no longer supported since January 1st, 2020. I did a Python3 port of these opcodes here: https://github.com/csound/plugins. You can clone this repo in your system and build the Python opcodes from this plugin repository.

Regards

François

Le mar. 3 nov. 2020 à 08:17, Tarmo Johannes <trmjhnns@gmail.com> a écrit :
Hi,

First you need to install python development packages and then make sure building python opcodes is enabled in the cmake configuration. I think it is easiest to do with cmake-gui (assuming you are on Linux), usually:
$ cmake-gui ../
from your build directory

Hope it helps!
tarmo


On Nov 2 2020, at 11:36 pm, Stefan Thomas <kontrapunktstefan@gmail.com> wrote:
Dear Tarmo,
thanks for Your reply.
You are right, csound is installed without python opcodes.
How can I do this?
Stefan

Sent from Mailspring
Am Mo., 2. Nov. 2020 um 22:20 Uhr schrieb Tarmo Johannes <trmjhnns@gmail.com>:
Hi!

Is your Csound built with Python support? Can you see any python opcodes when you run
csound -z
?

tarmo

Kontakt Stefan Thomas (<kontrapunktstefan@gmail.com>) kirjutas kuupäeval E, 2. november 2020 kell 23:15:
Dear communty,
I have a problem with pyrun and pyruni opcodes. The following patch is more or less the same as https://csound.com/docs/manual/pyrun.html
When I run the patch I get an error messages:
0dBFS level = 32768.0
--Csound version 6.14 (double samples) May  1 2020
[commit: d412a4d95fa545f32b187d5b3e2ed78035cd3108]
libsndfile-1.0.28
Reading options from $HOME/.csound6rc
WARNING: [mcould not open library '/usr/local/lib/csound/plugins64-6.0/libpy.so' (/usr/local/lib/csound/plugins64-6.0/libpy.so: undefined symbol: PyFile_AsFile) [m
[mUnifiedCSD:  pythontest.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled

error: syntax error, unexpected NEWLINE  (token "
") from file pythontest.csd (1)
 line 12:
>>>pyinit <<<
Unexpected untyped word pyinit when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure [m
[mcannot compile orchestra [m
[mend of score.   overall amps:      0.0
  overall samples out of range:        0
1 errors in performance
Does someone know, how I can get that patch running?
Here is the patch:
<CsoundSynthesizer>
<CsOptions>
-odac  -m0d
</CsOptions>
; ==============================================
<CsInstruments>

sr = 44100
;ksmps = 100
nchnls = 1
0dbfs = 1
pyinit
pyruni "import random"
instr 1
  ; This message is stored in the main namespace
        ; and is the same for every instance
        pyruni  "message = 'a global random number: %f' % random.random()"
        pyrun   "print message"

        ; This message is stored in the private namespace
        ; and is different for different instances
        pylruni "message = 'a private random number: %f' % random.random()"
        pylrun  "print message"
endin

</CsInstruments>
; ==============================================
<CsScore>
i1 0 0.1
</CsScore>
</CsoundSynthesizer>



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-11-06 09:55
FromRichard van Bemmelen
SubjectRe: [Csnd] problem with python opcodes
Apperently I had this error:
Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is at least version "3")
-- PYTHONLIBS_FOUND="FALSE", so disabling BUILD_PYTHON_OPCODES
-- BUILD_PYTHON_OPCODES is disabled.

Any idea?

Op vr 6 nov. 2020 om 08:37 schreef Francois PINOT <fggpinot@gmail.com>:
The directory pointed by the OPCODE6DIR64 environment variable. On Debian/Ubuntu systems it's /usr/local/lib/csound/plugins64-6.0. It's the location where the install script copies the plugin libs.

Regards

François

Le jeu. 5 nov. 2020 à 18:19, Richard van Bemmelen <zappfinger@gmail.com> a écrit :
What Csound plugins repository do you mean?
Richard

Op do 5 nov. 2020 om 18:07 schreef Francois PINOT <fggpinot@gmail.com>:
After the build you have to copy libpy.so into the Csound plugins repository. If you built the plugins from the root of the plugin dir then a sudo make install should do it.
François

Le jeu. 5 nov. 2020 à 17:58, Richard van Bemmelen <zappfinger@gmail.com> a écrit :
I followed the build instructions, but after that csound still had no Python opcodes...


Op di 3 nov. 2020 om 08:48 schreef Francois PINOT <fggpinot@gmail.com>:
Hello,

Actually the Python opcodes in the Csound sources are obsolete because they're intended to be used with Python 2.x which is no longer supported since January 1st, 2020. I did a Python3 port of these opcodes here: https://github.com/csound/plugins. You can clone this repo in your system and build the Python opcodes from this plugin repository.

Regards

François

Le mar. 3 nov. 2020 à 08:17, Tarmo Johannes <trmjhnns@gmail.com> a écrit :
Hi,

First you need to install python development packages and then make sure building python opcodes is enabled in the cmake configuration. I think it is easiest to do with cmake-gui (assuming you are on Linux), usually:
$ cmake-gui ../
from your build directory

Hope it helps!
tarmo


On Nov 2 2020, at 11:36 pm, Stefan Thomas <kontrapunktstefan@gmail.com> wrote:
Dear Tarmo,
thanks for Your reply.
You are right, csound is installed without python opcodes.
How can I do this?
Stefan

Sent from Mailspring
Am Mo., 2. Nov. 2020 um 22:20 Uhr schrieb Tarmo Johannes <trmjhnns@gmail.com>:
Hi!

Is your Csound built with Python support? Can you see any python opcodes when you run
csound -z
?

tarmo

Kontakt Stefan Thomas (<kontrapunktstefan@gmail.com>) kirjutas kuupäeval E, 2. november 2020 kell 23:15:
Dear communty,
I have a problem with pyrun and pyruni opcodes. The following patch is more or less the same as https://csound.com/docs/manual/pyrun.html
When I run the patch I get an error messages:
0dBFS level = 32768.0
--Csound version 6.14 (double samples) May  1 2020
[commit: d412a4d95fa545f32b187d5b3e2ed78035cd3108]
libsndfile-1.0.28
Reading options from $HOME/.csound6rc
WARNING: [mcould not open library '/usr/local/lib/csound/plugins64-6.0/libpy.so' (/usr/local/lib/csound/plugins64-6.0/libpy.so: undefined symbol: PyFile_AsFile) [m
[mUnifiedCSD:  pythontest.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled

error: syntax error, unexpected NEWLINE  (token "
") from file pythontest.csd (1)
 line 12:
>>>pyinit <<<
Unexpected untyped word pyinit when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure [m
[mcannot compile orchestra [m
[mend of score.   overall amps:      0.0
  overall samples out of range:        0
1 errors in performance
Does someone know, how I can get that patch running?
Here is the patch:
<CsoundSynthesizer>
<CsOptions>
-odac  -m0d
</CsOptions>
; ==============================================
<CsInstruments>

sr = 44100
;ksmps = 100
nchnls = 1
0dbfs = 1
pyinit
pyruni "import random"
instr 1
  ; This message is stored in the main namespace
        ; and is the same for every instance
        pyruni  "message = 'a global random number: %f' % random.random()"
        pyrun   "print message"

        ; This message is stored in the private namespace
        ; and is different for different instances
        pylruni "message = 'a private random number: %f' % random.random()"
        pylrun  "print message"
endin

</CsInstruments>
; ==============================================
<CsScore>
i1 0 0.1
</CsScore>
</CsoundSynthesizer>



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-11-06 10:33
FromRichard van Bemmelen
SubjectRe: [Csnd] problem with python opcodes
Ok, i had to execute:
sudo apt get python3-dev and then run the build again....

Richard

Op vr 6 nov. 2020 om 10:55 schreef Richard van Bemmelen <zappfinger@gmail.com>:
Apperently I had this error:
Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is at least version "3")
-- PYTHONLIBS_FOUND="FALSE", so disabling BUILD_PYTHON_OPCODES
-- BUILD_PYTHON_OPCODES is disabled.

Any idea?

Op vr 6 nov. 2020 om 08:37 schreef Francois PINOT <fggpinot@gmail.com>:
The directory pointed by the OPCODE6DIR64 environment variable. On Debian/Ubuntu systems it's /usr/local/lib/csound/plugins64-6.0. It's the location where the install script copies the plugin libs.

Regards

François

Le jeu. 5 nov. 2020 à 18:19, Richard van Bemmelen <zappfinger@gmail.com> a écrit :
What Csound plugins repository do you mean?
Richard

Op do 5 nov. 2020 om 18:07 schreef Francois PINOT <fggpinot@gmail.com>:
After the build you have to copy libpy.so into the Csound plugins repository. If you built the plugins from the root of the plugin dir then a sudo make install should do it.
François

Le jeu. 5 nov. 2020 à 17:58, Richard van Bemmelen <zappfinger@gmail.com> a écrit :
I followed the build instructions, but after that csound still had no Python opcodes...


Op di 3 nov. 2020 om 08:48 schreef Francois PINOT <fggpinot@gmail.com>:
Hello,

Actually the Python opcodes in the Csound sources are obsolete because they're intended to be used with Python 2.x which is no longer supported since January 1st, 2020. I did a Python3 port of these opcodes here: https://github.com/csound/plugins. You can clone this repo in your system and build the Python opcodes from this plugin repository.

Regards

François

Le mar. 3 nov. 2020 à 08:17, Tarmo Johannes <trmjhnns@gmail.com> a écrit :
Hi,

First you need to install python development packages and then make sure building python opcodes is enabled in the cmake configuration. I think it is easiest to do with cmake-gui (assuming you are on Linux), usually:
$ cmake-gui ../
from your build directory

Hope it helps!
tarmo


On Nov 2 2020, at 11:36 pm, Stefan Thomas <kontrapunktstefan@gmail.com> wrote:
Dear Tarmo,
thanks for Your reply.
You are right, csound is installed without python opcodes.
How can I do this?
Stefan

Sent from Mailspring
Am Mo., 2. Nov. 2020 um 22:20 Uhr schrieb Tarmo Johannes <trmjhnns@gmail.com>:
Hi!

Is your Csound built with Python support? Can you see any python opcodes when you run
csound -z
?

tarmo

Kontakt Stefan Thomas (<kontrapunktstefan@gmail.com>) kirjutas kuupäeval E, 2. november 2020 kell 23:15:
Dear communty,
I have a problem with pyrun and pyruni opcodes. The following patch is more or less the same as https://csound.com/docs/manual/pyrun.html
When I run the patch I get an error messages:
0dBFS level = 32768.0
--Csound version 6.14 (double samples) May  1 2020
[commit: d412a4d95fa545f32b187d5b3e2ed78035cd3108]
libsndfile-1.0.28
Reading options from $HOME/.csound6rc
WARNING: [mcould not open library '/usr/local/lib/csound/plugins64-6.0/libpy.so' (/usr/local/lib/csound/plugins64-6.0/libpy.so: undefined symbol: PyFile_AsFile) [m
[mUnifiedCSD:  pythontest.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled

error: syntax error, unexpected NEWLINE  (token "
") from file pythontest.csd (1)
 line 12:
>>>pyinit <<<
Unexpected untyped word pyinit when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure [m
[mcannot compile orchestra [m
[mend of score.   overall amps:      0.0
  overall samples out of range:        0
1 errors in performance
Does someone know, how I can get that patch running?
Here is the patch:
<CsoundSynthesizer>
<CsOptions>
-odac  -m0d
</CsOptions>
; ==============================================
<CsInstruments>

sr = 44100
;ksmps = 100
nchnls = 1
0dbfs = 1
pyinit
pyruni "import random"
instr 1
  ; This message is stored in the main namespace
        ; and is the same for every instance
        pyruni  "message = 'a global random number: %f' % random.random()"
        pyrun   "print message"

        ; This message is stored in the private namespace
        ; and is different for different instances
        pylruni "message = 'a private random number: %f' % random.random()"
        pylrun  "print message"
endin

</CsInstruments>
; ==============================================
<CsScore>
i1 0 0.1
</CsScore>
</CsoundSynthesizer>



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-11-06 13:55
Fromljc
SubjectRe: [Csnd] problem with python opcodes
el Tue, 3 Nov 2020 08:47:39 +0100
Francois PINOT  escribió:

> Actually the Python opcodes in the Csound sources are obsolete because
> they're intended to be used with Python 2.x which is no longer
> supported since January 1st, 2020. I did a Python3 port of these
> opcodes here: https://github.com/csound/plugins. You can clone this
> repo in your system and build the Python opcodes from this plugin
> repository.

Hello, list.

Please excuse if this is a silly question, but is there a reason to
have the functioning opcodes in a separate repository, instead of
having them in the main source tree, replacing the outdated and
deprecated Python2 opcodes? I don't know, I would think that would be
the obvious choice.


-- 
ljc 

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2020-11-06 15:00
FromFrancois PINOT
SubjectRe: [Csnd] problem with python opcodes
Until recently (January 1st 2020) Python 2.7  was still in use on many systems. Now it is officially deprecated. It is planned to have the plugin opcodes separated from the core Csound source in Csound 7. So the plugin repo was a test with the py opcodes and a few other plugins. It is planned to have Python 3 support in Csound 7. So actually you can use Python 3 with ctcsound to have access to the Csound API and you can build the py opcodes from the plugin repo if you need to use them with Python3.

François

Le ven. 6 nov. 2020 à 14:55, ljc <ljc@internet.com.uy> a écrit :
el Tue, 3 Nov 2020 08:47:39 +0100
Francois PINOT <fggpinot@GMAIL.COM> escribió:

> Actually the Python opcodes in the Csound sources are obsolete because
> they're intended to be used with Python 2.x which is no longer
> supported since January 1st, 2020. I did a Python3 port of these
> opcodes here: https://github.com/csound/plugins. You can clone this
> repo in your system and build the Python opcodes from this plugin
> repository.

Hello, list.

Please excuse if this is a silly question, but is there a reason to
have the functioning opcodes in a separate repository, instead of
having them in the main source tree, replacing the outdated and
deprecated Python2 opcodes? I don't know, I would think that would be
the obvious choice.


--
ljc <ljc@internet.com.uy>

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-11-08 17:03
FromStefan Thomas
SubjectRe: [Csnd] problem with python opcodes
Dear François,
can I build these opcodes after the installation of csound?


Am Di., 3. Nov. 2020 um 08:48 Uhr schrieb Francois PINOT <fggpinot@gmail.com>:
Hello,

Actually the Python opcodes in the Csound sources are obsolete because they're intended to be used with Python 2.x which is no longer supported since January 1st, 2020. I did a Python3 port of these opcodes here: https://github.com/csound/plugins. You can clone this repo in your system and build the Python opcodes from this plugin repository.

Regards

François

Le mar. 3 nov. 2020 à 08:17, Tarmo Johannes <trmjhnns@gmail.com> a écrit :
Hi,

First you need to install python development packages and then make sure building python opcodes is enabled in the cmake configuration. I think it is easiest to do with cmake-gui (assuming you are on Linux), usually:
$ cmake-gui ../
from your build directory

Hope it helps!
tarmo


On Nov 2 2020, at 11:36 pm, Stefan Thomas <kontrapunktstefan@gmail.com> wrote:
Dear Tarmo,
thanks for Your reply.
You are right, csound is installed without python opcodes.
How can I do this?
Stefan

Sent from Mailspring
Am Mo., 2. Nov. 2020 um 22:20 Uhr schrieb Tarmo Johannes <trmjhnns@gmail.com>:
Hi!

Is your Csound built with Python support? Can you see any python opcodes when you run
csound -z
?

tarmo

Kontakt Stefan Thomas (<kontrapunktstefan@gmail.com>) kirjutas kuupäeval E, 2. november 2020 kell 23:15:
Dear communty,
I have a problem with pyrun and pyruni opcodes. The following patch is more or less the same as https://csound.com/docs/manual/pyrun.html
When I run the patch I get an error messages:
0dBFS level = 32768.0
--Csound version 6.14 (double samples) May  1 2020
[commit: d412a4d95fa545f32b187d5b3e2ed78035cd3108]
libsndfile-1.0.28
Reading options from $HOME/.csound6rc
WARNING: [mcould not open library '/usr/local/lib/csound/plugins64-6.0/libpy.so' (/usr/local/lib/csound/plugins64-6.0/libpy.so: undefined symbol: PyFile_AsFile) [m
[mUnifiedCSD:  pythontest.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled

error: syntax error, unexpected NEWLINE  (token "
") from file pythontest.csd (1)
 line 12:
>>>pyinit <<<
Unexpected untyped word pyinit when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure [m
[mcannot compile orchestra [m
[mend of score.   overall amps:      0.0
  overall samples out of range:        0
1 errors in performance
Does someone know, how I can get that patch running?
Here is the patch:
<CsoundSynthesizer>
<CsOptions>
-odac  -m0d
</CsOptions>
; ==============================================
<CsInstruments>

sr = 44100
;ksmps = 100
nchnls = 1
0dbfs = 1
pyinit
pyruni "import random"
instr 1
  ; This message is stored in the main namespace
        ; and is the same for every instance
        pyruni  "message = 'a global random number: %f' % random.random()"
        pyrun   "print message"

        ; This message is stored in the private namespace
        ; and is different for different instances
        pylruni "message = 'a private random number: %f' % random.random()"
        pylrun  "print message"
endin

</CsInstruments>
; ==============================================
<CsScore>
i1 0 0.1
</CsScore>
</CsoundSynthesizer>



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-11-08 17:09
FromFrancois PINOT
SubjectRe: [Csnd] problem with python opcodes
Yes, the build of the plugin produces a dynamic library which can be installed afterwards into the Csound plugins directory. When starting Csound, it detects all the plugins found in that directory.

François

Le dim. 8 nov. 2020 à 18:03, Stefan Thomas <kontrapunktstefan@gmail.com> a écrit :
Dear François,
can I build these opcodes after the installation of csound?


Am Di., 3. Nov. 2020 um 08:48 Uhr schrieb Francois PINOT <fggpinot@gmail.com>:
Hello,

Actually the Python opcodes in the Csound sources are obsolete because they're intended to be used with Python 2.x which is no longer supported since January 1st, 2020. I did a Python3 port of these opcodes here: https://github.com/csound/plugins. You can clone this repo in your system and build the Python opcodes from this plugin repository.

Regards

François

Le mar. 3 nov. 2020 à 08:17, Tarmo Johannes <trmjhnns@gmail.com> a écrit :
Hi,

First you need to install python development packages and then make sure building python opcodes is enabled in the cmake configuration. I think it is easiest to do with cmake-gui (assuming you are on Linux), usually:
$ cmake-gui ../
from your build directory

Hope it helps!
tarmo


On Nov 2 2020, at 11:36 pm, Stefan Thomas <kontrapunktstefan@gmail.com> wrote:
Dear Tarmo,
thanks for Your reply.
You are right, csound is installed without python opcodes.
How can I do this?
Stefan

Sent from Mailspring
Am Mo., 2. Nov. 2020 um 22:20 Uhr schrieb Tarmo Johannes <trmjhnns@gmail.com>:
Hi!

Is your Csound built with Python support? Can you see any python opcodes when you run
csound -z
?

tarmo

Kontakt Stefan Thomas (<kontrapunktstefan@gmail.com>) kirjutas kuupäeval E, 2. november 2020 kell 23:15:
Dear communty,
I have a problem with pyrun and pyruni opcodes. The following patch is more or less the same as https://csound.com/docs/manual/pyrun.html
When I run the patch I get an error messages:
0dBFS level = 32768.0
--Csound version 6.14 (double samples) May  1 2020
[commit: d412a4d95fa545f32b187d5b3e2ed78035cd3108]
libsndfile-1.0.28
Reading options from $HOME/.csound6rc
WARNING: [mcould not open library '/usr/local/lib/csound/plugins64-6.0/libpy.so' (/usr/local/lib/csound/plugins64-6.0/libpy.so: undefined symbol: PyFile_AsFile) [m
[mUnifiedCSD:  pythontest.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled

error: syntax error, unexpected NEWLINE  (token "
") from file pythontest.csd (1)
 line 12:
>>>pyinit <<<
Unexpected untyped word pyinit when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure [m
[mcannot compile orchestra [m
[mend of score.   overall amps:      0.0
  overall samples out of range:        0
1 errors in performance
Does someone know, how I can get that patch running?
Here is the patch:
<CsoundSynthesizer>
<CsOptions>
-odac  -m0d
</CsOptions>
; ==============================================
<CsInstruments>

sr = 44100
;ksmps = 100
nchnls = 1
0dbfs = 1
pyinit
pyruni "import random"
instr 1
  ; This message is stored in the main namespace
        ; and is the same for every instance
        pyruni  "message = 'a global random number: %f' % random.random()"
        pyrun   "print message"

        ; This message is stored in the private namespace
        ; and is different for different instances
        pylruni "message = 'a private random number: %f' % random.random()"
        pylrun  "print message"
endin

</CsInstruments>
; ==============================================
<CsScore>
i1 0 0.1
</CsScore>
</CsoundSynthesizer>



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-11-08 17:20
FromStefan Thomas
SubjectRe: [Csnd] problem with python opcodes
Dear François,
thanks, I was able to install it and the py-opcodes seem to be working fine, after a first glimpse.
All the best,
Stefan

Am So., 8. Nov. 2020 um 18:09 Uhr schrieb Francois PINOT <fggpinot@gmail.com>:
Yes, the build of the plugin produces a dynamic library which can be installed afterwards into the Csound plugins directory. When starting Csound, it detects all the plugins found in that directory.

François

Le dim. 8 nov. 2020 à 18:03, Stefan Thomas <kontrapunktstefan@gmail.com> a écrit :
Dear François,
can I build these opcodes after the installation of csound?


Am Di., 3. Nov. 2020 um 08:48 Uhr schrieb Francois PINOT <fggpinot@gmail.com>:
Hello,

Actually the Python opcodes in the Csound sources are obsolete because they're intended to be used with Python 2.x which is no longer supported since January 1st, 2020. I did a Python3 port of these opcodes here: https://github.com/csound/plugins. You can clone this repo in your system and build the Python opcodes from this plugin repository.

Regards

François

Le mar. 3 nov. 2020 à 08:17, Tarmo Johannes <trmjhnns@gmail.com> a écrit :
Hi,

First you need to install python development packages and then make sure building python opcodes is enabled in the cmake configuration. I think it is easiest to do with cmake-gui (assuming you are on Linux), usually:
$ cmake-gui ../
from your build directory

Hope it helps!
tarmo


On Nov 2 2020, at 11:36 pm, Stefan Thomas <kontrapunktstefan@gmail.com> wrote:
Dear Tarmo,
thanks for Your reply.
You are right, csound is installed without python opcodes.
How can I do this?
Stefan

Sent from Mailspring
Am Mo., 2. Nov. 2020 um 22:20 Uhr schrieb Tarmo Johannes <trmjhnns@gmail.com>:
Hi!

Is your Csound built with Python support? Can you see any python opcodes when you run
csound -z
?

tarmo

Kontakt Stefan Thomas (<kontrapunktstefan@gmail.com>) kirjutas kuupäeval E, 2. november 2020 kell 23:15:
Dear communty,
I have a problem with pyrun and pyruni opcodes. The following patch is more or less the same as https://csound.com/docs/manual/pyrun.html
When I run the patch I get an error messages:
0dBFS level = 32768.0
--Csound version 6.14 (double samples) May  1 2020
[commit: d412a4d95fa545f32b187d5b3e2ed78035cd3108]
libsndfile-1.0.28
Reading options from $HOME/.csound6rc
WARNING: [mcould not open library '/usr/local/lib/csound/plugins64-6.0/libpy.so' (/usr/local/lib/csound/plugins64-6.0/libpy.so: undefined symbol: PyFile_AsFile) [m
[mUnifiedCSD:  pythontest.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled

error: syntax error, unexpected NEWLINE  (token "
") from file pythontest.csd (1)
 line 12:
>>>pyinit <<<
Unexpected untyped word pyinit when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure [m
[mcannot compile orchestra [m
[mend of score.   overall amps:      0.0
  overall samples out of range:        0
1 errors in performance
Does someone know, how I can get that patch running?
Here is the patch:
<CsoundSynthesizer>
<CsOptions>
-odac  -m0d
</CsOptions>
; ==============================================
<CsInstruments>

sr = 44100
;ksmps = 100
nchnls = 1
0dbfs = 1
pyinit
pyruni "import random"
instr 1
  ; This message is stored in the main namespace
        ; and is the same for every instance
        pyruni  "message = 'a global random number: %f' % random.random()"
        pyrun   "print message"

        ; This message is stored in the private namespace
        ; and is different for different instances
        pylruni "message = 'a private random number: %f' % random.random()"
        pylrun  "print message"
endin

</CsInstruments>
; ==============================================
<CsScore>
i1 0 0.1
</CsScore>
</CsoundSynthesizer>



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here