why are notes shorter than about 50 ms truncated?
Date | 2016-04-20 00:28 |
From | Michael Mossey |
Subject | why are notes shorter than about 50 ms truncated? |
I'm on Windows, writing orchestras that output directly to the dac, taking either MIDI input or i statements. Depending on what output device I select, I'm experiencing truncation of short notes, some of them in the middle of the score. The truncation diminishes with smaller buffer sizes but is still present. Anyone know why this is happening?
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
I'm using a USB DAC, namely the iFi Nano. When I use csound to list the available devices, I see the iFi listed three times with slightly different descriptions. I may have a solution--the truncation seems to be gone with one of those, but I'm not sure yet. Mike |
Date | 2016-04-20 06:21 |
From | Ffanci Silvain |
Subject | Re: why are notes shorter than about 50 ms truncated? |
Hey hey Mike, I'm not sure myself, but I think I have something. So what's your ksmps or kr in the orchestra header. 50ms is just about 2205 samples at 44.1kHz or the other way round, it will fit 20 times into one second. Could that conflict with your specs? Just an idea, I'm no Csound expert! Ta-ta ---- Ffanci * Homepage: https://freeshell.de/~silvain * Twitter: http://twitter.com/ffanci_silvain * GitHub: https://github.com/fsilvain 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 | 2016-04-20 08:32 |
From | Michael Mossey |
Subject | Re: why are notes shorter than about 50 ms truncated? |
On Tue, Apr 19, 2016 at 10:21 PM, Ffanci Silvain <silvain@freeshell.de> wrote: Hey hey Mike, Thanks, but it's not always 50 ms. Some notes shorter than that *aren't* truncated, while some longer than that *are*. And the amount varies. I read the manual for any indication that certain -b, -B, or ksmps values are incompatible, and it looks to me like there are some combinations that allow synchronous running, and sometimes they are necessary, but I don't see any reason that instrument timing or duration should be affected with my setup. There is something going on. I tried a number of combinations of -b and -B. It improves as they get smaller but doesn't disappear (meanwhile I start getting pops when they are too small). Mike |
Date | 2016-04-20 08:42 |
From | Oeyvind Brandtsegg |
Subject | Re: why are notes shorter than about 50 ms truncated? |
Does it happen with any instrument? Any difference with the use of different sound generators, filters, envelopes etc? 2016-04-20 9:32 GMT+02:00 Michael Mossey |
Date | 2016-04-20 09:15 |
From | Michael Mossey |
Subject | Re: why are notes shorter than about 50 ms truncated? |
It happens with two instruments. The first one is complicated and uses a waveguide and plays portions of table it reads from disk, so just in case it was some of that stuff, I made a simpler instrument that just has an oscili and an envelope, and it was still happening. Wait! I think I may have left some of the other units in the simpler instrument. Let me try a truly stripped down instrument. Thanks, Mike On Wed, Apr 20, 2016 at 12:42 AM, Oeyvind Brandtsegg <oyvind.brandtsegg@ntnu.no> wrote: Does it happen with any instrument? |
Date | 2016-04-20 09:54 |
From | Michael Mossey |
Subject | Re: why are notes shorter than about 50 ms truncated? |
Aha! Thanks for the suggestion to play around with my score and orchestra. I am using an f table with GEN01 with a fixed size rather than a deferred size, to load a wav file a few minutes long. My instrument picks a portion of the table to play back at the sample rate, at run time. I was using a fixed size because I wanted to access the table with oscillators. I figured, why not make the table length the next power of two greater than the wav file length. Well that causes the problem. After trying a number of table sizes, it appears that the problem appears if the table has more points that are given in the wav. This is true even if my instrument doesn't access the table! The problem is absent if I give few enough points as a fixed size or if I use a deferred size (0). Does this make sense? Is there a workaround? The design goal is to avoid a deferred size, because to my knowledge the only oscillator that can be used is foscili, and I need features of oscili or tablei. Maybe I'm wrong about that. I do not have much flexibility on the wav length, so if I use a power of two size, it can't be smaller than the wav length. However, I could always add some silence at the end of the wav to bring it up to the table length. Mike On Wed, Apr 20, 2016 at 1:15 AM, Michael Mossey <michaelmossey@gmail.com> wrote:
|
Date | 2016-04-20 10:05 |
From | Oeyvind Brandtsegg |
Subject | Re: why are notes shorter than about 50 ms truncated? |
Hm, do you have a stripped down example instr demonstrating the behaviour? I don't quite understand why this should lead to dropped notes (only) if the duration is very short. 2016-04-20 10:54 GMT+02:00 Michael Mossey |
Date | 2016-04-21 01:51 |
From | Michael Mossey |
Subject | Re: why are notes shorter than about 50 ms truncated? |
I found it's related to a specific UDO. I will start a new thread for this because I have other questions about this UDO, Victor Lazzarini's waveguide model, and it might be of general interest. Mike On Wed, Apr 20, 2016 at 2:05 AM, Oeyvind Brandtsegg <oyvind.brandtsegg@ntnu.no> wrote: Hm, do you have a stripped down example instr demonstrating the |