Morse Key help.
Hello repl! First post here. I decided to make a Morse key because I was bored. I didn't want it to translate Morse originally, I planned on somehow making the program be able to determine using length of user input and length in between inputs to determine whether it'd be a (.), a (_), or a (/), however at the moment I can't even get it to play anything.
My main goal at the moment is just to make it play a sound for the duration of a keypress. Eventually I plan on making the screen turn white (not the entire screen, just the one in the top right for pygame) as opposed to black by default, but my main focus is just the sound for the moment.
I tried making it play a note, guided by replit's own guide on playing audio. That didn't work, at least it wouldn't play again. Then tried audio files. Didn't like how short it was, so I made it longer and tried to make it loop while pressed, and play a loopoff sound when it stopped (not a problem at the moment, as I haven't even been able to get there to test it!)
Always the same error, regardless of keypress length, tine.sleep length, or audio file length:
So currently, I have tried as well, replit audio doesn't work
well. I have tried multiple times, and yet it doesn't work. You should try using a different module or system, or maybe use a different python
lib to access music.
Hope this helps!
Yes. That is because replit runs on servers and not on your build in cpu. That is why you can run repl off a ipad or phone. If you were to set up a camera off regular code, then you would not be able access the camera because it is built in the servers. You can do it with html however because the main website or domain runs off your regular cpu. @JBloves27
Hey! So in your main code you never stated a place where the sound was supposed to execute. So basically to fix this, where you want sound, just type this..
Its simple but I don't see this anywhere in your code.