Csound Csound-dev Csound-tekno Search About

[Csnd] Problems with fout opcode

Date2025-03-19 20:37
FromGabriel Borin
Subject[Csnd] Problems with fout opcode
AttachmentsScreenshot 2025-03-19 at 16.20.45.png  Section01.csd  
Hi, everyone

I am facing some problems I don't know how to troubleshoot with the fout opcode. My idea was to generate multiple files from my csd so I could mix later. When I try to record, a few things happen:
  1. I keep seeing a message "Closing kick.wav" on the terminal, while csound is running. I end up with a short file that is not the full real-time performance;
  2. The file is usually distorted, if you look at the waveform (see attachment) it looks like there are samples missing;
  3. While troubleshooting, I tested to create an instrument to record the stereo monitor out with no success (there was no audio on the file).
  4. Recording out of CsoundQT does work, but only the stereo output.
  5. No effect on changing the Sample Rate...
Am I missing something?

I am attaching the csd I am working on.

I am using MacOS Sequoia 15.3.2, M2. I am running CsoundQT 1.1.3, and Csound 6.18

Thank you,

Best,
Gabriel
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

Date2025-03-19 21:03
FromParham Izadyar
SubjectRe: [Csnd] Problems with fout opcode
hello Gabriel -

i think i can help you with that:
you run your instr 101 ( which has kick.wav in it ) many times, and each time it writes the signal from the beginning.
its kind of overwritten on the same file. i suggest for the solution to do this:
send signal from your instr 101 to another instr that runs for longer duration and record the file there

hope that helps - 
parham

On Thu, Mar 20, 2025 at 12:08 AM Gabriel Borin <gabriel.s.borin@gmail.com> wrote:
Hi, everyone

I am facing some problems I don't know how to troubleshoot with the fout opcode. My idea was to generate multiple files from my csd so I could mix later. When I try to record, a few things happen:
  1. I keep seeing a message "Closing kick.wav" on the terminal, while csound is running. I end up with a short file that is not the full real-time performance;
  2. The file is usually distorted, if you look at the waveform (see attachment) it looks like there are samples missing;
  3. While troubleshooting, I tested to create an instrument to record the stereo monitor out with no success (there was no audio on the file).
  4. Recording out of CsoundQT does work, but only the stereo output.
  5. No effect on changing the Sample Rate...
Am I missing something?

I am attaching the csd I am working on.

I am using MacOS Sequoia 15.3.2, M2. I am running CsoundQT 1.1.3, and Csound 6.18

Thank you,

Best,
Gabriel
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

Date2025-03-19 21:15
FromGabriel Borin
SubjectRe: [Csnd] Problems with fout opcode
Hi, Parham

That does make sense. It would be like bussing audio to another instrument. I will try that later.

Do you think that would also explain what is happening to the file itself (distortion/absence of some samples)? 

Also, why would it be the case that using the 'monitor' opcode didn't work?

--Gabriel

On Wed, Mar 19, 2025, 17:03 Parham Izadyar <parhamizadyar93@gmail.com> wrote:
hello Gabriel -

i think i can help you with that:
you run your instr 101 ( which has kick.wav in it ) many times, and each time it writes the signal from the beginning.
its kind of overwritten on the same file. i suggest for the solution to do this:
send signal from your instr 101 to another instr that runs for longer duration and record the file there

hope that helps - 
parham

On Thu, Mar 20, 2025 at 12:08 AM Gabriel Borin <gabriel.s.borin@gmail.com> wrote:
Hi, everyone

I am facing some problems I don't know how to troubleshoot with the fout opcode. My idea was to generate multiple files from my csd so I could mix later. When I try to record, a few things happen:
  1. I keep seeing a message "Closing kick.wav" on the terminal, while csound is running. I end up with a short file that is not the full real-time performance;
  2. The file is usually distorted, if you look at the waveform (see attachment) it looks like there are samples missing;
  3. While troubleshooting, I tested to create an instrument to record the stereo monitor out with no success (there was no audio on the file).
  4. Recording out of CsoundQT does work, but only the stereo output.
  5. No effect on changing the Sample Rate...
Am I missing something?

I am attaching the csd I am working on.

I am using MacOS Sequoia 15.3.2, M2. I am running CsoundQT 1.1.3, and Csound 6.18

Thank you,

Best,
Gabriel
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
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

Date2025-03-19 21:31
FromST Music
SubjectRe: [Csnd] Problems with fout opcode
Attachmentsfout_monitor.csd  
Hi Gabriel.

Don't have time to look over your file at the moment, will try later. Here's an example using monitor and fout. Perhaps it will help lead you to a solution.

Best,
Scott

On Wed, Mar 19, 2025, 5:16 p.m. Gabriel Borin <gabriel.s.borin@gmail.com> wrote:
Hi, Parham

That does make sense. It would be like bussing audio to another instrument. I will try that later.

Do you think that would also explain what is happening to the file itself (distortion/absence of some samples)? 

Also, why would it be the case that using the 'monitor' opcode didn't work?

--Gabriel

On Wed, Mar 19, 2025, 17:03 Parham Izadyar <parhamizadyar93@gmail.com> wrote:
hello Gabriel -

i think i can help you with that:
you run your instr 101 ( which has kick.wav in it ) many times, and each time it writes the signal from the beginning.
its kind of overwritten on the same file. i suggest for the solution to do this:
send signal from your instr 101 to another instr that runs for longer duration and record the file there

hope that helps - 
parham

On Thu, Mar 20, 2025 at 12:08 AM Gabriel Borin <gabriel.s.borin@gmail.com> wrote:
Hi, everyone

I am facing some problems I don't know how to troubleshoot with the fout opcode. My idea was to generate multiple files from my csd so I could mix later. When I try to record, a few things happen:
  1. I keep seeing a message "Closing kick.wav" on the terminal, while csound is running. I end up with a short file that is not the full real-time performance;
  2. The file is usually distorted, if you look at the waveform (see attachment) it looks like there are samples missing;
  3. While troubleshooting, I tested to create an instrument to record the stereo monitor out with no success (there was no audio on the file).
  4. Recording out of CsoundQT does work, but only the stereo output.
  5. No effect on changing the Sample Rate...
Am I missing something?

I am attaching the csd I am working on.

I am using MacOS Sequoia 15.3.2, M2. I am running CsoundQT 1.1.3, and Csound 6.18

Thank you,

Best,
Gabriel
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
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

Date2025-03-19 22:44
FromGabriel Borin
SubjectRe: [Csnd] Problems with fout opcode
Hi, all 

Parham's suggestion did work. I had to set up a few global audio variables. And create the sends from the instruments, by adding the signal to the audio variable. Also, I created an instrument that runs forever like so:

instr 200

fout("kick.wav", 16, gaKickSnd)

clear(gaKickSnd)

fout("snare.wav", 16, gaSnrSnd)

clear(gaSnrSnd)

fout("chords.wav", 16, gaChordsSndL, gaChordsSndR)

clear(gaChordsSndL, gaChordsSndR)

fout("bass.wav", 16, gaBassSnd)

clear(gaBassSnd)

endin


Thanks for the help, Parham and Scott.


Best,

Gabriel


On Wed, Mar 19, 2025 at 5:32 PM ST Music <stunes6556@gmail.com> wrote:
Hi Gabriel.

Don't have time to look over your file at the moment, will try later. Here's an example using monitor and fout. Perhaps it will help lead you to a solution.

Best,
Scott

On Wed, Mar 19, 2025, 5:16 p.m. Gabriel Borin <gabriel.s.borin@gmail.com> wrote:
Hi, Parham

That does make sense. It would be like bussing audio to another instrument. I will try that later.

Do you think that would also explain what is happening to the file itself (distortion/absence of some samples)? 

Also, why would it be the case that using the 'monitor' opcode didn't work?

--Gabriel

On Wed, Mar 19, 2025, 17:03 Parham Izadyar <parhamizadyar93@gmail.com> wrote:
hello Gabriel -

i think i can help you with that:
you run your instr 101 ( which has kick.wav in it ) many times, and each time it writes the signal from the beginning.
its kind of overwritten on the same file. i suggest for the solution to do this:
send signal from your instr 101 to another instr that runs for longer duration and record the file there

hope that helps - 
parham

On Thu, Mar 20, 2025 at 12:08 AM Gabriel Borin <gabriel.s.borin@gmail.com> wrote:
Hi, everyone

I am facing some problems I don't know how to troubleshoot with the fout opcode. My idea was to generate multiple files from my csd so I could mix later. When I try to record, a few things happen:
  1. I keep seeing a message "Closing kick.wav" on the terminal, while csound is running. I end up with a short file that is not the full real-time performance;
  2. The file is usually distorted, if you look at the waveform (see attachment) it looks like there are samples missing;
  3. While troubleshooting, I tested to create an instrument to record the stereo monitor out with no success (there was no audio on the file).
  4. Recording out of CsoundQT does work, but only the stereo output.
  5. No effect on changing the Sample Rate...
Am I missing something?

I am attaching the csd I am working on.

I am using MacOS Sequoia 15.3.2, M2. I am running CsoundQT 1.1.3, and Csound 6.18

Thank you,

Best,
Gabriel
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
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
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

Date2025-03-20 11:06
From"Dr. Richard Boulanger"
SubjectRe: [Csnd] Problems with fout opcode
Gabriel,

What you are creating is very cool. Thanks for posting and sharing it.
I can't wait to hear all the sections of this very cool generative piece/system and hope you will share that too.

Could you post your specific fix that supports the fout with globals as you excerpted in your previous email?

I would love to share this with my students at Berklee.  (and plan to share section01 - with the fouts commented out for now)
- many of them, as you would imagine, are into grooves (like the ones you are creating) and generative csds.  (and me too!)


- Dr.B


Dr. Richard Boulanger

Professor

Electronic Production and Design

Berklee College of Music

Professional Writing & Technology Division



On Wed, Mar 19, 2025 at 4:38 PM Gabriel Borin <gabriel.s.borin@gmail.com> wrote:
Hi, everyone

I am facing some problems I don't know how to troubleshoot with the fout opcode. My idea was to generate multiple files from my csd so I could mix later. When I try to record, a few things happen:
  1. I keep seeing a message "Closing kick.wav" on the terminal, while csound is running. I end up with a short file that is not the full real-time performance;
  2. The file is usually distorted, if you look at the waveform (see attachment) it looks like there are samples missing;
  3. While troubleshooting, I tested to create an instrument to record the stereo monitor out with no success (there was no audio on the file).
  4. Recording out of CsoundQT does work, but only the stereo output.
  5. No effect on changing the Sample Rate...
Am I missing something?

I am attaching the csd I am working on.

I am using MacOS Sequoia 15.3.2, M2. I am running CsoundQT 1.1.3, and Csound 6.18

Thank you,

Best,
Gabriel
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

Date2025-03-20 12:33
FromGabriel Borin
SubjectRe: [Csnd] Problems with fout opcode
AttachmentsSection01.csd  
Hi, Dr. Boulanger

Thank you very much for your comment. I am sharing what I have for now, in the attached csd. 

Still a work in progress, and I really appreciate your encouragement.

Best regards,
Gabriel

On Thu, Mar 20, 2025 at 7:07 AM Dr. Richard Boulanger <rboulanger@berklee.edu> wrote:
Gabriel,

What you are creating is very cool. Thanks for posting and sharing it.
I can't wait to hear all the sections of this very cool generative piece/system and hope you will share that too.

Could you post your specific fix that supports the fout with globals as you excerpted in your previous email?

I would love to share this with my students at Berklee.  (and plan to share section01 - with the fouts commented out for now)
- many of them, as you would imagine, are into grooves (like the ones you are creating) and generative csds.  (and me too!)


- Dr.B


Dr. Richard Boulanger

Professor

Electronic Production and Design

Berklee College of Music

Professional Writing & Technology Division



On Wed, Mar 19, 2025 at 4:38 PM Gabriel Borin <gabriel.s.borin@gmail.com> wrote:
Hi, everyone

I am facing some problems I don't know how to troubleshoot with the fout opcode. My idea was to generate multiple files from my csd so I could mix later. When I try to record, a few things happen:
  1. I keep seeing a message "Closing kick.wav" on the terminal, while csound is running. I end up with a short file that is not the full real-time performance;
  2. The file is usually distorted, if you look at the waveform (see attachment) it looks like there are samples missing;
  3. While troubleshooting, I tested to create an instrument to record the stereo monitor out with no success (there was no audio on the file).
  4. Recording out of CsoundQT does work, but only the stereo output.
  5. No effect on changing the Sample Rate...
Am I missing something?

I am attaching the csd I am working on.

I am using MacOS Sequoia 15.3.2, M2. I am running CsoundQT 1.1.3, and Csound 6.18

Thank you,

Best,
Gabriel
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
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

Date2025-03-20 14:37
From"Dr. Richard Boulanger"
SubjectRe: [Csnd] Problems with fout opcode
Love it Gabriel.

Now with the fout fix - it spits out stems!  Super - and I am totally digging the music you are making.
- my students are going to be super excited to hear and see this.

- Dr.B


Dr. Richard Boulanger

Professor

Electronic Production and Design

Berklee College of Music

Professional Writing & Technology Division



On Thu, Mar 20, 2025 at 8:33 AM Gabriel Borin <gabriel.s.borin@gmail.com> wrote:
Hi, Dr. Boulanger

Thank you very much for your comment. I am sharing what I have for now, in the attached csd. 

Still a work in progress, and I really appreciate your encouragement.

Best regards,
Gabriel

On Thu, Mar 20, 2025 at 7:07 AM Dr. Richard Boulanger <rboulanger@berklee.edu> wrote:
Gabriel,

What you are creating is very cool. Thanks for posting and sharing it.
I can't wait to hear all the sections of this very cool generative piece/system and hope you will share that too.

Could you post your specific fix that supports the fout with globals as you excerpted in your previous email?

I would love to share this with my students at Berklee.  (and plan to share section01 - with the fouts commented out for now)
- many of them, as you would imagine, are into grooves (like the ones you are creating) and generative csds.  (and me too!)


- Dr.B


Dr. Richard Boulanger

Professor

Electronic Production and Design

Berklee College of Music

Professional Writing & Technology Division



On Wed, Mar 19, 2025 at 4:38 PM Gabriel Borin <gabriel.s.borin@gmail.com> wrote:
Hi, everyone

I am facing some problems I don't know how to troubleshoot with the fout opcode. My idea was to generate multiple files from my csd so I could mix later. When I try to record, a few things happen:
  1. I keep seeing a message "Closing kick.wav" on the terminal, while csound is running. I end up with a short file that is not the full real-time performance;
  2. The file is usually distorted, if you look at the waveform (see attachment) it looks like there are samples missing;
  3. While troubleshooting, I tested to create an instrument to record the stereo monitor out with no success (there was no audio on the file).
  4. Recording out of CsoundQT does work, but only the stereo output.
  5. No effect on changing the Sample Rate...
Am I missing something?

I am attaching the csd I am working on.

I am using MacOS Sequoia 15.3.2, M2. I am running CsoundQT 1.1.3, and Csound 6.18

Thank you,

Best,
Gabriel
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
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