[Csnd] What's the highest quality sawtooth in Csound?
Date | 2010-09-27 01:18 |
From | Marcel de Velde |
Subject | [Csnd] What's the highest quality sawtooth in Csound? |
I'm writing a csound instrument that plays back microtuned midi files for research into microtuning (Just Intonation). I'll be listening very carefully to the tuned results, Just Intonation research is a mix of math and the ear. Ideally I'd like to use a perfect sawtooth wave without any imperfections that may make things less clear to the ear, as I've found that with lesser quality sawtooths the imperfections can generate things that can obscure (or mimic) beats and difference tones (which are important to be heard clearly for my research). Am I right in thinking that the VCO2 opcode will give the best quality sawtooth in Csound? Or are there better ways to make a bandlimited sawtooth? I do not care at all about the memory / processor power involved as I won't need to use it realtime. Thanks for any insights! -Marcel |
Date | 2010-09-27 04:27 |
From | Greg Schroeder |
Subject | [Csnd] Re: What's the highest quality sawtooth in Csound? |
There's a few approaches. Additive: Go down to the yellow table. Express those values in the ftable as decimals. If you'd like, observe the pattern for the sawtooth wave's partial values and enter more values. http://www.csounds.com/ezine/spectra/ and gen10's manual entry: http://www.csounds.com/manualOLPC/GEN10.html Or just draw a sawtooth wave with straight lines: http://www.csounds.com/manualOLPC/GEN07.html Those are the two most-obvious ones. Greg Use however many partials and adjust the size of the table to whatever definition of "quality" you'd like. That's the most precise way I know to make an audio-rate sawtooth wave. Greg On Mon, Sep 27, 2010 at 9:18 AM, Marcel de Velde |
Date | 2010-09-27 05:23 |
From | Marcel de Velde |
Subject | [Csnd] Re: Re: What's the highest quality sawtooth in Csound? |
Hi Greg, Thanks for your help!
Ok so then I call gen10 for every note that's played (make a big new table for each note) to make the harmonics from the note frequency up till the nyquist and then use for instance poscil3 to play the note? Just to be sure I got that right before I go figure out how to do that (I'm very much a csound programming newbie) That will give me a lot of aliasing. Can't have that for my use.
Still wondering if the method above will give a better audio quality than VCO2. Do you know why or in which way VCO2 gives inferior results? VCO2 would be way simpler but if it's lacking in quality then I'll do it the other way.. -Marcel |
Date | 2010-09-27 05:29 |
From | Corbin Simpson |
Subject | [Csnd] Re: Re: Re: What's the highest quality sawtooth in Csound? |
vco2 has been perfectly acceptable for me. I don't believe that a hand-rolled ioscil is any better, based on how the vco family is implemented. Sending from a mobile, pardon the brevity. ~ C. On Sep 26, 2010 9:23 PM, "Marcel de Velde" <m.develde@gmail.com> wrote: |
Date | 2010-09-27 07:31 |
From | Greg Schroeder |
Subject | [Csnd] Re: Re: Re: Re: What's the highest quality sawtooth in Csound? |
Listen to Mr. Simpson, I suspect he does this for a living. Could someone direct me to a discussion of exactly how vco/vco2 works? Just on principle, I try to stick with opcodes where I can figure out their guts. Greg On Mon, Sep 27, 2010 at 1:29 PM, Corbin Simpson |
Date | 2010-09-27 10:26 |
From | Corbin Simpson |
Subject | [Csnd] Re: Re: Re: Re: Re: What's the highest quality sawtooth in Csound? |
I should point out that "does this for a living" only pertains to graphics drivers, not sound systems. I don't really get paid for my music either. :3 The vco opcodes work by integrating impulses. Googling "band limited impulse train" should bring up a decent explanation. (At least, that's how I learned about it.) vco and vco2 both do very nice-sounding things. As the manual states, vco2 precalculates the needed tables. If you're doing real-time stuff and don't mind a bit of extra memory usage, vco2 works far better. ~ C. On Sun, Sep 26, 2010 at 11:31 PM, Greg Schroeder |
Date | 2010-09-27 13:46 |
From | Andres Cabrera |
Subject | [Csnd] Re: Re: Re: Re: Re: Re: What's the highest quality sawtooth in Csound? |
Yes, if you want sound quality, you should use a bandlimited oscillator like vco2. Using a table with a straight line will produce aliasing. QuteCsound includes an example showing exactly this, and you can clearly hear the difference. However, for larger size tables with cubic interpolation, the difference starts to become very small. Cheers, Andrés On Mon, Sep 27, 2010 at 10:26 AM, Corbin Simpson |
Date | 2010-09-28 00:37 |
From | Greg Schroeder |
Subject | [Csnd] Re: Re: Re: Re: Re: Re: Re: What's the highest quality sawtooth in Csound? |
Thank you everyone! Is this: http://cnx.org/content/m15457/latest/ the explanation I'm looking for? "The band-limited pulse, however, is free of aliasing problems because its maximum harmonic can be chosen to be below the folding frequency." Greg On Mon, Sep 27, 2010 at 9:46 PM, Andres Cabrera |
Date | 2010-09-28 09:43 |
From | Andres Cabrera |
Subject | [Csnd] Re: Re: Re: Re: Re: Re: Re: Re: What's the highest quality sawtooth in Csound? |
Hi, Yes. That kind of bandlimiting. There are several ways to do band limited oscillators, including Victor's somewhat recent FM techniques he talks about in a recent Csound journal article. Cheers, Andres On Tue, Sep 28, 2010 at 12:37 AM, Greg Schroeder |