nesdev.com
http://forums.nesdev.com/

Is there any equation of converting PCM to FM?
http://forums.nesdev.com/viewtopic.php?f=5&t=8425
Page 1 of 2

Author:  psycopathicteen [ Sun Dec 18, 2011 5:49 pm ]
Post subject:  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?

Author:  Zepper [ Sun Dec 18, 2011 6:08 pm ]
Post subject: 

I believe there's a way to convert pulse waves to FM instead, but PCM?. No, I have no clue how. :(

Author:  Shiru [ Sun Dec 18, 2011 6:16 pm ]
Post subject: 

PCM can have an arbitrary waveform. FM is only capable to make rather simple waveforms (comparable to arbitrary), in case with Genesis all made from sine waves. So no, you can't convert arbitrary sound to FM.

Author:  ccovell [ Sun Dec 18, 2011 6:24 pm ]
Post subject: 

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.

Author:  tepples [ Sun Dec 18, 2011 6:58 pm ]
Post subject: 

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".

Author:  kyuusaku [ Sun Dec 18, 2011 11:30 pm ]
Post subject: 

The YM2612 allows for CH 6 to be used as an 8-bit DAC (but the YM2612's timer foolishly can't be used on the Genesis so it'll require timed code).

Author:  TmEE [ Mon Dec 19, 2011 3:25 am ]
Post subject: 

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".

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...

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.

Author:  Zepper [ Mon Dec 19, 2011 5:55 am ]
Post subject: 

Wait, so I'm changing the question a bit. Is there a function to generate FM samples from square waves?

Author:  TmEE [ Wed Dec 21, 2011 3:18 am ]
Post subject: 

there are no FM "samples"

Author:  Zepper [ Wed Dec 21, 2011 3:20 am ]
Post subject: 

TmEE wrote:
there are no FM "samples"


So there's no sound "sample rate".

Author:  lidnariq [ Wed Dec 21, 2011 12:46 pm ]
Post subject: 

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.

Author:  Zepper [ Wed Dec 21, 2011 12:49 pm ]
Post subject: 

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.

Author:  Shiru [ Wed Dec 21, 2011 12:54 pm ]
Post subject: 

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.

Author:  Jarhmander [ Wed Dec 21, 2011 1:05 pm ]
Post subject: 

Maybe it is worth considering re-reading your original question:
Zepper wrote:
Wait, so I'm changing the question a bit. Is there a function to generate FM samples from square waves?

One way I can reinterpret it is : "Is there a way to use square waves as operators (either carrier or modulator) ?"
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?

Author:  ap9 [ Sun Sep 10, 2017 4:27 am ]
Post subject:  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.

Page 1 of 2 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/