'array.array' object has no attribute 'tostring' which 3 got it fixed?

2021-12-21 Thread '2+
hi ;)

got popos installed on my raspberry pi4 and it is currently running python
3.9.7

i get this error when running my script:

'array.array' object has no attribute 'tostring'

this bug seems to be pretty old .. how long should i be waiting to get it
fixed with apt upgrade?

or should i use other attribute instead?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pyao makes the right sound but why?

2010-03-04 Thread '2+
o .. but u can use ur own tits.wav
if it is 44100 mono 16bit
and picklin n uploading the tofu
n having lots of those on the net
2 increase vegetrians is what soy.py wanted to mean

On Fri, Mar 5, 2010 at 9:48 AM, '2+  wrote:
> omg! u r actually testin my dirty code?!
> tnx that's great!
> to create an instance
> soy.py depends on(needs all of em):
>
> http://sarigama.namaste.jp/oil/tit01.wav
> http://sarigama.namaste.jp/oil/tit02.wav
> http://sarigama.namaste.jp/oil/tit03.wav
> http://sarigama.namaste.jp/oil/tit04.wav
> http://sarigama.namaste.jp/oil/tit05.wav
> http://sarigama.namaste.jp/oil/tit06.wav
> http://sarigama.namaste.jp/oil/tit07.wav
>
> and the easiest way to get the pattern is instance.pattern(howmanyframes)
> the object updates itself with .sing()
> and can affect each other with .jam_with(other_instance)
>
> this design is to (in the future) create somethang together
> with someone who would upload a short.wav on his site (to contrubute
> .. or maybe without willin to ;))
> have to study urllib(?) for things to come
> have to experiment more with picklin aspects too
> but this is my attempt to beat the
> "listenin to mp3s" culture
>
> btw. where's that help(ao)?
>
> On Fri, Mar 5, 2010 at 3:43 AM, Anssi Saari  wrote:
>> "'2+"  writes:
>>
>>> dev = ao.AudioDevice('alsa')
>>> dev.play(x)
>>>
>>> could launch me a semi realtime dj kinda sys
>>> luckily .. it does seem to be making the right sound
>>> but why?
>>> the default of the samplerate and that 16bit happened to match with my 
>>> thing x?
>>
>> Yes, that seems to be the case from help(ao). But I couldn't run
>> tofu = soy.Bean() since it seems to want tit01.wav. Do you make that
>> available somewhere?
>> --
>> http://mail.python.org/mailman/listinfo/python-list
>>
>
>
>
> --
> SaRiGaMa's Oil Vending Orchestra
> is podcasting:
> http://sarigama.namaste.jp/podcast/rss.xml
>



-- 
SaRiGaMa's Oil Vending Orchestra
is podcasting:
http://sarigama.namaste.jp/podcast/rss.xml
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: pyao makes the right sound but why?

2010-03-04 Thread '2+
omg! u r actually testin my dirty code?!
tnx that's great!
to create an instance
soy.py depends on(needs all of em):

http://sarigama.namaste.jp/oil/tit01.wav
http://sarigama.namaste.jp/oil/tit02.wav
http://sarigama.namaste.jp/oil/tit03.wav
http://sarigama.namaste.jp/oil/tit04.wav
http://sarigama.namaste.jp/oil/tit05.wav
http://sarigama.namaste.jp/oil/tit06.wav
http://sarigama.namaste.jp/oil/tit07.wav

and the easiest way to get the pattern is instance.pattern(howmanyframes)
the object updates itself with .sing()
and can affect each other with .jam_with(other_instance)

this design is to (in the future) create somethang together
with someone who would upload a short.wav on his site (to contrubute
.. or maybe without willin to ;))
have to study urllib(?) for things to come
have to experiment more with picklin aspects too
but this is my attempt to beat the
"listenin to mp3s" culture

btw. where's that help(ao)?

On Fri, Mar 5, 2010 at 3:43 AM, Anssi Saari  wrote:
> "'2+"  writes:
>
>> dev = ao.AudioDevice('alsa')
>> dev.play(x)
>>
>> could launch me a semi realtime dj kinda sys
>> luckily .. it does seem to be making the right sound
>> but why?
>> the default of the samplerate and that 16bit happened to match with my thing 
>> x?
>
> Yes, that seems to be the case from help(ao). But I couldn't run
> tofu = soy.Bean() since it seems to want tit01.wav. Do you make that
> available somewhere?
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
SaRiGaMa's Oil Vending Orchestra
is podcasting:
http://sarigama.namaste.jp/podcast/rss.xml
-- 
http://mail.python.org/mailman/listinfo/python-list


pyao makes the right sound but why?

2010-03-03 Thread '2+
with my soy.py

tofu = soy.Bean()
x = tofu.pattern(44100 * 3)

creates x which is an array('h') and len(x) = 44100 * 6
this x is a stereo groove pattern that lasts 3 sec if samplerate is set to 44100
and since wave.py could save it to a_file.wav
i was wondering if

dev = ao.AudioDevice('alsa')
dev.play(x)

could launch me a semi realtime dj kinda sys
luckily .. it does seem to be making the right sound
but why?
the default of the samplerate and that 16bit happened to match with my thing x?
o but if i do

dev.play(x, len(x))

it only plays the half of the pattern
and

dev.play(x, 2 * len(x))

does the right thing

and the 2nd 4th 6th .. play gives me

ALSA underrun, at least 0ms

3rd, 5th, 7th does it fine

/usr/share/doc/python-pyao
doesn't teach me the answer
does somebody know more about pyao?

-- 
SaRiGaMa's Oil Vending Orchestra
is podcasting:
http://sarigama.namaste.jp/podcast/rss.xml
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: hs.py = run an exec and pipe back the result as a member of a list

2010-02-25 Thread '2+
oops the code was wrong .. sorry

import popen2

wave = []
for frame in range(890, 1010):
wave.append(int(popen2.Popen3('./hascillator01 ' +
str(frame)).fromchild.readline()))
print wave

On Fri, Feb 26, 2010 at 1:22 AM, '2+  wrote:
> did this for hascillator01 that i ghc-ed from hascillator01.hs into ./
>
> import popen2
>
> wave = []
> for frame in range(890, 1010):
> wave.append(int(popen2.Popen3('./hascillator01 ' +
> str(frame)).fromchild.readline()))
> print wave
>
> hascillator01 takes int and returns another int
> so yes this became a [ints] and that is what i expected
> but also yes it is so slow
> any cooler way to do it?
> now am reading the suprocess's doc .. but a bit hard to get it
>
> --
> SaRiGaMa's Oil Vending Orchestra
> is podcasting:
> http://sarigama.namaste.jp/podcast/rss.xml
>



-- 
SaRiGaMa's Oil Vending Orchestra
is podcasting:
http://sarigama.namaste.jp/podcast/rss.xml
-- 
http://mail.python.org/mailman/listinfo/python-list


hs.py = run an exec and pipe back the result as a member of a list

2010-02-25 Thread '2+
did this for hascillator01 that i ghc-ed from hascillator01.hs into ./

import popen2

wave = []
for frame in range(890, 1010):
wave.append(int(popen2.Popen3('./hascillator01 ' +
str(frame)).fromchild.readline()))
print wave

hascillator01 takes int and returns another int
so yes this became a [ints] and that is what i expected
but also yes it is so slow
any cooler way to do it?
now am reading the suprocess's doc .. but a bit hard to get it

-- 
SaRiGaMa's Oil Vending Orchestra
is podcasting:
http://sarigama.namaste.jp/podcast/rss.xml
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Math Notations, Computer Languages, and the “F orm” in Formalism

2009-09-08 Thread -7/9 n n + 1.76666666 + 2/
Musatov
Search for
   Math Notations, Computer Languages, and the “Form ” in Formalism  
(lacks links) - Math Notations, Computer
Languages, and the “Form” in Formalism Xah Lee, 2009-08-31 This page
is a collection of essays and expositions on the subjects of
nomenclature and notations in math and computer languages, in the
context of facilitating human communication and ... Aug 31 by Xah Lee
- 4 messages - 3 authors   Math Notations, Computer Languages, and the
“ Form” in Formalism    Aatu Koskensilta aatu.koskensi...@uta.fi sci
math Xah Lee  writes: • In computer algebra or
theorem proving systems, they are intimately tied to the math
philosophies of formalism and logicism. In a sense, formalism and
logicism today are tied together as a single subject, and using
computer ... Aug 31 by Aatu Koskensilta - 4 messages - 3 authors
This Week's Finds in Mathematical Physics (Week 279)    To see this,
note that any guy in h_2(K) has this form: A = t+xy y* tx where t and
x are real elements of K, and y is an arbitrary element.  They
formulated a supersymmetric model in 6 dimensions using the
quaternions, and speculated about a similar formalism in 10 dimensions
using the octonions: 6) Taichiro ... Sep 6 by Androcles - 4 messages -
3 authors   Math Notations, Computer Languages, and the “ Form” in
Formalism    Aatu Koskensilta aatu.koskensi...@uta.fi sci math David C
Ullrich  writes: Nonsense, surely. Pure
nonsense, no doubt. But are you really certain that there's no
nonsense out there that's even more pure? Not really. I'm just winging
it. -- Aatu Koskensilta (aatu.koskensi...@uta.fi) "Wovon mann ... Sep
1 by Aatu Koskensilta - 4 messages - 3 authors   Math Notations,
Computer Languages, and the “Form” in Formalism    David C Ullrich
dullr...@sprynet.com sci math On Mon, 31 Aug 2009 17:12:20 +0300, Aatu
Koskensilta wrote: Xah Lee  writes: • In computer
algebra or theorem proving systems, they are intimately tied to the
math philosophies of formalism and logicism. In a sense, formalism and
logicism today are ... Aug 31 by David C Ullrich - 4 messages - 3
authors   ‪‬   fortunatus wrote:
> On Sep 7, 3:06 pm, Xah Lee  wrote:
> ...
> > • systems for displaying math, such as TeX, Mathematica, MathML,
> > should be unified as part of the computer language's syntax.
> ...
> > ☄
>
> to that end you might be interested in Fortress at Sun:
>
> http://projectfortress.sun.com/Projects/Community
> http://research.sun.com/projects/plrg/fortress.pdf
> http://research.sun.com/spotlight/2007/2007-01-10_fortress.html
Math Forum Discussions - sci.math.*"Form" in Formalism. David C.
Ullrich. sci.math. 8/31/09. 1 ... subnazi musatov decides what's good
for all --with no one's permission. adamk.
sci.math ...www.mathforum.com/kb/forumcategory.jspa?
categoryID=16&start=45   Discussions - sci.math | Google GroupsMusatov
(3 authors) 3:18am. Heavy water is water nonetheless. 67 new of 67 ...
Math Notations, Computer Languages, and the "Form" in Formalism. 2 new
of 2 ...groups.google.fm/group/sci.math/topics?gvc=2&hl=en
Discussions - sci.math | Google GroupsBy Musatov - 6:27pm - 5 new of 5
messages ... Math Notations, Computer Languages, and the "Form" in
Formalism ... Languages, and the "Form" in
Formalism ...groups.google.co.zw/group/sci.math/topics?
start=10&hl=en&sa=N   Discussions - sci.math | Google GroupsMath
Notations, Computer Languages, and the "Form" in Formalism. 3 new of 3
- Sep 1 ... subnazi musatov decides what's good for all --with no
one's permission ...groups.google.jo/group/sci.math/topics?
hl=en&start=   Sotheby's - Auctions - Calendar - Modern and
Contemporary Russian Art... accusations of formalism (which the state
defined as the focus on the formal ... 48 he took some drawing classes
in the art studio led by S. N. Ivashev-Musatov. ...sothebys.com/app/
live/lot/LotDetail.jsp?...&live_lot_id=24   Seismic Wave Field in the
Vicinity of Caustics and Higher-Order Travel ...In this section we
shall briefly discuss the main formalism (some details can be ... and
the quadratic form in (9') is sufficient to describe the
wave ...www.math.purdue.edu/~aduchkov/papers/duch_Studia_03.pdf
Perturbative QCD Analysis of the Nucleon's Pauli Form Factor F...
sophisticated formalism has ... Sudakov form factor in regulating
possible end-point. singularities in the ... [31] I. Musatov and A.
Radyushkin, Phys. ...www.jlab.org/~riordan/papers/e092003
Discussions - sci.math | Google GroupsMath Notations, Computer
Languages, and the "Form" in Formalism. 3 new of 3 - Sep 1 ... Korner:
On the theorem of Ivasev-Musatov. II ...groups.google.com.ua/group/
sci.math/topics?hl=pt   Discussions - sci.math | Google GroupsMath
Notations, Computer Languages, and the "Form" in Formalism. 3 new of 3
- Aug 31 ... Korner: On the theorem of Ivasev-Musatov.
II ...groups.google.gm/group/sci.math/topics?tsc=2   << 1234567 >>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python/Fortran interoperability

2009-08-23 Thread viper-2
On Aug 23, 6:35 am, n...@cam.ac.uk wrote:
> I am interested in surveying people who want to interoperate between
> Fortran and Python to find out what they would like to be able to do
> more conveniently, especially with regard to types not supported for C
> interoperability by the current Fortran standard.  

Python is still on my "to do" list, but I know I'll be interested in
the following:

> 1) Do you want to use character strings of arbitrary length?
>

Yes

> 2) Do you want to use Python classes with list members, where the
> length of the list is not necessarily fixed for all instances of the
> class?  Or, equivalently, Fortran derived types containing allocatable
> or pointer arrays?
>

Yes

> 2) Do you want to use Fortran derived types or Python classes that
> contain type-bound procedures (including finalizers)?  Please answer
> "yes" whether or nor you would like to call those type-bound procedures
> from the other language.
>

Don't know yet

> 4) Do you want to call functions where the called language allocates
> or deallocates arrays/lists/strings for use by the calling language?
> Note that this is specifically Fortran->Python and Python->Fortran.
>

Yes

agt


--
Freedom - no pane, all gaiGN!

Code Art Now
http://codeartnow.com
Email: a...@codeartnow.com

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: instead of depending on data = array('h') .. write samples 1 by 1 to w = wave.open("wav.wav", "w")

2009-07-29 Thread &#x27;2+
o wow .. there's still a lot to learn ..
okay .. if i get stucked with the memory usage issue
will try this hybrid .. thanx for the example!!

it took about 40 min to render 1min of wav
so i'll just keep this project like 15 sec oriented
and maybe that'll keep me away from the mem trouble

and my oil.py is still so cheap..
sad thing is that "the result sound strange" is true to
all versions :s

thanx again anyway!


On Wed, Jul 29, 2009 at 5:21 PM, Peter Otten<__pete...@web.de> wrote:
> '2+ wrote:
>
>> it says
>> Wave_write.writeframes(data)
>> will that mean
>> "from array import array"
>> is a must?
>>
>> this does the job:
>>
>> import oil
>> import wave
>> from array import array
>>
>> a = oil.Sa()
>>
>> w = wave.open("current.wav", "w")
>> w.setnchannels(2)
>> w.setsampwidth(2)
>> w.setframerate(44100)
>>
>> data = array('h')
>>
>> for gas in range(44100 * 5):
>>     a.breath()
>>     r = int(32767 * (a.pulse(1) + a.pulse(2) + a.pulse(3)) / 3.0)
>>     l = int(32767 * (a.pulse(4) + a.pulse(5) + a.pulse(6)) / 3.0)
>>     data.append(r)
>>     data.append(l)
>>
>> w.writeframes(data.tostring())
>> w.close()
>>
>> don't like array becoming so huge so tested this and it was also okay:
>>
>> for gas in range(44100 * 5):
>>     a.breath()
>>     data = array('h')
>>     r = int(32767 * (a.pulse(1) + a.pulse(2) + a.pulse(3)) / 3.0)
>>     l = int(32767 * (a.pulse(4) + a.pulse(5) + a.pulse(6)) / 3.0)
>>     data.append(r)
>>     data.append(l)
>>     w.writeframes(data.tostring())
>>
>> but without array .. it becomes 15secs(3 times longer than was
>> intended to be) of wav file:
>>
>> for gas in range(44100 * 5):
>>     a.breath()
>>     r = int(32767 * (a.pulse(1) + a.pulse(2) + a.pulse(3)) / 3.0)
>>     l = int(32767 * (a.pulse(4) + a.pulse(5) + a.pulse(6)) / 3.0)
>>     w.writeframes(hex(r))
>>     w.writeframes(hex(l))
>
> Doesn't it sound strange, too? You are writing bogus bytes to the file.
> Compare:
>
>>>> import array
>>>> array.array("h", [42]).tostring()
> '*\x00'
>>>> hex(42)
> '0x2a'
>
> Not only do they differ in length, the contents are different, too. If
> you're unfamiliar with string escape codes, here's a way to see the bytes:
>
>>>> map(ord, array.array("h", [42]).tostring())
> [42, 0]
>>>> map(ord, hex(42))
> [48, 120, 50, 97]
>
>> should i just be happy with depennding on using array?
>> or is there a solution to make the last one work properly?
>
> There is a way to make the last one work: use struct.pack("h", r) instead of
> hex(r). I'm of course assuming that the first version does give you the
> desired result. You should not continue before you have verified that.
>
> I still recommend array for performance reasons. If memory usage is an issue
> you can adopt a hybrid approach:
>
> # untested
> from itertools import islice
> from array import array
>
> def gen_data():
>    for gas in xrange(44100 * 5): # range --> xrange
>        a.breath()
>        r = int(32767 * (a.pulse(1) + a.pulse(2) + a.pulse(3)) / 3.0)
>        l = int(32767 * (a.pulse(4) + a.pulse(5) + a.pulse(6)) / 3.0)
>        yield r
>        yield l
>
> data = gen_data()
> N = 2**20
> while True:
>    chunk = array('h')
>    chunk.extend(islice(data, N))
>    if not chunk:
>        break
>    w.writeframes(chunk.tostring())
>
> This will limit the array size to 4N bytes.
>
> Peter
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
SaRiGaMa's Oil Vending Orchestra
is podcasting:
http://sarigama.namaste.jp/podcast/rss.xml
and supplying oil.py for free:
http://oilpy.blogspot.com/
-- 
http://mail.python.org/mailman/listinfo/python-list


instead of depending on data = array('h') .. write samples 1 by 1 to w = wave.open("wav.wav", "w")

2009-07-28 Thread &#x27;2+
it says
Wave_write.writeframes(data)
will that mean
"from array import array"
is a must?

this does the job:

import oil
import wave
from array import array

a = oil.Sa()

w = wave.open("current.wav", "w")
w.setnchannels(2)
w.setsampwidth(2)
w.setframerate(44100)

data = array('h')

for gas in range(44100 * 5):
a.breath()
    r = int(32767 * (a.pulse(1) + a.pulse(2) + a.pulse(3)) / 3.0)
l = int(32767 * (a.pulse(4) + a.pulse(5) + a.pulse(6)) / 3.0)
data.append(r)
data.append(l)

w.writeframes(data.tostring())
w.close()

don't like array becoming so huge so tested this and it was also okay:

for gas in range(44100 * 5):
a.breath()
data = array('h')
r = int(32767 * (a.pulse(1) + a.pulse(2) + a.pulse(3)) / 3.0)
l = int(32767 * (a.pulse(4) + a.pulse(5) + a.pulse(6)) / 3.0)
data.append(r)
data.append(l)
w.writeframes(data.tostring())

but without array .. it becomes 15secs(3 times longer than was
intended to be) of wav file:

for gas in range(44100 * 5):
    a.breath()
r = int(32767 * (a.pulse(1) + a.pulse(2) + a.pulse(3)) / 3.0)
l = int(32767 * (a.pulse(4) + a.pulse(5) + a.pulse(6)) / 3.0)
w.writeframes(hex(r))
w.writeframes(hex(l))

should i just be happy with depennding on using array?
or is there a solution to make the last one work properly?

tia

-- 
SaRiGaMa's Oil Vending Orchestra
is podcasting:
http://sarigama.namaste.jp/podcast/rss.xml
and supplying oil.py for free:
http://oilpy.blogspot.com/
-- 
http://mail.python.org/mailman/listinfo/python-list


wave.setparams((2, 2, 44100, 44100 * 2 * 10, "NONE", "not compressed")) became more than 30secs

2009-07-27 Thread &#x27;2+
thanx to rob .. who gave me an example of how to use the WAVE lib
now am on my way to use it as simple as i can

i wrote an oil.py the instance of which will behave like an oscillator
which constantly generates 7 different wave forms (non fixed)
i thought this code might produce 10secs of wave file but the result
was longer than 30secs
was testing if i could use the WAVE lib withount taking advantage of
StringIO
nor
struct
but maybe am doing totally wrong?

--8<---

import oil
import wave

a = oil.Sa()

w = wave.open("current.wav", "w")
w.setparams((2, 2, 44100, 44100 * 2 * 10, "NONE", "not compressed"))

for gas in range(44100 * 10):
a.breath()
r = int(32767 * (a.pulse(1) + a.pulse(2) + a.pulse(3)) / 3.0)
l = int(32767 * (a.pulse(4) + a.pulse(5) + a.pulse(6)) / 3.0)
w.writeframes(hex(r))
w.writeframes(hex(l))
w.close()



-- 
SaRiGaMa's Oil Vending Orchestra
is podcasting:
http://sarigama.namaste.jp/podcast/rss.xml
and supplying oil.py for free:
http://oilpy.blogspot.com/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: what is the biggest number that i can send to Wave_write.writeframes(data)

2009-06-04 Thread &#x27;2+
thanx for the example!
somehow on juanty gui comes up but no sound ..
anyway i shortened the script this way and could aplay it

import wave

AMPLITUDE = 2 ** 15

w = wave.open( "out.wav", "w" )
w.setnchannels( 2 )
w.setsampwidth( 2 ) #BYTES
w.setframerate( 22000 )

from array import array
import math

F = 261.626
F2 = F * (2 ** (5 / 12.))
ang = 0.0
ang2 = 0.0
delta = ( math.pi * 2 * F  ) / 22000.0
delta2 = ( math.pi * 2 * F2  ) / 22000.0

for cycle in xrange( 4 ):
data = array( 'h' )
for pos in xrange( 22000 ):
amp = AMPLITUDE * (pos / 22000.0)
amp2 = AMPLITUDE - amp
if cycle & 1:
amp, amp2 = amp2, amp

data.append( int( ( amp * math.sin( ang ) ) ) )
data.append( int( ( amp2 * math.sin( ang2 ) ) ) )

ang += delta
ang2 += delta2

w.writeframes( data.tostring() )

w.close()

On Tue, Jun 02, 2009 at 05:13:59PM -0500, Rob Williscroft wrote:
> '2+ wrote in news:mailman.1017.1243932401.8015.python-l...@python.org in 
> comp.lang.python:
> 
> > would like to take advantage of the wave module
> > found a good example here:
> > http://www.python-forum.org/pythonforum/viewtopic.php?f=2&t=10644
> > 
> > hmm .. i don't get how to write a stereo .. i mean i can set nchannels
> > .. but how do i actually take control of each ch individually?
> 
> Interleave the channels, one sample for the left then one sample 
> for the right (or maybe its the other way around).
> 
> > and what's the range(in float) of the data i can set in
> 
> The range of a signed 16 bit int, -2**15 to 2**15 - 1.
> 
> > wav_file.writeframes(struct.pack('h', data))?
> 
> Example:
> 
> import wave
> from StringIO import StringIO
> 
> out = StringIO()
> 
> AMPLITUDE = 2 ** 15
> 
> w = wave.open( out, "w" )
> w.setnchannels( 2 )
> w.setsampwidth( 2 ) #BYTES
> w.setframerate( 22000 )
> 
> from array import array
> import math
> 
> F = 261.626
> F2 = F * (2 ** (5 / 12.))
> ang = 0.0
> ang2 = 0.0
> delta = ( math.pi * 2 * F  ) / 22000.0
> delta2 = ( math.pi * 2 * F2  ) / 22000.0
> 
> for cycle in xrange( 4 ):
>   data = array( 'h' )
>   for pos in xrange( 22000 ):
> amp = AMPLITUDE * (pos / 22000.0)
> amp2 = AMPLITUDE - amp
> if cycle & 1:
>   amp, amp2 = amp2, amp
>   
> data.append( int( ( amp * math.sin( ang ) ) ) )
> data.append( int( ( amp2 * math.sin( ang2 ) ) ) )
> 
> ang += delta
> ang2 += delta2
>   
>   w.writeframes( data.tostring() )
>   
> w.close()
> 
> sample = out.getvalue()
> out.close()
> 
> #a wx player
> 
> import wx
> 
> app = wx.PySimpleApp()
> 
> class Frame( wx.Dialog ):
>   def __init__( self, *args ):
> wx.Dialog.__init__( self, *args )
> b = wx.Button( self, -1, "Ok" )
> b.Bind( wx.EVT_BUTTON, self.button )
>   
>   def button( self, event ):
> self.sound = wx.SoundFromData( sample ) 
> self.sound.Play( wx.SOUND_ASYNC )
> 
> frame = Frame( None )
> frame.Show()
> 
> app.MainLoop()
> 
> Rob.
> -- 
> http://www.victim-prime.dsl.pipex.com/
-- 
'2+
http://sarigama.namaste.jp/
is
podcasting his microtuned music
http://www002.upp.so-net.ne.jp/buyobuyo/micro/rss.xml
-- 
http://mail.python.org/mailman/listinfo/python-list


what is the biggest number that i can send to Wave_write.writeframes(data)

2009-06-02 Thread &#x27;2+
would like to take advantage of the wave module
found a good example here:
http://www.python-forum.org/pythonforum/viewtopic.php?f=2&t=10644

hmm .. i don't get how to write a stereo .. i mean i can set nchannels
.. but how do i actually take control of each ch individually?
and what's the range(in float) of the data i can set in
wav_file.writeframes(struct.pack('h', data))?

tia

-- 
SaRiGaMa's Oil Vending Orchestra
is podcasting:
http://sarigama.namaste.jp/podcast/rss.xml
and supplying oil.py for free:
http://oilpy.blogspot.com/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: is there a way to collect twitts with python?

2009-04-04 Thread &#x27;2+
nice info, thanx
that
# stalk my stalkers
example look smart
i won't use that one if it was for this ml ;D

On Sun, Apr 5, 2009 at 1:22 AM, Bradley Wright  wrote:
> Just to pimp my own wares:
>
> http://github.com/bradleywright/yatcip/tree/master
>
> A Python Twitter client.
> --
> http://mail.python.org/mailman/listinfo/python-list
>

-- 
SaRiGaMa's Oil Vending Orchestra
is podcasting:
http://sarigama.namaste.jp/podcast/rss.xml
and supplying oil.py for free:
http://oilpy.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list


Re: is there a way to collect twitts with python?

2009-04-04 Thread &#x27;2+
anyway i found:

http://code.google.com/p/python-twitter/
and
http://mike.verdone.ca/twitter/

and both were easy to install on intrepid .. but didn't work
python-twitter did work by manually downloading:
http://python-twitter.googlecode.com/svn/trunk/twitter.py
well but it seems like i have to follow the guy to get his twit

-- 
SaRiGaMa's Oil Vending Orchestra
is podcasting:
http://sarigama.namaste.jp/podcast/rss.xml
and supplying oil.py for free:
http://oilpy.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list


is there a way to collect twitts with python?

2009-03-27 Thread &#x27;2+
i found a guy twittin supercollider code
this means his followers can listen to a noiz by activating that 1 line
(well if he has sc installed)
if lots of sc users start twittin ... it would be no good to follow each

collecting a sc related twitt can be done with python?
if there's a lib already any good pointers to start learnin thangs at?

maybe someday
jython or pyjamas can be used to launch a
sctwitt strreaming radio?
(this should be the one listeners can mix his favorite sctwittists)

tia

-- 
SaRiGaMa's Oil Vending Orchestra
is podcasting:
http://sarigama.namaste.jp/podcast/rss.xml
and supplying oil.py for free:
http://oilpy.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list


Re: a podcast for music algo-comped with python

2008-08-14 Thread &#x27;2+
hey thanx
maybe these days .. game-programmers are doing algo-comp
without talking loud about it?

is python running as backbones of some games?

well ... maybe i'd simply want to start from writing a funny cute one
that can play strange sounds with pc-kbd ...
is it simple if is not about sound-file rendering?

is it likely that sndobj would become the standard module
that comes with python-package?
at this moment i need csound to ceate a sound-file
but well it is not everybody that has csound installed
and it might be the same with sndobj

On Thu, Aug 14, 2008 at 10:54:54AM -0700, Paul Boddie wrote:
> > this is the podcast am focusing on cs.py:
> > http://www002.upp.so-net.ne.jp/buyobuyo/micro/rss.xml
> > files of scripts i used to create the sound is also linked from the html
> > http://www002.upp.so-net.ne.jp/buyobuyo/micro/080812.html
> 
> The MP3 file available from the above page reminds me of background
> music from a 1990s game whose name I can't remember, and I wonder if
> there's any potential for combining this with game writing, if you
> aren't already doing so.
> 
-- 
'2+ 
http://sarigama.namaste.jp/buyobuyo.html
--
http://mail.python.org/mailman/listinfo/python-list


a podcast for music algo-comped with python

2008-08-11 Thread &#x27;2+
well maybe am over-advertising .. excuse me ...

am new to python but my
"algo-comping cs.sco with python" thang kinda got lauched after all
so decided to move from java to python to do these thangs
completly platform independently

oh ..  am just curious who are the guys over here composing weird music with 
python

as my self-introduction...
this is the podcast am focusing on cs.py:
http://www002.upp.so-net.ne.jp/buyobuyo/micro/rss.xml 
files of scripts i used to create the sound is also linked from the html
http://www002.upp.so-net.ne.jp/buyobuyo/micro/080812.html
so would be happy if any of could give me a comment
well ... i think my scripts are still too simple but dirty
so any suggestion would be welcomed

tia
--
http://mail.python.org/mailman/listinfo/python-list