3 Replies - 604 Views - Last Post: 27 October 2013 - 11:04 AM Rate Topic: -----

#1 Malik Shahzad  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 21-October 13

Piano in Python using If Else Statement

Posted 21 October 2013 - 04:56 AM

Hello Everyone
Hopefully you all are fine..
Can we develop piano in Pyhton by producing a different voice on every key press.(if yes) kindly guide me how.

Waiting for your kind replies


Regards,
Malik Shahzad Iqbal
Is This A Good Question/Topic? 0
  • +

Replies To: Piano in Python using If Else Statement

#2 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7891
  • View blog
  • Posts: 13,419
  • Joined: 19-March 11

Re: Piano in Python using If Else Statement

Posted 21 October 2013 - 07:59 AM

This is not an impossible progam in python, but it's more program than a beginner should take on. I think it would be a lot easier all around for you to learn to program in python, and then write it yourself.
Was This Post Helpful? 1
  • +
  • -

#3 Malik Shahzad  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 21-October 13

Re: Piano in Python using If Else Statement

Posted 21 October 2013 - 08:08 AM

View Postjon.kiparsky, on 21 October 2013 - 07:59 AM, said:

This is not an impossible progam in python, but it's more program than a beginner should take on. I think it would be a lot easier all around for you to learn to program in python, and then write it yourself.


Thanks alot for your reply JON

I just want to know which library I will be using in this regard.
Was This Post Helpful? 0
  • +
  • -

#4 witeboy724  Icon User is offline

  • New D.I.C Head

Reputation: 6
  • View blog
  • Posts: 30
  • Joined: 21-June 12

Re: Piano in Python using If Else Statement

Posted 27 October 2013 - 11:04 AM

Pygame is a lot of fun, and something that I started learning as a beginner. Learn some python basics, then jump into pygame. It can do graphics or a gui when you want to add those, but getting basics like keypresses is easy. It can play sounds and output to midi or whatever else you want too.

Here is their tutorial page:
Pygame Tutorials

This cheat sheet has a bunch of things that you'll want to skim over while just beginning, but take a look at they keypress section that they put in a loop. There are tons of examples at and around pygame.org so check it out.
Pygame Cheat Sheet
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1