[Csnd] Question re GEN routines
| Date | 2023-05-02 05:03 |
| From | Scott Daughtrey |
| Subject | [Csnd] Question re GEN routines |
If one wants to create custom/slightly more complex waveform shapes, is there a preferred GEN routine?
I noticed some that use exponents such as GEN05 only seem to allow either all positive or all negative values but not a combination.
For example, wanted to create a saw forward ramp waveform with an exponential curve from -1 to 1 like the one in this image:
https://www.dropbox.com/s/sv37xf4un2b841t/expon_saw.jpg?dl=0
This used:
giExp ftgen 2, 0, 1024, "exp", -2, 2, 0
which is convenient as it allows using mixed values (+, -) as well as 0. But using poscil to play, ex:
aSig = poscil(1, 110, 2)
produces a unipolar audio output. I was able to compensate using:
aSig = poscil(1.8, 110, 2)-.9
where the negative value has to be 1/2 of the amplitude.
Is there an easier method or better GEN, perhaps one that allows multiple values & options (more than one set of values, which GEN"exp" does not)? Especially if one wants to create irregular shapes, something that somewhat mimics transeg, allowing a mix of straight lines and curves (perhaps GEN25)? And best case scenario doesn't require compensating by using negative values after the oscil.
Scott
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |
| Date | 2023-05-02 05:38 |
| From | thorin kerr |
| Subject | Re: [Csnd] Question re GEN routines |
On Tue, May 2, 2023 at 2:03 PM Scott Daughtrey <stunes6556@gmail.com> wrote: If one wants to create custom/slightly more complex waveform shapes, is there a preferred GEN routine? |
| Date | 2023-05-02 14:01 |
| From | Victor Lazzarini |
| Subject | Re: [Csnd] [EXTERNAL] Re: [Csnd] Question re GEN routines |
|
Or offset+scale the oscillator signal. If the ramp is from 1 to close to 0, add -0.5 and then
scale it by 2.
Prof. Victor Lazzarini
Maynooth University
Ireland
On 2 May 2023, at 05:39, thorin kerr <thorin.kerr@gmail.com> wrote:
|