Author Topic: uFmod + Freebasic  (Read 23725 times)

0 Members and 1 Guest are viewing this topic.

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: uFmod + Freebasic
« Reply #20 on: May 06, 2007 »
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:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: uFmod + Freebasic
« Reply #21 on: May 06, 2007 »
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:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: uFmod + Freebasic
« Reply #22 on: May 06, 2007 »
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:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: uFmod + Freebasic
« Reply #23 on: May 06, 2007 »
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:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: uFmod + Freebasic
« Reply #24 on: May 07, 2007 »
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:

Offline DrewPee

  • I Toast Therefore I am
  • Pentium
  • *****
  • Posts: 563
  • Karma: 25
  • Eat Cheese - It's good for you!
    • View Profile
    • Retro Computer Museum
Re: uFmod + Freebasic
« Reply #25 on: December 03, 2007 »
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

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: uFmod + Freebasic
« Reply #26 on: December 03, 2007 »
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:

Offline DrewPee

  • I Toast Therefore I am
  • Pentium
  • *****
  • Posts: 563
  • Karma: 25
  • Eat Cheese - It's good for you!
    • View Profile
    • Retro Computer Museum
Re: uFmod + Freebasic
« Reply #27 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
DrewPee
aka Falcon of The Lost Boyz (Amiga)
Ex-Amiga Coder and Graphic Designer
Administrator of > www.retrocomputermuseum.co.uk

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: uFmod + Freebasic
« Reply #28 on: December 04, 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:

Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: uFmod + Freebasic
« Reply #29 on: December 04, 2007 »
Slightly offtopic, sorry.

Quote
Im 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..

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: uFmod + Freebasic
« Reply #30 on: September 21, 2010 »
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:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: uFmod + Freebasic
« Reply #31 on: September 21, 2010 »
Are you sure you included windows.bi before mmsystem.bi?
Jim
Challenge Trophies Won: