PyExplained
PyExplained
  • 25
  • 69 061
Autotune using Python & How Pitch Correction Works
I’ve done a lot of different projects on this channel: from making a particle simulator and a rendering engine to developing AI systems. But there was one obvious project missing: something with sound. That’s why I challenged myself to make autotune using Python (and pitch correction was a lot more complex than what I imagined). Now, I could’ve just Googled an existing algorithm for tuning audio samples, but I wanted to come up with my own. So, in this video, I’m going to show you how I made my version of autotune and how you can use it too!
Timestamps:
00:00 Intro
00:33 Basics of sound
01:19 Generating a spectrogram
02:27 Reverting the spectrogram
03:20 Calculating the dominant frequencies
04:04 Pitch correction
04:44 Finished application
06:46 Outro
You can download the code from the GitHub repository:
github.com/PyExplained/Autotune-using-Python
Music:
Deliberate Thought by Kevin MacLeod is licensed under a Creative Commons Attribution 4.0 licence. creativecommons.org/licenses/by/4.0/
Source: incompetech.com/music/royalty-free/?keywords=deliberate+thought
Artist: incompetech.com/
#python #programming
มุมมอง: 4 046

วีดีโอ

I Made an AI Develop Its Own Language!
มุมมอง 6632 ปีที่แล้ว
Can an AI create its own language? I thought it would be an interesting experiment to see if I could make an AI do just that. The results were quite surprising to me and I bet you’ll find them just as interesting. So in this video, I’ll show you the results and walk you through how I got there. Timestamps: 00:00 Intro 00:33 The goal 01:06 Preprocessing 02:04 Creating the model 03:52 Training 06...
Particle Simulator in Python (Rigid Bodies, Soft Bodies, Fluid and More!)
มุมมอง 40K3 ปีที่แล้ว
For the past few weeks, I’ve been working on a particle simulator, in which particles follow some simple rules that are similar to the way molecules interact. From these rules, more complex behavior can emerge. Springs, fluid, soft-bodies, breakable buildings and tearable cloths... you can simulate all of this and more using the simulator! It also has a handy GUI that allows you to easily edit ...
Raytracing in Python: Shading, Reflection, Refraction, Fog and More!
มุมมอง 7K3 ปีที่แล้ว
The graphics in many modern games look very similar to real life. This is often because they are using something called ray tracing. In this video, I'll show you how I created my own ray tracer in Python and how you can too! I'll give you an in-depth explanation about intersections, shadows and highlights, refraction, reflection, volumetric lighting, and more, as well as the potential problems ...
Python RayTracer: Sneak Peek!
มุมมอง 4883 ปีที่แล้ว
For the past month, I've been working on a personal project: a raytracer using Python. Shadows and highlights, reflection and refraction, volumetric lighting... You name it, it's in there! That's why I made this little compilation of what it can do to show it off. I hope you enjoy it! Explanation video: th-cam.com/video/WWJgrftx6MQ/w-d-xo.html Code: github.com/PyExplained/3D-Renderer/tree/maste...
50 Subscriber Special!
มุมมอง 1303 ปีที่แล้ว
Wow! In less than 24 hours after the previous video came online, you guys managed to make my channel reach 50 subscribers! That's why this video is a 50 subscriber special. It might not seem like a lot, but knowing that people are interested in watching my videos, brings a smile to my face. So, thank you! But it doesn't stop there. This video is not only the 50-sub-special, but also the 20th vi...
How to Make an AI that can Play Games | Q-learning Explained
มุมมอง 1.9K3 ปีที่แล้ว
Have you ever seen these AI’s beating humans in chess? If so, it was probably done using reinforcement learning. In this video, we'll take a closer look at one of the most popular reinforcement learning algorithms: Q-learning. This video will give you more intuition about how punishment and reward can be used to train an agent to adapt to an environment. Don't worry if you don't know what any o...
Randomness
มุมมอง 1173 ปีที่แล้ว
When we say: “That’s random”, in everyday life, we usually mean that we didn’t expect something to happen. Like when someone suddenly says something that’s completely out of context in a conversation. But what is true randomness? Does it exist or is everything predetermined? In this video, I talk about that and more. If you haven't already, please take a minute to fill in the form to help my ch...
How to Make Better Tkinter Buttons? | Tkinter Tutorial
มุมมอง 8K4 ปีที่แล้ว
If you have ever done something with GUI in Tkinter, you probably know what the default button looks like. It’s grey, rectangular and it doesn’t give a lot of feedback. It’s boring. That’s why today I’m going to show you how to make your Tkinter buttons look many times as awesome. I'll show you how to make it round, use images, make the image change when pressed and way more. Link to GitHub rep...
What Do YOU Want?
มุมมอง 584 ปีที่แล้ว
What do YOU want? What kind of videos are you interested in? Let me know in the form: forms.gle/F9ETJYRtyNVfMKqz7 Music: Readers! Do You Read by Chris Zabriskie is licensed under a Creative Commons Attribution-license (creativecommons.org/licenses/by/4.0/) Source: chriszabriskie.com/reappear/ Artist: chriszabriskie.com/
FaceSwap Using Deepfakes! | AutoEncoders and Deepfakes Part 2/2
มุมมอง 4494 ปีที่แล้ว
In this video, I explain how deepfakes work. The explanation is made easy to understand using animations. I even made my own deepfake and at the end of the video, I show you my results. If you have any questions, let me know in the comments. Timestamps: 00:00 - Explanation 02:26- Showing Results Datasets: Faces Dataset: mmlab.ie.cuhk.edu.hk/projects/CelebA.html Cat Dataset (photo at the end): g...
This AI Can Generate Faces! | AutoEncoders Part 1/2
มุมมอง 4994 ปีที่แล้ว
In this video, I show you the AI that I made that can generate human faces and more! This is done with an autoencoder and PCA (all in Python, using Tensorflow). In the first half of the video, I explain how it works and at the end, I'll show you everything in action. The explanation is made easy to understand using animations. If you have any questions, let me know in the comments. Timestamps: ...
The Example Scene | 3D Renderer Tutorial #2
มุมมอง 1334 ปีที่แล้ว
This video is a short one, I'll just show what you can do with the example scene and how to set it up. This is the link to the GitHub-repository: github.com/PyExplained/3D-Renderer Music: Royalty-free music from www.fesliyanstudios.com #python #programming
How to Install the 3D Renderer? | 3D Renderer Tutorial #1
มุมมอง 1944 ปีที่แล้ว
In this tutorial, I will show you how you can install the renderer and the modules that you need. It should take 5-10 minutes to install everything including modules. These are the commands: pip install trimesh pip install opencv-python pip install numpy pip install matplotlib If these give an error, you can reinstall Python and make sure you add pip to the command-line. This is the link to the...
Lights, 3D Models and more! | 3D Renderer Devlog #2
มุมมอง 1344 ปีที่แล้ว
Lights, 3D Models and more! | 3D Renderer Devlog #2
First-Person View 3D Renderer using Python | Devlog #1
มุมมอง 1.2K4 ปีที่แล้ว
First-Person View 3D Renderer using Python | Devlog #1
Sine, Cosine and Tangent: How to use it? & How can you Visually Program with it? | Visual Math
มุมมอง 3094 ปีที่แล้ว
Sine, Cosine and Tangent: How to use it? & How can you Visually Program with it? | Visual Math
Physics Simulator: Huge Update! | Devlog #3
มุมมอง 3154 ปีที่แล้ว
Physics Simulator: Huge Update! | Devlog #3
14 Cool Python Projects in 8 Minutes!
มุมมอง 4374 ปีที่แล้ว
14 Cool Python Projects in 8 Minutes!
Physics Simulator: Bug Fixes and GUI | Devlog #2
มุมมอง 1304 ปีที่แล้ว
Physics Simulator: Bug Fixes and GUI | Devlog #2
Making a Physics Simulator | Devlog #1
มุมมอง 2954 ปีที่แล้ว
Making a Physics Simulator | Devlog #1
Tutorial #1: Image Animations using Python and Tkinter
มุมมอง 1.9K4 ปีที่แล้ว
Tutorial #1: Image Animations using Python and Tkinter
Evolution Part 2 - Projects
มุมมอง 824 ปีที่แล้ว
Evolution Part 2 - Projects
Evolution Part 1 - Projects
มุมมอง 1614 ปีที่แล้ว
Evolution Part 1 - Projects

ความคิดเห็น

  • @rubenrcs
    @rubenrcs 22 วันที่ผ่านมา

    Thanks , i got it , it worked

  • @rubenrcs
    @rubenrcs 22 วันที่ผ่านมา

    You are a Genius ! whoa i use POV ray tracer, and it is hard but beautiful , you only use coding ! there is this great awesome Simon Burton that gift us some py code for pov but its not like your code so simple ,idk im a beginner , THANKS

    • @PyExplained
      @PyExplained 4 วันที่ผ่านมา

      Glad you like it :). It's been a while since I coded (have just been focussing on some other things), but I'm eager to get back into it when I'll start studying at uni.

  • @rubenrcs
    @rubenrcs 22 วันที่ผ่านมา

    playing with clothes example and the code snip found in ReadMe got this; "Warning (from warnings module): File "<string>", line 5 FutureWarning: In the future `np.object` will be defined as the corresponding NumPy scalar." then this .. main thread it's not in main loop ....i´m stuck in there, help , py 3.11 w11

    • @PyExplained
      @PyExplained 4 วันที่ผ่านมา

      I looked at it (it's been a while since I opened the simulator myself, so I had to figure some things out again), but I found the problem! When pasting the code in the code window, you should change "np.object" to "object" (you can also re-install the simulator, since I updated the GitHub-repo). When adding particles, the code uses the current 'particle settings' (from the particles tab). So it's best to change this to appropriate settings for a cloth (I suggest: radius: 4, mass: 1, attraction-radius: -1, attr-strength: 500, repulsion-radius: 40, repel-strength: 1, link-breaking-forces: -1, also leave all the boxes unchecked) and set the gravity to 0.6 and the air resistance to 0.04 in the simulation settings. Hope this helps :).

  • @misterx8934
    @misterx8934 2 หลายเดือนก่อน

    Beautiful video 👏

  • @toshibamaster2210
    @toshibamaster2210 4 หลายเดือนก่อน

    too slow

    • @PyExplained
      @PyExplained 4 หลายเดือนก่อน

      You're absolutely right that it isn't the fastest simulator out there. Back when I was working on it, I tried implementing GPU-accelerated computing using CUDA, but I don't remember ever getting close to making it run decently (mostly because the code was not adapted to the CUDA library when I first wrote it). Since then, I haven't really worked on the simulator, but it's a little toy project after all. Hence, I don't really think it matters that it's in Python and it performs some unefficient calculations.

  • @user-uo7vo4wn8r
    @user-uo7vo4wn8r 5 หลายเดือนก่อน

    HUh ..... Even AI can't make it run ????

    • @user-uo7vo4wn8r
      @user-uo7vo4wn8r 5 หลายเดือนก่อน

      cv2.circle(image, (int(particle.x), int(particle.y)), particle.r, particle.color, -1) cv2.error: OpenCV(4.9.0) :-1: error: (-5:Bad argument) in function 'circle' > Overload resolution failed: > - Layout of the output array img is incompatible with cv::Mat > - Expected Ptr<cv::UMat> for argument 'img'

    • @PyExplained
      @PyExplained 5 หลายเดือนก่อน

      @@user-uo7vo4wn8r I can't seem to replicate the error... Maybe you could try downloading the ".EXE"-version? If you send me some details about your Python, OpenCV and Numpy version, I could try and take a look at it (though I can't promise anything, because I haven't really looked at the project for a long time).

  • @s9vc
    @s9vc 5 หลายเดือนก่อน

    m ch go f v v hn yog b hm

  • @RadikalBanal
    @RadikalBanal 5 หลายเดือนก่อน

    i try to run it but ui is a little buggy. It looks like the frame is to small for showing all the assets. Is this a common problem?

    • @PyExplained
      @PyExplained 5 หลายเดือนก่อน

      Mmh.. I've never had a problem with that myself, but maybe you can try adjusting the width and height parameters in the ParticleSimulator.py file (line 3). Hope that solves the problem :).

  • @raihanaa1614
    @raihanaa1614 6 หลายเดือนก่อน

    Can I simulate all things with partical figuration?

    • @PyExplained
      @PyExplained 6 หลายเดือนก่อน

      I wouldn't necessarily say you can simulate ALL things that behave like particles in the real world, but there is a surprising amount of behaviours that you can reproduce using the simulator (e.g. fluid, rigid bodies, soft bodies, bouncy balls, light particles, planets, buildings, cloth, ropes, air particles, ...). In most cases, the stability and performace of the simulation are the limiting factors. There are also some systems that may be too difficult to reproduce (like fire and actual thermodynamics). Definitely let me know if you find ways to use the simulator that I haven't already mentioned! I'm always curious to hear what other people use it for :).

  • @Giacon2001
    @Giacon2001 6 หลายเดือนก่อน

    Fantastic sw

  • @zaqk2
    @zaqk2 9 หลายเดือนก่อน

    This is so amazing and helpful... Well done 👌

  • @sanunitwaibu529
    @sanunitwaibu529 9 หลายเดือนก่อน

    very interesting simulation bro!. can you please share codes. thanks from Tanzania

    • @PyExplained
      @PyExplained 9 หลายเดือนก่อน

      Thanks! There's a link to the GitHub-project (with the code) in the description of the video :).

  • @no-name168
    @no-name168 9 หลายเดือนก่อน

    im trying reconstruct sand and water particle movement like in noita. i've noticed that it horrendously demanding in terms of cpu consumption. any tips how can i optimize it? i have like few tousand pixels on screen...

    • @PyExplained
      @PyExplained 9 หลายเดือนก่อน

      First of all, it's really cool that you're trying to create your own physics simulations! I actually didn't know the game you were talking about, but I looked it up and it seems to be similar to the powder toy. I'm not sure if you are using the particle simulator that I wrote to recreate this kind of system. I assume you're talking about a simulation that you wrote yourself? In that case, I can't give a lot of tips to optimize it (as it's been a long time since I wrote this kind of program myself), but I do have some ideas. Firstly, you could try using a sort of 'grid optimization' like I'm doing, although I don't think it's relevant when working with pixels and not particles, since you can just check for collisions with the neighbouring pixels. What you could also try, is using the Numba library (numba.pydata.org/) to run the calculations in parallel on your GPU. This will, however, require some adjustments to the code in order to make it compatible with Numba. I hope this already gives you some ideas, but be sure to let me know if you need more help :).

    • @no-name168
      @no-name168 9 หลายเดือนก่อน

      ​@@PyExplained Oh, thanks for answer! I did everything from scratch in PyGame. Every pixel has it's X, Y coordinates. I've tried numba, multiprocessing, cython. Neither of these worked for me, I recieved different errors everytime or they slowed it even more. It's really werid. I supposed Python is not made for this kind of stuff. Every pixel checks if there row bottom with place X-1, X, X+1 is free basically. It has to check if the given coordinaes (ex. Y+1, X-1) are occupied. This is the curse, that's why I'm using sets' intersection and it actually makes it faster a little. I added parameter 'age' which counts time from pixel spawn and if this time is above 3 seconds it stops it's calculations. This gave me like 2x more pixels on screeen, but they freeze after that time. I'm kinda newbie to programming and I don't know algorithms but if you want, there it is. github.com/gracjan-p/gracjan-p.github.io/blob/main/media/pyita.py

    • @PyExplained
      @PyExplained 9 หลายเดือนก่อน

      I just took a look at your project and it looks amazing already! On my PC, I can get around 20.000 particles (water + sand) on screen before the FPS starts to drop below 30, so imo it's quite optimized already (for a basic simulation). I haven't inspected the full code yet, but one thing that does seem 'sub-optimal' is checking the set you created for particles that already hold that position. Wouldn't it make more sense to make a variation on the 'particles_arr' that has the same dimensions as your screen and stores the particle objects as its elements on their respective locations. Then you could just check at a certain index whether or not there is already a particle object present. That's just an idea I had, but maybe you already tried it and it didn't make it any faster... I actually haven't programmed anything for like more than a year, so I would need to brush up some programming skills and principles to give you good advice. I would also change the fact that you're using the age parameter to determine if you should update a particle or not. Maybe it would be better to have a boolean variable that determines if the particle got 'stuck' (/ is in a stable position). Then you could set that back to false if you remove particles below that 'stable' particle. One last thing that I noticed: the sand particles seem to be able to float on the water. Maybe you should make it so they can swap places with the water particles and sink to the bottom?

    • @no-name168
      @no-name168 9 หลายเดือนก่อน

      ​@@PyExplained I do appreciate for a good word :D 1) Tried NumPy 2d array for this grid. Didn't made a huge difference. The problem is the amount of repetitive calculations for each pixel. There are too many of them. Matrix is better tho because It could easily check for type of particle near so it would act differently in dependency of it. 2) I'll give a try with boolean values. I did this stuck trick but it had just one 'old' position' and pixels tended to freeze in air because of collisions with other particles near them. 3) I know sand float on water I just didn't implied the swapping position yet. It's still kinda buggy for now. Water is not as fluid as It should be, etc.

    • @PyExplained
      @PyExplained 9 หลายเดือนก่อน

      Sounds like you're already on your way to outsmart me concerning physics simulations :). For real, though, most of my projects just came to be from me tinkering around with code and something more or less cool arising. In other words, I'm afraid I can't give you any specific tips to further improve your simulation ('cause you probably know more about this stuff than I do at the moment). Basically, great work so far! And don't hesitate to give me some updates if you want to (Discord: #pyexplained).

  • @raihanaa1614
    @raihanaa1614 ปีที่แล้ว

    Very informative video

  • @jack_sparrow1049
    @jack_sparrow1049 ปีที่แล้ว

    Very cool thanks for sharing

  • @luigidabro
    @luigidabro ปีที่แล้ว

    I made a lil cycle Pathtracer, which calculates the rays in parallel using Numpy and in full HD it takes approximately 2 seconds per frame with 6 spheres

    • @PyExplained
      @PyExplained ปีที่แล้ว

      Wow, that's really impressive! Did you use Numba or any other special libraries to run it in parallel? Maybe it is also possible with just Numpy alone, which I didn't know...

    • @luigidabro
      @luigidabro ปีที่แล้ว

      @PyExplained I sadly downloaded the newest version of Python, so numba wasn't an option. The path tracer is quite vanilla, only using Numpy and Pygame. Let's just say: it used a LOT of masks. Also, it's based on the Raytracer of Sebastian Lague

    • @PyExplained
      @PyExplained ปีที่แล้ว

      @@luigidabro Sebastian Lague is indeed a good source of inspiration :). His newest video about ray tracing was definitely intriguing, but at the time of making my ray tracer, that video didn't exist yet... ( although his old video about compute shaders did already cover lots of these topics)

  • @shahzaibhassan2777
    @shahzaibhassan2777 ปีที่แล้ว

    When the tutorial is TOO Good: No seriously i mean you deserve more, first time here and subed, liked and also commented.

    • @PyExplained
      @PyExplained ปีที่แล้ว

      Thank you so much! I really appreciate comments like these 🙏

  • @mammid9622
    @mammid9622 ปีที่แล้ว

    How did you get yours to form into a uniform diagonal patten. They attract and repel but they keep no specific shape

    • @PyExplained
      @PyExplained ปีที่แล้ว

      Are you trying to get similar results using the simulator or by making your own version of a particle simulator? In the first case, you can just copy the particle properties of the scene that's created when booting up the program. In the second case, there is no specific way to make them form this pattern. The pattern itself is self-emerging... No rule makes them do this: it's just the most optimal way to 'stack' circles (you can regard the repel area as a circle). When implementing the attraction between particles that are far away and the repulsion of particles that are close-by each other, you should see similar patterns. Hopefully this helps? If not, you can always elaborate on your question and I'll try to give more information :).

  • @anondude6361
    @anondude6361 ปีที่แล้ว

    Can you please make a discord

    • @PyExplained
      @PyExplained ปีที่แล้ว

      Thanks for the suggestion :). I think, however, that I wouldn't have enough time to maintain a Discord server right now. I don't think there are enough viewers who are interested in that either. If you want to send me suggestions or ask questions, you can always send a message to PyExplained#9820 on Discord.

  • @geokomputasi
    @geokomputasi ปีที่แล้ว

    Sir, May I know what papers/books about SPH did you use to make this code? thanks

    • @PyExplained
      @PyExplained ปีที่แล้ว

      Actually, I didn't use any books or papers specifically to make this project. It was just an experiment to see what behaviour would emerge when you give particles one or a few simple properties. There aren't really any complex formulas that I implemented... just some experimentation that resulted in this program :).

  • @parzvalishere
    @parzvalishere ปีที่แล้ว

    Hey I'm trying to create the fluid sim shown in the video but I'm not sure about the formula for the force between individual particles can you tell me?

    • @PyExplained
      @PyExplained ปีที่แล้ว

      First of all, it's really cool that you're trying out the simulator! At least I'm glad to know that it still seems to function for most people :). To answer your question: you should just be able to load in the file "fluid.sim" from the folder "example_simulations". In the case of that simulation, I used a repulsion-radius of 50 and a strength of 1 (with the mass of the particles also being equal to 1). The attraction-radius is -1 and the strength being 0. Hope this helps.

    • @parzvalishere
      @parzvalishere ปีที่แล้ว

      @@PyExplained thanks that helps! 😊...I was trying understand how fluid sim works and this video helped a lot keep up the good work

    • @PyExplained
      @PyExplained ปีที่แล้ว

      Oh, I'm so sorry. I just realized that you're probably talking about making your own simulator. To do that, you can take a look at the code in the Particle class. Especially, the 'calc_attraction_force' function. This part of the code is probably what you're asking for: if distance < repel_r: magnitude = -repel * rest_distance / 10 Again, I wrote this code a long time ago, so it often isn't clear to me either what I wrote back then. The division by 10 is also probably just a constant that I found worked for the simulation, but this might be different for your simulation.

    • @parzvalishere
      @parzvalishere ปีที่แล้ว

      @@PyExplained 🤔 ohh thanks I understood this time... I am trying to do this in blender a 3d software and was trying different formula but didn't work... I'll try using your method😅

  • @dimitriosdesmos4699
    @dimitriosdesmos4699 ปีที่แล้ว

    you definitely stand out...amazing work.....did u do it during lock down?

    • @PyExplained
      @PyExplained ปีที่แล้ว

      Thank you so much! I honestly don't remember if there was a lockdown when I was making this. It could have been a period of part-time online lessons, which gave me more time to work on these sorts of projects. But honestly, the situation changed so often at that time that I can't fully recall which projects I did during a lockdown. However, I now find it difficult to find the time and motivation for these projects. I'm not sure if there'll be any videos coming soon. I have plenty of ideas, but it would be too stressful to start a project with this amount of homework. It's honestly comments like these that do give me motivation to work on another project. I'm just not sure if that's what I'd like to invest my time in right now. Though, thanks again for the lovely comment :).

  • @LimeSpeedCrystal
    @LimeSpeedCrystal ปีที่แล้ว

    HOW HOW HOW HOW HOW!?!?!?!?!?

  • @LimeSpeedCrystal
    @LimeSpeedCrystal ปีที่แล้ว

    How to open that image file as you opened?

    • @PyExplained
      @PyExplained ปีที่แล้ว

      I'm not sure what you mean by your question... I assume you're talking about opening the image in the IDE. I usually use PyCharm, which has a feature to preview images. Or are you talking about viewing the image when the program is running? Please specify your question so I can help you with finding a solution.

    • @LimeSpeedCrystal
      @LimeSpeedCrystal ปีที่แล้ว

      @@PyExplained Next to the Python file there were those image files.

    • @PyExplained
      @PyExplained ปีที่แล้ว

      @@LimeSpeedCrystal I actually didn't realise until now that I never created a GitHub repository for the code. You can now find the code and images here: github.com/PyExplained/Tutorials/tree/master/Tkinter%20Buttons%20Tutorial

    • @LimeSpeedCrystal
      @LimeSpeedCrystal ปีที่แล้ว

      @@PyExplained I already found out how to do that.

  • @jhanolaer8286
    @jhanolaer8286 ปีที่แล้ว

    how much if you do a simulation?

    • @PyExplained
      @PyExplained ปีที่แล้ว

      What exactly do you mean by your question? You should be able to run simulations yourself if you download the code and it's free!

  • @timon1816
    @timon1816 ปีที่แล้ว

    code not work

    • @PyExplained
      @PyExplained ปีที่แล้ว

      That's strange... I tested it again just now and everything still seems to be working for me. Which version of Python are you running this on exactly? Maybe you didn't install all the required libraries (you can find more details on that in the documentation on GitHub)? Also, if there's an error message showing, it might be handy if you could paste it over here so I can see what might be causing the error.

    • @timon1816
      @timon1816 ปีที่แล้ว

      @@PyExplained No module named 'PIL.ImageTk'. But i have pillow installed

    • @PyExplained
      @PyExplained ปีที่แล้ว

      @@timon1816 I honestly don't know what could be the problem then. Perhaps the library works differently in newer versions of Python? You can always try and install the exe-version of the code. I hope that solves the problem...

  • @lelabodezaocreationdinstru3569
    @lelabodezaocreationdinstru3569 ปีที่แล้ว

    Do you think, this could be implemented on micropython ?

    • @PyExplained
      @PyExplained ปีที่แล้ว

      To be totally honest, before reading your comment, I had no idea what micropython even was. Therefore, I don't think the code could just be run the way it is. Maybe with some adjustments, but again... don't know a lot about running programs on microcontrollers. Thanks for your comment tho :)

  • @icotwilight
    @icotwilight ปีที่แล้ว

    Modern gl ^w^

  • @bemyheartfill
    @bemyheartfill ปีที่แล้ว

    Damn amazing

  • @muzammildharwadkar8101
    @muzammildharwadkar8101 ปีที่แล้ว

    I loved it bro really you are doing great job and thanks for the code I have subscribed and i will tell all to my friends to subscribe and to like Bro plz do what others are not doing thanks

    • @PyExplained
      @PyExplained ปีที่แล้ว

      Thanks a lot! I really appreciate that :)

  • @trilavz
    @trilavz ปีที่แล้ว

    This Channel is such a gem. Love your videos. Will try to implement these when i get some free time . Kudos to your content . Keep doing .lots of love❣❣

  • @GoggledGecko
    @GoggledGecko ปีที่แล้ว

    Great video! I got inspired to try and make something similar myself, but for some reasons my particle clusters end up spinning when they get too large, weird lol

    • @PyExplained
      @PyExplained ปีที่แล้ว

      Thanks! It's also really cool that you made your own version of this. Maybe the uncontrollable spinning could be solved using a dampening factor? I'd suggest using something like air resistance, but you may have already implemented this, in which case you could try increasing the resistance/dampening.

  • @PyExplained
    @PyExplained ปีที่แล้ว

    I'm writing this comment to let you guys know that I might not be uploading videos about big projects any time soon. School will probably be occupying most of my time again. I'm currently also trying to learn Java, so hopefully, I'll be able to do some projects with that too!

  • @anondude6361
    @anondude6361 ปีที่แล้ว

    Cool

  • @anondude6361
    @anondude6361 ปีที่แล้ว

    Who do you optimize it

    • @PyExplained
      @PyExplained ปีที่แล้ว

      I think you asked this question twice, but I'll just copy my answer in case you hadn't seen my original answer: The optimization in this project was actually quite simple. The 'canvas' sort of gets divided into multiple grid cells which makes it so you only have to check for collisions in that grid cell. However, this doesn't work when the attraction or repulsion radius are too big or just "infitinitely large" (i.e. set to -1). In that case, all distances will have to be calculated and no optimization is possible. There are better optimization strategies out there (like a quadtree), but this project just started as an experiment to see how far this simple grid optimization would get me.

    • @anondude6361
      @anondude6361 ปีที่แล้ว

      @@PyExplained that you so much

  • @genesis697
    @genesis697 ปีที่แล้ว

    nice vid bro where do you study?

    • @PyExplained
      @PyExplained ปีที่แล้ว

      Thanks! I'm still in highschool, so I can't refer you to any university (if you're asking about that). I live in Belgium, so the name of my school isn't really important, neither would it be a smart decision to share in my comment-section ;). I hope that answers your question, but don't hesitate to specify your question if I didn't yet answer it as intended.

  • @Looki2000
    @Looki2000 2 ปีที่แล้ว

    in true autotuning, increasing the pitch does not produce a chipmunk effect

    • @PyExplained
      @PyExplained 2 ปีที่แล้ว

      I guess you're right, but I tried my best to make it sound as good as possible. It's also the first time that I tried to do something with sound, so I was glad that it worked as is. But, as you say, there is still room for improvement, so definitely let me know if you have ideas on how to improve the autotuning ;).

    • @Looki2000
      @Looki2000 2 ปีที่แล้ว

      @@PyExplained I recently discovered that if you autotune a sound in a true autotune to a high pitch and a low pitch and then display a logarithmic spectrum of these sounds, the component frequencies of the first low-pitched sound have the same spacing between them as the component frequencies of high-pitched sound. I think that solution for that is shifting frequencies from fourier transform not lineary but exponentialy. TH-cam does not allow me to insert a link so I had to replace dot with A and / with B. imgurAcomBaBJAQdpkW

    • @PyExplained
      @PyExplained 2 ปีที่แล้ว

      That's really interesting! Thanks a lot for the explanation. As I said in the video, I didn't do a lot of research as a means to challenge myself (or maybe because I was a tad bit lazy ;)). I was curious to see if it would just work by shifting the spectrogram up or down by a certain amount, but this obviously throws off the ratios between frequencies, making it sound out of tune. That's why I ended up stretching the spectrogram instead. As you're saying, the solution might just be stretching it exponentially, but I think it might also have to do with the fact that I 'chop up' the audio signal. In earlier testing phases, I did use overlapping samples, but I found that working with chopped-up audio was a lot easier. In the end, the chipmunk effect isn't all that bad when increasing the pitch. It's mostly reverting the audio signal that causes it to sound a little funny. So even in unchanged audio samples, you can hear the distortions. It's also very noticeable when layering multiple voices (like in the reharmonization I did for the intro). However, I do think that doing the thing you described would help with making the 'corrected sample' sound more realistic (since the frequency components of our voice don't always have the same ratio to each other).

  • @undeadpresident
    @undeadpresident 2 ปีที่แล้ว

    This is a good tutorial. Thank you.

  • @t3st3d
    @t3st3d 2 ปีที่แล้ว

    very impressive

  • @AJ-et3vf
    @AJ-et3vf 2 ปีที่แล้ว

    Great video! Thank you!

  • @william8495
    @william8495 2 ปีที่แล้ว

    Excuseme I download your code and run on spyder, but I cant show like your GUI, maybe I need to install something?

    • @PyExplained
      @PyExplained 2 ปีที่แล้ว

      Yes, you do indeed need to install some libraries in order to run the code. Here is the link to the documentation (including a list of the libraries you need to install): github.com/PyExplained/Autotune-using-Python#Required_modules. If you're still having trouble running the code after this, please let me know.

    • @william8495
      @william8495 2 ปีที่แล้ว

      @@PyExplained I have already install all required modules in your GitHub, but it still can’t run the GUI.Does using the different compiler meter?(Sorry about some wrong grammar and thanks for help!)

    • @PyExplained
      @PyExplained 2 ปีที่แล้ว

      @@william8495 Could you copy the error message you're getting? Then I could take a look at it.

    • @william8495
      @william8495 2 ปีที่แล้ว

      @@PyExplained I don't have error message, but my output just have a Image like your GUI, and I can't use any function.

    • @PyExplained
      @PyExplained 2 ปีที่แล้ว

      @@william8495 Mmmhh... That's weird. I'm not entirely sure what could cause that, but I suggest trying to run it with a different IDE (maybe IDLE?). You should also check whether all the example audiofiles are present (maybe you deleted them?).

  • @mazekaty-3700
    @mazekaty-3700 2 ปีที่แล้ว

    i can use this with web app ?

    • @PyExplained
      @PyExplained 2 ปีที่แล้ว

      I'm not entirely sure what you mean by your question. If you're asking whether or not you can use the application as a web application, the answer would be no. You can currently only use it by downloading the code (including all the required modules) and running it. I might have misunderstood your question though, so if something still isn't clear, you may have to specify your question.

  • @sherlocksampath9975
    @sherlocksampath9975 2 ปีที่แล้ว

    Hi PyExplained, great video btw. I recently started to do the same thing(raytracer from scratch). Until all the objects are opaque, concept of shadows is pretty clear. I did the same thing as explained in this video. When I added the transparency factor, im not getting any of it(in concept) Unfortunately I also added refraction, now everything is messed up. Now light bends and also travels through objects, I cant use the same logic now. How can I solve this? Thank you.

    • @PyExplained
      @PyExplained 2 ปีที่แล้ว

      Wow, it's really cool that you're also making your own raytracer! I would suggest taking a couple of steps back and making sure that your code for rendering opaque objects works. Then, you could add reflections (which is, in my opinion, easier than refraction). To add refraction, you could first take a look at some articles about it (since I didn't really explain it that well in the video). Here is a good article that I used as a reference: www.scratchapixel.com/lessons/3d-basic-rendering/introduction-to-shading/reflection-refraction-fresnel. In hindsight, I think I can say that some of the formulas and algorithms I ended up using still aren't entirely correct, but since it looked fine to me, I kept the code as it was. Hope this helps :)

    • @sherlocksampath9975
      @sherlocksampath9975 2 ปีที่แล้ว

      Yes, I did it step by step 1. All the objects are opaque 2. Add reflectiveness property and cast reflections. 3. (This thing is messed up) Added both transparency and refractive index at the same time. I did the same (almost same) Applied Fresnel equation. Refraction is good (I mean images rendered are getting better) but But shadows are too dark. I'm not taking the transparency of the hit object into account( Atleast I'm thinking to go in that direction) instead of just returning a bool like true if there is an object in the middle and just returning black color( not entirely). My idea mentioned above don't consider refractive index and refraction phenomenon at all. But I feel shadows are affected by refraction also. Can I do it in any better way Or Just ignore refraction thing like some minor effect for shadows and move on. Thank you

    • @PyExplained
      @PyExplained 2 ปีที่แล้ว

      I personally didn't add anything too crazy regarding 'refracted shadows and highlights', but the shadows do get lighter depending on the transparency of the object casting them (as well as the color if it's 'stained glass'). I just felt like adding these 'refracted highlights' would get way too complicated, since it would require lots of rays to determine the indirect lighting paths. In your case, if you're happy with the current result, I'd suggest leaving it as is. If not, you can always send me some rendered images on Discord (PyExplained#9820) so I can take a look at them.

    • @sherlocksampath9975
      @sherlocksampath9975 2 ปีที่แล้ว

      Thanks for the idea. I didn't think of the color Thought transparency would be enough. I'm going to leave it like this (ignoring refracted shadows). It's too complicated. I'll definitely get back to you if I get any more doubts. Again thanks man. Really appreciate it.

  • @lukalicina8230
    @lukalicina8230 2 ปีที่แล้ว

    Your channel is a gem! Idk how you dont have more subs. Great content as always!

  • @demselengaming4703
    @demselengaming4703 2 ปีที่แล้ว

    This inspired me to try doing this myself ! Thank u !

  • @MWGaming67
    @MWGaming67 2 ปีที่แล้ว

    AttributeError: 'NoneType' object has no attribute 'bind'

    • @PyExplained
      @PyExplained 2 ปีที่แล้ว

      If you copied everything correctly, there should be no errors. This is the full code: from tkinter import * tk = Tk() tk.geometry('300x300') def press(_): b.config(image=photo_2) print('pressed') def release(_): b.config(image=photo_1) print('released') photo_1 = PhotoImage(file='button.gif').subsample(2, 2) photo_2 = PhotoImage(file='button_2.gif').subsample(2, 2) b = Button(tk, image=photo_1, cursor='hand2', border='0') b.place(x=150, y=150, anchor=CENTER) b.bind('<ButtonPress>', press) b.bind('<ButtonRelease>', release) tk.mainloop() I hope this works. If not, you can send me your code and I'll try to find the problem.

  • @djcannut6193
    @djcannut6193 2 ปีที่แล้ว

    Being a coder, Dj and a music producer. This video made my day. Thankyou so much

  • @wws2179
    @wws2179 2 ปีที่แล้ว

    Great video!

  • @ThankYouESM
    @ThankYouESM 2 ปีที่แล้ว

    It might be super easy for you to create a python3x-To-p5js converter in which you can have the best of both worlds.

    • @PyExplained
      @PyExplained 2 ปีที่แล้ว

      Sadly, I have almost no experience using p5.js, but maybe you're referring to converters made by other people? Anyway, I'll probably learn Java soon, so I'll hopefully be able to make more than just Python projects in the future. I also think that understanding my old code would be a lot more confusing than just writing a new (and better) rendering engine. However, my next video isn't going to be about rendering engines, but about sound. So stay tuned for that :)

    • @ThankYouESM
      @ThankYouESM 2 ปีที่แล้ว

      @@PyExplained Understood... looking very forward to watching more of your work.

  • @ManagerJojo
    @ManagerJojo 2 ปีที่แล้ว

    This was such a wonderful video to watch. Thank you for sharing your amazing work!