Sound synthesis


Is there any possibilities to doing sound synthesis, or to have access to the sound stream for generating audio data?
If not, is it possible to implement the audio engine from LuaAV? (bsd like licence).

Codea with sound synthesis support would be great as a sound experimental tool for us sound design nerds! :slight_smile:

All the best!

Sounds like a great idea! (See what I did there?)
I implemented the current sound system in Codea. This is something I would be interested in implementing in the future, but no promises!

Hi Dylan,

I love Codea! :slight_smile:

You would be the man I need to ask about the seeds for the sound() function, then! Wanting some more control over pitch, I roughly mapped an octave to the seeds. My script is here:

Do you have a complete mapping, or plans to support notes?


edit: fixed link

There is no deterministic mapping sadly. The sound system uses SFXR by Dr. petter. The seed is the random number generator seed value for that sound type and so the output is pseudorandom.

We were thinking about providing an interface to set the parameters for the sounds, but we thought a simple one would be best to start with.

Thanks Dylan, I’ll keep reverse engineering for the time being then… :slight_smile:

Fred, you can play with the parameters available to SFXR here:

Which ones would you like to see exposed as function arguments in Codea?

What about music tone for background music? The API could like this:

  • tempo(val) to set the beat tempo
  • tone(note, length) to set the note and length

Usage example: tone(‘C#’, 4) means playing C# note for 4 beat long.

Wow, lots to choose from! I would prioritise Start Frequency and Volume. That would let you make cool effects as well as the building blocks of music.