Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:30 29 Nov 2024 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

Author Message
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2134
Posted: 11:06pm 03 Apr 2023
Copy link to clipboard 
Print this post

Hi, I can't get play sound to work but play tone is fine,
it says sound 1 to 4, B for both channels, frequency, volume 1 to 25 optional.
> PLAY sound 1,B,500
Error : Argument count
> PLAY sound 1,B,500,25
Error : Expected a string
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2140
Posted: 11:28pm 03 Apr 2023
Copy link to clipboard 
Print this post

PLAY SOUND soundno,
channelno, type [,frequency]
[,volume]

Try

PLAY SOUND 1, B, S, 500, 25
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2134
Posted: 08:45pm 04 Apr 2023
Copy link to clipboard 
Print this post

@phil- nice, works. I tried PLAY SOUND 1, B, T, 500, 25
and guessed it because I heard it does sine,square and triangle but no mention in non vga manual. S is sine? what's square? is T triangle?
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2140
Posted: 09:09pm 04 Apr 2023
Copy link to clipboard 
Print this post

It's missing from that manual but is in the VGA manual.

'type' is the type of waveform. It can be S (sine wave), Q (square wave), T
(triangle wave), W (rising sawtooth) or O (turn off sound).
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2134
Posted: 09:45pm 04 Apr 2023
Copy link to clipboard 
Print this post

Cheers @phil99, It's all new, I only recently built the filter.
I prefer play tone and 2 frequencies for an interesting "tone" and it's less clicky.
 
Print this page


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

© JAQ Software 2024