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

outdated

This is a package for danso-flutter-application

danso_function ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ #

Release Note #

## 0.0.1
* Initial release
* Sorry for users, this might be a package for private application. So you might not as well use this package. Thanks!


## 0.0.2
* PitchModelInterface for danso yulmyeong
* Made as Singleton.
* It maps user input frequencies to danso yulmyeong

## 0.0.3
* Made toChineseCharacter and toHangeul in YulmyeongNote class


## 0.0.4
* Completed JungGanBoClass
* Passed all the Test about JungGanBoClass

## 0.0.5
* Hot Fix!! Need to change jung gan bo string structure and Accept it!

Getting started #

    flutter pub add danso_function


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.

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) {}
}

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);

  });


JungGanBo Interface #

This is JungGanBo Interface.

Abstract #

  1. inprogress

InterFace #

  inprogress ....

Usage #

  • Jung Gan Bo Example Image [./jgb_example]

  • Jung Gan Bo string structure

ht|t|t#t|h|mh#J|o|YJ#t|--h|m#ht-|t|t#h-t|h-m|yj-#y|mhm|ymy#j|o|^#ht|t|t#t|--h|mh#J|o|YJ#t|--h|m#ht-|t|t#h-t|h-m|yj-#y|mhm|ymy#j|o|^#y-j|y-m|yj#y-j|y-m|yj|m|m|h#m|--h|mh#ht|t|t#t|h|mh#J|o|YJ#t|--h|m#ht-|t|t#h-t|h-m|yj-#y|mhm|ymy#j|o|^#
  • Jung Gan Bo Function Usage
  void playJungGanBo() async {
    JungGanBo testJungGanBo = new JungGanBo("๋„๋ผ์ง€ํƒ€๋ น", "์„ธ๋งˆ์น˜์žฅ๋‹จ",
        "ht|t|t#t|h|mh#J|o|YJ#t|--h|m#ht-|t|t#h-t|h-m|yj-#y|mhm|ymy#j|o|^#ht|t|t#t|--h|mh#J|o|YJ#t|--h|m#ht-|t|t#h-t|h-m|yj-#y|mhm|ymy#j|o|^#y-j|y-m|yj#y-j|y-m|yj|m|m|h#m|--h|mh#ht|t|t#t|h|mh#J|o|YJ#t|--h|m#ht-|t|t#h-t|h-m|yj-#y|mhm|ymy#j|o|^#");

    testJungGanBo.sheet[0].yulmyeongs[0];
    for (var i = 0; i < testJungGanBo.sheet.length; i++) {
      for (var j = 0; j < testJungGanBo.sheet[i].yulmyeongs.length; j++) {
        // To do what you can do with YulmyeonNote
        print(testJungGanBo.sheet[i].yulmyeongs[j].toHangeul());
      }
    }
  }

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