# Voice synthesis on ISR

Página 16/30
9 | 10 | 11 | 12 | 13 | 14 | 15 | | 17 | 18 | 19 | 20 | 21

Thanks for testing.

@Victor. Nice! It works for me but I've still have not complete the work.

[WYZ wrote:

]Thanks for testing.

@Victor. Nice! It works for me but I've still have not complete the work.

Well, sorry...

@Victor, never mind! D. Once I've complete the whole work I'll update the file and inform you too. Thank for your patch.

BlueMSX - Now working with this SHA-1 Version. Thank you for the tip ^_^

Working on the OPLL version, I faced the following problem
I have to convert this frequency in OPLL data
freq = 3.4774e+03 Hz

Assuming octave in 0-7, I computed the value of f-val for any possible octave

f-val = freq * 2^(20 - octave) / 49716

I get these values:
f_val = 73343 36672 18336 9168 4584 2292 1146 573

The problem is that f-val ha sto be in 0-511, this implies that or the OPLL cannot produce this frequency or my formula is wrong ....
Where am I wrong?

Try octave range 1-8

I mailed you my first attempt of conversion for OPLL data on 5 channels
If it works, I would pack the data of each channel on 16 bits (4 volumes+3 octave+9 F-val).
Let me know!

For those willing to try the data are here:

```0xE9,0x01,0x04,0x0F,0xED,0x01,0x05,0x0F,0x7B,0x01,0x05,0x0F,0xE6,0x01,0x06,0x0F,
0x0A,0x01,0x04,0x0F,0x4A,0x01,0x07,0x0F,0x4A,0x01,0x07,0x0F,0x4A,0x01,0x07,0x0F,
0x4A,0x01,0x07,0x0F,0x4A,0x01,0x07,0x0F,0x1D,0x01,0x05,0x0E,0x68,0x01,0x05,0x0E,
0xC0,0x01,0x05,0x0E,0xB8,0x01,0x06,0x0E,0xA1,0x01,0x06,0x0E,0x96,0x01,0x06,0x0D,
0x77,0x01,0x06,0x0D,0x85,0x01,0x06,0x0D,0xD4,0x01,0x06,0x0D,0xBC,0x01,0x06,0x0D,
0x77,0x01,0x06,0x0C,0xBC,0x01,0x06,0x0D,0xC9,0x01,0x06,0x0D,0x5C,0x01,0x06,0x0D,
0xAF,0x01,0x06,0x0D,0x45,0x01,0x05,0x0B,0x75,0x01,0x04,0x0C,0xD4,0x01,0x03,0x0C,
0x22,0x01,0x04,0x0C,0xEB,0x01,0x04,0x0C,0xCC,0x01,0x03,0x0A,0x58,0x01,0x05,0x0A,
0x56,0x01,0x04,0x0C,0xCD,0x01,0x02,0x0C,0xAF,0x01,0x06,0x0C,0xE7,0x01,0x03,0x01,
0xAF,0x01,0x06,0x08,0xBC,0x01,0x05,0x09,0xC9,0x01,0x06,0x0A,0xBC,0x01,0x06,0x0A,
0x03,0x01,0x04,0x01,0xC3,0x01,0x06,0x05,0x10,0x01,0x07,0x09,0xA1,0x01,0x06,0x0A,
0xDF,0x01,0x06,0x0A,0xD3,0x01,0x06,0x06,0x09,0x01,0x04,0x08,0x0B,0x01,0x07,0x09,
0xF3,0x01,0x06,0x0A,0x1A,0x01,0x07,0x0A,0xD1,0x01,0x06,0x08,0xDA,0x01,0x06,0x08,
0x0E,0x01,0x07,0x09,0x07,0x01,0x04,0x09,0xFC,0x01,0x06,0x09,0xCC,0x01,0x06,0x06,
0xE9,0x01,0x06,0x07,0x03,0x01,0x07,0x08,0x12,0x01,0x07,0x09,0xE5,0x01,0x03,0x0A,
0xD6,0x01,0x06,0x08,0xF5,0x01,0x06,0x0A,0x13,0x01,0x07,0x0A,0x08,0x01,0x07,0x0B,
0xC3,0x01,0x06,0x0B,0xD2,0x01,0x06,0x09,0xE9,0x01,0x06,0x09,0x0B,0x01,0x07,0x0A,
0x00,0x01,0x07,0x0B,0x16,0x01,0x07,0x0B,0xE2,0x01,0x06,0x09,0x90,0x01,0x03,0x0B,
0xFE,0x01,0x06,0x0C,0xD4,0x01,0x06,0x0C,0x0D,0x01,0x07,0x0D,0xDF,0x01,0x06,0x0B,
0x28,0x01,0x03,0x0C,0x01,0x01,0x07,0x0C,0xED,0x01,0x06,0x0C,0x09,0x01,0x07,0x0C,
0xB4,0x01,0x06,0x0E,0xD3,0x01,0x06,0x0E,0xFC,0x01,0x06,0x0E,0x3A,0x01,0x03,0x0E,
0x8C,0x01,0x06,0x0E,0xF4,0x01,0x06,0x0D,0x91,0x01,0x06,0x0D,0x9E,0x01,0x06,0x0D,
0xB4,0x01,0x06,0x0D,0x88,0x01,0x06,0x0D,0xAC,0x01,0x06,0x0A,0xB8,0x01,0x06,0x0C,
0x9F,0x01,0x06,0x0C,0x92,0x01,0x06,0x0D,0x6B,0x01,0x03,0x0D,0xBA,0x01,0x06,0x0E,
0x94,0x01,0x06,0x0E,0xA9,0x01,0x06,0x0E,0xD1,0x01,0x06,0x0E,0x84,0x01,0x06,0x0E,
0x9C,0x01,0x06,0x0E,0xB0,0x01,0x06,0x0E,0x1F,0x01,0x07,0x0E,0x14,0x01,0x07,0x0E,
0x26,0x01,0x07,0x0E,0x1F,0x01,0x07,0x0E,0x01,0x01,0x07,0x0E,0xD6,0x01,0x06,0x0E,
0xCA,0x01,0x06,0x0E,0xB5,0x01,0x06,0x0E,0x20,0x01,0x07,0x0E,0x0A,0x01,0x07,0x0E,
0x74,0x01,0x06,0x0E,0xDE,0x01,0x06,0x0E,0xA2,0x01,0x06,0x0E,0x1E,0x01,0x07,0x0C,
0x13,0x01,0x07,0x0C,0xAA,0x01,0x06,0x0D,0xBD,0x01,0x06,0x0D,0xCE,0x01,0x06,0x0D,
0x1E,0x01,0x06,0x0E,0x68,0x01,0x06,0x0F,0x1B,0x01,0x04,0x0F,0xBA,0x01,0x06,0x0F,
0x36,0x01,0x06,0x0F,0x4A,0x01,0x07,0x0F,0x4A,0x01,0x07,0x0F,0x4A,0x01,0x07,0x0F,
0x4A,0x01,0x07,0x0F,0x4A,0x01,0x07,0x0F,0x4A,0x01,0x07,0x0F,0x4A,0x01,0x07,0x0F,
0x4A,0x01,0x07,0x0F,0x4A,0x01,0x07,0x0F,0x4A,0x01,0x07,0x0F,0xE8,0x01,0x03,0x0B,
0x16,0x01,0x05,0x0C,0x38,0x01,0x04,0x0C,0x32,0x01,0x06,0x0C,0xC6,0x01,0x05,0x0C,
0x86,0x01,0x04,0x05,0x5F,0x01,0x04,0x07,0x9A,0x01,0x06,0x07,0x24,0x01,0x04,0x08,
0xB1,0x01,0x06,0x0A,0x94,0x01,0x06,0x05,0x7A,0x01,0x04,0x07,0xA7,0x01,0x06,0x08,
0x0C,0x01,0x07,0x0A,0x00,0x01,0x06,0x0A,0xA2,0x01,0x06,0x09,0xB3,0x01,0x06,0x0B,
0x4F,0x01,0x03,0x0C,0x98,0x01,0x06,0x0C,0x1F,0x01,0x04,0x0C,0xB0,0x01,0x06,0x0D,
0x1C,0x01,0x04,0x0B,0x1C,0x01,0x03,0x0B,0x83,0x01,0x03,0x0D,0xD3,0x01,0x03,0x0E,
0xA3,0x01,0x04,0x0E,0x14,0x01,0x03,0x0C,0x16,0x01,0x04,0x0C,0x81,0x01,0x03,0x0E,
0xA2,0x01,0x04,0x0E,0x52,0x01,0x04,0x0E,0x29,0x01,0x04,0x0F,0xE4,0x01,0x04,0x0F,
0xA4,0x01,0x04,0x0F,0xE4,0x01,0x03,0x0F,0x31,0x01,0x03,0x0F,0xE6,0x01,0x04,0x0F,
0xE9,0x01,0x05,0x0F,0x6F,0x01,0x06,0x0F,0xE7,0x01,0x06,0x0F,0x30,0x01,0x07,0x0F,
0x5C,0x01,0x06,0x0E,0xBC,0x01,0x06,0x0E,0xF9,0x01,0x06,0x0E,0x2D,0x01,0x07,0x0E,
0xCA,0x01,0x05,0x0F,0xC5,0x01,0x06,0x0C,0xB6,0x01,0x06,0x0C,0x22,0x01,0x07,0x0D,
0xC6,0x01,0x06,0x0C,0x44,0x01,0x03,0x0C,0x81,0x01,0x04,0x0C,0xAA,0x01,0x06,0x09,
0x39,0x01,0x04,0x0A,0xAA,0x01,0x03,0x0A,0x91,0x01,0x06,0x0A,0x9D,0x01,0x06,0x0B,
0xA1,0x01,0x06,0x06,0xB0,0x01,0x06,0x07,0x85,0x01,0x06,0x08,0x4F,0x01,0x04,0x08,
0x92,0x01,0x06,0x09,0x98,0x01,0x06,0x00,0xB5,0x01,0x06,0x03,0x05,0x01,0x07,0x07,
0xD2,0x01,0x06,0x08,0x40,0x01,0x06,0x09,0xB6,0x01,0x06,0x06,0x97,0x01,0x06,0x08,
0x40,0x01,0x06,0x09,0x07,0x01,0x07,0x0A,0x5D,0x01,0x04,0x0A,0xC3,0x01,0x03,0x0B,
0x4F,0x01,0x04,0x0B,0x99,0x01,0x06,0x0C,0xD4,0x01,0x02,0x0D,0xB5,0x01,0x06,0x0D,
0x15,0x01,0x04,0x0D,0x22,0x01,0x04,0x0C,0x80,0x01,0x03,0x0D,0x8A,0x01,0x04,0x0D,
0x7F,0x01,0x02,0x0D,0xDD,0x01,0x03,0x0E,0x0A,0x01,0x04,0x0C,0x5B,0x01,0x03,0x0C,
0x67,0x01,0x04,0x0E,0x47,0x01,0x02,0x0E,0x43,0x01,0x04,0x0E,0xF8,0x01,0x03,0x0D,
0x47,0x01,0x03,0x0D,0x48,0x01,0x04,0x0E,0x5B,0x01,0x02,0x0E,0x95,0x01,0x04,0x0E,
0x2A,0x01,0x03,0x0D,0xCE,0x01,0x06,0x0D,0xE1,0x01,0x06,0x0D,0xB9,0x01,0x03,0x0D,
0xBC,0x01,0x06,0x0D,0xBF,0x01,0x06,0x0D,0xB0,0x01,0x06,0x0D,0xF5,0x01,0x06,0x0D,
0xD0,0x01,0x06,0x0D,0x9F,0x01,0x03,0x0D,0xAE,0x01,0x06,0x08,0xBC,0x01,0x06,0x09,
0xEF,0x01,0x06,0x0A,0x3F,0x01,0x06,0x0A,0xFD,0x01,0x06,0x0B,0x38,0x01,0x06,0x07,
0x45,0x01,0x06,0x07,0xA8,0x01,0x06,0x08,0xB7,0x01,0x06,0x08,0xF1,0x01,0x06,0x09,
0x27,0x01,0x06,0x06,0x38,0x01,0x06,0x07,0xF4,0x01,0x06,0x09,0x18,0x01,0x06,0x0A,
0x48,0x01,0x06,0x0A,0x43,0x01,0x06,0x0C,0x08,0x01,0x06,0x0C,0xE1,0x01,0x03,0x0D,
0x00,0x01,0x07,0x0D,0xAE,0x01,0x06,0x0D,0x54,0x01,0x06,0x0C,0x07,0x01,0x06,0x0C,
0x47,0x01,0x06,0x0C,0xF4,0x01,0x05,0x0C,0x61,0x01,0x06,0x0C,0xDE,0x01,0x03,0x0E,
0x2A,0x01,0x04,0x0E,0x6A,0x01,0x03,0x0F,0xCC,0x01,0x05,0x0F,0x65,0x01,0x04,0x0F,
0xFF,0xFF
```

The format is
frame0:
ch0:
DW F-VAL
DB OCTAVE
DB VOLUME
ch1:
DW F-VAL
DB OCTAVE
DB VOLUME
ch2:
DW F-VAL
DB OCTAVE
DB VOLUME
ch3:
DW F-VAL
DB OCTAVE
DB VOLUME
ch4:
DW F-VAL
DB OCTAVE
DB VOLUME

frame1:
ch0:
DW F-VAL
DB OCTAVE
DB VOLUME
ch1:
DW F-VAL
DB OCTAVE
DB VOLUME
ch2:
DW F-VAL
DB OCTAVE
DB VOLUME
ch3:
DW F-VAL
DB OCTAVE
DB VOLUME
ch4:
DW F-VAL
DB OCTAVE
DB VOLUME
etc
etc

DW -1 ; sample terminator

Waiting for news too.

This is the stand alone coder that generates the OPLL data

It generates two binary files for each wav.

The _OPLL.bin files have the format of my post above

The _cmpact_OPLL.bin files pack the same data in a single word per channel like this:

DW VVVVOOOFFFFFFFFF

where:

VVVV is the volume on 4 bits
OOO is the OCTAVE on 3 bits
FFFFFFFFF is the F-VAL on 9 bits

The file is
frame0:
ch0:
DW VVVVOOOFFFFFFFFF
ch1:
DW VVVVOOOFFFFFFFFF
...
ch4:
DW VVVVOOOFFFFFFFFF
frame1:
ch0:
DW VVVVOOOFFFFFFFFF
ch1:
DW VVVVOOOFFFFFFFFF
...
ch4:
DW VVVVOOOFFFFFFFFF
etc
DW -1 ; sample terminator

Página 16/30
9 | 10 | 11 | 12 | 13 | 14 | 15 | | 17 | 18 | 19 | 20 | 21