SOUND command and variable array


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891

    Default SOUND command and variable array

    Hello,

    I'm (trying) playing sounds within an array.

    Unfortunately, I don't get it working.

    This is an extract of my (simplyfied) code.
    Code:
    ...
    Vsnd var byte [4]
    Vsnd.0 = 121
    Vsnd.1 = 120
    Vsnd.2 = 119
    Vsnd.3 = 116
    
    FOR A = 0 to 3
       SOUND Speaker,[Vsnd.A,10]
    NEXT
    ...
    Any idea what I'm doing wrong?
    Roger

  2. #2
    Join Date
    Oct 2003
    Location
    holland
    Posts
    251


    Did you find this post helpful? Yes | No

    Default

    try:
    FOR A = 0 to 3
    SOUND Speaker,[Vsnd(A),10]
    NEXT

  3. #3
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default

    Tried this one already.

    Doesn't work either.

    This one doesn't work aswel:
    Code:
    FOR A = 0 to 3
        SOUND Speaker,[Vsnd.0(A),100]
    NEXT
    Last edited by flotulopex; - 25th March 2007 at 13:40.
    Roger

  4. #4
    Join Date
    Oct 2003
    Location
    holland
    Posts
    251


    Did you find this post helpful? Yes | No

    Default

    That is not what I typed.
    Did you give "speaker" a portnumber?

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default

    Hi, Flotul

    What about Vsnd[A] instead ( Vsnd(A) or Vsnd.A ) ???

    Did you also check the tones are compatible with your speaker bandwidth ???

    just a thought ... for High audio frequencies.

    Alain
    Last edited by Acetronics2; - 25th March 2007 at 14:44.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default

    mat janssen,

    Don't worry: I copied/pasted your example "as it is" and it didn't work. I then posted another try I made. Sorry for the confusion.

    I tried with both brakets or parenthesis; never works....

    Yes, the sounds can be made correctly when not in this kind of referencing loop.

    Still searching.
    Roger

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts