Csound Csound-dev Csound-tekno Search About

[Csnd] Re: Re: Re: Re: csnd tutorials/helpfiles

Date2007-11-09 21:47
FromMichael Gogins
Subject[Csnd] Re: Re: Re: Re: csnd tutorials/helpfiles
That's funny, I run Csound in Idle a lot and it works. 

The main problem is that if I kill a Csound process before it completes, often there is a zombie that I have to kill from the operating system. I would like to have a solution to this because Idle has a Python debugger that can useful for complex scripts.

I do not get strange error messages. What kind? I assume you are talking about Windows?...

Regards,
Mike


-----Original Message-----
>From: Oeyvind Brandtsegg 
>Sent: Nov 9, 2007 4:14 PM
>To: csound@lists.bath.ac.uk
>Subject: [Csnd] Re: Re: Re: csnd tutorials/helpfiles
>
>I think one should not run any halfway complex stuff in IDLE.
>I do not remember the exact reason why, neither the exact
>implications, but it has to with IDLE itself being written in Python.
>This means we get one Python app running on top of another and it does
>sometimes lead to unexpected results and strange error messages.
>Repeat, do not run stuff in IDLE.
>
>best
>Oeyvind
>
>
>2007/11/9, Victor Lazzarini :
>> The code is correct. The -1 answer means that
>> probably the CSD was not found or that other
>> problem happened during the compilation.
>>
>> -1 actually means an error. Also in OSX maybe
>> the csound messages have been printed to the
>> console (see it in utilities), not the terminal.
>>
>> (On Windows, if I run it from Idle, I also do
>> not get any Csound messages)
>>
>> Victor
>> >
>> > Hi David -
>> >
>> > I find it very useful. But your example "Playing an
>> > existing csd   file" doesn't work on my system (MacPython
>> > 2.3, Csound PPC 5.07). No   error messages, but it returns
>> > -1:
>> >
>> >  >>> import csnd
>> >  >>> cs = csnd.Csound()
>> >  >>> fname =
>> > "/Users/jh/Documents/Csound/PythonInCsound/pythontest.csd"
>> >  >>> cs.Perform(fname)
>> > -1
>> >
>> > When I first run main.py from Oeyvinds
>> > PartikkelCloudDesigner (it   stops at a certain point, but
>> > after loading all the csnd stuff), it's   ok (returns 0)
>> > and "test.aif" is written in the directory of the
>> > PartikkelCloudDesigner. So maybe there has to be one or
>> > more other   tasks before cs.Perform(fname)?
>> >
>> > Best -
>> >
>> >     joachim
>> >
>> >
>> >
>> > Am 09.11.2007 um 13:33 schrieb David Worrall:
>> >
>> > > Hi All,
>> > > I've been finding my way around the python wrappers for
>> > > csnd. In my   search I've come across quite a few people
>> > > who have found the   process just too hard. So, bearing
>> > > in mind thathis process is   likely to attract new users
>> > > ,  I thought it would be good to begin   to put a
>> > graduated introduction together. >
>> > > I've just scratched out a temporary beginning, for the
>> > > moment at   http://www.avatar.com.au/sonify/csnd/
>> > >
>> > > A couple of things suggest themselves.
>> > >
>> > > Reference material
>> > > -------------------------
>> > > Apart from some simple examples, it would  be good to
>> > > merge the   output from help(csnd) with the info in the
>> > > header files,   particularly csound.h
>> > > Has anyone written such a script? It wouldn't be too
>> > > hard a hack   and then each version or compile options
>> > > change, a reference could   be computed by the user
>> > particular to their own system. >
>> > > Examples
>> > > --------------
>> > > From what I can see, the only example from the examples
>> > > directory   in the sources that runs on the default OSX
>> > > .dmg install of v5.7   without being modified is
>> > > Victor's vu.py (It relies on TclSTk being   installed.)
>> > > tFair enough - It is a "way in" I could put up a hacked
>> >  down version (no graphics), just to illustrate the use of
>> > >   CsoundPerformanceThread and SetChannel and proceed
>> > that way ... >
>> > > I'm not sure if  people would find these type of things
>> > > useful.   Perhaps you have other ideas. Feedback?
>> > >
>> > > ciao,
>> > >
>> > > David
>> > >
>> > >
>> > >
>> > > _________________________________________________
>> > > experimental polymedia:    www.avatar.com.au
>> > > Sonic Communications Research Group,
>> > > University of Canberra:
>> > creative.canberra.edu.au/scrg/ >
>> > >
>> > >
>> >
>> >
>>
>>
>




Date2007-11-09 22:50
From"Oeyvind Brandtsegg"
Subject[Csnd] Re: Re: Re: Re: Re: csnd tutorials/helpfiles
AttachmentsNone  

Date2007-11-09 22:54
FromAndrea Valle
Subject[Csnd] Re: csnd tutorials/helpfiles
(Sorry Michael for my previous private email, I send the message again to the list. I was fooled by the reply mechanism. Has it changed?)

----

I had many problem in accessing from IDLE the environment stuff while trying to use a python module (PyX) which communicates with my TeX installation.
After a long discussion on the list we understood it was IDLE and I solve using bash directly

If I am correct, more, IDLE does not access to stdin so it behaves differently to bash

But I am an UNIX ignorant.

Best

-a-




On 9 Nov 2007, at 22:47, Michael Gogins wrote:

That's funny, I run Csound in Idle a lot and it works. 

The main problem is that if I kill a Csound process before it completes, often there is a zombie that I have to kill from the operating system. I would like to have a solution to this because Idle has a Python debugger that can useful for complex scripts.

I do not get strange error messages. What kind? I assume you are talking about Windows?...

Regards,
Mike


-----Original Message-----
From: Oeyvind Brandtsegg <obrandts@gmail.com>
Sent: Nov 9, 2007 4:14 PM
Subject: [Csnd] Re: Re: Re: csnd tutorials/helpfiles

I think one should not run any halfway complex stuff in IDLE.
I do not remember the exact reason why, neither the exact
implications, but it has to with IDLE itself being written in Python.
This means we get one Python app running on top of another and it does
sometimes lead to unexpected results and strange error messages.
Repeat, do not run stuff in IDLE.

best
Oeyvind


2007/11/9, Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
The code is correct. The -1 answer means that
probably the CSD was not found or that other
problem happened during the compilation.

-1 actually means an error. Also in OSX maybe
the csound messages have been printed to the
console (see it in utilities), not the terminal.

(On Windows, if I run it from Idle, I also do
not get any Csound messages)

Victor

Hi David -

I find it very useful. But your example "Playing an
existing csd   file" doesn't work on my system (MacPython
2.3, Csound PPC 5.07). No   error messages, but it returns
-1:

import csnd
cs = csnd.Csound()
fname =
"/Users/jh/Documents/Csound/PythonInCsound/pythontest.csd"
cs.Perform(fname)
-1

When I first run main.py from Oeyvinds
PartikkelCloudDesigner (it   stops at a certain point, but
after loading all the csnd stuff), it's   ok (returns 0)
and "test.aif" is written in the directory of the
PartikkelCloudDesigner. So maybe there has to be one or
more other   tasks before cs.Perform(fname)?

Best -

    joachim



Am 09.11.2007 um 13:33 schrieb David Worrall:

Hi All,
I've been finding my way around the python wrappers for
csnd. In my   search I've come across quite a few people
who have found the   process just too hard. So, bearing
in mind thathis process is   likely to attract new users
,  I thought it would be good to begin   to put a
graduated introduction together. >
I've just scratched out a temporary beginning, for the

A couple of things suggest themselves.

Reference material
-------------------------
Apart from some simple examples, it would  be good to
merge the   output from help(csnd) with the info in the
header files,   particularly csound.h
Has anyone written such a script? It wouldn't be too
hard a hack   and then each version or compile options
change, a reference could   be computed by the user
particular to their own system. >
Examples
--------------
From what I can see, the only example from the examples
directory   in the sources that runs on the default OSX
.dmg install of v5.7   without being modified is
Victor's vu.py (It relies on TclSTk being   installed.)
tFair enough - It is a "way in" I could put up a hacked
 down version (no graphics), just to illustrate the use of
  CsoundPerformanceThread and SetChannel and proceed
that way ... >
I'm not sure if  people would find these type of things
useful.   Perhaps you have other ideas. Feedback?

ciao,

David



_________________________________________________
experimental polymedia:    www.avatar.com.au
Sonic Communications Research Group,
University of Canberra:
creative.canberra.edu.au/scrg/ >












--------------------------------------------------
Andrea Valle
--------------------------------------------------
CIRMA - DAMS
Università degli Studi di Torino
--------------------------------------------------


I did this interview where I just mentioned that I read Foucault. Who doesn't in university, right? I was in this strip club giving this guy a lap dance and all he wanted to do was to discuss Foucault with me. Well, I can stand naked and do my little dance, or I can discuss Foucault, but not at the same time; too much information.
(Annabel Chong)





Date2007-11-09 23:26
FromDavid Worrall
Subject[Csnd] Re: csnd tutorials/helpfiles
Yes, I can confirm that.
To isolate the problem, start by turning off all graphics and run  
python from the command-line.
Then try with IDLE, again with graphics turned off.

David
(BTW, For the record,  I'm tossing all but the first of the "Re"'s  
from the Subject in replying)

On 10/11/2007, at 9:50 AM, Oeyvind Brandtsegg wrote:

> The IDLE issue might be related to python apps/scripts with a GUI.
> Sorry not to be more specific, I can't seem to recall where I got  
> the info from.
> I've only run my apps from the terminal ever since I read this, an I
> recall that a lot of weird problems did disappear when *not* running
> in IDLE. This was some two years ago, and it might have changed since
> then.
>
> best
> Oeyvind
>
> 2007/11/9, Michael Gogins :
>> That's funny, I run Csound in Idle a lot and it works.
>>
>> The main problem is that if I kill a Csound process before it  
>> completes, often there is a zombie that I have to kill from the  
>> operating system. I would like to have a solution to this because  
>> Idle has a Python debugger that can useful for complex scripts.
>>
>> I do not get strange error messages. What kind? I assume you are  
>> talking about Windows?...
>>
>> Regards,
>> Mike
>>
>>
>> -----Original Message-----
>>> From: Oeyvind Brandtsegg 
>>> Sent: Nov 9, 2007 4:14 PM
>>> To: csound@lists.bath.ac.uk
>>> Subject: [Csnd] Re: Re: Re: csnd tutorials/helpfiles
>>>
>>> I think one should not run any halfway complex stuff in IDLE.
>>> I do not remember the exact reason why, neither the exact
>>> implications, but it has to with IDLE itself being written in  
>>> Python.
>>> This means we get one Python app running on top of another and it  
>>> does
>>> sometimes lead to unexpected results and strange error messages.
>>> Repeat, do not run stuff in IDLE.
>>>
>>> best
>>> Oeyvind
>>>
>>>
>>> 2007/11/9, Victor Lazzarini :
>>>> The code is correct. The -1 answer means that
>>>> probably the CSD was not found or that other
>>>> problem happened during the compilation.
>>>>
>>>> -1 actually means an error. Also in OSX maybe
>>>> the csound messages have been printed to the
>>>> console (see it in utilities), not the terminal.
>>>>
>>>> (On Windows, if I run it from Idle, I also do
>>>> not get any Csound messages)
>>>>
>>>> Victor
>>>>>
>>>>> Hi David -
>>>>>
>>>>> I find it very useful. But your example "Playing an
>>>>> existing csd   file" doesn't work on my system (MacPython
>>>>> 2.3, Csound PPC 5.07). No   error messages, but it returns
>>>>> -1:
>>>>>
>>>>>>>> import csnd
>>>>>>>> cs = csnd.Csound()
>>>>>>>> fname =
>>>>> "/Users/jh/Documents/Csound/PythonInCsound/pythontest.csd"
>>>>>>>> cs.Perform(fname)
>>>>> -1
>>>>>
>>>>> When I first run main.py from Oeyvinds
>>>>> PartikkelCloudDesigner (it   stops at a certain point, but
>>>>> after loading all the csnd stuff), it's   ok (returns 0)
>>>>> and "test.aif" is written in the directory of the
>>>>> PartikkelCloudDesigner. So maybe there has to be one or
>>>>> more other   tasks before cs.Perform(fname)?
>>>>>
>>>>> Best -
>>>>>
>>>>>     joachim
>>>>>
>>>>>
>>>>>
>>>>> Am 09.11.2007 um 13:33 schrieb David Worrall:
>>>>>
>>>>>> Hi All,
>>>>>> I've been finding my way around the python wrappers for
>>>>>> csnd. In my   search I've come across quite a few people
>>>>>> who have found the   process just too hard. So, bearing
>>>>>> in mind thathis process is   likely to attract new users
>>>>>> ,  I thought it would be good to begin   to put a
>>>>> graduated introduction together. >
>>>>>> I've just scratched out a temporary beginning, for the
>>>>>> moment at   http://www.avatar.com.au/sonify/csnd/
>>>>>>
>>>>>> A couple of things suggest themselves.
>>>>>>
>>>>>> Reference material
>>>>>> -------------------------
>>>>>> Apart from some simple examples, it would  be good to
>>>>>> merge the   output from help(csnd) with the info in the
>>>>>> header files,   particularly csound.h
>>>>>> Has anyone written such a script? It wouldn't be too
>>>>>> hard a hack   and then each version or compile options
>>>>>> change, a reference could   be computed by the user
>>>>> particular to their own system. >
>>>>>> Examples
>>>>>> --------------
>>>>>> From what I can see, the only example from the examples
>>>>>> directory   in the sources that runs on the default OSX
>>>>>> .dmg install of v5.7   without being modified is
>>>>>> Victor's vu.py (It relies on TclSTk being   installed.)
>>>>>> tFair enough - It is a "way in" I could put up a hacked
>>>>>  down version (no graphics), just to illustrate the use of
>>>>>>   CsoundPerformanceThread and SetChannel and proceed
>>>>> that way ... >
>>>>>> I'm not sure if  people would find these type of things
>>>>>> useful.   Perhaps you have other ideas. Feedback?
>>>>>>
>>>>>> ciao,
>>>>>>
>>>>>> David
>>>>>>
>>>>>>
>>>>>>
>>>>>> _________________________________________________
>>>>>> experimental polymedia:    www.avatar.com.au
>>>>>> Sonic Communications Research Group,
>>>>>> University of Canberra:
>>>>> creative.canberra.edu.au/scrg/ >
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
>>
>>
>>
>

_________________________________________________
experimental polymedia:	www.avatar.com.au
Sonic Communications Research Group,
University of Canberra:	 creative.canberra.edu.au/scrg/