Skip to content

Commit

Permalink
Add firmware without white key quantization
Browse files Browse the repository at this point in the history
Due to white key quantization, the module is quite sensitive to
inaccurate CV input of TONE. This is especially notable when the same CV
is simultaneously used to control the pitch of another module as well.

This patch adds a feature flag `even_quantization`. If this is enabled,
white key quantization is switched off.

Signed-off-by: Petr Horacek <[email protected]>
  • Loading branch information
phoracek committed Jun 16, 2024
1 parent f20933e commit beae34f
Show file tree
Hide file tree
Showing 7 changed files with 444 additions and 82 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ backwards compatibility.
## Unreleased

* Pure Data externals were moved to a [dedicated project](https://github.com/zlosynth/automaton).
* Offer alternative firmware with white key quantization disabled.

## 2.2.1

Expand Down
3 changes: 3 additions & 0 deletions eurorack/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ opt-level = "z" # This contains code used only during the boot, no need for spee

[profile.release.package.crc]
opt-level = "z" # CRC is only used while restoring a config on boot and does not need to be fast

[features]
even_quantization = ["achordion-lib/even_quantization"]
1 change: 1 addition & 0 deletions hack/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ rm -rf release
mkdir release

pushd eurorack && cargo +1.63.0 objcopy --release -- -O binary ../release/achordion-firmware-${version}.bin && popd
pushd eurorack && cargo +1.63.0 objcopy --release --features even_quantization -- -O binary ../release/achordion-firmware-${version}-even-quantization.bin && popd

make manual
cp manual/user/manual_digital.pdf release/achordion-user-manual.pdf
Expand Down
4 changes: 4 additions & 0 deletions hack/release.tmpl.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ ${CHANGES}
## Firmware

Achordion's firmware can be upgraded to obtain new features and bug-fixes. To do so, download the binary from attachments bellow, navigate to [Electro-Smith's web programmer](https://electro-smith.github.io/Programmer/) and follow the guide described under the "Display Help" button.

## Known issues

Due to white key quantization, the module is quite sensitive to inaccurate CV input of TONE. This is especially notable when the same CV is simultaneously used to control the pitch of another module as well. If you suffer from these issues, try the alternative firmware `achordion-firmware-x.y.z-even-quantization.bin`.
1 change: 1 addition & 0 deletions lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ publish = false
default = ["stable_amplitude"]
balanced_amplitude = []
stable_amplitude = []
even_quantization = []

[dependencies]
micromath = "1.1"
Expand Down
5 changes: 5 additions & 0 deletions lib/src/note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,11 @@ impl Note {
Self::try_from_i16(note as i16).unwrap()
}

#[inline(always)]
pub fn try_from_u8(note: u8) -> Option<Note> {
Self::try_from_i16(note as i16)
}

#[inline(always)]
pub fn try_from_i16(note: i16) -> Option<Note> {
if note >= 0 && note <= Note::HIGHEST_NOTE as i16 {
Expand Down
Loading

0 comments on commit beae34f

Please sign in to comment.