#8940 closed patch
Custom percussion instruments for the AdLib MIDI driver
Reported by: | jvprat | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | Audio |
Version: | Keywords: | ||
Cc: | Game: |
Description
The attached patch adds custom instruments support to the AdLib MIDI driver. It lets the Groovie engine to play the AdLib music properly without having to use the FMOPL driver directly. I've used 'ADLP' as the sysex type, adding P for percussion to the standard AdLib instruments (I guess that's an internal constant). With this each key can be associated to an AdLib instrument definition and the absolute note that should be played.
In addition, the patch removes the empty implementation of AdlibPercussionChannel::controlChange(), which lets the volume to be set properly for the percussion channel. If the other controls need to be ignored, a personalized implementation could be done.
I'm submitting it to the tracker because it's my first time with AdLib instruments and I don't know whether this approach is good enough, or maybe it should be changed to a more general solution. Thanks in advance to any reviews.
Ticket imported from: #2357165. Ticket imported from: patches/1045.
Attachments (1)
Change History (5)
by , 16 years ago
Attachment: | adlib-percussion.patch added |
---|
comment:1 by , 16 years ago
comment:3 by , 16 years ago
Status: | new → closed |
---|
comment:4 by , 6 years ago
Component: | → Audio |
---|
I don't see anything bad about adding that 'ADLP' type for sysEx_customInstrument.
I'm a bit unsure about direct copying of the passed data into a AdlibInstrument struct though. After all the struct is not packed, so it could contain alignment bytes. Thus I would rather just setup the struct per hand, if the passed data is really a simple byte stream of the data stored in AdlibInstrument.