answersLogoWhite

0

How do you play sound affects with python on a Macintosh?

Updated: 8/16/2019
User Avatar

Wiki User

15y ago

Best Answer

Install PyObjC, and check out the NSSound module.

Example:

from AppKit import NSSound

play = NSSound.alloc()

play.initWithContentsOfFile_byReference_('/mysound.mp3′, True)

play.play()

play.stop()

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you play sound affects with python on a Macintosh?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Can you play games with Macintosh computer?

Games can be played on a Macintosh computer.


How is a radio play made more dramatic by its use of technology?

It uses sound affects …..


What computer do you need to play minecraft?

A Linux, Windows, or a Macintosh.


Can you play a Blu-ray disc on a Macintosh computer?

If you have a Blu-Ray drive, then yes. If not, then no


Does pwnxile work on mac?

It is currently not possible to play PwnXile on a Macintosh Computer. However the Owner of PwnXile (Robbie) Announced in October to the community that playing on a Macintosh would be available soon.


How do you look after your black-headed python?

Feed ,water, and play but be carful


What version of Macintosh computer do you need to play Guitar Hero?

Guitar Hero isn't available for OSX users, so you would need windows on your Macintosh to actually run Guitar Hero.


Is Monty Python better than Shakespeare?

Monty Python paid tribute to Shakespeare. Or have you never seen the Monty Python TV episode "Hamlet" in which Hamlet wants to stop being a character in a Shakespeare play and become a private dick? Or the Monty Python episode where the wife of Sir Philip Sidney (who may also be an inspector in the Vice Squad) is caught reading "Gay Boys in Bondage" and claims it is the latest play by Shakespeare? (And it is!) In other words, you don't have to know Python to get Shakespeare, but it helps to know Shakespeare if you want to get Python.


How do you play sound without a sound card?

You cannot play any sound without a sound card.


Can you play minecraft on a windows xp?

Yes. It is not the make of the machine that affects your ability to play games, it is the specifications of the machine that affects such things.


Does play have a short a sound?

Yes, "play" has a short a sound as in "cat" or "mad".


How bilharzia affects the body?

bilharzia affects the body if you play around in lakes and you are not safe