SNDH Files (Grazey Zak Hacks) include in GFA?

GFA BASIC-related articles in here please

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
SweYC
Atari freak
Atari freak
Posts: 51
Joined: Sun Apr 27, 2014 2:32 pm

Re: SNDH Files (Grazey Zak Hacks) include in GFA?

Post by SweYC »

Gunstick wrote:Hi.
resurfacing this thread, LOL.
I managed to make the inline work for the provided example in MaxYMiser.
Flawless.
Then I replaced the SND file by Atomino.snd (un-iced version), and GfA mentions 2 bombs as above.
Yes, I adapted the inline size. But it does not work.

Greetings,
Gunstick/ULM
I am almost sure that atomino.sndh is multitune SNDH? In that case you need to pass subtune number as parameter and it starts with 1 not 0.
User avatar
SweYC
Atari freak
Atari freak
Posts: 51
Joined: Sun Apr 27, 2014 2:32 pm

Re: SNDH Files (Grazey Zak Hacks) include in GFA?

Post by SweYC »

Anyway, there is yet another new command in GBE: size%=FILELEN(path$). So i made a small example, which uses new commands (FILELEN, UNPACK, SNDH). It also switch betwen subtunes. Switch only skip to next tune, and after it skip over the last tune, it will crash. One need to read number of subtunes from SNDH header and then put some checks and limits in code. Right mosue button skip tunes and both mosue buttons quit... Works in TOS/MiNT and 030/060 modes...

EDIT: Added SNDH file header check and extracting number of subunes in SNDH...
You do not have the required permissions to view the files attached to this post.
User avatar
SweYC
Atari freak
Atari freak
Posts: 51
Joined: Sun Apr 27, 2014 2:32 pm

Re: SNDH Files (Grazey Zak Hacks) include in GFA?

Post by SweYC »

Sorry for mess guys... phone crap :(
Last edited by SweYC on Thu Dec 19, 2019 1:40 pm, edited 1 time in total.
User avatar
SweYC
Atari freak
Atari freak
Posts: 51
Joined: Sun Apr 27, 2014 2:32 pm

Re: SNDH Files (Grazey Zak Hacks) include in GFA?

Post by SweYC »

Anyway, there is yet another new command in GBE: size%=FILELEN(path$). So i made a small example, which uses new commands (FILELEN, UNPACK, SNDH). It also switch betwen subtunes. Switch only skip to next tune, and after it skip over the last tune, it will crash. One need to read number of subtunes from SNDH header and then put some checks and limits in code. Right mosue button skip tunes and both mosue buttons quit... Works in TOS/MiNT , ST/TT/F030 and in 030/060 modes...

EDIT: Added SNDH file header check and extracting number of subunes in SNDH...
User avatar
Grazey / PHF
Atari Super Hero
Atari Super Hero
Posts: 537
Joined: Fri Jun 21, 2002 12:50 pm
Location: Montreal, Quebec
Contact:

Re: SNDH Files (Grazey Zak Hacks) include in GFA?

Post by Grazey / PHF »

“Grazey Zak Hacks”

Now there’s a blast from the past :)

Grz.
http://phf.atari.org - demo coders since 1983
http://sndh.atari.org - Maintainer of the Atari ST chip music archive
http://www.scenestream.net - Nectarine Administrator
ASN
Retro freak
Retro freak
Posts: 13
Joined: Tue Mar 16, 2021 3:50 pm

Re: SNDH Files include in GFA - Only default song plays :(

Post by ASN »

EDIT: Found a post in the STOS Forum pointing out that Mad Max tunes are always in multitune format. After some fiddling around and adding the following line to the code:

Code: Select all

r%(0)=1
It is now playing fine. I tend to always find out these thing myself right after posting something on here :roll:

=======================

Bumped this thread so I didn't have to start a new one. I tried the Yescrew/Gwem player (https://paradize.final-memory.org/gfabasic.shtml) in GFA Basic. With the example song it works fine. Any other song I depack will not play. Tried using unice68.exe on my PC, and F-DEPACK on my (emulated) ST to unpack. Both unpacked songs play fine in my JAM SNDH player.

But trying to play in the GFA routine will either result in total silence, of 2 Bombs. I did adjust the inline size accordingly. Also tried reserving some memory and use BLOAD to put the tune data there. Works fine with the example song, but not with the other .snd files. I used Mad Max's jazzy.snd and cybernoid.snd which both are not multitune files AFAIK.

I must be overlooking something really simple, but after trying and trying to get it to work I decided to ask for help.
===============================================

Always remember:
Coding is the best way to create your own favourite toys!

Atari ST Nostalgia:
https://www.youtube.com/channel/UCxqXyl ... vErDeSwKTw

https://github.com/AtariSTNostalgia
User avatar
Grazey / PHF
Atari Super Hero
Atari Super Hero
Posts: 537
Joined: Fri Jun 21, 2002 12:50 pm
Location: Montreal, Quebec
Contact:

Re: SNDH Files (Grazey Zak Hacks) include in GFA?

Post by Grazey / PHF »

That really applies to all SNDH's not just Mad Max ones.

By default you should pass 1 to register D0 at initiliasation even if tunes only have one sub tune.

Cheers
Grazey
http://phf.atari.org - demo coders since 1983
http://sndh.atari.org - Maintainer of the Atari ST chip music archive
http://www.scenestream.net - Nectarine Administrator
ASN
Retro freak
Retro freak
Posts: 13
Joined: Tue Mar 16, 2021 3:50 pm

Re: SNDH Files (Grazey Zak Hacks) include in GFA?

Post by ASN »

Grazey / PHF wrote: Fri May 28, 2021 9:45 am That really applies to all SNDH's not just Mad Max ones.

By default you should pass 1 to register D0 at initiliasation even if tunes only have one sub tune.

Cheers
Grazey
Ah, good to know. I was able to play several without doing that, and it got me confused. Thanks.
===============================================

Always remember:
Coding is the best way to create your own favourite toys!

Atari ST Nostalgia:
https://www.youtube.com/channel/UCxqXyl ... vErDeSwKTw

https://github.com/AtariSTNostalgia
User avatar
pepe
Atari User
Atari User
Posts: 43
Joined: Thu Jan 02, 2020 5:24 pm
Contact:

Re: SNDH Files (Grazey Zak Hacks) include in GFA?

Post by pepe »

Hello everybody,

I'm using Gwem's sndh routine with my GFA with no problems for a long time.

It works and plays well - even for multitune sndh - but it crashes (4 bombs) when calling the stop routine in case of multitune. I have no crash when only one subtune.

' Here is my code :

Code: Select all

' playing
  r%(0)=subtune& 
  r%(7)=frequency&
  r%(14)=sndhtune%
  RCALL sndhplay%+28,r%()

' stopping
 RCALL sndhplay%+28+4,r%()
Did I miss something ?

Thank you very much
User avatar
thomas3
Captain Atari
Captain Atari
Posts: 206
Joined: Tue Apr 11, 2017 8:57 pm
Location: the people's republic of south yorkshire, uk.

Re: SNDH Files (Grazey Zak Hacks) include in GFA?

Post by thomas3 »

Hi,
Could it be that your vbl call to the music player (the +8 call) is still occuring *after* you've called the +4 stop routine?
User avatar
pepe
Atari User
Atari User
Posts: 43
Joined: Thu Jan 02, 2020 5:24 pm
Contact:

Re: SNDH Files (Grazey Zak Hacks) include in GFA?

Post by pepe »

Hi Thomas, thank for your help :-)
but I'm not sure to understand your response :-(

I have no call to +8 routine - just +28 to play the tune and +28+4 to stop - As far as i understand, Gwem's routine is VBL independant and uses Timer C.
It plays (and stops) perfectly if only one subtune, but crashes at stop when multitune... should I reset some registers before calling +28+4 ???
User avatar
Zorro 2
Administrator
Administrator
Posts: 2252
Joined: Tue May 21, 2002 12:44 pm
Location: Saint Cloud (France)
Contact:

Re: SNDH Files (Grazey Zak Hacks) include in GFA?

Post by Zorro 2 »

Hi!

I made some improvements to replay a Maxymiser file (.SND) with Gwem's sources.

If some people want to test and fix in GitHub, don't hesitate!
.~^ Member of NoExtra Team :: Member of HMD :: Pouet :: DemoZoo :: T-shirt Sponsor ^~.
User avatar
pepe
Atari User
Atari User
Posts: 43
Joined: Thu Jan 02, 2020 5:24 pm
Contact:

Re: SNDH Files (Grazey Zak Hacks) include in GFA?

Post by pepe »

Hi Zorro2,

Thank you for your help - I began some tests with your improved routine on some files - it works well on monotune SNDH files, and with your ROLLOUT.SND file (2 subtunes) - it works in VBL or TC modes as well - :D

but it still crashes at stopping RCALL xlr8%+4,r%() (VBL and TC crashes) with my MENACE.SND file - finally, there is perhaps a bug in this SNDH file... :(

I will try with another musics to find the reason of the bug...

Thank you :cheers:
User avatar
Zorro 2
Administrator
Administrator
Posts: 2252
Joined: Tue May 21, 2002 12:44 pm
Location: Saint Cloud (France)
Contact:

Re: SNDH Files (Grazey Zak Hacks) include in GFA?

Post by Zorro 2 »

Hi mister Pepe :D
pepe wrote: Mon Oct 11, 2021 8:21 pmThank you for your help - I began some tests with your improved routine on some files - it works well on monotune SNDH files, and with your ROLLOUT.SND file (2 subtunes) - it works in VBL or TC modes as well - :D
Thanks for your tests mate! I resumed some sources from MaxYmiser and I wanted to play musics in different ways.
pepe wrote: Mon Oct 11, 2021 8:21 pmbut it still crashes at stopping RCALL xlr8%+4,r%() (VBL and TC crashes) with my MENACE.SND file - finally, there is perhaps a bug in this SNDH file... :(
I use the XLR8 routine to play SNDH file from my old website :) But I know a bug as soon as you quit the player, you can hear some noises from the main music. We need to cut sound to quit perfectly.... and that's why all code are in GitHub, you can fix and modify them :contract:

About the issue, you should test it with asm sources for example to see if you have the same problem.
Note : you can edit the music file in Maxymiser and save it especially if you have samples inside it for the last version of Maxymiser.

Thanks to report your feedback soon :wink:
.~^ Member of NoExtra Team :: Member of HMD :: Pouet :: DemoZoo :: T-shirt Sponsor ^~.
User avatar
pepe
Atari User
Atari User
Posts: 43
Joined: Thu Jan 02, 2020 5:24 pm
Contact:

Re: SNDH Files (Grazey Zak Hacks) include in GFA?

Post by pepe »

Hi Zorro2,

Thanks for your remarks . I just integrated your piece of code in my slideshow, it works very well with all subtunes I have tested 8) Except Whittaker's Menace SNDH... :cry: I'll try to look at the problem and will come back if i find its cause.

See you soon
Post Reply

Return to “GFA BASIC”