Create a Sound Track Using Seamless3d

Music Synthesized by Seamless3d

Seamless3d has 6 specialized nodes designed for the purpose of creating high quality sound tracks:

  • Composition
  • Track
  • Phrase
  • Oscillator
  • HarmonicPatch
  • Sample

Because of the way the way the sound track nodes are designed it easy to make subtle variations in the harmonic composition for each note. This allows for a sequence of notes to sound interestingly complex and natural even if the sounds have never been heard in the natural world. Having control over how each note sounds in a sequence also allows for more feeling to be expressed in the composition as a whole.

The sound track ends up being a wav file. To be able to see the wave form for our sounds we will want an audio editing program such as Audacity.
Audacity is a free open source cross platform program and above all its very easy to use.
We will also want a program like Audacity for recording and editing sounds if we want to record sounds for the Sample node.

Add a Composition Node

To create a sound track first create a new smls file and replace the Seamless  node with a Composition node:

When the Composition node's output button is clicked a wav file will be generated with the same name as the smls file and placed in the same folder as the smls file.
The length of the wav file is specified by the Composition node's duration field.
If we generate a wav file at this stage the wav file will be silent because we have not added any sounds yet.

Add a Track to the Composition Node

To add a track to the Composition node add a Track node:


The Composition node can contain any number of tracks and a Track node can contain any number of individual sounds.

Add an Oscillator to the Track

To add a sound to the track add an Oscillator node to the Track  node:

The Oscillator node defines the pitch, time and duration of the sound.

When the Oscillator node is selected we can see it's control points in the 3d window:

They can be dragged to control the pitch and duration of the sound.

The point field contains the values for the control points:

 

Each control point is made up of a X and Y component (X and Y number). The X component for the first control point will always be set to 0. The X component for last control point will define the duration in seconds. The Y components control the pitch. 0 defines a pitch of 220 hertz which is the key A in the western music scale. 1 will make the pitch a semitone higher and so will be A#, 2 will make it 2 semitones higher making it B and 3 semitones makes us arrive at C and so on. Negative values will do the same except the pitch will get lower instead. Fractions can also be specified to create pitches in between semitones.

Define the Sound's Timbre

To define the timbre of the sound add a HarmonicPatch node to the Oscillator node:

With the HarmonicPatch   node we can in theory synthesize any sound! To properly understand how to synthesize sounds using the HarmonicPatch we must understand that sounds are simply compositions of harmonics and that harmonics are simply sine waves playing at different frequencies:

and can vary in volume.

When we compose harmonics we define each harmonic's pitch (frequency) and envelope. The envelope defines the volume of the harmonic for it's duration.

The folowing red curve shows the envelope of a decaying harmonic:

Selecting the HarmonicPatch node reveals the NURBS surface that defines the envelopes:

It is the curvy lines (not to be confused with the cyan straight lines that join the control points) that run from left to right that define the envelopes.

Now if we press the Composition's output button we will hear a sound in our wav file but it will sound horribly distorted because the sound is to loud for the wav file. If we open the distorted wav file in Audacity we can see the sound wave form reaches the limit:

and so we can assume it not only reaches the limit it but also goes outside the range.
To remedy this set the Track's volume field to .1
This will result in the output wave form looking like this:

indicating it is within the range and so will sound how it was specified in seamless.

Specifying the Envelope's Surface Position

Each envelope has a single floating point value contained in the vCoord field to define it's position in the NURBS surface. The vCoord values, are simply the V coordinates for the NURBS patch (The coordinates fed into the NURBS patch at the flat stage (before any of the coordinates are calculated)). V coordinates can range from anything from 0 to 1 and must never be out side of this range. The NURBS surface can be of any size but regardless of it's size 0 will always define an envelope for one end of the surface while and 1 will define the opposite end.

Specifying the Harmonic's Frequency

The multiply field defines the frequency for each harmonic.
A value of 1 will result in the harmonic being the fundamental harmonic.
Most natural instruments have the fundamental the loudest harmonic.
If we multiply a harmonic with 2 the harmonic's frequency will be doubled making it's pitch an octave higher than the fundamental which is known as the second harmonic and if it is set to 3 the frequency will be 3 times higher than the fundamental making it the 3rd harmonic.


Increasing the Number of Voices

Many stringed instruments such as pianos have more than one string/voice for each note. The 2 or more stings for each note are slightly out of tune with each other to create a thicker sound. The same result can be achieved by setting the Track's voices field to more than 1 voice and by setting the detune field to a value such as 10.

The detune field is specified in cents (100ths of a semitone).
If voices is set to 1 detune will naturally have no affect.
If detune is set to 0 changing the number of voices will have no affect.
Increasing the number of voices however always makes the rendering of the track take more time because much of the work generating the wave form will be multiplied by the number of voices. Increasing the number of voices does not increase the volume because the volume for a track is divided by the number of voices for the track.

Timeing

The Osccilator node's delay field specifies in seconds when to play the sound

Bending/Sliding Notes

By default each Oscillator node contains 2 control points but we can add more. When we do this we create a 2d NURBS curve to define our pitch instead of being limited to a straight line. The NURBS curve makes it very easy to bend or slide notes. 4 control points makes it easy to slide one note to another. Sliding the end of a note to arrive at the same pitch of the next note in sequence can add extra complexity and feeling without making any radical change to the melody.

Vibrato

Vibrato is archived by repeatedly increasing and decreasing the pitch.


Playing Sampled Sounds

A Sample node can be plugged into an Oscillator node instead of a HarmonicPatch to create the timbre for the sound. The Sample node's url field specifies the wav file for the sampled sound.
If the Oscillator's pitch is set to 0 the pitch of the sampled sound will be the same as the original sound. Increasing the Oscillator's pitch by say 1 increases the pitch of the sampled sound by a semitone which is the same for a HarmonicPatch.
Sampled sounds are especially good for playing noisy sounds such as percussive instruments.

Repeating Phrases

A Phrase node lets us repeat a sequence of notes using a single node.
A Phrase node can be added to a Track node.
A Phrase node can contain any number of Oscillator nodes and can also reference other Phrase nodes.


Echo

A Phrase node can also be used to simulate echo using it's delay and volume fields.

Importing Tracks from a Midi file

MIDI files can be imported into Seamless3d.
All MIDI note events are converted to Oscillator nodes.

Anvil Studio is a free and easy to use MIDI sequencer which creates files that have been tested with Seamless3d.



Copyright © 2000-2007 Graham Perrett thyme@seamless3d.com