fourthline / mmlTools

MabiIcco - マビノギ用MMLエディタ (MML editor for Mabinogi)
https://fourthline.jp/mabiicco/
51 stars 19 forks source link

The volume of the instrument is not amplified when notes of the same volume and length are input to the Melody/Chord 1/Chord 2 part. #45

Closed Dovidic closed 2 years ago

Dovidic commented 3 years ago

This document was translated using Google Translate.

In MabiIcco, the volume is not amplified when notes of the same volume and length are entered for melody/chord 1/chord 2 parts. However, in Mabinogi, instrument volume amplification is normally supported except for Lute, Ukulele, Mandolin, Chalumeau, Flute, and Electric Guitar.

MML used for testing. Melody: v15crcrc Chord 1: v15rrcrc Chord 2: v15rrrrc

If you play the above MML on Mabinogi, you will see that the volume is amplified 2x/3x compared to the default volume.

fourthline commented 3 years ago

日本のマビノギ環境おいては、音量は変わらないように聞こえました。

Dovidic commented 3 years ago

日本のマビノギ環境おいては、音量は変わらないように聞こえました。

演奏システムは、他のものと思われる。 MabiKR基準では適用されています。

Dovidic commented 3 years ago

他の国のクライアントにテストした結果、NA / KRは音量増幅が適用されTWは適用されません。

Mabinogi-delight commented 3 years ago

They are not supposed to be amplified after MusicQ update. It may be due to "allow note overlapping" setting flag in outdated(?) soundfont file (MSXSpirit.dls) for each individual region of a specific instrument.

image (This is a screenshot taken from Awave Studio).

Dovidic commented 3 years ago

I checked all the tones of Msxspirit01~04.dls of the latest version of KR/TW, and it shows that only certain instruments can be amplified. Some instruments may not be able to amplify only one or two notes. I also checked the sound of the 2004/2009 version of MSXspirit.dls, and there is a slight difference in the non-amplified section.

References: https://docs.google.com/spreadsheets/d/1zIXuHBy5qg-JuD1uTCwufkvHod72NxNnYbcZFCdlcs4/edit?usp=sharing (You may need a translator) Tested video on MabiKR3: https://youtu.be/95r74fP2ikY

Mabinogi-delight commented 3 years ago

@Dovidic All instruments with "allow note overlap" flags (which agree with your Google Sheet result) should allow note amplification, which could be useful for instruments that are too quiet.

I've tried the following cases in game (CN server):

Case 1

MML@ v7CCC , v7CCR , v7CRR ;

It sounds like: v12Cv10Cv7C

(Actually the first note should be slightly lowder than v12), because the "loudness" is the square of "v" value, or v10 should be 4 times louder than v5.

Case 2

MML@ v7CCC , v7RCC , v7RRC ;

It actually sounds like v7CRR

Interstingly, if you swap Melody and Chorus 2:

Case 3

MML@ v7CRR , v7CCR , v7CCC ;

It sounds like: v12Cv10Cv7C again!

However, this is just for solo. You should try ensemble with like 6 people as well. Because I think this may behave differently when you are soloing, or when there are a lot of players playing together. This could be due to the 48 polyphonly limit set my MileSoundSystem, the engine used by Mabinogi to render MML. (This number can actually be changed to say, 512, but unfortunately devCat didn't know they could actually change this number).

I think the solution is to use different v0 notes instead of R.

So, back to case 2:

MML@ v7CCC , v7RCC , v7RRC ;

if we replace R with v0C, it still behaves the same.

But if we replace R in chorus1, chorus2 with notes that are different from each other, AND not the following note,

E.g.,

MML@ v7CCC , v0dv7CC , v0eev7C ;

It sounds like: v12Cv10Cv7C again!

Dovidic commented 3 years ago

I was only going to use it to simply amplify the volume of an instrument such as a violin, and I didn't really consider how to boost the volume while using other notes. thank you for the information!

Considering the ADSR envelope in a typical ensemble score, I don't think it will ever be played with more than 48 polyphony. MML using this method performed normally in Mabinogi up to the 15th Quartet score.

Mabinogi-delight commented 3 years ago

In Mabinogi, it is actually impossible to surpass 48 polyphonic notes, or 3 per person.

Instruments like Lyre or Chime has long release time (4s and 8.033s respectively), if you write notes such as L32 ceg>ceg>ceg ... you should notice note cut-offs (or ending early), and no matter how you arrange notes, a maximum of 3 notes will persist.

Also, in general midi, channel 10 is reserved for drum sets, but drum kits in Mabinogi actually are not drum sets in sound font file . I have not tried 16 person ensemble (because it would be very hard to test, and I was suspecting the maximum number of players that can make sound is actually 15), therefore my MMLs are up to 15 players as well. But please correct me on this if I am wrong.

Dovidic commented 3 years ago

Up to the 16th Quartet is playing normally. The current Mabinogi playing system seems to be separate from DirectMusic, but I don't know about other than that. I understood the polyphony limit of 3 per person after reading this article. In fact, when I played an instrument with a high release rate, I felt the notes cut off. What I was talking about was a situation in which notes were not played at all when playing instruments with high release rates during ensembles.

Mabinogi-delight commented 3 years ago

Yes I noticed that as well, especially L64 notes used in Hand Chimes.

But really it is almost impossible to avoid it because it happens randomly.

As for high release rate, do you mean instuments with very short release time (such as Festival Lute of 0.169s)?

Dovidic commented 3 years ago

No, it is an instrument with a very long release rate, such as the piano, harp, lyre, and handbell. This is the reason why sheet music that was impossible to play in the past (when applying for ensembles of up to 5-8 people) seems to play well after MusicQ. I understand that notes are limited to a maximum of 3 polyphony per person and that the total must not exceed 48.

Mabinogi-delight commented 3 years ago

Oh I see what you are saying. They did not put a limit on how many polyphonic notes per instrument could have before, therefore long notes (especially harp, the recording wave files had very very long blank portion by the end, more than 10 seconds) will exhaust 48 polyphonies very quickly, which made some notes afterwards not playing at all.

Still, the best solution for devCat is actually increase 48 to something like 250 or even 500, but I believe they did not know they could increase such limit.

Dovidic commented 3 years ago

The release rate was modified to 8.000s by extracting the square wave tone inside the Windows default MIDI sound source (gm.dls). This tone has been ported to Lute in MSXspirit01.dls. "MML@t128v15l64<ceg>ceg>ceg>c,,;" was played on MabiIcco and Mabinogi respectively using MSXspirit01.dls with that voice applied.

icco_square (waveform of MabiIcco)

mabi_square (waveform of Mabinogi)

Above are the waveforms from MabiIcco and Mabinogi respectively. There is no break in notes, but it is questionable whether the number of polyphony is really limited to 3 per person.

The same results were seen with the harps with the same release rate.

icco_harp (waveform of MabiIcco)

mabi_harp (waveform of Mabinogi)

Mabinogi-delight commented 3 years ago

Interesting, I did the testing earlier as well, and it seems like we are not experiencing polyphonic issue anymore, but I only tested solo mode as well. image

I am using a pure 440Hz sine wave (for o3A), and this is the testing code:

L16V15o2c1r1 cc+dd+eff+gg+aa+b > cc+dd+eff+gg+aa+b > cc+dd+eff+gg+aa+b > cc+dd+eff+gg+aa+b > cc+dd+eff+gg+aa+b

And this is the testing SoundFont that can be placed in Mabinogi/mp3 folder directly (instruments: lute, chime) SineTest.zip

I also tested instruments with multiple rwgions (such as handbells) and clipping was not happening to me, at least for solo. (Same note clipping still occurs though, even when allow note overlap flag is on).

Dovidic commented 3 years ago

It seems that the same result can be confirmed when performing ensemble. Except for the problem when there are more than 16 people, I don't think there is any problem due to the Polyphony limit. Note clipping problem is presumed to be a client bug. Tested video(from 01:44): https://youtu.be/JYfroKLkj94

fourthline commented 2 years ago

I created a test version. Unzip the attachment and place the exe file in the same folder as "MabiIcco.exe" (v1.0.46). MabiIcco_47.zip

fourthline commented 2 years ago

楽器によって違うよう・・・? 2021/09/15 Mabi JP ・リュート→効果なし ・ウクレレ→効果なし ・マンドリン→効果なし ・ホイッスル→効果あり ・ロンカドーラ→効果あり ・フルート→効果なし ・シャリュモー→効果なし ・ピシスチューバ→効果あり ・リラ→効果あり ・エレキギター→効果なし ・ピアノ→効果あり ・バイオリン→効果あり ・チェロ(o2)→効果あり ・ハープ→効果あり ・チューニングバイオリン→効果あり ・チューニングチェロ(o2)→効果あり ・ドラム→効果あり ・お祭りリュート→効果あり ・お祭りウクレレ→効果あり ・お祭りマンドリン→効果あり ・お祭りホイッスル→効果あり ・お祭りフルート→効果あり ・チューニングフルート→効果あり ・チューニングホイッスル→効果あり

Dovidic commented 2 years ago

楽器によって違うよう· · ·? 2021년 9월 15일 MABI JP ·リュート→効果なし ·ウクレレ→効果なし ·マンドリン→効果なし ·ホイッスル→効果あり ·ロンカドーラ→効果あり ·フルート→効果なし ·シャリュモー→効果なし ·ピシスチューバ→効果あり ·リラ→効果あり ·エレキギター→効果なし ·ピアノ→効果あり ·バイオリン→効果あり ·チェロ(O2) →効果あり ·ハープ→効果あり ·チューニングバイオリン→効果あり ·チューニングチェロ( O2) →効果あり ·ドラム→効果あり ·お祭りリュート→効果あり ·お祭りウクレレ→効果あり ·お祭りマンドリン→効果あり ·お祭りホイッスル→効果あり ·お祭りフルート→効果あり ·チューニングフルート→効果あり ·チューニングホイッスル→効果あり

下部のシートをご覧ください。

https://docs.google.com/spreadsheets/d/1zIXuHBy5qg-JuD1uTCwufkvHod72NxNnYbcZFCdlcs4/edit?usp=sharing

アップロードされたテストバージョンでは、すべての楽器に音量増幅がされていることを確認しました。DLS内部設定に基づいて音符重ね状況が決定されるが、この設定を適用することができますか?

fourthline commented 2 years ago

ありがとうございます。 リュートでも o3 だと効果ありでした。 DLS内部設定に依存しているようですね。

lute_e2 0 → 効果なし lute_e3 0 → 効果なし lute_e4 0 → 効果なし lute_e1 1 → 効果あり

Dovidic commented 2 years ago

ありがとうございます。 リュートでも o3 だと効果ありでした。 DLS内部設定に依存しているようですね。

lute_e2 0 → 効果なし lute_e3 0 → 効果なし lute_e4 0 → 効果なし lute_e1 1 → 効果あり

そうです。した楽器の音色ごとに設定が異なるため、音の重なりを一括適用すると、MML作成時の誤解をもたらすことができるとします。

fourthline commented 2 years ago

DLS内部設定に応じて音の重なりを適用するよう修正してみました。

修正サンプルプログラムを作成してみました。 MabiIcco_48.zip

展開して、中のexeファイルを "MabiIcco.exe"(v1.0.46) と同じフォルダに配置してください。

Dovidic commented 2 years ago

DLS内部設定に応じて音の重なりを適用するよう修正してみました。

修正サンプルプログラムを作成してみました。 MabiIcco_48.zip

展開して、中のexeファイルを "MabiIcco.exe"(v1.0.46) と同じフォルダに配置してください。

ファイルありがとうございます。

すべての楽器のテストを完了し、通常の動作確認しました!

Dovidic commented 2 years ago

音符重ね、このUIに反映されたことについての説明が必要です。

ピアノロールに縦線で音符重ね/音符重ね不可/音域以外などの表現をしたことをよく知っているがDLSについてよく知らない場合は、縦の線が表現するのが何なのか知ることができません。

fourthline commented 2 years ago

UIについて、使い方 に記載しています。

Dovidic commented 1 year ago

UIについて、使い方 に記載しています。

2023/03/16基準MabiKRでNote overlap設定に関係なく、すべての楽器で同じ音高の音符を同時に演奏すると音量が増幅されます。

fourthline commented 1 year ago

v1.2.94 で音源のoverlapに関わらず、on/offできる設定を追加しました。