I know cocos2d could play wav and ogg, but I really want to play midi music. Can any one help me? Thanks a lot.
How to play midi sound in cocos2d?
(11 posts) (6 voices)-
Posted 2 years ago #
-
/bump.
I haven't heard of ipod/iphone having standard midi instrument samples incorporated.
But, please someone proves me wrong cause I'd love midi playback functionality!Posted 2 years ago # -
Fmod has this capability but costs $500 US per application to use on the iPhone.
Posted 2 years ago # -
Now, that's a turn off :/
Posted 2 years ago # -
You can always make your own class to read midi and play it with your samples. If you don't need all those pedals, controllers, sound ornaments, etc. but simple sound start, pitch and sound end parameters it wouldn't be difficult to parse midi. But it looses the whole concept of midi: small files played with hardware instruments, because iPhone doesn't have hardware instruments (as I am aware of). So at the end you'll have small midi file on your iPhone but large bundle of sample instruments. Looks like it's better for you to record that midi on your comp and export it as wav or mp3 to iPhone...
Thoguh, I don't know how fmod handles this, do they have sample instruments in their framework or they generate sounds on the fly.
Btw, in my app Farthoven http://www.4iphone4.me/Farthoven/ (don't laugh for farting, it was my first app, and I had a whole different idea for it but didn't have knowledge at that time to make it) I parsed simple midi data for songs. Though, first I exported raw midi data on my comp as text file and then parsed that text file inside app...
Posted 2 years ago # -
"don't laugh" - how can you not? Its FARThoven. Genius! I will just assume that it has made you your first million dollars and you now program on some tropical island somewhere working on your 2nd mill - and I will hear *nothing* to the contrary. Farthoven - HA!
Posted 2 years ago # -
Actually you're wrong. I made 2 mill from it and now I am high on mountains because I was bored on tropical island. But I am struggling now to make that 3rd million. Grrr...
Btw did you check Farthoven? Even it's about farting I think it's very well designed/programmed app and fully functional :) My fist idea with that app would still be top one if I could only manage to make it. I'll contact you soon to tell you, because I trusts you, and maybe we can make that 3rd million together :)
Posted 2 years ago # -
lol. genius name! If anything Farthoven looks TOO professional for a novelty app!
Posted 2 years ago # -
Well, I've just downloaded the lite version to test my fart composition skills first. Lets see how I get on...
Posted 2 years ago # -
Lol, happy farting!
Posted 2 years ago #
Reply
You must log in to post.