Tool for fine tuning left vs right tone generator

Greetings,

I have a programming request. I’d like to have the ability to generate slightly different tones in the left and right channels.

It is possible to do this manually, by having a full-left mono track, and a full-right mono track, and use the tone generate tool to, for example, set the left channel to 440 Hz, and the right channel to 428 Hz.

If it’s possible, I’d like to have a slider, which allows me to adjust the pitch of the generated tone down-and-up about -/+ 10%, (say -/+ 40 Hz, when centered around 440), in real-time. Yes, in real-time. (Sine wave is fine).

Why in the world would someone want to do this?

Psychoacoustics: one symptom of sudden sensorineural hearing loss (SSNHL, a real thing!) is for a person to hear a slightly different pitch in the left ear vs the right ear, even when both ears are “fed” the same pitch in Hz.

Having a tool to “slide” adjust the pitch of a track in real-time in Audacity would be very helpful – e.g., setting the left ear to a reference pitch (e.g., 440), and using the pitch slider for the track for the right ear, to adjust the pitch to allow a subjective matching of frequencies.

Note that this is a psychoacoustic matter – a subjective call, when the two pitches sound in tune (when, in fact, one channel has been adjusted to match the other, so they sound like the same frequency).

This is a concrete example of a reason for this tool – a gizmo in Audacity that would be useful for diagnostics in hearing.

I imagine such a tool would also be helpful for micro-tuning two separately recorded tracks, on the fly, so to speak – without having to resort to the effect “change pitch …” and adjusting whole tracks by trial and error.

I envision a tool that might show up in the left side of each track, under the “- … +” volume slider and “L … R” channel slider. This would be a big change in the layout, possibly, so a stand-alone tool might be more appropriate, and more easy to create, of course.

Is such a tool possible? For the acoustic test, it would be very handy to able to set both left and right channels through the standard audio test frequencies of (Hz) 125, 250, 500, 1000, 2000, 4000, and 8000; but also, for musicians, to choose to compare to multiples of standard octaves, say 110, 220, 440, 880, 1760, etc … up to as high as 16000 Hz or so.

This tool might also make it possible to measure individually perceived “octave stretches” – i.e., most people will hear 1760 as slightly flat relative to an octave lower at 880. Piano tuners call the need for making this adjustment “stretch”, and good tuners will purposefully tune 1% to 2% higher with each increasing octave (1% to 2% lower, with decreasing octaves).

Anyway, this is a serious request. Anyone out there have the skillset to develop a tool which allows micro-frequency adjustment of a single channel in real time?

Thanks much. Gotta say, Audacity is the best.

(If there’s a better forum for this request, please let me know, or feel free to move this request there. Thanks.)

I’m thinking you should be able to do this. Audacity’s built-in pitch effect does not currently work in real-time, but you should be able to locate some effects that are.

I just did a google search on “free download pitch shift effect” and it appears there may be dozens of pitch shift effects you could use.

Interesting. Do you know if plug-ins like this work in Audacity, or will it take using a full DAW (digital audio workstation) to find a plug-in and implement this?

I’m not sure how to identify plug-ins that can work with Audacity, or how to incorporate an external plug-in into Audacity.

If there is a way to do this, can you point me to a tutorial or other documentation to help walk me through the process?

Thanks.

That sounds similar to generating binaural beats.
There’s an Audacity plugin for that … https://plugins.audacityteam.org/nyquist-plugins/generator-plugins/special-effect-generators#binaural-tones-with-surf-2

Here is a guide: https://plugins.audacityteam.org/

For sine tones, you could select part of a stereo track, and then run this code in the “Nyquist Prompt” effect (in the Tools menu):

(vector (hzosc 440) (hzosc 428))
  • The vector command says to create a vector / array (stereo tracks are treated as an array of two sounds).
  • (hzosc 440)generates a 440 Hz sine wave in the first (Left) channel.
  • (hzosc 428) generates a 428 Hz sine wave in the second (Right) channel.

The generated waves will be full scale (full track height). If you want them at a lower level, you can “multiply” by a fractional value. For example, for a peak amplitude of 0.8:

(mult 0.8 (vector (hzosc 440) (hzosc 428)))

The generated wave will be the same length as the selection.

All good suggestions, thank you.

I should clarify that the primary function I am looking for in a software tool in Audacity is helping to identify the discrepancy in frequencies heard between the left and right ear, and not generating a model once the frequency discrepancy is known.

I envision using headphones to feed one frequency (from one track) to the left ear, and another frequency (from another track) into the right ear.

Initially, the frequency in each track would be the same. For some folks with SSNHL (sudden sensorineural hearing loss), these would be heard as measurably different frequencies.

A frequency slider for (say) the right ear would be adjusted manually by the individual until the pitches sound the same (in tune) to him or her.

After this (subjective) adjustment is made, the frequency for each channel would be read, to determine the discrepancy.

It is possible to identify this discrepancy with the tone generator tool in Audacity, but the number of steps and process is pretty involved. In a new project:

(1) create track 1, mono, set full left, generate a 30 second tone at (say) 440 Hz

(2) create track 2, mono, set full right, generate a 30 second tone at 440 Hz

(3) listen, using headphones, to both tracks

(4) using “mute” and “solo” on the tracks, determine if the right ear track (track 2) sounds sharp or flat (a subjective judgement)

(5) select track 2, (the right ear’s track), and delete the generated tone

(6) generate a new tone for the right ear (track 2), guessing a frequency that will sound in tune when this new frequency is compared with the left ear in track 1

(7) make a note of the frequencies for each track

(8) repeat steps (3) through (7) until the tracks sound in tune, and the frequency discrepancy is identified

——

Steps (5) through (7) could be simplified through the use of a software plug-in (for example) that utilizes a slider (with numeric display of the frequency), instead selecting and deleting a track’s content, and having to access the menu to generate a new candidate frequency.

——

Sorry if this description seems so long-winded. But a tool like this in Audacity would be very helpful for patients with SSNHL.

Thanks for your patience, help, and continued suggestions.

Steve - thanks, I’ll look into this.

If you use a stereo track, you could simply pan from side to side with the track’s “Pan” slider.

If the Nyquist code that I posted is useful, there’s a couple of improvements that I could suggest. Let us know how you get on.

This topic was automatically closed after 30 days. New replies are no longer allowed.