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

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 (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:
using MusicManipulations
cd(@__DIR__)

midi = readMIDIfile(testmidi())

bass = getnotes(midi, 3)

basstrim = bass[1:50]

musescore("bass.png", basstrim)
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 :smiley:

2 Likes

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

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

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

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

1 Like

Awesome, thanks for the kind words Jeremy. 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.

2 Likes