[Csnd] Rendering multiple instrument calls into one file / interative rendering
Date | 2023-03-05 08:11 |
From | Philipp Neumann |
Subject | [Csnd] Rendering multiple instrument calls into one file / interative rendering |
Hello Everybody! I was wondering if there is a better solution to render audio, then muting instruments and do another run of my csound-code. For example: I have a csound-code, which is based on multiple calls of different instruments (100 instances of instr 20 and 20 instances of instr 30). Now i want all calls from instr 20 in one .wav file to be rendered and all calls of instr 30 in another .wav file. I thought about collecting the output of each instrument into a global audio variable and render them i another instrument, which only exists for rendering, via ‚fout‘. But i can’t get it working. How i know Csound by now there must be an easy solution for this. Also i was wondering if there is a solution for another problem. For example i’m working with an instrument, which should create variations of one sound-event. And every variation should be rendered in a seperate .wav file. I can call the instrument via ‚event‘ and have an ‚fout‘ opcode inside the called instrument. But i want to find a way to iterative go through numbers which makes the created .wav file unique and doesn’t get replace, like „Super-Sound-001.wav“, „Super-Sound-002.wav“ and so on. How can i solve this? Maybe you have some tipps für me. All the best, Philipp 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-03-05 08:29 |
From | ST Music |
Subject | Re: [Csnd] Rendering multiple instrument calls into one file / interative rendering |
I'm lost on the question - is it that you can't get fout to work? Why the need for a seperate recording instrument as you can use fout from inside the instrument. For what it's worth, it's easy to set up fout from either inside the instr or using a seperate rendering instr by passing the audio using a global audio variable, I've done both. If you can explain a little better that would help. Scott On Sun, Mar 5, 2023, 3:12 AM Philipp Neumann, <kontakt@philippneumann.eu> wrote: Hello Everybody! |
Date | 2023-03-05 09:13 |
From | ST Music |
Subject | Re: [Csnd] Rendering multiple instrument calls into one file / interative rendering |
This is a simple example, 2 instr sent via global audio to record instruments. Uncomment fout lines and set your own variables. <CsoundSynthesizer> <CsOptions> -odac ;-o/sdcard/*******.wav </CsOptions> ;================================ <CsInstruments> sr = 48000 ksmps = 32 nchnls = 2 0dbfs = 1 gaAud1L init gaAud1R init gaAud2L init gaAud2R init instr 1 iFreq ftgen 1, 0, 0, 2, 220, 440, 880 aSig = oscil:a(line:k(.4,p3,0),tab:k(lfo(randomh:k(0,2.9,4),4,3),1)) ;outs(aSig, aSig) gaAud1L += aSig gaAud1R += aSig endin instr 2 aSig = vco2:a(line:k(.2,p3,0),110) ;outs(aSig, aSig) gaAud2L += aSig gaAud2R += aSig endin instr 3, Record_1 outs(gaAud1L, gaAud1R) ; 14 = wav, 16 bit (p2) ; 16 = wav, 32 bit float ;fout "/sdcard/instr1.wav", 16, gaAud1L, gaAud1R clear gaAud1L, gaAud1R endin instr 4, Record_2 outs gaAud2L, gaAud2R ;fout "/sdcard/instr2.wav", 16, gaAud2L, gaAud2R clear gaAud2L, gaAud2R endin </CsInstruments> ;================================ <CsScore> i1 0 4 i. + . i. + . i. + . i2 0 4 i. + . i. + . i. + . i3 0 16 i4 0 16 </CsScore> </CsoundSynthesizer> Scott On Sun, Mar 5, 2023, 3:29 AM ST Music, <stunes6556@gmail.com> wrote:
|
Date | 2023-03-05 10:52 |
From | Victor Lazzarini |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Rendering multiple instrument calls into one file / interative rendering |
Attachments | favicon.ico |
The answer to your second question is to use sprintf to generate a unique name
Prof. Victor Lazzarini
Maynooth University
Ireland
On 5 Mar 2023, at 08:12, Philipp Neumann <kontakt@philippneumann.eu> wrote:
|
Date | 2023-03-05 11:18 |
From | Victor Lazzarini |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Rendering multiple instrument calls into one file / interative rendering |
Attachments | favicon.ico |
this is the correct link to the latest released manual btw
Prof. Victor Lazzarini
Maynooth University
Ireland
On 5 Mar 2023, at 10:52, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
|
Date | 2023-03-06 14:59 |
From | Philipp Neumann |
Subject | Re: [Csnd] Rendering multiple instrument calls into one file / interative rendering |
Thanks, Scott! This works perfectly fine. I don’t know what i did wrong in my tests. > Am 05.03.2023 um 10:13 schrieb ST Music |