Device Details


Overview

Name | Version: Kasm Bangaz 1.12
Author: kevleyski
Device Type: MIDI Effect
Description: Rust code drummer for Drum Racks

This is an interesting example of Rust/WebAssembly code running in Ableton Live chewing on some complex algorithms to bang on your drum racks, with some evolving and euclidean algorithms thrown in the mix

For kicks you can also reassign each named drum to hit a different MIDI note, this make it quick an easy to swap drums around but more importantly means to can just skip some altogether, it's kinda fun to play around wit

Also try Bangaz with regular instruments too, reassigning each drum to harmonics to make some interesting apreggios

To change the drum sequence algoriths this Ableton Max4Live MIDI device was built with source code available here:
https://maxforlive.com/library/device/12909/kasm-ableton-wasm-rust-source-code-example

!! NOTE: you need the latest Ableton 12.2 for this as it uses the new V8 jsinterp from Max9 !!

Kasm is WebAssembly so you can develop and test things in web browser too, try it out here:
https://pyrmontbrewery.com/kasm


For those interested, this is what the Bangaz Rust code (Ableton Live and Web version uses identical WebAssembly)...

/// bangaz_1: Kasm Bangaz Drummer Pattern 1
pub fn kasm_emanator_bangaz_1(_inlet_0_note: i32, _inlet_1_semitone: i32, _velocity: i32, _enc1: i32, _enc2: i32, step: i32, _bar: i32) -> i32 {
if step % 4 == 0 {
send_note(get_drum_note(DrumType::Kick), 127, 0, 100, 30);
return get_drum_note(DrumType::Kick);
} else if step % 4 == 2 {
send_note(get_drum_note(DrumType::Snare), 127, 0, 100, 80);
return get_drum_note(DrumType::Snare);
} else if step % 8 == 3 {
send_note(get_drum_note(DrumType::LowTom), 127 / 2, 0, 100, 64);
return get_drum_note(DrumType::LowTom);
} else if step % 8 == 6 {
send_note(get_drum_note(DrumType::MidTom), 127 / 2, 0, 100, 64);
return get_drum_note(DrumType::MidTom);
} else if step % 16 == 9 {
send_note(get_drum_note(DrumType::HighTom), 127 / 2, 0, 100, 64);
return get_drum_note(DrumType::HighTom);
} else if step % 16 == 13 {
send_note(get_drum_note(DrumType::Clap), 127 / 2, 0, 100, 64);
return get_drum_note(DrumType::Clap);
} else if step % 16 == 13 {
send_note(get_drum_note(DrumType::Cowbell), 127 / 2, 0, 100, 64);
return get_drum_note(DrumType::Cowbell);
}
send_note(get_drum_note(DrumType::ClosedHH), 127 / 2, 0, 100, 64);
get_drum_note(DrumType::ClosedHH)
}

/// bangaz_2: Kasm Bangaz Drummer Pattern 2 - wild polyrhythms and syncopation
pub fn kasm_emanator_bangaz_2(_inlet_0_note: i32, _inlet_1_semitone: i32, velocity: i32, _enc1: i32, _enc2: i32, step: i32, _bar: i32) -> i32 {
// Kick: every 3 steps (triplet feel)
if step % 3 == 0 {
send_note(get_drum_note(DrumType::Kick), velocity, 0, 100, 40);
}
// Snare: every 5 steps (cross-rhythm)
if step % 5 == 2 {
send_note(get_drum_note(DrumType::Snare), velocity, 0, 100, 90);
}
// Closed HH: every step, but accent every 7th
if step % 7 == 0 {
send_note(get_drum_note(DrumType::ClosedHH), velocity, 0, 100, 64);
} else {
send_note(get_drum_note(DrumType::ClosedHH), velocity / 2, 0, 100, 64);
}
// Open HH: syncopated, every 6th step
if step % 6 == 3 {
send_note(get_drum_note(DrumType::OpenHH), velocity / 2, 0, 100, 64);
}
// Toms: staggered
if step % 8 == 4 {
send_note(get_drum_note(DrumType::LowTom), velocity / 2, 0, 100, 64);
}
if step % 10 == 7 {
send_note(get_drum_note(DrumType::MidTom), velocity / 2, 0, 100, 64);
}
if step % 12 == 9 {
send_note(get_drum_note(DrumType::HighTom), velocity / 2, 0, 100, 64);
}
// Clap: offbeat
if step % 16 == 5 {
send_note(get_drum_note(DrumType::Clap), velocity / 2, 0, 100, 64);
}
// Cowbell: rare accent
if step % 16 == 13 {
send_note(get_drum_note(DrumType::Cowbell), velocity / 2, 0, 100, 64);
}
0
}

/// bangaz_3: Kasm Bangaz Drummer Pattern 3 - extravagant, musically correct polyrhythms
pub fn kasm_emanator_bangaz_3(_inlet_0_note: i32, _inlet_1_semitone: i32, velocity: i32, _enc1: i32, _enc2: i32, step: i32, _bar: i32) -> i32 {
// Kick: every 4 steps, but double on 12 and 13 (extravagant fill)
if step % 4 == 0 || step == 12 || step == 13 {
send_note(get_drum_note(DrumType::Kick), velocity, 0, 100, 50);
}
// Snare: displaced, every 6th and 14th step
if step % 6 == 3 || step == 14 {
send_note(get_drum_note(DrumType::Snare), velocity, 0, 100, 100);
}
// Closed HH: every step, but accent every 5th and 11th
if step % 5 == 0 || step == 11 {
send_note(get_drum_note(DrumType::ClosedHH), velocity, 0, 100, 80);
} else {
send_note(get_drum_note(DrumType::ClosedHH), velocity / 2, 0, 100, 64);
}
// Open HH: every 7th and 15th step
if step % 7 == 0 || step == 15 {
send_note(get_drum_note(DrumType::OpenHH), velocity / 2, 0, 100, 64);
}
// Toms: polyrhythmic, staggered
if step % 8 == 2 {
send_note(get_drum_note(DrumType::LowTom), velocity / 2, 0, 100, 64);
}
if step % 9 == 4 {
send_note(get_drum_note(DrumType::MidTom), velocity / 2, 0, 100, 64);
}
if step % 10 == 6 {
send_note(get_drum_note(DrumType::HighTom), velocity / 2, 0, 100, 64);
}
// Clap: displaced accent
if step % 16 == 7 || step == 10 {
send_note(get_drum_note(DrumType::Clap), velocity / 2, 0, 100, 64);
}
// Cowbell: rare, on 1 and 15
if step == 1 || step == 15 {
send_note(get_drum_note(DrumType::Cowbell), velocity / 2, 0, 100, 64);
}
0
}

...

full source code is here https://maxforlive.com/library/device/12909/kasm-rust-ableton-wasm-source-code


Details

Live Version Used: 12.2
Max Version Used: 9.0
Date Added: Jul 25 2025 12:43:54
Date Last Updated: Jul 31 2025 12:51:38
Downloads: 135
License: None
Average Rating

Log in to rate this device

-n/a-

Files

Device File: Kasm Bangaz.amxd
 


Login to comment on this device.

Browse the full library