If you are using RISC OS 2, then you may also need to update your !System folder. Load !SysMerge, and follow the instructions. If you get stuck, then read the !Help provided by !SysMerge.
A microphone is also sensitive to sound vibrations, and turn the vibrations into a voltage, whose level corresponds to the vibrations. These voltages can be measured, and recorded in a computer, using a sound sampler.
That's how we can get sound into a computer, but we still haven't discovered what samples are.
Sounds are composed of different frequencies, vibrating the air quicker, or slower, depending on the frequency. A higher frequency vibrates the air faster, whereas a lower frequency vibrates it slower. You can say that the frequency is related to pitch.
The average human ear is only sensitive to frequencies up to around 15KHz, or 15000 cycles (vibrations) per second. Some people can hear higher (20KHz in a few cases), and some people can't hear above 10.
The sound sampler takes the voltage vibrations as analogue, and converts them into a digital format which the computer can understand. The diagram below shows the conversion from analogue to digital:
As you can see, the digital version is not as accurate as the analogue. This accuracy depends on the sound sampler used. In the example, there are 12 different possible digital levels, as opposed to an infinite number of levels for the analogue signals. For compact discs (CDs), there are over 65000 different levels for each ear. Most people cannot distinguish between this number of digital levels and the original analogue signal.
Because the computer only has a finite amount of memory, we cannot record every single change in the voltage, so a technique known as sampling is employed.
Every so often, a single sample is recorded and stored in the computer's memory. This is done until the memory is full. These samples are taken with a fixed time interval between them, or at a fixed frequency. The effect of this is shown below:
Here, the digital version of the analogue waveform is more of an approximation. Even more errors have been introduced, which may be noticeable to the ear. If samples are taken more regularly (faster), then it will become more accurate, but will require more memory to record it.
The trick is to get the right balance between accuracy and memory. Compact discs are recorded using over 44 thousand samples per second (44.1KHz to be technical), and some DAT recorders use 48KHz.
There are, however, a number of limitations to using the internal sound system of your Acorn computer, which makes sample recording slightly easier:
With a linear 8-bit sample, the signal to noise ratio is quite low (around 48dB), but with logarithmic samples, this is much higher (72dB), meaning that there is less noise in the signal when you sample it.
Sonor has been written to use the logarithmic format, but can convert to/from the linear formats available on other computers.
If you press MENU on this icon, a menu will appear. This is called the icon menu. It looks like:
From this menu, you can get information on Sonor, view and remove samples, set your preferences, display oscilloscopes and also leave the program.
The left hand window is the player window. From this window, you can play the sample, record over bits of it, and change its frequency. The right hand window is the display window, which shows you what the sample looks like. As you can see, it looks a mess, but that's because we are zoomed out of it.
To play the sample, just click on the play icon on the player window. It's the one on the middle-right hand side, coloured dark green. You should hear a tone that rises rapidly. If you click on it again, it will play again. If you click on the icon to the left of this, Sonor will play the sample backwards. The two icons above these do the same, but play the sample faster.
Now you've mastered how to play samples, it's time to edit them.
Any editing occurs between two markers which, by default, are at the beginning and the end of a sample, a global edit. If you wish to define these markers, all you have to do is point in the window, and drag a box using SELECT to the position you require. While you have the mouse button held down, a window will appear on the bottom left hand corner of the screen, showing you where you are dragging to and from.
Two green lines denote the start and end of the marked area. If you click on the play icon, then only the marked portion will be played. If you want to mark the whole sample, then you can do so by double-clicking with ADJUST.
To move just one marker, drag with ADJUST. Sonor will choose the nearest marker, and move it to the position pointed by the mouse. Releasing ADJUST will set the marker to that position.
If you press MENU on the display window, the following menu will appear:
This menu is called the editing menu. It has been designed to look like the editing menu used in !Edit.
The zoom option allows you to zoom in and out of the sample. This menu looks like:
Zooming in increases the display detail. At 100%, you will see nearly every bump in the sample. At greater than 100%, you will begin to see lines become more staggered. Zooming out decreases the display detail, but you get to see more of the sample.
A zoom of none will make the whole sample fit inside the current window size, whereas a full zoom will set the zoom to 100%.
If you zoom to marks, you will set the left hand marker to the left hand side of the window, and the right hand marker to the right hand side of the window - you can now only see the selected part of the sample. If the whole sample is selected, then this has the same effect as a zoom of none.
To do this, move down to the Edit option, move right, and choose the Reverse... option. Sonor will ask you if you want to perform this operation or not. If you click on Cancel, then the sample will not be modified. If you click on Reverse, then the sample will be reversed. Now, if you play the sample, it will be backwards, and the reverse play will play it forwards. Try this with some of the speech samples.
Note that if you try to perform an edit that is too large to be undone, then Sonor will ask you for confirmation.
If you decide that you did want the edit to be performed, then you can redo it, by choosing the Redo option in the same menu as undo.
This is achieved using a RISC OS save window, found in the Save option on the editing menu. Type in the name in the writable icon, and drag it to the directory display. The sample will be saved into that directory.
The title of the window shows what editing function is to be performed, in this case, amplification.
The bar icon beneath it is draggable, and it can be set to anywhere between the limits imposed above the bar.
The two icons to the left and right of this bar can be clicked to increment/decrement the value which is shown beneath the bar icon.
It is possible to type the value into the value icon; pressing RETURN will have the same effect as clicking on OK.
The Auto icon is only valid for certain operations, and if this is selected, then Sonor will choose the optimum value, and display it.
The Cancel and OK icons are self explanatory. Clicking Cancel will abort the operation, while clicking OK will perform it.
Note that due to the nature of logarithmic sounds, it is possible to amplify above the distortion-free level to a certain degree, as the human ear cannot hear the distortion. The value at which you can distort it varies from person to person, but a value of 1.25x is rarely recognise as distorted.
If you do try to amplify it so that it is distorted, Sonor will tell you that this will occur, and will ask for confirmation.
A window will appear, which looks like:
The top three are fade ins, and the bottom three are fade outs.
The left hand two fades are linear fades; the volume increases linearly with time.
The middle two fades are concave fades. They start fading quickly, and then slow down exponentially.
The right hand two fades are convex fades. They start fading slowly, and then speed up towards the end.
The Auto icon is not valid in this operation.
By default, the values of 0.1 seconds, and 0.4x are used, which is a fairly medium echo. Experiment with one of the speech samples, and find out how the values can be used.
Resampling involves modifying the sample so that both the sample length and the sample rate are different. It can be done in two ways - Oversampling, or increasing the size, and Undersampling, or reducing the size.
Oversampling involves inserting samples between samples to improve quality, or to increase the sample size. Some sampling software only allows 2,4 or 8 times oversampling, which means doubling, quadrupling and octupling samples. Sonor uses an advanced algorithm to provide any times oversampling, so that samples can be tailored to any particular size/frequency.
Undersampling involves removing certain samples to reduce the size. Unfortunately, this also results in a reduction in quality. Before you undersample, it is probably best to do a low-pass filter on the sample. This removes noise known as aliasing.
If you choose this option, then the following window will appear:
The current settings are shown at the top of the window. The required settings are shown below. There are four icons to the right hand side, which allow the values to be set quickly. If the size/frequency is above the current settings, then you are oversampling; if it is below the current settings, then you are undersampling. Click OK to perform the operation, or click Cancel to abort it.
Due to the nature of this operation, it can take some time. A floating point accelerator (FPA) can speed this up.
Note that the maximum possible frequency is half that of the sampling frequency.
As with resampling, this operation can take some time, and an FPA will speed things up.
The operation is shown in the top right hand icon. To change this, click SELECT or ADJUST to go to the next one. There are five to choose from : Insert, Add merge, Average merge, Overwrite and Amplitude modulate.
The sample to perform the operation with (note: not the sample to perform the operation to) is beneath this. Again, click SELECT or ADJUST to cycle through the samples you have loaded. Sonor will choose the last created sample by default.
The start/end position is beneath that. You can choose between start at sample start, start at cursor, start at select start, end at sample end, end at cursor, end at select end.
If you are performing an insert operation, then the two icons beneath the start/end position are greyed out. Otherwise, if the top of these is selected, then any editing will be performed between the selected area. If the bottom is selected, then the sample's size will be increased if necessary to accommodate the editing.
The top box describes the format. In this case, it is an 8-bit Desktop Tracker file. The bottom box is the operation. By default, this is load sample, which loads the sample into memory, and doesn't do any insert or merge.
By pressing MENU on this icon (or the icon to the right of it), it is possible to choose the insert/merge operation. The icons beneath this are the same the ones in the insert/merge window. Clicking Cancel will abort the load, whereas clicking OK will insert/merge/load the file.
The writable icon at the top is the sample's name. Several sample formats allow samples to have individual names, and this is where you can edit the name.
The icon beneath it is the sample's filename. If it is an unsaved sample, then it simply has the name Sample.
The icon beneath this is the last-saved time/date, or if it is a new sample, the creation time/date.
The icons beneath this is the sample's size (in bytes) and frequency (in Hz). The icon beneath these is the modification status. If the file has been modified, this will read Yes, otherwise if the sample has been saved, it will be No.
Before you start sampling, it is best to show you how to get the best results from your sampler. To do this, bring up the icon menu, and move to the right of the Scope/FFT option. Another menu will appear. Choose the Oscilloscope in option. A window will appear, which looks like:
This shows you what is currently being received by the sampler. If you do not have a sampler connected, or you have not set up Sonor for your sampler, then please read the section on the Preferences window. If you have bought Sonor with a Vertical Twist sampler product, then Sonor will be already configured to use your sampler.
Connect a sound source to your sampler, and start playing some sounds down it.
The oscilloscope display will now look roughly like:
If it is too quiet, then turn up the volume of your source; if it is too loud (with the black lines touching the blue lines at the top and bottom of the display), then turn the volume down.
When you have the sound loud, between the blue lines, then you have set your sampler up correctly. Note that you may not be able to get the sampler to go between the two blue lines correctly, even on full volume. In this case, we suggest that you turn down your source to around 80% of maximum. This will reduce distortion that may occur from the source.
You are now ready to sample.
This is the sampling window. The top writable icon is the number of bytes to allocate for the sample. The icon beneath this is how long the sample will be in seconds. Beneath this is the sampling frequency.
These are the main elements you require when sampling. By default, Sonor will perform a 0.48 second sample, at 20.833KHz into 10000 bytes.
By clicking on OK, Sonor will take the sample. When the sampling has completed, the sample will be displayed in a window, and edited.
A trigger can be used to start sampling when the sample goes above a certain volume. This can be set anywhere between 1% and 99% of the signal input. When the trigger is selected, then two red lines will appear on the input oscilloscope. These are the trigger levels which the signal input must exceed.
Blanking screen is required on older machines when sampling at high sample rates, particularly with printer-port samplers. With blank screen off, if you sample at a rate too high, the result is undefined - sometimes you will get a sample, but with noise in it; other times you won't get anything. Blanking the screen raises the sample rate at which this occurs. Sonor will warn you if you try to sample at a rate higher than that recommended for normal use of the sampler. It may be possible to exceed it, but you do it at your own risk.
If you have a MIDI keyboard attached to your computer, then Sonor can sample from it. If the MIDI option is selected, then more icons will appear to the right, allowing you to automatically play notes on your keyboard. Note that the trigger option must be set (and will be) in order to do this. You can enter the MIDI note's port, channel, value and volume, and also the instrument to play. With a high quality synthesizer, such as the VTX2000, you can record high quality samples for your own use.
If you click on Create, then a blank sample is created, matching the characteristics on the window.
Now you've learnt the basics of Sonor, here are some more detailed parts.
|Back to start||Move to end|
|Change frequency||Loop on/off|
The top two icons set the cursor position at the beginning or the end of the sample. Playing always starts at the cursor position, so these icons allow you to play from the start (forwards), or the end (backwards), of a sample.
The next four icons you have already played with.
The two icons beneath the normal speed play icons are, on the left, record over marked section. This is similar to sampling a new sample, except that you are recording over the marked area of the sample. The sample window parameters are used here, so if, for example, you have a trigger set on the sample window, then the trigger will be used to sample over the marked area.
The icon to the right of this is the stop icon. If you click on this while the sample is playing, the sound will stop, leaving the cursor at the current playing position in the sample.
The bottom right hand icon is the repeat play icon. If this is highlighted (indented), then when the end of the marked area is reached, it will play again from the start of the area. Similarly, if the sample is being played backwards, then when the start of the marked area is reached, then it will play again from the end. This is useful for grabbing individual notes or sections.
The bottom left hand icon is the change frequency icon. If you click SELECT on it, then a window will appear, which looks like:
The left hand side shows musical notes, with the current sample rate shown as middle C, highlighted in orange. If you click on one of the notes, then the sample will be played at that frequency.
If you want to set it to an absolute value, then you can enter the frequency in the Current Freq. icon. When you press RETURN, then the sample's frequency will be set to that value. The sample will be played at that new frequency.
If you click SELECT on Cancel, then the window will close, leaving the sample rate the same as before. If you click SELECT on OK, then the sample's rate will be set to that shown under the Selected icon, and the window is closed. On the other hand, if you click ADJUST on OK, then the window remains open. Note that middle C is now the sample's new frequency.
If you perform filtering, then the following window is displayed:
If you are performing a standard high pass, low pass or notch filter, then you can type the frequency on the filter frequency icon. The maximum value you can enter is shown beneath this. If you are using RISC OS 3, then the graph beneath it will automatically be updated as you type the values in; under RISC OS 2, you can press CURSOR UP to update it.
If you want select a new filter function, then you can choose one of the five built in options beneath the graph. These are (from left to right) : Low pass slope; High pass slope; Low pass cut-off; High pass cut-off; Notch.
A low pass filter will remove high frequency sounds, such as high-hats; a high-pass filter will remove low frequency sounds such as bass sounds; a notch-filter will remove certain frequencies.
Clicking OK will perform the filter; clicking Cancel will abort it.
If you want to create your own filter, then it is possible to do so. On the graph, if you click SELECT, then a new point is inserted at that position. If you keep SELECT held down, then you can drag the new point to the position you require.
If you click ADJUST, then it will select the nearest point to the pointer. If you drag ADJUST, then this point will be moved around until you release the mouse button.
If you want to remove a point, select it by clicking ADJUST near it, and press CTRL-X.
You can have up to 32 points on the graph, including the left and right hand side, which, incidentally, cannot be moved.
The double-headed arrow icon on the right hand side of the graph is an invert function. You can use it to turn a notch filter into a band-pass filter.
If you want more information on the filter algorithm used, then the mathematical function is given later on, in appendix A. However, if you want background information, then this can be found in numerous text books on the subject of Finite Impulse Response filters (FIR filters). These can be heavy going for the beginner.
The numbers at the top are the frequency. The maximum frequency that can be displayed is half the sampled frequency. This is due to a theory called the Nyquist theory.
If the sample has stopped playing, then by positioning the cursor, it is possible to see the frequency display at various positions in the sample. This is also true of the oscilloscope out, but is not as useful.
Try playing the Chirp sample with the FFT out window being displayed.
The three icons on the right hand side perform the following options:
Restore- loads the default values back in from Sonor's directory.
Save- saves these as default.
OK- sets the options, and closes the window.
The preferences are grouped into several groups, which are sampling defaults, opened windows, undo memory size and sampler.
Sampling defaults sets the default values used in the sampling window. You can set the default sample size, the default rate, the default trigger, whether the screen is blanked by default, and also if Sonor warns you if you are possibly exceeding the maximum sample rate for the sampler.
Opened windows allows you to set which windows are displayed when Sonor first loads. If Quick Load is set, the loading title page is displayed very briefly before you can use the application. Otherwise it is on screen for at least two seconds.
Undo memory size allows you to set the maximum amount of memory that would be allocated as an undo buffer. You can also instruct Sonor not to warn you that it is not possible to create the undo buffer. Setting the undo buffer to 0K will effectively turn the undo facility off.
The sampler section allows you to choose which sampler to use. If you have bought Sonor with a Vertical Twist sampler product, then this will be set up to the sampler that you purchased. Otherwise, it will be set to None. Before you can sample, you must have set up the sampler device. By pressing MENU on the sampler icon, or on the icon to the right of it, you will bring up a list of samplers that can be supported by Sonor. If your sampler is not there, then you can either contact us to see if we have a driver for your sampler, or you can write one yourself, if you feel sufficiently adequate to do this. If you do write one, then we urge you to send it to us, so that we may verify its correctness, and include it in any future releases of Sonor. The information is given in appendix B.
Sonor can also export samples in the following formats:
The number of views you have made is displayed on the right hand side of the title bar for the sample. If you close a window, then the number will be decremented. One view does not have a number displayed.
Removing samples This is done by either closing the last window view, by choosing the Remove option on the icon menu, or Misc->Remove on the display menu. If the sample has been edited, then the following message is displayed:
If you choose Remove, then the sample is not saved, and is removed from memory.
If you choose to Cancel, then the the window is not closed, and the sample remains in memory.
If you choose Save, then a save box appears, and you can save the sample. When the sample is saved, it is removed from memory. If the save should fail for any particular reason, such as disc full, for example, or you click outside the save window, then the file will remain in memory, and the remove operation aborted.
By clicking on the sample name you wish to extract, Sonor will read in the sample from the file. It is not possible to re-insert the samples back into the tune; you will have to use a sound tracker editor to do this.