i just made a synth which makes some really nice tones when i feed it really high frequencies. (midi notes 150-300)
question is, will this sound the same on all computers, or do different systems handle such high frequencies differently?
Hallo!
i just made a synth which makes some really nice tones when i feed it really high frequencies. (midi notes 150-300)
question is, will this sound the same on all computers, or do different systems handle such high frequencies differently?
Hm ... it depends in the sampling frequency. The frequencies are mirrowed at sr/2, so if the sr is the same it should work (but I haven't tried it ...)
LG Georg
On Thu, 2006-10-26 at 17:59 +0900, hard off wrote:
i just made a synth which makes some really nice tones when i feed it really high frequencies. (midi notes 150-300)
question is, will this sound the same on all computers, or do different systems handle such high frequencies differently?
it will mainly depend on the sampling rate, since i guess, the sounds that you produce contain aliasing artifacts ...
cheers ... tim
-- tim@klingt.org ICQ: 96771783 http://www.mokabar.tk
A paranoid is a man who knows a little of what's going on. William S. Burroughs
Well, first it would depend on the sampling rate that computer uses. Anything over half the sampling rate "wraps around":
http://en.wikipedia.org/wiki/Nyquist_frequency http://en.wikipedia.org/wiki/Nyquist_sampling PD -> 3.audio.examples/C01.nyquist.pd
This wrapping (i.e. foldover) is inharmonic, since it's reflected (i.e. aliased) back down the spectrum at the same rate that our pitch perception goes up it. That's why the tones you hear don't sound as "musical" as the notes would indicate. I'm (not even) guessing that most all the sounds you are hearing are these aliased frequencies, and this would be different depending on the sampling rate, as well as whatever lowpass filters exist in the sound card.
Short answer: yes, aliased frequencies would sound different on different computers, and that's generally why they should be avoided.
If you wanted to reliably synthesize the same result, you could do the math yourself (based on the difference between the frequency you want and your current sampling rate subtracted from that sampling rate), so that you would deliberately produce these aliased frequencies.
best, d.
hard off wrote:
i just made a synth which makes some really nice tones when i feed it really high frequencies. (midi notes 150-300)
question is, will this sound the same on all computers, or do different systems handle such high frequencies differently?
On Thu, 26 Oct 2006, hard off wrote:
i just made a synth which makes some really nice tones when i feed it really high frequencies. (midi notes 150-300) question is, will this sound the same on all computers, or do different systems handle such high frequencies differently?
Every change in your soundcard's sampling rate will make a tremendous difference to how it sounds. Everything that you do with frequencies that high rely on a moiré effect between the sound and the sampling itself.
Putting all your oscillators in a subpatch with a set downsampling or upsampling will shield you from some of the variability from soundcard to soundcard, because 48 kHz and 96 kHz are a power of two away. However, Pd doesn't allow you to correct the difference between 44.1 kHz and 48 kHz, because it isn't a power of two; and generally speaking, because 44.1/48 simplifies as 147/160, any resampling between those two frequencies will be difficult (because it isn't an easy fraction to deal with).
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada
this is a bummer, cos i am getting a really nice palette of sounds here, and i wanted to share the patch////
oh well, i'll stick to normal midi notes for that i guess.
On Thu, Oct 26, 2006 at 10:48:32PM +0900, hard off wrote:
this is a bummer, cos i am getting a really nice palette of sounds here, and i wanted to share the patch////
oh well, i'll stick to normal midi notes for that i guess.
Don't be too bummed out. Given what's been said here I'm not sure exactly how this happened, but I made the types of sounds you're talking about (an [osc~] at +127 midi) and recorded them to a wav file and imported that wav file into a .XM file and then played that .XM file back on a gameboy advance, and it sounded pretty much how it did in the original instance, despite the fact that it was playing back at a different sampling rate and underwent conversions between different sample rates in the process. If I was you I would experiment with your sound on some different systems before giving up. I guess sometimes practice confounds theory.
Best,
Chris.
chris@mccormick.cx http://mccormick.cx
This is as expected. What Chris says is no surprise. If you render the output to a .wav file it is captured as a snapshot and the sample rate no longer has any effect (other than to change the overall playback rate). The problem others were trying to explain is that the synthesis patch is not independent of sample rate, so using the same Pd patch at different sample rates will produce different results. If you're recording it the problem doesn't exist.
What does 100,000Hz sound like? http://www.dsptutor.freeuk.com/aliasing/AliasFrq.htm sr/2 is the Nyquist frequency which for a 44100Hz system is 22050Hz. so 100,000 mod 44100 = 11800Hz which is less than 22050Hz so it doesn't get reflected. If it was, say 30,000Hz then you would actually hear 30,000Hz - 22,050Hz = 7950Hz. Think of sampling like a hall of mirrors where the frequencies get reflected at both ends.
On Thu, 26 Oct 2006 23:27:18 +0800 Chris McCormick chris@mccormick.cx wrote:
On Thu, Oct 26, 2006 at 10:48:32PM +0900, hard off wrote:
this is a bummer, cos i am getting a really nice palette of sounds here, and i wanted to share the patch////
oh well, i'll stick to normal midi notes for that i guess.
Don't be too bummed out. Given what's been said here I'm not sure exactly how this happened, but I made the types of sounds you're talking about (an [osc~] at +127 midi) and recorded them to a wav file and imported that wav file into a .XM file and then played that .XM file back on a gameboy advance, and it sounded pretty much how it did in the original instance, despite the fact that it was playing back at a different sampling rate and underwent conversions between different sample rates in the process. If I was you I would experiment with your sound on some different systems before giving up. I guess sometimes practice confounds theory.
Best,
Chris.
chris@mccormick.cx http://mccormick.cx
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Fri, Oct 27, 2006 at 06:54:27AM +0100, padawan12 wrote:
This is as expected. What Chris says is no surprise. If you render the output to a .wav file it is captured as a snapshot and the sample rate no longer has any effect (other than to change the overall playback rate). The problem others were trying to explain is that the synthesis patch is not independent of sample rate, so using the same Pd patch at different sample rates will produce different results. If you're recording it the problem doesn't exist.
I am not sure if I understand this distinction correctly. If I use Pd at 44100Hz to generate a high frequency wave that aliases, and save it as a 44100Hz wave file, shouldn't that wave file be subjected to different aliasing if I play it back at say 22050Hz? What about if I upsample it to 96kHz? Will the aliasing weirdness disappear if the tone I played was below 96kHz? Or is it somehow baked into the wav file. I think I am out of my depth here.
Chris.
chris@mccormick.cx http://mccormick.cx
On Fri, 27 Oct 2006 10:32:30 +0800 Chris McCormick chris@mccormick.cx wrote:
On Fri, Oct 27, 2006 at 06:54:27AM +0100, padawan12 wrote:
This is as expected. What Chris says is no surprise. If you render the output to a .wav file it is captured as a snapshot and the sample rate no longer has any effect (other than to change the overall playback rate). The problem others were trying to explain is that the synthesis patch is not independent of sample rate, so using the same Pd patch at different sample rates will produce different results. If you're recording it the problem doesn't exist.
I am not sure if I understand this distinction correctly. If I use Pd at 44100Hz to generate a high frequency wave that aliases, and save it as a 44100Hz wave file, shouldn't that wave file be subjected to different aliasing if I play it back at say 22050Hz?
No. It will still be present in the recording at the same frequency relative to everything else. The *whole* sound will shift down as you change the replay sampling rate. As you say it's baked into the file now. If the alias component was at 5000Hz when you recorded it at 44100Hz then shifting down the sample rate will place it at 2500Hz, and of course everything else will also be shifted down by a half.
What about if I upsample it to 96kHz? Will the aliasing weirdness disappear if the tone I played was below 96kHz? Or is it somehow baked into the wav file.
Again, no. It will still be present. There is sometimes ambiguity in the usage of the term "upsample". If you mean *change the sampling rate to 96000Hz* then the recorded aliased signal will shift up in the ratio 96000/44100 (about 2). It's the simple opposite of the previous operation, doubling instead of halving. If it was at 5000Hz before it will be at about 10kHz after.
Sometimes "upsample" means to RE-sample the data at a higher sample rate, which does nothing to improve the quality of the original recording, it's just to make the signal compatible with higher s/r DACs or another process running at 96k further down the chain. Just imagine the stream of data at 44100 and then replace every occurence of a number by two numbers the same and that's what's happening. It's not changing anything except doubling the amount of data needed to represent the signal. This process (should) does not affect the absolute or relative frequency components of the recording.
I think I am out of my depth here.
No way Chris, this is 101 and I know you get it. It's sometimes confusing because the words are overloaded to mean different things at different stages. Take care over the terminology and remember that there are really three universes in digital media. The first is the "compile" time or pre universe where you prepare, write or capture your data/composition/ code. The second is the processing, the runtime computation. And the third is the recording, getting final result - the actual media as a data fixed in stone forever. Sampling theory applies at all points but the effects are different. Only changes in parameters before recording can alter the relativity of components. After that point your alias has become part of the signal and is indistinguishable any another part of the mix.
The issue that Mathieu raises is that of portability prior to recording. For example, if you were to give your Pd patch (which works nicely for you playing back at 44000Hz) to someone who uses a 96k sound system the whole thing will sound completely different. Let's say you had a component at 30kHz. The bandwidth of the channel is 22000 so your component lies outside the allowable range and will alias. You hear an alias at 14kHz (subtract the difference from the top of the band).
Now you play that Pd file back on a 96kHz system, what happens? The bandwidth of the channel is now 48kHz and the 30kHz component is no longer aliased, because it falls inside the bandwidth.
That is very different from the earlier example of playing back a sound *file* at a new rate.
These two are good intros,
http://www.indiana.edu/~emusic/etext/digital_audio/chapter5_nyquist.shtml
http://www.lavryengineering.com/documents/Sampling_Theory.pdf
There is a particularly poor Wiki entry that tries to look clever by jumping straight into maths of complex functions of time - someone needs to rewrite it so it makes sense to normal people.
http://en.wikipedia.org/wiki/Nyquist-Shannon_sampling_theorem
Chris.
chris@mccormick.cx http://mccormick.cx
On 27/10/2006, at 18.57, padawan12 wrote:
These two are good intros,
http://www.indiana.edu/~emusic/etext/digital_audio/ chapter5_nyquist.shtml http://www.lavryengineering.com/documents/Sampling_Theory.pdf
See also chapter 7* and especially section 7.6 in "Music: a
Mathematical Offering". It is available as PDF (called music.pdf)
from the author's website: http://www.maths.abdn.ac.uk/~bensondj/html/
maths-music.html
(* that opens with a fairly funny joke about Bool)