Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7413635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:56:17+00:00 2026-05-29T06:56:17+00:00

I am trying to find documentation, tutorials, examples on how to generate sounds. I

  • 0

I am trying to find documentation, tutorials, examples on how to generate sounds. I mean without using a library that will hide all the interesting stuff.

I am interesting in sound and I want to start doing something with it but I don’t know from where to start.

Correct me if I am wrong but the lowest level to generate sound is one of these (DirectSound
,CoreAudio,ALSA,OSS) depending on the OS. So I have to pick an operating system and learn the appropriate sound system?

Is this really worth or I should just learn a library that wraps all the above and offers cross platform compatibility?

Maybe this question is not very clear and I am sorry for that but as it turned out I don’t even know what I want. I am just trying to find something interesting for my thesis.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:56:17+00:00Added an answer on May 29, 2026 at 6:56 am

    Here’s an example to get you started.

    // filename "wf.cpp" (simple wave-form generator)
    
       #include <iostream>
       #include <cmath>
       #include <stdint.h>
    
    int main()
       {
    
       const double R=8000; // sample rate (samples per second)
       const double C=261.625565; // frequency of middle-C (hertz)
       const double F=R/256; // bytebeat frequency of 1*t due to 8-bit truncation (hertz)
       const double V=127; // a volume constant
    
       for ( int t=0; ; t++ )
          {
          uint8_t temp = (sin(t*2*M_PI/R*C)+1)*V; // pure middle C sine wave
       // uint8_t temp = t/F*C; // middle C saw wave (bytebeat style)
       // uint8_t temp = (t*5&t>>7)|(t*3&t>>10); // viznut bytebeat composition
          std::cout<<temp;
          }
    
       }
    

    compile and run on Linux via ALSA interface:

    make wf && ./wf |aplay
    

    compile and run on Linux via GStreamer interface:

    make wf && ./wf |gst-launch-0.10 -v filesrc location=/dev/stdin ! 'audio/x-raw-int,rate=8000,channels=1,depth=8' ! autoaudiosink
    

    GStreamer claims to be cross-platform. It’s main feature of interest is that you can create (or use existing) plugins to construct a pipeline of audio filters.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to find some simple SQL Server PIVOT examples. Most of the examples that
Trying to find an example that has css rollover using sprites & sliding door
I have been searching Google for that last 15 minutes trying to find Documentation
I'm trying to find all long filenames in a directory using: find . -regex
I'm trying to find documentation on how I can override a property name in
I am trying to find an online documentation for SQLite2. The project I have
Trying to find examples of when decorators might be really beneficial, and when not
I'm trying to write a simple mail server using Python. I found smtpd that
I'm trying to write a very simple terminal app that will scan for Bluetooth
I'm trying to get on with Script# library and find it challenging to get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.