# How to get better on the drums using Julia (ANN: JuliaMusic + LOGO CONTEST!)

**URL:** https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784
**Category:** Community
**Tags:** announcement
**Created:** [August 1, 2018, 12:38pm UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784 "2018-08-01T12:38:37Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)
#### Post date: [August 1, 2018, 12:38pm UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/1 "2018-08-01T12:38:37Z")

</div>

Hi All,

so I made a youtube video about how I use Julia to get better on the drums. You can find it here:

[![](https://global.discourse-cdn.com/julialang/original/3X/6/4/643ae6ea923e8eee2a5a793fd6b0a6e691027c83.jpeg "Using programming to get better on the drums") ](https://www.youtube.com/watch?v=Oog_aunpVms)

With this opportunity let me also announce the JuliaMusic organization, which now is working on Julia0.7 and has an online documentation here: [Introduction · JuliaMusic](https://juliamusic.github.io/JuliaMusic_documentation.jl/latest/)

We have very good support for MIDI data and some other things like making random sequences of motifs (which I use in the video as well).

We are still logo-less. This can’t stay like this!!! I am therefore posting this as a LOGO CONTEST AS WELL!!! I hope the big guns like e.g. @cormullion participate… 😉

Lastly, I am looking for a way to be able to print music score on staff directly from a command from Julia. Anybody has any ideas how I can achieve such a thing?

---

<div class="post-metadata">

### Author: ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)
#### Post date: [August 2, 2018, 5:32am UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/2 "2018-08-02T05:32:53Z")

</div>

For printed scores, Lilypond is a great option.

---

<div class="post-metadata">

### Author: ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)
#### Post date: [August 2, 2018, 7:13am UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/3 "2018-08-02T07:13:45Z")

</div>

Thanks David.

Yeah lilypond was one of my considerations, but I decided that in the end the by far best approach is something that takes MIDI files as inputs and spits out the score as output.

Lilypondwould require me to write a “translator” from the MIDI representation in Julia to this LaTeX style of Lilypond, and I think this extra step shouldn’t happen since MIDI already has the necessary musical information.

EDIT: The last part doesn’t have to happen: [LilyPond Application Usage: 4.3.1 Invoking midi2ly](http://lilypond.org/doc/v2.18/Documentation/usage/invoking-midi2ly)

---

<div class="post-metadata">

### Author: ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)
#### Post date: [August 2, 2018, 8:19am UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/4 "2018-08-02T08:19:45Z")

</div>

(You’re too nice to me, George!) The first idea that springs to mind is:

![09](https://global.discourse-cdn.com/julialang/original/3X/e/c/ecc93fdf32b15ba8a335f7b330ce6c2b4901ab68.png)

A bit plain and ordinary, but it seems logical.

Theme and variations (in color):

![juliamusiccolorvariations-400](https://global.discourse-cdn.com/julialang/original/3X/0/7/07a843fd186a1b4f6473768c046fbf86200cbb3c.png)

You might be looking for something a bit higher tech, I suppose.

If you turned your pendulum upside down, you could have a chaotic metronome… 😉

---

<div class="post-metadata">

### Author: ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)
#### Post date: [August 2, 2018, 8:29am UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/5 "2018-08-02T08:29:06Z")

</div>

This is super amazing actually and was also what I wanted to do by myself.

Only two requests: 1) white background, 2) put the characteristic 3 on top of the beam (as if it’s a triplet!)

> [@cormullion](#):
>
> If you turned your pendulum upside down, you could have a chaotic metronome… 😉

lol 😃

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [August 2, 2018, 9:00am UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/6 "2018-08-02T09:00:43Z")

</div>

I also think the white background would be nice.

---

<div class="post-metadata">

### Author: ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)
#### Post date: [August 2, 2018, 9:04am UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/7 "2018-08-02T09:04:28Z")

</div>

Yes, you’re right, of course. I’m just like a kid playing with crayons… 🙂

![05](https://global.discourse-cdn.com/julialang/original/3X/b/6/b6dae0c8b0c938cc8efdd70c8b97d8442c8f9065.png)

![juliamusic](https://global.discourse-cdn.com/julialang/original/3X/a/b/abfb60a29a1e2c2976d5559b04b81d87de740869.png)

---

<div class="post-metadata">

### Author: ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)
#### Post date: [August 2, 2018, 12:22pm UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/8 "2018-08-02T12:22:28Z")

</div>

@dpsanders Using lilypond has some serious drawbacks but I’ve made it work directly through Julia!!!

Here is the snippet (requires master on MusicManipulations for now)

```julia
using MIDI, MusicManipulations

midi = readMIDIfile(testmidi())

cd("C:\\Users\\datseris\\Desktop")

run(`pwd`)

bass = getnotes(midi, 3)
grid = [0, 1//3, 2//3, 1]
grid = [0, 1//4, 2//4, 3//4, 1]

bass = quantize(bass, grid)

writeMIDIfile("test.mid", bass)

midi2ly = "C:\\Program Files (x86)\\LilyPond\\usr\\bin\\midi2ly.py"
isfile(midi2ly)

midiname = "test"
tolily = `python $(midi2ly) -x --allow-tuplet=8*1/3 $(midiname).mid -o $(midiname).ly`
run(tolily)

topng = `lilypond --format=png $(midiname).ly`
run(topng)

```

 ![test](https://global.discourse-cdn.com/julialang/original/3X/d/f/df6e03180ab36cb5aff6d7a15b26dc58e88b0cc3.png)

I can’t get the triplets to work. In their documentation they say

```julia
 -t, --allow-tuplet=DUR*NUM/DEN

    Allow tuplet durations DUR*NUM/DEN.

```

But they give absolutely no example or what `DUR` should be, like ticks or whatever. Do you have any ideas?

The other problem is that this relies on calling a veeeery old python 2.4 version code to do the conversion to lilypond format files. And this code is extremely complicated for me to convert… ☹ I’ll look more into it during my holidays I guess. Anyone who is a good python user willing to move this code to Julia? Or at least Python 3 😃 😃 😃

---

<div class="post-metadata">

### Author: ![waldyrious](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/waldyrious/32/80_2.png) [@waldyrious](https://discourse.julialang.org/u/waldyrious)
#### Post date: [August 2, 2018, 1:09pm UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/9 "2018-08-02T13:09:50Z")

</div>

Perhaps removing the horizontal lines and the border could make this cleaner without (much) loss of meaning?

---

<div class="post-metadata">

### Author: ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)
#### Post date: [August 2, 2018, 1:15pm UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/10 "2018-08-02T13:15:44Z")

</div>

By horizontal lines you mean the staff lines?.. Because I think those are not only super cool but also pretty important 😉

---

<div class="post-metadata">

### Author: ![waldyrious](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/waldyrious/32/80_2.png) [@waldyrious](https://discourse.julialang.org/u/waldyrious)
#### Post date: [August 2, 2018, 2:44pm UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/11 "2018-08-02T14:44:46Z")

</div>

Yes, a good logo always involves compromising between an accurate, faithful representation of the intended concept, and the application of good visual design principles (good contrast, simple and recognizable shapes that work in color, grayscale or black and white, as well as from very large to very small sizes, etc.)

In this case I believe the staff lines may (and the border certainly does) stand on the dispensable side of the scale. But this is my humble layman opinion, of course 🙂

---

<div class="post-metadata">

### Author: ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)
#### Post date: [August 2, 2018, 6:17pm UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/12 "2018-08-02T18:17:31Z")

</div>

Yes, agreed, it’s always better to refine and simplify one’s first attempts. It’s hard to stand out from a crowded field though… 🙂

 ![47](https://global.discourse-cdn.com/julialang/original/3X/b/2/b2e75cdb6891e60a682b8a517da8025ed88ed1d4.jpeg)

---

<div class="post-metadata">

### Author: ![jballanc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jballanc/32/328_2.png) [@jballanc](https://discourse.julialang.org/u/jballanc)
#### Post date: [August 3, 2018, 3:52am UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/13 "2018-08-03T03:52:20Z")

</div>

Well, it’s obvious from @cormullion’s sampling of note logos: if you want the JuliaMusic logo to stand out you just have to go with 64th notes! 😉

---

<div class="post-metadata">

### Author: ![JeremyCavanagh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeremycavanagh/32/4114_2.png) [@JeremyCavanagh](https://discourse.julialang.org/u/JeremyCavanagh)
#### Post date: [August 6, 2018, 5:03pm UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/14 "2018-08-06T17:03:37Z")

</div>

Have you looked at Musescore it allows midi file importing, I’m not an expert but it might be worthwile looking at it, it is free and available for most platforms.

---

<div class="post-metadata">

### Author: ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)
#### Post date: [August 7, 2018, 4:06pm UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/15 "2018-08-07T16:06:11Z")

</div>

Yeah I know it, in fact I use it in the video clip I posted! It is really good, veeeery good stuff. But the problem is that I have not found a way to run it from command line or something like that. So it is not possible to use it through Julia yet.

---

<div class="post-metadata">

### Author: ![JeremyCavanagh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeremycavanagh/32/4114_2.png) [@JeremyCavanagh](https://discourse.julialang.org/u/JeremyCavanagh)
#### Post date: [August 7, 2018, 5:14pm UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/16 "2018-08-07T17:14:04Z")

</div>

Hi George,

```
  I did see the start of your video after I sent in the message.

```

Have you seen this entry in the online handbook it may have  
something useful:

Regards

Jeremy

---

<div class="post-metadata">

### Author: ![Steven\_Sagaert](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/steven_sagaert/32/29578_2.png) [@Steven\_Sagaert](https://discourse.julialang.org/u/Steven_Sagaert)
#### Post date: [August 7, 2018, 5:32pm UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/17 "2018-08-07T17:32:23Z")

</div>

or make it a 3 note chord

---

<div class="post-metadata">

### Author: ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)
#### Post date: [August 7, 2018, 9:49pm UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/18 "2018-08-07T21:49:47Z")

</div>

Hey Jeremy, I think a link may be missing from your message?

---

<div class="post-metadata">

### Author: ![JeremyCavanagh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeremycavanagh/32/4114_2.png) [@JeremyCavanagh](https://discourse.julialang.org/u/JeremyCavanagh)
#### Post date: [August 8, 2018, 8:13am UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/19 "2018-08-08T08:13:49Z")

</div>

Hi George,

Sorry about that, it’s still on my reply but I’ll paste it again:

Hopefully it’s okay this time as it’s just plain text now.

```
  If this fails, open MuseScore then in "help" tab "Online Handbook" then search for "command line" at the bottom select next and the click "command line options".

You can also download a pdf copy of the handbook, probably a good idea anyway, and go to page 232.

Hope it works this time.

Regards

Jeremy

```

---

<div class="post-metadata">

### Author: ![JeremyCavanagh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeremycavanagh/32/4114_2.png) [@JeremyCavanagh](https://discourse.julialang.org/u/JeremyCavanagh)
#### Post date: [August 9, 2018, 1:51pm UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/20 "2018-08-09T13:51:26Z")

</div>

Hi George,  
Just checking to see how you got on, and yet again the link has been removed from my email. So let’s give it another go.

> **[Command line options](https://musescore.org/en/handbook/3/command-line-options)**
>
> MSCORE(1) — General Commands Manual Page NAME mscore, MuseScore3 — MuseScore 3 sheet music editor SYNOPSIS You can launch MuseScore from the command line by…

Regards  
Jeremy

[Next page](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784.md?page=2)
