Name SFinst
Created At 2019-09-01 6:43pm
Submitted By Menno0
Type blue.orchestra.BlueSynthBuilder
Description

SFinstr, based on the spinstr3 opcode, loads a Soundfont but does not use any of the transformations like reverb or chorus as set in the Soundfont.
It does however respect the start and end loop points as already set in the Soundfont.

SFinstr is well suited for use in microtonal compositions; for instance, the PianoRoll Object can contain an arbitrary tone scale, SFinstr will follow the notes nicely when microtuned.
SFplayer does not want midi note numbers as entries for p4, but frequencies. A PianoRoll for example, must be set to Pch Generation --> Frequency.
Velocity (= p5) follows the normal Soundfont/midi protocol.
Example: i2 2 2 119.95585045535326 50

Reason for this instrument is to have easy acces to those well-known acoustical musical instruments but with different and interesting transformation options and microtonality. That makes the well-known and mostly harmonic sounds "only" basic material to start molding new sounds with an already acoustal property.

CAVEAT:
crashes happen if you choose a bank or preset that contains nothing; sometimes you get just an error report, sometimes Csound and thus Blue, crashes.
How to prevent this kind of behavior:
1. check the Show Presets box of SFplayer
2. RENDER A SMALL EMPTY SPACE IN BLUE. THIS WILL SHOW THE PRESETS OF THE SOUNDFONT WITHOUT POSSIBLE CRASHES DUE TO SOME MISMATCH OF PRESET NUMBER.
Because the checking of bank and program number (= preset) is done in 'instrument 0' or Global Orchestra of the Csound csd, it cannot go and crash when it tries to render a non-existent preset.
3. set preset accordingly and uncheck the Show Preset box.

For more information on the Soundfont instruments: https://github.com/kunstmusik/blue/wiki/Fond-of-Soundfont

version 1.0, August 2019
- added Show Midi Key, so you know what keys are hit and adjust the range of the preset accordingly
- added Depth slider for filters
- first version- that's why i call it version 1