aboutsummaryrefslogtreecommitdiffstats

Trriggy

A naive trigger/drum replacer in Rust.

By naive, I mean there no attempt at using anything resembling proper signal processing here. We're simply calculating the average amplitute of the samples as we go along, and when we find a sample with significantly higher amplitude than the average, the trigger strikes. To avoid retrigs we wait until the average has dropped below a certain threshold before allowing triggers to fire again.

I've tested this by replacing the bass drum on one of the tracks by one of my bands, a technical thrash metal band with fairly fast double bass drums. (I'll put up some samples later.)

I'll be very happy to hear your experience if you've given it a ride.

Usage

# Replace the kick drum in recorded-kick.wav with the cool-kick.wav
# and store the result in replaced-kick.wav
trriggy --sample cool-kick.wav --output replaced-kick.wav recorded-kick.wav

Trriggy only handles 16bit wave files for now.

Contributing

The code is a mess, I hope to clean it up and turn it into a library later. This was mostly a test to see what it would take to replace the clicky midi bass drum on our recording with something more juicy.

If you do want to contribute, I'm always happy to take patches by email or a publicly accessible git branch somewhere. I'm also available as @harald@hub.volse.no on the social web (Mastodon/Hubzilla/Diaspora etc.)

License

Copyright (C) 2018 Harald Eilertsen

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.