• Welcome to Dark Bit Factory & Gravity.
 

uFmod + Freebasic

Started by Rbz, August 06, 2006

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ninogenio

ahh cheers jim i thought it might be something along those lines.

any idea if ufmod can return the audio data at whatever position the buffer is at? if not would it be a possibility to add such a feature?
Challenge Trophies Won:

Shockwave

This calls for some Karma for Nino and Jim, that's a feature I didn't realise was there!

If the frequency of a channel can be returned, a spectrum analyzer could be made.
Shockwave ^ Codigos
Challenge Trophies Won:

ninogenio

cheers shockwave yeah stuff like media player effects can be acheived through pitches and drops in the l/r channel volums.

it works pretty much the same as the bass.dll.
Challenge Trophies Won:

Jim

To get the frequency graph, you need to keep a track of the amplitude (volume) against time and use what's called an FFT (or DFT) to get the instantaneous frequency.  Frequency is defined as rate of change of amplitude vs. time.

Either you want to poll that call to get the volumes really fast (simple, but cpu intensive), or you need to get a pointer to the audio buffer (a few ms worth) when it gets delivered by the driver to the sound card (needs a change to ufmod I think - need to research that).

Jim
Challenge Trophies Won:

ninogenio

i can see that keeping track of time would be quite easy but returning a pointer would be handy aslo. anywho cheers jim.
Challenge Trophies Won:

DrewPee

Hello guys . . .
Im using FMod at the mo but it won't play protracker mods . . . and I have loads of tunes (other peoples!) i want to use!!!! Does UFMod play other types of mods?
I love FMod cos I have now written an equaliser around it . . . I don't really want to have to start again with new code for UFMod do i? has anybody found a way around getting an equaliser to work?

Drew
DrewPee
aka Falcon of The Lost Boyz (Amiga)
Ex-Amiga Coder and Graphic Designer
Administrator of > www.retrocomputermuseum.co.uk

Shockwave

You could load your protracker song into a modern tracker and then save it as an XM to make it work.

I like Ufmod because it's so tiny, I haven't made an equaliser with it yet though, I don't know about anyone else...
Shockwave ^ Codigos
Challenge Trophies Won:

DrewPee

slightly off topic . . . has anybody found a modern tracker program that actually works like the octamed or something like that works with vista????

Drew
DrewPee
aka Falcon of The Lost Boyz (Amiga)
Ex-Amiga Coder and Graphic Designer
Administrator of > www.retrocomputermuseum.co.uk

Rbz

Quote from: DrewPee on December 03, 2007
slightly off topic . . . has anybody found a modern tracker program that actually works like the octamed or something like that works with vista????

Drew
I don't have Vista here, but you can try Milkytracker or Madtracker, you can use both to load a .mod file and save to .xm file.
Challenge Trophies Won:

zawran

Slightly offtopic, sorry.

QuoteIm using FMod at the mo but it won't play protracker mods

I am fairly certain that the BASS library plays those mod files. But unfortunately I do not know how to use that with FreeBasic, perhaps someone else does..

Clyde

In the new version of Freebasic it comes up with

Quote
Compiler output:
C:\Program Files\FreeBasic\inc\win\mmsystem.bi(901) error 66: Incomplete type, before ','
type YIELDPROC as function (byval as MCIDEVICEID, byval as DWORD) as UINT
                                                ^
C:\Program Files\FreeBasic\inc\win\mmsystem.bi(901) error 56: Illegal specification, at parameter 2
type YIELDPROC as function (byval as MCIDEVICEID, byval as DWORD) as UINT
                                                           ^
C:\Program Files\FreeBasic\inc\win\mmsystem.bi(916) error 14: Expected identifier, found 'DWORD'
   songptrpos as DWORD
                 ^
C:\Program Files\FreeBasic\inc\win\mmsystem.bi(920) error 14: Expected identifier, found 'UINT'
   wType as UINT
            ^
C:\Program Files\FreeBasic\inc\win\mmsystem.bi(922) error 14: Expected identifier, found 'DWORD'
      ms as DWORD
            ^
C:\Program Files\FreeBasic\inc\win\mmsystem.bi(923) error 14: Expected identifier, found 'DWORD'
      sample as DWORD
                ^
C:\Program Files\FreeBasic\inc\win\mmsystem.bi(924) error 14: Expected identifier, found 'DWORD'
      cb as DWORD
            ^
C:\Program Files\FreeBasic\inc\win\mmsystem.bi(925) error 14: Expected identifier, found 'DWORD'
      ticks as DWORD
               ^
C:\Program Files\FreeBasic\inc\win\mmsystem.bi(941) error 14: Expected identifier, found 'DWORD'
   dwDCISize as DWORD
                ^
C:\Program Files\FreeBasic\inc\win\mmsystem.bi(942) error 14: Expected identifier, found 'LPCWSTR'
   lpszDCISectionName as LPCWSTR
                         ^
C:\Program Files\FreeBasic\inc\win\mmsystem.bi(942) error 123: Too many errors, exiting
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.


Challenge Trophies Won:

Jim

Are you sure you included windows.bi before mmsystem.bi?
Jim
Challenge Trophies Won: