
NY6 User Manual
Ver 1.3 2019/03/28
52
3. Set Audio Output
The audio output will be PWM or DAC for NY6 series. If DAC is selected, user has to implement
ramp-up procedure by his program codes. If PWM is selected, it did not need ramp-up
procedure.
4. Configure Digital Volume
There are 16 kinds of digital volume could be applied, from 0x0 to 0xF.
5. Assign CHNM to Play
Select specific NY6 channel to play melody before any further configuration.
6. Configure Envelop to Change Channel Volume
By writing value to register {RPT0, RPT1} and executing instruction LDEN, there are at most 256
levels to adjust channel volume.
7. Set Interpolation
User can select interpolation function enable or disable.
8. Setup Waveform File Format
As Head+Tail mode is adopted, “Tail” waveform is enabled too. The file format of patch file could
be PCM or ADPCM5.
The combination of file format of <Head, Tail> is <PCM, PCM>, <PCM, ADPCM5>, <ADPCM5,
PCM> or <ADPCM5, ADPCM5>.
9. Determine PH value
PH value is determined according to formula
PATCH
NOTE
INST
F
F
×
F
4096
×
CH
×
8
×
SR
.
For example, patch SR=22,050 Hz, CH=2, F
INST
=2,000,000, F
PATCH
is G3 (196.0 Hz), F
NOTE
is B3
(246.9 Hz), the PH value will be 0x38E.
10. Play Melody
Instruction PLAY can be used to play “Head” waveform. Instruction LDSEC can be used to play
“Tail” waveform. Its usage is illustrated by the following piece of codes
MVLA
Low0(@@Tail) ; Set Tail Wave Address
MVAM
RPT0
MVLA
Low1(@@Tail)
MVAM
RPT1
MVLA
Mid0(@@Tail)
MVAM
RPT2
MVLA
Mid1(@@Tail)
MVAM
RPT3
MVLA
High0(@@Tail)
MVAM
RPT4
MVLA
High1(@@Tail)