Unit of Pitch - Page 2 - FamiTracker

# FamiTracker

FamiTracker Support Forums

Skip to content

## Unit of Pitch

General discussion about tracking, help and support.
Post Reply

- Print view

14 posts

- Previous
- 1
- 2

HertzDevil
  Posts: 475
  Joined: Thu Apr 23, 2015 7:39 pm
  Location: Hong Kong SAR
  Contact:
  Contact HertzDevil
  Website Facebook Twitter Skype
  YouTube

### Re: Unit of Pitch

- Quote

Post by HertzDevil » Thu Dec 17, 2015 3:18 pm

Not all sound channels use the same internal pitch resolution as the underlying sound chip, so the tracker might use a finer or coarser "unit of pitch" than the sound chip allows:

- For N163, regardless of the number of channels used, pitch sequences alter the pitch register by units of 4, hi-pitch sequences by 64; Pxx and 4xy effects by units of 64; slide effects, including 1xx, 2xx, 3xx, Qxy, and Rxy, by units of 16.
- For VRC7, slide effects alter the pitch register by units of 0.25. The decimal part is truncated during right-shifting the internal pitch value.
- For the 5B envelope in the 0.5.0 betas, when auto-envelope is enabled by the Hxy effect, the envelope period is taken by right-shifting the active channel's tone period by (x - 8); when x is greater than 8, which is the case most of the time, the envelope will have a smaller resolution than the tone output. (The envelope generator itself has a much larger "unit of pitch" than the tone output in the AY-3-8910 anyway.)
- For all other channels, the smallest unit of pitch is simply that provided by the sound chip; this means that Pxx directly increments/decrements the pitch register, 4xy from its vibrato table, and slide effects by the slide speed amount per tick.

In N163 instruments, positive values in the pitch and hi-pitch sequences indicate an increase rather than decrease in frequency; their values are added to the pitch register regardless of whether they represent period or frequency.
The VRC7 channels each have an octave register; given the same note name, the "unit of pitch" acts on the pitch detune (as cents) identically across octaves. When using 3xx, Qxy, or Rxy, the octave takes the largest value throughout the pitch slide:

Code: Select all

`# : FM Channel 1
ROW 00 : C-4 00 . 300 ; reset octave to 4
ROW 01 : B-4 00 . 340 ; same octave
ROW 02 : C-4 00 . ...
ROW 03 : C-3 00 . ... ; octave remains at 4
ROW 04 : C-4 00 . ...
ROW 05 : C-5 00 . ... ; octave is now at 5
ROW 06 : C-4 00 . ...`
On row 05, increasing the octave effectively stretches the "unit of pitch" by a factor of 2. Slide speeds still use an internal resolution of 1/4 frequency unit; it is the octave register that provides faster changes in the frequency values.
When in doubt, check [Tracker] -> [Display register state] and then use the frequency values shown there. FamiTracker displays the absolute frequency and the cent detune for the 2A03 channels, so that less calculation is needed. 0CC-FamiTracker extends this to all melodic channels; 0.5.0 betas show the period/frequency registers through [Tracker] -> [Display active effects], but this value can be different from the true register value, as shown in the register state display, which is still missing for MMC5/VRC7/5B.
In fact, in as early as FamiTracker 0.4.0, there are already plans to implement a "linear pitch" that is approximately equally sensitive to pitch bends at all frequencies (pardon the poor audio quality). It is not perfect right now, but attached below is a test build where this feature is permanently enabled (by setting CChannelHandler::m_bLinearPitch to true and not getting the attribute from the current document). It does not apply to Pxx effects yet, so true detune cannot be done by a single Pxx effect command. See CChannelHandler::m_iPeriodPart and its uses in the source code for details.
Lastly, I also maintain a spreadsheet for this kind of stuff.

Attachments
  ft_v046_linear_pitch.zip
    (356.58 KiB) Downloaded 162 times

refactoring 0cc-famitracker
Top

ImATrackMan
  Posts: 188
  Joined: Sat Apr 25, 2015 6:05 am
  Location: Plantation, FL, US
  Contact:
  Contact ImATrackMan
  Website Twitter Skype

### Re: Unit of Pitch

- Quote

Post by ImATrackMan » Thu Dec 17, 2015 3:30 pm

> MrsBeefy wrote:But who uses expansion chips anyway...

Oh I am LAUGHING.
Slowly working on a thing called "FaMIGA".
____________________________________________________
Youtube
Twitter (Stay off my lawn, kids)
Soundcloud.
I do all hardware recordings including Sunsoft5B, FDS, and MULTICHIP !
>quscx uvngw bebxm xqdyl<
Top

Stratelier
  Posts: 378
  Joined: Sun Apr 26, 2015 7:46 pm

### Re: Unit of Pitch

- Quote

Post by Stratelier » Fri Dec 18, 2015 3:46 am

> Xyz wrote:FYI, the thing you are asking for is called FT's "period table" and many sound drivers for all kinds of different chips have one of these.

You can get FT to display some of these values by going to the Tracker menu and enabling "Display register state". This will show the values for whatever's currently being played, with the period value shown in hexadecimal and an approximation of its chromatic pitch (+/- cents).
Top

MrsBeefy
  Posts: 6
  Joined: Sat Nov 21, 2015 10:47 pm
  Location: Above the Adriatic

### Re: Unit of Pitch

- Quote

Post by MrsBeefy » Fri Dec 18, 2015 10:03 am

Such great info! As I said before, I'm decent with the tracker nowadays but kind of lacking on the theory and technical sides of FamiTracker. Thanks to all of you for helping me change that!
Edit: That linear pitch bend dev video is the (non-existent) feature that I was wondering about! (and why I asked my original question)
"But who uses expansion chips anyway..." -MBeefy 2015
Top

Display posts from previous:
Sort by

Post Reply

- Print view

14 posts

- Previous
- 1
- 2

Return to “General Talk”

Jump to

- Rules
- Wiki
- FamiTracker
- General Talk
- Bug Reports
- Feature Requests
- Source and development
- Music
- Original Music
- Cover Music
- Other
- Site Issues & Suggestions