Basic FMOD Ex support (patch included)

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
User avatar
k0da
Posts: 54
Joined: Thu Jan 25, 2007 8:39 pm

Basic FMOD Ex support (patch included)

Post by k0da »

I have created an archive containing new FMOD Ex code and also patch against the SVN for changes made to existing files. Download them at http://www.sturmspace.com/files/fmodex_patch.zip

Some experimental Win32 binaries can be found at http://www.sturmspace.com/files/zdoom_f ... may_07.zip.

Note: I only have the DX 8.1 SDK, so the Win32 binaries have the D3D9 framebuffer disabled.

It's still very much work in progress, but it does work. I would also appreciate feedback from Linux developers if they could test my changes.

My todo list:
- 3D sound
- Hardware support
- Software and EAX reverb
- MIDI/MUS music from memory, instead of writing to temp file using ProduceMIDI() function
+ (fixed) Fix music on snd_reset
- (FMOD author's are now looking into this) Make request (again) to FMOD Ex author's to fix FLAC loading so the ZDoom FLAC loader can be made redundant
- Integrate new CVARs with ZDoom menu system and modify existing settings to accommodate new code
- CD music
- Remove snd_midiforcefmodex and put FMOD Ex into MIDI device menu
- Fix playing of title music on snd_reset when not in game
- Use Other Music volume slider for FMOD Ex MIDI music

New/modified CVARs:
snd_interpolate
0 - No interpolation
1 - Linear
2 - Cubic
3 - Spline

snd_midipatch 0/1
Enable/disable loading of DSL patches for MIDI playback. To work needs snd_midiforcefmodex set to 1.

snd_midipatchfile (string)
Path to DSL patch

snd_midiforcefmodex 0/1
Enable/disable forcing of FMOD Ex for MIDI playback[/code]
Last edited by k0da on Thu May 24, 2007 6:54 am, edited 5 times in total.
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Post by Xaser »

Hmm... would this version, perchance, support Zxx filters (resonant, cutoff, etc.) in Impulse Tracker modules? Assuming that makes any sense? That could be *very* useful for certain things, really.
User avatar
k0da
Posts: 54
Joined: Thu Jan 25, 2007 8:39 pm

Post by k0da »

I've found a topic on the FMOD Ex forums about Zxx macro callbacks, but I don't think this is what you want.

Hmm... I found this line in the FMOD Ex changelog:
+ .IT music support now supports resonant lowpass filtering.

Is that relevant?
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Post by Xaser »

Actually, yes. I wouldn't know the means of applying the patch to test it for myself, but that sounds like exactly what I'm hoping for. It has to do with special effects in music, all that technical mumbo-jumbo. I'm surprised even I know what it means, and I've (ab)used the things before. :P
User avatar
k0da
Posts: 54
Joined: Thu Jan 25, 2007 8:39 pm

Post by k0da »

I've provided Win32 binaries.
User avatar
Nash
 
 
Posts: 17487
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

Not bad. Still a long way to go though.

Two things:

1) Music is choppy. Also, the "synthesizer" slider for my Windows volume control doesn't have any effect on the music (I had it to mute at the time and I still heard music using your EXE).

2) Stereo panning doesn't seem to exist. The stereo field also sounded weird in general.

I see these on your to do list, I know. But just giving some opinions. :)

Keep up the good work! Hopefully this eventually makes it into the official version and get rid of fmod.

Can't wait for the software reverbs. ;)
User avatar
k0da
Posts: 54
Joined: Thu Jan 25, 2007 8:39 pm

Post by k0da »

Nash: FMOD Ex uses its own internal MIDI playback engine, so that's why you can't control the volume outside of ZDoom. Do other forms of music such as modules and OGGs sound choppy? I'll take a look at the stereo panning... my Windows box has speakers next to each other so I haven't noticed this myself. Thanks for the feedback.
User avatar
k0da
Posts: 54
Joined: Thu Jan 25, 2007 8:39 pm

Post by k0da »

Okay try downloading it again... I forgot to re-enable some code I commented out :oops:.
Lamneth
Posts: 187
Joined: Thu Apr 26, 2007 12:00 am
Location: Dark Falz's chamber

Post by Lamneth »

You said above Win32 binaries were included, but I don't see them... forgot to put them in there?
User avatar
k0da
Posts: 54
Joined: Thu Jan 25, 2007 8:39 pm

Re: Basic FMOD Ex support (patch included)

Post by k0da »

k0da wrote:... Some experimental Win32 binaries can be found here.
I'll make it bold so it stands out more ;).

Edit: patch updated to fix a compile error that would appear on Linux. That's not say others won't.
Lamneth
Posts: 187
Joined: Thu Apr 26, 2007 12:00 am
Location: Dark Falz's chamber

Post by Lamneth »

Gave it a shot, messed around with it, exited when I was done, crashed.

It won't let me upload the crash report zip as an attachment. :? So I uploaded it here.

http://filexoom.com/files/2007/4/25/715 ... Report.zip
User avatar
Mannequin
Posts: 441
Joined: Tue Jul 15, 2003 8:21 pm
Location: On The Lonely Island somewhere.

Post by Mannequin »

k0da wrote:Nash: FMOD Ex uses its own internal MIDI playback engine, so that's why you can't control the volume outside of ZDoom. Do other forms of music such as modules and OGGs sound choppy? I'll take a look at the stereo panning... my Windows box has speakers next to each other so I haven't noticed this myself. Thanks for the feedback.
That, to me, seems like a poor choice coming from the FMOD Ex developers. How many people do you know that know where the Windows volume control is? If someone wanted to play ZDoom muted from the start (let's say they have kids sleeping in the next room with poor insulation or something), they would mute Windows' volume first in an attempt to stop any noise before it happens.

-M.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Mannequin wrote:
k0da wrote:Nash: FMOD Ex uses its own internal MIDI playback engine, so that's why you can't control the volume outside of ZDoom. .

Since FMOD Ex creates its own sound from the MIDI data it has to mix it in the digital output. There's no other way to implement a MIDI player outside the system.
MIDI playback with the old FMOD is a nightmare because its volume control is the same as the system global which makes it perfectly useless for serious use and was one of the reasons why ZDoom had to implement its own MIDI player.
User avatar
k0da
Posts: 54
Joined: Thu Jan 25, 2007 8:39 pm

Post by k0da »

Lamneth: Did you by any chance restart the sound through the menu or console?

Mannequin: I meant you is can't control the volume with the MIDI volume slider. The main volume slider and wave slider will adjust it.

One advantage of the new FMOD Ex MIDI playback system is that it's crossplatform. This will be great for Linux users, so they won't have to fiddle around with Timidity if all they want is basic MIDI output.
Lamneth
Posts: 187
Joined: Thu Apr 26, 2007 12:00 am
Location: Dark Falz's chamber

Post by Lamneth »

Yes, I did restart it (more than once) through both the menu and the console.
Post Reply

Return to “General”