I wanted to play around with wave generation, so I decided to make my own little program to let me create waves and listen to them.

Download here or check out the BitBucket repository. Once you start, you will see something like this:

Place your cursor in the text box at the bottom, and use the keyboard to play like a piano:

Use the drop down at the top to choose different built-in wave types, or type in the box and click "Generate" to create your own:

Most math functions I've aliased to just their names, such as Sin or sin instead of Math.Sin.

This program uses NAudio for the sound generation.

I've been having fun playing with it, figured I'd put it out into the wild.
That looks like it would be interesting to play with, with the potential of annoying people around me Very Happy \o/

May I ask what inspired this? Smile
No direct inspiration. Just thought it'd be fun Smile
Good enough for me. Smile I'll download it and give it a shot. I remember finding this online app once, it was a square with like 50 squares inside. It would scan across them once every few seconds and would play notes based on what mini squares were turned on. I had loads of fun with that Smile
This makes a neat chip-tunes-y sound:

    var val = Sin(step * theta) + Sin(2*step * theta)/3+ Sin(1.5*step * theta)/2.5 +  Sin(1.25*step * theta);
    if (val > 0) {
        return val > .25 ? 1: val;
    } else {
        return val < -.25 ? -1 : val;
If you want "real" chiptune type sounds, you can experiment with wave configurations that could be generated by a SID 6581 (the chip used for audio synthesis in the C64).

Essentially you get three independent oscillators with programmable frequency up to 4 kHz. Associated with each oscillator, you can select amplitude, waveform (triangle, sawtooth, square or noise) and envelope (attack, sustain, decay, release).
You get the "chiptune" sound by mixing these "hard-edged" signals (no sinusoid!) in clever fashions.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum