The Software    



Sound waves frequency is what determines the sound pitch we hear . Some notes are now standards in the common musical system (or the musical scale). The sound represented by the a sinus wave is made out of specific frequency, amplitude and other specific properties. All these properties are used by the computer to determine the sound properties.
The following table presents all the notes of the musical scale and their frequencies :

Note Frequency
middle C 277.2Hz
C sharp 293.6Hz
D 311.1Hz
E flat 311.1Hz
E 329.6Hz
F 349.2Hz
F sharp 370.0Hz
G 392.0Hz
A flat 415.3Hz
A 440.0Hz
B flat 466.2Hz
B 493.6Hz
octave C 523.2Hz


For example , if we take the note (middle C) ,if we want to generate a square wave representing this note, then we have to operate the DAC for a specified period then stop it for another period. To determine these periods, let's go back to the table above, we see that the frequency of the middle C is 261.6 Hz. This means that 261.6 square wave should be outputted every second so that a middle C can be heard.

From the previous discussion we find that the time of the required square wave for the middle C note is :
T = 1 ÷ f
= 1 / 261.6
= 3.286 msec

.. but the square wave have two parts, one is always greater than zero and the other equals zero for the rest of the waves time and both parts have equally constant times, this means that the duty cycle is:
d = 0. 5

From that we see that the time of the first part of the square wave representing the middle C note is:
t = T ÷ 2
= 3.826 ÷ 2
= 1.913 msec

From the previous discussion we can make out a simple algorithm that can create a square wave representing the middle C note :

Algorithm 1

The wave created using this algorithm is a square wave which gives an acceptable sound but to improve the sound generated, a sinus wave should be generated .



Note Positioning

By note positioning, I mean giving the note a specific virtual source, in other words, making the listener think that it is comming from a specific position in the surrounding 3D space.
Using the ITD , the following algorithm can be used for positioning the note:

Algorithm2
Algorithm2



The algorithm was applied as a Delphi program which simulates a simple virtual piano and displays the notes in a window, the notes can be saved in file which can be then converted to a 3D sound file and played using the sound card that was designed.

Here is the main interface from the final program :

Main Interface

3D Sound Theories and it's Engineering Basis
The Hardware
The Software


Teaching Arabic since Mon 04 Jan 1999

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License. Fadi's 3d VR sound system 1999 (Fadi S.)


Created by Fadi S. ©1998 | |



| MainPage | Syria | UAE | ArabicTutorial | 3D Sound System |
Search | Contact Me| Little Secret | CoolLinks |
Advanced Arabic Language Store |

Search my site:   



Previous page email me !!