vgmrips

The forum about vgm files
It is currently 2018-08-21, 23:24:08

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 2018-01-27, 13:57:44 

Staff Staff
Programmers Programmers
Contributors Contributors
Ball Fondlers Ball Fondlers
Offline
User avatar

Joined: 2014-01-28, 5:51:54
Posts: 620
Hello, I am looking for an algorithm or an explanation on how to convert 2-op FM voices to 4-op. Mostly I am looking for how to convert the different parameters. Is there some text on this somewhere, or does anyone have a clue how one would do this? Is it even possible for all chips? Is it possible for all situations? I am sure at least some voices could work.

Thanks in advance!

_________________
Support me on patreon!.
Follow me on twitter.

If you like this post, give it a big thumbs up and hit that subscribe button down below! And as always, thanks for reading, and see you next post.


Top
 Profile  
 
 Post subject:
PostPosted: 2018-01-27, 17:30:28 

Contributors Contributors
Offline
User avatar

Joined: 2015-02-22, 3:40:22
Posts: 120
The biggest problem is that the OPLL and OPL2 and up support non-sine waveforms, while the OPM only supports sines. So this essentially limits your selection to OPL-compatible sounds.

Other than that, the parameters should be fairly translatable… with 2-op there are only two algorithms, “frequency modulation” and “additive” where the operators are either placed in series (modulator -> carrier) or in parallel (carrier + carrier). For the former you could use OPM algorithm 4, for the latter OPM algorithm 7 (which are the two least 4-oppy algorithms), and only key-on the operators that you’re actually using, or set the TL of the unused operators to maximum attenuation (note, this isn’t fully muted, but pretty much inaudible).

Then it should be mostly just a matter of translating the rest of the parameters, taking care to check the OPL and OPM application manuals for the exact conversions:

* TL - same values (OPM has one extra bit for -48 dB)
* MUL - OPL can not specify multipliers of 11, 13 and 14. Map values 11 -> 10, 13 -> 12, and 14 -> 15
* FB - same feedback values
* AR/DR/SL/RR - OPL has a envelope generator which can do ADSR and ADD depending on EG-TYP setting, OPM has “ADDR” which can mimick both OPL versions I think; ADSR by setting D2R rate to 0, ADD by setting D2R to the RR. Note that the rate values seem to be different, so you need to perform a conversion calculation.
* KSL/KSR - OPM only has a single KS value so you need to perform some kind of conversion, but I don’t think this is very sensitive so if it’s a bit off it’ll probably be ok
* VIB - maps to PMS + PMD; VIB selects 7 or 14 cent, PMS selects 0, 5, 10, 20, 50, 100, 400 or 700 cent, but can adjust the scale with PMD (global). The LFO frequency is 6.4 Hz, can be set on OPM with LFRQ (global).
* AM - maps to AMS + AMD, AM selects 1 dB or 4.8 dB, AMS selects 0 dB, 24 dB, 48 dB or 96 dB, but can adjust the scaling with AMD (global). The LFO frequency is 3.7 Hz, can be set on OPM with LFRQ (global).

Something along those lines. I would first just convert the values as trivially as possible to get a first sound as a proof of concept, then implement and fine-tune more accurate conversion calculations.


Top
 Profile  
 
 Post subject:
PostPosted: 2018-01-27, 17:41:05 

Staff Staff
Programmers Programmers
Contributors Contributors
Ball Fondlers Ball Fondlers
Offline
User avatar

Joined: 2014-01-28, 5:51:54
Posts: 620
Thanks, Grauw! Is this for a specific clock?

_________________
Support me on patreon!.
Follow me on twitter.

If you like this post, give it a big thumbs up and hit that subscribe button down below! And as always, thanks for reading, and see you next post.


Top
 Profile  
 
 Post subject:
PostPosted: 2018-01-27, 17:45:35 

Contributors Contributors
Offline
User avatar

Joined: 2015-02-22, 3:40:22
Posts: 120
OPM and Y8950 (OPL+ADPCM) application manuals both assume a clock of 3579545 Hz. The whole OPL series is based on the same clock, generally, even though OPL3 and OPL4 use different clock inputs values they internally divide to (almost) the same. The differences in envelope generator rates are not due to different input clocks but either due to a different internal clock division of the EG (which is clocked separately), or a different mapping of rates, I think. Comparing the tables in greater detail should give a general impression of the exact conversion needed. Key scaling is probably also a bit different due to the difference in how notes are specified, but I think not significantly.


Top
 Profile  
 
 Post subject:
PostPosted: 2018-01-27, 19:59:08 

Staff Staff
Programmers Programmers
Contributors Contributors
Ball Fondlers Ball Fondlers
Offline
User avatar

Joined: 2014-01-28, 5:51:54
Posts: 620
is there a commonly used file format for storing 2-op OPL* voices?

_________________
Support me on patreon!.
Follow me on twitter.

If you like this post, give it a big thumbs up and hit that subscribe button down below! And as always, thanks for reading, and see you next post.


Top
 Profile  
 
 Post subject:
PostPosted: 2018-02-22, 13:01:49 

Musicians Musicians
Contributors Contributors
Offline

Joined: 2012-09-29, 11:45:48
Posts: 215
Location: Australia
These are probably the most common for 2-op OPL voices.
http://www.vgmpf.com/Wiki/index.php/INS
http://www.vgmpf.com/Wiki/index.php/SBI
http://www.vgmpf.com/Wiki/index.php/BNK

_________________
-dj.tuBIG/MaliceX


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group