"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "plugins/MidiExport/MidiExport.cpp" between
lmms-1.2.0-rc7.tar.gz and lmms-1.2.0-rc8.tar.gz

About: LMMS (Linux MultiMedia Studio) is a sound generation system (creation of melodies and beats, synthesis and mixing of sounds, arranging of samples; full MIDI support). Release candidate.

MidiExport.cpp  (lmms-1.2.0-rc7):MidiExport.cpp  (lmms-1.2.0-rc8)
skipping to change at line 266 skipping to change at line 266
int base_pitch, double base_volume, int base_time ) int base_pitch, double base_volume, int base_time )
{ {
// TODO interpret steps="12" muted="0" type="1" name="Piano1" len="2592" // TODO interpret steps="12" muted="0" type="1" name="Piano1" len="2592"
for (QDomNode nn = n.firstChild(); !nn.isNull(); nn = nn.nextSibling()) for (QDomNode nn = n.firstChild(); !nn.isNull(); nn = nn.nextSibling())
{ {
QDomElement note = nn.toElement(); QDomElement note = nn.toElement();
if (note.attribute("len", "0") == "0") continue; if (note.attribute("len", "0") == "0") continue;
// TODO interpret pan="0" fxch="0" pitchrange="1" // TODO interpret pan="0" fxch="0" pitchrange="1"
MidiNote mnote; MidiNote mnote;
mnote.pitch = qMax(0, qMin(127, note.attribute("key", "0").toInt( ) + base_pitch)); mnote.pitch = qMax(0, qMin(127, note.attribute("key", "0").toInt( ) + base_pitch));
mnote.volume = qMin(qRound(base_volume * LocaleHelper::toDouble(n // Map from LMMS volume to MIDI velocity
ote.attribute("vol", "100"))), 127); mnote.volume = qMin(qRound(base_volume * LocaleHelper::toDouble(n
ote.attribute("vol", "100")) * (127.0 / 200.0)), 127);
mnote.time = base_time + note.attribute("pos", "0").toInt(); mnote.time = base_time + note.attribute("pos", "0").toInt();
mnote.duration = note.attribute("len", "0").toInt(); mnote.duration = note.attribute("len", "0").toInt();
pat.push_back(mnote); pat.push_back(mnote);
} }
} }
void MidiExport::writePatternToTrack(MTrack &mtrack, MidiNoteVector &nv) void MidiExport::writePatternToTrack(MTrack &mtrack, MidiNoteVector &nv)
{ {
for (auto it = nv.begin(); it != nv.end(); ++it) for (auto it = nv.begin(); it != nv.end(); ++it)
{ {
 End of changes. 1 change blocks. 
2 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)