Csound Csound-dev Csound-tekno Search About

ctcsound (Python, CsoundVST 6.08, Windows, x64)

Date2016-10-07 21:13
Fromsjakops
Subjectctcsound (Python, CsoundVST 6.08, Windows, x64)
I am having some trouble with ctcsound (using CsoundVST 6.08) - when I try to
run the code below I get this message:

  File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 813, in
performKsmps
    return libcsound.csoundPerformKsmps(self.cs)
WindowsError: exception: access violation reading 0xFFFFFFFFFFFFFFFF

Code:

import ctcsound
import ctypes

def foo(csound, channelName, channelValuePtr, channelTypePtr):
    name = ctcsound.pstring(channelName)
    valPtr = ctypes.cast(channelValuePtr, ctypes.POINTER(ctcsound.MYFLT))
    valPtr[0] = ctcsound.MYFLT(440.0)
    print("hello", name)

c = ctcsound.Csound()
c.setOption("-odac")
c.compileOrc("""
        sr=44100
        ksmps=32
        nchnls=2
        0dbfs=1
        instr 1
          kfreq invalue "freq"
          kenv linsegr 0, .05, 1, .05, 0
          aout vco2 kenv, kfreq
          outs aout, aout
        endin
        """)
c.setInputChannelCallback(foo)
c.readScore("i1 0 0.2 \n i1 1 2")
c.start()
while (c.performKsmps() == 0):
  pass
c.stop()

I wonder if there could be a bug, or am I doing something wrong?

Best regards,
Søren



--
View this message in context: http://csound.1045644.n5.nabble.com/ctcsound-Python-CsoundVST-6-08-Windows-x64-tp5751978.html
Sent from the Csound - General mailing list archive at Nabble.com.

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

Date2016-10-07 22:53
FromVictor Lazzarini
SubjectRe: ctcsound (Python, CsoundVST 6.08, Windows, x64)
Did you try without adding the callback?

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 7 Oct 2016, at 21:13, sjakops  wrote:
> 
> I am having some trouble with ctcsound (using CsoundVST 6.08) - when I try to
> run the code below I get this message:
> 
>  File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 813, in
> performKsmps
>    return libcsound.csoundPerformKsmps(self.cs)
> WindowsError: exception: access violation reading 0xFFFFFFFFFFFFFFFF
> 
> Code:
> 
> import ctcsound
> import ctypes
> 
> def foo(csound, channelName, channelValuePtr, channelTypePtr):
>    name = ctcsound.pstring(channelName)
>    valPtr = ctypes.cast(channelValuePtr, ctypes.POINTER(ctcsound.MYFLT))
>    valPtr[0] = ctcsound.MYFLT(440.0)
>    print("hello", name)
> 
> c = ctcsound.Csound()
> c.setOption("-odac")
> c.compileOrc("""
>        sr=44100
>        ksmps=32
>        nchnls=2
>        0dbfs=1
>        instr 1
>          kfreq invalue "freq"
>          kenv linsegr 0, .05, 1, .05, 0
>          aout vco2 kenv, kfreq
>          outs aout, aout
>        endin
>        """)
> c.setInputChannelCallback(foo)
> c.readScore("i1 0 0.2 \n i1 1 2")
> c.start()
> while (c.performKsmps() == 0):
>  pass
> c.stop()
> 
> I wonder if there could be a bug, or am I doing something wrong?
> 
> Best regards,
> Søren
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/ctcsound-Python-CsoundVST-6-08-Windows-x64-tp5751978.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 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

Date2016-10-08 07:52
FromSøren Jakobsen
SubjectRe: ctcsound (Python, CsoundVST 6.08, Windows, x64)
Yes, it works fine without the callback.
Søren

On 10/7/16, Victor Lazzarini  wrote:
> Did you try without adding the callback?
>
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
>
>> On 7 Oct 2016, at 21:13, sjakops  wrote:
>>
>> I am having some trouble with ctcsound (using CsoundVST 6.08) - when I try
>> to
>> run the code below I get this message:
>>
>>  File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 813, in
>> performKsmps
>>    return libcsound.csoundPerformKsmps(self.cs)
>> WindowsError: exception: access violation reading 0xFFFFFFFFFFFFFFFF
>>
>> Code:
>>
>> import ctcsound
>> import ctypes
>>
>> def foo(csound, channelName, channelValuePtr, channelTypePtr):
>>    name = ctcsound.pstring(channelName)
>>    valPtr = ctypes.cast(channelValuePtr, ctypes.POINTER(ctcsound.MYFLT))
>>    valPtr[0] = ctcsound.MYFLT(440.0)
>>    print("hello", name)
>>
>> c = ctcsound.Csound()
>> c.setOption("-odac")
>> c.compileOrc("""
>>        sr=44100
>>        ksmps=32
>>        nchnls=2
>>        0dbfs=1
>>        instr 1
>>          kfreq invalue "freq"
>>          kenv linsegr 0, .05, 1, .05, 0
>>          aout vco2 kenv, kfreq
>>          outs aout, aout
>>        endin
>>        """)
>> c.setInputChannelCallback(foo)
>> c.readScore("i1 0 0.2 \n i1 1 2")
>> c.start()
>> while (c.performKsmps() == 0):
>>  pass
>> c.stop()
>>
>> I wonder if there could be a bug, or am I doing something wrong?
>>
>> Best regards,
>> Søren
>>
>>
>>
>> --
>> View this message in context:
>> http://csound.1045644.n5.nabble.com/ctcsound-Python-CsoundVST-6-08-Windows-x64-tp5751978.html
>> Sent from the Csound - General mailing list archive at Nabble.com.
>>
>> 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

Date2016-10-08 09:37
FromFrancois PINOT
SubjectRe: ctcsound (Python, CsoundVST 6.08, Windows, x64)
Here it works fine with the callback: Ubuntu 14.04, and Csound 6.08 built from sources on October 2nd.

Wich ctcsound.py file do you use? Beware that the ctcsound.py from the sources or from my github repo are continuously updated to reflect the last changes in the sources.

If you use a prebuilt version of Csound, you have to use the ctcsound.py file distributed with this release instead.

François

2016-10-07 22:13 GMT+02:00 sjakops <sorenkj@gmail.com>:
I am having some trouble with ctcsound (using CsoundVST 6.08) - when I try to
run the code below I get this message:

  File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 813, in
performKsmps
    return libcsound.csoundPerformKsmps(self.cs)
WindowsError: exception: access violation reading 0xFFFFFFFFFFFFFFFF

Code:

import ctcsound
import ctypes

def foo(csound, channelName, channelValuePtr, channelTypePtr):
    name = ctcsound.pstring(channelName)
    valPtr = ctypes.cast(channelValuePtr, ctypes.POINTER(ctcsound.MYFLT))
    valPtr[0] = ctcsound.MYFLT(440.0)
    print("hello", name)

c = ctcsound.Csound()
c.setOption("-odac")
c.compileOrc("""
        sr=44100
        ksmps=32
        nchnls=2
        0dbfs=1
        instr 1
          kfreq invalue "freq"
          kenv linsegr 0, .05, 1, .05, 0
          aout vco2 kenv, kfreq
          outs aout, aout
        endin
        """)
c.setInputChannelCallback(foo)
c.readScore("i1 0 0.2 \n i1 1 2")
c.start()
while (c.performKsmps() == 0):
  pass
c.stop()

I wonder if there could be a bug, or am I doing something wrong?

Best regards,
Søren



--
View this message in context: http://csound.1045644.n5.nabble.com/ctcsound-Python-CsoundVST-6-08-Windows-x64-tp5751978.html
Sent from the Csound - General mailing list archive at Nabble.com.

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

Date2016-10-08 09:43
FromVictor Lazzarini
SubjectRe: ctcsound (Python, CsoundVST 6.08, Windows, x64)
I can confirm this on OSX. Setting the callback makes it segfault on performance.


Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 8 Oct 2016, at 07:53, Søren Jakobsen  wrote:
> 
> Yes, it works fine without the callback.
> Søren
> 
>> On 10/7/16, Victor Lazzarini  wrote:
>> Did you try without adding the callback?
>> 
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>> 
>>> On 7 Oct 2016, at 21:13, sjakops  wrote:
>>> 
>>> I am having some trouble with ctcsound (using CsoundVST 6.08) - when I try
>>> to
>>> run the code below I get this message:
>>> 
>>> File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 813, in
>>> performKsmps
>>>   return libcsound.csoundPerformKsmps(self.cs)
>>> WindowsError: exception: access violation reading 0xFFFFFFFFFFFFFFFF
>>> 
>>> Code:
>>> 
>>> import ctcsound
>>> import ctypes
>>> 
>>> def foo(csound, channelName, channelValuePtr, channelTypePtr):
>>>   name = ctcsound.pstring(channelName)
>>>   valPtr = ctypes.cast(channelValuePtr, ctypes.POINTER(ctcsound.MYFLT))
>>>   valPtr[0] = ctcsound.MYFLT(440.0)
>>>   print("hello", name)
>>> 
>>> c = ctcsound.Csound()
>>> c.setOption("-odac")
>>> c.compileOrc("""
>>>       sr=44100
>>>       ksmps=32
>>>       nchnls=2
>>>       0dbfs=1
>>>       instr 1
>>>         kfreq invalue "freq"
>>>         kenv linsegr 0, .05, 1, .05, 0
>>>         aout vco2 kenv, kfreq
>>>         outs aout, aout
>>>       endin
>>>       """)
>>> c.setInputChannelCallback(foo)
>>> c.readScore("i1 0 0.2 \n i1 1 2")
>>> c.start()
>>> while (c.performKsmps() == 0):
>>> pass
>>> c.stop()
>>> 
>>> I wonder if there could be a bug, or am I doing something wrong?
>>> 
>>> Best regards,
>>> Søren
>>> 
>>> 
>>> 
>>> --
>>> View this message in context:
>>> http://csound.1045644.n5.nabble.com/ctcsound-Python-CsoundVST-6-08-Windows-x64-tp5751978.html
>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>> 
>>> 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

Date2016-10-08 10:03
FromFrancois PINOT
SubjectRe: ctcsound (Python, CsoundVST 6.08, Windows, x64)
I just pulled again the sources and rebuilt Csound: it still works fine here.

François

2016-10-08 10:43 GMT+02:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
I can confirm this on OSX. Setting the callback makes it segfault on performance.


Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 8 Oct 2016, at 07:53, Søren Jakobsen <sorenkj@GMAIL.COM> wrote:
>
> Yes, it works fine without the callback.
> Søren
>
>> On 10/7/16, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
>> Did you try without adding the callback?
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>
>>> On 7 Oct 2016, at 21:13, sjakops <sorenkj@GMAIL.COM> wrote:
>>>
>>> I am having some trouble with ctcsound (using CsoundVST 6.08) - when I try
>>> to
>>> run the code below I get this message:
>>>
>>> File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 813, in
>>> performKsmps
>>>   return libcsound.csoundPerformKsmps(self.cs)
>>> WindowsError: exception: access violation reading 0xFFFFFFFFFFFFFFFF
>>>
>>> Code:
>>>
>>> import ctcsound
>>> import ctypes
>>>
>>> def foo(csound, channelName, channelValuePtr, channelTypePtr):
>>>   name = ctcsound.pstring(channelName)
>>>   valPtr = ctypes.cast(channelValuePtr, ctypes.POINTER(ctcsound.MYFLT))
>>>   valPtr[0] = ctcsound.MYFLT(440.0)
>>>   print("hello", name)
>>>
>>> c = ctcsound.Csound()
>>> c.setOption("-odac")
>>> c.compileOrc("""
>>>       sr=44100
>>>       ksmps=32
>>>       nchnls=2
>>>       0dbfs=1
>>>       instr 1
>>>         kfreq invalue "freq"
>>>         kenv linsegr 0, .05, 1, .05, 0
>>>         aout vco2 kenv, kfreq
>>>         outs aout, aout
>>>       endin
>>>       """)
>>> c.setInputChannelCallback(foo)
>>> c.readScore("i1 0 0.2 \n i1 1 2")
>>> c.start()
>>> while (c.performKsmps() == 0):
>>> pass
>>> c.stop()
>>>
>>> I wonder if there could be a bug, or am I doing something wrong?
>>>
>>> Best regards,
>>> Søren
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://csound.1045644.n5.nabble.com/ctcsound-Python-CsoundVST-6-08-Windows-x64-tp5751978.html
>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>
>>> 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

Date2016-10-08 10:14
FromVictor Lazzarini
SubjectRe: ctcsound (Python, CsoundVST 6.08, Windows, x64)
I am running from the latest sources too. It’s puzzling that it does not work here
then. I tried using the debugger, but it fails on loading the csound library, so
I can’t use it.


> On 8 Oct 2016, at 10:03, Francois PINOT  wrote:
> 
> I just pulled again the sources and rebuilt Csound: it still works fine here.
> 
> François
> 
> 2016-10-08 10:43 GMT+02:00 Victor Lazzarini :
> I can confirm this on OSX. Setting the callback makes it segfault on performance.
> 
> 
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
> 
> > On 8 Oct 2016, at 07:53, Søren Jakobsen  wrote:
> >
> > Yes, it works fine without the callback.
> > Søren
> >
> >> On 10/7/16, Victor Lazzarini  wrote:
> >> Did you try without adding the callback?
> >>
> >> Victor Lazzarini
> >> Dean of Arts, Celtic Studies, and Philosophy
> >> Maynooth University
> >> Ireland
> >>
> >>> On 7 Oct 2016, at 21:13, sjakops  wrote:
> >>>
> >>> I am having some trouble with ctcsound (using CsoundVST 6.08) - when I try
> >>> to
> >>> run the code below I get this message:
> >>>
> >>> File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 813, in
> >>> performKsmps
> >>>   return libcsound.csoundPerformKsmps(self.cs)
> >>> WindowsError: exception: access violation reading 0xFFFFFFFFFFFFFFFF
> >>>
> >>> Code:
> >>>
> >>> import ctcsound
> >>> import ctypes
> >>>
> >>> def foo(csound, channelName, channelValuePtr, channelTypePtr):
> >>>   name = ctcsound.pstring(channelName)
> >>>   valPtr = ctypes.cast(channelValuePtr, ctypes.POINTER(ctcsound.MYFLT))
> >>>   valPtr[0] = ctcsound.MYFLT(440.0)
> >>>   print("hello", name)
> >>>
> >>> c = ctcsound.Csound()
> >>> c.setOption("-odac")
> >>> c.compileOrc("""
> >>>       sr=44100
> >>>       ksmps=32
> >>>       nchnls=2
> >>>       0dbfs=1
> >>>       instr 1
> >>>         kfreq invalue "freq"
> >>>         kenv linsegr 0, .05, 1, .05, 0
> >>>         aout vco2 kenv, kfreq
> >>>         outs aout, aout
> >>>       endin
> >>>       """)
> >>> c.setInputChannelCallback(foo)
> >>> c.readScore("i1 0 0.2 \n i1 1 2")
> >>> c.start()
> >>> while (c.performKsmps() == 0):
> >>> pass
> >>> c.stop()
> >>>
> >>> I wonder if there could be a bug, or am I doing something wrong?
> >>>
> >>> Best regards,
> >>> Søren
> >>>
> >>>
> >>>
> >>> --
> >>> View this message in context:
> >>> http://csound.1045644.n5.nabble.com/ctcsound-Python-CsoundVST-6-08-Windows-x64-tp5751978.html
> >>> Sent from the Csound - General mailing list archive at Nabble.com.
> >>>
> >>> 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

Date2016-10-08 10:17
FromFrancois PINOT
SubjectRe: ctcsound (Python, CsoundVST 6.08, Windows, x64)
I'll try it this afternoon on a Windows seven system...

François

2016-10-08 11:14 GMT+02:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
I am running from the latest sources too. It’s puzzling that it does not work here
then. I tried using the debugger, but it fails on loading the csound library, so
I can’t use it.


> On 8 Oct 2016, at 10:03, Francois PINOT <fggpinot@GMAIL.COM> wrote:
>
> I just pulled again the sources and rebuilt Csound: it still works fine here.
>
> François
>
> 2016-10-08 10:43 GMT+02:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
> I can confirm this on OSX. Setting the callback makes it segfault on performance.
>
>
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
>
> > On 8 Oct 2016, at 07:53, Søren Jakobsen <sorenkj@GMAIL.COM> wrote:
> >
> > Yes, it works fine without the callback.
> > Søren
> >
> >> On 10/7/16, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
> >> Did you try without adding the callback?
> >>
> >> Victor Lazzarini
> >> Dean of Arts, Celtic Studies, and Philosophy
> >> Maynooth University
> >> Ireland
> >>
> >>> On 7 Oct 2016, at 21:13, sjakops <sorenkj@GMAIL.COM> wrote:
> >>>
> >>> I am having some trouble with ctcsound (using CsoundVST 6.08) - when I try
> >>> to
> >>> run the code below I get this message:
> >>>
> >>> File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 813, in
> >>> performKsmps
> >>>   return libcsound.csoundPerformKsmps(self.cs)
> >>> WindowsError: exception: access violation reading 0xFFFFFFFFFFFFFFFF
> >>>
> >>> Code:
> >>>
> >>> import ctcsound
> >>> import ctypes
> >>>
> >>> def foo(csound, channelName, channelValuePtr, channelTypePtr):
> >>>   name = ctcsound.pstring(channelName)
> >>>   valPtr = ctypes.cast(channelValuePtr, ctypes.POINTER(ctcsound.MYFLT))
> >>>   valPtr[0] = ctcsound.MYFLT(440.0)
> >>>   print("hello", name)
> >>>
> >>> c = ctcsound.Csound()
> >>> c.setOption("-odac")
> >>> c.compileOrc("""
> >>>       sr=44100
> >>>       ksmps=32
> >>>       nchnls=2
> >>>       0dbfs=1
> >>>       instr 1
> >>>         kfreq invalue "freq"
> >>>         kenv linsegr 0, .05, 1, .05, 0
> >>>         aout vco2 kenv, kfreq
> >>>         outs aout, aout
> >>>       endin
> >>>       """)
> >>> c.setInputChannelCallback(foo)
> >>> c.readScore("i1 0 0.2 \n i1 1 2")
> >>> c.start()
> >>> while (c.performKsmps() == 0):
> >>> pass
> >>> c.stop()
> >>>
> >>> I wonder if there could be a bug, or am I doing something wrong?
> >>>
> >>> Best regards,
> >>> Søren
> >>>
> >>>
> >>>
> >>> --
> >>> View this message in context:
> >>> http://csound.1045644.n5.nabble.com/ctcsound-Python-CsoundVST-6-08-Windows-x64-tp5751978.html
> >>> Sent from the Csound - General mailing list archive at Nabble.com.
> >>>
> >>> 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

Date2016-10-08 10:32
FromFrancois PINOT
SubjectRe: ctcsound (Python, CsoundVST 6.08, Windows, x64)
Could you try it commenting out the first three lines in the foo function?

François

2016-10-08 11:14 GMT+02:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
I am running from the latest sources too. It’s puzzling that it does not work here
then. I tried using the debugger, but it fails on loading the csound library, so
I can’t use it.


> On 8 Oct 2016, at 10:03, Francois PINOT <fggpinot@GMAIL.COM> wrote:
>
> I just pulled again the sources and rebuilt Csound: it still works fine here.
>
> François
>
> 2016-10-08 10:43 GMT+02:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
> I can confirm this on OSX. Setting the callback makes it segfault on performance.
>
>
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
>
> > On 8 Oct 2016, at 07:53, Søren Jakobsen <sorenkj@GMAIL.COM> wrote:
> >
> > Yes, it works fine without the callback.
> > Søren
> >
> >> On 10/7/16, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
> >> Did you try without adding the callback?
> >>
> >> Victor Lazzarini
> >> Dean of Arts, Celtic Studies, and Philosophy
> >> Maynooth University
> >> Ireland
> >>
> >>> On 7 Oct 2016, at 21:13, sjakops <sorenkj@GMAIL.COM> wrote:
> >>>
> >>> I am having some trouble with ctcsound (using CsoundVST 6.08) - when I try
> >>> to
> >>> run the code below I get this message:
> >>>
> >>> File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 813, in
> >>> performKsmps
> >>>   return libcsound.csoundPerformKsmps(self.cs)
> >>> WindowsError: exception: access violation reading 0xFFFFFFFFFFFFFFFF
> >>>
> >>> Code:
> >>>
> >>> import ctcsound
> >>> import ctypes
> >>>
> >>> def foo(csound, channelName, channelValuePtr, channelTypePtr):
> >>>   name = ctcsound.pstring(channelName)
> >>>   valPtr = ctypes.cast(channelValuePtr, ctypes.POINTER(ctcsound.MYFLT))
> >>>   valPtr[0] = ctcsound.MYFLT(440.0)
> >>>   print("hello", name)
> >>>
> >>> c = ctcsound.Csound()
> >>> c.setOption("-odac")
> >>> c.compileOrc("""
> >>>       sr=44100
> >>>       ksmps=32
> >>>       nchnls=2
> >>>       0dbfs=1
> >>>       instr 1
> >>>         kfreq invalue "freq"
> >>>         kenv linsegr 0, .05, 1, .05, 0
> >>>         aout vco2 kenv, kfreq
> >>>         outs aout, aout
> >>>       endin
> >>>       """)
> >>> c.setInputChannelCallback(foo)
> >>> c.readScore("i1 0 0.2 \n i1 1 2")
> >>> c.start()
> >>> while (c.performKsmps() == 0):
> >>> pass
> >>> c.stop()
> >>>
> >>> I wonder if there could be a bug, or am I doing something wrong?
> >>>
> >>> Best regards,
> >>> Søren
> >>>
> >>>
> >>>
> >>> --
> >>> View this message in context:
> >>> http://csound.1045644.n5.nabble.com/ctcsound-Python-CsoundVST-6-08-Windows-x64-tp5751978.html
> >>> Sent from the Csound - General mailing list archive at Nabble.com.
> >>>
> >>> 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

Date2016-10-08 11:10
FromSøren Jakobsen
SubjectRe: ctcsound (Python, CsoundVST 6.08, Windows, x64)
If I comment out the first three line of foo (and leave a print
statement) I get the same error. I also tried replacing with the
latest ctcsound.py (am using the prebuilt CsoundVst) and I get this
message:

Traceback (most recent call last):
  File "d:\test.py", line 1, in 
    import ctcsound
  File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 230, in 
    libcsound.csoundGetOutputFormat.argtypes = [c_void_p, c_char_p, c_char_p]
  File "C:\Python27\lib\ctypes\__init__.py", line 375, in __getattr__
    func = self.__getitem__(name)
  File "C:\Python27\lib\ctypes\__init__.py", line 380, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'csoundGetOutputFormat' not found

On 10/8/16, Francois PINOT  wrote:
> Could you try it commenting out the first three lines in the foo function?
>
> François
>
> 2016-10-08 11:14 GMT+02:00 Victor Lazzarini :
>
>> I am running from the latest sources too. It’s puzzling that it does not
>> work here
>> then. I tried using the debugger, but it fails on loading the csound
>> library, so
>> I can’t use it.
>>
>>
>> > On 8 Oct 2016, at 10:03, Francois PINOT  wrote:
>> >
>> > I just pulled again the sources and rebuilt Csound: it still works fine
>> here.
>> >
>> > François
>> >
>> > 2016-10-08 10:43 GMT+02:00 Victor Lazzarini :
>> > I can confirm this on OSX. Setting the callback makes it segfault on
>> performance.
>> >
>> >
>> > Victor Lazzarini
>> > Dean of Arts, Celtic Studies, and Philosophy
>> > Maynooth University
>> > Ireland
>> >
>> > > On 8 Oct 2016, at 07:53, Søren Jakobsen  wrote:
>> > >
>> > > Yes, it works fine without the callback.
>> > > Søren
>> > >
>> > >> On 10/7/16, Victor Lazzarini  wrote:
>> > >> Did you try without adding the callback?
>> > >>
>> > >> Victor Lazzarini
>> > >> Dean of Arts, Celtic Studies, and Philosophy
>> > >> Maynooth University
>> > >> Ireland
>> > >>
>> > >>> On 7 Oct 2016, at 21:13, sjakops  wrote:
>> > >>>
>> > >>> I am having some trouble with ctcsound (using CsoundVST 6.08) -
>> > >>> when
>> I try
>> > >>> to
>> > >>> run the code below I get this message:
>> > >>>
>> > >>> File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 813, in
>> > >>> performKsmps
>> > >>>   return libcsound.csoundPerformKsmps(self.cs)
>> > >>> WindowsError: exception: access violation reading
>> > >>> 0xFFFFFFFFFFFFFFFF
>> > >>>
>> > >>> Code:
>> > >>>
>> > >>> import ctcsound
>> > >>> import ctypes
>> > >>>
>> > >>> def foo(csound, channelName, channelValuePtr, channelTypePtr):
>> > >>>   name = ctcsound.pstring(channelName)
>> > >>>   valPtr = ctypes.cast(channelValuePtr,
>> ctypes.POINTER(ctcsound.MYFLT))
>> > >>>   valPtr[0] = ctcsound.MYFLT(440.0)
>> > >>>   print("hello", name)
>> > >>>
>> > >>> c = ctcsound.Csound()
>> > >>> c.setOption("-odac")
>> > >>> c.compileOrc("""
>> > >>>       sr=44100
>> > >>>       ksmps=32
>> > >>>       nchnls=2
>> > >>>       0dbfs=1
>> > >>>       instr 1
>> > >>>         kfreq invalue "freq"
>> > >>>         kenv linsegr 0, .05, 1, .05, 0
>> > >>>         aout vco2 kenv, kfreq
>> > >>>         outs aout, aout
>> > >>>       endin
>> > >>>       """)
>> > >>> c.setInputChannelCallback(foo)
>> > >>> c.readScore("i1 0 0.2 \n i1 1 2")
>> > >>> c.start()
>> > >>> while (c.performKsmps() == 0):
>> > >>> pass
>> > >>> c.stop()
>> > >>>
>> > >>> I wonder if there could be a bug, or am I doing something wrong?
>> > >>>
>> > >>> Best regards,
>> > >>> Søren
>> > >>>
>> > >>>
>> > >>>
>> > >>> --
>> > >>> View this message in context:
>> > >>> http://csound.1045644.n5.nabble.com/ctcsound-Python-
>> CsoundVST-6-08-Windows-x64-tp5751978.html
>> > >>> Sent from the Csound - General mailing list archive at Nabble.com.
>> > >>>
>> > >>> 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

Date2016-10-08 11:14
FromFrancois PINOT
SubjectRe: ctcsound (Python, CsoundVST 6.08, Windows, x64)
Ok this means that you have to use the ctcsound.py shipped with the prebuilt Csound VST. Can you try your example commenting out the first and the fourth line of foo and leaving the second and third line uncommented?

François

2016-10-08 12:10 GMT+02:00 Søren Jakobsen <sorenkj@gmail.com>:
If I comment out the first three line of foo (and leave a print
statement) I get the same error. I also tried replacing with the
latest ctcsound.py (am using the prebuilt CsoundVst) and I get this
message:

Traceback (most recent call last):
  File "d:\test.py", line 1, in <module>
    import ctcsound
  File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 230, in <module>
    libcsound.csoundGetOutputFormat.argtypes = [c_void_p, c_char_p, c_char_p]
  File "C:\Python27\lib\ctypes\__init__.py", line 375, in __getattr__
    func = self.__getitem__(name)
  File "C:\Python27\lib\ctypes\__init__.py", line 380, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'csoundGetOutputFormat' not found

On 10/8/16, Francois PINOT <fggpinot@gmail.com> wrote:
> Could you try it commenting out the first three lines in the foo function?
>
> François
>
> 2016-10-08 11:14 GMT+02:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
>
>> I am running from the latest sources too. It’s puzzling that it does not
>> work here
>> then. I tried using the debugger, but it fails on loading the csound
>> library, so
>> I can’t use it.
>>
>>
>> > On 8 Oct 2016, at 10:03, Francois PINOT <fggpinot@GMAIL.COM> wrote:
>> >
>> > I just pulled again the sources and rebuilt Csound: it still works fine
>> here.
>> >
>> > François
>> >
>> > 2016-10-08 10:43 GMT+02:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
>> > I can confirm this on OSX. Setting the callback makes it segfault on
>> performance.
>> >
>> >
>> > Victor Lazzarini
>> > Dean of Arts, Celtic Studies, and Philosophy
>> > Maynooth University
>> > Ireland
>> >
>> > > On 8 Oct 2016, at 07:53, Søren Jakobsen <sorenkj@GMAIL.COM> wrote:
>> > >
>> > > Yes, it works fine without the callback.
>> > > Søren
>> > >
>> > >> On 10/7/16, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
>> > >> Did you try without adding the callback?
>> > >>
>> > >> Victor Lazzarini
>> > >> Dean of Arts, Celtic Studies, and Philosophy
>> > >> Maynooth University
>> > >> Ireland
>> > >>
>> > >>> On 7 Oct 2016, at 21:13, sjakops <sorenkj@GMAIL.COM> wrote:
>> > >>>
>> > >>> I am having some trouble with ctcsound (using CsoundVST 6.08) -
>> > >>> when
>> I try
>> > >>> to
>> > >>> run the code below I get this message:
>> > >>>
>> > >>> File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 813, in
>> > >>> performKsmps
>> > >>>   return libcsound.csoundPerformKsmps(self.cs)
>> > >>> WindowsError: exception: access violation reading
>> > >>> 0xFFFFFFFFFFFFFFFF
>> > >>>
>> > >>> Code:
>> > >>>
>> > >>> import ctcsound
>> > >>> import ctypes
>> > >>>
>> > >>> def foo(csound, channelName, channelValuePtr, channelTypePtr):
>> > >>>   name = ctcsound.pstring(channelName)
>> > >>>   valPtr = ctypes.cast(channelValuePtr,
>> ctypes.POINTER(ctcsound.MYFLT))
>> > >>>   valPtr[0] = ctcsound.MYFLT(440.0)
>> > >>>   print("hello", name)
>> > >>>
>> > >>> c = ctcsound.Csound()
>> > >>> c.setOption("-odac")
>> > >>> c.compileOrc("""
>> > >>>       sr=44100
>> > >>>       ksmps=32
>> > >>>       nchnls=2
>> > >>>       0dbfs=1
>> > >>>       instr 1
>> > >>>         kfreq invalue "freq"
>> > >>>         kenv linsegr 0, .05, 1, .05, 0
>> > >>>         aout vco2 kenv, kfreq
>> > >>>         outs aout, aout
>> > >>>       endin
>> > >>>       """)
>> > >>> c.setInputChannelCallback(foo)
>> > >>> c.readScore("i1 0 0.2 \n i1 1 2")
>> > >>> c.start()
>> > >>> while (c.performKsmps() == 0):
>> > >>> pass
>> > >>> c.stop()
>> > >>>
>> > >>> I wonder if there could be a bug, or am I doing something wrong?
>> > >>>
>> > >>> Best regards,
>> > >>> Søren
>> > >>>
>> > >>>
>> > >>>
>> > >>> --
>> > >>> View this message in context:
>> > >>> http://csound.1045644.n5.nabble.com/ctcsound-Python-
>> CsoundVST-6-08-Windows-x64-tp5751978.html
>> > >>> Sent from the Csound - General mailing list archive at Nabble.com.
>> > >>>
>> > >>> 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

Date2016-10-08 11:25
FromVictor Lazzarini
SubjectRe: ctcsound (Python, CsoundVST 6.08, Windows, x64)
On OSX, I commented out all lines and added a pass, but it had the same result

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 8 Oct 2016, at 11:15, Francois PINOT <fggpinot@GMAIL.COM> wrote:

Ok this means that you have to use the ctcsound.py shipped with the prebuilt Csound VST. Can you try your example commenting out the first and the fourth line of foo and leaving the second and third line uncommented?

François

2016-10-08 12:10 GMT+02:00 Søren Jakobsen <sorenkj@gmail.com>:
If I comment out the first three line of foo (and leave a print
statement) I get the same error. I also tried replacing with the
latest ctcsound.py (am using the prebuilt CsoundVst) and I get this
message:

Traceback (most recent call last):
  File "d:\test.py", line 1, in <module>
    import ctcsound
  File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 230, in <module>
    libcsound.csoundGetOutputFormat.argtypes = [c_void_p, c_char_p, c_char_p]
  File "C:\Python27\lib\ctypes\__init__.py", line 375, in __getattr__
    func = self.__getitem__(name)
  File "C:\Python27\lib\ctypes\__init__.py", line 380, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'csoundGetOutputFormat' not found

On 10/8/16, Francois PINOT <fggpinot@gmail.com> wrote:
> Could you try it commenting out the first three lines in the foo function?
>
> François
>
> 2016-10-08 11:14 GMT+02:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
>
>> I am running from the latest sources too. It’s puzzling that it does not
>> work here
>> then. I tried using the debugger, but it fails on loading the csound
>> library, so
>> I can’t use it.
>>
>>
>> > On 8 Oct 2016, at 10:03, Francois PINOT <fggpinot@GMAIL.COM> wrote:
>> >
>> > I just pulled again the sources and rebuilt Csound: it still works fine
>> here.
>> >
>> > François
>> >
>> > 2016-10-08 10:43 GMT+02:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
>> > I can confirm this on OSX. Setting the callback makes it segfault on
>> performance.
>> >
>> >
>> > Victor Lazzarini
>> > Dean of Arts, Celtic Studies, and Philosophy
>> > Maynooth University
>> > Ireland
>> >
>> > > On 8 Oct 2016, at 07:53, Søren Jakobsen <sorenkj@GMAIL.COM> wrote:
>> > >
>> > > Yes, it works fine without the callback.
>> > > Søren
>> > >
>> > >> On 10/7/16, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
>> > >> Did you try without adding the callback?
>> > >>
>> > >> Victor Lazzarini
>> > >> Dean of Arts, Celtic Studies, and Philosophy
>> > >> Maynooth University
>> > >> Ireland
>> > >>
>> > >>> On 7 Oct 2016, at 21:13, sjakops <sorenkj@GMAIL.COM> wrote:
>> > >>>
>> > >>> I am having some trouble with ctcsound (using CsoundVST 6.08) -
>> > >>> when
>> I try
>> > >>> to
>> > >>> run the code below I get this message:
>> > >>>
>> > >>> File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 813, in
>> > >>> performKsmps
>> > >>>   return libcsound.csoundPerformKsmps(self.cs)
>> > >>> WindowsError: exception: access violation reading
>> > >>> 0xFFFFFFFFFFFFFFFF
>> > >>>
>> > >>> Code:
>> > >>>
>> > >>> import ctcsound
>> > >>> import ctypes
>> > >>>
>> > >>> def foo(csound, channelName, channelValuePtr, channelTypePtr):
>> > >>>   name = ctcsound.pstring(channelName)
>> > >>>   valPtr = ctypes.cast(channelValuePtr,
>> ctypes.POINTER(ctcsound.MYFLT))
>> > >>>   valPtr[0] = ctcsound.MYFLT(440.0)
>> > >>>   print("hello", name)
>> > >>>
>> > >>> c = ctcsound.Csound()
>> > >>> c.setOption("-odac")
>> > >>> c.compileOrc("""
>> > >>>       sr=44100
>> > >>>       ksmps=32
>> > >>>       nchnls=2
>> > >>>       0dbfs=1
>> > >>>       instr 1
>> > >>>         kfreq invalue "freq"
>> > >>>         kenv linsegr 0, .05, 1, .05, 0
>> > >>>         aout vco2 kenv, kfreq
>> > >>>         outs aout, aout
>> > >>>       endin
>> > >>>       """)
>> > >>> c.setInputChannelCallback(foo)
>> > >>> c.readScore("i1 0 0.2 \n i1 1 2")
>> > >>> c.start()
>> > >>> while (c.performKsmps() == 0):
>> > >>> pass
>> > >>> c.stop()
>> > >>>
>> > >>> I wonder if there could be a bug, or am I doing something wrong?
>> > >>>
>> > >>> Best regards,
>> > >>> Søren
>> > >>>
>> > >>>
>> > >>>
>> > >>> --
>> > >>> View this message in context:
>> > >>> http://csound.1045644.n5.nabble.com/ctcsound-Python-
>> CsoundVST-6-08-Windows-x64-tp5751978.html
>> > >>> Sent from the Csound - General mailing list archive at Nabble.com.
>> > >>>
>> > >>> 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

Date2016-10-08 11:29
FromSøren Jakobsen
SubjectRe: ctcsound (Python, CsoundVST 6.08, Windows, x64)
When commenting out only the first and fourth line of foo I still get
the same error (sometimes a different address is reported).

I wonder if it could also be an issue with my installation of numpy..
(to install numpy on my x64 I downloaded the zip from here
https://pypi.python.org/pypi/numpy and ran 'python setup.py install').

On 10/8/16, Francois PINOT  wrote:
> Ok this means that you have to use the ctcsound.py shipped with the
> prebuilt Csound VST. Can you try your example commenting out the first and
> the fourth line of foo and leaving the second and third line uncommented?
>
> François
>
> 2016-10-08 12:10 GMT+02:00 Søren Jakobsen :
>
>> If I comment out the first three line of foo (and leave a print
>> statement) I get the same error. I also tried replacing with the
>> latest ctcsound.py (am using the prebuilt CsoundVst) and I get this
>> message:
>>
>> Traceback (most recent call last):
>>   File "d:\test.py", line 1, in 
>>     import ctcsound
>>   File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 230, in
>> 
>>     libcsound.csoundGetOutputFormat.argtypes = [c_void_p, c_char_p,
>> c_char_p]
>>   File "C:\Python27\lib\ctypes\__init__.py", line 375, in __getattr__
>>     func = self.__getitem__(name)
>>   File "C:\Python27\lib\ctypes\__init__.py", line 380, in __getitem__
>>     func = self._FuncPtr((name_or_ordinal, self))
>> AttributeError: function 'csoundGetOutputFormat' not found
>>
>> On 10/8/16, Francois PINOT  wrote:
>> > Could you try it commenting out the first three lines in the foo
>> function?
>> >
>> > François
>> >
>> > 2016-10-08 11:14 GMT+02:00 Victor Lazzarini :
>> >
>> >> I am running from the latest sources too. It’s puzzling that it does
>> >> not
>> >> work here
>> >> then. I tried using the debugger, but it fails on loading the csound
>> >> library, so
>> >> I can’t use it.
>> >>
>> >>
>> >> > On 8 Oct 2016, at 10:03, Francois PINOT  wrote:
>> >> >
>> >> > I just pulled again the sources and rebuilt Csound: it still works
>> fine
>> >> here.
>> >> >
>> >> > François
>> >> >
>> >> > 2016-10-08 10:43 GMT+02:00 Victor Lazzarini
>> >> > > >:
>> >> > I can confirm this on OSX. Setting the callback makes it segfault on
>> >> performance.
>> >> >
>> >> >
>> >> > Victor Lazzarini
>> >> > Dean of Arts, Celtic Studies, and Philosophy
>> >> > Maynooth University
>> >> > Ireland
>> >> >
>> >> > > On 8 Oct 2016, at 07:53, Søren Jakobsen  wrote:
>> >> > >
>> >> > > Yes, it works fine without the callback.
>> >> > > Søren
>> >> > >
>> >> > >> On 10/7/16, Victor Lazzarini  wrote:
>> >> > >> Did you try without adding the callback?
>> >> > >>
>> >> > >> Victor Lazzarini
>> >> > >> Dean of Arts, Celtic Studies, and Philosophy
>> >> > >> Maynooth University
>> >> > >> Ireland
>> >> > >>
>> >> > >>> On 7 Oct 2016, at 21:13, sjakops  wrote:
>> >> > >>>
>> >> > >>> I am having some trouble with ctcsound (using CsoundVST 6.08) -
>> >> > >>> when
>> >> I try
>> >> > >>> to
>> >> > >>> run the code below I get this message:
>> >> > >>>
>> >> > >>> File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 813,
>> >> > >>> in
>> >> > >>> performKsmps
>> >> > >>>   return libcsound.csoundPerformKsmps(self.cs)
>> >> > >>> WindowsError: exception: access violation reading
>> >> > >>> 0xFFFFFFFFFFFFFFFF
>> >> > >>>
>> >> > >>> Code:
>> >> > >>>
>> >> > >>> import ctcsound
>> >> > >>> import ctypes
>> >> > >>>
>> >> > >>> def foo(csound, channelName, channelValuePtr, channelTypePtr):
>> >> > >>>   name = ctcsound.pstring(channelName)
>> >> > >>>   valPtr = ctypes.cast(channelValuePtr,
>> >> ctypes.POINTER(ctcsound.MYFLT))
>> >> > >>>   valPtr[0] = ctcsound.MYFLT(440.0)
>> >> > >>>   print("hello", name)
>> >> > >>>
>> >> > >>> c = ctcsound.Csound()
>> >> > >>> c.setOption("-odac")
>> >> > >>> c.compileOrc("""
>> >> > >>>       sr=44100
>> >> > >>>       ksmps=32
>> >> > >>>       nchnls=2
>> >> > >>>       0dbfs=1
>> >> > >>>       instr 1
>> >> > >>>         kfreq invalue "freq"
>> >> > >>>         kenv linsegr 0, .05, 1, .05, 0
>> >> > >>>         aout vco2 kenv, kfreq
>> >> > >>>         outs aout, aout
>> >> > >>>       endin
>> >> > >>>       """)
>> >> > >>> c.setInputChannelCallback(foo)
>> >> > >>> c.readScore("i1 0 0.2 \n i1 1 2")
>> >> > >>> c.start()
>> >> > >>> while (c.performKsmps() == 0):
>> >> > >>> pass
>> >> > >>> c.stop()
>> >> > >>>
>> >> > >>> I wonder if there could be a bug, or am I doing something wrong?
>> >> > >>>
>> >> > >>> Best regards,
>> >> > >>> Søren
>> >> > >>>
>> >> > >>>
>> >> > >>>
>> >> > >>> --
>> >> > >>> View this message in context:
>> >> > >>> http://csound.1045644.n5.nabble.com/ctcsound-Python-
>> >> CsoundVST-6-08-Windows-x64-tp5751978.html
>> >> > >>> Sent from the Csound - General mailing list archive at
>> >> > >>> Nabble.com.
>> >> > >>>
>> >> > >>> 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

Date2016-10-08 11:35
FromVictor Lazzarini
SubjectRe: ctcsound (Python, CsoundVST 6.08, Windows, x64)
Try commenting out the whole thing and adding a pass statement. If the error is still
there, then it is the same as I a getting here

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 8 Oct 2016, at 11:29, Søren Jakobsen  wrote:
> 
> When commenting out only the first and fourth line of foo I still get
> the same error (sometimes a different address is reported).
> 
> I wonder if it could also be an issue with my installation of numpy..
> (to install numpy on my x64 I downloaded the zip from here
> https://pypi.python.org/pypi/numpy and ran 'python setup.py install').
> 
>> On 10/8/16, Francois PINOT  wrote:
>> Ok this means that you have to use the ctcsound.py shipped with the
>> prebuilt Csound VST. Can you try your example commenting out the first and
>> the fourth line of foo and leaving the second and third line uncommented?
>> 
>> François
>> 
>> 2016-10-08 12:10 GMT+02:00 Søren Jakobsen :
>> 
>>> If I comment out the first three line of foo (and leave a print
>>> statement) I get the same error. I also tried replacing with the
>>> latest ctcsound.py (am using the prebuilt CsoundVst) and I get this
>>> message:
>>> 
>>> Traceback (most recent call last):
>>>  File "d:\test.py", line 1, in 
>>>    import ctcsound
>>>  File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 230, in
>>> 
>>>    libcsound.csoundGetOutputFormat.argtypes = [c_void_p, c_char_p,
>>> c_char_p]
>>>  File "C:\Python27\lib\ctypes\__init__.py", line 375, in __getattr__
>>>    func = self.__getitem__(name)
>>>  File "C:\Python27\lib\ctypes\__init__.py", line 380, in __getitem__
>>>    func = self._FuncPtr((name_or_ordinal, self))
>>> AttributeError: function 'csoundGetOutputFormat' not found
>>> 
>>>> On 10/8/16, Francois PINOT  wrote:
>>>> Could you try it commenting out the first three lines in the foo
>>> function?
>>>> 
>>>> François
>>>> 
>>>> 2016-10-08 11:14 GMT+02:00 Victor Lazzarini :
>>>> 
>>>>> I am running from the latest sources too. It’s puzzling that it does
>>>>> not
>>>>> work here
>>>>> then. I tried using the debugger, but it fails on loading the csound
>>>>> library, so
>>>>> I can’t use it.
>>>>> 
>>>>> 
>>>>>> On 8 Oct 2016, at 10:03, Francois PINOT  wrote:
>>>>>> 
>>>>>> I just pulled again the sources and rebuilt Csound: it still works
>>> fine
>>>>> here.
>>>>>> 
>>>>>> François
>>>>>> 
>>>>>> 2016-10-08 10:43 GMT+02:00 Victor Lazzarini
>>>>>> >>> :
>>>>>> I can confirm this on OSX. Setting the callback makes it segfault on
>>>>> performance.
>>>>>> 
>>>>>> 
>>>>>> Victor Lazzarini
>>>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>>>> Maynooth University
>>>>>> Ireland
>>>>>> 
>>>>>>> On 8 Oct 2016, at 07:53, Søren Jakobsen  wrote:
>>>>>>> 
>>>>>>> Yes, it works fine without the callback.
>>>>>>> Søren
>>>>>>> 
>>>>>>>> On 10/7/16, Victor Lazzarini  wrote:
>>>>>>>> Did you try without adding the callback?
>>>>>>>> 
>>>>>>>> Victor Lazzarini
>>>>>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>>>>>> Maynooth University
>>>>>>>> Ireland
>>>>>>>> 
>>>>>>>>> On 7 Oct 2016, at 21:13, sjakops  wrote:
>>>>>>>>> 
>>>>>>>>> I am having some trouble with ctcsound (using CsoundVST 6.08) -
>>>>>>>>> when
>>>>> I try
>>>>>>>>> to
>>>>>>>>> run the code below I get this message:
>>>>>>>>> 
>>>>>>>>> File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 813,
>>>>>>>>> in
>>>>>>>>> performKsmps
>>>>>>>>>  return libcsound.csoundPerformKsmps(self.cs)
>>>>>>>>> WindowsError: exception: access violation reading
>>>>>>>>> 0xFFFFFFFFFFFFFFFF
>>>>>>>>> 
>>>>>>>>> Code:
>>>>>>>>> 
>>>>>>>>> import ctcsound
>>>>>>>>> import ctypes
>>>>>>>>> 
>>>>>>>>> def foo(csound, channelName, channelValuePtr, channelTypePtr):
>>>>>>>>>  name = ctcsound.pstring(channelName)
>>>>>>>>>  valPtr = ctypes.cast(channelValuePtr,
>>>>> ctypes.POINTER(ctcsound.MYFLT))
>>>>>>>>>  valPtr[0] = ctcsound.MYFLT(440.0)
>>>>>>>>>  print("hello", name)
>>>>>>>>> 
>>>>>>>>> c = ctcsound.Csound()
>>>>>>>>> c.setOption("-odac")
>>>>>>>>> c.compileOrc("""
>>>>>>>>>      sr=44100
>>>>>>>>>      ksmps=32
>>>>>>>>>      nchnls=2
>>>>>>>>>      0dbfs=1
>>>>>>>>>      instr 1
>>>>>>>>>        kfreq invalue "freq"
>>>>>>>>>        kenv linsegr 0, .05, 1, .05, 0
>>>>>>>>>        aout vco2 kenv, kfreq
>>>>>>>>>        outs aout, aout
>>>>>>>>>      endin
>>>>>>>>>      """)
>>>>>>>>> c.setInputChannelCallback(foo)
>>>>>>>>> c.readScore("i1 0 0.2 \n i1 1 2")
>>>>>>>>> c.start()
>>>>>>>>> while (c.performKsmps() == 0):
>>>>>>>>> pass
>>>>>>>>> c.stop()
>>>>>>>>> 
>>>>>>>>> I wonder if there could be a bug, or am I doing something wrong?
>>>>>>>>> 
>>>>>>>>> Best regards,
>>>>>>>>> Søren
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> --
>>>>>>>>> View this message in context:
>>>>>>>>> http://csound.1045644.n5.nabble.com/ctcsound-Python-
>>>>> CsoundVST-6-08-Windows-x64-tp5751978.html
>>>>>>>>> Sent from the Csound - General mailing list archive at
>>>>>>>>> Nabble.com.
>>>>>>>>> 
>>>>>>>>> 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

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

Date2016-10-08 12:24
FromVictor Lazzarini
SubjectRe: ctcsound (Python, CsoundVST 6.08, Windows, x64)
yes, I commented everything out and added a ‘pass’. Same result.
> On 8 Oct 2016, at 10:32, Francois PINOT  wrote:
> 
> Could you try it commenting out the first three lines in the foo function?
> 
> François
> 
> 2016-10-08 11:14 GMT+02:00 Victor Lazzarini :
> I am running from the latest sources too. It’s puzzling that it does not work here
> then. I tried using the debugger, but it fails on loading the csound library, so
> I can’t use it.
> 
> 
> > On 8 Oct 2016, at 10:03, Francois PINOT  wrote:
> >
> > I just pulled again the sources and rebuilt Csound: it still works fine here.
> >
> > François
> >
> > 2016-10-08 10:43 GMT+02:00 Victor Lazzarini :
> > I can confirm this on OSX. Setting the callback makes it segfault on performance.
> >
> >
> > Victor Lazzarini
> > Dean of Arts, Celtic Studies, and Philosophy
> > Maynooth University
> > Ireland
> >
> > > On 8 Oct 2016, at 07:53, Søren Jakobsen  wrote:
> > >
> > > Yes, it works fine without the callback.
> > > Søren
> > >
> > >> On 10/7/16, Victor Lazzarini  wrote:
> > >> Did you try without adding the callback?
> > >>
> > >> Victor Lazzarini
> > >> Dean of Arts, Celtic Studies, and Philosophy
> > >> Maynooth University
> > >> Ireland
> > >>
> > >>> On 7 Oct 2016, at 21:13, sjakops  wrote:
> > >>>
> > >>> I am having some trouble with ctcsound (using CsoundVST 6.08) - when I try
> > >>> to
> > >>> run the code below I get this message:
> > >>>
> > >>> File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 813, in
> > >>> performKsmps
> > >>>   return libcsound.csoundPerformKsmps(self.cs)
> > >>> WindowsError: exception: access violation reading 0xFFFFFFFFFFFFFFFF
> > >>>
> > >>> Code:
> > >>>
> > >>> import ctcsound
> > >>> import ctypes
> > >>>
> > >>> def foo(csound, channelName, channelValuePtr, channelTypePtr):
> > >>>   name = ctcsound.pstring(channelName)
> > >>>   valPtr = ctypes.cast(channelValuePtr, ctypes.POINTER(ctcsound.MYFLT))
> > >>>   valPtr[0] = ctcsound.MYFLT(440.0)
> > >>>   print("hello", name)
> > >>>
> > >>> c = ctcsound.Csound()
> > >>> c.setOption("-odac")
> > >>> c.compileOrc("""
> > >>>       sr=44100
> > >>>       ksmps=32
> > >>>       nchnls=2
> > >>>       0dbfs=1
> > >>>       instr 1
> > >>>         kfreq invalue "freq"
> > >>>         kenv linsegr 0, .05, 1, .05, 0
> > >>>         aout vco2 kenv, kfreq
> > >>>         outs aout, aout
> > >>>       endin
> > >>>       """)
> > >>> c.setInputChannelCallback(foo)
> > >>> c.readScore("i1 0 0.2 \n i1 1 2")
> > >>> c.start()
> > >>> while (c.performKsmps() == 0):
> > >>> pass
> > >>> c.stop()
> > >>>
> > >>> I wonder if there could be a bug, or am I doing something wrong?
> > >>>
> > >>> Best regards,
> > >>> Søren
> > >>>
> > >>>
> > >>>
> > >>> --
> > >>> View this message in context:
> > >>> http://csound.1045644.n5.nabble.com/ctcsound-Python-CsoundVST-6-08-Windows-x64-tp5751978.html
> > >>> Sent from the Csound - General mailing list archive at Nabble.com.
> > >>>
> > >>> 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

Date2016-10-08 12:26
FromSøren Jakobsen
SubjectRe: ctcsound (Python, CsoundVST 6.08, Windows, x64)
Yes, same error if I comment out everything and pass.
Søren

On 10/8/16, Victor Lazzarini  wrote:
> Try commenting out the whole thing and adding a pass statement. If the error
> is still
> there, then it is the same as I a getting here
>
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
>
>> On 8 Oct 2016, at 11:29, Søren Jakobsen  wrote:
>>
>> When commenting out only the first and fourth line of foo I still get
>> the same error (sometimes a different address is reported).
>>
>> I wonder if it could also be an issue with my installation of numpy..
>> (to install numpy on my x64 I downloaded the zip from here
>> https://pypi.python.org/pypi/numpy and ran 'python setup.py install').
>>
>>> On 10/8/16, Francois PINOT  wrote:
>>> Ok this means that you have to use the ctcsound.py shipped with the
>>> prebuilt Csound VST. Can you try your example commenting out the first
>>> and
>>> the fourth line of foo and leaving the second and third line
>>> uncommented?
>>>
>>> François
>>>
>>> 2016-10-08 12:10 GMT+02:00 Søren Jakobsen :
>>>
>>>> If I comment out the first three line of foo (and leave a print
>>>> statement) I get the same error. I also tried replacing with the
>>>> latest ctcsound.py (am using the prebuilt CsoundVst) and I get this
>>>> message:
>>>>
>>>> Traceback (most recent call last):
>>>>  File "d:\test.py", line 1, in 
>>>>    import ctcsound
>>>>  File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 230, in
>>>> 
>>>>    libcsound.csoundGetOutputFormat.argtypes = [c_void_p, c_char_p,
>>>> c_char_p]
>>>>  File "C:\Python27\lib\ctypes\__init__.py", line 375, in __getattr__
>>>>    func = self.__getitem__(name)
>>>>  File "C:\Python27\lib\ctypes\__init__.py", line 380, in __getitem__
>>>>    func = self._FuncPtr((name_or_ordinal, self))
>>>> AttributeError: function 'csoundGetOutputFormat' not found
>>>>
>>>>> On 10/8/16, Francois PINOT  wrote:
>>>>> Could you try it commenting out the first three lines in the foo
>>>> function?
>>>>>
>>>>> François
>>>>>
>>>>> 2016-10-08 11:14 GMT+02:00 Victor Lazzarini
>>>>> :
>>>>>
>>>>>> I am running from the latest sources too. It’s puzzling that it does
>>>>>> not
>>>>>> work here
>>>>>> then. I tried using the debugger, but it fails on loading the csound
>>>>>> library, so
>>>>>> I can’t use it.
>>>>>>
>>>>>>
>>>>>>> On 8 Oct 2016, at 10:03, Francois PINOT  wrote:
>>>>>>>
>>>>>>> I just pulled again the sources and rebuilt Csound: it still works
>>>> fine
>>>>>> here.
>>>>>>>
>>>>>>> François
>>>>>>>
>>>>>>> 2016-10-08 10:43 GMT+02:00 Victor Lazzarini
>>>>>>> >>>> :
>>>>>>> I can confirm this on OSX. Setting the callback makes it segfault on
>>>>>> performance.
>>>>>>>
>>>>>>>
>>>>>>> Victor Lazzarini
>>>>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>>>>> Maynooth University
>>>>>>> Ireland
>>>>>>>
>>>>>>>> On 8 Oct 2016, at 07:53, Søren Jakobsen  wrote:
>>>>>>>>
>>>>>>>> Yes, it works fine without the callback.
>>>>>>>> Søren
>>>>>>>>
>>>>>>>>> On 10/7/16, Victor Lazzarini  wrote:
>>>>>>>>> Did you try without adding the callback?
>>>>>>>>>
>>>>>>>>> Victor Lazzarini
>>>>>>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>>>>>>> Maynooth University
>>>>>>>>> Ireland
>>>>>>>>>
>>>>>>>>>> On 7 Oct 2016, at 21:13, sjakops  wrote:
>>>>>>>>>>
>>>>>>>>>> I am having some trouble with ctcsound (using CsoundVST 6.08) -
>>>>>>>>>> when
>>>>>> I try
>>>>>>>>>> to
>>>>>>>>>> run the code below I get this message:
>>>>>>>>>>
>>>>>>>>>> File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 813,
>>>>>>>>>> in
>>>>>>>>>> performKsmps
>>>>>>>>>>  return libcsound.csoundPerformKsmps(self.cs)
>>>>>>>>>> WindowsError: exception: access violation reading
>>>>>>>>>> 0xFFFFFFFFFFFFFFFF
>>>>>>>>>>
>>>>>>>>>> Code:
>>>>>>>>>>
>>>>>>>>>> import ctcsound
>>>>>>>>>> import ctypes
>>>>>>>>>>
>>>>>>>>>> def foo(csound, channelName, channelValuePtr, channelTypePtr):
>>>>>>>>>>  name = ctcsound.pstring(channelName)
>>>>>>>>>>  valPtr = ctypes.cast(channelValuePtr,
>>>>>> ctypes.POINTER(ctcsound.MYFLT))
>>>>>>>>>>  valPtr[0] = ctcsound.MYFLT(440.0)
>>>>>>>>>>  print("hello", name)
>>>>>>>>>>
>>>>>>>>>> c = ctcsound.Csound()
>>>>>>>>>> c.setOption("-odac")
>>>>>>>>>> c.compileOrc("""
>>>>>>>>>>      sr=44100
>>>>>>>>>>      ksmps=32
>>>>>>>>>>      nchnls=2
>>>>>>>>>>      0dbfs=1
>>>>>>>>>>      instr 1
>>>>>>>>>>        kfreq invalue "freq"
>>>>>>>>>>        kenv linsegr 0, .05, 1, .05, 0
>>>>>>>>>>        aout vco2 kenv, kfreq
>>>>>>>>>>        outs aout, aout
>>>>>>>>>>      endin
>>>>>>>>>>      """)
>>>>>>>>>> c.setInputChannelCallback(foo)
>>>>>>>>>> c.readScore("i1 0 0.2 \n i1 1 2")
>>>>>>>>>> c.start()
>>>>>>>>>> while (c.performKsmps() == 0):
>>>>>>>>>> pass
>>>>>>>>>> c.stop()
>>>>>>>>>>
>>>>>>>>>> I wonder if there could be a bug, or am I doing something wrong?
>>>>>>>>>>
>>>>>>>>>> Best regards,
>>>>>>>>>> Søren
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> View this message in context:
>>>>>>>>>> http://csound.1045644.n5.nabble.com/ctcsound-Python-
>>>>>> CsoundVST-6-08-Windows-x64-tp5751978.html
>>>>>>>>>> Sent from the Csound - General mailing list archive at
>>>>>>>>>> Nabble.com.
>>>>>>>>>>
>>>>>>>>>> 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
>
> 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

Date2016-10-08 14:50
FromFrancois PINOT
SubjectRe: ctcsound (Python, CsoundVST 6.08, Windows, x64)
I installed Csound 6.07 and Python 3.5 (from Anaconda) on a brand new Virtual Machine with Windows seven and I get the same error. So it seems it has been there for a while.

However, on my Ubuntu box, it's running fine with Python 2.7 and Python 3.5. Weird...

François

2016-10-08 13:26 GMT+02:00 Søren Jakobsen <sorenkj@gmail.com>:
Yes, same error if I comment out everything and pass.
Søren

On 10/8/16, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
> Try commenting out the whole thing and adding a pass statement. If the error
> is still
> there, then it is the same as I a getting here
>
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
>
>> On 8 Oct 2016, at 11:29, Søren Jakobsen <sorenkj@GMAIL.COM> wrote:
>>
>> When commenting out only the first and fourth line of foo I still get
>> the same error (sometimes a different address is reported).
>>
>> I wonder if it could also be an issue with my installation of numpy..
>> (to install numpy on my x64 I downloaded the zip from here
>> https://pypi.python.org/pypi/numpy and ran 'python setup.py install').
>>
>>> On 10/8/16, Francois PINOT <fggpinot@gmail.com> wrote:
>>> Ok this means that you have to use the ctcsound.py shipped with the
>>> prebuilt Csound VST. Can you try your example commenting out the first
>>> and
>>> the fourth line of foo and leaving the second and third line
>>> uncommented?
>>>
>>> François
>>>
>>> 2016-10-08 12:10 GMT+02:00 Søren Jakobsen <sorenkj@gmail.com>:
>>>
>>>> If I comment out the first three line of foo (and leave a print
>>>> statement) I get the same error. I also tried replacing with the
>>>> latest ctcsound.py (am using the prebuilt CsoundVst) and I get this
>>>> message:
>>>>
>>>> Traceback (most recent call last):
>>>>  File "d:\test.py", line 1, in <module>
>>>>    import ctcsound
>>>>  File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 230, in
>>>> <module>
>>>>    libcsound.csoundGetOutputFormat.argtypes = [c_void_p, c_char_p,
>>>> c_char_p]
>>>>  File "C:\Python27\lib\ctypes\__init__.py", line 375, in __getattr__
>>>>    func = self.__getitem__(name)
>>>>  File "C:\Python27\lib\ctypes\__init__.py", line 380, in __getitem__
>>>>    func = self._FuncPtr((name_or_ordinal, self))
>>>> AttributeError: function 'csoundGetOutputFormat' not found
>>>>
>>>>> On 10/8/16, Francois PINOT <fggpinot@gmail.com> wrote:
>>>>> Could you try it commenting out the first three lines in the foo
>>>> function?
>>>>>
>>>>> François
>>>>>
>>>>> 2016-10-08 11:14 GMT+02:00 Victor Lazzarini
>>>>> <Victor.Lazzarini@nuim.ie>:
>>>>>
>>>>>> I am running from the latest sources too. It’s puzzling that it does
>>>>>> not
>>>>>> work here
>>>>>> then. I tried using the debugger, but it fails on loading the csound
>>>>>> library, so
>>>>>> I can’t use it.
>>>>>>
>>>>>>
>>>>>>> On 8 Oct 2016, at 10:03, Francois PINOT <fggpinot@GMAIL.COM> wrote:
>>>>>>>
>>>>>>> I just pulled again the sources and rebuilt Csound: it still works
>>>> fine
>>>>>> here.
>>>>>>>
>>>>>>> François
>>>>>>>
>>>>>>> 2016-10-08 10:43 GMT+02:00 Victor Lazzarini
>>>>>>> <Victor.Lazzarini@nuim.ie
>>>>> :
>>>>>>> I can confirm this on OSX. Setting the callback makes it segfault on
>>>>>> performance.
>>>>>>>
>>>>>>>
>>>>>>> Victor Lazzarini
>>>>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>>>>> Maynooth University
>>>>>>> Ireland
>>>>>>>
>>>>>>>> On 8 Oct 2016, at 07:53, Søren Jakobsen <sorenkj@GMAIL.COM> wrote:
>>>>>>>>
>>>>>>>> Yes, it works fine without the callback.
>>>>>>>> Søren
>>>>>>>>
>>>>>>>>> On 10/7/16, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
>>>>>>>>> Did you try without adding the callback?
>>>>>>>>>
>>>>>>>>> Victor Lazzarini
>>>>>>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>>>>>>> Maynooth University
>>>>>>>>> Ireland
>>>>>>>>>
>>>>>>>>>> On 7 Oct 2016, at 21:13, sjakops <sorenkj@GMAIL.COM> wrote:
>>>>>>>>>>
>>>>>>>>>> I am having some trouble with ctcsound (using CsoundVST 6.08) -
>>>>>>>>>> when
>>>>>> I try
>>>>>>>>>> to
>>>>>>>>>> run the code below I get this message:
>>>>>>>>>>
>>>>>>>>>> File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 813,
>>>>>>>>>> in
>>>>>>>>>> performKsmps
>>>>>>>>>>  return libcsound.csoundPerformKsmps(self.cs)
>>>>>>>>>> WindowsError: exception: access violation reading
>>>>>>>>>> 0xFFFFFFFFFFFFFFFF
>>>>>>>>>>
>>>>>>>>>> Code:
>>>>>>>>>>
>>>>>>>>>> import ctcsound
>>>>>>>>>> import ctypes
>>>>>>>>>>
>>>>>>>>>> def foo(csound, channelName, channelValuePtr, channelTypePtr):
>>>>>>>>>>  name = ctcsound.pstring(channelName)
>>>>>>>>>>  valPtr = ctypes.cast(channelValuePtr,
>>>>>> ctypes.POINTER(ctcsound.MYFLT))
>>>>>>>>>>  valPtr[0] = ctcsound.MYFLT(440.0)
>>>>>>>>>>  print("hello", name)
>>>>>>>>>>
>>>>>>>>>> c = ctcsound.Csound()
>>>>>>>>>> c.setOption("-odac")
>>>>>>>>>> c.compileOrc("""
>>>>>>>>>>      sr=44100
>>>>>>>>>>      ksmps=32
>>>>>>>>>>      nchnls=2
>>>>>>>>>>      0dbfs=1
>>>>>>>>>>      instr 1
>>>>>>>>>>        kfreq invalue "freq"
>>>>>>>>>>        kenv linsegr 0, .05, 1, .05, 0
>>>>>>>>>>        aout vco2 kenv, kfreq
>>>>>>>>>>        outs aout, aout
>>>>>>>>>>      endin
>>>>>>>>>>      """)
>>>>>>>>>> c.setInputChannelCallback(foo)
>>>>>>>>>> c.readScore("i1 0 0.2 \n i1 1 2")
>>>>>>>>>> c.start()
>>>>>>>>>> while (c.performKsmps() == 0):
>>>>>>>>>> pass
>>>>>>>>>> c.stop()
>>>>>>>>>>
>>>>>>>>>> I wonder if there could be a bug, or am I doing something wrong?
>>>>>>>>>>
>>>>>>>>>> Best regards,
>>>>>>>>>> Søren
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> View this message in context:
>>>>>>>>>> http://csound.1045644.n5.nabble.com/ctcsound-Python-
>>>>>> CsoundVST-6-08-Windows-x64-tp5751978.html
>>>>>>>>>> Sent from the Csound - General mailing list archive at
>>>>>>>>>> Nabble.com.
>>>>>>>>>>
>>>>>>>>>> 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
>
> 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

Date2016-10-08 19:13
FromFrancois PINOT
SubjectRe: ctcsound (Python, CsoundVST 6.08, Windows, x64)
I think I got it. Victor, could you download ctcsound.py from my github repo (https://raw.githubusercontent.com/fggp/ctcsound/master/ctcsound.py) and retry to run Søren's example importing this version of ctcsound.py?

François

2016-10-08 13:24 GMT+02:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
yes, I commented everything out and added a ‘pass’. Same result.
> On 8 Oct 2016, at 10:32, Francois PINOT <fggpinot@GMAIL.COM> wrote:
>
> Could you try it commenting out the first three lines in the foo function?
>
> François
>
> 2016-10-08 11:14 GMT+02:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
> I am running from the latest sources too. It’s puzzling that it does not work here
> then. I tried using the debugger, but it fails on loading the csound library, so
> I can’t use it.
>
>
> > On 8 Oct 2016, at 10:03, Francois PINOT <fggpinot@GMAIL.COM> wrote:
> >
> > I just pulled again the sources and rebuilt Csound: it still works fine here.
> >
> > François
> >
> > 2016-10-08 10:43 GMT+02:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
> > I can confirm this on OSX. Setting the callback makes it segfault on performance.
> >
> >
> > Victor Lazzarini
> > Dean of Arts, Celtic Studies, and Philosophy
> > Maynooth University
> > Ireland
> >
> > > On 8 Oct 2016, at 07:53, Søren Jakobsen <sorenkj@GMAIL.COM> wrote:
> > >
> > > Yes, it works fine without the callback.
> > > Søren
> > >
> > >> On 10/7/16, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
> > >> Did you try without adding the callback?
> > >>
> > >> Victor Lazzarini
> > >> Dean of Arts, Celtic Studies, and Philosophy
> > >> Maynooth University
> > >> Ireland
> > >>
> > >>> On 7 Oct 2016, at 21:13, sjakops <sorenkj@GMAIL.COM> wrote:
> > >>>
> > >>> I am having some trouble with ctcsound (using CsoundVST 6.08) - when I try
> > >>> to
> > >>> run the code below I get this message:
> > >>>
> > >>> File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 813, in
> > >>> performKsmps
> > >>>   return libcsound.csoundPerformKsmps(self.cs)
> > >>> WindowsError: exception: access violation reading 0xFFFFFFFFFFFFFFFF
> > >>>
> > >>> Code:
> > >>>
> > >>> import ctcsound
> > >>> import ctypes
> > >>>
> > >>> def foo(csound, channelName, channelValuePtr, channelTypePtr):
> > >>>   name = ctcsound.pstring(channelName)
> > >>>   valPtr = ctypes.cast(channelValuePtr, ctypes.POINTER(ctcsound.MYFLT))
> > >>>   valPtr[0] = ctcsound.MYFLT(440.0)
> > >>>   print("hello", name)
> > >>>
> > >>> c = ctcsound.Csound()
> > >>> c.setOption("-odac")
> > >>> c.compileOrc("""
> > >>>       sr=44100
> > >>>       ksmps=32
> > >>>       nchnls=2
> > >>>       0dbfs=1
> > >>>       instr 1
> > >>>         kfreq invalue "freq"
> > >>>         kenv linsegr 0, .05, 1, .05, 0
> > >>>         aout vco2 kenv, kfreq
> > >>>         outs aout, aout
> > >>>       endin
> > >>>       """)
> > >>> c.setInputChannelCallback(foo)
> > >>> c.readScore("i1 0 0.2 \n i1 1 2")
> > >>> c.start()
> > >>> while (c.performKsmps() == 0):
> > >>> pass
> > >>> c.stop()
> > >>>
> > >>> I wonder if there could be a bug, or am I doing something wrong?
> > >>>
> > >>> Best regards,
> > >>> Søren
> > >>>
> > >>>
> > >>>
> > >>> --
> > >>> View this message in context:
> > >>> http://csound.1045644.n5.nabble.com/ctcsound-Python-CsoundVST-6-08-Windows-x64-tp5751978.html
> > >>> Sent from the Csound - General mailing list archive at Nabble.com.
> > >>>
> > >>> 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

Date2016-10-08 23:09
FromFrancois PINOT
SubjectRe: ctcsound (Python, CsoundVST 6.08, Windows, x64)
It is a garbage collector problem: ctypes doesn't keep references to CFUNCTYPE object and so the user has to make sure that its python code keeps a reference to the callback functions as long as they are used by the C code. It seems that the Python garbage collector is more aggressive on Windows and OSX than on Linux.

I've committed the corrections on my github repo and in the Csound sources. Søren, if you want to use it with your prebuilt release of Csound you shoud comment out lines 230 and 977 in this new version of ctcsound.py, because the function outputFormat was added later.

François

2016-10-08 20:13 GMT+02:00 Francois PINOT <fggpinot@gmail.com>:
I think I got it. Victor, could you download ctcsound.py from my github repo (https://raw.githubusercontent.com/fggp/ctcsound/master/ctcsound.py) and retry to run Søren's example importing this version of ctcsound.py?

François

2016-10-08 13:24 GMT+02:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
yes, I commented everything out and added a ‘pass’. Same result.
> On 8 Oct 2016, at 10:32, Francois PINOT <fggpinot@GMAIL.COM> wrote:
>
> Could you try it commenting out the first three lines in the foo function?
>
> François
>
> 2016-10-08 11:14 GMT+02:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
> I am running from the latest sources too. It’s puzzling that it does not work here
> then. I tried using the debugger, but it fails on loading the csound library, so
> I can’t use it.
>
>
> > On 8 Oct 2016, at 10:03, Francois PINOT <fggpinot@GMAIL.COM> wrote:
> >
> > I just pulled again the sources and rebuilt Csound: it still works fine here.
> >
> > François
> >
> > 2016-10-08 10:43 GMT+02:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
> > I can confirm this on OSX. Setting the callback makes it segfault on performance.
> >
> >
> > Victor Lazzarini
> > Dean of Arts, Celtic Studies, and Philosophy
> > Maynooth University
> > Ireland
> >
> > > On 8 Oct 2016, at 07:53, Søren Jakobsen <sorenkj@GMAIL.COM> wrote:
> > >
> > > Yes, it works fine without the callback.
> > > Søren
> > >
> > >> On 10/7/16, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
> > >> Did you try without adding the callback?
> > >>
> > >> Victor Lazzarini
> > >> Dean of Arts, Celtic Studies, and Philosophy
> > >> Maynooth University
> > >> Ireland
> > >>
> > >>> On 7 Oct 2016, at 21:13, sjakops <sorenkj@GMAIL.COM> wrote:
> > >>>
> > >>> I am having some trouble with ctcsound (using CsoundVST 6.08) - when I try
> > >>> to
> > >>> run the code below I get this message:
> > >>>
> > >>> File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 813, in
> > >>> performKsmps
> > >>>   return libcsound.csoundPerformKsmps(self.cs)
> > >>> WindowsError: exception: access violation reading 0xFFFFFFFFFFFFFFFF
> > >>>
> > >>> Code:
> > >>>
> > >>> import ctcsound
> > >>> import ctypes
> > >>>
> > >>> def foo(csound, channelName, channelValuePtr, channelTypePtr):
> > >>>   name = ctcsound.pstring(channelName)
> > >>>   valPtr = ctypes.cast(channelValuePtr, ctypes.POINTER(ctcsound.MYFLT))
> > >>>   valPtr[0] = ctcsound.MYFLT(440.0)
> > >>>   print("hello", name)
> > >>>
> > >>> c = ctcsound.Csound()
> > >>> c.setOption("-odac")
> > >>> c.compileOrc("""
> > >>>       sr=44100
> > >>>       ksmps=32
> > >>>       nchnls=2
> > >>>       0dbfs=1
> > >>>       instr 1
> > >>>         kfreq invalue "freq"
> > >>>         kenv linsegr 0, .05, 1, .05, 0
> > >>>         aout vco2 kenv, kfreq
> > >>>         outs aout, aout
> > >>>       endin
> > >>>       """)
> > >>> c.setInputChannelCallback(foo)
> > >>> c.readScore("i1 0 0.2 \n i1 1 2")
> > >>> c.start()
> > >>> while (c.performKsmps() == 0):
> > >>> pass
> > >>> c.stop()
> > >>>
> > >>> I wonder if there could be a bug, or am I doing something wrong?
> > >>>
> > >>> Best regards,
> > >>> Søren
> > >>>
> > >>>
> > >>>
> > >>> --
> > >>> View this message in context:
> > >>> http://csound.1045644.n5.nabble.com/ctcsound-Python-CsoundVST-6-08-Windows-x64-tp5751978.html
> > >>> Sent from the Csound - General mailing list archive at Nabble.com.
> > >>>
> > >>> 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

Date2016-10-10 09:10
FromSøren Jakobsen
SubjectRe: ctcsound (Python, CsoundVST 6.08, Windows, x64)
Great, thanks a lot!
Søren

On 10/8/16, Francois PINOT  wrote:
> It is a garbage collector problem: ctypes doesn't keep references to
> CFUNCTYPE object and so the user has to make sure that its python code
> keeps a reference to the callback functions as long as they are used by the
> C code. It seems that the Python garbage collector is more aggressive on
> Windows and OSX than on Linux.
>
> I've committed the corrections on my github repo and in the Csound sources.
> Søren, if you want to use it with your prebuilt release of Csound you shoud
> comment out lines 230 and 977 in this new version of ctcsound.py, because
> the function outputFormat was added later.
>
> François
>
> 2016-10-08 20:13 GMT+02:00 Francois PINOT :
>
>> I think I got it. Victor, could you download ctcsound.py from my github
>> repo (https://raw.githubusercontent.com/fggp/ctcsound/master/ctcsound.py)
>> and retry to run Søren's example importing this version of ctcsound.py?
>>
>> François
>>
>> 2016-10-08 13:24 GMT+02:00 Victor Lazzarini :
>>
>>> yes, I commented everything out and added a ‘pass’. Same result.
>>> > On 8 Oct 2016, at 10:32, Francois PINOT  wrote:
>>> >
>>> > Could you try it commenting out the first three lines in the foo
>>> function?
>>> >
>>> > François
>>> >
>>> > 2016-10-08 11:14 GMT+02:00 Victor Lazzarini
>>> > :
>>> > I am running from the latest sources too. It’s puzzling that it does
>>> not work here
>>> > then. I tried using the debugger, but it fails on loading the csound
>>> library, so
>>> > I can’t use it.
>>> >
>>> >
>>> > > On 8 Oct 2016, at 10:03, Francois PINOT  wrote:
>>> > >
>>> > > I just pulled again the sources and rebuilt Csound: it still works
>>> fine here.
>>> > >
>>> > > François
>>> > >
>>> > > 2016-10-08 10:43 GMT+02:00 Victor Lazzarini
>>> > > >> >:
>>> > > I can confirm this on OSX. Setting the callback makes it segfault on
>>> performance.
>>> > >
>>> > >
>>> > > Victor Lazzarini
>>> > > Dean of Arts, Celtic Studies, and Philosophy
>>> > > Maynooth University
>>> > > Ireland
>>> > >
>>> > > > On 8 Oct 2016, at 07:53, Søren Jakobsen  wrote:
>>> > > >
>>> > > > Yes, it works fine without the callback.
>>> > > > Søren
>>> > > >
>>> > > >> On 10/7/16, Victor Lazzarini  wrote:
>>> > > >> Did you try without adding the callback?
>>> > > >>
>>> > > >> Victor Lazzarini
>>> > > >> Dean of Arts, Celtic Studies, and Philosophy
>>> > > >> Maynooth University
>>> > > >> Ireland
>>> > > >>
>>> > > >>> On 7 Oct 2016, at 21:13, sjakops  wrote:
>>> > > >>>
>>> > > >>> I am having some trouble with ctcsound (using CsoundVST 6.08) -
>>> when I try
>>> > > >>> to
>>> > > >>> run the code below I get this message:
>>> > > >>>
>>> > > >>> File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 813,
>>> > > >>> in
>>> > > >>> performKsmps
>>> > > >>>   return libcsound.csoundPerformKsmps(self.cs)
>>> > > >>> WindowsError: exception: access violation reading
>>> 0xFFFFFFFFFFFFFFFF
>>> > > >>>
>>> > > >>> Code:
>>> > > >>>
>>> > > >>> import ctcsound
>>> > > >>> import ctypes
>>> > > >>>
>>> > > >>> def foo(csound, channelName, channelValuePtr, channelTypePtr):
>>> > > >>>   name = ctcsound.pstring(channelName)
>>> > > >>>   valPtr = ctypes.cast(channelValuePtr,
>>> ctypes.POINTER(ctcsound.MYFLT))
>>> > > >>>   valPtr[0] = ctcsound.MYFLT(440.0)
>>> > > >>>   print("hello", name)
>>> > > >>>
>>> > > >>> c = ctcsound.Csound()
>>> > > >>> c.setOption("-odac")
>>> > > >>> c.compileOrc("""
>>> > > >>>       sr=44100
>>> > > >>>       ksmps=32
>>> > > >>>       nchnls=2
>>> > > >>>       0dbfs=1
>>> > > >>>       instr 1
>>> > > >>>         kfreq invalue "freq"
>>> > > >>>         kenv linsegr 0, .05, 1, .05, 0
>>> > > >>>         aout vco2 kenv, kfreq
>>> > > >>>         outs aout, aout
>>> > > >>>       endin
>>> > > >>>       """)
>>> > > >>> c.setInputChannelCallback(foo)
>>> > > >>> c.readScore("i1 0 0.2 \n i1 1 2")
>>> > > >>> c.start()
>>> > > >>> while (c.performKsmps() == 0):
>>> > > >>> pass
>>> > > >>> c.stop()
>>> > > >>>
>>> > > >>> I wonder if there could be a bug, or am I doing something wrong?
>>> > > >>>
>>> > > >>> Best regards,
>>> > > >>> Søren
>>> > > >>>
>>> > > >>>
>>> > > >>>
>>> > > >>> --
>>> > > >>> View this message in context:
>>> > > >>> http://csound.1045644.n5.nabble.com/ctcsound-Python-CsoundVS
>>> T-6-08-Windows-x64-tp5751978.html
>>> > > >>> Sent from the Csound - General mailing list archive at
>>> > > >>> Nabble.com.
>>> > > >>>
>>> > > >>> 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

Date2016-10-10 10:05
FromFrancois PINOT
SubjectRe: ctcsound (Python, CsoundVST 6.08, Windows, x64)
Thank you for testing.

François

2016-10-10 10:10 GMT+02:00 Søren Jakobsen <sorenkj@gmail.com>:
Great, thanks a lot!
Søren

On 10/8/16, Francois PINOT <fggpinot@gmail.com> wrote:
> It is a garbage collector problem: ctypes doesn't keep references to
> CFUNCTYPE object and so the user has to make sure that its python code
> keeps a reference to the callback functions as long as they are used by the
> C code. It seems that the Python garbage collector is more aggressive on
> Windows and OSX than on Linux.
>
> I've committed the corrections on my github repo and in the Csound sources.
> Søren, if you want to use it with your prebuilt release of Csound you shoud
> comment out lines 230 and 977 in this new version of ctcsound.py, because
> the function outputFormat was added later.
>
> François
>
> 2016-10-08 20:13 GMT+02:00 Francois PINOT <fggpinot@gmail.com>:
>
>> I think I got it. Victor, could you download ctcsound.py from my github
>> repo (https://raw.githubusercontent.com/fggp/ctcsound/master/ctcsound.py)
>> and retry to run Søren's example importing this version of ctcsound.py?
>>
>> François
>>
>> 2016-10-08 13:24 GMT+02:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
>>
>>> yes, I commented everything out and added a ‘pass’. Same result.
>>> > On 8 Oct 2016, at 10:32, Francois PINOT <fggpinot@GMAIL.COM> wrote:
>>> >
>>> > Could you try it commenting out the first three lines in the foo
>>> function?
>>> >
>>> > François
>>> >
>>> > 2016-10-08 11:14 GMT+02:00 Victor Lazzarini
>>> > <Victor.Lazzarini@nuim.ie>:
>>> > I am running from the latest sources too. It’s puzzling that it does
>>> not work here
>>> > then. I tried using the debugger, but it fails on loading the csound
>>> library, so
>>> > I can’t use it.
>>> >
>>> >
>>> > > On 8 Oct 2016, at 10:03, Francois PINOT <fggpinot@GMAIL.COM> wrote:
>>> > >
>>> > > I just pulled again the sources and rebuilt Csound: it still works
>>> fine here.
>>> > >
>>> > > François
>>> > >
>>> > > 2016-10-08 10:43 GMT+02:00 Victor Lazzarini
>>> > > <Victor.Lazzarini@nuim.ie
>>> >:
>>> > > I can confirm this on OSX. Setting the callback makes it segfault on
>>> performance.
>>> > >
>>> > >
>>> > > Victor Lazzarini
>>> > > Dean of Arts, Celtic Studies, and Philosophy
>>> > > Maynooth University
>>> > > Ireland
>>> > >
>>> > > > On 8 Oct 2016, at 07:53, Søren Jakobsen <sorenkj@GMAIL.COM> wrote:
>>> > > >
>>> > > > Yes, it works fine without the callback.
>>> > > > Søren
>>> > > >
>>> > > >> On 10/7/16, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
>>> > > >> Did you try without adding the callback?
>>> > > >>
>>> > > >> Victor Lazzarini
>>> > > >> Dean of Arts, Celtic Studies, and Philosophy
>>> > > >> Maynooth University
>>> > > >> Ireland
>>> > > >>
>>> > > >>> On 7 Oct 2016, at 21:13, sjakops <sorenkj@GMAIL.COM> wrote:
>>> > > >>>
>>> > > >>> I am having some trouble with ctcsound (using CsoundVST 6.08) -
>>> when I try
>>> > > >>> to
>>> > > >>> run the code below I get this message:
>>> > > >>>
>>> > > >>> File "C:\Program Files\Csound6_x64\bin\ctcsound.py", line 813,
>>> > > >>> in
>>> > > >>> performKsmps
>>> > > >>>   return libcsound.csoundPerformKsmps(self.cs)
>>> > > >>> WindowsError: exception: access violation reading
>>> 0xFFFFFFFFFFFFFFFF
>>> > > >>>
>>> > > >>> Code:
>>> > > >>>
>>> > > >>> import ctcsound
>>> > > >>> import ctypes
>>> > > >>>
>>> > > >>> def foo(csound, channelName, channelValuePtr, channelTypePtr):
>>> > > >>>   name = ctcsound.pstring(channelName)
>>> > > >>>   valPtr = ctypes.cast(channelValuePtr,
>>> ctypes.POINTER(ctcsound.MYFLT))
>>> > > >>>   valPtr[0] = ctcsound.MYFLT(440.0)
>>> > > >>>   print("hello", name)
>>> > > >>>
>>> > > >>> c = ctcsound.Csound()
>>> > > >>> c.setOption("-odac")
>>> > > >>> c.compileOrc("""
>>> > > >>>       sr=44100
>>> > > >>>       ksmps=32
>>> > > >>>       nchnls=2
>>> > > >>>       0dbfs=1
>>> > > >>>       instr 1
>>> > > >>>         kfreq invalue "freq"
>>> > > >>>         kenv linsegr 0, .05, 1, .05, 0
>>> > > >>>         aout vco2 kenv, kfreq
>>> > > >>>         outs aout, aout
>>> > > >>>       endin
>>> > > >>>       """)
>>> > > >>> c.setInputChannelCallback(foo)
>>> > > >>> c.readScore("i1 0 0.2 \n i1 1 2")
>>> > > >>> c.start()
>>> > > >>> while (c.performKsmps() == 0):
>>> > > >>> pass
>>> > > >>> c.stop()
>>> > > >>>
>>> > > >>> I wonder if there could be a bug, or am I doing something wrong?
>>> > > >>>
>>> > > >>> Best regards,
>>> > > >>> Søren
>>> > > >>>
>>> > > >>>
>>> > > >>>
>>> > > >>> --
>>> > > >>> View this message in context:
>>> > > >>> http://csound.1045644.n5.nabble.com/ctcsound-Python-CsoundVS
>>> T-6-08-Windows-x64-tp5751978.html
>>> > > >>> Sent from the Csound - General mailing list archive at
>>> > > >>> Nabble.com.
>>> > > >>>
>>> > > >>> 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

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