soundgenerator

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times

soundgenerator

Post by jgu1 »

Hi Here!

I have upgrade from Pic Flowcode V.3 to V.4 but not able to post in V.4 forum?????

But my question is, I need help to create a program where I am able to create a sound on 1750 hz when I use an inputbuttom and be able to change the frq.

Can anybody help me

ThangΒ΄s in advance

Regard JΓΈrgen :roll: :roll:

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times

Re: soundgenerator

Post by saschech@gmx.de »

Hello jgu1

To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Regards wolfgang

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: soundgenerator

Post by medelec35 »

jgu1 wrote: I need help to create a program where I am able to create a sound on 1750 hz when I use an inputbuttom and be able to change the frq.
Since you want to change the frequency with press of a button, what frequency range you had in mind?
Martin

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: soundgenerator

Post by medelec35 »

In flowcode 3 examples (TUT_24.FCF found in Flowcode V3/Examples directory) there is a basic way to produce tones.
It will get you started and will work with V4.
Martin

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times

Re: soundgenerator

Post by jgu1 »

Hi everybody!

ThankΒ΄s for your respons. I will try TUT24.

This I mean by press a buttum is, when I press on an Input I get a sound on 1750hz on an output. But to change the tone I would do it in the program. Its only an examble I need. Is it possible to make the tone without Interrupt?

Best regard

JΓΈrgen. :P

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: soundgenerator

Post by Benj »

Hello

Yes its possible to make a tone without an interrupt however if you do not use an interrupt then all your program will be able to do is to make the tone.

eg

while 1
{
output 1
delay
output 0
delay
}

By changing the length of the delays you change the frequency of the output tone.

You may be able to fit a bit more functionality into the loop but the more you add the less control over the tone you will have. Eg. anything that blocks the program for any length of time will cause problems.

Post Reply