Csound Csound-dev Csound-tekno Search About

[Csnd] doppler shift options

Date2011-11-12 17:06
FromAndrew Lyons
Subject[Csnd] doppler shift options
Hi,

I'm resurrecting an old system for sound spatialisation after a 10 year rest, and I wanted to quickly survey if there are any new approaches to doppler pitch shifting in Csound besides the pvanal/pvoc approach I used originally. Some requirements:

1./ Ideally I can pitch shift in a single pass - rather than a two stage process. I'd like to pass a pitch control k-rate channel and a sound source, and get a doppler shifted sound back.

2./ The system can't alter the length (time domain) of the audio.

Are there any new ways to do this kind of thing? Thanks!

Cheers

--
=======================================
Andrew D Lyons | Digital Artist | http://www.tstex.com
=======================================

Date2011-11-12 18:01
FromVictor Lazzarini
SubjectRe: [Csnd] doppler shift options

The first solution would be to pitch shift using  pvsanal  + pvscale + pvsynth, if you want to get any input signal. Another alternative, is to use
a time-domain pitchshifter with delay lines. If you are reading from file, pvstanal, temposcal and mincer could also do the job.


Victor
On 12 Nov 2011, at 17:06, Andrew Lyons wrote:

Hi,

I'm resurrecting an old system for sound spatialisation after a 10 year rest, and I wanted to quickly survey if there are any new approaches to doppler pitch shifting in Csound besides the pvanal/pvoc approach I used originally. Some requirements:

1./ Ideally I can pitch shift in a single pass - rather than a two stage process. I'd like to pass a pitch control k-rate channel and a sound source, and get a doppler shifted sound back.

2./ The system can't alter the length (time domain) of the audio.

Are there any new ways to do this kind of thing? Thanks!

Cheers

--
=======================================
Andrew D Lyons | Digital Artist | http://www.tstex.com
=======================================

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Date2011-11-12 18:12
FromVictor Lazzarini
SubjectRe: [Csnd] doppler shift options
By the way, if you're wondering about the delay pitchshifter: http://www.csounds.com/udo/displayOpcode.php?opcode_id=157

On 12 Nov 2011, at 18:01, Victor Lazzarini wrote:


The first solution would be to pitch shift using  pvsanal  + pvscale + pvsynth, if you want to get any input signal. Another alternative, is to use
a time-domain pitchshifter with delay lines. If you are reading from file, pvstanal, temposcal and mincer could also do the job.


Victor
On 12 Nov 2011, at 17:06, Andrew Lyons wrote:

Hi,

I'm resurrecting an old system for sound spatialisation after a 10 year rest, and I wanted to quickly survey if there are any new approaches to doppler pitch shifting in Csound besides the pvanal/pvoc approach I used originally. Some requirements:

1./ Ideally I can pitch shift in a single pass - rather than a two stage process. I'd like to pass a pitch control k-rate channel and a sound source, and get a doppler shifted sound back.

2./ The system can't alter the length (time domain) of the audio.

Are there any new ways to do this kind of thing? Thanks!

Cheers

--
=======================================
Andrew D Lyons | Digital Artist | http://www.tstex.com
=======================================

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Date2011-11-12 21:32
Fromjoachim heintz
SubjectRe: [Csnd] doppler shift options
have you tried the doppler opcode?
i haven't used it yet; i just know it's there. perhaps it fits for your
requirements.
best -
	joachim


Am 12.11.2011 18:06, schrieb Andrew Lyons:
> Hi,
> 
> I'm resurrecting an old system for sound spatialisation after a 10 year
> rest, and I wanted to quickly survey if there are any new approaches to
> doppler pitch shifting in Csound besides the pvanal/pvoc approach I used
> originally. Some requirements:
> 
> 1./ Ideally I can pitch shift in a single pass - rather than a two stage
> process. I'd like to pass a pitch control k-rate channel and a sound
> source, and get a doppler shifted sound back.
> 
> 2./ The system can't alter the length (time domain) of the audio.
> 
> Are there any new ways to do this kind of thing? Thanks!
> 
> Cheers
> 
> -- 
> =======================================
> Andrew D Lyons | Digital Artist | http://www.tstex.com
> =======================================


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"

Date2011-11-13 10:14
Frommenno
SubjectRe: [Csnd] doppler shift options
There is also the space/spdist combination. And in the manual there is  an example that uses the doppler effect: http://www.csounds.com/manual/html/spdist.html

but,
Menno

-------------My music-----------------
http://www.jamendo.com/de/album/6789/
http://www.jamendo.com/en/album/7428/
-------------My work-----------------
http://members.home.nl/mag.knevel/


--- On Sat, 11/12/11, joachim heintz  wrote:

> From: joachim heintz 
> Subject: Re: [Csnd] doppler shift options
> To: csound@lists.bath.ac.uk
> Date: Saturday, November 12, 2011, 10:32 PM
> have you tried the doppler opcode?
> i haven't used it yet; i just know it's there. perhaps it
> fits for your
> requirements.
> best -
>     joachim
> 
> 
> Am 12.11.2011 18:06, schrieb Andrew Lyons:
> > Hi,
> > 
> > I'm resurrecting an old system for sound
> spatialisation after a 10 year
> > rest, and I wanted to quickly survey if there are any
> new approaches to
> > doppler pitch shifting in Csound besides the
> pvanal/pvoc approach I used
> > originally. Some requirements:
> > 
> > 1./ Ideally I can pitch shift in a single pass -
> rather than a two stage
> > process. I'd like to pass a pitch control k-rate
> channel and a sound
> > source, and get a doppler shifted sound back.
> > 
> > 2./ The system can't alter the length (time domain) of
> the audio.
> > 
> > Are there any new ways to do this kind of thing?
> Thanks!
> > 
> > Cheers
> > 
> > -- 
> > =======================================
> > Andrew D Lyons | Digital Artist | http://www.tstex.com
> > =======================================
> 
> 
> 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"


Date2011-11-13 11:22
FromVictor Lazzarini
SubjectRe: [Csnd] doppler shift options
I also have these two UDOs that might be handy. They calculate doppler  
and also amp w.r.t. distance.

=====
/* inputs are sig, abs distance, speed of sound */
opcode Doppler,a,aai
asource,adist,ic xin
adist tone adist, 10 ; smooth changes in direction
adel = adist/ic
adump delayr 1 ; max delay
adopp deltap3 adel ; var delay
delayw asource ; delay input
amin init 1 ; min dist 1 m
adist max adist, amin
ampfac = 1/adist
xout adopp*ampfac
endop

/* inputs are sig, distance (0 > left, 0 < right),
speed of sound, max absolute distance */
opcode StereoDoppler,aa,aaii
asource,apos,ic,imax xin
asig Doppler asource,abs(apos),ic
apan = apos/imax
ap1 = (sqrt(2)/2)*(1-apan/sqrt(1+(apan*apan)))
ap2 = (sqrt(2)/2)*(1+apan/sqrt(1+(apan*apan)))
xout asig*ap1, asig*ap2
endop

====
example:

instr 1
ipos1 = p4
ipos2 = p5
ic = 344 ; speed of sound
kenv linen 0.5, .1, p3, .1 ; source sound envelope
asource buzz kenv, p6, 20, 1 ; source sound generator
apos linseg ipos1, p3, ipos2 ; moving the source
imax1 = abs(ipos1)
imax2 = abs(ipos2)
a1,a2 StereoDoppler asource,apos,ic,(imax1 > imax2 ? imax1 : imax2)
outs a1, a2
endin

On 13 Nov 2011, at 10:14, menno wrote:

> There is also the space/spdist combination. And in the manual there  
> is  an example that uses the doppler effect: http://www.csounds.com/manual/html/spdist.html
>
> but,
> Menno
>
> -------------My music-----------------
> http://www.jamendo.com/de/album/6789/
> http://www.jamendo.com/en/album/7428/
> -------------My work-----------------
> http://members.home.nl/mag.knevel/
>
>
> --- On Sat, 11/12/11, joachim heintz  wrote:
>
>> From: joachim heintz 
>> Subject: Re: [Csnd] doppler shift options
>> To: csound@lists.bath.ac.uk
>> Date: Saturday, November 12, 2011, 10:32 PM
>> have you tried the doppler opcode?
>> i haven't used it yet; i just know it's there. perhaps it
>> fits for your
>> requirements.
>> best -
>>     joachim
>>
>>
>> Am 12.11.2011 18:06, schrieb Andrew Lyons:
>>> Hi,
>>>
>>> I'm resurrecting an old system for sound
>> spatialisation after a 10 year
>>> rest, and I wanted to quickly survey if there are any
>> new approaches to
>>> doppler pitch shifting in Csound besides the
>> pvanal/pvoc approach I used
>>> originally. Some requirements:
>>>
>>> 1./ Ideally I can pitch shift in a single pass -
>> rather than a two stage
>>> process. I'd like to pass a pitch control k-rate
>> channel and a sound
>>> source, and get a doppler shifted sound back.
>>>
>>> 2./ The system can't alter the length (time domain) of
>> the audio.
>>>
>>> Are there any new ways to do this kind of thing?
>> Thanks!
>>>
>>> Cheers
>>>
>>> -- 
>>> =======================================
>>> Andrew D Lyons | Digital Artist | http://www.tstex.com
>>> =======================================
>>
>>
>> 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"
>

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





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"