Codebase list supercollider / a4ba7dc
Imported Upstream version 3.4.5 Dan Stowell 12 years ago
19 changed file(s) with 176 addition(s) and 97 deletion(s). Raw diff Collapse all Expand all
137137
138138 $ scons install
139139
140 any target (including `install') can be cleaned with the `-c' option
140 Any target (including `install') can be cleaned with the `-c' option
141141 to scons; note that cleaning the `install' target also removes locally
142142 built files.
143
144 Thus, to uninstall:
145
146 $ scons -c install
143147
144148 The option SCEL installs the emacs editor. For the sced and scvim editors,
145149 please use the scons scripts in their respective directories (in editors/).
0 3.4.4
1 classvar scVersionMajor=3, scVersionMinor=4, scVersionPostfix=".4";
0 3.4.5
1 classvar scVersionMajor=3, scVersionMinor=4, scVersionPostfix=".5";
2020 #ifndef _SC_Altivec_
2121 #define _SC_Altivec_
2222
23 #if defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__)
23 #if defined(HAS_ALTIVEC) || defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__)
2424 # include <altivec.h>
2525 /* From <altivec.h>:
2626 You are allowed to undef these for C++ compatibility. */
3333 typedef struct netaddr netaddr;
3434
3535
36 // ways to fail
37 #define BUFFEROVERFLOW return
38 //#define BUFFEROVERFLOW throw std::runtime_error("buffer overflow")
39
40
4136 template <int MaxPacketSize = 8192>
4237 struct scpacket {
4338 static const int kBufSize = MaxPacketSize / sizeof(int32); // round down
4540 char *tagwrpos;
4641 int inbundle;
4742 int32 buf[kBufSize];
43
44 void throw_overflow_exception()
45 {
46 throw std::runtime_error("buffer overflow");
47 }
4848
4949 scpacket() { reset(); }
5050 void reset()
5555 }
5656 void addi(int i)
5757 {
58 if (wrpos >= endpos) BUFFEROVERFLOW;
58 if (wrpos >= endpos) throw_overflow_exception();
5959 *wrpos++ = htonl(i);
6060 }
6161 void addii(int64 ii)
6868 }
6969 void addf(float f)
7070 {
71 if (wrpos >= endpos) BUFFEROVERFLOW;
71 if (wrpos >= endpos) throw_overflow_exception();
7272 elem32 slot;
7373 slot.f = f;
7474 *wrpos++ = htonl(slot.i);
7575 }
7676 void addd(double f)
7777 {
78 if (wrpos >= endpos) BUFFEROVERFLOW;
78 if (wrpos >= endpos) throw_overflow_exception();
7979 elem64 slot;
8080 slot.f = f;
8181 *wrpos++ = htonl(slot.i >> 32);
8585 {
8686 size_t len = strlen(src);
8787 size_t len4 = (len + 4) >> 2;
88 if (wrpos + len4 > endpos) BUFFEROVERFLOW;
88 if (wrpos + len4 > endpos) throw_overflow_exception();
8989 wrpos[len4 - 1] = 0;
9090 memcpy(wrpos, src, len);
9191 wrpos += len4;
9494 {
9595 size_t len = strlen(src);
9696 size_t len4 = (len + 5) >> 2;
97 if (wrpos + len4 > endpos) BUFFEROVERFLOW;
97 if (wrpos + len4 > endpos) throw_overflow_exception();
9898 wrpos[len4 - 1] = 0;
9999 char* wrpos_c = (char*)wrpos;
100100 *wrpos_c = '/';
104104 void adds(const char *src, size_t len)
105105 {
106106 size_t len4 = (len + 4) >> 2;
107 if (wrpos + len4 > endpos) BUFFEROVERFLOW;
107 if (wrpos + len4 > endpos) throw_overflow_exception();
108108 wrpos[len4 - 1] = 0;
109109 memcpy(wrpos, src, len);
110110 wrpos += len4;
112112 void addb(uint8 *src, size_t len)
113113 {
114114 size_t len4 = (len + 3) >> 2;
115 if (wrpos + (len4 + 1) > endpos) BUFFEROVERFLOW;
115 if (wrpos + (len4 + 1) > endpos) throw_overflow_exception();
116116 wrpos[len4 - 1] = 0;
117117 int32 swaplen = len;
118118 *wrpos++ = htonl(swaplen);
122122 void addtag(char c) { *tagwrpos++ = c; }
123123 void skip(int n)
124124 {
125 if (wrpos + n > endpos) BUFFEROVERFLOW;
125 if (wrpos + n > endpos) throw_overflow_exception();
126126 wrpos += n;
127127 }
128128 void maketags(int n)
123123
124124
125125
126 struct PyrMethodRaw {
127
126 struct PyrMethodRaw
127 {
128 #ifdef PYR_SLOTS_GENERIC
129 long padding; // used for the tag in the generic pyrslot implementation
130 #endif
128131 unsigned short unused1;
129132 unsigned short specialIndex;
130133 unsigned short methType;
131134 unsigned short frameSize;
135
136 #ifdef PYR_SLOTS_GENERIC
137 long padding2; // used for the tag in generic pyrslot implementation, second slot
138 #endif
132139
133140 unsigned char unused2;
134141 unsigned char numargs;
138145 unsigned char needsHeapContext;
139146 unsigned char popSize;
140147 unsigned char posargs;
141
142148 };
143149
144150
2020
2121 #ifndef _PYRSLOTGENERIC_H_
2222 #define _PYRSLOTGENERIC_H_
23
24 // generic pyrslot implementation
25 #define PYR_SLOTS_GENERIC
2326
2427 #include "SC_Endian.h"
2528 #include "PyrSymbol.h"
4245 };
4346
4447 typedef struct pyrslot {
45 int tag;
48 long tag;
4649
4750 union {
4851 int64 c; /* char */
574574 if PLATFORM == 'darwin' or conf.CheckCHeader('unicode/uregex.h'):
575575 libraries['libicu'] = Environment(
576576 LINKFLAGS = '-licui18n -licuuc -licudata',
577 LIBS = [ 'icui18n', 'icuuc', 'icudata' ],
577578 )
578579 else:
579580 print "libicu not found"
601602 libraries['altivec'] = env.Clone()
602603 libraries['altivec'].Append(
603604 CCFLAGS = altivec_flags,
604 CPPDEFINES = [('SC_MEMORY_ALIGNMENT', 16)])
605 CPPDEFINES = [('SC_MEMORY_ALIGNMENT', 16), 'HAS_ALTIVEC'])
605606 altiConf = Configure(libraries['altivec'])
606607 features['altivec'] = altiConf.CheckCHeader('altivec.h')
607608 altiConf.Finish()
10461047 elif PLATFORM == 'freebsd':
10471048 langEnv.Append(
10481049 LINKFLAGS = '-Wl,-rpath,build -Wl,-rpath,' + FINAL_PREFIX + '/lib')
1049
1050 if env['CURL']:
1051 langEnv.Append(CPPDEFINES = ['HAVE_LIBCURL'])
1052 merge_lib_info(langEnv, libraries['libcurl'])
1053
1054 if env['READLINE'] and env['LANG'] and env['GPL3']:
1055 langEnv.Append(CPPDEFINES = ['HAVE_READLINE'])
1056 merge_lib_info(langEnv, libraries['readline'])
1057
10581050
10591051 libsclangEnv = langEnv.Clone(
10601052 PKGCONFIG_NAME = 'libsclang',
11261118 if env['LANG']:
11271119 merge_lib_info(libsclangEnv, libraries['libicu'])
11281120
1121 if env['CURL']:
1122 langEnv.Append(CPPDEFINES = ['HAVE_LIBCURL'])
1123 merge_lib_info(libsclangEnv, libraries['libcurl'])
1124
1125 if env['READLINE'] and env['LANG'] and env['GPL3']:
1126 langEnv.Append(CPPDEFINES = ['HAVE_READLINE'])
1127 merge_lib_info(libsclangEnv, libraries['readline'])
1128
1129
11291130 # optional features
11301131 if features['midiapi']:
11311132 merge_lib_info(libsclangEnv, libraries['midiapi'])
11601161 # HAVE_LID does the right thing in SC_LID.cpp source
11611162 libsclangSources += ['Source/lang/LangPrimSource/SC_LID.cpp']
11621163 if features['wii']:
1163 libsclangEnv.Append(CPPDEFINES = 'HAVE_WII')
1164 libsclangEnv.Append(LINKFLAGS = '-lcwiid')
1164 langEnv.Append(CPPDEFINES = 'HAVE_WII')
1165 langEnv.Append(LINKFLAGS = '-lcwiid')
11651166 #langEnv.Append(LINKFLAGS = '-lbluetooth')
11661167 #langEnv.Append(CPPPATH = '-I/usr/local/include/libcwiimote-0.4.0/libcwiimote/' ) #FIXME: to proper include directory
11671168 if features['lid']:
7575 const char* gPassword;
7676 extern bool compiledOK;
7777
78 #define USE_SCHEDULER 1
79
80
8178 ///////////
8279
8380 inline bool IsBundle(char* ptr)
9592 void makeSockAddr(struct sockaddr_in &toaddr, int32 addr, int32 port);
9693 int sendallto(int socket, const void *msg, size_t len, struct sockaddr *toaddr, int addrlen);
9794 int sendall(int socket, const void *msg, size_t len);
98 int makeSynthMsgWithTags(big_scpacket *packet, PyrSlot *slots, int size);
95 static int makeSynthMsgWithTags(big_scpacket *packet, PyrSlot *slots, int size);
9996 int makeSynthBundle(big_scpacket *packet, PyrSlot *slots, int size, bool useElapsed);
10097
101 void addMsgSlot(big_scpacket *packet, PyrSlot *slot);
102 void addMsgSlot(big_scpacket *packet, PyrSlot *slot)
98 static int addMsgSlot(big_scpacket *packet, PyrSlot *slot)
10399 {
104100 switch (GetTag(slot)) {
105101 case tagInt :
121117 if (arrayObj->size > 1 && isKindOfSlot(arrayObj->slots+1, class_array)) {
122118 makeSynthBundle(&packet2, arrayObj->slots, arrayObj->size, true);
123119 } else {
124 makeSynthMsgWithTags(&packet2, arrayObj->slots, arrayObj->size);
120 int error = makeSynthMsgWithTags(&packet2, arrayObj->slots, arrayObj->size);
121 if (error != errNone)
122 return error;
125123 }
126124 packet->addb((uint8*)packet2.data(), packet2.size());
127125 }
137135 else packet->addf(slotRawFloat(slot));
138136 break;
139137 }
140 }
141
142 void addMsgSlotWithTags(big_scpacket *packet, PyrSlot *slot);
143 void addMsgSlotWithTags(big_scpacket *packet, PyrSlot *slot)
138 return errNone;
139 }
140
141 static int addMsgSlotWithTags(big_scpacket *packet, PyrSlot *slot)
144142 {
145143 switch (GetTag(slot)) {
146144 case tagInt :
168166 if (arrayObj->size > 1 && isKindOfSlot(arrayObj->slots+1, class_array)) {
169167 makeSynthBundle(&packet2, arrayObj->slots, arrayObj->size, true);
170168 } else {
171 makeSynthMsgWithTags(&packet2, arrayObj->slots, arrayObj->size);
169 int error = makeSynthMsgWithTags(&packet2, arrayObj->slots, arrayObj->size);
170 if (error != errNone)
171 return error;
172172 }
173173 packet->addb((uint8*)packet2.data(), packet2.size());
174174 } else {
200200 }
201201 break;
202202 }
203 }
204
205 int makeSynthMsg(big_scpacket *packet, PyrSlot *slots, int size);
206 int makeSynthMsg(big_scpacket *packet, PyrSlot *slots, int size)
203 return errNone;
204 }
205
206 static int makeSynthMsg(big_scpacket *packet, PyrSlot *slots, int size)
207207 {
208208 packet->BeginMsg();
209209
210210 for (int i=0; i<size; ++i) {
211 addMsgSlot(packet, slots+i);
211 int error = addMsgSlot(packet, slots+i);
212 if (error != errNone)
213 return error;
212214 }
213215
214216 packet->EndMsg();
215217 return errNone;
216218 }
217219
218 int makeSynthMsgWithTags(big_scpacket *packet, PyrSlot *slots, int size);
219 int makeSynthMsgWithTags(big_scpacket *packet, PyrSlot *slots, int size)
220 static int makeSynthMsgWithTags(big_scpacket *packet, PyrSlot *slots, int size)
220221 {
221222 packet->BeginMsg();
222223
225226 // expressing it as a symbol (e.g. \g_new) - we add it back on here, for OSC compliance.
226227 if(GetTag(slots) == tagSym && slotRawSymbol(slots)->name[0]!='/'){
227228 packet->adds_slpre(slotRawSymbol(slots)->name);
228 }else{
229 addMsgSlot(packet, slots);
229 } else {
230 int error = addMsgSlot(packet, slots);
231 if (error != errNone)
232 return error;
230233 }
231234
232235 // skip space for tags
234237
235238 packet->addtag(',');
236239
237 for (int i=1; i<size; ++i) {
238 addMsgSlotWithTags(packet, slots+i);
240 try {
241 for (int i=1; i<size; ++i) {
242 int error = addMsgSlotWithTags(packet, slots+i);
243 if (error != errNone)
244 return error;
245 }
246 } catch (std::runtime_error & e) {
247 error("makeSynthMsgWithTags: %s\n", e.what());
248 return errFailed;
239249 }
240250
241251 packet->EndMsg();
286296 for (int i=1; i<size; ++i) {
287297 if (isKindOfSlot(slots+i, class_array)) {
288298 PyrObject *obj = slotRawObject(&slots[i]);
289 makeSynthMsgWithTags(packet, obj->slots, obj->size);
299 int error = makeSynthMsgWithTags(packet, obj->slots, obj->size);
300 if (error != errNone)
301 return error;
290302 }
291303 }
292304 packet->CloseBundle();
320332 if (err) return err;
321333
322334 if (addr == 0) {
323 #ifdef NO_INTERNAL_SERVER
324 // no internal server under SC_WIN32 yet
325 #else
326335 if (gInternalSynthServer.mWorld) {
327336 World_SendPacket(gInternalSynthServer.mWorld, msglen, bufptr, &localServerReplyFunc);
328337 }
329 #endif
330338 return errNone;
331339 }
332340
447455 big_scpacket packet;
448456
449457 int numargs = numArgsPushed - 1;
450 makeSynthMsgWithTags(&packet, args, numargs);
458 int error = makeSynthMsgWithTags(&packet, args, numargs);
459 if (error != errNone)
460 return error;
451461
452462 //for (int i=0; i<packet.size()/4; i++) post("%d %08X\n", i, packet.buf[i]);
453463
545555
546556 int numargs = slotRawObject(args)->size;
547557 if (numargs < 1) return errFailed;
548 makeSynthMsgWithTags(&packet, slotRawObject(args)->slots, numargs);
558 int error = makeSynthMsgWithTags(&packet, slotRawObject(args)->slots, numargs);
559 if (error != errNone)
560 return error;
561
549562 SetInt(args, packet.size());
550563 return errNone;
551564 }
575588 if (IsFloat(args) || IsNil(args) || IsInt(args)) {
576589 makeSynthBundle(&packet, args, numargs, false);
577590 } else if (IsSym(args) || isKindOfSlot(args, class_string)) {
578 makeSynthMsgWithTags(&packet, args, numargs);
591 int error = makeSynthMsgWithTags(&packet, args, numargs);
592 if (error != errNone)
593 return error;
579594 } else {
580595 return errWrongType;
581596 }
20192019 {
20202020 float xb = ZIN0(1);
20212021
2022 nova::times_vec_simd(OUT(0), IN(0), xb, inNumSamples);
2022 nova::times_vec_simd(OUT(0), IN(0), 1.f/xb, inNumSamples);
20232023 unit->mPrevB = xb;
20242024 }
20252025
30623062 unit->m_y2 = 0.f;
30633063 unit->m_freq = 0.f;
30643064 unit->m_rq = 0.f;
3065 Resonz_next(unit, 1);
3065 ZOUT0(0) = 0.f;
30663066 }
30673067
30683068
2929 //For the moment, the data below is used and only 1024 FFT supported. For the associated Mel scale spacing generation code see the bottom of the MFCC help file
3030
3131 int g_startbin44100[42]= { 0, 2, 4, 5, 7, 9, 11, 13, 15, 17, 20, 23, 26, 29, 33, 36, 41, 45, 50, 55, 60, 66, 73, 80, 87, 96, 104, 114, 124, 135, 147, 159, 173, 188, 204, 221, 240, 260, 282, 305, 330, 357 };
32 int g_endbin44100[42]= { 2, 3, 5, 7, 9, 11, 13, 15, 18, 21, 24, 27, 31, 34, 39, 43, 48, 53, 58, 64, 71, 78, 85, 94, 102, 112, 122, 133, 145, 157, 171, 186, 202, 219, 238, 258, 280, 303, 328, 355, 385, 416 };
32 //int g_endbin44100[42]= { 2, 3, 5, 7, 9, 11, 13, 15, 18, 21, 24, 27, 31, 34, 39, 43, 48, 53, 58, 64, 71, 78, 85, 94, 102, 112, 122, 133, 145, 157, 171, 186, 202, 219, 238, 258, 280, 303, 328, 355, 385, 416 };
33 //efficiency trick; one above actual endbin, allows for loop to test only < and not <=
34 int g_endbin44100[42]= {3, 4, 6, 8, 10, 12, 14, 16, 19, 22, 25, 28, 32, 35, 40, 44, 49, 54, 59, 65, 72, 79, 86, 95, 103, 113, 123, 134, 146, 158, 172, 187, 203, 220, 239, 259, 281, 304, 329, 356, 386, 417 };
35
3336 int g_cumulindex44100[43]= { 0, 3, 5, 7, 10, 13, 16, 19, 22, 26, 31, 36, 41, 47, 53, 60, 68, 76, 85, 94, 104, 116, 129, 142, 157, 173, 190, 209, 229, 251, 274, 299, 327, 357, 389, 424, 462, 503, 547, 594, 645, 701, 760 };
3437 float g_melbandweights44100[761]= { 0.5, 1, 0.5, 0.5, 1, 1, 0.5, 0.5, 1, 0.5, 0.5, 1, 0.5, 0.5, 1, 0.5, 0.5, 1, 0.5, 0.5, 1, 0.5, 0.5, 1, 0.66666666666667, 0.33333333333333, 0.33333333333333, 0.66666666666667, 1, 0.66666666666667, 0.33333333333333, 0.33333333333333, 0.66666666666667, 1, 0.66666666666667, 0.33333333333333, 0.33333333333333, 0.66666666666667, 1, 0.66666666666667, 0.33333333333333, 0.33333333333333, 0.66666666666667, 1, 0.75, 0.5, 0.25, 0.25, 0.5, 0.75, 1, 0.66666666666667, 0.33333333333333, 0.33333333333333, 0.66666666666667, 1, 0.8, 0.6, 0.4, 0.2, 0.2, 0.4, 0.6, 0.8, 1, 0.75, 0.5, 0.25, 0.25, 0.5, 0.75, 1, 0.8, 0.6, 0.4, 0.2, 0.2, 0.4, 0.6, 0.8, 1, 0.8, 0.6, 0.4, 0.2, 0.2, 0.4, 0.6, 0.8, 1, 0.8, 0.6, 0.4, 0.2, 0.2, 0.4, 0.6, 0.8, 1, 0.83333333333333, 0.66666666666667, 0.5, 0.33333333333333, 0.16666666666667, 0.16666666666667, 0.33333333333333, 0.5, 0.66666666666667, 0.83333333333333, 1, 0.85714285714286, 0.71428571428571, 0.57142857142857, 0.42857142857143, 0.28571428571429, 0.14285714285714, 0.14285714285714, 0.28571428571429, 0.42857142857143, 0.57142857142857, 0.71428571428571, 0.85714285714286, 1, 0.85714285714286, 0.71428571428571, 0.57142857142857, 0.42857142857143, 0.28571428571429, 0.14285714285714, 0.14285714285714, 0.28571428571429, 0.42857142857143, 0.57142857142857, 0.71428571428571, 0.85714285714286, 1, 0.85714285714286, 0.71428571428571, 0.57142857142857, 0.42857142857143, 0.28571428571429, 0.14285714285714, 0.14285714285714, 0.28571428571429, 0.42857142857143, 0.57142857142857, 0.71428571428571, 0.85714285714286, 1, 0.88888888888889, 0.77777777777778, 0.66666666666667, 0.55555555555556, 0.44444444444444, 0.33333333333333, 0.22222222222222, 0.11111111111111, 0.11111111111111, 0.22222222222222, 0.33333333333333, 0.44444444444444, 0.55555555555556, 0.66666666666667, 0.77777777777778, 0.88888888888889, 1, 0.875, 0.75, 0.625, 0.5, 0.375, 0.25, 0.125, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 0.90909090909091, 0.81818181818182, 0.72727272727273, 0.63636363636364, 0.54545454545455, 0.45454545454545, 0.36363636363636, 0.27272727272727, 0.18181818181818, 0.090909090909091, 0.090909090909091, 0.18181818181818, 0.27272727272727, 0.36363636363636, 0.45454545454545, 0.54545454545455, 0.63636363636364, 0.72727272727273, 0.81818181818182, 0.90909090909091, 1, 0.91666666666667, 0.83333333333333, 0.75, 0.66666666666667, 0.58333333333333, 0.5, 0.41666666666667, 0.33333333333333, 0.25, 0.16666666666667, 0.083333333333333, 0.083333333333333, 0.16666666666667, 0.25, 0.33333333333333, 0.41666666666667, 0.5, 0.58333333333333, 0.66666666666667, 0.75, 0.83333333333333, 0.91666666666667, 1, 0.91666666666667, 0.83333333333333, 0.75, 0.66666666666667, 0.58333333333333, 0.5, 0.41666666666667, 0.33333333333333, 0.25, 0.16666666666667, 0.083333333333333, 0.083333333333333, 0.16666666666667, 0.25, 0.33333333333333, 0.41666666666667, 0.5, 0.58333333333333, 0.66666666666667, 0.75, 0.83333333333333, 0.91666666666667, 1, 0.92857142857143, 0.85714285714286, 0.78571428571429, 0.71428571428571, 0.64285714285714, 0.57142857142857, 0.5, 0.42857142857143, 0.35714285714286, 0.28571428571429, 0.21428571428571, 0.14285714285714, 0.071428571428572, 0.071428571428571, 0.14285714285714, 0.21428571428571, 0.28571428571429, 0.35714285714286, 0.42857142857143, 0.5, 0.57142857142857, 0.64285714285714, 0.71428571428571, 0.78571428571429, 0.85714285714286, 0.92857142857143, 1, 0.93333333333333, 0.86666666666667, 0.8, 0.73333333333333, 0.66666666666667, 0.6, 0.53333333333333, 0.46666666666667, 0.4, 0.33333333333333, 0.26666666666667, 0.2, 0.13333333333333, 0.066666666666667, 0.066666666666667, 0.13333333333333, 0.2, 0.26666666666667, 0.33333333333333, 0.4, 0.46666666666667, 0.53333333333333, 0.6, 0.66666666666667, 0.73333333333333, 0.8, 0.86666666666667, 0.93333333333333, 1, 0.9375, 0.875, 0.8125, 0.75, 0.6875, 0.625, 0.5625, 0.5, 0.4375, 0.375, 0.3125, 0.25, 0.1875, 0.125, 0.0625, 0.0625, 0.125, 0.1875, 0.25, 0.3125, 0.375, 0.4375, 0.5, 0.5625, 0.625, 0.6875, 0.75, 0.8125, 0.875, 0.9375, 1, 0.94117647058824, 0.88235294117647, 0.82352941176471, 0.76470588235294, 0.70588235294118, 0.64705882352941, 0.58823529411765, 0.52941176470588, 0.47058823529412, 0.41176470588235, 0.35294117647059, 0.29411764705882, 0.23529411764706, 0.17647058823529, 0.11764705882353, 0.058823529411765, 0.058823529411765, 0.11764705882353, 0.17647058823529, 0.23529411764706, 0.29411764705882, 0.35294117647059, 0.41176470588235, 0.47058823529412, 0.52941176470588, 0.58823529411765, 0.64705882352941, 0.70588235294118, 0.76470588235294, 0.82352941176471, 0.88235294117647, 0.94117647058824, 1, 0.94736842105263, 0.89473684210526, 0.84210526315789, 0.78947368421053, 0.73684210526316, 0.68421052631579, 0.63157894736842, 0.57894736842105, 0.52631578947368, 0.47368421052632, 0.42105263157895, 0.36842105263158, 0.31578947368421, 0.26315789473684, 0.21052631578947, 0.15789473684211, 0.10526315789474, 0.052631578947369, 0.052631578947368, 0.10526315789474, 0.15789473684211, 0.21052631578947, 0.26315789473684, 0.31578947368421, 0.36842105263158, 0.42105263157895, 0.47368421052632, 0.52631578947368, 0.57894736842105, 0.63157894736842, 0.68421052631579, 0.73684210526316, 0.78947368421053, 0.84210526315789, 0.89473684210526, 0.94736842105263, 1, 0.95, 0.9, 0.85, 0.8, 0.75, 0.7, 0.65, 0.6, 0.55, 0.5, 0.45, 0.4, 0.35, 0.3, 0.25, 0.2, 0.15, 0.1, 0.05, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 0.95454545454545, 0.90909090909091, 0.86363636363636, 0.81818181818182, 0.77272727272727, 0.72727272727273, 0.68181818181818, 0.63636363636364, 0.59090909090909, 0.54545454545455, 0.5, 0.45454545454545, 0.40909090909091, 0.36363636363636, 0.31818181818182, 0.27272727272727, 0.22727272727273, 0.18181818181818, 0.13636363636364, 0.090909090909091, 0.045454545454545, 0.045454545454545, 0.090909090909091, 0.13636363636364, 0.18181818181818, 0.22727272727273, 0.27272727272727, 0.31818181818182, 0.36363636363636, 0.40909090909091, 0.45454545454545, 0.5, 0.54545454545455, 0.59090909090909, 0.63636363636364, 0.68181818181818, 0.72727272727273, 0.77272727272727, 0.81818181818182, 0.86363636363636, 0.90909090909091, 0.95454545454545, 1, 0.95652173913043, 0.91304347826087, 0.8695652173913, 0.82608695652174, 0.78260869565217, 0.73913043478261, 0.69565217391304, 0.65217391304348, 0.60869565217391, 0.56521739130435, 0.52173913043478, 0.47826086956522, 0.43478260869565, 0.39130434782609, 0.34782608695652, 0.30434782608696, 0.26086956521739, 0.21739130434783, 0.17391304347826, 0.1304347826087, 0.08695652173913, 0.043478260869565, 0.043478260869565, 0.08695652173913, 0.1304347826087, 0.17391304347826, 0.21739130434783, 0.26086956521739, 0.30434782608696, 0.34782608695652, 0.39130434782609, 0.43478260869565, 0.47826086956522, 0.52173913043478, 0.56521739130435, 0.60869565217391, 0.65217391304348, 0.69565217391304, 0.73913043478261, 0.78260869565217, 0.82608695652174, 0.8695652173913, 0.91304347826087, 0.95652173913043, 1, 0.96, 0.92, 0.88, 0.84, 0.8, 0.76, 0.72, 0.68, 0.64, 0.6, 0.56, 0.52, 0.48, 0.44, 0.4, 0.36, 0.32, 0.28, 0.24, 0.2, 0.16, 0.12, 0.08, 0.04, 0.04, 0.08, 0.12, 0.16, 0.2, 0.24, 0.28, 0.32, 0.36, 0.4, 0.44, 0.48, 0.52, 0.56, 0.6, 0.64, 0.68, 0.72, 0.76, 0.8, 0.84, 0.88, 0.92, 0.96, 1, 0.96296296296296, 0.92592592592593, 0.88888888888889, 0.85185185185185, 0.81481481481481, 0.77777777777778, 0.74074074074074, 0.7037037037037, 0.66666666666667, 0.62962962962963, 0.59259259259259, 0.55555555555556, 0.51851851851852, 0.48148148148148, 0.44444444444444, 0.40740740740741, 0.37037037037037, 0.33333333333333, 0.2962962962963, 0.25925925925926, 0.22222222222222, 0.18518518518519, 0.14814814814815, 0.11111111111111, 0.074074074074074, 0.037037037037037, 0.037037037037037, 0.074074074074074, 0.11111111111111, 0.14814814814815, 0.18518518518519, 0.22222222222222, 0.25925925925926, 0.2962962962963, 0.33333333333333, 0.37037037037037, 0.40740740740741, 0.44444444444444, 0.48148148148148, 0.51851851851852, 0.55555555555556, 0.59259259259259, 0.62962962962963, 0.66666666666667, 0.7037037037037, 0.74074074074074, 0.77777777777778, 0.81481481481481, 0.85185185185185, 0.88888888888889, 0.92592592592593, 0.96296296296296, 1, 0.96666666666667, 0.93333333333333, 0.9, 0.86666666666667, 0.83333333333333, 0.8, 0.76666666666667, 0.73333333333333, 0.7, 0.66666666666667, 0.63333333333333, 0.6, 0.56666666666667, 0.53333333333333, 0.5, 0.46666666666667, 0.43333333333333, 0.4, 0.36666666666667, 0.33333333333333, 0.3, 0.26666666666667, 0.23333333333333, 0.2, 0.16666666666667, 0.13333333333333, 0.1, 0.066666666666667, 0.033333333333333, 0.033333333333333, 0.066666666666667, 0.1, 0.13333333333333, 0.16666666666667, 0.2, 0.23333333333333, 0.26666666666667, 0.3, 0.33333333333333, 0.36666666666667, 0.4, 0.43333333333333, 0.46666666666667, 0.5, 0.53333333333333, 0.56666666666667, 0.6, 0.63333333333333, 0.66666666666667, 0.7, 0.73333333333333, 0.76666666666667, 0.8, 0.83333333333333, 0.86666666666667, 0.9, 0.93333333333333, 0.96666666666667, 1, 0.96774193548387, 0.93548387096774, 0.90322580645161, 0.87096774193548, 0.83870967741935, 0.80645161290323, 0.7741935483871, 0.74193548387097, 0.70967741935484, 0.67741935483871, 0.64516129032258, 0.61290322580645, 0.58064516129032, 0.54838709677419, 0.51612903225806, 0.48387096774194, 0.45161290322581, 0.41935483870968, 0.38709677419355, 0.35483870967742, 0.32258064516129, 0.29032258064516, 0.25806451612903, 0.2258064516129, 0.19354838709677, 0.16129032258065, 0.12903225806452, 0.096774193548387, 0.064516129032258, 0.032258064516129 };
3538
3639 int g_startbin48000[42]= { 0, 2, 4, 5, 6, 8, 10, 12, 14, 16, 18, 21, 24, 27, 30, 34, 37, 41, 46, 51, 56, 61, 67, 73, 80, 88, 96, 104, 114, 124, 135, 147, 159, 173, 188, 203, 220, 239, 259, 280, 304, 328 };
37 int g_endbin48000[42]= { 2, 3, 4, 6, 8, 10, 12, 14, 16, 19, 22, 25, 28, 32, 35, 39, 44, 49, 54, 59, 65, 71, 78, 86, 94, 102, 112, 122, 133, 145, 157, 171, 186, 201, 218, 237, 257, 278, 302, 326, 353, 383 };
40 //int g_endbin48000[42]= { 2, 3, 4, 6, 8, 10, 12, 14, 16, 19, 22, 25, 28, 32, 35, 39, 44, 49, 54, 59, 65, 71, 78, 86, 94, 102, 112, 122, 133, 145, 157, 171, 186, 201, 218, 237, 257, 278, 302, 326, 353, 383 };
41 //with efficiency trick
42 int g_endbin48000[42]= { 3, 4, 5, 7, 9, 11, 13, 15, 17, 20, 23, 26, 29, 33, 36, 40, 45, 50, 55, 60, 66, 72, 79, 87, 95, 103, 113, 123, 134, 146, 158, 172, 187, 202, 219, 238, 258, 279, 303, 327, 354, 384 };
43
3844 int g_cumulindex48000[43]= { 0, 3, 5, 6, 8, 11, 14, 17, 20, 23, 27, 32, 37, 42, 48, 54, 60, 68, 77, 86, 95, 105, 116, 128, 142, 157, 172, 189, 208, 228, 250, 273, 298, 326, 355, 386, 421, 459, 499, 543, 590, 640, 695 };
3945 float g_melbandweights48000[761]= { 0.5, 1, 0.5, 0.5, 1, 1, 1, 0.5, 0.5, 1, 0.5, 0.5, 1, 0.5, 0.5, 1, 0.5, 0.5, 1, 0.5, 0.5, 1, 0.5, 0.5, 1, 0.66666666666667, 0.33333333333333, 0.33333333333333, 0.66666666666667, 1, 0.66666666666667, 0.33333333333333, 0.33333333333333, 0.66666666666667, 1, 0.66666666666667, 0.33333333333333, 0.33333333333333, 0.66666666666667, 1, 0.66666666666667, 0.33333333333333, 0.33333333333333, 0.66666666666667, 1, 0.75, 0.5, 0.25, 0.25, 0.5, 0.75, 1, 0.66666666666667, 0.33333333333333, 0.33333333333333, 0.66666666666667, 1, 0.75, 0.5, 0.25, 0.25, 0.5, 0.75, 1, 0.8, 0.6, 0.4, 0.2, 0.2, 0.4, 0.6, 0.8, 1, 0.8, 0.6, 0.4, 0.2, 0.2, 0.4, 0.6, 0.8, 1, 0.8, 0.6, 0.4, 0.2, 0.2, 0.4, 0.6, 0.8, 1, 0.8, 0.6, 0.4, 0.2, 0.2, 0.4, 0.6, 0.8, 1, 0.83333333333333, 0.66666666666667, 0.5, 0.33333333333333, 0.16666666666667, 0.16666666666667, 0.33333333333333, 0.5, 0.66666666666667, 0.83333333333333, 1, 0.83333333333333, 0.66666666666667, 0.5, 0.33333333333333, 0.16666666666667, 0.16666666666667, 0.33333333333333, 0.5, 0.66666666666667, 0.83333333333333, 1, 0.85714285714286, 0.71428571428571, 0.57142857142857, 0.42857142857143, 0.28571428571429, 0.14285714285714, 0.14285714285714, 0.28571428571429, 0.42857142857143, 0.57142857142857, 0.71428571428571, 0.85714285714286, 1, 0.875, 0.75, 0.625, 0.5, 0.375, 0.25, 0.125, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1, 0.875, 0.75, 0.625, 0.5, 0.375, 0.25, 0.125, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1, 0.875, 0.75, 0.625, 0.5, 0.375, 0.25, 0.125, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 0.90909090909091, 0.81818181818182, 0.72727272727273, 0.63636363636364, 0.54545454545455, 0.45454545454545, 0.36363636363636, 0.27272727272727, 0.18181818181818, 0.090909090909091, 0.090909090909091, 0.18181818181818, 0.27272727272727, 0.36363636363636, 0.45454545454545, 0.54545454545455, 0.63636363636364, 0.72727272727273, 0.81818181818182, 0.90909090909091, 1, 0.91666666666667, 0.83333333333333, 0.75, 0.66666666666667, 0.58333333333333, 0.5, 0.41666666666667, 0.33333333333333, 0.25, 0.16666666666667, 0.083333333333333, 0.083333333333333, 0.16666666666667, 0.25, 0.33333333333333, 0.41666666666667, 0.5, 0.58333333333333, 0.66666666666667, 0.75, 0.83333333333333, 0.91666666666667, 1, 0.91666666666667, 0.83333333333333, 0.75, 0.66666666666667, 0.58333333333333, 0.5, 0.41666666666667, 0.33333333333333, 0.25, 0.16666666666667, 0.083333333333333, 0.083333333333333, 0.16666666666667, 0.25, 0.33333333333333, 0.41666666666667, 0.5, 0.58333333333333, 0.66666666666667, 0.75, 0.83333333333333, 0.91666666666667, 1, 0.92857142857143, 0.85714285714286, 0.78571428571429, 0.71428571428571, 0.64285714285714, 0.57142857142857, 0.5, 0.42857142857143, 0.35714285714286, 0.28571428571429, 0.21428571428571, 0.14285714285714, 0.071428571428572, 0.071428571428571, 0.14285714285714, 0.21428571428571, 0.28571428571429, 0.35714285714286, 0.42857142857143, 0.5, 0.57142857142857, 0.64285714285714, 0.71428571428571, 0.78571428571429, 0.85714285714286, 0.92857142857143, 1, 0.93333333333333, 0.86666666666667, 0.8, 0.73333333333333, 0.66666666666667, 0.6, 0.53333333333333, 0.46666666666667, 0.4, 0.33333333333333, 0.26666666666667, 0.2, 0.13333333333333, 0.066666666666667, 0.066666666666667, 0.13333333333333, 0.2, 0.26666666666667, 0.33333333333333, 0.4, 0.46666666666667, 0.53333333333333, 0.6, 0.66666666666667, 0.73333333333333, 0.8, 0.86666666666667, 0.93333333333333, 1, 0.93333333333333, 0.86666666666667, 0.8, 0.73333333333333, 0.66666666666667, 0.6, 0.53333333333333, 0.46666666666667, 0.4, 0.33333333333333, 0.26666666666667, 0.2, 0.13333333333333, 0.066666666666667, 0.066666666666667, 0.13333333333333, 0.2, 0.26666666666667, 0.33333333333333, 0.4, 0.46666666666667, 0.53333333333333, 0.6, 0.66666666666667, 0.73333333333333, 0.8, 0.86666666666667, 0.93333333333333, 1, 0.94117647058824, 0.88235294117647, 0.82352941176471, 0.76470588235294, 0.70588235294118, 0.64705882352941, 0.58823529411765, 0.52941176470588, 0.47058823529412, 0.41176470588235, 0.35294117647059, 0.29411764705882, 0.23529411764706, 0.17647058823529, 0.11764705882353, 0.058823529411765, 0.058823529411765, 0.11764705882353, 0.17647058823529, 0.23529411764706, 0.29411764705882, 0.35294117647059, 0.41176470588235, 0.47058823529412, 0.52941176470588, 0.58823529411765, 0.64705882352941, 0.70588235294118, 0.76470588235294, 0.82352941176471, 0.88235294117647, 0.94117647058824, 1, 0.94736842105263, 0.89473684210526, 0.84210526315789, 0.78947368421053, 0.73684210526316, 0.68421052631579, 0.63157894736842, 0.57894736842105, 0.52631578947368, 0.47368421052632, 0.42105263157895, 0.36842105263158, 0.31578947368421, 0.26315789473684, 0.21052631578947, 0.15789473684211, 0.10526315789474, 0.052631578947369, 0.052631578947368, 0.10526315789474, 0.15789473684211, 0.21052631578947, 0.26315789473684, 0.31578947368421, 0.36842105263158, 0.42105263157895, 0.47368421052632, 0.52631578947368, 0.57894736842105, 0.63157894736842, 0.68421052631579, 0.73684210526316, 0.78947368421053, 0.84210526315789, 0.89473684210526, 0.94736842105263, 1, 0.95, 0.9, 0.85, 0.8, 0.75, 0.7, 0.65, 0.6, 0.55, 0.5, 0.45, 0.4, 0.35, 0.3, 0.25, 0.2, 0.15, 0.1, 0.05, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 0.95238095238095, 0.9047619047619, 0.85714285714286, 0.80952380952381, 0.76190476190476, 0.71428571428571, 0.66666666666667, 0.61904761904762, 0.57142857142857, 0.52380952380952, 0.47619047619048, 0.42857142857143, 0.38095238095238, 0.33333333333333, 0.28571428571429, 0.23809523809524, 0.19047619047619, 0.14285714285714, 0.095238095238095, 0.047619047619048, 0.047619047619048, 0.095238095238095, 0.14285714285714, 0.19047619047619, 0.23809523809524, 0.28571428571429, 0.33333333333333, 0.38095238095238, 0.42857142857143, 0.47619047619048, 0.52380952380952, 0.57142857142857, 0.61904761904762, 0.66666666666667, 0.71428571428571, 0.76190476190476, 0.80952380952381, 0.85714285714286, 0.9047619047619, 0.95238095238095, 1, 0.95833333333333, 0.91666666666667, 0.875, 0.83333333333333, 0.79166666666667, 0.75, 0.70833333333333, 0.66666666666667, 0.625, 0.58333333333333, 0.54166666666667, 0.5, 0.45833333333333, 0.41666666666667, 0.375, 0.33333333333333, 0.29166666666667, 0.25, 0.20833333333333, 0.16666666666667, 0.125, 0.083333333333333, 0.041666666666667, 0.041666666666667, 0.083333333333333, 0.125, 0.16666666666667, 0.20833333333333, 0.25, 0.29166666666667, 0.33333333333333, 0.375, 0.41666666666667, 0.45833333333333, 0.5, 0.54166666666667, 0.58333333333333, 0.625, 0.66666666666667, 0.70833333333333, 0.75, 0.79166666666667, 0.83333333333333, 0.875, 0.91666666666667, 0.95833333333333, 1, 0.95833333333333, 0.91666666666667, 0.875, 0.83333333333333, 0.79166666666667, 0.75, 0.70833333333333, 0.66666666666667, 0.625, 0.58333333333333, 0.54166666666667, 0.5, 0.45833333333333, 0.41666666666667, 0.375, 0.33333333333333, 0.29166666666667, 0.25, 0.20833333333333, 0.16666666666667, 0.125, 0.083333333333333, 0.041666666666667, 0.041666666666667, 0.083333333333333, 0.125, 0.16666666666667, 0.20833333333333, 0.25, 0.29166666666667, 0.33333333333333, 0.375, 0.41666666666667, 0.45833333333333, 0.5, 0.54166666666667, 0.58333333333333, 0.625, 0.66666666666667, 0.70833333333333, 0.75, 0.79166666666667, 0.83333333333333, 0.875, 0.91666666666667, 0.95833333333333, 1, 0.96296296296296, 0.92592592592593, 0.88888888888889, 0.85185185185185, 0.81481481481481, 0.77777777777778, 0.74074074074074, 0.7037037037037, 0.66666666666667, 0.62962962962963, 0.59259259259259, 0.55555555555556, 0.51851851851852, 0.48148148148148, 0.44444444444444, 0.40740740740741, 0.37037037037037, 0.33333333333333, 0.2962962962963, 0.25925925925926, 0.22222222222222, 0.18518518518519, 0.14814814814815, 0.11111111111111, 0.074074074074074, 0.037037037037037, 0.037037037037037, 0.074074074074074, 0.11111111111111, 0.14814814814815, 0.18518518518519, 0.22222222222222, 0.25925925925926, 0.2962962962963, 0.33333333333333, 0.37037037037037, 0.40740740740741, 0.44444444444444, 0.48148148148148, 0.51851851851852, 0.55555555555556, 0.59259259259259, 0.62962962962963, 0.66666666666667, 0.7037037037037, 0.74074074074074, 0.77777777777778, 0.81481481481481, 0.85185185185185, 0.88888888888889, 0.92592592592593, 0.96296296296296, 1, 0.96666666666667, 0.93333333333333, 0.9, 0.86666666666667, 0.83333333333333, 0.8, 0.76666666666667, 0.73333333333333, 0.7, 0.66666666666667, 0.63333333333333, 0.6, 0.56666666666667, 0.53333333333333, 0.5, 0.46666666666667, 0.43333333333333, 0.4, 0.36666666666667, 0.33333333333333, 0.3, 0.26666666666667, 0.23333333333333, 0.2, 0.16666666666667, 0.13333333333333, 0.1, 0.066666666666667, 0.033333333333333 };
4046
178184 sum+= (dct[index])*pbands[j];
179185 }
180186
181 //also divide by numcoefficients
182 unit->m_mfcc[k]= 0.5*(0.5*(sum*mult)+0.5);
187 //could also divide by numcoefficients, but left off for compatibility between MFCCs extracted in different ways
188 unit->m_mfcc[k]= 0.25f*((sum*mult)+1.0f); //0.5*(0.5*(sum*mult)+0.5);
183189 }
184190 }
185191
194200 float * weights= unit->m_bandweights;
195201
196202 for (int k=0; k<unit->m_numbands; ++k){
197 int bandstart=startbin[k];
198 int bandendp1 = endbin[k]+1;
203 int bandstart = startbin[k];
204 int bandend = endbin[k]; //p1 = endbin[k]+1;
199205
200206 float bsum=0.f;
201207 float real, imag, power;
202208 int index, index2;
203209 //float lastpower=0.0;
204210
205 index2= cumulindex[k];
206
207 for (int j=bandstart; j < bandendp1; ++j) {
211 index2= cumulindex[k] - bandstart;
212
213 for (int j=bandstart; j < bandend; ++j) {
208214 index = j+j;
209215 real= data[index];
210216 imag= data[index+1];
214220 else
215221 power = real*real + imag*imag; //sqrt((real*real) + (imag*imag));
216222
217 float multiplier = weights[index2 + (j-bandstart)];
223 float multiplier = weights[index2 + j]; //[cumulindex[k] + (j-bandstart)]
218224
219225 bsum += (power*multiplier);
220226
221227 }
222228
223 pbands[k] = 10.f * (sc_log10((bsum< 2e-42f? 2e-42f: bsum)) + 5.f);
224
225 //10*(log10((bsum< 2e-42? 2e-42: bsum)) + 4.8810017610244); //log(bsum< 2e-42? 2e-42: bsum); //10*(log10(bsum) + 4.8810017610244);
226 }
227
228 //
229 //float mult= 0.01*(1.0/((float)unit->m_numcoefficients));
230 float mult= 0.01; //(1.0/((float)unit->m_numcoefficients));
231
232 return mult;
229 //either keep as double to preserve the small value
230 //pbands[k] = 10.f * (sc_log10((bsum< 1e-42? 1e-42: bsum)) + 5.f);
231 //or make sure value works as a float:
232 //pbands[k] = 10.f * (sc_log10((bsum< 1e-20f? 1e-20f: bsum)) + 5.f);
233 //want to avoid negative values, dynamic range roughly around 11 powers of ten (110dB)
234 //pbands[k] = 10.f * (std::log10((bsum< 1e-5f? 1e-5f: bsum)) + 5.f);
235 pbands[k] = 10.f * (std::log10(sc_max(1e-5f, bsum)) +5.f);
236 }
237
238 //float mult= 0.01; //(1.0/((float)unit->m_numcoefficients)); //0.01*(1.0/((float)unit->m_numcoefficients));
239 return 0.01f;
233240 }
234241
235242
822822 case opArcTan : func = &atan_nova; break;
823823 case opSinH : func = &sinh_a; break;
824824 case opCosH : func = &cosh_a; break;
825 case opTanH : func = &tanh_nova; break;
825 case opTanH : func = &tanh_a; break;
826826
827827 case opDistort : func = &distort_a; break;
828828 case opSoftClip : func = &softclip_nova_64; break;
00 Changes are listed below, grouped under each point release of SuperCollider.
1
2 SuperCollider v3.4.5, released 2012-01
3 ======================================
4
5 Tim Blechmann (7):
6 class library: FreqScope fix
7 sclang: fix crash of scpacket overflow by using exception handling
8 sclang: pad PyrMethodRaw struct
9 sclang: force size of PyrSlot to 16 byte and fix PyrMethodRaw size
10 server plugins: fix div_ai_nova
11 plugins: Resonz - fix initialization
12 plugins: disable simd-optimization for tanh
13
14 James Harkins (3):
15 Explicitly show the command to uninstall (for scons idiots like me).
16 (3.4) PathName now sets tmp directory using Platform
17 SimpleController:update would throw error if no actions had been 'put' in
18
19 Dan Stowell (1):
20 Remove waf file from 3.4.x - was never used, and contains binary code, causing linux packaging problems. See ubuntu bug #529154 for details, and debian bug #529154 for sc-specific
21
22 Mathieu Trudel-Lapierre (1):
23 Fixup environment variables used for linking against readline, libicu, curl, cwiid.
24
25 Nick Collins (1):
26 Fix bug in MFCC ugen
27
28 Noe Rubinstein (1):
29 Fix PMOsc doc: index -> pmindex
30
31 dmotd (1):
32 Include altivec.h on linux powerpc, fixing FTBFS
33
134
235 SuperCollider v3.4.4, released 2011-06
336 ======================================
2020 <body>
2121 <p class="p1"><b>PMOsc<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>phase modulation oscillator pair</b></p>
2222 <p class="p2"><br></p>
23 <p class="p3"><b>PMOsc.ar(carfreq, modfreq, index, modphase, mul, add)</b></p>
23 <p class="p3"><b>PMOsc.ar(carfreq, modfreq, pmindex, modphase, mul, add)</b></p>
2424 <p class="p2"><br></p>
2525 <p class="p3">Phase modulation sine oscillator pair.</p>
2626 <p class="p3"><b>carfreq</b> - carrier frequency in cycles per second.</p>
2727 <p class="p3"><b>modfreq</b> - modulator frequency in cycles per second.</p>
28 <p class="p3"><b>index</b> - modulation index in radians.</p>
28 <p class="p3"><b>pmindex</b> - modulation index in radians.</p>
2929 <p class="p3"><b>modphase</b> - a modulation input for the modulator's phase in radians</p>
3030 <p class="p4"><br></p>
3131 <p class="p5">play({ <span class="s1">PMOsc</span>.ar(<span class="s1">Line</span>.kr(600, 900, 5), 600, 3, 0, 0.1) }); <span class="s2">// modulate carfreq</span></p>
3030 }
3131 *initClass {
3232 scroot = File.getcwd;
33 tmp = ["/tmp/", scroot ++ "\\sounds\\", "sounds/"].detect({ |path|
34 File.exists(path);
35 });
33 tmp = Platform.defaultTempDir;
3634 tmp.isNil.if(
3735 {"No valid temp directory found. Please set this manually using PathName.tmp_".warn});
3836 }
3939 }
4040 update { arg theChanger, what ... moreArgs;
4141 var action;
42 action = actions.at(what);
43 if (action.notNil, {
44 action.valueArray(theChanger, what, moreArgs);
45 });
42 if(actions.notNil) {
43 action = actions.at(what);
44 if (action.notNil, {
45 action.valueArray(theChanger, what, moreArgs);
46 });
47 };
4648 }
4749 remove {
4850 model.removeDependant(this);
00 Main : Process {
11 // do not change the next lines manually:
22 //==== replace with new version from bash script ====
3 classvar scVersionMajor=3, scVersionMinor=4, scVersionPostfix=".4";
3 classvar scVersionMajor=3, scVersionMinor=4, scVersionPostfix=".5";
44 //==== end replace ====
55
66 var <platform, argv;
3232
3333 userExtensionDir { _Platform_userExtensionDir }
3434 *userExtensionDir { ^thisProcess.platform.userExtensionDir }
35
36 defaultTempDir { ^this.subclassResponsibility(\defaultTempDir) }
37 *defaultTempDir { ^thisProcess.platform.defaultTempDir }
3538
3639 // The "ideName" is for ide-dependent compilation.
3740 // From SC.app, the value is "scapp" meaning "scide_scapp" folders will be compiled and other "scide_*" ignored.
129132 pipe.close;
130133 ^arch.asSymbol;
131134 }
135
136 defaultTempDir {
137 // +/+ "" looks funny but ensures trailing slash
138 ^["/tmp/", this.userAppSupportDir +/+ ""].detect({ |path|
139 File.exists(path);
140 });
141 }
132142 }
common/waf less more
Binary diff not shown