mat

UCSB MAT 240D 2007 Student Projects

Digital Audio Programming: Sound Synthesis Techniques


Melissa A. Carrasco - Jsyn Examples

All three programs are written in Java, utilizing the Jsyn library.  Being new to audio programming, I created programs to help be to have a better understanding of the synthesis concepts.  The first program "FMStuff" allows the user to do FM using different combinations of modulator and carrier signals.  The second program "AddSynth" creates a GUI of sliders for any number of sine waves.  The frequencies and amplitudes of the sine waves can be changed to create different sounds.  The final program "GranularStuff" attempts granular synthesis.  It takes in a wav file and create 'grains' from it.  The grains are then played by triggering a parabolic envelopes.

file://mcarrasco_JSyn.zip

Salman Bakht - Confetti (Version 2)

Confetti is a sample-based software synthesis instrument written in C++ with the JUCE class library (http://www.rawmaterialsoftware.com/juce/). An arbitrary number of audio files can be loaded into the instrument and assigned to MIDI keys. The collection of samples assigned to a note can be subdivided into samples with fixed lengths defined by the user. Additionally, an envelope can be loaded as a look-up table from an audio file to be applied to samples as they are added. The envelopes are scaled in time so it spans the entire sample waveform. Also, as the envelope is applied as the sample is played, the envelope will scale accordingly when a sample is subdivided. The length of these envelope files is not limited by the software. On pressing a key, the instrument will play back either a single randomly selected sample or sequence of samples. The instrument is polyphonic allowing for multiple streams of samples to be played simultaneously.

This project was inspired by past work on concatenative sound synthesis (see http://concatenative.net/) as well as past compositions by the creator and is designed to be expanded to both provide advancements in this synthesis technique and be used as a compositional tool.

(I also attached Confetti Version 0, which was written with STK, in case it's useful for people wanting to use STK and RtAudio.)

file://Salman%20Bakht/confetti_JUCE.zip

file://Salman%20Bakht/confetti_STK.zip

Phillip Popp - Synth and Effects

Synth and Effects is a cross platform midi and sample utility based on the Juce API.  It was designed to allow sounds to be mapped to midi note and midi velocity values.  Currently, it supports uploading of wav audio files, as well as several rudimentary synthesizer sounds.  Each sound has adjustable midi note and velocity ranges, as well as attack, sustain and release settings.  The "effects" part of Synth and Effects is still in development and in this version is glitchy at best.

file://PhilP/synthAndEffects.zip

Aaron McLeran - additive synthesizer

Video demo on YouTube

The additive synthesizer is composed of two components. The first component is a GUI inteface that allows user parametric control of 10 oscillators. The second component is an abstract aesthetic visualizer/interface written in Java (using the processing framework) that either visualizes or controls the parametric data via Open Sound Control.

The parameters that are controllable for each oscillator are it's harmonic partial (multiple of a fundamental frequency), amplitude, and pan. The harmonic partial parameter is further divided into an integer part and a fractional part. For each oscillator, the user can choose different waveforms: sine wave, square wave, triangle wave, or a saw wave. In addition to these parameters, the synthesizer employs solo and mute buttons as well as control over global parameters such as volume and fundamental frequency. The GUI interface also provides buttons which randomize each of the synth parameters or change the parameters in various randomized algorithmic processes.

The java abstract interface represents each of the parameters through manipulations of a transparent, drop-shadowed rectangles within a grid. There are 10 rectangles, each representing the 10 oscillators of the synthesizer. The grid is divided into 16 regions which represent 16 integer multiples of a fundamental frequency. The rectangles each have a small circle in their center which when moving into any of the 16 regions, will correspondingly change the integer part of the harmonic partial. When the rectangles are rotated clockwise or counter-clockwise, they change the fractional part of the harmonic partial. The x-coordinate of each of the rectangles represent the pan of the oscillators. The length of the rectangles represents the amplitude of the oscillators. The color scheme can also be changed and is dynamically chosen from a collection of color palettes downloaded from colourlovers.com. The floating and moving circles at the bottom of the Java interface represent different fundamental frequencies. The larger the circle, the lower the note. The user can push these circles to affect a new fundamental frequency.

Since this is the first project I've made in C++ or Java, it suffers from a large number of inefficiencies and limitations. Most importantly is that the design was such that extensions, modifications, or portability is difficult. There are a number of ambitions (mostly polyphony and delay-lines) I had for the project that I simply wasn't able to finally implement in time due to the general complexity and messiness of the code. Furthermore, though writing code in two languages and two IDEs was definitely a great learning experience, I believe coding the Java interface in C++ would have improved development time and would have dramatically improved runtime performance. However, from this multi-lingual programming experience, I am more convinced than ever of the power and potential application possibilities of OSC.

file://AaronMcLeran/AdditiveLines.zip

file://AaronMcLeran/AdditiveSynth.zip

Demo: file://AaronMcLeran/additive_demo.divx

Nate Eldridge - One Cloud Wonder

The One Cloud Wonder is granular synthesis stripped to its most basic elements.  A note event is detected and a grain wave table is created by applying a trapezoidal envelope to a sine wave.  The grain number, length, interval, phase, attack, and decay can all be modified to create a wide variety of sounds and textures.  Selecting random for a parameter allows the user to specify the base error (red slider) and span error (blue slider).  Use the on-screen keyboard or MIDI keyboard to trigger the note events.  The OCW is written in C++ using the JUCE API v1.45.  Included with the source code are project files for both Visual Studio C++ 2005 Express and Xcode 3.0.

Music example: OneCloudWonder.mp3

file://NathanEldridge/OneCloud_WIN.zip

file://NathanEldridge/OneCloud_MAC.zip

Charlie Roberts - FMinate - Simple Wavetable Generator - CSL Granulator

I'm attaching the main three things I worked on, although I'm guessing you would only want to post the wavetable maker and the audio unit drum machine since the vast majority of the granulator is your work; most of the work I put into that project was basically just learning CSL and Juce. Worthy endeavors :)

FMinate - FMinate (pronounced "effeminate") is a drum machine Audio Unit that uses a combination of FM and subtractive synthesis to generate a wide variety of percussive sounds. The tabbed interface provides controls to produce kick, snare, hi mid and lo tom, closed hihat and open hihat timbres; all sounds are triggered via MIDI. The interface was created in Cocoa, but a generic Carbon interface is also provided for hosts that do not support Cocoa interfaces in Audio Units. The Cocoa interface has been tested and works in Garageband, Logic and AULab. The files included here comprise a XCode project; the software is for OS X only.

Simple Wavetable Generator - This application opens an audio file and loops it. You can zoom in on the audio file down to the sample level using a Cocoa waveform display that I created; this interface also allows you to highlight particular portions of the waveform that you would like to loop. The loop can be repitched via incoming MIDI note messages. The files included here comprise a XCode project; the software is for OS X only.

CSL Granulator - I took the Granulator that Stephen created using CSL and Juce and turned the Grain structure into its own class. I then added a bandpass filter to each grain with a randomly determined filter frequency. The base frequency of the filter and the extent of the the randomness can be determined via sliders that I added to the Juce interface. The files include a XCode project template but should work on any platform if you create your own platform / IDE specific template.

file://charlieRoberts/FMinate.zip

file://charlieRoberts/SimpleWavetableGenerator.zip

file://charlieRoberts/Granulator_v6_variableEnvelope.zip

Larry Wu - Physical Model Guitar + distortion

The goal is to use frequency domain processing to decompose a guitar signal into separate streams, perform various modifications to make it sound like other types of guitars or other stringed instruments, and convert back to a composite audio signal. The steps are as follows:

1. Take the short-time Fourier transform of a guitar signal, and decompose the signal into separate streams representing, roughly speaking, the vibrations of the individual strings or separate notes.

2. Then apply various modifications to the individual streams to convert the guitar sound into a different sound; for example,
  Guitar -> Banjo
  Guitar -> Sitar
  Guitar -> Resonator Guitar
  Finger-picking (with a dull attack) -> Flat-picking (with a bright attack)
  Acoustic Guitar -> Electric Guitar
  Electric Guitar -> Acoustic Guitar
  Normal Tones -> Simulation of harmonics (where you use your finger to damp the string at various nodes,
            thus bringing out the higher harmonics)
  Other modifications (shortening or lengthening of attack or decay times, etc.)

3. Recombine the individual streams and do an inverse STFT to produce a single time-domain output signal.

The company Line6 produces a guitar, the "Variax" <http://line6.com/variax/>, which does this kind of thing, allowing users to play many different types of guitars and other stringed instruments using a single guitar. However, their technique (probably time-domain) requires a custom guitar, because they probably use separate pick-ups for each string. MIDI guitar is another way of doing something similar, but again it requires some customization to the guitar. My goal is to develop a DSP process that would work for the output of any guitar.

The decomposition (step 1) may involve various methods of audio segmentation and transient detection. For example, in the frequency domain, we may see that the magnitude of a particular STFT frequency bin was more-or-less steadily decaying, but then at a certain time the magnitude greatly increases. We can surmise that this might be an "attack" (plucking of a string). However, one STFT frequency bin may include harmonics from several different strings, which may be plucked or picked at separate times. Also, the STFT magnitudes may normally have a fair amount of fluctuation due to interactions of the phase and the windowing.

The modification (step 2) may involve things like:

  1. Changing the decay time (for example, a banjo typically has a shorter decay than a guitar),

  2. Changing the attack time (a banjo might have a faster attack),

  3. Changing the harmonic balance during the attack (a banjo's tone is probably brighter than that of a guitar, especially during the attack, plus there may be a noise burst from the resonator),

  4. Changing the harmonic balance during the decay (for example, with the harmonics, we would greatly attenuate the fundamental and only play the harmonics -- this would be true for both the attack and the decay)

We may need a fair amount of analysis of various guitar signals vs. other instrument signals, both in the STFT and time domains, to get an idea of what modifications need to be performed. We may want to obtain some kind of database of sampled instrument notes. One issue we may face will be latency, since the guitar will need to be played in real-time. We will need to minimize latency as much as possible, while still producing acceptable audio quality.

file://LarryWu/GuitarSynth.zip

Matt Stabile - JUCE VST host, tremolo & delay

Joe M - Game of Life Granulator

Stephen Pope - CSL/JUCE Granulator




See MAT 240D Page


logo