How to use user waveform
In the Wave1 waveform combo box, select "User Waveform" to import a Wave format or proprietary text format file and generate any waveform.
User waveform registration
- In the Wave1 waveform combo box, with "User Waveform" selected, right-click on the combo box to display the registration dialog.
* If it has not been registered yet, "User waveform not registered" will be displayed in the pop-up message that appears when you hold the mouse pointer on the combo box for a few seconds.
- When you press the register button, a dialog for selecting the user waveform is displayed, so select the file you want to register.
* Select either Wave format or original text format (* .WGT) according to "File type".
* You can also register by dragging and dropping a file from Explorer etc. to this window.
(You can also register by dragging and dropping the file to the main window.)
Example 1
Example 2
When loaded, the waveform will be displayed like this, so
click the Close button to close the dialog.
* The number of samples and the format of the Wave file are displayed on the bottom line.
If you have registered a text format file (* .WGT), the sampling frequency and the number of bits will not be displayed.
* After registration , the waveform file name will be displayed in the pop-up message that is displayed when you hold the mouse pointer on the waveform combo box for a few seconds.
* If you want to check the registered waveform after registration, right-click the mouse on the Wave1 waveform combo box again to display the dialog.
* Wave1 waveformIf you quit WaveGene with "User Waveform" selected in the combo box, that user waveform will be loaded automatically when you start it again.
Then, for confirmation, the waveform is automatically displayed for a few seconds after startup.
If you want to use the same user waveform immediately at the next startup, leave "User Waveform" selected like this.
Please note that if you select anything other than "User Waveform" and exit, the user waveform will be cleared and returned to the unregistered state without being automatically read at the next startup.
* There is no particular limit to the size of the registered file.
Large files can be read as long as memory allows. (Maximum 2GB. I haven't actually tried it (^^;)
User waveform output
- The output method of the waveform after registration is the same as other waveforms.
- When the user waveform is output, the registered data is repeated without any pause.
- Note: For user waveforms, only sample data is read, even if it is a Wave file.
The sampling frequency of the original Wave file itself is not used directly.
The frequency (pitch) of the user waveform that is actually output depends on the sampling frequency value in the format settings of the main window.
For example, if the sampling frequency of the imported Wave file is 48000Hz and the sampling frequency is 1000Hz, but the sampling frequency of the main window format setting is 96000Hz, the actual output frequency will be doubled to 2000Hz.
Therefore, if you want to output at the same frequency (pitch) as the original, specify the sampling frequency of the format setting of the main window to the same value as the value of the original Wave file.
Original text format (* .WGT) File format
- You can create and load any waveform with a text editor as follows.
This is an example when the number of samples is 16, Stereo, and a 16-bit integer.
Lch is a sine wave with an amplitude of 0 dB, and Rch is a square wave (like) with an amplitude of -6 dB.
When this is played back at a sampling frequency of 48000Hz, the Lch is 3kHz and the Rch is 6kHz.
The contents of this file 16bit_S.WGT.
"Samples", 16 ← Number of samples
"Channels", 2 ← Number of channels
"Max", 32768 ← Maximum value
"Data", 32 ← Indicates that 32 amplitude data continue below
0,16422,12539,16422,23170 , 16422,30273,16422,32767,-16422
30273,-16422,23170,-16422,12539,-16422,0,16422,-12539,16422
-23170,16422,-30273,16422, -32767, -16422, -30273, -16422, -23170, -16422
-12539, -16422
The first three lines
specify
the maximum number of
samples, number of
channels (Mono: 1 Stereo: 2) data. *
The order of these three lines does not have to be the above order.
The maximum value indicates how many bits the amplitude data is represented by.
Specify 128 for an 8-bit integer,
32768 for a 16-bit
integer, 8388608 for a 24-bit
integer, and 2147483648 for a 32-bit integer, and
1 for a 32-bit floating point
.
* The number of amplitude data and the amplitude data must be described at the end.
The number of amplitude data is the same as the number of samples in the case of Mono, and twice the number of samples in the case of Stereo.
Amplitude data is an integer less than or equal to the maximum value or a real number less than or equal to 1 (in the case of 32-bit floating point format), and is repeated in the order of Lch and Rch for Stereo.
There is no particular limit to the number of items that can be arranged on one line.
For a general periodic waveform, it is sufficient to describe only the data for one cycle as shown above.
All amplitude data is converted to double (64bit floating point format) and held inside the WG.
Note: Files (* .WGT) created by WaveGene's own text format output function can also be read as they are.
(In this case there are extra lines, but all irrelevant lines are ignored)
Since the user waveform itself can be output in Wave format or text format, it is also possible to create a complex waveform by repeatedly reading it after processing it, such as mixing it with other waveforms.
- This is the case of Mono with the same waveform as above but only a square wave.
The contents of this file 16bit_M.WGT.
"Samples", 16
"Channels", 1
"Max", 32768
"Data", 16
16422, 16422, 16422, 16422, -16422, -16422, -16422, -16422 16422, 16422, 16422, 16422
, -16422, -16422, -16422, -16422
- This is also an example for an 8-bit integer.
The contents of this file 8bit_S.WGT.
"Samples", 16
"Channels", 2
"Max", 128
"Data", 32
0,64,49,64,90,64,117,64,127, -64
117, -64,90, -64,49, -64 , 0,64, -49,64
-90,64, -117,64, -127, -64, -117, -64, -90, -64
-49, -64
- This is also an example for a 24-bit integer.
The contents of this file 24bit_S.WGT.
"Samples", 16
"Channels", 2
"Max", 8388608
"Data", 32
0,4204263,3210181,4204263,5931641,4204263,7750062,4204263,8388607,-4204263
7750062,-4204263,5931641,-4204263, 3210181,-4204263,0,4204263,-3210181,4204263
-5931641,4204263, -7750062,4204263, -8388607, -4204263, -7750062, -4204263, -5931641, -4204263
-3210181, -4204263
- This is also an example for a 32-bit integer.
The contents of this file 32bit_S.WGT.
"Samples", 16
"Channels", 2
"Max", 2147483648
"Data", 32
0,1076291388,821806413,1076291388,1518500249,1076291388,1984016188,1076291388,2147483647,-1076291388
1984016188,-1076291388,1518500249,-1076291388, 821806413,-1076291388,0,1076291388, -821806413,1076291388
-1518500249,1076291388, -1984016188,1076291388,-2147483647,-1076291388,-1984016188,-1076291388,-1518500249,-1076291388
-821806413, -1076291388,
- This is also an example for a 32-bit floating point number.
The contents of this file F32bit_S.WGT.
"Samples", 16
"Channels", 2
"Max", 1
"Data", 32
0.0000000, 0.5011872
, 0.3826834, 0.5011872, 0.7071067, 0.5011872, 0.9238794, 0.5011872, 0.9999999, -0.5011872 0.9238794, -0.5011872, 0.7071067, -0.5011872, 0.3826834, -0.5011872, 0.0000000, 0.5011872, -0.3826834, 0.5011872
-0.7071067, 0.5011872, -0.9238794,0.5011872, -0.9999999, -0.5011872, -0.9238794, -0.5011872, -0.7071067, -0.5011872
-0.3826834, -0.5011872