DJCLI: Command Line DJ Tools

Sam Hartman

July 26, 2019

Debian as a Force for Changing the World

Through Debian we can change the world. Together by creating free software, easy to use.

Individually, we each have a world we’d like to see. We have not given up on the future; we know that small actions can amplify.

Music and connection

Dance and music symbolize connection with myself and the world:

  • Around a fire out in the woods
  • The community that kept Paul van Dyk’s show alive after he fell off the stage
  • In the Club

Trance Family

Every trance show I’ve attended, I’ve been welcomed.

  • Toronto: Peace, love and Unity for an invitation to Trance Family

  • Exchanged for truth about love from one of my traditions

Early Exposure to Music

Learning Music and Being Blind

  • Started learning piano, relatively late
    • Focused on memorization for building skills
    • Site Reading
  • No focus on theory, composition or improv before I gave up

Site Reading

The thing about site reading is the site part. It takes me hands to play and read.

And besides music braille is a bad solution to an impossible problem.

So music is for listening, not to contributing to😞

TCP Audio Visualizer

Challenge: Listen to Network Traffic

Life wasn’t good and I needed a distracting coding challenge.

Goal: Turn tcpdump output into sound. Listen to network to see how busy it is, roughly how many streams are going on, and what systems are involved.

Tcpscore

  • Parse tcpdump output and turn it into energy events
  • Streams play more complex mellody and louder the more energy they have
  • Sources are positioned in space

Conclusions from Tcpscore

  • If I try to learn something I probably can:
    • Music theory
    • Practical discrete math
  • In writing free software I gain confidence, power and knowledge

A Demo

Network background with apt full-upgrade joining midway through.

The Wedding Challenge

Worlds Collide

I noticed thematic overlap between what the Trance Family is doing in the clubs and my pagan spiritual tribe out in the woods.

  • Empowering people
  • Using dance as a gateway to meditation and connection

Goal: sho this overlap at my wedding.

Playlists not enough

I constructed a playlist combining trance and pagan songs but:

  • Tracks needed trimming
  • The transitions matter

Hiring a DJ?

Considered hiring someone. But I had a specific vision for what I wanted. How could I possibly coordinate to get what I wanted in a reasonable budget?

If you’re going to do it right, do it yourself.

Toward Learning to DJ

DJ Software in Debian

So apt install dj and move on with life?

There actually are options. Mixxx even looks cool.

Except for accessibility

Accessibility Challenges

  • Understanding fader and indicator positions
  • Much of the display is not accessible at all
  • Accessibility feedback might not be fast enough

Writing my own Software

And so DjCLI begins

  • Command line interface
  • Use existing realtime sound engines
    • csound
    • ecasound

What Debian Makes Possible

because I can look at Mixxx and other software, I can choose how much of the problem I solve and how much I reuse:

  • Beat detection/BPM from Mixxx
  • Same for key detection
  • Reuse a realtime sound engine

Timeline but Live

I was new and needed to make the most of my time DJing. So I wanted to be able to perform live, but clean up my mistakes. So I needed to be able to edit on a timeline but also do live work.

Too ignorant to know no one does that.

Challenges Combining Timeline and Live

  • You need more information for a timeline
    • Did you remove because it was wrong or because you’re fading out?
  • When you restart a track, are you moving it or creating another copy?

Learning on the Job

Things I didn’t expect:

  • You mean the key of a song matters?
  • I want to loop songs?
  • And I don’t want to set my loop points by hand?

Good decisions

  • Significant time spent on synchronize to beat
  • For each track, store a list of good cue points; building a database for easily moving between tracks.
  • The time line and live do actually work well together.

Time and Timelines

Mix, Track and File timelines

Free Software Gives Understanding

  • I understand at a deep level how my software works.
  • Yet it’s hard to communicate with someone who uses commercial software:
    • I understand deeply a much smaller set of options
    • They understand how a much broader set of things sound, but have no idea of the math or the how.

The jogwheel problem

The Jogwheel Problem (2)

The Power of Free Software

Free software gives us the tools to take control of what is important to us. Understanding; power; responsibility.

Debian gives us the tools we need to take advantage of free software.

Power of Free Software (2)

  • The existing solutions didn’t meet my needs: I’m blind and I wanted a novel approach to editing and performance.
  • I felt music was always beyond me.
  • Free software gave me the power to take control of my life.
  • Music is no longer something I just listen to.

On to Fun

What does this code do?

In a csound instrument:

k1 = 3
if k1 == 2
    print "Hello, World\n"
    endif

What does This Code Do (2)

It prints “Hello, world.”

But not if you replace k1 with i1

An if with a conditional k-expression is both true and false at i-time.

Where is your Code

  • https://salsa.debian.org/hartmans/djcli
  • https://salsa.debian.org/hartmans/tcpscore (coming soon)
  • Need better docs and to resolve a patch to the python sh module before it’s something others could easily use
  • License: GPL-3