I want to generate a fundamental wave and its 12 th harmonic from a recorded fundamental wave so cannot use the tone generator. To show what I mean i attach the same thing done with a 100 Hz sine tone and a 1200 Hz sine tone. Then I want it accurate enough to loop and play both together.
So basically I will record my sound (arbitrary not a sine) and open in Audacity and pick 1 cycle of the waveform and paste into one track. If this was 100Hz it should give me 441 samples at 44100 rate. I then want to from this track generate another track having 12 cycles (of track1 not 12cycles of recording) and still 441 samples ( I assume ) as both will be played in same loop. Its OK if each track has different rate as long as they loop together. I have tried various options of resample and cutting and paste but cannot get both tracks same length etc.
I will be recording a continuous sound, several seconds long.
I will open in Audacity, play it and view the waveform. I will pick an area that is most real or representative of the sound sample and pick one cycle of the wave and paste it into a new track in Audacity. This will give me 1 cycle only of the wave, I can then close the original recording.
I then want to generate a higher harmonic of this 1 cycle wave ( in this case 12 times the freq. so twelve cycles within the same 1 cycle time ) so that both can be looped and played together.
I understand my low freq. recording may contain some lower freq. harmonics but I think also of low amplitude so not to interfere too much.
My orig. post probably showed awkward number so to simplify I tried again using multiples of 12 etc. using the audacity tone to generate the base fundamental. I used 122.5 Hz giving 360 samples for the base 1 cycle wave and so the 12th harmonic will have 30 samples each cycle to give total of 360 to match length of fundamental.
So my sequence was…
Generate the base tone in track1 at 44100 rate giving 360 samples.
Change Project Rate to 44100 x 30 / 360 = 3675 rate. samples per second.
Select and copy track1.
Add new mono track as track2… it opens as track2 rate 3675
Paste in track1 from clipboard. It shows up as 30 samples but is 1 sample distance short of the waveform in track 1.
Select track2, then Effect, Repeat 11 times (it says total will be 360) to put in the 11+1 cycles.
Change the Track2 rate back to 44100 and all 12 fit “roughly” within the length of Track1 but not exactly and do not loop well together to play.
I may need to “play” about with the numbers but is this the procedures to follow or is there a better way to do it…??
Thanks Steve for reply… Yes that is “Magic”. It works exactly. After step 3 Change speed I had to Effects, Special, Repeat, enter 11 times, then Edit, Join then clips. The sample length was still 360 and the loop played smoothly…great.
I can also use this method to simply change the number of samples in a wave if I want to fill a buffer or an Array instead of the cut and paste I describes earlier post. so If I want to change from 360 samples to say 512 samples 512/360 = 1.4222 and use this factor.