Csound Csound-dev Csound-tekno Search About

[Cs-dev] [OT]- Sound in Python

Date2014-03-23 16:12
FromJohn ffitch
Subject[Cs-dev] [OT]- Sound in Python
(was sent to csound but it looks as if University of Bath is cut off
from the world)

Not really Csound but I am investigating an algorithmic composition
system that is written in python for windows, and I would like to run
it on Linux and OSX as well (even Android?).  I am currently stuck on
a simple issue -- it includes a module called winsound which seems to
be a Windows-only thing.  It is only use in one place, to play a wav
file generated by csound
 winsound.PlaySound(filename, winsound.SND_FILENAME|winsound.SND_ASYNC)

Is there a generic replacement?

==John ffitch

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-03-23 17:22
FromOlivier Bélanger
SubjectRe: [Cs-dev] [OT]- Sound in Python
AttachmentsNone  None  
Hi,

Not generic but Pyo is a cross-platform dsp engine for Python.

http://code.google.com/p/pyo/

First you need to start an audio server:

from pyo import *
s = Server().boot()
s.start()

Then, create a soundfile player:

sf = SfPlayer(filename)

Each time, you want to play a file:

sf.path = filename
sf.out()


Pyo only uses Portaudio on Windows, but can be set to use Coreaudio on OSX or Jack on linux...

Olivier
 


2014-03-23 12:12 GMT-04:00 John ffitch <jpff@codemist.co.uk>:
(was sent to csound but it looks as if University of Bath is cut off
from the world)

Not really Csound but I am investigating an algorithmic composition
system that is written in python for windows, and I would like to run
it on Linux and OSX as well (even Android?).  I am currently stuck on
a simple issue -- it includes a module called winsound which seems to
be a Windows-only thing.  It is only use in one place, to play a wav
file generated by csound
 winsound.PlaySound(filename, winsound.SND_FILENAME|winsound.SND_ASYNC)

Is there a generic replacement?

==John ffitch

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2014-03-24 09:59
Frommoguillansky
SubjectRe: [Cs-dev] [OT]- Sound in Python
AttachmentsNone  None  
Is it possible to play a numpy array with Pyo?

Eduardo


On Sun, Mar 23, 2014 at 6:23 PM, Olivier Bélanger-3 [via Csound] <[hidden email]> wrote:
Hi,

Not generic but Pyo is a cross-platform dsp engine for Python.

http://code.google.com/p/pyo/

First you need to start an audio server:

from pyo import *
s = Server().boot()
s.start()

Then, create a soundfile player:

sf = SfPlayer(filename)

Each time, you want to play a file:

sf.path = filename
sf.out()


Pyo only uses Portaudio on Windows, but can be set to use Coreaudio on OSX or Jack on linux...

Olivier
 


2014-03-23 12:12 GMT-04:00 John ffitch <[hidden email]>:

(was sent to csound but it looks as if University of Bath is cut off
from the world)

Not really Csound but I am investigating an algorithmic composition
system that is written in python for windows, and I would like to run
it on Linux and OSX as well (even Android?).  I am currently stuck on
a simple issue -- it includes a module called winsound which seems to
be a Windows-only thing.  It is only use in one place, to play a wav
file generated by csound
 winsound.PlaySound(filename, winsound.SND_FILENAME|winsound.SND_ASYNC)

Is there a generic replacement?

==John ffitch

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Csound-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Csound-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/csound-devel



If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/OT-Sound-in-Python-tp5733464p5733468.html
To start a new topic under Csound - Dev, email [hidden email]
To unsubscribe from Csound, click here.
NAML



View this message in context: Re: [OT]- Sound in Python
Sent from the Csound - Dev mailing list archive at Nabble.com.

Date2014-03-26 10:19
FromOlivier Bélanger
SubjectRe: [Cs-dev] [OT]- Sound in Python
AttachmentsNone  None  
Samuel John created some time ago a FIFOPlayer object to play numpy array with pyo. It still needs a bit of work to be fully functional. The easiest way to play a numpy array is still to load the array in an audio table, as one would do in Csound!

Best,

Olivier


2014-03-24 5:59 GMT-04:00 moguillansky <eduardo.moguillansky@gmail.com>:
Is it possible to play a numpy array with Pyo?

Eduardo


On Sun, Mar 23, 2014 at 6:23 PM, Olivier Bélanger-3 [via Csound] <[hidden email]> wrote:
Hi,

Not generic but Pyo is a cross-platform dsp engine for Python.

http://code.google.com/p/pyo/

First you need to start an audio server:

from pyo import *
s = Server().boot()
s.start()

Then, create a soundfile player:

sf = SfPlayer(filename)

Each time, you want to play a file:

sf.path = filename
sf.out()


Pyo only uses Portaudio on Windows, but can be set to use Coreaudio on OSX or Jack on linux...

Olivier
 


2014-03-23 12:12 GMT-04:00 John ffitch <[hidden email]>:

(was sent to csound but it looks as if University of Bath is cut off
from the world)

Not really Csound but I am investigating an algorithmic composition
system that is written in python for windows, and I would like to run
it on Linux and OSX as well (even Android?).  I am currently stuck on
a simple issue -- it includes a module called winsound which seems to
be a Windows-only thing.  It is only use in one place, to play a wav
file generated by csound
 winsound.PlaySound(filename, winsound.SND_FILENAME|winsound.SND_ASYNC)

Is there a generic replacement?

==John ffitch

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Csound-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Csound-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/csound-devel



If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/OT-Sound-in-Python-tp5733464p5733468.html
To start a new topic under Csound - Dev, email [hidden email]
To unsubscribe from Csound, click here.
NAML



View this message in context: Re: [OT]- Sound in Python
Sent from the Csound - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel