drawing sine wave in vb

plz cud u help me draw a sine wave in vb 6.0 ...

Drawing a sine wave in Visual C#

i need urgent help. I have only a little bit experience in programming c++ application. Our assignment of the school is:Draw 2 sine waves and sum wave/residue!Are there any good code examples for drawing sine waves in Visual C# in the Internet. I only found after a long Internet search this site:htt ...

Approximating sine wave using bezier curves

all, I'm trying to approximate a sine wave using bezier curves (for rendering speed over drawing many straight lines).I'm trying to follow the non-C# code specified down the page at:http://commons.wikimedia.org/wiki/Fi...on_strings.svg// Produces a sine path as flat point array {PT, PT[3], PT[3], .. ...

generating a sine wave

Hay guys,I'm trying to generate a sine wave. I have some code but I don't know what i'm missing from it.Any help or comments would be great.[code]void CSine_wave1View::OnPaint(){CPaintDC dc(this);CRect Recto;GetClientRect(&Recto);CBrush bgBrush(BLACK_BRUSH);dc.SelectObject(bgBrush);dc.Rectangle( ...

Sine wave help

i want to know how to generate a sine wave using sin() function ...

sine wave

I need help on making a sine wave I'm trying to do the equation y = Acos(2 (pi)/B x - 2(pi)/B P) amplitude A, period B, and phase shift P. It is not working out too well so can anyone help me refine this?#include <math.h>#include <stdio.h>#include <windows.h>#include "resource ...

Creating and playing a sine wave sound (Python)

This code creates a sound file in Sun's simple AU audio format of a sine wave of given frequency, duration and volume. ...

waveOutWrite is creating complex wave instead of simple sine wave

I am writing a program which should output some frequency shift keyed (FSK) audio. I am using a sin(...) function to find some values to plug into an array of unsigned ints which I am outputting using waveOutWrite with a sample rate of 44100 specified in the header.The values are all good and follow ...

Create a synthetic 'sine wave' wave file

You can use Python modules math, wave, and struct to create and save a synthetic sine wave of given frequency and duration (size) ... ...

Generating sine wave

How can we generate a sine wave without using the sin() function. ...

Creating a sine wave at a specific frequency and sample rate

(I did search for this, but didn't find exactly what I am looking for).I am working on a function that will generate a sine wave at a given frequency AND sampling rate. Something that will "fill a 10k sample buffer with a 1 kHz wave at a 44.1 kHz sample rate".My attempts so far are produci ...

Generating a 1kHz sine wave

Hi, I have a question about generating a 1kHz sine wave.First of all, we can't use the sin function so I just made a function that evaluates sin at some point...int generate_sin(int t);{int sin;sin = t - ((t^3)/(3*2*1)) + ((t^5)/(5*4*3*2*1));return sin;}Now, this function will evaulate sin at some n ...

OPenGL, C++ sine wave problems

Can anyone demonstarate how to use openGL to plot a sine wave between two points in a V C++ program? ...

sine wave on VC++

Can anyone please help me write a C code to plot a sine wave on VC++? I cant use MATLAB or graphics in C/C++...coz this is what my project requires..VC++ ..I have goteen Visual Studio 6.0 installed and everytime I click on "Help" it says MSDN not installed... I hope this is not too stupid ...

how to Draw the analog Sine wave in vb picture control.

I need to draw the analog Sine wave in picture control. how to draw in vb code.Advance ...

how to draw a sine wave in c# on windows application

We have got a project of signal encodng in c#.the user had to enter frequency and amlitude and accordingly we have to draw a sine wave which should be displayed on a form.so plz tell us how to draw the sine wave given frequency and amplitude?plz reply soon ...

Ubuntu Gnome Sound Recorder - Only records the sound of a sine wave

Ok, so I could really kick myself for this, but I went to class today for the first time after a nice long summer with no school work and lots of programming. :) To my surprise, the gnome sound recorder in Ubuntu no longer seemed to work. When I tried to record sound, the little real-time sound leve ...

Drawing a sine wave into a 2d Array

HiI'm having trouble drawing a sinewave horizontally across the screen into an array[10][100]. The wave must be drawn using the '*' character.I can initialize the array all to spaces but I can't figure out how to put the sinewave into it. I've been looking on the net and have been able to draw sinew ...

drawing square wave by getting the data from a file..

i'm really a beginner here, so hopefully somebody can help me. i'm currently doing a dialog application for a IC tester(hardware). In this application, it will send some vector(series of '1' and '0' ) to the IC tester(hardware) and then after the testing it will return back a result vector(series of ...

Sine wave Display

HelloIn my application, I need to draw the waveforms of sine waves as they are generated by a generator function.Please advise. ...

Sine Wave with phase displacement

I've got a program that generates and streams a sinewave in realtime, but I'm having problems applying phase differences to the chunks to get them to join together nicely when streaming. Here's what I have:void Oscillator(short int *wave,unsigned int sampleRate,unsigned int length,unsigned int Hz,fl ...

Having some trouble drawing in a window

I've been doing some programming, using the windows library, lately and have a problem.Take a look at my WndProc function:LRESULT CALLBACK WndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ){// Create an object which has all of the values to calculate X and dXstatic XValues xObj( 100, 64, ...

Ubuntu Screen - sth like vertical sine waves

Hi, I have a problem with Ubuntu 9.04 RC. I have a notebook MSI VR610 and external 22" screen connected to it. When I turn off the notebook screen and set resolution of the external screen to highest - recommended (1680x1050) the screen starts to waver, especially on the vertical edges of eleme ...

wave file

Please help me!I would like to know how to make a wave such as sine wave I draw in the viewsounding. ...

Sine Animation

I have created an animation API, which has an option for the 'effect' or animation type. Now i'm trying to produce a slow, fast slow effect using a sine wave but seem to be having some trouble!The code below is supposed to get the steps to calculate each frame by diving the usable part of the sine w ...

problem generating sine waves

Hi, I am new to ALSA. I am trying to write a program that will generate waves on user input of different parameters. With the code I have written(below), I am unable to generate a sine wave. Any help would be greatly appreciated.#include <stdio.h>#include <stdlib.h>#include <alsa/asou ...

square wave generator

Square wave = sign(sinusoidal wave)So then why isn't the following code creating a square wave:int sgn(double d){if (d>=0) d=1;else d=-1;return d;}static void generate_square(const snd_pcm_channel_area_t *areas, snd_pcm_uframes_t offset,int count, double *_phase){static double max_phase = 2. * M_ ...

Ubuntu unable to generate square wave

Hi, I am trying to modify the sample program pcm.c(which generates a sine wave) from the alsa website to produce a square wave.Square wave = sign(sinusoidal wave)So then why isn't the following code creating a square wave:int sgn(double d){if (d>=0) d=1;else d=-1;return d;}static void generate_sq ...

multitone sine frequencies

I have a program that generates a sine wave. I wanted to know how to generate a multitone wave with 2 frequencies using this program.What has to be changed? Any help would be greatly appreciated.static void generate_sine(const snd_pcm_channel_area_t *areas, snd_pcm_uframes_t offset,int count, double ...

A GDI+ question:

If you master Microsoft's GDI+ API i would like to ask you:Is it possible to create custom pens in there ? Not just with custom start and end caps, and custom dashes and stuff, but i mean pens that oscillate for example (sine oscillation along the line drawing axis) or pens that mimic a particle eff ...

Replace PolyBezier with Sin

At the moment I’m drawing a PolyBezier curve with a vector filled with points.How can I replace the PolyBezier with a real sine wave.std::vector<CPoint> aPointArray;pDC->Polyline(aPointArray.begin(), aPointArray.size()); ...

jQuery r923 - in trunk/demos/functional/templates: . images

Author: kbwood.auDate: Wed Nov 12 05:36:46 2008New Revision: 923Added:trunk/demos/functional/templates/images/target.jpeg (contents, props changed)trunk/demos/functional/templates/images/white.gif (contents, props changed)trunk/demos/functional/templates/ui.effects.easing.ex2.htmlModified:trunk/demo ...

jQuery r1705 - in trunk: demos demos/draggable demos/droppable demos/effects_easings demos/effects_feedb...

Author: rdworthDate: Tue Jan 20 03:42:07 2009New Revision: 1705Modified:trunk/demos/draggable/constrain-movement.html (props changed)trunk/demos/draggable/cursor-style.html (props changed)trunk/demos/draggable/delay-start.html (props changed)trunk/demos/draggable/snap-to.html (props changed)trunk/de ...

Beginner needs code explained....

I am currently using a C++ code to define an unsteady input to a CFD problem where the axial velocity input is in the form of a sine wave. The code itself is working fine but my problem is i need to understand what each line of code actually means as i may be questioned on aspects of it in my Viva V ...

Generating Audio

I would like to know how I would be able to generate an audio wave by using a table of values to make each point.For example, I may have the values for a sine wave stored in a list, so it would need to refer to each value and recreate the sine wave. I know that the frequency wouldn't match but that' ...

Regarding visual C++

i need the code to generate a sine wave and an ecg reading wave and how to generate any type of waveform using C++ in VSC++.Pls help me out in this. ...

Drag and Drop Graphics Items

I'm using Visual C++ in Visual Studio Professional 2008, with an MFC Dialog application.My project is to link moving shapes with audio that pans left and right.To control different types of sound (eg, square wave, sine wave, sawtooth etc) I will use different shapes.These shapes should then be able ...

3 D Cone

Can any one send me the code in VC ++ to draw a 3 D cone. The input is a analog signal ( consider a sine wave) the height and width of the cone should vary with respect to the variation of the input signal......Pls its very urgent......... I dont have any previous experiane by using VC ++. Can any o ...

Oscilloscope Signals

Hi, I am new to programming using C++ and am stuck on a hard topic.I need to write a program to use a D to A converter board to output various signals which can be viewed on an oscilloscope.The signals are sine wave, triangle wave and a square wave.This is what I have so far:#include <stdio.h> ...

Audio Chip/Codec tolerances and differences

all. Bear with me, I promise this will be hardware related in a minute...I'm working on a project for which I need to generate some FSK. I'm doing so by using a sin(...) function to calculate the values along the wave for N periods of frequency A and M periods of frequency B, both of duration T, and ...

Prob regarding /dev/dsp in RedHat Linux 2.4

I am new to Linux and using RedHat Linux 2.4 .I write a C code to playback audio .But when I compile it I find no error/warning ,at run it telling /dev/dsp : No such device .But when I check the dsp file I find it .#ls -l /dev/dspcrw-------- 1 subrata root 1 Nov Please tell me what is the problem he ...

DSP anyone?

Taking a chance here, as I know this is a pretty DSP (digital signal processing) specific question...(Using C++ in Visual Studio 2005) I have a series of data points that are supposed to represent a 60 Hz sine wave. However, there is both:(1) Noise in the data(2) Fewer data points than desired (~35 ...

help me please

i have assignment to submit on this monday.i don't understand what the question is,can anyone help me?Projectile MotionYou will recall the tutorial problem in which you computed the height of a projectilethat was launched "straight up". In this case the height after t seconds is given by:2 ...

play sound help

helloI am new in python.Can anyone show me away to play sine wave through sound card usind python?please give me some help ...

using arrays for calculations

**MY QUESTION IS BASED ON A COURSEWORK**I am trying to produce a sin wave using *'s to represent sample values for 1 cycle of the wave. For example when the user enters 7 the output should look like this:.........................................................*...................................... ...

Help needed with handling wav files

im a beginner to learning C++ and i have to write a programme that basically performs different functions on a wav file, these aregain changereverse the fileNormaliseation - this is an algorithm that should be capable of scanning the waveform for a peak, then calculating the gain required to make th ...

Writing PCM as raw data in C/C++ in Windows

I'm having a very difficult time with this problem. What I'm trying to do is generate a sine wave for a specific frequency and output it as raw pcm data to a file. The sine wave is generated as follows: samples[i]=static_cast<int>(32767 * amplitude * sin(static_cast<double>(i)*scale) );w ...

Hadamard matrix c++

poeple , i am doing a project by dev c++ ,i need to make a function for calculating the Hadamard Matrix , i tried alot but i could not ,i also want to know how can draw sine wave or square wave by c++, i am using windows vista and AMD processor .thank you very much and i must say i am in hurry .Ali ...

TrangleWave help

I'm trying to write a program that will wrap an ASD envelop to a trangle wave sound. I can't seem to get my trangle one to work. I did get my sine wave to work. What could I change to get it to do a trangle? def asd(fileName,nSeconds,cyclesPerSecond,maxAmp):newsound=makeEmptySound(nSeconds)samplesPe ...

How to copy ClientDC to Memory Device Context?

HelloHow to copy the content of the client device context to Memory Device context? I want the complete drawing on the view to be stored as Bitmap file. FOr this i want Memory Device context.Further there are issues such as does it affects that when i initialise my memory Device Context, i.e. before ...