CPCWiki forum

General Category => Games => Topic started by: enteka on 12:00, 06 June 21

Title: Adding music and sound efects to my basic game
Post by: enteka on 12:00, 06 June 21
Er... how do I do that on Basic? It's not like I can load an mp3 file. Is there any collection of sound effects that I can use?
I've read the manual but all I get is "Music stuff musicians understand"
Title: Re: Adding music and sound efects to my basic game
Post by: ComSoft6128 on 12:35, 06 June 21
HI @enteka (https://www.cpcwiki.eu/forum/index.php?action=profile;u=4285) ,


If you look at my YT channel you'll find quite a few examples of BASIC music that you may find useful.


EG


https://www.youtube.com/watch?v=IM8oR0Pk6_A&t=61s


But don't ask me any questions - I'm not a programmer.



Title: Re: Adding music and sound efects to my basic game
Post by: Targhan on 13:45, 06 June 21
You can code your sound effects and music in Basic, like in the example @ComSoft6128 (https://www.cpcwiki.eu/forum/index.php?action=profile;u=2226) showed, but it is slow, tedious, and not very funny.
If you don't mind using an assembler player, you can create both music and sound effects using my software Arkos Tracker 2 (see the link in my signature), which is a Windows/Mac/Linux software. Once you have created the sound effects and the music (if needed), you can load them in Basic and use them. The cool thing is that everything is done "in the background", so your Basic code continues its execution while the music/sfx are played. They are triggered by CALLs to the player.

There is a tutorial here with all you need (http://www.julien-nevo.com/arkostracker/index.php/using-interruption-player-with-cpc-basic/).
Title: Re: Adding music and sound efects to my basic game
Post by: eto on 15:35, 06 June 21
Quote from: enteka on 12:00, 06 June 21
Er... how do I do that on Basic? It's not like I can load an mp3 file. Is there any collection of sound effects that I can use?
I've read the manual but all I get is "Music stuff musicians understand"

A collection of sound effects would be great, unfortunately I am not aware of any.

Sean McManus provides on his website a DSK with many tools, including an envelope designer. Even if you don't fully understand how that works, you can create envelops graphically and immediately hear how they sound. When you're happy, you end the program and it spits out the BASIC command for the sound effect you just have created. (Just make sure to immediately save it to disk - as nice as the editor is, it lacks saving/loading). It could be done better probably, but I don't know anything else that comes even close to this editor (for BASIC).

https://www.sean.co.uk/books/amstrad/amstrad6.shtm (https://www.sean.co.uk/books/amstrad/amstrad6.shtm)

If you want to dive more into Music and sound effects, check out "Making Music on the Amstrad CPC" by Ian Waugh. A full book that covers every single aspect of sound creation in BASIC including lots of examples:

https://acpc.me/ACME/LITTERATURE_LIVRES/[ENG]ENGLISH/SUNSHINE_BOOKS/Making_music_on_the_AMSTRAD_CPC464-664(Ian_WAUGH)(acme).pdf



(https://acpc.me/ACME/LITTERATURE_LIVRES/%5BENG)
Title: Re: Adding music and sound efects to my basic game
Post by: banana on 14:31, 10 June 21
I would love it If there was a collection to just grab and use.
Powered by SMFPacks Menu Editor Mod