# 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:** 7
**Page:** 2

<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 13, 2018, 2:20pm UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/21 "2018-08-13T14:20:47Z")

</div>

Hello everybody! Using @JeremyCavanagh 's comments I made a Julia interface to `musescore`. It is very easy and it is done via a single function call! And it supports both `Notes` and `MIDIFile`. However I need someone to test it for me as I am a Windows user!

Please, someone that is willing to do the following on Mac and Linux:

1. Install MuseScore from here: [Download | MuseScore](https://musescore.org/en/download) (it is open sourced)
2. Add MuseScore to your path
3. Add the master branch of musicmanipulations via: `] add MusicManipulations#master`
4. Run the following two code blocks:

```julia
using MusicManipulations
cd(@ __DIR__ )

midi = readMIDIfile(testmidi())

bass = getnotes(midi, 3)

basstrim = bass[1:50]

musescore("bass.png", basstrim)

```

```julia
piano = getnotes(midi, 4)

qpiano = quantize(piano, [0, 1//3, 2//3, 1])

ptrack = MIDITrack()
addnotes!(ptrack, qpiano)
smidi = MIDIFile(1, 960, [midi.tracks[3], ptrack])

musescore("doxy.pdf", smidi) 

```

It should produce 1 png file (and display it) and one pdf file (and display it). The pdf file should be 4 pages long. @dpsanders I am taking the liberty to tag you because I know you are both a musician and a julian and a mac user 😃

---

<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 13, 2018, 5:17pm UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/22 "2018-08-13T17:17:22Z")

</div>

Hi George,

```
  Glad to be of some use. However, I am trying help you further as

```

I am running Mac OS X 10.11.6. But, I have a problem, I assume  
your code is meant to be run from within Julia (I’m currently  
trying 1.0.0). Things appear to be fine until the last line of  
each block, which results in the following error message:

ERROR: UndefVarError: musescore not defined

```
  Now just to make life more complicated, the command line call for

```

MuseScore on the mac is mscore (which does work in terminal) but  
results in the same error within Julia.

Have I misunderstood your instructions or is it something else?

Regards

Jeremy

---

<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 13, 2018, 5:21pm UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/23 "2018-08-13T17:21:35Z")

</div>

Hi Jeremy, thanks for letting me know about `mscore`. I have changed it in the latest master.

I can see the `musescore` function in my session. Be sure that you have added the master branch (i.e. development version) of MusicManipulations.jl. Don’t do `add MusicManipulations` but do `add MusicManipulations#master`

---

<div class="post-metadata">

### Author: ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)
#### Post date: [August 13, 2018, 5:22pm UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/24 "2018-08-13T17:22:15Z")

</div>

> [@Datseris](#):
>
> - Install MuseScore from here: [https://musescore.org/en/download](https://musescore.org/en/download) (it is open sourced)
> - Add MuseScore to your path
> - Add the master branch of musicmanipulations via: `] add MusicManipulations#master`
> - Run the following two code blocks:

Sure, I’ll try it soon, when I have some time available. Perhaps you could download it in `deps/build.jl`.

---

<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 13, 2018, 6:08pm UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/25 "2018-08-13T18:08:22Z")

</div>

Hi George,

```
  Very impressive indeed. Works perfectly. I did tell you I wasn't an expert (neither MuseScore nor Julia).

  Keep up the good work, I shall be follow with great interest as I'm starting to learn the guitar.

```

Regards

Jeremy

---

<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 13, 2018, 6:24pm UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/26 "2018-08-13T18:24:38Z")

</div>

Awesome, thanks for the kind words Jeremy. Now I am just waiting for a Linux user and then I’ll publish a new release!

---

<div class="post-metadata">

### Author: ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)
#### Post date: [August 13, 2018, 6:48pm UTC](https://discourse.julialang.org/t/how-to-get-better-on-the-drums-using-julia-ann-juliamusic-logo-contest/12784/27 "2018-08-13T18:48:18Z")

</div>

> [@Datseris](#):
>
> Now I am just waiting for a Linux user and then I’ll publish a new release!

Tried it on arch linux with the musescore from pacman, everything worked in your example.

Installation was `sudo pacman -S musescore`, so you could make a build script for arch users.

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