Onset to Beat Detection? - audio

How do you determine which onsets are beats? I am using Spectral Flux for Note Onset Detection and a Running Mean for peak-picking/thresholding.
I am just working with the guitar instrument so the presence of percussions may not help with this. Any ideas?
Thanks!

EDIT: Wow...just realized this question is 3 years old...sorry to resurrect an old post.
My Master's thesis was in beat detection and the main advantage of my method over all other published methods of beat detection was in resolution, both in the time domain and frequency (beat) domain. You can find my thesis here. What it basically boils down to (after alot of filtering) is a comb-filter convolution. My code is an adaptation of this project, which contains Matlab files for you to see how it works.
My code (both in C++ and the Matlab port) is not publicly available due to possible copywrite issues with my university, but if you email me at dberm22[at]gmail[dot]com, I'd be more than willing to ahem::discuss my work with you.

Try using a beat tracking algorithm. Beat tracking is a distinct problem from onset detection.
I think there's a good algorithm in the Queen Mary plugin set for Sonic Visualizer. The plugins are open source, so you can have a look at the code to figure out how they work.
Or do a search on google scholar for "beat tracking". There are a number of effective approaches. Dan Ellis' is a good one to start with. It's intuitive, and there's code available in Matlab and Java.

Related

Sound detection of cutting woods

Im really new to machine Learning.I have a project to identify a given sound.(Ex: cutting wood)In the audio clip there will be several sound. What i need to do is recognise that particular sound from it. I red some articles about machine learning. But i still have lack of knowledge where to start this project and also I'm running out of time.
Any help will be really appreciated. Can anyone please tell me how to do this?
Can i directly perform template(algorithms) matching for a sound?
It's a long journey ahead of you and Stack Overflow isn't a good place for asking such a generic question. Consult help section for more.
To get you started, here are some web sites:
Awesome Bioacoustic
Comparative Audio Analysis With Wavenet, MFCCs, UMAP, t-SNE and PCA
Here are two small repos of mine related to audio classification:
Gender classification from audio
Kiwi / not-a-kiwi bird calls detector
They might give you an idea where to start your project. Check the libraries I am using - likely they will be of help to you.

Anyone knows about text-based emotion detection systems that offer a demo?

I recently finished work on my text-based emotion detection engine and I am looking for other existing working systems to compare with mine in order to know what should be improved and also report comparisons in an upcoming paper.
I have come across many companies claiming to do emotion detection from text but only this one offers a demo that I can use to compare with my system: http://www.o2mc.io/portfolio-posts/text-analysis-restful-api-language-polarity-and-emotion/ (scroll all the way down to see the "try it yourself" section).
Please notice that I am not looking for polarity classification, which is the simpler task of saying if a text is positive or negative. What I am looking for is for emotions (sadness, anger, joy, etc...). Does anyone here know about any company/university/person offering a demo to such system?
As a reference, here is the link to my own system's demo:
http://demo.soulhackerslabs.com/emotion/
Your help is very much appreciated.

How to compare spoken audio against reference recording - language learning

I am looking for a way to compare a user submitted audio recording against a reference recording for comparison in order to give someone a grade or percentage for language learning.
I realize that this is a very un-scientific way of doing things and is more than a gimmick than anything.
My first thoughts are some sort of audio fingerprinting, or waveform comparison.
Any ideas where I should be looking?
This is by no means a trivial problem to solve, though there is an abundance of research on the topic. Presently the most successful forms of machine learning in the speech recognition domain apply Hidden Markov Model techniques.
You may also want to take a look at existing implementations of HMM algorithms. One such library in its early stages is ghmm.
Perhaps even better and more readily applicable to your problem is HTK.
In addition to chomp's great answer, one important keyword you probably need to look up is Dynamic Time Warping (DTW). This is the wikipedia article: http://en.wikipedia.org/wiki/Dynamic_time_warping

VB6 Game Development

I am developing a game in VB6 (plz don't ask me why :) ).
The storyboard is ready and a rough implementation is underway.
I am following a "pure-software-rendering" approach. (i.e. no DirectX, no openGL etc.)
Amongst many others, the following "serious" problems exist:
2D alpha transparency reqd. to implement overlays.
Parallax implementation to give depth-of-field illusion.
Capturing mouse-scroll events globally (as in FPS-es; mapping them to changing weapon).
Async sound play with absolute "near-zero-lag".
Any ideas anyone. Please suggest any well documented library/ocx or sample-code.
Plz do suggest solutions with good performance and as little overhead as possible.
Also, anyone who has developed any games,
and would be open to sharing her/his code would be highly appreciated.
(any well-acknowledged VB games whose source-code i can study??)
UPDATE: Here is a screen shot of GearHead Garage.
This picture ought to describe what i was attempting in words above... :)
(source: softwarepod.com)
EGL25 by Erkan Sanli is a fast open source VB 6 renderer that can render, rotate, animate, etc. complex solid shapes made of thousands of polygons. Just Windows API calls – no DirectX, no OpenGL.
(source: vbmigration.com)
VBMigration.com chose EGL25 as a high-quality open-source VB6 project (to demonstrate their VB6 to VB.Net upgrade tool).
Despite that, and despite my opinion that VB6 is often criticised too harshly, I can't help thinking there must be better options for game development in 2010?
You may want to check out the Game Programming Wiki -- it used to be "Lucky's VB Game Site" (and we're talking a LONG time ago) but all of the content (VB5/6 centric) moved to the Wiki with the addition of other languages.
It appears that much of the legacy VB6 content is still available on the site.
Have a look at DxIce : http://gamedev.digiapp.com/
I think you will find no well-acknowledged written games in VB6 for precisely the reasons you state above.
It was not designed to be a high performance language. For that you NEED to use the graphics libraries (DirectX, OpenGL) you said you didn't want to use unless you want to BitBLT everything yourself using API calls which is probably not going to get what you need.
VB6 is interpreted, outdated, and I'd be surprised if it runs on Windows 7.
I think you need to seriously re-evaluate the methodology here.
For audio playback, I have used http://www.fmod.org/ in the past. This, and other libraries like BASS, are only free for non-commercial use. I also suggest avoiding the built-in multimedia playback object.

Major game components

I am in the process of developping a game, and after two months of work (not full time mind you), I have come to realise that our specs for the game are lacking a lot of details. I am not a professional game developper, this is only a hobby.
What I would like to receive help or advices for is this: What are the major components that you find in games, that have to be developped or already exists as librairies? The objective of this question is for me to be able to specify more game aspects.
Currently, we had specified pretty much only how we would work on the visual, completely forgetting everything about game logic (AI, Entities interactions, Quest logic (how do we decide whether or not a quest is completed)).
So far, I have found those points:
Physics (collision detection, actual forces, etc.)
AI (pathfinding, objectives, etc.)
Model management
Animation management
Scene management
Combat management
Inventory management
Camera (make sure not to render everything that is in the scene)
Heightmaps
Entities communication (Player with NPC, enemy, other players, etc)
Game state
Game state save system
In order to reduce the scope of this queston, I'd like it if you could specifically discuss aspects related to developping an RPG type of game. I will also point out that I am using XNA to develop this game, but I have almost no grasp of all the classes available yet (pretty much only using the Game component with some classes that are related to it such as GameTime, SpriteBatch, GraphicDeviceManager) but not much more.
You have a decent list, but you are missing storage (save load), text (text is important in RPGs : Unicode, font rendering), probably a macro system for text (something that replaces tokens like {player} with the player characters name), and most important of all content generation tools (map editor, chara editor, dialog editor) because RPGs need content (or auto generation tools if you need ). By the way have links to your work?
I do this exact stuff for a living so if you need more pointers perhaps I can help.
I don't know if this is any help, but I have been reading articles from http://www.gamasutra.com/ for many years.
I don't have a perfect set of tools from the beginning, but your list covers most of the usual trouble for RUNNING the game. But have you found out what each one of the items stands for? How much have you made already? "Inventory Management" sounds very heavy, but some games just need a simple "array" of objects. Takes an hour to program + some graphical integration (if you have your GUI Management done already).
How to start planning
When I develop games in my spare time, I usually get an idea because another game lacks this function/option. Then I start up what ever development tool I am currently using and try to see if I can make a prototype showing this idea. It's not always about fancy graphics, but most often it's more about finding out how to solve a certain problem. Green and red boxes will help you most of the way, but otherwise, use Google Images and do a quick search for prototype graphics. But remember that these images are probably copyrighted, so only use them for internal test purposes and to explain to your graphic artists what type of game/graphic you want to make.
Secondly, you'll find that you need to find/build tools to create the "maps/missions/quests" too. Today many develop their own "object script" where they can easily add new content/path to a game.
Many of the ideas we (my friends and I) have been testing started with a certain prototype of the interface, to see if its possible to generate that sort of screen output first. Then we build a quick'n'dirty map/level-editor that can supply us with test maps.
No game logic at this point, still figuring out if the game-engine in general is running.
My first game-algorithm problem
Back when I was in my teens I had a Commodore 64 and I was wondering, how do they sort 10 numbers in order for a Highscore? It took me quite a while to find a "scalable" way of doing this, but I learned a lot about programming too.
The second problem I found
How do I make a tank/cannon fire a bullet in the correct direction when I fly my helicopter around the screen?
I sat down and drew quick sketches of the actual problem, looked at the bullet lines, tried some theories of my own and found something that seemed to be working (by dividing and multiplying positions etc.) later on in school I discovered this to be more or less Pythagoras. LOL!
Years and many game attempts later
I played "Dune" and the later C&C + the new game Warcraft (v1/v2) - I remember it started to annoyed me how the lame AI worked. The path finding algorithms were frustrating for the player, I thought. They moved in direction of target position and then found a wall, but if the way was to complex, the object just stopped. Argh!
So I first sat with large amounts of paper, then I tried to draw certain scenarios where an "object" (tank/ork/soldier) would go from A to B and then suddenly there was a "structure" (building/other object) in the pathway - what then?
I learned about A-star pathfinding (after solving it first on my own in a similar way, then later reading about the reason for this working). A very "cpu heavy" way of finding a path, but I learned a lot from the process of "cracking this nut". These thoughts have helped me a lot developing other game algortimes over time.
So what I am saying is: I think you'll have to think more of:
How is the game to be played?
What does the user experience look like?
Why would the user want to come back to the game?
What requirements are needed? Broadband? 19" monitor with 1280x1024?
An RPG, yes - but will it be multi-user or single?
Do we need a fast network/server setup or do we need to develop a strong AI for the NPCs?
And much more...
I am not sure this is what you asked for, but I hope you can use it somehow?
There are hundreds of components needed to make a game, from time management to audio. You'll probably need to roll your own GUI, as native OS controls are very non-gamey. You will probably also need all kinds of tools to generate your worlds, exporters to convert models and textures into something suitable for your game etc.
I would strongly recommend that you start with one of the many free or cheap game engines that are out there. Loads of them come with the source code, so you can learn how they have been put together as you go.
When you think you are ready, you can start to replace parts of the engine you are using to better suit your needs.
I agree with Robert Gould's post , especially about tools and I'd also add
Scripting
Memory Management
Network - especially replication of game object states and match-making
oh and don't forget Localisation - particularly for text strings
Effects and effect timers (could be magical effects, could just be stuff like being stunned.)
Character professions, skills, spells (if that kind of game).
World creation tools, to make it easy for non-programmer builders.
Think about whether or not you want PvP. If so, you need to really think about how you're going to do your combat system and any limits you want on who can attack whom.
Equipment, "treasure", values of things and how you want to do the economy.
This is an older question, but IMHO now there is a better answer: use Unity (or something akin to it). It gives you 90% of what you need to make a game up front, so you can jump in and focus directly on the part you care about, which is the gameplay. When you run aground because there's something it doesn't do out of the box, you can usually find a resource in the Asset Store for free or cheap that will save you a lot of work.
I would also add that if you're not working on your game full-time, be mindful of the complexity and the time-frame of the task. If you'll try to integrate so many different frameworks into your RPG game, you can easily end up with several years worth of work; maybe it would be more advisable to start small and only develop the "core" of your game first and not bother about physics, for example. You could still add it in the second version.

Resources