Skip to main content

User login

What is OpenID?
  • Log in using OpenID
  • Cancel OpenID login
  • Create new account
  • Request new password
Register
  • Home
  • Browse
    • 2D Art
    • 3D Art
    • Concept Art
    • Textures
    • Music
    • Sound Effects
    • Documents
    • Featured Tutorials
  • Submit Art
  • Collect
    • My Collections
    • Art Collections
  • Forums
  • FAQ
  • Leaderboards
    • All Time
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
    • Weekly
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
  • ❤ Donate
Programming

Sound Synthesis

hc
Thursday, November 4, 2010 - 15:36

I think some simple Instruments can be generated by using the following formula:

waveform(timescale(t)) * amplitude(t)

where:

  waveform is one of sine, square, sawtooth or customfunction and

  timescale and amplitude some simple function of t.

Here is a simple example of a percussive instrument (by the looks of it) I have just put together using a math tool:

waveform = sine

timescale(t) =(10-t)^3 // start with high frequency and decrease

amplitude(t) = (1+t^3 * 0.1)^-1 // fast decay

BTW does anybody know a simple lightweight lib to write .wav?

 

 

  • Log in or register to post comments
ceninan
joined 16 years 1 month ago
Thursday, November 4, 2010 - 17:53
ceninan's picture

If you want really lightweight, there should be plenty of C/C++ files meant to be included into your project for writing WAVs. Out of the "proper" libraries, I'd give libsndfile, libao, and PortAudio a try - probably in that order.

PortAudio hasn't had a new stable release for a few years but allegedly comes with audio generation examples.

  • Log in or register to post comments
Pompei2
joined 15 years 6 months ago
Friday, November 5, 2010 - 01:34
Pompei2's picture

Depends on your language. In python, there is one really easy: http://docs.python.org/library/wave.html

  • Log in or register to post comments
hc
joined 14 years 11 months ago
Friday, November 5, 2010 - 05:56

Indeed libsndfile  looks good, they even got a one-page example for generating and saving sound. Using scripting for this purpose is a good idea, too.

I think a parametric explosion would be great.

  • Log in or register to post comments