home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / audio / p / sfxm_demo / SFXMDocs < prev   
Encoding:
Text File  |  1992-08-04  |  49.9 KB  |  653 lines

  1. 4. !SFXM, the sample creator.
  2.     
  3. 4.1. Getting started.
  4.  
  5. After you loaded the !SFXM application (and the !SFXED application), a click on it's icon on the iconbar will show you the two !SFXM windows (see figure 7). The two windows are titled '<Untitled>', which is the main editing window and 'Stats', which gives information about the sample length, sample type and the author of the sample.
  6.  
  7. figure 7. main editing window and stats window.
  8.  
  9. On the main editing window you can edit a so called 'sheet', which is merely a collection of objects and wires. If this is done in a meaningful way, !SFXM will be able to calculate a sample from it. To load a sheet give a double click, drag it's file into the edit window or onto the icon on the iconbar. 
  10.                            
  11. ICON BAR Menu
  12.  
  13. Info: gives you the latest information on the version, date etc.
  14. Save: allows you to save the sheet that you are working on. Type in the name you want to use and drag the icon to a directory.
  15. Restart: will clear all your current work in the sheet and allow you to start on a new sheet. Make sure that you save your sheet before using this option.
  16. Quit: will remove the !SFXM icon from the icon bar.
  17.         
  18.                                         
  19. 4.2. Editing functions, building a sheet.
  20.  
  21. To the left of the edit window is a toolbox, which gives an easy access to various edit functions. These functions are also available in the edit menu. These functions are from top to bottom:
  22.  
  23. - Place, go to place mode.
  24. - Connect, go to connect mode.
  25. - Select, go to select mode.
  26. - Delete selected objects.
  27. - Delete inputs of selected objects.
  28. - Select all objects.
  29. - Clear selection of all objects.
  30. - Swap selection of all objects.
  31. - Calculate the sample!
  32.  
  33. Hereafter follows a description of the various edit functions. After reading this, try out some functions to get familiar with them.
  34.  
  35. 4.3. Placing objects.
  36.  
  37. To place an object, click on the place icon in the toolbox window. Now a menu appears from which you can select the object you want to place. You can also choose the object from the edit menu. Once you have done this you will find the object attached to your mouse pointer. The editor now is in 'place mode'. To place the object on the sheet just click with select at the desired position.
  38.      
  39.  
  40. 4.4. Selecting objects.
  41.  
  42. For the editor, each object has two states. An object is either selected or not selected. If an object is selected it will be green, if not it will be grey. To alter the state of one or more objects, the editor must be in 'select mode'. To make the editor go to select mode, click on the select icon in the toolbox window, or choose the 'select' entry from the edit menu (don't go to the sub-menu). Now an object can be selected or deselected by clicking with the select button on it.
  43. All objects can be selected at once by clicking the 'select all' icon in the toolbox window. All objects can be deselected at once by double clicking with select elsewhere on the sheet (not on an object), or by clicking the 'select clear' icon in the toolbox window. The state of all objects can be swapped by clicking the 'select swap' icon in the toolbox window. These functions are also available from the edit menu.      
  44.  
  45. 4.5. Moving objects.
  46.  
  47. Objects which are placed on the sheet can be moved if they are not at the desired position. To do this, the editor must be in select mode and the objects you want to move must be selected (green). To move one or more object, hold down the select button at the start position, move (drag) with the mouse to the end position and release the select button. Whilst doing this you will see a line, which indicates the relative movement of the selected objects.
  48.                           
  49. 4.6. Deleting objects.
  50.  
  51. To delete one or more objects, select the object(s) you want to delete. Now click on the 'delete object' icon in the toolbox window, or choose this menu function from the edit menu.
  52.  
  53. 4.7. Editing the contents of an object.
  54.  
  55. Most objects contain values. These values can be changed by clicking with adjust on the appropriate object (the editor must be in select mode). Now a window will appear with the contents of the object, for example an oscillator holds the waveform it will produce and a constant generator holds a constant. After you have changed it, close the window or click on the 'OK' icon appropriately.
  56.  
  57. 4.8. Connecting objects.                   
  58.  
  59. Each object has inputs and/or an output. Inputs are the arrows at the left side of an object. Outputs are the arrows at the right side of an object. We can connect these inputs and outputs together with wires. Notice that you can only connect an input with an output. You can't connect two inputs or two outputs together, because you would then get a shortcircuit. To be able to make connections, the editor must be in 'connect mode'. A click on the connect icon in the toolbox window or this selection from the edit menu will place the editor in connect mode.
  60. To make a connection click with select on the start point and then with select on the end point. A wire will now be seen to connect the two points. You will notice that after the first click there is a line attached to the desired input/output. If you have made an error and you want to get rid of this line, just click on the connect icon again.
  61. Clicking with adjust on an input changes the placing of the wire connected to that input. There are four different placings (see figure 8).
  62.  
  63. figure 8. the four different connections.
  64.  
  65. With this function you can make sure a wire won't go through another object (this doesn't really matter, but it looks a bit messy). If you still can't get a tidy wire path, just move the objects a little bit further apart.
  66.        
  67. 4.9. Deleting connections.
  68.  
  69. If you want to delete one or more connections you have to use the 'delete inputs' icon in the toolbox window, or choose this menu entry from the edit window. The 'delete inputs' function deletes the wires connected to the inputs of the selected objects. For two-input objects, both connections are deleted. If you just want to delete one of them, delete both connections and reconnect the one you didn't want to delete.
  70.  
  71.  
  72. 4.10. Calculation.
  73.  
  74. This chapter probably is the most difficult one to understand. Therefore read through it very carefully and make sure that you examine the example sheets if you don't get it immediately. The most important thing about this package is learning(!), so don't be disappointed if you don't get the right sound at the first attempt.
  75.  
  76. The chapter 'digital sound' explained how a sample is stored in our computer. So if we want to create a sample, we must create a series of values (samples). First we must determine the length of the sample, or the number of values to be calculated. This value can be set in the 'Stats' window. Let's assume we set this value to 64. This means that !SFXM will calculate 64 values. It begins calculating the first one, then the second one etc. until it has calculated all 64 values. After every calculated value, the value is passed on to !SFXED, which places this value after the previous calculated one. When the calculation is finished !SFXED will show you the final sample. Calculation can be started by clicking on the 'calculate' icon in the toolbox window, or by choosing the menu entry in the edit menu.
  77.  
  78.  
  79. 4.11. Description of the objects.
  80.  
  81.  
  82. Output
  83.  
  84. We get the calculated values sent to !SFXED by using the output object. Every value which goes in to this object is passed to !SFXED. So if we want to make, for example, a sine wave, we have to get the sine wave values (see figure 6) one after another into the output object. Figure 9 shows the range of values which the output object accepts.
  85.  
  86. figure 9. output value range.
  87.  
  88. The maximum value which may go into the output object is '+1' and the minimum value is  '-1'. If a value outside this range is put into this object then the value will be 'clipped'. For example, a value of 1234 will be clipped to +1, whereas a value of -10000 will be clipped to -1.
  89.  
  90.  
  91. Constant Generator
  92.  
  93. The constant generator is used for generating constants. The value it will produce is determined by its contents. You can alter this constant by pressing the adjust button over this object on the sheet (see section 'Editing the contents of an object'). Now a window like in figure 10 appears.
  94.  
  95. figure 10. the constant generator window.
  96.  
  97. You can enter the value at the caret position. Click on the 'OK' icon to accept it. (note: the second time you open this window, the value inside it may not be the same because of internal rounding, but the error should not be significant)       
  98.  
  99. So having described the output and the constant generator object, we now are ready to make a sample! Namely a sample which entirely consist of constants. Load the example sheet 1 and make sure you fully understand it. Try altering the constant value to for example 1, 0,    -0.5, 123 and -100 (don't forget to calculate each time). Notice that the values of 123 and      -100 are clipped (changed to 1 and -1)?
  100.  
  101.  
  102. Adder
  103.  
  104. With !SFXM we can also do some arithmetic. The adder object will add two values together. These values must be offered on it's inputs. The added result will be present at it's output. Load example sheet 2 and alter the two constants to see how it works. Try adding 1 and -0.5 together (=0.5).
  105.  
  106.                      
  107. Subtractor
  108.           
  109. The subtractor object subtracts the value at the RED input from the value at the BLACK input and outputs the result. If you want to understand this better, try changing the adder from example sheet 2 to a subtractor. Don't forget to connect it properly to the constants and the output. Now try for example to subtract 1.5 from 2 (=0.5), or -0.5 from 0.25 (=0.75).
  110.  
  111.                     
  112. Multiplier
  113.  
  114. This object multiplies the values at the inputs and outputs the result. Change the adder from example sheet 2 to a multiplier and see how it works.
  115.  
  116.  
  117. Constant Multiplier 
  118.  
  119. Often you want to multiply a signal by a constant factor. This can be done of course by a multiplier object, but then you also need a constant generator. This object will spare you the constant generator, because the constant is held inside it. The constant multiplier will multiply the input value with this constant and will output the result. This value can of course be altered. To do this pop up the window like in figure 11.
  120. figure 11. the constant multiplier window.
  121.  
  122. The eleven icons numbered 1 to 11 represent the relative distance between two notes. These can be uses to make chords. More of this later on. Load example sheet 3 to see how this object works.
  123.  
  124.                                   
  125. Envelope Generator                     
  126.  
  127. The constant generator described earlier is a generator which generates only one value. The value it produces is the same throughout the calculation. The envelope generator is able to produce changing values. These values are represented graphically in a window (see     figure 12).
  128.  
  129. figure 12. an envelope waveform.
  130.  
  131. This window can be popped up by pressing the adjust mouse button over the object while in select mode. The vertical axis is the amplitude axis, while the horizontal axis is the time axis. The bottom of the window means a value of 0 and the top of the window means a value of 1, so the Envelope Generator outputs values between 0 and 1. These values, which you can draw into the window, are stretched over the entire sample, no matter how long the actual sample is. To make things more clear, load example sheet 4 and calculate the sample. You now see a wave like figure 12. Change the sample size to for example 10000 and calculate again. The wave should look the same as after the previous calculation, but the sample now is much longer. So the envelope generator generates a predefined signal which is stretched over the entire sample.
  132. You can change the wave of the envelope generator by drawing with the mouse. To draw single points, draw in the window with the select button down. To draw connected points, draw with the adjust button down. It is also possible to draw straight lines. To do this follow these instructions:
  133.  
  134. 1- move the mousepointer to the start point.
  135. 2- press adjust.
  136. 3- press <shift>.
  137. 4- drag the mousepointer to the end point.
  138. 5- release <shift>.
  139.  
  140. The line is now drawn. If you want to connect another line to it go to step 3 again.
  141.  
  142. 6- release adjust.
  143.  
  144. If you draw single points and the mousestep is set to a value higher than two, you won't be able to reach all the points on the screen. To overcome this problem draw with adjust, or set the mousestep to two.
  145.  
  146.  
  147. Oscillator
  148.  
  149. The oscillator object is used for generating predefined waves like a sine wave, a square wave etc. or a hand drawn wave. Figure 13 shows the oscillator window. 
  150.  
  151. figure 13. oscillator window.
  152.  
  153. The waveform is defined by 256 values. The top of the waveform area means a value of 1, and the bottom means a value of -1, so the Oscillator is capable of producing values between -1 and 1. These values appear on its output. The oscillator also has two inputs. The upper input (BLACK) is used to define the frequency of the output wave and the lower input (RED) is used for synchronising the oscillator to another oscillator. 
  154. The frequency input determines the length of the output wave. The length of the output wave is 256/(frequency input) values.
  155. To see how this works, take a look at figure 14.
  156.  
  157. figure 14. example of an output wave of the oscillator. 
  158.  
  159. In figure 14a the frequency input is 1 and therefore the output wave is 256 values long. In figure 14b the frequency input is 2 and so the output wave is 128 values long. Because the waveform in figure 14b is compressed by a factor of two, the frequency of this wave will be twice as high. So the higher the frequency input, the shorter the output wave and the higher the frequency of it. To experiment with this a little bit, load example sheet 5. Calculate the sheet with constant values of for example 0.5, 1, 2, 4 etc. and examine the result. You can also try to alter the waveform of the oscillator (read on to find out how to do this).
  160. The exact frequency of the output wave can't be determined by !SFXM, because the program doesn't know at what sample rate the calculated sample will be played. The sample rate in most cases will be determined by a music application, which will play the sample. For example: If we have a sine wave of 256 values and it is played at a sample rate of 20000 samples per second, the actual frequency will be: 20000/256 = 78 Hz. If we played the sample at a rate of 40000 samples per second, the frequency is: 40000/256 = 156 Hz. You don't really have to know anything about all this, because the best way to determine the frequency is listen to the sample. If the sample sounds too low or too high, just alter the value at the frequency input of the oscillator. For most cases a frequency value from 2 to 16 will give an acceptable pitch.
  161.  
  162. The other input (RED) of the Oscillator is the synchronising input. The function of this input is best explained by example sheet 6.
  163.  
  164. The main oscillator produces a sine wave with a frequency of 2. The second oscillator produces a square wave with a frequency of 3. The output of the second oscillator is connected to the synchronising input of the first oscillator. This causes the first oscillator to oscillate at a frequency of 3! Notice that the output wave isn't quite a sine wave anymore. What happens is that when the synchronising input of the first oscillator goes from negative (-1) to positive (+1) the oscillator 'resets' internally, and therefore takes over the frequency at its synchronising input. Because the output wave gets somewhat distorted it will not sound the same as the original sine wave. If you want to use this function often, experiment a bit with the example sheet, else you may leave the synchronising input unconnected.
  165.  
  166. The icon functions in the oscillator window (figure 13) are:
  167.  
  168. Sin: makes the waveform a sine.
  169. Tri: makes the waveform a triangle.
  170. Ramp: makes the waveform a ramp up/down by clicking with select/adjust.
  171. Sqr: make the waveform a square.
  172. Cons: makes the waveform a constant 1/0/-1 by clicking with select/menu/adjust.
  173. <<<<: compresses the waveform by a factor 2, thus making the frequency twice as high.
  174. >>>>: expands the waveform by a factor 2. The last 128 values are lost.
  175. */2: multiplies/divides (select/adjust) the amplitude of the waveform by a factor 2. If the amplitude becomes too big, the edges are clipped.
  176. +-90: rotates the waveform by +90 or -90 (select/adjust) degrees.
  177. Rand: fills the waveform with random numbers.             
  178.  
  179. You can also draw the waveform by hand. To do this, draw in the area where the waveform is shown. The drawing rules are the same as in the envelope generator window, so you can draw points, connected points and straight lines.
  180.  
  181. There is no undo function, so be careful.
  182.  
  183.  
  184. Noise Generator
  185.  
  186. This object is also a generator object. It is used to produce random numbers between -1 and +1, which appear on its output. The input of the noise generator is used to control the rate at which the random numbers are generated. If a value of 1 is applied to this input a random value is generated every calculation on the final sample. If a value of for example 0.25 if applied, a random value is generated within every four calculations. Load example sheet 7 and change the constant value to for example 1, 0.5, 0.25, 0.1 and see what happens.
  187.  
  188.  
  189. Pulse Generator
  190.  
  191. This generator is used for generating waves like in figure 15.
  192.  
  193. figure 15. waves that can be generated by the pulse generator.
  194.  
  195. All these waves are called pulse waves. They appear on the output of the pulse generator. This object also has two inputs. The upper input (BLACK) controls the frequency of the output wave, while the lower input (RED) is to control the width of the pulse.
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215. The frequency input acts like the frequency input of the oscillator, so a value of 1 on this input will cause the pulse generator to generate a pulse with a length of 256 values. More generally: the length of the output wave is 256/(frequency input) values. Read the explanation of the frequency input of the oscillator for more information about this.
  216.  
  217. The pulse width input is used for defining the width of the output pulse. For example a value of 0.25 on this input will give a 25% high, 75% low pulse. This means that if the total pulse length is for example 64 (a value of 4 on the frequency input), there will be after another 16 values 1 and then 48 values -1 (example sheet 8). A square wave (50% high, 50% low) can be obtained by applying a value of 0.5 on this input. To experiment a bit with the pulse generator, load example sheet 8. Try to make a pulse which has a length of 128 values and a 75% high, 25% low width.
  218.  
  219.    
  220. Low Pass Filter
  221.  
  222. This object is used to filter out the high frequency components (see chapter 1) of a sound wave. This only leaves the lower frequency components in the output wave, and so the output wave will have a less 'sharp' sound. This is best explained by a figure. 
  223.  
  224. figure 16. low pass filtering a square wave.
  225.  
  226.  
  227. Figure 16 shows the filtering of a square wave. The original square wave is shown in figure 16a and the filtered ones in figure 16b and 16c. Notice that the sharp edges are rounded off. The square wave will therefore have a less sharp sound.                                                       
  228.  
  229. To experiment with this object, load example sheet 9. The original wave from the oscillator is fed into the upper input (BLACK) of the filter. The amount of filtering is controlled by the lower (RED) input of the filter. If a value of 1 is applied to this input, no filtering takes place and the original wave is just passed through the filter. To show what other values do to the filtering, change the filter constant of this sheet to 0.5, 0.25, 0.1, 0.05 and 0. Examine the final waveform. You can listen to the final sound by pressing the 'Y' key on the keyboard, after you have clicked on the 'Loop' icon in the keyboard window. Also try filtering a triangle wave, a ramp wave, a sine wave and your own hand-drawn wave.
  230.  
  231.  
  232. High Pass Filter           
  233.  
  234. This object works opposite to the low pass filter. It is used to filter out the low frequency components of a sound wave. This only leaves the higher frequency components in the output wave, and so the output wave will sound sharper. Figure 17 shows how high pass filtering a square wave affect the waveform. Notice that the sharp edges are made even sharper.
  235.  
  236. figure 17. high pass filtering a square wave.
  237.  
  238. To experiment with this object, load example sheet 10. Again the original wave from the oscillator is fed into the upper input (BLACK) of the filter and the amount of filtering is controlled by the lower (RED) input of the filter. There also is a constant multiplier which multiplies the output signal by 0.5, so that the 'spikes' won't be clipped. This time, a value of 0 applied to this input, will cause no filtering to take place, so this works opposite to the way that the low pass filter works. To show what other values do to the filtering change the filter constant of this sheet to 0.01, 0.05, 0.5, and 1. Examine and listen to the final waveform. Also try filtering a triangle wave, a ramp wave, a sine wave and your own hand-drawn wave.
  239.  
  240.  
  241. General Function       
  242.  
  243. The function of this object is to apply a user defined function on a signal. The output value of this object can be written as a function of the input signal: O = f(I). The function is determined by a graphical representation on a grid. Take a look at figure 18. This is the General Function window and is used to define this function. 
  244.  
  245. figure 18. General Function window.
  246.  
  247. The horizontal axis is the input axis in the range from -1 (left) to +1 (right) and the vertical axis is the output axis also in the range from -1 (bottom) to +1 (top).  If you are not familiar with functions take a look at an example function in figure 19.
  248. figure 19. the output value is a function of the input value.
  249.  
  250. This example shows how output values are determined by input values of: -0.5 -0.25 and 0.75. The output values are respectively 0.5, 0.25 and -0.5. Input values out of the range from -1 to 1 are clipped. So an input value of for example -100 will be clipped to -1 and an input value of 50 will be clipped to +1. The default function is the identity function, so the output value will be the input value.
  251.  
  252. The general function object can be used for transforming one wave to a different one. Figure 20 gives some examples of how a sine wave can be distorted. The figure shows the applied function and the output wave. Try to make a sheet which produces these results (use a constant generator, an oscillator, a general function and an output object).
  253.  
  254. figure 20. distortion of a sine wave.
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261. Delay Line
  262.  
  263. This object delays the input signal (BLACK) by a maximum of 64 values. The amount of delay is controlled by the control signal (RED). For example a value of 0 at the control input doesn't delay the signal, while a value of 0.5 delays the input signal by 32 values. This means that an input value will arrive 32 calculations later at the output. If you want more delay, add more delay blocks to form a sort of pipeline. Example sheet 11 gives an example of the Delay Line object. When the calculation starts, the delay object is filled with zero's (this is done by !SFXM). At the control input is a value of 0.5 which delays the input signal, in this example '+1', by 32 values. When you calculate the sample, you will see that the first 32 values are 0, while the last 32 values are 1 (the sample size is set to 64). This object can be used for example to make echo's (see later on).
  264.  
  265.  
  266. Sample & Hold
  267.                                                          
  268. This object has a kind of memory function. It can be used to remember a value during the calculation. The value to be stored should be present at the signal input (BLACK). When the control input (RED) goes from negative to positive the value at the signal input is stored and will be present at the output. This value at the output will remain the same until the next negative to positive transition at the control input. To make things more clear, load example sheet 12. Have a look at the contents of the oscillators and the constants. Calculate the sheet and examine the result. Now change the lower constant to 64. Calculate and examine the result again. 
  269.  
  270.  
  271. Input                                     
  272.  
  273. With !SFXM it is also possible to perform calculations on sample files. This can be done by using the Input object. This object outputs the contents of a sample file. Figure 21 shows you the input window.
  274. figure 21. the input window.
  275.  
  276.  
  277.  
  278. You can enter the filename of the sample file here, or drag the sample file into this window, which has the same effect. Don't forget to set the set the correct sample type. Only raw data files can be used. If the sample length in the 'Stats' window isn't equal to the size of the sample file, the sample file will be stretched or compressed so that it will fit into the calculated sample. This will only happen if the 'Stretch Sample' icon is 'on'. If it is 'off' this will not be the case. If you want the base pitch of the input-sample to remain the same, make the sample length in the 'Stats' window equal to the size of the sample file.
  279.  
  280.  
  281.  
  282. 5. Advanced techniques.
  283.                     
  284.  
  285. This chapter describes the techniques which have been used to create all the samples in the 'Sheets' directory. The examples are quite interesting on their own, but they are even more interesting when you combine them. With each example comes a sheet, which resides in the directory Sheets.Examples.Advanced. Make sure you understand the function of the sheet by examining and experimenting with it.
  286.  
  287.  
  288. 5.1. Envelopes.
  289.  
  290. An envelope is the variation of the volume of a sound. Most instruments have an ADSR envelope, which stands for Attack, Decay, Sustain and Release. A typical ADSR envelope is shown in figure 22.
  291. figure 22. an ADSR envelope.                           
  292.  
  293. The attack phase is the time that the signal goes from zero volume to maximum volume. In the decay phase, the volume goes from maximum level to sustain level. When the sustain level is reached, the volume remains the same for a while in the sustain phase. After the sustain phase comes the release phase, where the signal drops to zero volume.
  294.  
  295. Obviously the best way to create envelopes is to use the envelope generator. This object is used in the example sheet 'Envelope'. Load this sheet and examine the contents of the envelope generator. You will see that it genarates an ADSR envelope. This envelope generator is controlling the outgoing signal of the oscillator, which generates a ramp wave with a frequency of 4. 
  296.  
  297. Experiments:
  298. -change the envelope waveform and examine how this affects the sound.
  299. -alter the waveform of the oscillator.
  300.  
  301.  
  302. 5.2. Amplitude Modulation.      
  303.  
  304. Amplitude modulation is, like the envelope generation, variation of the volume of a sound wave. This time we are not going to use the envelope generator, but an oscillator to do this. Load the example sheet 'AM'. The upper oscillator is generating the signal we want to modulate. It is a square wave with a frequency of 8. The modulation signal comes from the lower oscillator. This oscillator generates a sine wave with a frequency of 0.25. Out of the oscillator comes a signal which lies between -1 and 1. This signal isn't quite suitable for modulation. If we add 1 to the signal using an adder, and then multiply the signal by 0.5, the outgoing signal lies between 0 and 1 (ok?). Now its a suitable modulation signal and we can use it to modulate using a multiplier.
  305.  
  306. Experiments:
  307. -change the constant at the lower oscillator to for example 0.5 (faster modulation).
  308. -modulate a different sound wave, by changing the waveform of the upper oscillator.
  309. -change the modulating signal by altering the waveform of the lower oscillator (for example to a ramp wave).
  310. -change the constant at the adder and the constant multiplier after it, so that the outgoing signal lies between 0.5 and 1 (this is changing the 'depth of the modulation', so less modulation).
  311.  
  312.  
  313. 5.3. Frequency Modulation.
  314.  
  315. Frequency modulation means varying the frequency of a sound wave. This can be done in several ways.
  316.  
  317. In example sheet 'FM1' modulation is done by an envelope generator. The envelope generator generates a signal which goes from 1 to 0 and then from 0 to 1 (just have a look at its contents). Connected to the envelope generator is a constant multiplier which multiplies by 32, so the output signal of the envelope generator and the multiplier together lies between 0 and 32. This signal is used for controlling the frequency of the oscillator, which produces a sine wave.
  318.  
  319. Experiments:
  320. -change the shape of the envelope waveform.
  321. -alter the constant multiplier, so you will get a different frequency range.
  322. -alter the oscillator waveform.
  323.  
  324. Example sheet 'FM2' shows you how modulation can be done by an oscillator. The left oscillator generates a modulating sine wave with a frequency of 0.125. The constant, adder and multiplier make the output of the oscillator (-1 to 1) go from 16 to 32 (check it). This signal controls the frequency of the right oscillator, which also generates a sine wave. 
  325.  
  326. Experiments:
  327. -change the speed of modulation by altering the constant, which controls the modulating oscillator.
  328. -alter the constant at the adder and the constant multiplier to get a different frequency range.
  329. -change the waveform of the modulating oscillator.
  330.  
  331. If we put up the speed of modulation dramatically we can make some quite interesting effects. This is shown in example sheet 'FM3'. Note that this is the same sheet as 'FM2'.
  332.  
  333. Experiments:
  334. -change the constant at the adder to 5 and the constant multiplier to 4.
  335. -change the constant at the left oscillator to 4.
  336.  
  337. Example sheet 'FM4' shows you that you can also control the speed of modulation by an envelope generator.
  338.  
  339. Experiments:
  340. -change the constant multiplier after the envelope generator to 1, 4 or even 16.
  341. -alter the constant at the adder and the multiplier after the adder to change the depth of modulation.
  342. -try replacing the constant at the adder by an envelope generator and a constant multiplier. Now you can control the depth of the modulation by the envelope generator. Find a nice value for the constant multiplier.
  343. -you can even try to put up a third oscillator on the sheet to control the modulating oscillator (move all the objects to the right to make place). An FM synthesizer like the Yamaha DX7 uses methods like these to create its sounds.
  344.  
  345.  
  346. 5.4. Variable Pulse Width.
  347.  
  348. Example sheet 'PulseWidth' shows you how you can use the pulse generator object. The constant controls the frequency, and the envelope generator controls the pulse width. Just take a look at the envelope waveform to see how it controls the pulse width. Calculate the sample and listen to the outcome. Click on the 'Multiple' icon in the keyboard window, now press F2 and then 'Y', 'N' and 'I' simultaneously. That’s a nice string sound, isn't it? You can also make other chords like: 'I' 'P' and ']' together. This method of combining pulse generators is used in the sheet 'Strings6'. This sheet uses two pulse generators with frequencies of 4 and 8 to make a nice string sound.  
  349.  
  350.  
  351. 5.5. Filtering.
  352.  
  353. With a filter you can alter the timbre of a sound. Load example sheet 'Filter1', calculate the sample and listen to the result. The oscillator generates a square wave with a frequency of 2. The upper envelope generator is used to control the low-pass filter, while the lower envelope generator is used to control the high-pass filter. Have a look at these waveforms and listen to the calculated sound. Can you recognise what the filters do to the sound? The reason why there are two filters after each other is that you then get better filtering.
  354.  
  355. We can also use the low-pass filter together with an envelope generator to control the envelope of a sound. Load example sheet 'Filter2' to see how this is done. By the way, you get this kind of oscillator waveform by clicking on the 'Rand' icon in the oscillator window and then 3 clicks on the '>>>>' icon. It is a wave which has a lot of high harmonics in it.
  356.  
  357. Experiments: 
  358. -alter the envelopes and work out how this affects the sound.
  359.  
  360.  
  361. 5.6. Synchronising Oscillators.
  362.  
  363. Example sheet 'Synchro' gives an example of how to use the synchronising input of the oscillator. The frequency input of the upper oscillator goes from (about) 0 to 6 and back to 0 again. This oscillator is synchronised by the lower oscillator at a frequency of 4, so the frequency which comes out of the upper oscillator remains 4 all the time. Have a close look at the waveform to understand this better (read the !SFXED chapter for info about zooming in etc.). The waveform is changing all the time, but the frequency stays the same. Because of this, you get a very lively sound.
  364.  
  365. Experiments:
  366. -alter the waveform of the upper oscillator.
  367. -change the constant multiplier to 8, 16, 32, or even 64. 
  368. -change the constant at the synchronising oscillator to for example 2, 8 etc (this will alter the base frequency of the sound).
  369.  
  370.  
  371. 5.7. Phase Shifting.   
  372.  
  373. Another way to make a sound more lively is to pass it through a phase shifter. A phase shifter delays the incoming waveform a bit and then mixes it with the original signal. How to do this is show in example sheet 'Phase1' and 'Phase2'. 
  374.  
  375. Load example sheet 'Phase1', calculate the sample and listen to it. Notice that you get a kind of 'floating' sound?
  376.  
  377. The oscillator generates a rather edgy hand-drawn wave, so it has a lot of high frequency components in it. This signal goes into the delay object, where it is being delayed a bit. The amount of delay is controlled by an envelope generator. Take a look at the envelope waveform to see how it controls the delay. The adder is used for mixing the original signal with the delayed signal. After the adder is a constant multiplier to avoid clipping.
  378.  
  379. Experiments:
  380. -change the oscillator waveform to your own hand-drawn waveform.
  381. -change the envelope waveform to another slow changing wave. Do you notice any difference in the sound?
  382. -make the envelope generator generate a constant wave by drawing a horizontal line in it. The 'floating' effect should now be gone. Why is that?
  383.  
  384. Example sheet 'Phase2' applies phase shifting on a noise waveform. It gives a very clear phasing effect.
  385.  
  386. Experiments:
  387. -alter the envelope waveform.
  388. -alter the constant generator to for example 0.5, 0.25, 0.125
  389.  
  390.  
  391. 5.8. Echoes.
  392.  
  393. In the previous section we used the delay line for the phasing effect. This time we are going to use it to create echoes.
  394.  
  395. Load example sheet 'Echo', calculate the sample and listen to the result. Nice echo right?
  396.  
  397. The oscillator generates the signal we want to make echoes of. The envelope generator together with the multiplier makes this signal into a very short burst (check the envelope waveform). The very short burst goes into the adder, which passes this signal directly to the output. This signal is also fed back into the pipe-line of delay objects, where it comes out some time later. This delayed signal is then added to the original signal, goes to the output object and is fed back into the delay again etc. If you don't understand this immediately, just follow the signal route from the oscillator to the adder, through the delay objects, to the adder, through the delay objects etc. Notice that the signal loops? This is called feedback. 
  398.  
  399. The amount of feedback is controlled by the constant multiplier. This is set to 0.75, so the volume of the next echo is 75% of the volume of the previous one. If you set the constant multiplier to for example 0.5, the echo volume will halve each time.
  400.  
  401. The amount of delay, so the time between two echoes, is controlled by the constant generator which is connected to the delay lines.
  402.  
  403. Experiments:
  404. -change the waveform of the envelope generator which controls the volume of the oscillator.
  405. -alter the amount of feedback.
  406. -alter the delay time.
  407. -replace the oscillator by an input object. You now can make very sophisticated echoes on your own sample files. Don't forget to set the sample length equal to the file size, else the base pitch of your sample will be changed.
  408.  
  409.  
  410. 5.9. Distortion.
  411.  
  412. Distortion is also used for making a sound more interesting. Distortion changes the shape of the waveform, so that it get more higher harmonics.
  413.  
  414. Load example sheet 'Distortion'. In this example, we use the general function object to distort a sine wave. The sine wave is generated by the oscillator. It is amplified by the envelope generator together with the multiplier and constant multiplier. The maximum amplification is 4 (check the constant multiplier). The amplified signal goes through the general function, where it gets transformed into a different signal. A transformation like this is show in figure 20 (in the section General Function). Because the amplification is controlled by an envelope generator, we can control the amount of distortion with it. The more the amplification, the more the signal gets distorted. At the start of the sample there is much distortion, while at the end of the sample there is hardly any distortion (check the waveform of the envelope generator, also have a close look at the calculated sample). 
  415.  
  416. If we make a general function like in example 'Distort2' or 'Distort3', we even get more distortion.
  417.  
  418. Experiments:
  419. -change the oscillator waveform.
  420. -alter the general function (some nice straight lines, or just make a mess of it).
  421.  
  422.  
  423. 5.10. Fourier Synthesis.
  424.  
  425. In the chapter about sound, we stated that every sound signal can be made up of pure sine waves. So, if we want to make a sound we might as well only use sine waves to do this.
  426.  
  427. This is done in example sheet 'FourSynth'. There are four oscillators generating sine waves. The frequencies are determined by the constants. The amplitude of the sine waves are controlled by the envelope generators (notice that the envelope generators are connected to the multipliers, not the synchronising inputs of the oscillators). Have a look at these envelope generators, to see what kind of wave they produce. 
  428.  
  429. With this kind of technique you have an almost infinite number of possibilities. Experiment a lot with it!.
  430.  
  431. Experiments:
  432. -change the constants.
  433. -alter the waveforms or the envelope generators.
  434. -add more oscillators.
  435. -experiment with the sheets: 'BlubZing', 'Bells', 'Celeste', 'Choir', 'Claves', 'Marimba', 'Organ'.
  436.  
  437.  
  438. 5.11. Tuned Noise.
  439.  
  440. It is very difficult to make a nice sound with the noise generator. This is because the noise sound is too sharp. You can get rid of the sharpness by using a low-pass filter, but then the high frequencies are gone as well. We can overcome this problem if we tune the noise using an oscillator. How to do this is shown in example sheet 'TuneNoise1'.
  441.  
  442. The noise from the noise generator gets filtered by the low pass filter. This filter is controlled by a constant generator. The actual tuning is done by an oscillator and a multiplier. After the multiplier comes a constant multiplier which amplifies the signal.
  443.  
  444. With the filter you can control the bandwidth of the noise. With the oscillator you can control the tuning.
  445.  
  446. Experiments:
  447. -Change the constant which controls the filter to: 0.075, 0.05 and 0.02.
  448. -Change the constant which controls the oscillator to: 16, 32 and 96.
  449.  
  450. In example sheet 'TuneNoise2' both the oscillator and the filter are controlled by an envelope generator.
  451.  
  452.  
  453. 5.12. Chords.
  454.  
  455. You have probably already noticed that sometimes, if you press two or three keys simultaneously you get a very nice sound. This is called a chord. With !SFXM we can quite easily make samples which are chords by using the constant multiplier. Load example sheet 'Chord1' to see how this works.
  456.  
  457. There are three oscillators to simulate three keys pressed simultaneously. The base frequency is determined by the constant. The two constant multipliers to the oscillators control the other frequencies. For example, if you calculate the sample and press the 'Q' key, the sample sounds like you press the 'E' and the 'T' key as well. Here is how it works: the first constant multiplier is set to 1.25... You get this constant by clicking on the box with '4' in it. This means that the second oscillator oscillates at a frequency that is 4 halftones higher than the first one. Likewise, the third oscillator oscillates at a frequency that is 7 halftones higher.
  458.  
  459. There are a lot of chords you can make. Example sheet 'Chord2' generates a minor chord, like pressing 'Q', '#' and 'T' together. See if you can find out what kind of chords 'Chord3', 'Chord4' and 'Chord5' are.
  460.  
  461.  
  462.  
  463. 6. !SFXED, the sample editor.
  464.  
  465. 6.1. Getting started.
  466.  
  467. To start the application double click on the !SFXED icon. If you have started up the !SFXM application first, the !SFXED will automatically be loaded.
  468.  
  469. If you want to load a sample into the editor, either drag it onto the !SFXED icon on the iconbar, or drag it into the !SFXED waveform window. 
  470.  
  471. A click on the !SFXED icon on the iconbar will bring up the waveform window and the keyboard window.
  472.  
  473.  
  474. figure 23. The waveform window and the keyboard window.
  475.  
  476.  
  477. 6.2. The waveform and the keyboard window.
  478.                                       
  479. The waveform window is the window where the sample editing takes place. You can select an area of sample data by pressing either select or adjust over the waveform, and then drag to the desired position. Alternatively use the left button to select the start and the right button to define the end of the selection.
  480.  
  481. To set the left loop pointer (green) press select on the area above the waveform. Set the right loop pointer (red) by using adjust. If you hold down the <shift> key, the distance between the left and right loop pointer is kept constant, allowing you to drag the selected loop area around the window.
  482.  
  483. The position icon indicates the absolute sample position within the sample. You can also click on this icon to toggle between hexadecimal and decimal representation. 
  484.  
  485. The sample rate can be set by using the SRate icon.
  486.  
  487.  
  488. The keyboard window is used to play the sample data. To be able to play, the keyboard must have the 'input focus' (title bar should be yellow). This can be done by clicking with select or adjust in the window (clicking with adjust will also cause !SFXED to stop playing).
  489.           
  490. The keyboard window has the following icons which are activated by clicking on them:
  491.  
  492. Play: What to play when you press a key.
  493.  
  494. All : will play the whole sample.
  495. Loop : will play a loop of the area selected by the loop pointers.
  496. Sel : will play the selected area.
  497. ->Loop : will play the sample form start to the right loop pointer, then it will play the loop (this is used for example by 'Tracker' and 'EMR' files).
  498.  
  499. Keys:
  500.  
  501. Release : if release is on, the volume will fade after a key is released.
  502. Multiple : allows multiple key playing (up to three channels).
  503.  
  504. Hitting the spacebar will stop the sample playing.
  505.  
  506. It is also possible to play the sample from the editor window by clicking on the 'All', 'Sel' and 'Window' icons. Clicking on the 'X' icon will stop the sample playing.
  507.  
  508. The function keys set the octave for the sample to play. F1 is the lowest and F5 the highest. This gives a total pitch range of over 6 octaves.
  509.  
  510.  
  511. 6.3. Waveform window menu functions.
  512.  
  513. The waveform window menu functions are:
  514.  
  515. Misc:
  516.  
  517. Info : gives info about memory, pointers etc.
  518. Sample Type : allows you to set the sample type.
  519. Set Buffer : set the buffer length. If you wish to use a particularly large sample, you will have to set the buffer to the appropriate size. The maximum buffer size is currently set to 1Mb. You can change the default buffersize by altering the !Run file in the !SFXED directory. Use: Set SFXED$BufferSize <Size>.
  520. Restart : clears everything. MAKE SURE YOU HAVE SAVED!.
  521.  
  522. Save:
  523.        
  524. All : this saves the whole sample.
  525. Selection : only saves the selected area.
  526. Clipboard : saves the clipboard (from 'Cut' or 'Copy').
  527.  
  528. !SFXED saves in the following formats:
  529.  
  530. Tracker: Tracker file.
  531. Tracker_NH : Tracker file without header.
  532. Armadeus : Armadeus file.
  533. DSEdit : DSEdit file.
  534. EMR : EMR file.
  535. Raw : raw data file.
  536. Module : creates a module from sample data.
  537.  
  538. For some file types, the sample must be of the correct form (eg. Tracker files must be logarithmic). If the are not, !SFXED will warn you that it cannot perform your action. 
  539.  
  540. Note on modules: the loop pointers will only be used in the module if the 'Loop' icon is on and when the Save -> All menu entry is used.
  541.                                     
  542. Edit:
  543.  
  544. Cut : cuts the selected area onto the clipboard.
  545. Copy : copies the selected area onto the clipboard.
  546. Paste : pastes the clipboard at the right select pointer.
  547. Delete : deletes the selected area.
  548. Delete* : deletes everything that is NOT selected.
  549. DeleteL : deletes everything to the left of the left select pointer.
  550. DeleteR : deletes everything to the right of the right select pointer.
  551.  
  552. There is NO undo function!
  553.  
  554. Select:
  555.  
  556. Select : click on Select (without going to the sub-menu) will clear any selection.
  557. All : selects the whole sample.
  558. Loop : selects the area indicated by the loop pointers.
  559. Left : selects everything to the left of the left select pointer.
  560. Right : selects everything to the right of the right select pointer.
  561. Window : selects the current window.
  562. Clear : clears the selection (this is the same as Select without sub-menu).
  563.  
  564.  
  565. Zoom:
  566.  
  567. Zoom : click on Zoom (without sub-menu) will zoom in to the selected area. It is possible to zoom into one byte of sample data.
  568. All : views the whole sample.
  569. Out : zooms out to view some more sample data.
  570. Loop : zoom in on the loop.
  571. Selected : Zoom in and view the selected area (this is the same as Zoom without sub-menu).                                                             
  572. Remember : remembers the state of the current window. If you want to go back to this particular section use...
  573. Recall : will zoom into the selection you have 'Remembered'.
  574.                        
  575. Loop:
  576.  
  577. All : sets the loop pointers to the whole sample.
  578. Window : sets the loop pointers to the current window.
  579. Selected : sets the loop pointers to the current selection.
  580. Half : halves the distance between the loop pointers (handy for making 'songs' from only one sample).
  581. Double : doubles the distance between the loop pointers.        
  582. Remember : remembers the loop pointer positions.
  583. Recall : recalls the 'Remembered' loop pointer positions.
  584.  
  585. Goodies:
  586.  
  587. These functions work on the selected area, or (if nothing is selected) on the whole sample. Some functions are only available for linear samples. If you want to use these functions on a logarithmic sample, you have to convert the sample from log to lin, perform the function and then convert from lin to log.
  588.              
  589. Signed : converts signed <-> unsigned.
  590. Lin->Log : converts linear to logarithmic.
  591. Log->Lin : converts logarithmic to signed linear.
  592. Reverse : will reverse the sample data (to play it backwards).
  593. Low Pass : will filter out the higher frequencies. A value of 0 will filter everything, while a value of 255 will filter nothing.
  594. High Pass : will filter out the lower frequencies. A value of 0 will filter nothing, while a value of 255 will filter everything.
  595. Amplify : scale the amplitude in %. eg 50% will halve the volume.
  596. Echo/Reverb : echo (multiple echo's)/reverb (only one echo). For example a decay of 50% every 1024 bytes means that the echo on a 10K sample will repeat 10 times, halving the amplitude each repeat.
  597. Fade In/Out : fade from start volume to end volume in %.
  598. Stretch : stretch the sample in %. This allows you to change the base pitch of a sample or section of a sample. For example a stretch of 50% will double the base pitch.
  599. Silence : this will zero any chosen section, the result being silence.
  600. FFT : This allows you a graphic format of your sample, where each frequency has a different position on the grid. This is provided to help the more experienced user to create samples with !SFXM from a sampled sound. There is a frequency axis, a time axis and an amplitude axis. The frequency axis ranges from 0 to 128 (frequency at an !SFXM Oscillator object). The selected sample area is stretched over the time axis. The amplitude can be set by the scale value.                                                                       
  601. Add Clipboard : merges the selected area with the sound currently in the clipboard.
  602.      
  603.  
  604. Song:
  605.  
  606. A song is a collection of loops from a sample, which can be played in a sequence.
  607.  
  608. Play : plays the currently loaded song.
  609. Show : pops up the song window.
  610. Save : for saving the song (Armadeus compatible).
  611. Save Module : saves the song as a relocatable module.
  612. Clear : clears the current song from memory.
  613. Repeat : choosing this item will add a 'tick'. When this option is on, the song will repeat infinitely.
  614.  
  615. 6.4. Creating a song.
  616.  
  617. To bring up the song window use 'Show' from the song menu. You are now ready to create a song from the sample currently in the waveform window.
  618.  
  619. Next set the loop pointers for the section that you want to play.
  620.  
  621. Click the cursor in the song window at the point marked <Untitled> and give the loop a name. This yellow box section of the window is where all the editing takes place. When you hit <return> the cursor will move to the next icon, where you can type in the number of times the loop must repeat. The loop will play at the pitch which you last played using the keyboard window. ie. if you want to change the pitch of the current loop that you are editing, do so with the keyboard window. Hit <return> again and now specify the volume from 1 to 255. To save all of this, click on the white section below the yellow box with the menu button and click on 'append'.
  622.  
  623. The loop will now appear as '1'.
  624.  
  625. Now repeat the above in the yellow box for the next loop and append it. 
  626.  
  627. This loop will now appear as '2'.
  628.  
  629. If you wish to edit any of your loops, click on the white box containing the loop and edit it in the yellow box at the top of the window.
  630.  
  631. Menu options in the loop window.
  632.  
  633. Insert Loop : This will automatically add the current loop in the editor in the previous loop position. ie if you click on loop 3 and insert the current loop, the current loop becomes 3 and all loops above 3 are incremented by 1.
  634. Append Loop : will add the current loop at the end of all loops.
  635. Overwrite Loop : will overwrite the selected loop with the loop currently in the edit box.
  636. Delete Loop : will delete the selected loop.
  637. Play to End : this will play the song from the selected loop to the end of the song.
  638. Play Song : plays the whole song.
  639.  
  640. 7. File Formats.
  641.  
  642. Tracker : logarithmic.
  643. Tracker_NH : any type.
  644. Armadeus : signed linear.
  645. DSEdit : unsigned linear.
  646. EMR : signed linear.
  647. Maestro : RM (any type).
  648. Notate : RM (any type).
  649. Rhapsody : RM (any type).
  650. Coconiser : logarithmic.
  651. Raw : any type.
  652.  
  653.