summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fixing a bug: the accented beat of the metronome does not play reliably.Kaz Kylheku2013-09-171-27/+26
| | | | | | | | | | | | | | | | | | | | Steps to reproduce: - rewind the position - press record Sometimes, the accented beat is not heard. I suspected race conditions at first, so I restructured the order of operations in CSekaijuApp::StartRecording so that the MIDI clock is not started until the very end, when all the state variables have been assigned, like m_bPlaying and m_bRecording. I'm keeping these changes. But the real problem was in CSekaijuApp::PlayRecordProc, in the block of code that plays the metronome. There, the check "pSekaijuDoc->m_lOldTime == pSekaijuDoc->m_lNewTime" was causing the issue. Although StartRecording sets up this condition, there is no way for the truth of the condition to be maintained through to that block of code. The clock runs freely, and is periodically sampled by the thread whenever it wakes up from sleep. The condition is not necessary.
* This commit solves a remaining problem of events accidentally looping backKaz Kylheku2013-09-171-173/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | during recording when midi through is disabled in the binding array. The problem is caused by the fact that the real-time events are inserted into the tracks just at the start of the next clock period. When the next clock period comes, those events are played back! (This also causes a delay: since the looped notes will not play until the next clock advance!) To solve this problem we do two things: 1. Rearrange the processing so that playback, metronome generation et cetera are handled first in every processing period, and the real-time input is handled afterward. 2. Now that real-time inputs are handled after playback, we can simply insert them into the CURRENT time period. Since playback is already done for the current time period before, they will not be played. Referring new events into the current time period is done by subtracting one from the clock value. Sekaiju's logic for handling time periods is that each time period is an interval that excludes the current time: [old_time, new_time). So when an new event is inserted at new_time, it becomes part of the next period. By inserting an event at new_time - 1, we make it part of the current period. Hey, I wrote some comments in Japanese. :)
* SHIFT-JIS to UTF8 conversion.Kaz Kylheku2013-09-161-14/+14
|
* New feature: "MIDI thru" is implemented by bindings fromKaz Kylheku2013-09-167-28/+192
| | | | | | input ports to output ports which is user-configurable and stored in the .ini file. Tracks no longer perform "MIDI thru", but only capture and playback.
* Missing file added.Kaz Kylheku2013-09-151-0/+207
|
* Fix bug: some MIDI devices have spaces at the end of the name,Kaz Kylheku2013-09-151-4/+6
| | | | | | which must be preserved when we store such names in the .ini file. The .ini API will strip whitespace; but we can add quotes around a value to preserve it.
* Converted Sekaiju 3.6 to Visual Studio 2008.Kaz Kylheku2013-09-15179-0/+70661