From b5ee0c22ef120233d08287113c3a86d2928cf697 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sun, 28 Jan 2024 13:22:04 -0500 Subject: [PATCH] PowerNoise doc is now complete --- doc/4-instrument/powernoise.md | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/doc/4-instrument/powernoise.md b/doc/4-instrument/powernoise.md index 66f76a111..af921ebf6 100644 --- a/doc/4-instrument/powernoise.md +++ b/doc/4-instrument/powernoise.md @@ -24,7 +24,7 @@ the LFSR must be initialized before it can produce sound. the Load LFSR macro al by default the LFSR is configured to produce square waves, by having a single tap in position 1 and an alternating LFSR pattern. -## Macros +## Macros (noise) - **Volume**: volume sequence. - **Arpeggio**: pitch sequence. @@ -47,4 +47,32 @@ this tab allows you to change the base octave - important when you have set a lo this channel has its own instrument type, as it does not use LFSR-based synthesis but instead generates saw waves. -I will finish this section later... +it uses a custom algorithm which will be (roughly) described below. + +the slope channel uses two "portions" - each with length, offset, invert and clip parameters. +the channel alternates between these portions as it is cycled. + +on every cycle, the offset of the current portion is either added or subtracted into the accumulator (depending on the invert parameter), effectively behaving like a multiplier. +if the clip parameter is enabled, this will make sure the accumulator doesn't go past 0 or 127 (depending on the invert parameter, again). otherwise, the accumulator will be ANDed with 127. +once an amount of cycles set by the portion length parameter have elapsed, the channel switches into the other portion. + +the current value of the accumulator is output. + +## Macros (slope) + +- **Volume**: volume sequence. +- **Arpeggio**: pitch sequence. +- **Panning (left)**: output level for left channel. +- **Panning (right)**: output level for right channel. +- **Pitch**: fine pitch. +- **Control**: channel settings: + - **clip A**: sets clip parameter of first portion. + - **clip B**: sets clip parameter of second portion. + - **reset A**: resets the first portion. + - **reset B**: resets the second portion. + - **invert A**: sets invert parameter of first portion. + - **invert B**: sets invert parameter of second portion. +- **Portion A Length**: sets the duration of the first portion. +- **Portion B Length**: sets the duration of the second portion. +- **Portion A Offset**: sets the accumulator speed of the first portion. +- **Portion B Offset**: sets the accumulator speed of the second portion.