From f2d25e1c358361e021f3f1b4fcb2fbceb4148f6b Mon Sep 17 00:00:00 2001 From: porres Date: Mon, 26 Aug 2024 23:28:43 -0300 Subject: [PATCH] Update sfont~.c --- Code_source/Compiled/audio/sfont~/sfont~.c | 45 +- Documentation/Help-files/sfont~-help.pd | 477 +++++++-------------- 2 files changed, 193 insertions(+), 329 deletions(-) diff --git a/Code_source/Compiled/audio/sfont~/sfont~.c b/Code_source/Compiled/audio/sfont~/sfont~.c index 8add0eeb7..583f49f63 100644 --- a/Code_source/Compiled/audio/sfont~/sfont~.c +++ b/Code_source/Compiled/audio/sfont~/sfont~.c @@ -1,6 +1,6 @@ - -// Soundfont player based on FluidSynth (https://www.fluidsynth.org/) -// Copyright by Porres, see https://github.com/porres/pd-sfont +// [sfont~]: by Porres and Tim Schoen, a Soundfont player based on +// FluidLite https://github.com/divideconcept/FluidLite, which is a +// light version of FluidSynth (https://www.fluidsynth.org/) /* LICENSE: @@ -73,6 +73,7 @@ static void sfont_float(t_sfont *x, t_float f); static void sfont_getversion(void){ post("[sfont~] is using fluidlite 1.2.2"); + post("\n"); } static void sfont_verbose(t_sfont *x, t_floatarg f){ @@ -135,13 +136,13 @@ static void sfont_program_change(t_sfont *x, t_symbol *s, int ac, t_atom *av){ int bank = fluid_preset_get_banknum(preset); if(preset == NULL){ if(x->x_verbosity) - post("[sfont~]: couldn't load progam %d from bank %d", x->x_pgm, bank); + post("[sfont~]: couldn't load progam %d from bank %d\n", x->x_pgm, bank); } else{ x->x_bank = bank; const char* pname = fluid_preset_get_name(preset); if(x->x_verbosity) - post("[sfont~]: loaded \"%s\" (bank %d, pgm %d) in channel %d", + post("[sfont~]: loaded \"%s\" (bank %d, pgm %d) in channel %d\n", pname, x->x_bank, x->x_pgm, ch + 1); t_atom at[1]; SETSYMBOL(&at[0], gensym(pname)); @@ -171,17 +172,17 @@ static void sfont_bank(t_sfont *x, t_symbol *s, int ac, t_atom *av){ fluid_preset_t* preset = fluid_sfont_get_preset(x->x_sfont, x->x_bank, x->x_pgm); if(preset == NULL){ if(x->x_verbosity) - post("[sfont~]: couldn't load progam %d from bank %d", x->x_pgm, x->x_bank); + post("[sfont~]: couldn't load progam %d from bank %d\n", x->x_pgm, x->x_bank); } else{ fluid_synth_program_reset(x->x_synth); const char* pname = fluid_preset_get_name(preset); if(x->x_verbosity) - post("[sfont~]: loaded \"%s\" (bank %d, pgm %d) in channel %d", + post("[sfont~]: loaded \"%s\" (bank %d, pgm %d) in channel %d\n", pname, x->x_bank, x->x_pgm, ch + 1); t_atom at[1]; SETSYMBOL(&at[0], gensym(pname)); - outlet_anything(x->x_info_out, gensym("pname"), 1, at); + outlet_anything(x->x_info_out, gensym("preset"), 1, at); } } else @@ -472,18 +473,39 @@ static void sfont_info(t_sfont *x){ } post("Loaded soundfont: %s", fluid_sfont_get_name(x->x_sfont)); post("------------------- presets -------------------"); - int i = 1; fluid_preset_t* preset = fluid_sfont_get_preset(x->x_sfont, 0, 0); - if(!preset) return; + if(!preset) + return; fluid_sfont_iteration_start(x->x_sfont); while((fluid_sfont_iteration_next(x->x_sfont, preset))){ int bank = preset->get_banknum(preset), pgm = preset->get_num(preset); const char* name = preset->get_name(preset); - post("%03d - bank (%d) pgm (%d) name (%s)", i++, bank, pgm, name); + post("bank (%02d) pgm (%03d) preset name (%s)", bank, pgm, name); } post("\n"); } +static void sfont_dump(t_sfont *x){ + if(x->x_sfname == NULL){ + post("[sfont~]: no soundfont loaded, nothing to dump"); + return; + } + t_atom at[3]; + SETSYMBOL(&at[0], gensym("name")); + SETSYMBOL(&at[1], gensym(fluid_sfont_get_name(x->x_sfont))); + outlet_list(x->x_info_out, &s_list, 2, at); + fluid_preset_t* preset = fluid_sfont_get_preset(x->x_sfont, 0, 0); + if(!preset) + return; + fluid_sfont_iteration_start(x->x_sfont); + while((fluid_sfont_iteration_next(x->x_sfont, preset))){ + SETFLOAT(&at[0], preset->get_banknum(preset)); + SETFLOAT(&at[1], preset->get_num(preset)); + SETSYMBOL(&at[2], gensym(preset->get_name(preset))); + outlet_list(x->x_info_out, &s_list, 3, at); + } +} + static void fluid_do_load(t_sfont *x, t_symbol *name){ const char* filename = name->s_name; const char* ext = strrchr(filename, '.'); @@ -689,6 +711,7 @@ void sfont_tilde_setup(void){ class_addmethod(sfont_class, (t_method)sfont_getversion, gensym("version"), 0); class_addmethod(sfont_class, (t_method)sfont_verbose, gensym("verbose"), A_FLOAT, 0); class_addmethod(sfont_class, (t_method)sfont_info, gensym("info"), 0); + class_addmethod(sfont_class, (t_method)sfont_dump, gensym("dump"), 0); class_addmethod(sfont_class, (t_method)sfont_click, gensym("click"), A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0); elsefile_setup(); } diff --git a/Documentation/Help-files/sfont~-help.pd b/Documentation/Help-files/sfont~-help.pd index 9d973fa06..c4f47d447 100644 --- a/Documentation/Help-files/sfont~-help.pd +++ b/Documentation/Help-files/sfont~-help.pd @@ -1,73 +1,50 @@ -#N canvas 461 58 563 477 10; -#X obj 306 4 cnv 15 250 40 empty empty empty 12 13 0 18 #7c7c7c #e0e4dc -0; +#N canvas 461 58 563 493 10; +#X obj 306 4 cnv 15 250 40 empty empty empty 12 13 0 18 #7c7c7c #e0e4dc 0; #N canvas 382 141 749 319 (subpatch) 0; #X coords 0 -1 1 1 252 42 2 0 0; #X restore 305 3 pd; -#X obj 345 11 cnv 10 10 10 empty empty ELSE 0 15 2 30 #7c7c7c #e0e4dc -0; -#X obj 25 40 cnv 4 4 4 empty empty Soundfont 0 28 2 18 #e0e0e0 #000000 -0; -#X obj 458 11 cnv 10 10 10 empty empty EL 0 6 2 13 #7c7c7c #e0e4dc -0; -#X obj 478 11 cnv 10 10 10 empty empty Locus 0 6 2 13 #7c7c7c #e0e4dc -0; -#X obj 515 11 cnv 10 10 10 empty empty Solus' 0 6 2 13 #7c7c7c #e0e4dc -0; -#X obj 464 26 cnv 10 10 10 empty empty ELSE 0 6 2 13 #7c7c7c #e0e4dc -0; -#X obj 502 26 cnv 10 10 10 empty empty library 0 6 2 13 #7c7c7c #e0e4dc -0; -#X obj 110 40 cnv 4 4 4 empty empty synthesizer 0 28 2 18 #e0e0e0 #000000 -0; -#X obj 2 264 cnv 3 550 3 empty \$0-pddp.cnv.inlets inlets 8 12 0 13 -#dcdcdc #000000 0; -#X obj 2 300 cnv 3 550 3 empty \$0-pddp.cnv.outlets outlets 8 12 0 -13 #dcdcdc #000000 0; -#X obj 2 426 cnv 3 550 3 empty \$0-pddp.cnv.argument arguments 8 12 -0 13 #dcdcdc #000000 0; -#X obj 107 275 cnv 17 3 17 empty \$0-pddp.cnv.let.0 0 5 9 0 16 #dcdcdc -#9c9c9c 0; -#X obj 107 306 cnv 17 3 17 empty \$0-pddp.cnv.let.n 0 5 9 0 16 #dcdcdc -#9c9c9c 0; -#X obj 107 326 cnv 17 3 17 empty \$0-pddp.cnv.let.r 1 5 9 0 16 #dcdcdc -#9c9c9c 0; -#X text 159 307 signal; -#X text 159 327 signal; -#X text 160 432 1) symbol; -#X text 221 432 - soundfont file to load (default none); -#X obj 4 451 cnv 15 552 21 empty empty empty 20 12 0 14 #e0e0e0 #202020 -0; -#X text 202 307 - left output signal of stereo output, f 39; -#X text 202 327 - right output signal of stereo output, f 39; -#X obj 3 3 cnv 15 301 42 empty empty sfont~ 20 20 2 37 #e0e0e0 #000000 -0; +#X obj 345 11 cnv 10 10 10 empty empty ELSE 0 15 2 30 #7c7c7c #e0e4dc 0; +#X obj 25 40 cnv 4 4 4 empty empty Soundfont 0 28 2 18 #e0e0e0 #000000 0; +#X obj 458 11 cnv 10 10 10 empty empty EL 0 6 2 13 #7c7c7c #e0e4dc 0; +#X obj 478 11 cnv 10 10 10 empty empty Locus 0 6 2 13 #7c7c7c #e0e4dc 0; +#X obj 515 11 cnv 10 10 10 empty empty Solus' 0 6 2 13 #7c7c7c #e0e4dc 0; +#X obj 464 26 cnv 10 10 10 empty empty ELSE 0 6 2 13 #7c7c7c #e0e4dc 0; +#X obj 502 26 cnv 10 10 10 empty empty library 0 6 2 13 #7c7c7c #e0e4dc 0; +#X obj 110 40 cnv 4 4 4 empty empty synthesizer 0 28 2 18 #e0e0e0 #000000 0; +#X obj 2 278 cnv 3 550 3 empty \$0-pddp.cnv.inlets inlets 8 12 0 13 #dcdcdc #000000 0; +#X obj 2 314 cnv 3 550 3 empty \$0-pddp.cnv.outlets outlets 8 12 0 13 #dcdcdc #000000 0; +#X obj 2 440 cnv 3 550 3 empty \$0-pddp.cnv.argument arguments 8 12 0 13 #dcdcdc #000000 0; +#X obj 107 289 cnv 17 3 17 empty \$0-pddp.cnv.let.0 0 5 9 0 16 #dcdcdc #9c9c9c 0; +#X obj 107 320 cnv 17 3 17 empty \$0-pddp.cnv.let.n 0 5 9 0 16 #dcdcdc #9c9c9c 0; +#X obj 107 340 cnv 17 3 17 empty \$0-pddp.cnv.let.r 1 5 9 0 16 #dcdcdc #9c9c9c 0; +#X text 159 321 signal; +#X text 159 341 signal; +#X text 160 446 1) symbol; +#X text 221 446 - soundfont file to load (default none); +#X obj 4 465 cnv 15 552 21 empty empty empty 20 12 0 14 #e0e0e0 #202020 0; +#X text 202 321 - left output signal of stereo output, f 39; +#X text 202 341 - right output signal of stereo output, f 39; +#X obj 3 3 cnv 15 301 42 empty empty sfont~ 20 20 2 37 #e0e0e0 #000000 0; #N canvas 0 22 450 278 (subpatch) 0; #X coords 0 1 100 -1 302 42 1; #X restore 2 3 graph; -#N canvas 278 95 951 519 basic 0; +#N canvas 340 138 957 534 basic 0; #X obj 189 154 + 1; -#X obj 189 131 hradio 15 1 0 4 empty empty empty 0 -8 0 10 #dfdfdf -#000000 #000000 0; +#X obj 189 131 hradio 15 1 0 4 empty empty empty 0 -8 0 10 #dfdfdf #000000 #000000 0; #X floatatom 189 176 4 0 0 0 - - - 0; #X obj 114 199 list append 1; #X listbox 114 164 8 0 0 0 - - - 12; #X listbox 114 223 9 0 0 0 - - - 16; #X floatatom 284 213 4 0 127 0 - - - 0; -#X obj 284 125 vradio 15 1 0 5 empty empty empty 0 -8 0 10 #dfdfdf -#000000 #000000 0; +#X obj 284 125 vradio 15 1 0 5 empty empty empty 0 -8 0 10 #dfdfdf #000000 #000000 0; #X floatatom 337 213 4 0 127 0 - - - 0; -#X obj 337 125 vradio 15 1 0 4 empty empty empty 0 -8 0 10 #dfdfdf -#000000 #000000 0; +#X obj 337 125 vradio 15 1 0 4 empty empty empty 0 -8 0 10 #dfdfdf #000000 #000000 0; #X obj 337 192 + 1; -#X text 622 14 SoundFont is a file format for sample-based instrument -sounds. If you are not familiar with it \, check:, f 44; +#X text 622 14 SoundFont is a file format for sample-based instrument sounds. If you are not familiar with it \, check:, f 44; #X floatatom 417 210 4 0 1000 0 - - - 0; -#X obj 417 122 vradio 15 1 0 5 empty empty empty 0 -8 0 10 #dfdfdf -#000000 #000000 0; +#X obj 417 122 vradio 15 1 0 5 empty empty empty 0 -8 0 10 #dfdfdf #000000 #000000 0; #X floatatom 473 210 4 0 127 0 - - - 0; -#X obj 473 122 vradio 15 1 0 4 empty empty empty 0 -8 0 10 #dfdfdf -#000000 #000000 0; +#X obj 473 122 vradio 15 1 0 4 empty empty empty 0 -8 0 10 #dfdfdf #000000 #000000 0; #X obj 473 189 + 1; #X text 334 104 channel; #X text 470 104 channel; @@ -75,99 +52,69 @@ sounds. If you are not familiar with it \, check:, f 44; #X text 28 25 shift + click; #X text 10 44 to hold keys -->; #X msg 124 305 info; -#X obj 42 280 tgl 17 0 empty empty empty 17 7 0 10 #dfdfdf #000000 -#000000 0 1; +#X obj 42 280 tgl 17 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1; #X msg 42 305 verbose \$1; #X text 50 218 Pitch \; Velocity \; Channel; #X msg 172 261 version; -#X text 587 104 Ain't got none? Download some Soundfonts from:, f -41; -#X text 527 154 Play notes with either 'note' or list messages \, whose -arguments are: MIDI Pitch \, Velocity and optional channel number (counting -from 1). If no channel number is given \, then a default channel 1 -is used. The minimum and default number of channels by is 16 but you -can set up to 256 with the '-ch' flag., f 65; +#X text 594 104 Ain't got none? Download some Soundfonts from:, f 41; +#X text 528 160 Play notes with either 'note' or list messages \, whose arguments are: MIDI Pitch \, Velocity and optional channel number (counting from 1). If no channel number is given \, then a default channel 1 is used. The minimum and default number of channels by is 16 but you can set up to 256 with the '-ch' flag., f 66; #X text 117 470 preset name when loading a program -->; -#X text 755 122 (and check the resources for converters and editors) -, f 27; +#X text 762 122 (and check the resources for converters and editors), f 27; #X msg 362 321 ctl \$1 0 1; -#X obj 362 297 tgl 17 0 empty empty empty 17 7 0 10 #dfdfdf #000000 -#000000 0 1; +#X obj 362 297 tgl 17 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1; #X text 271 104 program; #X text 411 104 bank, f 6; #X text 385 298 bank 0/1 in ch 1; -#X text 503 323 Some files - like the "waves.sf2" file used here - -include different bank numbers with different programs each. A different -program means usually a different sample (as in here). Set the program -number with the 'pgm' message. You can optionally set a channel to -load the program into a specific channel (by default it loads on channel -1). You can then load different programs into different channels and -use the note and other MIDI messages to access them., f 69; +#X text 510 314 Some files - like the "waves.sf2" file used here - include different bank numbers with different programs each. A different program means usually a different sample (as in here). Set the program number with the 'pgm' message. You can optionally set a channel to load the program into a specific channel (by default it loads on channel 1). You can then load different programs into different channels and use the note and other MIDI messages to access them., f 69; #X text 433 315 control number 0, f 8; -#X text 503 406 Similarly \, you can choose a different bank of programs -into a channel (if no channel is given \, channel 1 is used). The 'bank' -message sets the bank number and loads the previously set program number -from the new bank. You can set another program number right next with -the 'pgm' message or you can also use the control change message 0 -\, which also sets the bank number into a channel but requires you -to load a program number next so a program can be loaded in the channel -(see next example for more about control messages)., f 69; +#X text 510 398 Similarly \, you can choose a different bank of programs into a channel (if no channel is given \, channel 1 is used). The 'bank' message sets the bank number and loads the previously set program number from the new bank. You can set another program number right next with the 'pgm' message or you can also use the control change message 0 \, which also sets the bank number into a channel but requires you to load a program number next so a program can be loaded in the channel (see next example for more about control messages)., f 69; #X obj 355 425 route preset; -#X text 527 214 If the verbosity flag is given (-v) \, the terminal -window prints the 'version' (same as "version" message). When loading -a file \, it prints the soundfont name \, its banks \, programs and -preset names (this also given by the "info" message). In verbosity -mode \, the terminal window also prints bank \, program and preset -name when you load a program or if it fails. Verbosity is also set -by the "verbose" message. The preset name is also output as a 'preset' -message in the rightmost "info" outlet when loading a program., f -65; -#X obj 232 360 else/sfont~ -v -ch 32 sf/waves.sf2, f 21; #X obj 232 239 else/pack2 pgm f 1; #X obj 362 236 else/pack2 bank f 1; -#X obj 636 56 else/openfile -h https://en.wikipedia.org/wiki/SoundFont -; -#X obj 628 121 else/openfile -h https://github.com/FluidSynth/fluidsynth/wiki/SoundFont -fluidsynth's github; -#X obj 636 73 else/openfile -h https://freepats.zenvoid.org/sf2/SF2_Intro.txt -; +#X obj 636 56 else/openfile -h https://en.wikipedia.org/wiki/SoundFont; +#X obj 635 121 else/openfile -h https://github.com/FluidSynth/fluidsynth/wiki/SoundFont fluidsynth's github; +#X obj 636 73 else/openfile -h https://freepats.zenvoid.org/sf2/SF2_Intro.txt; #X obj 114 16 else/keyboard 17 80 4 3 0 0 empty empty; #X obj 222 403 else/out~; #X obj 355 466 else/display; #X obj 362 261 else/display; #X obj 232 269 else/display; +#X obj 375 365 print info; +#X obj 232 360 else/sfont~ -v -ch 32 sf/waves.sf2, f 21; +#X text 528 220 If the verbosity flag is given (-v) \, [sfont~] prints the version as in the 'version' message when loading the object. When loading a fil \, soundfont name \, its banks \, programs and preset names (this also given by the "info" message). In verbosity mode \, the terminal window also prints bank \, program and preset name when you load a program or if it fails. Verbosity is also set by the "verbose" message. The preset name is also output as a 'preset' message in the rightmost "info" outlet when loading a program., f 66; #X connect 0 0 2 0; #X connect 1 0 0 0; #X connect 2 0 3 1; #X connect 3 0 5 0; #X connect 4 0 3 0; -#X connect 5 0 41 0; -#X connect 6 0 42 1; +#X connect 5 0 51 0; +#X connect 6 0 40 1; #X connect 7 0 6 0; -#X connect 8 0 42 2; +#X connect 8 0 40 2; #X connect 9 0 10 0; #X connect 10 0 8 0; -#X connect 12 0 43 1; +#X connect 12 0 41 1; #X connect 13 0 12 0; -#X connect 14 0 43 2; +#X connect 14 0 41 2; #X connect 15 0 16 0; #X connect 16 0 14 0; -#X connect 22 0 41 0; +#X connect 22 0 51 0; #X connect 23 0 24 0; -#X connect 24 0 41 0; -#X connect 26 0 41 0; -#X connect 31 0 41 0; +#X connect 24 0 51 0; +#X connect 26 0 51 0; +#X connect 31 0 51 0; #X connect 32 0 31 0; -#X connect 39 0 49 0; +#X connect 39 0 47 0; +#X connect 40 0 49 0; #X connect 41 0 48 0; -#X connect 41 1 48 1; -#X connect 41 2 39 0; -#X connect 42 0 51 0; -#X connect 43 0 50 0; -#X connect 47 0 4 0; -#X connect 50 0 41 0; -#X connect 51 0 41 0; -#X restore 488 190 pd basic; +#X connect 45 0 4 0; +#X connect 48 0 51 0; +#X connect 49 0 51 0; +#X connect 51 0 46 0; +#X connect 51 1 46 1; +#X connect 51 2 39 0; +#X connect 51 2 50 0; +#X restore 488 200 pd basic; #N canvas 623 71 417 561 MIDI-in 0; #N canvas 396 60 656 589 MIDI-input 0; #X obj 92 117 ctlin; @@ -190,53 +137,34 @@ fluidsynth's github; #X obj 101 548 outlet; #X obj 119 269 bendin; #X obj 49 39 - 1; -#X text 188 35 Using Vanilla's MIDI input objects for specific MIDI -messages., f 47; +#X text 188 35 Using Vanilla's MIDI input objects for specific MIDI messages., f 47; #X text 195 142 touch -; #X text 201 156 polytouch -; #X text 249 128 bend -; #X text 207 170 pgm -; #X text 237 114 ctl -; -#X text 335 114 control change: value \, control \, channel (optional) -, f 51; +#X text 335 114 control change: value \, control \, channel (optional), f 51; #X text 335 128 bend: value \, channel (optional), f 51; -#X text 335 142 channel aftertouch: value \, channel (optional), f -51; -#X text 335 156 key aftertouch: value \, key \, channel (optional) -, f 51; -#X text 335 170 program change: program \, channel (optional), f 51 -; -#X text 187 67 All messages take a final channel argument. If this -last element of the message is not given \, then a default channel -1 is used., f 64; +#X text 335 142 channel aftertouch: value \, channel (optional), f 51; +#X text 335 156 key aftertouch: value \, key \, channel (optional), f 51; +#X text 335 170 program change: program \, channel (optional), f 51; +#X text 187 67 All messages take a final channel argument. If this last element of the message is not given \, then a default channel 1 is used., f 64; #X msg 381 475 bend \$1; -#X obj 298 341 vsl 22 100 0 16383 0 0 empty empty empty 0 -9 0 10 #dcdcdc -#000000 #000000 0 1; +#X obj 298 341 vsl 22 100 0 16383 0 0 empty empty empty 0 -9 0 10 #dcdcdc #000000 #000000 0 1; #X obj 381 343 sel 0; #X obj 381 395 line; #X msg 317 308 set \$1; #X obj 381 422 change; #X msg 381 369 8192 150; -#X text 231 206 Note that vanilla's [pgmin] object is indexed from -1 so you need to subtract 1 to use it on [sfont~] \, which is indexed -from 0 ([pgm.in] from ELSE is also indexed from 0 by the way). The -example below emulates a bend wheel \, maybe an extra object for the -future...; +#X text 231 206 Note that vanilla's [pgmin] object is indexed from 1 so you need to subtract 1 to use it on [sfont~] \, which is indexed from 0 ([pgm.in] from ELSE is also indexed from 0 by the way). The example below emulates a bend wheel \, maybe an extra object for the future...; #N canvas 546 185 549 330 sysex 0; -#X msg 114 149 sysex 127 127 8 8 3 127 127 64 64 64 64 64 64 64 64 -64 64 64 64, f 33; -#X msg 131 197 sysex 127 127 8 8 3 127 127 74 50 67 85 61 78 54 71 -47 64 81 57, f 33; +#X msg 114 149 sysex 127 127 8 8 3 127 127 64 64 64 64 64 64 64 64 64 64 64 64, f 33; +#X msg 131 197 sysex 127 127 8 8 3 127 127 74 50 67 85 61 78 54 71 47 64 81 57, f 33; #X text 322 153 12-tet (default tuning); -#X text 352 198 quarter-comma meantone (has wolf fifth at Ab - Eb) -, f 27; +#X text 352 198 quarter-comma meantone (has wolf fifth at Ab - Eb), f 27; #X obj 114 249 outlet; #X obj 47 44 sysexin; -#X text 94 70 A specific sysex message can be set via a 'sysex' message -or via raw input. Sysex messages are useful for advanced settings. -One example is "mts-tuning" standards used in this example \, where -you can retune MIDI pitches \, but [sfont~] also has microtonal capabilities -so this is not needed., f 62; +#X text 94 70 A specific sysex message can be set via a 'sysex' message or via raw input. Sysex messages are useful for advanced settings. One example is "mts-tuning" standards used in this example \, where you can retune MIDI pitches \, but [sfont~] also has microtonal capabilities so this is not needed., f 62; #X text 100 46 input from vanilla's [sysexin] (raw input); #X connect 0 0 4 0; #X connect 1 0 4 0; @@ -287,19 +215,15 @@ so this is not needed., f 62; #X connect 43 0 32 0; #X restore 154 367 pd MIDI-input; #N canvas 278 81 766 498 control-messages 0; -#X obj 270 405 tgl 17 0 empty empty empty 17 7 0 10 #dfdfdf #000000 -#000000 0 127; -#X obj 171 405 tgl 17 0 empty empty empty 17 7 0 10 #dfdfdf #000000 -#000000 0 127; +#X obj 270 405 tgl 17 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 127; +#X obj 171 405 tgl 17 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 127; #X obj 28 439 outlet; -#X obj 82 187 vsl 18 100 0 127 0 0 empty empty empty 0 -9 0 10 #dfdfdf -#000000 #000000 0 1; +#X obj 82 187 vsl 18 100 0 127 0 0 empty empty empty 0 -9 0 10 #dfdfdf #000000 #000000 0 1; #X obj 82 336 s \$0-ctl; #X obj 58 409 r \$0-ctl; #X obj 171 459 s \$0-ctl; #X obj 270 459 s \$0-ctl; -#X obj 533 382 tgl 17 0 empty empty empty 17 7 0 10 #dfdfdf #000000 -#000000 0 127; +#X obj 533 382 tgl 17 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 127; #X obj 533 442 s \$0-ctl; #X text 164 384 sustain pedal; #X text 264 384 tonal or sostenuto pedal; @@ -311,22 +235,15 @@ so this is not needed., f 62; #X text 147 162 volume; #X obj 159 336 s \$0-ctl; #X obj 550 228 s \$0-ctl; -#X obj 437 212 tgl 17 0 empty empty empty 17 7 0 10 #dfdfdf #000000 -#000000 0 127; -#X obj 357 167 vsl 18 100 1 127 1 1 empty empty empty 0 -9 0 10 #dfdfdf -#000000 #000000 0 1; -#X obj 159 187 vsl 18 100 0 127 0 0 empty empty empty 0 -9 0 10 #dfdfdf -#000000 #000000 0 1; -#X obj 550 163 tgl 17 0 empty empty empty 17 7 0 10 #dfdfdf #000000 -#000000 0 127; +#X obj 437 212 tgl 17 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 127; +#X obj 357 167 vsl 18 100 1 127 1 1 empty empty empty 0 -9 0 10 #dfdfdf #000000 #000000 0 1; +#X obj 159 187 vsl 18 100 0 127 0 0 empty empty empty 0 -9 0 10 #dfdfdf #000000 #000000 0 1; +#X obj 550 163 tgl 17 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 127; #X text 387 171 <-- portamento speed; -#X text 29 15 The control change parameters are programmed in a given -synthesizer \, but if usually follows some standards like the messages -where using here., f 72; +#X text 29 15 The control change parameters are programmed in a given synthesizer \, but if usually follows some standards like the messages where using here., f 72; #X text 487 11 For reference \, see:; #X obj 244 335 s \$0-ctl; -#X obj 244 186 vsl 18 100 0 127 0 0 empty empty empty 0 -9 0 10 #dfdfdf -#000000 #000000 0 1; +#X obj 244 186 vsl 18 100 0 127 0 0 empty empty empty 0 -9 0 10 #dfdfdf #000000 #000000 0 1; #X text 241 162 pan; #X msg 276 277 64; #X text 557 382 flush note ons (panic); @@ -342,17 +259,13 @@ where using here., f 72; #X text 510 31 and:; #X msg 550 201 ctl \$1 68; #X text 577 162 <-- set to legato (monophonic) mode, f 18; -#X obj 537 278 hradio 15 1 0 4 empty empty empty 0 -8 0 10 #dfdfdf -#000000 #000000 0; +#X obj 537 278 hradio 15 1 0 4 empty empty empty 0 -8 0 10 #dfdfdf #000000 #000000 0; #X obj 537 337 s \$0-ctl; #X msg 537 310 ctl \$1 0; -#X text 611 284 sets bank number but doesn't load a program (you need -to use the 'pgm' message next., f 18; +#X text 611 284 sets bank number but doesn't load a program (you need to use the 'pgm' message next., f 18; #X obj 360 451 else/suspedal; -#X obj 611 12 else/openfile -h https://www.midi.org/specifications-old/item/table-3-control-change-messages-data-bytes-2 -MIDI Specifications; -#X obj 545 32 else/openfile -h https://github.com/FluidSynth/fluidsynth/wiki/FluidFeatures#midi-control-change-implementation-chart -Fluid Specificaitions; +#X obj 611 12 else/openfile -h https://www.midi.org/specifications-old/item/table-3-control-change-messages-data-bytes-2 MIDI Specifications; +#X obj 545 32 else/openfile -h https://github.com/FluidSynth/fluidsynth/wiki/FluidFeatures#midi-control-change-implementation-chart Fluid Specificaitions; #X obj 28 63 else/keyboard 17 80 6 1 0 0 empty empty; #X connect 0 0 37 0; #X connect 1 0 38 0; @@ -379,26 +292,13 @@ Fluid Specificaitions; #X connect 51 0 2 0; #X restore 170 417 pd control-messages; #X obj 141 337 midiin; -#X obj 124 285 tgl 17 0 empty empty empty 17 7 0 10 #dfdfdf #000000 -#000000 0 1; +#X obj 124 285 tgl 17 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1; #X text 244 366 <-- open; #X text 227 399 More on:; -#X text 32 195 Raw MIDI is also possible via float input \, so you -can use Pd vanillas [midiin] object or play a MIDI file from [midi]. -Sysex messages is also possible via a 'sysex' message or raw MIDI input -from a MIDI file or the [sysexin] object. You can also use vanilla's -other MIDI objects like [pgmin] of course or the ones from ELSE \, -such as [pgm.in] \, see [pd MIDI-input] below.; -#X text 32 143 The bank message is not a proper MIDI message on its -own but it is usually given by the control message number 0 as in the -last example - control change is also responsible for other usual parameters -as we'll see in this example.; -#X text 32 23 We've seen the list message which acts in the same way -as a 'note' message \, we've also seen the 'pgm' (program change) message -and these two are MIDI messages. Other MIDI messages are:; -#X text 92 68 - 'ctl' for 'control change \; - 'bend' for Pitch Bend -\; - 'touchin' for channel aftertouch \; - 'polytouchin' for key aftertouch -\; - 'sysex' for Sysex messages; +#X text 32 195 Raw MIDI is also possible via float input \, so you can use Pd vanillas [midiin] object or play a MIDI file from [midi]. Sysex messages is also possible via a 'sysex' message or raw MIDI input from a MIDI file or the [sysexin] object. You can also use vanilla's other MIDI objects like [pgmin] of course or the ones from ELSE \, such as [pgm.in] \, see [pd MIDI-input] below.; +#X text 32 143 The bank message is not a proper MIDI message on its own but it is usually given by the control message number 0 as in the last example - control change is also responsible for other usual parameters as we'll see in this example.; +#X text 32 23 We've seen the list message which acts in the same way as a 'note' message \, we've also seen the 'pgm' (program change) message and these two are MIDI messages. Other MIDI messages are:; +#X text 92 68 - 'ctl' for 'control change \; - 'bend' for Pitch Bend \; - 'touchin' for channel aftertouch \; - 'polytouchin' for key aftertouch \; - 'sysex' for Sysex messages; #X obj 124 312 else/midi -loop midi-seq.mid; #X obj 115 490 else/out~; #X obj 124 456 else/sfont~ sf/Theremin; @@ -410,20 +310,13 @@ and these two are MIDI messages. Other MIDI messages are:; #X connect 10 0 12 0; #X connect 12 0 11 0; #X connect 12 1 11 1; -#X restore 476 212 pd MIDI-in; -#X text 43 84 [sfont~] is a sampler synthesizer that plays SoundFont -files. It is based on FluidSynth., f 74; -#X obj 107 346 cnv 17 3 17 empty \$0-pddp.cnv.let.r 2 5 9 0 16 #dcdcdc -#9c9c9c 0; -#X text 148 347 anything; -#X obj 2 367 cnv 3 550 3 empty \$0-pddp.cnv.argument flags 8 12 0 13 -#dcdcdc #000000 0; -#X text 127 374 -v: set to verbosity mode, f 61; -#X text 127 389 -ch : set number of channels from 16 (default) -to 256, f 61; -#X text 127 403 -g : overall gain from 0.1 to 1 (default 0.4) -, f 61; -#X obj 357 206 print info; +#X restore 476 222 pd MIDI-in; +#X obj 107 360 cnv 17 3 17 empty \$0-pddp.cnv.let.r 2 5 9 0 16 #dcdcdc #9c9c9c 0; +#X text 148 361 anything; +#X obj 2 381 cnv 3 550 3 empty \$0-pddp.cnv.argument flags 8 12 0 13 #dcdcdc #000000 0; +#X text 127 388 -v: set to verbosity mode, f 61; +#X text 127 403 -ch : set number of channels from 16 (default) to 256, f 61; +#X text 127 417 -g : overall gain from 0.1 to 1 (default 0.4), f 61; #N canvas 404 151 550 423 ALL 0; #X text 52 161 bank -; #X text 46 119 touch -; @@ -431,15 +324,11 @@ to 256, f 61; #X text 100 105 bend -; #X text 58 147 pgm -; #X text 88 90 ctl -; -#X text 186 90 control change: value \, control \, channel (optional) -, f 51; +#X text 186 90 control change: value \, control \, channel (optional), f 51; #X text 186 105 bend: value \, channel (optional), f 51; -#X text 186 119 channel aftertouch: value \, channel (optional), f -51; -#X text 186 133 key aftertouch: value \, key \, channel (optional) -, f 51; -#X text 186 147 program change: program \, channel (optional), f 51 -; +#X text 186 119 channel aftertouch: value \, channel (optional), f 51; +#X text 186 133 key aftertouch: value \, key \, channel (optional), f 51; +#X text 186 147 program change: program \, channel (optional), f 51; #X text 186 161 bank number: bank \, channel (optional), f 51; #X text 94 205 sysex -; #X text 186 205 sets sysex messages, f 51; @@ -453,13 +342,10 @@ to 256, f 61; #X text 88 176 transp -; #X text 106 191 pan -; #X text 186 176 transposition: cents \, channel (optional), f 51; -#X text 186 191 pan control (from -1 to 1) and channel (optional), -f 51; +#X text 186 191 pan control (from -1 to 1) and channel (optional), f 51; #X text 186 61 note: key \, velocity \, channel (optional), f 51; -#X obj 29 20 cnv 17 3 375 empty \$0-pddp.cnv.let.0 0 5 9 0 16 #dcdcdc -#9c9c9c 0; -#X obj 15 11 cnv 3 520 3 empty \$0-pddp.cnv.inlets empty 8 12 0 13 -#dcdcdc #000000 0; +#X obj 29 20 cnv 17 3 375 empty \$0-pddp.cnv.let.0 0 5 9 0 16 #dcdcdc #9c9c9c 0; +#X obj 15 11 cnv 3 520 3 empty \$0-pddp.cnv.inlets empty 8 12 0 13 #dcdcdc #000000 0; #X text 124 234 version -; #X text 142 249 info -; #X text 186 234 prints version info on terminal, f 51; @@ -467,43 +353,31 @@ f 51; #X text 76 264 verbose -; #X text 186 264 non zero sets verbosity mode, f 51; #X text 94 279 remap -; -#X text 186 279 list of 128 pitches in MIDI remaps all keys, f 51 -; +#X text 186 279 list of 128 pitches in MIDI remaps all keys, f 51; #X text 94 294 scale -; #X text 94 320 base -; #X text 186 320 base MIDI pitch for scale, f 51; #X text 64 336 set-tuning -; #X text 64 352 sel-tuning -; -#X text 186 352 selects stored tuning into a -; -#X text 186 336 sets tuning for -a scale; +#X text 186 352 selects stored tuning into a ; +#X text 186 336 sets tuning for a scale; #X text 46 368 unsel-tuning -; -#X text 186 368 unselect a tuning from a channel (or from all channels -if no float is given), f 54; -#X obj 15 403 cnv 3 520 3 empty \$0-pddp.cnv.inlets empty 8 12 0 13 -#dcdcdc #000000 0; -#X text 186 294 scale in cents to retune (12-tone temperament if no -list is given), f 51; -#X text 186 36 loads soundfont file (.sf2/.sf3 extensions implied) -if no symbol is given \, dialog window opens (same as click), f 55 -; +#X text 186 368 unselect a tuning from a channel (or from all channels if no float is given), f 54; +#X obj 15 403 cnv 3 520 3 empty \$0-pddp.cnv.inlets empty 8 12 0 13 #dcdcdc #000000 0; +#X text 186 294 scale in cents to retune (12-tone temperament if no list is given), f 51; +#X text 186 36 loads soundfont file (.sf2/.sf3 extensions implied) if no symbol is given \, dialog window opens (same as click), f 55; #X text 88 36 open -; -#X restore 198 275 pd ALL Messages; -#X text 202 347 - info output (so far 'preset' and 'scale' name); +#X restore 198 289 pd ALL Messages; +#X text 202 361 - info output (so far 'preset' and 'scale' name); #N canvas 418 90 760 568 tuning_&_more 0; #X msg 70 243 panic; -#X obj 175 347 hsl 128 15 -1 1 0 0 empty empty empty -2 -8 0 10 #dfdfdf -#000000 #000000 0 1; +#X obj 175 347 hsl 128 15 -1 1 0 0 empty empty empty -2 -8 0 10 #dfdfdf #000000 #000000 0 1; #X floatatom 172 370 10 0 0 0 - - - 0; #X msg 172 393 pan \$1; -#X obj 95 298 hsl 128 15 -1200 1200 0 0 empty empty empty -2 -8 0 10 -#dfdfdf #000000 #000000 0 1; +#X obj 95 298 hsl 128 15 -1200 1200 0 0 empty empty empty -2 -8 0 10 #dfdfdf #000000 #000000 0 1; #X floatatom 92 322 10 0 0 0 - - - 0; #X msg 92 346 transp \$1; -#X text 29 15 The control change parameters are programmed in a given -synthesizer \, but if usually follows some standards like the messages -where using here., f 72; +#X text 29 15 The control change parameters are programmed in a given synthesizer \, but if usually follows some standards like the messages where using here., f 72; #X text 487 11 For reference \, see:; #X text 510 31 and:; #X text 91 275 set transposition in cents; @@ -511,8 +385,7 @@ where using here., f 72; #X text 539 287 see also:; #X obj 30 211 list append 1; #X obj 105 186 + 1; -#X obj 105 163 hradio 15 1 0 8 empty empty empty 0 -8 0 10 #dfdfdf -#000000 #000000 0; +#X obj 105 163 hradio 15 1 0 8 empty empty empty 0 -8 0 10 #dfdfdf #000000 #000000 0; #X text 231 163 channel; #N canvas 270 25 604 694 tuning 0; #X text 113 94 bohlen-pierce; @@ -532,8 +405,7 @@ where using here., f 72; #X text 172 541 select bank 0 \, pgm 0 in ch 2, f 14; #X obj 322 575 r \$0-tuning; #X obj 299 608 outlet; -#X text 201 48 Initially loading an eighth note scale into bank 0 \, -program 0 \, channel 1 by default., f 43; +#X text 201 48 Initially loading an eighth note scale into bank 0 \, program 0 \, channel 1 by default., f 43; #X text 208 177 Set fundamental; #X text 366 341 an arbitrary scale; #X text 80 291 set: bank 1 \, pgm 1 \, ch 2 and scale name; @@ -542,8 +414,7 @@ program 0 \, channel 1 by default., f 43; #X msg 42 510 sel-tuning 1 1 1; #X msg 146 370 scale; #X text 192 370 default (12 tone scale); -#X obj 299 511 bng 17 250 50 0 empty empty empty 17 7 0 10 #dfdfdf -#000000 #000000; +#X obj 299 511 bng 17 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000; #X msg 67 57 48 2; #X msg 79 93 13 3; #X msg 90 116 24 2; @@ -559,16 +430,10 @@ program 0 \, channel 1 by default., f 43; #X obj 87 177 t f f b, f 18; #X msg 212 285 ----------------------------------------; #X msg 212 236 set-tuning 0 \$3 \$2 \$1-tones-per-octave; -#X obj 27 159 vradio 15 1 0 8 fgfsgdg sfgshgd empty 0 -8 0 10 #dfdfdf -#000000 #000000 0; +#X obj 27 159 vradio 15 1 0 8 fgfsgdg sfgshgd empty 0 -8 0 10 #dfdfdf #000000 #000000 0; #X msg 27 290 sel-tuning 0 \$1 1; -#X obj 100 49 bng 17 250 50 0 fsvfs dghsj empty 17 7 0 10 #dfdfdf #000000 -#000000; -#X text 172 36 Generates 8 scales and loads them in different program -numbers (0-127) on bank 0 and different channels (1-8). These are equal -divisions of the octave from 13 to 20 steps. A scale name is also generated. -Set a different input channel to play each scale on the parent patch. -, f 47; +#X obj 100 49 bng 17 250 50 0 fsvfs dghsj empty 17 7 0 10 #dfdfdf #000000 #000000; +#X text 172 36 Generates 8 scales and loads them in different program numbers (0-127) on bank 0 and different channels (1-8). These are equal divisions of the octave from 13 to 20 steps. A scale name is also generated. Set a different input channel to play each scale on the parent patch., f 47; #X text 10 113 or select a program in channel 1, f 11; #X obj 87 78 else/loop 8; #X obj 87 206 else/eqdiv; @@ -600,10 +465,8 @@ Set a different input channel to play each scale on the parent patch. #N canvas 342 235 477 288 remap 0; #X obj 75 237 outlet; #X obj 114 207 print; -#X obj 75 32 bng 17 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 -#000000; -#X text 220 74 The remap message allows you to set MIDI Pitches for -each key. This patch generates random values for each key., f 31; +#X obj 75 32 bng 17 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000; +#X text 220 74 The remap message allows you to set MIDI Pitches for each key. This patch generates random values for each key., f 31; #X obj 75 62 else/loop -b 128; #X obj 75 91 else/rand.f 0 127; #X obj 75 119 else/group 128; @@ -621,8 +484,7 @@ each key. This patch generates random values for each key., f 31; #X text 276 392 set bank 0 \, pgm 0 in all channels, f 17; #X msg 159 399 set-tuning 0 0 0; #X msg 170 428 set-tuning 0 0 -1; -#X text 284 422 don't load in a channel (only store in a bank/pgm) -, f 26; +#X text 284 422 don't load in a channel (only store in a bank/pgm), f 26; #X msg 75 579 unsel-tuning 1; #X msg 84 610 unsel-tuning; #X text 170 573 unselect tuning in channel 1, f 15; @@ -653,42 +515,17 @@ each key. This patch generates random values for each key., f 31; #X connect 46 0 47 0; #X connect 47 0 9 0; #X restore 235 405 pd tuning; -#X text 360 325 Open [pd tuning] for more details. Note that this example -uses the [eqdiv] object to generate scales with equal divisions and -starts with an eighth tone scale., f 62; -#X text 324 375 The 'set-tuning' message sets a tuning bank \, a program -number (both from 0-127) \, a MIDI channel and a tuning name - default -values are (0 \, 0 \, 0 \, custom-tuning). The 'scale' message then -sets the tuning into the bank/program and loads it into the channel -for use. If you don't want to load the scale into any channel and just -set it into a bank/program \, use '0' \, while '-1' loads it into all -channels., f 68; +#X text 360 325 Open [pd tuning] for more details. Note that this example uses the [eqdiv] object to generate scales with equal divisions and starts with an eighth tone scale., f 62; +#X text 324 375 The 'set-tuning' message sets a tuning bank \, a program number (both from 0-127) \, a MIDI channel and a tuning name - default values are (0 \, 0 \, 0 \, custom-tuning). The 'scale' message then sets the tuning into the bank/program and loads it into the channel for use. If you don't want to load the scale into any channel and just set it into a bank/program \, use '0' \, while '-1' loads it into all channels., f 68; #X obj 210 497 route scale; #X text 114 240 Big panic red button \, resets whole synth, f 21; -#X text 324 450 The 'sel-tuning' message selects a bank/program in -a given channel. The scale name is then output in the right outlet. -If no scale is set \, "Unnamed" is output. To unselect a tuning from -a channel (say "2") \, use 'unsel-tuning 2' \, or just 'unsel-tuning' -to clear all channels (this loads the default 12 tone temperament back). -, f 68; -#X text 319 168 [sfont~] also has microtonal capabilities. The 'scale' -message sets a scale in cents and you can previously set a base value -with the 'base' message \, which sets the scale fundamental in MIDI -pitch (60 by default \, which is "C4"). Just 'scale' sets to the regular -12 tone temperament. Scales can have steps different that 12 and may -not be based on the octave (such as the bohlen-Pierce scale). If picthes -fall out of the 0-127 range \, the keys are muted. This behaves similarly -to the [retune] object. A "remap" message sets 128 MIDI Pitch values -(from 0 to 127) for each MIDI key \, so you can have a scale that doesn't -repeat (decimal values are possible \, so 60.5 is a quarter tone above -middle C)., f 69; +#X text 324 450 The 'sel-tuning' message selects a bank/program in a given channel. The scale name is then output in the right outlet. If no scale is set \, "Unnamed" is output. To unselect a tuning from a channel (say "2") \, use 'unsel-tuning 2' \, or just 'unsel-tuning' to clear all channels (this loads the default 12 tone temperament back)., f 68; +#X text 319 168 [sfont~] also has microtonal capabilities. The 'scale' message sets a scale in cents and you can previously set a base value with the 'base' message \, which sets the scale fundamental in MIDI pitch (60 by default \, which is "C4"). Just 'scale' sets to the regular 12 tone temperament. Scales can have steps different that 12 and may not be based on the octave (such as the bohlen-Pierce scale). If picthes fall out of the 0-127 range \, the keys are muted. This behaves similarly to the [retune] object. A "remap" message sets 128 MIDI Pitch values (from 0 to 127) for each MIDI key \, so you can have a scale that doesn't repeat (decimal values are possible \, so 60.5 is a quarter tone above middle C)., f 69; #X obj 69 460 else/sfont~ sf/waves.sf2; #X obj 603 287 else/retune; #X obj 54 493 else/out~; -#X obj 611 12 else/openfile -h https://www.midi.org/specifications-old/item/table-3-control-change-messages-data-bytes-2 -MIDI Specifications; -#X obj 545 32 else/openfile -h https://github.com/FluidSynth/fluidsynth/wiki/FluidFeatures#midi-control-change-implementation-chart -Fluid Specificaitions; +#X obj 611 12 else/openfile -h https://www.midi.org/specifications-old/item/table-3-control-change-messages-data-bytes-2 MIDI Specifications; +#X obj 545 32 else/openfile -h https://github.com/FluidSynth/fluidsynth/wiki/FluidFeatures#midi-control-change-implementation-chart Fluid Specificaitions; #X obj 30 65 else/keyboard 17 80 6 3 0 0 empty empty; #X obj 210 525 else/display; #X connect 0 0 24 0; @@ -707,36 +544,40 @@ Fluid Specificaitions; #X connect 24 1 26 1; #X connect 24 2 20 0; #X connect 29 0 13 0; -#X restore 440 234 pd tuning_&_more; -#X text 57 175 click to open file -->; -#N canvas 373 219 492 281 open 0; +#X restore 440 244 pd tuning_&_more; +#X text 37 185 click to open file -->; +#N canvas 373 219 565 367 open 0; #X obj 70 61 openpanel; -#X obj 70 31 bng 18 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 -#000000; +#X obj 70 31 bng 18 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000; #X text 96 33 load a different soundfont; -#X obj 70 242 outlet; -#X text 215 78 If no extension is given \, it searches for both ".sf2" -and ".sf3" extensions. This is the same for the argument., f 38; +#X obj 70 292 outlet; +#X text 215 78 If no extension is given \, it searches for both ".sf2" and ".sf3" extensions. This is the same for the argument., f 38; #X msg 89 86 symbol sf/Theremin; #X text 137 178 no symbol opens dialog window; #X msg 70 117 open \$1; #X msg 84 147 open sf/Waves.sf2; #X msg 102 179 open; -#X text 117 211 note you can also open a file by clicking on the object -; +#X text 117 211 note you can also open a file by clicking on the object; +#X msg 118 252 dump; +#X text 156 248 dumps outputs lists with soundfont name followed by lists that represent: \, \, .; #X connect 0 0 7 0; #X connect 1 0 0 0; #X connect 5 0 7 0; #X connect 7 0 3 0; #X connect 8 0 3 0; #X connect 9 0 3 0; -#X restore 137 130 pd open; -#X obj 198 175 else/sfont~ sf/Theremin.sf2; -#X text 69 130 load ----> soundfonts, f 10; -#X obj 194 201 else/out~; -#X obj 198 116 else/keyboard 14 45 2 3 0 0 empty empty; -#X connect 39 0 40 0; -#X connect 40 0 42 0; -#X connect 40 1 42 1; -#X connect 40 2 34 0; -#X connect 43 0 40 0; +#X connect 11 0 3 0; +#X restore 117 140 pd open; +#X obj 178 185 else/sfont~ sf/Theremin.sf2; +#X text 49 140 load ----> soundfonts, f 10; +#X obj 174 211 else/out~; +#X obj 178 126 else/keyboard 14 45 2 3 0 0 empty empty; +#X text 43 84 [sfont~] is a sampler synthesizer that plays SoundFont files. It is based on FluidLite \, a light version of FluidSynth., f 74; +#X obj 337 208 route list; +#X obj 337 232 print dump; +#X connect 37 0 38 0; +#X connect 38 0 40 0; +#X connect 38 1 40 1; +#X connect 38 2 43 0; +#X connect 41 0 38 0; +#X connect 43 0 44 0;