HT37B90/HT37B70/HT37B50/HT37B30
Music Synthesis Controller - MSC
CH0~CH15 Channel Number Selection
Waveform Format Definition
Each devices with integrated 16 channels output is se-
lected by 4bits option and CHAN[3:0] is used to define
which channel is selected. When this register is written
to, the wavetable synthesizer will automatically output
the dedicated PCM code. So this register is also used as
a start playing key and it has to be written to after all the
other wavetable function registers are already defined.
Each device accepts two waveform formats to ensure a
more economical data space. WBS is used to define the
sample format of each PCM code.
WBS=0 means the sample format is 8-bit (PCM8)
WBS=1 means the sample format is 12-bit (PCM12)
The 12-bit sample format allocates location to each
sample data. Please refer to the waveform format state-
ment as shown below.
Change Parameter Selection
These two bits, VM and FR, are used to define which
register will be updated on this selected channel. There
are two modes that can be selected to reduce the pro-
cess of setting the register. Please refer to the state-
ments of the following table:
VM
0
FR
0
Function
Update all the parameter
Only change the frequency parameter
Only change the volume parameter
Unused
0
1
1
0
1
1
Repeat Number Definition
The repeat number is used to define the address which
is the repeat point of the sample. When the repeat num-
ber is defined, it will be output from the start code to the
end code once and always output the range between
the repeat address to the end code (80H) until the vol-
ume become close. The RE14~RE0 is used to calculate
the repeat address of the PCM code. The process for
setting the RE14~RE0 is to write the 2¢s complement of
the repeat length to RE14~RE0, with the highest carry
ignored. The HT37 will get the repeat address by adding
the RE14~RE0 to the address of the end code, then
jump to the address to repeat this range.
Output Frequency Definition
The data on BL3~BL0 and FR11~FR0 are used to de-
fine the output speed of the PCM file, i.e. it can be used
to generate the tone scale. When the FR11~FR0 is
800H and BL3~BL0 is 6H, each sample data of the PCM
code will be sent out sequentially.
When the fOSC is 12.8MHz, the formula of a tone fre-
quency is:
fosc / (16x16) FR11~ FR0
x
fOUT= fRECORD x
(17- BL3~BL0)
SR
2
where fOUT is the output signal frequency, fRECORD and SR
is the frequency and sampling rate on the sample code,
respectively.
Volume Control
Each device provides the volume control independently.
The volume are controlled by VR9~VR0 respectively.
The chip provides 1024 levels of controllable volume,
the 000H is the maximum and 3FFH is the minimum out-
put volume. The PCM code definition Each device can
only solve the voice format of the signed 8-bit or 12-bit
raw PCM. And the MCU will take the voice code 80H as
the end code. So each PCM code section must be
ended with the end code 80H.
So if a voice code of C3 has been recorded which has
the fRECORD of 261Hz and the SR of 11025Hz, the tone
frequency (fOUT) of G3: fOUT=98Hz. Can be obtained by
using the formula: If FR=55h and BL=7, could get 98Hz.
50kHz
FR11~ FR0
(17- BL3~BL0)
2
98Hz= 261Hz x
x
11.025kHz
BL3~BL0: range from 00h~0Bh
FR11~FR0: range from 000h~3FFh
Rev. 1.00
48
June 22, 2017