I bet Jorito wants to use the samples in Moonblaster, so PCM would be useless anyway.
Too bad, you lost
I mostly want to record some wavs through the MSX-Audio in the most authentic way. Since the MSX-Audio natively supports ADPCM I think that's the most authentic way to do it. Doesn't necessarily have to be in Moonblaster, but it has to be through the natively available hardware.
Yes NYYRIKKI You are right, those ITU standards do not apply here.
So I looked at MSX Datapack MSX-AUDIO page, and with the help of GOOGLE translate I can say:
1. Voice analysis
MSX - AUDIO converts 8 - bit PCM data to 4 - bit ADPCM data.
1. First, convert voice to 8-bit PCM data whichever sampling rate (1.8 KHz to 16 KHz).
2. We multiply the obtained PCM data (Symbol X1n) by 256 (i.e. X1n*256 is 16-bit PCM data Symbol Xn), compare it with predicted value as 16 bit data (Symbol X^n), and obtain the difference (Symbol dn). The default value of the predicted value (Symbol X^n) is 8000H.
3. Difference sequence (Symbol dn), sign bit is MSB (Symbol L4) of ADPCM data is set to "0" if positive, if it is negative, it is set to "1", and the absolute value of the difference is calculated at the same time (Symbol |dn|).
4. Next, the remaining 3 bits of ADPCM are determined depending on which of Table 7.82 (Note by me of MSX Datapack) the relationship between absolute value (Symbol |dn|) of this difference and quantization width (Symbol DELTAn) corresponds. The initial setting value of quantization width (Symbol DELTAn) is 7FH.
Data conversion from voice data to ADCPM data is completed with the above operation.
5. When ADPCM data is obtained, update the predicted value (Symbol X^n+1) and quantization width (Symbol DELTAn+1) of the next step.
X^n+1 = (1 - 2*L4)*(L3+L2/2+L1/4+1/8)*DELTAn + X^n
DELTAn+1 = f(L3,L2,L1)*DELTAn
Function f(L3,L2,L1) is tabulated in Table 7.83 (Note by me of MSX Datapack)
After that, by repeating operations 1 to 5 for each sampling time, complete ADPCM type speech analysis can be obtained.
It seems feasable in a simple C application module.
Even though I'm suspecting MSX-AUDIO can do PCM conversion itself since it has PCM - DATA register (address 01AH) as well as ADPCM - DATA register (address 00FH).
Ah, I actually just found a proper ADPCM decoder/encoder for Windows here
While we are on this subject, a while back I tried to create some samples for use Moonsound Music Studio (OPL4/moonsound), and my goal is to make samples smaller in size.
What other tips and tricks are there to do this except lower samplerate/bitdept / "smart" cutting/reordering? I am not really an expert at sound editing but im pretty sure you can make things smaller, like in all those small amiga mods that practically contain a while song.
im pretty sure you can make things smaller, like in all those small amiga mods that practically contain a while song.
Amiga MODs are done exactly by using 8bit PCM samples... and the tricks are pretty much limited to lowering the samplerate in low sounds such as bass, cutting the samples in "smart" way, looping the samples in the end back to middle of it self and loading the samples so that there are no gaps in between... So practically you figured out all the "tricks" already. Rest of the stuff is just changing things like volume and tuning during playback.
MSX-AUDIO Yamaha OPL ADPCM encoding is a stadardized WAV data format (and it is aso true for Yamaha OPNA ADPCM ancoding).
It is a WAV with standardized Format-Tag 0x0020 YAMAHA ADPCM.
So any wave-data from that kind of file can be directly fed into MSX-AUDIO.
I don't run Windows, so I wasn't able to try the converter NYYRIKKi linked, but at least this info gives me something to search for a converter.
I don't run Windows, so I wasn't able to try the converter NYYRIKKi linked, but at least this info gives me something to search for a converter.
Please don't give up... The packet also included C-source, so if you are familiar with *insert OS here* then it should be pretty trivial to compile a working version... From little brainless Googling around I found that these keywords are also good to check out: Yamaha ADPCM, YADPCM, Wiimote, NeoGeo ADPCM-B, YM2608, DELTA-T
In year 2005 Yamaha released an official converter YAMAHA ADPCM ACM Driver Version 1.0.0.0, 2005 but I cannot find it.
Some information are in ffmpeg source, MPlayer that uses ffmpeg, in Yamaha chips datasheet and applicatin note supporting ADPCM, and in this piece of source of Rockbox, a free replacement firmware for digital music players.
libpcm Yamaha adpcm module
The wind told me that if you are concerned about sound quality, it is better to convert to ADPCM only the original 16-bit Wave. Conversion of 8 bit → 4 bit ADPCM is severely degraded.