From ae1281c44c7d3558a04c73c8fbf8df1ae1291717 Mon Sep 17 00:00:00 2001 From: olpc user Date: Thu, 30 Sep 2010 02:04:50 +0000 Subject: Tweak amplitudes of sound files --- diff --git a/FileMix.csd b/FileMix.csd index 0103a3d..70f7081 100755 --- a/FileMix.csd +++ b/FileMix.csd @@ -99,14 +99,17 @@ ictrl3 = (iplace3 > 7? gictrl2 + iplace3 - 8: gictrl1 + iplace3) kres ctrl7 (gichan == 0? iplace3 + 1: gichan), (gichan == 0? 7: ictrl3), .25, .7 kres port kres, .01 kres = (giparm > 2? kres: .25) -a3,a4,a5 svfilter a1, kfreq, kres - if ichans == 1 goto skip6 -a6,a7,a8 svfilter a2, kfreq, kres +a3,a4,a5 svfilter a1, kfreq, kres, 1 + if ichans == 1 goto skip7 +a6,a7,a8 svfilter a2, kfreq, kres, 1 +skip7: + if giparm == 2 goto skip6 +kamp2 = kamp2 + (kamp2 * 3 * (kres - .25)) skip6: ifade = gifade - if gifade > 0 goto skip7 + if gifade > 0 goto skip8 ifade tab_i gifade + 3, 3 -skip7: +skip8: kamp3 linseg 0, ifade, 1, (iloop == 0? ilen - (ifade * 2) - istart: .01), 1, (iloop == 0? ifade: .01), (iloop == 0? 0: 1) kamp2 = kamp2 * kamp3 ga1 = ga1 + ((giparm == 1? a1: a5) * kamp2) diff --git a/FileMixASC.csd b/FileMixASC.csd index 3578936..f98cb56 100755 --- a/FileMixASC.csd +++ b/FileMixASC.csd @@ -302,18 +302,14 @@ ifile = p1 - 1 ichans filenchnls ifile ilen filelen ifile ipeak filepeak ifile -imult = 8190 / ipeak +imult = 32760 / gifile / ipeak kamp2 = kamp2 * imult irand unirand ilen * .75 - istart = (gistrt == 0? irand: 0) - kbase lineto k4, gktime kbase = (giparm == 4? kbase: 1) if (gidel == 1) && (gktrig == 0) goto end - iloop = (giloop == 1? 0: 1) - if ichans == 2 goto skip5 a1 diskin2 ifile, kbase, istart, iloop if giparm == 1 goto skip7 @@ -327,14 +323,17 @@ kfreq table kfreq, 2 kfreq port kfreq, .01 kres lineto k3, gktime kres = (giparm > 2? kres: .25) -a3,a4,a5 svfilter a1, kfreq, kres - if ichans == 1 goto skip7 -a6,a7,a8 svfilter a2, kfreq, kres +a3,a4,a5 svfilter a1, kfreq, kres, 1 + if ichans == 1 goto skip8 +a6,a7,a8 svfilter a2, kfreq, kres, 1 +skip8: + if giparm == 2 goto skip7 +kamp2 = kamp2 + (kamp2 * 3 * (kres - .25)) skip7: ifade = gifade - if gifade > 0 goto skip8 + if gifade > 0 goto skip10 ifade tab_i gifade + 3, 3 -skip8: +skip10: kamp3 linseg (gidel == 0? 1: 0), ifade, 1, (iloop == 0? ilen - (ifade * 2) - istart: .01), 1, (iloop == 0? ifade: .01), (iloop == 0? 0: 1) kamp2 = kamp2 * kamp3 if giparm > 1 goto skip9 diff --git a/activity/activity.info b/activity/activity.info index 8bdd416..6938985 100755 --- a/activity/activity.info +++ b/activity/activity.info @@ -5,7 +5,7 @@ name = FileMix bundle_id = org.laptop.FileMix icon = activity-filemix -activity_version = 1 +activity_version = 2 host_version = 1 diff --git a/filemix.py b/filemix.py index a4e683f..0a85087 100755 --- a/filemix.py +++ b/filemix.py @@ -11,7 +11,8 @@ # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# version 1 +# version 2 Changes: +# Tweak amplitudes of sound files. # # Notes: # @@ -101,7 +102,6 @@ class FileMix(activity.Activity): width = gtk.gdk.screen_width() height = gtk.gdk.screen_height() if os.path.exists("/etc/olpc-release") or os.path.exists("/sys/power/olpc-pm"): - tall = 1 adjust = 78 else: adjust = 57 -- cgit v0.9.1