forked from zeldaret/oot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
general.c
4009 lines (3478 loc) · 136 KB
/
general.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#include "ultra64.h"
#include "global.h"
#define ABS_ALT(x) ((x) < 0 ? -(x) : (x))
typedef struct {
/* 0x0 */ f32 vol;
/* 0x4 */ f32 freqScale;
/* 0x8 */ s8 reverb;
/* 0x9 */ s8 pan;
/* 0xA */ s8 stereoBits;
/* 0xB */ u8 filter;
/* 0xC */ u8 combFilterGain;
} SfxPlayerState;
typedef enum {
/* 0x0 */ SFX_CHANNEL_PLAYER0, // SfxPlayerBank
/* 0x1 */ SFX_CHANNEL_PLAYER1,
/* 0x2 */ SFX_CHANNEL_PLAYER2,
/* 0x3 */ SFX_CHANNEL_ITEM0, // SfxItemBank
/* 0x4 */ SFX_CHANNEL_ITEM1,
/* 0x5 */ SFX_CHANNEL_ENV0, // SfxEnvironmentBank
/* 0x6 */ SFX_CHANNEL_ENV1,
/* 0x7 */ SFX_CHANNEL_ENV2,
/* 0x8 */ SFX_CHANNEL_ENEMY0, // SfxEnemyBank
/* 0x9 */ SFX_CHANNEL_ENEMY1,
/* 0xA */ SFX_CHANNEL_ENEMY2,
/* 0xB */ SFX_CHANNEL_SYSTEM0, // SfxSystemBank
/* 0xC */ SFX_CHANNEL_SYSTEM1,
/* 0xD */ SFX_CHANNEL_OCARINA, // SfxOcarinaBank
/* 0xE */ SFX_CHANNEL_VOICE0, // SfxVoiceBank
/* 0xF */ SFX_CHANNEL_VOICE1
} SfxChannelIndex; // playerIdx = 2
typedef struct {
/* 0x0 */ f32 value;
/* 0x4 */ f32 target;
/* 0x8 */ f32 step;
/* 0xC */ s32 remainingFrames;
} FreqLerp;
typedef struct {
/* 0x0 */ u16 playerIO;
/* 0x2 */ u16 channelMask;
/* 0x4 */ u8 channelIO[3 * 33 + 1];
} NatureAmbienceDataIO; // size = 0x68
typedef enum {
/* 0x0 */ PAGE_NON,
/* 0x1 */ PAGE_SOUND_CONTROL,
/* 0x2 */ PAGE_SPEC_INFO, // unused
/* 0x3 */ PAGE_HEAP_INFO,
/* 0x4 */ PAGE_GROUP_TRACK_INFO, // unused
/* 0x5 */ PAGE_SUB_TRACK_INFO,
/* 0x6 */ PAGE_CHANNEL_INFO, // unused
/* 0x7 */ PAGE_INTERFACE_INFO,
/* 0x8 */ PAGE_SFX_SWAP,
/* 0x9 */ PAGE_BLOCK_CHANGE_BGM,
/* 0xA */ PAGE_NATURAL_SOUND_CONTROL, // unused
/* 0xB */ PAGE_OCARINA_TEST,
/* 0xC */ PAGE_SFX_PARAMETER_CHANGE,
/* 0xD */ PAGE_SCROLL_PRINT,
/* 0xE */ PAGE_FREE_AREA,
/* 0xF */ PAGE_MAX
} AudioDebugPage;
#define SCROLL_PRINT_BUF_SIZE 25
typedef struct {
s8 x;
s8 y;
} OcarinaStick;
u8 gIsLargeSfxBank[7] = { 0, 0, 0, 1, 0, 0, 0 };
// Only the first row of these is supported by sequence 0. (gSfxChannelLayout is always 0.)
u8 gChannelsPerBank[4][7] = {
{ 3, 2, 3, 3, 2, 1, 2 },
{ 3, 2, 2, 2, 2, 2, 2 },
{ 3, 2, 2, 2, 2, 2, 2 },
{ 4, 1, 0, 0, 2, 2, 2 },
};
u8 gUsedChannelsPerBank[4][7] = {
{ 3, 2, 3, 2, 2, 1, 1 },
{ 3, 1, 1, 1, 2, 1, 1 },
{ 3, 1, 1, 1, 2, 1, 1 },
{ 2, 1, 0, 0, 1, 1, 1 },
};
f32 D_801305B0 = 0.7950898f;
s8 D_801305B4 = 35;
s8 D_801305B8 = 20;
s8 D_801305BC = 30;
s8 D_801305C0 = 20;
f32 sBehindScreenZ[2] = { -15.0f, -65.0f };
u8 sAudioIncreasingTranspose = 0;
u8 gMorphaTransposeTable[16] = { 0, 0, 0, 1, 1, 2, 4, 6, 8, 8, 8, 8, 8, 8, 8, 8 };
u8 sPrevChargeLevel = 0;
f32 D_801305E4[4] = { 1.0f, 1.12246f, 1.33484f, 1.33484f }; // 2**({0, 2, 5, 5}/12)
f32 D_801305F4 = 1.0f;
u8 sGanonsTowerLevelsVol[8] = { 127, 80, 75, 73, 70, 68, 65, 60 };
u8 sEnterGanonsTowerTimer = 0;
s8 sSoundMode = SOUNDMODE_SURROUND;
s8 D_80130608 = 0;
s8 sAudioCutsceneFlag = 0;
s8 sSpecReverb = 0;
s8 sAudioEnvReverb = 0;
s8 sAudioCodeReverb = 0;
u8 sPrevSeqMode = 0;
f32 sAudioEnemyDist = 0.0f;
s8 sAudioEnemyVol = 127;
u16 sPrevMainBgmSeqId = NA_BGM_DISABLED;
#define SEQ_RESUME_POINT_NONE 0xC0
u8 sSeqResumePoint = 0;
u8 sPrevSceneSeqId = NA_BGM_GENERAL_SFX;
u32 sNumFramesStill = 0;
u32 sNumFramesMoving = 0;
u8 sAudioBaseFilter = 0;
u8 sAudioExtraFilter = 0;
u8 sAudioBaseFilter2 = 0;
u8 sAudioExtraFilter2 = 0;
Vec3f* sSariaBgmPtr = NULL;
f32 D_80130650 = 2000.0f;
u8 sSeqModeInput = 0;
#define SEQ_FLAG_ENEMY (1 << 0) // Allows enemy bgm
#define SEQ_FLAG_FANFARE (1 << 1)
#define SEQ_FLAG_FANFARE_GANON (1 << 2)
#define SEQ_FLAG_RESTORE (1 << 3) // required for func_800F5B58 to restore a sequence after func_800F5ACC
/**
* These two sequence flags work together to implement a “resume playing from where you left off” system for scene
* sequences when leaving and returning to a scene. For a scene to resume playing from the point where it left off, it
* must have `SEQ_FLAG_RESUME` attached to it. Then, if the scene changes and the new scene sequence contain
* `SEQ_FLAG_RESUME_PREV`, the point from the previous scene sequence will be stored. Then, when returning to the
* scene with the sequence `SEQ_FLAG_RESUME`, then the sequence will resume playing from where it left off.
*
* There are only 5 sequences with `SEQ_FLAG_RESUME`, and all 5 of those sequences have special sequence
* instructions in their .seq files to read io port 7 and branch to different starting points along the sequence
* i.e. this system will only work for: kokiri forest, kakariko child, kakariko adult, zoras domain, gerudo valley
*/
#define SEQ_FLAG_RESUME (1 << 4)
#define SEQ_FLAG_RESUME_PREV (1 << 5)
/**
* Will write a value of 1 to ioPort 7 when called through the scene. How it's used depends on the sequence:
* NA_BGM_CHAMBER_OF_SAGES - ioPort 7 is never read from
* NA_BGM_FILE_SELECT - ioPort 7 skips the harp intro when a value of 1 is written to it.
* Note: NA_BGM_FILE_SELECT is not called through the scene. So this flag serves no purpose
*/
#define SEQ_FLAG_SKIP_HARP_INTRO (1 << 6)
#define SEQ_FLAG_NO_AMBIENCE (1 << 7)
u8 sSeqFlags[] = {
SEQ_FLAG_FANFARE, // NA_BGM_GENERAL_SFX
SEQ_FLAG_ENEMY, // NA_BGM_NATURE_BACKGROUND
0, // NA_BGM_FIELD_LOGIC
0, // NA_BGM_FIELD_INIT
0, // NA_BGM_FIELD_DEFAULT_1
0, // NA_BGM_FIELD_DEFAULT_2
0, // NA_BGM_FIELD_DEFAULT_3
0, // NA_BGM_FIELD_DEFAULT_4
0, // NA_BGM_FIELD_DEFAULT_5
0, // NA_BGM_FIELD_DEFAULT_6
0, // NA_BGM_FIELD_DEFAULT_7
0, // NA_BGM_FIELD_DEFAULT_8
0, // NA_BGM_FIELD_DEFAULT_9
0, // NA_BGM_FIELD_DEFAULT_A
0, // NA_BGM_FIELD_DEFAULT_B
0, // NA_BGM_FIELD_ENEMY_INIT
0, // NA_BGM_FIELD_ENEMY_1
0, // NA_BGM_FIELD_ENEMY_2
0, // NA_BGM_FIELD_ENEMY_3
0, // NA_BGM_FIELD_ENEMY_4
0, // NA_BGM_FIELD_STILL_1
0, // NA_BGM_FIELD_STILL_2
0, // NA_BGM_FIELD_STILL_3
0, // NA_BGM_FIELD_STILL_4
SEQ_FLAG_RESUME_PREV | SEQ_FLAG_ENEMY, // NA_BGM_DUNGEON
SEQ_FLAG_RESUME, // NA_BGM_KAKARIKO_ADULT
0, // NA_BGM_ENEMY
SEQ_FLAG_NO_AMBIENCE | SEQ_FLAG_RESTORE, // NA_BGM_BOSS
SEQ_FLAG_ENEMY, // NA_BGM_INSIDE_DEKU_TREE
0, // NA_BGM_MARKET
0, // NA_BGM_TITLE
SEQ_FLAG_RESUME_PREV, // NA_BGM_LINK_HOUSE
0, // NA_BGM_GAME_OVER
0, // NA_BGM_BOSS_CLEAR
SEQ_FLAG_FANFARE, // NA_BGM_ITEM_GET
SEQ_FLAG_FANFARE_GANON, // NA_BGM_OPENING_GANON
SEQ_FLAG_FANFARE, // NA_BGM_HEART_GET
SEQ_FLAG_FANFARE, // NA_BGM_OCA_LIGHT
SEQ_FLAG_ENEMY, // NA_BGM_JABU_JABU
SEQ_FLAG_RESUME, // NA_BGM_KAKARIKO_KID
0, // NA_BGM_GREAT_FAIRY
0, // NA_BGM_ZELDA_THEME
SEQ_FLAG_ENEMY, // NA_BGM_FIRE_TEMPLE
SEQ_FLAG_FANFARE, // NA_BGM_OPEN_TRE_BOX
SEQ_FLAG_ENEMY, // NA_BGM_FOREST_TEMPLE
0, // NA_BGM_COURTYARD
SEQ_FLAG_NO_AMBIENCE, // NA_BGM_GANON_TOWER
0, // NA_BGM_LONLON
SEQ_FLAG_NO_AMBIENCE, // NA_BGM_GORON_CITY
0, // NA_BGM_FIELD_MORNING
SEQ_FLAG_FANFARE, // NA_BGM_SPIRITUAL_STONE
SEQ_FLAG_FANFARE, // NA_BGM_OCA_BOLERO
SEQ_FLAG_FANFARE, // NA_BGM_OCA_MINUET
SEQ_FLAG_FANFARE, // NA_BGM_OCA_SERENADE
SEQ_FLAG_FANFARE, // NA_BGM_OCA_REQUIEM
SEQ_FLAG_FANFARE, // NA_BGM_OCA_NOCTURNE
SEQ_FLAG_NO_AMBIENCE | SEQ_FLAG_RESTORE, // NA_BGM_MINI_BOSS
SEQ_FLAG_FANFARE, // NA_BGM_SMALL_ITEM_GET
0, // NA_BGM_TEMPLE_OF_TIME
SEQ_FLAG_FANFARE, // NA_BGM_EVENT_CLEAR
SEQ_FLAG_RESUME | SEQ_FLAG_ENEMY, // NA_BGM_KOKIRI
SEQ_FLAG_FANFARE, // NA_BGM_OCA_FAIRY_GET
SEQ_FLAG_ENEMY, // NA_BGM_SARIA_THEME
SEQ_FLAG_ENEMY, // NA_BGM_SPIRIT_TEMPLE
0, // NA_BGM_HORSE
0, // NA_BGM_HORSE_GOAL
0, // NA_BGM_INGO
SEQ_FLAG_FANFARE, // NA_BGM_MEDALLION_GET
SEQ_FLAG_FANFARE, // NA_BGM_OCA_SARIA
SEQ_FLAG_FANFARE, // NA_BGM_OCA_EPONA
SEQ_FLAG_FANFARE, // NA_BGM_OCA_ZELDA
SEQ_FLAG_FANFARE, // NA_BGM_OCA_SUNS
SEQ_FLAG_FANFARE, // NA_BGM_OCA_TIME
SEQ_FLAG_FANFARE, // NA_BGM_OCA_STORM
0, // NA_BGM_NAVI_OPENING
0, // NA_BGM_DEKU_TREE_CS
0, // NA_BGM_WINDMILL
0, // NA_BGM_HYRULE_CS
SEQ_FLAG_RESUME_PREV, // NA_BGM_MINI_GAME
0, // NA_BGM_SHEIK
SEQ_FLAG_RESUME, // NA_BGM_ZORA_DOMAIN
SEQ_FLAG_FANFARE, // NA_BGM_APPEAR
0, // NA_BGM_ADULT_LINK
0, // NA_BGM_MASTER_SWORD
SEQ_FLAG_FANFARE_GANON, // NA_BGM_INTRO_GANON
SEQ_FLAG_RESUME_PREV, // NA_BGM_SHOP
SEQ_FLAG_SKIP_HARP_INTRO, // NA_BGM_CHAMBER_OF_SAGES
SEQ_FLAG_SKIP_HARP_INTRO, // NA_BGM_FILE_SELECT
SEQ_FLAG_ENEMY, // NA_BGM_ICE_CAVERN
SEQ_FLAG_FANFARE, // NA_BGM_DOOR_OF_TIME
SEQ_FLAG_FANFARE, // NA_BGM_OWL
SEQ_FLAG_ENEMY, // NA_BGM_SHADOW_TEMPLE
SEQ_FLAG_ENEMY, // NA_BGM_WATER_TEMPLE
SEQ_FLAG_FANFARE, // NA_BGM_BRIDGE_TO_GANONS
0, // NA_BGM_OCARINA_OF_TIME
SEQ_FLAG_RESUME | SEQ_FLAG_ENEMY, // NA_BGM_GERUDO_VALLEY
0, // NA_BGM_POTION_SHOP
0, // NA_BGM_KOTAKE_KOUME
SEQ_FLAG_NO_AMBIENCE, // NA_BGM_ESCAPE
0, // NA_BGM_UNDERGROUND
SEQ_FLAG_NO_AMBIENCE, // NA_BGM_GANON_BATTLE_1
SEQ_FLAG_NO_AMBIENCE, // NA_BGM_GANON_BATTLE_2
0, // NA_BGM_END_DEMO
0, // NA_BGM_STAFF_1
0, // NA_BGM_STAFF_2
0, // NA_BGM_STAFF_3
0, // NA_BGM_STAFF_4
0, // NA_BGM_FIRE_BOSS
SEQ_FLAG_RESTORE, // NA_BGM_TIMED_MINI_GAME
0, // NA_BGM_CUTSCENE_EFFECTS
};
s8 sSpecReverbs[20] = { 0, 0, 0, 0, 0, 0, 0, 40, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
NatureAmbienceDataIO sNatureAmbienceDataIO[20] = {
// NATURE_ID_GENERAL_NIGHT
{
0xC0FF, // PlayerIO Data
0xC0FE, // Channel Mask
{
// Channel 0
NATURE_IO_STREAM_0_TYPE(NATURE_STREAM_RUSHING_WATER),
NATURE_IO_STREAM_0_PORT3(0),
// Channel 1
NATURE_IO_CRITTER_0_TYPE(NATURE_CRITTER_CROWS_CAWS),
NATURE_IO_CRITTER_0_BEND_PITCH(64),
NATURE_IO_CRITTER_0_NUM_LAYERS(0),
NATURE_IO_CRITTER_0_PORT5(32),
// Channel 2
NATURE_IO_CRITTER_1_TYPE(NATURE_CRITTER_CRICKETS),
NATURE_IO_CRITTER_1_BEND_PITCH(0),
NATURE_IO_CRITTER_1_NUM_LAYERS(1),
NATURE_IO_CRITTER_1_PORT5(16),
// Channel 3
NATURE_IO_CRITTER_2_TYPE(NATURE_CRITTER_SMALL_BIRD_CHIRPS),
NATURE_IO_CRITTER_2_BEND_PITCH(112),
NATURE_IO_CRITTER_2_NUM_LAYERS(1),
NATURE_IO_CRITTER_2_PORT5(48),
// Channel 4
NATURE_IO_CRITTER_3_TYPE(NATURE_CRITTER_HAWK_SCREECH),
NATURE_IO_CRITTER_3_BEND_PITCH(127),
NATURE_IO_CRITTER_3_NUM_LAYERS(0),
NATURE_IO_CRITTER_3_PORT5(16),
// Channel 5
NATURE_IO_CRITTER_4_TYPE(NATURE_CRITTER_BIRD_CHIRP_1),
NATURE_IO_CRITTER_4_BEND_PITCH(127),
NATURE_IO_CRITTER_4_NUM_LAYERS(1),
NATURE_IO_CRITTER_4_PORT5(16),
// Channel 6
NATURE_IO_CRITTER_5_TYPE(NATURE_CRITTER_TAP),
NATURE_IO_CRITTER_5_BEND_PITCH(127),
NATURE_IO_CRITTER_5_NUM_LAYERS(3),
NATURE_IO_CRITTER_5_PORT5(16),
// Channel 7
NATURE_IO_CRITTER_6_TYPE(NATURE_CRITTER_CUCCO_CROWS),
NATURE_IO_CRITTER_6_BEND_PITCH(127),
NATURE_IO_CRITTER_6_NUM_LAYERS(1),
NATURE_IO_CRITTER_6_PORT5(16),
// End
NATURE_IO_ENTRIES_END,
},
},
// NATURE_ID_MARKET_ENTRANCE
{
0xC0FB, // PlayerIO Data
0xC0FA, // Channel Mask
{
// Channel 0
NATURE_IO_STREAM_0_TYPE(NATURE_STREAM_RUSHING_WATER),
NATURE_IO_STREAM_0_PORT3(0),
// Channel 1
NATURE_IO_CRITTER_0_TYPE(NATURE_CRITTER_CRICKETS),
NATURE_IO_CRITTER_0_BEND_PITCH(0),
NATURE_IO_CRITTER_0_NUM_LAYERS(1),
NATURE_IO_CRITTER_0_PORT5(16),
// Channel 3
NATURE_IO_CRITTER_2_TYPE(NATURE_CRITTER_BIRD_SCREECH),
NATURE_IO_CRITTER_2_BEND_PITCH(112),
NATURE_IO_CRITTER_2_NUM_LAYERS(1),
NATURE_IO_CRITTER_2_PORT5(48),
// Channel 4
NATURE_IO_CRITTER_3_TYPE(NATURE_CRITTER_HAWK_SCREECH),
NATURE_IO_CRITTER_3_BEND_PITCH(127),
NATURE_IO_CRITTER_3_NUM_LAYERS(0),
NATURE_IO_CRITTER_3_PORT5(16),
// Channel 5
NATURE_IO_CRITTER_4_TYPE(NATURE_CRITTER_BIRD_CHIRP_1),
NATURE_IO_CRITTER_4_BEND_PITCH(127),
NATURE_IO_CRITTER_4_NUM_LAYERS(1),
NATURE_IO_CRITTER_4_PORT5(16),
// Channel 6
NATURE_IO_CRITTER_5_TYPE(NATURE_CRITTER_TAP),
NATURE_IO_CRITTER_5_BEND_PITCH(127),
NATURE_IO_CRITTER_5_NUM_LAYERS(3),
NATURE_IO_CRITTER_5_PORT5(16),
// Channel 7
NATURE_IO_CRITTER_6_TYPE(NATURE_CRITTER_CUCCO_CROWS),
NATURE_IO_CRITTER_6_BEND_PITCH(127),
NATURE_IO_CRITTER_6_NUM_LAYERS(1),
NATURE_IO_CRITTER_6_PORT5(16),
// End
NATURE_IO_ENTRIES_END,
},
},
// NATURE_ID_KAKARIKO_REGION
{
0xC001, // PlayerIO Data
0x4000, // Channel Mask
{
// Channel 0
NATURE_IO_STREAM_0_TYPE(NATURE_STREAM_RUSHING_WATER),
NATURE_IO_STREAM_0_PORT3(0),
// Channel 2
NATURE_IO_CRITTER_1_TYPE(NATURE_CRITTER_BIRD_SCREECH),
NATURE_IO_CRITTER_1_BEND_PITCH(48),
NATURE_IO_CRITTER_1_NUM_LAYERS(1),
NATURE_IO_CRITTER_1_PORT5(32),
// End
NATURE_IO_ENTRIES_END,
},
},
// NATURE_ID_MARKET_RUINS
{
0xC005, // PlayerIO Data
0x4000, // Channel Mask
{
// Channel 0
NATURE_IO_STREAM_0_TYPE(NATURE_STREAM_HOWLING_WIND),
NATURE_IO_STREAM_0_PORT3(32),
// Channel 2
NATURE_IO_CRITTER_1_TYPE(NATURE_CRITTER_BIRD_SCREECH),
NATURE_IO_CRITTER_1_BEND_PITCH(48),
NATURE_IO_CRITTER_1_NUM_LAYERS(1),
NATURE_IO_CRITTER_1_PORT5(32),
// End
NATURE_IO_ENTRIES_END,
},
},
// NATURE_ID_KOKIRI_REGION
{
0xC01F, // PlayerIO Data
0xC000, // Channel Mask
{
// Channel 0
NATURE_IO_STREAM_0_TYPE(NATURE_STREAM_RUSHING_WATER),
NATURE_IO_STREAM_0_PORT3(47),
// Channel 1
NATURE_IO_CRITTER_0_TYPE(NATURE_CRITTER_OWL_HOOT),
NATURE_IO_CRITTER_0_BEND_PITCH(0),
NATURE_IO_CRITTER_0_NUM_LAYERS(1),
NATURE_IO_CRITTER_0_PORT5(16),
// Channel 2
NATURE_IO_CRITTER_1_TYPE(NATURE_CRITTER_CAWING_BIRD),
NATURE_IO_CRITTER_1_BEND_PITCH(0),
NATURE_IO_CRITTER_1_NUM_LAYERS(1),
NATURE_IO_CRITTER_1_PORT5(32),
// Channel 3
NATURE_IO_CRITTER_2_TYPE(NATURE_CRITTER_HAWK_SCREECH),
NATURE_IO_CRITTER_2_BEND_PITCH(0),
NATURE_IO_CRITTER_2_NUM_LAYERS(0),
NATURE_IO_CRITTER_2_PORT5(44),
// Channel 4
NATURE_IO_CRITTER_3_TYPE(NATURE_CRITTER_BIRD_SCREECH),
NATURE_IO_CRITTER_3_BEND_PITCH(63),
NATURE_IO_CRITTER_3_NUM_LAYERS(1),
NATURE_IO_CRITTER_3_PORT5(44),
// End
NATURE_IO_ENTRIES_END,
},
},
// NATURE_ID_MARKET_NIGHT
{
0xC003, // PlayerIO Data
0xC000, // Channel Mask
{
// Channel 0
NATURE_IO_STREAM_0_TYPE(NATURE_STREAM_RUSHING_WATER),
NATURE_IO_STREAM_0_PORT3(0),
// Channel 1
NATURE_IO_CRITTER_0_TYPE(NATURE_CRITTER_CRICKETS),
NATURE_IO_CRITTER_0_BEND_PITCH(0),
NATURE_IO_CRITTER_0_NUM_LAYERS(1),
NATURE_IO_CRITTER_0_PORT5(16),
// End
NATURE_IO_ENTRIES_END,
},
},
// NATURE_ID_06
{
0xC0FB, // PlayerIO Data
0xC0FA, // Channel Mask
{
// Channel 0
NATURE_IO_STREAM_0_TYPE(NATURE_STREAM_RUSHING_WATER),
NATURE_IO_STREAM_0_PORT3(0),
// Channel 1
NATURE_IO_CRITTER_0_TYPE(NATURE_CRITTER_CRICKETS),
NATURE_IO_CRITTER_0_BEND_PITCH(0),
NATURE_IO_CRITTER_0_NUM_LAYERS(1),
NATURE_IO_CRITTER_0_PORT5(16),
// Channel 3
NATURE_IO_CRITTER_2_TYPE(NATURE_CRITTER_BIRD_SCREECH),
NATURE_IO_CRITTER_2_BEND_PITCH(112),
NATURE_IO_CRITTER_2_NUM_LAYERS(1),
NATURE_IO_CRITTER_2_PORT5(48),
// Channel 4
NATURE_IO_CRITTER_3_TYPE(NATURE_CRITTER_HAWK_SCREECH),
NATURE_IO_CRITTER_3_BEND_PITCH(127),
NATURE_IO_CRITTER_3_NUM_LAYERS(0),
NATURE_IO_CRITTER_3_PORT5(16),
// Channel 5
NATURE_IO_CRITTER_4_TYPE(NATURE_CRITTER_BIRD_CHIRP_1),
NATURE_IO_CRITTER_4_BEND_PITCH(127),
NATURE_IO_CRITTER_4_NUM_LAYERS(1),
NATURE_IO_CRITTER_4_PORT5(16),
// Channel 6
NATURE_IO_CRITTER_5_TYPE(NATURE_CRITTER_TAP),
NATURE_IO_CRITTER_5_BEND_PITCH(127),
NATURE_IO_CRITTER_5_NUM_LAYERS(3),
NATURE_IO_CRITTER_5_PORT5(16),
// Channel 7
NATURE_IO_CRITTER_6_TYPE(NATURE_CRITTER_CUCCO_CROWS),
NATURE_IO_CRITTER_6_BEND_PITCH(127),
NATURE_IO_CRITTER_6_NUM_LAYERS(1),
NATURE_IO_CRITTER_6_PORT5(16),
// End
NATURE_IO_ENTRIES_END,
},
},
// NATURE_ID_GANONS_LAIR
{
0x8001, // PlayerIO Data
0x0, // Channel Mask
{
// Channel 0
NATURE_IO_STREAM_0_TYPE(NATURE_STREAM_HOWLING_WIND),
NATURE_IO_STREAM_0_PORT3(32),
// End
NATURE_IO_ENTRIES_END,
},
},
// NATURE_ID_08
{
0xC003, // PlayerIO Data
0xC000, // Channel Mask
{
// Channel 0
NATURE_IO_STREAM_0_TYPE(NATURE_STREAM_RUSHING_WATER),
NATURE_IO_STREAM_0_PORT3(0),
// Channel 1
NATURE_IO_CRITTER_0_TYPE(NATURE_CRITTER_CRICKETS),
NATURE_IO_CRITTER_0_BEND_PITCH(0),
NATURE_IO_CRITTER_0_NUM_LAYERS(1),
NATURE_IO_CRITTER_0_PORT5(16),
// End
NATURE_IO_ENTRIES_END,
},
},
// NATURE_ID_09
{
0xC003, // PlayerIO Data
0xC000, // Channel Mask
{
// Channel 0
NATURE_IO_STREAM_0_TYPE(NATURE_STREAM_RUSHING_WATER),
NATURE_IO_STREAM_0_PORT3(0),
// Channel 1
NATURE_IO_CRITTER_0_TYPE(NATURE_CRITTER_CRICKETS),
NATURE_IO_CRITTER_0_BEND_PITCH(0),
NATURE_IO_CRITTER_0_NUM_LAYERS(1),
NATURE_IO_CRITTER_0_PORT5(16),
// End
NATURE_IO_ENTRIES_END,
},
},
// NATURE_ID_WASTELAND
{
0xC001, // PlayerIO Data
0xC000, // Channel Mask
{
// Channel 0
NATURE_IO_STREAM_0_TYPE(NATURE_STREAM_SCREECHING_WIND),
NATURE_IO_STREAM_0_PORT3(0),
NATURE_IO_STREAM_0_PORT4(0),
// End
NATURE_IO_ENTRIES_END,
},
},
// NATURE_ID_COLOSSUS
{
0xC02F, // PlayerIO Data
0xC02E, // Channel Mask
{
// Channel 0
NATURE_IO_STREAM_0_TYPE(NATURE_STREAM_SCREECHING_WIND),
NATURE_IO_STREAM_0_PORT3(0),
NATURE_IO_STREAM_0_PORT4(0),
// Channel 1
NATURE_IO_CRITTER_0_TYPE(NATURE_CRITTER_SMALL_BIRD_CHIRPS),
NATURE_IO_CRITTER_0_BEND_PITCH(64),
NATURE_IO_CRITTER_0_NUM_LAYERS(0),
NATURE_IO_CRITTER_0_PORT5(32),
// Channel 2
NATURE_IO_CRITTER_1_TYPE(NATURE_CRITTER_BIRD_CALL),
NATURE_IO_CRITTER_1_BEND_PITCH(112),
NATURE_IO_CRITTER_1_NUM_LAYERS(1),
NATURE_IO_CRITTER_1_PORT5(48),
// Channel 3
NATURE_IO_CRITTER_2_TYPE(NATURE_CRITTER_HAWK_SCREECH),
NATURE_IO_CRITTER_2_BEND_PITCH(127),
NATURE_IO_CRITTER_2_NUM_LAYERS(0),
NATURE_IO_CRITTER_2_PORT5(16),
// Channel 5
NATURE_IO_CRITTER_4_TYPE(NATURE_CRITTER_CRICKETS),
NATURE_IO_CRITTER_4_BEND_PITCH(127),
NATURE_IO_CRITTER_4_NUM_LAYERS(0),
NATURE_IO_CRITTER_4_PORT5(16),
// End
NATURE_IO_ENTRIES_END,
},
},
// NATURE_ID_DEATH_MOUNTAIN_TRAIL
{
0xC07F, // PlayerIO Data
0xC07E, // Channel Mask
{
// Channel 0
NATURE_IO_STREAM_0_TYPE(NATURE_STREAM_RUSHING_WATER),
NATURE_IO_STREAM_0_PORT3(0),
NATURE_IO_STREAM_0_PORT4(0),
// Channel 1
NATURE_IO_CRITTER_0_TYPE(NATURE_CRITTER_SMALL_BIRD_CHIRPS),
NATURE_IO_CRITTER_0_BEND_PITCH(64),
NATURE_IO_CRITTER_0_NUM_LAYERS(0),
NATURE_IO_CRITTER_0_PORT5(32),
// Channel 2
NATURE_IO_CRITTER_1_TYPE(NATURE_CRITTER_BIRD_SCREECH),
NATURE_IO_CRITTER_1_BEND_PITCH(112),
NATURE_IO_CRITTER_1_NUM_LAYERS(1),
NATURE_IO_CRITTER_1_PORT5(48),
// Channel 3
NATURE_IO_CRITTER_2_TYPE(NATURE_CRITTER_BIRD_SONG),
NATURE_IO_CRITTER_2_BEND_PITCH(127),
NATURE_IO_CRITTER_2_NUM_LAYERS(0),
NATURE_IO_CRITTER_2_PORT5(16),
// Channel 4
NATURE_IO_CRITTER_3_TYPE(NATURE_CRITTER_LOUD_CHIRPING),
NATURE_IO_CRITTER_3_BEND_PITCH(0),
NATURE_IO_CRITTER_3_NUM_LAYERS(0),
NATURE_IO_CRITTER_3_PORT5(16),
// Channel 5
NATURE_IO_CRITTER_4_TYPE(NATURE_CRITTER_BIRD_CHIRP_1),
NATURE_IO_CRITTER_4_BEND_PITCH(0),
NATURE_IO_CRITTER_4_NUM_LAYERS(0),
NATURE_IO_CRITTER_4_PORT5(16),
// Channel 6
NATURE_IO_CRITTER_5_TYPE(NATURE_CRITTER_TAP),
NATURE_IO_CRITTER_5_BEND_PITCH(0),
NATURE_IO_CRITTER_5_NUM_LAYERS(0),
NATURE_IO_CRITTER_5_PORT5(16),
// End
NATURE_IO_ENTRIES_END,
},
},
// NATURE_ID_0D
{
0xC003, // PlayerIO Data
0xC000, // Channel Mask
{
// Channel 0
NATURE_IO_STREAM_0_TYPE(NATURE_STREAM_RUSHING_WATER),
NATURE_IO_STREAM_0_PORT3(0),
// Channel 1
NATURE_IO_CRITTER_0_TYPE(NATURE_CRITTER_CRICKETS),
NATURE_IO_CRITTER_0_BEND_PITCH(0),
NATURE_IO_CRITTER_0_NUM_LAYERS(1),
NATURE_IO_CRITTER_0_PORT5(16),
// End
NATURE_IO_ENTRIES_END,
},
},
// NATURE_ID_0E
{
0xC003, // PlayerIO Data
0xC000, // Channel Mask
{
// Channel 0
NATURE_IO_STREAM_0_TYPE(NATURE_STREAM_RUSHING_WATER),
NATURE_IO_STREAM_0_PORT3(0),
// Channel 1
NATURE_IO_CRITTER_0_TYPE(NATURE_CRITTER_CRICKETS),
NATURE_IO_CRITTER_0_BEND_PITCH(0),
NATURE_IO_CRITTER_0_NUM_LAYERS(1),
NATURE_IO_CRITTER_0_PORT5(16),
// End
NATURE_IO_ENTRIES_END,
},
},
// NATURE_ID_0F
{
0xC01F, // PlayerIO Data
0xC000, // Channel Mask
{
// Channel 0
NATURE_IO_STREAM_0_TYPE(NATURE_STREAM_RUSHING_WATER),
NATURE_IO_STREAM_0_PORT3(0),
// Channel 1
NATURE_IO_CRITTER_0_TYPE(NATURE_CRITTER_BIRD_CHIRP_1),
NATURE_IO_CRITTER_0_BEND_PITCH(80),
NATURE_IO_CRITTER_0_NUM_LAYERS(1),
NATURE_IO_CRITTER_0_PORT5(8),
// Channel 2
NATURE_IO_CRITTER_1_TYPE(NATURE_CRITTER_SMALL_BIRD_CHIRPS),
NATURE_IO_CRITTER_1_BEND_PITCH(80),
NATURE_IO_CRITTER_1_NUM_LAYERS(1),
NATURE_IO_CRITTER_1_PORT5(48),
// Channel 3
NATURE_IO_CRITTER_2_TYPE(NATURE_CRITTER_LOUD_CHIRPING),
NATURE_IO_CRITTER_2_BEND_PITCH(0),
NATURE_IO_CRITTER_2_NUM_LAYERS(0),
NATURE_IO_CRITTER_2_PORT5(0),
// Channel 4
NATURE_IO_CRITTER_3_TYPE(NATURE_CRITTER_BIRD_SCREECH),
NATURE_IO_CRITTER_3_BEND_PITCH(96),
NATURE_IO_CRITTER_3_NUM_LAYERS(0),
NATURE_IO_CRITTER_3_PORT5(32),
// End
NATURE_IO_ENTRIES_END,
},
},
// NATURE_ID_10
{
0xC003, // PlayerIO Data
0xC000, // Channel Mask
{
// Channel 0
NATURE_IO_STREAM_0_TYPE(NATURE_STREAM_RUSHING_WATER),
NATURE_IO_STREAM_0_PORT3(0),
// Channel 1
NATURE_IO_CRITTER_0_TYPE(NATURE_CRITTER_CRICKETS),
NATURE_IO_CRITTER_0_BEND_PITCH(0),
NATURE_IO_CRITTER_0_NUM_LAYERS(1),
NATURE_IO_CRITTER_0_PORT5(16),
// End
NATURE_IO_ENTRIES_END,
},
},
// NATURE_ID_11
{
0xC003, // PlayerIO Data
0xC000, // Channel Mask
{
// Channel 0
NATURE_IO_STREAM_0_TYPE(NATURE_STREAM_RUSHING_WATER),
NATURE_IO_STREAM_0_PORT3(0),
// Channel 1
NATURE_IO_CRITTER_0_TYPE(NATURE_CRITTER_CRICKETS),
NATURE_IO_CRITTER_0_BEND_PITCH(0),
NATURE_IO_CRITTER_0_NUM_LAYERS(1),
NATURE_IO_CRITTER_0_PORT5(16),
// End
NATURE_IO_ENTRIES_END,
},
},
// NATURE_ID_12
{
0xC003, // PlayerIO Data
0xC000, // Channel Mask
{
// Channel 0
NATURE_IO_STREAM_0_TYPE(NATURE_STREAM_RUSHING_WATER),
NATURE_IO_STREAM_0_PORT3(0),
// Channel 1
NATURE_IO_CRITTER_0_TYPE(NATURE_CRITTER_CRICKETS),
NATURE_IO_CRITTER_0_BEND_PITCH(0),
NATURE_IO_CRITTER_0_NUM_LAYERS(1),
NATURE_IO_CRITTER_0_PORT5(16),
// End
NATURE_IO_ENTRIES_END,
},
},
// NATURE_ID_NONE
// While there is data for this natureAmbienceId, it is identical to previous entries
// and the game treats it as no nature ambience
{
0xC003, // PlayerIO Data
0xC000, // Channel Mask
{
// Channel 0
NATURE_IO_STREAM_0_TYPE(NATURE_STREAM_RUSHING_WATER),
NATURE_IO_STREAM_0_PORT3(0),
// Channel 1
NATURE_IO_CRITTER_0_TYPE(NATURE_CRITTER_CRICKETS),
NATURE_IO_CRITTER_0_BEND_PITCH(0),
NATURE_IO_CRITTER_0_NUM_LAYERS(1),
NATURE_IO_CRITTER_0_PORT5(16),
// End
NATURE_IO_ENTRIES_END,
},
},
};
u32 sOcarinaAllowedButtonMask = (BTN_A | BTN_CRIGHT | BTN_CLEFT | BTN_CDOWN | BTN_CUP);
s32 sOcarinaAButtonMap = BTN_A;
s32 sOcarinaCUpButtonMap = BTN_CUP;
s32 sOcarinaCDownButtonMap = BTN_CDOWN;
u8 sIsOcarinaInputEnabled = false;
s8 sOcarinaInstrumentId = OCARINA_INSTRUMENT_OFF;
u8 sCurOcarinaPitch = OCARINA_PITCH_NONE;
u8 sPrevOcarinaPitch = OCARINA_PITCH_C4;
u8 sCurOcarinaButtonIndex = OCARINA_BTN_A;
u8 sMusicStaffPrevPitch = OCARINA_PITCH_C4;
f32 sCurOcarinaBendFreq = 1.0f;
f32 sRelativeOcarinaVolume = 87.0f / 127.0f;
s8 sCurOcarinaBendIndex = 0;
s8 sCurOcarinaVolume = 87;
s8 sCurOcarinaVibrato = 0;
u8 sPlaybackState = 0;
u32 sOcarinaFlags = 0;
u32 sPlaybackNoteTimer = 0;
u16 sPlaybackNotePos = 0;
u16 sPlaybackStaffPos = 0;
u16 sPrevOcarinaWithMusicStaffFlags = 0;
u8 sPlaybackPitch = OCARINA_PITCH_NONE; // Pitch + PitchFlags
u8 sNotePlaybackVolume = 0;
u8 sNotePlaybackVibrato = 0;
s8 sNotePlaybackBend = 0;
f32 sRelativeNotePlaybackBend = 1.0f;
f32 sRelativeNotePlaybackVolume = 1.0f;
s32 sOcarinaPlaybackTaskStart = 0;
u8 sButtonToPitchMap[5] = {
OCARINA_PITCH_D4, // OCARINA_BTN_A
OCARINA_PITCH_F4, // OCARINA_BTN_C_DOWN
OCARINA_PITCH_A4, // OCARINA_BTN_C_RIGHT
OCARINA_PITCH_B4, // OCARINA_BTN_C_LEFT
OCARINA_PITCH_D5, // OCARINA_BTN_C_UP
};
u8 sOcaMemoryGameAppendPos = 0;
u8 sOcaMemoryGameEndPos = 0;
u8 sOcaMemoryGameNumNotes[] = { 5, 6, 8 };
OcarinaNote sOcarinaSongNotes[OCARINA_SONG_MAX][20] = {
// OCARINA_SONG_MINUET
{
{ OCARINA_PITCH_D4, 18, 86, 0, 0, 0 },
{ OCARINA_PITCH_D5, 18, 92, 0, 0, 0 },
{ OCARINA_PITCH_B4, 72, 86, 0, 0, 0 },
{ OCARINA_PITCH_A4, 18, 80, 0, 0, 0 },
{ OCARINA_PITCH_B4, 18, 88, 0, 0, 0 },
{ OCARINA_PITCH_A4, 144, 86, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 86, 0, 0, 0 },
},
// OCARINA_SONG_BOLERO
{
{ OCARINA_PITCH_F4, 15, 80, 0, 0, 0 },
{ OCARINA_PITCH_D4, 15, 72, 0, 0, 0 },
{ OCARINA_PITCH_F4, 15, 84, 0, 0, 0 },
{ OCARINA_PITCH_D4, 15, 76, 0, 0, 0 },
{ OCARINA_PITCH_A4, 15, 84, 0, 0, 0 },
{ OCARINA_PITCH_F4, 15, 74, 0, 0, 0 },
{ OCARINA_PITCH_A4, 15, 78, 0, 0, 0 },
{ OCARINA_PITCH_F4, 135, 66, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 66, 0, 0, 0 },
},
// OCARINA_SONG_SERENADE
{
{ OCARINA_PITCH_D4, 36, 60, 0, 0, 0 },
{ OCARINA_PITCH_F4, 36, 78, 0, 0, 0 },
{ OCARINA_PITCH_A4, 33, 82, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 3, 82, 0, 0, 0 },
{ OCARINA_PITCH_A4, 36, 84, 0, 0, 0 },
{ OCARINA_PITCH_B4, 144, 90, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 90, 0, 0, 0 },
},
// OCARINA_SONG_REQUIEM
{
{ OCARINA_PITCH_D4, 45, 88, 0, 0, 0 },
{ OCARINA_PITCH_F4, 23, 86, 0, 0, 0 },
{ OCARINA_PITCH_D4, 22, 84, 0, 0, 0 },
{ OCARINA_PITCH_A4, 45, 86, 0, 0, 0 },
{ OCARINA_PITCH_F4, 45, 94, 0, 0, 0 },
{ OCARINA_PITCH_D4, 180, 94, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 94, 0, 0, 0 },
},
// OCARINA_SONG_NOCTURNE
{
{ OCARINA_PITCH_B4, 36, 88, 0, 0, 0 },
{ OCARINA_PITCH_A4, 33, 84, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 3, 84, 0, 0, 0 },
{ OCARINA_PITCH_A4, 18, 82, 0, 0, 0 },
{ OCARINA_PITCH_D4, 18, 60, 0, 0, 0 },
{ OCARINA_PITCH_B4, 18, 90, 0, 0, 0 },
{ OCARINA_PITCH_A4, 18, 88, 0, 0, 0 },
{ OCARINA_PITCH_F4, 144, 96, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 96, 0, 0, 0 },
},
// OCARINA_SONG_PRELUDE
{
{ OCARINA_PITCH_D5, 15, 84, 0, 0, 0 },
{ OCARINA_PITCH_A4, 45, 88, 0, 0, 0 },
{ OCARINA_PITCH_D5, 15, 88, 0, 0, 0 },
{ OCARINA_PITCH_A4, 15, 82, 0, 0, 0 },
{ OCARINA_PITCH_B4, 15, 86, 0, 0, 0 },
{ OCARINA_PITCH_D5, 60, 90, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 75, 90, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 90, 0, 0, 0 },
},
// OCARINA_SONG_SARIAS
{
{ OCARINA_PITCH_F4, 17, 84, 0, 0, 0 },
{ OCARINA_PITCH_A4, 17, 88, 0, 0, 0 },
{ OCARINA_PITCH_B4, 34, 80, 0, 0, 0 },
{ OCARINA_PITCH_F4, 17, 84, 0, 0, 0 },
{ OCARINA_PITCH_A4, 17, 88, 0, 0, 0 },
{ OCARINA_PITCH_B4, 136, 80, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 90, 0, 0, 0 },
},
// OCARINA_SONG_EPONAS
{
{ OCARINA_PITCH_D5, 18, 84, 0, 0, 0 },
{ OCARINA_PITCH_B4, 18, 88, 0, 0, 0 },
{ OCARINA_PITCH_A4, 72, 80, 0, 0, 0 },
{ OCARINA_PITCH_D5, 18, 84, 0, 0, 0 },
{ OCARINA_PITCH_B4, 18, 88, 0, 0, 0 },
{ OCARINA_PITCH_A4, 144, 80, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 90, 0, 0, 0 },
},
// OCARINA_SONG_LULLABY
{
{ OCARINA_PITCH_B4, 51, 84, 0, 0, 0 },
{ OCARINA_PITCH_D5, 25, 88, 0, 0, 0 },
{ OCARINA_PITCH_A4, 78, 80, 0, 0, 0 },
{ OCARINA_PITCH_B4, 51, 84, 0, 0, 0 },
{ OCARINA_PITCH_D5, 25, 88, 0, 0, 0 },
{ OCARINA_PITCH_A4, 100, 80, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 90, 0, 0, 0 },
},
// OCARINA_SONG_SUNS
{
{ OCARINA_PITCH_A4, 12, 84, 0, 0, 0 },
{ OCARINA_PITCH_F4, 13, 88, 0, 0, 0 },
{ OCARINA_PITCH_D5, 29, 80, 2, 0, 0 },
{ OCARINA_PITCH_NONE, 9, 84, 0, 0, 0 },
{ OCARINA_PITCH_A4, 12, 84, 0, 0, 0 },
{ OCARINA_PITCH_F4, 13, 88, 0, 0, 0 },
{ OCARINA_PITCH_D5, 120, 80, 3, 0, 0 },