Re: creating status sounds in python

2014-07-18 Thread AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
Re: creating status sounds in python Ive learned so much about audio in the last week LOL... Thank you! Ive solved my current problem and will be working on finishing my little game...Will Libaudioverse have sound generation? I may wish to port the game Im making after the one Im doing

Re: creating status sounds in python

2014-07-18 Thread AudioGames . net Forum — Development room : camlorn via Audiogames-reflector
Re: creating status sounds in python Libaudioverse currently has Sine. I havent added the others yet, but can do so in like half an hour: they are useless for testing purposes, so I didnt bother. the code from the Sine wave works for all of them, I just ahve to point it at a table

Re: creating status sounds in python

2014-07-17 Thread AudioGames . net Forum — Development room : SoundMUD via Audiogames-reflector
Re: creating status sounds in python Here is your example with square and triangle waves (at least I hope so). Executing the module now plays as a test all the available wave forms. A triangle wave doesnt go brutally from 1 to -1 but goes up progressively from -1 to 1, then progressively

Re: creating status sounds in python

2014-07-17 Thread AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
Re: creating status sounds in python This is awesome!So is pitch bend different than just changing the frequency and creating a new sound object?I think you could create a pitch bend function by adding a for loop making the number smaller each time that the array forloop runs...about

Re: creating status sounds in python

2014-07-17 Thread AudioGames . net Forum — Development room : SoundMUD via Audiogames-reflector
Re: creating status sounds in python Pitch bend as a filter is probably very complicated if you do the filter yourself, while creating a sound with a new frequency is probably possible, but quite tricky too. The sound will have to stop at a level where the next will follow without

Re: creating status sounds in python

2014-07-17 Thread AudioGames . net Forum — Development room : camlorn via Audiogames-reflector
Re: creating status sounds in python The difference between pitch bend and increasing the frequency and resynthesizing is that pitch bend works everywhere. To pitch bend something, you manipulate the buffer after synthesis, not change the loop.Ill try to explain this too, since I seem

Re: creating status sounds in python

2014-07-16 Thread AudioGames . net Forum — Development room : SoundMUD via Audiogames-reflector
Re: creating status sounds in python frastlin wrote:OK,this is a little over my head! But I did find a working example!!!taken from:http://www.mail-archive.com/pygame-user … 16140.htmlI wonder what the code would be to change the shape of it? Also to make the sound come equally out of both

Re: creating status sounds in python

2014-07-16 Thread AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
Re: creating status sounds in python [[wow]], that is a great explination, I can totally see the sounds now! So, in the example, why is there a call to numpy and what is special about the arrays they are calling?btw, here is the working sound file with comments in the works. Import

Re: creating status sounds in python

2014-07-16 Thread AudioGames . net Forum — Development room : SoundMUD via Audiogames-reflector
Re: creating status sounds in python frastlin wrote:So, in the example, why is there a call to numpy and what is special about the arrays they are calling?Im not sure why pygame.sndarray requires numpy arrays. Maybe because these arrays are more efficient, smaller, faster, multidimensional

Re: creating status sounds in python

2014-07-16 Thread AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
Re: creating status sounds in python [[wow]], that is a great explination, I can totally see the sounds now! So, in the example, why is there a call to numpy and what is special about the arrays they are calling?btw, here is the working sound file with comments. Import this module and use

Re: creating status sounds in python

2014-07-16 Thread AudioGames . net Forum — Development room : camlorn via Audiogames-reflector
Re: creating status sounds in python Numpy is very fast, very compact, and very capable if you know a bit of math. The main point of it with sound code, however, is memory consumption. Especially for larger buffers, the fact that Python has to use what is called boxxed types hurts you

Re: creating status sounds in python

2014-07-16 Thread AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
Re: creating status sounds in python Here is a more pythonic and functional module for generating sounds in pygame using the sndarray module. Where can I find more equations for different waves? I googled equations for sound waves, but just found the basic idea of moving from -1 to 1. I

Re: creating status sounds in python

2014-07-16 Thread AudioGames . net Forum — Development room : CAE_Jones via Audiogames-reflector
Re: creating status sounds in python The four basics are sine, sawtooth, square and triangular.This page gives examples (it looks like one of them uses headings to separate them, so it should be easy to find):http://stackoverflow.com/questions/1073 … angle-waveThose arent incredibly useful

Re: creating status sounds in python

2014-07-16 Thread AudioGames . net Forum — Development room : CAE_Jones via Audiogames-reflector
Re: creating status sounds in python The four basics are sine, sawtooth, square and triangular.This page gives examples (it looks like one of them uses headings to separate them, so it should be easy to find):http://stackoverflow.com/questions/1073 … angle-waveThose arent incredibly useful

Re: creating status sounds in python

2014-07-16 Thread AudioGames . net Forum — Development room : CAE_Jones via Audiogames-reflector
Re: creating status sounds in python The four basics are sine, sawtooth, square and triangular.This page gives examples (it looks like one of them uses headings to separate them, so it should be easy to find):http://stackoverflow.com/questions/1073 … angle-waveThose arent incredibly useful

Re: creating status sounds in python

2014-07-16 Thread AudioGames . net Forum — Development room : camlorn via Audiogames-reflector
Re: creating status sounds in python Heres the other thing about this. People only use those four because sine waves add together to make interesting sounds and the rest make interesting sounds when filtered and detuned, especially if you can have moving filters and all sorts of stuff

Re: creating status sounds in python

2014-07-15 Thread AudioGames . net Forum — Development room : camlorn via Audiogames-reflector
Re: creating status sounds in python All right, here goes. Im going to show how we get from the statement I want to make a sine wave to I have a buffer that contains a sine wave, including all the reasoning. Trig is not required, so long as youre willing to accept the things I say about

Re: creating status sounds in python

2014-07-15 Thread AudioGames . net Forum — Development room : camlorn via Audiogames-reflector
Re: creating status sounds in python All right, here goes. Im going to show how we get from the statement I want to make a sine wave to I have a buffer that contains a sine wave, including all the reasoning. Trig is not required, so long as youre willing to accept the things I say about

Re: creating status sounds in python

2014-07-15 Thread AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
Re: creating status sounds in python I dont understand:The % operator means remainder, i.e. 2%3 is 2, 4%3 is 1, 9%3 is 0, 12%3 is 0, and 13%3 is 1.What are we dividing? Or what is the formula in english? I thought that 2%3 would be x/y = 2%3, so if x =13 and y = 5 it is 2

Re: creating status sounds in python

2014-07-15 Thread AudioGames . net Forum — Development room : CAE_Jones via Audiogames-reflector
Re: creating status sounds in python x%y = the remainder of x/y.So 13%3 =1, because 13/3=4 remainder 1.For example, an easy way to tell if an int is even or odd is to do x%2, since the only possible remainders for division by 2 are 0 and 1.x%y = remainder of x/y. If x is a multiple of y

Re: creating status sounds in python

2014-07-15 Thread AudioGames . net Forum — Development room : camlorn via Audiogames-reflector
Re: creating status sounds in python % is technically modulus. The English formula 2%3 is technically read 2 mod 3, and the definition is a bit more complicated (except in C/C++ where % really is remainder--the first thing I had to do was write my own using the bigger definition). Since

Re: creating status sounds in python

2014-07-15 Thread AudioGames . net Forum — Development room : camlorn via Audiogames-reflector
Re: creating status sounds in python Edit: Ive left my original explanation below, but it came to my attention that I may have misunderstood a comment of yours to mean that youre expecting it to return two values. If this is not the case, you can stop--it returns the remainder

Re: creating status sounds in python

2014-07-15 Thread AudioGames . net Forum — Development room : camlorn via Audiogames-reflector
Re: creating status sounds in python Edit: Ive left my original explanation below, but it came to my attention that I may have misunderstood a comment of yours to mean that youre expecting it to return two values. If this is not the case, you can stop--it returns the remainder

Re: creating status sounds in python

2014-07-14 Thread AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
Re: creating status sounds in python I understand sound from after the signal is created and coming through my ears, but I have never found any description on what the arrays in a sound file look like.My math knowledge is limited to algebra and geometry, so some of those functions above I

Re: creating status sounds in python

2014-07-12 Thread AudioGames . net Forum — Development room : camlorn via Audiogames-reflector
Re: creating status sounds in python Is explanation still wanted? I dont want to type up a long explanation of how basic sound synthesis works unless someone actually wants to read it. URL: http://forum.audiogames.net/viewtopic.php?pid=180476#p180476

Re: creating status sounds in python

2014-07-10 Thread AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
Re: creating status sounds in python Here is another example, but it is kind of buggy.#code:import pygamefrom pygame.locals import *import mathimport numpysize = (1366, 720)bits = 16#the number of channels specified here is NOT #the channels talked about here http://www.pygame.org/docs/ref

Re: creating status sounds in python

2014-07-10 Thread AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
Re: creating status sounds in python And here is a little synthesizer that uses the keyboard as input and uses the sndarray module:Keyboard synth URL: http://forum.audiogames.net/viewtopic.php?pid=180220#p180220 ___ Audiogames-reflector

Re: creating status sounds in python

2014-07-09 Thread AudioGames . net Forum — Development room : SoundMUD via Audiogames-reflector
Re: creating status sounds in python The example with pygame.sndarray.make_sound() creates a sound for each frequency, so there is no need to start at a position. It doesnt work well though.I didnt try sox to play audio. I just use it to generate sound. URL: http://forum.audiogames.net

Re: creating status sounds in python

2014-07-09 Thread AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
Re: creating status sounds in python I totally am lost on the sndarray module! I dont understand it, but your code doesnt look right to me and doesnt look like the code that are in the examples. The description says: in 22-kHz format, element number 5 of the array is the amplitude

Re: creating status sounds in python

2014-07-09 Thread AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
Re: creating status sounds in python OK,this is a little over my head! But I did find a working example!!!taken from:http://www.mail-archive.com/pygame-user … 16140.htmlI wonder what the code would be to change the shape of it? Also to make the sound come equally out of both ears?I changed

Re: creating status sounds in python

2014-07-08 Thread AudioGames . net Forum — Development room : SoundMUD via Audiogames-reflector
Re: creating status sounds in python One file or 100 files probably amounts to the same. Maybe you can use a tool like sox to generate all the files with a loop from a script. A command is for example:sox.exe -n output.wav synth .2 sine 300http://sox.sourceforge.net/In theory you can use

Re: creating status sounds in python

2014-07-08 Thread AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
Re: creating status sounds in python Sox looks really cool, but I cant get it to work. It may be that I have a 64 bit system, but it also may be that I dont understand how to play audio. (sox audio.mp3 play) or (sox play audio.mp3) dont work...I thought pygame had a start function (so I

Re: creating status sounds in python

2014-07-07 Thread AudioGames . net Forum — Development room : SoundMUD via Audiogames-reflector
Re: creating status sounds in python I dont know how NVDA do this (its surely in the source), but you can try winsound:https://docs.python.org/2/library/winsound.html URL: http://forum.audiogames.net/viewtopic.php?pid=179841#p179841

Re: creating status sounds in python

2014-07-07 Thread AudioGames . net Forum — Development room : SoundMUD via Audiogames-reflector
Re: creating status sounds in python I dont know how NVDA do this (its surely in the source), but you can try winsound:https://docs.python.org/2/library/winsound.htmlwinsound.Beep(frequency, duration) Beep the PC’s speaker. The frequency parameter specifies frequency, in hertz

Re: creating status sounds in python

2014-07-07 Thread AudioGames . net Forum — Development room : tward via Audiogames-reflector
Re: creating status sounds in python Frastlin, SoundMUD is exactly right. Last time I looked at the NVDA source code it was using Winsound to make the status indicators and little beeps you hear now and then. Its not a cross-platform solution so if you are thinking of a game for Linux

Re: creating status sounds in python

2014-07-07 Thread AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
Re: creating status sounds in python I wonder if there is an algorithm that lowers the pitch of the playing sound... If not, Ill just need to make 100 files for each tone. Or perhaps I can make one file of the tone going from high to low, then have the file play and stop at different times

Re: creating status sounds in python

2014-07-07 Thread AudioGames . net Forum — Development room : CAE_Jones via Audiogames-reflector
Re: creating status sounds in python Is there no way to synthesize tones? Something simple like this could be accomplished with a short triangle or square sample. The code to generate the data for those is trivial; the question is more if theres a way to then play it. URL: http

Re: creating status sounds in python

2014-07-07 Thread AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
Re: creating status sounds in python Hello,What I think I will do is create a file that descends like 2 octaves in audacity and then play something like 0.5 seconds for each percentage. Does anyone know how to see how long a file or track is in audacity? URL: http://forum.audiogames.net

creating status sounds in python

2014-07-06 Thread AudioGames . net Forum — Development room : frastlin via Audiogames-reflector
creating status sounds in python Hello,I would like to know how NVDA controls and creates its little beep sound for mouse movement and status reports?I would like to put something similar in one of my games to indicate HP, but dont want to have 100 .ogg files unless I really have to.I