Shop OBEX P1 Docs P2 Docs Learn Events
Converting Freqout to Sound — Parallax Forums

Converting Freqout to Sound

brendenbrenden Posts: 2
edited 2008-12-01 19:28 in BASIC Stamp
I have the following formula to convert beween Freqout (BS2) and Sound (BS1), but it will not work:

NOTE = 127 - ((1/FREQ1) - 95 x 10^6) / 83 x 10^6

(FREQ1 = 1/(95 x 10^6 + 99127-NOTE0 * 83 x 10^6)


example:
BS2: FREQOUT 15, 2000, 400

BS1: SOUND 7, (98, 167)

········· *400 is FREQ1·· and·· 98 is NOTE


········· *You divide 2000 by 12 to get 167


please help straighten this out.

············ Thanks.

Comments

  • brendenbrenden Posts: 2
    edited 2008-12-01 19:28
    Sorry, I typed that second equation too quickly, its:

    FREQ1 = 1/(95 x 10^6 + (127 -NOTE) * 83 x 10^6

    not that it even pertains to the question unless you want to work backwards
Sign In or Register to comment.