News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

AY Chip - Music and Sound Effects

Started by sigh, 13:03, 27 February 11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sigh

When creating sound for games, what do programmers and gamers on this forum prefer hearing in regards to mono or stereo? Asking in another thread, it seems that even though you can mix down channels onto 1, you lose stereo. I didn't realise this and so created a seperate thread to gather some input.
Do many people use the stereo sound? Does it depend on the project? Is the trade off between having more instruments/sounds rather then stereo, justifyable? I have very limited to no knowledge of this so I would be interested in hearing peoples thoughts.

robcfg

Well, the AY chip has 3 output channels. If you use the CPC's speaker, they get merged into one single output channel and if you use the audio jack, you get channels 1 and 2 mixed on one output channel and channels 2 and 3 mixed on the other output channel.


I love the stereo because I have speakers attached to my CPC and also the emulators usually play tha AY music in stereo.

Bryce

I have active stereo speakers permanently connected to my CPC too. The stereo effect and the added base and volume gives a much better sound than the internal speaker, but that's not suprising considering the internal speaker is a tiny low quality part.

Bryce.

redbox

Worth bearing in mind that the stereo sounds better on the Plus as well - there are proper left and right speakers in the monitor  :)

villain

If I use an emulator I like the stereo sound and I also connect speakers to my CPC if a tune seems to be worth it. :-)

sigh

This is interesting. At the moment I'm partial to not having the stereo sound but instead having 3 channels mixed onto 1 giving a possibilty of 9 mono sounds combined to give some interesting music compositions and sound effects, but I'm unsure of how it would sound:

1)Are there any examples of music with this method of mono mixdowns that I could listen to?

2)If you were to mix down only 2 channels into 1 channel, would you still lose the stereo?

steve

#6
While you can mix the 3 channels down to 1 channel, (by wiring the output to one speaker). you can only have 3 voices + 3 noise channels since that is all the chip is capable of producing, as far as I know.

I think it is possible to have 3 x 4bit DAC channels which might produce multiple voices, but being only 4bits, might sound worse, this will require some research, and probably the DMA sound feature of the PLUS models.

In the CPC, channels 1+2 are mixed to provide one of the stereo channels, and 2+3 are mixed to give the other stereo channel, so voice 2 comes out of both speakers.

robcfg

IIRC, you have one channel of noise which you can mix with any of the other channels, not exactly 3 noise channels.

steve

Yes, you are correct, but the result is effectively 3 noise channels.

MacDeath

Nowadays you can find cheap stereo PC speakers for only 10€... and it sounds great for a CPC and is easy to connect.

Also PLUS users have the stereo inside the monitor...


So yeah... Stereo is the way to go.

I used to get my CPC always connected to a stereo HIFI when younger and many tunes were really better that way...

Antiriad, DragonNinja, Robocop... always better than on the in-built monospeaker...

sigh

Quote from: steve on 23:39, 27 February 11
While you can mix the 3 channels down to 1 channel, (by wiring the output to one speaker). you can only have 3 voices + 3 noise channels since that is all the chip is capable of producing, as far as I know.

I think it is possible to have 3 x 4bit DAC channels which might produce multiple voices, but being only 4bits, might sound worse, this will require some research, and probably the DMA sound feature of the PLUS models.

In the CPC, channels 1+2 are mixed to provide one of the stereo channels, and 2+3 are mixed to give the other stereo channel, so voice 2 comes out of both speakers.

Oh. So this means that even if it the sounds were mixed down to 1 channel (mono)- it's still just 3 channels to play with and not the 9 I thought it would output.
So mixing down channels is pointless?

arnoldemu

Quote from: sigh on 01:07, 28 February 11
Oh. So this means that even if it the sounds were mixed down to 1 channel (mono)- it's still just 3 channels to play with and not the 9 I thought it would output.
So mixing down channels is pointless?
The AY has 3 tone channels, and 1 noise channel. It has 1 hardware envelope which you can assign to any or all of the tone channels.

In terms of game music, your best to stick to normal AY sounds, because the driver to play the music takes some cpu time (approx 32 scanlines).

For a game, there are various choices:
- sfx only (which can then use all 3 channels to play)
- music only (which can then use all 3 channels to play)
- music and sfx (where you sacrifice 1 channel for sfx, leaving 2 channels for music).

You can produce nice sounds using just the AY, and you can for example choose to play the music faster (e.g. 100hz (2 times per frame)), to get some nice effects, but then you also use 2 times the cpu time for playing the music because the driver is called 2 times.

"standard" ay sounds at 50Hz really do sound fine with hardware envelopes used, so although what I said sounds "not so good" the result is actually very nice, and even if you choose to use 2 channels.

Using sample sound in an intro screen is ok, provided not much is going on because a sample sound player effectively uses all cpu time, and in addition storing the samples can use a lot of ram.
But it's ok if you use it on an intro screen and then load the game and it's music after. (e.g. Prehistorik 2 on +)

You mentioned you wanted sample sounds within the game.

This is possible, but consider that the cpu will be "hogged" or 100% busy while these are played, so game events and updates will effectively freeze. This is ok for a "final" sound effect (e.g. boss dying).

If the sound effect is quite basic and "noisy" you could get away with 1-bit sounds.. or if not go for the "standard" 4-bit sounds (as heard in robocop or similar).
So there are choices to reduce the amount of ram but then sacrificing quality.

In the end, it's an experiment and see.

I would advise using Arkos tracker or Starkos to get an idea of what the cpc can do for standard AY sounds.

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

sigh

Quote from: arnoldemu on 11:18, 28 February 11
The AY has 3 tone channels, and 1 noise channel. It has 1 hardware envelope which you can assign to any or all of the tone channels.

In terms of game music, your best to stick to normal AY sounds, because the driver to play the music takes some cpu time (approx 32 scanlines).

For a game, there are various choices:
- sfx only (which can then use all 3 channels to play)
- music only (which can then use all 3 channels to play)
- music and sfx (where you sacrifice 1 channel for sfx, leaving 2 channels for music).

You can produce nice sounds using just the AY, and you can for example choose to play the music faster (e.g. 100hz (2 times per frame)), to get some nice effects, but then you also use 2 times the cpu time for playing the music because the driver is called 2 times.

"standard" ay sounds at 50Hz really do sound fine with hardware envelopes used, so although what I said sounds "not so good" the result is actually very nice, and even if you choose to use 2 channels.

Using sample sound in an intro screen is ok, provided not much is going on because a sample sound player effectively uses all cpu time, and in addition storing the samples can use a lot of ram.
But it's ok if you use it on an intro screen and then load the game and it's music after. (e.g. Prehistorik 2 on +)

You mentioned you wanted sample sounds within the game.

This is possible, but consider that the cpu will be "hogged" or 100% busy while these are played, so game events and updates will effectively freeze. This is ok for a "final" sound effect (e.g. boss dying).

If the sound effect is quite basic and "noisy" you could get away with 1-bit sounds.. or if not go for the "standard" 4-bit sounds (as heard in robocop or similar).
So there are choices to reduce the amount of ram but then sacrificing quality.

In the end, it's an experiment and see.

I would advise using Arkos tracker or Starkos to get an idea of what the cpc can do for standard AY sounds.

Thanks.

So it wont be possible to play the KO scream AND have the boss crash to the floor. In that case, when the boss receives the final blow, the screen can freeze, maybe even turn black and white for extra effect, or have the background turn white? (Shinobi had flashing words when the voice said "Mission 1") and then the voice is played. The screen will then unfreeze and the boss will fall to the floor (it will be clear in the animation demo.)

SO Robocop, Chase HQ and Shinobi where 4 bit sounds, because they were actual voices? Is 4bit the highest?

dragon

#13
And with the new trick of generate new sound channel using the ppi.

You can not have more than 3 channels for music  or effects?.

http://ladrillopixeles.blogspot.com/2011/01/emulando-el-beeper-del-spectrum-48k-con.html

6 channels sound?.

SyX

Quote from: dragon on 23:47, 01 April 11
And with the new trick of generate new sound channel using the ppi.

You can not have more than 3 channels for music  or effects?.

http://ladrillopixeles.blogspot.com/2011/01/emulando-el-beeper-del-spectrum-48k-con.html

6 channels sound?.
Of course, but it's very cpu intensive (how digidrums) and because of that you will only use in menus or similar, but i love the sound of the cpc "beeper"  ;D

Powered by SMFPacks Menu Editor Mod