Can you access the microphone/use it?

If so, how? If not can this be implemented?

@warspyking please, search for before ask anything. It’s impossible to use microphone with Codea.

@ericky Why is it? Can’t it be implemented!

@erickyamato Well?

@warspyking I’m sure it can be implemented but it hasn’t yet. Maybe in a future release of Codea.

@dave1707 Sounds promising, when do you think?

@warspyking I’m not the one adding functions to Codea. It will be added (maybe) when the team has time to add it. Till then you’ll just have to wait like the rest of us for any new functions. I don’t know how well you know Lua or Codea, but there are plenty of other thing to learn in the mean time.

@dave1707 I am new to codea, I have limited knowledge if codea, however I have background in Lua. I use Touch Lua on my iPod (Quick Question by the way, is there any plans for iPod codea?) and I use Lua all the time on www.roblox.com.

Oh and who are on “the team”?

@warspyking When you start the Codea program, at the bottom of the screen in the middle is an icon. Tap that and it will give you plenty of info on Codea.

There are very few uses for the microphone, I don’t see it being implemented anytime soon.

@Crumble Actually, there can be quite a few uses for the microphone. I’d like to see the microphone implemented, but there are a lot of other things I could use before the microphone.

If microphone access was added, you’d probably want to be able record it in a way that could be played back, or maybe even altered. You’d also probably want speech-to-text. All of that is extremely hard to make and would require a lot of code and take a long time

It may sound ridiculous but this would be nice…

local sound = microphone:record(5000)

sound:playback()

local sound2 = sound:reverse()

sound2:playback()

print(tostring(sound))

Please don’t criticize if it looks terrible, just started in Codea :smiley:

@warspyking What if you didn’t know how long you were going to record? And would you expect the code to just freeze as it records? What about something like this?

microphone.startRecording()
tween.delay(5, function()
    local rec = microphone.stopRecording()
    rec.volume = 0.5
    rec.pitch = 1.1
    rec.rate = 0.7
    rec.time = 0.5 --duration into sound - seconds or percentage?
    sound(rec)
end)
microphone.startRecording()
tween.delay(5, function()
    microphone.stopRecording()
    local rec = microphone.lastRecording
    rec.volume = 0.5
    rec.pitch = 1.1
    rec.rate = 0.7
    rec.play()
    print(rec.duration)
end)
microphone.startListening()
tween.delay(5, function()
    local str = microphone.stopListening()
    print(str)
end)
microphone.startListening()
tween.delay(5, function()
    microphone.stopListening()
    print(microphone.lastText)
end)

@SkyTheCoder I have experience in Lua, but as I said, new to Codea! Also how about an argument for starting to record for a button to appear for people to press to stop? :slight_smile:

@warspyking Usually, in Codea, you have to write that kind of stuff yourself. It’s also better for customization, what if you wanted the button in one specific part of the screen but one built in to Codea came up over something else?

@SkyTheCoder I’m not saying that won’t happen, I’m just saying we could have a default button appear at the bottom of the screen if we wish.

@warspyking - there is a thread for next version suggestions (page down a bit), that’s the place to put your suggestion

@Ignatz Could you provide me a link?