rhargreaves / mega-drive-midi-interface

Control the Sega Mega Drive's Yamaha YM2612 and PSG with MIDI
GNU General Public License v3.0
95 stars 8 forks source link

DrumBank no sound #36

Closed KPY7030P closed 2 months ago

KPY7030P commented 3 months ago

Hello! Thank you very much for your project, it is the greatest find! I write music and do performances thanks to your development.

I'm currently writing an instrument bank and trying to create a ROM with that bank, but I'm having trouble playing some of the instruments in the percussion bank. Judging by the indicators, the sounds are switching, but I cannot hear the sound itself. I use Blastem. could you help with this? presets.zip

rhargreaves commented 3 months ago

I've had a go with those presets and I'm able to produce sounds OK. Since it's the percussion bank you're trying to use, have you first directed MIDI channel 10 to an FM channel? By default when the interface starts MIDI channel 10 is assigned to PSG 4 (noise). Either send a General MIDI reset SysEx to the interface which will put it in dynamic mode, which will direct percussion notes sent to MIDI channel 10 to an available FM channel by default. Or, you can specifically map MIDI channel 10 to an FM channel (let's say Ch 1) by sending SysEx 00 22 77 09 00

KPY7030P commented 3 months ago

(the video has sound)

https://github.com/rhargreaves/mega-drive-midi-interface/assets/22715416/3bcff29a-044f-4528-8288-fe31dfd833f5

Hi! of course, I used SysEx to reassign channels. And some presets sound right, but some just don't make any sounds and that's weird. I can see the settings switching in the interface, but I can't hear the sound. However, it only works correctly with some sounds. I'm trying to figure out what's the matter, how the ROM is built or something else. if you check my ROM, I will be grateful to you.

I have attached to you an archive with the output files. maybe this will help you figure it out. Sincerely, Ilya out.zip

rhargreaves commented 2 months ago

Hmm that is a bit strange... Can't think of anything off the top of my head. Is that a build from the master branch? Maybe try with the code tagged 1.20a? Sometimes the master branch isn't the most stable, depending on what I'm working on at the time.

KPY7030P commented 2 months ago

I have great news! I solved this problem. The thing is that my presets for drums on the stereo setting had the wrong parameters. in this parameter you need to set “3”, but I had “0”. Therefore, there was no sound in many drums. I don't know how correct this is. However, when I compared the original preset file and my own, I discovered this. after I changed the setting to "3", all the sounds started playing and it's amazing!! However, if these presets are in an instrument bank and not a drum bank, then a stereo setting of “0” does not interfere with sound reproduction. Perhaps we should make the interpretation of instrument presets and drum presets the same? image

rhargreaves commented 2 months ago

Ahh good spot! I can see now from the video that the "Pan" value was empty on the display - signifying mute. That is most certainly a bug. It is also overriding any MIDI Pan value on the percussion channel. I shall look into fixing it for the next release. Thanks for reporting :)

To be honest the preset definition struct was implemented a bit lazily on my part. It's the same internal struct used to represent the state of the FM channel and as such it contains values that make no sense to be defined at the preset level (e.g. freqNum, octave, stereo). I probably should have created separate preset structs to avoid confusion.

I do wonder also if I should make the Pan "mute" value more obvious on the FM channel OSD. It's not a typical value that most people would want...

rhargreaves commented 2 months ago

FIxed in v1.21.