Better music capabilities

Page 10/11
3 | 4 | 5 | 6 | 7 | 8 | 9 | | 11

By PingPong

Prophet (3130)

PingPong's picture

12-06-2018, 21:32

syn wrote:
Grauw wrote:

Maybe the 200 Hz refers to the tracker step, ADSR and macro speed, and not the timer for the PWM effect? That seems more likely...

Trying to do PWM at 200 Hz, it seems like it would introduce tones under 200 Hz due to aliasing.

Ive read somewhere that not all trackers on atari use the HW volume envelope but instead do it though "software", thus allowing more flexibility (volume control for instance). I just assumed this 200hz/300hz is the rate of volume change. Something about this is mentioned here https://en.wikipedia.org/wiki/General_Instrument_AY-3-8910 under advanced techniques. But I may be interpreting it wrong.

PingPong wrote:

What's the point? a lot of chips can be misused to do things not originally intented .
Plus the" continuos signal is a square wave" is a non sense. By definition a continuos signal have period infinite.
So taliking about square wave (a function of time) does not make sense at all.
The point is : can the psg output a triangle wave with programmable period?. Yes using the envelope trick.
And if you still are convinced that only square wave is possible i can suggest you to put an oscilloscope on the psg output

You are missing the point of my posts. I know very well what can be done and not be done with a PSG/AY-3 but I was merely stating the "official" technical specifications of the chip(s).

Before any changes/modulation/HW volume envelope, psg/ay can generate square wave and/or noise
just like the OPLL can generate either of TWO waveforms, sine and halve-sine before applying whatever it is FM synthesis uses (total FM noob here)
An the Y8950 (MSX-AUDIO) has only sine.

This is all regardless of what the sound can actually become AFTER. Anyway kinda side-tracked/offtopic/nitpicking on details from my end ;)

Ok, and can the c64 show nine sprites on a scan line? YES. with clever programming. Even if the designers did not accounted for.

The point is more simple, some one told us can the psg generate triangle wave output.
You said no. And you are wrong. The psg can do this. Period.

To be more clear, you differentiate between tone generators and evelope generators, but they are in fact the same thing, a f(t) generator, so there is little to nothing difference between the tone and envelope generators.

Effectively , for example i can assert that the there is no tone generator on psg channel A and that the wave form generator is what we call the envelope generator. This result in a Channel A with programmable waveform generator.

I have simply called the evelope generator (that is doing modulation) as the tone generator and deleted the notion of the tone generator for channel A.
If the psg docs said "there is no envelope geneator and channel A can be selected with a programmable wave form" NO ONE complained about the square wave only tone generator.

So basically the end result is this. the psg have three channel square wave tone generator that can be modulated with another function generator. By setting the tone period to infinite you can have triangle or sawtooth wave output.
So definitely the channel A / B /C can generate triangle output

By syn

Paragon (1872)

syn's picture

12-06-2018, 23:16

man you still dont understand me. I am trying to say:

Metalion wrote:
DarkSchneider wrote:

Now the same sound with traingle waveform

This is a common misconception : the PSG does NOT generate different waveforms.
It can only generate one type of sound waveform : square.

What everybody is refering to are envelope generators, which are modulating the volume and only the volume. This is completely different than generating a waveform.

This is imo 100% correct from a TECHNICAL point of view, and this was what I was referring to. This does not mean you can not make something that is like a triangle or sawtooth. But the BASE sound it creates is still square. you can not just write a register or something to select something else.

Quote:

The point is more simple, some one told us can the psg generate triangle wave output.
You said no. And you are wrong. The psg can do this. Period.

I have never said it can not do this. Maybe i wrote it a bit vague but i never disputed this. I just said that while at the start it is a squarewave, with good use of hardware envelops you can do great stuff and alter the default SQUARE to sound whatever you like. Yes you ALTER it since it still starts as a square. Like I said, I know perfectly well what you can or not do with a PSG, ive listened to atari st music for years, some of my favorite artists are atari chiptune artists...

Anyway this is a stupid discussion and lets just shake hands and agree on the fact that the PSG is awesome.

By Grauw

Enlighted (7409)

Grauw's picture

13-06-2018, 00:24

I think the difference if you compare to software envelopes, or software audio rate modulation like on the Atari ST, is that generating a (logarithmic) saw or triangle with the hardware envelope generator does not require CPU support and so is entirely within the spec of the AY3’s sound generation capabilities, which allow the envelope generator rates to reach far into the audio range.

So just a matter of configuration, although not advertised in the datasheet as a core feature, I think it was a conscious decision of the designers to allocate so many bits to the EG frequency (16 as opposed to 12 for the tone frequencies). I think that qualifies as “the hardware is capable of it” rather than “the CPU can force it into doing something”. The latter certainly applies to sample playback and the effects done on the ST, but I think not to the EG. Anyway, semantics I guess.

p.s. If you say alter the default square, that’s not entirely correct, since you can disable the square wave generator in the mixer and produce sound purely with the envelope generator. Once you enable the square as well, with its independent frequency control, you get ring modulation (AM). That also doesn’t look bad on a spec sheet.

By syn

Paragon (1872)

syn's picture

13-06-2018, 01:54

Grauw wrote:

So just a matter of configuration, although not advertised in the datasheet as a core feature, I think it was a conscious decision of the designers to allocate so many bits to the EG frequency (16 as opposed to 12 for the tone frequencies). I think that qualifies as “the hardware is capable of it” rather than “the CPU can force it into doing something”. The latter certainly applies to sample playback and the effects done on the ST, but I think not to the EG. Anyway, semantics I guess.

I think it is odd that ppl understand the OPLL has a sine and half-sine, but when it comes to psg having squarewave (+noise Tongue) it is open to debate, since to me it is both exactly the same thing. The EG can be seen as something what the modulator is to the OPLL I suppose: something that alters the base waveform(s).

Quote:

p.s. If you say alter the default square, that’s not entirely correct, since you can disable the square wave generator in the mixer and produce sound purely with the envelope generator.

I know this and I thought I had mentioned this but perhaps accidentally left it out after editing. I guess im not the best person to write user manuals since I seem to have a problem bringing my point across correctly hahah Wink

By DarkSchneider

Paladin (748)

DarkSchneider's picture

13-06-2018, 10:32

What I have seen, is:

Quote:

Doing the same thing fewer times per second (in the order of 30 to 300 per second) allows the use of an arbitrary software-defined envelope on each of the three channels individually. This takes negligible CPU power (provided there is some timer interrupt or vertical blank interrupt) and can be used in games.

In turn, the now useless envelope functionality can be set to very high frequency, actually generating a waveform that is not the usual square wave, thanks to the timbre-altering effects of amplitude modulation. However, to obtain harmonic results, the modulating envelope must be related to the pitch of the desired note, and because the granularity by which high-frequency envelopes can be set is low, music composed for the chip generally uses this technique only for bass lines.

The 300Hz software envelope is used to get different sounds, not trying to simulate SID directly.
And the hardware envelope is used for bass sounds, what is called hard bass.
Even read about using the noise to slighty modify the tone waveform, but cannot find the link now.

PWM without timers of DMA is not much clear:
https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=es&ie=UTF-8&u=http%3A%2F%2Fquasar.cpcscene.net%2Fdoku.php%3Fid%3Dcoding%3Asid&edit-text=
Original article:
http://quasar.cpcscene.net/doku.php?id=coding:sid

Some demo about what can be done with 300Hz?

Also, another annoying link:
http://www.atari-forum.com/viewtopic.php?f=18&t=21499&p=191419&hilit=300+hz#p191419

Quote:

Sound resolution up to 300 Hz

On videos, we can see:

Quote:

Sound speed: 50Hz x 6

oO

By Grauw

Enlighted (7409)

Grauw's picture

13-06-2018, 12:44

Btw about using the envelope generator at audio rate, you lose the volume control but actually this is not very different from the NES sound chip, where the triangle does not have volume control either, and they cope with that just fine. It is often used for bass sounds because that's what a triangles are good for, and that also suits our EG since it's got more frequency resolution in the lower spectrum.

And I haven't tried but I think you can halve the EG wave's volume by combining it with a tone of maximum frequency (112 kHz), which falls well outside audio range so should be averaged by the low pass filter in the output circuitry to give a pretty constant carrier wave of half the amplitude. So there is some volume control possible (equal to vol 13), plus a sine / triangle is a already softer, so it shouldn't blast and overpower the other channels.

By DarkSchneider

Paladin (748)

DarkSchneider's picture

31-07-2018, 12:20

By Grauw

Enlighted (7409)

Grauw's picture

31-07-2018, 12:26

They use the envelope generator there I reckon.

By the way, I recently did some experiments with ring modulation with the EG, playing with different frequencies for the tone and EG oscillators. Some nice sounds came from that. I should make a video.

By DarkSchneider

Paladin (748)

DarkSchneider's picture

31-07-2018, 15:23

Waiting for it.

And yes, that music uses what I mentioned, the combo tune (square) + exotic (envelope) + drums (noise), and it gives a much better and varied results. Also using arpeggio and volume echoes that I think are achieved using normal interrupt, as the speccy does not have another one, and runs at 50Hz.

By DarkSchneider

Paladin (748)

DarkSchneider's picture

01-08-2018, 11:14

Some "nice sounds" could be something like this? (at 45:11)

https://youtu.be/rpJetDleVEE?t=45m11s

Oscilating the EG freq and when tone and EG are not at integer ratio it can give interesting sounds.

Page 10/11
3 | 4 | 5 | 6 | 7 | 8 | 9 | | 11
My MSX profile