Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - shadyparadox

Pages: [1]
1
The loop information is not a MIDI command. The aforementioned MIDI loop controllers that Kawa mentioned are for customized versions of MIDI. EMIDI, for instance, is only used for 3D Realms' Build game engines (Duke3D, Shadow Warrior). The others would also be proprietary. There wouldn't be any way to implement it for everything to understand. If you want it to loop, you have to program in the loop functionality yourself in whatever your project is (that's what game developers did, and that's why the SCI developers made it a specialized data cue entry specifically for SCI sound resources and not a standard MIDI controller event). If you want it to loop in some other kind of project, you could open it in a DAW like Cakewalk (free) and set loop points yourself at the proper MIDI events or just copy and paste the selection of MIDI events and repeat it manually. There is no one consistent universal MIDI loop command so as I see it this is not feasible to implement nor is it within the scope of what should be implemented IMO.

OK, I'm willing to do that manually. Is there a way to extract the loop information from the snd file just so I have an idea where to put the loop in my MIDI project? I'd prefer to have a way to get some technical information on it rather than solely guessing.

2
If you want to just record the MIDI, a simple option might be using the 'dump-midi' flag that I've added to ScummVM - it dumps all MIDI commands that the game creates during play, including SysEx.

Instructions:

Code: [Select]
scummvm --dump-midi
This will create a 'dump.mid' file in the local directory.
- If there is already such file, it will be overwritten
- The file will be created when quitting from the game, either from the game's menu, or from ScummVM's Global Menu (and not when quitting by clicking 'X' to close the window)

It will not automatically rip all sound tracks at once, as you might prefer, but it will create an exact recording of all MIDI commands created as you play.

Note however, that it will record only midi, and not other sounds such as digitized effects or voices, so it might be better to turn off options like "prefer digital sound effects", or "Mixed AdLib/MIDI mode".

Thanks, I'll keep it in mind if the direct method fails. It sounds similar to the first method I tried, which was to use the MIDI recorder in DOSBox. The problem there was that the files didn't seem to quite import properly, as some notes sustained instead of turning off when they were supposed to.

The other problem with recording in-game is that some sounds aren't easily accessible in the game, if they're even available at all.

3
Me, I'm content to export the files from the games as MIDI. And if the tempo is incorrect, I can change it in a MIDI Sequencer/DAW.

This would be my preference as well. But the exported MIDI doesn't have any loop information. So how do you get accurate loop information into the project?

4
I was talking about changing the tempo. The loop cue data is SCI specific and not a standard MIDI controller...at least I don't think it is...

Right, so what do you do when you want to record something from the games? I assume you've done it before, or at least whoever recorded all the Quest Studios stuff did somehow.

5
I'd love to just compile my own local version with the "+1" removed, but I'm not exactly the sharpest coder. I tried but I got lost in Visual Studio land.
I just looked for void MidiPlayer::_OnStreamDone(). Here's a fresh build with the "+1" removed, just for you.

Frankly, testing this on one of the songs from The Dating Pool, it seems to loop a little bit better now? Could be placebo effect, I dunno, try it yourself.

Thank you!! That seems to resolve that particular issue.

But...  :-\

Now as I've played around with it a little more, I've discovered that this program still doesn't reliably loop all the songs correctly, despite the fact it plays all the notes now.

Maybe the solution for my purposes is to just extract all the MIDI and import it into a proper editor and record from there. Unfortunately, that's going to present a bit of a learning curve for me.

No, in a MIDI sequencer/editor on the resulting MIDI file output. Lots of free options. Anvil Studio, MIDI Editor, and the DAW I use, Cakewalk Bandlab.

I was able to import into both MIDIEditor and Cakewalk, but regardless of which of those I should use, how do I import the loop information? Do I have to approximate it manually or is there a way to import it straight from the game resources for better authenticity? That's why I was hoping to do everything in the SCI programs in the first place.

6
You could just calculate the 4% difference and change the tempo to compensate.

In SCI Viewer? How?

it's well known that the original tools used to convert AGI sounds to MIDI had a timing issue as well. They used a tick duration of 1/64 sec instead of the correct value of 1/60 sec. Is it possible that a similar error exists in the SCI tools? That equates to an error rate closer to 6%.  IDK how sounds are stored in SCI resources, and/or converted to MIDI so this might not be relevant.

I just compared the files again to be sure, and I'm getting a difference of about 4.03%.

I was going to switch to SCI Companion, but that has an even dumber problem. The MIDI playback tool has a very silly bug in it. It plays at the right speed, but it only plays notes AFTER the loop point, and not the ones ON the loop point like it should. This results in a lot of sound cutting out.

Looking at the code, it seems this is quite explicit, I even added a comment to that effect:

Code: [Select]
void MidiPlayer::_OnStreamDone()
{
    if (!_fStoppingStream)
    {
        // There is more to this stream... keep going.
        if (_cRemainingStreamEvents)
        {
            _CuePosition(_cTotalStreamEvents - _cRemainingStreamEvents);
        }
        else
        {
            if (_dwLoopPoint != SoundComponent::LoopPointNone)
            {
                // Cue the loop point. We start playing events *after* the loop point, not at the loop point.
                CueTickPosition(_dwLoopPoint + 1);
            }
            else
            {
                Stop();
            }
        }
    }
}

I'm not sure why I thought that though. Maybe it's true for some SCI versions and not others? I wonder what ScummVM does.

Oh wow. I just assumed it was due to someone not paying attention, but if it is deliberately coded like that, I'm sure you had a reason.

However, for the games I'm loading (KQ6, SQ4), it's definitely not correct. I'd love to just compile my own local version with the "+1" removed, but I'm not exactly the sharpest coder. I tried but I got lost in Visual Studio land.

7
movies made in the U.S. played 4% faster in his region due to NTSC and PAL differences.
An interesting coincidence, but I don't buy it: NTSC/PAL framerate differences aren't a thing when you're talking about MS-DOS PC games, nor MIDI timing.

Perhaps it doesn't literally use the same units, but is there any chance something could happen while converting units in a similar fashion?

8
It doesn't play faster for me in SCI Viewer that I've noticed...I suppose it might be possible that I just haven't noticed. What version of SCI Viewer are you using?

It doesn't tell me a version, it just says Copyright 2007.

Considering it's MIDI that's playing, it's understandable that a 4% speed boost would go undetected. It was kind of surreal how I found it. I placed my recording side-by-side with a recording from Quest Studios and noticed theirs was slightly slower. As I was calculating the difference, one of my viewers (I was streaming at the time) pointed out that movies made in the U.S. played 4% faster in his region due to NTSC and PAL differences. It turned out that was exactly the difference in the two recordings, so I'd be curious if there's a connection there.

9
This part gets me. I've been wondering about that myself and I really should check to see if it's just a bug in SCI Companion's player that doesn't reflect what the actual game does.

Having no idea how the code works, it sounds to me like a one-keystroke bug, like ">" vs. ">=" or something.

Quote
SCI Studio only really works on old SCI0 games, the ones in 16 colors with the text parser.

OK. I only opened it briefly because I was getting frustrated with the other tools, but good to know, I won't bark up that tree anymore.

Quote
You'd have to make sure to grab the right patches as well, depending on the source game.

I mean, I'll do it if I have to (I'd have to learn how), but I really hope it doesn't come down to this.

10
As it says in the title, all I'm trying to do is record some audio of the MIDI sounds of some old Sierra classics using a couple Rolands I have sitting on my desk. I feel like the task shouldn't be that difficult so I'm kind of embarrassed I can't figure it out on my own, but I'm having technical issues at every turn.

I could try to record while they're playing in the game, but I need more control than that. There's often other stuff going on in the game at the same time, and sometimes it cuts off early if the scene changes. Some sounds don't even play in the game. So I need some kind of tool.

I would just extract the MIDI files and play them under any interpreter, but I need the loop information as well.

So it makes sense to play the files directly within one of the SCI resource tools. However, each one has a silly problem that prevents me from recording it accurately.

I started recording using SCI Viewer, but it turns out it plays the MIDI files about 4% faster than intended. Someone explained the reason to me once but I forgot what it was. The important thing is that I don't see a way to play MIDI files using SCI Viewer at the correct speed.

I was going to switch to SCI Companion, but that has an even dumber problem. The MIDI playback tool has a very silly bug in it. It plays at the right speed, but it only plays notes AFTER the loop point, and not the ones ON the loop point like it should. This results in a lot of sound cutting out.

I would try SCI Studio, but it doesn't load any game I've thrown at it. It just always gives the same error, "Resource package/map file identifier mismatch! The game you are trying to open is incomplete, corrupt, or not the correct version!"

So what do I need to do? Program a whole new "game" in SCI Companion just to play MIDI files? This was not supposed to be a big deal.

Pages: [1]

SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.12 seconds with 23 queries.