Message Boards Message Boards

2
|
8825 Views
|
9 Replies
|
9 Total Likes
View groups...
Share
Share this post:

How to capture current microphone data?

Posted 10 years ago

How to capture current microphone data, just like the function of "CurrentImage [] ".

For example:

Dynamic [x = CurrentImage []; EdgeDetect [x, 3]] 

But not the function of "SystemDialogInput ["RecordSound"]"

POSTED BY: Xuan Li
9 Replies

If any Wolfram developers are reading this, they should consider adding this functionality.

I'd really like to sample sound in real time, process it, and output the result to the sound out port in real time. There are apps that do this, but with Mathematica, I'd be able to do a lot more sophisticated manipulation than I could with those programs.

Trying to implement this functionality is the only reason I keep XCode around.

george

Posted 10 years ago

Actually, I don't know how to solve this question according to your answer.

Is it only solved in Mac OS, If this question can be solved. What about MS OS?

POSTED BY: Xuan Li

I don't know how to solve it either. Most of my coding when I was working had nothing to do with sound. However, the APIs for the sound unit in OS X looks pretty straight forward, and I can call Mathematica code from within c using MathLink. Provided that latency is not too big an issue, it should not be that hard to wrap the mathematic code is a suitable c (objective c, c++, Swift) wrapper. Since this will not be commercial code, the GUI can simply make use of the standard widgets.

What I want to do is to take the sound import, create a suitable output — which may have a delay of several seconds — and output the sound in real time. The bulk of the manipulation will take place in Mathematica/Wolfram Language.

I don't do Windows, but I think that the same thing could be done with that OS.

I will raise this issue at the WTC next week. Last year, I was told that audio processing would eventually be on a par with video processing, so I think it is on Wolfram's radar. With so much going on, it might take a bit of nudging to get the project moved up the queue, though.

I'm working on something else right now, but I will get to real-time sound processing using Mathematica eventually. If I get something working, I will post on Wolfram Community.

geo3rge

Posted 10 years ago

Thanks for your answer in Include so many words, and hope you have some important progress.

POSTED BY: Xuan Li
Posted 10 years ago

Thanks for your answer in Include so many words, and hope you have some important progress.

Excuse me. In fact, the user "Updating Name"'s reply is mine, but I don't know why my user name is not used for my reply.

POSTED BY: Xuan Li

There's no built-in function for this. I can imagine that it would be possible to hack a solution somehow, but it would probably be OS specific

POSTED BY: Sean Clarke
Posted 10 years ago

All right, It may be a no answers question. I'll consider about it with another way. Thank you ^_^

POSTED BY: Xuan Li

Hi,

on a Mac this command brings up a dialog to record from the microphone:

SystemDialogInput["RecordSound"]

Why is it you do not want this command? What is it you want to achieve? Is it that you want the playback in "real time"?

Cheers,

Marco

POSTED BY: Marco Thiel
Posted 10 years ago

Thanks for your answer. What I want is similar with playback in "real time".

Because it always brings up a windows and I have to select two options, when I use the function "SystemDialogInput["RecordSound"]". This is too annoying. Actually, I want to evaluate the microphone data every second. So that, I can get the tone of the sound in "real time".

Xuan

POSTED BY: Xuan Li
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract