Beat detection


  • Posts: 39

« Last Edit: April 17, 2018, 07:59:34 am by gamecorp »
Selling Games in flash its like eating a Donut. Selling them In Mobile its like eating a Donut with Jetpack!.


  • Posts: 713
I can't view that page at the moment because of a firewall, but as I said about detecting pitches, if I knew HOW to get the information about the song (what does the sound "look" like at some known time?), I might be able to write an algorithm.  I haven't looked extensively at what a beat "looks" like, but I would assume that music can be viewed as something between a saw (rectangular curve) wave and a trig (smooth curve) wave, where beats happen at the zeroes.


  • Posts: 713
It says that it should generate .SWF files in some folder, but I can't imagine how to do that in Stencyl.  I do think that it would be easy to do in plain Haxe (that one basic step), and then copy paste into Stencyl's directories or whatever.  I think that it would probably require an import statement in the actual Stencyl game, but those are generally easy.  Then the only thing would be getting the actual code into Stencyl, which shouldn't be too hard.  I think that it doesn't need to be "translated", however it shouldn't be hard to make blocks for each command using functions or something.

I haven't had much success with using random code in Stencyl though, but I think I have a better understanding of code now.


  • Posts: 713
wow your reply , gived me more hope of the project i`m working on~ cause i really dont want to do html5 game , on other engine i use! it reacts ba don phones and other platforms! il try search more on this matter and see how to import it in stencyl! thanks for your help! your awsome!:) :*

I heard that HTML5 isn't as good for games, especially with Haxe.  Anyways, you wouldn't make a mobile game in HTML5; you would use objective C (or some relative of C) for ios and Java for Android (if I remember correctly).

I might also look into this because I have an interest in musical programming (although I'm not really musical).  I think that audio is underdeveloped compared with visuals.

I did look around the web and rediscovered the second page you linked to, which is "PitchDetectors".  I have a slightly better understanding of everything now.  FFT (and DFT) are things that can work with audio, but they wouldn't be as good as "autocorrelation".  PDA or Pitch detection Algorithm seems like a good buzzword as well.

I also read a bit more of the code.  I think that it's from a Flash build or something, because some variable said so.  It might not be compatible for anything else, or maybe you just need to find some libraries and change a few variables or whatever.

I guess it's debatable if I actually have a better understanding or if I'm just as confused as before.

« Last Edit: March 31, 2014, 09:05:15 am by gamegirlxl »