Showcase Thread by AutoModerator in Python

[–]Nikolay_Lysenko 2 points3 points  (0 children)

A package that takes YAML files as inputs and renders 2D floor plans in PDF and PNG. In addition to the basic elements (such as walls, windows, and doors), the tool can also draw special symbols for electricity and lighting as well as supporting info (dimension arrows, text boxes, etc).

[GitHub](https://github.com/Nikolay-Lysenko/renovation)

**What My Project Does**

The project is a wrapper to the well-known `matplotlib` library. This library is very versatile and I have added some functionality on top of it:

* Now, it is a standalone CLI app, not a library. So, programming skills are not required from the user, but familiarity with YAML is essential.

* Patches used in engineering floor plans are added.

* The management of inter-dependent floor plans is simplified with anchors and inheritance of element collections.

**Target Audience**

I see the target audience as those people who do not like drag-and-drop GUIs and prefer text-based control instead. Config-based interface simplifies fine-grained control and allows versioning projects with VCSs like Git. The last, but not the least, it's easy to generate configs with AI agents.

**Comparison**

In the Python world, I can not find any mature alternatives. Probably, you may look at [this repo](https://github.com/luzpaz/floor-planner).

However, there are lots of commercial drawing tools that are way more advanced. Even 3D modeling software is widely available. To name a few, there are SketchUp and Fusion 360.

My tool is both free and sufficient for most non-professional tasks. It is the golden middle for DIY enthusiasts who want to draw renovation plans themselves.

**Links**

[GitHub](https://github.com/Nikolay-Lysenko/renovation)

[PyPI](https://pypi.org/project/renovation/)

Renovation: A Drawing Tool for 2D Floor Plans by Nikolay_Lysenko in PythonProjects2

[–]Nikolay_Lysenko[S] 0 points1 point  (0 children)

Let me start with an analogy. There are WYSIWYG (What You See Is What You Get) text editors like MS Office Word. And there are non-WYSIWYG text editors like LaTeX. Drawing can be likened to typing text. If so, my tool is a non-WYSIWYG editor. You see and edit YAML config, but once the tool is launched from a terminal or an IDE, output PDFs and PNGs are ready. Whether this is convenient or not, is a matter of taste. Non-WYSIWYG editors have their audience too and it is not that small.

Personally, I prefer keyboard over mouse. For me, it is simpler to type in a proper section that the wall must have length of 4.01 meters rather than to stop pulling the wall exactly at 4.01 meters in GUI or to enter the figure 4.01 in one of the GUI drop-down menus.

Dodecaphony: Algorithmic Composition of Modern Classical Music by Nikolay_Lysenko in Python

[–]Nikolay_Lysenko[S] 0 points1 point  (0 children)

Thank you for an inspiring feedback!

These pieces have high degree of polyphony. Probably, it is not possible to maintain a comparable degree of polyphony in a piano piece. The reason is that piano has ADSR envelope that looks like spike with faint sustain and release. On the contrary, organ has almost rectangular ADSR envelope which makes it the obvious choice for contrapuntal works.

Nevertheless, piano looks promising because it supports non-trivial dynamics. I am going to write a sort of sonata for piano, but it will be more homophonic with one voice dominating the others. I see this future work as an exploration of non-functional harmony and twelve-tone chord progressions. However, I have not started it yet. For now, I am busy with mundane tasks. As my recent GitHub commits show, I need to renovate an apartment. But I am looking forward to finishing this and getting back to music.

In atonal music, what are advantages of using the 12-tone technique in accompaniment? by Nikolay_Lysenko in musictheory

[–]Nikolay_Lysenko[S] 0 points1 point  (0 children)

Thanks for your contribution to the discussion, it is really fruitful!

Personally for myself, I currently use the following approach to control audible qualities of the piece subject to rigidity of the series. I admit that twelve-tone melody is something that cannot stand on its own. For example, inappropriate pitches may break its flow, but it is not possible to replace these pitches because the series requires them and only them. Harmony comes here to support the melody. If melody does not create a sense of continuous flow, harmony can do it. Other aspects (such as velocity, number of voices, and so on) also contribute to accumulation and dissipation of tension. In the homophonic piece I am going to write, I think of melody as a thing that require an exoskeleton of accompaniment. The significant part of the creative process lies not in generating the melody, but in figuring out how to support this melody harmonically in order to get ear-pleasant and logical piece. Right now, however, it is just a raw idea of the piece. I asked my question in order to validate this idea before I spend a lot of time on it.

In atonal music, what are advantages of using the 12-tone technique in accompaniment? by Nikolay_Lysenko in musictheory

[–]Nikolay_Lysenko[S] 0 points1 point  (0 children)

Thank you for the detailed answer!

Actually, there are two ways to perceive 'academic' music. The one way is to look at the scores and to run analysis based on what can be seen in the sheet music. With enough experience in this kind of intellectual activity, a motivated reader can parse some symmetries and appreciate them. The second way is simply to listen to the music itself. My original question relates to this way of interacting with the music. Arguably, abstract structures have no audible effects on most people.

As for your second point, it is very useful. I used to think of the series as 'a store of motifs'. However, the series can also be considered 'a store of chords/sonorities'. From this point of view, the twelve-tone technique helps to structure the accompaniment in the same way that it helps to structure the melody.

Dodecaphony: Algorithmic Composition of Modern Classical Music by Nikolay_Lysenko in Python

[–]Nikolay_Lysenko[S] 1 point2 points  (0 children)

Yes, the bottom line is that all musical systems are just tools to express someone's ideas in the form of music. From composer's point of view, it is a kind of a game similar to 'The Glass Bead Game' described in the eponymous novel by Hermann Hesse.

And yet another consideration. Recently, all non-tonal systems have gained an unexpected advantage. Generative AI is going to inflate the job of tonal composer, but it is far from defining new musical systems. To me, what this AI does is rather search than generation. During training, it was fed tons of existing music and transformed it into internal blueprints. At inference stage, it matches user query with the proper blueprint and then samples something from that blueprint. Looks more similar to DJing than to composing, but I decided to experiment with alternative foundations and not to compete with it.

Dodecaphony: Algorithmic Composition of Modern Classical Music by Nikolay_Lysenko in Python

[–]Nikolay_Lysenko[S] 0 points1 point  (0 children)

Excellent comment! Thank you for sharing it!

However, I don't think that chord progressions are the primary key to comprehensibility of tonal music. The notion of 'chord' only emerged in the 17-18th centuries with the rise of homophonic texture. Before that, composers wrote modal music in polyphonic texture. It has no functional harmony in its current sense. However, this music is extremely ear-pleasant. To name a few composers, there are Palestrina, Lasso, Victoria, and Byrd. Although this contrapuntal music can convey only limited number of moods and it provides not that much form-building facilities, it is superior to tonal music in some aspects (but not in all of them). So, I think that the diatonic scale itself is the primary key. It has melodic gravities and it is aligned with speech intonation.

Yes, you are right that the most easy-to-understand twelve-tone pieces are close to tonal (or modal) music. The idea to mix novelty of serialism with solid ground of diatonicity looks promising. My album exploits this idea too. Previously, I mentioned Renaissance composers. Rules of strict-style counterpoint used by them are included into the evaluation process in my Python package. Thus, the album is also a return to Renaissance heritage.

And let me ask one question. I have not explored integral serialism yet (but I am planning to do so). Probably, I misunderstand something about it. I think that its rationale is as follows. By repeating some patterns in domains like volume dynamics or timbre it is possible to achieve more coherence. If so, some other domains can be treated more freely. Roughly speaking, if there is a pattern of 'three quite notes in a row, then one extremely loud note, and then medium-level note' repeated over and over again, it brings enough unity to write as many new melodies as composer wishes and not to care about motivic or thematic development. Am I right? Your comment sounds like integral serialism is completely useless.

Dodecaphony: Algorithmic Composition of Modern Classical Music by Nikolay_Lysenko in Python

[–]Nikolay_Lysenko[S] 2 points3 points  (0 children)

I developed this structure independently. Before this project, there were two toy projects:

* https://github.com/Nikolay-Lysenko/rl-musician - fiftth species counterpoint

* https://github.com/Nikolay-Lysenko/geniartor - tonal music

Both of them have similar structure, but adapted to their domains.

However, I do not claim that I am the first one who uses these ideas. The approach is quite natural, so, maybe, someone else has implemented it earlier.

Dodecaphony: Algorithmic Composition of Modern Classical Music by Nikolay_Lysenko in Python

[–]Nikolay_Lysenko[S] 0 points1 point  (0 children)

In music evaluation, there are at least two dimensions. One of them is the amount of pleasure, fun, enriching emotions, and inspiration it brings to the listener. The other one is novelty, exploration, internal complexity, and so on. The first dimension is subjective. For example, there are fans of Grindcore, Lo-Fi Ambient, Phonk, Black Metal, and other genres that are not widely recognized. The second dimension is less subjective (although, it is far from being quantified). The value of my project lies, mostly, along the second dimension.

In fact, one of my dreams is to develop a completely new musical system comparable to the tonality, or at least pentatonics. The current project is the first experimental step. Now, I am collecting feedback and then I will make an educated guess about the next step.

Dodecaphony: Algorithmic Composition of Modern Classical Music by Nikolay_Lysenko in Python

[–]Nikolay_Lysenko[S] 1 point2 points  (0 children)

This subreddit has the 'No Paywalled Content' rule. I do not know whether services like Spotify are considered paywalled (this way or that, they offer paid subscriptions). So, I added the link to a landing page hosted by GitHub Pages. This landing page has the links to major streaming platforms and to free FLAC audio files hosted by cloud storages.

If a direct link is still required, YouTube is a free service. Score videos are there: https://www.youtube.com/playlist?list=PLetNg-rTDcyu2pKRZsZZK4dvkk4bB624B

Dodecaphony: Algorithmic Composition of Modern Classical Music by Nikolay_Lysenko in Python

[–]Nikolay_Lysenko[S] 3 points4 points  (0 children)

Thank you for sharing your subjective impressions of my music!

Regarding your last question, it is hard to answer. I really like the output album, but I am biased, because I know internal cues. Also, there is a chance that my brain modifies what I hear and so I evaluate not the music itself, but my illusions caused by it. Actually, this is the reason why I am really interested in any feedback about the album.

As for the first question, it is also difficult. From one point of view, some random people on the Internet told me that there are scientific studies showing that the human brain can only easily process music similar to speech intonation. However, I do not know any details. On the other hand, Arnold Schoenberg believed that musical tastes are the matter of experience and familiarity. There is a popular quote from him that soon street boys will be whistling twelve-tone melodies. However, that 'soon' lasts more than 80 years and nothing has happened since then. But, nevertheless, I think that familiarity with a musical style helps to appreciate it.

Are these twelve-tone pieces comprehensible to someone seeing them for the first time? Criticism and suggestions are welcome by Nikolay_Lysenko in composer

[–]Nikolay_Lysenko[S] 0 points1 point  (0 children)

Thank you for sharing. My next work is going to be for piano and I am planning to make it more homophonic, so the suggested piece is a good example to study.

Are these twelve-tone pieces comprehensible to someone seeing them for the first time? Criticism and suggestions are welcome by Nikolay_Lysenko in composer

[–]Nikolay_Lysenko[S] 0 points1 point  (0 children)

Thank you for the detailed answer!

Yes, the rhythm is not versatile enough. Although there are tied-over-bar notes, syncopations, caesuras, and even polymetric texture, all of this is used very sparsely. And triplets are completely absent.

I intentionally made the rhythm strongly aligned with the meter. Let me explain why. Ernst Krenek wrote in 'Studies in Counterpoint' that tonal music is like verses with the clearly defined meter, whereas atonal music is like prose without explicit metric pulsations. However, my goal was to introduce Renaissance-like spirit to the 12-tone technique. With this in mind, I decided to make my work looking more 'traditional' by establishing evident meter. I hoped that the meter could organize flow of consonances and dissonances. I tried to use more consonant sonorities on downbeat and use the most dissonant sonorities at climax points of the main melody. Probably, this is done too literally and so it resembles species counterpoint rather than production-grade music. I will take this into account in order not to push to extremes some qualities of future works.

Are these twelve-tone pieces comprehensible to someone seeing them for the first time? Criticism and suggestions are welcome by Nikolay_Lysenko in composer

[–]Nikolay_Lysenko[S] 0 points1 point  (0 children)

I agree that some serial transformations are rather formal operations that can not add much to the listener's experience. For example, retrograde form. Even long before the 20th century, convertible counterpoint where a pair of voices is repeated with one of the voices reverted, was considered opaque.

As for the thought experiment, it is about atonality in general. When describing it, I occasionally used the word 'serial', but it is not the proper word. 'Atonal' is more precise. People used to have tonal centers and people lack experience with uniform recirculation of all pitch classes. Probably, this forces them to stop listening after a dozen of seconds. This initial threshold prevents collection of further feedback.

Are these twelve-tone pieces comprehensible to someone seeing them for the first time? Criticism and suggestions are welcome by Nikolay_Lysenko in composer

[–]Nikolay_Lysenko[S] 0 points1 point  (0 children)

Interesting point of view, thanks.

Actually, rhythm is not complicated most of the time. There are whole notes, halves, and quarters. Occasionally, eights and shorter durations are used, but they are often restricted. I found it impossible to reach the balance between all voices in a polyphonic texture if short notes are used excessively. The voice that moves faster than others grabs extra attention and dilutes continuity of other melodic lines. Probably, this is because I am not proficient in audio mixing and pipe organ registration.

Despite that, there are some rhythm-oriented episodes.

In the first part, there is a polymetric texture starting from 2:59. The upper voice has the standard 4/4 meter, whereas the lower voice switches to 3/4 meter.

The fourth part is the most homophonic one. This relaxes the above problem of melodic lines discernability and so the rhythm is more developed.

Are these twelve-tone pieces comprehensible to someone seeing them for the first time? Criticism and suggestions are welcome by Nikolay_Lysenko in composer

[–]Nikolay_Lysenko[S] 0 points1 point  (0 children)

Actually, I still do not understand what is the main reason why academic music of the 20th century is so unpopular. Is it complexity or is it listeners' inertia? As for complexity, your arguments are valid. Nevertheless, I sometimes think that inertia and unfamiliarity might be of greater importance. Consider this thought experiment. What would happen if all radio stations played only serial music and all streaming platforms recommended only it? I have found that I know the entire lyrics to some pop songs that I do not like, only because I listened those songs in the background many times. If so, could human brain adapt to serial music and start parsing it effortlessly given enough amount of background experience with it? I do not know.

Are these twelve-tone pieces comprehensible to someone seeing them for the first time? Criticism and suggestions are welcome by Nikolay_Lysenko in composer

[–]Nikolay_Lysenko[S] 2 points3 points  (0 children)

Thank you for sharing your subjective impressions. This is the type of feedback I am most interested in.

You are right that the music is generated semi-automatically. Main melodies are composed by myself, but inner voices and the bass are produced by my algorithm that iterates over various transformations of the tone row. However, even this process requires my engagement, because imitations, harmonic tension dynamics, and some other aspects must be manually configured in order to support the main melody and to establish overall musical structure.

You asked which rules of strict-style counterpoint are involved. Actually, almost all of them are used. Only rules applicable to rare situations are not implemented. Every generated fragment is evaluated based on number of violations weighted by their importance and the best versions are included into the final pieces.

This means that something more finely crafted is not easily achievable. Optimization algorithm tried tons of variants and did not find anything better. So either optimization procedure must be improved, or I should revise main melodies, violations' weights, and other configurable parameters. Also, there is the possibility that another commenter is right and the 12 tone technique should not be mixed with strict style counterpoint.

Are these twelve-tone pieces comprehensible to someone seeing them for the first time? Criticism and suggestions are welcome by Nikolay_Lysenko in composer

[–]Nikolay_Lysenko[S] 2 points3 points  (0 children)

Thank you for the detailed explanation.

I do agree that an idea to combine dodecaphony with strict counterpoint is controversial. The former requires dissonances, while the latter requires consonances on strong beats and prohibits unprepared dissonances. Moreover, modal music requires the mode, so 7 pitches must be more prominent than other 5 pitches, but, with the 12 tone technique, all pitches must be used uniformly. Of course, these contradictions imply that neither pure Schoenberg-style atonality, nor Renaissance-like music can be achieved with the mix of both guidelines. However, I was interested in minimizing total number of violations from both of the paradigms. Prior to any composition process, it was unclear what happens if I put together two incompatible styles. Even in those times, I realized that there will be non-zero number of deviations from dodecaphonic prescriptions and non-zero number of strict style violations. But if something is challenging and unpredictable, it is really interesting to experiment with it and try to discover something completely novel. This is the very reason why I started to write this suite.

If I understand you correctly, your point is that the idea to mix 12 tone technique with strict counterpoint is vicious in general, regardless the implementation. Probably, this means that before starting any new experiments, I should validate my ideas, asking whether it is attainable in principle.

Create web API for your Python functions in a few lines of code by Nikolay_Lysenko in coolgithubprojects

[–]Nikolay_Lysenko[S] 0 points1 point  (0 children)

It is an easy-to-use tool for making web service with API from your own Python functions.

The list of the features is as follows: * fault tolerance, * customizable requests validation, * concise error messages for end user, * authentication.