[Csnd] move delay for fm?

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd] move delay for fm?

forrest
If you delay a noisy audio signal and add some portion of it back to the original, you reinforce a particular resonating frequency, something like [I think]:

af = 1/f
asig         delayr .01
adelayed  deltapi af
               delayw asig + afeedback * adelayed

should work as long as f > 100 (?)

but if I want to modulate this with another frequency F
I'd need to wiggle the tap at 'af' at that rate (?)

So if I started this with

awiggle oscilli aamp aF
af = 1/(f + awiggle)
would that work correctly?

Csound mailing list [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] move delay for fm?

Oeyvind Brandtsegg-3
In Victor's DFM (Delay based FM) UDO for adaptive FM, the formula to calculate the delay time is 
kndx/(ipi*kcps)
where kcps is the frequency you want to modulate at,
ipi is the math constant pi,
and kndx is the modulation index



Den søn. 7. okt. 2018 kl. 23:01 skrev Forrest Curo <[hidden email]>:
If you delay a noisy audio signal and add some portion of it back to the original, you reinforce a particular resonating frequency, something like [I think]:

af = 1/f
asig         delayr .01
adelayed  deltapi af
               delayw asig + afeedback * adelayed

should work as long as f > 100 (?)

but if I want to modulate this with another frequency F
I'd need to wiggle the tap at 'af' at that rate (?)

So if I started this with

awiggle oscilli aamp aF
af = 1/(f + awiggle)
would that work correctly?

Csound mailing list [hidden email] 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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] move delay for fm?

forrest
Thank you but... I was wanting to produce a frequency to modulate & another frequency to modulate it with, & I'm not seeing where the first one comes in(?)

On Sun, Oct 7, 2018 at 11:43 PM Oeyvind Brandtsegg <[hidden email]> wrote:
In Victor's DFM (Delay based FM) UDO for adaptive FM, the formula to calculate the delay time is 
kndx/(ipi*kcps)
where kcps is the frequency you want to modulate at,
ipi is the math constant pi,
and kndx is the modulation index



Den søn. 7. okt. 2018 kl. 23:01 skrev Forrest Curo <[hidden email]>:
If you delay a noisy audio signal and add some portion of it back to the original, you reinforce a particular resonating frequency, something like [I think]:

af = 1/f
asig         delayr .01
adelayed  deltapi af
               delayw asig + afeedback * adelayed

should work as long as f > 100 (?)

but if I want to modulate this with another frequency F
I'd need to wiggle the tap at 'af' at that rate (?)

So if I started this with

awiggle oscilli aamp aF
af = 1/(f + awiggle)
would that work correctly?

Csound mailing list [hidden email] 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 [hidden email] 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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] move delay for fm?

00000008a49663bc-dmarc-request

Hi,

I did try to achieve frequency modulation by using a couple delay based pitchshifter (udo) where the pitch shift amount is controlled by the pitchshifted incoming audio signal.


This is the UDO (copied fron Ian McCurdy examples)

opcode PitchShifter_aak, a, aaki

setksmps 1

ain, asemitones, kquality, ihalfsine xin

;asemitones number of semitones of trasposition

;kquality quality of the output - adds delay - from 0 to infinity

imaxdlt init 2

kdlt = .01 + .1 * kquality

aoctfract = asemitones/12

aratio = octave(aoctfract)

arate = (aratio-1)/kdlt

aphase1 phasor -arate

aphase2 phasor -arate, .5

agate1 tablei aphase1, ihalfsine, 1, 0, 1

agate2 tablei aphase2, ihalfsine, 1, 0, 1

adlt interp kdlt

aout init 0

abuffer delayr imaxdlt

adelsig1 deltap3 aphase1 * adlt

aGatedSig1 = adelsig1 * agate1

delayw ain

abuffer delayr imaxdlt

adelsig2 deltap3 aphase2 * adlt

aGatedSig2 = adelsig2 * agate2

delayw ain

aout dcblock2 (aGatedSig1 + aGatedSig2) * 0.5 xout aout

endop


This is the instrument:

instr almostaudiofm

;ain in incoming audio

;kparX are the value controlled by user (range 0 -1)

;gihalfsine is a ftable containing an half sine form

kqual init 0.01

kpit = (kpar1 - 0.5) * 48; carrier transpose +- 24

ktransp = (kpar2 - 0.5) * 48; modulator transpose +- 24
kspread = (kpar3 - 0.5) * 48; modulator spread +- 24

amod PitchShifter_akk ain, ktransp, kqual, gihalfsine

afm PitchShifter_aak ain, kpit + amod * kspread, kqual, gihalfsine

;afm is the modulated output

endin


The result is not so exicing...

Ciao

Stefano


Il 8 ottobre 2018 alle 14.12 Forrest Curo <[hidden email]> ha scritto:

Thank you but... I was wanting to produce a frequency to modulate & another frequency to modulate it with, & I'm not seeing where the first one comes in(?)

On Sun, Oct 7, 2018 at 11:43 PM Oeyvind Brandtsegg < [hidden email]> wrote:
In Victor's DFM (Delay based FM) UDO for adaptive FM, the formula to calculate the delay time is 
kndx/(ipi*kcps)
where kcps is the frequency you want to modulate at,
ipi is the math constant pi,
and kndx is the modulation index



Den søn. 7. okt. 2018 kl. 23:01 skrev Forrest Curo < [hidden email]>:
If you delay a noisy audio signal and add some portion of it back to the original, you reinforce a particular resonating frequency, something like [I think]:

af = 1/f
asig         delayr .01
adelayed  deltapi af
               delayw asig + afeedback * adelayed

should work as long as f > 100 (?)

but if I want to modulate this with another frequency F
I'd need to wiggle the tap at 'af' at that rate (?)

So if I started this with

awiggle oscilli aamp aF
af = 1/(f + awiggle)
would that work correctly?

Csound mailing list [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] move delay for fm?

Oeyvind Brandtsegg-2
In reply to this post by forrest
Yes, the first one comes from pitch detection of the signal you want to process. Sorry if I misunderstood the question. 

Den man. 8. okt. 2018, 2.13 p.m. skrev Forrest Curo <[hidden email]>:
Thank you but... I was wanting to produce a frequency to modulate & another frequency to modulate it with, & I'm not seeing where the first one comes in(?)

On Sun, Oct 7, 2018 at 11:43 PM Oeyvind Brandtsegg <[hidden email]> wrote:
In Victor's DFM (Delay based FM) UDO for adaptive FM, the formula to calculate the delay time is 
kndx/(ipi*kcps)
where kcps is the frequency you want to modulate at,
ipi is the math constant pi,
and kndx is the modulation index



Den søn. 7. okt. 2018 kl. 23:01 skrev Forrest Curo <[hidden email]>:
If you delay a noisy audio signal and add some portion of it back to the original, you reinforce a particular resonating frequency, something like [I think]:

af = 1/f
asig         delayr .01
adelayed  deltapi af
               delayw asig + afeedback * adelayed

should work as long as f > 100 (?)

but if I want to modulate this with another frequency F
I'd need to wiggle the tap at 'af' at that rate (?)

So if I started this with

awiggle oscilli aamp aF
af = 1/(f + awiggle)
would that work correctly?

Csound mailing list [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] move delay for fm?

forrest
I wish I could have put the question more clearly -- It's from that old 'breath-controller' arrangement I was (sporadically, sorry) working on when you were here in San Diego.

Now that I'm free to take that up again I'm still sorting out the complexities of delayr, delaytap, & delayw -- I've been getting mixed results from playing with making more complicated networks than I really needed... Too much feedback, I get blasted out of my earphones; too little & the signal wimps out.

It was a brainstrain coming up with
awiggle oscilli aamp aF
af = 1/(f + awiggle)
but it sounds like a direct way to do it in one delay loop... It should be correct?

On Mon, Oct 8, 2018 at 9:33 AM Oeyvind Brandtsegg <[hidden email]> wrote:
Yes, the first one comes from pitch detection of the signal you want to process. Sorry if I misunderstood the question. 

Den man. 8. okt. 2018, 2.13 p.m. skrev Forrest Curo <[hidden email]>:
Thank you but... I was wanting to produce a frequency to modulate & another frequency to modulate it with, & I'm not seeing where the first one comes in(?)

On Sun, Oct 7, 2018 at 11:43 PM Oeyvind Brandtsegg <[hidden email]> wrote:
In Victor's DFM (Delay based FM) UDO for adaptive FM, the formula to calculate the delay time is 
kndx/(ipi*kcps)
where kcps is the frequency you want to modulate at,
ipi is the math constant pi,
and kndx is the modulation index



Den søn. 7. okt. 2018 kl. 23:01 skrev Forrest Curo <[hidden email]>:
If you delay a noisy audio signal and add some portion of it back to the original, you reinforce a particular resonating frequency, something like [I think]:

af = 1/f
asig         delayr .01
adelayed  deltapi af
               delayw asig + afeedback * adelayed

should work as long as f > 100 (?)

but if I want to modulate this with another frequency F
I'd need to wiggle the tap at 'af' at that rate (?)

So if I started this with

awiggle oscilli aamp aF
af = 1/(f + awiggle)
would that work correctly?

Csound mailing list [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] move delay for fm?

Oeyvind Brandtsegg-3
Oh,  now I see, I think.
Is it correct to understand this as a waveguide, like a simplified physical flute model, fed with a live noise source from your mouthpiece?
If so, then using frequency modulation on the length of the delay loop actually creates substantial complications in calculating the right amount of feedback.
... as you have experienced.... 
I have actually tampered with similar ideas lately, for a workshop here at NTNU later this semester. I find that experimentation with these modified waveguides is best done offline, writing to file and examining it. Then you don't burn down the house or damage speakers/headphones/ears while experimenting. This is also a huge strength of using Csound for this purpose. Many other audio programming tools (SC, PD, Max) are cumbersome to use for offline rendering, but with Csound it is completely transparent. The main sources of this delay loop blowing up is the modulations and the feedback inside the loop, to they will be just as accurately represented offline as when you are running it live. If you like, you can record your live source to use as the input to the delay loop when rendering offline.

One thing I tried is inserting a gain balance step inside the feedback loop. This allows inserting arbitrary processing elements in there without it blowing up. It is a pretty quick and dirty solution, but allows for experimentation at least.
Something like this

ksmps = 1

instr 1

icps = 220
ifeed = 0.99
apickenv linseg 1, 1/icps, 1, 0, 0, 1, 0
anoise rnd31 1, 1
apick = anoise*apickenv
afeed init 0
ain = apick+afeed
adel delay ain, 1/icps

; insert modulation and fiilters in the feedbackloop here

; lowpass
kcutoff = p4
afilt0 butterlp adel, kcutoff

; saturation
kdrive = 2
afilt = tanh(afilt0*kdrive)

; restore gain after filtering/modulation
krms rms afilt0
krmsfilt rms afilt
kautogain divz krms, krmsfilt, 1
afilt = afilt*kautogain

afeed = afilt*ifeed
outs adel, adel

endin


Den man. 8. okt. 2018 kl. 19:37 skrev Forrest Curo <[hidden email]>:
I wish I could have put the question more clearly -- It's from that old 'breath-controller' arrangement I was (sporadically, sorry) working on when you were here in San Diego.

Now that I'm free to take that up again I'm still sorting out the complexities of delayr, delaytap, & delayw -- I've been getting mixed results from playing with making more complicated networks than I really needed... Too much feedback, I get blasted out of my earphones; too little & the signal wimps out.

It was a brainstrain coming up with
awiggle oscilli aamp aF
af = 1/(f + awiggle)
but it sounds like a direct way to do it in one delay loop... It should be correct?

On Mon, Oct 8, 2018 at 9:33 AM Oeyvind Brandtsegg <[hidden email]> wrote:
Yes, the first one comes from pitch detection of the signal you want to process. Sorry if I misunderstood the question. 

Den man. 8. okt. 2018, 2.13 p.m. skrev Forrest Curo <[hidden email]>:
Thank you but... I was wanting to produce a frequency to modulate & another frequency to modulate it with, & I'm not seeing where the first one comes in(?)

On Sun, Oct 7, 2018 at 11:43 PM Oeyvind Brandtsegg <[hidden email]> wrote:
In Victor's DFM (Delay based FM) UDO for adaptive FM, the formula to calculate the delay time is 
kndx/(ipi*kcps)
where kcps is the frequency you want to modulate at,
ipi is the math constant pi,
and kndx is the modulation index



Den søn. 7. okt. 2018 kl. 23:01 skrev Forrest Curo <[hidden email]>:
If you delay a noisy audio signal and add some portion of it back to the original, you reinforce a particular resonating frequency, something like [I think]:

af = 1/f
asig         delayr .01
adelayed  deltapi af
               delayw asig + afeedback * adelayed

should work as long as f > 100 (?)

but if I want to modulate this with another frequency F
I'd need to wiggle the tap at 'af' at that rate (?)

So if I started this with

awiggle oscilli aamp aF
af = 1/(f + awiggle)
would that work correctly?

Csound mailing list [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] move delay for fm?

forrest
I think I see -- The divz in there is new to me;
(kautogain divz krms, krmsfilt, 1 )
I'd been feeling seriously hobbled by the lack of an a-rate if-statement -- but this provides a nice way to do the job!



On Tue, Oct 9, 2018 at 12:14 AM Oeyvind Brandtsegg <[hidden email]> wrote:
Oh,  now I see, I think.
Is it correct to understand this as a waveguide, like a simplified physical flute model, fed with a live noise source from your mouthpiece?
If so, then using frequency modulation on the length of the delay loop actually creates substantial complications in calculating the right amount of feedback.
... as you have experienced.... 
I have actually tampered with similar ideas lately, for a workshop here at NTNU later this semester. I find that experimentation with these modified waveguides is best done offline, writing to file and examining it. Then you don't burn down the house or damage speakers/headphones/ears while experimenting. This is also a huge strength of using Csound for this purpose. Many other audio programming tools (SC, PD, Max) are cumbersome to use for offline rendering, but with Csound it is completely transparent. The main sources of this delay loop blowing up is the modulations and the feedback inside the loop, to they will be just as accurately represented offline as when you are running it live. If you like, you can record your live source to use as the input to the delay loop when rendering offline.

One thing I tried is inserting a gain balance step inside the feedback loop. This allows inserting arbitrary processing elements in there without it blowing up. It is a pretty quick and dirty solution, but allows for experimentation at least.
Something like this

ksmps = 1

instr 1

icps = 220
ifeed = 0.99
apickenv linseg 1, 1/icps, 1, 0, 0, 1, 0
anoise rnd31 1, 1
apick = anoise*apickenv
afeed init 0
ain = apick+afeed
adel delay ain, 1/icps

; insert modulation and fiilters in the feedbackloop here

; lowpass
kcutoff = p4
afilt0 butterlp adel, kcutoff

; saturation
kdrive = 2
afilt = tanh(afilt0*kdrive)

; restore gain after filtering/modulation
krms rms afilt0
krmsfilt rms afilt
kautogain divz krms, krmsfilt, 1
afilt = afilt*kautogain

afeed = afilt*ifeed
outs adel, adel

endin


Den man. 8. okt. 2018 kl. 19:37 skrev Forrest Curo <[hidden email]>:
I wish I could have put the question more clearly -- It's from that old 'breath-controller' arrangement I was (sporadically, sorry) working on when you were here in San Diego.

Now that I'm free to take that up again I'm still sorting out the complexities of delayr, delaytap, & delayw -- I've been getting mixed results from playing with making more complicated networks than I really needed... Too much feedback, I get blasted out of my earphones; too little & the signal wimps out.

It was a brainstrain coming up with
awiggle oscilli aamp aF
af = 1/(f + awiggle)
but it sounds like a direct way to do it in one delay loop... It should be correct?

On Mon, Oct 8, 2018 at 9:33 AM Oeyvind Brandtsegg <[hidden email]> wrote:
Yes, the first one comes from pitch detection of the signal you want to process. Sorry if I misunderstood the question. 

Den man. 8. okt. 2018, 2.13 p.m. skrev Forrest Curo <[hidden email]>:
Thank you but... I was wanting to produce a frequency to modulate & another frequency to modulate it with, & I'm not seeing where the first one comes in(?)

On Sun, Oct 7, 2018 at 11:43 PM Oeyvind Brandtsegg <[hidden email]> wrote:
In Victor's DFM (Delay based FM) UDO for adaptive FM, the formula to calculate the delay time is 
kndx/(ipi*kcps)
where kcps is the frequency you want to modulate at,
ipi is the math constant pi,
and kndx is the modulation index



Den søn. 7. okt. 2018 kl. 23:01 skrev Forrest Curo <[hidden email]>:
If you delay a noisy audio signal and add some portion of it back to the original, you reinforce a particular resonating frequency, something like [I think]:

af = 1/f
asig         delayr .01
adelayed  deltapi af
               delayw asig + afeedback * adelayed

should work as long as f > 100 (?)

but if I want to modulate this with another frequency F
I'd need to wiggle the tap at 'af' at that rate (?)

So if I started this with

awiggle oscilli aamp aF
af = 1/(f + awiggle)
would that work correctly?

Csound mailing list [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] move delay for fm?

forrest
For example [manual]:

" ==

== — Compares two values for equality.

Description

Compares two values for equality.

Syntax

(a == b ? v1 : v2)

where a, b, v1 and v2 may be expressions, but a, b not audio-rate."

----

but one can always test [for this, at least] by putting 'a-b' on the bottom of a divz. Other relations would be trickier, but probably kludgable...


On Tue, Oct 9, 2018 at 6:34 AM Forrest Curo <[hidden email]> wrote:
I think I see -- The divz in there is new to me;
(kautogain divz krms, krmsfilt, 1 )
I'd been feeling seriously hobbled by the lack of an a-rate if-statement -- but this provides a nice way to do the job!



On Tue, Oct 9, 2018 at 12:14 AM Oeyvind Brandtsegg <[hidden email]> wrote:
Oh,  now I see, I think.
Is it correct to understand this as a waveguide, like a simplified physical flute model, fed with a live noise source from your mouthpiece?
If so, then using frequency modulation on the length of the delay loop actually creates substantial complications in calculating the right amount of feedback.
... as you have experienced.... 
I have actually tampered with similar ideas lately, for a workshop here at NTNU later this semester. I find that experimentation with these modified waveguides is best done offline, writing to file and examining it. Then you don't burn down the house or damage speakers/headphones/ears while experimenting. This is also a huge strength of using Csound for this purpose. Many other audio programming tools (SC, PD, Max) are cumbersome to use for offline rendering, but with Csound it is completely transparent. The main sources of this delay loop blowing up is the modulations and the feedback inside the loop, to they will be just as accurately represented offline as when you are running it live. If you like, you can record your live source to use as the input to the delay loop when rendering offline.

One thing I tried is inserting a gain balance step inside the feedback loop. This allows inserting arbitrary processing elements in there without it blowing up. It is a pretty quick and dirty solution, but allows for experimentation at least.
Something like this

ksmps = 1

instr 1

icps = 220
ifeed = 0.99
apickenv linseg 1, 1/icps, 1, 0, 0, 1, 0
anoise rnd31 1, 1
apick = anoise*apickenv
afeed init 0
ain = apick+afeed
adel delay ain, 1/icps

; insert modulation and fiilters in the feedbackloop here

; lowpass
kcutoff = p4
afilt0 butterlp adel, kcutoff

; saturation
kdrive = 2
afilt = tanh(afilt0*kdrive)

; restore gain after filtering/modulation
krms rms afilt0
krmsfilt rms afilt
kautogain divz krms, krmsfilt, 1
afilt = afilt*kautogain

afeed = afilt*ifeed
outs adel, adel

endin


Den man. 8. okt. 2018 kl. 19:37 skrev Forrest Curo <[hidden email]>:
I wish I could have put the question more clearly -- It's from that old 'breath-controller' arrangement I was (sporadically, sorry) working on when you were here in San Diego.

Now that I'm free to take that up again I'm still sorting out the complexities of delayr, delaytap, & delayw -- I've been getting mixed results from playing with making more complicated networks than I really needed... Too much feedback, I get blasted out of my earphones; too little & the signal wimps out.

It was a brainstrain coming up with
awiggle oscilli aamp aF
af = 1/(f + awiggle)
but it sounds like a direct way to do it in one delay loop... It should be correct?

On Mon, Oct 8, 2018 at 9:33 AM Oeyvind Brandtsegg <[hidden email]> wrote:
Yes, the first one comes from pitch detection of the signal you want to process. Sorry if I misunderstood the question. 

Den man. 8. okt. 2018, 2.13 p.m. skrev Forrest Curo <[hidden email]>:
Thank you but... I was wanting to produce a frequency to modulate & another frequency to modulate it with, & I'm not seeing where the first one comes in(?)

On Sun, Oct 7, 2018 at 11:43 PM Oeyvind Brandtsegg <[hidden email]> wrote:
In Victor's DFM (Delay based FM) UDO for adaptive FM, the formula to calculate the delay time is 
kndx/(ipi*kcps)
where kcps is the frequency you want to modulate at,
ipi is the math constant pi,
and kndx is the modulation index



Den søn. 7. okt. 2018 kl. 23:01 skrev Forrest Curo <[hidden email]>:
If you delay a noisy audio signal and add some portion of it back to the original, you reinforce a particular resonating frequency, something like [I think]:

af = 1/f
asig         delayr .01
adelayed  deltapi af
               delayw asig + afeedback * adelayed

should work as long as f > 100 (?)

but if I want to modulate this with another frequency F
I'd need to wiggle the tap at 'af' at that rate (?)

So if I started this with

awiggle oscilli aamp aF
af = 1/(f + awiggle)
would that work correctly?

Csound mailing list [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] move delay for fm?

Oeyvind Brandtsegg-3
Nice one, I never thought of using it for that purpose, but that should work.

Den tir. 9. okt. 2018 kl. 18:16 skrev Forrest Curo <[hidden email]>:
For example [manual]:

" ==

== — Compares two values for equality.

Description

Compares two values for equality.

Syntax

(a == b ? v1 : v2)

where a, b, v1 and v2 may be expressions, but a, b not audio-rate."

----

but one can always test [for this, at least] by putting 'a-b' on the bottom of a divz. Other relations would be trickier, but probably kludgable...


On Tue, Oct 9, 2018 at 6:34 AM Forrest Curo <[hidden email]> wrote:
I think I see -- The divz in there is new to me;
(kautogain divz krms, krmsfilt, 1 )
I'd been feeling seriously hobbled by the lack of an a-rate if-statement -- but this provides a nice way to do the job!



On Tue, Oct 9, 2018 at 12:14 AM Oeyvind Brandtsegg <[hidden email]> wrote:
Oh,  now I see, I think.
Is it correct to understand this as a waveguide, like a simplified physical flute model, fed with a live noise source from your mouthpiece?
If so, then using frequency modulation on the length of the delay loop actually creates substantial complications in calculating the right amount of feedback.
... as you have experienced.... 
I have actually tampered with similar ideas lately, for a workshop here at NTNU later this semester. I find that experimentation with these modified waveguides is best done offline, writing to file and examining it. Then you don't burn down the house or damage speakers/headphones/ears while experimenting. This is also a huge strength of using Csound for this purpose. Many other audio programming tools (SC, PD, Max) are cumbersome to use for offline rendering, but with Csound it is completely transparent. The main sources of this delay loop blowing up is the modulations and the feedback inside the loop, to they will be just as accurately represented offline as when you are running it live. If you like, you can record your live source to use as the input to the delay loop when rendering offline.

One thing I tried is inserting a gain balance step inside the feedback loop. This allows inserting arbitrary processing elements in there without it blowing up. It is a pretty quick and dirty solution, but allows for experimentation at least.
Something like this

ksmps = 1

instr 1

icps = 220
ifeed = 0.99
apickenv linseg 1, 1/icps, 1, 0, 0, 1, 0
anoise rnd31 1, 1
apick = anoise*apickenv
afeed init 0
ain = apick+afeed
adel delay ain, 1/icps

; insert modulation and fiilters in the feedbackloop here

; lowpass
kcutoff = p4
afilt0 butterlp adel, kcutoff

; saturation
kdrive = 2
afilt = tanh(afilt0*kdrive)

; restore gain after filtering/modulation
krms rms afilt0
krmsfilt rms afilt
kautogain divz krms, krmsfilt, 1
afilt = afilt*kautogain

afeed = afilt*ifeed
outs adel, adel

endin


Den man. 8. okt. 2018 kl. 19:37 skrev Forrest Curo <[hidden email]>:
I wish I could have put the question more clearly -- It's from that old 'breath-controller' arrangement I was (sporadically, sorry) working on when you were here in San Diego.

Now that I'm free to take that up again I'm still sorting out the complexities of delayr, delaytap, & delayw -- I've been getting mixed results from playing with making more complicated networks than I really needed... Too much feedback, I get blasted out of my earphones; too little & the signal wimps out.

It was a brainstrain coming up with
awiggle oscilli aamp aF
af = 1/(f + awiggle)
but it sounds like a direct way to do it in one delay loop... It should be correct?

On Mon, Oct 8, 2018 at 9:33 AM Oeyvind Brandtsegg <[hidden email]> wrote:
Yes, the first one comes from pitch detection of the signal you want to process. Sorry if I misunderstood the question. 

Den man. 8. okt. 2018, 2.13 p.m. skrev Forrest Curo <[hidden email]>:
Thank you but... I was wanting to produce a frequency to modulate & another frequency to modulate it with, & I'm not seeing where the first one comes in(?)

On Sun, Oct 7, 2018 at 11:43 PM Oeyvind Brandtsegg <[hidden email]> wrote:
In Victor's DFM (Delay based FM) UDO for adaptive FM, the formula to calculate the delay time is 
kndx/(ipi*kcps)
where kcps is the frequency you want to modulate at,
ipi is the math constant pi,
and kndx is the modulation index



Den søn. 7. okt. 2018 kl. 23:01 skrev Forrest Curo <[hidden email]>:
If you delay a noisy audio signal and add some portion of it back to the original, you reinforce a particular resonating frequency, something like [I think]:

af = 1/f
asig         delayr .01
adelayed  deltapi af
               delayw asig + afeedback * adelayed

should work as long as f > 100 (?)

but if I want to modulate this with another frequency F
I'd need to wiggle the tap at 'af' at that rate (?)

So if I started this with

awiggle oscilli aamp aF
af = 1/(f + awiggle)
would that work correctly?

Csound mailing list [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] move delay for fm?

jpff
There are more than one way of comaring audio values.

Look in the manual for select, and ine upcoming cmp opcode in 6.12

Tese are not what you asked for, but what do you exect if a1 > a2 .. to
do?  there are ksmps Boolean values of the comparison.  If yo can specify
t we might  be able to provide.

==John ff

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] move delay for fm?

forrest
'Select' looks like all I should need, thanks!

It doesn't appear in the more easily found edition of the manual (6.6) I was using; but I found the current on (at last) via



On Tue, Oct 9, 2018 at 1:51 PM jpff <[hidden email]> wrote:
There are more than one way of comaring audio values.

Look in the manual for select, and ine upcoming cmp opcode in 6.12

Tese are not what you asked for, but what do you exect if a1 > a2 .. to
do?  there are ksmps Boolean values of the comparison.  If yo can specify
t we might  be able to provide.

==John ff

Csound mailing list
[hidden email]
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 [hidden email] 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