Changeset e8975278 in mainline for uspace/lib/trackmod/trackmod.c
- Timestamp:
- 2018-05-10T15:14:02Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1420cae9
- Parents:
- ae7d03c
- git-author:
- Jiri Svoboda <jiri@…> (2018-05-10 07:53:56)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-05-10 15:14:02)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/trackmod/trackmod.c
rae7d03c re8975278 62 62 63 63 /** Table for finetune computation. 64 65 66 67 68 69 70 71 72 64 * 65 * Finetune is a number ft in [-8 .. 7]. The pitch should be adjusted by 66 * ft/8 semitones. To adjust pitch by 1/8 semitone down we can mutiply the 67 * period by 2^(1/12/8) =. 1.0072, one semitone up: 2^-(1/12/8) =. 0.9928, 68 * to adjust by ft/8 semitones, multiply by 2^(-ft/12/8). 69 * 70 * finetune_factor[ft] := 10000 * 2^(-ft/12/8) 71 * res_period = clip(period * fineture_factor[ft+8] / 10000) 72 */ 73 73 static unsigned finetune_factor[16] = { 74 74 10595, 10518, 10443, 10368, 10293, 10219, 10145, 10072, … … 731 731 } 732 732 733 /* if (np < period_min) 733 #if 0 734 /* XXX */ 735 if (np < period_min) 734 736 np = period_min; 735 737 if (np > period_max) 736 738 np = period_max; 737 */ 739 #endif 738 740 modplay->chan[i].period = np; 739 741 }
Note:
See TracChangeset
for help on using the changeset viewer.