• (2 Pages)
  • +
  • 1
  • 2

Visualizing sound from the microphone

#16 dinashehada  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 26-January 14

Posted 26 January 2014 - 03:55 AM

and where exactly in the code are changing recorded bytes into fft ? what should I do if I want to display the raw signal as recorded?? please help me I am very new to the canvas concept T.T
Was This Post Helpful? 0
  • +
  • -

#17 albinf  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 08-March 14

Posted 08 March 2014 - 04:10 AM

View PostEndLessMind, on 03 December 2013 - 05:36 AM, said:

It is on it's way :)/>/>/>


Hi EndLessMind, can you please send me the fixes too?(my mail id is ersi8906@hotmail.com) i'm running the app in my nexus 5 but it doesn't even start. when i run, it just blocks...
thanks in advance
Was This Post Helpful? 0
  • +
  • -

#18 albinf  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 08-March 14

Posted 11 March 2014 - 04:10 AM

View Postdinashehada, on 26 January 2014 - 03:46 AM, said:

Hi Thank you,
but I have a comment Iam trying this on a nexus 4 but the output signal does not seem to look like a sound wave it's very different and i was wondering how can I make it a little slower or make the (duration) of the visualizer larger so the signal would be clearer


The same issue in my nexus 5..did you solve it??
Was This Post Helpful? 0
  • +
  • -

#19 albinf  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 08-March 14

Posted 12 March 2014 - 09:09 AM

View PostEndLessMind, on 08 December 2012 - 03:08 PM, said:

      int BuffIndex = (mBuffer.length / 2 - paramCanvas.getWidth()) / 2;
      int mBuffIndex = BuffIndex;



???
Why do you initialize the BuffIndex this way?
Initializing this way I find an ArrayIndexOutOfBoundException in

int StartBaseY = mBuffer[(mBuffIndex-1)] / scale;



Any idea??
Was This Post Helpful? 0
  • +
  • -

#20 EndLessMind  Icon User is offline

  • These are the droids you're looking for
  • member icon

Reputation: 212
  • View blog
  • Posts: 1,127
  • Joined: 13-March 09

Posted 12 March 2014 - 10:21 AM

View Postdinashehada, on 26 January 2014 - 10:55 AM, said:

and where exactly in the code are changing recorded bytes into fft ? what should I do if I want to display the raw signal as recorded?? please help me I am very new to the canvas concept T.T


For this visualization you don't need FFT, we are working with raw data.

View Postalbinf, on 08 March 2014 - 11:10 AM, said:

View PostEndLessMind, on 03 December 2013 - 05:36 AM, said:

It is on it's way :)


Hi EndLessMind, can you please send me the fixes too?(my mail id is ersi8906@hotmail.com) i'm running the app in my nexus 5 but it doesn't even start. when i run, it just blocks...
thanks in advance



View Postalbinf, on 11 March 2014 - 11:10 AM, said:

View Postdinashehada, on 26 January 2014 - 03:46 AM, said:

Hi Thank you,
but I have a comment Iam trying this on a nexus 4 but the output signal does not seem to look like a sound wave it's very different and i was wondering how can I make it a little slower or make the (duration) of the visualizer larger so the signal would be clearer


The same issue in my nexus 5..did you solve it??


I've attached the code with the fix in this post.
I can't remember what the problem where, but i think i fixed it (can't remember that either)

View Postalbinf, on 12 March 2014 - 04:09 PM, said:

View PostEndLessMind, on 08 December 2012 - 03:08 PM, said:

      int BuffIndex = (mBuffer.length / 2 - paramCanvas.getWidth()) / 2;
      int mBuffIndex = BuffIndex;



???
Why do you initialize the BuffIndex this way?
Initializing this way I find an ArrayIndexOutOfBoundException in

int StartBaseY = mBuffer[(mBuffIndex-1)] / scale;



Any idea??


Yeah, the code is not perfect.
Wrote it in like 2 hours.
Check the attached project, there should be some fixes in there, but can't remember exactly which.


and to everyone, sorry for the late response.

Attached File  Tutorial Sound Visualizer.zip (1.39MB)
Number of downloads: 771

This post has been edited by EndLessMind: 12 March 2014 - 10:22 AM

Was This Post Helpful? 0
  • +
  • -

#21 albinf  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 08-March 14

Posted 17 March 2014 - 06:43 AM

View PostEndLessMind, on 12 March 2014 - 10:21 AM, said:

Yeah, the code is not perfect.
Wrote it in like 2 hours.
Check the attached project, there should be some fixes in there, but can't remember exactly which.


and to everyone, sorry for the late response.

Attachment Tutorial Sound Visualizer.zip

Thanks EndLessMind..this helps a lot
Was This Post Helpful? 0
  • +
  • -

#22 punkrulz29  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 20-August 15

Posted 20 August 2015 - 11:06 PM

Hey, I am using this code to show visualization from mic and it works perfectly, but when I try to save it to my phone with a .pcm file. It's empty, I am writing the buffer you read from the audio recorder but it doesn't seem to work. Can you send me the code with which I can record audio while it shows visualization. Thanks in advance and my email id is madgenius21@gmail.com
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2