Decode V2 Modules (*.v2m) to wave with .NET
category: code [glöplog]
Well, as the topic already tells I am in search of a way to decode farbrausch V2 Music modules with only .NET. I prefer the pure managed way to play music without shipping dlls with my final executable. Any hints how to start? How is the structure of a v2m file? I need to decode them and call a waveout to play v2m module from the ressources.
Greetz,
-Freefall-
Greetz,
-Freefall-
PS: If you help me guys I can finally release some new musicdiscs ;)
Sounds like quite a challenge. You could use managed C++ and include the native/unmanaged replayer if you're dead set on not including extra files alongside the exe. The other (less favorable) route would be porting Ryg's C++ port of the V2 replayer to C#.
Personally, I'd just make a native wrapper DLL and call that from your .Net app using pInvoke or whatever. Otherwise it's a massive amount of work just to avoid carrying an extra DLL in your distribution. I'm not sure of the state of Ryg's replayer port. Last time I checked (September 2012 or so), there were a few slight playback issues.
Personally, I'd just make a native wrapper DLL and call that from your .Net app using pInvoke or whatever. Otherwise it's a massive amount of work just to avoid carrying an extra DLL in your distribution. I'm not sure of the state of Ryg's replayer port. Last time I checked (September 2012 or so), there were a few slight playback issues.
Well I also thought about this. I looked at the source code and realized that most of the source code was made in Assembler -.- In other words: it isn´t just porting from C++ to C#/VB .NET ... I wrote a mail to ryg asking for help, also tried to contact kb without any Response yet. Sux. I would try to port directly to C#/VB if it would be only C++. I also asked on several Forums for help and the only resulting way was to play v2m Music from ressources with the netmodule way.
pinvoke and netmodules are a ugly way to do this...
pinvoke and netmodules are a ugly way to do this...
Quote:
I looked at the source code and realized that most of the source code was made in Assembler -.-
Then you must have looked at the "original" V2 player by kb, and not ryg's C++ port.
I looked at this source:
https://github.com/farbrausch/fr_public/tree/master/v2
they said there, they need sb to "port the asm code to C++ to make it maintainable". Is this not up to date anymore? Is there a full C++ SC?
https://github.com/farbrausch/fr_public/tree/master/v2
they said there, they need sb to "port the asm code to C++ to make it maintainable". Is this not up to date anymore? Is there a full C++ SC?
Check synth_core.cpp.
"
Serious inquiries (and by serious I mean either detail questions that tell me
that you got the obvious stuff or volunteers to port the thing to C++ to make
it actually maintainable) to kb@kebby.org :)
"
Serious inquiries (and by serious I mean either detail questions that tell me
that you got the obvious stuff or volunteers to port the thing to C++ to make
it actually maintainable) to kb@kebby.org :)
"
So the synth core is not the port of synth.asm, otherwise they wouldn´t write this. Right?
synth_core.cpp is a straight port of synth.asm to C++ by ryg. It seems to play some v2m files correctly and is untested beyond that, but any problems still in it should be minor.
Also, that sentence you quoted was written before he did it. As visible in the file dates.
Also, that sentence you quoted was written before he did it. As visible in the file dates.
Ok good to know that kebby, thanks for your reply. You should better keep the readme up to date to prevent these questions ;)