Posts

Showing posts from December, 2021

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