Welcome, Guest. Please login or register.

Author Topic: PAULA MIDI SYNTH BOX Like SID BOX?  (Read 17147 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Linde

  • Sr. Member
  • ****
  • Join Date: Mar 2004
  • Posts: 457
    • Show all replies
    • http://hata.zor.org/
Re: PAULA MIDI SYNTH BOX Like SID BOX?
« on: October 08, 2013, 05:09:06 PM »
Quote from: TCMSLP;749583
I think this is a common misunderstanding;  people don't realise Paula is just a sample playback chip.  They hear it produce 'chip' music and assume it's being synthesised - it's an easy mistake to make.


It's a sample playback chip for sure, but it has some characteristics that aren't that common:

All the channels are played back at independent rates, and the possible rates are all at even divisions of the base clock, meaning that there won't be any aliasing no matter the playback frequency. This would be possible on any sound card, really, except the clock rate of the Paula dwarves the playback rates of modern sound cards, meaning much less frequency resolution for playback without aliasing (or complex algorithms to .

The second thing to consider is the modulation options on it. It lets channels modulate either the playback rate or the amplitude of eachother.

A third thing is that it has programmable volume control independent of output waveform, meaning that even at the lowest possible volume setting, you'll still have full 8-bit resolution.

Besides these things, except for setting the DMA pointers and loop lengths up, the chip is controlled much like a typical PSG of the time.

It might be a misunderstanding to say that it synthesizes sound (depending on the definition of synthesis; technically, if you go by a generic dictionary definition of the word, it does) but it's safe to say that it's a unique chip with some characteristics that distinguishes it from both earlier and later sample playback devices.
 

Offline Linde

  • Sr. Member
  • ****
  • Join Date: Mar 2004
  • Posts: 457
    • Show all replies
    • http://hata.zor.org/
Re: PAULA MIDI SYNTH BOX Like SID BOX?
« Reply #1 on: October 08, 2013, 05:16:15 PM »
Quote from: Thorham;749593
Sure, but all 8bit samples, regardless of hardware, will sound like that.


Just to be nitpicking on something I otherwise would totally agree with: The DACs in the Amiga aren't exactly linear, quite far from it. I think they do PWM, but some part of the circuitry (lack of proper signal buffering?) is making the waveform irregular, so it won't sound like any other 8-bit sample hardware (which most probably all have their own non-linearities and quirks)
 

Offline Linde

  • Sr. Member
  • ****
  • Join Date: Mar 2004
  • Posts: 457
    • Show all replies
    • http://hata.zor.org/
Re: PAULA MIDI SYNTH BOX Like SID BOX?
« Reply #2 on: October 08, 2013, 05:22:46 PM »
Quote from: Iggy;749572
Well, frankly neither is anything special.
If I was building a retro system today, I'd use a cheap Yamaha sound chip with wavetable capability and Midi support.

What definition of the world "special" do you subscribe to, not to include the SID?

Quote from: Iggy;749572
Frankly, Commodore fanatics have always dismayed me.
I mean, get over it guys, the 6502/6510 was a pretty lousy processor.

I think that if the qualities of the CPU was the question for any of these people, they would have abandoned their platform a long time ago (along with the M68k series).
 

Offline Linde

  • Sr. Member
  • ****
  • Join Date: Mar 2004
  • Posts: 457
    • Show all replies
    • http://hata.zor.org/
Re: PAULA MIDI SYNTH BOX Like SID BOX?
« Reply #3 on: October 09, 2013, 08:09:11 PM »
Quote from: Iggy;749621
didn't mean to piss you  off,.

Well, I'm not pissed off, just curiously arguing as usual :)

Quote from: Iggy;749621
At the time it was produced the SID was pretty remarkable.
Compared to the 6502 its a work of art.

I think that it's still remarkable in that there hasn't been a sound chip like it since.

Quote from: Iggy;749621
The 6502 is little more than an attempt to undercut 6800 pricing.
The design holds no attraction for me.

Fair enough, but my point is that to most C64 programmers, the CPU is more or less just a means to an end. The fun stuff is the VIC-II and the SID. The amiga community seems to have been very CPU-centric, in comparison.

Quote from: Iggy;749621
And if we have all stopped use old processor like the 68K, how come I can still use 68K machine code under MorphOS?
And believe me, its being done. New code.
Because its still backward compatible.

I never questioned that, but you have to agree that if performance or particularly interesting designs were the reason people keep using these CPUs, they would have been long forgotten.

Quote from: Iggy;749621
We are just a really stubborn bunch.

Indeed!
 

Offline Linde

  • Sr. Member
  • ****
  • Join Date: Mar 2004
  • Posts: 457
    • Show all replies
    • http://hata.zor.org/
Re: PAULA MIDI SYNTH BOX Like SID BOX?
« Reply #4 on: October 11, 2013, 08:10:47 AM »
Quote from: freqmax;749766
That means there's more than plain D/A and standard analog filter. So could anyone describe what's special in technical terms?

(oh and what technically made C64 ceramic SID special would be interesting too)


From http://sid.kubarth.com/articles/interview_bob_yannes.html:

Quote from: BOB YANNES
It's pretty brute-force, I didn't have time to be elegant. Each "voice" consisted of an Oscillator, a Waveform Generator, a Waveform Selector, a Waveform D/A converter, a Multiplying D/A converter for amplitude control and an Envelope Generator for modulation. The analog output of each voice could be sent through a Multimode Analog Filter or bypass the filter and a final Multiplying D/A converter provided overall manual volume control.

As I recall, the Oscillator is a 24-bit phase-accumulating design of which the lower 16-bits are programmable for pitch control. The output of the accumulator goes directly to a D/A converter through a waveform selector. Normally, the output of a phase-accumulating oscillator would be used as an address into memory which contained a wavetable, but SID had to be entirely self-contained and there was no room at all for a wavetable on the chip.

The Sawtooth waveform was created by sending the upper 12-bits of the accumulator to the 12-bit Waveform D/A.

The Triangle waveform was created by using the MSB of the accumulator to invert the remaining upper 11 accumulator bits using EXOR gates. These 11 bits were then left-shifted (throwing away the MSB) and sent to the Waveform D/A (so the resolution of the triangle waveform was half that of the sawtooth, but the amplitude and frequency were the same).

The Pulse waveform was created by sending the upper 12-bits of the accumulator to a 12-bit digital comparator. The output of the comparator was either a one or a zero. This single output was then sent to all 12 bits of the Waveform D/A.

The Noise waveform was created using a 23-bit pseudo-random sequence generator (i.e., a shift register with specific outputs fed back to the input through combinatorial logic).The shift register was clocked by one of the intermediate bits of the accumulator to keep the frequency content of the noise waveform relatively the same as the pitched waveforms. The upper 12-bits of the shift register were sent to the Waveform D/A.

Since all of the waveforms were just digital bits, the Waveform Selector consisted of multiplexers that selected which waveform bits would be sent to the Waveform D/A. The multiplexers were single transistors and did not provide a "lock-out", allowing combinations of the waveforms to be selected. The combination was actually a logical ANDing of the bits of each waveform, which produced unpredictable results, so I didn't encourage this, especially since it could lock up the pseudo-random sequence generator by filling it with zeroes.

The output of the Waveform D/A (which was an analog voltage at this point) was fed into the reference input of an 8-bit multiplying D/A, creating a DCA (digitally-controlled-amplifier). The digital control word which modulated the amplitude of the waveform came from the Envelope Generator.

The Envelope Generator was simply an 8-bit up/down counter which, when triggered by the Gate bit, counted from 0 to 255 at the Attack rate, from 255 down to the programmed Sustain value at the Decay rate, remained at the Sustain value until the Gate bit was cleared then counted down from the Sustain value to 0 at the Release rate.

A programmable frequency divider was used to set the various rates (unfortunately I don't remember how many bits the divider was, either 12 or 16 bits). A small look-up table translated the 16 register-programmable values to the appropriate number to load into the frequency divider. Depending on what state the Envelope Generator was in (i.e. ADS or R), the appropriate register would be selected and that number would be translated and loaded into the divider. Obviously it would have been better to have individual bit control of the divider which would have provided great resolution for each rate, however I did not have enough silicon area for a lot of register bits. Using this approach, I was able to cram a wide range of rates into 4 bits, allowing the ADSR to be defined in two bytes instead of eight. The actual numbers in the look-up table were arrived at subjectively by setting up typical patches on a Sequential Circuits Pro-1 and measuring the envelope times by ear (which is why the available rates seem strange)!

In order to more closely model the exponential decay of sounds, another look-up table on the output of the Envelope Generator would sequentially divide the clock to the Envelope Generator by two at specific counts in the Decay and Release cycles. This created a piece-wise linear approximation of an exponential. I was particularly happy how well this worked considering the simplicity of the circuitry. The Attack, however, was linear, but this sounded fine.

A digital comparator was used for the Sustain function. The upper four bits of the Up/Down counter were compared to the programmed Sustain value and would stop the clock to the Envelope Generator when the counter counted down to the Sustain value. This created 16 linearly spaced sustain levels without having to go through a look-up table translation between the 4-bit register value and the 8-bit Envelope Generator output. It also meant that sustain levels were adjustable in steps of 16. Again, more register bits would have provided higher resolution.

When the Gate bit was cleared, the clock would again be enabled, allowing the counter to count down to zero. Like an analog envelope generator, the SID Envelope Generator would track the Sustain level if it was changed to a lower value during the Sustain portion of the envelope, however, it would not count UP if the Sustain level were set higher.

The 8-bit output of the Envelope Generator was then sent to the Multiplying D/A converter to modulate the amplitude of the selected Oscillator Waveform (to be technically accurate, actually the waveform was modulating the output of the Envelope Generator, but the result is the same).

Hard Sync was accomplished by clearing the accumulator of an Oscillator based on the accumulator MSB of the previous oscillator.

Ring Modulation was accomplished by substituting the accumulator MSB of an oscillator in the EXOR function of the triangle waveform generator with the accumulator MSB of the previous oscillator. That is why the triangle waveform must be selected to use Ring Modulation.

The Filter was a classic multi-mode (state variable) VCF design. There was no way to create a variable transconductance amplifier in our NMOS process, so I simply used FETs as voltage-controlled resistors to control the cutoff frequency. An 11-bit D/A converter generates the control voltage for the FETs (it's actually a 12-bit D/A, but the LSB had no audible affect so I disconnected it!).

Filter resonance was controlled by a 4-bit weighted resistor ladder. Each bit would turn on one of the weighted resistors and allow a portion of the output to feed back to the input. The state-variable design provided simultaneous low-pass, band-pass and high-pass outputs. Analog switches selected which combination of outputs were sent to the final amplifier (a notch filter was created by enabling both the high and low-pass outputs simultaneously).

The filter is the worst part of SID because I could not create high-gain op-amps in NMOS, which were essential to a resonant filter. In addition, the resistance of the FETs varied considerably with processing, so different lots of SID chips had different cutoff frequency characteristics. I knew it wouldn't work very well, but it was better than nothing and I didn't have time to make it better.

Analog switches were also used to either route an Oscillator output through or around the filter to the final amplifier. The final amp was a 4-bit multiplying D/A converter which allowed the volume of the output signal to be controlled. By stopping an Oscillator, it was possible to apply a DC voltage to this D/A. Audio could then be created by having the microprocessor write the Final Volume register in real-time. Game programs often used this method to synthesize speech or play "sampled" sounds. An external audio input could also be mixed in at the final amp or processed through the filter.

The Modulation registers were probably never used since they could easily be simulated in software without having to give up a voice. For novice programmers they provided a way to create vibrato or filter sweeps without having to write much code (just read the value from the modulation register and write it back to the frequency register). These registers just give microprocessor access to the upper 8 bits of the instantaneous value of the waveform and envelope of Voice 3. Since you probably wouldn't want to hear the modulation source in the audio output, an analog switch was provided to turn off the audio output of Voice 3.
 

Offline Linde

  • Sr. Member
  • ****
  • Join Date: Mar 2004
  • Posts: 457
    • Show all replies
    • http://hata.zor.org/
Re: PAULA MIDI SYNTH BOX Like SID BOX?
« Reply #5 on: October 11, 2013, 05:10:45 PM »
Quote from: Iggy;749818
Well, the 68K was a pretty cool processor during a period when X86s were dreadful, and I've gotten a big kick out of the 6809 and the superset in the Hitachi 6309, but I must admit that with its video and sound capability the C64 would have been successful with just about any processor.


A Hitachi 6309 would have been awesome!
 

Offline Linde

  • Sr. Member
  • ****
  • Join Date: Mar 2004
  • Posts: 457
    • Show all replies
    • http://hata.zor.org/
Re: PAULA MIDI SYNTH BOX Like SID BOX?
« Reply #6 on: October 11, 2013, 05:15:26 PM »
Quote from: commodorejohn;749780
Eh. Unfortunately, by the time Yamaha developed their XG standard, they'd gone entirely into ROMpler territory, playing the same sets of samples from ROM (downsampled to lower rates on the cheaper instruments) on basically everything, sacrificing pretty much any potential for sound creation in the name of "realism." Bleah. Their FM synths (or even their ROMpler/FM hybrid synths like the SY77) were much more interesting.

Again, just to nitpick, this is not entirely true, as there are XG implementations based on OPL3 (look at YMF719). XG is no more of a particular sound than General MIDI is, and implementations vary, although I recognize that most were boring romplers.
 

Offline Linde

  • Sr. Member
  • ****
  • Join Date: Mar 2004
  • Posts: 457
    • Show all replies
    • http://hata.zor.org/
Re: PAULA MIDI SYNTH BOX Like SID BOX?
« Reply #7 on: October 13, 2013, 03:14:15 PM »
I've worked with the eZ80 professionally, and I say avoid it like the plague if you're planning to use the compiler toolchain.