Next Page

vgmstream equivalent for sequenced files by jurassicPieter at 6:23 AM EDT on August 4, 2009
I'm thinking of working on an equivalent of vgmstream for sequenced music. First reason I want this is that my winamp plugin map is a mess. Often the file formats are associated with multiple input plugins.
Second, it's easy to make a container format that contains a soundfont(or reference to it) and a midi. There's extended midi with soundfonts added to it, but it's very badly supported to make them.
Third, it might be a good start to figure out unknown sequenced formats, like many gamecube titles. Or embed a stream and mix it with sequences, like they did with Super Mario Galaxy.

The only difference with vgmstream is that it needs a custom container file format instead of playing the originals.

my idea was to make a container file format that works with the typical chunks structure.

char[4] signature;
uint32 size chunk;
char[size] data;(could contain subchunks)

for example a midi with soundfont would look like this:

MAIN chunk
size of file
player number: 0x0001 = midi with embedded soundfont
--IDV3 chunk
--size of tagging info
--tagging info, like artist, looping, etc.
--MIDI chunk
--size of embedded midi-header
--midi-file
--DLS chunk
--size of embedded dls-header

the player number is used to get the right playing information:
0x0000: midi with general midi soundfont gm.dls in windows\system32\drivers\
0x0001: midi with embedded dls-header
0x0002: midi with external dls-file
0x0003: play midi file with 8-bit sounds
0x0004: sseq with embedded sbnk/ssar-file(s)
0x0005: sseq with external sbnk/ssar-file(s)
0x0006: IT/XM/S3M
etc.

and what extension and name should this plugin have?

suggestions are welcome. If people find it a good idea i plan starting making a skeleton code that should make it easy to write a player that just has to send sequence data and soundbank information.
by hcs at 1:01 PM EDT on August 4, 2009
Sounds like an interesting project, if a bit ambitious. I know Destop did something like this for N64 music before USF came into being, though just targeting the main CSeq system. One issue (that you might encounter elsewhere) is that MIDI or MIDI-esque formats have a lot of potential for custom controls. I know this is one of the things I encountered when trying to do generic USF ripping, stuff like custom vibrato controllers (iirc) were more common than I'd have expected.
by Mouser X at 3:34 PM EDT on August 4, 2009
For the file extension, the first thought that comes to my mind is *.GENS for "GENeric Sequence" (since the first thing I thought of when you mentioned a container format was GENH), but that might be confusing to people who use the Genesis emulator GENS.... Perhaps *.SEQC for SEQuence Container?

It's an interesting idea you've got, but I have to agree with HCS - this might be rather difficult to achieve. Good luck. I don't have any additional input, but if I can help, I'd be happy to. Mouser X over and out.
Re: by jurassicPieter at 5:48 AM EDT on August 8, 2009
thank's for the ideas. I brainstormed a little bit about it. The biggest problem so far is indeed custom effects(could be covered with scripts or is that too slow for dsp?) and the conversion from instrument+soundbank to a stream format that winamp plays.

I have some programming experience with playing sequences with the fmod library, but fmod is not capable of sending individual midi messages, just a matching midi and soundbank support(and with file callbacks i could read data from this generic sequence container format).
And i wrote a lua script version for generative music working on the old-fashioned sleep and midiOutMsg functions. Sadly it was hard to make good generative music so i haven't done anything with it anymore.

I don't have experience with winamp plugin programming yet.

Originally vgm format and adplug were also meant for emulating every format if i recall.

As for lua: when i was thinking about it you could make dynamic streams played. Like picking the right looped music like they used in the halo games or make Conker's Sloprano dynamic(you could even make a small UI to 'control' it).
by manakoAT at 2:24 PM EDT on September 3, 2009
just wanted to know, if you still work on it :o)
Re: by jurassicPieter at 6:27 PM EDT on September 3, 2009
well i haven't got much feedback from any of you, so it was a bit on low priority. I tried to look at libraries that convert midi-data to an audio stream to start with and i think softsynth is easiest to integrate with winamp and i have a skeleton version so far that should play a 'scf-file' that uses a chunk-based format and ignores unknown chunks(similar like the 3ds-format chunk structure). Now all i need is a simple midi player container file that uses gm.dls which was the next step to try.

As for my idea of lua to make dynamic streams playable: it's hard to integrate in vgmstream and i have no idea how to make seeking work, especially because of the way how lua-script code is executed.
by jurassicPieter at 1:14 PM EDT on October 13, 2009
I've been working on it to also test RSEQ's generated and the start of sequenceStream is made:

- file extension is sqf. File contents is just a lua script.
- midi rendering is done with fluidsynth. timidity seems to only have documentation to use it as a standalone app, so fluidsynth was my choice.
- the lib contains of 3 types of Classes: FileReaders, Sequencers and Soundbanks
- FileReaders is what you sent to sequencers and soundbanks. FileReaders have all reading functions including variable length reading and chunk reading. So far there's a complete file reader, a subfile reader and a memory file reader.
- sequencers contain the decoding a file to midi events that are sent to the system. So far my experimental RSEQ(inside brsar files), MIDI and SSEQ(taken from sseq2midi) are working.
- soundbank support is sf2 only which is standard soundfont support in Fluidsynth. RBNK, SBNK and DLS are next
- i made batch files that generate sqf files for brsars.

I made a first version that plays, but I'm rewriting it so it's better written and easier to edit.
by hcs at 6:08 PM EDT on October 13, 2009
Awesome, look forward to checking this out.
by arbingordon at 7:20 PM EDT on October 13, 2009
i dont get it but it sounds interesting
cant wait to see the fruits of your endeavors
by jurassicPieter at 3:55 AM EDT on October 17, 2009
added next couple of things
General:
linked with boost functions instead of stl gave me a big speed boost.
get info and title are linked to a lua script function, so you can add tagging support.
adding comments so people can help with adding file support in the future.
looping support working, though still experimental

FileReaders:
zipped files:
I talk about gz, not zip. Reduces file size, and seeking works even though it's slow.
files in archived files:
Now it expects the archive to be tar, but just one virtual function needs to be overwritten for different types or archives.

Soundfonts:
Pokemon Box wt+pcm format:
probably the first released set once i release the plugin since the game uses midi and a simple wt+pcm format.

edited 3:57 AM EDT October 17, 2009

Next Page
Go to Page 0 1 2 3

Search this thread

Show all threads

Reply to this thread:

User Name Tags:

bold: [b]bold[/b]
italics: [i]italics[/i]
emphasis: [em]emphasis[/em]
underline: [u]underline[/u]
small: [small]small[/small]
Link: [url=http://www.google.com]Link[/url]

[img=https://www.hcs64.com/images/mm1.png]
Password
Subject
Message

HCS Forum Index
Halley's Comet Software
forum source