danso_function 0.0.4 copy "danso_function: ^0.0.4" to clipboard
danso_function: ^0.0.4 copied to clipboard

outdated

This is a package for danso-flutter-application

Release v0.0.4

Features #

PitchModel Interface #

This is PitchModelInterface. PitchModelInterface class is an interface and PitchModel is concrete Model. So you can use PitchModelInterface to use functions which I made. Here are functions I made.

The Basics #

Abstract #

  1. Frequency와 단소의 율명을 mapping 시켜준다. function #1
  2. User에게 기준음을 입력받아서 기준 입출력 frequency에다가 userAdjust를 더해서 사용할 수 있게 한다. function #2
  3. userWidthFrequency를 정해서 Hit 되는 Frequency의 범위를 정할 수 있게 한다. function #3
  4. 음이 해당 율명에 맞는지 검사해 주는 기능을 한다. function #4
  5. 해당 율명의 frequency를 return 하는 기능을 한다. function #5

InterFace #

class PitchModelInterface {
  //function #1
  YulmyeongNote getYulmyeongByFrequency(double userFrequency) {}
  
  //function #2
  void settingAdjust(double userInputFrequency) {}

  //function #3
  //PitchConst 에서 const value변경해서 정하기, ui에서는 기능 제공 x

  //function #4
  bool isCorrectPitch(double userFrequency, YulmyeongNote detectPitch) {}

  //function #5
  double getFrequencyByYulmyeongNote(YulmyeongNote outPutPitch) {}
}

Getting started #

    flutter pub add danso_function

Usage #

  test('Pitch Model getYulmyeongByFrequency tae high', () {
    PitchModel pitchModel = new PitchModel();
    expect(
        pitchModel.getYulmyeongByFrequency(1479.98 + 11) ==
            YulmyeongNote(Yulmyeong.tae, ScaleStatus.high),
        true);
  });

  test('Pitch Model isCorrectPitch', () {
    PitchModel pitchModel = new PitchModel();
    expect(
        pitchModel.isCorrectPitch(
            STANDARD_PITCH, YulmyeongNote(Yulmyeong.tae, ScaleStatus.origin)),
        true);
  });

  test('Pitch Model isCorrectPitch', () {
    PitchModel pitchModel = new PitchModel();
    expect(
        pitchModel.isCorrectPitch(
            STANDARD_PITCH, YulmyeongNote(Yulmyeong.tae, ScaleStatus.high)),
        false);
  });

  test('Singleton test', () {
    PitchModelInterface pitchModel = new PitchModel();
    PitchModelInterface pitchModel2 = new PitchModel();

    //PitchModel pitchModel3 = new PitchModel();
    pitchModel.settingAdjust(760.11);

    expect(
        pitchModel2.isCorrectPitch(
            760.11, new YulmyeongNote(Yulmyeong.tae, ScaleStatus.origin)),
        true);

  });

Additional information #

What is yulmyeong(율명) and danso(단소) #

Yulmyeong is Korean Traditional Notes for music. And danso is Korean Traditional instrument. more information soon...

Terms of JungGanBo #

정간보를 읽는 순서는 위에서 아래로, 오른쪽 줄에서 왼쪽 줄로 읽어나간다. 다만 정간 속의 율명은 왼쪽에서 오른쪽으로 읽은 다음 위에서 아래로 읽는다. 정간보에 쓰이는 용어와 중요한 부호는 다음과 같다.

  • 각 : 오선보의 한 단에 해당하는 것을 ‘각’ 이라 한다.
  • 강 : 오선보의 한마디에 해당하는 것을 ‘강’ 이라 한다.
  • 정 : 오선보의 한 박에 해당하는 것을 ‘정’ 이라 한다.
2
likes
0
points
40
downloads

Publisher

unverified uploader

Weekly Downloads

This is a package for danso-flutter-application

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on danso_function