0 purchases
danso function
danso_function ๐ฅ๐ฅ๐ฅ #
v 2.0.0 is released!!
Applied Null Safety
Release Note #
## 2.0.0
- Applied Null Safety
## 1.0.3
- Hot fix!! deleted assets for ios
## 1.0.2
- Hot fix!! deleted assets for ios
## 1.0.1
- Hot fix!! deleted flutterMidi.unmute()
## 1.0.0
- Finally Made all the functions danso application needed ๐ฅ๐ฅ
- But, need some subtle adjustment, so will be updated continuosly
## 0.0.6
- Made playJungGanBo(JungGanBo jungGanBo) function!!
- But Need to adjust
## 0.0.5
- Hot Fix!! Need to change jung gan bo string structure and Accept it!
## 0.0.4
- Completed JungGanBoClass
- Passed all the Test about JungGanBoClass
## 0.0.3
- Made toChineseCharacter and toHangeul in YulmyeongNote class
## 0.0.2
- PitchModelInterface for danso yulmyeong
- Made as Singleton.
- It maps user input frequencies to danso yulmyeong
## 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!
copied to clipboard
Getting started #
flutter pub add danso_function
copied to clipboard
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 #
Frequency์ ๋จ์์ ์จ๋ช
์ mapping ์์ผ์ค๋ค. function #1
User์๊ฒ ๊ธฐ์ค์์ ์
๋ ฅ๋ฐ์์ ๊ธฐ์ค ์
์ถ๋ ฅ frequency์๋ค๊ฐ userAdjust๋ฅผ ๋ํด์ ์ฌ์ฉํ ์ ์๊ฒ ํ๋ค. function #2
userWidthFrequency๋ฅผ ์ ํด์ Hit ๋๋ Frequency์ ๋ฒ์๋ฅผ ์ ํ ์ ์๊ฒ ํ๋ค. function #3
์์ด ํด๋น ์จ๋ช
์ ๋ง๋์ง ๊ฒ์ฌํด ์ฃผ๋ ๊ธฐ๋ฅ์ ํ๋ค. function #4
ํด๋น ์จ๋ช
์ frequency๋ฅผ return ํ๋ ๊ธฐ๋ฅ์ ํ๋ค. function #5
์จ๋ช
List์ ์์ ์๋งํ๊ฒ ํ๊ท ๊ฐ์ ๋ด ์ฃผ๋ ๊ธฐ๋ฅ์ ํ๋ค function #6
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) {}
//function #6
double getModerateAverageFrequencyByListOfPitches(List<double> pitches) {}
}
copied to clipboard
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);
});
test('getModerateAverageFrequencyByListOfPitches Test' , () {
List<double> testList = [700.0, 650.0, 1.3, 1680.1, 750.0];
PitchModelInterface testModel = new PitchModel();
expect(testModel.getModerateAverageFrequencyByListOfPitches(testList), 700.0);
});
copied to clipboard
JungGanBo #
This is JungGanBo Class. JungGanBo is made of Jung and Jung is made of YulmyeongNote.
Therefore, JungGanBo has a list member of Jung named sheet, and Jung has a list of Yulmyeong named yulmyeongs. This class also pallerize JungGanBo String Format.
Abstract #
Constructor : FlutterMidi() ๊ฐ์ฒด๋ฅผ ๋ฏธ๋ฆฌ ์์ฑํด ๋๊ณ SoundFont๋ ๋ฃ์ด์ ๋ฏธ๋ฆฌ ์ธํ
ํด ๋๋ค.
ํด๋น ์ ๊ฐ๋ณด์ ์์ ๋จ์์ ์ฅ๋จ์ ์๋์ ๋ง์ถฐ์ ์ค์ ํด ์ค๋ค. function#1
ํ๋์ ์์ ์ํ๋ ์๊ฐ ๋งํผ ์ฐ์ฃผํด ์ค๋ค. function#2
Class #
class JungGanBo implements JungGanBoInterface {
String _title;
JangDan _jangDan;
List<Jung> _sheet = [];
String get title => _title;
JangDan get jangDan => _jangDan;
List<Jung> get sheet => _sheet;
//todo make method
JungGanBo(String title, String jangDan, String formatString) {
_title = title;
setJangDanString(jangDan);
setJungGanBoSheetFromFormatString(formatString);
}
...
}
class Jung {
DivisionStatus _divisionStatus;
List<YulmyeongNote> _yulmyeongs = [];
DivisionStatus get divisionStatus => _divisionStatus;
List<YulmyeongNote> get yulmyeongs => _yulmyeongs;
Jung(String formatString) {
...
}
...
}
copied to clipboard
Usage #
Jung Gan Bo Example Image
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|^#
copied to clipboard
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());
}
}
}
copied to clipboard
JungGanBoPlayer #
This is JungGanBoPlayer to play JungGanBo Class.
Abstract #
Constructor : FlutterMidi() ๊ฐ์ฒด๋ฅผ ๋ฏธ๋ฆฌ ์์ฑํด ๋๊ณ SoundFont๋ ๋ฃ์ด์ ๋ฏธ๋ฆฌ ์ธํ
ํด ๋๋ค.
ํด๋น ์ ๊ฐ๋ณด์ ์์ ๋จ์์ ์ฅ๋จ์ ์๋์ ๋ง์ถฐ์ ์ค์ ํด ์ค๋ค. function#1
ํ๋์ ์์ ์ํ๋ ์๊ฐ ๋งํผ ์ฐ์ฃผํด ์ค๋ค. function#2
Class #
class JungGanBoPlayer {
FlutterMidi _flutterMidi = FlutterMidi();
JungGanBo _jungGanBo;
JungGanBoPlayer() {
...
}
// function 1
play(JungGanBo jungGanBo) {
...
}
// function 2
playOneNoteDurationTime(YulmyeongNote yulmyeongNote, int durationTime) {
...
}
}
copied to clipboard
JangDan Class #
This is JangDan class.
Abstract #
์ฅ๋จํด๋์ค๋ enum jangDanType์ ๊ฐ์ง๊ณ ์๋ค.
์ฅ๋จํด๋์ค์์ ํด๋น jangDanType์ ๋ํ tempo์ 1์ ์ ๋ช์ด์ ์๊ฐ์ด ์์๋์ผ ํ๋ ์ง๊ฐ ์ ์ ๋์ด ์๋ค.
Class #
class JangDan {
JangDan(JangDanType jangDanType) {
...
}
JangDanType get jangDanType => ...;
double get tempo => ...;
int get milliSecond => ...;
...
}
copied to clipboard
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 #
์ ๊ฐ๋ณด๋ฅผ ์ฝ๋ ์์๋ ์์์ ์๋๋ก, ์ค๋ฅธ์ชฝ ์ค์์ ์ผ์ชฝ ์ค๋ก ์ฝ์ด๋๊ฐ๋ค. ๋ค๋ง ์ ๊ฐ ์์ ์จ๋ช
์ ์ผ์ชฝ์์ ์ค๋ฅธ์ชฝ์ผ๋ก ์ฝ์ ๋ค์ ์์์ ์๋๋ก ์ฝ๋๋ค. ์ ๊ฐ๋ณด์ ์ฐ์ด๋ ์ฉ์ด์ ์ค์ํ ๋ถํธ๋ ๋ค์๊ณผ ๊ฐ๋ค.
๊ฐ : ์ค์ ๋ณด์ ํ ๋จ์ ํด๋นํ๋ ๊ฒ์ โ๊ฐโ ์ด๋ผ ํ๋ค.
๊ฐ : ์ค์ ๋ณด์ ํ๋ง๋์ ํด๋นํ๋ ๊ฒ์ โ๊ฐโ ์ด๋ผ ํ๋ค.
์ : ์ค์ ๋ณด์ ํ ๋ฐ์ ํด๋นํ๋ ๊ฒ์ โ์ โ ์ด๋ผ ํ๋ค.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.