Discuss PocketC for Palm OS (including Desktop Edition)

Postby fembot1966 on Thu Sep 13, 2007 10:16 pm


How do you get the volume to work in tonea()? What are the range of values? I got the plain tone() function to work. My Palm can now play 'Do, Re, Mi... ' Great fun! I would like to play tones softer and louder, tho. I guess tone() is measured in Hertz. What is that a measure of?

Posts: 13
Joined: Thu Sep 13, 2007 1:27 pm

Postby samps on Sun Sep 16, 2007 7:38 am

Hertz is a measure of wave-cycles per second.

You set the volume of your tone as the third parameter to tonea():


plays an 'A' for a short while at a moderate level.

I have no idea what the limits for the volume parameter are, but why don't you try it out. 10 plays a quiet tone, 100 is less noisy than my alarm setting volume and 0 stops all sound whatsoever....


Ubuntu user #82
Ubuntu user #82
Posts: 143
Joined: Tue Feb 20, 2001 12:33 am
Location: Australia

Return to PocketC for Palm OS

Who is online

Users browsing this forum: No registered users and 4 guests