Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request: VGM pattern #180

Open
ghost opened this issue Oct 24, 2023 · 5 comments
Open

request: VGM pattern #180

ghost opened this issue Oct 24, 2023 · 5 comments

Comments

@ghost
Copy link

ghost commented Oct 24, 2023

Hi

I would like to request a VGM pattern (video game music)
You can see the header here

https://vgmrips.net/wiki/VGM_Specification

I'm a total beginner and can't make this myself :(
I hope somebody can create this pattern (for latest VGM version)

@itsmeow
Copy link
Contributor

itsmeow commented Oct 26, 2023

I think a lot of pattern-writers are/were beginners once! I'd suggest taking a look at some other simple patterns to learn how it works and modify it as you go. I was able to make a basic one with no prior experience other than the documentation and the existing pattern files.

@paxcut
Copy link
Contributor

paxcut commented Oct 26, 2023

I looked at the specification for VGM and that's a fairly complex format. For what purpose do you need the ImHex pattern?

@ghost
Copy link
Author

ghost commented Oct 26, 2023

I looked at the specification for VGM and that's a fairly complex format. For what purpose do you need the ImHex pattern?

Exactly what you say: it's complex and i want to learn it using a pattern for imhex.
So that's why i'm interested in a pattern.

@WerWolv
Copy link
Owner

WerWolv commented Oct 26, 2023

To me the format looks fairly straight forward. It's just large.
My recommendation is to just start slow, maybe write a pattern that just parses the header and some of the data after it. Then once you got more comfortable, implement all the structs whose offsets are stored in the header.

As an example, I'd start like this:

#include <type/magic.pat>

struct Header {
    type::Magic<"Vgm "> ident;
    u32 eofOffset;
    u32 version;
    // ...
};

struct VGM {
    Header header;
}:

VGM vgm @ 0x00;

@paxcut
Copy link
Contributor

paxcut commented Oct 26, 2023

The complexity of the format far surpasses the complexity of the concepts needed to write a pattern in general. The absolute best way to learn a complex format is to write the pattern for it so that you learn all the intricacies of how the data is stored.

To me the format looks fairly straight forward.

Emphasis should be placed in the 'To me' part. To me a simple format is one I can read once and have a mental image of it. I couldn't do that with this one. But I second the recommendation. Learning the basics of pattern language is not difficult at all but rather easy instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants