Skip to content

Commit

Permalink
Remove DC; adjust parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
chsh2 committed Aug 9, 2024
1 parent edc2d36 commit 15a3525
Show file tree
Hide file tree
Showing 7 changed files with 171 additions and 155 deletions.
4 changes: 2 additions & 2 deletions SlowSampler2.pd
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@
#X obj 733 252 hsl 80 16 -100 100 0 0 sld-mod_volume_factor sld-mod_volume_factor-r empty -2 -8 0 10 #ffffff #eeac76 #373737 0 0;
#X obj 712 272 cnv 15 50 16 empty label_replace Replace 0 9 0 12 #ffffff #637a9f 0;
#X obj 792 272 cnv 15 50 16 empty label_multiply Multiply 0 9 0 12 #ffffff #637a9f 0;
#X floatatom 820 292 6 0 100 0 - mod_pitch_factor-r mod_pitch_factor 10;
#X obj 733 292 hsl 80 16 0 100 0 0 sld-mod_pitch_factor sld-mod_pitch_factor-r empty -2 -8 0 10 #ffffff #eeac76 #373737 0 0;
#X floatatom 820 292 6 -100 100 0 - mod_pitch_factor-r mod_pitch_factor 10;
#X obj 733 292 hsl 80 16 -100 100 0 0 sld-mod_pitch_factor sld-mod_pitch_factor-r empty -2 -8 0 10 #ffffff #eeac76 #373737 0 0;
#X obj 865 292 cnv 15 20 16 empty empty % 0 9 0 12 #ffffff #637a9f 0;
#X obj 632 362 cnv 15 50 16 empty label_comb Comb 0 9 0 12 #ffffff #637a9f 0;
#X obj 632 422 cnv 15 50 16 empty label_lowpass Lowpass 0 9 0 12 #ffffff #637a9f 0;
Expand Down
4 changes: 2 additions & 2 deletions SlowSampler2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ param -name WavetableSynthEnabled -min 0 -max 1 -default 0 -nsteps 2;
param -name WavetableSynthLevel -label % -min 0 -max 100 -default 100;
param -name WavetableGrainSize -label ms -min 0 -max 200 -default 75;
param -name WavetableFormantShift -label semitone -min -12 -max 12 -default 0;
param -name WavetableFormantPreservation -label % -min 0 -max 100 -default 100;
param -name WavetableFormantPreservation -label % -min 0 -max 100 -default 0;

param -name UntunedAudioEnabled -min 0 -max 1 -default 0 -nsteps 2;
param -name UntunedAudioSynthLevel -label % -min 0 -max 100 -default 100;
Expand All @@ -47,7 +47,7 @@ param -name SubFileAutoStretch -min 0 -max 1 -default 0 -nsteps 2;
param -name ModVolumeEnabled -min 0 -max 1 -default 0 -nsteps 2;
param -name ModVolumeFactor -label % -min -100 -max 100 -default 100;
param -name ModPitchEnabled -min 0 -max 1 -default 0 -nsteps 2;
param -name ModPitchFactor -label % -min 0 -max 100 -default 100;
param -name ModPitchFactor -label % -min -100 -max 100 -default 100;
param -name ModToneEnabled -min 0 -max 1 -default 0 -nsteps 2;
param -name ModToneVocoderChannels -list 20/40/80;

Expand Down
4 changes: 2 additions & 2 deletions SlowSampler2FX.pd
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@
#X obj 733 252 hsl 80 16 -100 100 0 0 sld-mod_volume_factor sld-mod_volume_factor-r empty -2 -8 0 10 #ffffff #eeac76 #373737 0 0;
#X obj 712 272 cnv 15 50 16 empty label_replace Replace 0 9 0 12 #ffffff #637a9f 0;
#X obj 792 272 cnv 15 50 16 empty label_multiply Multiply 0 9 0 12 #ffffff #637a9f 0;
#X floatatom 820 292 6 0 100 0 - mod_pitch_factor-r mod_pitch_factor 10;
#X obj 733 292 hsl 80 16 0 100 0 0 sld-mod_pitch_factor sld-mod_pitch_factor-r empty -2 -8 0 10 #ffffff #eeac76 #373737 0 0;
#X floatatom 820 292 6 -100 100 0 - mod_pitch_factor-r mod_pitch_factor 10;
#X obj 733 292 hsl 80 16 -100 100 0 0 sld-mod_pitch_factor sld-mod_pitch_factor-r empty -2 -8 0 10 #ffffff #eeac76 #373737 0 0;
#X obj 865 292 cnv 15 20 16 empty empty % 0 9 0 12 #ffffff #637a9f 0;
#X obj 632 362 cnv 15 50 16 empty label_comb Comb 0 9 0 12 #ffffff #637a9f 0;
#X obj 632 422 cnv 15 50 16 empty label_lowpass Lowpass 0 9 0 12 #ffffff #637a9f 0;
Expand Down
4 changes: 2 additions & 2 deletions SlowSampler2FX.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ param -name WavetableSynthEnabled -min 0 -max 1 -default 0 -nsteps 2;
param -name WavetableSynthLevel -label % -min 0 -max 100 -default 100;
param -name WavetableGrainSize -label ms -min 0 -max 200 -default 75;
param -name WavetableFormantShift -label semitone -min -12 -max 12 -default 0;
param -name WavetableFormantPreservation -label % -min 0 -max 100 -default 100;
param -name WavetableFormantPreservation -label % -min 0 -max 100 -default 0;

param -name UntunedAudioEnabled -min 0 -max 1 -default 0 -nsteps 2;
param -name UntunedAudioSynthLevel -label % -min 0 -max 100 -default 100;
Expand All @@ -47,7 +47,7 @@ param -name SubFileAutoStretch -min 0 -max 1 -default 0 -nsteps 2;
param -name ModVolumeEnabled -min 0 -max 1 -default 0 -nsteps 2;
param -name ModVolumeFactor -label % -min -100 -max 100 -default 100;
param -name ModPitchEnabled -min 0 -max 1 -default 0 -nsteps 2;
param -name ModPitchFactor -label % -min 0 -max 100 -default 100;
param -name ModPitchFactor -label % -min -100 -max 100 -default 100;
param -name ModToneEnabled -min 0 -max 1 -default 0 -nsteps 2;
param -name ModToneVocoderChannels -list 20/40/80;

Expand Down
14 changes: 7 additions & 7 deletions modules/note_in_handler.pd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#N canvas 827 239 527 327 12;
#X obj 62 154 notein;
#X obj 62 383 pack f f f;
#X obj 68 1201 dac~;
#X obj 68 1257 dac~;
#X obj 205 830 r global_volume;
#X obj 205 863 + 100;
#X obj 205 892 dbtorms;
Expand Down Expand Up @@ -69,8 +69,8 @@
#X obj 304 650 voice_processor~;
#X obj 322 678 voice_processor~;
#X obj 341 704 voice_processor~;
#X obj 37 1152 hip~ 1;
#X obj 117 1152 hip~ 1;
#X obj 117 1208 hip~ 1;
#X obj 37 1208 hip~ 1;
#X connect 0 0 54 0;
#X connect 0 1 54 1;
#X connect 1 0 17 0;
Expand Down Expand Up @@ -99,8 +99,8 @@
#X connect 10 0 49 0;
#X connect 11 0 12 0;
#X connect 12 0 13 1;
#X connect 13 0 70 0;
#X connect 14 0 71 0;
#X connect 13 0 71 0;
#X connect 14 0 70 0;
#X connect 15 0 16 0;
#X connect 16 0 54 0;
#X connect 16 1 54 1;
Expand Down Expand Up @@ -163,5 +163,5 @@
#X connect 67 0 6 0;
#X connect 68 0 6 0;
#X connect 69 0 6 0;
#X connect 70 0 2 0;
#X connect 71 0 2 1;
#X connect 70 0 2 1;
#X connect 71 0 2 0;
190 changes: 103 additions & 87 deletions modules/sample_file_handler.pd
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
#N canvas 113 316 3840 2016 12;
#X obj 35 480 r main_start_position;
#X obj 35 509 * 0.01;
#X obj 35 555 *;
#X obj 335 480 r main_sample_length;
#X obj 185 509 * 0.01;
#X obj 185 555 *;
#X obj 185 480 r main_end_position;
#X obj 35 720 -;
#X obj 335 509 t b f;
#X obj 35 670 t b f;
#X obj 133 696 r main_sample_rate;
#X obj 133 732 t b f;
#X obj 35 771 /;
#X obj 35 863 * 1000;
#X text 95 862 Duration (ms) of playing the sample;
#X obj 35 824 *;
#X obj 278 655 r main_time_stretch;
#X obj 278 722 t b f;
#X obj 278 688 * 0.01;
#X obj 35 894 abs;
#X obj 203 614 s main_start_sample;
#X obj 371 614 s main_end_sample;
#X obj 278 810 s main_sample_length_to_play;
#X obj 35 937 s main_time_to_play;
#X obj 1222 529 mtof;
#X obj 1222 557 s main_base_freq;
#X obj 1532 518 samplerate~;
#X obj 1532 485 r pd-dsp-started;
#X obj 1532 556 / 128;
#X obj 1532 596 s fft_base_freq;
#X obj 1643 596 ftom;
#X obj 1643 625 s fft_base_pitch;
#X text 1222 458 Pitch offset calculation.;
#X text 35 447 Calculate time-related variables of the main sample.;
#X text 1534 458 The base frequency when performing FFT using [block~ 512 4 1];
#X obj 35 571 r main_start_position;
#X obj 35 600 * 0.01;
#X obj 35 646 *;
#X obj 335 571 r main_sample_length;
#X obj 185 600 * 0.01;
#X obj 185 646 *;
#X obj 185 571 r main_end_position;
#X obj 35 811 -;
#X obj 335 600 t b f;
#X obj 35 761 t b f;
#X obj 133 787 r main_sample_rate;
#X obj 133 823 t b f;
#X obj 35 862 /;
#X obj 35 954 * 1000;
#X text 95 953 Duration (ms) of playing the sample;
#X obj 35 915 *;
#X obj 278 746 r main_time_stretch;
#X obj 278 813 t b f;
#X obj 278 779 * 0.01;
#X obj 35 985 abs;
#X obj 203 705 s main_start_sample;
#X obj 371 705 s main_end_sample;
#X obj 278 901 s main_sample_length_to_play;
#X obj 35 1028 s main_time_to_play;
#X obj 1222 620 mtof;
#X obj 1222 648 s main_base_freq;
#X obj 1532 609 samplerate~;
#X obj 1532 576 r pd-dsp-started;
#X obj 1532 647 / 128;
#X obj 1532 687 s fft_base_freq;
#X obj 1643 687 ftom;
#X obj 1643 716 s fft_base_pitch;
#X text 1222 549 Pitch offset calculation.;
#X text 35 538 Calculate time-related variables of the main sample.;
#X text 1534 549 The base frequency when performing FFT using [block~ 512 4 1];
#X text 35 8 Load samples from GUI events.;
#X obj 35 291 soundfiler;
#X obj 35 112 openpanel;
Expand All @@ -45,13 +45,13 @@
#X obj 128 138 s camomile;
#X obj 278 39 r openpanel;
#X msg 128 112 openpanel;
#X obj 602 291 soundfiler;
#X obj 602 112 openpanel;
#X obj 778 320 unpack f f;
#X obj 602 39 r gui_load_sub_sample;
#X msg 602 252 read -resize \$1 sub_sample;
#X obj 602 350 s sub_sample_length;
#X obj 778 350 s sub_sample_rate;
#X obj 670 291 soundfiler;
#X obj 670 112 openpanel;
#X obj 846 320 unpack f f;
#X obj 670 39 r gui_load_sub_sample;
#X msg 670 252 read -resize \$1 sub_sample;
#X obj 670 350 s sub_sample_length;
#X obj 846 350 s sub_sample_rate;
#X obj 1222 112 pack f f f f;
#X obj 1266 74 r main_start_sample;
#X obj 1410 74 r main_end_sample;
Expand All @@ -68,65 +68,72 @@
#X text 1457 137 Play the sample at the original speed to detect the pitch.;
#X obj 1222 39 r gui_pitch_detection;
#X text 1222 8 Detect main sample pitch according to GUI events.;
#X obj 550 509 * 0.01;
#X obj 550 555 *;
#X obj 700 509 * 0.01;
#X obj 700 555 *;
#X obj 550 720 -;
#X obj 850 509 t b f;
#X obj 550 670 t b f;
#X obj 648 732 t b f;
#X obj 550 771 /;
#X obj 550 1037 * 1000;
#X text 610 1036 Duration (ms) of playing the sample;
#X obj 550 998 *;
#X obj 663 1004 t b f;
#X obj 663 970 * 0.01;
#X obj 550 1068 abs;
#X text 550 447 Calculate time-related variables of the sub sample.;
#X obj 550 480 r sub_start_position;
#X obj 700 480 r sub_end_position;
#X obj 850 480 r sub_sample_length;
#X obj 718 614 s sub_start_sample;
#X obj 886 614 s sub_end_sample;
#X obj 663 937 r sub_time_stretch;
#X obj 648 696 r sub_sample_rate;
#X obj 614 771 s sub_sample_length_to_play;
#X obj 550 1111 s sub_time_to_play;
#X obj 620 847 r sub_auto_stretch;
#X obj 550 886 utils/num_mix;
#X text 747 846 The option to use the main sample as the duration base.;
#X obj 550 600 * 0.01;
#X obj 550 646 *;
#X obj 700 600 * 0.01;
#X obj 700 646 *;
#X obj 550 811 -;
#X obj 850 600 t b f;
#X obj 550 761 t b f;
#X obj 648 823 t b f;
#X obj 550 862 /;
#X obj 550 1128 * 1000;
#X text 610 1127 Duration (ms) of playing the sample;
#X obj 550 1089 *;
#X obj 663 1095 t b f;
#X obj 663 1061 * 0.01;
#X obj 550 1159 abs;
#X text 550 538 Calculate time-related variables of the sub sample.;
#X obj 550 571 r sub_start_position;
#X obj 700 571 r sub_end_position;
#X obj 850 571 r sub_sample_length;
#X obj 718 705 s sub_start_sample;
#X obj 886 705 s sub_end_sample;
#X obj 663 1028 r sub_time_stretch;
#X obj 648 787 r sub_sample_rate;
#X obj 614 862 s sub_sample_length_to_play;
#X obj 550 1202 s sub_time_to_play;
#X obj 620 938 r sub_auto_stretch;
#X obj 550 977 utils/num_mix;
#X text 747 937 The option to use the main sample as the duration base.;
#X obj 190 71 t b b;
#X obj 220 112 0;
#X obj 278 97 spigot;
#X obj 370 68 == 0;
#X obj 220 138 s panel_id;
#X obj 370 39 r panel_id;
#X obj 708 138 s camomile;
#X obj 858 39 r openpanel;
#X msg 708 112 openpanel;
#X obj 770 71 t b b;
#X obj 858 97 spigot;
#X obj 800 138 s panel_id;
#X obj 950 39 r panel_id;
#X obj 800 112 1;
#X obj 950 68 == 1;
#X obj 776 138 s camomile;
#X obj 926 39 r openpanel;
#X msg 776 112 openpanel;
#X obj 838 71 t b b;
#X obj 926 97 spigot;
#X obj 868 138 s panel_id;
#X obj 1018 39 r panel_id;
#X obj 868 112 1;
#X obj 1018 68 == 1;
#X obj 35 168 s main_sample_path;
#X obj 35 215 r main_sample_path;
#X obj 602 168 s sub_sample_path;
#X obj 602 215 r sub_sample_path;
#X obj 670 168 s sub_sample_path;
#X obj 670 215 r sub_sample_path;
#X obj 243 211 file splitname;
#X msg 243 239 \; label_main_file_name label \$2;
#X obj 474 294 s camomile;
#X msg 474 267 gui redraw;
#X obj 474 239 t b;
#X obj 817 210 file splitname;
#X obj 1048 293 s camomile;
#X msg 1048 266 gui redraw;
#X obj 1048 238 t b;
#X msg 817 238 \; label_sub_file_name label \$2;
#X obj 885 210 file splitname;
#X obj 1116 293 s camomile;
#X msg 1116 266 gui redraw;
#X obj 1116 238 t b;
#X msg 885 238 \; label_sub_file_name label \$2;
#X obj 1222 335 s main_base_pitch-r;
#X obj 1222 494 r main_base_pitch;
#X obj 1222 585 r main_base_pitch;
#X msg -151 350 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, f 24;
#X obj -151 441 array set main_sample 0;
#X msg 492 350 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, f 23;
#X obj 492 441 array set sub_sample 0;
#X obj 1343 178 pipe 0;
#X msg 1345 151 0;
#X obj 1371 151 + 50;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 9 0;
Expand Down Expand Up @@ -163,6 +170,7 @@
#X connect 28 0 30 0;
#X connect 30 0 31 0;
#X connect 36 0 39 0;
#X connect 36 0 128 0;
#X connect 36 1 41 0;
#X connect 37 0 112 0;
#X connect 38 0 36 0;
Expand All @@ -178,6 +186,7 @@
#X connect 49 0 47 0;
#X connect 49 0 106 0;
#X connect 50 0 46 0;
#X connect 50 0 130 0;
#X connect 53 0 57 0;
#X connect 54 0 53 1;
#X connect 55 0 53 2;
Expand All @@ -193,7 +202,9 @@
#X connect 63 1 65 1;
#X connect 64 0 63 0;
#X connect 65 0 53 3;
#X connect 65 0 134 0;
#X connect 67 0 53 0;
#X connect 67 0 133 0;
#X connect 69 0 70 0;
#X connect 70 0 75 0;
#X connect 70 0 88 0;
Expand Down Expand Up @@ -251,3 +262,8 @@
#X connect 123 0 122 0;
#X connect 124 0 123 0;
#X connect 127 0 24 0;
#X connect 128 0 129 0;
#X connect 130 0 131 0;
#X connect 132 0 60 0;
#X connect 133 0 132 0;
#X connect 134 0 132 1;
Loading

0 comments on commit 15a3525

Please sign in to comment.