prepare for drum kits/sample map
This commit is contained in:
parent
73cf7cf161
commit
3163730fe8
5 changed files with 86 additions and 3 deletions
|
|
@ -378,6 +378,13 @@ void DivInstrument::putInsData(SafeWriter* w) {
|
|||
w->writeS(fm.kickFreq);
|
||||
w->writeS(fm.snareHatFreq);
|
||||
w->writeS(fm.tomTopFreq);
|
||||
|
||||
// sample map
|
||||
w->writeC(amiga.useNoteMap);
|
||||
if (amiga.useNoteMap) {
|
||||
w->write(amiga.noteFreq,120*sizeof(unsigned int));
|
||||
w->write(amiga.noteMap,120*sizeof(short));
|
||||
}
|
||||
}
|
||||
|
||||
DivDataErrors DivInstrument::readInsData(SafeReader& reader, short version) {
|
||||
|
|
@ -717,6 +724,15 @@ DivDataErrors DivInstrument::readInsData(SafeReader& reader, short version) {
|
|||
std.dutyMacroRel=-1;
|
||||
}
|
||||
|
||||
// sample map
|
||||
if (version>=67) {
|
||||
amiga.useNoteMap=reader.readC();
|
||||
if (amiga.useNoteMap) {
|
||||
reader.read(amiga.noteFreq,120*sizeof(unsigned int));
|
||||
reader.read(amiga.noteMap,120*sizeof(short));
|
||||
}
|
||||
}
|
||||
|
||||
return DIV_DATA_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue