Is it possible?

18 views
Skip to first unread message

Ben Rousch

unread,
Sep 5, 2013, 11:43:48 AM9/5/13
to GR Mobile Dev
I have an idea for a silly Android app, but I don't know if it's
possible. I need a background service that monitors the media streams
being played by any app (music especially) and reacts to certain
frequencies and volumes of sounds as they are played. Note that I do
not want to monitor the microphone, but the output sounds being
played.

I tried Googling to see if it's possible, but all I've found are
solutions to audio recording from the microphone. Does anyone know if
this is possible before I think about it further?

--
Ben Rousch
bro...@gmail.com
http://clusterbleep.net/

Todd Fortier

unread,
Sep 5, 2013, 11:48:42 AM9/5/13
to grmob...@googlegroups.com


--
You received this message because you are subscribed to the Google Groups "GR Mobile Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grmobiledev...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ben Rousch

unread,
Sep 5, 2013, 12:09:17 PM9/5/13
to GR Mobile Dev
Actually I think gets me closer to what I need.
http://developer.android.com/reference/android/media/audiofx/Equalizer.html

Shai Levit

unread,
Sep 5, 2013, 12:23:16 PM9/5/13
to grmob...@googlegroups.com
So I think you need a program that takes the music sound waves (Like a Fourier Transform), prior to the output, like a filter in-between - then analyses the frequencies and such and has the capabilities to set certain thresholds as markers.

I would think a very fancy music analysis sound wave program / mixing should have that capability, you just need to figure out how to tie into this, via a possible API - otherwise you are relying on the Mic.

Ben Rousch

unread,
Sep 5, 2013, 1:17:22 PM9/5/13
to GR Mobile Dev
Right, I need to do exactly as you describe, but I need to do it in
the background so no matter what music app someone is using it still
works. I imagine this would primarily be used when listening to music
with headphones, so the mic is right out.

Mike Langdon

unread,
Oct 3, 2013, 8:46:27 AM10/3/13
to grmob...@googlegroups.com
The standard method for using libpd ( https://github.com/libpd/pd-for-android ) involves running a background service. If it's possible on the OS, libpd would be a pretty high level way to do it without getting too deep into sound physics.

My guess is that the Dalvik VM is going to isolate you from to the audio out of other apps, but it's possible I'm wrong. This is where I would start reading to answer the question for myself: http://developer.android.com/reference/android/media/AudioManager.html

Ben Rousch

unread,
Oct 3, 2013, 10:39:44 AM10/3/13
to GR Mobile Dev
I don't think Pd is the right way to go. I only need to "listen" to the audio and then perform non-audio actions based on characteristics of the sound being played. My actions do not include emitting sounds or changing the audio at all. What I want to do is similar to a visualizer based on the audio played by another app.

I think you're right about being isolated from other apps' audio, but it looks like the Equalizer class might let me get what I need. http://developer.android.com/reference/android/media/audiofx/Equalizer.html


On Thu, Oct 3, 2013 at 8:46 AM, Mike Langdon <michael...@gmail.com> wrote:
The standard method for using libpd ( https://github.com/libpd/pd-for-android ) involves running a background service. If it's possible on the OS, libpd would be a pretty high level way to do it without getting too deep into sound physics.

My guess is that the Dalvik VM is going to isolate you from to the audio out of other apps, but it's possible I'm wrong. This is where I would start reading to answer the question for myself: http://developer.android.com/reference/android/media/AudioManager.html

--
You received this message because you are subscribed to the Google Groups "GR Mobile Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grmobiledev...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Mike Langdon

unread,
Oct 3, 2013, 2:59:33 PM10/3/13
to grmob...@googlegroups.com
Pd has powerful audio analysis tools as well as all the noise making. I've implemented a very simple visualization with Pd on Android (basically an oscilloscope). There are also pre-built beat and pitch analysis tools. You can output data (e.g., wave-form arrays) from Pd just as easily as sound. I can send you some relevant patches, though my Android-side code is all in Java.
Reply all
Reply to author
Forward
0 new messages