Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Easy way to play single musical notes in Python
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
James Harris  
View profile  
 More options Nov 14, 7:12 pm
Newsgroups: comp.lang.python
From: James Harris <james.harri...@googlemail.com>
Date: Sat, 14 Nov 2009 16:12:39 -0800 (PST)
Local: Sat, Nov 14 2009 7:12 pm
Subject: Easy way to play single musical notes in Python
Is there a simple way to play musical notes in Python? Something like

  voice.play("c4")

to play C in octave 4 would be ideal. I included a voice parameter as
I'd like to play proper notes, not just beeps. This is for recognition
of pitch. For example, the program plays a note and the user tries to
identify the note played.

There are many options at

  http://wiki.python.org/moin/PythonInMusic

but which to choose? They generally seem too complex. I'm looking for
something really basic. It would help if it was cross platform and
didn't need Tkinter as the snack library does. I presume pure Python
is not possible.

Any suggestions?

James


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Harris  
View profile  
 More options Nov 14, 7:21 pm
Newsgroups: comp.lang.python
From: James Harris <james.harri...@googlemail.com>
Date: Sat, 14 Nov 2009 16:21:51 -0800 (PST)
Local: Sat, Nov 14 2009 7:21 pm
Subject: Re: Easy way to play single musical notes in Python
On 15 Nov, 00:12, James Harris <james.harri...@googlemail.com> wrote:

Oh, it would be OK if the system allowed numeric pitches such as

  voice.play(440)

to play a note at 440 Hertz.

Anything like the above should be good enough.

James


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
r  
View profile  
 More options Nov 15, 12:41 am
Newsgroups: comp.lang.python
From: r <rt8...@gmail.com>
Date: Sat, 14 Nov 2009 21:41:03 -0800 (PST)
Local: Sun, Nov 15 2009 12:41 am
Subject: Re: Easy way to play single musical notes in Python
On Nov 14, 6:21 pm, James Harris <james.harri...@googlemail.com>
wrote:

> Is there a simple way to play musical notes in Python? Something like
>   voice.play("c4")

Uhh, tksnack is pretty easy to use IMO, see this link...
http://www.daniweb.com/code/snippet216655.html

No python does not have access to cross platform soundcard
capabilities built into the language. I think there is a wrapper for
csound somewhere. But there are many 3rd party modules that do have
capabilities to some extent. You could make calls to the underlying OS
machinery and there is the winsound module (not exactly what you want
though). Just look over this Google splooge...

http://www.google.com/search?hl=en&rlz=1C1CHMI_enUS340US340&q=Python+...


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Harris  
View profile  
 More options Nov 17, 11:55 am
Newsgroups: comp.lang.python
From: James Harris <james.harri...@googlemail.com>
Date: Tue, 17 Nov 2009 08:55:33 -0800 (PST)
Local: Tues, Nov 17 2009 11:55 am
Subject: Re: Easy way to play single musical notes in Python
On 15 Nov, 05:41, r <rt8...@gmail.com> wrote:

As I say I was hoping to avoid tk. Thanks for the feedback though. If
nothing else is suggested I'll have to try snack.

James


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google