Is there any equation of converting PCM to FM?
Moderator: Moderators
-
- Posts: 3140
- Joined: Wed May 19, 2010 6:12 pm
Is there any equation of converting PCM to FM?
Such as an equation that can take a PCE-style PCM samples to Genesis-like FM?
I believe there's a way to convert pulse waves to FM instead, but PCM?. No, I have no clue how.
Zepper
RockNES author
RockNES author
If you can make sawtooth waves in FM, you're already halfway there. Most PCE sample sets are somewhat limited. Check out the PCE demo "Ultimate HuC Sample Player" to get a graphical view of some of the most common sample definitions used in PCE games.
Also, check out YouTube videos about combining harmonics from sine waves to make square waves (not needed on Genesis 'cause you have a PSG there too), sawtooth waves, and others.
Also, check out YouTube videos about combining harmonics from sine waves to make square waves (not needed on Genesis 'cause you have a PSG there too), sawtooth waves, and others.
See the previous FM vs. PCM topic. In this post, TmEE claimed to be able to create an FM patch that has "1:1 waveforms to my bass guitar".
- TmEE
- Posts: 960
- Joined: Wed Feb 13, 2008 9:10 am
- Location: Norway (50 and 60Hz compatible :P)
- Contact:
Bass guitar has a quite simple waveform so its not so difficult to recreate it. Many natural instruments can be very accurately recreated. I would say one FM channel can recreate one string of some musical instrument. Since you only got like 6 or 8 channels (some chips got more) you cannot do very convincing sounds of instruments usually played in groups like orchestras. Good percussion is not so easy to make aswell, there's lot of sounds you can make but even more you cannot...tepples wrote:See the previous FM vs. PCM topic. In this post, TmEE claimed to be able to create an FM patch that has "1:1 waveforms to my bass guitar".
Sawtooth is very easy to make in FM, and you only need 2 operators to do it leaving 2 free for other sound such as square waves or beefing up the sawtooth to get fatter sound.
FM is excellent for bass, pads and brass and certain types of string instruments like acoustic guitars.
Wait, so I'm changing the question a bit. Is there a function to generate FM samples from square waves?
Zepper
RockNES author
RockNES author
All the FM synthesizers made by Yamaha have a sample rate, because they are digital devices. (In the PC, the adlib soundcard produced sound at 49kHz). You could even argue there are two samples in every OPLx card: a logsin table and an exponent table. (see also this decap project). But the ways in which the device can use those two samples are very proscribed and should be thought of in the analog domain anyway.
PCM sound can be hacked out on an FM synth, and I remember Inertia Player for DOS supported it. But sound quality was awful, only better than Inertia's "use the PC speaker for sound" mode.
PCM sound can be hacked out on an FM synth, and I remember Inertia Player for DOS supported it. But sound quality was awful, only better than Inertia's "use the PC speaker for sound" mode.
Pardon me, but I didn't get. Isn't the waveform (file) composed by samples, 4 bytes for 16-bit stereo output? I didn't get that "there are no FM samples", unless he misunderstood me. I'm not saying about "sound samples" used by an ad-lib board, for example, like guitar, sax or any other.
Zepper
RockNES author
RockNES author
A sound sample is something that is sampled, recorded from an audio source. FM does not have samples, because it is not a recording, it is a set of parameters. So it is called an instrument, or a patch.
Playing PCM through an FM synth is nothing special, and it does not involve converting samples into FM parameters. It just abuses the synth's DAC one way or another.
Playing PCM through an FM synth is nothing special, and it does not involve converting samples into FM parameters. It just abuses the synth's DAC one way or another.
- Jarhmander
- Formerly ~J-@D!~
- Posts: 569
- Joined: Sun Mar 12, 2006 12:36 am
- Location: Rive nord de Montréal
Maybe it is worth considering re-reading your original question:
Yes, the OPL3 can use square waves as operators.
Here I assume that Zeeper understand the inner working of FM-based sound, that is, sound is produced via phase modulation synthesis (while modulating the phase affect frequency and hence, it's also frequency modultion, the way these chips produce sound is trully by phase modulation).
If we didn't help with these answers, Zeeper, could you clarify your question?
One way I can reinterpret it is : "Is there a way to use square waves as operators (either carrier or modulator) ?"Zepper wrote:Wait, so I'm changing the question a bit. Is there a function to generate FM samples from square waves?
Yes, the OPL3 can use square waves as operators.
Here I assume that Zeeper understand the inner working of FM-based sound, that is, sound is produced via phase modulation synthesis (while modulating the phase affect frequency and hence, it's also frequency modultion, the way these chips produce sound is trully by phase modulation).
If we didn't help with these answers, Zeeper, could you clarify your question?
Re: Is there any equation of converting PCM to FM?
It is possible to develop a program to produce an FM patch from a short PCM sequence. The result would be an approximation — a simpler waveform from a sound.
Any further detail would require, in theory, wave sampling — a driver (using the CPU) to render a sequence of FM waves to come closer to the original sound. But because you don't get a lot of precision for the parameters — particularly modulation and amplitude, it would probably require more than one mixed channel and the results would still be rough and vary.
Any further detail would require, in theory, wave sampling — a driver (using the CPU) to render a sequence of FM waves to come closer to the original sound. But because you don't get a lot of precision for the parameters — particularly modulation and amplitude, it would probably require more than one mixed channel and the results would still be rough and vary.