Shop OBEX P1 Docs P2 Docs Learn Events
Audio wavefrom creation — Parallax Forums

Audio wavefrom creation

Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
edited 2008-10-15 00:45 in Propeller 1
Outside of the audio chapter in the Hydra book, or the HSS project has
anyone done anything with audio waveforms which I could study?

I'm in desperate need of a break from the book, and want to work
on a sound project. I've got a pretty good handle on square wave
generation, but suspect I'll need to read up on PWM for generating
sawtooth, triangle, etc.

I would be nice to have an "open" driver for sound. Maybe
something that is kin to the PropGFX for audio. [noparse]:)[/noparse]

OBC

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?

Getting started with a Propeller Protoboard?
Check out: Introduction to the Proboard & Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS

Comments

  • hippyhippy Posts: 1,981
    edited 2008-10-12 16:57
    I did some work on creating a music synthesiser with 'VCO' etc and a variety of output waveforms, sine, triangle, square, pulse. There was some intermittent bug I could not track down and haven't revisited that project since. Latest version of code attached, also -

    http://forums.parallax.com/showthread.php?p=688553
  • LeonLeon Posts: 7,620
    edited 2008-10-12 21:07
    Arbitrary waveforms can be generated with a software DDS. Here are details of one using an AVR:

    www.geocities.com/leon_heller/minidds.html

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • VIRANDVIRAND Posts: 656
    edited 2008-10-15 00:40
    PWM for sawtooth and triangle waves looks something like this serially coming out of a sound pin.

    Sawtooth:
    10000000 11000000 11100000 11110000 11111000 11111100 11111110 11111111 repeat

    Triangle:
    11110000 11111000 11111100 11111110 11111111 11111110 11111100 11111000
    11110000 1110000 11000000 1000000 0000000 10000000 11000000 11100000 repeat


    This illustration is based entirely on my own imagination, so don't worry if it makes no sense. confused.gif
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-10-15 00:45
    Actually that visualization DOES help it make sense.. Thanks for that.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with a Propeller Protoboard?
    Check out: Introduction to the Proboard & Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
Sign In or Register to comment.