[Csnd] Strange issue with wavfile rendering

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd] Strange issue with wavfile rendering

akjmicro
Hi all,

It appears that when rendering audio with "live MIDI" incoming, wave files become gigantic (Something like 60 times what you would expect for 44100/16-bit/2-chan, for example)

Obviously, using `fout` is desired anyway in these situations, b/c it is best to hear what is happening, but in case one wants to render a MIDI file offline but in real-time, the wave files are incorrect.

To reproduce, try using `-M hw:1,1` or something similar on Linux, while not using `-o test.wav`, and then check how large test.wav gets after a few seconds.

Incidentally, my use case for not using `-F` for a rendered MIDI file that Csound controls directly, is that Csound does't allow for tempo scaling an entire MIDI file (e.g. everything 33% as fast as normal for the use by an instrumentalist to practice with a guidetrack)

Any thoughts?

Best,
AKJ

Csound mailing list [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Strange issue with wavfile rendering

thorin kerr
Sounds like it's trying to render your score (which might be empty, and goes forever?) to test.wav as fast as possible. Hence, a huge empty test.wav

It's a bit of a hack, but to force Csound to run 'realtime', you could try using -iadc (realtime audio in). I think that'll grab the audio device and run things at the pace you're expecting.

Thorin



On Mon, 28 Jan. 2019, 9:44 am Aaron Krister Johnson <[hidden email] wrote:
Hi all,

It appears that when rendering audio with "live MIDI" incoming, wave files become gigantic (Something like 60 times what you would expect for 44100/16-bit/2-chan, for example)

Obviously, using `fout` is desired anyway in these situations, b/c it is best to hear what is happening, but in case one wants to render a MIDI file offline but in real-time, the wave files are incorrect.

To reproduce, try using `-M hw:1,1` or something similar on Linux, while not using `-o test.wav`, and then check how large test.wav gets after a few seconds.

Incidentally, my use case for not using `-F` for a rendered MIDI file that Csound controls directly, is that Csound does't allow for tempo scaling an entire MIDI file (e.g. everything 33% as fast as normal for the use by an instrumentalist to practice with a guidetrack)

Any thoughts?

Best,
AKJ

Csound mailing list [hidden email] 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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Strange issue with wavfile rendering

Victor Lazzarini-2
In reply to this post by akjmicro
yes, because if you don't use the soundcard, there is no realtime clock and the code runs as fast as the computer can process.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 27 Jan 2019, at 23:44, Aaron Krister Johnson <[hidden email]> wrote:

Hi all,

It appears that when rendering audio with "live MIDI" incoming, wave files become gigantic (Something like 60 times what you would expect for 44100/16-bit/2-chan, for example)

Obviously, using `fout` is desired anyway in these situations, b/c it is best to hear what is happening, but in case one wants to render a MIDI file offline but in real-time, the wave files are incorrect.

To reproduce, try using `-M hw:1,1` or something similar on Linux, while not using `-o test.wav`, and then check how large test.wav gets after a few seconds.

Incidentally, my use case for not using `-F` for a rendered MIDI file that Csound controls directly, is that Csound does't allow for tempo scaling an entire MIDI file (e.g. everything 33% as fast as normal for the use by an instrumentalist to practice with a guidetrack)

Any thoughts?

Best,
AKJ

Csound mailing list [hidden email] 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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Strange issue with wavfile rendering

akjmicro
That seems like a bug, though, as it is not a "feature", esp. since `fout` works fine and obeys specified format directives... :)

Thank for the insights, though, much appreciated, and I will try the `-idac` option after work.

Cheers,

AKJ

On Mon, Jan 28, 2019, 02:11 Victor Lazzarini <[hidden email]> wrote:
yes, because if you don't use the soundcard, there is no realtime clock and the code runs as fast as the computer can process.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 27 Jan 2019, at 23:44, Aaron Krister Johnson <[hidden email]> wrote:

Hi all,

It appears that when rendering audio with "live MIDI" incoming, wave files become gigantic (Something like 60 times what you would expect for 44100/16-bit/2-chan, for example)

Obviously, using `fout` is desired anyway in these situations, b/c it is best to hear what is happening, but in case one wants to render a MIDI file offline but in real-time, the wave files are incorrect.

To reproduce, try using `-M hw:1,1` or something similar on Linux, while not using `-o test.wav`, and then check how large test.wav gets after a few seconds.

Incidentally, my use case for not using `-F` for a rendered MIDI file that Csound controls directly, is that Csound does't allow for tempo scaling an entire MIDI file (e.g. everything 33% as fast as normal for the use by an instrumentalist to practice with a guidetrack)

Any thoughts?

Best,
AKJ

Csound mailing list [hidden email] 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 [hidden email] 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 [hidden email] 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