File:Sinc.wav
From LaTeX CAS translator demo
Jump to navigation
Jump to search
Sinc.wav (file size: 517 KB, MIME type: audio/wav)
This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.
Summary
DescriptionSinc.wav |
English: A three-second fragment of the sinc function as audio (three seconds at 44100 Hz; Blackman window applied; frequency 2000 Hz).
Generated by the following Python code. import math import wave import struct # The sinc function. def sinc(x): return math.sin(x) / x if not x == 0.0 else 1.0 # The Blackman window. def blackman(length, i): t = i / (length - 1) return 0.42 - 0.5 * math.cos(t * math.pi * 2.0) + 0.08 * math.cos(t * math.pi * 4.0) # Windowed-sinc function. def windowed_sinc(length, frequency): output = [] for i in range(length): sinc_phase = i - (length - 1) / 2 output.append(sinc(sinc_phase * frequency * math.pi * 2.0) * blackman(length, i)) return output SAMPLE_RATE = 44100 DURATION = 3 FREQUENCY = 2000.0 with wave.open("sinc.wav", "w") as wavfile: wavfile.setnchannels(2) wavfile.setsampwidth(2) wavfile.setframerate(SAMPLE_RATE) for sample in windowed_sinc(SAMPLE_RATE * DURATION, FREQUENCY / SAMPLE_RATE): wavfile.writeframes(struct.pack("<h", int(sample * 32767)) * 2) |
Date | |
Source | Own work |
Author | SopaXorzTaker |
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Items portrayed in this file
depicts
some value
12 September 2020
audio/wav
529,244 byte
3 second
aa9b289e7135f471390453a7a8f8673b38695fdb
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Dimensions | User | Comment | |
---|---|---|---|---|
current | 15:53, 12 September 2020 | (517 KB) | wikimediacommons>SopaXorzTaker | Cross-wiki upload from en.wikipedia.org |
File usage
The following page uses this file:
Retrieved from "https://tpami.wmflabs.org/w/index.php?title=File:Sinc.wav"