Problem for tuning a sample

Hello community. Any suggestions for measuring the “pitch” of a sample (or at least its fundamental frequency) in VCV Rack? This would allow me to then determine the CV value to send to the “Tune” input of a sample player (in this case, the Lomas Sampler) so that the original sample, whose pitch I know, is transposed to its new desired pitch. I don’t see any way…except by ear, which is neither reliable nor rational. Since the sample is an audio signal, Hot Tuna , for example, (logically) outputs a whole range of frequencies. Using an analyzer hasn’t provided me with a solution either. Thank you in advance for your help.

Hot Tuna, and my own Sapphire Env (whose pitch detector is based on the same idea) work by observing how much time it takes for the input signal to repeatedly cross though 0V. The wavelength in samples is converted to a volt-per-octave pitch signal. This works best for inputs where the fundamental frequency is significantly stronger than noise and harmonics.

This approach completely falls apart when there are too many conflicting frequencies in the input affecting the voltage so strongly that you end up with V/OCT jitter/warble at best, total chaos more often.

Rather than trying to find a better pitch detector, you might have better luck pre-filtering your input with a lowpass filter or bandpass filter. You can also tinker with filter resonance near the range of frequencies you expect to detect. If you can make frequencies outside your intended pitch range weaker, you will get better results.

I hope this helps!

2 Likes

Two suggestions:

  1. if you know the pitch, and you know the pitch you want, surely you can use arithmetic to figure out what CV you need to get there?

  2. Use any decent tuner. I use guitar tuners on my iPad, and I have a dedicated hardware unit. I assume there is a decent tuner in VCV, but if not there are tons of VST ones and other formats.

Trying to use a spectrum analyzer or a tuner that can’t do the job you require will never work. Oh, and instead of “decent” I should say “decent guitar tuner”, or “tuner that can find fundamentals even when harmonics are higher in level”.

Thanks to Cosinekitty and Squinky for taking the time to answer me. In the end, I’ll choose the most energy-efficient solution and also the easiest to implement (a solution I hadn’t thought of!!): an external tuner works very well. As Squinky says, tuners are plentiful on the internet. I tried it, and it works pretty well. However, I don’t think the calculation allows me to access the offsets needed to transpose the samples with a player: since they’re wave files, they don’t comply with the 1V/oct standard. So, starting with the original sample, I gradually increase the voltage sent to the sampler until the tuner reads the note I want. It’s a rather crude method… but as long as it works, it’s fine for me. Thanks again.

3 Likes

Huh? That’s the way it’s been done for centuries. Were those old guys with white wigs so wrong?

I just loop the sample, patch a sine or saw vco, and start turning the offset knob until my ear says it fits.

Maybe by this method I have landed on the “fundamental”. Maybe I landed a 5th up. Maybe there is no fundamental exactly. The noiser or more resonant your sample, the more there is not really a fundamental. So it is a matter of choice, and relying on your ears is the best thing as soon as you get into a grey area. Everything we do in VCV is ultimately for the ears, right?

1 Like

sure, some people can tune by ear. Other’s can’t. That’s why so many people have tuners…

My grandmother didn’t have a washing machine. That doesn’t mean my wife goes to the river to do her washing, as has been done for centuries… Of course, you can always tune by ear. But since there are devices that tell me what note I’m hearing, I see no reason to do without them. Similarly, to transpose up an octave, I could start turning the offset knob until my ear tells me it’s right… Nevertheless, I find that adding a one-volt offset is more practical, faster, and less subject to interpretation on my part, which could unknowingly introduce a detuning that a more “experienced” ear than mine could detect.

Some samplers/players do have a v/oct input (check out Sickozell for example) and should tune your sample correctly. To check it and to get it perfect, you can temporarily replace your sample with a simple sine wave sample with the same pitch as the fundamental of your sample, and check that with a tuner. Hell of a workaround, I know, but at least you know it will be correct.

I took a look at the SickoPlayer module. It actually has several interesting features that I hadn’t noticed, particularly the tuning and cross fading capabilities. Thank you very much for this interesting suggestion.

1 Like

Nah, I think you can teach anyone to tune by ear. And in an era of incessant waymos outside my doorstep, I think everyone should be taught to drive a stick shift as well. #curmudgeonlife

2 Likes

12ET is not rational either. It is entirely arbitrary, and out of tune with the natural harmonic series.

Tuning is such a key part of a musician’s expressive toolkit. Why farm it out to an app? If it sounds good it is good, regardless of what the tuning app says.

Tuning by ear is how you go really deep. It’s how you find those magical resonances the tuning app is trying to hide from you.

4 Likes

This is an interesting take, and it makes me think of my own interest in alternative tuning systems. I don’t just mean fixed systems like 24 tones per octave or 13 notes per tritave, but also blue notes in jazz, and microtuning in general.

I am completely a beginner to music theory, but it’s just so much fun to put a VCA in series after the quantizer V/OCT output and turn it down to 98.5% or something like that, and hear dull sequences suddenly become full of life and weirdness.

3 Likes

And to add to this: something sounding in tune also has a lot to do with the balance (amplitude). I performed a lot of music (also in different scales and microtonal) where the playing softer or louder makes all the difference. You can have all pitches be in tune, but colour it by playing with the relative amplitudes.

4 Likes

This is a keen observation. Tuning, amplitude, and timbre are very closely related. A major third–when played at the high end of the tuning range for that note–will sound brighter than when played at the lower end.

A sustained note played on a wind instrument will usually increase in pitch as the amplitude increases, and begin to seem brighter in tone as it gets louder. Experienced players with good intonation can keep the pitch steady by adjusting the embouchure, but this will also change the tone.

This means that relinquishing control of tuning to an app also mean relinquishing some degree of organic control over timbre.

1 Like

I didn’t expect a simple, purely technical question to provoke such a “media frenzy”… All the opinions expressed here (some, no doubt, by great musicians) are certainly honorable. But let’s not lose sight of the fact that VCV Rack users are not necessarily all “experienced musicians with good intonation.” So, please, if these users (simply for hobby purposes, like me…) want “electronic” aids to assist them in tuning notes, please grant them this freedom without cutting off their heads. Perhaps one day, I’ll take a deeper look at all this and then take the time to “philosophize.” For now, let me just… have fun with VCV Rack.

1 Like

Two Three things can be true at the same time:

• Nobody wants to stomp on your fun!

• In a creative realm (such as VCV) there is very rarely a “purely techincal” question.

• You couched your question in the frame of an opinion, and therefore got a lot of opinion in the comments. This (in my opinion!) is not a bad thing.

So now let’s all go have fun!

3 Likes

Tuning aids are very useful! I doubt anyone disagrees with that. I would guess we all use them to some extent, at least for reference notes or quantizing.

My only point of disagreement is OP’s initial suggestion that tuning by ear is irrational. Developing the ability to tune by ear is a key aspect of developing as a musician, and brings rewards almost unimaginable until you’ve experienced it.

The most magical reward is the discovery that sometimes a note that is out of tune with 12et actually sounds a lot better and really improves your music.

3 Likes

Well, the story continues (I naively thought everything had been said…) : I never claimed that, generally speaking, tuning a musical instrument by ear is irrational. Especially since that’s what I do myself for my guitar (not being a very experienced guitarist and not having perfect pitch, I use a tuning fork…don’t blame me). That being said, let’s now put things back in their original context: my question was asked strictly within the context of developing a utility patch structured, in particular, around a sample player. Not knowing how to make sample pitch detection automatic, it seemed (and still seems) illogical to tell a potential user of the patch in question: “There’s just one small detail: if you want to use it and transpose a sample, you’ll first have to figure out how to judge its pitch by ear.” I hope I’ve cleared up any misunderstandings here. In any case, I promise that in the future, before publishing my posts, I’ll submit them to a committee of experts for approval to ensure I don’t offend anyone.

There was absolutely nothing wrong with your post. Sometimes they just go on a wild tangent (as is the case here). I can assure you that someone, sometime will have exactly the same question, and will find the answer here. That’s what makes these posts so useful, and there is no wrong question.

Tune by ear, or do it logically, or don’t tune at all, it doesn’t matter, as long as you get the results you want.

4 Likes

Sorry I offended you my brother. I just like talking about tuning. I mean no ill will.

1 Like