Can AY be played at the same time as samples?

On the creation of AY or Beeper music, including the packages used to do so.
User avatar
Lee Bee
Dynamite Dan
Posts: 1406
Joined: Sat Nov 16, 2019 11:01 pm
Location: Devon, England
Contact:

Can AY be played at the same time as samples?

Post by Lee Bee »

I'm not aware of any game where AY plays at the same time as speech/samples, or any tracker software that combines both types of sound. (Shame!)

In fact, gameplay always seems to freeze during sample playback.

Am I right in assuming that sample playback is hugely processor intensive and you can't do anything else at the same time?
User avatar
p13z
Manic Miner
Posts: 613
Joined: Sun Feb 17, 2019 10:41 pm
Location: UK
Contact:

Re: Can AY be played at the same time as samples?

Post by p13z »

Yes, sample playback is very processor intensive - but playing samples on the beeper, whilst playing AY music should be possible, as simple AY music is very processor un-intensive.
Can't think of any examples of this in action though.
User avatar
Lee Bee
Dynamite Dan
Posts: 1406
Joined: Sat Nov 16, 2019 11:01 pm
Location: Devon, England
Contact:

Re: Can AY be played at the same time as samples?

Post by Lee Bee »

It's quite rare to have music that uses both AY and Beeper. One great example is Chase H.Q. :-)
User avatar
NEO SPECTRUMAN
Microbot
Posts: 110
Joined: Tue Jan 26, 2021 10:27 pm

Re: Can AY be played at the same time as samples?

Post by NEO SPECTRUMAN »

Lee Bee wrote: Thu Feb 24, 2022 11:23 pm you can't do anything else at the same time?
can
[media]https://www.youtube.com/watch?v=NIcBaSIdSA4[/media]

but you need to count every cpu tact...
User avatar
Lee Bee
Dynamite Dan
Posts: 1406
Joined: Sat Nov 16, 2019 11:01 pm
Location: Devon, England
Contact:

Re: Can AY be played at the same time as samples?

Post by Lee Bee »

NEO SPECTRUMAN wrote: Fri Feb 25, 2022 4:35 pm can
[media]https://www.youtube.com/watch?v=NIcBaSIdSA4[/media]
Wow, this video answers every question I had, and blows my mind! :shock:
Ralf
Rick Dangerous
Posts: 2302
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: Can AY be played at the same time as samples?

Post by Ralf »

Some rules:

- you can play samples both on Beeper and AY.
- samples are CPU heavy, both on Beeper and AY
- AY music is light on CPU usage (more or less, depending on the player)

So yes, you can play samples on beeper and music on AY at the same time. It's harder but it's possible.
You could also play a sample on one AY channel and music on remaining channels.
User avatar
NEO SPECTRUMAN
Microbot
Posts: 110
Joined: Tue Jan 26, 2021 10:27 pm

Re: Can AY be played at the same time as samples?

Post by NEO SPECTRUMAN »

ay+covox drumZ
[media]https://www.youtube.com/watch?v=VWwYir3X1-E[/media]
catmeows
Manic Miner
Posts: 720
Joined: Tue May 28, 2019 12:02 pm
Location: Prague

Re: Can AY be played at the same time as samples?

Post by catmeows »

Lee Bee wrote: Thu Feb 24, 2022 11:23 pm In fact, gameplay always seems to freeze during sample playback.
Buzzsaw plays sample during gameplay. It is quite special case but it shows it can be done.
Proud owner of Didaktik M
User avatar
Lee Bee
Dynamite Dan
Posts: 1406
Joined: Sat Nov 16, 2019 11:01 pm
Location: Devon, England
Contact:

Re: Can AY be played at the same time as samples?

Post by Lee Bee »

Wow, I had not heard of Covox, which I'm guessing is some kind of sample-based sound engine.

Just found this impressive piece of music...

https://www.youtube.com/watch?v=gMresHqiwDs

So it seems the Spectrum can indeed do sample music, it's just not practical while too much is happening on screen, but quite possible for title screens, menus, etc.

I guess it's still early days in the Spectrum's life - this will no doubt be exploited more in future! :-)
User avatar
NEO SPECTRUMAN
Microbot
Posts: 110
Joined: Tue Jan 26, 2021 10:27 pm

Re: Can AY be played at the same time as samples?

Post by NEO SPECTRUMAN »

20 years ago...
[media]https://www.youtube.com/watch?v=aPw9Cdot7io[/media]
User avatar
1024MAK
Bugaboo
Posts: 3147
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Can AY be played at the same time as samples?

Post by 1024MAK »

Lee Bee wrote: Fri Feb 25, 2022 9:56 pm Wow, I had not heard of Covox, which I'm guessing is some kind of sample-based sound engine.

Just found this impressive piece of music...

https://www.youtube.com/watch?v=gMresHqiwDs

So it seems the Spectrum can indeed do sample music, it's just not practical while too much is happening on screen, but quite possible for title screens, menus, etc.

I guess it's still early days in the Spectrum's life - this will no doubt be exploited more in future! :-)
Keep in mind that not running on a standard U.K. Speccy… That is using a more sophisticated sound chip.

It is a good piece of music though :D

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
User avatar
Lee Bee
Dynamite Dan
Posts: 1406
Joined: Sat Nov 16, 2019 11:01 pm
Location: Devon, England
Contact:

Re: Can AY be played at the same time as samples?

Post by Lee Bee »

1024MAK wrote: Fri Feb 25, 2022 10:13 pm Keep in mind that not running on a standard U.K. Speccy… That is using a more sophisticated sound chip.
:o Thanks for pointing that out, I had no idea! Personally I'm only interested in standard Speccy hardware.
User avatar
NEO SPECTRUMAN
Microbot
Posts: 110
Joined: Tue Jan 26, 2021 10:27 pm

Re: Can AY be played at the same time as samples?

Post by NEO SPECTRUMAN »

1024MAK wrote: Fri Feb 25, 2022 10:13 pm a more sophisticated sound chip.
Nanotechnology :lol:
Image
User avatar
Stefan
Manic Miner
Posts: 823
Joined: Mon Nov 13, 2017 9:51 pm
Location: Belgium
Contact:

Re: Can AY be played at the same time as samples?

Post by Stefan »

Lee Bee wrote: Fri Feb 25, 2022 9:56 pm Wow, I had not heard of Covox, which I'm guessing is some kind of sample-based sound engine.
Covox is just a simple 8 bit DAC, it needs to be manually pumped with sample data just like an AY or beeper sample, the only big difference is that it provides 8 bit resolution vs the three AY channels @ 4 bits or the beeper at 1 bit.
Lee Bee wrote: Fri Feb 25, 2022 9:56 pm Just found this impressive piece of music...

So it seems the Spectrum can indeed do sample music, it's just not practical while too much is happening on screen, but quite possible for title screens, menus, etc.
Anything by Jogeir Liljedahl is impressive :-) A stereo covox-like device was available for the SAM Coupé, the SAMdac, but as with anything sample based, memory matters - and even 128K is on the tiny side.
User avatar
Stefan
Manic Miner
Posts: 823
Joined: Mon Nov 13, 2017 9:51 pm
Location: Belgium
Contact:

Re: Can AY be played at the same time as samples?

Post by Stefan »

NEO SPECTRUMAN wrote: Fri Feb 25, 2022 10:25 pm
1024MAK wrote: Fri Feb 25, 2022 10:13 pm a more sophisticated sound chip.
Nanotechnology :lol:
Indeed, a simple resistor ladder... :lol:
User avatar
NEO SPECTRUMAN
Microbot
Posts: 110
Joined: Tue Jan 26, 2021 10:27 pm

Re: Can AY be played at the same time as samples?

Post by NEO SPECTRUMAN »

Stefan wrote: Fri Feb 25, 2022 10:27 pm A stereo covox-like device was available for the SAM Coupé,
soundrive
4 channel angry russian covox
[media]https://www.youtube.com/watch?v=IMeMbfQfnl0[/media]

[media]https://www.youtube.com/watch?v=bx1lv6M0mzM[/media]
User avatar
Stefan
Manic Miner
Posts: 823
Joined: Mon Nov 13, 2017 9:51 pm
Location: Belgium
Contact:

Re: Can AY be played at the same time as samples?

Post by Stefan »

NEO SPECTRUMAN wrote: Fri Feb 25, 2022 10:30 pm soundrive
4 channel angry russian covox
Holy crap, it's a 4 channel DAC... and it does not need strobe to select channel. Nice!
User avatar
NEO SPECTRUMAN
Microbot
Posts: 110
Joined: Tue Jan 26, 2021 10:27 pm

Re: Can AY be played at the same time as samples?

Post by NEO SPECTRUMAN »

a more sophisticated sound chip.
for comparsion
ultra rare angry russian DMA Ultra Sound Card
Image
[media]http://zxbyte.ru/video/dma.webm[/media]
User avatar
NEO SPECTRUMAN
Microbot
Posts: 110
Joined: Tue Jan 26, 2021 10:27 pm

Re: Can AY be played at the same time as samples?

Post by NEO SPECTRUMAN »

angry russian zxm sound card extreme
tsfm+saa1099+soundrive
Image

moar angry russian NeoGS (also gs/ngs has covox mode)
Image

angry russian NeoGS as 3D Accelerator %)
[media]https://www.youtube.com/watch?v=q1Br5w2evNE[/media]
User avatar
1024MAK
Bugaboo
Posts: 3147
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Can AY be played at the same time as samples?

Post by 1024MAK »

NEO SPECTRUMAN wrote: Fri Feb 25, 2022 10:25 pm
1024MAK wrote: Fri Feb 25, 2022 10:13 pm a more sophisticated sound chip.
Nanotechnology :lol:
Image
Take the mickey if you must :shock:
Yes, it’s a DAC. And what do you think is driving those resistors? I was trying to keep the description simple. Most people would regard a 8 bit DAC as more sophisticated than either the bleeper or a AY being used to play back samples.

Resistor DACs have also been used with Acorn BBC Micros and IBM PC compatibles. See here.

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
User avatar
NEO SPECTRUMAN
Microbot
Posts: 110
Joined: Tue Jan 26, 2021 10:27 pm

Re: Can AY be played at the same time as samples?

Post by NEO SPECTRUMAN »

Most people would regard a 8 bit DAC as more sophisticated than either
if covox is more sophisticated

what about classic general sound? $)
Image

moar authentic version
Image
User avatar
Stefan
Manic Miner
Posts: 823
Joined: Mon Nov 13, 2017 9:51 pm
Location: Belgium
Contact:

Re: Can AY be played at the same time as samples?

Post by Stefan »

1024MAK wrote: Fri Feb 25, 2022 11:16 pm Take the mickey if you must :shock:
Yes, it’s a DAC. And what do you think is driving those resistors? I was trying to keep the description simple. Most people would regard a 8 bit DAC as more sophisticated than either the bleeper or a AY being used to play back samples.
Since the Spectrum / CPU is driving those resistors without any buffer / DMA support, I don't see how most people would regard this as being more sophisticated than continuously writing to the speaker on port 254.

The AY chip on the other hand is orders of magnitude more sophisticated than beeper or resistor DAC.
User avatar
1024MAK
Bugaboo
Posts: 3147
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Can AY be played at the same time as samples?

Post by 1024MAK »

Stefan wrote: Fri Feb 25, 2022 11:57 pm
1024MAK wrote: Fri Feb 25, 2022 11:16 pm Take the mickey if you must :shock:
Yes, it’s a DAC. And what do you think is driving those resistors? I was trying to keep the description simple. Most people would regard a 8 bit DAC as more sophisticated than either the bleeper or a AY being used to play back samples.
Since the Spectrum / CPU is driving those resistors without any buffer / DMA support, I don't see how most people would regard this as being more sophisticated than continuously writing to the speaker on port 254.

The AY chip on the other hand is orders of magnitude more sophisticated than beeper or resistor DAC.
When the AY chip is used as a DAC, it’s not being used as intended, and hence it’s not more, but less sophisticated in this ‘mode’. And the Z80 is also having to “continuously write” to it.

In theory (if the resistors have a tight tolerance), an 8 bit DAC can generate 255 levels (plus “0V”). That’s significantly more than an AY chip used as a DAC. And a 8 bit DAC requires less Z80 cycles compared to trying to use pulse width modulation of the 1 bit bleeper.

Is an 8 bit DAC more sophisticated than an AY chip used as the manufacturer intended? Well, that depends on what sounds or music you want to make. But generally, yes, then the AY is normally considered to be more sophisticated, because it can generate sine waves (tones) without any further Z80 activity, until you want to change the note.

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
User avatar
Lee Bee
Dynamite Dan
Posts: 1406
Joined: Sat Nov 16, 2019 11:01 pm
Location: Devon, England
Contact:

Re: Can AY be played at the same time as samples?

Post by Lee Bee »

I got very excited about Covox before I learned it was hardware, not software!

What I'm interested in is standard Speccy hardware, and I guess Ralf has answered my question very well - thanks!
Ralf wrote: Fri Feb 25, 2022 5:07 pm Some rules:

- you can play samples both on Beeper and AY.
- samples are CPU heavy, both on Beeper and AY
- AY music is light on CPU usage (more or less, depending on the player)

So yes, you can play samples on beeper and music on AY at the same time. It's harder but it's possible.
You could also play a sample on one AY channel and music on remaining channels.
Hopefully one day, samples will be easier to integrate with music. Just the ability to have a couple of short samples would open so much musical possibilities, especially for drums! :-)
User avatar
Stefan
Manic Miner
Posts: 823
Joined: Mon Nov 13, 2017 9:51 pm
Location: Belgium
Contact:

Re: Can AY be played at the same time as samples?

Post by Stefan »

Lee Bee wrote: Sat Feb 26, 2022 11:55 amHopefully one day, samples will be easier to integrate with music. Just the ability to have a couple of short samples would open so much musical possibilities, especially for drums! :-)
Beeper drums are excellent!

https://twitter.com/aymusicbot/status/1 ... 75488?s=21
Post Reply