| 
									
										
										
										
											2022-02-14 22:12:20 -05:00
										 |  |  | /**
 | 
					
						
							|  |  |  |  * Furnace Tracker - multi-system chiptune tracker | 
					
						
							| 
									
										
										
										
											2023-01-19 19:18:40 -05:00
										 |  |  |  * Copyright (C) 2021-2023 tildearrow and contributors | 
					
						
							| 
									
										
										
										
											2022-02-14 22:12:20 -05:00
										 |  |  |  * | 
					
						
							|  |  |  |  * This program is free software; you can redistribute it and/or modify | 
					
						
							|  |  |  |  * it under the terms of the GNU General Public License as published by | 
					
						
							|  |  |  |  * the Free Software Foundation; either version 2 of the License, or | 
					
						
							|  |  |  |  * (at your option) any later version. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This program is distributed in the hope that it will be useful, | 
					
						
							|  |  |  |  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  |  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
					
						
							|  |  |  |  * GNU General Public License for more details. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * You should have received a copy of the GNU General Public License along | 
					
						
							|  |  |  |  * with this program; if not, write to the Free Software Foundation, Inc., | 
					
						
							|  |  |  |  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-01-27 00:29:16 -05:00
										 |  |  | #ifndef _SONG_H
 | 
					
						
							|  |  |  | #define _SONG_H
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  | #include <stdio.h>
 | 
					
						
							|  |  |  | #include <vector>
 | 
					
						
							| 
									
										
										
										
											2022-01-08 01:57:37 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-09 00:30:27 -05:00
										 |  |  | #include "defines.h"
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  | #include "../ta-utils.h"
 | 
					
						
							| 
									
										
										
										
											2022-09-29 04:29:24 -04:00
										 |  |  | #include "config.h"
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  | #include "orders.h"
 | 
					
						
							|  |  |  | #include "instrument.h"
 | 
					
						
							|  |  |  | #include "pattern.h"
 | 
					
						
							|  |  |  | #include "wavetable.h"
 | 
					
						
							|  |  |  | #include "sample.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | enum DivSystem { | 
					
						
							|  |  |  |   DIV_SYSTEM_NULL=0, | 
					
						
							|  |  |  |   DIV_SYSTEM_YMU759, | 
					
						
							| 
									
										
										
										
											2022-02-23 02:52:30 -05:00
										 |  |  |   DIV_SYSTEM_GENESIS, // ** COMPOUND SYSTEM - DO NOT USE! **
 | 
					
						
							|  |  |  |   DIV_SYSTEM_GENESIS_EXT, // ** COMPOUND SYSTEM - DO NOT USE! **
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  |   DIV_SYSTEM_SMS, | 
					
						
							| 
									
										
										
										
											2022-02-23 02:52:30 -05:00
										 |  |  |   DIV_SYSTEM_SMS_OPLL, // ** COMPOUND SYSTEM - DO NOT USE! **
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  |   DIV_SYSTEM_GB, | 
					
						
							|  |  |  |   DIV_SYSTEM_PCE, | 
					
						
							|  |  |  |   DIV_SYSTEM_NES, | 
					
						
							| 
									
										
										
										
											2022-02-23 21:53:07 -05:00
										 |  |  |   DIV_SYSTEM_NES_VRC7, // ** COMPOUND SYSTEM - DO NOT USE! **
 | 
					
						
							| 
									
										
										
										
											2022-04-03 18:14:12 -04:00
										 |  |  |   DIV_SYSTEM_NES_FDS, // ** COMPOUND SYSTEM - DO NOT USE! **
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  |   DIV_SYSTEM_C64_6581, | 
					
						
							|  |  |  |   DIV_SYSTEM_C64_8580, | 
					
						
							| 
									
										
										
										
											2022-02-23 02:52:30 -05:00
										 |  |  |   DIV_SYSTEM_ARCADE, // ** COMPOUND SYSTEM - DO NOT USE! **
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  |   DIV_SYSTEM_YM2610, | 
					
						
							| 
									
										
										
										
											2022-01-12 22:58:51 -05:00
										 |  |  |   DIV_SYSTEM_YM2610_EXT, | 
					
						
							|  |  |  |    | 
					
						
							|  |  |  |   DIV_SYSTEM_AY8910, | 
					
						
							|  |  |  |   DIV_SYSTEM_AMIGA, | 
					
						
							|  |  |  |   DIV_SYSTEM_YM2151, | 
					
						
							| 
									
										
										
										
											2022-12-20 17:55:05 -05:00
										 |  |  |   DIV_SYSTEM_YM2612, | 
					
						
							| 
									
										
										
										
											2022-01-12 22:58:51 -05:00
										 |  |  |   DIV_SYSTEM_TIA, | 
					
						
							| 
									
										
										
										
											2022-01-14 00:02:10 -05:00
										 |  |  |   DIV_SYSTEM_SAA1099, | 
					
						
							| 
									
										
										
										
											2022-02-02 15:29:20 -05:00
										 |  |  |   DIV_SYSTEM_AY8930, | 
					
						
							|  |  |  |   DIV_SYSTEM_VIC20, | 
					
						
							|  |  |  |   DIV_SYSTEM_PET, | 
					
						
							|  |  |  |   DIV_SYSTEM_SNES, | 
					
						
							| 
									
										
										
										
											2022-02-02 18:24:33 -05:00
										 |  |  |   DIV_SYSTEM_VRC6, | 
					
						
							| 
									
										
										
										
											2022-02-02 15:29:20 -05:00
										 |  |  |   DIV_SYSTEM_OPLL, | 
					
						
							|  |  |  |   DIV_SYSTEM_FDS, | 
					
						
							|  |  |  |   DIV_SYSTEM_MMC5, | 
					
						
							|  |  |  |   DIV_SYSTEM_N163, | 
					
						
							| 
									
										
										
										
											2022-12-20 17:49:53 -05:00
										 |  |  |   DIV_SYSTEM_YM2203, | 
					
						
							|  |  |  |   DIV_SYSTEM_YM2203_EXT, | 
					
						
							|  |  |  |   DIV_SYSTEM_YM2608, | 
					
						
							|  |  |  |   DIV_SYSTEM_YM2608_EXT, | 
					
						
							| 
									
										
										
										
											2022-02-02 15:29:20 -05:00
										 |  |  |   DIV_SYSTEM_OPL, | 
					
						
							|  |  |  |   DIV_SYSTEM_OPL2, | 
					
						
							|  |  |  |   DIV_SYSTEM_OPL3, | 
					
						
							|  |  |  |   DIV_SYSTEM_MULTIPCM, | 
					
						
							|  |  |  |   DIV_SYSTEM_PCSPKR, | 
					
						
							|  |  |  |   DIV_SYSTEM_POKEY, | 
					
						
							|  |  |  |   DIV_SYSTEM_RF5C68, | 
					
						
							|  |  |  |   DIV_SYSTEM_SWAN, | 
					
						
							|  |  |  |   DIV_SYSTEM_OPZ, | 
					
						
							|  |  |  |   DIV_SYSTEM_POKEMINI, | 
					
						
							|  |  |  |   DIV_SYSTEM_SEGAPCM, | 
					
						
							|  |  |  |   DIV_SYSTEM_VBOY, | 
					
						
							|  |  |  |   DIV_SYSTEM_VRC7, | 
					
						
							|  |  |  |   DIV_SYSTEM_YM2610B, | 
					
						
							|  |  |  |   DIV_SYSTEM_SFX_BEEPER, | 
					
						
							| 
									
										
										
										
											2023-03-05 12:58:27 -05:00
										 |  |  |   DIV_SYSTEM_SFX_BEEPER_QUADTONE, | 
					
						
							| 
									
										
										
										
											2022-12-20 17:55:05 -05:00
										 |  |  |   DIV_SYSTEM_YM2612_EXT, | 
					
						
							| 
									
										
										
										
											2022-02-02 18:24:33 -05:00
										 |  |  |   DIV_SYSTEM_SCC, | 
					
						
							|  |  |  |   DIV_SYSTEM_OPL_DRUMS, | 
					
						
							|  |  |  |   DIV_SYSTEM_OPL2_DRUMS, | 
					
						
							|  |  |  |   DIV_SYSTEM_OPL3_DRUMS, | 
					
						
							| 
									
										
										
										
											2022-02-10 03:28:20 -05:00
										 |  |  |   DIV_SYSTEM_YM2610_FULL, | 
					
						
							|  |  |  |   DIV_SYSTEM_YM2610_FULL_EXT, | 
					
						
							| 
									
										
										
										
											2022-02-02 18:24:33 -05:00
										 |  |  |   DIV_SYSTEM_OPLL_DRUMS, | 
					
						
							| 
									
										
										
										
											2022-02-22 18:21:57 -05:00
										 |  |  |   DIV_SYSTEM_LYNX, | 
					
						
							| 
									
										
										
										
											2022-02-23 02:52:30 -05:00
										 |  |  |   DIV_SYSTEM_QSOUND, | 
					
						
							| 
									
										
										
										
											2022-03-04 06:13:49 -05:00
										 |  |  |   DIV_SYSTEM_VERA, | 
					
						
							| 
									
										
										
										
											2022-02-24 11:02:35 -05:00
										 |  |  |   DIV_SYSTEM_YM2610B_EXT, | 
					
						
							| 
									
										
										
										
											2022-03-04 06:13:49 -05:00
										 |  |  |   DIV_SYSTEM_SEGAPCM_COMPAT, | 
					
						
							| 
									
										
										
										
											2022-03-14 06:22:12 -04:00
										 |  |  |   DIV_SYSTEM_X1_010, | 
					
						
							| 
									
										
										
										
											2022-04-26 19:32:33 -04:00
										 |  |  |   DIV_SYSTEM_BUBSYS_WSG, | 
					
						
							|  |  |  |   DIV_SYSTEM_OPL4, | 
					
						
							|  |  |  |   DIV_SYSTEM_OPL4_DRUMS, | 
					
						
							|  |  |  |   DIV_SYSTEM_ES5506, | 
					
						
							|  |  |  |   DIV_SYSTEM_Y8950, | 
					
						
							|  |  |  |   DIV_SYSTEM_Y8950_DRUMS, | 
					
						
							|  |  |  |   DIV_SYSTEM_SCC_PLUS, | 
					
						
							|  |  |  |   DIV_SYSTEM_SOUND_UNIT, | 
					
						
							|  |  |  |   DIV_SYSTEM_MSM6295, | 
					
						
							|  |  |  |   DIV_SYSTEM_MSM6258, | 
					
						
							| 
									
										
										
										
											2022-05-18 02:55:33 -04:00
										 |  |  |   DIV_SYSTEM_YMZ280B, | 
					
						
							| 
									
										
										
										
											2022-05-20 03:43:39 -04:00
										 |  |  |   DIV_SYSTEM_NAMCO, | 
					
						
							|  |  |  |   DIV_SYSTEM_NAMCO_15XX, | 
					
						
							|  |  |  |   DIV_SYSTEM_NAMCO_CUS30, | 
					
						
							| 
									
										
										
										
											2022-12-20 17:55:05 -05:00
										 |  |  |   DIV_SYSTEM_YM2612_DUALPCM, | 
					
						
							|  |  |  |   DIV_SYSTEM_YM2612_DUALPCM_EXT, | 
					
						
							| 
									
										
										
										
											2022-10-01 00:22:26 -04:00
										 |  |  |   DIV_SYSTEM_MSM5232, | 
					
						
							| 
									
										
										
										
											2022-07-01 21:19:25 -04:00
										 |  |  |   DIV_SYSTEM_T6W28, | 
					
						
							| 
									
										
										
										
											2022-12-08 00:18:22 -05:00
										 |  |  |   DIV_SYSTEM_K007232, | 
					
						
							| 
									
										
										
										
											2022-12-15 00:47:46 -05:00
										 |  |  |   DIV_SYSTEM_GA20, | 
					
						
							| 
									
										
										
										
											2022-07-01 21:19:25 -04:00
										 |  |  |   DIV_SYSTEM_PCM_DAC, | 
					
						
							| 
									
										
										
										
											2022-10-24 04:19:42 -04:00
										 |  |  |   DIV_SYSTEM_PONG, | 
					
						
							| 
									
										
										
										
											2022-12-20 17:40:45 -05:00
										 |  |  |   DIV_SYSTEM_DUMMY, | 
					
						
							| 
									
										
										
										
											2022-12-20 17:55:05 -05:00
										 |  |  |   DIV_SYSTEM_YM2612_CSM, | 
					
						
							| 
									
										
										
										
											2022-12-20 17:40:45 -05:00
										 |  |  |   DIV_SYSTEM_YM2610_CSM, | 
					
						
							|  |  |  |   DIV_SYSTEM_YM2610B_CSM, | 
					
						
							| 
									
										
										
										
											2022-12-20 17:49:53 -05:00
										 |  |  |   DIV_SYSTEM_YM2203_CSM, | 
					
						
							| 
									
										
										
										
											2023-02-11 07:37:11 -05:00
										 |  |  |   DIV_SYSTEM_YM2608_CSM, | 
					
						
							| 
									
										
										
										
											2023-03-05 00:01:44 -05:00
										 |  |  |   DIV_SYSTEM_SM8521, | 
					
						
							| 
									
										
										
										
											2023-04-02 01:32:47 -04:00
										 |  |  |   DIV_SYSTEM_PV1000, | 
					
						
							| 
									
										
										
										
											2023-07-23 05:42:38 -04:00
										 |  |  |   DIV_SYSTEM_K053260, | 
					
						
							| 
									
										
										
										
											2023-08-09 07:30:00 -04:00
										 |  |  |   DIV_SYSTEM_TED, | 
					
						
							| 
									
										
										
										
											2023-08-27 19:46:10 -04:00
										 |  |  |   DIV_SYSTEM_C140, | 
					
						
							|  |  |  |   DIV_SYSTEM_C219 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-21 05:39:36 -04:00
										 |  |  | enum DivEffectType: unsigned short { | 
					
						
							|  |  |  |   DIV_EFFECT_NULL=0, | 
					
						
							|  |  |  |   DIV_EFFECT_DUMMY, | 
					
						
							|  |  |  |   DIV_EFFECT_EXTERNAL, | 
					
						
							|  |  |  |   DIV_EFFECT_VOLUME, | 
					
						
							|  |  |  |   DIV_EFFECT_FILTER | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-02-05 02:56:39 -05:00
										 |  |  | struct DivGroovePattern { | 
					
						
							|  |  |  |   unsigned char val[16]; | 
					
						
							|  |  |  |   unsigned char len; | 
					
						
							|  |  |  |   DivGroovePattern(): | 
					
						
							|  |  |  |     len(1) { | 
					
						
							|  |  |  |       memset(val,6,16); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-05-14 19:19:07 -04:00
										 |  |  | struct DivSubSong { | 
					
						
							|  |  |  |   String name, notes; | 
					
						
							|  |  |  |   unsigned char hilightA, hilightB; | 
					
						
							| 
									
										
										
										
											2023-02-05 02:56:39 -05:00
										 |  |  |   unsigned char timeBase, arpLen; | 
					
						
							|  |  |  |   DivGroovePattern speeds; | 
					
						
							| 
									
										
										
										
											2022-05-18 01:05:25 -04:00
										 |  |  |   short virtualTempoN, virtualTempoD; | 
					
						
							| 
									
										
										
										
											2022-05-14 19:19:07 -04:00
										 |  |  |   float hz; | 
					
						
							|  |  |  |   int patLen, ordersLen; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   DivOrders orders; | 
					
						
							|  |  |  |   DivChannelData pat[DIV_MAX_CHANS]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   bool chanShow[DIV_MAX_CHANS]; | 
					
						
							|  |  |  |   unsigned char chanCollapse[DIV_MAX_CHANS]; | 
					
						
							| 
									
										
										
										
											2022-05-15 02:42:49 -04:00
										 |  |  |   String chanName[DIV_MAX_CHANS]; | 
					
						
							|  |  |  |   String chanShortName[DIV_MAX_CHANS]; | 
					
						
							| 
									
										
										
										
											2022-05-14 19:19:07 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-05-15 02:42:49 -04:00
										 |  |  |   void clearData(); | 
					
						
							| 
									
										
										
										
											2022-08-16 04:19:16 -04:00
										 |  |  |   void optimizePatterns(); | 
					
						
							|  |  |  |   void rearrangePatterns(); | 
					
						
							| 
									
										
										
										
											2022-05-15 02:42:49 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  |   DivSubSong():  | 
					
						
							|  |  |  |     hilightA(4), | 
					
						
							|  |  |  |     hilightB(16), | 
					
						
							|  |  |  |     timeBase(0), | 
					
						
							|  |  |  |     arpLen(1), | 
					
						
							| 
									
										
										
										
											2022-05-18 01:05:25 -04:00
										 |  |  |     virtualTempoN(150), | 
					
						
							|  |  |  |     virtualTempoD(150), | 
					
						
							| 
									
										
										
										
											2022-05-15 02:42:49 -04:00
										 |  |  |     hz(60.0), | 
					
						
							|  |  |  |     patLen(64), | 
					
						
							|  |  |  |     ordersLen(1) { | 
					
						
							| 
									
										
										
										
											2022-05-14 19:19:07 -04:00
										 |  |  |     for (int i=0; i<DIV_MAX_CHANS; i++) { | 
					
						
							|  |  |  |       chanShow[i]=true; | 
					
						
							|  |  |  |       chanCollapse[i]=0; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-03-12 05:10:46 -04:00
										 |  |  | struct DivAssetDir { | 
					
						
							|  |  |  |   String name; | 
					
						
							|  |  |  |   std::vector<int> entries; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   DivAssetDir(): | 
					
						
							|  |  |  |     name("New Directory") {} | 
					
						
							|  |  |  |   DivAssetDir(String n): | 
					
						
							|  |  |  |     name(n) {} | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-21 05:39:36 -04:00
										 |  |  | struct DivEffectStorage { | 
					
						
							|  |  |  |   DivEffectType id; | 
					
						
							|  |  |  |   unsigned short slot, storageVer; | 
					
						
							|  |  |  |   float dryWet; | 
					
						
							|  |  |  |   unsigned char* storage; | 
					
						
							|  |  |  |   size_t storageLen; | 
					
						
							|  |  |  |   DivEffectStorage(): | 
					
						
							|  |  |  |     id(DIV_EFFECT_NULL), | 
					
						
							|  |  |  |     slot(0), | 
					
						
							|  |  |  |     storageVer(0), | 
					
						
							|  |  |  |     dryWet(1.0f), | 
					
						
							|  |  |  |     storage(NULL), | 
					
						
							|  |  |  |     storageLen(0) {} | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  | struct DivSong { | 
					
						
							|  |  |  |   // version number used for saving the song.
 | 
					
						
							| 
									
										
										
										
											2021-05-13 04:22:57 -04:00
										 |  |  |   // Furnace will save using the latest possible version,
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  |   // known version numbers:
 | 
					
						
							| 
									
										
										
										
											2022-04-07 21:13:11 -04:00
										 |  |  |   // - 26: v1.1.3
 | 
					
						
							|  |  |  |   //   - changes height of FDS wave to 6-bit (it was 4-bit before)
 | 
					
						
							| 
									
										
										
										
											2022-02-19 02:52:53 -05:00
										 |  |  |   // - 25: v1.1
 | 
					
						
							|  |  |  |   //   - adds pattern names (in a rather odd way)
 | 
					
						
							|  |  |  |   //   - introduces SMS+OPLL system
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  |   // - 24: v0.12/0.13/1.0
 | 
					
						
							|  |  |  |   //   - current format version
 | 
					
						
							|  |  |  |   //   - changes pattern length from char to int, probably to allow for size 256
 | 
					
						
							|  |  |  |   // - 23: ???
 | 
					
						
							| 
									
										
										
										
											2021-12-04 02:34:13 -05:00
										 |  |  |   //   - what happened here?
 | 
					
						
							| 
									
										
										
										
											2021-12-18 01:09:43 -05:00
										 |  |  |   // - 20: v11.1 (?)
 | 
					
						
							|  |  |  |   //   - E5xx effect range is now ±1 semitone
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  |   // - 19: v11
 | 
					
						
							|  |  |  |   //   - introduces Arcade system
 | 
					
						
							|  |  |  |   //   - changes to the FM instrument format due to YMU759 being dropped
 | 
					
						
							|  |  |  |   // - 18: v10
 | 
					
						
							|  |  |  |   //   - radically changes STD instrument for Game Boy
 | 
					
						
							|  |  |  |   // - 17: v9
 | 
					
						
							|  |  |  |   //   - changes C64 volIsCutoff flag from int to char for unknown reasons
 | 
					
						
							|  |  |  |   // - 16: v8 (?)
 | 
					
						
							|  |  |  |   //   - introduces C64 system
 | 
					
						
							|  |  |  |   // - 15: v7 (?)
 | 
					
						
							|  |  |  |   // - 14: v6 (?)
 | 
					
						
							|  |  |  |   //   - introduces NES system
 | 
					
						
							|  |  |  |   //   - changes macro and wave values from char to int
 | 
					
						
							|  |  |  |   // - 13: v5.1
 | 
					
						
							|  |  |  |   //   - introduces PC Engine system in later version (how?)
 | 
					
						
							|  |  |  |   //   - stores highlight in file
 | 
					
						
							|  |  |  |   // - 12: v5 (?)
 | 
					
						
							|  |  |  |   //   - introduces Game Boy system
 | 
					
						
							|  |  |  |   //   - introduces wavetables
 | 
					
						
							|  |  |  |   // - 11: ???
 | 
					
						
							|  |  |  |   //   - introduces Sega Master System
 | 
					
						
							|  |  |  |   //   - custom Hz support
 | 
					
						
							|  |  |  |   //   - instrument type (FM/STD) present
 | 
					
						
							|  |  |  |   //   - prior to this version the instrument type depended on the system
 | 
					
						
							|  |  |  |   // - 10: ???
 | 
					
						
							|  |  |  |   //   - introduces multiple effect columns
 | 
					
						
							|  |  |  |   // - 9: v3.9
 | 
					
						
							|  |  |  |   //   - introduces Genesis system
 | 
					
						
							|  |  |  |   //   - introduces system number
 | 
					
						
							| 
									
										
										
										
											2022-04-10 03:11:36 -04:00
										 |  |  |   //   - patterns now stored in current known format
 | 
					
						
							| 
									
										
										
										
											2022-05-14 19:19:07 -04:00
										 |  |  |   // - 8: ???
 | 
					
						
							|  |  |  |   //   - only used in the Medivo YMU cover
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  |   // - 7: ???
 | 
					
						
							| 
									
										
										
										
											2022-05-14 19:19:07 -04:00
										 |  |  |   //   - only present in a later version of First.dmf
 | 
					
						
							|  |  |  |   //   - pattern format changes: empty field is 0xFF instead of 0x80
 | 
					
						
							|  |  |  |   //   - instrument now stored in pattern
 | 
					
						
							| 
									
										
										
										
											2022-04-10 03:11:36 -04:00
										 |  |  |   // - 5: BETA 3
 | 
					
						
							| 
									
										
										
										
											2021-05-12 18:19:18 -04:00
										 |  |  |   //   - adds arpeggio tick
 | 
					
						
							| 
									
										
										
										
											2022-04-10 03:11:36 -04:00
										 |  |  |   // - 4: BETA 2
 | 
					
						
							| 
									
										
										
										
											2022-05-14 19:19:07 -04:00
										 |  |  |   //   - possibly adds instrument number (stored in channel)?
 | 
					
						
							|  |  |  |   //   - cannot confirm as I don't have any version 4 modules
 | 
					
						
							| 
									
										
										
										
											2022-04-10 03:11:36 -04:00
										 |  |  |   // - 3: BETA 1
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  |   //   - possibly the first version that could save
 | 
					
						
							|  |  |  |   //   - basic format, no system number, 16 instruments, one speed, YMU759-only
 | 
					
						
							| 
									
										
										
										
											2022-05-14 19:19:07 -04:00
										 |  |  |   //   - patterns were stored in a different format (chars instead of shorts) and no instrument
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  |   //   - if somebody manages to find a version 2 or even 1 module, please tell me as it will be worth more than a luxury vehicle
 | 
					
						
							| 
									
										
										
										
											2022-01-22 00:14:48 -05:00
										 |  |  |   unsigned short version; | 
					
						
							| 
									
										
										
										
											2022-02-20 03:18:20 -05:00
										 |  |  |   bool isDMF; | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  |   // system
 | 
					
						
							| 
									
										
										
										
											2022-12-09 00:30:27 -05:00
										 |  |  |   DivSystem system[DIV_MAX_CHIPS]; | 
					
						
							| 
									
										
										
										
											2022-01-08 03:02:04 -05:00
										 |  |  |   unsigned char systemLen; | 
					
						
							| 
									
										
										
										
											2023-01-06 17:43:08 -05:00
										 |  |  |   float systemVol[DIV_MAX_CHIPS]; | 
					
						
							|  |  |  |   float systemPan[DIV_MAX_CHIPS]; | 
					
						
							|  |  |  |   float systemPanFR[DIV_MAX_CHIPS]; | 
					
						
							| 
									
										
										
										
											2022-12-09 00:30:27 -05:00
										 |  |  |   DivConfig systemFlags[DIV_MAX_CHIPS]; | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  |   // song information
 | 
					
						
							| 
									
										
										
										
											2022-07-23 18:02:03 -04:00
										 |  |  |   String name, author, systemName; | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  |   // legacy song information
 | 
					
						
							| 
									
										
										
										
											2022-04-12 16:39:01 -04:00
										 |  |  |   // those will be stored in .fur and mapped to VGM as:
 | 
					
						
							|  |  |  |   // category -> game name
 | 
					
						
							|  |  |  |   // writer -> ripper
 | 
					
						
							|  |  |  |   // createdDate -> year
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  |   String carrier, composer, vendor, category, writer, arranger, copyright, manGroup, manInfo, createdDate, revisionDate; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-04-12 16:39:01 -04:00
										 |  |  |   // more VGM specific stuff
 | 
					
						
							| 
									
										
										
										
											2022-07-23 18:02:03 -04:00
										 |  |  |   String nameJ, authorJ, categoryJ, systemNameJ; | 
					
						
							| 
									
										
										
										
											2022-04-12 16:39:01 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-05 01:48:35 -05:00
										 |  |  |   // other things
 | 
					
						
							|  |  |  |   String notes; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  |   // module details
 | 
					
						
							| 
									
										
										
										
											2022-05-15 02:42:49 -04:00
										 |  |  |   int insLen, waveLen, sampleLen; | 
					
						
							| 
									
										
										
										
											2022-02-24 17:56:19 -05:00
										 |  |  |   float masterVol; | 
					
						
							| 
									
										
										
										
											2022-01-28 00:55:51 -05:00
										 |  |  |   float tuning; | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-01-22 15:30:23 -05:00
										 |  |  |   // compatibility flags
 | 
					
						
							| 
									
										
										
										
											2022-02-08 15:32:10 -05:00
										 |  |  |   bool limitSlides; | 
					
						
							| 
									
										
										
										
											2022-05-10 04:51:18 -04:00
										 |  |  |   // linear pitch
 | 
					
						
							|  |  |  |   // 0: not linear
 | 
					
						
							|  |  |  |   // 1: only pitch changes (04xy/E5xx) linear
 | 
					
						
							|  |  |  |   // 2: full linear
 | 
					
						
							|  |  |  |   unsigned char linearPitch; | 
					
						
							|  |  |  |   unsigned char pitchSlideSpeed; | 
					
						
							| 
									
										
										
										
											2022-02-03 00:34:48 -05:00
										 |  |  |   // loop behavior
 | 
					
						
							|  |  |  |   // 0: reset on loop
 | 
					
						
							|  |  |  |   // 1: fake reset on loop
 | 
					
						
							|  |  |  |   // 2: don't do anything on loop
 | 
					
						
							|  |  |  |   unsigned char loopModality; | 
					
						
							| 
									
										
										
										
											2022-08-22 00:56:58 -04:00
										 |  |  |   // cut/delay effect behavior
 | 
					
						
							|  |  |  |   // 0: strict (don't allow value higher than or equal to speed)
 | 
					
						
							|  |  |  |   // 1: broken (don't allow value higher than speed)
 | 
					
						
							|  |  |  |   // 2: lax (allow value higher than speed)
 | 
					
						
							|  |  |  |   unsigned char delayBehavior; | 
					
						
							| 
									
										
										
										
											2022-09-10 02:39:42 -04:00
										 |  |  |   // 0B/0D treatment
 | 
					
						
							|  |  |  |   // 0: normal (0B/0D accepted)
 | 
					
						
							|  |  |  |   // 1: old Furnace (first one accepted)
 | 
					
						
							|  |  |  |   // 2: DefleMask (0D takes priority over 0B)
 | 
					
						
							|  |  |  |   unsigned char jumpTreatment; | 
					
						
							| 
									
										
										
										
											2022-02-06 01:56:50 -05:00
										 |  |  |   bool properNoiseLayout; | 
					
						
							|  |  |  |   bool waveDutyIsVol; | 
					
						
							| 
									
										
										
										
											2022-02-08 15:32:10 -05:00
										 |  |  |   bool resetMacroOnPorta; | 
					
						
							|  |  |  |   bool legacyVolumeSlides; | 
					
						
							|  |  |  |   bool compatibleArpeggio; | 
					
						
							|  |  |  |   bool noteOffResetsSlides; | 
					
						
							|  |  |  |   bool targetResetsSlides; | 
					
						
							| 
									
										
										
										
											2022-02-09 22:07:32 -05:00
										 |  |  |   bool arpNonPorta; | 
					
						
							|  |  |  |   bool algMacroBehavior; | 
					
						
							| 
									
										
										
										
											2022-02-18 01:27:26 -05:00
										 |  |  |   bool brokenShortcutSlides; | 
					
						
							| 
									
										
										
										
											2022-02-18 02:03:31 -05:00
										 |  |  |   bool ignoreDuplicateSlides; | 
					
						
							| 
									
										
										
										
											2022-03-03 23:14:38 -05:00
										 |  |  |   bool stopPortaOnNoteOff; | 
					
						
							|  |  |  |   bool continuousVibrato; | 
					
						
							| 
									
										
										
										
											2022-03-11 22:11:33 -05:00
										 |  |  |   bool brokenDACMode; | 
					
						
							| 
									
										
										
										
											2022-03-11 23:01:18 -05:00
										 |  |  |   bool oneTickCut; | 
					
						
							| 
									
										
										
										
											2022-03-14 02:23:31 -04:00
										 |  |  |   bool newInsTriggersInPorta; | 
					
						
							| 
									
										
										
										
											2022-03-17 17:37:49 -04:00
										 |  |  |   bool arp0Reset; | 
					
						
							| 
									
										
										
										
											2022-03-23 02:35:57 -04:00
										 |  |  |   bool brokenSpeedSel; | 
					
						
							| 
									
										
										
										
											2022-03-24 00:56:59 -04:00
										 |  |  |   bool noSlidesOnFirstTick; | 
					
						
							|  |  |  |   bool rowResetsArpPos; | 
					
						
							|  |  |  |   bool ignoreJumpAtEnd; | 
					
						
							| 
									
										
										
										
											2022-03-26 23:15:15 -04:00
										 |  |  |   bool buggyPortaAfterSlide; | 
					
						
							|  |  |  |   bool gbInsAffectsEnvelope; | 
					
						
							| 
									
										
										
										
											2022-04-07 02:14:34 -04:00
										 |  |  |   bool sharedExtStat; | 
					
						
							| 
									
										
										
										
											2022-04-13 01:34:00 -04:00
										 |  |  |   bool ignoreDACModeOutsideIntendedChannel; | 
					
						
							|  |  |  |   bool e1e2AlsoTakePriority; | 
					
						
							| 
									
										
										
										
											2022-04-18 01:52:29 -04:00
										 |  |  |   bool newSegaPCM; | 
					
						
							| 
									
										
										
										
											2022-04-24 15:40:07 -04:00
										 |  |  |   bool fbPortaPause; | 
					
						
							| 
									
										
										
										
											2022-04-24 19:12:18 -04:00
										 |  |  |   bool snDutyReset; | 
					
						
							| 
									
										
										
										
											2022-04-28 01:26:21 -04:00
										 |  |  |   bool pitchMacroIsLinear; | 
					
						
							| 
									
										
										
										
											2022-05-22 14:25:59 -04:00
										 |  |  |   bool oldOctaveBoundary; | 
					
						
							| 
									
										
										
										
											2022-05-27 05:02:53 -04:00
										 |  |  |   bool noOPN2Vol; | 
					
						
							| 
									
										
										
										
											2022-05-27 06:13:10 -04:00
										 |  |  |   bool newVolumeScaling; | 
					
						
							|  |  |  |   bool volMacroLinger; | 
					
						
							|  |  |  |   bool brokenOutVol; | 
					
						
							| 
									
										
										
										
											2022-10-08 01:53:01 -04:00
										 |  |  |   bool brokenOutVol2; | 
					
						
							| 
									
										
										
										
											2022-06-29 05:57:05 -04:00
										 |  |  |   bool e1e2StopOnSameNote; | 
					
						
							| 
									
										
										
										
											2022-07-04 02:43:59 -04:00
										 |  |  |   bool brokenPortaArp; | 
					
						
							| 
									
										
										
										
											2022-08-19 19:46:19 -04:00
										 |  |  |   bool snNoLowPeriods; | 
					
						
							| 
									
										
										
										
											2022-09-23 20:18:32 -04:00
										 |  |  |   bool disableSampleMacro; | 
					
						
							| 
									
										
										
										
											2022-09-21 20:27:42 -04:00
										 |  |  |   bool autoSystem; | 
					
						
							| 
									
										
										
										
											2022-12-17 01:21:08 -05:00
										 |  |  |   bool oldArpStrategy; | 
					
						
							| 
									
										
										
										
											2023-01-10 15:58:15 -05:00
										 |  |  |   bool patchbayAuto; | 
					
						
							| 
									
										
										
										
											2023-01-17 01:58:59 -05:00
										 |  |  |   bool brokenPortaLegato; | 
					
						
							| 
									
										
										
										
											2023-05-05 03:14:53 -04:00
										 |  |  |   bool brokenFMOff; | 
					
						
							| 
									
										
										
										
											2023-08-23 13:50:22 -04:00
										 |  |  |   bool preNoteNoEffect; | 
					
						
							| 
									
										
										
										
											2022-01-22 15:30:23 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  |   std::vector<DivInstrument*> ins; | 
					
						
							|  |  |  |   std::vector<DivWavetable*> wave; | 
					
						
							|  |  |  |   std::vector<DivSample*> sample; | 
					
						
							| 
									
										
										
										
											2021-05-16 21:49:54 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-05-15 02:42:49 -04:00
										 |  |  |   std::vector<DivSubSong*> subsong; | 
					
						
							| 
									
										
										
										
											2023-01-06 17:43:08 -05:00
										 |  |  |   std::vector<unsigned int> patchbay; | 
					
						
							| 
									
										
										
										
											2023-02-05 02:56:39 -05:00
										 |  |  |   std::vector<DivGroovePattern> grooves; | 
					
						
							| 
									
										
										
										
											2022-02-05 01:48:35 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-03-12 05:10:46 -04:00
										 |  |  |   std::vector<DivAssetDir> insDir; | 
					
						
							|  |  |  |   std::vector<DivAssetDir> waveDir; | 
					
						
							|  |  |  |   std::vector<DivAssetDir> sampleDir; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-21 05:39:36 -04:00
										 |  |  |   std::vector<DivEffectStorage> effects; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-05-30 19:37:07 -04:00
										 |  |  |   DivInstrument nullIns, nullInsOPLL, nullInsOPL, nullInsOPLDrums, nullInsQSound; | 
					
						
							| 
									
										
										
										
											2021-05-27 14:30:37 -04:00
										 |  |  |   DivWavetable nullWave; | 
					
						
							| 
									
										
										
										
											2022-02-24 22:52:20 -05:00
										 |  |  |   DivSample nullSample; | 
					
						
							| 
									
										
										
										
											2021-05-28 03:02:54 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-04-24 18:39:18 -04:00
										 |  |  |   /**
 | 
					
						
							|  |  |  |    * clear orders and patterns. | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  |   void clearSongData(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /**
 | 
					
						
							|  |  |  |    * clear instruments. | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  |   void clearInstruments(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /**
 | 
					
						
							|  |  |  |    * clear wavetables. | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  |   void clearWavetables(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /**
 | 
					
						
							|  |  |  |    * clear samples. | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  |   void clearSamples(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-03-15 23:05:55 -04:00
										 |  |  |   /**
 | 
					
						
							|  |  |  |    * unloads the song, freeing all memory associated with it. | 
					
						
							|  |  |  |    * use before destroying the object. | 
					
						
							|  |  |  |    */ | 
					
						
							| 
									
										
										
										
											2021-12-15 14:15:44 -05:00
										 |  |  |   void unload(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-28 03:02:54 -04:00
										 |  |  |   DivSong(): | 
					
						
							| 
									
										
										
										
											2022-02-20 03:18:20 -05:00
										 |  |  |     version(0), | 
					
						
							|  |  |  |     isDMF(false), | 
					
						
							| 
									
										
										
										
											2022-02-23 02:52:30 -05:00
										 |  |  |     systemLen(2), | 
					
						
							| 
									
										
										
										
											2021-05-28 03:02:54 -04:00
										 |  |  |     name(""), | 
					
						
							|  |  |  |     author(""), | 
					
						
							| 
									
										
										
										
											2022-07-23 18:02:03 -04:00
										 |  |  |     systemName(""), | 
					
						
							| 
									
										
										
										
											2021-05-28 03:02:54 -04:00
										 |  |  |     carrier(""), | 
					
						
							|  |  |  |     composer(""), | 
					
						
							|  |  |  |     vendor(""), | 
					
						
							|  |  |  |     category(""), | 
					
						
							|  |  |  |     writer(""), | 
					
						
							|  |  |  |     arranger(""), | 
					
						
							|  |  |  |     copyright(""), | 
					
						
							|  |  |  |     manGroup(""), | 
					
						
							|  |  |  |     manInfo(""), | 
					
						
							|  |  |  |     createdDate(""), | 
					
						
							|  |  |  |     revisionDate(""), | 
					
						
							|  |  |  |     insLen(0), | 
					
						
							|  |  |  |     waveLen(0), | 
					
						
							| 
									
										
										
										
											2022-01-22 15:30:23 -05:00
										 |  |  |     sampleLen(0), | 
					
						
							| 
									
										
										
										
											2022-02-24 17:56:19 -05:00
										 |  |  |     masterVol(1.0f), | 
					
						
							| 
									
										
										
										
											2022-01-28 00:55:51 -05:00
										 |  |  |     tuning(440.0f), | 
					
						
							| 
									
										
										
										
											2022-02-03 00:34:48 -05:00
										 |  |  |     limitSlides(false), | 
					
						
							| 
									
										
										
										
											2022-05-11 01:51:53 -04:00
										 |  |  |     linearPitch(2), | 
					
						
							| 
									
										
										
										
											2022-05-10 04:51:18 -04:00
										 |  |  |     pitchSlideSpeed(4), | 
					
						
							| 
									
										
										
										
											2022-08-25 17:06:10 -04:00
										 |  |  |     loopModality(2), | 
					
						
							| 
									
										
										
										
											2022-08-22 00:56:58 -04:00
										 |  |  |     delayBehavior(2), | 
					
						
							| 
									
										
										
										
											2022-09-10 02:39:42 -04:00
										 |  |  |     jumpTreatment(0), | 
					
						
							| 
									
										
										
										
											2022-08-11 03:05:05 -04:00
										 |  |  |     properNoiseLayout(true), | 
					
						
							| 
									
										
										
										
											2022-02-08 15:32:10 -05:00
										 |  |  |     waveDutyIsVol(false), | 
					
						
							|  |  |  |     resetMacroOnPorta(false), | 
					
						
							|  |  |  |     legacyVolumeSlides(false), | 
					
						
							|  |  |  |     compatibleArpeggio(false), | 
					
						
							|  |  |  |     noteOffResetsSlides(true), | 
					
						
							| 
									
										
										
										
											2022-02-09 22:07:32 -05:00
										 |  |  |     targetResetsSlides(true), | 
					
						
							|  |  |  |     arpNonPorta(false), | 
					
						
							| 
									
										
										
										
											2022-02-18 01:27:26 -05:00
										 |  |  |     algMacroBehavior(false), | 
					
						
							| 
									
										
										
										
											2022-02-18 02:03:31 -05:00
										 |  |  |     brokenShortcutSlides(false), | 
					
						
							| 
									
										
										
										
											2022-03-03 23:14:38 -05:00
										 |  |  |     ignoreDuplicateSlides(false), | 
					
						
							|  |  |  |     stopPortaOnNoteOff(false), | 
					
						
							| 
									
										
										
										
											2022-03-11 22:11:33 -05:00
										 |  |  |     continuousVibrato(false), | 
					
						
							| 
									
										
										
										
											2022-03-11 23:01:18 -05:00
										 |  |  |     brokenDACMode(false), | 
					
						
							| 
									
										
										
										
											2022-03-14 02:23:31 -04:00
										 |  |  |     oneTickCut(false), | 
					
						
							| 
									
										
										
										
											2022-03-17 17:37:49 -04:00
										 |  |  |     newInsTriggersInPorta(true), | 
					
						
							| 
									
										
										
										
											2022-03-23 02:35:57 -04:00
										 |  |  |     arp0Reset(true), | 
					
						
							| 
									
										
										
										
											2022-03-24 00:56:59 -04:00
										 |  |  |     brokenSpeedSel(false), | 
					
						
							|  |  |  |     noSlidesOnFirstTick(false), | 
					
						
							|  |  |  |     rowResetsArpPos(false), | 
					
						
							| 
									
										
										
										
											2022-03-26 23:15:15 -04:00
										 |  |  |     ignoreJumpAtEnd(false), | 
					
						
							|  |  |  |     buggyPortaAfterSlide(false), | 
					
						
							| 
									
										
										
										
											2022-04-07 02:14:34 -04:00
										 |  |  |     gbInsAffectsEnvelope(true), | 
					
						
							| 
									
										
										
										
											2022-04-13 01:34:00 -04:00
										 |  |  |     sharedExtStat(true), | 
					
						
							|  |  |  |     ignoreDACModeOutsideIntendedChannel(false), | 
					
						
							| 
									
										
										
										
											2022-04-18 01:52:29 -04:00
										 |  |  |     e1e2AlsoTakePriority(false), | 
					
						
							| 
									
										
										
										
											2022-04-24 15:40:07 -04:00
										 |  |  |     newSegaPCM(true), | 
					
						
							| 
									
										
										
										
											2022-04-24 19:12:18 -04:00
										 |  |  |     fbPortaPause(false), | 
					
						
							| 
									
										
										
										
											2022-04-28 01:26:21 -04:00
										 |  |  |     snDutyReset(false), | 
					
						
							| 
									
										
										
										
											2022-05-22 14:25:59 -04:00
										 |  |  |     pitchMacroIsLinear(true), | 
					
						
							| 
									
										
										
										
											2022-05-27 05:02:53 -04:00
										 |  |  |     oldOctaveBoundary(false), | 
					
						
							| 
									
										
										
										
											2022-05-27 06:13:10 -04:00
										 |  |  |     noOPN2Vol(false), | 
					
						
							|  |  |  |     newVolumeScaling(true), | 
					
						
							|  |  |  |     volMacroLinger(true), | 
					
						
							| 
									
										
										
										
											2022-06-29 05:57:05 -04:00
										 |  |  |     brokenOutVol(false), | 
					
						
							| 
									
										
										
										
											2022-10-08 01:53:01 -04:00
										 |  |  |     brokenOutVol2(false), | 
					
						
							| 
									
										
										
										
											2022-07-04 02:43:59 -04:00
										 |  |  |     e1e2StopOnSameNote(false), | 
					
						
							| 
									
										
										
										
											2022-08-19 19:46:19 -04:00
										 |  |  |     brokenPortaArp(false), | 
					
						
							| 
									
										
										
										
											2022-09-21 20:27:42 -04:00
										 |  |  |     snNoLowPeriods(false), | 
					
						
							| 
									
										
										
										
											2022-09-25 00:16:47 -04:00
										 |  |  |     disableSampleMacro(false), | 
					
						
							| 
									
										
										
										
											2022-12-17 01:21:08 -05:00
										 |  |  |     autoSystem(true), | 
					
						
							| 
									
										
										
										
											2023-01-10 15:58:15 -05:00
										 |  |  |     oldArpStrategy(false), | 
					
						
							| 
									
										
										
										
											2023-01-17 01:58:59 -05:00
										 |  |  |     patchbayAuto(true), | 
					
						
							| 
									
										
										
										
											2023-05-05 03:14:53 -04:00
										 |  |  |     brokenPortaLegato(false), | 
					
						
							| 
									
										
										
										
											2023-08-23 13:50:22 -04:00
										 |  |  |     brokenFMOff(false), | 
					
						
							|  |  |  |     preNoteNoEffect(false) { | 
					
						
							| 
									
										
										
										
											2022-12-09 00:30:27 -05:00
										 |  |  |     for (int i=0; i<DIV_MAX_CHIPS; i++) { | 
					
						
							| 
									
										
										
										
											2022-01-08 03:02:04 -05:00
										 |  |  |       system[i]=DIV_SYSTEM_NULL; | 
					
						
							| 
									
										
										
										
											2023-01-06 17:43:08 -05:00
										 |  |  |       systemVol[i]=1.0; | 
					
						
							|  |  |  |       systemPan[i]=0.0; | 
					
						
							|  |  |  |       systemPanFR[i]=0.0; | 
					
						
							| 
									
										
										
										
											2022-01-08 03:02:04 -05:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2022-05-15 02:42:49 -04:00
										 |  |  |     subsong.push_back(new DivSubSong); | 
					
						
							| 
									
										
										
										
											2022-12-20 17:55:05 -05:00
										 |  |  |     system[0]=DIV_SYSTEM_YM2612; | 
					
						
							| 
									
										
										
										
											2022-02-23 02:52:30 -05:00
										 |  |  |     system[1]=DIV_SYSTEM_SMS; | 
					
						
							| 
									
										
										
										
											2022-04-21 03:24:06 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-05-04 19:20:15 -04:00
										 |  |  |     // OPLL default instrument contest winner - piano_guitar_idk by Weeppiko
 | 
					
						
							| 
									
										
										
										
											2022-05-31 18:44:52 -04:00
										 |  |  |     nullInsOPLL.type=DIV_INS_OPLL; | 
					
						
							| 
									
										
										
										
											2022-05-02 15:51:06 -04:00
										 |  |  |     nullInsOPLL.fm.opllPreset=0; | 
					
						
							| 
									
										
										
										
											2022-05-04 19:20:15 -04:00
										 |  |  |     nullInsOPLL.fm.alg=0; | 
					
						
							|  |  |  |     nullInsOPLL.fm.fb=7; | 
					
						
							|  |  |  |     nullInsOPLL.fm.fms=1; | 
					
						
							|  |  |  |     nullInsOPLL.fm.ams=0; | 
					
						
							|  |  |  |     nullInsOPLL.fm.op[0].ar=15; | 
					
						
							|  |  |  |     nullInsOPLL.fm.op[0].dr=5; | 
					
						
							|  |  |  |     nullInsOPLL.fm.op[0].sl=3; | 
					
						
							|  |  |  |     nullInsOPLL.fm.op[0].rr=3; | 
					
						
							|  |  |  |     nullInsOPLL.fm.op[0].tl=40; | 
					
						
							|  |  |  |     nullInsOPLL.fm.op[0].ksl=0; | 
					
						
							|  |  |  |     nullInsOPLL.fm.op[0].mult=5; | 
					
						
							|  |  |  |     nullInsOPLL.fm.op[0].am=0; | 
					
						
							|  |  |  |     nullInsOPLL.fm.op[0].vib=1; | 
					
						
							|  |  |  |     nullInsOPLL.fm.op[0].ksr=0; | 
					
						
							|  |  |  |     nullInsOPLL.fm.op[0].ssgEnv=8; | 
					
						
							|  |  |  |     nullInsOPLL.fm.op[1].ar=15; | 
					
						
							|  |  |  |     nullInsOPLL.fm.op[1].dr=1; | 
					
						
							|  |  |  |     nullInsOPLL.fm.op[1].sl=11; | 
					
						
							|  |  |  |     nullInsOPLL.fm.op[1].rr=6; | 
					
						
							| 
									
										
										
										
											2022-04-21 03:24:06 -04:00
										 |  |  |     nullInsOPLL.fm.op[1].tl=0; | 
					
						
							| 
									
										
										
										
											2022-05-04 19:20:15 -04:00
										 |  |  |     nullInsOPLL.fm.op[1].ksl=0; | 
					
						
							|  |  |  |     nullInsOPLL.fm.op[1].mult=1; | 
					
						
							|  |  |  |     nullInsOPLL.fm.op[1].am=0; | 
					
						
							|  |  |  |     nullInsOPLL.fm.op[1].vib=0; | 
					
						
							|  |  |  |     nullInsOPLL.fm.op[1].ksr=0; | 
					
						
							|  |  |  |     nullInsOPLL.fm.op[1].ssgEnv=8; | 
					
						
							| 
									
										
										
										
											2022-04-21 03:29:20 -04:00
										 |  |  |     nullInsOPLL.name="This is a bug! Report!"; | 
					
						
							| 
									
										
										
										
											2022-04-21 03:24:06 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-05-31 18:44:52 -04:00
										 |  |  |     nullInsOPL.type=DIV_INS_OPL; | 
					
						
							| 
									
										
										
										
											2022-04-21 03:24:06 -04:00
										 |  |  |     nullInsOPL.fm.alg=0; | 
					
						
							|  |  |  |     nullInsOPL.fm.fb=7; | 
					
						
							|  |  |  |     nullInsOPL.fm.op[0].dr=2; | 
					
						
							|  |  |  |     nullInsOPL.fm.op[0].rr=7; | 
					
						
							|  |  |  |     nullInsOPL.fm.op[0].tl=22; | 
					
						
							|  |  |  |     nullInsOPL.fm.op[0].ksl=1; | 
					
						
							|  |  |  |     nullInsOPL.fm.op[0].mult=3; | 
					
						
							|  |  |  |     nullInsOPL.fm.op[1].tl=0; | 
					
						
							|  |  |  |     nullInsOPL.fm.op[1].dr=3; | 
					
						
							|  |  |  |     nullInsOPL.fm.op[1].rr=12; | 
					
						
							|  |  |  |     nullInsOPL.fm.op[1].mult=1; | 
					
						
							| 
									
										
										
										
											2022-04-21 03:29:20 -04:00
										 |  |  |     nullInsOPL.name="This is a bug! Report!"; | 
					
						
							| 
									
										
										
										
											2022-05-31 18:44:52 -04:00
										 |  |  |     nullInsOPL.fm.kickFreq=(1<<10)|576; | 
					
						
							|  |  |  |     nullInsOPL.fm.snareHatFreq=(1<<10)|672; | 
					
						
							|  |  |  |     nullInsOPL.fm.tomTopFreq=896; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     nullInsOPLDrums=nullInsOPL; | 
					
						
							|  |  |  |     nullInsOPLDrums.type=DIV_INS_OPL_DRUMS; | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.fixedDrums=true; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     for (int i=0; i<4; i++) { | 
					
						
							|  |  |  |       nullInsOPLDrums.fm.op[i].am=0; | 
					
						
							|  |  |  |       nullInsOPLDrums.fm.op[i].vib=0; | 
					
						
							|  |  |  |       nullInsOPLDrums.fm.op[i].ksr=0; | 
					
						
							|  |  |  |       nullInsOPLDrums.fm.op[i].sus=0; | 
					
						
							|  |  |  |       nullInsOPLDrums.fm.op[i].ws=0; | 
					
						
							|  |  |  |       nullInsOPLDrums.fm.op[i].ksl=0; | 
					
						
							|  |  |  |       nullInsOPLDrums.fm.op[i].tl=0; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // snare
 | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.op[0].ar=13; | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.op[0].dr=8; | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.op[0].sl=4; | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.op[0].rr=8; | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.op[0].mult=1; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // tom
 | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.op[1].ar=15; | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.op[1].dr=8; | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.op[1].sl=5; | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.op[1].rr=9; | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.op[1].mult=5; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // top
 | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.op[2].ar=10; | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.op[2].dr=10; | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.op[2].sl=5; | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.op[2].rr=5; | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.op[2].mult=1; | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.op[2].ksr=1; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // hi-hat
 | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.op[3].ar=12; | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.op[3].dr=8; | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.op[3].sl=10; | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.op[3].rr=7; | 
					
						
							|  |  |  |     nullInsOPLDrums.fm.op[3].mult=2; | 
					
						
							| 
									
										
										
										
											2022-04-29 00:58:11 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  |     nullInsQSound.std.panLMacro.mode=true; | 
					
						
							| 
									
										
										
										
											2021-05-28 03:02:54 -04:00
										 |  |  |   } | 
					
						
							| 
									
										
										
										
											2021-05-11 16:08:08 -04:00
										 |  |  | }; | 
					
						
							| 
									
										
										
										
											2022-01-27 00:29:16 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-02 15:29:20 -05:00
										 |  |  | #endif
 |