Code Meowstro
Code Meowstro
  • 13
  • 16 543
How to create L-Systems with Python: A Creative Coding Tutorial
Discover Lindenmayer Systems (L-Systems) in this Python tutorial for creative coders, programmers, students and anyone interested in generative art or music.
In this video, you’ll learn:
What L-Sytems are and how they work
How to implement basic L-Systems in Python
Tips for enhancing and customising L-Systems
Look out for an upcoming video on using L-Systems with the Music21 library to generate music.
Переглядів: 25

Відео

How to generate Euclidean Rhythms with Python and Music21
Переглядів 2943 місяці тому
This video will explore how to create interesting rhythms based on the theories of Ancient Greek mathematician, Euclid rhythms, using Python's Music21 library. We'll cover the theory behind Euclidean rhythms, how to write a Python function to generate Euclidean rhythms using concepts like base duration and remainders, how to represent these rhythms in notation and how to create variations with ...
Music21 and Python: Composing with Random Walks
Переглядів 3987 місяців тому
In this video, we explore how to compose with random walks. We start by implementing a basic random walk function using the Music21 and random modules. Then, we expand upon this by exploring various enhancements,
Music21: Composing with the Harmonic Series and Python
Переглядів 4718 місяців тому
In this video, we'll explore the harmonic series and how to harness its power for music composition using the Python library Music21.
Music21: A Deep Dive into Scale Manipulation with Python
Переглядів 9869 місяців тому
This video dives deep into Music21's scale module. After learning how to create common scales (such as major, minor, modes, chromatic, octatonic, and whole-tone scales), it explores how we can build unique custom scales with music21's CyclicalScale class. We then draw upon this functionality to create a program that 'translates' a melody from one scale to another.
Simplify Your Music21 workflow with TinyNotation in Python
Переглядів 3809 місяців тому
In this video, we explore how TinyNotation, a feature of Music21, allows you to create scores using a simple string of characters. We'll code musical snippets together and cover the basics of TinyNotation, including the syntax for specifying pitches, durations, and more using TinyNotation characters.
Creating Complex Rhythms with Tuplets in Music21 for Python
Переглядів 47511 місяців тому
This in-depth tutorial explores how to create complex rhythms using the Music21 Python library by recreating, in code, one of composer Brian Ferneyhough's rhythmic processes.
How to create and analyse chords in Music21
Переглядів 1,5 тис.Рік тому
In this video, we explore how to create and analyse chords in Music21, a Python library for music analysis and manipulation. We will see how to construct chords and how to use various attributes and methods of the chord class to obtain harmonic information. We will also explore the 'chordify' feature, which can transform a stream of music into a series of chords.
Music21 for Composers: How to Write Music with Twelve-Tone Rows and Serial Techniques
Переглядів 724Рік тому
This video explores how composers can apply serial techniques to manipulate pitch and rhythm with code examples and demonstrations using the Music21 Python library.
How To Work With The Corpus And Your Own Files In Music21
Переглядів 1,2 тис.Рік тому
In this video, you will discover how to access internal and external works in various file formats, and how to use various tools to parse and analyze them in Music21. You will also learn how to recurse through the nested structure of a score and perform different operations on the elements of the score.
A Guide to the Basics of Rhythm and Duration in Music21
Переглядів 1,2 тис.Рік тому
This tutorial explores how to represent and notate musical durations using Python's Music21 library; then demonstrates how to combine individual note durations into sequences to create rhythms.
Musical Containers: Working with Voice, Part and Score in Music21
Переглядів 1,8 тис.Рік тому
In this video, we explore the Stream class, a powerful container object for other musical objects such as notes, rests, and time signatures. Specifically, we examine its crucial subclasses, Voice, Part, and Score, each with its unique purpose and functionality for organizing musical ideas and compositions.
Introduction to Music21 for Python
Переглядів 7 тис.Рік тому
In this introductory tutorial on Music21, we'll explore how to download and install Music21, and go over the basics of its musical objects and how they can be manipulated and analyzed.

КОМЕНТАРІ

  • @punksterbass
    @punksterbass 16 днів тому

    Super useful video! Is there a way for displaying nested tuplets on music21?

    • @codemeowstro1701
      @codemeowstro1701 15 днів тому

      Hi. It is possible to create nested tuplets simply by appending additional 'Tuplet' objects to a duration. Unfortunately, however, these will not display accurately in Musescore or Finale (they will render in midi).

  • @Shunarjuna
    @Shunarjuna 20 днів тому

    Just finished watching the whole playlist. Super appreciative of your work. Are there any other resources you can recommend for learning music21 besides the official documentation?

    • @codemeowstro1701
      @codemeowstro1701 18 днів тому

      I'm really glad you have enjoyed my videos. I understand why the official documentation may seem a bit daunting. Music21 is packed with features (possibly a bit bloated in places), so beyond the basics, you may find some of these are redundant. I don't know of any other resources specifically about Music21 but I think the best way forward is to experiment.

  • @Shunarjuna
    @Shunarjuna 21 день тому

    Thanks so much for making these videos. I'm so lost with the documentation.

  • @ToVanDang
    @ToVanDang Місяць тому

    Can Music 21 show or generate the chord progression? I'm very curious about this.

  • @blackrachmaninov
    @blackrachmaninov 2 місяці тому

    Nice :) Is there a way to get the chord as Jazz notation? For example C7 or Cm7b9 ?

  • @germainp
    @germainp 2 місяці тому

    Hey! Nice content! I think it would be great to also play out the music that is created. Either manually by playing it yourself on your midi keyboard or by converting your output to a midi file besides the music score?

  • @Leao_da_Montanha
    @Leao_da_Montanha 3 місяці тому

    Super cool! I'm grateful for The Algorithm God for giving me fine content today. I've been looking for a great recommendation that's genuinely interesting and not just another clickbait

    • @codemeowstro1701
      @codemeowstro1701 3 місяці тому

      Thank you; this is really encouraging! I'm very happy you found my content and have enjoyed it.

    • @Leao_da_Montanha
      @Leao_da_Montanha 3 місяці тому

      @@codemeowstro1701 🙂

  • @LucaBovelli
    @LucaBovelli 4 місяці тому

    could you use chordify with mp3 or wav too?

    • @codemeowstro1701
      @codemeowstro1701 4 місяці тому

      Converting an audio recording to notation is still a challenging task and so unfortunately it isn't possible to apply chordify to audio files, such as MP3 and WAV. You can use chordify with MIDI files.

  • @xaviersexton3013
    @xaviersexton3013 4 місяці тому

    The bass line is showing but the harmony and melody aren't showing. Any help? I am using musescore 4 and python 3.12.3

  • @sitrakarazafindrabe6260
    @sitrakarazafindrabe6260 4 місяці тому

    Hello, I would like to know if I could use the corpus of classical music available in music21 to constitute a dataset in my music-generating AI project, this is a question relating to copyright and authorization for such use

    • @codemeowstro1701
      @codemeowstro1701 4 місяці тому

      Hi. I can't answer definitively but I believe so. The corpus is freely distributable but it may also depend on where you are located.

  • @Intenzity
    @Intenzity 4 місяці тому

    Great stuff! There are not a lot of real world examples of Music21 out there, it's mainly just the docs, so great to it in action! subbed! I have a ton of Music21 code to analyze jazz standards and solos, it's great.

  • @MindlessTurtle
    @MindlessTurtle 7 місяців тому

    That is so cool! Would love to see this with chords.

    • @codemeowstro1701
      @codemeowstro1701 7 місяців тому

      I'm glad you enjoyed it. You can take a few different approaches to create chords or chord progressions with random walks. One way, for example, is to apply random walks to create separate voices before combining them to make chords. Another way is to use a random walk to move through a list of chords.

  • @magatamass
    @magatamass 8 місяців тому

    how do you work with mp3 files? edit: as in, import an analyze?

    • @codemeowstro1701
      @codemeowstro1701 8 місяців тому

      Hi. Parsing mp3 files into music notation would be very difficult and unfortunately, it's not possible to do this in Music21.

    • @magatamass
      @magatamass 8 місяців тому

      @@codemeowstro1701 Thx. WIll try Spleeter then. And see what i can do with that.

  • @fourhymns-worship
    @fourhymns-worship 8 місяців тому

    Thank you. Is this just intonation? It would be interesting to hear these compositions. Keep up the good work.

    • @codemeowstro1701
      @codemeowstro1701 8 місяців тому

      Thank you, I'm glad you've enjoyed it. Just intonation is indeed derived from the harmonic series.

  • @AVUREDUES54
    @AVUREDUES54 9 місяців тому

    This is phenomenal!! I'm so glad I stumbled onto this video. This is something I didn't even know I was looking for, I've just been doing hackjob pieces of it on the fly as needed with different projects. My only feedback is that the presentation was a little flat- It would be easier to follow with more pauses between distinct ideas and deliberate verbal emphasis on important points. Still, the clarity of word choice was great, and the ideas were structured well for the presentation! Are you the author of this module? What inspired you to make this? I can't wait to play around with it this weekend!

    • @codemeowstro1701
      @codemeowstro1701 9 місяців тому

      Thank you, I really do appreciate the feedback. I'm quite new to UA-cam so hopefully, my delivery and pacing will improve as I make more videos. I'm not an author of Music21; I'm a musician with a particular interest in computer-aided composition and have found it to be an especially valuable tool.

    • @AVUREDUES54
      @AVUREDUES54 8 місяців тому

      @@codemeowstro1701 I would describe myself the same way. What are the odds two musicians with a particular interest in computer aided composition might find themselves here 🤔 Would you be interesting in sharing more of what you're working on? I'm very curious, I've never really spoken to someone else with this specific intersection of interests

  • @joshuacoppersmith
    @joshuacoppersmith 9 місяців тому

    Thank you! Music21 looks amazing and your presentation was clear and concise (at least for someone with some programming experience). This is a whole world of possibilities. But I doubt I'll be generating scores in Python. Rather, I'd really love to see a workflow for exporting a part from Musescore 4 into Python, manipulating it as a Music21 object, then importing it back into Musescore. The programmer in me might watch your vids with excitement, but watching would be about as far as it goes if there is no way to integrate the results into more bread-and-butter musical work.

    • @codemeowstro1701
      @codemeowstro1701 9 місяців тому

      Thanks for your comment. I agree that the best use of music21 itself is likely not to generate entire scores from scratch but as a tool to enrich specific aspects of the compositional process. If you intend to use Music21 and Python to manipulate scores that you have generated in notation software, including Musescore, Sibelius, Finle and Dorico, the best approach is to export your work as a MusicXML file, this can then easily be loaded into Music21 using converter.parse(). I recommend watching my video, 'How To Work With The Corpus And Your Own Files In Music21', which shows how to do this. I'm also open to making a more in-depth video specifically focused on importing and exporting files if this would be helpful.

  • @NguyệtNguyễn-q7z9i
    @NguyệtNguyễn-q7z9i 9 місяців тому

    How can install system?

  • @randomdude2540
    @randomdude2540 10 місяців тому

    Great work man! Just discovered the niche intersection where music meets code, and this channel is clearly the best resource on UA-cam for that. Very helpful! I hope you upload more on the subject.

    • @codemeowstro1701
      @codemeowstro1701 10 місяців тому

      Thank you! Your comment is truly appreciated and I am encouraged. I will certainly continue to upload.

  • @ElectroIl
    @ElectroIl 11 місяців тому

    Hello, may I know why I keep getting F-quartal trichord instead of C Suspended Fourth. How can I specify the root note of a chord? from music21 import chord stack = chord.Chord(["C4", "F4", "G4"]) stack.root("C4") chord_name = chord.Chord(stack).pitchedCommonName print(chord_name)

    • @codemeowstro1701
      @codemeowstro1701 11 місяців тому

      Hi, This is due to how music21's chord representation works. The music21 library uses a chord.tables module to determine chord names. Unfortunately, this module does not include suspended chords within its database. It would be possible to extend the library's behaviour or write your own function to do this. Your code sample already specifies the root as C4; you can confirm this by printing stack.root().

  • @franciscoaragao5398
    @franciscoaragao5398 Рік тому

    Inscrito. Muito bem.

  • @mareikemuller5255
    @mareikemuller5255 Рік тому

    🌷 promo sm

  • @wassilijstrugalski934
    @wassilijstrugalski934 Рік тому

    Just grasped all the essencial aspects of "decision & automatism" in totally serial composition with music21 in 10 minutes(!) One of the most concentrated video tutorials I've ever watched. Thank You!)

  • @mr.shredder5430
    @mr.shredder5430 Рік тому

    what do you use to make the UI

    • @codemeowstro1701
      @codemeowstro1701 Рік тому

      Hi. I'm not using a UI in this program; only vscode. Perhaps you're referring to the notation? If you have Finale, Sibelius or Musescore installed, you can use .show() to view a notated version of a Music21 object.

  • @mr.shredder5430
    @mr.shredder5430 Рік тому

    hi i want to make tonic solfa sheet editor with real time play back functionality so can i use music21 to make music sheet editor software

    • @codemeowstro1701
      @codemeowstro1701 Рік тому

      This sounds like an interesting project. Whilst I don't think this can be done in Music21 alone, it should certainly be possible in Python. I suggest having a look at PyGame for real-time midi playback.

  • @aarrowaudio
    @aarrowaudio Рік тому

    Really cool to so how much of this was considered/built into this library. I can see myself experimenting with a lot of ideas through this. And without having to write a ton of my own functions! I'm curious, though: Are there any function for analyzing things in terms of serial techniques (like, say, calculating the interval class vector or pc set from a given group of notes?)

    • @codemeowstro1701
      @codemeowstro1701 Рік тому

      I'm glad you're finding this helpful. Regarding your question, there are a number of features that enable pitch class set analysis. Many of these are methods of the Chord class, such as forteClass(), intervalVector(), normalOrder() and getZRelation().

  • @biotronics
    @biotronics Рік тому

    Heyyy these videos are very informational ty for these. I have 0 coding experience I am more of a musician I was trying to see if there was an app that turns Guitar tablature into sheet music and I couldnt find anything specific. However, after doing some research I found out I would have to use music21 to do this. and you seem knowledgeable. if you had to do such a thing how would u do it?? Have a nice day <3

    • @biotronics
      @biotronics Рік тому

      from music21 import converter, instrument, note, stream def tab_to_sheet(tab): # Create a new stream to hold the sheet music sheet_music = stream.Stream() # Set the instrument to guitar guitar = instrument.Guitar() sheet_music.insert(0, guitar) # Split the tab into individual lines lines = tab.split(' ') for line in lines: # Remove whitespace and empty lines line = line.strip() if not line: continue # Split the line into individual notes or chords notes = line.split('-') for n in notes: # Check if the note is a chord if 'x' in n: # Create a chord object chord_notes = [note.Rest()] # Placeholder for rest chord_duration = 0 # Iterate through each character and create individual notes for c in n: if c.isdigit(): fret = int(c) note_obj = note.Note() note_obj.pitch.midi = 40 + fret # Assuming standard guitar tuning chord_notes.append(note_obj) elif c == 'x': chord_notes.append(note.Rest()) else: # Handle other symbols like hammer-ons, slides, etc. pass # Determine the duration of the chord (e.g., by counting dashes) chord_duration = len(5) # Customize this based on your tab notation # Create the chord and set the duration chord = chord_notes chord.duration.quarterLength = chord_duration # Add the chord to the sheet music sheet_music.append(chord) else: # Create a single note object note_obj = note.Note() note_obj.pitch.midi = 40 + int(5) # Assuming standard guitar tuning note_obj.duration.quarterLength = 1 # Customize the duration based on your tab notation # Add the note to the sheet music sheet_music.append(note_obj) return sheet_music # Example usage tab = """ e|------3--5--7-----5--3------------------| B|--------------------------5--7--5--------| G|--------------------------------7--4--2-| D|----------------------------------------| A|----------------------------------------| E|----------------------------------------| """ sheet_music = tab_to_sheet(tab) sheet_music.show()

    • @biotronics
      @biotronics Рік тому

      This is what I got so far (using ai) idk if this is of any help?

    • @biotronics
      @biotronics Рік тому

      I ran it on pycharm after installing pip music21 and python (you can probably tell that I have no idea what I am doing)

  • @aarrowaudio
    @aarrowaudio Рік тому

    I messed with music21 a long time ago and remember getting stuck on a few things. Really cool your making these videos I'm curious how it interacts with midi information, any means for easy conversion between the two formats? I'd also like to know how the 'chord' object really works. What things does it store, what functions does it have, can it do things like name a chord from a collection of notes, or return a collection of notes from a chord name?

    • @codemeowstro1701
      @codemeowstro1701 Рік тому

      Thank you, I'm pleased you're finding them helpful. I am planning to make a video about working with chords. I haven't worked very much with midi but it is a supported format so I will look into it.

  • @anikascorner
    @anikascorner Рік тому

    Thank you for your videos! I want to know how to take notes as well as it's octave that I've extracted from a muiscxml file and make a new score with these note names labeled under each note in the score...how would I go about this?

    • @codemeowstro1701
      @codemeowstro1701 Рік тому

      Certainly. That's quite easy to do; I can make a video that goes into more detail about working with musicxml.

  • @SB-sh4oe
    @SB-sh4oe Рік тому

    Very good videos. Thanks a lot. I am looking forward to your next one. One interesting topic for me is to know how to extract/process instruments separately. For example, create a separate midi file for each instrument.

    • @codemeowstro1701
      @codemeowstro1701 Рік тому

      Thanks, I'm glad you're enjoying them. To do that, you can follow a similar approach to the example in this video; use recurse and then iterate to extract each part object. I hope this helps.

  • @bodiesinthewater
    @bodiesinthewater Рік тому

    Thank you a lot

  • @MariannaKowal
    @MariannaKowal Рік тому

    Very interesting! I am just reading the user manual on their website, but your verbal explanation is very helpful! Could you record a video on how to create and analyze music that is not in their corpus? I barely understand it when I read it...

    • @codemeowstro1701
      @codemeowstro1701 Рік тому

      Sure; to do that you can use converter.parse() to convert supported file formats, such as musicXML into a Score. I plan to make a few videos about analysis.

    • @MariannaKowal
      @MariannaKowal Рік тому

      @@codemeowstro1701 It would be sooo great! Please do it :D The way you explain things is so much easier for me than reading about this :)