Csound Csound-dev Csound-tekno Search About

Fwd: [Csnd] hrtfmove2 questions

Date2013-10-15 23:17
FromVictor Lazzarini
SubjectFwd: [Csnd] hrtfmove2 questions
Here are some answers

Begin forwarded message:

From: Brian Carty <bmcarty@gmail.com>
Date: 15 October 2013 22:44:32 GMT+01:00
To: Victor Lazzarini <Victor.Lazzarini@nuim.ie>
Subject: Re: [Csnd] hrtfmove2 questions

hi Victor!

I hear good things from your new MA student! he is really enjoying it.
I hope you are well...I am still trying to fix this app, may be on to you soon about it!

In answer:
1. the max elevation is 90 degrees, directly above the listener. The minimum of -40 implies the restriction of the floor in a typical listening environment. Note that we are less sensitive to elevation than azimuth changes 'by design'!
2. I find using line type opcodes easiest for changing azimuths, so a line from 0 to 360 will imply a full clockwise spin, from 0 to -360 a negative etc...with a suitably scaled triangle wave, I suppose a negative amp would have the same effect.
Let me know if examples would help.



On 15 October 2013 21:22, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:


Begin forwarded message:

From: Dave Seidel <dave.seidel@gmail.com>
Date: 15 October 2013 20:30:27 GMT+01:00
Subject: [Csnd] hrtfmove2 questions

1. The manual stats that the minimum value for elevation is -40. What is the maximum?

2. When I use an LFO (triangle wave) to modulate the azimuth, the apparent direction of the sound movement is clockwise (if the listener is at the center of the clock, facing the "12:00" position, which is azimuth 0). How would I make the azimuth move in a counter-clockwise direction?

Thanks,
Dave

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
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




Date2013-10-15 23:48
FromDave Seidel
SubjectRe: [Csnd] hrtfmove2 questions
Thanks Victor (and Brian!), very helpful.


On Tue, Oct 15, 2013 at 6:17 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Here are some answers

Begin forwarded message:

From: Brian Carty <bmcarty@gmail.com>
Date: 15 October 2013 22:44:32 GMT+01:00
To: Victor Lazzarini <Victor.Lazzarini@nuim.ie>
Subject: Re: [Csnd] hrtfmove2 questions

hi Victor!

I hear good things from your new MA student! he is really enjoying it.
I hope you are well...I am still trying to fix this app, may be on to you soon about it!

In answer:
1. the max elevation is 90 degrees, directly above the listener. The minimum of -40 implies the restriction of the floor in a typical listening environment. Note that we are less sensitive to elevation than azimuth changes 'by design'!
2. I find using line type opcodes easiest for changing azimuths, so a line from 0 to 360 will imply a full clockwise spin, from 0 to -360 a negative etc...with a suitably scaled triangle wave, I suppose a negative amp would have the same effect.
Let me know if examples would help.



On 15 October 2013 21:22, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:


Begin forwarded message:

From: Dave Seidel <dave.seidel@gmail.com>
Date: 15 October 2013 20:30:27 GMT+01:00
Subject: [Csnd] hrtfmove2 questions

1. The manual stats that the minimum value for elevation is -40. What is the maximum?

2. When I use an LFO (triangle wave) to modulate the azimuth, the apparent direction of the sound movement is clockwise (if the listener is at the center of the clock, facing the "12:00" position, which is azimuth 0). How would I make the azimuth move in a counter-clockwise direction?

Thanks,
Dave

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie





Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie





Date2013-10-16 04:12
FromDave Seidel
SubjectRe: [Csnd] hrtfmove2 questions
Here's the UDO I've been working on that uses hrtfmove2 to make an audio signal sound as if it's rotating around the listener's head (requires headphones). Comments and suggestions welcome.

It takes four arguments: audio signal, speed, direction (default: 0), phase (default: 0). The "speed" arg is cycles per second. The "drection" arg should be 0 for clockwise, anything else for counter-clockwise. The "phase" arg is the starting phase of the triangle wave that modulates the azimuth, so a float between 9 and 1 (inclusive). This is set up for a 96 kHz sample rate; for 44.1 or 48, you need to changes the names of the data files (which must be located in SADIR or the current directory). 

opcode bi_spinner, aa, aioo

  asig, ipfrq, idir, iphs xin

  ; direction (positive == clockwise, negative == counter-clockwise)
  iamp = (idir == 0 ? 360 : -360)

  ; triangle table (0-1)
  itri              ftgenonce   0, 0, 16384, 7, 0, 8192, 1, 8192, 0

  ; modulating triangle wave
  kAz            poscil3       iamp, ipfrq, itri, iphs
  
  aLeft, aRight hrtfmove2   asig, kAz, 0, \
                                     "hrtf-96000-left.dat", "hrtf-96000-right.dat", \
                                     4, 9.0, sr

  xout aLeft, aRight

endop


On Tue, Oct 15, 2013 at 6:48 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
Thanks Victor (and Brian!), very helpful.


On Tue, Oct 15, 2013 at 6:17 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Here are some answers

Begin forwarded message:

From: Brian Carty <bmcarty@gmail.com>
Date: 15 October 2013 22:44:32 GMT+01:00
To: Victor Lazzarini <Victor.Lazzarini@nuim.ie>
Subject: Re: [Csnd] hrtfmove2 questions

hi Victor!

I hear good things from your new MA student! he is really enjoying it.
I hope you are well...I am still trying to fix this app, may be on to you soon about it!

In answer:
1. the max elevation is 90 degrees, directly above the listener. The minimum of -40 implies the restriction of the floor in a typical listening environment. Note that we are less sensitive to elevation than azimuth changes 'by design'!
2. I find using line type opcodes easiest for changing azimuths, so a line from 0 to 360 will imply a full clockwise spin, from 0 to -360 a negative etc...with a suitably scaled triangle wave, I suppose a negative amp would have the same effect.
Let me know if examples would help.



On 15 October 2013 21:22, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:


Begin forwarded message:

From: Dave Seidel <dave.seidel@gmail.com>
Date: 15 October 2013 20:30:27 GMT+01:00
Subject: [Csnd] hrtfmove2 questions

1. The manual stats that the minimum value for elevation is -40. What is the maximum?

2. When I use an LFO (triangle wave) to modulate the azimuth, the apparent direction of the sound movement is clockwise (if the listener is at the center of the clock, facing the "12:00" position, which is azimuth 0). How would I make the azimuth move in a counter-clockwise direction?

Thanks,
Dave

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie





Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie