Open Pulmunen11 opened 5 years ago
This is easy to fix with interpolation methods. @Pulmunen11 please email me privately about this.
@equilet, actually Ed has advised me to create an issue here if there's one. I'm puzzled.
@kulpajj had some other cnmat.o. objects that have similar problems.
~ Maija
~ Maija
hello! yes -- the issue has to do with the fact that we're leveraging jit.fill to dump lists into a jit.matrix and then send them into a buffer~ object. Using jitter makes that really fast, but also sometimes I've noticed this error also.
Possibly adding an o.deferlow after the codebox patch might help, I noticed that actually jit.fill/matrix always output on the main thread, so the bang might be coming at the wrong time if the input is on the timer thread. But I'm not sure that's the problem you're seeing.
Or another possibility is that the matrix takes a millisecond to resize, so we could try adding a micro delay between resizing the matrix and sending the list into it (via jit.fill)... Would be nice to fix this, I can try to take a look at it (I wonder if a o.bufferfill~ object might be needed/useful).
There are two main pedagogy points for using cnmat.o.sinusoids~.
The first is that unlike sinusoids~, cnmat.o.sinusoids~ uses separate /amplitude and /frequency lists, this makes it much easier to apply functions to the values, without having to interleave and de-interleave, and encourages students to use the codebox to manipulate the data (since it's all packaged and ready to go). ... I see in your patch that you're doing this already, looks good! possibly we could make a new sinusoids~ wrapper that uses the old sinusoids~ inside, and interleaves the addresses.
But also, the second point of cnmat.o.sinusoids~, is that unlike sinusoids~, the patched version is not an external object, it uses a clean gen~ codebox to show you exactly how it works, and allows you to adapt it to your own uses, to make new fancy sounds!
But yeah, it's also possible that for some situations you might still need sinusoids~, for example with SDIF-tuples/threefates ... it would be nice if cnmat.o.sinusoids~ could handle that also, but I think we might be up against a jitter issues here... so maybe an object that takes a list and puts it into a buffer as fast as possible might be useful.
best, rama
p.s. If you haven't already, I think it's worth spending a little time to study the patch so you know how it works! cnmat.o.sinusoids~ is probably a good one to start with. in the gen.codebox, basically it's using gen~ versions of peek~ and poke~ to store the wave phases into an internal buffer~ (aka Data), and then uses the phase ramps to spin the sinusoids.
Hi,
We're now off the ground with the QuNeo and the students are pretty excited to work with it!
However, this poses yet another challenge for the sound engines. Problems occur when QuNeo is feeding too much data to the sound engines and this creates a lot of audio clicks. What I see is that f.ex. the cnmat.o.sinusoids~ gives an error message of 'jit.buffer~ input matrix too wide', which I think is related to it getting too much data. Putting o.speedlim of 100ms between the codebox and cnmat.o.sinusoids~ helps a little, but does not clean all of the audio clicks from the output sound.
I have now tested with the sinusoids~ and fed it the same data at the same rate. No problems there. Output is very smooth.
There are also no problems, when using the QuNeo simulation, since it's not feeding data in such a fast rate as the device itself. Well, naturally, since only a little movement of finger on the QuNeo will cause change to the output value.
Unfortunately I'm not skilled enough to fine tune cnmat.o.sinusoids~ to meet the demands of QuNeo dataflow. With my 158A section, we can continue by using the sinusoids~, but wouldn't that be a little bit disappointing to our cnmat.o. quest?
I can imagine it will be hard without the QuNeo device at hand to verify this problem. It is a real problem and affects how the students interact with the device as well as odot. Please find attached a patch where you can compare the two sound engines (cnmat.o.sinusoids~ and sinusoids~).
Best wishes, ~ Maija