Most common sample pitch

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
psycopathicteen
Posts: 3001
Joined: Wed May 19, 2010 6:12 pm

Most common sample pitch

Post by psycopathicteen »

Is there any recommended pitch to sample at? I know the shortest brr sample is 16 samples long, which gives a frequency of 2000Hz which is approximately C-7. Do most people sample at this pitch, or do they go a few octaves lower?
Last edited by psycopathicteen on Wed May 11, 2016 9:00 pm, edited 1 time in total.
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Most common sample pitch

Post by rainwarrior »

You should sample at an octave that's close to the pitch you want to use the sample at. The quality degrades the further you play it away from that.
psycopathicteen
Posts: 3001
Joined: Wed May 19, 2010 6:12 pm

Re: Most common sample pitch

Post by psycopathicteen »

I'm not that good with judging pitches.

Wait, I just found this: https://docs.google.com/spreadsheets/d/ ... utput=html

Why is 2khz marked as C-6 for this but as C-7 else where?
User avatar
thefox
Posts: 3139
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Re: Most common sample pitch

Post by thefox »

The triangle channel is tuned an octave lower on NES compared to the pulse channels (with the same written 11-bit period value). FamiTracker doesn't bother fixing the octave numbering for the triangle channel to match.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Most common sample pitch

Post by rainwarrior »

psycopathicteen wrote:Why is 2khz marked as C-6 for this but as C-7 else where?
Octave numbers are entirely arbitrary, too. This isn't just an NES phenomenon. Different music programs will call "middle C" (~260 Hz) C-5, C-7, etc. there is no real consistency there.
psycopathicteen
Posts: 3001
Joined: Wed May 19, 2010 6:12 pm

Re: Most common sample pitch

Post by psycopathicteen »

The way I already have it, I've programmed the SPC700 to make copies of pulse wave at different octaves, to avoid muffling. I figured out that the 500Hz (64 sample) version is used the most, so I'll use that as my standard.
User avatar
dougeff
Posts: 2875
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: Most common sample pitch

Post by dougeff »

In my experience (with MIDI files) if you stretch a sample more than an octave in either direction, it starts to sound weird, which is why I had to make samples for each octave, or at least every 2 octaves. Also, some instruments are fundamentally different sounds from octave to octave (piano for example), which really requires even more samples to sound good.
nesdoug.com -- blog/tutorial on programming for the NES
DoNotWant
Posts: 83
Joined: Sun Sep 30, 2012 3:44 am

Re: Most common sample pitch

Post by DoNotWant »

rainwarrior wrote: Different music programs will call "middle C" (~260 Hz) C-5, C-7, etc. there is no real consistency there.
Wow, that's annoying. Why not stick to good old C-4?
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Most common sample pitch

Post by rainwarrior »

Why not stick to big-endian?
93143
Posts: 1371
Joined: Fri Jul 04, 2014 9:31 pm

Re: Most common sample pitch

Post by 93143 »

dougeff wrote:In my experience (with MIDI files) if you stretch a sample more than an octave in either direction, it starts to sound weird, which is why I had to make samples for each octave, or at least every 2 octaves. Also, some instruments are fundamentally different sounds from octave to octave (piano for example), which really requires even more samples to sound good.
Electric guitars, particularly rhythm guitar power chords on the low end, can be very bad for this. Since the frequency balance is such a key part of the sound, they can sound goofy pitched up or down as little as a semitone.
DoNotWant
Posts: 83
Joined: Sun Sep 30, 2012 3:44 am

Re: Most common sample pitch

Post by DoNotWant »

rainwarrior wrote:Why not stick to big-endian?
Thank you! I managed to find a real answear on wikipedia instead. Here it is for those who actually wants to know why MIDI programs often use a nonstandard middle-C:

"Notation that appears to be scientific pitch notation may actually be based on an alternative octave numbering. While they are still note-octave systems, if they are called "scientific pitch notation", this is certainly an error. For example, MIDI software and hardware often uses C5 or C3 to represent middle C (note 60).[3]

This creates a linear pitch space in which octaves have size 12, semitones (the distance between adjacent keys on the piano keyboard) have size 1, and A440 is assigned the number 69. Distance in this space corresponds to musical distance as measured in psychological experiments and understood by musicians. (An equal-tempered semitone is subdivided into 100 cents.) The system is flexible enough to include microtones not found on standard piano keyboards. For example, the pitch halfway between C (60) and C♯ (61) can be labeled 60.5."
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Most common sample pitch

Post by rainwarrior »

MIDI software picked an arbitrary number to stick middle C on. They chose a 7-bit range (0-127), wanted to start on a C (0), and wanted to put middle C in the "middle". Under these constraints, 60 is the C closest to the middle, and if you start numbering from 0 like computer scientists do, you get C-5, perhaps. However, octave numbering is not part of the MIDI standard, and lots of MIDI programs assign middle C a different octave number.

C-4 might be chosen because it's the 4th C on a piano, or a number of other reasons. Other octave numberings might similarly have to do with an intended musical instrument. Some articles on wikipedia call C-4 "scientific pitch notation" but I think this is dubious and/or pretentious. I think some trackers might use a relatively high number because of a practical need to support large sample ranges.
DoNotWant wrote:This creates a linear pitch space in which octaves have size 12, semitones (the distance between adjacent keys on the piano keyboard) have size 1, and A440 is assigned the number 69. Distance in this space corresponds to musical distance as measured in psychological experiments and understood by musicians. (An equal-tempered semitone is subdivided into 100 cents.) The system is flexible enough to include microtones not found on standard piano keyboards. For example, the pitch halfway between C (60) and C♯ (61) can be labeled 60.5."
All of this has nothing to do with octave numbering. The linear space of 12 tones to an octave doesn't care which octave it's in. If MIDI had put middle C at 48, or if it was called C-22 all of these properties would still be true.

I'm not aware of any reason to pick one octave numbering over another that isn't arbitrary. Maybe it gets inconvenient to notate if you have to go above 9, or below 0.
DoNotWant wrote:Thank you! I managed to find a real answear on wikipedia instead.
My answer was real, even though it was glib. It's arbitrary, and not standardized, in exactly the same way endian is.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Most common sample pitch

Post by tepples »

Each standard that specifies a wire format specifies its own byte order. "Network byte order" of TCP/IP is big-endian, as are practically all textual layer 5-7 protocols (such as FTP, HTTP, and HTML). The ISO standard for expressing Gregorian calendar dates and times (yyyy-mm-ddThh:mm:ss) is likewise strictly big-endian. So are standard MIDI files. But many well-known binary formats, such as ZIP, are little-endian due to their IBM PC heritage. The only place I've seen PDP-11 middle-endian in a file or wire format spec is OHRRPGCE's archive format.
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Most common sample pitch

Post by rainwarrior »

In other words, "exactly" was a hyperbole.
Revenant
Posts: 455
Joined: Sat Apr 25, 2015 1:47 pm
Location: FL

Re: Most common sample pitch

Post by Revenant »

Sort of on the topic of music, there are also fun things like the SID format, which was designed on the Amiga but is also a wrapper around a "complete" C64 binary, so when parsing/playing one you get to deal with both endiannesses at the same time.

Even more back on topic, it sounds like psychopathicteen is aiming to do something kind of like the simulated NES music in Caravan Shooting Collection, so that might be something good to use as a model.
Post Reply