On Wed, Jan 25, 2012 at 5:12 PM, charlie 'chop' copp <
charles.copp@...> wrote:
> **
>
>
> thanks for codejose
>
> there are some doubts..
>
> like why does the for/next loop conrol variable 'i' also get deducted from
> the samplesize?
>
Variable 'i' simulates the time base...
samplesize is never defined
> samplebuffer is not dimensioned
>
Yeah I know. It's only a draft to show the idea. It is not real code and
shows only the main concept.
> any method to employ to make a saw ,pulse,square ,triangle
>
It is quite easy. To get a square wave just make a function like this:
function squareWave (i,freq)
if sin(i*freq) > 0 then squareWave = 1
else
if sin(i*freq) = 0 then squareWave = 0
else
if sin(i*freq) <0 then squareWave = 1
end function
for a sawtooth wave you may use the MOD operator (the modulo or remainer of
a division of "i" by frequency, etc.
> where do i find this code on c-sound ?
> thanks in advance
> charles
>
There exist lots of C-Sound resources on the net, thousands of examples,
instruments, scores, etc.
With C-Sound it is an easier task because it has built-in functions for
oscillators, filters, FM, etc.
Take a look at http://www.adp-gmbh.ch/csound/fm/index.html for some nice
examples of FM instruments generated with CSound.
Here is a good tutorial to get into Csound:
http://www.csounds.com/tootsother/index.html
Cheers.
JaM
[Non-text portions of this message have been removed]Message
Re: [CZsynth] Re: Casio XW-P1 virtual analog
2012-01-25 by José Ángel Morente
Attachments
- No local attachments were found for this message.