-
please help me!~~
i have to finished this project
at least next week
can i play sound midi on nokia series 40?
(series 40 is almost 4-poly isn't it?)
if i can that how to play pholyphonic sound on nokia series40?
if anyone has example code for play sound nokia series40
if you have plz send to e-mail(returnti@hotmail.com)
-
You can't use J2ME to play MIDI on series 40 phones. And you can't use it to play polyphonic sound either.
With J2ME series 40 phones only support the ringtone format (Sound.FORMAT_TONE).
You can use the Nokia Developer's Suite to transform MIDI into the appropiate format, and then import the result into your application.
To initialize the sound:
[code]
import com.nokia.mid.sound.Sound;
//...
InputStream soundStream = this.getClass().getResourceAsStream("/intro.txt");
byte[] soundData = new byte[FILE_SIZE];
soundStream.read(soundData,0,soundData.length);
Sound mySound = new Sound(soundData,Sound.FORMAT_TONE);
mySound.init(soundData,Sound.FORMAT_TONE);
[/code]
Then playing it is just a matter of calling the play() method:
[code]
mySound.play(numberOfLoops)
[/code]