Csound Csound-dev Csound-tekno Search About

[Csnd] Getting "Dirty" Sound

Date2026-03-10 00:53
FromBrandon Hale
Subject[Csnd] Getting "Dirty" Sound
Hello all,

I'm new to csound and have been having a blast exploring all of the 
opcodes it offers. Something I'm interested in with it is achieving what 
some would cool "dirty" sounds. Think like "To Defy the Laws of 
Tradition" by Primus, or djent metal. Distortion that can make a metal 
musician blush.

What do you all do for that? I've thought about using some of my 
favorite faust code from guitarix in my csound code, but I'm curious 
with how far I can go with csound directly?

Brandon Hale

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

Date2026-03-10 09:58
FromSi Mills
SubjectRe: [Csnd] Getting "Dirty" Sound
Hey Brendon

Csound has tonnes in the box. Just some thoughts...

You could create a whole bunch of wavetables with all different sorts of shapes using the GEN opcodes, then plug those into distort or similar. 

You could make UDOs running at 1-sample block rate, and write some formulas..this is similar to Faust

I reckon you could go a whole lot further than Faust when you start adding convolution/spectral opcodes into the mix, as Faust doesn’t have this out of the box (sounds like something is in the post soonish though).

Maybe something there helps?

Si

> On 10 Mar 2026, at 00:53, Brandon Hale  wrote:
> 
> Hello all,
> 
> I'm new to csound and have been having a blast exploring all of the opcodes it offers. Something I'm interested in with it is achieving what some would cool "dirty" sounds. Think like "To Defy the Laws of Tradition" by Primus, or djent metal. Distortion that can make a metal musician blush.
> 
> What do you all do for that? I've thought about using some of my favorite faust code from guitarix in my csound code, but I'm curious with how far I can go with csound directly?
> 
> Brandon Hale
> 
> 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

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

Date2026-03-10 10:11
From"Jeanette C." <000015cdd0ffa6cd-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] Getting "Dirty" Sound
Hi Brandon,
lovely to see you here!

Personally, I'd say the Guitarix code is great for something close to typical 
amps, that's what it's made for. BUT...

You can get nice and dirty with clip alone, try its different clipping 
methods. distort1 can also be a source of unspeakable noise. Even mirror can 
be fun. :) Then, of course, you can modulate source audio, depending on your 
source ringmodulation by just multiplying stuff, FM, PM. The manual example 
for the hilbert filter, I believe, shows a basic Bode frequency shifter type 
of thing. -- And you have compress2 to get gritty with compressors. In the old 
manual entry, I found it slightly difficult to understand that the threshhold 
is the threshhold of an internal noise gate and the typical compressor 
threshhold is set by the low and high knee points. This may be changed. 
Anyway, another good opcode.

Especially when you're testing something like clip with different models or 
methods, it can be helpful to do something like this:
instr Play
   ; from parameter
   iMethod = p4
   ...
   aClipped = clip(aInput, iMethod, ...)
   ...
endin

And in the socre or when calling the instrument:
i"Play" 0 5 0 ; 5 seconds with method 0
i. + . 1 ; follwed by 5 second with method 1
i. . . 2 ; Followed by 5 seconds of method 2

HTH.

Best wishes,

Jeanette

--
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * GitHub: https://github.com/jeanette-c

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

Date2026-03-10 10:58
FromRory Walsh
SubjectRe: [Csnd] Getting "Dirty" Sound
Keep in mind that most of the distortion opcodes can lead to aliasing, which can sound awful if you playing into them live. To avoid this, you'll need to use Csound 7's oversampling feature, which must be wrapped in a UDO. Here's a simple example using the distort opcode:

opcode oversampleDist, a, aki
    input:a, amount:k, table:i xin
    oversample(8, 4)
    sig:a = distort(input, amount, table)
    filteredSig:a = tone(sig, sr/2)
    xout filteredSig
endop

where table is a "tanh" table. Also take a look at the floss manual: https://flossmanual.csound.com/sound-modification/am-rm-waveshaping 

On Tue, 10 Mar 2026 at 10:11, Jeanette C. <000015cdd0ffa6cd-dmarc-request@listserv.heanet.ie> wrote:
Hi Brandon,
lovely to see you here!

Personally, I'd say the Guitarix code is great for something close to typical
amps, that's what it's made for. BUT...

You can get nice and dirty with clip alone, try its different clipping
methods. distort1 can also be a source of unspeakable noise. Even mirror can
be fun. :) Then, of course, you can modulate source audio, depending on your
source ringmodulation by just multiplying stuff, FM, PM. The manual example
for the hilbert filter, I believe, shows a basic Bode frequency shifter type
of thing. -- And you have compress2 to get gritty with compressors. In the old
manual entry, I found it slightly difficult to understand that the threshhold
is the threshhold of an internal noise gate and the typical compressor
threshhold is set by the low and high knee points. This may be changed.
Anyway, another good opcode.

Especially when you're testing something like clip with different models or
methods, it can be helpful to do something like this:
instr Play
   ; from parameter
   iMethod = p4
   ...
   aClipped = clip(aInput, iMethod, ...)
   ...
endin

And in the socre or when calling the instrument:
i"Play" 0 5 0 ; 5 seconds with method 0
i. + . 1 ; follwed by 5 second with method 1
i. . . 2 ; Followed by 5 seconds of method 2

HTH.

Best wishes,

Jeanette

--
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * GitHub: https://github.com/jeanette-c

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
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

Date2026-03-10 14:47
FromBrandon Hale
SubjectRe: [Csnd] Getting "Dirty" Sound
See, this is why I enjoy communities like this. This has given me much 
to think about and experiment with, so thank you so much everyone! If I 
have questions, I'll come back here and ask away.

On 3/10/26 6:58 AM, Rory Walsh wrote:
> Keep in mind that most of the distortion opcodes can lead to aliasing, 
> which can sound awful if you playing into them live. To avoid this, 
> you'll need to use Csound 7's oversampling feature, which must be 
> wrapped in a UDO. Here's a simple example using the distort opcode:
> 
> opcode oversampleDist, a, aki
>      input:a, amount:k, table:i xin
>      oversample(8, 4)
>      sig:a = distort(input, amount, table)
>      filteredSig:a = tone(sig, sr/2)
>      xout filteredSig
> endop
> 
> where table is a "tanh" table. Also take a look at the floss manual: 
> https://flossmanual.csound.com/sound-modification/am-rm-waveshaping 
> 
> 
> On Tue, 10 Mar 2026 at 10:11, Jeanette C. <000015cdd0ffa6cd-dmarc- 
> request@listserv.heanet.ie  request@listserv.heanet.ie>> wrote:
> 
>     Hi Brandon,
>     lovely to see you here!
> 
>     Personally, I'd say the Guitarix code is great for something close
>     to typical
>     amps, that's what it's made for. BUT...
> 
>     You can get nice and dirty with clip alone, try its different clipping
>     methods. distort1 can also be a source of unspeakable noise. Even
>     mirror can
>     be fun. :) Then, of course, you can modulate source audio, depending
>     on your
>     source ringmodulation by just multiplying stuff, FM, PM. The manual
>     example
>     for the hilbert filter, I believe, shows a basic Bode frequency
>     shifter type
>     of thing. -- And you have compress2 to get gritty with compressors.
>     In the old
>     manual entry, I found it slightly difficult to understand that the
>     threshhold
>     is the threshhold of an internal noise gate and the typical compressor
>     threshhold is set by the low and high knee points. This may be changed.
>     Anyway, another good opcode.
> 
>     Especially when you're testing something like clip with different
>     models or
>     methods, it can be helpful to do something like this:
>     instr Play
>         ; from parameter
>         iMethod = p4
>         ...
>         aClipped = clip(aInput, iMethod, ...)
>         ...
>     endin
> 
>     And in the socre or when calling the instrument:
>     i"Play" 0 5 0 ; 5 seconds with method 0
>     i. + . 1 ; follwed by 5 second with method 1
>     i. . . 2 ; Followed by 5 seconds of method 2
> 
>     HTH.
> 
>     Best wishes,
> 
>     Jeanette
> 
>     --
>        * Youtube: https://www.youtube.com/channel/
>     UCMS4rfGrTwz8W7jhC1Jnv7g      UCMS4rfGrTwz8W7jhC1Jnv7g>
>        * GitHub: https://github.com/jeanette-c      jeanette-c>
> 
>     Csound mailing list
>     Csound@listserv.heanet.ie 
>     https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND      listserv.heanet.ie/cgi-bin/wa?A0=CSOUND>
>     Send bugs reports to
>     https://github.com/csound/csound/issues      csound/issues>
>     Discussions of bugs and features can be posted here
> 
> 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  csound/csound/issues> Discussions of bugs and features can be posted here

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