I had the idea of a voice-based music studio for a long time now. It would combines all my skills: being a musician, knowing how to code and studying law. So I was already thinking about producing countless loops, developing the Alexa skill and taking care of any copyright issues. When I found out about the APL for audio (beta), I knew that I had all the ingredients to start creating the first voice-based music studio.
What it does
In the Music Studio, everyone becomes a music producer. By picking the right kick, choosing the perfect snare and high hats and finally, selecting some haunting melodies and chords, the user makes a unique beat. At the moment the music studio has all the sounds and recording equipment for hip hop and electro. I am working on more genres and special packs.
How I built it
It’s all about data! How you create it and how you structure it. In this skill the main data are the music loops that I produced myself using Logic Pro X. What I find fascinating about coding - and there is a parallel to law - is that you develop the application abstractly, meaning that everything works with flexibel variables rather than describing every possible outcome individually. That might seem obvious, but for me as a nonprofessional coder, it’s always great that the app that I created, can lead to results that I hadn’t thought of.
I’ve made use of many of the tools that Amazon offers. On the one side it’s the S3 Storage on AWS. All sound loops are stored in the same way. There is a folder named as the genre. The subfolders named as the instruments. Each individual loop is indicated by a number. All three values can easily be set by my lambda function, which calculates random links to play for the user.
From that point, I use the data binding syntax to send the links of the self-produced loops to my APL for Audio document. At the beginning, I had many APL for Audio documents - developed with the authoring tool. It was a very confusing. But once I found out about the conditional logic within the APL file, I coded a singular but general JSON APL for audio file, that - depending which data is sent - works for all uses needed in this skill.
Challenges I ran into
Challenges were setting up the loops in the right way and creating the „JSON audio mixing desk“ (APL for audio). Besides that I was actually surprised, how smoothly the journey of creating this skill went, as I know, that coding can be really frustrating, but even more relieving once you find out what’s wrong. It was really exciting to test the skill, as even I was never sure, what final beat I would get.
Accomplishments that I'm proud of
I’m proud that I was able to set up a voice-based music studio. I really like being at a stage, where I can produce more loops from now on, without needing to change the code. Furthermore, I’m happy, that I now have better understanding of coding and the concepts of data flow - all taught to myself (with the help of internet).
What I learned
Being a bit overwhelmed in the beginning by all the different things I had to, I learned, that just starting and seeing where it would take me is the best thing to do. On the other hand, this approach can be a bit annoying at a later stage, as I wrote the code while brainstorming, without taking to much care of a clear and understandable code structure. For my next projects, I will try to make little notes and comments along the way, so that I don’t get lost in numbers and variables :).
What's next for Music Studio
At the moment, Hip Hop and Techno fans will love the skill. But I want to make the Music Studio a playground for everybody. That’s why I’m working on creating more loop expansion packs (e.g. Reggeaton or Breakbeat). Furthermore, I’d love to collaborate with bigger producers or artists to offer special packs - for example a „Drake Signature Sound Pack“. As I’m publishing the skill now, I will be very attentive to what the users like and what problems they run into. That way I am quick to fix errors and also keen on extending the functionality of the app. Let that be editing the beats in even more detail or being able to export the finished beats. I’m looking forward to hearing the first experiences of Alexa users.