SamplerBox icon indicating copy to clipboard operation
SamplerBox copied to clipboard

Octave too high

Open maditnerd opened this issue 9 years ago • 6 comments

On Grand Piano samples, When i play a b4 (midinote:59) it played b2v*.wav

In ActuallyLoad() I remove +2 and it seems to works correctly.

Midinote to octave and notes http://www.midimountain.com/midi/midi_note_numbers.html

maditnerd avatar Jun 11 '15 19:06 maditnerd

True @maditnerd ! In fact I didn't know how to choose between :

  • midinote = 60 <=> notename = C3 (as suggested here , see also this interesting discussion and this one)
  • midinote = 60 <=> notename = C4 (as suggested here )
  • midinote = 60 <=> notename = C5 (as suggested here )

Difficult to choose! Why convention seems to be the most used @maditnerd ?

I'll probably add a %transpose keyword, so that we can do %transpose=+12 or %transpose=-24 when needed.

josephernest avatar Jun 13 '15 19:06 josephernest

I still hesitate about what should be used as Middle C = Midinote 60... C3? C4? C5?

"C4" finally seems to be the most used. I need to check this again.

In the meantime @maditnerd , I added a global parameter :

%%transpose=+12  

or

%%transpose=-12

will transpose +1 or - 1 octave.

See https://github.com/josephernest/SamplerBox/blob/master/samplerbox.py#L290

What do you think?

josephernest avatar Jun 19 '15 15:06 josephernest

Hi here (Hello Joseph, Fergus/Lumis Xulepth/Simon here)

C4 is definitely used as "middle C" most of the time in music software.

Simon-L avatar Jun 19 '15 15:06 Simon-L

All the Android applications that we tried for verifying the pitches are using the Middle C = Midinote 60 = C4 convention.

Wikipedia seems to agree:

  • https://en.wikipedia.org/wiki/C_(musical_note)#Middle_C

I don't know how destructive it is to change the defaults with a new release of SamplerBox (maybe bundling it together with a switch to python 3 might justify increasing the major version number and then this would be fine as well). Personally I would be a huge fan of using the most widely used convention: C4 = midi 60.

Off-topic: in our music schools we always used what I discovered Wikipedia calls the Helmholtz pitch notation. So for me C4 has always been "C one" (as it is written as c' and it comes from "one-line octave"). I guess that one can find a good reason to start counting at almost any number, but to me the most widely accepted standard sounds best.

mojca avatar Aug 06 '22 09:08 mojca

It would probably be a good idea to use the standard that everyone uses for the new branch python3. Potential problem: everyone who has done custom sample sets with the current version of SamplerBox will have octave problems if we update like this... How to handle this correctly?

@maditnerd Removing the +2 in (... +2) * 12 would shift of 2 octaves, are you sure of this solution? (Was I two octaves off?)

https://github.com/josephernest/SamplerBox/pull/1/commits/f57a4872fd8caff4f0d7886588d9f0c1cbde0587#diff-12abeff96b5d42b373fde683a1301f9bd00c7f4c06dd7dfc6f2198e2809e915bL279-R279

josephernest avatar Aug 08 '22 21:08 josephernest

@maditnerd actually suggested that Middle C should be called C5, and that's in fact two octaves off from the current behaviour. The suggestion would be to use C4 as Middle C, so just one octave difference.

One thing that would help a lot with maintaining compatibility between different versions (in case you do decide to make such a change) would be to allow and encourage "sound fonts" that use names like C4.wav (rather than midi numbers) to specify the absolute scale like midi60=C4 or midi60=C5 (probably using a nicer syntax), rather than just transpose += 12.

We were in doubts whether we should modify SamplerBox or the sound font to stick to "the correct" convention and ended up adding a transpose. We didn't want to rename the samples and modifying SamplerBox locally without anything changing upstream sounded wrong. But it would help if the font could specify absolute scale, so that if convention changes, the font could be correct in any given convention.

mojca avatar Aug 08 '22 22:08 mojca