[Tutor] How to generate a pure tones and random noise using Python?
Paul Z
paul at whoosh.cn
Sun Jul 26 18:10:29 CEST 2015
Hi Laura,
I just have read this webpage about Generate Audio with Python.
It seem writing by Python 2? Esp. itertools (izip, imap).
I try to change izip and imap to zip and map, but I get error:
beatfreq, amplitude = remainder.split('/')
ValueError: need more than 1 value to unpack
Are there some way to conver it to the code of Python 3?
I'm too anxious to hear the sound from Python though I'm a absolute beginner.
Many thanks
Paul Z
----------------------------------------
> From: paul at whoosh.cn
> To: lac at openend.se
> Date: Sun, 26 Jul 2015 19:29:19 +0800
> Subject: Re: [Tutor] How to generate a pure tones and random noise using Python?
> CC: tutor at python.org
>
> Hi Laura,
>
> Thanks for you helpful reply, and it is exactly what I want.
>
> I'm going to learn Python from write a ears training program. ;-)
> And Is there have a library to scope(print) this wave form? (real-time and non real-time)
>
> I have already started to learn "generate audio with python", Thank you. :-)
>
> Paul Z
>
> ----------------------------------------
>> To: paul at whoosh.cn
>> CC: tutor at python.org; lac at openend.se
>> From: lac at openend.se
>> Subject: Re: [Tutor] How to generate a pure tones and random noise using Python?
>> Date: Sat, 25 Jul 2015 22:35:24 +0200
>>
>> In a message of Sat, 25 Jul 2015 19:15:31 +0800, Paul Z writes:
>>>Hi All,
>>>
>>>I try to train my listening by using python. (estimating the frequency of sound)
>>>So... Are there some way to generate a fixed frequency sound in different waves (eg. Sine Wave, Saw Wave, Triangle Wave etc.) and different random noise. (eg. white noise & pink noise) ?
>>>
>>>I have search in web, some people say that I can use winsound which can generate a fixed frequency beep. However, It is Windows only. (I'm under Linux) and I think It is not a professional library to generate audio signal.
>>>
>>>How about pygame? and some examples?
>>>any ideas?
>>>
>>>Thanks
>>>
>>>Paul Z
>>>_______________________________________________
>>>Tutor maillist - Tutor at python.org
>>>To unsubscribe or change subscription options:
>>>https://mail.python.org/mailman/listinfo/tutor
>>
>> I think you want this:
>> https://zach.se/generate-audio-with-python/
>> https://github.com/zacharydenton/wavebender
>>
>> pygame will not give you want you want.
>>
>> blender might. I am not sure but worth googling for.
>>
>> Laura
>>
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list