Creating sound

GFA BASIC-related articles in here please

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

Post Reply
User avatar
WireLord55
Atari freak
Atari freak
Posts: 52
Joined: Sun Apr 22, 2018 9:48 am

Creating sound

Post by WireLord55 »

Hi,

Would i be able to translate the chords of this song into

Code: Select all

SOUND 
commands? It seems a little tedious.

[youtube=]https://www.youtube.com/watch?v=C4_uIwsW9Oc[/youtube]

Would someone tell me an easier way to play sounds/ songs?

Thanks,

WireLord55
"Do...or do not. There is no try" - Yoda, Episode V
User avatar
Orion_
Captain Atari
Captain Atari
Posts: 446
Joined: Sat Jan 10, 2004 12:20 pm
Location: France
Contact:

Re: Creating sound

Post by Orion_ »

you could use DMA Sound from STe to play wav samples instead of "beep" sound.
I don't know GFA language, but there seems to be DMA commands here: http://freddo.chez.com/GfaBasic/GFABASIC.TXT
If you want an 8bits style sound, I'm afraid you will have to learn how to use an YM sound editor (like Maxymizer) to create your own music
but, it will be "tedious".
Programming on retro machines such as the Atari, is not easy, especially if you want to do advanced stuff like music, animation etc...
If you want easy programming, just use a Game Maker tool on PC.
My retro games shop including Atari ST/Falcon/Firebee games ! -- Free Atari games/demos/tools -- Free Falcon demos/tools
Atari Mega STe 4MB + SD2SCSI 1GB + NOVA ET4000 + Pico PSU + Gotek HxC // Atari STe 2MB
User avatar
WireLord55
Atari freak
Atari freak
Posts: 52
Joined: Sun Apr 22, 2018 9:48 am

Re: Creating sound

Post by WireLord55 »

Hi,

Yeah, nah. Not GM8, I'm looking for a real retro look and feel so..

Isn't

Code: Select all

DMASOUND
the same as

Code: Select all

SOUND
(sort of )?

Thanks,

WireLord55
"Do...or do not. There is no try" - Yoda, Episode V
User avatar
mjvans
Atari maniac
Atari maniac
Posts: 82
Joined: Thu Dec 31, 2015 2:08 pm
Location: Netherlands
Contact:

Re: Creating sound

Post by mjvans »

DMASOUND is used for playing recorded music on the STe.

Sound is for playing notes using the ST YM sound chip. Combine with WAVE command for sound effects.
it sounds retro and is fun but takes time to create something yes

example:
' sound voice 1, volume 15, note G, octave 3, 1 second
sound 1,15,8,3,50

example with wave:
' sound and fade away with wave
sound 1,15,8,3
wave 1,1,9,65535

example 3 voice sounds like a heli

sound 1,15,10,4
sound 2,15,1,1
sound 3,15,12,8
wave 56,7,10,400
Falcon030, Mega ST, 1040STfm, 800XL, Lynx, Jaguar
simonsunnyboy
Moderator
Moderator
Posts: 5235
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: Creating sound

Post by simonsunnyboy »

If yo uwant to do music, it is easier to use a suitable tracker and create a SNDH music file. These can be replayed with GFABASIC without having to program individual SOUND and WAVE statements.
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
User avatar
FedePede04
Atari God
Atari God
Posts: 1215
Joined: Fri Feb 04, 2011 12:14 am
Location: Denmark
Contact:

Re: Creating sound

Post by FedePede04 »

simonsunnyboy wrote:If yo uwant to do music, it is easier to use a suitable tracker and create a SNDH music file. These can be replayed with GFABASIC without having to program individual SOUND and WAVE statements.
I have a question for you, how do you call a asm program in gfa, and does the program have to contain code to make it run in gfa. Like setting the program in supervice mode. And interrupt ect.
Atari will rule the world, long after man has disappeared

sometime my English is a little weird, Google translate is my best friend :)
simonsunnyboy
Moderator
Moderator
Posts: 5235
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: Creating sound

Post by simonsunnyboy »

The machine code used must be PC-relative for use with GFABASIC. Otherwise you have various options to call it, CALL, C:, RCALL

Supervisor is up to you, you can set it from the machine code but normally you would do beforehand from your GFA.

Check http://paradize.atari.org/ for lots and lots of examples for GFABASIC and machine code interaction.
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2511
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: Creating sound

Post by lp »

Other than what simonsunnyboy already said, if you use a3 to a6, make sure to restore them before returning to GFA.
User avatar
FedePede04
Atari God
Atari God
Posts: 1215
Joined: Fri Feb 04, 2011 12:14 am
Location: Denmark
Contact:

Re: Creating sound

Post by FedePede04 »

Thx simonsunnyboy and lp.
when i get some time i will tried and convert my ymt player, so you can use it in GFA, and i will sure have a look at the link you poster and see if its something that i can do.
thx again.
Atari will rule the world, long after man has disappeared

sometime my English is a little weird, Google translate is my best friend :)
User avatar
WireLord55
Atari freak
Atari freak
Posts: 52
Joined: Sun Apr 22, 2018 9:48 am

Re: Creating sound

Post by WireLord55 »

Thanks guys
"Do...or do not. There is no try" - Yoda, Episode V
Post Reply

Return to “GFA BASIC”