Wow, I had missed the introduction of these opcodes. Very useful, Thanks Steven. Oeyvind 2008/1/30, Steven Yi : > Hi All, > > Not sure if this is exactly related, but if you're working on a sample > by sample basis, you may want to consider either working ksmps=1 or > using the vaset and vaget opcodes, which will allow reading and > writing on a per-sample basis of an a-rate variable. The va- opcodes > essentially allow you to write csound code in the same exact way you > would if you were writing it in C, where you would be working with a > vector of audio data, and were originally written to help port C audio > code to pure csound code. > > Anyways, just wanted to mention those. > > Thanks! > steven > > > > On Jan 29, 2008 8:25 PM, Brian Wong wrote: > > > > Actually my ftsave question is about trying to do a very similar process, > > except in my case I am trying to create wave files with a specific (small) > > number of samples in the single-cycle waveform, to load into a synthesizer. > > Any advice would be appreciated! > > > > > > > > ________________________________ > > > Date: Tue, 29 Jan 2008 17:13:57 -0500 > > > From: mailing-lists-1001@anthonykozar.net > > > > > To: csound@lists.bath.ac.uk > > > Subject: [Csnd] Re: Re: generating single cycle waveforms to an audio file > > > > > > > > > > Csound note events always last a multiple of ksmps samples though. So, you > > > have to be careful no matter which opcode you use to generate the sound. > > > Settings ksmps = 1 is probably necessary to get the best results. > > > > > > This question is very similar to the ftsave/WAV question from the other > > day. > > > The other issue of course is that Csound's idea of a single-cycle waveform > > > in an ftable is independent of pitch. The precision attainable when > > reading > > > such a waveform in a sampler will depend on what frequency you output it > > at. > > > I suggest that you may want to start with a Csound table size of 65536 and > > a > > > 1 Hz output frequency using an interpolating opcode (oscil3 or oscil1i > > could > > > work since kr = sr). That would give you 44100 samples in the WAV file > > > (assuming 44.1 kHz sampling rate) for one cycle. You may even want more > > > than that. > > > > > > Anthony Kozar > > > mailing-lists-1001 AT anthonykozar DOT net > > > http://anthonykozar.net/ > > > > > > > > > Rory Walsh wrote on 1/29/08 4:30 PM: > > > > > > > Perhaps I misunderstood but if you know how long one cycle is then just > > > > run the instrument for one cycle. You could also catch a cycle during > > > > performance using a conditional test with fout. > > > > > > > P R Figueiredo wrote: > > > >> Hello, > > > >> > > > >> Is there any simple way of creating a single cycle waveform (from any > > > >> table I could use with an oscillator) and save it to a .wav file to use > > > >> in a sampler, for instance? Obviously I can use an oscillator to play > > > >> the waveform, render to a file, and then edit to a single cycle. But I > > > >> wonder if it's possible to generate a single cycle, and save me all the > > > >> editing. > > > > > > > > > > > > Send bugs reports to this list. > > > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe > > csound" > > > > ________________________________ > > > > > Send bugs reports to this list. > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" >