Posts

Conclusion

Image
For the final blog post I just want to post a quick summary of the content covered thus far and explain some things that I would have covered had I had the time. This blog was focused on learning audio programming from a basic novice level. It took a couple posts to really get on track and figure out what I was doing because this was a whole new area of programming I had never explored before. There was definitely a learning curve as far as learning how audio is represented and operated on digitally but early on I covered some concepts like sample rate and bit depth that are fundamental features of digital audio. This served as the foundation for what was to come in future posts. Image from  https://www.izotope.com/en/learn/digital-audio-basics-sample-rate-and-bit-depth.html                At first, knowing nothing about audio programming, I thought I would use the Java Sound API to create some audio programs because this was the language I was most familiar with and it made sense to

Waveshaping: Creating A Guitar Distortion Effect

  For the final post on this blog, I will finally dive into some more signal processing work for my guitar. To recap and add some context here, we have previously explored how audio programming works, with samples being taken from input sound or being generated for synthesizing sound. We explored playing with some different outputs we can create and how random values can make a white noise generator, and values output in a wave pattern can create a particular frequency. Finally, we cracked into the Juce DSP module to make our lives a little easier and let some of the details be handled behind the scenes with a few exposed methods we can use to process our audio signal. Now I want to use this knowledge and apply it to an incoming guitar signal and use some wave shaping functions to create cool distortion effects and GUI to manipulate them. For this I will pick up where we left off and use the DSP module’s wave shaper class for this task.                Once again you will need to star

Introduction To Juce DSP Module: Building An Oscillator

Image
               The next step in our audio programming journey is learning about the Juce dsp module. DSP stands for Digital Signal Processing and that is what we have been working on with the programs in the previous blog posts. This module comes built with some handy tools we can use to process our digital audio and make cool sounds which is what we are here to do. This post will focus on the dsp module Oscillator class which will give us a simple framework for building an oscillator.                Before I get to explaining what an oscillator is, I would like to post a quick answer to a question from the white noise generator post. I was asked if I know how the random value is generated by the Juce random class. I read the documentation, and the truth is I am not entirely sure what classification their method for getting a random fall into, but they said that their random values are generated from system values, mostly the system time. Also, if the random is called multiple times

Understanding Digital Sound Waves: Sine Wave Synthesizer

Image
       Following the inspiration of the last blog post, I decided to share another program that any of my readers can build and run without any additional equipment beyond their computer and its built-in speakers (or whatever external speakers you choose to use). This blog will also serve to build toward understanding audio programming better, hopefully setting us up to experiment with some wave shaping distortion functions. I decided that it would be a good idea to share my experience learning audio programming, and that means I should show the steps it took me to really understand these concepts. The next step for me was understanding a simple sine wave synthesizer and I want to share this with you so that you can also run the program and see what’s going on under the hood.                To start, I must say this program is not mine and you can access it here . Hopefully I can help explain it in depth and relate it to general audio programming in a way that adds some insight, as s

Detour: A Simple White Noise Generator

Image
  For this week’s blog post I decided I would just investigate the process of generating audio to begin with. We did some manipulation of audio but I thought it would be helpful to dive into an easier example of generating audio so the way it works will be clearer. To demonstrate this I will work off of an example listed in the JUCE framework tutorials. There is an outline for how to build a white noise generator and it is helpful for understanding how to generate audio. This project is built differently from the starting code we are given when we choose to generate a new audio plugin. You can go to the JUCE website and download the code from their tutorial page. The code that actually generates the white noise is contained within a method called getNextAudioBlock(), but this same code can be placed inside the processBlock() function of the code we used before and it will do the same thing. I wanted to take a step back and hit this information just because we can apply all of the thi

Creating A Functioning Overdrive

Image
       For this post I wanted to go ahead and build something more interesting. Something that will significantly alter the sound of the guitar. As of the last post, I have a functioning volume slider that I can use to change the volume of my audio input and play it back. Now I would like to try something similar to changing the volume, but something a little more complex. The perfect effect for this purpose is overdrive/distortion.            Distortion is an effect that guitar players frequently use to make their guitar sound more powerful. Most guitar amplifiers sold today come with some kind of overdrive channel that can be used separate from the clean input sound. In the realm of analog amplifiers this distortion is caused by, simply put, the signal being amplified beyond the tolerance of the equipment. Sound travels in waves, and amplifying it, or changing its amplitude, just causes the size of the peaks and the troughs of the wave to grow larger. There is more energy in the syst

Changing Gears: Developing Audio Plugins

Image
  For the second blog post here I wanted to take things in a bit of a different direction. In the first post I introduced the Java Sound API and some basic information about digital audio. Since working on that first post I have done some more digging and decided that in order to accomplish my original goal most effectively, I will transition to using an audio programming and GUI framework called JUCE to build the software I set out to make. This will require a little resetting from the first post as it is C++ based but it will be well worth it in the end because I will be able to build a wider variety of sound audio manipulation tools this way. This is also a framework for GUI so I can easily build sliders, knobs, and other graphical components really easily so we can better visualize just what we are doing with the audio. If you are curious about the Java Sound API specifically and not just audio programming in general, there is great documentation here that will step through that m