VOGONS

Common searches


OPL chip emulation

Topic actions

Reply 20 of 26, by Kippesoep

User metadata
Rank Oldbie
Rank
Oldbie

Of course it's numerical. What else did you expect? It's generally a good way to represent numbers. The only thing that might be expressed other than a number is the "waveform" number, which could be a selection:
0 = sine wave
1 = sine wave, negative values clamped to zero
2 = sine wave absolute
3 = sine wave absolute with zero on decrease
see attached image

Everything else specifies things like speeds or volumes. It all maps directly to the OPL registers. If you don't know how to interpret an "attack rate" of 5, how do you ever hope to create your own instrument definitions for OPL?

Check out the other image attached below. The attack rate is the speed at which the waveform reaches maximum volume (0=never, 15=almost immediately), decay rate is the speed at which the waveform then decays to sustain level, sustain level is the amplitude of the waveform after decay, but while the note is still "on" (0=silence, 15=full volume), release rate is the speed at which the amplitude drops to zero after the note has been released.

IBK files by definition are for OPL2. The format doesn't allow for 2OPL2 or OPL3. The list in the code you copied is simply a packed version of these numbers, mapping directly to the OPL2's registers, displayed as hexadecimal values.

Attachments

  • adsr.png
    Filename
    adsr.png
    File size
    1.24 KiB
    Views
    692 views
    File comment
    ADSR (attack/decay/sustain/release) envelope.
    File license
    Fair use/fair dealing exception
  • waves.png
    Filename
    waves.png
    File size
    565 Bytes
    Views
    692 views
    File comment
    Different choices for the waveform generation.
    File license
    Fair use/fair dealing exception

Reply 21 of 26, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

I would think that the instrument data would be the same for all chips you mentioned (barring any additional instrument-level features supported by the OPL3) and that the main difference would be that you would be able to set panning (probably tied to channels or notes rather than instruments) since the latter two setups (2xOPL2 and OPL3) support stereo.

I'm not basing this on any real info though - just speculation.

Nice pics, BTW.

Reply 22 of 26, by Kippesoep

User metadata
Rank Oldbie
Rank
Oldbie

For 2OPL2, the instrument data is the same. OPL3, on the other hand, is basically 2OPL2 with double the amount of waveform selections and the ability to combine four operators into a channel (rather than just two). There is no panning, since one of the OPL2s handles the left channel, the other handles the right channel. (This is still true for the 2 OPL2 chips in the OPL3). To simulate panning, you'd have to play the same note on both chips and alter their relative volume levels.

My site: Ramblings on mostly tech stuff.

Reply 24 of 26, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

well not sure if that is entirely accurate.
thought the double opl was for the soundblaster pro 2.0 latest version
but dunno. it's good for the understanding

Water flows down the stream
How to ask questions the smart way!

Reply 26 of 26, by Kippesoep

User metadata
Rank Oldbie
Rank
Oldbie

It might not actually have them inside, but that is how it manifests itself. The extra functionality acts as though one OPL2 exists at the base port and base+1, with a second at base+2 and base+3. It is enabled by writing bit0 in register 05' (register 05, but on the "second chip").

My site: Ramblings on mostly tech stuff.