forum

Hatsune Miku - Enshuuri 10,000 Keta

posted
Total Posts
45
show more
statementreply
Time for hitsounds. ;)

Sample code fragment:
SPOILER
#include <fstream>

using namespace std;


// Object types and properties
#define OBJECT_CIRCLE 1
#define OBJECT_SLIDER 2
#define OBJECT_SPINNER 12
#define OBJECT_NEW_COMBO 4

// Hitsounds
#define HITSOUND_HIT 0
#define HITSOUND_WHISTLE 2
#define HITSOUND_FINISH 4
#define HITSOUND_CLAP 8


// Combo and hitsound pattern
const int comboLength = 16;
const int patternLength = 16;
const int hitsoundPattern[] =
{
HITSOUND_FINISH,
HITSOUND_CLAP,
HITSOUND_HIT,
HITSOUND_CLAP,
HITSOUND_HIT,
HITSOUND_CLAP,
HITSOUND_HIT,
HITSOUND_CLAP,
HITSOUND_HIT,
HITSOUND_CLAP,
HITSOUND_HIT,
HITSOUND_CLAP,
HITSOUND_HIT,
HITSOUND_CLAP,
HITSOUND_HIT,
HITSOUND_CLAP,
};


// Calculates note position and time. Implementation is omitted here.
int GetPosX(char digit);
int GetPosY(char digit);
int GetTime(int ticksFromBeginning);


// Outputs [HitObjects] section to file
void WriteHitObjects(ofstream& osuFile, const char* piDigits)
{
osuFile << "[HitObjects]\n";
for (int i = 0; i < 10240; i++)
{
osuFile << GetPosX(piDigits[i]) << ',';
osuFile << GetPosY(piDigits[i]) << ',';
osuFile << GetTime(i) << ',';

if (i % comboLength == 0)
{
osuFile << (OBJECT_CIRCLE | OBJECT_NEW_COMBO) << ',';
}
else
{
osuFile << OBJECT_CIRCLE << ',';
}

osuFile << hitsoundPattern[i % patternLength] << '\n';
}
}
Topic Starter
nomadop

statementreply wrote:

Time for hitsounds. ;)

Sample code fragment:
SPOILER
#include <fstream>

using namespace std;


// Object types and properties
#define OBJECT_CIRCLE 1
#define OBJECT_SLIDER 2
#define OBJECT_SPINNER 12
#define OBJECT_NEW_COMBO 4

// Hitsounds
#define HITSOUND_HIT 0
#define HITSOUND_WHISTLE 2
#define HITSOUND_FINISH 4
#define HITSOUND_CLAP 8


// Combo and hitsound pattern
const int comboLength = 16;
const int patternLength = 16;
const int hitsoundPattern[] =
{
HITSOUND_FINISH,
HITSOUND_CLAP,
HITSOUND_HIT,
HITSOUND_CLAP,
HITSOUND_HIT,
HITSOUND_CLAP,
HITSOUND_HIT,
HITSOUND_CLAP,
HITSOUND_HIT,
HITSOUND_CLAP,
HITSOUND_HIT,
HITSOUND_CLAP,
HITSOUND_HIT,
HITSOUND_CLAP,
HITSOUND_HIT,
HITSOUND_CLAP,
};


// Calculates note position and time. Implementation is omitted here.
int GetPosX(char digit);
int GetPosY(char digit);
int GetTime(int ticksFromBeginning);


// Outputs [HitObjects] section to file
void WriteHitObjects(ofstream& osuFile, const char* piDigits)
{
osuFile << "[HitObjects]\n";
for (int i = 0; i < 10240; i++)
{
osuFile << GetPosX(piDigits[i]) << ',';
osuFile << GetPosY(piDigits[i]) << ',';
osuFile << GetTime(i) << ',';

if (i % comboLength == 0)
{
osuFile << (OBJECT_CIRCLE | OBJECT_NEW_COMBO) << ',';
}
else
{
osuFile << OBJECT_CIRCLE << ',';
}

osuFile << hitsoundPattern[i % patternLength] << '\n';
}
}

Thank you very much!
It seems to be a good solution to the hitsounds problem.
But are you sure that the combolenth and patternlenth are always be a const value?
Beside, i dont understand music.so i just have to trust your hitsoundspattern .But why is finish hitsound the first?Is it because of that the first number is 3 and it followed by a dot?
statementreply

nomadop wrote:

statementreply wrote:

Time for hitsounds. ;)

Sample code fragment:
SPOILER
#include <fstream>

using namespace std;


// Object types and properties
#define OBJECT_CIRCLE 1
#define OBJECT_SLIDER 2
#define OBJECT_SPINNER 12
#define OBJECT_NEW_COMBO 4

// Hitsounds
#define HITSOUND_HIT 0
#define HITSOUND_WHISTLE 2
#define HITSOUND_FINISH 4
#define HITSOUND_CLAP 8


// Combo and hitsound pattern
const int comboLength = 16;
const int patternLength = 16;
const int hitsoundPattern[] =
{
HITSOUND_FINISH,
HITSOUND_CLAP,
HITSOUND_HIT,
HITSOUND_CLAP,
HITSOUND_HIT,
HITSOUND_CLAP,
HITSOUND_HIT,
HITSOUND_CLAP,
HITSOUND_HIT,
HITSOUND_CLAP,
HITSOUND_HIT,
HITSOUND_CLAP,
HITSOUND_HIT,
HITSOUND_CLAP,
HITSOUND_HIT,
HITSOUND_CLAP,
};


// Calculates note position and time. Implementation is omitted here.
int GetPosX(char digit);
int GetPosY(char digit);
int GetTime(int ticksFromBeginning);


// Outputs [HitObjects] section to file
void WriteHitObjects(ofstream& osuFile, const char* piDigits)
{
osuFile << "[HitObjects]\n";
for (int i = 0; i < 10240; i++)
{
osuFile << GetPosX(piDigits[i]) << ',';
osuFile << GetPosY(piDigits[i]) << ',';
osuFile << GetTime(i) << ',';

if (i % comboLength == 0)
{
osuFile << (OBJECT_CIRCLE | OBJECT_NEW_COMBO) << ',';
}
else
{
osuFile << OBJECT_CIRCLE << ',';
}

osuFile << hitsoundPattern[i % patternLength] << '\n';
}
}

Thank you very much!
It seems to be a good solution to the hitsounds problem.
But are you sure that the combolenth and patternlenth are always be a const value?
Not necessarily, but imo it may be helpful (and also simple) since the music repeats itself every 128 beats except for the digits. You may use anything you like.

Beside, i dont understand music.so i just have to trust your hitsoundspattern .But why is finish hitsound the first?Is it because of that the first number is 3 and it followed by a dot?
I was just showing how to add a simple hitsound and combo pattern that loops every 16 notes, and perhaps it doesn't fit the music.
And something about the format of [TimingPoints] and [HitObjects] sections fyi (in Chinese).

[TimingPoints]
SPOILER
红线:
(Offset),(每拍毫秒数),(每小节拍数),(音效集),(自定义音效),(音效音量),1,(是否Kiai time)
每拍毫秒数=60000÷bpm
每小节拍数:4/4拍是4,3/4拍是3。
音效集:Normal是1,Soft是2。
自定义音效:没有是0,Custom Override 1是1,Custom Override 2是2。
音效音量:最响是100,无声是0。
是否Kiai time:是Kiai time为1,不是Kiai time为0。

例:579,348.837209302326,4,2,1,80,1,0 表示172bpm, offset=579ms, 每小节4拍,用Soft音效集的第一组自定义音效,音效音量为80%,不是Kiai time。
285,370.37037037037,3,1,0,71,1,0 表示162bpm, offset=285ms, 每小节3拍,用Normal音效集,音效音量为71%,不是Kiai time。

绿线:
(Offset),(-100÷bpm倍率),(每小节拍数),(音效集),(自定义音效),(音效音量),0,(是否Kiai)

例:106766,-100,3,2,0,61,0,0 表示从106766ms开始,bpm是上一条红线的1倍,每小节3拍,用Soft音效集,音效音量为61%,不是Kiai time。
110335,-200,4,2,2,5,0,1 表示从110335ms开始,bpm是上一条红线的0.5倍,每小节4拍,用Soft音效集的第二组自定义音效,音效音量为5%,是Kiai time。
[HitObjects]
SPOILER
总体来说,格式是 (X),(Y),(Time),(类型),(音效)[,(其它参数)]

类型
Circle: 1
Slider: 2
有new combo的circle: 5 (1 | 4)
有new combo的slider: 6 (2 | 4)
Spinner (总是new combo): 12 (8 | 4)

音效
只有Hit: 0
Whistle: 2
Finish: 4
Clap: 8
需要同时使用多个hitsound的话可以把它们按位或(或者相加),比如Whistle+Clap是10。

其它参数
Circles:
circle没有其它参数。

例:256,64,6000,1,2 表示6000ms时点击的位于(256,64)的circle,音效是whistle。

Sliders:
这里暂且把slider的开始、结束和中间反弹点称为“节点”,两个“节点”之间称为“段”。
格式:(StartX),(StartY),(StartTime),(2或6),(总体音效),(曲线类型)|(ControlPointX):(ControlPointY)[|(ControlPointX):(ControlPointY)...],(“段”数),(长度)[,(单独音效)|(单独音效)[|(单独音效)...]]
StartX, StartY, StartTime:slider的起始位置和时间
曲线类型:L=Linear, C=Catmull-Rom, B=Bezier
ControlPointX, ControlPointY:曲线控制点的位置
“段”数:拖条时需要来回的总次数。没有反弹点的是1,反弹一次的是2,反弹n次的是n+1。
长度:slider的长度,等于Slider velocity * 每一“段”所用的节拍数 * 100。例如典型的kiou slider是140。
总体音效和单独音效:slider可以在所有“节点”上用同样的音效,也可以在每个“节点”上用不同的音效。通常后者较为常用。总体音效表示用于所有“节点”上的音效,单独音效表示分别用于每个“节点”的音效。用总体音效时,单独音效的部分不写;用单独音效时,总体音效的部分填0。

例:288,224,22999,2,0,B|248:256|208:224,3,85,0|2|0|0 表示22999ms开始,控制点分别是(288,224), (248,256), (208,224)的Bezier曲线形状的,长度为85的slider。共有3“段”(共4个“节点”,拖的过程中需要反弹两次),4个“节点”的音效分别是Hit, Whistle, Hit, Hit。

Spinners:
格式:256,192,(StartTime),12,(Hitsound),(EndTime)

例:256,192,60777,12,4,62777 表示从60777ms开始到62777ms结束的spinner,音效为Finish。
Topic Starter
nomadop
I'm sure that it dosent simply repeat itself every 128 beats .It mostly be repeat itself 1024 beats.
BK-201_old
:)
yongtw123
Perfect for practicing, I guess...

Perfect for testing stamina, I am sure...

Whoever has the patience to finish the map, that guys is definitely (beeeeeeeeeeep).

;)
AngelHoney
:) :)
zxx172839
我晕死了,用NOFALL把他打完,整个人都挂了
Furawa
:x :x :)
KanbeKotori
Wow,it's crazy!
Arusha Shuna

.OSU file wrote:

206kb

Maximum Score wrote:

-1.147.088.836
holy shit, NEGATIVE MAXIMUM SCORE!??
Jarby
THAT MP3 :o
vivicat
lol
Mystearica
哎哟卧槽蛋好疼
Amethyst Wolf
這效果比數綿羊好...
Sakura_banned
无码子神mapper > <
sell an apple
这个谱子要是Rank的话说不定一个排名的都没有…………= =||||||||||||||
Jenny
If you will ever revive this... you can use a better .mp3 and call one diff 'Marathon', which allows you higher beatmap-size, just for case...
Hikaros
someone please delete this.
thelewa

Hikaros wrote:

someone please delete this.
Lol why
Dragon
玩完的请举手……
Otosaka-Yu
.
Otosaka-Yu
.
Catgirl
too short... make longer version please counting to 1million

d2513850
When you play Osu! Catch The Beat "Counting" difficulty,you let fruits stacked higher.
"Counting" difficulty combos too long!!
see:http://goo.gl/r5vhEf
Birdy
noma you win....
BanchoBot
This modding thread has been migrated to the new "modding discussions" system. Please make sure to re-post any existing (and unresolved) efforts to the new system as required.
Please sign in to reply.

New reply