Skip to content

TheOllareCommunity/TheOllator

Repository files navigation

Online version of the application

OLLAREGANG.pythonanywhere.com

The Ollator - overview

The Ollator is a full stack system which allows singers or rap / hip hop music fans to quickly get a beat for their music projects or just for fun. The idea of The Ollator is to give the possibility to the user to get a beat that resembles his/her taste exploting a machine learning algorithm with low effort. The user can create a playlist of songs that he/she likes on Spotify, upload the URI of that into the main page of The Ollator, let the system perform the operations needed to get the most similar beat and play with its parameter through the Graphical User Interface.

How to use it

To get the URI link just go to the "share" option of a playlist and select "Copy URI Spotify" (make sure to press "alt" to make the "copy URI" option available): URI

Then just upload the link in the box and click "Submit" Home

Dataset and Database

The beats proposed by the system are, at now, entirely produced by us (see future developments for incoming implementations). The dataset consists in 100 beats derived from 10 beats whose harmonic and percussive splits are re-combined and exported. The beats are then uploaded on Spotify in order to extract the features to make the mapping with the midpoint of the playlist loaded from the user (better explained in next section). The beats are listenable at the playlist https://open.spotify.com/playlist/1Rd3nbOXI3Jlui4lmv4GGH?si=bee6acfc62b6497e. As protocol for music information we used the wel known MIDI. Since the beats will be splitted in percussive and harmonic parts, in the making of the beats we divided each one in 4 midi files: drum.mid, harmony.mid, melody.mid and bass.mid. Every midi file is saved in our database in order to be selected in the re-synthesis section.

Machine Learning

Spotify for developers gives the permission to access to many audio features for every track present in the database. We exploited them to build our feature space: a multi-dimensional one where each of our 100 beats represent a point. Then we perform the same operation for the songs that compose the playlist loaded by the user and we calculate their "mid-point". The last passage consists in plugging the midpoint inside the feature space populated by our beats and compute the nearest one that is, indeed, the beat that resembles better the entire playlist of the user. Once the nearest beat is found, we query the database for the midi files that constitutes it so that the re-synthesis can be performed and manipulated through the user interface.

Features Recap

After the playlist is processed, an interface with a radar graph will show the characteristics of the songs which helps to understand better its qualities and eventually rearrange the features in order to have a more consonant output with the user tastes. A Spotify preview gives also the possibility to have a 30 seconds demo of the fetched song. By clicking on the continue button, if some features have been changed, the algorithm is triggered again to output the new beat, otherwise the same beat is kept and a new interactive GUI is presented. ollatornewpage

Synthesis and User Interface

In this phase each of the 4 midi file is separately synthesized and controlled with an effect-chain. For this purpose we used Tone.js library that permits us to use a wide variety of synthetic instrument such as oscillators, sampler, .. and effects such as distortion, chorus, LFOs,.. Immagine 2021-06-19 114122 The User Interface is vertically divided in the four components of each beat. Each division has a module made up of a 2D pad and five knobs. The user can play with them finding out the effect of each knob or pad and discovering new sounds and combinations. At the bottom we have the adjustable BPM and the play/pause button. Furthermore we give the opportunity to change the musical mode of the song by varying the modal scale in use with the drop-up button menu and also to record the voice over the beat with the dedicated button. Once the user has finished the recording, a pop-up will arise and it will be given the chance to listen to it and eventually download it.

Technologies used

The Ollator is made up of several technologies and languages. Following the workflow:

  • Ableton Live for the production of beats;
  • Spotify Web API for the feature extraction;
  • Python for the machine learning algorithm and for the re-combination of beats;
  • Python Anywhere to build the server structure;
  • Flask to manage client-server communication;
  • SQLite for the database structure;
  • Tone js for the web audio synthesis and managment;
  • p5.js to implement processing in javascript.

Growing Community!

We give the possibility to upload beats in the main page of The Ollator with the aim of creating a community of producers whose beats can be selected to be used (and downloaded / purchased) in the system. With the growing of the community, the dataset will enlarge widening the variance of the beats and carrying the system to better classification results. Furthermore this will give the possibility to producers who upload their tracks to appear in users' searches (the artist's page related to the beat will be mentioned to our users). To do that just fill the form linked to the main page of the Ollator and follow the instructions. Upload

Future developments

  • Possibility to choose more than one beat to be played. Since the dataset at now consists of 100 beats that are combination of 10 beats, choosing more than one beat to listen/manipulate will lead to similar beats (for example, the 2 nearest beat would probably have the same harmonic content or the same rithmic content). So this issue is dependent from the previous point. Having a wider dataset will head also to this possibility;
  • Sound improvement. We will improve the sound quality with the implementation of further libraries and sounds;
  • Development of stand-alone application. The audio quality is now bounded with the fact that we are manipulating it via web. With the development of an application we will overcome this issue and also give a more user friendly way of using The Ollator;
  • Within the application: give the possibility to change and costumize effects.

For Developers: how to use the code

  1. clone the repository on your computer
  2. open the folder with an editor
  3. install all the packages needed
  4. run the script "server.py"
  5. open the local host on your browser (Chrome is reccomended)
  6. have fun!

Or simply go to the online version of the application

OLLAREGANG.pythonanywhere.com

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages