Author Topic: Tiny Future Composer Player for C/C++, FreeBasic and PureBasic  (Read 22576 times)

0 Members and 1 Guest are viewing this topic.

Offline slippy

  • Atari ST
  • ***
  • Posts: 172
  • Karma: 42
    • View Profile
Quote
Tiny Future Composer library for Win32
--------------------------------------
04/10/2007

This library is a tiny implementation of the well-known and famous amiga-based Future Composer sound format

Credits:
Original FC replayer core coding by Michael Schwendt (back in 1997)
optimized and packed as static library with own background threaded DirectX replayer by SLiPPY/VeCTRONiX!



Usage
-------

int FC_Initialize(bool inMem, void* pMusicBuffer, int inMemSize, char* filename);
called once for initialization of the replayer
either use it with a pointer to the FC module or provide a filename for it (don't forget the inMem switch)

int FC_StartPlayer();
starts the current song

int FC_StopPlayer();
stops the current song


Perhaps you might want to add additional language bindings ... :)

As this package is more than 300kb it's not attached ... so you may download it here

Have fun using it ...

SLiPPY
« Last Edit: October 05, 2007 by slippy »

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Awesome work, slippy. Thanks so much for releasing this lib !!!
K++
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
That is indeed awesome work.

For Freebasic users, which files go where please Slippy dude?

Ps. Where do we get Future Composer modules?

Cheers and all the very best,
Clyde
« Last Edit: October 05, 2007 by Clyde »
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline stormbringer

  • Time moves by fast, no second chance
  • Amiga 1200
  • ****
  • Posts: 453
  • Karma: 73
    • View Profile
    • www.retro-remakes.net
@Clyde: go here: http://www.exotica.org.uk/frames.html and select Tunes and then you have a list of tunes per format. Search for FutureComposer (FC13 FC14) and you get a link with dozens of them

or you can find some others here too: ftp://ftp.modland.com/pub/modules/
We once had a passion
It all seemed so right
So young and so eager
No end in sight
But now we are prisoners
In our own hearts
Nothing seems real
It's all torn apart

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Thanks for the links Stormbringer dude :)
« Last Edit: October 04, 2007 by Clyde »
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Great library slippy, well done

 :cheers:
Challenge Trophies Won:

Offline va!n

  • Pentium
  • *****
  • Posts: 1435
  • Karma: 109
    • View Profile
    • http://www.secretly.de
cool... cant test it atm :(  will take closer look later when i get back own internet... (i die without internet and livestream radio ^^)
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

Offline energy

  • Amiga 1200
  • ****
  • Posts: 280
  • Karma: 25
    • View Profile
 :goodpost:
Hi Slippy!
Thanks for this great peace of soft...

Purebasic 4.1Beta3
Tested DLL included in Exe.... runs perfect....    ;D

But a Problem with Static Lib from the VC++ Folder...
Compiler gets an error: "Unresolved external symbol: __iob_func"    ???
Dsound.lib is included...
Can yu help me?
Thanx
Best regards
eNeRGy

coding: jwasm,masm
hobby: www.scd2003.de

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
I use Freebasic, and am unsure where to put the relevant files. Is there a readme?

Cheers and awesome stuff,
Clyde
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17412
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
K++ For the great lib!

Clyde, treat the files the same as the tinysid lib files.
In fact if you put them all in your usual source directory it should even work like that.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Thanks dude.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline slippy

  • Atari ST
  • ***
  • Posts: 172
  • Karma: 42
    • View Profile
@Clyde: apologies for not including a simple readme.txt - thought my samples would answer most of the usage questions ;) Anyway ... just do it like Shocky said ... :)

@energy: static linking with PB? Perhaps you might want to use the library which is located in the MinGW folder ... this one works very well for FB ... else I have to hand over the question to a PB-crack here ;)

@rest: thanks for your feedback ... :)

Cheers,
 SLiPPY

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17412
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
The sample listings were clear enough Slippy :) and anyway, any problems that come up can be answered here... You do not need to apologise for anything! It's a great lib and I'm grateful for it! So will most other people.  :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
I think its an awesome library and am going to produce a production with it.

I've put the libstc++.a and the libtiny_fc.a into the lib folder, and the tiny_fc.bi into the include folder. And this is an experiment with your neat library in conjunction with tinyptc / tinyptc_ext

Code: [Select]
Option Explicit
Option Static


#Include Once "tinyPTC.bi"
#include Once "tiny_fc.bi"
#Include Once "Windows.bi"

Const XRES=640
Const YRES=480
Const ARES=XRES*YRES

Dim Shared ScreenBuffer( ARES )
dim shared dummy as integer



If( ptc_open( "testing", XRES, YRES ) = 0 ) Then
    End -1                                    
End if


initFC(0, @dummy, 0, "sample.fc")
startFC()

Dim Key As String

While Key<>Chr(27)
    
    
    PTC_Update @ScreenBuffer(0)
    key=Inkey

Wend


stopFC()
PTC_Close()

But I don't get any sound at all, and also the program crashes when it ends on a key press. It might be something I am doing wrong. Btw, im using FB 17

Cheers,
Clyde.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17412
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Do the example programs that Slipy provided compile and run Clyde?
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Yes they do dude.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17412
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Then in that case you should use that code as your base and build around it.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
More Karma for you Slippy++, and thanks for the tip Shockwave.

Changed around a few things and it works. Hoe this basis is of use to others too.

Code: [Select]

Option Explicit
Option Static


#Include Once "tinyPTC.bi"
#include Once "tiny_fc.bi"
#Include Once "Windows.bi"

Const XRES=640
Const YRES=480
Const ARES=XRES*YRES

Dim Shared ScreenBuffer( ARES )
dim shared dummy as integer

initFC(0, @dummy, 0, "sample.fc")
startFC()

If( ptc_open( "testing", XRES, YRES ) = 0 ) Then
    End -1                                   
End if




Dim Key As String

While Key<>Chr(27)
   
   
    PTC_Update @ScreenBuffer(0)
    key=Inkey

Wend


PTC_Close()
stopFC()
« Last Edit: October 05, 2007 by Clyde »
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline slippy

  • Atari ST
  • ***
  • Posts: 172
  • Karma: 42
    • View Profile
@Clyde: Glad you like the lib ... and hey, of course I'm looking forward to see your prods using the lib ;)


Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17412
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Glad you got it working Clyde :)
Shockwave ^ Codigos
Challenge Trophies Won: