a set of chord progressions can be seen as a combination of multiple vectors, which results in a form of matrix with lines and columns indexed)īecause of that, note, chord and scale classes can all be arithmetically used in calculation, with examples of Linear Algebra and Discrete Mathmetics. The chord class is the set of notes, which means that it itself can be seen as a set of integers, a vector, or even a matrix (e.g. Note, chord, scale are the basic classes in musicpy that builds up the base of music programming, and there are way more musical classes in musicpy.īecause of musicpy's data structure design, the note class is congruent to integers, which means that it can be used as int directly. Anyway, this is just an example of a very short piece of electronic dance music, and not for complexity.įor more musicpy composition examples, please refer to the musicpy composition examples chapters in wiki. ![]() If you think this is too simple, musicpy could also produce music like this within 30 lines of code (could be even shorter if you don't care about readability). Place this line at the start of the files you want to have it used in. Musicpy is all compatible with Windows, macOS and Linux. You can download this musicpy editor at the repository musicpy_editor, the preparation steps are in the README. I strongly recommend to use this musicpy editor to write musicpy code. In addition, I also wrote a musicpy editor for writing and compiling musicpy code more easily than regular python IDE with real-time automatic compilation and execution, there are some syntactic sugar and you can listen to the music generating from your musicpy code on the fly, it is more convenient and interactive. You also need to install freepats to make the play function works on Linux, you can run sudo apt-get install freepats (on Ubuntu). You can run pip install pygame=2.0.2 in terminal to install pygame 2.0.2 or any version that is older than 2.0.3. Note: On Linux, you need to make sure the installed pygame version is older than 2.0.3, otherwise the play function of musicpy won't work properly, this is due to an existing bug with newer versions of pygame. Run the following line in the terminal to install musicpy by pip. Make sure you have installed python (version >= 3.7) in your pc first. You can click here to download the entire wiki of musicpy I written in pdf and markdown format, which is updating continuously. The syntax and abilities of this wiki is synchronized with the latest released version of musicpy. This wiki is updated frequently, since new functions and abilities are adding to musicpy regularly. See musicpy wiki for complete and detailed tutorials about syntax, data structures and usages of musicpy. On the other hand, you should be able to play around with them after having a look at the documentation I wrote if you are already familiar with music theory. Because musicpy is involved with everything in music theory, I recommend using this package after learning at least some fundamentals of music theory so you can use musicpy more clearly and satisfiedly. ![]() The syntax of musicpy is very concise and flexible, and it makes the codes written in musicpy very human-readable, and musicpy is fully compatible with python, which means you can write python codes to interact with musicpy. You can easily output musicpy codes into MIDI file format, and you can also easily load any MIDI files and convert to musicpy's data structures to do a lot of advanced music theory operations. It can generate music through music theory logic and perform advanced music theory operations. With musicpy, you can express notes, chords, melodies, rhythms, volumes and other information of a piece of music with a very concise syntax. This package can also be used to analyze music through music theory logic, and you can design algorithms to explore the endless possibilities of music, all with musicpy. Musicpy can do way more than just writing music. ![]() It is easy to learn and write, easy to read, and incorporates a fully computerized music theory system. Musicpy is a music programming language in Python designed to write music in very handy syntax through music theory and algorithms. Have you ever thought about writing music with codes in a very concise, human-readable syntax?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |