[Csnd] compress opcode discontinuities using acontrolsig - is there a csound zeros opcode?
Date | 2020-05-12 18:58 |
From | walker |
Subject | [Csnd] compress opcode discontinuities using acontrolsig - is there a csound zeros opcode? |
Hey everybody, Hope you are all well. Anyways, I am trying to do some side chain compression on audio files(this problem does not seem to exist with oscil instruments, if I remember correctly). In this example/issue, I have 2 instruments here. instr 1 is the signal that is to be compressed/sidechained/dipped, a pad or reverb-y/suspended sample works nicely. instr 2 is the control signal, generally something shorter like a kick or snare sample. I have routed both of these to global signals which are the input to 'bus' instrument tracks, instr 20. For this demo/test the control signal never reaches the DAC, it is just in place to manipulate the compressed signal. Using just two of the diskin2 opcodes to read and play the audio file data, there are a few issues. - when the control signal is not producing noise(end of event or audio file), the compressed signal drops out - there are some clear discontinuities and pops when this happens Hack-y remedy: Uncomment instr 3, a signal of very quiet white noise. This prevents the drop outs and discontinuities from happening. To me, this makes the compress opcode behave like compressors and compressor plug-ins I have used outside of Csound... The audio results sounds good to me, but it just feels weird/unnecessary to use noise as the signal stabilizer though... Is there some kind of zero generating opcode? I have searched, but haven't found anything... Noise amplitude issue: You will see that in the below code, there are two lines for noise generation. When the amplitude of noise is 0.0001, my hack works. When the amplitude is decreased to 0.00001, the discontinuities and pops return. This is not a major issue, but I don't quite understand.... This code demonstrates should work so long as you supply file paths for instr's 1 and 2. |
Date | 2020-05-15 20:17 |
From | walker |
Subject | Re: [Csnd] compress opcode discontinuities using acontrolsig - is there a csound zeros opcode? |
Just looping back on this from earlier this week..... Didn't hear from anybody, so I thought I would resend. I really hate to spam, but this issue definitely exceeds my csound knowledge. Any advice/tips/conversation on this would be greatly appreciated. Cheers, Walker -- Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html 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 | 2020-05-16 07:06 |
From | Pete Goodeve |
Subject | Re: [Csnd] compress opcode discontinuities using acontrolsig - is there a csound zeros opcode? |
Attachments | None |
Date | 2020-05-16 16:43 |
From | Hlöðver Sigurðsson |
Subject | Re: [Csnd] compress opcode discontinuities using acontrolsig - is there a csound zeros opcode? |
Interestign question, I'll have a look tonight. Don't see fully what's going on, but if you need to add noise, you could check if you change headphones/speakers has any effect (dither effect). Or this is just a click from too sudden silence to noise. I don't see any line:a port:a opcodes usage on a quick look. On Sat, 16 May 2020 at 08:06, Pete Goodeve <pete.goodeve@computer.org> wrote: Hi Walker, |
Date | 2020-05-16 19:20 |
From | walker davis |
Subject | Re: [Csnd] compress opcode discontinuities using acontrolsig - is there a csound zeros opcode? |
Pete - Thanks for the reply, I just didn't want this question to make its way too far down the queue. Setting the threshold to -10000 seems like a good trick, but might limit the functionality/compression controls. Hlöðver - I think the click is just from too sudden silence to noise. Generally just listening from my laptop speakers or headphones, results are pretty similar. I think that the discontinuity of the compressed signal and the relatively short/fast compressor attack and release might cause the pops/discontinuities. After thinking about this issue, and seeing both of your responses, it makes me wonder if it has something to do with besides compress opcode.... The compress opcode behaves as it should when there is both an audio and control signal. Do global ga signals produce constant output, arrays of zeros, through the entirety of the score? Or just when another signal is added/passed to them... To me, it seems like the ga signal is dropping out, that was why I added the noise opcode in there... On Sat, May 16, 2020 at 8:43 AM Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
|
Date | 2020-05-16 19:46 |
From | Rory Walsh |
Subject | Re: [Csnd] compress opcode discontinuities using acontrolsig - is there a csound zeros opcode? |
I too have very little experience with the compress opcode, but have you looked Iain's use of it here: here and Perhaps he is doing something to handle the issues you've mentioned? On Sat, 16 May 2020 at 19:21, walker davis <walkerdavismusic@gmail.com> wrote:
|
Date | 2020-05-16 20:22 |
From | Pete Goodeve |
Subject | Re: [Csnd] compress opcode discontinuities using acontrolsig - is there a csound zeros opcode? |
Attachments | None |
Date | 2020-05-16 20:58 |
From | Pete Goodeve |
Subject | Re: [Csnd] compress opcode discontinuities using acontrolsig - is there a csound zeros opcode? |
Attachments | None |
Date | 2020-05-16 22:58 |
From | Hlöðver Sigurðsson |
Subject | Re: [Csnd] compress opcode discontinuities using acontrolsig - is there a csound zeros opcode? |
I tested it locally, and you are correct that the audio buffers aren't clearing, but I did hear improvement using clear ga_compressed_sig, ga_control_sig instead of assigning them to 0, also from what I hear, the clicks are only at the beginning of the audio samples, and it differs a lot from sample to sample, but you should change: ktrans linseg 1, p3,1 for some real declick function, and adjust the the dicklick time so that you don't hear the clicks but short enough it doesn't affect the sample. On Sat, 16 May 2020 at 21:58, Pete Goodeve <pete.goodeve@computer.org> wrote: Walker, you might want to look at 'compress2', which John |
Date | 2020-05-17 01:51 |
From | walker davis |
Subject | Re: [Csnd] compress opcode discontinuities using acontrolsig - is there a csound zeros opcode? |
awesome, thank you very much guys. good to know that: - ga_signals always have zeros - i was clearing the buffers incorrectly. - compress2 is very similar to compress, just with different, perhaps more standardized, looking inputs values... I think I misunderstood the kthresh param, assuming that threshold in this case meant point at which compression started, not point of noise floor. All super helpful guys, really appreciate it, thank you! On Sat, May 16, 2020 at 2:59 PM Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
|
Date | 2020-05-17 02:43 |
From | "Dr. Richard Boulanger" |
Subject | Re: [Csnd] compress opcode discontinuities using acontrolsig - is there a csound zeros opcode? |
Thanks for sharing these McCurdy models with us Rory. - Are you aware that Csound's FLTK opcodes no longer work on the Mac? (And sadly, the first example shows a blank screen!) This is a great loss. _____________________________________________ Dr. Richard Boulanger Professor of Electronic Production and Design On Sat, May 16, 2020 at 2:46 PM Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2020-05-17 02:53 |
From | "Dr. Richard Boulanger" |
Subject | Re: [Csnd] compress opcode discontinuities using acontrolsig - is there a csound zeros opcode? |
PS - The McCurdy Models in Cabbage are great _____________________________________________ Dr. Richard Boulanger Professor of Electronic Production and Design On Sat, May 16, 2020 at 9:43 PM Dr. Richard Boulanger <rboulanger@berklee.edu> wrote:
|