<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aravind Mohandas</title>
    <description>The latest articles on DEV Community by Aravind Mohandas (@aravindmohandas).</description>
    <link>https://dev.to/aravindmohandas</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F872293%2Fb14c19f7-2952-425f-b256-d435b1011a1f.png</url>
      <title>DEV Community: Aravind Mohandas</title>
      <link>https://dev.to/aravindmohandas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aravindmohandas"/>
    <language>en</language>
    <item>
      <title>Formalizing Konnakol using Haskell - GSoC '22</title>
      <dc:creator>Aravind Mohandas</dc:creator>
      <pubDate>Tue, 06 Sep 2022 11:37:04 +0000</pubDate>
      <link>https://dev.to/aravindmohandas/formalizing-konnakol-using-haskell-gsoc-22-ekm</link>
      <guid>https://dev.to/aravindmohandas/formalizing-konnakol-using-haskell-gsoc-22-ekm</guid>
      <description>&lt;h1&gt;
  
  
  Contents
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;Project Description&lt;/li&gt;
&lt;li&gt;Phase 1&lt;/li&gt;
&lt;li&gt;Phase 2&lt;/li&gt;
&lt;li&gt;Challenges and Learnings&lt;/li&gt;
&lt;li&gt;Future Work&lt;/li&gt;
&lt;li&gt;Blogs&lt;/li&gt;
&lt;li&gt;Link to Code&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Project Description
&lt;/h1&gt;

&lt;p&gt;The major aim of the project was to create a system which could formalize the rules of &lt;a href="https://github.com/tidalcycles/konnakol-gsoc/blob/main/ABOUT_KONNAKOL.md"&gt;Konnakol&lt;/a&gt;. The system developed was then integrated with &lt;a href="https://tidalcycles.org/"&gt;Tidal Cycles&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This project was done with &lt;a href="https://www.haskell.org/"&gt;Haskell&lt;/a&gt;, under the mentorship of Alex McLean.&lt;/p&gt;

&lt;h1&gt;
  
  
  Phase 1
&lt;/h1&gt;

&lt;p&gt;The first part of the project was to develop a system which could formalize the rules of Konnakol, validate as well as generate Konnakol compositions. The system was also capacitated to generate diagrams based on the compositions (sample diagrams can be found &lt;a href="https://github.com/tidalcycles/konnakol-gsoc/tree/main/samplediags"&gt;here&lt;/a&gt;. All code for this phase has been published as a Haskell package named &lt;a href="https://hackage.haskell.org/package/konnakol"&gt;konnakol&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Compositions generated can be converted for use in Tidal Cycles. We obtained audio samples that could be used from &lt;a href="https://www.arthurcarabott.com/konnakkol/"&gt;Arthur Carabott&lt;/a&gt;, and hence could listen to compositions. One can listen to sample compositions &lt;a href="https://github.com/tidalcycles/konnakol-gsoc/tree/main/audiosamples"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The code written during Phase 1 can be found &lt;a href="https://github.com/tidalcycles/konnakol-gsoc"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Phase 2
&lt;/h1&gt;

&lt;p&gt;The second part of the project was to try modify Tidal Cycles so that it could deal with beat-wise compositions. We were able to develop a sequence datatype in Tidal Cycles, and define alternative function definitions for many functions that are used by patterns.&lt;/p&gt;

&lt;p&gt;The code written in this regard can be found &lt;a href="https://github.com/tidalcycles/Tidal/tree/topic-sequences"&gt;here&lt;/a&gt;. My contributions focused on designing, implementing and integrating the &lt;a href="https://github.com/tidalcycles/Tidal/blame/topic-sequences/src/Sound/Tidal/Sequence.hs"&gt;Sequence module&lt;/a&gt; with the help of the &lt;a href="https://github.com/tidalcycles/Tidal/blame/topic-sequences/src/Sound/Tidal/Context.hs"&gt;Context module&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Challenges and Learnings
&lt;/h1&gt;

&lt;p&gt;The major challenge that I faced initially was understanding the logic within the code that was written by other contributors. Since this was my first time contributing to an open source project, it took me some time to get familiar with the overall process.&lt;/p&gt;

&lt;p&gt;I would say that the Google Summer of Code has introduced me to the world of open source and given me the joy of being a part of something huge. I have evolved to become a better programmer in the last 16 weeks, and look forward to continue contributing. &lt;/p&gt;

&lt;h1&gt;
  
  
  Future Work
&lt;/h1&gt;

&lt;p&gt;After coming up with the Sequence datatype, we have decided to try rewrite Tidal from scratch, removing redundancies and adding precise documentation.&lt;/p&gt;

&lt;p&gt;The work done in this direction can be found &lt;a href="https://github.com/tidalcycles/Tidal/tree/cycseq/tidal-cycseq/src/Sound/Tidal2"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Blogs
&lt;/h1&gt;

&lt;p&gt;For full details on the above, please see the development blogs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://dev.to/aravindmohandas/getting-started-with-gsoc-22-haskell-45c2"&gt;Part 0&lt;/a&gt; - Before Official Coding period&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/aravindmohandas/konnakol-compositions-using-haskell-gsoc-22-update-1-1m7c"&gt;Part 1&lt;/a&gt; - Weeks 1 - 4&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/aravindmohandas/visualising-konnakol-compositions-gsoc-22-update-2-16pc"&gt;Part 2&lt;/a&gt; - Weeks 5 - 8&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/aravindmohandas/adding-sequences-to-tidal-cycles-and-listening-to-konnakol-gsoc-22-update-3-22oj"&gt;Part 3&lt;/a&gt; - Weels 9 - 12&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Link to Code
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/tidalcycles/konnakol-gsoc"&gt;Phase 1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/tidalcycles/Tidal/tree/topic-sequences"&gt;Phase 2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>gsoc</category>
      <category>tidalcycles</category>
      <category>haskell</category>
      <category>music</category>
    </item>
    <item>
      <title>Adding sequences to Tidal Cycles and listening to Konnakol - GSoC '22 Update 3</title>
      <dc:creator>Aravind Mohandas</dc:creator>
      <pubDate>Sat, 03 Sep 2022 05:45:25 +0000</pubDate>
      <link>https://dev.to/aravindmohandas/adding-sequences-to-tidal-cycles-and-listening-to-konnakol-gsoc-22-update-3-22oj</link>
      <guid>https://dev.to/aravindmohandas/adding-sequences-to-tidal-cycles-and-listening-to-konnakol-gsoc-22-update-3-22oj</guid>
      <description>&lt;p&gt;As the official coding period of the Google Summer of Code 2022 come to an end, I will be talking about the progress that I have made since the last blog post. I shall also talk about how I fared against my own expectations, major learnings and what I plan to do after the Official Coding Period ends.&lt;/p&gt;

&lt;h1&gt;
  
  
  Generating Konnakol using Tidal Cycles
&lt;/h1&gt;

&lt;p&gt;In the &lt;a href="https://dev.to/aravindmohandas/visualising-konnakol-compositions-gsoc-22-update-2-16pc"&gt;previous blog post&lt;/a&gt;, I had talked about generating audio samples using Konnakol in Tidal Cycles. I spent a few days ironing out the finer details of this audio generation, by having functions to figure out the ideal speed at which compositions need to be generated, and fixing missing audio samples.&lt;/p&gt;

&lt;p&gt;Now, one can listen to a Konnakol composition, with a few extra sounds and effects by using just a few lines of code as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;do
  resetCycles
  d1 $ jux rev $ fast 2 $ (tidalK Chaturasra thriputa Chaturasra (mkStdGen 23)) # gain 2

d2 $ sound "bd sd &amp;lt;bd ~&amp;gt; [sd sd sd]" # gain 1.2

d5 $ sound "arpy(&amp;lt;3 5&amp;gt;, 8)" # gain 1.2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One thing that should be noted here is that changing the value under &lt;em&gt;mkStdGen&lt;/em&gt; entirely changes the composition that is generated. Hence, this offers a great range of variety Konnakol compositions, and two different values will most probably give two entirely different compositions.&lt;/p&gt;

&lt;p&gt;I then had the privilege of presenting my progress in front of the Tidal Cycles community on the 11th of August 2022. The response was encouraging, and there were several suggestions on how to make it better. One of the suggestions was first enumerating syllables during generation of compositions, and then using these enumerations to generate the same pattern but &lt;br&gt;
for different set of audio samples. I was instantly hooked to the idea, and spent the next couple days to get it to work.&lt;/p&gt;

&lt;p&gt;Now, if you use the following code, you will get a Konnakol composition along with an enumerated composition on the piano.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;do
  resetCycles
  d1 $ fast 2 $ numK Tisra rupaka Khanda (mkStdGen 12123) "lydian"  # sound "superpiano" # legato 3
  d2 $ fast 2 $  tidalK Tisra rupaka Khanda (mkStdGen 12123) # gain 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I have tried recording a couple such samples, one can find these samples in the &lt;a href="https://github.com/tidalcycles/konnakol-gsoc"&gt;Konnakol repository&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Adding Sequences to Konnakol
&lt;/h1&gt;

&lt;p&gt;After I was done with the Konnakol part of my project, the next (and final) objective was to develop a system within Tidal Cycles to deal with beat-wise composition. Currently Tidal Cycles is cycle-based, and a pattern in Tidal is a function of time, instead of a sequence of beats.&lt;/p&gt;

&lt;p&gt;After a lot of brainstorming, my mentor (Alex McLean) and I decided to create a new datatype called Sequence, which would be able to deal with sequences.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;data Sequence a = Atom Rational a
                | Gap Rational
                | Sequence [Sequence a]
                | Stack [Sequence a]
              deriving (Show, Eq)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The recursive tree-like structure of a sequence would allow one to have sequences within sequences. For representing aligned sequences, we have the Stack [Sequence a], which actually consists of a list of sequences with the same duration. The idea was to describe functions for sequences which had the same type signatures as the ones for patterns. &lt;/p&gt;

&lt;p&gt;In order to do this, the first major problem that we had to solve was to develop functions which could align sequences(This would play a significant role in applying sequences of functions to sequences). To align sequences, we found there were multiple possible ways, somewhat similar to aligning text (read more about the various possible strategies &lt;a href="https://forum.algorithmicpattern.org/t/aligning-elements/492"&gt;here&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;So, the first step in defining functions for sequences was defining the various alignment methods. In total, 9 different alignment methods were defined. After this, the instances of Functor, Applicative Functor, and Monad were defined for Sequences. A general method was also defined to apply a sequence of functions to a sequence. A couple of methods were also defined to help simplify a sequence of sequences, and to remove redundant values (such as a Gap 0).&lt;/p&gt;

&lt;p&gt;After doing all this groundwork, the next objective was to start picking functions defined for patterns, and to define them with respect to sequences. Functions such as &lt;em&gt;fast&lt;/em&gt; and &lt;em&gt;slow&lt;/em&gt; were easy to implement, whereas functions such as &lt;em&gt;euclid&lt;/em&gt;, &lt;em&gt;iter&lt;/em&gt; and &lt;em&gt;every&lt;/em&gt; took some brainstorming, since there was the initial challenge of understanding what their implementation would mean for a sequence.&lt;/p&gt;

&lt;p&gt;As I kept adding on to and expanding sequences, we worked on creating a way to handle function calls with the same name for sequences as well as patterns. A method was also defined which could convert a sequence into a pattern (for now, it is a one-way street, but we might try to get it done the other way pretty soon).&lt;/p&gt;

&lt;p&gt;All this modification was performed in Tidal-1.9.0, which then threw some errors when I tried to get it build on Windows. This helped us discover that there actually was a bug for Windows users, which was then resolved. However, the dependencies of Tidal-1.9.0 had a lot of conflicts with Konnakol, and so I defined a Konnakol program within the Tidal package, which contained all the necessary function for generating compositions.&lt;/p&gt;

&lt;p&gt;Hence, the current system is capacitated to deal with sequences as well as patterns, and is capable of producing audio output as well. One can try implementing more than a handful of functions on sequences, and the results are often quite surprising, depending on the alignment strategy that has been chosen.&lt;/p&gt;

&lt;h1&gt;
  
  
  Future work on Tidal Cycles
&lt;/h1&gt;

&lt;p&gt;Over the last 12 weeks, I was able to accomplish everything (and maybe a bit more) that I had initially proposed. The overall process of coming up with creative and efficient solutions to challenging problems has helped me evolve as a programmer.&lt;/p&gt;

&lt;p&gt;The Official Coding period of the Google Summer of Code might be coming to a close, but it surely does not mark the end of my contribution to Tidal Cycles. I absolutely loved the community and the challenging problems that I encountered here.&lt;/p&gt;

&lt;p&gt;The next thing that we are planning to do is rewriting Tidal to  accommodate sequences and patterns (which we're planning to rename to signals), in a way that removes a lot of redundancy. We have already begun our work on this (repository has been linked below), and one can read more about the ideas that we have for this &lt;a href="https://club.tidalcycles.org/t/tidal-2-0/4247"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  References
&lt;/h1&gt;

&lt;p&gt;To view the Konnakol repository, visit &lt;a href="https://github.com/tidalcycles/konnakol-gsoc"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To view all the progress that has been made on Sequences, visit &lt;a href="https://github.com/tidalcycles/Tidal/tree/topic-sequences"&gt;this&lt;/a&gt; branch.&lt;/p&gt;

&lt;p&gt;To view the exciting rewrite of Tidal, visit &lt;a href="https://github.com/tidalcycles/Tidal/tree/cycseq"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>haskell</category>
      <category>music</category>
      <category>tidalcycles</category>
      <category>visualization</category>
    </item>
    <item>
      <title>Visualising Konnakol Compositions - GSoC '22 Update 2</title>
      <dc:creator>Aravind Mohandas</dc:creator>
      <pubDate>Tue, 26 Jul 2022 06:05:18 +0000</pubDate>
      <link>https://dev.to/aravindmohandas/visualising-konnakol-compositions-gsoc-22-update-2-16pc</link>
      <guid>https://dev.to/aravindmohandas/visualising-konnakol-compositions-gsoc-22-update-2-16pc</guid>
      <description>&lt;p&gt;It has been 6 weeks since the official coding period started for the Google Summer of Code '22. The last three weeks have been interesting as well as hectic . There were multiple new concepts to learn, hundreds of lines of code to go through and understand, and an attempt to get to that one elusive final plan which will decide how my next 6 weeks shall go.&lt;/p&gt;

&lt;h2&gt;
  
  
  Visualizing Compositions
&lt;/h2&gt;

&lt;p&gt;After fixing a few minor bugs in the generations of Korvais and Mohras, the next step was developing methods to visualize compositions. This meant going through the Diagrams package, and discovering methods to visualize compositions in a grid-like structure. &lt;/p&gt;

&lt;p&gt;The first idea that I had in visualizing Korvais was that I would represent the phrases in a color, and the gaps in another. Each row would represent a new rhythmic cycle. As I developed functions for the same, I realized that it would be better if I had a gradient as well instead of just a single color. Phrases would have a decreasing gradient, where the rate of decline would depend on the length of the phrase. The same would hold true for gaps, albeit with an increasing gradient. Another great idea, which was recommended by my mentor, Alex McLean, was to have a header which would help one understand where the beats would land. &lt;/p&gt;

&lt;p&gt;An example generation for a normal numerical pattern is as follows: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuoyc673dnp7zhtd24k9h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuoyc673dnp7zhtd24k9h.png" alt="Pattern1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another such visualization for a Korvai is as follows:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0sswwytlsprsbyojz3eo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0sswwytlsprsbyojz3eo.png" alt="Pattern2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These were custom compositions that were provided as a list of phrases and gaps. The next step was in getting the system to compose as well as visualize compositions in one go. One such Korvai that the system has composed is given below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcd66jm8jxr8alljozhhw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcd66jm8jxr8alljozhhw.png" alt="Sample Korvai"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Visualizing Mohras proved to be a completely different ballgame. Unlike Korvais, gaps were not a characteristic feature here. Hence, I decided to use the fundamental structure, i.e., the separation of a Mohra into components as the deciding feature.&lt;/p&gt;

&lt;p&gt;One such Mohra generated by the system has been given below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4wrsvmk6jwnqwxdgqeup.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4wrsvmk6jwnqwxdgqeup.png" alt="Sample Mohra"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The final step that I wanted to figure out was the representation of compositions which have changing time signatures. This required generating diagrams where the length of the individual components would vary.&lt;/p&gt;

&lt;p&gt;The earlier composition visualized in two different time signatures is given below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3037rf2u0c6f3ycf0hc9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3037rf2u0c6f3ycf0hc9.png" alt="Changing Times-1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another numerical pattern which used 4 different time signatures is given below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0jqw6oqn6n5jcarj5mtr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0jqw6oqn6n5jcarj5mtr.png" alt="More Changing Times"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point, I was interested to find out how it would be to overlap cycles over themselves to see what the resultant color would be. I accomplished this using circular wedges. Phrases would add a positive value to the resultant color, while gaps would add a negative value. Such a visualization is given below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnpu0e270oxcuap167ixr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnpu0e270oxcuap167ixr.png" alt="Circle"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once I was done with the diagrams part, all that was left was to create a package and upload it on hackage. The package has been linked below:&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://hackage.haskell.org/package/konnakol-0.1.0.0#readme" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.shields.io%2Fstatic%2Fv1%3Flabel%3DDocumentation%26message%3DUnavailable%26color%3Dcritical" height="auto" class="m-0"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://hackage.haskell.org/package/konnakol-0.1.0.0#readme" rel="noopener noreferrer" class="c-link"&gt;
          
    konnakol: Formalising the rules of Konnakol, an Indian percussional art form.
  
        &lt;/a&gt;
      &lt;/h2&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fhackage.haskell.org%2Fstatic%2Ffavicon.png"&gt;
        hackage.haskell.org
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Listening to Konnakol
&lt;/h2&gt;

&lt;p&gt;After visualizing Konnakol compositions, the next thing on the list was to listen to Konnakol compositions. Fortunately, we came across an amazing collection of Mridangam samples by Arthur Carabott, who recorded these with the help of Mridangam artist Harishankar V Menon. They were kind enough to grant us permission to use the audio samples in our project.&lt;/p&gt;

&lt;p&gt;To use the samples along with compositions generated by the system, I had to define methods which would convert these compositions into mini notation, as well as a suitable value by which the compositions needed to be slowed down so they would attain optimal tempo. Once I did this, it was only a matter of installing the &lt;em&gt;konnakol&lt;/em&gt; package, importing it in tidal and live coding Konnakol!!&lt;/p&gt;

&lt;p&gt;The audio generation code has been written in such a way that anyone with a basic understanding of Konnakol would be able to generate a Mohra or a Korvai with just a single line of code. For example, to generate a Mohra one would only have to type in&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;d1 $ (tidalM Khanda rupaka Khanda (mkStdGen 112)) 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;To make it sound better, one case use other available functions and audio samples in Tidal Cycles. One such example is given below:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;do
  resetCycles
  d1 $ jux (fast 2) $ (tidalK Chaturasra thriputa Chaturasra (mkStdGen 112232)) # gain 1.3

d2 $ sound "bd sd ~ sd" # gain 1

d5 $ sound "arpy(&amp;lt;3 5&amp;gt;, 8)" # gain 1.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Sample audios generated can be found in the code repository, linked at the end of the document.&lt;/p&gt;
&lt;h2&gt;
  
  
  What Next?
&lt;/h2&gt;

&lt;p&gt;The main aim for the second half of the project is to develop a system within TidalCycles, which would be able to handle sequences. I would also be working on  &lt;/p&gt;

&lt;p&gt;To view the code developed, as well as a detailed description of Konnakol, visit:&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/tidalcycles" rel="noopener noreferrer"&gt;
        tidalcycles
      &lt;/a&gt; / &lt;a href="https://github.com/tidalcycles/konnakol-gsoc" rel="noopener noreferrer"&gt;
        konnakol-gsoc
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Repository for Konnakol experiments during GSOC 2022
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;GSOC Konnakol&lt;/h1&gt;

&lt;/div&gt;

&lt;p&gt;Repository of experiments performed as a part of the Google Summer of Code 2022.&lt;/p&gt;

&lt;p&gt;Contributer : Aravind Mohandas
Mentor: Alex McLean&lt;/p&gt;
&lt;p&gt;To read more about Konnakol visit &lt;a href="https://github.com/tidalcycles/konnakol-gsocABOUT_KONNAKOL.md" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To understand the datatypes and functions used, visit &lt;a href="https://github.com/tidalcycles/konnakol-gsocHOW_TO_USE.md" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To look at sample diagrams generated, visit &lt;a href="https://github.com/tidalcycles/konnakol-gsocsamplediags/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To launch a code and make music: &lt;a href="https://dev.to/aravindmohandas/visualising-konnakol-compositions-gsoc-22-update-2-16pc" rel="nofollow"&gt;Visualising Konnakol Compositions - GSoC '22 Update 2&lt;/a&gt;. (NB: load &lt;a href="https://github.com/tidalcycles/konnakol-gsocaudiofiles" rel="noopener noreferrer"&gt;audiofiles&lt;/a&gt; with SC's startup file to hear sound)&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Audio Samples&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;Mridangam samples (c) Arthur Carabott, distributed under a CC-BY-SA license &lt;a href="https://creativecommons.org/licenses/by-sa/4.0/" rel="nofollow noopener noreferrer"&gt;https://creativecommons.org/licenses/by-sa/4.0/&lt;/a&gt;, performed by Harishankar V Menon.&lt;/p&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/tidalcycles/konnakol-gsoc" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;h3&gt;
  
  
  Audio Samples
&lt;/h3&gt;

&lt;p&gt;Mridangam samples (c) Arthur Carabott, distributed under a CC-BY-SA license &lt;a href="https://creativecommons.org/licenses/by-sa/4.0/" rel="noopener noreferrer"&gt;https://creativecommons.org/licenses/by-sa/4.0/&lt;/a&gt;, performed by Harishankar V Menon.&lt;/p&gt;

</description>
      <category>haskell</category>
      <category>music</category>
      <category>tidalcycles</category>
      <category>visualization</category>
    </item>
    <item>
      <title>Konnakol Compositions using Haskell - GSoC '22 Update 1</title>
      <dc:creator>Aravind Mohandas</dc:creator>
      <pubDate>Sat, 02 Jul 2022 06:47:48 +0000</pubDate>
      <link>https://dev.to/aravindmohandas/konnakol-compositions-using-haskell-gsoc-22-update-1-1m7c</link>
      <guid>https://dev.to/aravindmohandas/konnakol-compositions-using-haskell-gsoc-22-update-1-1m7c</guid>
      <description>&lt;p&gt;Since it has been 3 weeks since the Official Coding Period started at the Google Summer of Code '22, I thought it would be ideal to write about my experience so far in developing a system to formalize Konnakol compositions using Haskell. I shall talk about the features that I have developed so far, the major roadblocks I faced, and the way ahead. &lt;/p&gt;

&lt;h2&gt;
  
  
  The Pre-Coding Phase
&lt;/h2&gt;

&lt;p&gt;The Community bonding period began as soon as the contributors for GSoC '22 were announced. I was introduced to the TidalCycles community, and the GSoC '22 Haskell community. I met my mentor Alex McLean, and we chalked out the project timeline in greater detail. &lt;/p&gt;

&lt;p&gt;Although I had a basic understanding of Haskell, I thought this period would be ideal to learn the language in greater detail. Since I had only learned Object Oriented Programming Languages till then, it took some time to get used to Haskell. I referred to "Learn You a Haskell For Greater Good" by Miran Lipovača, and as my understanding of Haskell improved, I started getting a detailed idea of how my project can be structured.&lt;/p&gt;

&lt;p&gt;During this period, I also went through research papers on Konnakol in an attempt to find a formal document on the rules followed. On failing to do so, I approached Vidwan Sri H.S. Sudhindra, an Indian Classical Percussionist, and he was kind enough to help me identify the rules that would be necessary for implementing my project.&lt;/p&gt;

&lt;p&gt;The next step was to go through the documentation of TidalCycles as well as Diagrams (a Haskell package which I would be using soon to visualize compositions). I also went through a series of videos on TidalCyles by my mentor. This helped provide a clearer image on how I should structure my datatypes, so that future integration with TidalCycles would be easier.&lt;/p&gt;

&lt;p&gt;As I ended my community bonding period, I had gone through tons of documentation, research papers and videos, and was itching to start coding.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Coding Period
&lt;/h2&gt;

&lt;p&gt;Since I finished my objectives for the community bonding period early, I thought I would get a head start for the coding period. I felt I had done enough groundwork to start building up.&lt;/p&gt;

&lt;p&gt;I started by defining datatypes for components of Konnakol such as Thala, Jati, Gati and the syllables to be used. I then defined the Suladi Sapta Thala System, and a method to show thalas using the conventional symbols. Next was development of the necessary methods and datatypes for the user to enter a composition which has varying gatis, and methods for displaying them in the proper jathi notation. This is immensely helpful for beginners in Konnakol as they could enter a composition and see exactly where each of the syllables land. A simple example of the same has been provided with along with the function call used. Here KalaCh is used to change the Gati (or the time signature) of the composition. The phrases are entered along with the speed at which they are to be recited.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K6_Bkkce--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pqkjv1si5qexiyeynioi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K6_Bkkce--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pqkjv1si5qexiyeynioi.png" alt="Getting the representation of a simple set of phrases using GetRepresentation" width="831" height="74"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next step was to develop methods to generate a Mohra for a given thala, and to facilitate this, methods were created to generate phrases for a particular length. This method uses a random value to generate a phrase for the given length. This method, along with methods to partition the given thala into sections, are used to generate a mohra. Then the getRepresentation method is called on the same, and the user gets a custom Mohra along with its representation.&lt;/p&gt;

&lt;p&gt;Another composition which can be composed it the Korvai. Since the structure of the Korvai is more complex than that of the Mohra, set comprehensions in Haskell were used to create subsets of the overall count which follow some pattern (such as arithmetic or geometric progressions). A similar procedure to Mohra generation was followed to obtain representation.&lt;/p&gt;

&lt;p&gt;Users can now just run main, enter the jati, the thala and the gati, followed by a 1 if they desire to generate a Mohra and any other digit otherwise. Sample generations are provided below. Here a "-" denoted a gap in statements. "^" are used to separate beats, "|", "O" and "U" are used to denote the components of a thala, and "||" the beginning of the next cycle of the thala.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uUEaZ5oF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/68ijxbx9ogojc5mi1p64.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uUEaZ5oF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/68ijxbx9ogojc5mi1p64.png" alt="Sample Korvai" width="880" height="180"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--o_7B-yfe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7xqv87nckvqqvghsye2t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--o_7B-yfe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7xqv87nckvqqvghsye2t.png" alt="Sample Mohra" width="880" height="154"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another method was developed (along with the necessary datatypes), with which the user can enter his composition as numbers and see whether the composition is valid with respect to its total count. This method was further developed to check whether custom Korvais are valid.&lt;/p&gt;
&lt;h2&gt;
  
  
  What Next ?
&lt;/h2&gt;

&lt;p&gt;The next step in the project is to develop methods to visualize custom compositions. A grid like structure will be used here, and this will help understand the structure of certain compositions. Post this, the system developed will be integrated with TidalCycles.&lt;/p&gt;

&lt;p&gt;To view the code developed for the project, visit &lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/tidalcycles"&gt;
        tidalcycles
      &lt;/a&gt; / &lt;a href="https://github.com/tidalcycles/konnakol-gsoc"&gt;
        konnakol-gsoc
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Repository for Konnakol experiments during GSOC 2022
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
gsoc-konnakol&lt;/h1&gt;
&lt;p&gt;Repository for Konnakol experiments during GSOC 2022&lt;/p&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/tidalcycles/konnakol-gsoc"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


</description>
      <category>haskell</category>
      <category>tidalcycles</category>
      <category>music</category>
    </item>
    <item>
      <title>Formalizing Konnakol using Haskell @ GSoC '22</title>
      <dc:creator>Aravind Mohandas</dc:creator>
      <pubDate>Fri, 10 Jun 2022 05:30:55 +0000</pubDate>
      <link>https://dev.to/aravindmohandas/getting-started-with-gsoc-22-haskell-45c2</link>
      <guid>https://dev.to/aravindmohandas/getting-started-with-gsoc-22-haskell-45c2</guid>
      <description>&lt;p&gt;Konnakol, in South Indian Carnatic music, is the art of performing percussion syllables vocally. It is the recitation of Solkattu – the vocal syllables related to the sounds of the Mridangam, a major percussion instrument in Carnatic Music. Recognized as an art form of principle study, Konnakol is also a medium used by Carnatic musicians to convey rhythmic ideas to each other.&lt;/p&gt;

&lt;p&gt;However, notwithstanding its importance in Carnatic music, there have not been any successful attempts in creating a system which could formalise the conventional rules of Konnakol and check whether a given rhythmic pattern fits into a fixed set of rhythmic cycles or not. Such a pattern forms a partition of the total length of the rhythmic cycles.&lt;/p&gt;

&lt;p&gt;This project aims to formalize Korvai (cadence) and Koraippu (starting with a longer pattern and progressively performing shorter patterns) and Mohra, three main aspects of Konnakol. The system developed will be able to formalize pre-existing compositions, as well as check whether a given composition follows the conventional rules of Konnakol. This system can then be used to generate new patterns, which could, further on, be compared to one another to find the most complex ones.&lt;/p&gt;

&lt;p&gt;The project also aims to display valid compositions using the Jathi notation, as well as use a grid design to visualize the patterns generated, where syllables of different lengths and the gaps between syllables will be displayed using different colors. This will facilitate understanding of the patterns among the partition that this composition has formed. The system developed will be integrated with the &lt;br&gt;
"Tidal Cycles” software, so that users may include Konnakol in their compositions as well. The documentation and the visualization tools provided will help TidalCyclists with no prior knowledge to develop a basic understanding about Konnakol. &lt;/p&gt;

&lt;p&gt;To read more about the project and to follow progress, you can visit the Google Summer of Code Project Page &lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://summerofcode.withgoogle.com/programs/2022/projects/Q8cce5AG" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--RU6uLrPG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://summerofcode.withgoogle.com/static/img/og-image.png" height="" class="m-0" width=""&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://summerofcode.withgoogle.com/programs/2022/projects/Q8cce5AG" rel="noopener noreferrer" class="c-link"&gt;
          Google Summer of Code
        &lt;/a&gt;
      &lt;/h2&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--PYIeJELP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://summerofcode.withgoogle.com/assets/favicons/favicon-32x32.png" width="32" height="32"&gt;
        summerofcode.withgoogle.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>gsoc</category>
      <category>tidalcycles</category>
      <category>haskell</category>
    </item>
  </channel>
</rss>
