what is the term used for a musical note being played?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
what is the term used for a musical note being played?
by on (#189585)
I'm working on a project, to see if I can manipulate the note being played for either the Square, Triangle, & Noise channels.

I'm reading up on nesdev wiki, but all I see are terms like envelope, sweep, length, etc. Nothing sticks out to what bits are used with the addresses as the "note" being played.

Can someone please explain what is considered the technical name for a musical note?
Re: what is the term used for a musical note being played?
by on (#189588)
If you don't like the term "note", which has a bunch of extra connotation (e.g. written music), maybe the word "tone" would do? It more simply refers to just a continuing sound, I think?
Re: what is the term used for a musical note being played?
by on (#189592)
I don't see "tone" within the nesdev. :-(

Here is the description of square 1 via nesdev wiki.

$4000 / $4004 DDLC VVVV Duty (D), envelope loop / length counter halt (L), constant volume (C), volume/envelope (V)

$4001 / $4005 EPPP NSSS Sweep unit: enabled (E), period (P), negate (N), shift (S)

$4002 / $4006 TTTT TTTT Timer low (T)

$4003 / $4007 LLLL LTTT Length counter load (L), timer high (T)
Re: what is the term used for a musical note being played?
by on (#189597)
I thought you were searching for an appropriate word to describe something, not trying to figure out how a particular idea is described on the wiki. I don't think the wiki says "tone".

Here are a few terms the wiki might use, and a description of how they might be components of a "note":
  • envelope / volume - controls where a note starts and stops, and how loud it is over time
  • period / frequency / pitch - controls how "high" or "low" the tone of the note is (e.g. "G-3" vs "C-2")
  • duty - controls the timbre or "texture" of the note (e.g. clarinet vs. oboe)
Re: what is the term used for a musical note being played?
by on (#189600)
Do you mean frequency? That's what determines weather a note / tone is "C", "D", "E", etc. It's not exactly the same thing, but there's a direct correlation, the wiki describes the math.
Re: what is the term used for a musical note being played?
by on (#189601)
Yes like C, C# etc, those to me are notes. Thanks you guys for your help. :-)
Re: what is the term used for a musical note being played?
by on (#189602)
Duty: Controls the instantaneous timbre.

Timer: Controls the wave's period in units of 16 CPU cycles (pulse) or 32 CPU cycles (triangle). Lower values mean a higher pitch. The value 253, for example, means 1789773/16/(253+1) = 440.4 Hz, or the A above middle C.

To convert note names to frequencies in hertz, assuming an equal-tempered (12edo) scale with A = 440 Hz, use Piano key frequencies. To convert those to period values, use this formula:
Code:
period = round(1789773/16/frequency) - 1


If you just want a lookup table from a semitone number to the values that need to be written to $4002, $4003, $4006, $4007, $400A, and $400B, see APU period table.
Re: what is the term used for a musical note being played?
by on (#189660)
Quote:
period = round(1789773/16/frequency) - 1

Actually, rounding is not always the best way. In my music engine I used high pitched triangle notes and those sounded incredigly wrong, it was really disturbing. So instead of trying to use the NES to play real world musical frequencies based on A=440Hz, I use the natural tones of the NES and use it for the music. Basically, I compute the detune value for a high pitched octave using NES. Then I compute the average of all detune values, and center all my notes arround this detune value. This makes notes less detuned in average, and made high pitched triangle sounds a lot better.

I don't know whether I still have the calc spreadsheet where I did all those calculations but I'd recommand doing those again anyway just to be sure. Basically by lowering the pitch a bit, playing a A would be frequencies $1ff, $ff, $7f, $3f, $1f, etc... and it sounded much better, if you do it on raw calculation based on A=440Hz you get $fd instead.

On the other hand if you are into deep vibratoes and not into high pitched triangle, it would be a good idea to detune your music up, so that the A notes are further away from the MSB period changes which triggers horrible snaps and pops in the sound.