Python Forum
How can I make music with python/pygame?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I make music with python/pygame?
#11
Installed both those modules and copied the guy's code. Now I can make .wav files. Next step is figuring out how to make music with this. Down the line, I'm going to use this to make a music editor for myself. But for now, I have an even bigger hurdle to get over: learning how to write decent music. Oh well. At least I can do sound effects now, if nothing else. The next step is figuring out the math for different waveforms, and figuring out what pitches I'll be using. I'll also need to figure out how to make a 'static' sound. But for now, my games are no longer dead silent.
Reply
#12
(Sep-24-2019, 06:43 PM)xBlackHeartx Wrote: He imports something called 'scipy' into the program, which I don't seem to have. Is that really necessary for turning sine waves into sound?
scipy is another 3rd party library
https://pypi.org/project/scipy/
Recommended Tutorials:
Reply
#13
It isn't python, but there's https://sonic-pi.net/
With sonic pi, you write a script that generates audio, either using midi or samples, with several public domain samples included (so there's no copywrite issues with whatever you make).

It operates with the principle of named sound blocks that loop. If you change one and click Run, the next time that loop would start, the new version plays instead. That way, you can make changes without stopping, which helps tweak various different instruments together to get a coherent whole.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to make enemy chase me in pygame? Jan_97 3 4,269 Nov-23-2021, 05:08 PM
Last Post: Jan_97
  How to make an image move in relation to another in PYGAME CompleteNewb 1 2,280 Nov-10-2021, 03:38 PM
Last Post: metulburr
  [PyGame] How to loop music with pygame finndude 2 3,886 Nov-09-2021, 10:54 AM
Last Post: metulburr
  cant make a door automatically close a few seconds after i open it in pygame cooImanreebro 2 2,215 Dec-15-2020, 08:40 PM
Last Post: michael1789
  Trying to make boundries for the pygame bluewing101 2 1,997 Mar-23-2020, 01:35 AM
Last Post: Windspar
  Problem with music - Pygame.error GaseBall 1 3,150 Nov-28-2019, 07:46 PM
Last Post: SheeppOSU

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020