Author Topic: MIDI: Glissando effects are not played correctly  (Read 480 times)

Claus

  • Posts: 4
I am using AIMP for playback of MIDI files, which in turn uses BASSMIDI.DLL for that purpose. I detected that glissando effects are not played correctly. According to the guys at aimp.ru, the problem is located in the DLL.

The attached ZIP file contains a MIDI and a MP3 which show this clearly: The MIDI (from the game The 7th Guest) starts with a glissando upwards over an octave. The MP3 (from the original soundtrack) demonstrates how it should sound.

Ian @ un4seen

  • Administrator
  • Posts: 26178
Re: MIDI: Glissando effects are not played correctly
« Reply #1 on: 15 Mar '23 - 14:36 »
The pitch wheel is used to create the glissando effect. It sounds like the wheel range has been increased in your recording, but there doesn't appear to be any such RPN0 event in the MIDI file, so BASSMIDI is using the default 2 semitones range. Other software that I tried playing the file with sounded the same as BASSMIDI.

How were you playing the file in the recording? If it's from the game then perhaps it has a non-standard default wheel range, and so doesn't need that set in the MIDI file. Adding a corresponding RPN0 event to the MIDI file should fix playback with other software.

Claus

  • Posts: 4
Re: MIDI: Glissando effects are not played correctly
« Reply #2 on: 16 Mar '23 - 15:21 »
I think we're talking about different things. Maybe glissando is the wrong term. Portamento would probably be more appropriate.

Ian @ un4seen

  • Administrator
  • Posts: 26178
Re: MIDI: Glissando effects are not played correctly
« Reply #3 on: 16 Mar '23 - 17:25 »
There are no portamento events in the MIDI file. It is the pitch wheel that's used to ramp up the pitch (in channel 7), and the issue is that the file doesn't set the wheel's range (via RPN0), so the standard default range of 2 semitones is used, which apparently isn't what's required. If you try playing the file in other software, you will hear the same problem. Comparing with your MP3 file, it sounds like the wheel range should probably be set to 12 semitones.

Ian @ un4seen

  • Administrator
  • Posts: 26178
Re: MIDI: Glissando effects are not played correctly
« Reply #4 on: 17 Mar '23 - 12:26 »
If you would like to try it, here's a copy of the MIDI file with a RPN0 event added at the start to set the pitch wheel range to 12 semitones in channel 7.

Claus

  • Posts: 4
Re: MIDI: Glissando effects are not played correctly
« Reply #5 on: 21 Mar '23 - 11:42 »
Yes, that's it! Wonderful. But a duration of 6:57 seems to be a bit long ;)

Anyway: Thank you for your support. You made an old man happy :)

But I still have two questions left:
1. How did you edit the file? Which editor did you use? I tried several MIDI editors, but none of them was able to open this file.
2. Where did you get the information that the default pitch sensitivity is 2 semitones? I couldn't find this default in my MIDI documentation.

Ian @ un4seen

  • Administrator
  • Posts: 26178
Re: MIDI: Glissando effects are not played correctly
« Reply #6 on: 21 Mar '23 - 16:17 »
Good to hear that it's sounding better now. The MIDI file is in SMF2 format, which is a bit unusual (SMF0 and SMF1 are more common) but I think it should still be readable by most MIDI editors. I used Cakewalk to open it and add the RPN0 event, but that's unable to write SMF2 files, so wrote SMF1 instead and may have changed some other things about the file (sounds like it unfortunately did).

The 2 semitone pitch wheel range default is in the GM1 and GM2 specs. Those specs are available from here:

   https://www.midi.org/specifications

GS and XG also have the same default.

Falcosoft

  • Posts: 210
Re: MIDI: Glissando effects are not played correctly
« Reply #7 on: 21 Mar '23 - 21:44 »
Hi,
Here is a fixed version that contains the misssing RPN and does not change the length. Also the Acoustic Bass instrument on channel 4 is not replaced to Acoustic Piano (like in Ian's version).
The game itself uses XMI format internally for music that is not the same format as SMF. The type 2 format can be explained by the conversion since tracks in multi track XMI files are supposed to be played one after the other.
BTW the only Midi system I know that uses 12 semitones as default is the Roland MT-32 so maybe this file was supposed to be played on it originally (although the instruments seem to be GM corrected).
« Last Edit: 21 Mar '23 - 21:53 by Falcosoft »

Claus

  • Posts: 4
Re: MIDI: Glissando effects are not played correctly
« Reply #8 on: 23 Mar '23 - 15:34 »
Thanks again. You are great  :)

You seem to know more about the game than I do. Unfortunately I don't own the original CDs any more. So I cannot check if there are any XMI files. I only got the 25th Anniversary Edition from Steam which shall include the old original, but there are no XMI files either. What a pity.

But Roland MT-32 tells me something. I remember that some ancient games offered the possibility to select Roland in the sound settings, if such a sound device was present. I am not sure if The 7th Guest was one of them, but I think so. So it's quite possible that these MIDI files are made for this device.

Maybe you could modify your DLL to make the default selectable? That could solve this problem for all files from The 7th Guest and The 11th Hour and maybe quite a lot of other MIDI files without modifying all the MIDIs. Just a suggestion.