[Csnd] generating single cycle waveforms to an audio file
Date | 2008-01-29 21:23 |
From | P R Figueiredo |
Subject | [Csnd] generating single cycle waveforms to an audio file |
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. Thanks Pedro |
Date | 2008-01-29 21:30 |
From | Rory Walsh |
Subject | [Csnd] Re: generating single cycle waveforms to an audio file |
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. Rory. 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. > > Thanks > Pedro > > > Send bugs reports to this list. > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe > csound" > |
Date | 2008-01-29 21:37 |
From | John Lato |
Subject | [Csnd] Re: generating single cycle waveforms to an audio file |
Hello, The canonical way would be to use oscil1 or oscil1i, but those only output at k-rate, and with just linear interpolation. If you want an a-rate output, you can use a standard oscillator of your choice (I would choose poscil3) with a frequency of 1/p3. John W. Lato School of Music The University of Texas at Austin 1 University Station E3100 Austin, TX 78712-0435 (512) 232-2090 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. > > Thanks > Pedro > > > Send bugs reports to this list. > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe > csound" |
Date | 2008-01-29 21:54 |
From | Victor.Lazzarini@nuim.ie |
Subject | [Csnd] Re: Re: generating single cycle waveforms to an audio file |
Attachments | None None |
Date | 2008-01-29 22:13 |
From | Anthony Kozar |
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. |
Date | 2008-01-29 22:49 |
From | P R Figueiredo |
Subject | [Csnd] Re: generating single cycle waveforms to an audio file |
I got it now. Thank you all. Pedro |
Date | 2008-01-29 23:16 |
From | John Lato |
Subject | [Csnd] Re: Re: Re: generating single cycle waveforms to an audio file |
If you wanted to save as a wave file, oscil1 would require upconverting to an a-rate variable as the oscil1 family only outputs at k-rate. There wouldn't be any data loss at sr=kr, but it's an extra step. Of course Anthony is right that, if high precision is desired, you should use a large table to begin with. John W. Lato School of Music The University of Texas at Austin 1 University Station E3100 Austin, TX 78712-0435 (512) 232-2090 Victor.Lazzarini@nuim.ie wrote: > or oscil1 (i,3) > > Victor > ----- Original Message ----- > From: John Lato |
Date | 2008-01-30 04:33 |
From | "Steven Yi" |
Subject | [Csnd] Re: RE: Re: Re: generating single cycle waveforms to an audio file |
Attachments | None |
Date | 2008-01-30 05:33 |
From | DavidW |
Subject | [Csnd] Re: RE: Re: Re: generating single cycle waveforms to an audio file |
Perhaps I didn't understand, but what's the problem w. generating the file from scratch in your favourite programming language? On 30/01/2008, at 3: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! > David Worrall ________________________________________________ _________________________________________________ experimental polymedia: www.avatar.com.au Sonic Communications Research Group, University of Canberra: creative.canberra.edu.au/scrg/ |
Date | 2008-01-30 09:14 |
From | "Oeyvind Brandtsegg" |
Subject | [Csnd] Re: Re: RE: Re: Re: generating single cycle waveforms to an audio file |
Attachments | None |