当前位置: 首页>>代码示例>>C++>>正文


C++ Delay::write方法代码示例

本文整理汇总了C++中Delay::write方法的典型用法代码示例。如果您正苦于以下问题:C++ Delay::write方法的具体用法?C++ Delay::write怎么用?C++ Delay::write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Delay的用法示例。


在下文中一共展示了Delay::write方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: perform

	// the signal processing routine;
	inline int perform(t_sample ** __ins, t_sample ** __outs, int __n) { 
		vectorsize = __n;
		const t_sample * __in1 = __ins[0];
		t_sample * __out1 = __outs[0];
		if (__exception) { 
			return __exception;
			
		} else if (( (__in1 == 0) || (__out1 == 0) )) { 
			__exception = GENLIB_ERR_NULL_BUFFER;
			return __exception;
			
		};
		double expr_226 = safediv(((m_tone_4 * 2) * 3.1415926535898), 48000);
		double sin_217 = sin(expr_226);
		double clamp_218 = ((sin_217 <= 1e-05) ? 1e-05 : ((sin_217 >= 0.99999) ? 0.99999 : sin_217));
		// the main sample loop;
		while ((__n--)) { 
			const double in1 = (*(__in1++));
			double mix_229 = (m_y_2 + (clamp_218 * (in1 - m_y_2)));
			double mix_215 = mix_229;
			m_cycle_7.freq(m_rate_6);
			double cycle_221 = m_cycle_7(__sinedata);
			double cycleindex_222 = m_cycle_7.phase();
			double add_220 = (cycle_221 + 1);
			double mul_219 = (add_220 * 0.5);
			double mul_223 = (m_depth_5 * mul_219);
			double mstosamps_214 = (mul_223 * (samplerate * 0.001));
			double mix_230 = (mstosamps_214 + (0.999 * (m_smth_1 - mstosamps_214)));
			double mix_213 = mix_230;
			double tap_225 = m_delay_3.read_linear(mix_213);
			double out1 = tap_225;
			double y0_next_227 = mix_215;
			double smth_next_228 = mix_213;
			m_delay_3.write(mix_215);
			m_y_2 = y0_next_227;
			m_smth_1 = smth_next_228;
			m_delay_3.step();
			// assign results to output buffer;
			(*(__out1++)) = out1;
			
		};
		return __exception;
		
	};
开发者ID:ninodewit,项目名称:SHIRO-Plugins,代码行数:45,代码来源:gen_exported.cpp

示例2: perform


//.........这里部分代码省略.........
			t_sample mul_906 = (tap_905 * expr_1046);
			t_sample add_879 = (mul_854 + mul_906);
			t_sample mul_910 = (tap_903 * expr_1048);
			t_sample add_881 = (mul_856 + mul_910);
			t_sample mul_912 = (tap_902 * expr_1049);
			t_sample add_882 = (mul_857 + mul_912);
			t_sample mul_908 = (tap_904 * expr_1047);
			t_sample add_880 = (mul_855 + mul_908);
			t_sample tap_940 = m_delay_10.read_linear(mul_941);
			t_sample mul_938 = (tap_940 * 0.625);
			t_sample tap_982 = m_delay_9.read_linear(mul_983);
			t_sample tap_966 = m_delay_8.read_linear(mul_967);
			t_sample mul_964 = (tap_966 * 0.625);
			t_sample tap_947 = m_delay_7.read_linear(mul_948);
			t_sample mul_945 = (tap_947 * 0.75);
			t_sample mul_980 = (tap_982 * 0.75);
			t_sample sub_979 = (mix_998 - mul_980);
			t_sample mul_978 = (sub_979 * 0.75);
			t_sample add_977 = (mul_978 + tap_982);
			t_sample tap_975 = m_delay_6.read_linear(mul_976);
			t_sample mul_973 = (tap_975 * 0.75);
			t_sample mul_869 = (mul_857 * m_tail_23);
			t_sample mul_867 = (mul_855 * m_tail_23);
			t_sample add_853 = (mul_869 + mul_867);
			t_sample mul_868 = (mul_856 * m_tail_23);
			t_sample mul_866 = (mul_854 * m_tail_23);
			t_sample add_852 = (mul_868 + mul_866);
			t_sample sub_861 = (add_853 - add_852);
			t_sample mul_865 = (mul_912 * m_early_25);
			t_sample mul_863 = (mul_908 * m_early_25);
			t_sample add_851 = (mul_865 + mul_863);
			t_sample mul_864 = (mul_910 * m_early_25);
			t_sample mul_862 = (mul_906 * m_early_25);
			t_sample add_850 = (mul_864 + mul_862);
			t_sample sub_860 = (add_851 - add_850);
			t_sample add_847 = (sub_861 + sub_860);
			t_sample add_849 = (add_847 + in2);
			t_sample sub_944 = (add_849 - mul_945);
			t_sample mul_943 = (sub_944 * 0.75);
			t_sample add_942 = (mul_943 + tap_947);
			t_sample sub_937 = (add_942 - mul_938);
			t_sample mul_936 = (sub_937 * 0.625);
			t_sample add_935 = (mul_936 + tap_940);
			t_sample sub_930 = (add_935 - mul_931);
			t_sample mul_929 = (sub_930 * 0.625);
			t_sample add_928 = (mul_929 + tap_933);
			t_sample out2 = (mul_846 + add_928);
			t_sample add_859 = (add_847 + in1);
			t_sample sub_972 = (add_859 - mul_973);
			t_sample mul_971 = (sub_972 * 0.75);
			t_sample add_970 = (mul_971 + tap_975);
			t_sample sub_963 = (add_970 - mul_964);
			t_sample mul_962 = (sub_963 * 0.625);
			t_sample add_961 = (mul_962 + tap_966);
			t_sample sub_956 = (add_961 - mul_957);
			t_sample mul_955 = (sub_956 * 0.625);
			t_sample add_954 = (mul_955 + tap_959);
			t_sample out1 = (mul_858 + add_954);
			t_sample history_997_next_1065 = mix_998;
			t_sample history_885_next_1066 = mix_886;
			t_sample history_897_next_1067 = mix_898;
			t_sample history_891_next_1068 = mix_892;
			t_sample history_993_next_1069 = mix_994;
			m_delay_17.write(add_879);
			m_delay_16.write(add_881);
			m_delay_15.write(add_880);
			m_delay_14.write(add_882);
			m_delay_13.write(sub_930);
			m_delay_12.write(sub_956);
			m_delay_11.write(add_977);
			m_delay_10.write(sub_937);
			m_delay_9.write(sub_979);
			m_delay_8.write(sub_963);
			m_delay_7.write(sub_944);
			m_delay_6.write(sub_972);
			m_history_5 = history_997_next_1065;
			m_history_4 = history_885_next_1066;
			m_history_3 = history_897_next_1067;
			m_history_2 = history_891_next_1068;
			m_history_1 = history_993_next_1069;
			m_delay_6.step();
			m_delay_7.step();
			m_delay_8.step();
			m_delay_9.step();
			m_delay_10.step();
			m_delay_11.step();
			m_delay_12.step();
			m_delay_13.step();
			m_delay_14.step();
			m_delay_15.step();
			m_delay_16.step();
			m_delay_17.step();
			// assign results to output buffer;
			(*(__out1++)) = out1;
			(*(__out2++)) = out2;
			
		};
		return __exception;
		
	};
开发者ID:DISTRHO,项目名称:DPF-Max-Gen,代码行数:101,代码来源:gen_exported.cpp

示例3: perform


//.........这里部分代码省略.........
			double delta_2275 = m_delta_31(mod_2307);
			double sah_2254 = m_sah_32(mul_2273, delta_2275, 0);
			double sah_2274 = m_sah_33(mstosamps_2309, delta_2275, 0);
			double mul_2261 = (sah_2274 * mod_2307);
			double tap_2300 = m_delay_12.read_linear(mul_2262);
			double tap_2301 = m_delay_12.read_linear(mul_2261);
			double tap_2302 = m_delay_12.read_linear(mul_2260);
			double tap_2303 = m_delay_12.read_linear(mul_2259);
			double mul_2282 = (tap_2303 * mul_2278);
			double mul_2288 = (tap_2302 * mul_2279);
			double mul_2298 = (tap_2300 * mul_2281);
			double sub_2306 = (mod_2307 - 0.5);
			double mul_2305 = (sub_2306 * 3.1415926535898);
			double cos_2304 = cos(mul_2305);
			double mul_2280 = (cos_2304 * cos_2304);
			double mul_2297 = (tap_2301 * mul_2280);
			double phasor_2399 = m_phasor_34(div_2378, samples_to_seconds);
			double add_2377 = ((m_history_5 + phasor_2399) + 0.5);
			double mod_2376 = safemod(add_2377, 1);
			double delta_2356 = m_delta_35(mod_2376);
			double sah_2335 = m_sah_36(mul_2354, delta_2356, 0);
			double sah_2355 = m_sah_37(mstosamps_2393, delta_2356, 0);
			double mul_2344 = (sah_2355 * mod_2376);
			double sub_2375 = (mod_2376 - 0.5);
			double mul_2374 = (sub_2375 * 3.1415926535898);
			double cos_2373 = cos(mul_2374);
			double mul_2363 = (cos_2373 * cos_2373);
			double add_2398 = ((m_history_4 + phasor_2399) + 0);
			double mod_2397 = safemod(add_2398, 1);
			double delta_2340 = m_delta_38(mod_2397);
			double sah_2339 = m_sah_39(mul_2360, delta_2340, 0);
			double sah_2361 = m_sah_40(mstosamps_2393, delta_2340, 0);
			double mul_2346 = (sah_2361 * mod_2397);
			double sub_2396 = (mod_2397 - 0.5);
			double mul_2395 = (sub_2396 * 3.1415926535898);
			double cos_2394 = cos(mul_2395);
			double mul_2365 = (cos_2394 * cos_2394);
			double add_2392 = ((m_history_3 + phasor_2399) + 0.25);
			double mod_2391 = safemod(add_2392, 1);
			double delta_2359 = m_delta_41(mod_2391);
			double sah_2337 = m_sah_42(mul_2357, delta_2359, 0);
			double sah_2358 = m_sah_43(mstosamps_2393, delta_2359, 0);
			double mul_2345 = (sah_2358 * mod_2391);
			double sub_2390 = (mod_2391 - 0.5);
			double mul_2389 = (sub_2390 * 3.1415926535898);
			double cos_2388 = cos(mul_2389);
			double mul_2364 = (cos_2388 * cos_2388);
			double add_2371 = ((m_history_2 + phasor_2399) + 0.75);
			double mod_2370 = safemod(add_2371, 1);
			double delta_2353 = m_delta_44(mod_2370);
			double sah_2333 = m_sah_45(mul_2351, delta_2353, 0);
			double sah_2352 = m_sah_46(mstosamps_2393, delta_2353, 0);
			double mul_2343 = (sah_2352 * mod_2370);
			double tap_2384 = m_delay_11.read_linear(mul_2346);
			double tap_2385 = m_delay_11.read_linear(mul_2345);
			double tap_2386 = m_delay_11.read_linear(mul_2344);
			double tap_2387 = m_delay_11.read_linear(mul_2343);
			double mul_2382 = (tap_2384 * mul_2365);
			double mul_2381 = (tap_2385 * mul_2364);
			double mul_2372 = (tap_2386 * mul_2363);
			double sub_2369 = (mod_2370 - 0.5);
			double mul_2368 = (sub_2369 * 3.1415926535898);
			double cos_2367 = cos(mul_2368);
			double mul_2362 = (cos_2367 * cos_2367);
			double mul_2366 = (tap_2387 * mul_2362);
			double mul_2320 = ((((((((mul_2298 + mul_2297) + mul_2288) + mul_2282) + mul_2366) + mul_2372) + mul_2381) + mul_2382) * add_2321);
			double sub_2317 = (mul_2320 - (mul_2319 + mul_2318));
			double mix_2450 = (in1 + (m_mix_16 * (sub_2317 - in1)));
			double out1 = mix_2450;
			double y2_next_2440 = m_y_1;
			double history_2253_next_2441 = sah_2252;
			double history_2251_next_2442 = sah_2250;
			double history_2258_next_2443 = sah_2256;
			double history_2255_next_2444 = sah_2254;
			double history_2336_next_2445 = sah_2335;
			double history_2341_next_2446 = sah_2339;
			double history_2338_next_2447 = sah_2337;
			double history_2334_next_2448 = sah_2333;
			double y1_next_2449 = sub_2317;
			m_delay_12.write(in1);
			m_delay_11.write(in1);
			m_y_10 = y2_next_2440;
			m_history_9 = history_2253_next_2441;
			m_history_8 = history_2251_next_2442;
			m_history_7 = history_2258_next_2443;
			m_history_6 = history_2255_next_2444;
			m_history_5 = history_2336_next_2445;
			m_history_4 = history_2341_next_2446;
			m_history_3 = history_2338_next_2447;
			m_history_2 = history_2334_next_2448;
			m_y_1 = y1_next_2449;
			m_delay_11.step();
			m_delay_12.step();
			// assign results to output buffer;
			(*(__out1++)) = out1;
			
		};
		return __exception;
		
	};
开发者ID:ninodewit,项目名称:DPF-Max-Gen,代码行数:101,代码来源:gen_exported.cpp


注:本文中的Delay::write方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。