Code a Wavetable Synth with Python in 6 Minutes Tutorial [Synth

  Рет қаралды 18,901

WolfSound

WolfSound

Күн бұрын

✅ Check out the full article & code on TheWolfSound.com: www.thewolfsound.com/sound-sy...
➡️ Wavetable Synthesis theory video: • Wavetable Synthesis Al...
✅ Check out Aalto Acoustics Lab: www.aalto.fi/en/aalto-acousti...
✅ Sign up for WolfSound's newsletter: thewolfsound.com/newsletter/
✅ Please subscribe to WolfSound to let the little Wolf 🐺 grow:
kzbin.info...
🎧 Listen to my music: thewolfofficial.com/
Hi, my name is Jan Wilczek and I am an audio programmer and a researcher. Welcome to WolfSound!
WolfSound's mission is to provide high-quality, informative, and entertaining videos, articles, and courses on how to process sound by exploring mathematics, applying algorithms, and creating code in various programming languages. Topics include sound synthesis, digital signal processing, programming languages for audio (C, C++, Python, Rust), and audio effects. I am also sharing tips on how to learn fast and effectively. Make sure to visit www.thewolfsound.com/.
WolfSound enables everybody to learn about audio programming!
In this video, we are implementing the wavetable synthesis algorithm (a wavetable synthesizer) in Python. We deal with wave table generation, wave table looping, linear interpolation of samples, gain application, fade-in, and fade-out. Ultimately, we obtain a sine generator and a sawtooth generator. To implement the code in this video, you need just Python, a text editor (IDE), and SciPy and NumPy Python packages.
In case of any doubt in understanding, please, refer to the article above or ask a question in the comments 🙂
Note: The gains of the generated sines are not 0 dB and -20 dB respectively. I have adjusted them during editing so that the video is more pleasant to listen to. However, if you generate them with the presented code, you will get the described effect.
ABOUT ME
My name is Jan Wilczek. I am an audio programmer, a researcher, a musician and currently a student of the Elite Master's Study Programme Advanced Signal Processing and Communications Engineering at University of Erlangen-Nürnberg. Additionally, I am a visitng student at Aalto University in Finland, where I put finishing touches on my master thesis under the supervision of prof. Emanuël Habets, prof. Vesa Välimäki, and Alec Wright.
TIME CODES
00:00 Introduction
00:33 Packages import
01:06 Processing parameters
01:34 Wave table generation
02:53 Looping over the wave table
05:38 Storing the output in a .wav file with SciPy's wavfile
06:26 Sine generated with 0th-order interpolation
06:54 Adjusting the gain of the generated signal
07:59 How to reduce noise in wavetable synthesis?
08:34 Linear interpolation implementation
12:43 Sine generated using linear interpolation
13:10 Fade-in and fade-out implementation
15:52 Sawtooth generation
17:48 Summary
#python #synthesis #sound

Пікірлер: 53
@WolfSoundAudio
@WolfSoundAudio 2 жыл бұрын
Have I helped you with this video? If yes, please, consider buying me a ☕ coffee at www.buymeacoffee.com/janwilczek Thanks! 🙂
@iesusdesus5704
@iesusdesus5704 2 жыл бұрын
I was able to make a sawtooth and even a square wave sing Daisy Bell. Thanks so much for the tutorial! :)))))
@WolfSoundAudio
@WolfSoundAudio 2 жыл бұрын
That's awesome, thanks for sharing!
@FleshChopper
@FleshChopper 2 жыл бұрын
Just came across your videos and your blog. Thank you, thank you, thank you! I am a hobbyist and was looking for some sort of organized method of exploring audio coding, and here it is! Wonderful!
@WolfSoundAudio
@WolfSoundAudio 2 жыл бұрын
Thank you for writing that! I love to hear that :)
@DavidMood
@DavidMood Жыл бұрын
amazing . please please make more videos like this
@sanjaux
@sanjaux 9 ай бұрын
Finally following along with these in cmajor and it's been great! These videos are so helpful
@WolfSoundAudio
@WolfSoundAudio 8 ай бұрын
Thanks 🙂
@PeVoNZ
@PeVoNZ 2 жыл бұрын
Really well explained, thank you so much!
@WolfSoundAudio
@WolfSoundAudio 2 жыл бұрын
Thanks a lot!
@JuhinPavithran
@JuhinPavithran Жыл бұрын
Thank you
@spectralknights2
@spectralknights2 2 жыл бұрын
Just found your nice channel. Thanks for the tutorials👍 Pls do more Python audio coding tutorials ☺️
@WolfSoundAudio
@WolfSoundAudio 2 жыл бұрын
Great to hear! Have you seen my latest lowpass/highpass filter in Python video?
@BrianMendoza93
@BrianMendoza93 2 жыл бұрын
Thank you! This tutorial really completes the previous video. It would be a great idea to create an audio course in this format, where you explain the topic and then the code implementation. (C++ or Python)
@WolfSoundAudio
@WolfSoundAudio 2 жыл бұрын
Thanks, Brian! That's a great idea! On which topic would you like to have a course the most?
@streetware-games
@streetware-games 2 ай бұрын
awesome videos
@przekladanki
@przekladanki 2 жыл бұрын
Quel entourage ! :D
@Teddy0567
@Teddy0567 Жыл бұрын
Thank you so much, I used the code in this video to understand the basics, I'm looking to create a simple synthesizer GUI with amplitude sliders for harmonics to mess around with different waveforms, would be nice to visualize the waveform and an EQ as well in real time so I've got myself a challenge!
@WolfSoundAudio
@WolfSoundAudio Жыл бұрын
Awesome, thanks for sharing and good luck!
@Teddy0567
@Teddy0567 Жыл бұрын
@@WolfSoundAudio Thanks for your wishes! I've got most of this now bar the FFT EQ, it's really cool to see the waveform change when adding harmonics. Although each time I play a sound I first generate the whole array for a duration to then be played by the sounddevice library. This has 3 problems; 1: it's monophonic (threads don't work with sounddevice output), 2: there is no option to decide the length of the note by holding a key or button, 3: there is severe input delay as the key is not directly bound to a loop of the wavetable. Have you encountered this problem before and/or have you used library's that allow you to directly connect (midi) input with looping of the wavetable? This would allow me to create amazing additions such as ADSR envelopes.
@TanguyLissenko
@TanguyLissenko 10 ай бұрын
Hello sir, thank you for this video. Could you explain the benefit of the wavetable beside computing the sin function each time ? We still have the problem of being limited in memory in the duration of the waves generated. Or is it not the purpose of a wavetable in the first place ?
@flywittzbeats4008
@flywittzbeats4008 Жыл бұрын
This is amazing, it’s the same complexity, just a fraction of the time. numpy speeds up runtime by converting to machine code right?? Thanks!
@michele709
@michele709 Жыл бұрын
I’m struggling to make a Matrix with the pyo library. What i would like as a result is a wavetable with a “continuous” interpolation among these tables: triangle, saw, square, square with variable duty cicle. Do you have any advice?
@haoheliu1425
@haoheliu1425 2 жыл бұрын
Thank you soooo much! This tutorial save my ass!
@WolfSoundAudio
@WolfSoundAudio 2 жыл бұрын
Haha, glad to hear that!
@SiggeSvahn
@SiggeSvahn 7 ай бұрын
I failed in the language PureBasic to receive SYSEX DUMP from my hardware synth. Have you had any luck doing that in Python?
@sergiomax1607
@sergiomax1607 2 жыл бұрын
how to make a dll vds module for my mulab sequencer station ?
@WolfSoundAudio
@WolfSoundAudio 2 жыл бұрын
I'm sorry, I don't know :(
@illusrecords2674
@illusrecords2674 Жыл бұрын
Just getting into coding pardon this noob question but what program are you using to write this code?
@WolfSoundAudio
@WolfSoundAudio Жыл бұрын
Visual Studio Code :)
@leonardofuegofierro
@leonardofuegofierro 2 жыл бұрын
Well if that isn't a nice workstation. Great video!
@WolfSoundAudio
@WolfSoundAudio 2 жыл бұрын
Thank you! I completely agree :)
@agent007asdfgh
@agent007asdfgh Жыл бұрын
Hi, Do you know how to make modular synthesizer?
@WolfSoundAudio
@WolfSoundAudio 11 ай бұрын
Yes, i do :)
@agent007asdfgh
@agent007asdfgh 11 ай бұрын
@@WolfSoundAudio please make video of coding modular synthesizer
@dirkschiller1637
@dirkschiller1637 Жыл бұрын
Could not find the code on your website nor on github. In minute 18:05 you mention there is code on your website. Maybe you could link it. Thank's a lot!
@WolfSoundAudio
@WolfSoundAudio Жыл бұрын
It's the first link in the description, here you go: thewolfsound.com/sound-synthesis/wavetable-synth-in-python/
@dirkschiller1637
@dirkschiller1637 Жыл бұрын
@@WolfSoundAudio Wow 😮 Didn't see it - fast reader. Thank you a lot 🙏
@WolfSoundAudio
@WolfSoundAudio Жыл бұрын
@@dirkschiller1637 No problem 😉
@taehak
@taehak Жыл бұрын
please do more video python synthesizer please like envelopes and filters and any other thing plsplspls
@WolfSoundAudio
@WolfSoundAudio Жыл бұрын
Sure, I will!
@user-nh7hk9hu9g
@user-nh7hk9hu9g 10 ай бұрын
Could you please tell, why wavetable is 64?
@WolfSoundAudio
@WolfSoundAudio 10 ай бұрын
No particular reason. For lengths that are powers of 2, you can do the index wraparound using a bit mask instead of the modulo operation, which is faster.
@user-nh7hk9hu9g
@user-nh7hk9hu9g 10 ай бұрын
@@WolfSoundAudio thank you!
@agent007asdfgh
@agent007asdfgh 12 күн бұрын
Hi
@pedrozuniga8296
@pedrozuniga8296 2 жыл бұрын
rajate con el código pa la otra sipo
@WolfSoundAudio
@WolfSoundAudio 2 жыл бұрын
¿Para qué? No entiendo.
@OMNI_INFINITY
@OMNI_INFINITY Жыл бұрын
Watching a software engineering video posted by a guy that can’t count. How many minutes?
@CHITUS
@CHITUS 2 жыл бұрын
Quel entourage ! :D
Wavetable Synthesis Algorithm Explained [Synth #001]
27:40
WolfSound
Рет қаралды 12 М.
Nastya and SeanDoesMagic
00:16
Nastya
Рет қаралды 33 МЛН
Gym belt !! 😂😂  @kauermtt
00:10
Tibo InShape
Рет қаралды 17 МЛН
Пранк пошел не по плану…🥲
00:59
Саша Квашеная
Рет қаралды 6 МЛН
I Generated Guitar Audio in python using NUMBA
31:06
Mr. P Solver
Рет қаралды 25 М.
Top 5 Languages For Audio Programming
15:46
WolfSound
Рет қаралды 7 М.
Anna Wszeborowska - Processing music on the fly with Python
24:27
Epic Python Videos
Рет қаралды 67 М.
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 390 М.
Practical Guide to Optimized High-Quality Wavetable Oscillators - Matt Tytel - ADC21
47:17
ADC - Audio Developer Conference
Рет қаралды 4,6 М.
Lessons Learned from a Decade of Audio Programming
26:14
Where Does Bad Code Come From?
42:21
Molly Rocket
Рет қаралды 187 М.
Nastya and SeanDoesMagic
00:16
Nastya
Рет қаралды 33 МЛН