[Csnd] alternatives to hacking the fmbell opcode
Date | 2012-01-16 08:32 |
From | Forrest Cahoon |
Subject | [Csnd] alternatives to hacking the fmbell opcode |
I have been exploring bell sounds, and I found that with fmbell, I could achieve an interesting effect: since (unlike STKTubeBell) the low-frequency amplitude modulation is not dependent on the frequency of the note, by increasing the depth of that modulation I can start out with bell tones but end up with arpeggios when I have well-timed chords to start with. The problem is that the sustain is much too short to make this effect work. So, I dug into the source a bit and found it, in fm4op.c starting at line 273, and changed the envelopes' decay segments from 4.0 to 16.0. I'm quite pleased with the result; you can hear a sample of at http://soundcloud.com/fcahoon/bell-hack The thing is, I'm not interested in maintaining my own hacked version of csound, nor do I think that my changes belong in the official version -- so I am looking for another way to keep working with this bell algorithm. Does anyone have this algorithm implemented as a csound instrument, instead of in C code? It seems that would be the best way for me to get the sounds I want from a stock version of CSound. Or a description of the algorithm? Any help would be most appreciated. Forrest |
Date | 2012-01-16 08:58 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Csnd] alternatives to hacking the fmbell opcode |
I could make that 4 an optional argument, defaulting to 4. Would that help? ==John ff > I have been exploring bell sounds, and I found that with fmbell, I could > achieve an interesting effect: since (unlike STKTubeBell) the > low-frequency > amplitude modulation is not dependent on the frequency of the note, by > increasing the depth of that modulation I can start out with bell tones > but > end up with arpeggios when I have well-timed chords to start with. > > The problem is that the sustain is much too short to make this effect > work. > So, I dug into the source a bit and found it, in fm4op.c starting at line > 273, and changed the envelopes' decay segments from 4.0 to 16.0. > > I'm quite pleased with the result; you can hear a sample of at > http://soundcloud.com/fcahoon/bell-hack > > The thing is, I'm not interested in maintaining my own hacked version of > csound, nor do I think that my changes belong in the official version -- > so > I am looking for another way to keep working with this bell algorithm. > > Does anyone have this algorithm implemented as a csound instrument, > instead > of in C code? It seems that would be the best way for me to get the sounds > I want from a stock version of CSound. Or a description of the algorithm? > > Any help would be most appreciated. > > Forrest > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe > csound" > > Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2012-01-16 09:01 |
From | Forrest Cahoon |
Subject | Re: [Csnd] alternatives to hacking the fmbell opcode |
On Mon, Jan 16, 2012 at 2:58 AM, <jpff@cs.bath.ac.uk> wrote:
Wow, that's exactly what I need. Backwards compatible and everything. That would be awesome! Forrest |
Date | 2012-01-16 09:07 |
From | Erik de Castro Lopo |
Subject | Re: [Csnd] alternatives to hacking the fmbell opcode |
jpff@cs.bath.ac.uk wrote: > > I could make that 4 an optional argument, defaulting to 4. Would that help? I like Forrest Cahoon's hack, so thats a +1 from me. Cheers, Erik |
Date | 2012-01-16 09:17 |
From | Forrest Cahoon |
Subject | Re: [Csnd] alternatives to hacking the fmbell opcode |
On Mon, Jan 16, 2012 at 3:01 AM, Forrest Cahoon <forrest.cahoon@gmail.com> wrote:
I should give the detail that the one component which had a decay segment of 2 seconds, half of the others, I changed to make 8 seconds, keeping that ratio. My hacked lines of code are: ADSR_setAllTimes(csound, &p->adsr[0], FL(0.005), FL(16.0), FL(0.0), FL(0.04)); ADSR_setAllTimes(csound, &p->adsr[1], FL(0.005), FL(16.0), FL(0.0), FL(0.04)); ADSR_setAllTimes(csound, &p->adsr[2], FL(0.001), FL(8.0), FL(0.0), FL(0.04)); ADSR_setAllTimes(csound, &p->adsr[3], FL(0.004), FL(16.0), FL(0.0), FL(0.04)); I didn't play around with that value, but I'm happy with the result, and keeping that one as half the others seems good to me. Forrest |
Date | 2012-01-16 09:28 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Csnd] alternatives to hacking the fmbell opcode |
Is it only the first 4.0 or all three? At the risk of argument bloat (!) do you want control over all 4 ADSR? And.... we could add additional parameter changing at some cost for the other fm opcodes > On Mon, Jan 16, 2012 at 2:58 AM, |
Date | 2012-01-16 09:43 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Csnd] alternatives to hacking the fmbell opcode |
In git now. One additional optionla arg that defaults to 4 but sets time in the ADSR. I will document in the manual next and add an example ==John Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2012-01-17 13:46 |
From | Forrest Cahoon |
Subject | Re: [Csnd] alternatives to hacking the fmbell opcode |
On Mon, Jan 16, 2012 at 3:43 AM, <jpff@cs.bath.ac.uk> wrote:
In git now. One additional optionla arg that defaults to 4 but sets time Tested this now, and it works as expected. Thanks, John! Forrest |
Date | 2012-01-17 14:23 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Csnd] alternatives to hacking the fmbell opcode |
No problem -- I have started using the sound myself..... Thanks for the tip. Oh that is was all that easy! ==John ff > On Mon, Jan 16, 2012 at 3:43 AM, |
Date | 2012-01-17 14:39 |
From | richard duckworth |
Subject | [Csnd] ReverbSC opcode |
Hi all, the reverbsc opcode is behaving strangely: there does not seem to be any way to get a convincing small room or chamber sound. I've tried the lower settings of kfblvl to no avail. I've changed all of the other settings and taken care to set kfco's max value at israte/2. When kfblvl is changed it leaps from a non-existent reverb amount to a large, swimmy reverb - very cool, but not what I'm looking for All the best, Rich Rich Duckworth Lecturer in Music Technology Department of Music House 5 Trinity College Dublin 2 Ireland Tel 353 1 896 1500 It's the most devastating moment in a young mans life, when he
quite reasonably says to himself, "I shall never play The Dane!" |