thanks for codejose there are some doubts.. like why does the for/next loop conrol variable 'i' also get deducted from the samplesize? samplesize is never defined samplebuffer is not dimensioned other than that i like it , i allready have helped a fellow program redisgn his wave making program , and there are a lot more parameters used to create a waveform (within his program) but the set back is , its always a sin wave ,,,, any method to employ to make a saw ,pulse,square ,triangle where do i find this code on c-sound ? thanks in advance charles ----- Original Message ----- From: "José Ángel Morente" <msxjam@...> To: <CZsynth@yahoogroups.com> Sent: Wednesday, January 25, 2012 5:04 AM Subject: Re: [CZsynth] Re: Casio XW-P1 virtual analog > On Wed, Jan 25, 2012 at 5:59 AM, charlie 'chop' copp < > charles.copp@...> wrote: > > > ** > > > > i wish i knew how to form a fm waveform with mathmatics so i could write my > > own sample sysex sender , > > > > Using pseudo-code it would be something like this: > > carrierFreq = 440 > modulatorFreq = 220 > sampleRate = 44100 > amp = 10000 > > for i = 0 to samplesize - i > timePos = i * 360 / sampleRate //or 2*PI if you use radians instead > samplebuffer [i] = sin (carrierFreq*timePos + sin > (modulatorFreq*timePos)) * amp > next > > That piece of code should be quite easy to convert to any other language > (Basic, Pascal, C, Matlab, etc.) > > By the way, you may be interested in C-Sound programming language: > > http://www.csounds.com/ > > You can recreate virtually any synth sound (FM, analogue, DSP processing, > etc.) with a few lines of code and export the data in binary format. > > > [Non-text portions of this message have been removed] > > > > ------------------------------------ > > Yahoo! Groups Links > > > >
Message
Re: [CZsynth] Re: Casio XW-P1 virtual analog
2012-01-25 by charlie 'chop' copp
Attachments
- No local attachments were found for this message.