In the previous part of this series, we started with the basics for kicking off a new Django project. We prepared our virtualenv, installed needed modules to it, created and integrated a new Heroku – project for it and learned how to work with variables in Heroku to control our application with an easy example. We also learned how to check our results locally before we publish it to our production space and how we can add an addon to our Heroku project by adding a PostgreSQL database to it.
In the previous part of this series, I tried to give you a brief yet thorough introduction to hosting your projects with Heroku.
That part was special because it was a completely optional part of this series; if you prefer to host your applications on a different platform and skipped that article, I’d like to repeat that this is completely OK and that I had shown nothing you will need for anything different but interacting with Heroku. You will hopefully notice no blank spots in the following articles. There is no need to read that article if you do not plan to use Heroku for hosting your bot. But you should be familiar enough with your hosting solution of choice to adopt the Heroku – commands I show here to an adequate setup for your hosting solution.
Today we will finally start creating our bot with Django. What we did up until now was just some kind of preparation and establishing background. In this part, we will finally start with the real stuff. 💪
In the previous part of this series, I tried to explain the differences in the two modes a Telegram bot supports: pull (getUpdates) and push (Webhook) methods. I also explained what a webhook is and how to easily giving it a test-drive, without any hassle.
Today we will talk about what Heroku is and about how to prepare your workstation to effectively work with that platform.
If you do not like Heroku or if you simply want to use another hosting service for your bot like AWS, OpenShift, Google Cloud Platform, whatever for any reason: That is perfectly OK and you can do so! I will write this and the next article on Heroku in a way that even when you decide to skip it completely, you won’t miss anything from this Telegram/Python/Django article series but the presentation of how to get the bot hosted on Heroku.
The only thing which you won’t be able to follow 1:1 in the upcoming parts of this series is that you can’t use those commands to trigger new deployments to the hosting platform with or do some minor, hosting platform related steps. But if you are advanced and familiar enough with deploying web applications to have a better idea of hosting an application than me, this shouldn’t be much of a problem for you, since most commands for Heroku are pretty straightforward and easy to adapt for a different system.
Recently, I had the issue with my Mint Linux machine’s audio that when the volume of what is played dropped below a threshold, that channel was muted completely. I experienced this especially unpleasant when I had my headphones on since in passages with low volume, the sides switched from “low volume” to “completely off” independently multiple times each minute. It sounded as if there was a broken cable causing a loose contact.
After some searching, I found the solution here:
This can be solved by editing the pulseaudio configfiles as user root. First open the following file in your prefered texteditor as root:
In that file, locate the section “[Element PCM]”. On my Linux Mint 18.3 system, this looked like this:
Change this to the following:
The original article suggests to experiment with the
volume-limit value but for me, this worked already perfectly. So I did not invest too much time validating this.
I’d love to provide additional details on what these parameters are doing in detail actually, but the truth is that I could not find that info anywhere! I checked the comments in the source code, but these describe a completely different meaning for this:
;volume=ignore|merge|off|zero# What to do with this volume: ignore it, merge it into the device
;# volume slider, always set it to the lowest value possible, or always
;# set it to 0 dB (for whatever that means)
+;volume-limit=<volume step># Limit the maximum volume by disabling the volume steps above <volume step>.
Feel free to add this info to the comments and I will update this article.
/etc/pulse/default.pa’ (line 53~) and setting:
/etc/pulse/daemon.conf’ did make the volume control more usable for me.
I can only tell that I did not need any of these to make the issue go away, but maybe this is a valuable info in case this doesn’t work for you like it did for me.
After the changes are in place, you need to restart the PulseAudio daemon as your default user. You do not need to be root for this:
When I did that, my music stopped immediately and I could not make it work again without a restart of the system;
pulseaudio--start did not work either. But since that restart of the system, I do not have any drops even at the lowest volumes anymore.
Today I will explain a bit more on how the HTTP API works, how the JSON data provided by the bots ist structured and I will introduce you to telepot, the Python module of my choice for interacting with Telegram bots using Python.
Recently, I finished my first Django application ✌. Since it took me some time to find a proper starting point to wrap my head around the basics of Django well enough to actually do something with it (apart from following tutorials, which pretty much all aim for creating a polling app for any reason 😋), I’d like to recap and share that journey by writing this article about that.
I will describe the project, my thoughts and considerations about it and every step which has lead to what the project has become. I will try my best to make this a guide which everybody can follow along if he wants.
Also, I will make this a series, to not end up with an article so long and boring, that even interested readers cannot afford to read it in their spare time.
In this first part of the series, I will explain what this series will be about, mainly.
Even though we are close friends, I (among others) only learned about this project quite late, when large parts of it were made and recorded already in the middle of December 2017. This was because “Era Capricorn” was started as a personal, these two persons only – like project. The two of them did not want any distractions or being blocked by having to align anything with anyone else or have pushing-like “suggestions” in the way of their very own creativity process; which I consider a perfectly understandable decision. In the end, this is their first time record also and no one is immutable and ultimately confident in their mindset in that situation, no matter what distractions, alternate opinions or impediments may appear on that road ahead.
Even though everything was quite final already in December 2017, it took another 4 months (until April 2018) to fine-tune on the details before the first package containing the finished records could be ordered and be shipped by the CD / printing company.
Alex told me, that they wanted to make this first record something which is truly and completely their own minds child without anybody else possibly altering the outcome. This is not only true for the main content (the music), but also for everything else like the cover artwork, the overall design, the ordering process at the printing- and CD company, coordination with GEMA and so on.
Alex, who is also a capable hobby photographer, took the cover shot in the woods of a nature reserve, close to their home place when there has been an unusual amount of snow for that region. Marina also was part of that photo session and supported during the choice of a composition of the image structure and layout. After the shot was taken, the two of them post-processed the image on their own at home, arranged the Capricorn to match that scene, hassled around with the printer’s CMYK requirements, and so on.
Marina even created a unique font for this, instead of just using something prebuild from the internet; all to make this record something as unique as themselves and the music it contains.
When they told me that they are in the final sprint to self-release their first album, I expected to receive some songs as MP3 or some self-burned and Ink-Printer labeled CD. But what they delivered is a professional appearing, full-fledged CD with only the barcodes and labels missing, compared to a label backed release:
Why am I talking so much about how appealing the design of the CD is and how much work was spend on having a nice overall appearance? Why don’t I start with the main content – the music?
Because I’m convinced that often self-releasing bands, especially primers and even more instrumental ones are misjudged in several ways. Instead of accepting the absence of lyrics as an intentional compositional decision, some judge it as “They did not even find a good singer!” or “They seem to have no lyrical skills!“. If any instrument or arrangement sounds unusual, famous and settled bands are conceded to make use of some artistic freedom and being “refreshing” or similar, while primers are judged to not being experienced or skilled enough to make it successfully sound like the well-established schema from a can.
That’s why I started to point out how much efforts and heart blood has lead to this record before.
As pointed out before, “Era Capricorn” are Alex and Marina, living in Essen (Germany). Both are playing instruments and create music as a hobby. Alex started to learn to play guitar in April 2014. Marina learned to play drums around 2014, but switched to classical piano and keyboards in October 2016.
I think to have this quite short period of learning the instruments in mind, makes the listening experience something even more notable.
Even though Alex is effectively executing most of the hands-on tasks, like operating the DAW-/Photo-software and the Drum computer, the two of them were working hand in hand to achieve their mutual goal.
A perfect example are the drums: Just having the muscle memory and technical skill to operate a computer does not enable you to achieve great drum beats. Also, just knowing how to play drums does not enable you to operate the software necessary to turn your imagination into sound. Joining their forces on this task, just like with nearly all other details during the project, lead to the awesome result this record is.
Having listened to the record for some time now, without any complaisance involved, I’m still sincerely impressed in the tightness and atmosphere they managed to create here. I’m still catching my mind red-handed, searching for some rough edges in details, like passages unaligned to each other, too abruptly ending sequences, cheapish sounding instruments and there like, but nearly always, when I think I found something, when re-hearing that passage something else in the complex composition unveils and proves my ear wrong, because it matches nicely; just with something I was not capable to align my ear to in the first place.
On their official Youtube channel, they released a teaser-medley first, playing a sequence of “Wiedereintritt”, “Remember my name” and “Watch me burn” for ~30 seconds each, starting and ending from somewhere in the middle. This teaser contained some unfinished early previews of the songs; in the meantime this was replaced by a full album teaser:
I have to admit that I’m having a hard time to get a feel for a song when presented like this, so I managed to earn shaking heads in disbelief from them when I told them so 😳
“Wiedereintritt” is the first song the band released in full length in January 2018; even before the album was finally recorded completely. I was only able to provide first feedback on this one.
“Wiedereintritt” is a bit special in two ways. First, it contains an example for the only criticism I can track down: There are bells at around 1:40, which “bite” into the ear a bit too sharp, compared to the rest of the arrangement, when listening to the song using headphones in a slightly louder-than-flat – like volume. But that is only half way negative criticism: It also is somewhat positive, since most productions nowadays are flattened down in post-processing to make the songs sound alike everywhere; no matter if you are an audiophile, listening to a record on a central chair in your personal, $50.000 dollars sound-room or some crack-head, listening to the lowest MP3 quality using your $1 headset.
Having these “un-flattened” spikes is something you most probably have only if artists are not bound to align with some money-first – approaches put on them by a label.
The second reason “Wiedereintritt” is highlighted here is that I had a conversation with Alex about the fact that I like to know what the artist’s intention was when they created a song. Even more for instrumental songs, where there is no text, giving you an idea. He told me this:
In the very early phase, the project was planed to contain vocals. Even though this plan was scrapped very soon, “Wiedereintritt” was finished at that moment, already. So were the (now scrubbed) lyrics.
The song is about the re-entry process of a spaceship into earth’s atmosphere; something arresting me very much, personally. It inhabits something sublime and epic, while being something stressfully and dangerous at the same time. This is something we try to address in the first half of the song.
The passage in the middle of the song, when the theme suddenly changes (at around 4:00) reflects a somewhat critical phase during the maneuver; the theme becomes more tragic, all sublime has gone, being replaced by shock and disbelief; even though the tempo keeps pace.
The imaginary story around that scene has even more details, but this is not shared; some parts are left to the imagination on purpose.
The goal of the outro was aimed for ending the song epically, whilst releasing the pressure more and more.
Another interesting side info: Alex is the biggest Transformers fan I know. Not only since the movies from Michael Bay generate hundreds of millions of dollars at the international cinemas box offices, but since his childhood days when the first animated series hit the air. His whole flat is covered with self drawn pictures of epical Transformers scenarios, merchandise, action figures and stuff.
He put a Transformers – themed trilogy onto the record as well:
It’s about “Watch me burn”, “Embers” and “Remember my Name”.
“Embers” audializes the following scene, when he (e.n.: Optimus Prime) is dying while being relocated to the headquarters.
“Remember my Name” is something I wanted to finally salute him (e.n.: Optimus Prime) with; a hymn on my childhood lifetime hero.
I had to experience some katharsis from my childhoods trauma on that one … 😉
The whole record is never boring or unpleasant to listen to. Even if there are passages which are not a perfect match to one’s taste, the record keeps promise to dynamically changing all the time. All tracks are diverse a lot and satisfy many of the different preferences out there at the same time.
As Walter Scheurer from powermetal.de already pointed out in his review (German), noone in the formation needs to self-express or show off; everything they do and put together are exclusively sub serving the songs theme and to drive it forward, making it a unique thing you enjoy to listen to.
Personally, I tend to skip most of those longer guitar solos, not sounding good really, but obviously just in there to show off (truth be told: most of the time I’m too lazy to skip, though. But not skip those parts because I’m too lazy does not mean that I enjoy listening to them).
This is not the case on this album even once. I really appreciate that!
To sum this up: This album is a great and outstanding piece of music, where no track needs to be skipped; not even partly. I really enjoy listening to this record; but you need to have a fable for instrumental music.