## About Me Xyzzy ( ski-zee )
Stack: C + Web + Javascript + Python / Hylang 💙
Gear: Electribe, Guitar
DAWs: Pure Data, Reaper, Renoise
Genres: Techno, Electronic, Post Punk
# Goal Make music in javascript that sounds as good as the daw
Result - [Bitrhythm](https://bitrhythm.xyzzyapps.link)
80%
*Literate Programming ftw!*
Docs + Code + Notes
## Bitrhythm Overview 1. Early Attempts 2. How DAWs work 3. Mapping DAWs to Javascript
## Demo 1 + Tutorial ## Hacks and DAW primitives 1. Blank Canvas + Code Mirror 2. Music Loop 3. Dials and Samples 4. Patterns 5. State 6. Knobs and Guards 7. Observers 8. Misc
## Demo 2
## Where does this fit in ? 1. Defining music coding genres 2. Hard Coding 3. Conclusion 4. Version Control
## Wrapping Up 1. Limitations 2. Future 3. Support 4. Questions
# Assumption I will assume some familiarity with DAW workflows and working knowledge of javascript.
# Bitrhythm Overview
## 1. Early attempts Python + portmidi
Javascript + osc + renoise
Algorave scripts
## 2. How do Ableton/FL studio/Logic make music ? Mimics hardware - Recording A Track is a combination of - Virtual Instrument / Samples and Notes - Software Effects, Automation and Mastering
## 3. Mapping DAW to Web Audio Tone JS provides instruments and effects.
Javascript, webmidi provide notes and automation.
Blackhole and Reaper for the final steps
Everything is rendered into the audiocontext, which renders to the sound card
Demo 1
Audio Issues ?
*Note all the things you see moving*
Tutorial
Video
Code
# Hacks and DAW primitives
## 1. Canvas + Code Mirror Vj with p5 or webgl
## 2. Music Loop ``` var delta = 60 * 1000 / tempo / lines * 4; setInterval(function () { always(); text = getText(); for (pattern, track_no in patterns) { isHit = parse(pattern, track_no); editMode ? eval(oldText) : eval(text); if (runTansition) { // once transition(); } } }, delta) ```
## 3.Dials available as a global array `dials` which can be subscribed to
Can daws provide a simpler menu system which can be configured per project ? ## 4.Samples as urls
Sample Browser
## 5. Patterns / Dance Tabs DSL
Absolute Pitch, no problem!
We still use Roman Numbers!
Roma/Gypsy Decimals > Hexadecimals
```js x[2;^C2;+0.01;_0.1] 0 0 . *4 x[0.1] 0 x[1] 0 0 0 x[1] 0 - vol, ^pitch, +delay, _pan `0 ~ a ~ 10 ~ 1100 `1 ~ b ~ 11 ~ 1101 ... ```
## 6. State Use `mem` and simple logic to compose notes relative to other notes
``` if (mem["kick_hit_thrice"]) { pn("crash") } ```
## 7. Automation as Array Rotation and Guards MIDI, mouse, XY
DSL like turtle graphics
Endless Acid Banger convinced me to model knobs directly
``` k1 = knob({ ramp : [0.525, 0.8, 0.4, 1, 0.25, 0.75, 1, 0.25, 0.1 ], direction: false, step: 0.01, "number": dials[2]["cell"] }); g = guard([-20,15]) always = function () { // run tweak transition stab_filter.frequency.value = g(k1.move() * 10); } ```
## 8. Observers + Timers
- bang and spigot from pure data
- sidechain anything
- constraint propagation
- arpegios/chords/progressions/counterpoint are just things tied together
## 9. Misc Hacks Alerts
Pads + Keyboard Mapping
## Bonus A basic 303!
Demo 2
Video
Code
## Where does Bitrhythm fit in the context of existing tools ? ## What kind of music can you do with this ?
## Music Coding Genres ### Interactive Coding ✓ Share track as a url
### Algorithmic Coding ~ Music as algorithms with experimental patterns
IDM / Ambient / Generative / ML ### Live Coding ~ Coding itself as performance
### Adaptive Coding ☒ Games ### Creative Coding ✓ Demoscene
### Physical Coding ☒ websocket vs osc
### Machine Coding ☒
### Hard Coding ✓ Music as data with tracker notation or static constraints
No randomness or ML
Chiptune / Tracking / Executable Music
## Conclusion Code is the new music sheet!
*Can a text-driven interface replace and improve over DAW workflows, without sacrificing quality ?*
Yes, but sound design and mastering is better done in UI.
- Copy Paste - Chunking - Prototyping
## Version Control see
diff
## Wrapping Up
## Limitations Reverb
Gc + GUI
Timer
Big latency while screen recording
## Future *90 minute set*
Recording audio, performance and automation
websocket based collab
## Alternate Implementations C / raylib to avoid latency
Juce based VST ?
Elementary
Csound Web
Gibber
### Other projects and links! [Build your own Data Flow Engine](https://xyzzyapps.link/dataflowbook)
(inspired by Pure Data)
[Twixter](https://xyzzyapps.link/twixter)
[More Apps + Code + My Music + Social](https://xyzzyapps.link)
[Post Issues on Github](https://github.com/xyzzyapps/xyzzyapps.link)
Support me on [Gumroad](https://xyzzy.gumroad.com/)
##### Hard Coding - A Newsletter on Music + Code [Substack](https://xyzzyapps.substack.com)
#### Questions ? [Credits](https://bitrhythm.xyzzyapps.link/docs/credits.html)