Android Drum machine
-
- KVRist
- 154 posts since 15 Feb, 2012
Hello!
I just developed a drum sequencer for android. I am pretty desperate for people to try it for 5 min and give feedback.
This is because on certain device the timing is crisp and good. But on other devices the timing has a sway in it. So it is much easier to figure out what the problem is (android version, or maybe buffer size), if people try it and give feedback.
If you have time I would really appreciate it. Just sequence in a row a 16th notes, and check if there is sway. Then let me know if there is or not, and tell me your device.
There is even an feedback feature built into app.
Thanks so much!!!!
https://play.google.com/store/apps/deta ... com.mb8008
I just developed a drum sequencer for android. I am pretty desperate for people to try it for 5 min and give feedback.
This is because on certain device the timing is crisp and good. But on other devices the timing has a sway in it. So it is much easier to figure out what the problem is (android version, or maybe buffer size), if people try it and give feedback.
If you have time I would really appreciate it. Just sequence in a row a 16th notes, and check if there is sway. Then let me know if there is or not, and tell me your device.
There is even an feedback feature built into app.
Thanks so much!!!!
https://play.google.com/store/apps/deta ... com.mb8008
-
- KVRist
- 367 posts since 20 Aug, 2004 from Sydney, Australia
Don't really want to spoil your fantastic effort, but there is one glitch in your app...
You are trying to develop music production app on the wrong platform I'm afraid
You are trying to develop music production app on the wrong platform I'm afraid
-
musical android musical android https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=298141
- KVRist
- 251 posts since 5 Feb, 2013 from spain
Not in the wrong platform but maybe you should have chosen to develop something else or start to think where you want to take this as there is a lot of similar applications...
-
- KVRist
- 152 posts since 14 Jun, 2011
Hi Ap0C552
I've just checked it out, nice and simple.
What I notice is that the timing is out of sync.
Is it possible that you're using timers for the sequencer instead calculating the timing by the buffers? This would usually produce such a behavior.
I've just checked it out, nice and simple.
What I notice is that the timing is out of sync.
Is it possible that you're using timers for the sequencer instead calculating the timing by the buffers? This would usually produce such a behavior.
-
- KVRist
- Topic Starter
- 154 posts since 15 Feb, 2012
Hi Planeth! Thanks for taking the time!
In what way is the timing out of sync? On my device it is a sort of sway or hiccup once a bar or so. Is yours similar.
I am just learning the Android platform, and have zero experience programming audio code. I took the most simple approach possible. I used android SoundPool class. The code to determine when to play a sound is precise, the SoundPool class is not though. It is inunreliable. Obviously though, it is infinitely easier than the alternative.
The thing is, is that it plays wonderful and crisp on certain devices. So I am just trying to see what the majority it.
In what way is the timing out of sync? On my device it is a sort of sway or hiccup once a bar or so. Is yours similar.
I am just learning the Android platform, and have zero experience programming audio code. I took the most simple approach possible. I used android SoundPool class. The code to determine when to play a sound is precise, the SoundPool class is not though. It is inunreliable. Obviously though, it is infinitely easier than the alternative.
The thing is, is that it plays wonderful and crisp on certain devices. So I am just trying to see what the majority it.
-
- KVRist
- 152 posts since 14 Jun, 2011
Yes, that's what I notice, and as more samples you play as more you'll get the hickups.Ap0C552 wrote:In what way is the timing out of sync? On my device it is a sort of sway or hiccup once a bar or so. Is yours similar.
Actually, this exactly is the problem. When you use soundpool, the audio gets streamed by some other thread, which will never ever be in sync with your sequencer thread. Keep in mind that it's running in java, where usually nothing is in sync (i mean precise).Ap0C552 wrote:I used android SoundPool class. The code to determine when to play a sound is precise, the SoundPool class is not though. It is inunreliable. Obviously though, it is infinitely easier than the alternative.
The only proper way to sequence audio samples is to measure the time by the processed samples, or in other words by the audio buffers you're filling. Then send the final byte buffers to the AudioTrack class (when you're using java). E.g. when you process 192 samples in an environment that runs on 44100hz, you can calculate the passed time by 1000ms / 44100 * 192 = 4.354ms
I wrote my very first sequencer with soundpool as well a few years ago, which actually had exactly the same problem
-
- KVRist
- Topic Starter
- 154 posts since 15 Feb, 2012
So what you are saying is....you are the guy to badger with all my problems?! LOL.I wrote my very first sequencer with soundpool as well a few years ago, which actually had exactly the same problem
So I should look into developing it using the AudioTrack class?
- KVRian
- 755 posts since 25 Aug, 2009
My Note 8 is pretty steady. Sounds like it has a bit of swing to it on a stream of 16ths, but no major hiccups. I've provided an icy hawt 66kbps MP3 >.>
https://www.dropbox.com/s/a38jmdlrluf66 ... m16ths.mp3
https://www.dropbox.com/s/a38jmdlrluf66 ... m16ths.mp3
Meh.
-
- KVRist
- Topic Starter
- 154 posts since 15 Feb, 2012
-
- KVRist
- 152 posts since 14 Jun, 2011
Yes, if you want to use java, you should us the AudioTrack class.Ap0C552 wrote:So I should look into developing it using the AudioTrack class?
AudioTrack simply consumes a steady audio stream, which you must prepare in your main audio cycle. This means you must mix all the audio together before you pass it to the AudioTrack in form of a byte array. A pretty good resource for doing this stuff in java is http://www.jsresources.org/faq_audio.html
-
musical android musical android https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=298141
- KVRist
- 251 posts since 5 Feb, 2013 from spain
Hey planeth you are a good guy!
Feel bad for ripping on the guy for just making another sample/drum machine...
But of course I am the idiot!
Have to start somewhere.
Hope you forgive me Ap0C552...
Feel ashamed and will go and mope in a corner now!
Feel bad for ripping on the guy for just making another sample/drum machine...
But of course I am the idiot!
Have to start somewhere.
Hope you forgive me Ap0C552...
Feel ashamed and will go and mope in a corner now!
-
- KVRist
- 152 posts since 14 Jun, 2011
I think, at the bottom line, you're right about it, so don't be too harsh with yourself;)musical android wrote:Not in the wrong platform but maybe you should have chosen to develop something else or start to think where you want to take this as there is a lot of similar applications...
On the other hand, ... there were also already a bunch of synthesizer apps ... when I started with the VA-Beast synth. Competition is the best thing to raise the quality;)
-
- KVRist
- Topic Starter
- 154 posts since 15 Feb, 2012
I didn't know you were ripping me so it is all good. BTW where is the best forum for discussing developing audio software?
-
- KVRist
- 152 posts since 14 Jun, 2011
How about KVR audio?Ap0C552 wrote:I didn't know you were ripping me so it is all good. BTW where is the best forum for discussing developing audio software?
http://stackoverflow.com/ is also very good