Shop OBEX P1 Docs P2 Docs Learn Events
Making music with 3 BS1 chips? — Parallax Forums

Making music with 3 BS1 chips?

TangentDeltaTangentDelta Posts: 2
edited 2011-03-07 17:05 in BASIC Stamp
Hello, I'm new to using Parallax BASIC. I have been messing around with my BS1 today, and I find that I need a counter that writes to a variable. I want to put three BS1 chips together (each for a different channel, much like the old SID from the C64) and build a simple music-making chip. The only problem, is that I need a counter in a subroutine that creates a rise then fall noise. I know that using the SOUND command and replacing the frequency with a variable that counts from one defined variable to another will create this effect. If anybody can give me a snippet of code that shows how a counter can be used to make a pitch go up and down, I would be thrilled.

Comments

  • ercoerco Posts: 20,256
    edited 2011-03-07 17:05
    FOR B0=80 TO 110 STEP 2' siren up
    SOUND 4,(B0,1)
    NEXT
    FOR B0=110 TO 80 STEP -2' siren down
    SOUND 4,(B0,1)
    NEXT
Sign In or Register to comment.