Cabbage Logo
Back to Cabbage Site

XY pad filter cutting out sound and extremities requiring restart

I have set up a basic XY pad to control filter and resonance. When I move the dot to the edges (0 values) the audio cuts out and I need to save/re-open in order to get the audio through once more.

I take it this is some kind of initialization issue that I need to workaround but I’m unsure of how to proceed.

Not a huge problem, but any tips would be most welcome.

Thanks!

It’s hard to say what the problem here is without seeing some code. Can you simply the .csd and post it? It’s most likely something to do with the values being sent from the xypad to the filter.

XY extremities issue.csd (2.4 KB)

Here is the full instrument taken directly from the code. *Ignore the last 15 or so lines that only appeared when I uploaded it.

If you need the full code and audio files I can send that also.

Can you prepare a simple Cabbage instrument that demonstrates the problem? I don’t need the full code, and it would take me some time to convert this code to a Cabbage instrument, I don’t know anything about the ranges of the controls, or even what some of them after. The reason I ask is that one often finds the source of the issue when they start to prepare a simplified example.

Oh ok. For sure. I thought that maybe from that you might able to see something obvious but I guess the problem might not be in that particular section. I’ll get something together and post. Thanks!

XY isolated with vol control.csd (2.3 KB)

It is isolated here and the same issue is present. There is an immediate and constant buzzing saw tooth wave for testing purposes with volume control. It will be silent until you turn it up.

Many thanks for having a look:)

4142358cb795b075bb7b8b6eda05d17e4a06fab7.csd (2.4 KB)

I had a look though this and I have a number of suggestions:

  1. The init statements for ‘Cutoff’ and ‘Resonance’ weren’t doing anything because they were before their corresponding chngets. chnget (from a widget) will spit out a zero at i-time and subsequently send out the value of the widget. Use ‘init’ after the chnget if this initial zero is going to cause a problem.

  2. printk2 tends not to work too well with Cabbage - if its value is changing very rapidly it tends to clog things up and restrict widget interaction and interrupt the audio thread. I would use printk instead with a time gap of 0.2 or something.

  3. You had xyFX being triggered in two ways: from the score and also from the alwayson statement. Maybe the score event will overwrite the alwayson, but in any case you don’t need both.

  4. I swapped Cutoff expressed in cps in the xypad to be expressed in oct format. This gives a more useful mapping. It is converted back to cps in the orchestra.

  5. I changed the way Resonance is expressed and developed it in a number of ways to make it more usable using ‘scale’ and ‘expcurve’

  6. There were some mistakes in your code for rbjeq that I fixed also.

  7. There were some syntax errors in your widget code. I think you used the Cabbage Edit Mode to create these I think there is a small bug in this mechanism that creates two commas in a row without a value between them. I’ll need to get on to Rory about this in a separate thread.

  8. ksmps was a bit large (128), causing widget changes to happen in large time steps.

  9. I also added portamento to ‘cutoff’ and resonance to smooth their changes. ‘Cutoff’ was also cast to a-rate to smooth it further.

Have a listen and see what you think.

1 Like

Thanks Iain!:slight_smile:

I just had a listen there. Sounds great. It appears that the answer to my query was that I was doing Everything! wrong;)

I was actually racking my brain as to how to get it to respond logarithmically too, so you’ve helped me here on two counts.

It’s clear that I need to clean up my way of working. I can see from your feedback that I have far too many conflicting elements so I need to learn to use what i need and not just fling stuff in when things don’t work.

Many thanks!