• Print

Author Topic: Two sounds at once ?  (Read 238 times)

PhilOfPerth

  • Newbie
  • *
  • Posts: 25
  • I like A=4 : easier to underderstand and debug !
    • Email
Two sounds at once ?
« on: October 31, 2011, 01:40:21 AM »
 ???

While experimenting with the SOUND command, I came across this curiosity:

FOR A = 5000 TO 10000 STEP 20
    SOUND a, 4
    LOCATE 20, 20
    PRINT A
NEXT
 
Each time A reaches (about) 6000 the tone starts to descend, then another sound joins it, ascending ! Is it me, or my PC, or my sound system ?
Of all the places on our planet, and all the planets in the universe, I'd rather live here !

OlDosLover

  • Hero Member
  • *****
  • Posts: 3953
  • OlDosLover
    • Email
Re: Two sounds at once ?
« Reply #1 on: October 31, 2011, 08:28:48 AM »
Hi all,
    Same on my computer.Odd!
OlDosLover.

SkyCharger001

  • Hero Member
  • *****
  • Posts: 1601
Re: Two sounds at once ?
« Reply #2 on: October 31, 2011, 01:20:02 PM »
anyone have an oscilloscope?

vrensul

  • Sr. Member
  • ****
  • Posts: 320
  • 44th Degree Digital Wizard of the HighBytes Order
Re: Two sounds at once ?
« Reply #3 on: October 31, 2011, 02:13:17 PM »
Would it be possible to tap into the sound driver and read the bits as they are being passed to the sound card (or as they are played at the sound chip)?  Even unrelated, I've wondered for a little while now. 
' With programming, you  can do anything!
DEF SEG = &HBANKACNT 'weekend starts here...
     poke checking, 1000000
DEF SEG ' quit job here.

SkyCharger001

  • Hero Member
  • *****
  • Posts: 1601
Re: Two sounds at once ?
« Reply #4 on: October 31, 2011, 04:54:43 PM »
tested on QB4.5 or only on QB64?
if it only occurs in QB64 then we most likely are dealing with a problem in the sampling routines.

OlDosLover

  • Hero Member
  • *****
  • Posts: 3953
  • OlDosLover
    • Email
Re: Two sounds at once ?
« Reply #5 on: November 01, 2011, 07:43:18 AM »
Hi all,
    Tested on QB64 = 2 sounds as described. (through soundcard)
    Tested on QB45 = 1 sound only of high pitch (pc speaker)
OlDosLover.

SkyCharger001

  • Hero Member
  • *****
  • Posts: 1601
Re: Two sounds at once ?
« Reply #6 on: November 01, 2011, 11:05:54 AM »
Have tested QB45 via dosbox with 48Khz sampling, sound crackles at 6000+.

vrensul

  • Sr. Member
  • ****
  • Posts: 320
  • 44th Degree Digital Wizard of the HighBytes Order
Re: Two sounds at once ?
« Reply #7 on: November 01, 2011, 12:52:41 PM »
it's kinda spooky! (its the ghost in your machine speaking to you!)  :) i changed the code a lil to start lower, and it seems to be audible slightly at around 1200 and really starts to appear at around 1600. 
' With programming, you  can do anything!
DEF SEG = &HBANKACNT 'weekend starts here...
     poke checking, 1000000
DEF SEG ' quit job here.

  • Print