Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:55 02 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 : CMM2 5.06 Basic Play Tone

Author Message
Mattsaintdev
Newbie

Joined: 03/08/2020
Location: United Kingdom
Posts: 3
Posted: 01:57pm 31 Dec 2020
Copy link to clipboard 
Print this post

Hi

playing with my cmm2 (at last) and experimented with play tone.

From the prompt something like

> play tone 500,550,1000

gives a 1 second tone on L&R somewhere around middle C

But putting the same line in a .bas file and i hear nothing.

Ive played with "play volume" too. Worth noting that volumes over 85 distort.

Any suggestions, ive looked over the manual.

Matt
 
johnd
Newbie

Joined: 22/10/2020
Location: United States
Posts: 30
Posted: 02:14pm 31 Dec 2020
Copy link to clipboard 
Print this post

That's probably because the program stops immediately after the play statement.  Try putting a "PAUSE 1000" after the play or do something else in the program that takes some time, and you will hear the tone.

I think it does make sense to stop all sound after a program finishes.  That way, programmers don't have to clean up after themselves.  :)
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 02:15pm 31 Dec 2020
Copy link to clipboard 
Print this post

  Quote  But putting the same line in a .bas file and i hear nothing.


That's because the program is finishing and that terminates any output. Put PAUSE 2000 after the play tone command

  Quote  Worth noting that volumes over 85 distort.


That is a function of your amplifier input overloading. The output is correct and swings between about 0.1V and 3.1V
 
Mattsaintdev
Newbie

Joined: 03/08/2020
Location: United Kingdom
Posts: 3
Posted: 02:51pm 31 Dec 2020
Copy link to clipboard 
Print this post

Ahh thanks, didnt realise it was ASYNC. yes pausing worked.

Just got passive headphones on audio port.

Matt
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 04:07pm 31 Dec 2020
Copy link to clipboard 
Print this post

  Quote  Just got passive headphones on audio port.


From the manual

  Quote  This is a 3.5mm stereo phono socket.  The tip is the right channel, the ring is the left channel while the sleeve is ground.  The signal level at full volume is about 1V RMS (approx 3V peak to peak).  The output is high impedance suitable for feeding into an amplifier.  It cannot directly drive a loudspeaker, headphones or any low impedance load and might be damaged if that was attempted.

Edited 2021-01-01 02:12 by matherp
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 09:12pm 31 Dec 2020
Copy link to clipboard 
Print this post

  Mattsaintdev said  
Just got passive headphones on audio port.

Matt

Put 4.7k resistors in series with each output channel.
It will make little difference to the volume level and eliminate the overloading.

Jim
VK7JH
MMedit
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 09:22pm 31 Dec 2020
Copy link to clipboard 
Print this post

The Altoid Amp should also do the trick, and it is a good gadget to have around the house when your iDevice just isn’t putting out enough juice. If you are reading this, the project is almost certain to be within your technical skills!
Enjoy Every Sandwich / Joe P.
 
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