Select sound files in xcode - ios

I am very new to Objective C, and I've been searching for an answer to my question, but no luck. I have a game app that plays sounds that I have created, and it plays them randomly with each connection in the gameplay. I would like to create different sound "packs" that the user can select very simply by pressing a button. For example, the user could choose from electric piano, or classical piano, or xylophone, etc. Currently, my sound files are set up as Sound1.wav, Sound2.wav, etc.
What is the best way to approach this? Thank you for being patient with me.

You should probably setup a naming convention as such sound_0_1 where the first 0 is pack 0 and 1 is for the first sound in pack 0. These credentials are not exclusive to Objective-C, so any methodology from other programming languages can be applied using their ideals as well.

Related

How to play sounds in orbeon

A colleague is trying to prepare a survey with limesurvey.
The survey is for the civil protect and among other things asks if the people knows the meaning of the different wailing tones of a siren.
I cite from wikipedia:
A civil defense siren is a siren used to provide emergency population warning of approaching danger and sometimes to indicate when the danger has passed....
By use of varying tones or on/off patterns of sound, different alert conditions can be signaled
But he told me that for playing sounds with limesurvey a browser must have installed the flash player. This isn't an option for him.
So he asked me, if such a survey would be feasible with orbeon.
The idea is, that the form has several buttons and several dropdowns.
Clicking a button a sound is played and in a corresponding dropdown one can select the meaning of the sound.
Is it possible to play sounds with orbeon forms?
The good news is that web browsers no longer need Flash Player to play sounds (see Can I use).
Now in order to play sounds with Orbeon Forms, you need to create a custom component able to call those APIs and play the sounds. This is doable by following the documentation but it involves some programming.

Xcode Mass Multiplayer (Not What You're Probably Thinking)

Okay so I would like to make a game, I'm trying not to divulge what it is but it requires anyone of a certain level in the game who is currently playing to be able to see each other in a sort of MMO style but not really.
For example:
Suppose I have players Bob, Mary, and Rob. Suppose that Bob is level 4, Mary is level 6 and Rob is also level 4. These would be shown in leaderboards by the way. What I would like is for Bob and Rob and anyone else who is level 4 AND CURRENTLY PLAYING to see each other in a sprite kit seen. I would like Mary to be off with other level 6's.
I have little idea of where to start with this. So my questions are:
Should I even use Xcode or would I be better off using Unity?
Does GameCenter have the capabilities for this or would I need to use Parse or something like that
And also, could you please point me in the right direction as far as the concepts of how this would work?
If you can answer any of this that would be AWESOME!!!!! If not that's cool too! Thanks in advance!
Xcode is an IDE and Unity is a Game-Engime.
If you need to create your own game since the beginning, you should use an IDE. But this is really LONG and sometime difficult. With a Game-Engime, a big part of the game is already programmed (physic, 3D animations...) so you can focus your time for program your game.
Game Center is for share a game or a score. Not played online.
For play online, you should create your own server.
Do you know how to program? Are you good in 2D/3D?
For create an MMO game, you must be logic.
First, you should create a client.
The client is the game
He contain the sounds, the graphics, the scripts...
Second, you should create a server.
The server is connected to all clients.
He contains the databases (Accounts, characters, HP, gold...)
So where started?
When a character move (from the client A), he send his new position to the server. The server send this position to all the client. So the client B know where is the character of the client A and can draw a tileset (in your example, you can draw the tileset only if the boolean sameLevel is true).
Take a look at the sockets:
http://www.linuxhowtos.org/C_C++/socket.htm
http://www.nullterminator.net/winsock.html
https://stackoverflow.com/questions/tagged/sockets%20c%2b%2b
https://stackoverflow.com/questions/tagged/sockets+c
Hint - I have already answer at some similar questions. Even if the programming language are sometime different, I give you the link, the logic is always the same so it can maybe help you:
Creating a Multiplayer game in python
Multiplayer game in Java. Connect client (player) to game that was created by other client
How would an MMO deal with calculating and sending packets for thousands of players every tick for a live action game?

Record a playing song

I'm totally new with audio framework. I would like to have a feature in my app.
When playing a clip/song, I want to record that song at the same time. I think there are two cases here. It's the best if I can record what is playing (the identical version).
Otherwise, if it's impossible, can I record everything (including noise from outside world) at the same time?
Finally I come up with the second approach which records everything including noise from the outside world. It works but I'm not sure it'll be approved by Apple.

Creating an auto-DJ app

I'm trying to create an 'auto dj' application that would let smartphone users select a playlist of songs, and it would create a seamless mix for playback. There are a couple factors involved in this: read a playlist of audio files, calculate their waveforms/spectrums, determine the BPMs, and organize the compatible songs in a new playlist in the order that they will be played (based on compatible tempos & keys).
The app would have to be able to scan the waveform of a song and recognize the beginning of the 'main' part of the song (skipping slow intros/outros). I also imagine having some effects: filtering, so it can filter the bass out of the new track being mixed in, and switch the basses at an appropriate time. Perhaps reverb that the user could control as well.
I am just seeing how feasible of a project this is for 3-4 busy college students in the span of ~4 months. Not sure if it would be an Android or iOS app, or perhaps even a Windows app. Not sure what language we would use (likely Python or Java); whichever has the most useful audio analyzing libraries. Obviously it would work better for certain genres of music (house, trance), but I'd still really like to try to create this.
Thanks for any feedback
As much as I would like to hear a more experienced person's opinion on this, I would say based on your situation that it would be a very big undertaking. Since it sounds like you don't have experience using audio analyzing libraries/ programs you might want to start experimenting with those and most of them are likely going to be in C/ C++, not java/ Python. Here are some I know of but I would recommend do your own research.
http://www.underbit.com/products/mad/
http://audacity.sourceforge.net/
It doesn't sound that feasible in your situation but that just depends on your programming/project experience and motivation to create it.
Good luck

Step through each recently created element in Rails?

I'm creating an admin tool for a project where I create an Event, then create multiple Speakers (on one page), then need to create multiple Talks for each Speaker.
Rather than have all the Speakers listed on one page after creation, and then put multiple Talks against each Speaker (which looks crazy due to all the input boxes), I'd like to gradually step through each Speaker, create the Talks for each Speaker, then move on to the next Speaker until all Speakers have been completed.
What's the best way to go about achieving this?
Do I need to create an array of all the created Speakers, then step through it somehow? Or set a flag on each created Speaker, so that once the user has clicked 'save talks' it finds the next speaker (in this event) that hasn't been saved?
I suggest reading this:
http://www.digitalmediaminute.com/article/1816/top-ruby-on-rails-tutorials
and afterwards:
http://www.sapphiresteel.com/How-To-Create-a-Ruby-On-Rails-Blog
after that lecture you will bea ble to solute that Problem in a "best-practise" Way.
Since your Question is a basic one i would like to show you that Tutorials.
No offense...but i think this lecture helps you more.
Further to my comment to bastianneu, I've spent about 10 minutes with AASM (http://github.com/rubyist/aasm) and have got it doing exactly what I needed.
Sometimes I guess you need to type out your question to properly clear it in you brain :)

Resources