Ticket #8637: softsynth.patch

File softsynth.patch, 3.9 KB (added by bluegr, 17 years ago)

Patch that removes non-english characters from comments in ym2612.cpp

  • ym2612.cpp

     
    9090        _specifiedSustainRate = instrument[24] & 31;
    9191        _specifiedSustainLevel = (instrument[28] >> 4) & 15;
    9292        _specifiedReleaseRate = instrument[28] & 15;
    93         _state = _s_ready; // ËÜʪ¤Ç¤Ï¤É¤¦¤Ê¤Î¤«¤Ê?
     93        _state = _s_ready;
    9494        velocity(_velocity);
    9595}
    9696
    9797void Operator2612::keyOn() {
    9898        _state = _s_attacking;
    9999        _tickCount = 0;
    100         _phase = 0;                     // ¤É¤¦¤â¡¢¼ÂºÝ¤³¤¦¤é¤·¤¤
    101         _currentLevel = ((int32)0x7f << 15); // ¤³¤ì¤â¡¢¼ÂºÝ¤³¤¦¤é¤·¤¤
     100        _phase = 0;                     
     101        _currentLevel = ((int32)0x7f << 15);
    102102}
    103103
    104104void Operator2612::keyOff() {
     
    116116        if (r != 0) {
    117117                r = r * 2 + (keyscaleTable[freq/262205] >> (3-_keyScale));
    118118                if (r >= 64)
    119                 r = 63; // ¤¹¤ë¤Ù¤­¤Ê¤ó¤À¤í¤¦¤È¤Ï»×¤¦¤ó¤À¤±¤É (ÀÖp.207)
     119                r = 63;
    120120        }
    121121
    122122        r = 63 - r;
     
    125125        else {
    126126                value = powtbl[(r&3) << 7];
    127127                value *= 1 << (r >> 2);
    128                 value *= 41; // r == 20 ¤Î¤È¤­¡¢0-96[db] ¤¬ 10.01[ms] == 41.00096
     128                value *= 41;
    129129                value /= 1 << (15 + 5);
    130130                value *= 127 - _specifiedTotalLevel;
    131131                value /= 127;
     
    156156        if (r != 0) {
    157157                r = r * 2 + 1;          // (Translated) I cannot know whether the timing is a good choice or not
    158158                r = r * 2 + (keyscaleTable[freq/262205] >> (3-_keyScale));
    159                 // KS ¤Ë¤è¤ëÊäÀµ¤Ï¤¢¤ë¤é¤·¤¤¡£ÀÖp.206 ¤Ç¤Ïµ­½Ò¤µ¤ì¤Æ¤Ê¤¤¤±¤É¡£
     159                // KS
    160160                if (r >= 64)
    161161                        r = 63;
    162162        }
     
    229229                        }
    230230
    231231                        if (level < zero_level) {
    232                                 int phaseShift = *phasebuf >> 2; // Àµ¤·¤¤ÊÑÄ´Î̤Ï?  3 ¤¸¤ã¾®¤µ¤¹¤®¤Ç 2 ¤¸¤ãÂ礭¤¤¤è¤¦¤Ê¡£
     232                                int phaseShift = *phasebuf >> 2;
    233233                                if (_feedbackLevel)
    234234                                        phaseShift += (output << (_feedbackLevel - 1)) / 1024;
    235235                                output = sintbl[((_phase >> 7) + phaseShift) & 0x7ff];
    236                                 output >>= (level >> 18);       // Àµ¤·¤¤¸º¿êÎ̤Ï?
     236                                output >>= (level >> 18);       
    237237                                // Here is the original code, which requires 64-bit ints
    238238//                              output *= powtbl[511 - ((level>>25)&511)];
    239239//                              output >>= 16;
     
    438438}
    439439
    440440void Voice2612::recalculateFrequency() {
    441         // MIDI ¤È¤â°ã¤¦¤·....
    442         // ¤É¤¦¤¤¤¦»ÅÍͤʤó¤À¤í¤¦¤«?
    443         // ¤È»×¤Ã¤¿¤é¡¢¤Ê¤ó¤È¡¢¤³¤ì (¢­) ¤¬Àµ²ò¤é¤·¤¤¡£
     441        //
     442        //
     443        //
    444444        int32 basefreq = frequencyTable[_note];
    445445        int cfreq = frequencyTable[_note - (_note % 12)];
    446446        int oct = _note / 12;
    447         int fnum = (int) (((double)basefreq * (1 << 13)) / cfreq); // OPL ¤Î fnum ¤ÈƱ¤¸¤è¤¦¤Ê¤â¤Î¡£
     447        int fnum = (int) (((double)basefreq * (1 << 13)) / cfreq);
    448448        fnum += _frequencyOffs - 0x2000;
    449449        if (fnum < 0x2000) {
    450450                fnum += 0x2000;
     
    455455                oct++;
    456456        }
    457457
    458         // _frequency ¤ÏºÇ½ªÅª¤Ë¥Ð¥¤¥¢¥¹ 256*1024 ÇÜ
     458        //
    459459        _frequency = (int) ((frequencyTable[oct*12] * (double)fnum) / 8);
    460460
    461461        int i;
     
    515515}
    516516
    517517void MidiChannel_YM2612::controlChange(byte control, byte value) {
    518         // ¤¤¤¤¤Î¤«¤³¤ì¤Ç?
     518        //
    519519        if (control == 121) {
    520520                // Reset controller
    521521                removeAllVoices();
     
    537537}
    538538
    539539void MidiChannel_YM2612::pitchBend(int16 value) {
    540   // ¤¤¤¤¤Î¤«¤³¤ì¤Ç?
     540  //
    541541        Voice2612 *voice = _voices;
    542542        for (; voice; voice = voice->next)
    543543                voice->pitchBend(value);
     
    696696                        0x03d5, 0x0410, 0x044e, 0x048f,
    697697                };
    698698
    699                 // (int)(880.0 * 256.0 * pow(2.0, (note-0x51)/12.0)); // ¥Ð¥¤¥¢¥¹ 256 ÇÜ
    700                 // 0x45 ¤¬ 440Hz (a4)¡¢0x51 ¤¬ 880Hz (a5) ¤é¤·¤¤
     699                // (int)(880.0 * 256.0 * pow(2.0, (note-0x51)/12.0))
     700                //
    701701                frequencyTable = new int [120];
    702702                for (block = -1; block < 9; block++) {
    703703                        for (i = 0; i < 12; i++) {
     
    707707                }
    708708
    709709                keycodeTable = new int [120];
    710                 // detune Î̤η׻»¤ä KS ¤Ë¤è¤ë rate ÊÑ´¹¤Ë»È¤¦¤ó¤¸¤ã¤Ê¤¤¤«¤Ê
     710                // detune
    711711                for (block = -1; block < 9; block++) {
    712712                        for (i = 0; i < 12; i++) {
    713713                                // see p.204
     
    730730                keyscaleTable[0] = 0;
    731731                for (freq = 1; freq < 8192; freq++) {
    732732                        keyscaleTable[freq] = (int)(log((double)freq) / 9.03 * 32.0) - 1;
    733                         // 8368[Hz] (o9c) ¤Ç 32¤¯¤é¤¤¡£9.03 =:= ln 8368
     733                        // 8368[Hz] (o9c)
    734734                }
    735735        }
    736736