Blender Trick: Create Music From Your Animation | Free Python Script To Generate A Collision Music

ะŸะพะดั–ะปะธั‚ะธัั
ะ’ัั‚ะฐะฒะบะฐ
  • ะžะฟัƒะฑะปั–ะบะพะฒะฐะฝะพ 7 ะปะธะฟ 2024
  • In this Blender tutorial, we have discussed how to create a background music using a python script - specially for collision physics. We have provided the free script below. Please note that the first script has to be run only once in order to install the midiutil package. And the second script is the actual script that you'll every time you need to create a background music. Please watch the video for the complete tutorial. If you have any question on this tutorial, please leave your comment below.
    ๐‡๐จ๐ฐ ๐ญ๐จ ๐œ๐ซ๐ž๐š๐ญ๐ž ๐š ๐Œ๐ฎ๐ฌ๐ข๐œ๐š๐ฅ ๐Œ๐š๐ซ๐›๐ฅ๐ž ๐š๐ง๐ข๐ฆ๐š๐ญ๐ข๐จ๐ง ๐Ÿ‘‰ โ€ข Musical Marble Animati...
    ๐ƒ๐จ๐ฐ๐ง๐ฅ๐จ๐š๐ ๐’๐œ๐ซ๐ข๐ฉ๐ญ ๐Ÿ ๐Ÿ‘‰ ๐“๐ก๐ข๐ฌ ๐ข๐ฌ ๐ญ๐ก๐ž ๐ฌ๐œ๐ซ๐ข๐ฉ๐ญ ๐ญ๐จ ๐ข๐ง๐ฌ๐ญ๐š๐ฅ๐ฅ ๐ฆ๐ข๐๐ข๐ฎ๐ญ๐ข๐ฅ ๐Ÿ‘‰ drive.google.com/file/d/1gfjp...
    ๐Ÿ‘†๐Ÿ‘† This script has to be run only once for your system.
    ๐ƒ๐จ๐ฐ๐ง๐ฅ๐จ๐š๐ ๐’๐œ๐ซ๐ข๐ฉ๐ญ ๐Ÿ ๐Ÿ‘‰ ๐“๐ก๐ข๐ฌ ๐ข๐ฌ ๐ญ๐ก๐ž ๐š๐œ๐ญ๐ฎ๐š๐ฅ ๐ฌ๐œ๐ซ๐ข๐ฉ๐ญ ๐ญ๐จ ๐ ๐ž๐ง๐ž๐ซ๐š๐ญ๐ž ๐š ๐ฆ๐ฎ๐ฌ๐ข๐œ ๐Ÿ‘‡๐Ÿ‘‡
    ๐Ÿ๐Ÿ’ ๐…๐๐’ ๐•๐ž๐ซ๐ฌ๐ข๐จ๐ง ๐Ÿ‘‰ drive.google.com/file/d/1FWRB...
    ๐Ÿ‘๐ŸŽ ๐…๐๐’ ๐•๐ž๐ซ๐ฌ๐ข๐จ๐ง ๐Ÿ‘‰ drive.google.com/file/d/1In3T...
    ๐Ÿ”๐ŸŽ๐…๐๐’ ๐•๐ž๐ซ๐ฌ๐ข๐จ๐ง ๐Ÿ‘‰ drive.google.com/file/d/1yUBf...
    ๐‚๐ฎ๐ฌ๐ญ๐จ๐ฆ ๐…๐๐’ ๐•๐ž๐ซ๐ฌ๐ข๐จ๐ง ๐Ÿ‘‰ drive.google.com/file/d/1RuNO...
    ๐Ÿ‘†๐Ÿ‘† Use the correct version based on the FPS rate of your animation.
    ๐‰๐จ๐ข๐ง ๐จ๐ฎ๐ซ ๐œ๐ก๐š๐ง๐ง๐ž๐ฅ ๐Ÿ๐จ๐ซ ๐ญ๐ก๐ž ๐›๐ฅ๐ž๐ง๐ ๐Ÿ๐ข๐ฅ๐ž & ๐š๐๐๐ข๐ญ๐ข๐จ๐ง๐š๐ฅ ๐ฉ๐ž๐ซ๐ค๐ฌ ๐Ÿ‘‰ / 5minutesblender
    ๐…๐จ๐ฅ๐ฅ๐จ๐ฐ ๐ฎ๐ฌ ๐จ๐ง ๐ˆ๐ง๐ฌ๐ญ๐š๐ ๐ซ๐š๐ฆ ๐Ÿ‘‰ / 5minutesblender
    ๐“๐ก๐š๐ง๐ค๐ฌ ๐Ÿ๐จ๐ซ ๐ฒ๐จ๐ฎ๐ซ ๐๐จ๐ง๐š๐ญ๐ข๐จ๐ง๐ฌ ๐Ÿ‘‰ donorbox.org/5-minutes-blender
    ==================================================
    We have many more tutorials that can help you learn Blender like a professional. You can go through the following playlists for the relevant topics:
    ๐Ÿ‘‡ ๐๐ฅ๐ž๐ง๐๐ž๐ซ ๐…๐จ๐ฎ๐ง๐๐š๐ญ๐ข๐จ๐ง ๐‚๐จ๐ฎ๐ซ๐ฌ๐ž ๐“๐ฎ๐ญ๐จ๐ซ๐ข๐š๐ฅ๐ฌ:
    If you are absolutely new to Blender, take this foundation course.
    โ€ข Blender Foundation Course
    ๐Ÿ‘‡ ๐€๐ฅ๐ฅ ๐Ÿ๐Ÿ ๐‚๐ฅ๐š๐ฌ๐ฌ๐ž๐ฌ ๐“๐จ๐ ๐ž๐ญ๐ก๐ž๐ซ ๐ˆ๐ง ๐Ž๐ง๐ž ๐‡๐จ๐ฎ๐ซ:
    โ€ข Blender Foundation Cou...
    ๐Ÿ‘‡ ๐๐ฅ๐ž๐ง๐๐ž๐ซ ๐“๐ข๐ฉ๐ฌ ๐€๐ง๐ ๐“๐ซ๐ข๐œ๐ค๐ฌ (๐“๐ฎ๐ญ๐จ๐ซ๐ข๐š๐ฅ๐ฌ):
    โ€ข Blender Tips & Tricks
    ๐Ÿ‘‡ ๐„๐š๐ฌ๐ฒ ๐Œ๐จ๐๐ž๐ฅ๐ฌ ๐…๐จ๐ซ ๐๐ž๐ ๐ข๐ง๐ง๐ž๐ซ๐ฌ (๐“๐ฎ๐ญ๐จ๐ซ๐ข๐š๐ฅ๐ฌ):
    โ€ข Easy Models For Beginners
    ๐Ÿ‘‡ ๐Œ๐š๐ญ๐ž๐ซ๐ข๐š๐ฅ๐ฌ ๐˜๐จ๐ฎ ๐๐ž๐ž๐ ๐ˆ๐ง ๐๐ฅ๐ž๐ง๐๐ž๐ซ (๐“๐ฎ๐ญ๐จ๐ซ๐ข๐š๐ฅ๐ฌ):
    โ€ข Materials You Need In ...
    ๐Ÿ‘‡ ๐€๐ฅ๐ฅ ๐“๐ž๐ฑ๐ญ ๐„๐Ÿ๐Ÿ๐ž๐œ๐ญ๐ฌ ๐ˆ๐ง ๐๐ฅ๐ž๐ง๐๐ž๐ซ (๐“๐ฎ๐ญ๐จ๐ซ๐ข๐š๐ฅ๐ฌ):
    โ€ข Text Effects In Blender
    ๐Ÿ‘‡ ๐‚๐š๐ฆ๐ž๐ซ๐š ๐Œ๐จ๐ฏ๐ž๐ฆ๐ž๐ง๐ญ & ๐’๐ž๐ญ๐ญ๐ข๐ง๐ ๐ฌ ๐ˆ๐ง ๐๐ฅ๐ž๐ง๐๐ž๐ซ:
    โ€ข Camera Movement & Sett...
    ๐Ÿ‘‡ ๐”๐ฌ๐ž๐Ÿ๐ฎ๐ฅ ๐‹๐ข๐ ๐ก๐ญ๐ข๐ง๐  ๐’๐ž๐ญ๐ฎ๐ฉ ๐ˆ๐ง ๐๐ฅ๐ž๐ง๐๐ž๐ซ (๐“๐ฎ๐ญ๐จ๐ซ๐ข๐š๐ฅ๐ฌ):
    โ€ข Useful Lighting Setup ...
    ๐Ÿ‘‡ ๐‘๐ข๐ ๐ข๐ ๐๐จ๐๐ฒ ๐๐ก๐ฒ๐ฌ๐ข๐œ๐ฌ & ๐‘๐ข๐ ๐ข๐ ๐๐จ๐๐ฒ ๐‚๐จ๐ง๐ฌ๐ญ๐ซ๐š๐ข๐ง๐ญ๐ฌ:
    โ€ข Rigid Body Physics in ...
    ๐Ÿ‘‡ ๐…๐ข๐ซ๐ž & ๐’๐ฆ๐จ๐ค๐ž ๐’๐ข๐ฆ๐ฎ๐ฅ๐š๐ญ๐ข๐จ๐ง ๐ˆ๐ง ๐๐ฅ๐ž๐ง๐๐ž๐ซ (๐“๐ฎ๐ญ๐จ๐ซ๐ข๐š๐ฅ๐ฌ):
    โ€ข Fire & Smoke Simulatio...
    ๐Ÿ‘‡ ๐…๐ฅ๐ฎ๐ข๐ ๐’๐ข๐ฆ๐ฎ๐ฅ๐š๐ญ๐ข๐จ๐ง ๐ˆ๐ง ๐๐ฅ๐ž๐ง๐๐ž๐ซ (๐“๐ฎ๐ญ๐จ๐ซ๐ข๐š๐ฅ๐ฌ):
    โ€ข Fluid Simulation in Bl...
    ๐Ÿ‘‡ ๐Œ๐š๐ฌ๐ญ๐ž๐ซ๐ข๐ง๐  ๐๐ฅ๐ž๐ง๐๐ž๐ซ (๐“๐ฎ๐ญ๐จ๐ซ๐ข๐š๐ฅ๐ฌ):
    โ€ข Mastering Blender
    If you want to watch our own creations in Blender, you can also check out the following channel where we regularly upload videos on Animation, Space Exploration and AI.
    ๐Ž๐ฎ๐ซ ๐จ๐ญ๐ก๐ž๐ซ ๐œ๐ก๐š๐ง๐ง๐ž๐ฅ ๐ฅ๐ข๐ง๐ค: / @thealienworld
    #Blender #Animation #Musically #Tutorial
    Timestamp
    00:00 Detect your collision frames
    00:54 Use our python script
    02:41 Install the midiutil package
    03:24 Convert the output file to mp3

ะšะžะœะ•ะะขะะ ะ† • 40

  • @5MinutesBlender
    @5MinutesBlender  5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ +4

    ๐ˆ๐ฆ๐ฉ๐จ๐ซ๐ญ๐š๐ง๐ญ ๐๐จ๐ญ๐ž ๐จ๐ง ๐…๐๐’: To sync your sound with your animation, the FPS parameter is extremely important. We have added this FPS rate in the script. Please use the correct value in this parameter, either 24 or 30 or any other value that matches your animation's FPS rate. The default is 24 just like Blender's own default, but if you use a different FPS rate, you must change this value in the given script.

  • @konradswart4069
    @konradswart4069 5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ +4

    AHHH! NOW YOU'RE TALKING!
    This is what I was hoping for in your previous video!
    Even in _midi!_
    MARVELOUS!
    The script to install a midi module is particularly interesting, because I didn't know _that_ one!
    FINALLY somebody who picks up Blender with midi!
    Great work!

    • @5MinutesBlender
      @5MinutesBlender  5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ

      Glad you liked it and it helped! Cheers! ๐Ÿ’๐Ÿ’๐Ÿ’

  • @selino_duz
    @selino_duz 5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ +2

    Please I beg you, keep uploading your marvelous content! It is helping me alot! Thank you.

    • @5MinutesBlender
      @5MinutesBlender  5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ

      Thank you, I will ๐Ÿ’๐Ÿ’๐Ÿ’

  • @pile333
    @pile333 5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ +1

    Amazing. Well done!

    • @5MinutesBlender
      @5MinutesBlender  5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ +1

      Thanks a lot! ๐Ÿ˜Š๐Ÿ’๐Ÿ’

  • @federicoramirez7508
    @federicoramirez7508 3 ะผั–ััั†ั– ั‚ะพะผัƒ +1

    You are the master in Blender. Thank you very much.

    • @5MinutesBlender
      @5MinutesBlender  3 ะผั–ััั†ั– ั‚ะพะผัƒ

      Glad you liked this tutorial ๐Ÿ˜Š Merci beaucoup ๐Ÿ’๐Ÿ’

  • @user-zd7sz6sp9b
    @user-zd7sz6sp9b 5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ +1

    thanks โค

  • @josema9317
    @josema9317 5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ

    This will be so easy doing this on post production...

  • @Anshudancer...
    @Anshudancer... 2 ะผั–ััั†ั– ั‚ะพะผัƒ +2

    Thank you Su much for providing such a beautiful knowledge. Can you share sound beat frame list so that we can know

    • @5MinutesBlender
      @5MinutesBlender  2 ะผั–ััั†ั– ั‚ะพะผัƒ +1

      Glad you liked our tutorial ๐Ÿ˜Š I did not understand what you meant by sound beat frame list ๐Ÿค” What do you want us to share? ๐Ÿค”

    • @Anshudancer...
      @Anshudancer... 2 ะผั–ััั†ั– ั‚ะพะผัƒ

      Sir, eik your tutorial you told regarding sound_notes so I want from where I can get that all sound notes with beat so that I can prepare best music for marble ball animation

    • @5MinutesBlender
      @5MinutesBlender  2 ะผั–ััั†ั– ั‚ะพะผัƒ

      I think you want to know which notes (96, 100, 103 etc) correspond to which music notes (like Do, Re, Mi, Fa etc). There are no fixed correspondence as such because each musical instrument goes by a different frequency, so Do on piano is not the same as Do on say harmonium or on guitar. But what is fixed is there ratios. The notes have the same ratios among them (with a slight variation from instrument to instrument). Also there are scales, so notes on B major is different from C major or C minor. You can start from any frequency (note) that sounds good for your Do, and then decide the rest of the frequencies based on the ratio of each note with respect to Do. You can also read this guide: www.intmath.com/trigonometric-graphs/music.php

  • @Pavitra2969
    @Pavitra2969 2 ะผั–ััั†ั– ั‚ะพะผัƒ +1

    Hey Bro i get to know about marble music from victor de martin he does it so well please tell how create a loop and also tell sound notes

    • @5MinutesBlender
      @5MinutesBlender  2 ะผั–ััั†ั– ั‚ะพะผัƒ

      To create a loop, you need to place the notes in the same fashion at the start and at the end of the series (may be 3-4 steps on each end). Then identify a frame where the ball is almost in an identical position in both the places and cut your video right there (you won't get a 100% match but a 97-98% match is common and it is enough for a visual continuity). For the notes you may want to look at the second part of our tutorial ๐Ÿ‘‰ ua-cam.com/video/uzd7wd72LdQ/v-deo.html

  • @programmieraufgaben8391
    @programmieraufgaben8391 5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ +1

    nice

    • @5MinutesBlender
      @5MinutesBlender  5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ +1

      Thank you ๐Ÿ’๐Ÿ’

  • @elefantspidsmus
    @elefantspidsmus 5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ +4

    A person with knowledge of music would not use this script but just use a DAW or a note-based composition program. And a person video editing skills would import the sounds and place them in the right frames in some video timele - and hey! Blender`s got one of those.

    • @EasypediaTech
      @EasypediaTech 5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ

      Cheers! I made a similar video and added the music by screen-recording a piano on my phone and the piano was played by me.
      ua-cam.com/users/shortsyZKuj5L0mrk?si=TcV3isU6oQ0IrQU0

  • @Anshudancer...
    @Anshudancer... 2 ะผั–ััั†ั– ั‚ะพะผัƒ +1

    While running script for 30FPS after installing MIDI file โ€œlist index out of rangeโ€ error is coming. What to do for that? Plz

    • @5MinutesBlender
      @5MinutesBlender  2 ะผั–ััั†ั– ั‚ะพะผัƒ +1

      You need to have the same number of entries in frame_numbers and in sound_notes. If one has 10 entries, the other should also have 10. Otherwise you'll get this error. Please check this and let me know if it solves the issue.

    • @Anshudancer...
      @Anshudancer... 2 ะผั–ััั†ั– ั‚ะพะผัƒ +1

      Now working. Thank you so much

    • @5MinutesBlender
      @5MinutesBlender  2 ะผั–ััั†ั– ั‚ะพะผัƒ

      Cool! Cheers!

  • @chinonsopromise4962
    @chinonsopromise4962 4 ะผั–ััั†ั– ั‚ะพะผัƒ +1

    It will be ideal to do the animation to match a music file

    • @5MinutesBlender
      @5MinutesBlender  4 ะผั–ััั†ั– ั‚ะพะผัƒ +1

      True. So we are currently working on the 2nd part of this tutorial where we will discuss how to start with any music and build an animation like this matching with your music. This tutorial will be published hopefully next week.

  • @eeldooradoo
    @eeldooradoo 5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ

    Hi! Love the video, sadly I keep on having the same error with the python. It's about my directory...how can it be "wrong"? Also, it points out a - syntaxError 'unicodeescape' codec can't decode bytes in position 2-3: truncated\UXXXXXXXX escape-. Any suggestions on how to best solve this? I would love to learn how to fix it, thanks!

    • @5MinutesBlender
      @5MinutesBlender  5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ

      Which script? Are you getting this error with this script that we discussed in this tutorial? Please send us a mail with the details (5minblender@gmail.com) like the script you're executing, your input files if any, a screenshot of the error msg from the console window. We'll help you to solve it.

  • @mastdata
    @mastdata 5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ +1

    Sir ji, there is a problem in setting the key frame.
    Q. Say, if we have any object (like a cube or an animated flag or any plane) we have to create it from the 50th keyframe, but that object should be shown on the 50th keyframe and not before it, so how can we do this? hain.

    • @DziadZabol
      @DziadZabol 5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ

      Just animate visibility of that object in outliner. Eye and Camera icons can be animated.

    • @5MinutesBlender
      @5MinutesBlender  5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ

      You can enable or disable the visibility dynamically for that object in render. For frame number 49, disable the render visibility (camera icon in the outliner) and insert a keyframe for this, then for frame number 50, enable it and insert another keyframe. Now it won't show up in the render output until frame# 50.

  • @cupidlsu
    @cupidlsu 5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ

    Hmm. When you say "downloads from the internet," whose server is that coming from? Blender Foundation? Seems like otherwise it would be dependent on operating system, right?

    • @5MinutesBlender
      @5MinutesBlender  5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ

      Can you please tell me the timestamp you are referring to? I know that I talked about the conversion from midi to mp3 from the internet, is that what you are referring to?

    • @cupidlsu
      @cupidlsu 5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ

      @@5MinutesBlender when you discuss installing midi-util at 2:45.

    • @5MinutesBlender
      @5MinutesBlender  5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ

      @@cupidlsu At 2:45 we only opened blender. I guess you are referring to 3:40 where we talked about downloading the converted mp3. Our script will generate a midi file, you can then convert this midi file using any online conversion tool, it does not depend on your operating system.

  • @flacogordo
    @flacogordo 5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ +1

    like 100

  • @sporAi
    @sporAi 5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ +1

    Hello, can you please add a Turkish translation?

    • @5MinutesBlender
      @5MinutesBlender  5 ะผั–ััั†ั–ะฒ ั‚ะพะผัƒ

      Hey I'm sorry, we don't keep our transcripts. It is possible to extract an automated transcription done by Google and convert that into Turkish, but it is too much of a task for us. Probably you can download this video and do that transcription yourself, it will be a time saver for both of us.