Troubadour.jl

Musically plays LLVM code
Author JuliaWTF
Popularity
7 Stars
Updated Last
3 Months Ago
Started In
February 2024

Troubadour

Stable Dev Build Status Coverage Code Style: Blue ColPrac: Contributor's Guide on Collaborative Practices for Community Packages Aqua

Troubadour will look at the LLVM IR of your code and turn it into a beautiful melody.

Installation

This package is unregistered so you will need to install it via

import Pkg
Pkg.add(PackageSpec(url = "https://github.com/JuliaWTF/Troubadour.jl"))

@llvm_midi

For using @llvm_midi you will additionally need to install fluidsynth. There is a large list of installation instructions on their github.

@llvm_play

For using @llvm_play you will need to install sox. You can find it on this download link. PS: there is some work to make it an automatically installed binary.

Hear your code

With the installation done you are ready for some LLVM music delight! Troubadour can be used via its macros @llvm_midi and @llvm_play:

using Troubadour
@llvm_midi sqrt(2)
@llvm_play println("Dance!")

With @llvm_midi you can also record your llvm as an MP3 using the keyword record = true

@llvm_midi 1 + 1 record = true

The sound file will be saved as "1 + 1.mp3" (the latest summer hit).