# How to pitch-shift a continuous tone in real time?

**URL:** <https://psychtoolbox.discourse.group/t/how-to-pitch-shift-a-continuous-tone-in-real-time/448>\
**Category:** Uncategorized\
**Created:** [February 29, 2012, 2:21am UTC](https://psychtoolbox.discourse.group/t/how-to-pitch-shift-a-continuous-tone-in-real-time/448 "2012-02-29T02:21:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [February 29, 2012, 2:21am UTC](https://psychtoolbox.discourse.group/t/how-to-pitch-shift-a-continuous-tone-in-real-time/448/1 "2012-02-29T02:21:29Z")

</div>

Hi all,  
  
I'm a long-time listener, first-time caller.  
  
I'm trying to figure out if there's a way to smoothly raise and lower the pitch of a pure tone that is continuously playing (i.e., dynamic frequency sweeps). I'm imagining something that would sound similar to a theremin synthesizer. Ultimately I need the shift of the pitch to be controlled by a mouse or joystick, but first I need to figure out the audio part.  
  
I've been trying to get this to work with PsychPortAudio, but so far I haven't been able to get it to work the way I'm imagining. Does anyone have any suggestions on the best to achieve this?  
  
Thanks in advance.  
  
- Brandon
