![]() |
Forum Index : Microcontroller and PC projects : CMM2 5.06 Basic Play Tone
Author | Message | ||||
Mattsaintdev Newbie ![]() Joined: 03/08/2020 Location: United KingdomPosts: 3 |
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 StatesPosts: 30 |
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 KingdomPosts: 10315 |
That's because the program is finishing and that terminates any output. Put PAUSE 2000 after the play tone command 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 KingdomPosts: 3 |
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 KingdomPosts: 10315 |
From the manual Edited 2021-01-01 02:12 by matherp |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
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: CanadaPosts: 290 |
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. |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |