Ringing in effect chains (audio engineering)

Hi everyone,

first post here :slight_smile:

So… I’ve been using Renoise for quite some time and there’s this one thing that slows down my own process quite a bit. I would really like to find a good solution for it… Perhaps some of you already might know a way that I simply just haven’t come across yet.

As the title says, I’ve been struggling with how to deal with ringing that is coming from the effect chains. Meaning that there is one or more pure sine waves (that should not be there) sounding through very loudly. Naturally this is not a Renoise specific problem but simply an audio engineering thing, and generally I suppose these things are also handled in the post processing.

The ringing is very specific to individual notes (different frequencies ringing in different notes), so in my mind it should be possible to combat the issue during playing of the notes rather than having to spend a lot of time on it in manual post processing. I tried to do this by using key trackers to try and see if a note is being played and only enabling a filter to cut out the specific frequency that is ringing. Key trackers however do not fit this purpose very well as e.g. chords will then mess it up. For this I’d need a key tracker that could simply detect if a note is either on or off and control a set of filters accordingly (combined into a doofer).

It occurred to me that I probably could work around this issue by having each note use its own sample and all samples would then have their own DSP chain in the instrument effects, but this would really blow up my instruments. They would eat up a lot of memory so for me this is not the preferred way.

Tried also looking at the lua scripting side, but initially it seemed to me that the scripts are not intended to be run during playback but rather from user interactions. Also looked like there is no access to the instrument device chains from the scrips, however I didn’t spend too much time on this. Could there be some way via scripting?

Is there some other way that I might have missed?

To visualise the problem I added two screenshots of the spectogram. There’s loud ringing at 580 Hz observable in one and filtered out (Chebyshev 4n) in the other.

Cheers,
-sly

1 Like

Have you tried playing with the sample interpolation settings? If they don’t do the trick, then I am not sure what’s going on to suggest anything since I’ve never encountered this issue unless I purposefully use audio with lower sample rates and bit depth, and set interpolation to “None”, which brings out artifacts.

I’d rather go looking for what creates the odd ringing in the fx chains, and then fix the problem there.

So you say it is a polyphonic problem. But how does it then happen to be generated by monophonic fx chains? How do you generate your sounds?

When you have a problem in the polyphonic domain, then you have to fix it there, for example by eqing the sample with the ringing, or by tuning the effects properly. I do not think it is very viable to create such an effect that would track of multiple notes and then effecting things like stacked eqs… I don’t think this can be done easily, either.

If you really want to preserve that sound, maybe you can try writing a tool that will track your instrument notes in a track and then write eq tap automation in frequency and gain so that you can have that polyphonic dampening, I don’t know if this would be any good in realime, tho.

Hmm… Good points. Checked, all interpolation was set to cubic, but I did switch to using 16 bit samples instead of 32 bit some time ago to make things a bit more robust… I doubt that can be the cause here though but who knows. My gut feeling is that it is a resonance frequency thing with the effect chain devices and the incoming audio.

I will spend some time trying with the 32 bit samples to see how it affects this, but needs a bit of work in locating the original samples :slight_smile: and putting them back in…

Yeah, I’m fully on board with fixing the problem at the source :slight_smile:

It is not a polyphonic problem; happens mostly with single notes. In the mix the problem is often actually hidden away but occasionally pops up.

Your comment about the tool made me realise that perhaps I could write a lua script to “pre-calculate” the enables/disables for the filters into the track effects… That would kinda fix the issue but would not work when playing on the midi keaboard… :thinking: that’s more cumbersome work though…

It just seems that the proper solution is so close with the key tracker, but just slightly out of reach.

Can you post a song file, perhaps an example song file and/or audio that showcases the problem. Perhaps it is a combination of effect settings that result in feedback or resonance, groundhum(?), your room shape is amplifying certain frequencies, hard to say really without an example.
Do the example songs that come with the renoise installation also have this problem?

I was initially planning to attach two audio files (~100 kb in m4a) of some notes being played but the forum would not allow including them… Is there a way to attach audio files to posts?

I do not observe this issue with the example songs. It is occurring within the instrument effect chains that I am using. In some sense they probably are somewhat :smiley: extreme. Now that you point out feedback/resonance it has left me pondering… They are being used explicitly. I think I will check how changing those settings might affect this.

As a side note, it’s a bit funny on some level that this is turning out to be a bit of a puzzle and people are wondering what the heck am I trying to do :joy:

Also, thank you everyone for your quick responses.

I usually just resample if pre or post ringing is an issue, but I’m generally only worried about it in my low end, because that’s where I want things nice and tight and consistent. LP Filters and eqs are the usual suspects, so sometimes I’ll just print fx in the waveform editor and go from there.

Sounds like resampling might be impractical in your case, though. In which case retooling your fx chains with an oscilloscope open might be the ticket

Edit, on rereading your original post it sounds like you’ve got a resonant frequency building up, probably due to some time-based dsp. A keytracked filter or eq would probably do the trick, or perhaps even a static eq if it’s a consistent frequency.

Pre and post ringing is a different issue, which I do generally solve with resampling :slight_smile:

I’ve been working on these sounds probably more than 10 years (sometimes more off than on :slight_smile:) and re-recorded the samples multiple times. I suppose I could spend the time and do it “once more”… I’m just thinking that it should be about time to get something produced with these buggers :joy:

I was just now investigating one sample very closely and noticed an interesting phenomenon which I haven’t noticed before. When I play the sample at the base note I don’t really hear any ringing but a few notes down and the ringing pops up. This is with all envelopes and effects disabled, so the original audio is only just transposed.

Now I’m thinking that I might just try to figure out how to filter out specific frequencies of the original audio so that the transposed audio doesn’t have the ringing. So, I will try my best to tackle this problem at the source. However, having a special key tracker that I mentioned in the first post would help with a lot of the audio engineering aspect of this. In some cases resampling simply is too cumbersome or not even possible so this could still be solved in those cases…

I will report back when I get some more data :slight_smile:

After some mastering / audio engineering “work” done on the original samples it seems to me that the ringing can not really be avoided by simply just filtering and preprocessing the input audio.

While browsing this forum I noticed that it is possible to attach audio files that are encapsulated into Renoise instruments. So here’s a few chords and individual notes recorded via midi, with the majority of the effects off and also cranked up to show how that really brings up the ringing. I reprocessed the audio into lower quality to not take much space on the forum servers.

effects-off.xrni (208.9 KB)
effects-on.xrni (270.3 KB)

That should at least finally give a clear picture of what I am dealing with. Usually the ringing is much lower or even disappears for chords, but for some it can also be a loud as with the individual notes.

1 Like

I don’t hear any ringing, just noisy samples in a relatively low samplerate (22050) & bitrate (8 bit).

When you say ringing in the first post, you mention sine waves, I don’t hear anything like that here. Perhaps you can record your mixer output with a recording device and share it here additional to the instrument files above. That way we can hear the difference. Does it make a difference for you, hearing the ringing or not, if you use samples in a higher sample & bitrate?

Here’s a single note being played and I added a filter being toggled on and off:

filter

toggled-filter.xrni (251.7 KB)

Perhaps your brain just compensates for it. Once you hear it, you can not un-hear it :slight_smile:
Does this help you identify the 830 Hz sine wave ringing here being toggled on and off ?
It is also quite clearly visible in the spectrogram…

1 Like

I hear it in this example but not in the ones you shared before.

from chatgpt; Can samples wit a samplerate of 22050 hz of 8 bit bitrate have artifacts?

"Samples with a sample rate of 22050 Hz and a bitrate of 8 bits can have artifacts due to limitations in the resolution and dynamic range of the audio data.

The 8-bit bitrate allows for a maximum of 256 discrete amplitude levels to represent the audio waveform. This limited resolution means that small changes in amplitude cannot be accurately captured, resulting in quantization errors that introduce distortion and artifacts into the signal.

Additionally, the limited dynamic range of 8-bit audio can cause clipping and distortion when the signal exceeds the maximum amplitude level that can be represented. This can result in audible distortion and artifacts that degrade the quality of the audio.

Furthermore, the sample rate of 22050 Hz is also relatively low, which means that the highest frequency that can be accurately captured is limited to 11025 Hz according to the Nyquist-Shannon sampling theorem. This can cause aliasing, which is a type of distortion that occurs when frequencies above the Nyquist limit are folded back into the audible frequency range.

Overall, the combination of limited resolution, dynamic range, and sample rate can all contribute to the introduction of artifacts into audio samples with a sample rate of 22050 Hz and a bitrate of 8 bits."

Does the fact that the sample is of 22050 Hz and a bitrate of 8 bits increase the chance of adding resonance or ringing when cut with an eq at a certain frequency?

"Yes, the fact that the sample is of 22050 Hz and a bitrate of 8 bits can increase the chance of adding resonance or ringing when cut with an EQ at a certain frequency.

As I mentioned earlier, the limited resolution and dynamic range of 8-bit audio can result in quantization errors and clipping that introduce distortion and artifacts into the signal. These distortions can contribute to the creation of resonances or ringing in the frequency spectrum of the audio signal.

In addition, the sample rate of 22050 Hz may not be sufficient to accurately capture all of the frequency content of the audio signal, particularly if it contains high-frequency components. This can result in aliasing and other artifacts that can further contribute to the creation of resonances or ringing in the signal.

When the audio signal is processed with an EQ, it is possible that certain frequency ranges may be boosted or cut, which can emphasize or reduce any resonances or ringing that are present in the signal. If the resonances or ringing are particularly pronounced, cutting them with an EQ may result in the perception of a sine wave or other tonal artifacts.

Therefore, when working with audio samples that have a sample rate of 22050 Hz and a bitrate of 8 bits, it is important to be aware of the potential for resonance or ringing to occur, and to use EQ and other processing techniques carefully to minimize the introduction of additional artifacts into the signal."

Naturally I compared the 48kHz 32 bit rendered version to the adjusted 22kHz 8 bit before posting it here. My ear clearly picks up multiple loud rings equally in both of these samples. I did notice the constant static noise that was added by the loss of range in the data, but to me it does not affect the problem itself in any way.

When you look at the 22kHz 8 bit waveform between the markers 60 and 70 (the top ruler) in the sample editor you can find this same 830 Hz ring there. Also visible in the spectrogram as a short burst. I suppose it is more difficult to notice within a melody.

This morning I actually woke up to a realisation of a potential solution for this in Renoise :slight_smile:
I will test it later today and see if it pans out (ha-ha). It is not as an eloquent solution as the special new key tracker would be, but I’d probably be happy with it… Fingers crossed :crossed_fingers:

from chatgpt; "If the ringing frequency around 830 Hz is present in an electric guitar recording, it could be indicative of a resonant frequency of one of the components in the guitar or the amplifier.

For example, the pickups on an electric guitar can resonate at certain frequencies depending on the design of the pickup and the type of guitar strings being used. Additionally, the amplifier and speaker system used to amplify the guitar signal can also have resonant frequencies that can contribute to the overall sound of the recording.

In some cases, the ringing frequency around 830 Hz could also be intentional, as many guitar amplifiers and effects pedals are designed to produce specific frequencies or harmonic overtones that contribute to the desired tone or sound.

Overall, the presence of a ringing frequency around 830 Hz in an electric guitar recording is not necessarily unusual, and could be a natural part of the instrument and equipment used. However, it’s important to consider the context of the recording and any potential issues with the recording equipment or signal processing that could be contributing to the ringing frequency."

so it could be the pick ups & used strings as well. Besides the automated eq on and off example I don’t find these examples necessarily to be unpleasant to the ear, just part of the sound :slight_smile: , but I’m an old fart so I’m probably missing more in the higher frequencies.

1 Like

Wonderful news - this was a great success :slight_smile:

By using tiny sine wave dummy samples for each individual note (granted, bit of a hassle but only needs to be done once for an instrument) I am able to control doofers containing any number of filters (or any other effect) per note like so:

Here I am holding just D-3 pressed down on midi and only the “key D-3”-doofer is enabled, when I release it the doofer was instantly disabled. Also works perfectly for chords as the signal followers are now just interested in single notes.

I am sending the actual audio from the main effects all to the “clean up” chain where the filters are. Essentially I was able to create an automated audio engineer filtering their ass off even during jamming sessions. There was one cost though. Now I lost the ability use multi-sampled notes randomly to create variation, I was using this before by having the samples overlap in their keyzones. Given what I gained that’s no biggie though, I can work around this…

The flexibility and capabilities of Renoise just keep on amazing me. From a fellow dev to the Renoise devs a massive shoutout! Thank you for this wonderful tool, this is just amazing! This opened up a whole new door for me as now I am able to control the tone itself per note… holy sheeet :joy: looks like this might be quite the rabbit hole for me.

I just realised that what I made was something similar to this but instead of blowing up the byte size of the instrument I only blew up the amount of effect chains.

Here’s a dummy instrument template with a simple drawn test sound in case anyone else is interested in this thing. Also for myself so I can find it again when I can no longer find the file :sweat_smile:
per-note-effects.xrni (60.4 KB)

The main beef is this “octave matrix” that will have the key specific doofers enabled when keys are pressed.

If anyone else might find any interesting other uses for this thingy I’d be very interested to know :slight_smile:

The forum threatens to close this topic, so I will unmark the solution for a bit since I had another wild idea which might turn out even better but is much more difficult to set up at least initially.

1 Like