Page 1 of 1

A bad case of the Clap

Posted: Thu Apr 11, 2019 8:22 am
by richmond62
I have 2 Edison robots in my school, and I will be using them this summer
in LiveCode programming courses by setting emulation exercises to
the pupils.

https://meetedison.com/

The Edison is programmable by running it over a series of barcodes:

https://meetedison.com/barcodes/

One of these barcodes intialises Edison's sound detector so that it changes direction
when it "hears" a single clap, and stops when it "hears" a double clap.

So . . . .

If I have a microphone connected to a computer (tough call, that one), is there a way
I can get LiveCode to "listen"?

Re: A bad case of the Clap

Posted: Thu Apr 11, 2019 10:12 am
by richmond62

Re: A bad case of the Clap

Posted: Thu Apr 11, 2019 1:46 pm
by dunbarx
There is a gadget that can inform the computer of a sound. It is at:
https://www.bkohg.com/interfaces_e.html

This has both digital and analog inputs and outputs, and a framework for LC. It is easy and fun. I have used it to control stuff and respond to stuff. It is not cheap.

Craig

Re: A bad case of the Clap

Posted: Thu Apr 11, 2019 5:29 pm
by richmond62
I don't know about that . . .

However Audacity

[ https://www.audacityteam.org/]

"just" picks up whatever comes into my microphone with no highly expensive boxes.

And what you offered, Craig, was nothing more than a highly expensive box.

Re: A bad case of the Clap

Posted: Thu Apr 11, 2019 6:23 pm
by dunbarx
Richmond.

You get what you pay for. 8)

The expensive box is a hobbyist paradise. I used four of them on an outside project. I am about to use another to control an in-house machine.

Craig

Re: A bad case of the Clap

Posted: Thu Apr 11, 2019 6:43 pm
by FourthWorld
For systems with either built-in mics or mics attached via USB, OS APIs provide access to those audio data streams.

This can be done in LC Builder, using the same APIs Audacity and other audio software use.

Re: A bad case of the Clap

Posted: Thu Apr 11, 2019 7:19 pm
by [-hh]
FourthWorld wrote:
Thu Apr 11, 2019 6:43 pm
For systems with either built-in mics or mics attached via USB, OS APIs provide access to those audio data streams.
This can be done in LC Builder, using the same APIs Audacity and other audio software use.
WOW, this doesn't sound like forever repeated promises. I really wonder how this could be done with the current state of LC Builder. Could you please outline which APIs to use and how to do that?

Re: A bad case of the Clap

Posted: Thu Apr 11, 2019 7:32 pm
by richmond62
Maybe I'm a steaming nit, but, if SCRATCH can lever sound input . . .

https://www.edscratchapp.com/#
-
Screenshot 2019-04-11 at 21.31.27.png

Re: A bad case of the Clap

Posted: Thu Apr 11, 2019 8:14 pm
by FourthWorld
[-hh] wrote:
Thu Apr 11, 2019 7:19 pm
FourthWorld wrote:
Thu Apr 11, 2019 6:43 pm
For systems with either built-in mics or mics attached via USB, OS APIs provide access to those audio data streams.
This can be done in LC Builder, using the same APIs Audacity and other audio software use.
WOW, this doesn't sound like forever repeated promises. I really wonder how this could be done with the current state of LC Builder. Could you please outline which APIs to use and how to do that?
I don't mind being corrected where the facts demonstrate otherwise. LC Builder is described as being able to handle C, C++, and other APIs. Which ostensibly-supported APIs have you had difficulty using from LC Builder?

Re: A bad case of the Clap

Posted: Thu Apr 11, 2019 8:17 pm
by FourthWorld
richmond62 wrote:
Thu Apr 11, 2019 7:32 pm
Maybe I'm a steaming nit, but, if SCRATCH can lever sound input . . .

https://www.edscratchapp.com/#
-
Screenshot 2019-04-11 at 21.31.27.png
Yes, that OSes provide low-level APIs for such things is well known. As with Scratch, Audacity, and pretty much anything else that provides a GUI for accessing those capabilities, someone wrote low-level code to interface with those low-level APIs.

While we wait for -hh to describe why he feels LC Builder cannot access such APIs, we can also consider the externals interface, designed for this role in all xTalks since HC, and well demonstrated to be useful for such tasks.

Re: A bad case of the Clap

Posted: Thu Apr 11, 2019 10:05 pm
by [-hh]
Fourthworld wrote:I don't mind being corrected where the facts demonstrate otherwise ... Which ostensibly-supported APIs have you had difficulty using from LC Builder?
This is ridiculous. I ask you to (at least) outline that you claim facts and now I should name my difficulties with that non-facts? Deliver content ...
Fourthworld wrote:LC Builder is described as being able to handle C, C++, and other APIs.
Who says this if not you and where are the examples for that? Deliver content ...
TMHO such a general claim is, except for *some very special examples*, not reality but far future.

Re: A bad case of the Clap

Posted: Thu Apr 11, 2019 10:21 pm
by FourthWorld
[-hh] wrote:
Thu Apr 11, 2019 10:05 pm
Fourthworld wrote:I don't mind being corrected where the facts demonstrate otherwise ... Which ostensibly-supported APIs have you had difficulty using from LC Builder?
This is ridiculous. I ask you to (at least) outline that you claim facts and now I should name my difficulties with that non-facts? Deliver content ...
Fourthworld wrote:LC Builder is described as being able to handle C, C++, and other APIs.
Who says this if not you and where are the examples for that? Deliver content ...
TMHO such a general claim is, except for *some very special examples*, not reality but far future.
I did not volunteer to research the relevant APIs, or write the code needed to work with them.

I delivered the only thing I offered: a reminder that LC Builder is described as suitable for the task.

If you have no experience suggesting otherwise, perhaps what it says on the tin may be true.

I don't mind being wrong when the facts demonstrate otherwise. But in the absence of anything demonstrating that the advertised purpose of LC Builder cannot be used for this task, I'm at a loss to try to determine how to satisfy you.