Jump to content



0

Generating sound effects with Pulse-Width Modulation


3 replies to this topic

#1 Rybags ONLINE  

Rybags

    Quadrunner

  • 10,315 posts
  • Location:Australia

Posted Tue Apr 18, 2006 10:14 AM

PWM sound uses a duty cycle which averages out over the sample period to generate the same result as modulating a wave to a certain position.

Has anyone tried, or got any software which does it?

There is an article here http://www.ffd2.com/...c=hacking20.txt and here http://www.ffd2.com/...c=hacking21.txt about digitized sound on the C-64.

I've been playing about with it on the 130XE, using various techniques like POKEY timers, and have tried playing direct POKEY sound and forced volume (alternating 0 and 15).

So far, my results aren't so great. I'm using voice 1/2 combined on a 1.79 base, which allows Timer resolutions to a single machine cycle.

#2 DamageX OFFLINE  

DamageX

    Chopper Commander

  • 236 posts

Posted Tue Apr 18, 2006 8:44 PM

you may be interested in this http://members.aol.com/MJMahon/

Mr. Mahon created a program to play 5-bit samples on an Apple IIe using PWM.

#3 UNIXcoffee928 OFFLINE  

UNIXcoffee928

    Dragonstomper

  • 946 posts
  • Location:Sosaria, USA

Posted Sun Apr 30, 2006 11:56 AM

How are these experiments working out?

Signal Modultion can be quite useful in feedback-oriented control systems... (if you redirect that output for non-audio control...).


L8R,

UNIXcoffee928

#4 Rybags ONLINE  

Rybags

    Quadrunner

  • 10,315 posts
  • Location:Australia

Posted Sun Apr 30, 2006 6:09 PM

I got it to the point where it played recognisable samples, using 2 methods.

1st method was the classic "Volume only" output.

2nd method was using a voice pair at 1.78 MHz -plus using Pokey timer (which forces modulation cycle to restart).

Both results poor so far, plus you get the carrier frequency which can't easily be filtered.

I haven't touched it for some time - devoting programming time to Impossible Mission project.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users