Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:16 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PLAY SOUND ..... Difference between " both " and " left and right " ?

Author Message
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 719
Posted: 01:49am 18 Aug 2020
Copy link to clipboard 
Print this post


'Listen

do

for x= 0 to 1
select case x

case 0

for y=0 to 7
play sound 1,b,s,200,10
pause 100
play sound 1,b,s,200,0
pause 500
print "both": next y

case 1

for y=0 to 7
play sound 1,l,s,200,10
play sound 1,r,s,200,10
pause 100
play sound 1,l,s,200,0
play sound 1,r,s,200,0
pause 500
print "left and right": next y

end select

next x

loop

my site
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 04:54am 18 Aug 2020
Copy link to clipboard 
Print this post

I think this is what you are getting at.

Setting both channels to 10 gives equal output.
Setting one channel to 10 with the second channel still off gives the correct level for that channel.

Setting one channel on but zero level gives zero output as expected

BUT
if you then set the second channel to 10, it's output is as expected 320mV and the other channel that should remain off has 790mV output.

DO
PLAY sound 1,B,O,200,0
PLAY sound 1,B,s,200,10 ' both channels 320mV
PRINT "both"

DO:LOOP UNTIL INKEY$ <> ""
PLAY STOP

'play sound 1,L,s,200,0
PLAY sound 1,R,s,200,10 ' right 320mV, left zero
PRINT "right"

DO:LOOP UNTIL INKEY$ <> ""
PLAY STOP

PLAY sound 1,R,s,200,0  ' both channels zero
PAUSE 2000
PLAY sound 1,L,s,200,10 ' right 790mV, left 320mV
PRINT "left"

DO:LOOP UNTIL INKEY$ <> ""
PLAY STOP
LOOP


Jim
VK7JH
MMedit
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 719
Posted: 02:15pm 18 Aug 2020
Copy link to clipboard 
Print this post

> If you then set the second channel to 10,
> it's output is as expected 320mV and the other
> channel that should remain off has 790mV output.

Yes. I think we're on the same page .
Aurally ( using 'both' ( my snippet ) )
there is the expected series of short
duration tones.
BUT
Using 'L + R' there is one long tone
( as long as 8 pulses )
AND
It even seems to change notes !
( maybe up an octave ? )
my site
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 02:28pm 18 Aug 2020
Copy link to clipboard 
Print this post

Found the problem - will be fixed in V5.05.05b11
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 719
Posted: 03:57pm 18 Aug 2020
Copy link to clipboard 
Print this post

  matherp said  Found the problem - will be fixed in V5.05.05b11

I'll dance at your wedding ! ....  
Would you give a (simple as possible) explanation ?
my site
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025