Csound Csound-dev Csound-tekno Search About

[Csnd] Combining two mono ftables to stereo

Date2026-05-07 09:57
From"Jeanette C." <000015cdd0ffa6cd-dmarc-request@LISTSERV.HEANET.IE>
Subject[Csnd] Combining two mono ftables to stereo
Hey hey,
I have two ftables containing monaural audio. They are exactly the same 
length. I want to write them to a stereo audiofile. I tried GEN52, but it 
apparently doesn't like the size of the new table (twice the size of one input 
table). Perhaps because it isn't a power-of-two.

Is there another way to do it, except playing the tables and using something 
like fout to write them?

Best wishes,

Jeanette

--
  * PeerTube: https://makertube.net/@jeanette_c
  * GitHub: https://github.com/jeanette-c
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g

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

Date2026-05-07 10:57
FromRory Walsh
SubjectRe: [Csnd] Combining two mono ftables to stereo
Never used GEN53, but why not just bounce them to disk in a single k-rate loop: while kSomething is less than length of table, sum samples and call fout. Below is an instrument I shared with a Cabbage user that write the contents of one file to another in a single k-rate loop:

instr 1 prints("Writing copy of file...\n") lenght:i = filelen("C:\\Users\\roryw\\sourcecode\\cabbage3-recipes\\samples/cleanGuitar.wav")*sr index:k = 0 while index < lenght do sig:a = diskin2("C:\\Users\\roryw\\sourcecode\\cabbage3-recipes\\samples/cleanGuitar.wav", 1, 0, 1) fout("C:\\Users\\roryw\\sourcecode\\cabbage3-recipes\\copy1.wav", 4, sig:a) index += 1 od if(release() ==1) then prints("Finished writing file...\n") ficlose("C:\\Users\\roryw\\sourcecode\\cabbage3-recipes\\copy2.wav") endif endin


On Thu, 7 May 2026 at 09:58, Jeanette C. <000015cdd0ffa6cd-dmarc-request@listserv.heanet.ie> wrote:
Hey hey,
I have two ftables containing monaural audio. They are exactly the same
length. I want to write them to a stereo audiofile. I tried GEN52, but it
apparently doesn't like the size of the new table (twice the size of one input
table). Perhaps because it isn't a power-of-two.

Is there another way to do it, except playing the tables and using something
like fout to write them?

Best wishes,

Jeanette

--
  * PeerTube: https://makertube.net/@jeanette_c
  * GitHub: https://github.com/jeanette-c
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g

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
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