-
Notifications
You must be signed in to change notification settings - Fork 56
Adds support for the VIBrato command to SampleInstrument #1234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
n1LS
wants to merge
30
commits into
xiphonics:master
Choose a base branch
from
n1LS:627-vibrato
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
f3ff5cf
re-enables PC messages on change, when the player is running
n1LS 06715ff
Merge branch 'master' of https://github.com/n1LS/picoTracker
n1LS eb7c2e2
Merge branch 'master' of https://github.com/n1LS/picoTracker
n1LS 71b38f8
adds vibrato command
n1LS da480d6
Merge branch 'master' of https://github.com/n1LS/picoTracker
n1LS e5a443d
Merge branch 'xiphonics:master' into 627-vibrato
n1LS 06521e3
adds VIBrato command support to the SampleInstrument
n1LS 053f1f9
Merge branch '627-vibrato' of https://github.com/n1LS/picoTracker int…
n1LS 1ac8d5f
Merge branch 'master' of https://github.com/n1LS/picoTracker
n1LS 697f305
Merge branch 'master' of https://github.com/n1LS/picoTracker
n1LS 4024e20
Merge remote-tracking branch 'upstream/master'
n1LS 4a09c94
Merge remote-tracking branch 'upstream/master'
n1LS 2b9006f
Merge remote-tracking branch 'upstream/master'
n1LS b4aa0e5
cleans up alt+play/enter handling, adds support to go up directories
n1LS ed736c3
Merge remote-tracking branch 'upstream/master'
n1LS 9cd101d
fixes various character issues
n1LS 164e453
Merge branch 'xiphonics:master' into master
n1LS 7ff837b
Merge branch 'master' of https://github.com/n1LS/picoTracker
n1LS b3ff955
merges upstream/master
n1LS fb01c2c
Merge branch 'xiphonics:master' into master
n1LS ddb4016
adds vibrato command
n1LS 0154e52
adds VIBrato command support to the SampleInstrument
n1LS aa7ae4a
Merge branch '627-vibrato' of https://github.com/n1LS/picoTracker int…
n1LS d6cdc01
expands 64 step lut to 256 steps
n1LS c33255b
adds reset on Start()
n1LS 1a5060d
removes superflouos vibrato reset
n1LS 6d8ad45
Merge remote-tracking branch 'upstream/master'
n1LS ef6e803
merging upstream
n1LS 6310bb7
Merge branch 'master' into 627-vibrato
n1LS bcca409
adds help text to documentation and removes ticking from table to kee…
n1LS File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -121,6 +121,10 @@ static char **getHelpLegend(FourCC command) { | |
| result[0] = (char *)("MIDI Chord:abcd"); | ||
| result[1] = (char *)("send rel notes:+a,+b,+c,+d"); | ||
| break; | ||
| case FourCC::InstrumentCommandVibrato: | ||
| result[0] = (char *)("VIBrato:aabb"); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. its not enough for this to be added to the onscreen help, it needs to be properly documented in both editions of the user manual. |
||
| result[1] = (char *)("rate aa, depth bb"); | ||
| break; | ||
| default: | ||
| result[0] = result[1] = (char *)(""); | ||
| break; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| /* | ||
| * SPDX-License-Identifier: BSD-3-Clause | ||
| * | ||
| * Copyright (c) 2026 xiphonics, inc. | ||
| * | ||
| * This file is part of the picoTracker firmware | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| // 256-step (+ sentinel) sine wave lookup table (full cycle) | ||
| // sin(2 * pi * index / 256) * 32767 | ||
| constexpr int16_t sine_i16_64[257] = { | ||
| 0, 804, 1608, 2410, 3212, 4011, 4808, 5602, 6393, | ||
| 7179, 7962, 8739, 9512, 10278, 11039, 11793, 12539, 13279, | ||
| 14010, 14732, 15446, 16151, 16846, 17530, 18204, 18868, 19519, | ||
| 20159, 20787, 21403, 22005, 22594, 23170, 23731, 24279, 24811, | ||
| 25329, 25832, 26319, 26790, 27245, 27683, 28105, 28510, 28898, | ||
| 29268, 29621, 29956, 30273, 30571, 30852, 31113, 31356, 31580, | ||
| 31785, 31971, 32137, 32285, 32412, 32521, 32609, 32678, 32728, | ||
| 32757, 32767, 32757, 32728, 32678, 32609, 32521, 32412, 32285, | ||
| 32137, 31971, 31785, 31580, 31356, 31113, 30852, 30571, 30273, | ||
| 29956, 29621, 29268, 28898, 28510, 28105, 27683, 27245, 26790, | ||
| 26319, 25832, 25329, 24811, 24279, 23731, 23170, 22594, 22005, | ||
| 21403, 20787, 20159, 19519, 18868, 18204, 17530, 16846, 16151, | ||
| 15446, 14732, 14010, 13279, 12539, 11793, 11039, 10278, 9512, | ||
| 8739, 7962, 7179, 6393, 5602, 4808, 4011, 3212, 2410, | ||
| 1608, 804, 0, -804, -1608, -2410, -3212, -4011, -4808, | ||
| -5602, -6393, -7179, -7962, -8739, -9512, -10278, -11039, -11793, | ||
| -12539, -13279, -14010, -14732, -15446, -16151, -16846, -17530, -18204, | ||
| -18868, -19519, -20159, -20787, -21403, -22005, -22594, -23170, -23731, | ||
| -24279, -24811, -25329, -25832, -26319, -26790, -27245, -27683, -28105, | ||
| -28510, -28898, -29268, -29621, -29956, -30273, -30571, -30852, -31113, | ||
| -31356, -31580, -31785, -31971, -32137, -32285, -32412, -32521, -32609, | ||
| -32678, -32728, -32757, -32767, -32757, -32728, -32678, -32609, -32521, | ||
| -32412, -32285, -32137, -31971, -31785, -31580, -31356, -31113, -30852, | ||
| -30571, -30273, -29956, -29621, -29268, -28898, -28510, -28105, -27683, | ||
| -27245, -26790, -26319, -25832, -25329, -24811, -24279, -23731, -23170, | ||
| -22594, -22005, -21403, -20787, -20159, -19519, -18868, -18204, -17530, | ||
| -16846, -16151, -15446, -14732, -14010, -13279, -12539, -11793, -11039, | ||
| -10278, -9512, -8739, -7962, -7179, -6393, -5602, -4808, -4011, | ||
| -3212, -2410, -1608, -804, 0}; | ||
|
|
||
| // 16bit interpolation for 256-step sine table | ||
| static inline int32_t sine_i16_interpolated_256(uint16_t phase) { | ||
| // index into the table (top 8 bits) and fractional part (lower 8 bits) | ||
| uint8_t index = phase >> 8; // 0..255 | ||
| uint16_t frac = phase & 0xFF; // 0..255 | ||
|
|
||
| // fetch table values | ||
| int32_t a = sine_i16_64[index]; | ||
| int32_t b = sine_i16_64[index + 1]; | ||
|
|
||
| // a + ((b - a) * frac) / 256 | ||
| return a + (((b - a) * frac) >> 8); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is likely not going to work well with VIB cmds in tables combined with phrases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't seem to cause any issues when applying a bunch of Vibrato commands from both tables and phrases simultaneously. What issue are you referring to?