Author Topic: AHX player  (Read 50474 times)

0 Members and 1 Guest are viewing this topic.

Offline bbear

  • C= 64
  • **
  • Posts: 87
  • Karma: 4
    • View Profile
    • Legacy
AHX player
« on: December 12, 2006 »
Hi

I found the sources of the abyss AHX player but I don't understand how to use it.
I'm searching about a complete example in C/C++ with the player implementation with VC6, devcpp or codeblock.

links for AHX:
http://www.exotica.org.uk/tunes/formats/index.html
http://www.exotica.org.uk/tunes/formats/ahx/AYS-AHX-Sources.zip

thanx

some of my little stuffs I done with GDI and test with opengl
« Last Edit: December 12, 2006 by bbear »

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2756
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: AHX player
« Reply #1 on: December 12, 2006 »
Hi bbear, welcome aboard

Well, I take a look at this source and it is really good, it's also a good point to start a softsynth player.
I'll see what I can do with this, there's some ASM code in there, hope VC++2005 accept that either...
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: AHX player
« Reply #2 on: December 13, 2006 »
Thanks bbear!

Looks like a relatively easy port...there's a tiny bit of asm in there that would be easy to replace with C.
Are there lots of tunes for this tracker?  It looks like an AY emulator (Atari ST, Amstrad CPC, Spectrum 128 sound chip).

Jim

<edit>Got it building in Visual Studio easily.  There's no front end, so I'll jam a simple one on, get a link to some tunes and repost it.
« Last Edit: December 13, 2006 by Jim »
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: AHX player
« Reply #3 on: December 13, 2006 »
Here it is, source, project files, exe, with a front end and a sample tune.

If there's any interest, this could easily be made into a FreeBasic lib.

Jim

<edit> fixed a number of bugs in the player while I was listening to some top tunes this afternoon :-)
« Last Edit: December 29, 2006 by Jim »
Challenge Trophies Won:

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: AHX player
« Reply #4 on: December 13, 2006 »
Nice one, Jim. Thanks for sharing the code ... never heard about this sound format either ....

Anyway ... sounds interesting and chippy  :)  ---> Karma Up!
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline bbear

  • C= 64
  • **
  • Posts: 87
  • Karma: 4
    • View Profile
    • Legacy
Re: AHX player
« Reply #5 on: December 13, 2006 »
excellent

you can find a lot of AHX on www.plopbox.net and www.chiptune.com (firefox recommended)

this format was made originally on Amiga
« Last Edit: December 13, 2006 by bbear »

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2756
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: AHX player
« Reply #6 on: December 13, 2006 »
Great one Jim, works fine here, k++
Challenge Trophies Won:

Offline m0d

  • ZX 81
  • *
  • Posts: 10
  • Karma: 2
    • View Profile
Re: AHX player
« Reply #7 on: December 16, 2006 »
You can also find many AHX's at http://www.chip-on.com/

I recently began composing in AHX (about 4 days ago) on my old Amiga..

Here are some results :)

I'm the AHX n00b

:)


Edit: By the way, that EXE - superb :) I was after something like this! However , unforutunatly the EXE also trips up on this one (attached)... Deliplayer does not, nor does the real AHX itself.. (its about 30 secs in).

The other replayers that do this (like the winamp plugin) only play AHX's about 50% correctly, if you can find a moment to take a poke and fix that then that would be awesome.
« Last Edit: December 16, 2006 by m0d »

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2756
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: AHX player
« Reply #8 on: December 16, 2006 »
 :hi:  aboard dude

Well, it seems to me that you arent a n00b  :)

Quote
unforutunatly the EXE also trips up on this one (attached)... Deliplayer does not, nor does the real AHX itself.. (its about 30 secs in).
The other replayers that do this (like the winamp plugin) only play AHX's about 50% correctly, if you can find a moment to take a poke and fix that then that would be awesome.

I have tested this ahx player it with lots of .ahx songs and it crashes only with your song, tested it with real amiga AHX player and it works fine.

I guess you can help us to find this problem, tell us where it exactly crash, for example when you play one specific note,  volume or instrument...


Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: AHX player
« Reply #9 on: December 17, 2006 »
Hi M0d, Welcome to the forum!  I fired up that tune in the debugger and for some reason it doesn't crash, but the noise (D) channel goes totally haywire and never corrects itself.  I'll see what I can do, but it's a fair amount of effort I would think.

Jim
Challenge Trophies Won:

Offline m0d

  • ZX 81
  • *
  • Posts: 10
  • Karma: 2
    • View Profile
Re: AHX player
« Reply #10 on: December 17, 2006 »
:hi:  aboard dude

Well, it seems to me that you arent a n00b  :)

Quote
unforutunatly the EXE also trips up on this one (attached)... Deliplayer does not, nor does the real AHX itself.. (its about 30 secs in).
The other replayers that do this (like the winamp plugin) only play AHX's about 50% correctly, if you can find a moment to take a poke and fix that then that would be awesome.

I have tested this ahx player it with lots of .ahx songs and it crashes only with your song, tested it with real amiga AHX player and it works fine.

I guess you can help us to find this problem, tell us where it exactly crash, for example when you play one specific note,  volume or instrument...




Thanks for the warm welcome  :cheers: I've been out tonight so I'll check into finding out when it crashes, unfortunatly swapping stuff to and fro between my amiga on the other side of the studio is a pain until i get my network cable plugged back into the LAN (been wireless for some time now) :) tomorrow.

In this terrifically dark picture, the amiga behind me when im sitting at the PC.

clicky

I was made aware that AHX is buggy and generally keeps on going when it hits bugs, and being that I'm so very new at using AHX (yes im a n00b - really!) - I wouldn't have noticed a problem had I not put it into any WinAHX-based player. I also managed (unfortunatly not reproductably) to crash the EXE with another one of my songs, it locked up the PC for a while and failed to die when thrust with a bannana shaped angry task-menu kill, but that's not so important - it could have been anything. I played the song another time and it went through fine (the song was TherePie).

Hi M0d, Welcome to the forum!  I fired up that tune in the debugger and for some reason it doesn't crash, but the noise (D) channel goes totally haywire and never corrects itself.  I'll see what I can do, but it's a fair amount of effort I would think.

Jim


Hi Jim, again - thanks for helping to rejuvinate AHXness, as above my level of insight into AHX is flat bottom zero, i'm still learning how to make  tone portmentos work  ::) So i was a little surpirsed i'd broken something, and then later not so surprised after I heard from a friend how this sort of thing is actually quite common (at least on the constuction stage).

Luckily, and this is cool - a mate of mine (with contributions) has re-vamped the AHX user-documentation into a sexy PDF. I'll let you know where to get it when it's released 1.0 (only drafts at the moment) as I'ts really helped me get to grips with some of the stuff i never even knew was possible. (You're reading a post by someone who's been using a clipboard, pencil and paper to copy column data down to put into another column, not knowing how to use the clipboard function of the programme itself).

Again thanks both for the warm  >:D welcome :)


Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: AHX player
« Reply #11 on: December 17, 2006 »
I tried quite a number of things, but there doesn't appear to be any obvious bugs.  Perhaps a design flaw?

Jim
Challenge Trophies Won:

Offline m0d

  • ZX 81
  • *
  • Posts: 10
  • Karma: 2
    • View Profile
Re: AHX player
« Reply #12 on: December 19, 2006 »
Hi Jim,

I believe I might have found the issue - the issue being that a column volume setting ($C) over 40 causes this "crash" to occur. It seems the error is definitly not trapped in the replayer code. The real AHX assumes values over the max, to be the actual maximum, for instance >40 = 40.

I have attached an updated version of Chip Shoulder - I can't test it on the AHX player you made because on my w2k machine at work I seem to be missing various DLL components to get it to run :(

Let me know how it goes

(P.S I've also attached a new AHX I made yesterday - Discovery of Pieland :) )
« Last Edit: December 19, 2006 by m0d »

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2756
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: AHX player
« Reply #13 on: December 22, 2006 »
Nice one dude, you found it, works fine now.
Karma++

Btw, nice ahx tunes, well done   :clap:
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: AHX player
« Reply #14 on: December 29, 2006 »
Fixed it.  Somehow you'd set column volume to 66 (0x42), which isn't in any of the 3 valid ranges 0-0x40, 0x50-0x90 or 0xA0-0xE0.  So basically I've put a check in which just ignores invalid ranges.

Along with a new .exe, I've included your original broken song in the archive, it now plays just fine. :D

Jim
« Last Edit: December 29, 2006 by Jim »
Challenge Trophies Won:

Offline m0d

  • ZX 81
  • *
  • Posts: 10
  • Karma: 2
    • View Profile
Re: AHX player
« Reply #15 on: December 29, 2006 »
Awesome Jim. Do you mind if I distribute your AHX player within some other communities? I'm sure it will be well received, especially for those people who dont have a native AHX player or wish to install one of the plugins for their own player, etc...

 :cheers:

Offline .:] Druid [:.

  • freebasic n00b
  • Pentium
  • *****
  • Posts: 563
  • Karma: 47
    • View Profile
    • Intro-Inferno
Re: AHX player
« Reply #16 on: December 29, 2006 »
Excellent Jim!  I started c++ yesterday (!) and I'll definitly enjoy using old AHX song in intros :) karma boost of course :)
[sheep]: im sure he wants to goto prison.. they didnt get him last time.. he was promised a big cock up his arse.. and no doubt looking forward to it.. lets hope he gets his wish this year.

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: AHX player
« Reply #17 on: December 29, 2006 »
->m0d - by all means distribute my patches to the AHX library (I think there are 4 or 5 important fixes).  The front end too.

Jim
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2756
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: AHX player
« Reply #18 on: December 29, 2006 »
@Jim: by the way, that ASM code in the "GenerateWhiteNoise" function works fine with VC++2005
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: AHX player
« Reply #19 on: December 29, 2006 »
Yeah, I ported it to C though and removed the last of the asm.  I used memcmp to check the results were identical.  It'll port to PSP now, for instance :).  Funnily enough though, the asm is just a simple RNG, I don't know if it's actually doing a real AY emulation, it looks like it might be, but just using C's rand() function sounds just the same!

Jim
Challenge Trophies Won: