Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Applying effects to audio
Started by keystagefun Mar 19 2019 09:25 AM

2 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

keystagefun

[GLOBAL: userInfoPane.html]
keystagefun
  • Contributor

  • 334 posts
  • Corona SDK

Hi,

 

Does anyone know if there is any way of creating something using Corona that allows the applying of audio effects or processing audio?

 

Ideally I'd like to allow users of my app to clean up sound files by removing certain frequencies (high, to remove hiss) and to normalise the volume so a series of audio recordings could be matched more evenly to volume. The ability to apply a basic reverb effect would be helpful too.

 

I couldn't find anything but would love to hear from anyone who may have explored these sorts of things or is aware of a plugin...

 

Thanks in advance,

 

Ian



[TOPIC: post.html]
#2

StarCrunch

[GLOBAL: userInfoPane.html]
StarCrunch
  • Contributor

  • 805 posts
  • Corona SDK

Hi.

 

Is this something Audacity-ish or going in another direction? (Just curious, really.)

 

All I really have is "food for thought" here.

 

There are Native mechanisms available, namely in CoronaGraphics.h, that let you provide your own pixel data (one-channel masks, RGB, or RGBA). At key points this will be uploaded to the GPU, but meanwhile what you see in Lua is fairly ordinary, e.g. look into canvas textures. Plugins are also able to build on this, of course.

 

A "CoronaAudio.h" in a similar vein might be worthwhile, allowing say to provide PCM samples. This would let you do any heavy-duty or just out-of-the-ordinary processing on your own end and then provide the final results. (In particular, you would unravel the superposition of cosines and sines that resulted in your samples, putting you in the frequency domain, apply your changes there, then convert back.) Helper functions for getting the data out of known file formats would also be handy.

 

At the moment I believe most of Corona's audio logic happens in ALmixer, though I haven't explored much. The alBufferData() calls are what actually submit samples for playback--though as the name implies that's not necessarily immediate--so an "external sound source" would probably try to dovetail with one or more of those calls.

 

(Thinking about it, since it's modeled after an SDL library, it uses an ALmixer_RWops facility, for generalizing the IO: read from file, memory, network, etc. That's probably a good way in.)



[TOPIC: post.html]
#3

keystagefun

[GLOBAL: userInfoPane.html]
keystagefun
  • Contributor

  • 334 posts
  • Corona SDK

Hi,

 

Thanks for the reply.

 

No - it's not a complex audio processing programme or anything like that. We make educational apps and one of them allows the recording of audio. It would be nice to offer people the option of normalising the volume of different recordings they make and removing some background noise if that's an issue for them. Having said that, I am interesting in audio and recording generally, so this sort of stuff is something I'd been meaning to look at in more depth for a while.

 

Thanks for the info / links. Really appreciate it. I'll look into it further. If anyone at Corona can give any feedback on whether there are any plans to tap into any of this more "under the hood" audio processing functionality that would be great.




[topic_controls]
[/topic_controls]