/// The tonal pitch class resulting from applying an accidental to the step
/// ```
/// # use tonality::{Accidental, Step, Tpc};
/// assert_eq!(Tpc::Ab, Step::A.with_accidental(Accidental::Flat));
/// ```
The tonal pitch class resulting from applying an accidental to the step
```
The tonal pitch class resulting from applying an accidental to the step ` ` `
pub fn with_accidental(self, alter: Accidental) -> Tpc {
        #[rustfmt::skip]
        const SPELLINGS: [Tpc; 35] = [
            Tpc::Cbb, Tpc::Cb, Tpc::C, Tpc::Cs, Tpc::Css,
            Tpc::Dbb, Tpc::Db, Tpc::D, Tpc::Ds, Tpc::Dss,
            Tpc::Ebb, Tpc::Eb, Tpc::E, Tpc::Es, Tpc::Ess,
            Tpc::Fbb, Tpc::Fb, Tpc::F, Tpc::Fs, Tpc::Fss,
            Tpc::Gbb, Tpc::Gb, Tpc::G, Tpc::Gs, Tpc::Gss,
            Tpc::Abb, Tpc::Ab, Tpc::A, Tpc::As, Tpc::Ass,
            Tpc::Bbb, Tpc::Bb, Tpc::B, Tpc::Bs, Tpc::Bss,
        ];
        let step = self as i8;
        let alter = alter as i8;
        let i = step * 5 + alter + 2;
        SPELLINGS[usize::try_from(i).unwrap()]
    }
pub fn with_accidental ( self , alter : Accidental ) -> Tpc { # [ rustfmt :: skip ] const SPELLINGS : [ Tpc ; 35 ] = [ Tpc :: Cbb , Tpc :: Cb , Tpc :: C , Tpc :: Cs , Tpc :: Css , Tpc :: Dbb , Tpc :: Db , Tpc :: D , Tpc :: Ds , Tpc :: Dss , Tpc :: Ebb , Tpc :: Eb , Tpc :: E , Tpc :: Es , Tpc :: Ess , Tpc :: Fbb , Tpc :: Fb , Tpc :: F , Tpc :: Fs , Tpc :: Fss , Tpc :: Gbb , Tpc :: Gb , Tpc :: G , Tpc :: Gs , Tpc :: Gss , Tpc :: Abb , Tpc :: Ab , Tpc :: A , Tpc :: As , Tpc :: Ass , Tpc :: Bbb , Tpc :: Bb , Tpc :: B , Tpc :: Bs , Tpc :: Bss , ] ; let step = self as i8 ; let alter = alter as i8 ; let i = step * 5 + alter + 2 ; SPELLINGS [ usize :: try_from ( i ) . unwrap ( ) ] }
The tonal pitch class resulting from applying an accidental to the step
```
The tonal pitch class resulting from applying an accidental to the step ` ` `
self
alter
Accidental
use tonality::{accidental, step, tpc};
assert_eq!(Tpc::Ab, Step::A.with_accidental(Accidental::Flat));
```
assert_eq! ( Tpc :: Ab Step :: A . with_accidental ( Accidental :: Flat )) ; ` ` `