\ io
\
\ io_patches
\ set of vl70m and general midi patches used by io.
\
\
\ see the file io_output for the use of this component.
\
\ see the file io_top for more information on io itself.
\
\
\ constructor: Han-earl Park
\ copyright 2008 buster & friends' C-ALTO Labs
\
\ www.busterandfriends.com/io
\
\ (Edinburgh, November 1996 -
\ (London, August 1997 -
\ (Den Haag, October 1997 -
\ (Valencia, March 1999 -
\ (Southampton, May 2000 -
\ (Cork, April 2006 -
\
\ (Cork, October 2008 -
\
\ REV: 0.0.1 alpha (Southampton, October 2000)
\ REV: 0.0.1 beta (Southampton, November 2000)
\ REV: 0.0.1 alpha++ (Southampton, July 2004)
\ REV: 0.0.1 beta++ (Cork, May 2010)
\
\
\ MOD: HeP 02/24/00 Set titles of the patches to zero, and set the patch's
\ object name to the name of the preset (got that?). It
\ saves some typing ;-)
\ Get rid of all but 8 patches.
\ MOD: HeP 06/01/00 CHOOSE.PATCH and NEXT.PATCH words to select patches.
\ MOD: HeP 06/22/00 Fix stack error in NEXT.PATCH
\ MOD: HeP 06/26/00 Fix the out of range error in NEXT.PATCH
\ MOD: HeP 07/09/00 Setup patches during compilation, not during .INIT time.
\ MOD: HeP 07/16/00 Add provisions for supporting gm patches.
\ MOD: HeP 09/26/00 Randomize variables holding current patches at init time.
\ Trash choose.patch and related redundant routines.
\ REV: 0.0.1 alpha __________________________________________________________
\ REV: 0.0.1 beta __________________________________________________________
\ MOD: HeP 01/22/01 vl-patch-holder has a more complex arrangement with
\ multiple entries of some patches: this means we're more
\ likely to have certain patches selected.
\ RESET.PATCHES sets the current patche to default rather
\ than selecting a random patch.
\ MOD: HeP 01/25/01 Add general midi patches.
\ MOD: HeP 03-24-04 Tweak the vl70m preset parameters.
\ MOD: HeP 05-01-04 Move all includes (and conditional includes) from the
\ individual files to load_io.
\ MOD: HeP 07-03-04 More minor tweaks.
\ REV: 0.0.1 a ++ __________________________________________________________
\ MOD: HeP 04-26-06 Slightly broaden out the note ranges of the vl patches.
\ MOD: HeP 11-09-08 Reduce to two vl patches: ob.vl.patch Floboe and SoprSax!
\ MOD: HeP 03-19-09 Double the those vl patches with variant damping and
\ absorption. Note that vales of 0 seem to cause problems.
\ (Based on experiements with Bruce Coates.)
\ MOD: HeP 03-24-09 Change to ob.vl.instruments's PUT.PATCH: method (see:
\ myt:vl_instrument).
\ REV: 0.0.1 b ++ __________________________________________________________
\ Version for performance at Blackrock Castle Observatory,
\ Cork, Ireland, May 25, 2010.
\ MOD: HeP 08-12-10 Add Trmbone! 4GEL.
anew task-io_patches
ob.objlist vl-patch-holder
ob.objlist gm-patch-holder
ob.vl.patch Floboe-0
ob.vl.patch Floboe-1
ob.vl.patch SoprSax!-0
ob.vl.patch SoprSax!-1
ob.vl.patch SoprSax!-2
ob.vl.patch SoprSax!-3
io_4gel? .IF
ob.vl.patch Trmbone!
.THEN
ob.gm.patch SoperanoSax
ob.gm.patch AltoSax
ob.gm.patch TenorSax
ob.gm.patch BaritoneSax
ob.gm.patch Oboe
ob.gm.patch EnglishHorn
ob.gm.patch Bassoon
ob.gm.patch Clarinet
variable current-vl-patch
variable current-gm-patch
\ select patch
: NEXT.PATCH { var list -- patch , select "next" or related patch }
var @
many: list 2/ 2 MAX choose+/- +
many: list +
many: list mod
\
dup var !
get: list
;
: NEXT.VL.PATCH ( -- addr )
current-vl-patch vl-patch-holder NEXT.PATCH
;
: NEXT.GM.PATCH ( -- addr )
current-gm-patch gm-patch-holder NEXT.PATCH
;
: SET.VL.FX ( -- )
0 0 vl.set.var.type \ type alg# --
0 0 vl.set.var \ n p# --
;
: PRINT.PATCHES ( -- )
many: vl-patch-holder 0
DO i get: vl-patch-holder print: [] ?pause
LOOP
many: gm-patch-holder 0
DO i get: gm-patch-holder print: [] ?pause
LOOP
;
\ setup patches
\
\ we setup the patches at compile time (outside the .INIT word definition) to
\ prevent these numbers taking up memory twice (i.e. also in a word definition).
\ Yamaha vl70m patches
false .IF \ old patch settings
stuff{ 0 2 2 80 20 110 2 127 127 127 127 127 90 31 94 }stuff: Floboe
stuff{ 0 6 2 75 40 100 2 127 127 127 127 127 95 60 90 }stuff: SoprSax!
stuff{ 0 11 2 72 40 120 2 127 127 127 127 127 127 127 127 }stuff: TenrSax!
stuff{ 0 73 2 55 40 100 2 127 127 127 127 100 80 105 90 }stuff: AltoSax!
stuff{ 0 90 2 70 40 100 2 127 127 127 115 70 50 75 105 }stuff: Oboe!
stuff{ 0 91 2 70 40 110 2 127 127 127 127 127 70 60 70 }stuff: Oboe!2
stuff{ 0 96 2 62 25 90 2 100 127 127 127 127 50 45 85 }stuff: EngHorn!
stuff{ 0 99 2 55 30 90 2 100 127 127 127 80 80 45 60 }stuff: Clarint!
.THEN
\ $ pr# b# off lo hi pB prs grl thr scr emb tng dmp abs
stuff{ 0 6 2 75 40 100 2 127 127 127 127 127 95 8 8 }stuff: SoprSax!-0
stuff{ 0 6 2 75 40 100 2 64 127 127 127 127 95 30 45 }stuff: SoprSax!-1
stuff{ 0 6 2 75 40 100 2 64 127 127 127 127 10 60 90 }stuff: SoprSax!-2
stuff{ 0 6 2 75 40 100 2 100 127 127 127 127 95 60 90 }stuff: SoprSax!-3
stuff{ 0 2 2 60 20 110 2 127 127 127 127 127 90 8 8 }stuff: Floboe-0
stuff{ 0 2 2 80 20 110 2 127 127 127 127 127 90 30 90 }stuff: Floboe-1
io_4gel? .IF
stuff{ 0 8 2 55 30 85 2 64 127 127 64 127 64 30 64 }stuff: Trmbone!
stuff{ 0 8 2 55 30 85 2 127 127 127 64 127 64 30 64 }stuff: Trmbone!
.THEN
\ General MIDI patches
\
\ $ pr# off lo hi pB
stuff{ 0 65 61 36 90 2 }stuff: SoperanoSax
stuff{ 0 66 61 36 90 2 }stuff: AltoSax
stuff{ 0 67 61 36 90 2 }stuff: TenorSax
stuff{ 0 68 61 36 90 2 }stuff: BaritoneSax
stuff{ 0 69 61 36 90 2 }stuff: Oboe
stuff{ 0 70 61 36 90 2 }stuff: EnglishHorn
stuff{ 0 71 61 36 90 2 }stuff: Bassoon
stuff{ 0 72 61 36 90 2 }stuff: Clarinet
: RESET.PATCHES ( -- , set to default patch )
0 current-vl-patch !
0 current-gm-patch !
;
\ setup & clearup
: IO.PATCHES.INIT ( -- )
[ io_4gel? .IF ]
stuff{ Trmbone!
}stuff: vl-patch-holder
[ .ELSE ]
stuff{ SoprSax!-0 SoprSax!-1 SoprSax!-2 SoprSax!-3 SoprSax!-1 SoprSax!-0
Floboe-0 Floboe-1 Floboe-0
}stuff: vl-patch-holder
[ .THEN ]
\
stuff{ Oboe SoperanoSax
Clarinet
AltoSax TenorSax BaritoneSax
Bassoon EnglishHorn
}stuff: gm-patch-holder
\
reset.patches
;
: IO.PATCHES.TERM ( -- )
free: vl-patch-holder
free: gm-patch-holder
;
if.forgotten io.patches.term