CAC_i_qemu 525 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693
  1. REM CAC is free software: you can redistribute it and/or modify
  2. REM it under the terms of the GNU General Public License as published by
  3. REM the Free Software Foundation, either version 2 of the License, or
  4. REM (at your option) any later version.
  5. REM
  6. REM CAC is distributed in the hope that it will be useful,
  7. REM but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. REM GNU General Public License for more details.
  10. REM
  11. REM You should have received a copy of the GNU General Public License
  12. REM along with CAC. If not, see <https://www.gnu.org/licenses/>.
  13. REM
  14. REM CAC
  15. REM Copyright (C) 1990 Richard Emsley
  16. REM >CAC
  17. MODE 12 : COLOUR 0 : COLOUR 135 : CLS
  18. *CONFIGURE spritesize 300K
  19. errorbeforedisplay$ = "y"
  20. ON ERROR PROCerror
  21. biga% = 10^5 : bigb% = 0 : bigc% = 0 : bigd% = 10^5 : box$ = "n"
  22. :
  23. PROCtobegin
  24. END
  25. :
  26. REM*******************************
  27. :
  28. DEF PROCawait
  29. :
  30. PROCwindow(20,69,60,55)
  31. PRINT'" Functions F"
  32. PRINT " Add one note (fully defined) O"
  33. PRINT " Delete notes X"
  34. PRINT " Copy/move notes (1 or `) C"
  35. PRINT " Define a group of values G"
  36. PRINT " Add the group of values A"
  37. PRINT " Rhythmicize R"
  38. PRINT " Display D"
  39. PRINT " Play P"
  40. PRINT " Various V"
  41. PRINT " Undo last operation Z"
  42. PRINT " Save S"
  43. PRINT " Quit Q"
  44. :
  45. CASE GET$ OF
  46. WHEN "f" : ON : PROCfunctionreception
  47. WHEN "o" : ON : PROCaddonenote
  48. WHEN "x" : ON : PROCdelete
  49. WHEN "c","1","`" : ON : PROCcopy
  50. WHEN "g", "3" : ON : PROCsubawaitG
  51. WHEN "a" : ON : PROCsubawaitA
  52. WHEN "r" :
  53. VDU 7
  54. PROCwindow(20,69,63,52)
  55. CLS
  56. PRINT'" To rhythmicize attacks, first switch on "
  57. PRINT'" Rhythmicize Attacks in Display Options "
  58. PRINT'" (M/V/D/H) then create a group of attacks "
  59. PRINT'" or copy some attacks or move some attacks "
  60. PRINT'" to itself, during the course of which you "
  61. PRINT'" will be invited to rhythmicize them. "
  62. PRINT'" (press a key to continue) "
  63. CASE GET$ OF
  64. WHEN "m" : PROCdisplay
  65. OTHERWISE
  66. PROCdisplay
  67. ENDCASE
  68. WHEN "d" : ON : PROCpredisplay
  69. WHEN "p" : ON : play$ = "play" : PROCplay
  70. WHEN "m" : ON :
  71. PROCdisplay : REM toggle
  72. WHEN "v" : ON : PROCplaysubmenu
  73. WHEN "s" : ON : PROCsave
  74. WHEN "Z", "z" : PROCundo
  75. WHEN "q" : ON : PROCquit
  76. OTHERWISE ON : VDU 7 : PROCawait : REM bleep and loop back to start of proc
  77. ENDCASE
  78. :
  79. ENDPROC
  80. :
  81. REM*********************************
  82. :
  83. DEF PROCsubawaitG
  84. :
  85. CLS
  86. PRINT' " attacks A"
  87. PRINT " envelope points R"
  88. PRINT " pitches P"
  89. PRINT " amplitudes L"
  90. PRINT " amplitude gradations G"
  91. PRINT " envelopes/glissandos E"
  92. PRINT " durations D"
  93. PRINT " microtonal inflections M"
  94. :
  95. CASE GET$ OF
  96. WHEN "A","a" : PROCseriesattacks
  97. WHEN "R","r" : PROCreleases
  98. WHEN "P","p", "3" : PROCseriespitches
  99. WHEN "L","l" : PROCseriesamplitudes
  100. WHEN "E","e" : PROCseriesenvelopes
  101. WHEN "G","g" : gradations$ = "y" : PROCseriesenvelopes
  102. WHEN "D","d" : PROCseriesdurations
  103. WHEN "M","m" : PROCseriesinflections
  104. OTHERWISE VDU 7 : PROCsubawaitG
  105. ENDCASE
  106. :
  107. ENDPROC
  108. :
  109. REM***********************************
  110. :
  111. DEF PROCprearraysetup
  112. :
  113. MODE 12 : COLOUR 0 : COLOUR 135
  114. CLS
  115. numwaves% = 19
  116. INPUT'''''" Estimate the maximum number of bars "nobars%
  117. INPUT''" Estimate the average number of notes per bar in the busiest part "nonotes
  118. INPUT''" How many voices/strands "numparts%
  119. :
  120. DIM insts$(numparts%,2) : instsdimmed$ = "y"
  121. PRINT''" Do you want to define the voices or use default ones (Y/D)"
  122. CASE GET$ OF
  123. WHEN "Y","y" :
  124. FOR count% = 1 TO numparts%
  125. PRINT '" voice ";count%;" is called"
  126. INPUT name$
  127. PRINT " and is in clef (P/T/B/D...TT/TB/BB etc)"
  128. INPUT clef$
  129. PRINT " and has how many staves"
  130. INPUT staves$
  131. insts$(count%,0) = name$ : insts$(count%,1) = clef$ : insts$(count%,2) = staves$
  132. NEXT
  133. WHEN "D","d" :
  134. FOR count% = 1 TO numparts%
  135. insts$(count%,0) = "" : insts$(count%,1) = "T" : insts$(count%,2)="1"
  136. NEXT
  137. OTHERWISE
  138. ENDCASE
  139. :
  140. REPEAT
  141. INPUT''" The time signature has how many beats to the bar "factor%
  142. :
  143. CASE factor% OF
  144. WHEN 1,2,3,4,5,6,8,10,12 : success$ = "YES"
  145. OTHERWISE
  146. success$ = "NO"
  147. VDU 7
  148. PRINT'" Only 1,2,3,4,5,6,8,10 or 12 are allowed "
  149. PRINT'" press a key to try again"
  150. CASE GET$ OF
  151. WHEN "m" : success$ = "NO"
  152. OTHERWISE
  153. success$ = "NO"
  154. ENDCASE
  155. :
  156. ENDCASE
  157. UNTIL success$ = "YES"
  158. :
  159. factor% = factor% * 8
  160. beatfactor% = 960/factor%
  161. :
  162. REPEAT
  163. success$ = "YES"
  164. PRINT''" of what note value "
  165. PRINT' " (minim/half-note = 2 "
  166. PRINT' " crotchet/quarter-note = 4 "
  167. PRINT' " quaver/eighth-note = 8 "
  168. PRINT' " semiquaver/sixteenth-note = 16 "
  169. INPUT' " demisemiquaver/thirtysecond-note = 32) "beams%
  170. :
  171. CASE beams% OF
  172. WHEN 2 : beams% = 2
  173. WHEN 4 : beams% = 3
  174. WHEN 8 : beams% = 4
  175. WHEN 16 : beams% = 5
  176. WHEN 32 : beams% = 6
  177. OTHERWISE
  178. PRINT'" sorry, try again "
  179. success$ = "NO"
  180. ENDCASE
  181. UNTIL success$ = "YES"
  182. :
  183. manynotes% = nobars%*nonotes
  184. filename$ = ""
  185. ENDPROC
  186. :
  187. REM***********************************************
  188. :
  189. DEF PROCarraysetup
  190. :
  191. DIM array%(manynotes%,2,(numparts%-1)) : DIM arrayX%(manynotes%,2,(numparts%-1))
  192. IF instsdimmed$ = "n" THEN DIM insts$(numparts%,2)
  193. DIM instsX$(numparts%,2)
  194. DIM numusedcells%(numparts%-1) : DIM numusedcellsX%(numparts%-1)
  195. DIM cell%(1999), bar%(1999)
  196. DIM attacks1%(10000), attacks2%(10000), attacks3%(10000), attacks4%(10000), attacks5%(10000)
  197. DIM pitches%(10000), pitches1%(10000), pitches2%(10000), amplitudes%(10000), envelopes%(10000)
  198. DIM durations%(10000), glissandos%(10000), inflections%(10000)
  199. DIM pitchset%(numparts%+47), ampset%(numparts%+47), envset%(numparts%+47), durset%(numparts%+47), glissset%(numparts%+47), infset%(numparts%+47)
  200. DIM pitchsetX%(numparts%+47), ampsetX%(numparts%+47), envsetX%(numparts%+47), dursetX%(numparts%+47), glisssetX%(numparts%+47)
  201. DIM functionattacks(10000)
  202. DIM nodes%(47), nodes1%(47)
  203. DIM dur%(999), proportion%(999), rhythmicattacks%(999), groupattacks%(999)
  204. DIM error%(999), notategroup%(999,1), errororder%(999), errororder1%(999)
  205. DIM disarray%(nobars%,3,(numparts%-1)) : DIM disarrayX%(nobars%,3,(numparts%-1))
  206. DIM displayvoices%(numparts%), holddisplay%(numparts%), rgroup%(6), longinsts$(2,2), staves%(6)
  207. DIM displayvoices1%(numparts%) : DIM displayvoicesX%(numparts%)
  208. DIM value%(2), pos%(2), longbeamposn%(numparts%), shortbeamposn%(numparts%), actbeamposn%(numparts%), shortamppos%(numparts%), longamppos%(numparts%), actamppos%(numparts%)
  209. DIM longbeamposnX%(numparts%), shortbeamposnX%(numparts%), shortampposX%(numparts%), longampposX%(numparts%)
  210. DIM longstemdir$(numparts%-1), shortstemdir$(numparts%-1)
  211. DIM longstemdirX$(numparts%-1), shortstemdirX$(numparts%-1)
  212. DIM waveforms$(numparts%), playvoices%(8), lvdata%(8,9), tic%(4), tun%(8)
  213. DIM waveformsX$(numparts%), lvdataX%(8,9)
  214. DIM wforms$(19) : waveload$ = "notdone"
  215. DIM wformsX$(19)
  216. DIM startoflayersection%(50), shareoflayers%(50,50), chanceoflayer%(50)
  217. DIM layershare%(50), numattackssections%(50), startofattackssection%(50,50)
  218. DIM numattax%(50,50,1), attackscontrol$(50)
  219. DIM numattackssections1%(50), startofattackssection1%(50,200)
  220. DIM numattax1%(50,200,1), appearances%(50)
  221. DIM durationscontrol$(50), numdurationssections%(50)
  222. DIM numdurationssections1%(50), startofdurationssection%(50,200)
  223. DIM startofdurationssection1%(50,200), doorations%(50,200), doorations1%(50,200)
  224. DIM numvalues%(50), values(50,50), valuescounter%(50), multiplier$(50)
  225. DIM multipliermode$(50)
  226. DIM contoursequences%(50,15), transpositionsequences%(199,1)
  227. DIM sample%(299), group%(7), contours%(69,7), octavesequences%(50,48,11)
  228. DIM pitchnames$(47), octaveloop%(48), distortparas%(50,3)
  229. DIM numlayerOKsects%(50), OKtouselayers%(50,1), layersOK%(50,50,2)
  230. DIM layerends%(50), amplitudes1%(3000), dynlayers%(12,5), dynnumbers%(99)
  231. DIM ampsample%(49)
  232. DIM tempi%(nobars%), bannedpitches%(80), bannedints%(24,2), triednotes%(88)
  233. DIM tempiX%(nobars%)
  234. DIM extractinfo%(20), redpitches%(9,30), numredpitches%(9), holdstartcell%(numparts%)
  235. DIM remarks$(nobars%,1), quickdisplay%(numparts%), prequickdisplay%(numparts%), thebeats%(15)
  236. DIM remarksX$(nobars%,1)
  237. DIM envattacks%(3000), envpitches%(3000), taken%(19)
  238. FOR count% = 0 TO nobars% : tempi%(count%) = 30 : NEXT
  239. FOR count% = 0 TO 47 : READ name$ : pitchnames$(count%) = name$ : NEXT
  240. DATA "C 1/4 flat","C 1/8 flat","C nat","C 1/8 shrp","C 1/4 shrp"
  241. DATA "C 3/8 shrp","D flat","D 3/8 flat","D 1/4 flat","D 1/8 flat"
  242. DATA "D nat","D 1/8 shrp","D 1/4 shrp","D 3/8 shrp","E flat","E 3/8 flat"
  243. DATA "E 1/4 flat","E 1/8 flat","E nat","E 1/8 shrp","E 1/4 shrp"
  244. DATA "F 1/8 flat","F nat","F 1/8 shrp","F 1/4 shrp","F 3/8 shrp"
  245. DATA "F shrp","G 3/8 flat","G 1/4 flat","G 1/8 flat","G nat","G 1/8 shrp"
  246. DATA "G 1/4 shrp","G 3/8 shrp","A flat","A 3/8 flat","A 1/4 flat"
  247. DATA "A 1/8 flat","A nat","A 1/8 shrp","A 1/4 shrp","A 3/8 shrp"
  248. DATA "B flat","B 3/8 flat","B 1/4 flat","B 1/8 flat","B nat","B 1/8 shrp"
  249. DATA 10,1,1,20,2,1,2,21,2,2,1,22,3,1,3,2,23,3,3,1,2,24,3,2,3,1
  250. DATA 25,3,2,1,3,30,3,1,2,3,31,3,3,2,1,32,4,1,3,4,2,33,4,4,2,1,3
  251. DATA 34,4,2,3,4,1,35,4,3,2,1,4,36,4,3,1,2,4,37,4,2,4,3,1,38,4,4,1,2,3
  252. DATA 39,4,1,4,3,2,40,4,1,2,3,4,41,4,4,3,2,1,42,5,1,2,4,5,3
  253. DATA 43,5,5,4,2,1,3,44,5,2,3,4,5,1,45,5,4,3,2,1,5,46,5,3,1,2,4,5
  254. DATA 47,5,3,5,4,2,1,48,5,5,1,2,3,4,49,5,1,5,4,3,2,50,5,1,2,3,4,5
  255. DATA 51,5,5,4,3,2,1,52,6,1,2,4,5,6,3,53,6,6,5,3,2,1,4
  256. DATA 54,6,2,3,4,5,6,1,55,6,5,4,3,2,1,6,56,6,4,1,2,3,5,6
  257. DATA 57,6,3,6,5,4,2,1,58,6,6,1,2,3,4,5,59,6,1,6,5,4,3,2
  258. DATA 60,6,1,2,3,4,5,6,61,6,6,5,4,3,2,1,62,7,1,2,3,5,6,7,4
  259. DATA 63,7,7,6,5,3,2,1,4,64,7,2,3,4,5,6,7,1,65,7,6,5,4,3,2,1,7
  260. DATA 66,7,4,1,2,3,5,6,7,67,7,4,7,6,5,3,2,1,68,7,7,1,2,3,4,5,6
  261. DATA 69,7,1,7,6,5,4,3,2
  262. FOR count% = 1 TO 47
  263. READ a%,b%
  264. contours%(a%,0) = b%
  265. FOR counter% = 1 TO b%
  266. READ c%
  267. contours%(a%,counter%) = c%
  268. NEXT
  269. NEXT
  270. FOR count% = 0 TO numparts%-1 : pitchset%(count%) = 55 : NEXT
  271. FOR count% = 0 TO numparts%-1 : ampset%(count%) = 3 : NEXT
  272. FOR count% = 0 TO numparts%-1 : envset%(count%) = 9 : NEXT
  273. FOR count% = 0 TO numparts%-1 : durset%(count%) = 60 : NEXT
  274. FOR count% = 0 TO numparts%-1 : glissset%(count%) = 105050 : NEXT
  275. FOR count% = 0 TO numparts%-1 : infset%(count%) = 50 : NEXT
  276. *TUNING 0
  277. VOICES 8
  278. *CHANNELVOICE 1 WaveSynth-Beep
  279. *CHANNELVOICE 2 WaveSynth-Beep
  280. *CHANNELVOICE 3 WaveSynth-Beep
  281. *CHANNELVOICE 4 WaveSynth-Beep
  282. *CHANNELVOICE 5 WaveSynth-Beep
  283. *CHANNELVOICE 6 WaveSynth-Beep
  284. *CHANNELVOICE 7 WaveSynth-Beep
  285. *CHANNELVOICE 8 WaveSynth-Beep
  286. direction$ = "" : shortstemdir$() = "U" : longstemdir$() = "U" : shortbeamposn%() = 106 : longbeamposn%() = 106
  287. manyattacks% = 0 : longbeatsupper% = 739 : longbeatslower% = 405
  288. tempo% = 19660 : REM default tempo = MM30 per bar
  289. defaultvoices$ = "y" : PROCassignvoices
  290. CLS
  291. VDU 28,20,27,60,15
  292. COLOUR 0 : COLOUR 191 : CLS
  293. numbars% = 4 : startbar% = 1
  294. :
  295. numvoices% = numparts%
  296. FOR count% = 1 TO numvoices%
  297. displayvoices%(count%) = 1 + count% - 1
  298. holddisplay%(count%) = 1 + count% - 1
  299. NEXT
  300. holdnum% = numvoices%
  301. :
  302. quickdisplay%(1) = 1 : prequickdisplay%(1) = 1
  303. holdnum% = 1 : holdstart% = 1 : quicknum% = 1 : quickstart% = 1
  304. prequicknum% = 1 : prequickstart% = 1
  305. notehead$ = "vsmall" : longscore$ = "y" : startv% = 1 : startv1% = 1
  306. printing$ = "n"
  307. barlines$ = "y" : staves$ = "y" : beats$ = "n" : amplitudes$ = "y"
  308. staves$ = "y" : barlines$ = "y" : names$ = "y" : lowerstave$ = "y"
  309. accidentals$ = "y" : stems$ = "y" : xoption$ = "y" : durations$ = "n"
  310. envelopes$ = "y" : glissandos$ = "y" : MM% = 30 : beatstep% = 8
  311. copyit$ = "OFF" : distort$ = "OFF" : beatnumbers$ = "n"
  312. wavefilingsystem$ = "notloaded" : manywaves% = 0 : barnosoften% = 5
  313. reordered$ = "n" : equalized$ = "n" : notenumbers$ = "n" : beatnum_diff$ = "num"
  314. beatunits$ = "big" : parasdefined$ = "no" : preplaydisplay$ = "n"
  315. paraset$ = "off" : savevoice$ = "N"
  316. method$ = "raw" : reordered$ = "n" : quiz$ = "yes" : typeintervals$ = "s"
  317. displayintervals$ = "n" : numintervals% = 1 : alterbeatsat% = 0
  318. compoundpitch% = 12 : compoundquarter% = 24 : compoundeighth% = 48 : compoundcent% = 1200
  319. defaultsieve = 2 : funcinput$ = "displayed" : redpitches$ = "n" : printno% = 0
  320. seegraph$ = "n" : seeinfo$ = "n" : seereorder$ = "n" : seereorderx$ = "n" : seereordery$ = "n"
  321. seeequalize$ = "n" : seeequalizex$ = "n" : seeequalizey$ = "n"
  322. seerhythmicize$ = "n" : seequery$ = "n" : startfinishdurats$ = "Y" : displayedfunc$ = "n"
  323. along% = 0 : playnewscreen$ = "y" : seeduration$ = "n" : lower% = 0 : justone$ = "n"
  324. biga% = 10^5 : bigb% = 0 : bigc% = 0 : bigd% = 10^5 : printinfo$ = "n"
  325. lowerstart% = 1 : upperstart% = 99 : lowerend% = 1 : upperend% = 99 : toggle$ = "orig"
  326. quickcopy$ = "y" : quickplay% = 2 : seedurinbts$ = "n" : seedurincrots$ = "n"
  327. screenvoices$ = "n" : ampoptions$ = "n" : screenmovesby% = 3 : copydownwards$ = "n"
  328. setalong$ = "y" : numvoicesgiven$ = "n" : envelopedata$ = "none" : deleteone$ = "none"
  329. quickextract$ = "n" : askaboutpitches$ = "y" : usebottomstave$ = "n" : copysuccessively$ = "n"
  330. succfirsttime$ = "y" : sequalssection$ = "n"
  331. addpitches$ = "y" : downwardsspeed% = 50
  332. horizscroll% = 25 : addten$ = "n" : squarebracket$ = "addten" : queryalong$ = "n"
  333. waitafterfirst% = 50 : waitaftersecond% = 50 : notenames$ = "n" : holdbackby% = 0
  334. updisplay% = 1 : vertscroll% = 25 : singlepitch$ = "m" : nosevery% = 1 : startnos% = 1
  335. reorderpitches$ = "n" : namestaves$ = "nameone" : usebeep$ = "n" : firsttimequick$ = "y"
  336. onlycontent$ = "n" : compress$ = "n" : quickdisplaywindow$ = "y" : ampmethod$ = "sample"
  337. holdbackby% = 960 : copytoend$ = "n" : gradations$ = "n" : firstasking$ = "y"
  338. resetdefaults$ = "n" : firstpitch$ = "y" : usedprev$ = "n" : nodelay$ = "n"
  339. askprevious$ = "y" : errorbeforedisplay$ = "n" : quitnow$ = "n"
  340. crossing$ = "n" : copymove$ = "C"
  341. PROCrhythmdefaults
  342. :
  343. ENDPROC
  344. :
  345. REM*************************************
  346. :
  347. DEF PROCsubawaitA
  348. :
  349. CLS
  350. PRINT' " attacks A"
  351. PRINT " pitches P"
  352. PRINT " amplitudes L"
  353. PRINT " envelopes E"
  354. PRINT " durations D"
  355. PRINT " glissandos G"
  356. PRINT " microtonal inflections M"
  357. :
  358. CASE GET$ OF
  359. WHEN "A","a" : PROCinsertattacks
  360. WHEN "P","p" : PROCinsertpitches
  361. WHEN "L","l" : PROCinsertamplitudes
  362. WHEN "E","e" : PROCinsertenvelopes
  363. WHEN "D","d" : PROCinsertdurations
  364. WHEN "M","m" : PROCinsertinflections
  365. OTHERWISE VDU 7 : PROCsubawaitA
  366. ENDCASE
  367. :
  368. ENDPROC
  369. :
  370. REM**************************************
  371. :
  372. DEF PROCnewnotereception(voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
  373. :
  374. value% = (barno% * 10^3) + beatno%
  375. :
  376. option% = 0
  377. :
  378. ::::::REM if new note is very first to be added::::::
  379. IF numusedcells%(voice%) = 0 THEN option% = 1
  380. :
  381. IF option% <> 1 THEN
  382. :
  383. :::::::REM to tack new note on at end:::::
  384. IF numusedcells%(voice%) > 0 AND value% > (array%((numusedcells%(voice%)-1),0,voice%)) DIV 10^3 THEN option% = 2
  385. :
  386. :::::::REM to tack new note on at START::::
  387. IF numusedcells%(voice%) > 0 AND value% < (array%(0,0,voice%)) DIV 10^3 THEN option% = 3
  388. :
  389. ::::::REM to put new note in middle::::::::::
  390. IF numusedcells%(voice%) > 0 AND value% >= (array%(0,0,voice%)) DIV 10^3 AND value% <= (array%(numusedcells%(voice%)-1,0,voice%)) DIV 10^3 THEN option% = 4
  391. :
  392. ENDIF
  393. :
  394. IF addingnotes$ = "y" THEN
  395. CASE option% OF
  396. WHEN 1 : shunt$ = "Y"
  397. PROCcellfill(0,voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
  398. :
  399. WHEN 2 : shunt$="Y"
  400. PROCcellfill(numusedcells%(voice%),voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
  401. :
  402. WHEN 3 : shunt$="Y"
  403. PROCshuntright(0)
  404. PROCcellfill(0,voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
  405. :
  406. WHEN 4 : PROCsearch(value%)
  407. IF shunt$="Y" PROCshuntright(startcell%)
  408. PROCcellfill(startcell%,voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
  409. :
  410. ENDCASE
  411. ENDIF
  412. :
  413. ENDPROC
  414. :
  415. REM****************************************************
  416. :
  417. DEF PROCcellfill(cell%,voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
  418. :
  419. IF barno% = 999 THEN barno% = array%(cell%,0,voice%) DIV 10^6
  420. IF beatno% = 999 THEN beatno% = (array%(cell%,0,voice%)DIV 10^3)MOD 10^3
  421. IF pitch% = 999 THEN pitch% = array%(cell%,0,voice%) MOD 10^3
  422. IF amp% = 9 THEN amp% = array%(cell%,1,voice%) MOD10
  423. IF env% = 999 THEN env% = array%(cell%,2,voice%) DIV10^2
  424. IF dur% = 999 THEN dur% = (array%(cell%,1,voice%) DIV10) MOD 10^3 ELSE PROCconvertdur
  425. IF gliss% = 99 THEN gliss% = array%(cell%,1,voice%) DIV10^4
  426. IF inf% = 99 THEN inf% = array%(cell%,2,voice%) MOD 10^2
  427. :
  428. array%(cell%,0,voice%) = (barno%*10^6) + (beatno%*10^3) + pitch%
  429. array%(cell%,1,voice%) = (gliss%*10^4)+(dur%*10)+amp%
  430. array%(cell%,2,voice%) = (env%*10^2)+inf%
  431. :
  432. IF shunt$="Y" THEN numusedcells%(voice%) += 1
  433. :
  434. ENDPROC
  435. :
  436. REM******************************************************
  437. :
  438. DEF PROCshuntright(startcell%)
  439. :
  440. FOR tier% = 0 TO 2
  441. FOR count% = (numusedcells%(voice%)) TO (startcell%+1) STEP -1
  442. array%(count%,tier%,voice%) = array%((count%-1),tier%,voice%)
  443. NEXT
  444. NEXT
  445. :
  446. ENDPROC
  447. :
  448. REM*********************************************************
  449. :
  450. DEF PROCsearch(newvalue%)
  451. :
  452. startcell% = -1
  453. distance% = numusedcells%(voice%)/2
  454. cellnum% = distance%
  455. :
  456. REPEAT
  457. :
  458. :
  459. IF newvalue% = (array%(cellnum%,0,voice%)) DIV 10^3 THEN
  460. startcell% = cellnum% : REM this ALTERS, rather than adds, a note
  461. shunt$ = "N"
  462. ENDIF
  463. :
  464. IF cellnum% > 0 THEN
  465. :
  466. IF newvalue% = (array%(cellnum%+1,0,voice%)) DIV 10^3 THEN
  467. startcell% = cellnum%+1 : REM this ALTERS too
  468. shunt$ = "N"
  469. ENDIF
  470. :
  471. :
  472. IF newvalue% = (array%(cellnum%-1,0,voice%)) DIV 10^3 THEN
  473. startcell% = cellnum%-1 : REM this ALTERS too
  474. shunt$ = "N"
  475. ENDIF
  476. :
  477. IF newvalue% > (array%(cellnum%,0,voice%) DIV 10^3) AND newvalue% < (array%(cellnum%+1,0,voice%) DIV 10^3) THEN
  478. startcell% = (cellnum%+1) : REM newvalue immediately to right of cellnum
  479. shunt$ = "Y"
  480. ENDIF
  481. :
  482. :
  483. IF newvalue% < (array%(cellnum%,0,voice%) DIV 10^3) AND newvalue% > (array%(cellnum%-1,0,voice%) DIV 10^3) THEN
  484. startcell% = cellnum% : REM immediately to left
  485. shunt$ = "Y"
  486. ENDIF
  487. :
  488. :
  489. IF newvalue% > (array%(cellnum%+1,0,voice%) DIV 10^3) THEN
  490. IF distance% = 1 THEN distance% = 2
  491. distance% = distance%/2
  492. cellnum% = cellnum% + distance%
  493. ENDIF
  494. :
  495. :
  496. IF newvalue% < (array%(cellnum%-1,0,voice%) DIV 10^3) THEN
  497. IF distance% = 1 THEN distance% = 2
  498. distance% = distance%/2
  499. cellnum% = cellnum% - distance%
  500. ENDIF
  501. ENDIF
  502. :
  503. :
  504. UNTIL startcell% > -1
  505. :
  506. ENDPROC
  507. :
  508. REM***************************************************
  509. :
  510. DEF PROCplay
  511. :
  512. IF waveload$ = "notdone" THEN
  513. PROCwindow(20,69,60,55)
  514. CLS
  515. PRINT'" Have any waveforms been loaded in this "
  516. PRINT " VirtualRiscPC session? "
  517. CASE GET$ OF
  518. WHEN "N","n","2" :
  519. OTHERWISE
  520. waveload$ = "done"
  521. ENDCASE
  522. ENDIF
  523. :
  524. BEATS 960 : REM 2/4 bars, 480 each crotchet
  525. tic%() = 0
  526. tun%() = 0
  527. :
  528. IF play$ = "play" THEN
  529. CLS
  530. INPUT'" Starting at bar "startingbar%
  531. INPUT " beat "beats%
  532. PROCalterbeats : startbeat% = beats%
  533. INPUT " and ending at bar "endbar%
  534. INPUT'" How many voices "nvoices%
  535. ENDIF
  536. :
  537. :
  538. FOR count% = 1 TO nvoices%
  539. IF play$ = "play" THEN
  540. PRINT'" voice number ";count%;" is which voice number"
  541. INPUT vnumber%
  542. playvoices%(count%) = vnumber%
  543. ELSE vnumber% = playvoices%(count%)
  544. ENDIF
  545. :
  546. IF usebeep$ = "n" THEN
  547. CASE count% OF
  548. WHEN 1 :
  549. CASE waveforms$(vnumber%) OF
  550. WHEN "WaveSynth-Beep" : *CHANNELVOICE 1 WaveSynth-Beep
  551. WHEN "StringLib-Soft" : *CHANNELVOICE 1 StringLib-Soft
  552. WHEN "StringLib-Pluck" : *CHANNELVOICE 1 StringLib-Pluck
  553. WHEN "StringLib-Steel" : *CHANNELVOICE 1 StringLib-Steel
  554. WHEN "StringLib-Hard" : *CHANNELVOICE 1 StringLib-Hard
  555. WHEN "Percussion-Soft" : *CHANNELVOICE 1 Percussion-Soft
  556. WHEN "Percussion-Medium" : *CHANNELVOICE 1 Percussion-Medium
  557. WHEN "Percussion-Snare" : *CHANNELVOICE 1 Percussion-Snare
  558. WHEN "Percussion-Noise" : *CHANNELVOICE 1 Percussion-Noise
  559. WHEN "BassBowAb" : *CHANNELVOICE 1 BassBowAb
  560. tun%(1) = -1470
  561. WHEN "AcouBass" : *CHANNELVOICE 1 AcouBass
  562. tun%(1) = -2731
  563. WHEN "Vibe" : *CHANNELVOICE 1 Vibe
  564. tun%(1) = -6912
  565. WHEN "BugleC" : *CHANNELVOICE 1 BugleC
  566. tun%(1) = -11008
  567. WHEN "CornetEb" : *CHANNELVOICE 1 CornetEb
  568. tun%(1) = -12117
  569. WHEN "SaxEbBarC" : *CHANNELVOICE 1 SaxEbBarC
  570. tun%(1) = -2816
  571. WHEN "SaxBbTenrE" : *CHANNELVOICE 1 SaxBbTenrE
  572. tun%(1) = -4181
  573. WHEN "BassoonEb" : *CHANNELVOICE 1 BassoonEb
  574. tun%(1) = -4011
  575. WHEN "ClarinetBb" : *CHANNELVOICE 1 ClarinetBb
  576. tun%(1) = -10325
  577. WHEN "EngHornGb" : *CHANNELVOICE 1 EngHornGb
  578. tun%(1) = -8960
  579. WHEN "MandolinDb" : *CHANNELVOICE 1 MandolinDb
  580. tun%(1) = -11264
  581. WHEN "Piano2B" : *CHANNELVOICE 1 Piano2B
  582. tun%(1) = -2475
  583. WHEN "ClarVibEb" : *CHANNELVOICE 1 ClarVibEb
  584. tun%(1) = -7850
  585. WHEN "GtrDobroB" : *CHANNELVOICE 1 GtrDobroB
  586. tun%(1) = -6485
  587. WHEN "RecorderGb" : *CHANNELVOICE 1 RecorderGb
  588. tun%(1) = -13056
  589. WHEN "FlugelHnEb" : *CHANNELVOICE 1 FlugelHnEb
  590. tun%(1) = -12032
  591. WHEN "VceMmmGb23" : *CHANNELVOICE 1 VceMmmGb23
  592. tun%(1) = -853
  593. WHEN "VceMOooGb3" : *CHANNELVOICE 1 VceMOooGb3
  594. tun%(1) = -4843
  595. WHEN "VceFemAahC" : *CHANNELVOICE 1 VceFemAahC
  596. tun%(1) = -10948
  597. WHEN "VceFMmmGb4" : *CHANNELVOICE 1 VceFMmmGb4
  598. tun%(1) = -8918
  599. WHEN "Bass" : *CHANNELVOICE 1 Bass
  600. tun%(1) = 0
  601. WHEN "ChurchBell" : *CHANNELVOICE 1 ChurchBell
  602. tun%(1) = -2731
  603. WHEN "mysound" : *CHANNELVOICE 1 mysound
  604. tun%(1) = 0
  605. WHEN "GuiroFast" : *CHANNELVOICE 1 GuiroFast
  606. tun%(1) = -4000
  607. WHEN "Clave" : *CHANNELVOICE 1 Clave
  608. tun%(1) = -8096
  609. WHEN "CowBell" : *CHANNELVOICE 1 CowBell
  610. tun%(1) = -5707
  611. WHEN "CymbRideHd" : *CHANNELVOICE 1 CymbRideHd
  612. tun%(1) = -8096
  613. WHEN "AcGuitar1" : *CHANNELVOICE 1 AcGuitar1
  614. tun%(1) = -7072
  615. WHEN "CongaHi" : *CHANNELVOICE 1 CongaHi
  616. tun%(1) = -4000
  617. WHEN "DrumExplo" : *CHANNELVOICE 1 DrumExplo
  618. tun%(1) = -4000
  619. WHEN "ElecTom1" : *CHANNELVOICE 1 ElecTom1
  620. tun%(1) = -8096
  621. WHEN "Harp1" : *CHANNELVOICE 1 Harp1
  622. tun%(1) = -10997
  623. WHEN "Harpsi" : *CHANNELVOICE 1 Harpsi
  624. tun%(1) = -6901
  625. WHEN "HiString" : *CHANNELVOICE 1 HiString
  626. tun%(1) = -10997
  627. WHEN "HonkyPiano" : *CHANNELVOICE 1 HonkyPiano
  628. tun%(1) = -6901
  629. WHEN "JapFlute" : *CHANNELVOICE 1 JapFlute
  630. tun%(1) = -10997
  631. WHEN "JazzOrgan" : *CHANNELVOICE 1 JazzOrgan
  632. tun%(1) = -10997
  633. WHEN "MidStrings" : *CHANNELVOICE 1 MidStrings
  634. tun%(1) = -6901
  635. WHEN "NoteArp1" : *CHANNELVOICE 1 NoteArp1
  636. tun%(1) = -4000
  637. WHEN "SnareEcho" : *CHANNELVOICE 1 SnareEcho
  638. tun%(1) = -4341
  639. WHEN "TablaHi" : *CHANNELVOICE 1 TablaHi
  640. tun%(1) = -7669
  641. WHEN "Timpani" : *CHANNELVOICE 1 Timpani
  642. tun%(1) = -928
  643. WHEN "Tomtom1" : *CHANNELVOICE 1 Tomtom1
  644. tun%(1) = -5365
  645. WHEN "Trombone1" : *CHANNELVOICE 1 Trombone1
  646. tun%(1) = -6901
  647. WHEN "Trumpet" : *CHANNELVOICE 1 Trumpet
  648. tun%(1) = -10997
  649. WHEN "Xylophone" : *CHANNELVOICE 1 Xylophone
  650. tun%(1) = -6901
  651. WHEN "AcouGtr2B" : *CHANNELVOICE 1 AcouGtr2B
  652. tun%(1) = -6560
  653. WHEN "AcuBassAb1" : *CHANNELVOICE 1 AcuBassAb1
  654. tun%(1) = -1610
  655. WHEN "BagPipeG" : *CHANNELVOICE 1 BagPipeG
  656. tun%(1) = -9291
  657. WHEN "BanjoChdBb" : *CHANNELVOICE 1 BanjoChdBb
  658. tun%(1) = -4000
  659. WHEN "BazookiE" : *CHANNELVOICE 1 BazookiE
  660. tun%(1) = -8267
  661. WHEN "BellC" : *CHANNELVOICE 1 BellC
  662. tun%(1) = -10997
  663. WHEN "BrassEns1B" : *CHANNELVOICE 1 BrassEns1B
  664. tun%(1) = -6560
  665. WHEN "ClavichdBb" : *CHANNELVOICE 1 ClavichdBb
  666. tun%(1) = -10315
  667. WHEN "ClavinetBb" : *CHANNELVOICE 1 ClavinetBb
  668. tun%(1) = -6219
  669. WHEN "CornetEb" : *CHANNELVOICE 1 CornetEb
  670. tun%(1) = -4000
  671. WHEN "EnsWodAb45" : *CHANNELVOICE 1 EnsWodAb45
  672. tun%(1) = -9632
  673. WHEN "EnsWodGb12" : *CHANNELVOICE 1 EnsWodGb12
  674. tun%(1) = -4853
  675. WHEN "Glock2Ab5" : *CHANNELVOICE 1 Glock2Ab5
  676. tun%(1) = -9632
  677. WHEN "GtMelobarC" : *CHANNELVOICE 1 GtMelobarC
  678. tun%(1) = -6901
  679. WHEN "GtWashbnBb" : *CHANNELVOICE 1 GtWashbnBb
  680. tun%(1) = -6219
  681. WHEN "HarmonicaE" : *CHANNELVOICE 1 HarmonicaE
  682. tun%(1) = -4171
  683. WHEN "Jew'sHarpA" : *CHANNELVOICE 1 Jew'sHarpA
  684. tun%(1) = -6219
  685. WHEN "MusetteB" : *CHANNELVOICE 1 MusetteB
  686. tun%(1) = -10656
  687. WHEN "OboeGb" : *CHANNELVOICE 1 OboeGb
  688. tun%(1) = -13131
  689. WHEN "OrchHit2B" : *CHANNELVOICE 1 OrchHit2B
  690. tun%(1) = -5451
  691. WHEN "OrcSusBb23" : *CHANNELVOICE 1 OrcSusBb23
  692. tun%(1) = -6304
  693. WHEN "PiccoloE" : *CHANNELVOICE 1 PiccoloE
  694. tun%(1) = -16544
  695. WHEN "SaxSoprnoE" : *CHANNELVOICE 1 SaxSoprnoE
  696. tun%(1) = -12448
  697. WHEN "StrngThkBb" : *CHANNELVOICE 1 StrngThkBb
  698. tun%(1) = -5792
  699. WHEN "TubaGb" : *CHANNELVOICE 1 TubaGb
  700. tun%(1) = -929
  701. WHEN "BassDrum" : *CHANNELVOICE 1 BassDrum
  702. tun%(1) = -4000
  703. WHEN "HiHat" : *CHANNELVOICE 1 HiHat
  704. tun%(1) = -4000
  705. WHEN "OrcHit" : *CHANNELVOICE 1 OrcHit
  706. tun%(1) = -4085
  707. WHEN "Piano" : *CHANNELVOICE 1 Piano
  708. tun%(1) = -4171
  709. WHEN "Sax" : *CHANNELVOICE 1 Sax
  710. tun%(1) = -4085
  711. WHEN "Snare" : *CHANNELVOICE 1 Snare
  712. tun%(1) = -8096
  713. WHEN "Choir1" : *CHANNELVOICE 1 Choir1
  714. tun%(1) = -6901
  715. WHEN "ChurOrgan" : *CHANNELVOICE 1 ChurOrgan
  716. tun%(1) = -6901
  717. WHEN "Opera" : *CHANNELVOICE 1 Opera
  718. tun%(1) = -13387
  719. WHEN "OrchChoir" : *CHANNELVOICE 1 OrchChoir
  720. tun%(1) = -6133
  721. WHEN "OrganHit" : *CHANNELVOICE 1 OrganHit
  722. tun%(1) = -5024
  723. WHEN "AgogoAfric" : *CHANNELVOICE 1 AgogoAfric
  724. tun%(1) = -6219
  725. WHEN "AgogoBrazi" : *CHANNELVOICE 1 AgogoBrazi
  726. tun%(1) = -10997
  727. WHEN "AgogoWood" : *CHANNELVOICE 1 AgogoWood
  728. tun%(1) = -13728
  729. WHEN "BDGatedRev" : *CHANNELVOICE 1 BDGatedRev
  730. tun%(1) = -5877
  731. WHEN "BDMarching" : *CHANNELVOICE 1 BDMarching
  732. tun%(1) = -8608
  733. WHEN "BDPiloMute" : *CHANNELVOICE 1 BDPiloMute
  734. tun%(1) = -7072
  735. WHEN "Cabasa" : *CHANNELVOICE 1 Cabasa
  736. tun%(1) = -7072
  737. WHEN "Cachichi1" : *CHANNELVOICE 1 Cachichi1
  738. tun%(1) = -4000
  739. WHEN "CachichiTr" : *CHANNELVOICE 1 CachichiTr
  740. tun%(1) = -8096
  741. WHEN "Castanets" : *CHANNELVOICE 1 Castanets
  742. tun%(1) = -4000
  743. WHEN "CongaMid" : *CHANNELVOICE 1 CongaMid
  744. tun%(1) = -4171
  745. WHEN "CongaSmCl" : *CHANNELVOICE 1 CongaSmCl
  746. tun%(1) = -4683
  747. WHEN "CymbalCrsh" : *CHANNELVOICE 1 CymbalCrsh
  748. tun%(1) = -4000
  749. WHEN "CymRideBel" : *CHANNELVOICE 1 CymRideBel
  750. tun%(1) = -16288
  751. WHEN "CymRStRoll" : *CHANNELVOICE 1 CymRStRoll
  752. tun%(1) = -6389
  753. WHEN "CymSplshCa" : *CHANNELVOICE 1 CymSplshCa
  754. tun%(1) = -9120
  755. WHEN "Flexitone" : *CHANNELVOICE 1 Flexitone
  756. tun%(1) = -8096
  757. WHEN "GongSoft" : *CHANNELVOICE 1 GongSoft
  758. tun%(1) = -5365
  759. WHEN "Gonza1" : *CHANNELVOICE 1 Gonza1
  760. tun%(1) = -12192
  761. WHEN "GuiroSlow" : *CHANNELVOICE 1 GuiroSlow
  762. tun%(1) = -6048
  763. WHEN "HandClaps" : *CHANNELVOICE 1 HandClaps
  764. tun%(1) = -4000
  765. WHEN "HiHatFoot" : *CHANNELVOICE 1 HiHatFoot
  766. tun%(1) = -6389
  767. WHEN "Maracas1" : *CHANNELVOICE 1 Maracas1
  768. tun%(1) = -8096
  769. WHEN "MarimbaSB3" : *CHANNELVOICE 1 MarimbaSB3
  770. tun%(1) = -4000
  771. WHEN "Ratchet" : *CHANNELVOICE 1 Ratchet
  772. tun%(1) = -6731
  773. WHEN "RotoTomRev" : *CHANNELVOICE 1 RotoTomRev
  774. tun%(1) = -6133
  775. WHEN "SimmonsBD1" : *CHANNELVOICE 1 SimmonsBD1
  776. tun%(1) = -8096
  777. WHEN "SimmonsSn1" : *CHANNELVOICE 1 SimmonsSn1
  778. tun%(1) = -5707
  779. WHEN "SleighBell" : *CHANNELVOICE 1 SleighBell
  780. tun%(1) = -4000
  781. WHEN "SuperGong" : *CHANNELVOICE 1 SuperGong
  782. tun%(1) = -4341
  783. WHEN "SynthSnare" : *CHANNELVOICE 1 SynthSnare
  784. tun%(1) = -4000
  785. WHEN "SynTom" : *CHANNELVOICE 1 SynTom
  786. tun%(1) = -9120
  787. WHEN "TimpCresBb" : *CHANNELVOICE 1 TimpCresBb
  788. tun%(1) = -5962
  789. WHEN "TimpLowBb" : *CHANNELVOICE 1 TimpLowBb
  790. tun%(1) = -5707
  791. WHEN "TimpRollEb" : *CHANNELVOICE 1 TimpRollEb
  792. tun%(1) = -4000
  793. WHEN "TomRoll" : *CHANNELVOICE 1 TomRoll
  794. tun%(1) = -4000
  795. WHEN "ToyHooter" : *CHANNELVOICE 1 ToyHooter
  796. tun%(1) = -9717
  797. WHEN "ToyWhistle" : *CHANNELVOICE 1 ToyWhistle
  798. tun%(1) = -4000
  799. ENDCASE
  800. :
  801. WHEN 2 :
  802. CASE waveforms$(vnumber%) OF
  803. WHEN "WaveSynth-Beep" : *CHANNELVOICE 2 WaveSynth-Beep
  804. WHEN "StringLib-Soft" : *CHANNELVOICE 2 StringLib-Soft
  805. WHEN "StringLib-Pluck" : *CHANNELVOICE 2 StringLib-Pluck
  806. WHEN "StringLib-Steel" : *CHANNELVOICE 2 StringLib-Steel
  807. WHEN "StringLib-Hard" : *CHANNELVOICE 2 StringLib-Hard
  808. WHEN "Percussion-Soft" : *CHANNELVOICE 2 Percussion-Soft
  809. WHEN "Percussion-Medium" : *CHANNELVOICE 2 Percussion-Medium
  810. WHEN "Percussion-Snare" : *CHANNELVOICE 2 Percussion-Snare
  811. WHEN "Percussion-Noise" : *CHANNELVOICE 2 Percussion-Noise
  812. WHEN "BassBowAb" : *CHANNELVOICE 2 BassBowAb
  813. tun%(2) = -1470
  814. WHEN "AcouBass" : *CHANNELVOICE 2 AcouBass
  815. tun%(2) = -2731
  816. WHEN "Vibe" : *CHANNELVOICE 2 Vibe
  817. tun%(2) = -6912
  818. WHEN "BugleC" : *CHANNELVOICE 2 BugleC
  819. tun%(2) = -11008
  820. WHEN "CornetEb" : *CHANNELVOICE 2 CornetEb
  821. tun%(2) = -12117
  822. WHEN "SaxEbBarC" : *CHANNELVOICE 2 SaxEbBarC
  823. tun%(2) = -2816
  824. WHEN "SaxBbTenrE" : *CHANNELVOICE 2 SaxBbTenrE
  825. tun%(2) = -4181
  826. WHEN "BassoonEb" : *CHANNELVOICE 2 BassoonEb
  827. tun%(2) = -4011
  828. WHEN "ClarinetBb" : *CHANNELVOICE 2 ClarinetBb
  829. tun%(2) = -10325
  830. WHEN "EngHornGb" : *CHANNELVOICE 2 EngHornGb
  831. tun%(2) = -8960
  832. WHEN "MandolinDb" : *CHANNELVOICE 2 MandolinDb
  833. tun%(2) = -11264
  834. WHEN "Piano2B" : *CHANNELVOICE 2 Piano2B
  835. tun%(2) = -2475
  836. WHEN "ClarVibEb" : *CHANNELVOICE 2 ClarVibEb
  837. tun%(2) = -7850
  838. WHEN "GtrDobroB" : *CHANNELVOICE 2 GtrDobroB
  839. tun%(2) = -6485
  840. WHEN "RecorderGb" : *CHANNELVOICE 2 RecorderGb
  841. tun%(2) = -13056
  842. WHEN "FlugelHnEb" : *CHANNELVOICE 2 FlugelHnEb
  843. tun%(2) = -12032
  844. WHEN "VceMmmGb23" : *CHANNELVOICE 2 VceMmmGb23
  845. tun%(2) = -853
  846. WHEN "VceMOooGb3" : *CHANNELVOICE 2 VceMOooGb3
  847. tun%(2) = -4843
  848. WHEN "VceFemAahC" : *CHANNELVOICE 2 VceFemAahC
  849. tun%(2) = -10948
  850. WHEN "VceFMmmGb4" : *CHANNELVOICE 2 VceFMmmGb4
  851. tun%(2) = -8918
  852. WHEN "Bass" : *CHANNELVOICE 2 Bass
  853. tun%(2) = 0
  854. WHEN "ChurchBell" : *CHANNELVOICE 2 ChurchBell
  855. tun%(2) = -2731
  856. WHEN "mysound" : *CHANNELVOICE 2 mysound
  857. tun%(2) = 0
  858. WHEN "GuiroFast" : *CHANNELVOICE 2 GuiroFast
  859. tun%(2) = -4000
  860. WHEN "Clave" : *CHANNELVOICE 2 Clave
  861. tun%(2) = -8096
  862. WHEN "CowBell" : *CHANNELVOICE 2 CowBell
  863. tun%(2) = -5707
  864. WHEN "CymbRideHd" : *CHANNELVOICE 2 CymbRideHd
  865. tun%(2) = -8096
  866. WHEN "AcGuitar1" : *CHANNELVOICE 2 AcGuitar1
  867. tun%(2) = -7072
  868. WHEN "CongaHi" : *CHANNELVOICE 2 CongaHi
  869. tun%(2) = -4000
  870. WHEN "DrumExplo" : *CHANNELVOICE 2 DrumExplo
  871. tun%(2) = -4000
  872. WHEN "ElecTom1" : *CHANNELVOICE 2 ElecTom1
  873. tun%(2) = -8096
  874. WHEN "Harp1" : *CHANNELVOICE 2 Harp1
  875. tun%(2) = -10997
  876. WHEN "Harpsi" : *CHANNELVOICE 2 Harpsi
  877. tun%(2) = -6901
  878. WHEN "HiString" : *CHANNELVOICE 2 HiString
  879. tun%(2) = -10997
  880. WHEN "HonkyPiano" : *CHANNELVOICE 2 HonkyPiano
  881. tun%(2) = -6901
  882. WHEN "JapFlute" : *CHANNELVOICE 2 JapFlute
  883. tun%(2) = -10997
  884. WHEN "JazzOrgan" : *CHANNELVOICE 2 JazzOrgan
  885. tun%(2) = -10997
  886. WHEN "MidStrings" : *CHANNELVOICE 2 MidStrings
  887. tun%(2) = -6901
  888. WHEN "NoteArp1" : *CHANNELVOICE 2 NoteArp1
  889. tun%(2) = -4000
  890. WHEN "SnareEcho" : *CHANNELVOICE 2 SnareEcho
  891. tun%(2) = -4341
  892. WHEN "TablaHi" : *CHANNELVOICE 2 TablaHi
  893. tun%(2) = -7669
  894. WHEN "Timpani" : *CHANNELVOICE 2 Timpani
  895. tun%(2) = -928
  896. WHEN "Tomtom1" : *CHANNELVOICE 2 Tomtom1
  897. tun%(2) = -5365
  898. WHEN "Trombone1" : *CHANNELVOICE 2 Trombone1
  899. tun%(2) = -6901
  900. WHEN "Trumpet" : *CHANNELVOICE 2 Trumpet
  901. tun%(2) = -10997
  902. WHEN "Xylophone" : *CHANNELVOICE 2 Xylophone
  903. tun%(2) = -6901
  904. WHEN "AcouGtr2B" : *CHANNELVOICE 2 AcouGtr2B
  905. tun%(2) = -6560
  906. WHEN "AcuBassAb1" : *CHANNELVOICE 2 AcuBassAb1
  907. tun%(2) = -1610
  908. WHEN "BagPipeG" : *CHANNELVOICE 2 BagPipeG
  909. tun%(2) = -9291
  910. WHEN "BanjoChdBb" : *CHANNELVOICE 2 BanjoChdBb
  911. tun%(2) = -4000
  912. WHEN "BazookiE" : *CHANNELVOICE 2 BazookiE
  913. tun%(2) = -8267
  914. WHEN "BellC" : *CHANNELVOICE 2 BellC
  915. tun%(2) = -10997
  916. WHEN "BrassEns1B" : *CHANNELVOICE 2 BrassEns1B
  917. tun%(2) = -6560
  918. WHEN "ClavichdBb" : *CHANNELVOICE 2 ClavichdBb
  919. tun%(2) = -10315
  920. WHEN "ClavinetBb" : *CHANNELVOICE 2 ClavinetBb
  921. tun%(2) = -6219
  922. WHEN "CornetEb" : *CHANNELVOICE 2 CornetEb
  923. tun%(2) = -4000
  924. WHEN "EnsWodAb45" : *CHANNELVOICE 2 EnsWodAb45
  925. tun%(2) = -9632
  926. WHEN "EnsWodGb12" : *CHANNELVOICE 2 EnsWodGb12
  927. tun%(2) = -4853
  928. WHEN "Glock2Ab5" : *CHANNELVOICE 2 Glock2Ab5
  929. tun%(2) = -9632
  930. WHEN "GtMelobarC" : *CHANNELVOICE 2 GtMelobarC
  931. tun%(2) = -6901
  932. WHEN "GtWashbnBb" : *CHANNELVOICE 2 GtWashbnBb
  933. tun%(2) = -6219
  934. WHEN "HarmonicaE" : *CHANNELVOICE 2 HarmonicaE
  935. tun%(2) = -4171
  936. WHEN "Jew'sHarpA" : *CHANNELVOICE 2 Jew'sHarpA
  937. tun%(2) = -6219
  938. WHEN "MusetteB" : *CHANNELVOICE 2 MusetteB
  939. tun%(2) = -10656
  940. WHEN "OboeGb" : *CHANNELVOICE 2 OboeGb
  941. tun%(2) = -13131
  942. WHEN "OrchHit2B" : *CHANNELVOICE 2 OrchHit2B
  943. tun%(2) = -5451
  944. WHEN "OrcSusBb23" : *CHANNELVOICE 2 OrcSusBb23
  945. tun%(2) = -6304
  946. WHEN "PiccoloE" : *CHANNELVOICE 2 PiccoloE
  947. tun%(2) = -16544
  948. WHEN "SaxSoprnoE" : *CHANNELVOICE 2 SaxSoprnoE
  949. tun%(2) = -12448
  950. WHEN "StrngThkBb" : *CHANNELVOICE 2 StrngThkBb
  951. tun%(2) = -5792
  952. WHEN "TubaGb" : *CHANNELVOICE 2 TubaGb
  953. tun%(2) = -929
  954. WHEN "BassDrum" : *CHANNELVOICE 2 BassDrum
  955. tun%(2) = -4000
  956. WHEN "HiHat" : *CHANNELVOICE 2 HiHat
  957. tun%(2) = -4000
  958. WHEN "OrcHit" : *CHANNELVOICE 2 OrcHit
  959. tun%(2) = -4085
  960. WHEN "Piano" : *CHANNELVOICE 2 Piano
  961. tun%(2) = -4171
  962. WHEN "Sax" : *CHANNELVOICE 2 Sax
  963. tun%(2) = -4085
  964. WHEN "Snare" : *CHANNELVOICE 2 Snare
  965. tun%(2) = -8096
  966. WHEN "Choir1" : *CHANNELVOICE 2 Choir1
  967. tun%(2) = -6901
  968. WHEN "ChurOrgan" : *CHANNELVOICE 2 ChurOrgan
  969. tun%(2) = -6901
  970. WHEN "Opera" : *CHANNELVOICE 2 Opera
  971. tun%(2) = -13387
  972. WHEN "OrchChoir" : *CHANNELVOICE 2 OrchChoir
  973. tun%(2) = -6133
  974. WHEN "OrganHit" : *CHANNELVOICE 2 OrganHit
  975. tun%(2) = -5024
  976. WHEN "AgogoAfric" : *CHANNELVOICE 2 AgogoAfric
  977. tun%(2) = -6219
  978. WHEN "AgogoBrazi" : *CHANNELVOICE 2 AgogoBrazi
  979. tun%(2) = -10997
  980. WHEN "AgogoWood" : *CHANNELVOICE 2 AgogoWood
  981. tun%(2) = -13728
  982. WHEN "BDGatedRev" : *CHANNELVOICE 2 BDGatedRev
  983. tun%(2) = -5877
  984. WHEN "BDMarching" : *CHANNELVOICE 2 BDMarching
  985. tun%(2) = -8608
  986. WHEN "BDPiloMute" : *CHANNELVOICE 2 BDPiloMute
  987. tun%(2) = -7072
  988. WHEN "Cabasa" : *CHANNELVOICE 2 Cabasa
  989. tun%(2) = -7072
  990. WHEN "Cachichi1" : *CHANNELVOICE 2 Cachichi1
  991. tun%(2) = -4000
  992. WHEN "CachichiTr" : *CHANNELVOICE 2 CachichiTr
  993. tun%(2) = -8096
  994. WHEN "Castanets" : *CHANNELVOICE 2 Castanets
  995. tun%(2) = -4000
  996. WHEN "CongaMid" : *CHANNELVOICE 2 CongaMid
  997. tun%(2) = -4171
  998. WHEN "CongaSmCl" : *CHANNELVOICE 2 CongaSmCl
  999. tun%(2) = -4683
  1000. WHEN "CymbalCrsh" : *CHANNELVOICE 2 CymbalCrsh
  1001. tun%(2) = -4000
  1002. WHEN "CymRideBel" : *CHANNELVOICE 2 CymRideBel
  1003. tun%(2) = -16288
  1004. WHEN "CymRStRoll" : *CHANNELVOICE 2 CymRStRoll
  1005. tun%(2) = -6389
  1006. WHEN "CymSplshCa" : *CHANNELVOICE 2 CymSplshCa
  1007. tun%(2) = -9120
  1008. WHEN "Flexitone" : *CHANNELVOICE 2 Flexitone
  1009. tun%(2) = -8096
  1010. WHEN "GongSoft" : *CHANNELVOICE 2 GongSoft
  1011. tun%(2) = -5365
  1012. WHEN "Gonza1" : *CHANNELVOICE 2 Gonza1
  1013. tun%(2) = -12192
  1014. WHEN "GuiroSlow" : *CHANNELVOICE 2 GuiroSlow
  1015. tun%(2) = -6048
  1016. WHEN "HandClaps" : *CHANNELVOICE 2 HandClaps
  1017. tun%(2) = -4000
  1018. WHEN "HiHatFoot" : *CHANNELVOICE 2 HiHatFoot
  1019. tun%(2) = -6389
  1020. WHEN "Maracas1" : *CHANNELVOICE 2 Maracas1
  1021. tun%(2) = -8096
  1022. WHEN "MarimbaSB3" : *CHANNELVOICE 2 MarimbaSB3
  1023. tun%(2) = -4000
  1024. WHEN "Ratchet" : *CHANNELVOICE 2 Ratchet
  1025. tun%(2) = -6731
  1026. WHEN "RotoTomRev" : *CHANNELVOICE 2 RotoTomRev
  1027. tun%(2) = -6133
  1028. WHEN "SimmonsBD1" : *CHANNELVOICE 2 SimmonsBD1
  1029. tun%(2) = -8096
  1030. WHEN "SimmonsSn1" : *CHANNELVOICE 2 SimmonsSn1
  1031. tun%(2) = -5707
  1032. WHEN "SleighBell" : *CHANNELVOICE 2 SleighBell
  1033. tun%(2) = -4000
  1034. WHEN "SuperGong" : *CHANNELVOICE 2 SuperGong
  1035. tun%(2) = -4341
  1036. WHEN "SynthSnare" : *CHANNELVOICE 2 SynthSnare
  1037. tun%(2) = -4000
  1038. WHEN "SynTom" : *CHANNELVOICE 2 SynTom
  1039. tun%(2) = -9120
  1040. WHEN "TimpCresBb" : *CHANNELVOICE 2 TimpCresBb
  1041. tun%(2) = -5962
  1042. WHEN "TimpLowBb" : *CHANNELVOICE 2 TimpLowBb
  1043. tun%(2) = -5707
  1044. WHEN "TimpRollEb" : *CHANNELVOICE 2 TimpRollEb
  1045. tun%(2) = -4000
  1046. WHEN "TomRoll" : *CHANNELVOICE 2 TomRoll
  1047. tun%(2) = -4000
  1048. WHEN "ToyHooter" : *CHANNELVOICE 2 ToyHooter
  1049. tun%(2) = -9717
  1050. WHEN "ToyWhistle" : *CHANNELVOICE 2 ToyWhistle
  1051. tun%(2) = -4000
  1052. ENDCASE
  1053. WHEN 3 :
  1054. CASE waveforms$(vnumber%) OF
  1055. WHEN "WaveSynth-Beep" : *CHANNELVOICE 3 WaveSynth-Beep
  1056. WHEN "StringLib-Soft" : *CHANNELVOICE 3 StringLib-Soft
  1057. WHEN "StringLib-Pluck" : *CHANNELVOICE 3 StringLib-Pluck
  1058. WHEN "StringLib-Steel" : *CHANNELVOICE 3 StringLib-Steel
  1059. WHEN "StringLib-Hard" : *CHANNELVOICE 3 StringLib-Hard
  1060. WHEN "Percussion-Soft" : *CHANNELVOICE 3 Percussion-Soft
  1061. WHEN "Percussion-Medium" : *CHANNELVOICE 3 Percussion-Medium
  1062. WHEN "Percussion-Snare" : *CHANNELVOICE 3 Percussion-Snare
  1063. WHEN "Percussion-Noise" : *CHANNELVOICE 3 Percussion-Noise
  1064. WHEN "BassBowAb" : *CHANNELVOICE 3 BassBowAb
  1065. tun%(3) = -1470
  1066. WHEN "AcouBass" : *CHANNELVOICE 3 AcouBass
  1067. tun%(3) = -2731
  1068. WHEN "Vibe" : *CHANNELVOICE 3 Vibe
  1069. tun%(3) = -6912
  1070. WHEN "BugleC" : *CHANNELVOICE 3 BugleC
  1071. tun%(3) = -11008
  1072. WHEN "CornetEb" : *CHANNELVOICE 3 CornetEb
  1073. tun%(3) = -12117
  1074. WHEN "SaxEbBarC" : *CHANNELVOICE 3 SaxEbBarC
  1075. tun%(3) = -2816
  1076. WHEN "SaxBbTenrE" : *CHANNELVOICE 3 SaxBbTenrE
  1077. tun%(3) = -4181
  1078. WHEN "BassoonEb" : *CHANNELVOICE 3 BassoonEb
  1079. tun%(3) = -4011
  1080. WHEN "ClarinetBb" : *CHANNELVOICE 3 ClarinetBb
  1081. tun%(3) = -10325
  1082. WHEN "EngHornGb" : *CHANNELVOICE 3 EngHornGb
  1083. tun%(3) = -8960
  1084. WHEN "MandolinDb" : *CHANNELVOICE 3 MandolinDb
  1085. tun%(3) = -11264
  1086. WHEN "Piano2B" : *CHANNELVOICE 3 Piano2B
  1087. tun%(3) = -2475
  1088. WHEN "ClarVibEb" : *CHANNELVOICE 3 ClarVibEb
  1089. tun%(3) = -7850
  1090. WHEN "GtrDobroB" : *CHANNELVOICE 3 GtrDobroB
  1091. tun%(3) = -6485
  1092. WHEN "RecorderGb" : *CHANNELVOICE 3 RecorderGb
  1093. tun%(3) = -13056
  1094. WHEN "FlugelHnEb" : *CHANNELVOICE 3 FlugelHnEb
  1095. tun%(3) = -12032
  1096. WHEN "VceMmmGb23" : *CHANNELVOICE 3 VceMmmGb23
  1097. tun%(3) = -853
  1098. WHEN "VceMOooGb3" : *CHANNELVOICE 3 VceMOooGb3
  1099. tun%(3) = -4843
  1100. WHEN "VceFemAahC" : *CHANNELVOICE 3 VceFemAahC
  1101. tun%(3) = -10948
  1102. WHEN "VceFMmmGb4" : *CHANNELVOICE 3 VceFMmmGb4
  1103. tun%(3) = -8918
  1104. WHEN "Bass" : *CHANNELVOICE 3 Bass
  1105. tun%(3) = 0
  1106. WHEN "ChurchBell" : *CHANNELVOICE 3 ChurchBell
  1107. tun%(3) = -2731
  1108. WHEN "mysound" : *CHANNELVOICE 3 mysound
  1109. tun%(3) = 0
  1110. WHEN "GuiroFast" : *CHANNELVOICE 3 GuiroFast
  1111. tun%(3) = -4000
  1112. WHEN "Clave" : *CHANNELVOICE 3 Clave
  1113. tun%(3) = -8096
  1114. WHEN "CowBell" : *CHANNELVOICE 3 CowBell
  1115. tun%(3) = -5707
  1116. WHEN "CymbRideHd" : *CHANNELVOICE 3 CymbRideHd
  1117. tun%(3) = -8096
  1118. WHEN "AcGuitar1" : *CHANNELVOICE 3 AcGuitar1
  1119. tun%(3) = -7072
  1120. WHEN "CongaHi" : *CHANNELVOICE 3 CongaHi
  1121. tun%(3) = -4000
  1122. WHEN "DrumExplo" : *CHANNELVOICE 3 DrumExplo
  1123. tun%(3) = -4000
  1124. WHEN "ElecTom1" : *CHANNELVOICE 3 ElecTom1
  1125. tun%(3) = -8096
  1126. WHEN "Harp1" : *CHANNELVOICE 3 Harp1
  1127. tun%(3) = -10997
  1128. WHEN "Harpsi" : *CHANNELVOICE 3 Harpsi
  1129. tun%(3) = -6901
  1130. WHEN "HiString" : *CHANNELVOICE 3 HiString
  1131. tun%(3) = -10997
  1132. WHEN "HonkyPiano" : *CHANNELVOICE 3 HonkyPiano
  1133. tun%(3) = -6901
  1134. WHEN "JapFlute" : *CHANNELVOICE 3 JapFlute
  1135. tun%(3) = -10997
  1136. WHEN "JazzOrgan" : *CHANNELVOICE 3 JazzOrgan
  1137. tun%(3) = -10997
  1138. WHEN "MidStrings" : *CHANNELVOICE 3 MidStrings
  1139. tun%(3) = -6901
  1140. WHEN "NoteArp1" : *CHANNELVOICE 3 NoteArp1
  1141. tun%(3) = -4000
  1142. WHEN "SnareEcho" : *CHANNELVOICE 3 SnareEcho
  1143. tun%(3) = -4341
  1144. WHEN "TablaHi" : *CHANNELVOICE 3 TablaHi
  1145. tun%(3) = -7669
  1146. WHEN "Timpani" : *CHANNELVOICE 3 Timpani
  1147. tun%(3) = -928
  1148. WHEN "Tomtom1" : *CHANNELVOICE 3 Tomtom1
  1149. tun%(3) = -5365
  1150. WHEN "Trombone1" : *CHANNELVOICE 3 Trombone1
  1151. tun%(3) = -6901
  1152. WHEN "Trumpet" : *CHANNELVOICE 3 Trumpet
  1153. tun%(3) = -10997
  1154. WHEN "Xylophone" : *CHANNELVOICE 3 Xylophone
  1155. tun%(3) = -6901
  1156. WHEN "AcouGtr2B" : *CHANNELVOICE 3 AcouGtr2B
  1157. tun%(3) = -6560
  1158. WHEN "AcuBassAb1" : *CHANNELVOICE 3 AcuBassAb1
  1159. tun%(3) = -1610
  1160. WHEN "BagPipeG" : *CHANNELVOICE 3 BagPipeG
  1161. tun%(3) = -9291
  1162. WHEN "BanjoChdBb" : *CHANNELVOICE 3 BanjoChdBb
  1163. tun%(3) = -4000
  1164. WHEN "BazookiE" : *CHANNELVOICE 3 BazookiE
  1165. tun%(3) = -8267
  1166. WHEN "BellC" : *CHANNELVOICE 3 BellC
  1167. tun%(3) = -10997
  1168. WHEN "BrassEns1B" : *CHANNELVOICE 3 BrassEns1B
  1169. tun%(3) = -6560
  1170. WHEN "ClavichdBb" : *CHANNELVOICE 3 ClavichdBb
  1171. tun%(3) = -10315
  1172. WHEN "ClavinetBb" : *CHANNELVOICE 3 ClavinetBb
  1173. tun%(3) = -6219
  1174. WHEN "CornetEb" : *CHANNELVOICE 3 CornetEb
  1175. tun%(3) = -4000
  1176. WHEN "EnsWodAb45" : *CHANNELVOICE 3 EnsWodAb45
  1177. tun%(3) = -9632
  1178. WHEN "EnsWodGb12" : *CHANNELVOICE 3 EnsWodGb12
  1179. tun%(3) = -4853
  1180. WHEN "Glock2Ab5" : *CHANNELVOICE 3 Glock2Ab5
  1181. tun%(3) = -9632
  1182. WHEN "GtMelobarC" : *CHANNELVOICE 3 GtMelobarC
  1183. tun%(3) = -6901
  1184. WHEN "GtWashbnBb" : *CHANNELVOICE 3 GtWashbnBb
  1185. tun%(3) = -6219
  1186. WHEN "HarmonicaE" : *CHANNELVOICE 3 HarmonicaE
  1187. tun%(3) = -4171
  1188. WHEN "Jew'sHarpA" : *CHANNELVOICE 3 Jew'sHarpA
  1189. tun%(3) = -6219
  1190. WHEN "MusetteB" : *CHANNELVOICE 3 MusetteB
  1191. tun%(3) = -10656
  1192. WHEN "OboeGb" : *CHANNELVOICE 3 OboeGb
  1193. tun%(3) = -13131
  1194. WHEN "OrchHit2B" : *CHANNELVOICE 3 OrchHit2B
  1195. tun%(3) = -5451
  1196. WHEN "OrcSusBb23" : *CHANNELVOICE 3 OrcSusBb23
  1197. tun%(3) = -6304
  1198. WHEN "PiccoloE" : *CHANNELVOICE 3 PiccoloE
  1199. tun%(3) = -16544
  1200. WHEN "SaxSoprnoE" : *CHANNELVOICE 3 SaxSoprnoE
  1201. tun%(3) = -12448
  1202. WHEN "StrngThkBb" : *CHANNELVOICE 3 StrngThkBb
  1203. tun%(3) = -5792
  1204. WHEN "TubaGb" : *CHANNELVOICE 3 TubaGb
  1205. tun%(3) = -929
  1206. WHEN "BassDrum" : *CHANNELVOICE 3 BassDrum
  1207. tun%(3) = -4000
  1208. WHEN "HiHat" : *CHANNELVOICE 3 HiHat
  1209. tun%(3) = -4000
  1210. WHEN "OrcHit" : *CHANNELVOICE 3 OrcHit
  1211. tun%(3) = -4085
  1212. WHEN "Piano" : *CHANNELVOICE 3 Piano
  1213. tun%(3) = -4171
  1214. WHEN "Sax" : *CHANNELVOICE 3 Sax
  1215. tun%(3) = -4085
  1216. WHEN "Snare" : *CHANNELVOICE 3 Snare
  1217. tun%(3) = -8096
  1218. WHEN "Choir1" : *CHANNELVOICE 3 Choir1
  1219. tun%(3) = -6901
  1220. WHEN "ChurOrgan" : *CHANNELVOICE 3 ChurOrgan
  1221. tun%(3) = -6901
  1222. WHEN "Opera" : *CHANNELVOICE 3 Opera
  1223. tun%(3) = -13387
  1224. WHEN "OrchChoir" : *CHANNELVOICE 3 OrchChoir
  1225. tun%(3) = -6133
  1226. WHEN "OrganHit" : *CHANNELVOICE 3 OrganHit
  1227. tun%(3) = -5024
  1228. WHEN "AgogoAfric" : *CHANNELVOICE 3 AgogoAfric
  1229. tun%(3) = -6219
  1230. WHEN "AgogoBrazi" : *CHANNELVOICE 3 AgogoBrazi
  1231. tun%(3) = -10997
  1232. WHEN "AgogoWood" : *CHANNELVOICE 3 AgogoWood
  1233. tun%(3) = -13728
  1234. WHEN "BDGatedRev" : *CHANNELVOICE 3 BDGatedRev
  1235. tun%(3) = -5877
  1236. WHEN "BDMarching" : *CHANNELVOICE 3 BDMarching
  1237. tun%(3) = -8608
  1238. WHEN "BDPiloMute" : *CHANNELVOICE 3 BDPiloMute
  1239. tun%(3) = -7072
  1240. WHEN "Cabasa" : *CHANNELVOICE 3 Cabasa
  1241. tun%(3) = -7072
  1242. WHEN "Cachichi1" : *CHANNELVOICE 3 Cachichi1
  1243. tun%(3) = -4000
  1244. WHEN "CachichiTr" : *CHANNELVOICE 3 CachichiTr
  1245. tun%(3) = -8096
  1246. WHEN "Castanets" : *CHANNELVOICE 3 Castanets
  1247. tun%(3) = -4000
  1248. WHEN "CongaMid" : *CHANNELVOICE 3 CongaMid
  1249. tun%(3) = -4171
  1250. WHEN "CongaSmCl" : *CHANNELVOICE 3 CongaSmCl
  1251. tun%(3) = -4683
  1252. WHEN "CymbalCrsh" : *CHANNELVOICE 3 CymbalCrsh
  1253. tun%(3) = -4000
  1254. WHEN "CymRideBel" : *CHANNELVOICE 3 CymRideBel
  1255. tun%(3) = -16288
  1256. WHEN "CymRStRoll" : *CHANNELVOICE 3 CymRStRoll
  1257. tun%(3) = -6389
  1258. WHEN "CymSplshCa" : *CHANNELVOICE 3 CymSplshCa
  1259. tun%(3) = -9120
  1260. WHEN "Flexitone" : *CHANNELVOICE 3 Flexitone
  1261. tun%(3) = -8096
  1262. WHEN "GongSoft" : *CHANNELVOICE 3 GongSoft
  1263. tun%(3) = -5365
  1264. WHEN "Gonza1" : *CHANNELVOICE 3 Gonza1
  1265. tun%(3) = -12192
  1266. WHEN "GuiroSlow" : *CHANNELVOICE 3 GuiroSlow
  1267. tun%(3) = -6048
  1268. WHEN "HandClaps" : *CHANNELVOICE 3 HandClaps
  1269. tun%(3) = -4000
  1270. WHEN "HiHatFoot" : *CHANNELVOICE 3 HiHatFoot
  1271. tun%(3) = -6389
  1272. WHEN "Maracas1" : *CHANNELVOICE 3 Maracas1
  1273. tun%(3) = -8096
  1274. WHEN "MarimbaSB3" : *CHANNELVOICE 3 MarimbaSB3
  1275. tun%(3) = -4000
  1276. WHEN "Ratchet" : *CHANNELVOICE 3 Ratchet
  1277. tun%(3) = -6731
  1278. WHEN "RotoTomRev" : *CHANNELVOICE 3 RotoTomRev
  1279. tun%(3) = -6133
  1280. WHEN "SimmonsBD1" : *CHANNELVOICE 3 SimmonsBD1
  1281. tun%(3) = -8096
  1282. WHEN "SimmonsSn1" : *CHANNELVOICE 3 SimmonsSn1
  1283. tun%(3) = -5707
  1284. WHEN "SleighBell" : *CHANNELVOICE 3 SleighBell
  1285. tun%(3) = -4000
  1286. WHEN "SuperGong" : *CHANNELVOICE 3 SuperGong
  1287. tun%(3) = -4341
  1288. WHEN "SynthSnare" : *CHANNELVOICE 3 SynthSnare
  1289. tun%(3) = -4000
  1290. WHEN "SynTom" : *CHANNELVOICE 3 SynTom
  1291. tun%(3) = -9120
  1292. WHEN "TimpCresBb" : *CHANNELVOICE 3 TimpCresBb
  1293. tun%(3) = -5962
  1294. WHEN "TimpLowBb" : *CHANNELVOICE 3 TimpLowBb
  1295. tun%(3) = -5707
  1296. WHEN "TimpRollEb" : *CHANNELVOICE 3 TimpRollEb
  1297. tun%(3) = -4000
  1298. WHEN "TomRoll" : *CHANNELVOICE 3 TomRoll
  1299. tun%(3) = -4000
  1300. WHEN "ToyHooter" : *CHANNELVOICE 3 ToyHooter
  1301. tun%(3) = -9717
  1302. WHEN "ToyWhistle" : *CHANNELVOICE 3 ToyWhistle
  1303. tun%(3) = -4000
  1304. ENDCASE
  1305. WHEN 4 :
  1306. CASE waveforms$(vnumber%) OF
  1307. WHEN "WaveSynth-Beep" : *CHANNELVOICE 4 WaveSynth-Beep
  1308. WHEN "StringLib-Soft" : *CHANNELVOICE 4 StringLib-Soft
  1309. WHEN "StringLib-Pluck" : *CHANNELVOICE 4 StringLib-Pluck
  1310. WHEN "StringLib-Steel" : *CHANNELVOICE 4 StringLib-Steel
  1311. WHEN "StringLib-Hard" : *CHANNELVOICE 4 StringLib-Hard
  1312. WHEN "Percussion-Soft" : *CHANNELVOICE 4 Percussion-Soft
  1313. WHEN "Percussion-Medium" : *CHANNELVOICE 4 Percussion-Medium
  1314. WHEN "Percussion-Snare" : *CHANNELVOICE 4 Percussion-Snare
  1315. WHEN "Percussion-Noise" : *CHANNELVOICE 4 Percussion-Noise
  1316. WHEN "BassBowAb" : *CHANNELVOICE 4 BassBowAb
  1317. tun%(4) = -1470
  1318. WHEN "AcouBass" : *CHANNELVOICE 4 AcouBass
  1319. tun%(4) = -2731
  1320. WHEN "Vibe" : *CHANNELVOICE 4 Vibe
  1321. tun%(4) = -6912
  1322. WHEN "BugleC" : *CHANNELVOICE 4 BugleC
  1323. tun%(4) = -11008
  1324. WHEN "CornetEb" : *CHANNELVOICE 4 CornetEb
  1325. tun%(4) = -12117
  1326. WHEN "SaxEbBarC" : *CHANNELVOICE 4 SaxEbBarC
  1327. tun%(4) = -2816
  1328. WHEN "SaxBbTenrE" : *CHANNELVOICE 4 SaxBbTenrE
  1329. tun%(4) = -4181
  1330. WHEN "BassoonEb" : *CHANNELVOICE 4 BassoonEb
  1331. tun%(4) = -4011
  1332. WHEN "ClarinetBb" : *CHANNELVOICE 4 ClarinetBb
  1333. tun%(4) = -10325
  1334. WHEN "EngHornGb" : *CHANNELVOICE 4 EngHornGb
  1335. tun%(4) = -8960
  1336. WHEN "MandolinDb" : *CHANNELVOICE 4 MandolinDb
  1337. tun%(4) = -11264
  1338. WHEN "Piano2B" : *CHANNELVOICE 4 Piano2B
  1339. tun%(4) = -2475
  1340. WHEN "ClarVibEb" : *CHANNELVOICE 4 ClarVibEb
  1341. tun%(4) = -7850
  1342. WHEN "GtrDobroB" : *CHANNELVOICE 4 GtrDobroB
  1343. tun%(4) = -6485
  1344. WHEN "RecorderGb" : *CHANNELVOICE 4 RecorderGb
  1345. tun%(4) = -13056
  1346. WHEN "FlugelHnEb" : *CHANNELVOICE 4 FlugelHnEb
  1347. tun%(4) = -12032
  1348. WHEN "VceMmmGb23" : *CHANNELVOICE 4 VceMmmGb23
  1349. tun%(4) = -853
  1350. WHEN "VceMOooGb3" : *CHANNELVOICE 4 VceMOooGb3
  1351. tun%(4) = -4843
  1352. WHEN "VceFemAahC" : *CHANNELVOICE 4 VceFemAahC
  1353. tun%(4) = -10948
  1354. WHEN "VceFMmmGb4" : *CHANNELVOICE 4 VceFMmmGb4
  1355. tun%(4) = -8918
  1356. WHEN "Bass" : *CHANNELVOICE 4 Bass
  1357. tun%(4) = 0
  1358. WHEN "ChurchBell" : *CHANNELVOICE 4 ChurchBell
  1359. tun%(4) = -2731
  1360. WHEN "mysound" : *CHANNELVOICE 4 mysound
  1361. tun%(4) = 0
  1362. WHEN "GuiroFast" : *CHANNELVOICE 4 GuiroFast
  1363. tun%(4) = -4000
  1364. WHEN "Clave" : *CHANNELVOICE 4 Clave
  1365. tun%(4) = -8096
  1366. WHEN "CowBell" : *CHANNELVOICE 4 CowBell
  1367. tun%(4) = -5707
  1368. WHEN "CymbRideHd" : *CHANNELVOICE 4 CymbRideHd
  1369. tun%(4) = -8096
  1370. WHEN "AcGuitar1" : *CHANNELVOICE 4 AcGuitar1
  1371. tun%(4) = -7072
  1372. WHEN "CongaHi" : *CHANNELVOICE 4 CongaHi
  1373. tun%(4) = -4000
  1374. WHEN "DrumExplo" : *CHANNELVOICE 4 DrumExplo
  1375. tun%(4) = -4000
  1376. WHEN "ElecTom1" : *CHANNELVOICE 4 ElecTom1
  1377. tun%(4) = -8096
  1378. WHEN "Harp1" : *CHANNELVOICE 4 Harp1
  1379. tun%(4) = -10997
  1380. WHEN "Harpsi" : *CHANNELVOICE 4 Harpsi
  1381. tun%(4) = -6901
  1382. WHEN "HiString" : *CHANNELVOICE 4 HiString
  1383. tun%(4) = -10997
  1384. WHEN "HonkyPiano" : *CHANNELVOICE 4 HonkyPiano
  1385. tun%(4) = -6901
  1386. WHEN "JapFlute" : *CHANNELVOICE 4 JapFlute
  1387. tun%(4) = -10997
  1388. WHEN "JazzOrgan" : *CHANNELVOICE 4 JazzOrgan
  1389. tun%(4) = -10997
  1390. WHEN "MidStrings" : *CHANNELVOICE 4 MidStrings
  1391. tun%(4) = -6901
  1392. WHEN "NoteArp1" : *CHANNELVOICE 4 NoteArp1
  1393. tun%(4) = -4000
  1394. WHEN "SnareEcho" : *CHANNELVOICE 4 SnareEcho
  1395. tun%(4) = -4341
  1396. WHEN "TablaHi" : *CHANNELVOICE 4 TablaHi
  1397. tun%(4) = -7669
  1398. WHEN "Timpani" : *CHANNELVOICE 4 Timpani
  1399. tun%(4) = -928
  1400. WHEN "Tomtom1" : *CHANNELVOICE 4 Tomtom1
  1401. tun%(4) = -5365
  1402. WHEN "Trombone1" : *CHANNELVOICE 4 Trombone1
  1403. tun%(4) = -6901
  1404. WHEN "Trumpet" : *CHANNELVOICE 4 Trumpet
  1405. tun%(4) = -10997
  1406. WHEN "Xylophone" : *CHANNELVOICE 4 Xylophone
  1407. tun%(4) = -6901
  1408. WHEN "AcouGtr2B" : *CHANNELVOICE 4 AcouGtr2B
  1409. tun%(4) = -6560
  1410. WHEN "AcuBassAb1" : *CHANNELVOICE 4 AcuBassAb1
  1411. tun%(4) = -1610
  1412. WHEN "BagPipeG" : *CHANNELVOICE 4 BagPipeG
  1413. tun%(4) = -9291
  1414. WHEN "BanjoChdBb" : *CHANNELVOICE 4 BanjoChdBb
  1415. tun%(4) = -4000
  1416. WHEN "BazookiE" : *CHANNELVOICE 4 BazookiE
  1417. tun%(4) = -8267
  1418. WHEN "BellC" : *CHANNELVOICE 4 BellC
  1419. tun%(4) = -10997
  1420. WHEN "BrassEns1B" : *CHANNELVOICE 4 BrassEns1B
  1421. tun%(4) = -6560
  1422. WHEN "ClavichdBb" : *CHANNELVOICE 4 ClavichdBb
  1423. tun%(4) = -10315
  1424. WHEN "ClavinetBb" : *CHANNELVOICE 4 ClavinetBb
  1425. tun%(4) = -6219
  1426. WHEN "CornetEb" : *CHANNELVOICE 4 CornetEb
  1427. tun%(4) = -4000
  1428. WHEN "EnsWodAb45" : *CHANNELVOICE 4 EnsWodAb45
  1429. tun%(4) = -9632
  1430. WHEN "EnsWodGb12" : *CHANNELVOICE 4 EnsWodGb12
  1431. tun%(4) = -4853
  1432. WHEN "Glock2Ab5" : *CHANNELVOICE 4 Glock2Ab5
  1433. tun%(4) = -9632
  1434. WHEN "GtMelobarC" : *CHANNELVOICE 4 GtMelobarC
  1435. tun%(4) = -6901
  1436. WHEN "GtWashbnBb" : *CHANNELVOICE 4 GtWashbnBb
  1437. tun%(4) = -6219
  1438. WHEN "HarmonicaE" : *CHANNELVOICE 4 HarmonicaE
  1439. tun%(4) = -4171
  1440. WHEN "Jew'sHarpA" : *CHANNELVOICE 4 Jew'sHarpA
  1441. tun%(4) = -6219
  1442. WHEN "MusetteB" : *CHANNELVOICE 4 MusetteB
  1443. tun%(4) = -10656
  1444. WHEN "OboeGb" : *CHANNELVOICE 4 OboeGb
  1445. tun%(4) = -13131
  1446. WHEN "OrchHit2B" : *CHANNELVOICE 4 OrchHit2B
  1447. tun%(4) = -5451
  1448. WHEN "OrcSusBb23" : *CHANNELVOICE 4 OrcSusBb23
  1449. tun%(4) = -6304
  1450. WHEN "PiccoloE" : *CHANNELVOICE 4 PiccoloE
  1451. tun%(4) = -16544
  1452. WHEN "SaxSoprnoE" : *CHANNELVOICE 4 SaxSoprnoE
  1453. tun%(4) = -12448
  1454. WHEN "StrngThkBb" : *CHANNELVOICE 4 StrngThkBb
  1455. tun%(4) = -5792
  1456. WHEN "TubaGb" : *CHANNELVOICE 4 TubaGb
  1457. tun%(4) = -929
  1458. WHEN "BassDrum" : *CHANNELVOICE 4 BassDrum
  1459. tun%(4) = -4000
  1460. WHEN "HiHat" : *CHANNELVOICE 4 HiHat
  1461. tun%(4) = -4000
  1462. WHEN "OrcHit" : *CHANNELVOICE 4 OrcHit
  1463. tun%(4) = -4085
  1464. WHEN "Piano" : *CHANNELVOICE 4 Piano
  1465. tun%(4) = -4171
  1466. WHEN "Sax" : *CHANNELVOICE 4 Sax
  1467. tun%(4) = -4085
  1468. WHEN "Snare" : *CHANNELVOICE 4 Snare
  1469. tun%(4) = -8096
  1470. WHEN "Choir1" : *CHANNELVOICE 4 Choir1
  1471. tun%(4) = -6901
  1472. WHEN "ChurOrgan" : *CHANNELVOICE 4 ChurOrgan
  1473. tun%(4) = -6901
  1474. WHEN "Opera" : *CHANNELVOICE 4 Opera
  1475. tun%(4) = -13387
  1476. WHEN "OrchChoir" : *CHANNELVOICE 4 OrchChoir
  1477. tun%(4) = -6133
  1478. WHEN "OrganHit" : *CHANNELVOICE 4 OrganHit
  1479. tun%(4) = -5024
  1480. WHEN "AgogoAfric" : *CHANNELVOICE 4 AgogoAfric
  1481. tun%(4) = -6219
  1482. WHEN "AgogoBrazi" : *CHANNELVOICE 4 AgogoBrazi
  1483. tun%(4) = -10997
  1484. WHEN "AgogoWood" : *CHANNELVOICE 4 AgogoWood
  1485. tun%(4) = -13728
  1486. WHEN "BDGatedRev" : *CHANNELVOICE 4 BDGatedRev
  1487. tun%(4) = -5877
  1488. WHEN "BDMarching" : *CHANNELVOICE 4 BDMarching
  1489. tun%(4) = -8608
  1490. WHEN "BDPiloMute" : *CHANNELVOICE 4 BDPiloMute
  1491. tun%(4) = -7072
  1492. WHEN "Cabasa" : *CHANNELVOICE 4 Cabasa
  1493. tun%(4) = -7072
  1494. WHEN "Cachichi1" : *CHANNELVOICE 4 Cachichi1
  1495. tun%(4) = -4000
  1496. WHEN "CachichiTr" : *CHANNELVOICE 4 CachichiTr
  1497. tun%(4) = -8096
  1498. WHEN "Castanets" : *CHANNELVOICE 4 Castanets
  1499. tun%(4) = -4000
  1500. WHEN "CongaMid" : *CHANNELVOICE 4 CongaMid
  1501. tun%(4) = -4171
  1502. WHEN "CongaSmCl" : *CHANNELVOICE 4 CongaSmCl
  1503. tun%(4) = -4683
  1504. WHEN "CymbalCrsh" : *CHANNELVOICE 4 CymbalCrsh
  1505. tun%(4) = -4000
  1506. WHEN "CymRideBel" : *CHANNELVOICE 4 CymRideBel
  1507. tun%(4) = -16288
  1508. WHEN "CymRStRoll" : *CHANNELVOICE 4 CymRStRoll
  1509. tun%(4) = -6389
  1510. WHEN "CymSplshCa" : *CHANNELVOICE 4 CymSplshCa
  1511. tun%(4) = -9120
  1512. WHEN "Flexitone" : *CHANNELVOICE 4 Flexitone
  1513. tun%(4) = -8096
  1514. WHEN "GongSoft" : *CHANNELVOICE 4 GongSoft
  1515. tun%(4) = -5365
  1516. WHEN "Gonza1" : *CHANNELVOICE 4 Gonza1
  1517. tun%(4) = -12192
  1518. WHEN "GuiroSlow" : *CHANNELVOICE 4 GuiroSlow
  1519. tun%(4) = -6048
  1520. WHEN "HandClaps" : *CHANNELVOICE 4 HandClaps
  1521. tun%(4) = -4000
  1522. WHEN "HiHatFoot" : *CHANNELVOICE 4 HiHatFoot
  1523. tun%(4) = -6389
  1524. WHEN "Maracas1" : *CHANNELVOICE 4 Maracas1
  1525. tun%(4) = -8096
  1526. WHEN "MarimbaSB3" : *CHANNELVOICE 4 MarimbaSB3
  1527. tun%(4) = -4000
  1528. WHEN "Ratchet" : *CHANNELVOICE 4 Ratchet
  1529. tun%(4) = -6731
  1530. WHEN "RotoTomRev" : *CHANNELVOICE 4 RotoTomRev
  1531. tun%(4) = -6133
  1532. WHEN "SimmonsBD1" : *CHANNELVOICE 4 SimmonsBD1
  1533. tun%(4) = -8096
  1534. WHEN "SimmonsSn1" : *CHANNELVOICE 4 SimmonsSn1
  1535. tun%(4) = -5707
  1536. WHEN "SleighBell" : *CHANNELVOICE 4 SleighBell
  1537. tun%(4) = -4000
  1538. WHEN "SuperGong" : *CHANNELVOICE 4 SuperGong
  1539. tun%(4) = -4341
  1540. WHEN "SynthSnare" : *CHANNELVOICE 4 SynthSnare
  1541. tun%(4) = -4000
  1542. WHEN "SynTom" : *CHANNELVOICE 4 SynTom
  1543. tun%(4) = -9120
  1544. WHEN "TimpCresBb" : *CHANNELVOICE 4 TimpCresBb
  1545. tun%(4) = -5962
  1546. WHEN "TimpLowBb" : *CHANNELVOICE 4 TimpLowBb
  1547. tun%(4) = -5707
  1548. WHEN "TimpRollEb" : *CHANNELVOICE 4 TimpRollEb
  1549. tun%(4) = -4000
  1550. WHEN "TomRoll" : *CHANNELVOICE 4 TomRoll
  1551. tun%(4) = -4000
  1552. WHEN "ToyHooter" : *CHANNELVOICE 4 ToyHooter
  1553. tun%(4) = -9717
  1554. WHEN "ToyWhistle" : *CHANNELVOICE 4 ToyWhistle
  1555. tun%(4) = -4000
  1556. ENDCASE
  1557. WHEN 5 :
  1558. CASE waveforms$(vnumber%) OF
  1559. WHEN "WaveSynth-Beep" : *CHANNELVOICE 5 WaveSynth-Beep
  1560. WHEN "StringLib-Soft" : *CHANNELVOICE 5 StringLib-Soft
  1561. WHEN "StringLib-Pluck" : *CHANNELVOICE 5 StringLib-Pluck
  1562. WHEN "StringLib-Steel" : *CHANNELVOICE 5 StringLib-Steel
  1563. WHEN "StringLib-Hard" : *CHANNELVOICE 5 StringLib-Hard
  1564. WHEN "Percussion-Soft" : *CHANNELVOICE 5 Percussion-Soft
  1565. WHEN "Percussion-Medium" : *CHANNELVOICE 5 Percussion-Medium
  1566. WHEN "Percussion-Snare" : *CHANNELVOICE 5 Percussion-Snare
  1567. WHEN "Percussion-Noise" : *CHANNELVOICE 5 Percussion-Noise
  1568. WHEN "BassBowAb" : *CHANNELVOICE 5 BassBowAb
  1569. tun%(5) = -1470
  1570. WHEN "AcouBass" : *CHANNELVOICE 5 AcouBass
  1571. tun%(5) = -2731
  1572. WHEN "Vibe" : *CHANNELVOICE 5 Vibe
  1573. tun%(5) = -6912
  1574. WHEN "BugleC" : *CHANNELVOICE 5 BugleC
  1575. tun%(5) = -11008
  1576. WHEN "CornetEb" : *CHANNELVOICE 5 CornetEb
  1577. tun%(5) = -12117
  1578. WHEN "SaxEbBarC" : *CHANNELVOICE 5 SaxEbBarC
  1579. tun%(5) = -2816
  1580. WHEN "SaxBbTenrE" : *CHANNELVOICE 5 SaxBbTenrE
  1581. tun%(5) = -4181
  1582. WHEN "BassoonEb" : *CHANNELVOICE 5 BassoonEb
  1583. tun%(5) = -4011
  1584. WHEN "ClarinetBb" : *CHANNELVOICE 5 ClarinetBb
  1585. tun%(5) = -10325
  1586. WHEN "EngHornGb" : *CHANNELVOICE 5 EngHornGb
  1587. tun%(5) = -8960
  1588. WHEN "MandolinDb" : *CHANNELVOICE 5 MandolinDb
  1589. tun%(5) = -11264
  1590. WHEN "Piano2B" : *CHANNELVOICE 5 Piano2B
  1591. tun%(5) = -2475
  1592. WHEN "ClarVibEb" : *CHANNELVOICE 5 ClarVibEb
  1593. tun%(5) = -7850
  1594. WHEN "GtrDobroB" : *CHANNELVOICE 5 GtrDobroB
  1595. tun%(5) = -6485
  1596. WHEN "RecorderGb" : *CHANNELVOICE 5 RecorderGb
  1597. tun%(5) = -13056
  1598. WHEN "FlugelHnEb" : *CHANNELVOICE 5 FlugelHnEb
  1599. tun%(5) = -12032
  1600. WHEN "VceMmmGb23" : *CHANNELVOICE 5 VceMmmGb23
  1601. tun%(5) = -853
  1602. WHEN "VceMOooGb3" : *CHANNELVOICE 5 VceMOooGb3
  1603. tun%(5) = -4843
  1604. WHEN "VceFemAahC" : *CHANNELVOICE 5 VceFemAahC
  1605. tun%(5) = -10948
  1606. WHEN "VceFMmmGb4" : *CHANNELVOICE 5 VceFMmmGb4
  1607. tun%(5) = -8918
  1608. WHEN "Bass" : *CHANNELVOICE 5 Bass
  1609. tun%(5) = 0
  1610. WHEN "ChurchBell" : *CHANNELVOICE 5 ChurchBell
  1611. tun%(5) = -2731
  1612. WHEN "mysound" : *CHANNELVOICE 5 mysound
  1613. tun%(5) = 0
  1614. WHEN "GuiroFast" : *CHANNELVOICE 5 GuiroFast
  1615. tun%(5) = -4000
  1616. WHEN "Clave" : *CHANNELVOICE 5 Clave
  1617. tun%(5) = -8096
  1618. WHEN "CowBell" : *CHANNELVOICE 5 CowBell
  1619. tun%(5) = -5707
  1620. WHEN "CymbRideHd" : *CHANNELVOICE 5 CymbRideHd
  1621. tun%(5) = -8096
  1622. WHEN "AcGuitar1" : *CHANNELVOICE 5 AcGuitar1
  1623. tun%(5) = -7072
  1624. WHEN "CongaHi" : *CHANNELVOICE 5 CongaHi
  1625. tun%(5) = -4000
  1626. WHEN "DrumExplo" : *CHANNELVOICE 5 DrumExplo
  1627. tun%(5) = -4000
  1628. WHEN "ElecTom1" : *CHANNELVOICE 5 ElecTom1
  1629. tun%(5) = -8096
  1630. WHEN "Harp1" : *CHANNELVOICE 5 Harp1
  1631. tun%(5) = -10997
  1632. WHEN "Harpsi" : *CHANNELVOICE 5 Harpsi
  1633. tun%(5) = -6901
  1634. WHEN "HiString" : *CHANNELVOICE 5 HiString
  1635. tun%(5) = -10997
  1636. WHEN "HonkyPiano" : *CHANNELVOICE 5 HonkyPiano
  1637. tun%(5) = -6901
  1638. WHEN "JapFlute" : *CHANNELVOICE 5 JapFlute
  1639. tun%(5) = -10997
  1640. WHEN "JazzOrgan" : *CHANNELVOICE 5 JazzOrgan
  1641. tun%(5) = -10997
  1642. WHEN "MidStrings" : *CHANNELVOICE 5 MidStrings
  1643. tun%(5) = -6901
  1644. WHEN "NoteArp1" : *CHANNELVOICE 5 NoteArp1
  1645. tun%(5) = -4000
  1646. WHEN "SnareEcho" : *CHANNELVOICE 5 SnareEcho
  1647. tun%(5) = -4341
  1648. WHEN "TablaHi" : *CHANNELVOICE 5 TablaHi
  1649. tun%(5) = -7669
  1650. WHEN "Timpani" : *CHANNELVOICE 5 Timpani
  1651. tun%(5) = -928
  1652. WHEN "Tomtom1" : *CHANNELVOICE 5 Tomtom1
  1653. tun%(5) = -5365
  1654. WHEN "Trombone1" : *CHANNELVOICE 5 Trombone1
  1655. tun%(5) = -6901
  1656. WHEN "Trumpet" : *CHANNELVOICE 5 Trumpet
  1657. tun%(5) = -10997
  1658. WHEN "Xylophone" : *CHANNELVOICE 5 Xylophone
  1659. tun%(5) = -6901
  1660. WHEN "AcouGtr2B" : *CHANNELVOICE 5 AcouGtr2B
  1661. tun%(5) = -6560
  1662. WHEN "AcuBassAb1" : *CHANNELVOICE 5 AcuBassAb1
  1663. tun%(5) = -1610
  1664. WHEN "BagPipeG" : *CHANNELVOICE 5 BagPipeG
  1665. tun%(5) = -9291
  1666. WHEN "BanjoChdBb" : *CHANNELVOICE 5 BanjoChdBb
  1667. tun%(5) = -4000
  1668. WHEN "BazookiE" : *CHANNELVOICE 5 BazookiE
  1669. tun%(5) = -8267
  1670. WHEN "BellC" : *CHANNELVOICE 5 BellC
  1671. tun%(5) = -10997
  1672. WHEN "BrassEns1B" : *CHANNELVOICE 5 BrassEns1B
  1673. tun%(5) = -6560
  1674. WHEN "ClavichdBb" : *CHANNELVOICE 5 ClavichdBb
  1675. tun%(5) = -10315
  1676. WHEN "ClavinetBb" : *CHANNELVOICE 5 ClavinetBb
  1677. tun%(5) = -6219
  1678. WHEN "CornetEb" : *CHANNELVOICE 5 CornetEb
  1679. tun%(5) = -4000
  1680. WHEN "EnsWodAb45" : *CHANNELVOICE 5 EnsWodAb45
  1681. tun%(5) = -9632
  1682. WHEN "EnsWodGb12" : *CHANNELVOICE 5 EnsWodGb12
  1683. tun%(5) = -4853
  1684. WHEN "Glock2Ab5" : *CHANNELVOICE 5 Glock2Ab5
  1685. tun%(5) = -9632
  1686. WHEN "GtMelobarC" : *CHANNELVOICE 5 GtMelobarC
  1687. tun%(5) = -6901
  1688. WHEN "GtWashbnBb" : *CHANNELVOICE 5 GtWashbnBb
  1689. tun%(5) = -6219
  1690. WHEN "HarmonicaE" : *CHANNELVOICE 5 HarmonicaE
  1691. tun%(5) = -4171
  1692. WHEN "Jew'sHarpA" : *CHANNELVOICE 5 Jew'sHarpA
  1693. tun%(5) = -6219
  1694. WHEN "MusetteB" : *CHANNELVOICE 5 MusetteB
  1695. tun%(5) = -10656
  1696. WHEN "OboeGb" : *CHANNELVOICE 5 OboeGb
  1697. tun%(5) = -13131
  1698. WHEN "OrchHit2B" : *CHANNELVOICE 5 OrchHit2B
  1699. tun%(5) = -5451
  1700. WHEN "OrcSusBb23" : *CHANNELVOICE 5 OrcSusBb23
  1701. tun%(5) = -6304
  1702. WHEN "PiccoloE" : *CHANNELVOICE 5 PiccoloE
  1703. tun%(5) = -16544
  1704. WHEN "SaxSoprnoE" : *CHANNELVOICE 5 SaxSoprnoE
  1705. tun%(5) = -12448
  1706. WHEN "StrngThkBb" : *CHANNELVOICE 5 StrngThkBb
  1707. tun%(5) = -5792
  1708. WHEN "TubaGb" : *CHANNELVOICE 5 TubaGb
  1709. tun%(5) = -929
  1710. WHEN "BassDrum" : *CHANNELVOICE 5 BassDrum
  1711. tun%(5) = -4000
  1712. WHEN "HiHat" : *CHANNELVOICE 5 HiHat
  1713. tun%(5) = -4000
  1714. WHEN "OrcHit" : *CHANNELVOICE 5 OrcHit
  1715. tun%(5) = -4085
  1716. WHEN "Piano" : *CHANNELVOICE 5 Piano
  1717. tun%(5) = -4171
  1718. WHEN "Sax" : *CHANNELVOICE 5 Sax
  1719. tun%(5) = -4085
  1720. WHEN "Snare" : *CHANNELVOICE 5 Snare
  1721. tun%(5) = -8096
  1722. WHEN "Choir1" : *CHANNELVOICE 5 Choir1
  1723. tun%(5) = -6901
  1724. WHEN "ChurOrgan" : *CHANNELVOICE 5 ChurOrgan
  1725. tun%(5) = -6901
  1726. WHEN "Opera" : *CHANNELVOICE 5 Opera
  1727. tun%(5) = -13387
  1728. WHEN "OrchChoir" : *CHANNELVOICE 5 OrchChoir
  1729. tun%(5) = -6133
  1730. WHEN "OrganHit" : *CHANNELVOICE 5 OrganHit
  1731. tun%(5) = -5024
  1732. WHEN "AgogoAfric" : *CHANNELVOICE 5 AgogoAfric
  1733. tun%(5) = -6219
  1734. WHEN "AgogoBrazi" : *CHANNELVOICE 5 AgogoBrazi
  1735. tun%(5) = -10997
  1736. WHEN "AgogoWood" : *CHANNELVOICE 5 AgogoWood
  1737. tun%(5) = -13728
  1738. WHEN "BDGatedRev" : *CHANNELVOICE 5 BDGatedRev
  1739. tun%(5) = -5877
  1740. WHEN "BDMarching" : *CHANNELVOICE 5 BDMarching
  1741. tun%(5) = -8608
  1742. WHEN "BDPiloMute" : *CHANNELVOICE 5 BDPiloMute
  1743. tun%(5) = -7072
  1744. WHEN "Cabasa" : *CHANNELVOICE 5 Cabasa
  1745. tun%(5) = -7072
  1746. WHEN "Cachichi1" : *CHANNELVOICE 5 Cachichi1
  1747. tun%(5) = -4000
  1748. WHEN "CachichiTr" : *CHANNELVOICE 5 CachichiTr
  1749. tun%(5) = -8096
  1750. WHEN "Castanets" : *CHANNELVOICE 5 Castanets
  1751. tun%(5) = -4000
  1752. WHEN "CongaMid" : *CHANNELVOICE 5 CongaMid
  1753. tun%(5) = -4171
  1754. WHEN "CongaSmCl" : *CHANNELVOICE 5 CongaSmCl
  1755. tun%(5) = -4683
  1756. WHEN "CymbalCrsh" : *CHANNELVOICE 5 CymbalCrsh
  1757. tun%(5) = -4000
  1758. WHEN "CymRideBel" : *CHANNELVOICE 5 CymRideBel
  1759. tun%(5) = -16288
  1760. WHEN "CymRStRoll" : *CHANNELVOICE 5 CymRStRoll
  1761. tun%(5) = -6389
  1762. WHEN "CymSplshCa" : *CHANNELVOICE 5 CymSplshCa
  1763. tun%(5) = -9120
  1764. WHEN "Flexitone" : *CHANNELVOICE 5 Flexitone
  1765. tun%(5) = -8096
  1766. WHEN "GongSoft" : *CHANNELVOICE 5 GongSoft
  1767. tun%(5) = -5365
  1768. WHEN "Gonza1" : *CHANNELVOICE 5 Gonza1
  1769. tun%(5) = -12192
  1770. WHEN "GuiroSlow" : *CHANNELVOICE 5 GuiroSlow
  1771. tun%(5) = -6048
  1772. WHEN "HandClaps" : *CHANNELVOICE 5 HandClaps
  1773. tun%(5) = -4000
  1774. WHEN "HiHatFoot" : *CHANNELVOICE 5 HiHatFoot
  1775. tun%(5) = -6389
  1776. WHEN "Maracas1" : *CHANNELVOICE 5 Maracas1
  1777. tun%(5) = -8096
  1778. WHEN "MarimbaSB3" : *CHANNELVOICE 5 MarimbaSB3
  1779. tun%(5) = -4000
  1780. WHEN "Ratchet" : *CHANNELVOICE 5 Ratchet
  1781. tun%(5) = -6731
  1782. WHEN "RotoTomRev" : *CHANNELVOICE 5 RotoTomRev
  1783. tun%(5) = -6133
  1784. WHEN "SimmonsBD1" : *CHANNELVOICE 5 SimmonsBD1
  1785. tun%(5) = -8096
  1786. WHEN "SimmonsSn1" : *CHANNELVOICE 5 SimmonsSn1
  1787. tun%(5) = -5707
  1788. WHEN "SleighBell" : *CHANNELVOICE 5 SleighBell
  1789. tun%(5) = -4000
  1790. WHEN "SuperGong" : *CHANNELVOICE 5 SuperGong
  1791. tun%(5) = -4341
  1792. WHEN "SynthSnare" : *CHANNELVOICE 5 SynthSnare
  1793. tun%(5) = -4000
  1794. WHEN "SynTom" : *CHANNELVOICE 5 SynTom
  1795. tun%(5) = -9120
  1796. WHEN "TimpCresBb" : *CHANNELVOICE 5 TimpCresBb
  1797. tun%(5) = -5962
  1798. WHEN "TimpLowBb" : *CHANNELVOICE 5 TimpLowBb
  1799. tun%(5) = -5707
  1800. WHEN "TimpRollEb" : *CHANNELVOICE 5 TimpRollEb
  1801. tun%(5) = -4000
  1802. WHEN "TomRoll" : *CHANNELVOICE 5 TomRoll
  1803. tun%(5) = -4000
  1804. WHEN "ToyHooter" : *CHANNELVOICE 5 ToyHooter
  1805. tun%(5) = -9717
  1806. WHEN "ToyWhistle" : *CHANNELVOICE 5 ToyWhistle
  1807. tun%(5) = -4000
  1808. ENDCASE
  1809. WHEN 6 :
  1810. CASE waveforms$(vnumber%) OF
  1811. WHEN "WaveSynth-Beep" : *CHANNELVOICE 6 WaveSynth-Beep
  1812. WHEN "StringLib-Soft" : *CHANNELVOICE 6 StringLib-Soft
  1813. WHEN "StringLib-Pluck" : *CHANNELVOICE 6 StringLib-Pluck
  1814. WHEN "StringLib-Steel" : *CHANNELVOICE 6 StringLib-Steel
  1815. WHEN "StringLib-Hard" : *CHANNELVOICE 6 StringLib-Hard
  1816. WHEN "Percussion-Soft" : *CHANNELVOICE 6 Percussion-Soft
  1817. WHEN "Percussion-Medium" : *CHANNELVOICE 6 Percussion-Medium
  1818. WHEN "Percussion-Snare" : *CHANNELVOICE 6 Percussion-Snare
  1819. WHEN "Percussion-Noise" : *CHANNELVOICE 6 Percussion-Noise
  1820. WHEN "BassBowAb" : *CHANNELVOICE 6 BassBowAb
  1821. tun%(6) = -1470
  1822. WHEN "AcouBass" : *CHANNELVOICE 6 AcouBass
  1823. tun%(6) = -2731
  1824. WHEN "Vibe" : *CHANNELVOICE 6 Vibe
  1825. tun%(6) = -6912
  1826. WHEN "BugleC" : *CHANNELVOICE 6 BugleC
  1827. tun%(6) = -11008
  1828. WHEN "CornetEb" : *CHANNELVOICE 6 CornetEb
  1829. tun%(6) = -12117
  1830. WHEN "SaxEbBarC" : *CHANNELVOICE 6 SaxEbBarC
  1831. tun%(6) = -2816
  1832. WHEN "SaxBbTenrE" : *CHANNELVOICE 6 SaxBbTenrE
  1833. tun%(6) = -4181
  1834. WHEN "BassoonEb" : *CHANNELVOICE 6 BassoonEb
  1835. tun%(6) = -4011
  1836. WHEN "ClarinetBb" : *CHANNELVOICE 6 ClarinetBb
  1837. tun%(6) = -10325
  1838. WHEN "EngHornGb" : *CHANNELVOICE 6 EngHornGb
  1839. tun%(6) = -8960
  1840. WHEN "MandolinDb" : *CHANNELVOICE 6 MandolinDb
  1841. tun%(6) = -11264
  1842. WHEN "Piano2B" : *CHANNELVOICE 6 Piano2B
  1843. tun%(6) = -2475
  1844. WHEN "ClarVibEb" : *CHANNELVOICE 6 ClarVibEb
  1845. tun%(6) = -7850
  1846. WHEN "GtrDobroB" : *CHANNELVOICE 6 GtrDobroB
  1847. tun%(6) = -6485
  1848. WHEN "RecorderGb" : *CHANNELVOICE 6 RecorderGb
  1849. tun%(6) = -13056
  1850. WHEN "FlugelHnEb" : *CHANNELVOICE 6 FlugelHnEb
  1851. tun%(6) = -12032
  1852. WHEN "VceMmmGb23" : *CHANNELVOICE 6 VceMmmGb23
  1853. tun%(6) = -853
  1854. WHEN "VceMOooGb3" : *CHANNELVOICE 6 VceMOooGb3
  1855. tun%(6) = -4843
  1856. WHEN "VceFemAahC" : *CHANNELVOICE 6 VceFemAahC
  1857. tun%(6) = -10948
  1858. WHEN "VceFMmmGb4" : *CHANNELVOICE 6 VceFMmmGb4
  1859. tun%(6) = -8918
  1860. WHEN "Bass" : *CHANNELVOICE 6 Bass
  1861. tun%(6) = 0
  1862. WHEN "ChurchBell" : *CHANNELVOICE 6 ChurchBell
  1863. tun%(6) = -2731
  1864. WHEN "mysound" : *CHANNELVOICE 6 mysound
  1865. tun%(6) = 0
  1866. WHEN "GuiroFast" : *CHANNELVOICE 6 GuiroFast
  1867. tun%(6) = -4000
  1868. WHEN "Clave" : *CHANNELVOICE 6 Clave
  1869. tun%(6) = -8096
  1870. WHEN "CowBell" : *CHANNELVOICE 6 CowBell
  1871. tun%(6) = -5707
  1872. WHEN "CymbRideHd" : *CHANNELVOICE 6 CymbRideHd
  1873. tun%(6) = -8096
  1874. WHEN "AcGuitar1" : *CHANNELVOICE 6 AcGuitar1
  1875. tun%(6) = -7072
  1876. WHEN "CongaHi" : *CHANNELVOICE 6 CongaHi
  1877. tun%(6) = -4000
  1878. WHEN "DrumExplo" : *CHANNELVOICE 6 DrumExplo
  1879. tun%(6) = -4000
  1880. WHEN "ElecTom1" : *CHANNELVOICE 6 ElecTom1
  1881. tun%(6) = -8096
  1882. WHEN "Harp1" : *CHANNELVOICE 6 Harp1
  1883. tun%(6) = -10997
  1884. WHEN "Harpsi" : *CHANNELVOICE 6 Harpsi
  1885. tun%(6) = -6901
  1886. WHEN "HiString" : *CHANNELVOICE 6 HiString
  1887. tun%(6) = -10997
  1888. WHEN "HonkyPiano" : *CHANNELVOICE 6 HonkyPiano
  1889. tun%(6) = -6901
  1890. WHEN "JapFlute" : *CHANNELVOICE 6 JapFlute
  1891. tun%(6) = -10997
  1892. WHEN "JazzOrgan" : *CHANNELVOICE 6 JazzOrgan
  1893. tun%(6) = -10997
  1894. WHEN "MidStrings" : *CHANNELVOICE 6 MidStrings
  1895. tun%(6) = -6901
  1896. WHEN "NoteArp1" : *CHANNELVOICE 6 NoteArp1
  1897. tun%(6) = -4000
  1898. WHEN "SnareEcho" : *CHANNELVOICE 6 SnareEcho
  1899. tun%(6) = -4341
  1900. WHEN "TablaHi" : *CHANNELVOICE 6 TablaHi
  1901. tun%(6) = -7669
  1902. WHEN "Timpani" : *CHANNELVOICE 6 Timpani
  1903. tun%(6) = -928
  1904. WHEN "Tomtom1" : *CHANNELVOICE 6 Tomtom1
  1905. tun%(6) = -5365
  1906. WHEN "Trombone1" : *CHANNELVOICE 6 Trombone1
  1907. tun%(6) = -6901
  1908. WHEN "Trumpet" : *CHANNELVOICE 6 Trumpet
  1909. tun%(6) = -10997
  1910. WHEN "Xylophone" : *CHANNELVOICE 6 Xylophone
  1911. tun%(6) = -6901
  1912. WHEN "AcouGtr2B" : *CHANNELVOICE 6 AcouGtr2B
  1913. tun%(6) = -6560
  1914. WHEN "AcuBassAb1" : *CHANNELVOICE 6 AcuBassAb1
  1915. tun%(6) = -1610
  1916. WHEN "BagPipeG" : *CHANNELVOICE 6 BagPipeG
  1917. tun%(6) = -9291
  1918. WHEN "BanjoChdBb" : *CHANNELVOICE 6 BanjoChdBb
  1919. tun%(6) = -4000
  1920. WHEN "BazookiE" : *CHANNELVOICE 6 BazookiE
  1921. tun%(6) = -8267
  1922. WHEN "BellC" : *CHANNELVOICE 6 BellC
  1923. tun%(6) = -10997
  1924. WHEN "BrassEns1B" : *CHANNELVOICE 6 BrassEns1B
  1925. tun%(6) = -6560
  1926. WHEN "ClavichdBb" : *CHANNELVOICE 6 ClavichdBb
  1927. tun%(6) = -10315
  1928. WHEN "ClavinetBb" : *CHANNELVOICE 6 ClavinetBb
  1929. tun%(6) = -6219
  1930. WHEN "CornetEb" : *CHANNELVOICE 6 CornetEb
  1931. tun%(6) = -4000
  1932. WHEN "EnsWodAb45" : *CHANNELVOICE 6 EnsWodAb45
  1933. tun%(6) = -9632
  1934. WHEN "EnsWodGb12" : *CHANNELVOICE 6 EnsWodGb12
  1935. tun%(6) = -4853
  1936. WHEN "Glock2Ab5" : *CHANNELVOICE 6 Glock2Ab5
  1937. tun%(6) = -9632
  1938. WHEN "GtMelobarC" : *CHANNELVOICE 6 GtMelobarC
  1939. tun%(6) = -6901
  1940. WHEN "GtWashbnBb" : *CHANNELVOICE 6 GtWashbnBb
  1941. tun%(6) = -6219
  1942. WHEN "HarmonicaE" : *CHANNELVOICE 6 HarmonicaE
  1943. tun%(6) = -4171
  1944. WHEN "Jew'sHarpA" : *CHANNELVOICE 6 Jew'sHarpA
  1945. tun%(6) = -6219
  1946. WHEN "MusetteB" : *CHANNELVOICE 6 MusetteB
  1947. tun%(6) = -10656
  1948. WHEN "OboeGb" : *CHANNELVOICE 6 OboeGb
  1949. tun%(6) = -13131
  1950. WHEN "OrchHit2B" : *CHANNELVOICE 6 OrchHit2B
  1951. tun%(6) = -5451
  1952. WHEN "OrcSusBb23" : *CHANNELVOICE 6 OrcSusBb23
  1953. tun%(6) = -6304
  1954. WHEN "PiccoloE" : *CHANNELVOICE 6 PiccoloE
  1955. tun%(6) = -16544
  1956. WHEN "SaxSoprnoE" : *CHANNELVOICE 6 SaxSoprnoE
  1957. tun%(6) = -12448
  1958. WHEN "StrngThkBb" : *CHANNELVOICE 6 StrngThkBb
  1959. tun%(6) = -5792
  1960. WHEN "TubaGb" : *CHANNELVOICE 6 TubaGb
  1961. tun%(6) = -929
  1962. WHEN "BassDrum" : *CHANNELVOICE 6 BassDrum
  1963. tun%(6) = -4000
  1964. WHEN "HiHat" : *CHANNELVOICE 6 HiHat
  1965. tun%(6) = -4000
  1966. WHEN "OrcHit" : *CHANNELVOICE 6 OrcHit
  1967. tun%(6) = -4085
  1968. WHEN "Piano" : *CHANNELVOICE 6 Piano
  1969. tun%(6) = -4171
  1970. WHEN "Sax" : *CHANNELVOICE 6 Sax
  1971. tun%(6) = -4085
  1972. WHEN "Snare" : *CHANNELVOICE 6 Snare
  1973. tun%(6) = -8096
  1974. WHEN "Choir1" : *CHANNELVOICE 6 Choir1
  1975. tun%(6) = -6901
  1976. WHEN "ChurOrgan" : *CHANNELVOICE 6 ChurOrgan
  1977. tun%(6) = -6901
  1978. WHEN "Opera" : *CHANNELVOICE 6 Opera
  1979. tun%(6) = -13387
  1980. WHEN "OrchChoir" : *CHANNELVOICE 6 OrchChoir
  1981. tun%(6) = -6133
  1982. WHEN "OrganHit" : *CHANNELVOICE 6 OrganHit
  1983. tun%(6) = -5024
  1984. WHEN "AgogoAfric" : *CHANNELVOICE 6 AgogoAfric
  1985. tun%(6) = -6219
  1986. WHEN "AgogoBrazi" : *CHANNELVOICE 6 AgogoBrazi
  1987. tun%(6) = -10997
  1988. WHEN "AgogoWood" : *CHANNELVOICE 6 AgogoWood
  1989. tun%(6) = -13728
  1990. WHEN "BDGatedRev" : *CHANNELVOICE 6 BDGatedRev
  1991. tun%(6) = -5877
  1992. WHEN "BDMarching" : *CHANNELVOICE 6 BDMarching
  1993. tun%(6) = -8608
  1994. WHEN "BDPiloMute" : *CHANNELVOICE 6 BDPiloMute
  1995. tun%(6) = -7072
  1996. WHEN "Cabasa" : *CHANNELVOICE 6 Cabasa
  1997. tun%(6) = -7072
  1998. WHEN "Cachichi1" : *CHANNELVOICE 6 Cachichi1
  1999. tun%(6) = -4000
  2000. WHEN "CachichiTr" : *CHANNELVOICE 6 CachichiTr
  2001. tun%(6) = -8096
  2002. WHEN "Castanets" : *CHANNELVOICE 6 Castanets
  2003. tun%(6) = -4000
  2004. WHEN "CongaMid" : *CHANNELVOICE 6 CongaMid
  2005. tun%(6) = -4171
  2006. WHEN "CongaSmCl" : *CHANNELVOICE 6 CongaSmCl
  2007. tun%(6) = -4683
  2008. WHEN "CymbalCrsh" : *CHANNELVOICE 6 CymbalCrsh
  2009. tun%(6) = -4000
  2010. WHEN "CymRideBel" : *CHANNELVOICE 6 CymRideBel
  2011. tun%(6) = -16288
  2012. WHEN "CymRStRoll" : *CHANNELVOICE 6 CymRStRoll
  2013. tun%(6) = -6389
  2014. WHEN "CymSplshCa" : *CHANNELVOICE 6 CymSplshCa
  2015. tun%(6) = -9120
  2016. WHEN "Flexitone" : *CHANNELVOICE 6 Flexitone
  2017. tun%(6) = -8096
  2018. WHEN "GongSoft" : *CHANNELVOICE 6 GongSoft
  2019. tun%(6) = -5365
  2020. WHEN "Gonza1" : *CHANNELVOICE 6 Gonza1
  2021. tun%(6) = -12192
  2022. WHEN "GuiroSlow" : *CHANNELVOICE 6 GuiroSlow
  2023. tun%(6) = -6048
  2024. WHEN "HandClaps" : *CHANNELVOICE 6 HandClaps
  2025. tun%(6) = -4000
  2026. WHEN "HiHatFoot" : *CHANNELVOICE 6 HiHatFoot
  2027. tun%(6) = -6389
  2028. WHEN "Maracas1" : *CHANNELVOICE 6 Maracas1
  2029. tun%(6) = -8096
  2030. WHEN "MarimbaSB3" : *CHANNELVOICE 6 MarimbaSB3
  2031. tun%(6) = -4000
  2032. WHEN "Ratchet" : *CHANNELVOICE 6 Ratchet
  2033. tun%(6) = -6731
  2034. WHEN "RotoTomRev" : *CHANNELVOICE 6 RotoTomRev
  2035. tun%(6) = -6133
  2036. WHEN "SimmonsBD1" : *CHANNELVOICE 6 SimmonsBD1
  2037. tun%(6) = -8096
  2038. WHEN "SimmonsSn1" : *CHANNELVOICE 6 SimmonsSn1
  2039. tun%(6) = -5707
  2040. WHEN "SleighBell" : *CHANNELVOICE 6 SleighBell
  2041. tun%(6) = -4000
  2042. WHEN "SuperGong" : *CHANNELVOICE 6 SuperGong
  2043. tun%(6) = -4341
  2044. WHEN "SynthSnare" : *CHANNELVOICE 6 SynthSnare
  2045. tun%(6) = -4000
  2046. WHEN "SynTom" : *CHANNELVOICE 6 SynTom
  2047. tun%(6) = -9120
  2048. WHEN "TimpCresBb" : *CHANNELVOICE 6 TimpCresBb
  2049. tun%(6) = -5962
  2050. WHEN "TimpLowBb" : *CHANNELVOICE 6 TimpLowBb
  2051. tun%(6) = -5707
  2052. WHEN "TimpRollEb" : *CHANNELVOICE 6 TimpRollEb
  2053. tun%(6) = -4000
  2054. WHEN "TomRoll" : *CHANNELVOICE 6 TomRoll
  2055. tun%(6) = -4000
  2056. WHEN "ToyHooter" : *CHANNELVOICE 6 ToyHooter
  2057. tun%(6) = -9717
  2058. WHEN "ToyWhistle" : *CHANNELVOICE 6 ToyWhistle
  2059. tun%(6) = -4000
  2060. ENDCASE
  2061. WHEN 7 :
  2062. CASE waveforms$(vnumber%) OF
  2063. WHEN "WaveSynth-Beep" : *CHANNELVOICE 7 WaveSynth-Beep
  2064. WHEN "StringLib-Soft" : *CHANNELVOICE 7 StringLib-Soft
  2065. WHEN "StringLib-Pluck" : *CHANNELVOICE 7 StringLib-Pluck
  2066. WHEN "StringLib-Steel" : *CHANNELVOICE 7 StringLib-Steel
  2067. WHEN "StringLib-Hard" : *CHANNELVOICE 7 StringLib-Hard
  2068. WHEN "Percussion-Soft" : *CHANNELVOICE 7 Percussion-Soft
  2069. WHEN "Percussion-Medium" : *CHANNELVOICE 7 Percussion-Medium
  2070. WHEN "Percussion-Snare" : *CHANNELVOICE 7 Percussion-Snare
  2071. WHEN "Percussion-Noise" : *CHANNELVOICE 7 Percussion-Noise
  2072. WHEN "BassBowAb" : *CHANNELVOICE 7 BassBowAb
  2073. tun%(7) = -1470
  2074. WHEN "AcouBass" : *CHANNELVOICE 7 AcouBass
  2075. tun%(7) = -2731
  2076. WHEN "Vibe" : *CHANNELVOICE 7 Vibe
  2077. tun%(7) = -6912
  2078. WHEN "BugleC" : *CHANNELVOICE 7 BugleC
  2079. tun%(7) = -11008
  2080. WHEN "CornetEb" : *CHANNELVOICE 7 CornetEb
  2081. tun%(7) = -12117
  2082. WHEN "SaxEbBarC" : *CHANNELVOICE 7 SaxEbBarC
  2083. tun%(7) = -2816
  2084. WHEN "SaxBbTenrE" : *CHANNELVOICE 7 SaxBbTenrE
  2085. tun%(7) = -4181
  2086. WHEN "BassoonEb" : *CHANNELVOICE 7 BassoonEb
  2087. tun%(7) = -4011
  2088. WHEN "ClarinetBb" : *CHANNELVOICE 7 ClarinetBb
  2089. tun%(7) = -10325
  2090. WHEN "EngHornGb" : *CHANNELVOICE 7 EngHornGb
  2091. tun%(7) = -8960
  2092. WHEN "MandolinDb" : *CHANNELVOICE 7 MandolinDb
  2093. tun%(7) = -11264
  2094. WHEN "Piano2B" : *CHANNELVOICE 7 Piano2B
  2095. tun%(7) = -2475
  2096. WHEN "ClarVibEb" : *CHANNELVOICE 7 ClarVibEb
  2097. tun%(7) = -7850
  2098. WHEN "GtrDobroB" : *CHANNELVOICE 7 GtrDobroB
  2099. tun%(7) = -6485
  2100. WHEN "RecorderGb" : *CHANNELVOICE 7 RecorderGb
  2101. tun%(7) = -13056
  2102. WHEN "FlugelHnEb" : *CHANNELVOICE 7 FlugelHnEb
  2103. tun%(7) = -12032
  2104. WHEN "VceMmmGb23" : *CHANNELVOICE 7 VceMmmGb23
  2105. tun%(7) = -853
  2106. WHEN "VceMOooGb3" : *CHANNELVOICE 7 VceMOooGb3
  2107. tun%(7) = -4843
  2108. WHEN "VceFemAahC" : *CHANNELVOICE 7 VceFemAahC
  2109. tun%(7) = -10948
  2110. WHEN "VceFMmmGb4" : *CHANNELVOICE 7 VceFMmmGb4
  2111. tun%(7) = -8918
  2112. WHEN "Bass" : *CHANNELVOICE 7 Bass
  2113. tun%(7) = 0
  2114. WHEN "ChurchBell" : *CHANNELVOICE 7 ChurchBell
  2115. tun%(7) = -2731
  2116. WHEN "mysound" : *CHANNELVOICE 7 mysound
  2117. tun%(7) = 0
  2118. WHEN "GuiroFast" : *CHANNELVOICE 7 GuiroFast
  2119. tun%(7) = -4000
  2120. WHEN "Clave" : *CHANNELVOICE 7 Clave
  2121. tun%(7) = -8096
  2122. WHEN "CowBell" : *CHANNELVOICE 7 CowBell
  2123. tun%(7) = -5707
  2124. WHEN "CymbRideHd" : *CHANNELVOICE 7 CymbRideHd
  2125. tun%(7) = -8096
  2126. WHEN "AcGuitar1" : *CHANNELVOICE 7 AcGuitar1
  2127. tun%(7) = -7072
  2128. WHEN "CongaHi" : *CHANNELVOICE 7 CongaHi
  2129. tun%(7) = -4000
  2130. WHEN "DrumExplo" : *CHANNELVOICE 7 DrumExplo
  2131. tun%(7) = -4000
  2132. WHEN "ElecTom1" : *CHANNELVOICE 7 ElecTom1
  2133. tun%(7) = -8096
  2134. WHEN "Harp1" : *CHANNELVOICE 7 Harp1
  2135. tun%(7) = -10997
  2136. WHEN "Harpsi" : *CHANNELVOICE 7 Harpsi
  2137. tun%(7) = -6901
  2138. WHEN "HiString" : *CHANNELVOICE 7 HiString
  2139. tun%(7) = -10997
  2140. WHEN "HonkyPiano" : *CHANNELVOICE 7 HonkyPiano
  2141. tun%(7) = -6901
  2142. WHEN "JapFlute" : *CHANNELVOICE 7 JapFlute
  2143. tun%(7) = -10997
  2144. WHEN "JazzOrgan" : *CHANNELVOICE 7 JazzOrgan
  2145. tun%(7) = -10997
  2146. WHEN "MidStrings" : *CHANNELVOICE 7 MidStrings
  2147. tun%(7) = -6901
  2148. WHEN "NoteArp1" : *CHANNELVOICE 7 NoteArp1
  2149. tun%(7) = -4000
  2150. WHEN "SnareEcho" : *CHANNELVOICE 7 SnareEcho
  2151. tun%(7) = -4341
  2152. WHEN "TablaHi" : *CHANNELVOICE 7 TablaHi
  2153. tun%(7) = -7669
  2154. WHEN "Timpani" : *CHANNELVOICE 7 Timpani
  2155. tun%(7) = -928
  2156. WHEN "Tomtom1" : *CHANNELVOICE 7 Tomtom1
  2157. tun%(7) = -5365
  2158. WHEN "Trombone1" : *CHANNELVOICE 7 Trombone1
  2159. tun%(7) = -6901
  2160. WHEN "Trumpet" : *CHANNELVOICE 7 Trumpet
  2161. tun%(7) = -10997
  2162. WHEN "Xylophone" : *CHANNELVOICE 7 Xylophone
  2163. tun%(7) = -6901
  2164. WHEN "AcouGtr2B" : *CHANNELVOICE 7 AcouGtr2B
  2165. tun%(7) = -6560
  2166. WHEN "AcuBassAb1" : *CHANNELVOICE 7 AcuBassAb1
  2167. tun%(7) = -1610
  2168. WHEN "BagPipeG" : *CHANNELVOICE 7 BagPipeG
  2169. tun%(7) = -9291
  2170. WHEN "BanjoChdBb" : *CHANNELVOICE 7 BanjoChdBb
  2171. tun%(7) = -4000
  2172. WHEN "BazookiE" : *CHANNELVOICE 7 BazookiE
  2173. tun%(7) = -8267
  2174. WHEN "BellC" : *CHANNELVOICE 7 BellC
  2175. tun%(7) = -10997
  2176. WHEN "BrassEns1B" : *CHANNELVOICE 7 BrassEns1B
  2177. tun%(7) = -6560
  2178. WHEN "ClavichdBb" : *CHANNELVOICE 7 ClavichdBb
  2179. tun%(7) = -10315
  2180. WHEN "ClavinetBb" : *CHANNELVOICE 7 ClavinetBb
  2181. tun%(7) = -6219
  2182. WHEN "CornetEb" : *CHANNELVOICE 7 CornetEb
  2183. tun%(7) = -4000
  2184. WHEN "EnsWodAb45" : *CHANNELVOICE 7 EnsWodAb45
  2185. tun%(7) = -9632
  2186. WHEN "EnsWodGb12" : *CHANNELVOICE 7 EnsWodGb12
  2187. tun%(7) = -4853
  2188. WHEN "Glock2Ab5" : *CHANNELVOICE 7 Glock2Ab5
  2189. tun%(7) = -9632
  2190. WHEN "GtMelobarC" : *CHANNELVOICE 7 GtMelobarC
  2191. tun%(7) = -6901
  2192. WHEN "GtWashbnBb" : *CHANNELVOICE 7 GtWashbnBb
  2193. tun%(7) = -6219
  2194. WHEN "HarmonicaE" : *CHANNELVOICE 7 HarmonicaE
  2195. tun%(7) = -4171
  2196. WHEN "Jew'sHarpA" : *CHANNELVOICE 7 Jew'sHarpA
  2197. tun%(7) = -6219
  2198. WHEN "MusetteB" : *CHANNELVOICE 7 MusetteB
  2199. tun%(7) = -10656
  2200. WHEN "OboeGb" : *CHANNELVOICE 7 OboeGb
  2201. tun%(7) = -13131
  2202. WHEN "OrchHit2B" : *CHANNELVOICE 7 OrchHit2B
  2203. tun%(7) = -5451
  2204. WHEN "OrcSusBb23" : *CHANNELVOICE 7 OrcSusBb23
  2205. tun%(7) = -6304
  2206. WHEN "PiccoloE" : *CHANNELVOICE 7 PiccoloE
  2207. tun%(7) = -16544
  2208. WHEN "SaxSoprnoE" : *CHANNELVOICE 7 SaxSoprnoE
  2209. tun%(7) = -12448
  2210. WHEN "StrngThkBb" : *CHANNELVOICE 7 StrngThkBb
  2211. tun%(7) = -5792
  2212. WHEN "TubaGb" : *CHANNELVOICE 7 TubaGb
  2213. tun%(7) = -929
  2214. WHEN "BassDrum" : *CHANNELVOICE 7 BassDrum
  2215. tun%(7) = -4000
  2216. WHEN "HiHat" : *CHANNELVOICE 7 HiHat
  2217. tun%(7) = -4000
  2218. WHEN "OrcHit" : *CHANNELVOICE 7 OrcHit
  2219. tun%(7) = -4085
  2220. WHEN "Piano" : *CHANNELVOICE 7 Piano
  2221. tun%(7) = -4171
  2222. WHEN "Sax" : *CHANNELVOICE 7 Sax
  2223. tun%(7) = -4085
  2224. WHEN "Snare" : *CHANNELVOICE 7 Snare
  2225. tun%(7) = -8096
  2226. WHEN "Choir1" : *CHANNELVOICE 7 Choir1
  2227. tun%(7) = -6901
  2228. WHEN "ChurOrgan" : *CHANNELVOICE 7 ChurOrgan
  2229. tun%(7) = -6901
  2230. WHEN "Opera" : *CHANNELVOICE 7 Opera
  2231. tun%(7) = -13387
  2232. WHEN "OrchChoir" : *CHANNELVOICE 7 OrchChoir
  2233. tun%(7) = -6133
  2234. WHEN "OrganHit" : *CHANNELVOICE 7 OrganHit
  2235. tun%(7) = -5024
  2236. WHEN "AgogoAfric" : *CHANNELVOICE 7 AgogoAfric
  2237. tun%(7) = -6219
  2238. WHEN "AgogoBrazi" : *CHANNELVOICE 7 AgogoBrazi
  2239. tun%(7) = -10997
  2240. WHEN "AgogoWood" : *CHANNELVOICE 7 AgogoWood
  2241. tun%(7) = -13728
  2242. WHEN "BDGatedRev" : *CHANNELVOICE 7 BDGatedRev
  2243. tun%(7) = -5877
  2244. WHEN "BDMarching" : *CHANNELVOICE 7 BDMarching
  2245. tun%(7) = -8608
  2246. WHEN "BDPiloMute" : *CHANNELVOICE 7 BDPiloMute
  2247. tun%(7) = -7072
  2248. WHEN "Cabasa" : *CHANNELVOICE 7 Cabasa
  2249. tun%(7) = -7072
  2250. WHEN "Cachichi1" : *CHANNELVOICE 7 Cachichi1
  2251. tun%(7) = -4000
  2252. WHEN "CachichiTr" : *CHANNELVOICE 7 CachichiTr
  2253. tun%(7) = -8096
  2254. WHEN "Castanets" : *CHANNELVOICE 7 Castanets
  2255. tun%(7) = -4000
  2256. WHEN "CongaMid" : *CHANNELVOICE 7 CongaMid
  2257. tun%(7) = -4171
  2258. WHEN "CongaSmCl" : *CHANNELVOICE 7 CongaSmCl
  2259. tun%(7) = -4683
  2260. WHEN "CymbalCrsh" : *CHANNELVOICE 7 CymbalCrsh
  2261. tun%(7) = -4000
  2262. WHEN "CymRideBel" : *CHANNELVOICE 7 CymRideBel
  2263. tun%(7) = -16288
  2264. WHEN "CymRStRoll" : *CHANNELVOICE 7 CymRStRoll
  2265. tun%(7) = -6389
  2266. WHEN "CymSplshCa" : *CHANNELVOICE 7 CymSplshCa
  2267. tun%(7) = -9120
  2268. WHEN "Flexitone" : *CHANNELVOICE 7 Flexitone
  2269. tun%(7) = -8096
  2270. WHEN "GongSoft" : *CHANNELVOICE 7 GongSoft
  2271. tun%(7) = -5365
  2272. WHEN "Gonza1" : *CHANNELVOICE 7 Gonza1
  2273. tun%(7) = -12192
  2274. WHEN "GuiroSlow" : *CHANNELVOICE 7 GuiroSlow
  2275. tun%(7) = -6048
  2276. WHEN "HandClaps" : *CHANNELVOICE 7 HandClaps
  2277. tun%(7) = -4000
  2278. WHEN "HiHatFoot" : *CHANNELVOICE 7 HiHatFoot
  2279. tun%(7) = -6389
  2280. WHEN "Maracas1" : *CHANNELVOICE 7 Maracas1
  2281. tun%(7) = -8096
  2282. WHEN "MarimbaSB3" : *CHANNELVOICE 7 MarimbaSB3
  2283. tun%(7) = -4000
  2284. WHEN "Ratchet" : *CHANNELVOICE 7 Ratchet
  2285. tun%(7) = -6731
  2286. WHEN "RotoTomRev" : *CHANNELVOICE 7 RotoTomRev
  2287. tun%(7) = -6133
  2288. WHEN "SimmonsBD1" : *CHANNELVOICE 7 SimmonsBD1
  2289. tun%(7) = -8096
  2290. WHEN "SimmonsSn1" : *CHANNELVOICE 7 SimmonsSn1
  2291. tun%(7) = -5707
  2292. WHEN "SleighBell" : *CHANNELVOICE 7 SleighBell
  2293. tun%(7) = -4000
  2294. WHEN "SuperGong" : *CHANNELVOICE 7 SuperGong
  2295. tun%(7) = -4341
  2296. WHEN "SynthSnare" : *CHANNELVOICE 7 SynthSnare
  2297. tun%(7) = -4000
  2298. WHEN "SynTom" : *CHANNELVOICE 7 SynTom
  2299. tun%(7) = -9120
  2300. WHEN "TimpCresBb" : *CHANNELVOICE 7 TimpCresBb
  2301. tun%(7) = -5962
  2302. WHEN "TimpLowBb" : *CHANNELVOICE 7 TimpLowBb
  2303. tun%(7) = -5707
  2304. WHEN "TimpRollEb" : *CHANNELVOICE 7 TimpRollEb
  2305. tun%(7) = -4000
  2306. WHEN "TomRoll" : *CHANNELVOICE 7 TomRoll
  2307. tun%(7) = -4000
  2308. WHEN "ToyHooter" : *CHANNELVOICE 7 ToyHooter
  2309. tun%(7) = -9717
  2310. WHEN "ToyWhistle" : *CHANNELVOICE 7 ToyWhistle
  2311. tun%(7) = -4000
  2312. ENDCASE
  2313. WHEN 8 :
  2314. CASE waveforms$(vnumber%) OF
  2315. WHEN "WaveSynth-Beep" : *CHANNELVOICE 8 WaveSynth-Beep
  2316. WHEN "StringLib-Soft" : *CHANNELVOICE 8 StringLib-Soft
  2317. WHEN "StringLib-Pluck" : *CHANNELVOICE 8 StringLib-Pluck
  2318. WHEN "StringLib-Steel" : *CHANNELVOICE 8 StringLib-Steel
  2319. WHEN "StringLib-Hard" : *CHANNELVOICE 8 StringLib-Hard
  2320. WHEN "Percussion-Soft" : *CHANNELVOICE 8 Percussion-Soft
  2321. WHEN "Percussion-Medium" : *CHANNELVOICE 8 Percussion-Medium
  2322. WHEN "Percussion-Snare" : *CHANNELVOICE 8 Percussion-Snare
  2323. WHEN "Percussion-Noise" : *CHANNELVOICE 8 Percussion-Noise
  2324. WHEN "BassBowAb" : *CHANNELVOICE 8 BassBowAb
  2325. tun%(8) = -1470
  2326. WHEN "AcouBass" : *CHANNELVOICE 8 AcouBass
  2327. tun%(8) = -2731
  2328. WHEN "Vibe" : *CHANNELVOICE 8 Vibe
  2329. tun%(8) = -6912
  2330. WHEN "BugleC" : *CHANNELVOICE 8 BugleC
  2331. tun%(8) = -11008
  2332. WHEN "CornetEb" : *CHANNELVOICE 8 CornetEb
  2333. tun%(8) = -12117
  2334. WHEN "SaxEbBarC" : *CHANNELVOICE 8 SaxEbBarC
  2335. tun%(8) = -2816
  2336. WHEN "SaxBbTenrE" : *CHANNELVOICE 8 SaxBbTenrE
  2337. tun%(8) = -4181
  2338. WHEN "BassoonEb" : *CHANNELVOICE 8 BassoonEb
  2339. tun%(8) = -4011
  2340. WHEN "ClarinetBb" : *CHANNELVOICE 8 ClarinetBb
  2341. tun%(8) = -10325
  2342. WHEN "EngHornGb" : *CHANNELVOICE 8 EngHornGb
  2343. tun%(8) = -8960
  2344. WHEN "MandolinDb" : *CHANNELVOICE 8 MandolinDb
  2345. tun%(8) = -11264
  2346. WHEN "Piano2B" : *CHANNELVOICE 8 Piano2B
  2347. tun%(8) = -2475
  2348. WHEN "ClarVibEb" : *CHANNELVOICE 8 ClarVibEb
  2349. tun%(8) = -7850
  2350. WHEN "GtrDobroB" : *CHANNELVOICE 8 GtrDobroB
  2351. tun%(8) = -6485
  2352. WHEN "RecorderGb" : *CHANNELVOICE 8 RecorderGb
  2353. tun%(8) = -13056
  2354. WHEN "FlugelHnEb" : *CHANNELVOICE 8 FlugelHnEb
  2355. tun%(8) = -12032
  2356. WHEN "VceMmmGb23" : *CHANNELVOICE 8 VceMmmGb23
  2357. tun%(8) = -853
  2358. WHEN "VceMOooGb3" : *CHANNELVOICE 8 VceMOooGb3
  2359. tun%(8) = -4843
  2360. WHEN "VceFemAahC" : *CHANNELVOICE 8 VceFemAahC
  2361. tun%(8) = -10948
  2362. WHEN "VceFMmmGb4" : *CHANNELVOICE 8 VceFMmmGb4
  2363. tun%(8) = -8918
  2364. WHEN "Bass" : *CHANNELVOICE 8 Bass
  2365. tun%(8) = 0
  2366. WHEN "ChurchBell" : *CHANNELVOICE 8 ChurchBell
  2367. tun%(8) = -2731
  2368. WHEN "mysound" : *CHANNELVOICE 8 mysound
  2369. tun%(8) = 0
  2370. WHEN "GuiroFast" : *CHANNELVOICE 8 GuiroFast
  2371. tun%(8) = -4000
  2372. WHEN "Clave" : *CHANNELVOICE 8 Clave
  2373. tun%(8) = -8096
  2374. WHEN "CowBell" : *CHANNELVOICE 8 CowBell
  2375. tun%(8) = -5707
  2376. WHEN "CymbRideHd" : *CHANNELVOICE 8 CymbRideHd
  2377. tun%(8) = -8096
  2378. WHEN "AcGuitar1" : *CHANNELVOICE 8 AcGuitar1
  2379. tun%(8) = -7072
  2380. WHEN "CongaHi" : *CHANNELVOICE 8 CongaHi
  2381. tun%(8) = -4000
  2382. WHEN "DrumExplo" : *CHANNELVOICE 8 DrumExplo
  2383. tun%(8) = -4000
  2384. WHEN "ElecTom1" : *CHANNELVOICE 8 ElecTom1
  2385. tun%(8) = -8096
  2386. WHEN "Harp1" : *CHANNELVOICE 8 Harp1
  2387. tun%(8) = -10997
  2388. WHEN "Harpsi" : *CHANNELVOICE 8 Harpsi
  2389. tun%(8) = -6901
  2390. WHEN "HiString" : *CHANNELVOICE 8 HiString
  2391. tun%(8) = -10997
  2392. WHEN "HonkyPiano" : *CHANNELVOICE 8 HonkyPiano
  2393. tun%(8) = -6901
  2394. WHEN "JapFlute" : *CHANNELVOICE 8 JapFlute
  2395. tun%(8) = -10997
  2396. WHEN "JazzOrgan" : *CHANNELVOICE 8 JazzOrgan
  2397. tun%(8) = -10997
  2398. WHEN "MidStrings" : *CHANNELVOICE 8 MidStrings
  2399. tun%(8) = -6901
  2400. WHEN "NoteArp1" : *CHANNELVOICE 8 NoteArp1
  2401. tun%(8) = -4000
  2402. WHEN "SnareEcho" : *CHANNELVOICE 8 SnareEcho
  2403. tun%(8) = -4341
  2404. WHEN "TablaHi" : *CHANNELVOICE 8 TablaHi
  2405. tun%(8) = -7669
  2406. WHEN "Timpani" : *CHANNELVOICE 8 Timpani
  2407. tun%(8) = -928
  2408. WHEN "Tomtom1" : *CHANNELVOICE 8 Tomtom1
  2409. tun%(8) = -5365
  2410. WHEN "Trombone1" : *CHANNELVOICE 8 Trombone1
  2411. tun%(8) = -6901
  2412. WHEN "Trumpet" : *CHANNELVOICE 8 Trumpet
  2413. tun%(8) = -10997
  2414. WHEN "Xylophone" : *CHANNELVOICE 8 Xylophone
  2415. tun%(8) = -6901
  2416. WHEN "AcouGtr2B" : *CHANNELVOICE 8 AcouGtr2B
  2417. tun%(8) = -6560
  2418. WHEN "AcuBassAb1" : *CHANNELVOICE 8 AcuBassAb1
  2419. tun%(8) = -1610
  2420. WHEN "BagPipeG" : *CHANNELVOICE 8 BagPipeG
  2421. tun%(8) = -9291
  2422. WHEN "BanjoChdBb" : *CHANNELVOICE 8 BanjoChdBb
  2423. tun%(8) = -4000
  2424. WHEN "BazookiE" : *CHANNELVOICE 8 BazookiE
  2425. tun%(8) = -8267
  2426. WHEN "BellC" : *CHANNELVOICE 8 BellC
  2427. tun%(8) = -10997
  2428. WHEN "BrassEns1B" : *CHANNELVOICE 8 BrassEns1B
  2429. tun%(8) = -6560
  2430. WHEN "ClavichdBb" : *CHANNELVOICE 8 ClavichdBb
  2431. tun%(8) = -10315
  2432. WHEN "ClavinetBb" : *CHANNELVOICE 8 ClavinetBb
  2433. tun%(8) = -6219
  2434. WHEN "CornetEb" : *CHANNELVOICE 8 CornetEb
  2435. tun%(8) = -4000
  2436. WHEN "EnsWodAb45" : *CHANNELVOICE 8 EnsWodAb45
  2437. tun%(8) = -9632
  2438. WHEN "EnsWodGb12" : *CHANNELVOICE 8 EnsWodGb12
  2439. tun%(8) = -4853
  2440. WHEN "Glock2Ab5" : *CHANNELVOICE 8 Glock2Ab5
  2441. tun%(8) = -9632
  2442. WHEN "GtMelobarC" : *CHANNELVOICE 8 GtMelobarC
  2443. tun%(8) = -6901
  2444. WHEN "GtWashbnBb" : *CHANNELVOICE 8 GtWashbnBb
  2445. tun%(8) = -6219
  2446. WHEN "HarmonicaE" : *CHANNELVOICE 8 HarmonicaE
  2447. tun%(8) = -4171
  2448. WHEN "Jew'sHarpA" : *CHANNELVOICE 8 Jew'sHarpA
  2449. tun%(8) = -6219
  2450. WHEN "MusetteB" : *CHANNELVOICE 8 MusetteB
  2451. tun%(8) = -10656
  2452. WHEN "OboeGb" : *CHANNELVOICE 8 OboeGb
  2453. tun%(8) = -13131
  2454. WHEN "OrchHit2B" : *CHANNELVOICE 8 OrchHit2B
  2455. tun%(8) = -5451
  2456. WHEN "OrcSusBb23" : *CHANNELVOICE 8 OrcSusBb23
  2457. tun%(8) = -6304
  2458. WHEN "PiccoloE" : *CHANNELVOICE 8 PiccoloE
  2459. tun%(8) = -16544
  2460. WHEN "SaxSoprnoE" : *CHANNELVOICE 8 SaxSoprnoE
  2461. tun%(8) = -12448
  2462. WHEN "StrngThkBb" : *CHANNELVOICE 8 StrngThkBb
  2463. tun%(8) = -5792
  2464. WHEN "TubaGb" : *CHANNELVOICE 8 TubaGb
  2465. tun%(8) = -929
  2466. WHEN "BassDrum" : *CHANNELVOICE 8 BassDrum
  2467. tun%(8) = -4000
  2468. WHEN "HiHat" : *CHANNELVOICE 8 HiHat
  2469. tun%(8) = -4000
  2470. WHEN "OrcHit" : *CHANNELVOICE 8 OrcHit
  2471. tun%(8) = -4085
  2472. WHEN "Piano" : *CHANNELVOICE 8 Piano
  2473. tun%(8) = -4171
  2474. WHEN "Sax" : *CHANNELVOICE 8 Sax
  2475. tun%(8) = -4085
  2476. WHEN "Snare" : *CHANNELVOICE 8 Snare
  2477. tun%(8) = -8096
  2478. WHEN "Choir1" : *CHANNELVOICE 8 Choir1
  2479. tun%(8) = -6901
  2480. WHEN "ChurOrgan" : *CHANNELVOICE 8 ChurOrgan
  2481. tun%(8) = -6901
  2482. WHEN "Opera" : *CHANNELVOICE 8 Opera
  2483. tun%(8) = -13387
  2484. WHEN "OrchChoir" : *CHANNELVOICE 8 OrchChoir
  2485. tun%(8) = -6133
  2486. WHEN "OrganHit" : *CHANNELVOICE 8 OrganHit
  2487. tun%(8) = -5024
  2488. WHEN "AgogoAfric" : *CHANNELVOICE 8 AgogoAfric
  2489. tun%(8) = -6219
  2490. WHEN "AgogoBrazi" : *CHANNELVOICE 8 AgogoBrazi
  2491. tun%(8) = -10997
  2492. WHEN "AgogoWood" : *CHANNELVOICE 8 AgogoWood
  2493. tun%(8) = -13728
  2494. WHEN "BDGatedRev" : *CHANNELVOICE 8 BDGatedRev
  2495. tun%(8) = -5877
  2496. WHEN "BDMarching" : *CHANNELVOICE 8 BDMarching
  2497. tun%(8) = -8608
  2498. WHEN "BDPiloMute" : *CHANNELVOICE 8 BDPiloMute
  2499. tun%(8) = -7072
  2500. WHEN "Cabasa" : *CHANNELVOICE 8 Cabasa
  2501. tun%(8) = -7072
  2502. WHEN "Cachichi1" : *CHANNELVOICE 8 Cachichi1
  2503. tun%(8) = -4000
  2504. WHEN "CachichiTr" : *CHANNELVOICE 8 CachichiTr
  2505. tun%(8) = -8096
  2506. WHEN "Castanets" : *CHANNELVOICE 8 Castanets
  2507. tun%(8) = -4000
  2508. WHEN "CongaMid" : *CHANNELVOICE 8 CongaMid
  2509. tun%(8) = -4171
  2510. WHEN "CongaSmCl" : *CHANNELVOICE 8 CongaSmCl
  2511. tun%(8) = -4683
  2512. WHEN "CymbalCrsh" : *CHANNELVOICE 8 CymbalCrsh
  2513. tun%(8) = -4000
  2514. WHEN "CymRideBel" : *CHANNELVOICE 8 CymRideBel
  2515. tun%(8) = -16288
  2516. WHEN "CymRStRoll" : *CHANNELVOICE 8 CymRStRoll
  2517. tun%(8) = -6389
  2518. WHEN "CymSplshCa" : *CHANNELVOICE 8 CymSplshCa
  2519. tun%(8) = -9120
  2520. WHEN "Flexitone" : *CHANNELVOICE 8 Flexitone
  2521. tun%(8) = -8096
  2522. WHEN "GongSoft" : *CHANNELVOICE 8 GongSoft
  2523. tun%(8) = -5365
  2524. WHEN "Gonza1" : *CHANNELVOICE 8 Gonza1
  2525. tun%(8) = -12192
  2526. WHEN "GuiroSlow" : *CHANNELVOICE 8 GuiroSlow
  2527. tun%(8) = -6048
  2528. WHEN "HandClaps" : *CHANNELVOICE 8 HandClaps
  2529. tun%(8) = -4000
  2530. WHEN "HiHatFoot" : *CHANNELVOICE 8 HiHatFoot
  2531. tun%(8) = -6389
  2532. WHEN "Maracas1" : *CHANNELVOICE 8 Maracas1
  2533. tun%(8) = -8096
  2534. WHEN "MarimbaSB3" : *CHANNELVOICE 8 MarimbaSB3
  2535. tun%(8) = -4000
  2536. WHEN "Ratchet" : *CHANNELVOICE 8 Ratchet
  2537. tun%(8) = -6731
  2538. WHEN "RotoTomRev" : *CHANNELVOICE 8 RotoTomRev
  2539. tun%(8) = -6133
  2540. WHEN "SimmonsBD1" : *CHANNELVOICE 8 SimmonsBD1
  2541. tun%(8) = -8096
  2542. WHEN "SimmonsSn1" : *CHANNELVOICE 8 SimmonsSn1
  2543. tun%(8) = -5707
  2544. WHEN "SleighBell" : *CHANNELVOICE 8 SleighBell
  2545. tun%(8) = -4000
  2546. WHEN "SuperGong" : *CHANNELVOICE 8 SuperGong
  2547. tun%(8) = -4341
  2548. WHEN "SynthSnare" : *CHANNELVOICE 8 SynthSnare
  2549. tun%(8) = -4000
  2550. WHEN "SynTom" : *CHANNELVOICE 8 SynTom
  2551. tun%(8) = -9120
  2552. WHEN "TimpCresBb" : *CHANNELVOICE 8 TimpCresBb
  2553. tun%(8) = -5962
  2554. WHEN "TimpLowBb" : *CHANNELVOICE 8 TimpLowBb
  2555. tun%(8) = -5707
  2556. WHEN "TimpRollEb" : *CHANNELVOICE 8 TimpRollEb
  2557. tun%(8) = -4000
  2558. WHEN "TomRoll" : *CHANNELVOICE 8 TomRoll
  2559. tun%(8) = -4000
  2560. WHEN "ToyHooter" : *CHANNELVOICE 8 ToyHooter
  2561. tun%(8) = -9717
  2562. WHEN "ToyWhistle" : *CHANNELVOICE 8 ToyWhistle
  2563. tun%(8) = -4000
  2564. ENDCASE
  2565. ENDCASE
  2566. :
  2567. ELSE
  2568. *CHANNELVOICE 1 WaveSynth-Beep
  2569. *CHANNELVOICE 2 WaveSynth-Beep
  2570. *CHANNELVOICE 3 WaveSynth-Beep
  2571. *CHANNELVOICE 4 WaveSynth-Beep
  2572. *CHANNELVOICE 5 WaveSynth-Beep
  2573. *CHANNELVOICE 6 WaveSynth-Beep
  2574. *CHANNELVOICE 7 WaveSynth-Beep
  2575. *CHANNELVOICE 8 WaveSynth-Beep
  2576. ENDIF
  2577. :
  2578. REM fill bar%() with starting bar nos for each voice
  2579. PROCnewnotereception((vnumber%-1),startingbar%,startbeat%,0,0,0,0,0,0)
  2580. CASE option% OF
  2581. WHEN 1,3 : startcell% = 0
  2582. WHEN 2 : startcell% = numusedcells%(vnumber%-1)
  2583. WHEN 4 : start% = (startingbar%*10^3)+startbeat%
  2584. voice% = vnumber%-1 : PROCsearch(start%)
  2585. ENDCASE
  2586. cell%(vnumber%-1) = startcell%
  2587. bar%(vnumber%-1) = array%(cell%(vnumber%-1),0,vnumber%-1)DIV10^6
  2588. NEXT
  2589. :
  2590. startbar% = startingbar% : preplaydisplay$ = "y" : PROCdisplay : preplaydisplay$ = "n"
  2591. tempo% = tempi%(startingbar%)*960*0.681595
  2592. IF waveload$ = "done" THEN tempo% = tempo%*1.23065
  2593. TEMPO tempo%
  2594. kount% = 1
  2595. :
  2596. FOR barnum% = startingbar% TO endbar%
  2597. :
  2598. IF playnewscreen$ = "y" AND ((startbar%+(numbars%*2)) <= nobars%) THEN
  2599. IF barnum% = startingbar% + (numbars%*kount%) + 1 THEN
  2600. startbar% += numbars% : preplaydisplay$ = "y" : PROCdisplay: kount% += 1
  2601. preplaydisplay$ = "n"
  2602. ENDIF
  2603. ENDIF
  2604. :
  2605. tempo% = tempi%(barnum%-1)*960*0.681595
  2606. IF waveload$ = "done" THEN tempo% = tempo%*1.23065
  2607. TEMPO tempo%
  2608. REPEAT UNTIL BEAT < 20
  2609. :
  2610. FOR count% = 1 TO nvoices%
  2611. voicenum% = playvoices%(count%)-1
  2612. lv$ = "n"
  2613. IF lvdata%(count%,1)>0 THEN lv$ = "y"
  2614. :
  2615. WHILE bar%(voicenum%) = barnum%
  2616. after% = ((array%(cell%(voicenum%),0,voicenum%) DIV 10^3) MOD 10^3) + 20
  2617. pitchdata% = (array%(cell%(voicenum%),0,voicenum%)MOD10^3)
  2618. notename% = pitchdata% DIV 100
  2619. accid% = (pitchdata% MOD 100) DIV 10
  2620. octave% = pitchdata%MOD10
  2621. inflect% = (array%(cell%(voicenum%),2,voicenum%)MOD10^2) : inflect% -= 50
  2622. :
  2623. CASE notename% OF
  2624. WHEN 6 : pitch% = 3755
  2625. WHEN 5 : pitch% = 3072
  2626. WHEN 4 : pitch% = 2389
  2627. WHEN 3 : pitch% = 1707
  2628. WHEN 2 : pitch% = 1365
  2629. WHEN 1 : pitch% = 683
  2630. WHEN 0 : pitch% = 0
  2631. ENDCASE
  2632. accid% = accid%-5
  2633. accid% = accid%*85.34
  2634. pitch% = pitch% + accid%
  2635. pitch% = pitch% + (4096*octave%) + tun%(count%) + (inflect%*3.41)
  2636. amp2% = (array%(cell%(voicenum%),2,voicenum%)DIV10^2)MOD10
  2637. amp3% = (array%(cell%(voicenum%),2,voicenum%)DIV10^3)MOD10
  2638. :
  2639. dyn% = array%(cell%(voicenum%),1,voicenum%)MOD10
  2640. dyn% = 257 + (16*dyn%)
  2641. IF amp2% = 9 AND amp3% <> 0 THEN
  2642. CASE amp3% OF
  2643. WHEN 1 : dyn% += 1
  2644. WHEN 2 : dyn% += 2
  2645. WHEN 3 : dyn% += 4
  2646. WHEN 4 : dyn% += 6
  2647. WHEN 5 : dyn% += 8
  2648. WHEN 6 : dyn% += 10
  2649. WHEN 7 : dyn% += 12
  2650. WHEN 8 : dyn% += 14
  2651. WHEN 9 : dyn% += 15
  2652. ENDCASE
  2653. ENDIF
  2654. IF dyn% > 383 THEN dyn% = 383
  2655. :
  2656. dur% = (array%(cell%(voicenum%),1,voicenum%)MOD10^4)DIV10
  2657. IF waveload$ = "done" THEN dur% = dur%/1.23065
  2658. IF dur% < 1 THEN dur% = 1
  2659. IF lv$ = "n" THEN
  2660. chan% = count%
  2661. ELSE
  2662. tic%(count%)+=1
  2663. IF lvdata%(count%,tic%(count%)) = 0 THEN tic%(count%) = 1
  2664. chan% = lvdata%(count%,tic%(count%))
  2665. ENDIF
  2666. :
  2667. SOUND chan%, dyn%, pitch%, dur%, after%
  2668. :
  2669. IF amp2% <> 9 THEN PROCenv
  2670. :
  2671. cell%(voicenum%) += 1
  2672. bar%(voicenum%) = array%(cell%(voicenum%),0,voicenum%) DIV 10^6
  2673. :
  2674. ENDWHILE
  2675. :
  2676. NEXT count%
  2677. :
  2678. REPEAT UNTIL BEAT > 20
  2679. :
  2680. NEXT barnum%
  2681. :
  2682. PROCpostdisplay
  2683. :
  2684. ENDPROC
  2685. :
  2686. REM*******************************
  2687. :
  2688. DEF PROCaddonenote
  2689. :
  2690. PROCwindow(20,72,72,55)
  2691. CLS
  2692. INPUT' " Which voice (0 = top) "voice%
  2693. IF voice% = 0 THEN PROCpressenter
  2694. voice% -= 1
  2695. INPUT '" Bar number (for 1 press 0) "barno%
  2696. IF barno% = 0 THEN barno% = 1
  2697. INPUT '" Beat number "beats%
  2698. PROCalterbeats
  2699. beatno% = beats%
  2700. :
  2701. PRINT '" Pitch name ";
  2702. COLOUR 1
  2703. CASE GET$ OF
  2704. WHEN "C","c" : note% = 0 : PRINT "C"
  2705. WHEN "D","d" : note% = 1 : PRINT "D"
  2706. WHEN "E","e" : note% = 2 : PRINT "E"
  2707. WHEN "F","f" : note% = 3 : PRINT "F"
  2708. WHEN "G","g" : note% = 4 : PRINT "G"
  2709. WHEN "A","a" : note% = 5 : PRINT "A"
  2710. WHEN "B","b" : note% = 6 : PRINT "B"
  2711. ENDCASE
  2712. COLOUR 0
  2713. PRINT '" Accidental ";
  2714. COLOUR 1
  2715. CASE GET$ OF
  2716. WHEN "1" : accid% = 1 : PRINT "flat"
  2717. WHEN "2" : accid% = 2 : PRINT "3/8flat"
  2718. WHEN "3" : accid% = 3 : PRINT "1/4flat"
  2719. WHEN "4" : accid% = 4 : PRINT "1/8flat"
  2720. WHEN "5" : accid% = 5 : PRINT "nat"
  2721. WHEN "6" : accid% = 6 : PRINT "1/8shrp"
  2722. WHEN "7" : accid% = 7 : PRINT "1/4shrp"
  2723. WHEN "8" : accid% = 8 : PRINT "3/8shrp"
  2724. WHEN "9" : accid% = 9 : PRINT "shrp"
  2725. ENDCASE
  2726. COLOUR 0
  2727. PRINT '" octave ";
  2728. COLOUR 1
  2729. CASE GET$ OF
  2730. WHEN "0" : octave% = 0 : PRINT "0"
  2731. WHEN "1" : octave% = 1 : PRINT "1"
  2732. WHEN "2" : octave% = 2 : PRINT "2"
  2733. WHEN "3" : octave% = 3 : PRINT "3"
  2734. WHEN "4" : octave% = 4 : PRINT "4"
  2735. WHEN "5" : octave% = 5 : PRINT "5"
  2736. WHEN "6" : octave% = 6 : PRINT "6"
  2737. WHEN "7" : octave% = 7 : PRINT "7"
  2738. WHEN "8" : octave% = 8 : PRINT "8"
  2739. ENDCASE
  2740. COLOUR 0
  2741. pitch% = (note%*100)+(accid%*10)+octave%
  2742. INPUT '" Duration: bars "b%
  2743. INPUT '" beats "beats% : PROCalterbeats
  2744. dur% = (b%*960)+beats%
  2745. :
  2746. CLS
  2747. :
  2748. PRINT'" Envelope/glissando has how many phases? "
  2749. INPUT'" (if no envelope/glissando type 0) "numphases%
  2750. :
  2751. CASE numphases% OF
  2752. :
  2753. WHEN 0 :
  2754. INPUT'" ampitude is "amp$ : PROCconvertdynamics : amp1% = amp%
  2755. ph2% = 0 : ph1% = 0 : amp4% = 0 : amp3% = 0 : amp2% = 9 : gliss3% = 10 : gliss2% = 50 : gliss1% = 50
  2756. :
  2757. WHEN 1 :
  2758. INPUT'" starting amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
  2759. INPUT " destination amplitude is "amp$ : PROCconvertdynamics : amp2% = amp%
  2760. IF amp2% = amp1% THEN amp2% = 0
  2761. INPUT'" glissando is (in 1/8 tones, max 48,-48) "gliss%
  2762. gliss1% = 50-gliss%
  2763. ph2% = 0 : ph1% = 0 : amp4% = 0 : amp3% = 0 : gliss3% = 10 : gliss2% = 50
  2764. :
  2765. WHEN 2 :
  2766. INPUT'" starting amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
  2767. PRINT'" phase 1 ends after what percentage "
  2768. INPUT " of the note's duration "ph1%
  2769. INPUT " phase 1's destination amplitude is "amp$ : PROCconvertdynamics : amp2% = amp%
  2770. INPUT " phase 1's glissando is (in 1/8 tones, max 48,-48) "gliss%
  2771. gliss1% = 50-gliss%
  2772. INPUT'" phase 2's destination amplitude is "amp$ : PROCconvertdynamics : amp3% = amp%
  2773. INPUT " phase 2's glissando is (in 1/8 tones, max 48,-48) "gliss%
  2774. gliss2% = 50-gliss%
  2775. ph2% = 0 : amp4% = 0 : gliss3% = 10
  2776. :
  2777. WHEN 3 :
  2778. INPUT'" starting amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
  2779. PRINT'" phase 1 ends after what percentage "
  2780. INPUT " of the note's duration "ph1%
  2781. INPUT " phase 1's destination amplitude is "amp$ : PROCconvertdynamics : amp2% = amp%
  2782. INPUT " phase 1's glissando is (in 1/8 tones, max 48,-48) "gliss%
  2783. gliss1% = 50-gliss%
  2784. PRINT'" phase 2 ends after what percentage "
  2785. INPUT " of the note's duration "ph2%
  2786. INPUT'" phase 2's destination amplitude is "amp$ : PROCconvertdynamics : amp3% = amp%
  2787. INPUT " phase 2's glissando is (in 1/8 tones, max 48,-48) "gliss%
  2788. gliss2% = 50-gliss%
  2789. INPUT'" phase 3's destination amplitude is "amp$ : PROCconvertdynamics : amp4% = amp%
  2790. REPEAT
  2791. INPUT " phase 3's glissando is (in 1/8 tones, max 10,-10) "gliss%
  2792. gliss3% = 10-gliss%
  2793. IF gliss3% > 20 THEN VDU7
  2794. IF gliss3% < 0 THEN VDU7
  2795. UNTIL gliss3% < 21 AND gliss3% >= 0
  2796. :
  2797. ENDCASE
  2798. :
  2799. env% = (ph2%*10^5)+(ph1%*10^3)+(amp4%*10^2)+(amp3%*10)+amp2%
  2800. dyn% = amp1%
  2801. gliss% = (gliss3%*10^4)+(gliss2%*10^2)+gliss1%
  2802. :
  2803. PRINT' " Microtonal inflection (in cents: 1,-1 etc)"
  2804. INPUT " [max 49,-49]: "inf%
  2805. inf% = 50+inf%
  2806. :
  2807. addingnotes$ = "y"
  2808. PROCnewnotereception(voice%,barno%,beatno%,pitch%,dyn%,env%,dur%,gliss%,inf%)
  2809. :
  2810. PROCdisplay
  2811. :
  2812. ENDPROC
  2813. :
  2814. REM*************************************
  2815. :
  2816. DEF PROCinsertattacks
  2817. :
  2818. PROCundoprepare
  2819. :
  2820. destinationdone$ = "n"
  2821. :
  2822. CASE savevoice$ OF
  2823. WHEN "Y" : PROCsavevoice
  2824. OTHERWISE
  2825. ENDCASE
  2826. REM PROCwindow(20,69,67,55)
  2827. CLS
  2828. repeatposit$ = "n"
  2829. IF method$ = "raw" THEN
  2830. IF reordered$ = "n" THEN
  2831. IF equalized$ = "n" THEN
  2832. IF quiz$ = "yes" THEN
  2833. IF copyit$ = "ON" THEN
  2834. :
  2835. IF copydownwards$ = "n" THEN
  2836. PRINT ' " the passage is to be copied/moved to bar... "
  2837. PRINT ' " (press 0 for same position as original "
  2838. PRINT " or forward/back from it by so much) "
  2839. INPUT ' " (press 0 twice for previous position) "bars%
  2840. IF bars% <> 0 THEN memorybar% = bars%
  2841. IF bars% = 0 THEN
  2842. bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
  2843. IF askprevious$ = "y" THEN
  2844. thing$ = INKEY$(50)
  2845. IF thing$ <> "" THEN
  2846. bars% = memorybar% : beats% = memorybeat%
  2847. COLOUR 1
  2848. PRINT'" bar ";bars%;" beat ";beats%;"?"
  2849. COLOUR 0
  2850. PRINT '" (for OK press 0, if not OK press X) "
  2851. destinationdone$ = "y"
  2852. CASE GET$ OF
  2853. WHEN "X","x" : PROCinsertattacks
  2854. OTHERWISE
  2855. ENDCASE
  2856. ENDIF
  2857. ENDIF
  2858. ENDIF
  2859. ELSE bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
  2860. :
  2861. ENDIF
  2862. :
  2863. ELSE
  2864. :
  2865. PRINT' " the group of attacks is to start at bar "
  2866. INPUT " (0 = first bar displayed) "bars%
  2867. IF bars% = 0 THEN
  2868. bars% = startbar%
  2869. ENDIF
  2870. :
  2871. ENDIF : REM copyit$
  2872. :
  2873. :
  2874. IF repeatposit$ = "n" THEN
  2875. INPUT " beat "beats%
  2876. memorybeat% = beats%
  2877. ELSE
  2878. :
  2879. IF copydownwards$ = "n" AND destinationdone$ = "n" THEN
  2880. COLOUR 1
  2881. PRINT'" bar ";bars%;" beat ";beats%;"?"
  2882. COLOUR 0
  2883. PRINT'" (press 0 for OK, B for Back"
  2884. PRINT " F for Forward, X if not OK)"
  2885. CASE GET$ OF
  2886. WHEN "b", "B" : PROCmoveback
  2887. WHEN "f", "F" : PROCmoveforward
  2888. WHEN "x","X" : PROCinsertattacks
  2889. OTHERWISE
  2890. ENDCASE
  2891. ELSE
  2892. ENDIF
  2893. :
  2894. ENDIF : REM repeatposit$
  2895. :
  2896. ELSE
  2897. bars% = funcbar% : beats% = funcbeat%
  2898. ENDIF : REM quiz$
  2899. :
  2900. quiz$ = "yes"
  2901. PROCalterbeats
  2902. startat% = (bars%*(10^3))+beats%
  2903. ENDIF : REM equalized$
  2904. ENDIF : REM reordered$
  2905. :
  2906. reordered$ = "n" : equalized$ = "n"
  2907. :
  2908. attacks2%() = attacks1%()
  2909. :
  2910. attacks2%() = attacks2%() + (startat% MOD 10^3) : REM moves attacks further up bar, if necc
  2911. :
  2912. attacks3%() = attacks2%()
  2913. FOR count% = 0 TO (manyattacks%-1)
  2914. attacks3%(count%) = attacks3%(count%) DIV 960
  2915. NEXT
  2916. REM gives list of bar mos starting at 0
  2917. :
  2918. attacks3%() = attacks3%() * 960
  2919. attacks2%() = attacks2%() - attacks3%()
  2920. attacks3%() = attacks3%() / 960
  2921. REM list of actual beat numbers
  2922. :
  2923. attacks3%() = attacks3%() + (startat% DIV 10^3) : REM list of actual bar nos
  2924. :
  2925. attacks3%() = attacks3%()*(10^3)
  2926. attacks2%() = attacks2%() + attacks3%()
  2927. REM list of actual bar/beat numbers
  2928. :
  2929. ENDIF : REM method$
  2930. :
  2931. : IF method$ <> "alreadyrhythmicized" THEN rhythmicized$ = "n"
  2932. IF seeinfo$ = "y" THEN
  2933. :
  2934. IF printinfo$ = "y" THEN PROCprintattacks
  2935. durat% = 0
  2936. PROCwindow(10,60,90,5)
  2937. VDU 14
  2938. PRINT '" The group of attacks will be at "
  2939. PRINT" "
  2940. PRINT TAB(8) "ATTACKS AT";
  2941. PRINT TAB(30) "DURATIONS";
  2942. PRINT TAB(54) "RATIOS"
  2943. FOR count% = 0 TO (manyattacks%-1)
  2944. COLOUR 1 : PRINT TAB(1)(attacks2%(count%))DIV10^3;" ";
  2945. COLOUR 0 : PRINT ;(attacks2%(count%))MOD10^3;
  2946. IF count% > 0 THEN
  2947. durat1% = durat%
  2948. durat% = (attacks2%(count%)MOD10^3)-(attacks2%(count%-1)MOD10^3)
  2949. addon% = ((attacks2%(count%)DIV(10^3))-(attacks2%(count%-1)DIV(10^3)))*960
  2950. durat% = durat% + addon%
  2951. PRINT TAB(26) durat%;
  2952. IF count%>1 THEN
  2953. IF direction$ = "rit" THEN ratio = durat%/durat1% ELSE ratio = durat1%/durat%
  2954. CASE ratio OF
  2955. WHEN 0.5 : PRINT TAB(52) "0.5"
  2956. WHEN 1.0 : PRINT TAB(52) "1.0"
  2957. WHEN 1.5 : PRINT TAB(52) "1.5"
  2958. WHEN 2.0 : PRINT TAB(52) "2.0"
  2959. WHEN 2.5 : PRINT TAB(52) "2.5"
  2960. OTHERWISE PRINT TAB(52) ratio
  2961. ENDCASE
  2962. ENDIF
  2963. ENDIF
  2964. NEXT
  2965. :
  2966. VDU 15
  2967. :
  2968. ENDIF : REM seeinfo
  2969. :
  2970. IF method$ = "raw" THEN
  2971. IF seereordery$ = "y" THEN
  2972. PRINT'" Do you want this group to be re-ordered?"
  2973. PRINT'" (Y/1 = yes, any other key = no) "
  2974. :
  2975. CASE GET$ OF
  2976. WHEN "Y","y","1" : PROCreorderattacks
  2977. OTHERWISE
  2978. ENDCASE
  2979. seereordery$ = "n"
  2980. rhythmicized$ = "n"
  2981. ENDIF
  2982. IF seeequalizey$ = "y" THEN
  2983. PRINT'" Do you want to equalize any durations? "
  2984. PRINT'" (Y/0/1 = yes, N/2 = no) "
  2985. CASE GET$ OF
  2986. WHEN "n","N","2" :
  2987. OTHERWISE PROCequalizedurats
  2988. ENDCASE
  2989. seeequalizey$ = "n"
  2990. ENDIF
  2991. IF seerhythmicize$ = "y" THEN
  2992. PRINT'" Do you want this group to be rhythmicized? "
  2993. CASE GET$ OF
  2994. WHEN "Y","y" : PROCprerhythmicize
  2995. rhythmicized$ = "y"
  2996. OTHERWISE
  2997. ENDCASE
  2998. ENDIF
  2999. ENDIF : REM method$ = raw?
  3000. IF seequery$ = "y" THEN
  3001. PRINT ' " Do you want to add this group to the array? "
  3002. CASE GET$ OF
  3003. WHEN "N","n" : PROCdisplay : REM attacks1%() remains intact until a new group of attacks is defined with PROCseriesattacks, and so may be add to array anywhere else
  3004. OTHERWISE
  3005. ENDCASE
  3006. ENDIF : REM seequery
  3007. :
  3008. IF displayedfunc$ = "n" THEN
  3009. :
  3010. IF copydownwards$ = "n" THEN
  3011. IF screenvoices$ = "n" THEN
  3012. :
  3013. IF copysuccessively$ = "y" THEN
  3014. INPUT' " Which voice (0 = top) "voice%
  3015. IF voice% <> 0 THEN succto% = voice% ELSE PROCpressenter
  3016. ELSE
  3017. INPUT'" Which voice (0 = top) "voice%
  3018. IF voice% = 0 THEN PROCpressenter
  3019. ENDIF : REM copysuccessively$
  3020. :
  3021. ELSE
  3022. PRINT'" Which screen voice "
  3023. CASE GET$ OF
  3024. WHEN "1" : voice% = 1
  3025. WHEN "2" : voice% = 2
  3026. WHEN "3" : voice% = 3
  3027. OTHERWISE PROCpressenter
  3028. ENDCASE
  3029. ENDIF
  3030. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  3031. voice% -= 1
  3032. IF voice% >= 0 THEN samevoice% = voice%
  3033. IF voice% = -1 THEN
  3034. IF copysuccessively$ = "n" THEN
  3035. voice% = samevoice%
  3036. ELSE
  3037. voice% = succto%-1
  3038. ENDIF : REM copysucc
  3039. ENDIF : REM if voice = -1
  3040. :
  3041. ELSE voice% = displayvoices%(startv%+downby%) : voice% = voice%-1
  3042. ENDIF
  3043. :
  3044. ENDIF
  3045. :
  3046. IF copyit$ = "OFF" THEN
  3047. IF paraset$ = "on" THEN
  3048. PRINT'" Do you want to (re)define the values assigned "
  3049. PRINT " to each parameter when inputting a group of "
  3050. PRINT " attacks, use defaults or reset defaults? "
  3051. PRINT " (press Y/N/D/R)"
  3052. PRINT'" - press M/V/D/P again to go back to always "
  3053. PRINT " using the assigned values without asking "
  3054. CASE GET$ OF
  3055. WHEN "R","r" : resetdefaults$ = "y"
  3056. PRINT'" Please press the same key again to proceed"
  3057. OTHERWISE
  3058. PRINT'" Please press the same key again to proceed"
  3059. ENDCASE
  3060. :
  3061. CASE GET$ OF
  3062. WHEN "Y","y","R","r" :
  3063. CLS : parasdefined$ = "yes" : PRINT' " all at pitch name ";
  3064. COLOUR 1
  3065. CASE GET$ OF
  3066. WHEN "C","c" : note% = 0 : PRINT "C"
  3067. WHEN "D","d" : note% = 1 : PRINT "D"
  3068. WHEN "E","e" : note% = 2 : PRINT "E"
  3069. WHEN "F","f" : note% = 3 : PRINT "F"
  3070. WHEN "G","g" : note% = 4 : PRINT "G"
  3071. WHEN "A","a" : note% = 5 : PRINT "A"
  3072. WHEN "B","b" : note% = 6 : PRINT "B"
  3073. ENDCASE
  3074. COLOUR 0
  3075. PRINT " accidental ";
  3076. COLOUR 1
  3077. CASE GET$ OF
  3078. WHEN "1" : accid% = 1 : PRINT "flat"
  3079. WHEN "2" : accid% = 2 : PRINT "3/8flat"
  3080. WHEN "3" : accid% = 3 : PRINT "1/4flat"
  3081. WHEN "4" : accid% = 4 : PRINT "1/8flat"
  3082. WHEN "5" : accid% = 5 : PRINT "nat"
  3083. WHEN "6" : accid% = 6 : PRINT "1/8shrp"
  3084. WHEN "7" : accid% = 7 : PRINT "1/4shrp"
  3085. WHEN "8" : accid% = 8 : PRINT "3/8shrp"
  3086. WHEN "9" : accid% = 9 : PRINT "shrp"
  3087. ENDCASE
  3088. COLOUR 0
  3089. PRINT " octave ";
  3090. COLOUR 1
  3091. CASE GET$ OF
  3092. WHEN "0" : octave% = 0 : PRINT "0"
  3093. WHEN "1" : octave% = 1 : PRINT "1"
  3094. WHEN "2" : octave% = 2 : PRINT "2"
  3095. WHEN "3" : octave% = 3 : PRINT "3"
  3096. WHEN "4" : octave% = 4 : PRINT "4"
  3097. WHEN "5" : octave% = 5 : PRINT "5"
  3098. WHEN "6" : octave% = 6 : PRINT "6"
  3099. WHEN "7" : octave% = 7 : PRINT "7"
  3100. WHEN "8" : octave% = 8 : PRINT "8"
  3101. ENDCASE
  3102. COLOUR 0
  3103. pitchset%(voice%) = (note%*100)+(accid%*10)+octave%
  3104. IF resetdefaults$ = "y" THEN
  3105. FOR count% = 0 TO (numparts%-1)
  3106. pitchset%(count%) = pitchset%(voice%)
  3107. NEXT
  3108. ENDIF
  3109. INPUT " all at duration: bars "b%
  3110. INPUT " beats "beats% : PROCalterbeats
  3111. dur% = (b%*960)+beats%
  3112. durset%(voice%) = dur%
  3113. IF resetdefaults$ = "y" THEN
  3114. FOR count% = 0 TO (numparts%-1)
  3115. durset%(count%) = durset%(voice%)
  3116. NEXT
  3117. ENDIF
  3118. :
  3119. INPUT " all at amplitude "amp$
  3120. CASE amp$ OF
  3121. WHEN "0" : ampset%(voice%) = 0
  3122. WHEN "ppp" : ampset%(voice%) = 1
  3123. WHEN "pp" : ampset%(voice%) = 2
  3124. WHEN "p" : ampset%(voice%) = 3
  3125. WHEN "mp" : ampset%(voice%) = 4
  3126. WHEN "mf" : ampset%(voice%) = 5
  3127. WHEN "f" : ampset%(voice%) = 6
  3128. WHEN "ff" : ampset%(voice%) = 7
  3129. WHEN "fff" : ampset%(voice%) = 8
  3130. ENDCASE
  3131. IF resetdefaults$ = "y" THEN
  3132. FOR count% = 0 TO (numparts%-1)
  3133. ampset%(count%) = ampset%(voice%)
  3134. NEXT
  3135. ENDIF
  3136. :
  3137. INPUT " all at microtonal inflection (in cents: 1,-1 etc) [max 49,-49]: "infset%
  3138. infset%(voice%) = 50+infset%
  3139. envset%(voice%) = 9
  3140. glissset%(voice%) = 105050
  3141. resetdefaults$ = "n"
  3142. WHEN "D","d" : pitchset%(voice%) = 55
  3143. ampset%(voice%) = 6
  3144. envset%(voice%) = 9
  3145. durset%(voice%) = 319
  3146. glissset%(voice%) = 105050
  3147. infset%(voice%) = 50
  3148. OTHERWISE
  3149. ENDCASE
  3150. ENDIF
  3151. ENDIF
  3152. :
  3153. addingnotes$ = "y"
  3154. IF copyit$ = "OFF" THEN
  3155. IF rhythmicized$ = "n" THEN
  3156. FOR counter% = 0 TO (manyattacks%-1)
  3157. PROCnewnotereception(voice%,(attacks2%(counter%)DIV10^3), (attacks2%(counter%) MOD 10^3), pitchset%(voice%), ampset%(voice%), envset%(voice%), durset%(voice%), glissset%(voice%), infset%(voice%))
  3158. NEXT
  3159. ELSE
  3160. FOR counter% = 0 TO (manyattacks%-1)
  3161. PROCnewnotereception(voice%,(attacks5%(counter%)DIV10^3), (attacks5%(counter%) MOD 10^3), pitchset%(voice%), ampset%(voice%), envset%(voice%), durset%(voice%), glissset%(voice%), infset%(voice%))
  3162. NEXT
  3163. PROCdisarrayfill
  3164. ENDIF
  3165. ELSE
  3166. IF rhythmicized$ = "n" THEN
  3167. FOR counter% = 0 TO (manyattacks%-1)
  3168. PROCnewnotereception(voice%, (attacks2%(counter%)DIV10^3), (attacks2%(counter%)MOD10^3), pitches%(counter%), amplitudes%(counter%), envelopes%(counter%), durations%(counter%), glissandos%(counter%), inflections%(counter%))
  3169. NEXT
  3170. ELSE
  3171. FOR counter% = 0 TO (manyattacks%-1)
  3172. PROCnewnotereception(voice%, (attacks5%(counter%)DIV10^3), (attacks5%(counter%)MOD10^3), pitches%(counter%), amplitudes%(counter%), envelopes%(counter%), durations%(counter%), glissandos%(counter%), inflections%(counter%))
  3173. NEXT
  3174. PROCdisarrayfill
  3175. ENDIF
  3176. :
  3177. ENDIF
  3178. :
  3179. copyit$ = "OFF" : displayedfunc$ = "n" : copydownwards$ = "n" : justone$ = "n"
  3180. quickextract$ = "n"
  3181. PROCdisplay
  3182. :
  3183. ENDPROC
  3184. :
  3185. REM*********************************************
  3186. :
  3187. DEF PROCseriespitches
  3188. :
  3189. PROCwindow(20,69,60,55)
  3190. :
  3191. IF usebottomstave$ = "n" THEN
  3192. :
  3193. IF singlepitch$ = "m" THEN
  3194. IF firstpitch$ = "y" THEN
  3195. PRINT' " How many pitches "
  3196. INPUT " (for 1 press 0) "numpitches%
  3197. ELSE
  3198. PRINT' " How many pitches "
  3199. PRINT " (for 1 press 0,";
  3200. PRINT " for "; prevnumpitches%;
  3201. INPUT " press 0 twice) "numpitches%
  3202. IF numpitches% = 0 THEN
  3203. wait$ = INKEY$(50)
  3204. IF wait$ <> "" THEN numpitches% = prevnumpitches%
  3205. ENDIF
  3206. ENDIF
  3207. ELSE
  3208. numpitches% = 1
  3209. ENDIF
  3210. :
  3211. ELSE
  3212. numpitches% = howmany%
  3213. ENDIF
  3214. :
  3215. IF numpitches% = 0 THEN numpitches% = 1
  3216. IF numpitches% > 1 THEN
  3217. :
  3218. IF askaboutpitches$ = "y" THEN
  3219. PRINT'" Are the pitches all the same?"
  3220. PRINT " (0/1 count as yes, 2 counts as no) "
  3221. CASE GET$ OF
  3222. WHEN "N","n","2" :
  3223. OTHERWISE PROCsamepitches
  3224. ENDCASE
  3225. ELSE PROCsamepitches
  3226. ENDIF
  3227. :
  3228. ENDIF
  3229. :
  3230. FOR count% = 0 TO numpitches% - 1
  3231. PRINT' " Note name for pitch ";count%+1;" is ";
  3232. COLOUR 1
  3233. CASE GET$ OF
  3234. WHEN "C","c" : note% = 0 : PRINT "C"
  3235. WHEN "D","d" : note% = 1 : PRINT "D"
  3236. WHEN "E","e" : note% = 2 : PRINT "E"
  3237. WHEN "F","f" : note% = 3 : PRINT "F"
  3238. WHEN "G","g" : note% = 4 : PRINT "G"
  3239. WHEN "A","a" : note% = 5 : PRINT "A"
  3240. WHEN "B","b" : note% = 6 : PRINT "B"
  3241. ENDCASE
  3242. COLOUR 0
  3243. PRINT " accidental ";
  3244. COLOUR 1
  3245. CASE GET$ OF
  3246. WHEN "1" : accid% = 1 : PRINT "flat"
  3247. WHEN "2" : accid% = 2 : PRINT "3/8flat"
  3248. WHEN "3" : accid% = 3 : PRINT "1/4flat"
  3249. WHEN "4" : accid% = 4 : PRINT "1/8flat"
  3250. WHEN "5" : accid% = 5 : PRINT "nat"
  3251. WHEN "6" : accid% = 6 : PRINT "1/8shrp"
  3252. WHEN "7" : accid% = 7 : PRINT "1/4shrp"
  3253. WHEN "8" : accid% = 8 : PRINT "3/8shrp"
  3254. WHEN "9" : accid% = 9 : PRINT "shrp"
  3255. ENDCASE
  3256. COLOUR 0
  3257. PRINT " octave ";
  3258. COLOUR 1
  3259. CASE GET$ OF
  3260. WHEN "0" : octave% = 0 : PRINT "0"
  3261. WHEN "1" : octave% = 1 : PRINT "1"
  3262. WHEN "2" : octave% = 2 : PRINT "2"
  3263. WHEN "3" : octave% = 3 : PRINT "3"
  3264. WHEN "4" : octave% = 4 : PRINT "4"
  3265. WHEN "5" : octave% = 5 : PRINT "5"
  3266. WHEN "6" : octave% = 6 : PRINT "6"
  3267. WHEN "7" : octave% = 7 : PRINT "7"
  3268. WHEN "8" : octave% = 8 : PRINT "8"
  3269. ENDCASE
  3270. COLOUR 0
  3271. pitches%(count%) = (note%*100)+(accid%*10)+octave%
  3272. NEXT
  3273. :
  3274. prevnumpitches% = numpitches% : firstpitch$ = "n"
  3275. REM function can feed pitches similarly into pitches%
  3276. :
  3277. PROCinsertpitches
  3278. :
  3279. ENDPROC
  3280. :
  3281. REM************************************************
  3282. :
  3283. DEF PROCinsertpitches
  3284. :
  3285. CLS
  3286. :
  3287. IF reorderpitches$ = "y" THEN
  3288. PRINT'" Do you want to randomly re-order"
  3289. PRINT " the pitches (0 = yes, 2 = no)"
  3290. CASE GET$ OF
  3291. WHEN "2" :
  3292. OTHERWISE
  3293. CLS
  3294. PRINT'" Randomly reorder pitches in batches of "
  3295. INPUT " between how many (0 = previous) "low%
  3296. IF low% = 0 THEN
  3297. low% = previouslow%
  3298. COLOUR 1
  3299. PRINT low%
  3300. COLOUR 0
  3301. wait$ = INKEY$(50)
  3302. ENDIF
  3303. INPUT'" and how many "high%
  3304. IF high% = 0 THEN
  3305. high% = previoushigh%
  3306. COLOUR 1
  3307. PRINT high%
  3308. COLOUR 0
  3309. wait$ = INKEY$(50)
  3310. ENDIF
  3311. :
  3312. startingcell% = 0
  3313. pitches1%() = 0
  3314. pitches2%() = 0
  3315. pitches1%() = pitches%()
  3316. REPEAT
  3317. diff% = high%-low%
  3318. batchsize% = RND(diff%+1)-1
  3319. batchsize% += low%
  3320. counter% = 0
  3321. REPEAT
  3322. cell% = RND(batchsize%)
  3323. cell% = startingcell% + cell% - 1
  3324. IF pitches1%(cell%) <> 0 THEN
  3325. pitches2%(startingcell%+counter%) = pitches1%(cell%)
  3326. counter% += 1
  3327. ENDIF
  3328. pitches1%(cell%) = 0
  3329. check% = 0
  3330. FOR count% = 1 TO batchsize%
  3331. check% += pitches1%(startingcell%+count%-1)
  3332. NEXT
  3333. UNTIL check% = 0
  3334. startingcell% += batchsize%
  3335. UNTIL (numpitches%-high%) < startingcell%
  3336. FOR count% = 0 TO numpitches%-1
  3337. IF pitches2%(count%) <> 0 THEN
  3338. pitches%(count%) = pitches2%(count%)
  3339. ENDIF
  3340. NEXT
  3341. previouslow% = low%
  3342. previoushigh% = high%
  3343. ENDCASE
  3344. ENDIF : REM reorderpitches$
  3345. :
  3346. repeatposit$ = "n"
  3347. IF seequery$ = "y" THEN
  3348. PRINT ' " Do you want to read these pitches "
  3349. PRINT " into the array? "
  3350. CASE GET$ OF
  3351. WHEN "N","n" : PROCdisplay : REM pitches% remains intact
  3352. OTHERWISE
  3353. ENDCASE
  3354. ENDIF : REM seequery$
  3355. :
  3356. IF usebottomstave$ = "n" THEN
  3357. IF screenvoices$ = "n" THEN
  3358. :
  3359. IF copysuccessively$ = "n" THEN
  3360. INPUT'' " Which voice? (0 = top) "voice%
  3361. IF voice% = 0 THEN PROCpressenter
  3362. ELSE PROCcopysuccessively
  3363. ENDIF
  3364. :
  3365. ELSE
  3366. PRINT'" Which screen voice "
  3367. CASE GET$ OF
  3368. WHEN "1" : voice% = 1
  3369. WHEN "2" : voice% = 2
  3370. WHEN "3" : voice% = 3
  3371. OTHERWISE PROCpressenter
  3372. ENDCASE
  3373. ENDIF
  3374. ENDIF : REM usebottomstave$
  3375. :
  3376. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  3377. IF usebottomstave$ = "y" THEN voice% = displayvoices%(startv%+2)
  3378. voice% -= 1
  3379. IF voice% >= 0 THEN samevoice% = voice%
  3380. IF voice% = -1 THEN voice% = samevoice%
  3381. :
  3382. IF usebottomstave$ = "n" THEN
  3383. :
  3384. IF quickcopy$ = "y" THEN
  3385. INPUT ' " starting at note number (0 counts as 1) "along%
  3386. IF along% = 0 THEN along% = 1
  3387. along%-=1
  3388. bars% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  3389. beats% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  3390. holdbar% = bars%
  3391. holdbeat% = beats%
  3392. PROCalterbeats
  3393. startat% = (bars%*(10^3))+beats%
  3394. :
  3395. ELSE
  3396. :
  3397. INPUT'" Starting at bar number "bars%
  3398. IF bars% = 0 THEN
  3399. bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
  3400. ENDIF
  3401. holdbar% = bars%
  3402. IF repeatposit$ = "y" THEN
  3403. PRINT'" bar ";bars%;" beat ";beats%;"?"
  3404. PRINT'" (for OK press 0, if not OK press X)"
  3405. CASE GET$ OF
  3406. WHEN"X","x" : PROCinsertpitches
  3407. OTHERWISE
  3408. ENDCASE
  3409. ELSE
  3410. INPUT " beat "beats%
  3411. holdbeat% = beats%
  3412. ENDIF
  3413. PROCalterbeats
  3414. startat% = (bars%*(10^3))+beats%
  3415. :
  3416. ENDIF : REM quickcopy$
  3417. :
  3418. ELSE
  3419. along% = 0
  3420. bars% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  3421. beats% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  3422. holdbar% = bars%
  3423. holdbeat% = beats%
  3424. PROCalterbeats
  3425. startat% = (bars%*(10^3))+beats%
  3426. :
  3427. ENDIF : REM usebottomstave$
  3428. :
  3429. PROCsearch(startat%)
  3430. shunt$ = "N"
  3431. :
  3432. endcell% = startcell% + numpitches% -1
  3433. IF endcell% >= numusedcells%(voice%) THEN endcell% = numusedcells%(voice%)-1
  3434. FOR count% = startcell% TO endcell%
  3435. PROCcellfill(count%,voice%,999,999,(pitches%(count%-startcell%)),9,999,999,99,99)
  3436. NEXT
  3437. :
  3438. PROCdisplay
  3439. :
  3440. ENDPROC
  3441. :
  3442. REM*************************************************
  3443. :
  3444. DEF PROCfunctionprelude
  3445. :
  3446. IF seereorderx$ = "y" THEN seereordery$ = "y"
  3447. IF seeequalizex$ = "y" THEN seeequalizey$ = "y"
  3448. :
  3449. PROCwindow(20,69,60,55) : CLS
  3450. CASE startfinishdurats$ OF
  3451. WHEN "N", "n" :
  3452. INPUT' " rate "rate
  3453. IF rate = 0 THEN rate = 1 : REM for quick inputting
  3454. IF rate <> 1 THEN
  3455. INPUT'" bias (for 3.7 press 0) "bias
  3456. IF bias = 0 THEN bias = 3.7
  3457. ENDIF
  3458. INPUT'" number of attacks "manyattacks%
  3459. IF manyattacks% = 0 THEN manyattacks% = prevmanyattacks%
  3460. COLOUR 1 : PRINT'manyattacks% : COLOUR 0
  3461. prevmanyattacks% = manyattacks%
  3462. CASE funcinput$ OF
  3463. WHEN "durat" :
  3464. PRINT '" total duration between first "
  3465. PRINT " and last attack "
  3466. INPUT'" bars "bars%
  3467. INPUT" beats "beats%
  3468. PROCalterbeats
  3469. totaldur% = (bars%*960)+beats%
  3470. WHEN "points" :
  3471. INPUT '" first attack at bar "funcbar%
  3472. INPUT " beat "funcbeat%
  3473. INPUT " and last attack at bar "funcbar1%
  3474. INPUT " beat "funcbeat1%
  3475. totaldur% = ((funcbar1%*960)+funcbeat1%)-((funcbar%*960)+funcbeat%)
  3476. WHEN "displayed" :
  3477. IF screenvoices$ = "n" THEN
  3478. INPUT' " Which voice/strand (0 = top) "voice%
  3479. IF voice% = 0 THEN PROCpressenter
  3480. :
  3481. ELSE
  3482. PRINT'" Which screen voice "
  3483. CASE GET$ OF
  3484. WHEN "1" : voice% = 1
  3485. WHEN "2" : voice% = 2
  3486. WHEN "3" : voice% = 3
  3487. OTHERWISE PROCpressenter
  3488. ENDCASE
  3489. ENDIF
  3490. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  3491. voice% -= 1
  3492. IF voice% = -1 THEN voice% = samevoice% ELSE samevoice% = voice%
  3493. IF queryalong$ = "y" THEN
  3494. INPUT' " Starting at note number (0 counts as 1) "along%
  3495. IF along% = 0 THEN along% = 1
  3496. along%-=1
  3497. ENDIF
  3498. funcbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  3499. funcbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  3500. funcbar1% = array%(holdstartcell%(voice%)+1+along%,0,voice%)DIV10^6
  3501. funcbeat1% = (array%(holdstartcell%(voice%)+1+along%,0,voice%)MOD10^6)DIV10^3
  3502. totaldur% = ((funcbar1%*960)+funcbeat1%)-((funcbar%*960)+funcbeat%)
  3503. displayedfunc$ = "y" : along% = 0
  3504. OTHERWISE PROCfunctionprelude
  3505. ENDCASE
  3506. :
  3507. result$ = "success"
  3508. :
  3509. PROCfunction
  3510. IF rate <> 1 AND seegraph$ = "y" THEN
  3511. PROCwindow(20,69,50,55)
  3512. PRINT'" Do you want to see the graph? "
  3513. CASE GET$ OF
  3514. WHEN "Y","y" : PROCgraph
  3515. OTHERWISE PROCfunctionpostlude
  3516. ENDCASE
  3517. ELSE
  3518. PROCfunctionpostlude
  3519. ENDIF
  3520. ENDCASE
  3521. :
  3522. CASE funcinput$ OF
  3523. WHEN "durat" :
  3524. PROCwindow(20,69,69,55)
  3525. PRINT' " total duration between first attack "
  3526. PRINT " and last attack "
  3527. INPUT' " bars "bars%
  3528. INPUT " beats "beats%
  3529. PROCalterbeats
  3530. totaldur% = (bars%*960)+beats%
  3531. WHEN "points" :
  3532. PROCwindow(20,69,69,55)
  3533. INPUT' " first attack at bar "funcbar%
  3534. INPUT " beat "funcbeat%
  3535. INPUT " and last attack at bar "funcbar1%
  3536. INPUT " beat "funcbeat1%
  3537. totaldur% = ((funcbar1%*960)+funcbeat1%)-((funcbar%*960)+funcbeat%)
  3538. WHEN "displayed" :
  3539. IF screenvoices$ = "n" THEN
  3540. INPUT' " Which voice/strand (0 = top) "voice%
  3541. IF voice% = 0 THEN PROCpressenter
  3542. ELSE
  3543. PRINT'" Which screen voice "
  3544. CASE GET$ OF
  3545. WHEN "1" : voice% = 1
  3546. WHEN "2" : voice% = 2
  3547. WHEN "3" : voice% = 3
  3548. OTHERWISE PROCpressenter
  3549. ENDCASE
  3550. ENDIF
  3551. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  3552. voice% -= 1
  3553. IF voice% = -1 THEN voice% = samevoice%
  3554. funcbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  3555. funcbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  3556. funcbar1% = array%(holdstartcell%(voice%)+1+along%,0,voice%)DIV10^6
  3557. funcbeat1% = (array%(holdstartcell%(voice%)+1+along%,0,voice%)MOD10^6)DIV10^3
  3558. totaldur% = ((funcbar1%*960)+funcbeat1%)-((funcbar%*960)+funcbeat%)
  3559. displayedfunc$ = "y" : along% = 0
  3560. OTHERWISE PROCfunctionprelude
  3561. ENDCASE
  3562. :
  3563. PROCwindow(20,69,69,54)
  3564. :
  3565. IF firsttimequick$ = "y" THEN
  3566. PRINT' " quick end duration to be... "
  3567. INPUT' " bars "bars%
  3568. INPUT " beats "beats%
  3569. ELSE
  3570. PRINT' " quick end duration to be how many bars "
  3571. PRINT " (for ";prevbars%;" press 0) "
  3572. INPUT bars%
  3573. PRINT' " and how many beats "
  3574. PRINT " (for ";prevbeats%;" press 0) "
  3575. INPUT beats%
  3576. IF bars% = 0 AND beats% = 0 THEN
  3577. bars% = prevbars% : beats% = prevbeats%
  3578. ENDIF
  3579. ENDIF
  3580. prevbars% = bars%
  3581. prevbeats% = beats%
  3582. PROCalterbeats
  3583. quickend% = (bars%*960)+beats%
  3584. :
  3585. IF firsttimequick$ = "y" THEN
  3586. PRINT' " slow end duration to be... "
  3587. INPUT' " bars "bars%
  3588. INPUT " beats "beats%
  3589. ELSE
  3590. PRINT' " slow end duration to be how many bars "
  3591. PRINT " (for ";prevslowbars%;" press 0) "
  3592. INPUT bars%
  3593. PRINT' " and how many beats "
  3594. PRINT " (for ";prevslowbeats%;" press 0) "
  3595. INPUT beats%
  3596. IF bars% = 0 AND beats% = 0 THEN
  3597. bars% = prevslowbars% : beats% = prevslowbeats%
  3598. ENDIF
  3599. ENDIF
  3600. prevslowbars% = bars%
  3601. prevslowbeats% = beats%
  3602. PROCalterbeats
  3603. slowend% = (bars%*960)+beats%
  3604. INPUT' " bias (0 = 3.7) "bias
  3605. IF bias = 0 THEN bias = 3.7
  3606. IF firsttimequick$ = "y" THEN
  3607. INPUT' " estimated number of attacks "manyattacks%
  3608. ELSE
  3609. PRINT' " estimated number of attacks "
  3610. PRINT " (for ";prevest%;" press 0) "
  3611. INPUT manyattacks%
  3612. IF manyattacks% = 0 THEN manyattacks% = prevest%
  3613. ENDIF
  3614. prevest% = manyattacks%
  3615. firsttimequick$ = "n"
  3616. :
  3617. rate = 5.1 : increment = 4
  3618. increment2% = manyattacks%
  3619. ratedir$ = "" : attacksdir$ = ""
  3620. result$ = "noresult"
  3621. doesitloop$ = "" : maybeloop$ = ""
  3622. manyattacks1% = 0 : manyattacks2% = 0 : manyattacks3% = 0 : manyattacks4% = 0 : manyattacks5% = 0
  3623. rate1=0 : rate2=0 : rate3=0 : rate4=0 : rate5=0
  3624. testquickend1% = 0 : testslowend1% = 0
  3625. testquickend% = 0 : testslowend% = 0
  3626. numberoftries%=0
  3627. goes% = 0 : goes1% = 0
  3628. :
  3629. REPEAT
  3630. :
  3631. PROCfunction
  3632. testquickend1% = testquickend%
  3633. testslowend1% = testslowend%
  3634. testquickend% = functionattacks(1)
  3635. testslowend% = functionattacks(manyattacks%-1) - functionattacks(manyattacks%-2)
  3636. manyattacks5% = manyattacks4% : manyattacks4% = manyattacks3%
  3637. manyattacks3% = manyattacks2% : manyattacks2% = manyattacks1%
  3638. manyattacks1% = manyattacks%
  3639. rate5=rate4 : rate4=rate3 : rate3=rate2 : rate2=rate1 : rate1=rate
  3640. IF testquickend% =quickend% AND testslowend% = slowend% THEN
  3641. result$ = "success"
  3642. ENDIF
  3643. :
  3644. IF result$ = "noresult" THEN
  3645. :
  3646. IF testquickend% <= quickend% AND testslowend% >= slowend% THEN
  3647. IF ratedir$ = "up" THEN increment = increment/2.1
  3648. IF increment < 0.01 THEN increment = 0.01
  3649. ratedir$ = "down"
  3650. rate = rate-increment
  3651. IF rate < 1.01 THEN rate = 1.01
  3652. ENDIF
  3653. :
  3654. IF testquickend% >= quickend% AND testslowend% <= slowend% THEN
  3655. IF ratedir$ = "down" THEN increment = increment/2.1
  3656. IF increment < 0.01 THEN increment = 0.01
  3657. ratedir$ = "up"
  3658. rate = rate+increment
  3659. ENDIF
  3660. :
  3661. IF testquickend% < quickend% AND testslowend% < slowend% THEN
  3662. IF attacksdir$ = "up" THEN increment2% = increment2%/2
  3663. IF increment2% < 1 THEN increment2% = 1
  3664. attacksdir$ = "down"
  3665. manyattacks% = manyattacks% - increment2%
  3666. IF manyattacks% < 4 THEN manyattacks% = 4
  3667. ENDIF
  3668. :
  3669. IF testquickend% > quickend% AND testslowend% > slowend% THEN
  3670. IF attacksdir$ = "down" THEN increment2% = increment2%/2
  3671. IF increment2% < 1 THEN increment2% = 1
  3672. attacksdir$ = "up"
  3673. manyattacks% = manyattacks% + increment2%
  3674. IF manyattacks% < 4 THEN manyattacks% = 4
  3675. ENDIF
  3676. :
  3677. ENDIF
  3678. :
  3679. IF manyattacks% = manyattacks2% AND manyattacks% = manyattacks4% AND manyattacks1% = manyattacks3% AND manyattacks1% = manyattacks5% AND manyattacks%<>manyattacks1% AND rate = rate1 AND rate = rate2 AND rate=rate3 AND rate=rate4 THEN
  3680. doesitloop$ = "yes"
  3681. ENDIF
  3682. :
  3683. IF(rate*10000)DIV1=(rate2*10000)DIV1AND(rate*10000)DIV1=(rate4*10000)DIV1 AND(rate1*10000)DIV1=(rate3*10000)DIV1AND(rate1*10000)DIV1=(rate5*10000)DIV1AND(rate*10000)DIV1<>(rate1*10000)DIV1THENmaybeloop$="yes"
  3684. IF(rate*10000)DIV1=(rate3*10000)DIV1AND(rate1*10000)DIV1=(rate4*10000)DIV1AND(rate2*10000)DIV1=(rate5*10000)DIV1AND((rate*10000)DIV1<>(rate1*10000)DIV1OR(rate*10000)DIV1<>(rate2*10000)DIV1)THENmaybeloop$="yes" : REM 3-part loop
  3685. IF maybeloop$="yes" AND manyattacks%=manyattacks1% AND manyattacks% = manyattacks2% AND manyattacks% = manyattacks3% AND manyattacks%=manyattacks4% AND manyattacks%=manyattacks5% THEN doesitloop$ = "yes"
  3686. :
  3687. IF doesitloop$ = "yes" THEN
  3688. CLS
  3689. IF quickend% >= testquickend1% THEN
  3690. margin1 = (quickend%-testquickend1%)/quickend%*100
  3691. ELSE
  3692. margin1 = (testquickend1%-quickend%)/quickend%*100
  3693. ENDIF
  3694. IF slowend% >= testslowend1% THEN
  3695. margin2 = (slowend%-testslowend1%)/slowend%*100
  3696. ELSE
  3697. margin2 = (testslowend1%-slowend%)/slowend%*100
  3698. ENDIF
  3699. IF quickend% >= testquickend% THEN
  3700. margin3 = (quickend%-testquickend%)/quickend%*100
  3701. ELSE
  3702. margin3 = (testquickend%-quickend%)/quickend%*100
  3703. ENDIF
  3704. IF slowend%>=testslowend% THEN
  3705. margin4 = (slowend%-testslowend%)/slowend%*100
  3706. ELSE
  3707. margin4 = (testslowend%-slowend%)/slowend%*100
  3708. ENDIF
  3709. IF ((margin1*10)DIV1)MOD10>4 THEN margin1% = margin1 ELSE margin1% = margin1
  3710. IF ((margin2*10)DIV1)MOD10>4 THEN margin2% = margin2 ELSE margin2% = margin2
  3711. IF ((margin3*10)DIV1)MOD10>4 THEN margin3% = margin3 ELSE margin3% = margin3
  3712. IF ((margin4*10)DIV1)MOD10>4 THEN margin4% = margin4 ELSE margin4% = margin4
  3713. VDU 7
  3714. PROCwindow(10,69,90,48)
  3715. PRINT''" the search is looping between the two closest possible solutions, "
  3716. PRINT " given the present bias (see below)"
  3717. PRINT ' " do you want to opt for one of these, or carry on searching with"
  3718. PRINT " a different bias (press A/B)"
  3719. PRINT'" quickend ";testquickend1%;" (";margin1%;"% off ";quickend%;")"
  3720. PRINT " slowend ";testslowend1%;" (";margin2%;"% off ";slowend%;")"
  3721. PRINT " number of attacks ";manyattacks2%
  3722. PRINT " rate ";rate2
  3723. PRINT " bias ";bias
  3724. PRINT'" quickend ";testquickend%;" (";margin3%;"% off ";quickend%;")"
  3725. PRINT " slowend ";testslowend%;" (";margin4%;"% off ";slowend%;")"
  3726. PRINT " number of attacks ";manyattacks1%
  3727. PRINT " rate ";rate1
  3728. PRINT " bias ";bias
  3729. CASE GET$ OF
  3730. WHEN "A","a" : numberoftries% = 3
  3731. OTHERWISE
  3732. ENDCASE
  3733. numberoftries% +=1 : IF numberoftries% = 1 THEN bias=bias/2
  3734. IF numberoftries% = 2 THEN bias =bias*4
  3735. IF numberoftries% = 3 THEN
  3736. PRINT'" three different biases now tried -"
  3737. PRINT " to opt for one of the last three tries press A/B/C"
  3738. PRINT " or to try again with fresh values press D"
  3739. CASE GET$ OF
  3740. WHEN "A","a" : bias = bias/2
  3741. WHEN "B","b" : bias = bias/4
  3742. WHEN "C","c" : result$ = "loop"
  3743. WHEN "D","d" : PROCfunctionprelude
  3744. ENDCASE
  3745. ENDIF
  3746. IF numberoftries% = 4 THEN result$ = "loop"
  3747. IF result$ <> "loop" THEN
  3748. manyattacks1% = 0 : manyattacks2% = 0 : manyattacks3% = 0 : manyattacks4% = 0 : manyattacks5% = 0
  3749. rate1=0 : rate2=0 : rate3=0 : rate4=0 : rate5=0
  3750. doesitloop$ = "" : maybeloop$ = ""
  3751. ENDIF
  3752. ENDIF
  3753. ENDIF
  3754. :
  3755. UNTIL result$ <> "noresult"
  3756. :
  3757. CASE result$ OF
  3758. WHEN "success" :
  3759. PROCfunction
  3760. PROCwindow(10,69,90,44)
  3761. PRINT''" quickend ";testquickend%
  3762. PRINT " slowend ";testslowend%
  3763. PRINT " "
  3764. PRINT" rate ";rate
  3765. PRINT" bias ";bias
  3766. PRINT" number of attacks ";manyattacks%
  3767. :
  3768. IF seegraph$ = "y" THEN
  3769. PRINT'" Do you want to see the graph? "
  3770. CASE GET$ OF
  3771. WHEN "Y","y" : PROCgraph
  3772. OTHERWISE PROCfunctionpostlude
  3773. ENDCASE
  3774. ELSE PROCfunctionpostlude
  3775. ENDIF
  3776. :
  3777. WHEN "loop" :
  3778. PRINT'" - to opt for the first solution above press A, for the"
  3779. PRINT " second press B, to try again with fresh values press F"
  3780. CASE GET$ OF
  3781. WHEN "A","a" : PROCfunction
  3782. :
  3783. IF seegraph$ = "y" THEN
  3784. PRINT'" Do you want to see the graph? "
  3785. CASE GET$ OF
  3786. WHEN "Y","y" : PROCgraph
  3787. OTHERWISE PROCfunctionpostlude
  3788. ENDCASE
  3789. ELSE PROCfunctionpostlude
  3790. ENDIF
  3791. :
  3792. WHEN "B","b" : manyattacks%=manyattacks1% : rate = rate1
  3793. PROCfunction
  3794. IF seegraph$ = "y" THEN
  3795. PRINT'" Do you want to see the graph? "
  3796. CASE GET$ OF
  3797. WHEN "Y","y" : PROCgraph
  3798. OTHERWISE PROCfunctionpostlude
  3799. ENDCASE
  3800. ELSE PROCfunctionpostlude
  3801. ENDIF
  3802. WHEN "F","f" : PROCfunctionprelude
  3803. ENDCASE
  3804. ENDCASE
  3805. :
  3806. ENDPROC
  3807. :
  3808. REM**********************************************************
  3809. :
  3810. DEF PROCgraph
  3811. :
  3812. numplots% = 10000
  3813. segment = numplots%/(manyattacks%-1)
  3814. horizline = numplots% - segment
  3815. count =1
  3816. REM convolutions below necc simply to get a 'square' graph
  3817. factor1 = numplots%/rate
  3818. factor2 = rate/(rate-1)
  3819. factor3 = rate/numplots%
  3820. factor4 = numplots%/((FNfunction(1)*factor1)-(FNfunction(rate)*factor1))
  3821. factor5 = FNfunction(rate)*factor1
  3822. factor6 = (factor4*factor5)-factor5
  3823. MODE 31 : CLG : CLS
  3824. PRINT TAB(50) " rate ";rate
  3825. PRINT TAB(50) " bias ";bias
  3826. PRINT TAB(50) " number of attacks ";manyattacks%
  3827. PRINT TAB(50) " quickend ";functionattacks(1)
  3828. PRINT TAB(50) " slowend ";functionattacks(manyattacks%-1)-functionattacks(manyattacks%-2)
  3829. PRINT TAB(50) " total duration ";totaldur%
  3830. MOVE 1000,0 : DRAW 0,0 : DRAW 0,1000
  3831. scaling = 900/numplots%
  3832. FOR x = 1 TO rate STEP factor3
  3833. xaxis = ((x*factor1)-factor1)*2
  3834. yaxis = ((FNfunction(x)*factor1)*factor4)-(factor5 + factor6)
  3835. xplot = xaxis*scaling : yplot = yaxis*scaling
  3836. DRAW xplot,yplot
  3837. REM the function uses x = 1 to rate, but the graph plots (xaxis & yaxis) run from 0 to 1000 in each axis
  3838. IF yaxis <= horizline THEN
  3839. LINE 0,yplot, xplot,yplot
  3840. LINE xplot,yplot, xplot,0
  3841. MOVE xplot,yplot
  3842. count += 1
  3843. horizline -= segment
  3844. ENDIF
  3845. NEXT
  3846. PROCfunctionpostlude
  3847. ENDPROC
  3848. :
  3849. REM***************************************
  3850. :
  3851. DEF PROCfunctionpostlude
  3852. :
  3853. IF rate <> 1 THEN
  3854. PRINT '" Accel or rit"
  3855. PRINT " (press A/R or 1/2)"
  3856. CASE GET$ OF
  3857. WHEN "A","a","1" :
  3858. FOR count% = 0 TO (manyattacks%-1)
  3859. attacks1%(count%) = totaldur% - (functionattacks((manyattacks%-1)-count%))
  3860. NEXT
  3861. direction$ = "accel"
  3862. :
  3863. OTHERWISE
  3864. FOR count = 0 TO (manyattacks%-1)
  3865. attacks1%(count) = functionattacks(count)
  3866. NEXT
  3867. direction$ = "rit"
  3868. ENDCASE
  3869. ELSE
  3870. FOR count% = 0 TO (manyattacks%-1)
  3871. attacks1%(count%) = functionattacks(count%)
  3872. NEXT
  3873. direction$ = "rit"
  3874. ENDIF
  3875. :
  3876. method$ = "raw"
  3877. IF funcinput$ = "points" OR funcinput$ = "displayed" THEN quiz$ = "no"
  3878. COLOUR 0 : COLOUR 135 : CLS : PROCinsertattacks
  3879. ENDPROC
  3880. :
  3881. REM***************************************
  3882. :
  3883. DEF FNfunction(x)
  3884. = (rate/x)-(x/bias)+(rate/bias)
  3885. :
  3886. REM***************************************
  3887. :
  3888. DEF PROCprerhythmicize
  3889. :
  3890. PROCwindow(20,69,90,45)
  3891. CLS : PRINT' " Do you want to (re)define the criteria"
  3892. PRINT " for the positioning of irrational groups,"
  3893. PRINT " or use default ones? (Y/N/D) "
  3894. PRINT'" (defaults are: irrat.lngths ";shortirrat%" - "; longirrat%
  3895. PRINT " irrat.locats. ";irratbeats%;" fallback locats. ";irratbeats1%
  3896. PRINT " shortest dur. ";mindur%;" complexity ";given%;" default divs. ";defaultsieve;")"
  3897. CASE GET$ OF
  3898. WHEN "Y","y" :
  3899. PRINT'" Give length of the SHORTEST irrational group desired... "
  3900. INPUT' " bars "bars%
  3901. INPUT " beats "beats%
  3902. PROCalterbeats
  3903. shortirrat% = (bars%*960)+beats%
  3904. PRINT'" Give length of the LONGEST irrational group desired... "
  3905. INPUT'" bars "bars%
  3906. INPUT " beats "beats%
  3907. PROCalterbeats
  3908. longirrat% = (bars%*960)+beats%
  3909. IF longirrat%/beatfactor% > 999 THEN
  3910. VDU 7 : PRINT'" !!Maximum length for irrational groups is 999 beats!! "
  3911. PRINT'" (to try again press C) "
  3912. CASE GET$ OF
  3913. WHEN"C","c" : CLS :PROCprerhythmicize
  3914. ENDCASE
  3915. ENDIF
  3916. PRINT'" Which beats of the bar is it acceptable to begin "
  3917. PRINT " irrational groups of attacks on (1 = first beat of bar only,"
  3918. PRINT " 2 = any 1/2 bar, 3 = any 1/3 bar etc) "
  3919. PRINT " (use this to control allowability of certain group lengths) "
  3920. INPUT irratbeats% : REM 1-16 make integers except 7,9,11,13 & 14
  3921. PRINT'" Which beats of the bar is it acceptable to begin 'fall back' "
  3922. PRINT " irrational groups, ie ones beginning or ending with rests, on "
  3923. PRINT " (1, 2, 3 etc - also for controlling which lengths allowable) "
  3924. INPUT irratbeats1%
  3925. PRINT'" What is the shortest allowable duration, in beats "
  3926. PRINT " (any less than this will be 'edited up')"
  3927. INPUT mindur%
  3928. PROCalterbeats
  3929. sieve = 960/mindur%
  3930. buffer% = 960/(sieve*2)
  3931. PRINT'" What is the maximum allowable irrational complexity, "
  3932. PRINT " eg, '5' allows upto 5 'in the time of' (this parameter "
  3933. PRINT " controls the trade-off between user-friendliness and accuracy) "
  3934. INPUT given%
  3935. PRINT'" By default, irrationals will avoid small divisions beyond a "
  3936. PRINT " certain point, unless required by the rhythm. Confirm or "
  3937. PRINT " re-set this default, which is currently at ";defaultsieve;" divisions "
  3938. INPUT " of the bar (same trade-off as above)"defaultsieve
  3939. WHEN "D","d" :
  3940. PROCrhythmdefaults
  3941. OTHERWISE
  3942. ENDCASE
  3943. :
  3944. PROCquantize
  3945. :
  3946. attacks5%() = attacks2%()
  3947. attacks3%() = attacks3%()/(10^3) : REM list of actual bar nos
  3948. FOR count% = 0 TO (manyattacks%-1)
  3949. attacks4%(count%) = attacks2%(count%) MOD (10^3)
  3950. NEXT : REM list of actual beat nos (attacks2 containing bar/beat nos remains intact)
  3951. :
  3952. REM routine to fill array nodes%() with acceptable beats of bar to start irrat groups on
  3953. IF irratbeats% > 0 THEN
  3954. nextbeat% = 960/irratbeats%
  3955. FOR count% = 1 TO (irratbeats%-1)
  3956. nodes%(count%) = nodes%(count%-1) + nextbeat%
  3957. NEXT
  3958. ENDIF
  3959. :
  3960. REM routine to fill nodes1%() with acceptable beats to start fallback groups on
  3961. nextbeat% = 960/irratbeats1%
  3962. FOR count% = 1 TO (irratbeats1% - 1)
  3963. nodes1%(count%) = nodes1%(count%-1) + nextbeat%
  3964. NEXT
  3965. nodes1%(irratbeats1%) = 960
  3966. :
  3967. REM routine to test whether first attack is on an acceptable beat
  3968. firstattack$ = "offbeat"
  3969. count% = 0
  3970. REPEAT
  3971. IF attacks4%(0) = nodes%(count%) THEN firstattack$ = "onbeat"
  3972. count% += 1
  3973. UNTIL firstattack$ = "onbeat" OR count% > (irratbeats%-1)
  3974. :
  3975. IF firstattack$ = "onbeat" THEN
  3976. endbeat% = attacks2%(0)
  3977. endcell% = 0
  3978. status$ = "onbeat"
  3979. firstgroup$ = "y"
  3980. ELSE
  3981. word$ = ""
  3982. count% = irratbeats1%
  3983. REPEAT
  3984. IF nodes1%(count%) < attacks4%(0) THEN
  3985. endbeat% = (attacks3%(0)*(10^3)) + nodes1%(count%)
  3986. word$ = "found"
  3987. ENDIF
  3988. count% -= 1
  3989. UNTIL word$ = "found" OR count% < 0
  3990. endcell% = 0
  3991. status$ = ""
  3992. firstgroup$ = "y"
  3993. ENDIF
  3994. PROCrhythmicize
  3995. :
  3996. ENDPROC
  3997. :
  3998. REM***************************************************************
  3999. :
  4000. DEF PROCfunction
  4001. :
  4002. IF rate = 1 THEN
  4003. :
  4004. unit = totaldur%/(manyattacks%-1)
  4005. :
  4006. FOR count% = 1 TO (manyattacks%-2)
  4007. :
  4008. attackpoint = unit * count%
  4009. :
  4010. REM rounding-off to nearest integer
  4011. attackpoint = attackpoint * 10
  4012. attackpoint = attackpoint DIV 1
  4013. fraction = attackpoint MOD 10
  4014. IF fraction > 4 THEN
  4015. attackpoint = (attackpoint DIV 10) + 1
  4016. ELSE
  4017. attackpoint = attackpoint DIV 10
  4018. ENDIF
  4019. functionattacks(count%) = attackpoint
  4020. REM list of 'real' attack-values 0-totaldur% rounded to nearest integer
  4021. :
  4022. NEXT
  4023. :
  4024. functionattacks(manyattacks%-1) = totaldur%
  4025. :
  4026. ELSE
  4027. :
  4028. yrange = FNfunction(1) - 1
  4029. segment = yrange/(manyattacks%-1)
  4030. ypoint = FNfunction(1)
  4031. :
  4032. FOR count% = 1 TO (manyattacks%-2)
  4033. :
  4034. ypoint -= segment
  4035. xincrement = rate - 1
  4036. xtry = 1 + (xincrement/2)
  4037. :
  4038. tolerance = yrange/100000 : REM this ought to give highly accurate results
  4039. :
  4040. IF result$ = "success" OR result$ = "loop" OR count% = 1 OR count% = (manyattacks%-2) THEN
  4041. :
  4042. WHILE FNfunction(xtry) > (ypoint+tolerance) OR FNfunction(xtry) < (ypoint-tolerance)
  4043. :
  4044. xincrement = xincrement/2
  4045. IF FNfunction(xtry) < ypoint THEN
  4046. xtry -= xincrement
  4047. ELSE
  4048. xtry += xincrement
  4049. ENDIF
  4050. :
  4051. ENDWHILE
  4052. :
  4053. ENDIF
  4054. :
  4055. functionattacks(count%) = xtry
  4056. :
  4057. NEXT
  4058. :
  4059. functionattacks(0) = 1
  4060. functionattacks(manyattacks%-1) = rate
  4061. :
  4062. REM scaling & rounding routine
  4063. functionattacks() -= 1
  4064. divider = rate-1
  4065. FOR count% = 0 TO (manyattacks%-1)
  4066. functionattacks(count%) = functionattacks(count%)/divider*totaldur%
  4067. NEXT
  4068. :
  4069. FOR count% = 1 TO (manyattacks%-1)
  4070. number = functionattacks(count%)
  4071. number = number*10
  4072. number = number DIV 1
  4073. fraction = number MOD 10
  4074. IF fraction > 4 THEN
  4075. number = (number DIV 10) + 1
  4076. ELSE
  4077. number = number DIV 10
  4078. ENDIF
  4079. functionattacks(count%) = number
  4080. REM list of 'real' attack-values 0-totaldur% rounded to nearest integer
  4081. NEXT
  4082. :
  4083. ENDIF
  4084. :
  4085. ENDPROC
  4086. :
  4087. REM**************************************************************
  4088. :
  4089. DEF PROCrhythmicize
  4090. :
  4091. cant% = 0 : REM for notategroup%() subscript - poss change later
  4092. notategroup%() = 0
  4093. :
  4094. REPEAT
  4095. :
  4096. status1$ = status$
  4097. status$ = ""
  4098. startbeat% = endbeat%
  4099. :
  4100. IF status1$ = "onbeat" OR firstgroup$ = "y" THEN
  4101. startcell% = endcell%
  4102. ELSE startcell% = endcell% + 1
  4103. ENDIF
  4104. firstgroup$ = "n"
  4105. :
  4106. cell% = startcell%
  4107. count% = 0
  4108. condition$ = "full"
  4109. :
  4110. PROCbuffers
  4111. :
  4112. WHILE status$ = "" AND attacks5%(cell%) <= rightbuffer% AND cell% < manyattacks%
  4113. :
  4114. IF attacks5%(cell%) >= leftbuffer% AND attacks5%(cell%) <= rightbuffer% THEN
  4115. :
  4116. IF attacks4%(cell%) >= (960-buffer%) THEN attacks4%(cell%) = (960-attacks4%(cell%))*-1 : REM catches attacks just before barline
  4117. :
  4118. REPEAT
  4119. :
  4120. IF attacks4%(cell%) >= (nodes%(count%)-(buffer%)) AND attacks4%(cell%) <= (nodes%(count%)+(buffer%)) THEN
  4121. :
  4122. IF attacks4%(cell%) < 0 THEN
  4123. br% = attacks3%(cell%)+1
  4124. attacks4%(cell%) = 960 - (attacks4%(cell%)*-1)
  4125. beforebar$ = "y"
  4126. ELSE
  4127. br% = attacks3%(cell%)
  4128. beforebar$ = "n"
  4129. ENDIF
  4130. :
  4131. IF attacks5%(cell%) >= ((br%*10^3)+nodes%(count%)) THEN
  4132. diff% = attacks4%(cell%) - nodes%(count%) + ((attacks3%(cell%)-br%)*960)
  4133. ELSE
  4134. diff% = nodes%(count%) - attacks4%(cell%) + ((br%-attacks3%(cell%))*960)
  4135. ENDIF
  4136. :
  4137. IF attacks5%(cell%+1) >= ((br%*10^3)+nodes%(count%)) THEN
  4138. diff1% = attacks4%(cell%+1)-nodes%(count%)+((attacks3%(cell%+1)-br%)*960)
  4139. ELSE
  4140. diff1% = nodes%(count%)-attacks4%(cell%+1)+((br%-attacks3%(cell%+1))*960)
  4141. ENDIF
  4142. :
  4143. IF diff% <= diff1% THEN
  4144. :
  4145. status$ = "onbeat"
  4146. IF beforebar$ = "y" THEN
  4147. attacks5%(cell%) = (attacks3%(cell%)*10^3) + 1000 + nodes%(count%)
  4148. ELSE
  4149. attacks5%(cell%) = (attacks3%(cell%)*10^3) + nodes%(count%)
  4150. ENDIF
  4151. endbeat% = attacks5%(cell%)
  4152. endcell% = cell%
  4153. difference% = endcell% - startcell%
  4154. IF status1$ = "onbeat" AND difference% = 1 THEN condition$ = "empty"
  4155. IF status1$ = "" AND difference% = 0 THEN condition$ = "empty"
  4156. :
  4157. ENDIF
  4158. :
  4159. ENDIF
  4160. :
  4161. count% += 1
  4162. :
  4163. UNTIL count% = irratbeats% OR status$ = "onbeat"
  4164. :
  4165. ENDIF
  4166. :
  4167. cell% += 1
  4168. count% = 0
  4169. :
  4170. ENDWHILE
  4171. :
  4172. :
  4173. IF status$ = "" THEN
  4174. word$ = ""
  4175. leftbuffer% = leftbuffer% + buffer%
  4176. :
  4177. REPEAT
  4178. :
  4179. IF nodes1%(count%) >= (leftbuffer%MOD10^3) THEN
  4180. :
  4181. IF nodes1%(count%) = 960 THEN
  4182. endbeat% = ((leftbuffer%DIV(10^3))*10^3)+(10^3)
  4183. ELSE
  4184. endbeat% = ((leftbuffer%DIV(10^3))*(10^3)) + nodes1%(count%)
  4185. ENDIF
  4186. :
  4187. IF status1$ = "" AND attacks5%(startcell%) > endbeat% THEN
  4188. condition$ = "empty"
  4189. ENDIF
  4190. IF status1$ = "onbeat" AND attacks5%(startcell%+1) > endbeat% THEN
  4191. condition$ = "empty"
  4192. ENDIF
  4193. :
  4194. IF condition$ = "full" THEN
  4195. :
  4196. searchcell% = startcell% - 1
  4197. REPEAT
  4198. searchcell% += 1
  4199. UNTIL attacks5%(searchcell%) > endbeat% OR searchcell% = manyattacks%
  4200. :
  4201. endcell% = searchcell% - 1
  4202. ENDIF
  4203. word$ = "done"
  4204. :
  4205. ENDIF
  4206. :
  4207. count% += 1
  4208. :
  4209. UNTIL word$ = "done"
  4210. :
  4211. :
  4212. ENDIF
  4213. :
  4214. PROCprechoosegroup
  4215. :
  4216. UNTIL endbeat% >= attacks5%(manyattacks%-1)
  4217. :
  4218. IF seeinfo$ = "y" THEN
  4219. durat% = 0
  4220. counter% = 0
  4221. thing$ = "on"
  4222. PROCwindow(10,60,90,5) : CLS
  4223. VDU 14
  4224. PRINT '" The group of rhythmicised attacks will be at "
  4225. PRINT" "
  4226. PRINT TAB(28) "ATTACKS AT";
  4227. PRINT TAB(46) "DURATIONS";
  4228. PRINT TAB(64) "RATIOS"
  4229. attacks5%(manyattacks%) = 10^9
  4230. FOR count% = 0 TO manyattacks%
  4231. IF counter% < cant% THEN
  4232. item% = ((notategroup%(counter%,1)DIV10^4)*10^3)+(notategroup%(counter%,0)MOD10^3)
  4233. IF item% = attacks5%(count%) THEN
  4234. PRINT TAB(15) item%;
  4235. counter% += 1
  4236. thing$ = "on"
  4237. ENDIF
  4238. ENDIF
  4239. IF counter% < cant% THEN
  4240. item% = ((notategroup%(counter%,1)DIV10^4)*10^3)+(notategroup%(counter%,0)MOD10^3)
  4241. IF item% < attacks5%(count%) THEN
  4242. PRINT TAB(15) item%
  4243. counter% += 1
  4244. thing$ = "on"
  4245. ENDIF
  4246. ENDIF
  4247. IF counter% < cant% THEN
  4248. IF thing$ = "on" THEN
  4249. IF (notategroup%(counter%,0)DIV1000)= attacks5%(count%) THEN
  4250. PRINT " "
  4251. PRINT " "
  4252. PRINT TAB(0) (notategroup%(counter%,1)MOD10000);
  4253. PRINT TAB(15) (notategroup%(counter%,0)DIV1000);
  4254. thing$ = "off"
  4255. ENDIF
  4256. :
  4257. IF (notategroup%(counter%,0)DIV1000)< attacks5%(count%) THEN
  4258. PRINT " "
  4259. PRINT " "
  4260. PRINT TAB(0) ((notategroup%(counter%,1))MOD10000);
  4261. PRINT TAB(15) (notategroup%(counter%,0)DIV1000)
  4262. thing$ = "off"
  4263. ENDIF
  4264. ENDIF
  4265. ENDIF
  4266. :
  4267. IF thing$ = "on" THEN PRINT'" "
  4268. :
  4269. IF count% < manyattacks% THEN
  4270. PRINT TAB(25)attacks5%(count%);
  4271. IF count% < (manyattacks%-1) THEN
  4272. durat1% = durat%
  4273. durat% = (attacks5%(count%+1)MOD10^3)-(attacks5%(count%)MOD10^3)
  4274. addon% = ((attacks5%(count%+1)DIV(10^3))-(attacks5%(count%)DIV(10^3)))*960
  4275. durat% = durat% + addon%
  4276. PRINT TAB(42) durat%;
  4277. IF count%>0 THEN
  4278. IF direction$ = "rit" THEN ratio = durat%/durat1% ELSE ratio = durat1%/durat%
  4279. CASE ratio OF
  4280. WHEN 0.5 : PRINT TAB(65) "0.5"
  4281. WHEN 1.0 : PRINT TAB(65) "1.0"
  4282. WHEN 1.5 : PRINT TAB(65) "1.5"
  4283. WHEN 2.0 : PRINT TAB(65) "2.0"
  4284. WHEN 2.5 : PRINT TAB(65) "2.5"
  4285. OTHERWISE PRINT TAB(65) ratio
  4286. ENDCASE
  4287. ENDIF
  4288. ENDIF
  4289. ENDIF
  4290. NEXT
  4291. :
  4292. VDU 15
  4293. ENDIF
  4294. :
  4295. ENDPROC
  4296. :
  4297. REM*******************************************
  4298. :
  4299. DEF PROCbuffers
  4300. :
  4301. beatnum% = (startbeat%MOD(10^3)) + shortirrat% - buffer%
  4302. carrybars% = beatnum% DIV 960
  4303. beatnum% = beatnum% - (carrybars%*960)
  4304. leftbuffer% = ((startbeat%DIV(10^3))*10^3) + (carrybars%*(10^3)) + beatnum%
  4305. :
  4306. beatnum% = (startbeat%MOD(10^3)) + longirrat% + buffer%
  4307. carrybars% = beatnum% DIV 960
  4308. beatnum% = beatnum% - (carrybars%*960)
  4309. rightbuffer% = ((startbeat%DIV(10^3))*10^3) + (carrybars%*(10^3)) + beatnum%
  4310. :
  4311. REM tolerance of 'buffer%' incorporated into buffers
  4312. :
  4313. ENDPROC
  4314. :
  4315. REM********************************************8
  4316. :
  4317. DEF PROCprechoosegroup
  4318. :
  4319. :
  4320. IF condition$ = "full" THEN
  4321. :
  4322. REM routine to find grouplength%
  4323. carrybars% = (endbeat% DIV (10^3)) - (startbeat% DIV (10^3))
  4324. grouplength% = (endbeat% MOD (10^3)) - (startbeat% MOD (10^3)) + (carrybars% * 960)
  4325. :
  4326. REM routine to find first and last durats
  4327. IF status1$ = "onbeat" THEN
  4328. :
  4329. carrybars% = attacks3%(startcell%+1)-attacks3%(startcell%)
  4330. firstdur% = attacks4%(startcell%+1)-attacks4%(startcell%)+(carrybars%*960)
  4331. ELSE
  4332. carrybars% = attacks3%(startcell%)-(startbeat%DIV(10^3))
  4333. firstdur% = attacks4%(startcell%)-(startbeat%MOD(10^3))+(carrybars%*960)
  4334. ENDIF
  4335. :
  4336. IF status$ = "onbeat" THEN
  4337. :
  4338. carrybars% = attacks3%(endcell%)-attacks3%(endcell%-1)
  4339. lastdur% = attacks4%(endcell%)-attacks4%(endcell%-1)+(carrybars%*960)
  4340. ELSE
  4341. carrybars% = (endbeat%DIV(10^3))-attacks3%(endcell%)
  4342. lastdur% = (endbeat%MOD(10^3))-attacks4%(endcell%)+(carrybars%*960)
  4343. ENDIF
  4344. :
  4345. :
  4346. :
  4347. REM routine to determine each individual duration
  4348. IF status1$ = "onbeat" AND status$ = "onbeat" THEN
  4349. numdurs% = endcell% - startcell%
  4350. FOR count% = 2 TO (numdurs%-1)
  4351. dur%(count%) = attacks1%(startcell%+count%)-attacks1%(startcell%+(count%-1))
  4352. NEXT
  4353. dur%(1) = firstdur%
  4354. dur%(numdurs%) = lastdur%
  4355. ENDIF
  4356. :
  4357. IF status1$ = "onbeat" AND status$ = "" THEN
  4358. numdurs% = endcell% - startcell% + 1
  4359. FOR count% = 2 TO (numdurs%-1)
  4360. dur%(count%) = attacks1%(startcell%+count%)-attacks1%(startcell%+(count%-1))
  4361. NEXT
  4362. dur%(1) = firstdur%
  4363. dur%(numdurs%) = lastdur%
  4364. ENDIF
  4365. :
  4366. IF status1$ = "" AND status$ = "onbeat" THEN
  4367. numdurs% = endcell% - startcell% + 1
  4368. FOR count% = 2 TO (numdurs%-1)
  4369. dur%(count%) = attacks1%(startcell%+(count%-1))-attacks1%(startcell%+(count%-2))
  4370. NEXT
  4371. dur%(1) = firstdur%
  4372. dur%(numdurs%) = lastdur%
  4373. ENDIF
  4374. :
  4375. IF status1$ = "" AND status$ = "" THEN
  4376. numdurs% = endcell% - startcell% + 2
  4377. FOR count% = 2 TO (numdurs%-1)
  4378. dur%(count%) = attacks1%(startcell%+(count%-1))-attacks1%(startcell%+(count%-2))
  4379. NEXT
  4380. dur%(1) = firstdur%
  4381. dur%(numdurs%) = lastdur%
  4382. ENDIF
  4383. :
  4384. REM routine to find enddur (ie smallest duration)
  4385. enddur = 10^9
  4386. FOR count% = 1 TO numdurs%
  4387. IF dur%(count%) < enddur THEN
  4388. enddur = dur%(count%) : enddurnum% = count%
  4389. ENDIF
  4390. NEXT
  4391. :
  4392. REM routine to find numsubdivs of enddur poss, using a default min division, forcing that
  4393. REM down with durats less than it, but not beyond the minimum div given by sieve
  4394. defaultmindur% = 960/defaultsieve
  4395. IF enddur < defaultmindur% THEN
  4396. x = 960/enddur : defaultmindur% = 960/x
  4397. ELSE x = defaultsieve
  4398. ENDIF
  4399. IF x > sieve THEN
  4400. x = sieve : defaultmindur% = mindur%
  4401. ENDIF
  4402. numsubdivs = x * enddur / 960 * 1.04 : REM 1.04 catches numbers just below whole nos eg 1.96
  4403. IF numsubdivs < 1 THEN numsubdivs% = 1 ELSE numsubdivs% = numsubdivs
  4404. :
  4405. REM repeat/until loop to keep increasing and decreasing enddur until a 'reasonable' proportiontotal% is found
  4406. switch$ = "A" : nudge% = -5
  4407. REPEAT
  4408. nudge% += 5
  4409. IF switch$ = "A" THEN enddur += (nudge%/100) ELSE enddur -= (nudge%/100)
  4410. IF enddur < 1 THEN
  4411. VDU 7 : PRINT''" !!!THE COMPLEXITY LEVEL IS TOO LOW "
  4412. PRINT" FOR LONG GROUPS CONSISTING "
  4413. PRINT" OF ODD NUMBERS OF BEATS, "
  4414. PRINT" eg 13 QUAVERS, 31 SEMIS ETC. "
  4415. PRINT" INCREASE THIS LEVEL OR SHORTEN "
  4416. PRINT" GROUPS OR, BEST, REDUCE INPUTS 3/4!!! "
  4417. PRINT" (press C to continue) "
  4418. CASE GET$ OF
  4419. WHEN"C","c" : PROCdisplay
  4420. ENDCASE
  4421. ENDIF
  4422. :
  4423. IF switch$ = "A" THEN switch$ = "B" ELSE switch$ = "A"
  4424. numsubdivs1 = x*enddur/960*1.04
  4425. IF numsubdivs1 < 1 THEN numsubdivs% = 1 ELSE numsubdivs% = numsubdivs1
  4426. REM prev 2 lines allow 'stretched' enddurs to include more (or less) subdivs
  4427. REM without altering original subdivs, which tends to vitiate the whole process
  4428. :
  4429. REM routine to create list of attacks 0 - totalduration
  4430. FOR count% = 1 TO numdurs%
  4431. groupattacks%(count%) = groupattacks%(count%-1)+dur%(count%)
  4432. NEXT
  4433. REM groupattacks%(numdurs%) SHOULD = grouplength%
  4434. :
  4435. timeround% = 1
  4436. PROCchoosegroup
  4437. :
  4438. REM routine to place error-values in order
  4439. errororder%() = 10000000
  4440. FOR count% = 1 TO numsubdivs%
  4441. tick% = 0
  4442. REPEAT
  4443. do$ = "n"
  4444. tick%+=1 : inplace$ = "n"
  4445. IF error%(count%) < errororder%(tick%) THEN
  4446. FOR tock% = numsubdivs% TO tick% STEP -1
  4447. errororder%(tock%+1) = errororder%(tock%)
  4448. errororder1%(tock%+1) = errororder1%(tock%)
  4449. NEXT
  4450. errororder%(tick%) = error%(count%) : errororder1%(tick%) = count% : inplace$ = "y"
  4451. ENDIF
  4452. UNTIL inplace$ = "y"
  4453. NEXT
  4454. :
  4455. timeround% = 2 : tog% = 0
  4456. REPEAT
  4457. tog%+=1 : closest% = errororder1%(tog%)
  4458. PROCchoosegroup
  4459. PROCcheckproportiontotal
  4460. UNTIL proportiontotal$ = "OK" OR tog% = numsubdivs%
  4461. UNTIL proportiontotal$ = "OK"
  4462. REM routine to alter attacks5%() to closest group & to save notation in a parallel temp array
  4463. IF status1$ = "onbeat" THEN
  4464. FOR count% = 1 TO (numdurs%-1)
  4465. totalbeat% = (startbeat%MOD(10^3))+rhythmicattacks%(count%)
  4466. carrybars% = ((totalbeat%/960)DIV1)
  4467. beat% = totalbeat%-(carrybars%*960)
  4468. bar% = (carrybars%+(startbeat%DIV(10^3)))*(10^3)
  4469. attacks5%(startcell%+count%) = beat% + bar%
  4470. NEXT
  4471. ENDIF
  4472. :
  4473. IF status1$ = "" THEN
  4474. FOR count% = 1 TO (numdurs%-1)
  4475. totalbeat% = (startbeat%MOD(10^3))+rhythmicattacks%(count%)
  4476. carrybars% = ((totalbeat%/960)DIV1)
  4477. beat% = totalbeat% - (carrybars%*960)
  4478. bar% = (carrybars% + (startbeat%DIV(10^3))) * (10^3)
  4479. attacks5%(startcell%+(count%-1)) = beat% + bar%
  4480. NEXT
  4481. ENDIF
  4482. :
  4483. notategroup%(cant%,0) = (startbeat%*10^3)+(endbeat%MOD10^3)
  4484. notategroup%(cant%,1) = ((endbeat%DIV10^3)*10^4)+proportiontotal%
  4485. cant% += 1
  4486. :
  4487. ENDIF
  4488. :
  4489. ENDPROC
  4490. :
  4491. REM******************************************************
  4492. :
  4493. DEF PROCchoosegroup
  4494. :
  4495. IF timeround% = 1 THEN
  4496. start% = 1 : finish% = numsubdivs%
  4497. ELSE start% = closest% : finish% = closest%
  4498. ENDIF
  4499. :
  4500. error%() = 0
  4501. FOR count% = start% TO finish%
  4502. :
  4503. FOR count1% = 1 TO numdurs%
  4504. IF count1% = enddurnum% THEN thedur% = enddur ELSE thedur% = dur%(count1%)
  4505. IF numsubdivs < 1 THEN
  4506. proportion = thedur%/enddur*numsubdivs/1.04
  4507. ELSE proportion = thedur%/enddur*count%
  4508. ENDIF
  4509. IF (((proportion*10)DIV1)MOD10) < 5 THEN
  4510. proportion%(count1%) = (proportion) DIV 1
  4511. ELSE proportion%(count1%) = ((proportion) DIV 1) + 1
  4512. ENDIF
  4513. IF proportion%(count1%) < 1 THEN proportion%(count1%) = 1
  4514. NEXT
  4515. :
  4516. proportiontotal% = 0
  4517. :
  4518. FOR count2% = 1 TO numdurs%
  4519. proportiontotal% = proportiontotal%+proportion%(count2%)
  4520. NEXT
  4521. :
  4522. unit = grouplength%/proportiontotal%
  4523. :
  4524. rhythmicattack = 0
  4525. FOR count3% = 1 TO numdurs%
  4526. rhythmicattack = rhythmicattack + (proportion%(count3%)*unit)
  4527. IF (((rhythmicattack*10)DIV1)MOD10) < 5 THEN
  4528. rhythmicattacks%(count3%) = rhythmicattack DIV 1
  4529. ELSE
  4530. rhythmicattacks%(count3%) = ((rhythmicattack)DIV1)+1
  4531. ENDIF
  4532. NEXT : REM rhythmicattacks%(numdurs%) SHOULD = grouplength%
  4533. :
  4534. REM compare attackpoints with attackpoints
  4535. FOR count4% = 1 TO (numdurs%-1)
  4536. IF rhythmicattacks%(count4%) <= groupattacks%(count4%) THEN
  4537. error%(count%) = error%(count%) + (groupattacks%(count4%) - rhythmicattacks%(count4%))
  4538. ELSE
  4539. error%(count%) = error%(count%)+(rhythmicattacks%(count4%)-groupattacks%(count4%))
  4540. ENDIF
  4541. NEXT
  4542. :
  4543. NEXT
  4544. :
  4545. ENDPROC
  4546. :
  4547. REM***************************************************************
  4548. :
  4549. DEF PROCseriesattacks
  4550. :
  4551. PROCwindow(20,69,70,55)
  4552. PRINT '" Input attacks as a series of raw BEAT numbers, or"
  4553. PRINT " already rhythmicized, or multiplied by factors,"
  4554. PRINT " or played, or single attack (R/A/F/P/1)"
  4555. :
  4556. CASE GET$ OF
  4557. REM CASE 1
  4558. WHEN "A","a" :
  4559. count% = 0 : cant% = 0 :
  4560. notategroup%() = 0 : finished$ = "n"
  4561. :
  4562. REPEAT
  4563. :
  4564. PRINT '" single attack or group (ALL irrationals must be given"
  4565. PRINT " as a group) or finished (press S/G/F)"
  4566. CASE GET$ OF
  4567. REM CASE 2
  4568. WHEN "S","s","1","0" :
  4569. :
  4570. INPUT " bar"bar%
  4571. INPUT " beat"beats%
  4572. PROCalterbeats
  4573. attacks2%(count%) = (bar%*(10^3)) + beats%
  4574. count% += 1
  4575. :
  4576. WHEN "G","g" :
  4577. INPUT " starting at bar "bars%
  4578. INPUT " beat "beats%
  4579. PROCalterbeats
  4580. start% = (bars%*(10^3))+beats%
  4581. INPUT " ending at bar "bars%
  4582. INPUT " beat "beats%
  4583. PROCalterbeats
  4584. end% = (bars%*(10^3))+beats%
  4585. INPUT " number of divisions"numdivs%
  4586. notategroup%(cant%,0) = (start%*10^3)+(end%MOD10^3)
  4587. notategroup%(cant%,1) = ((end%DIV10^3)*10^4)+numdivs%
  4588. cant% += 1
  4589. beat% = (start%)MOD(10^3) : bar% = (start%)DIV(10^3)
  4590. :
  4591. grouplength% = ((end%MOD(10^3))-(start%MOD(10^3)))+(((end%DIV(10^3))-(start%DIV(10^3)))*960)
  4592. unit = grouplength%/numdivs%
  4593. :
  4594. IF (grouplength%/beatfactor%) > 999 THEN
  4595. PRINT'''" !!!Maximum group length is 999 (big) beats!!! "
  4596. PRINT" (press C to try again) "
  4597. CASE GET$ OF
  4598. REM CASE 3
  4599. WHEN "C","c": CLS : PROCseriesattacks
  4600. OTHERWISE PROCdisplay
  4601. ENDCASE
  4602. REM ENDCASE 3
  4603. ENDIF
  4604. IF numdivs% > 9999 THEN
  4605. PRINT'''" !!!Maximum number of divisions is 9999!!! "
  4606. PRINT" (press C to try again) "
  4607. CASE GET$ OF
  4608. REM CASE 4
  4609. WHEN "C","c": CLS : PROCseriesattacks
  4610. OTHERWISE PROCdisplay
  4611. ENDCASE
  4612. REM ENDCASE 4
  4613. ENDIF
  4614. :
  4615. INPUT " how many attacks"numattacks%
  4616. FOR counter% = 1 TO numattacks%
  4617. PRINT '" attack ";counter%;" is on division number "
  4618. INPUT div%
  4619. place = ((div%-1)*unit)
  4620. IF (((place*10)DIV1)MOD10) < 5 THEN
  4621. place% = (place)DIV1
  4622. ELSE place% = ((place)DIV1)+1
  4623. ENDIF
  4624. :
  4625. beatnum% = beat% + place%
  4626. carrybars% = (beatnum%/960)DIV1
  4627. beatnum% = beatnum% - (carrybars%*960)
  4628. barnum% = carrybars% + bar%
  4629. attacks2%(count%) = (barnum%*(10^3)) + beatnum%
  4630. count% += 1
  4631. NEXT
  4632. :
  4633. WHEN "F","f" : finished$ = "y"
  4634. ENDCASE
  4635. REM ENDCASE 2
  4636. :
  4637. UNTIL finished$ = "y"
  4638. :
  4639. method$ = "alreadyrhythmicized" : manyattacks% = count%
  4640. attacks5%() = attacks2%() : rhythmicized$ = "y"
  4641. :
  4642. WHEN "R","r","0" :
  4643. REM function will feed a sim string of beat values 0 - n into attacks1%()
  4644. :
  4645. attacks1%() = 0
  4646. INPUT' " How many attacks "manyattacks%
  4647. :
  4648. IF manyattacks% > 2 THEN
  4649. PRINT'" Are the intervals between them the same? "
  4650. CASE GET$ OF
  4651. WHEN "N","n","2" : sameintervals$ = "n"
  4652. OTHERWISE sameintervals$ = "y"
  4653. ENDCASE
  4654. ELSE sameintervals$ = "y"
  4655. ENDIF
  4656. :
  4657. IF manyattacks% > 1 THEN
  4658. :
  4659. CASE sameintervals$ OF
  4660. WHEN "n" :
  4661. FOR count% = 1 TO (manyattacks% - 1)
  4662. PRINT' " Give the interval between attacks ";count%;" and ";count%+1;"... "
  4663. INPUT'" bars "bars%
  4664. INPUT " beats "beats%
  4665. PROCalterbeats
  4666. onbeat% = (bars%*960)+beats%
  4667. attacks1%(count%) = attacks1%(count%-1) + onbeat%
  4668. NEXT
  4669. WHEN "y" :
  4670. PRINT'" The interval between them is "
  4671. INPUT " bars "bars%
  4672. INPUT " bears "beats%
  4673. PROCalterbeats
  4674. onbeat% = (bars%*960)+beats%
  4675. FOR count% = 1 TO (manyattacks%-1)
  4676. attacks1%(count%) = attacks1%(count%-1) + onbeat%
  4677. NEXT
  4678. :
  4679. ENDCASE
  4680. :
  4681. ENDIF
  4682. method$ = "raw" : attacks1%(0) = 0
  4683. WHEN "1" :
  4684. REM function will feed a sim string of beat values 0 - n into attacks1%()
  4685. :
  4686. manyattacks% = 1
  4687. :
  4688. method$ = "raw" : attacks1%(0) = 0
  4689. :
  4690. WHEN "F","f" :
  4691. REM function will feed a sim string of beat values 0 - n into attacks1%()
  4692. :
  4693. attacks1%() = 0
  4694. INPUT' " How many attacks "manyattacks%
  4695. :
  4696. FOR count% = 1 TO (manyattacks% - 1)
  4697. IF count% = 1 THEN
  4698. PRINT' " Give the interval between attacks ";count%;" and ";count%+1;"... "
  4699. INPUT'" bars "bars%
  4700. INPUT " beats "beats%
  4701. PROCalterbeats
  4702. onbeat% = (bars%*960)+beats%
  4703. attacks1%(count%) = attacks1%(count%-1) + onbeat%
  4704. ELSE
  4705. PRINT' " Multiply by ? to give the interval between attacks ";count%;" and ";count%+1;"... "
  4706. IF count% = 2 THEN onbeat% = attacks1%(count%-1)
  4707. CASE GET$ OF
  4708. WHEN "0": onbeat% = onbeat% * 1.03
  4709. WHEN "1": onbeat% = onbeat% * 1.04
  4710. WHEN "2": onbeat% = onbeat% * 1.06
  4711. WHEN "3": onbeat% = onbeat% * 1.09
  4712. WHEN "4": onbeat% = onbeat% * 1.13
  4713. WHEN "5": onbeat% = onbeat% * 1.19
  4714. WHEN "6": onbeat% = onbeat% * 1.29
  4715. WHEN "7": onbeat% = onbeat% * 1.41
  4716. WHEN "8": onbeat% = onbeat% * 1.61
  4717. WHEN "9": onbeat% = onbeat% * 1.91
  4718. ENDCASE
  4719. attacks1%(count%) = attacks1%(count%-1) + onbeat%
  4720. ENDIF
  4721. NEXT
  4722. method$ = "raw" : attacks1%(0) = 0
  4723. :
  4724. WHEN "P","p" :
  4725. CLS
  4726. PRINT " Play the rhythm using any"
  4727. PRINT " keys or the spacebar"
  4728. PRINT'" When finished, press ~"
  4729. :
  4730. key$ = GET$ : TIME = 0 : VDU 7 : manyattacks% = 1
  4731. :
  4732. REPEAT
  4733. manyattacks% += 1 : key$ = GET$
  4734. attacks2%(manyattacks%-1) = TIME : VDU 7
  4735. UNTIL key$ = "~" OR key$ = "`"
  4736. :
  4737. manyattacks% -= 1
  4738. :
  4739. FOR count% = 1 TO manyattacks% - 1
  4740. attacks1%(count%) = attacks2%(count%)*960*MM%/6000
  4741. NEXT
  4742. :
  4743. method$ = "raw"
  4744. :
  4745. ENDCASE
  4746. REM ENDCASE 1
  4747. :
  4748. PROCinsertattacks
  4749. :
  4750. ENDPROC
  4751. :
  4752. REM***************************************************************
  4753. :
  4754. DEF PROCalterbeats
  4755. :
  4756. IF beats% < alterbeatsat% THEN beats% = beats% * beatfactor% * 8
  4757. :
  4758. ENDPROC
  4759. :
  4760. REM****************************************************************
  4761. :
  4762. DEF PROCdisarrayfill
  4763. :
  4764. FOR count% = 0 TO (cant%-1)
  4765. :
  4766. bar% = notategroup%(count%,0)DIV(10^6)
  4767. carrybars% = (notategroup%(count%,1)DIV(10^4))-bar%
  4768. carrybeats% = (notategroup%(count%,0)MOD(10^3))-((notategroup%(count%,0)MOD(10^6))DIV(10^3))
  4769. grouplength% = (carrybars%*960)+carrybeats%
  4770. grouplength% = grouplength%/beatfactor%
  4771. :
  4772. beat% = ((notategroup%(count%,0)MOD(10^6))DIV(10^3))/beatfactor%
  4773. divs% = notategroup%(count%,1)MOD(10^4)
  4774. :
  4775. IF grouplength% > 99 OR divs% > 99 THEN bigirrat$ = "y" ELSE bigirrat$ = "n"
  4776. :
  4777. IF (disarray%(bar%,0,voice%) DIV(10^3)) MOD10^2 = 0 AND bigirrat$ = "n" THEN
  4778. hold% = disarray%(bar%,0,voice%)MOD10^3
  4779. add% = ((beat%*(10^4)) + (grouplength%*(10^2)) + divs%) * (10^3)
  4780. disarray%(bar%,0,voice%) = hold% + add%
  4781. ELSE
  4782. IF (disarray%(bar%,1,voice%)DIV(10^6))MOD10^2=0 AND bigirrat$ = "n" THEN
  4783. disarray%(bar%,0,voice%)=disarray%(bar%,0,voice%)+(beat%*10)+(grouplength%DIV10)
  4784. hold% = disarray%(bar%,1,voice%)MOD10^6
  4785. add% = (((grouplength%MOD10)*100)+divs%)*10^6
  4786. disarray%(bar%,1,voice%) = hold% + add%
  4787. ELSE
  4788. IF disarray%(bar%,1,voice%)MOD10^2=0 AND bigirrat$ = "n" THEN
  4789. disarray%(bar%,1,voice%)=disarray%(bar%,1,voice%)+(beat%*(10^4))+(grouplength%*(10^2))+divs%
  4790. ELSE
  4791. IF (disarray%(bar%,2,voice%)DIV(10^3))MOD10^2 = 0 AND bigirrat$ = "n" THEN
  4792. hold% = disarray%(bar%,2,voice%)MOD10^3
  4793. add% = ((beat%*(10^4)) + (grouplength%*(10^2)) + divs%) * (10^3)
  4794. disarray%(bar%,2,voice%)= hold% + add%
  4795. ELSE
  4796. IF disarray%(bar%,3,voice%)=0 THEN
  4797. disarray%(bar%,3,voice%)=(beat%*10^7)+(grouplength%*10^4)+divs%
  4798. ELSE
  4799. VDU 7
  4800. PRINT''''" THERE ARE ALREADY 5 RHYTHMIC GROUPS IN THIS BAR"
  4801. PRINT" (this is the maximum)"
  4802. PRINT''" TO CONTINUE PRESS C"
  4803. CASE GET$ OF
  4804. WHEN "C","c" : PROCawait
  4805. OTHERWISE
  4806. PROCawait
  4807. ENDCASE
  4808. ENDIF
  4809. ENDIF
  4810. ENDIF
  4811. ENDIF
  4812. ENDIF
  4813. :
  4814. NEXT
  4815. :
  4816. ENDPROC
  4817. :
  4818. REM**********************************************
  4819. :
  4820. DEF PROCdelete
  4821. :
  4822. IF deleteone$ <> "none" THEN
  4823. PROCdeleteone
  4824. ELSE
  4825. PROCwindow(20,69,80,55)
  4826. PRINT '" One or several notes LEAVING rhythmic notation - A"
  4827. PRINT '" One or several notes DELETING rhythmic notation - B"
  4828. PRINT '" One or several bars - C"
  4829. PRINT '" Whole voice - D"
  4830. PRINT '" Group of voices - G"
  4831. :
  4832. CASE GET$ OF
  4833. WHEN "A","a" :
  4834. :
  4835. CLS
  4836. IF screenvoices$ = "n" THEN
  4837. INPUT' " Which voice/strand (0 = top) "voice%
  4838. IF voice% = 0 THEN PROCpressenter
  4839. ELSE
  4840. PRINT'" Which screen voice "
  4841. CASE GET$ OF
  4842. WHEN "1" : voice% = 1
  4843. WHEN "2" : voice% = 2
  4844. WHEN "3" : voice% = 3
  4845. OTHERWISE PROCpressenter
  4846. ENDCASE
  4847. ENDIF
  4848. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  4849. voice% -= 1
  4850. IF voice% >= 0 THEN samevoice% = voice%
  4851. IF voice% = -1 THEN voice% = samevoice%
  4852. :
  4853. INPUT " how many notes (for 1 press 0) "numnotes%
  4854. IF numnotes% = 0 THEN numnotes% = 1
  4855. IF quickcopy$ = "n" THEN
  4856. PRINT'" Starting at bar number "
  4857. INPUT " (press 0 for first bar displayed) "bar%
  4858. IF bar% = 0 THEN bar% = startbar%
  4859. INPUT " beat "beats% : PROCalterbeats
  4860. start% = (bar%*(10^3))+beats%
  4861. ELSE
  4862. INPUT ' " starting at note number (0 counts as 1) "along%
  4863. IF along% = 0 THEN along% = 1
  4864. along%-=1
  4865. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  4866. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  4867. beats% = copystartbeat%
  4868. PROCalterbeats
  4869. start% = (copystartbar%*(10^3))+beats%
  4870. ENDIF
  4871. PROCsearch(start%)
  4872. PROCshuntleft(startcell%,numnotes%)
  4873. :
  4874. ENDIF
  4875. :
  4876. WHEN "B","b" :
  4877. :
  4878. CLS
  4879. IF screenvoices$ = "n" THEN
  4880. INPUT' " Which voice/strand (0 = top) "voice%
  4881. IF voice% = 0 THEN PROCpressenter
  4882. ELSE
  4883. PRINT'" Which screen voice "
  4884. CASE GET$ OF
  4885. WHEN "1" : voice% = 1
  4886. WHEN "2" : voice% = 2
  4887. WHEN "3" : voice% = 3
  4888. OTHERWISE PROCpressenter
  4889. ENDCASE
  4890. ENDIF
  4891. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  4892. voice% -= 1
  4893. IF voice% >= 0 THEN samevoice% = voice%
  4894. IF voice% = -1 THEN voice% = samevoice%
  4895. :
  4896. INPUT " how many notes "numnotes%
  4897. :
  4898. IF quickcopy$ = "n" THEN
  4899. PRINT'" Starting at bar number "
  4900. INPUT " (press 0 for first bar displayed "bar%
  4901. IF bar% = 0 THEN bar% = startbar%
  4902. INPUT " beat "beats% : PROCalterbeats
  4903. start% = (bar%*(10^3))+beats%
  4904. ELSE
  4905. INPUT ' " starting at note number (0 counts as 1) "along%
  4906. IF along% = 0 THEN along% = 1
  4907. along%-=1
  4908. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  4909. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  4910. beats% = copystartbeat%
  4911. PROCalterbeats
  4912. start% = (copystartbar%*(10^3))+beats%
  4913. ENDIF
  4914. PROCsearch(start%)
  4915. FOR count% = startcell% TO (startcell%+(numnotes%-1))
  4916. FOR counter% = 0 TO 1
  4917. barno% = (array%(count%,0,voice%)DIV10^6)-counter%
  4918. beatnum% = ((array%(count%,0,voice%)DIV10^3)MOD10^3)
  4919. :
  4920. group1start% = (disarray%(barno%,0,voice%)DIV10^7)*beatfactor%
  4921. group1end% = group1start% + (((disarray%(barno%,0,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
  4922. IF beatnum%+(960*counter%) >= group1start% AND beatnum%+(960*counter%) <= group1end% THEN
  4923. disarray%(barno%,0,voice%) = disarray%(barno%,0,voice%)MOD10^3
  4924. ENDIF
  4925. :
  4926. group2start% = ((disarray%(barno%,0,voice%)DIV10)MOD10^2)*beatfactor%
  4927. group2end% = group2start%+((((disarray%(barno%,0,voice%)MOD10)*10)+(disarray%(barno%,1,voice%)DIV10^8))*beatfactor%)-1
  4928. IF beatnum%+(960*counter%) >= group2start% AND beatnum%+(960*counter%) <= group2end% THEN
  4929. disarray%(barno%,0,voice%) = (disarray%(barno%,0,voice%)DIV10^3)*10^3
  4930. disarray%(barno%,1,voice%) = disarray%(barno%,1,voice%)MOD10^6
  4931. ENDIF
  4932. :
  4933. group3start%=((disarray%(barno%,1,voice%)DIV10^4)MOD10^2)*beatfactor%
  4934. group3end% = group3start% + (((disarray%(barno%,1,voice%)MOD10^4)DIV10^2)*beatfactor%)-1
  4935. IF beatnum%+(960*counter%) >= group3start% AND beatnum%+(960*counter%) <= group3end% THEN
  4936. disarray%(barno%,1,voice%) = (disarray%(barno%,1,voice%)DIV10^6)*10^6
  4937. ENDIF
  4938. :
  4939. group4start% = (disarray%(barno%,2,voice%)DIV10^7)*beatfactor%
  4940. group4end% = group4start%+(((disarray%(barno%,2,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
  4941. IF beatnum%+(960*counter%) >= group4start% AND beatnum%+(960*counter%) <= group4end% THEN
  4942. disarray%(barno%,2,voice%) = disarray%(barno%,2,voice%)MOD10^3
  4943. ENDIF
  4944. :
  4945. group5start% = (disarray%(barno%,3,voice%)DIV10^7)*beatfactor%
  4946. group5end% = group5start%+(((disarray%(barno%,3,voice%)DIV10^4)MOD10^3)*beatfactor%)-1
  4947. IF beatnum%+(960*counter%) >= group5start% AND beatnum%+(960*counter%) <= group5end% THEN
  4948. disarray%(barno%,2,voice%) = (disarray%(barno%,2,voice%)DIV10^3)*10^3
  4949. disarray%(barno%,3,voice%) = 0
  4950. ENDIF
  4951. :
  4952. NEXT
  4953. :
  4954. NEXT
  4955. PROCshuntleft(startcell%,numnotes%)
  4956. :
  4957. WHEN "C","c" :
  4958. CLS
  4959. PRINT '" If rhythmic groups cross from the bar(s) in question "
  4960. PRINT " to other bars, use A or B to delete those groups, "
  4961. PRINT " in which case press X"
  4962. PRINT'" Otherwise, press C to continue with deleting"
  4963. PRINT" self-contained bar(s)"
  4964. CASE GET$ OF
  4965. WHEN "X","x" : PROCdelete
  4966. OTHERWISE
  4967. ENDCASE
  4968. CLS
  4969. INPUT '" how many bars (0 = 100) "NUMbars%
  4970. IF NUMbars% = 0 THEN NUMbars% = 100
  4971. PRINT '" starting at bar "
  4972. INPUT "(press 0 for first bar displayed) "STARTbar%
  4973. IF STARTbar% = 0 THEN STARTbar% = startbar%
  4974. :
  4975. IF screenvoices$ = "n" THEN
  4976. INPUT' " Which voice/strand (0 = top) "voice%
  4977. IF voice% = 0 THEN PROCpressenter
  4978. ELSE
  4979. PRINT'" Which screen voice "
  4980. CASE GET$ OF
  4981. WHEN "1" : voice% = 1
  4982. WHEN "2" : voice% = 2
  4983. WHEN "3" : voice% = 3
  4984. OTHERWISE PROCpressenter
  4985. ENDCASE
  4986. ENDIF
  4987. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  4988. voice% -= 1
  4989. IF voice% >= 0 THEN samevoice% = voice%
  4990. IF voice% = -1 THEN voice% = samevoice%
  4991. :
  4992. startcell% = 0
  4993. :
  4994. FOR bar% = STARTbar% TO (STARTbar%+(NUMbars%-1))
  4995. :
  4996. IF numusedcells%(voice%)-startcell% > 0 THEN
  4997. :
  4998. start% = bar%*(10^3)
  4999. IF start% < (array%(0,0,voice%)DIV10^3) THEN
  5000. startcell% = 0
  5001. ELSE PROCsearch(start%)
  5002. ENDIF
  5003. :
  5004. numnotes% = 0
  5005. WHILE (array%((startcell%+numnotes%),0,voice%)DIV10^6) = bar%
  5006. numnotes% += 1
  5007. ENDWHILE
  5008. IF numnotes% > 0 THEN PROCshuntleft(startcell%,numnotes%)
  5009. :
  5010. FOR count% = 0 TO 3
  5011. disarray%(bar%,count%,voice%) = 0
  5012. NEXT
  5013. :
  5014. ENDIF
  5015. :
  5016. NEXT
  5017. :
  5018. WHEN "D","d" :
  5019. IF screenvoices$ = "n" THEN
  5020. INPUT' " Which voice/strand "voice%
  5021. ELSE
  5022. PRINT'" Which screen voice "
  5023. CASE GET$ OF
  5024. WHEN "1" : voice% = 1
  5025. WHEN "2" : voice% = 2
  5026. WHEN "3" : voice% = 3
  5027. OTHERWISE PROCpressenter
  5028. ENDCASE
  5029. ENDIF
  5030. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  5031. voice% -= 1
  5032. IF voice% >= 0 THEN samevoice% = voice%
  5033. IF voice% = -1 THEN voice% = samevoice%
  5034. :
  5035. FOR count% = 0 TO (numusedcells%(voice%)-1)
  5036. array%(count%,0,voice%) = 0
  5037. array%(count%,1,voice%) = 0
  5038. array%(count%,2,voice%) = 0
  5039. NEXT
  5040. numusedcells%(voice%) = 0
  5041. :
  5042. FOR count% = 1 TO nobars%
  5043. FOR counter% = 0 TO 3
  5044. disarray%(count%,counter%,voice%) = 0
  5045. NEXT
  5046. NEXT
  5047. :
  5048. WHEN "G","g" :
  5049. INPUT'" Between which voice "voice1%
  5050. INPUT'" and which voice "voice2%
  5051. voice1% -= 1 : voice2% -= 1
  5052. FOR whichvoice% = voice1% TO voice2%
  5053. voice% = whichvoice%
  5054. FOR count% = 0 TO (numusedcells%(voice%)-1)
  5055. array%(count%,0,voice%) = 0
  5056. array%(count%,1,voice%) = 0
  5057. array%(count%,2,voice%) = 0
  5058. NEXT
  5059. numusedcells%(voice%) = 0
  5060. FOR count% = 1 TO nobars%
  5061. FOR counter% = 0 TO 3
  5062. disarray%(count%,counter%,voice%) = 0
  5063. NEXT
  5064. NEXT
  5065. NEXT
  5066. :
  5067. OTHERWISE VDU 7 : PROCdelete
  5068. :
  5069. ENDCASE
  5070. PROCdisplay
  5071. ENDPROC
  5072. :
  5073. REM************************************************
  5074. :
  5075. DEF PROCshuntleft(startcell%,numnotes%)
  5076. :
  5077. FOR count% = startcell% TO numusedcells%(voice%)-(numnotes%+1)
  5078. array%(count%,0,voice%) = array%(count%+numnotes%,0,voice%)
  5079. array%(count%,1,voice%) = array%(count%+numnotes%,1,voice%)
  5080. array%(count%,2,voice%) = array%(count%+numnotes%,2,voice%)
  5081. NEXT
  5082. FOR count% = (numusedcells%(voice%)-1) TO (numusedcells%(voice%)-numnotes%) STEP -1
  5083. array%(count%,0,voice%) = 0
  5084. array%(count%,1,voice%) = 0
  5085. array%(count%,2,voice%) = 0
  5086. NEXT
  5087. numusedcells%(voice%) = numusedcells%(voice%)-numnotes%
  5088. ENDPROC
  5089. :
  5090. REM********************************************************
  5091. :
  5092. DEF PROCpredisplay
  5093. :
  5094. CLS
  5095. methd$ = "second"
  5096. INPUT '" How many bars "numbars%
  5097. INPUT '" starting at bar "startbar%
  5098. INPUT '" How many voices "numvoices%
  5099. :
  5100. requestedend% = startbar% + numbars%
  5101. :
  5102. IF requestedend% > nobars% THEN startbar% -= (requestedend%-nobars%)
  5103. IF startbar% < 1 THEN
  5104. startbar% = 1 : numbars% = nobars%-1
  5105. ENDIF
  5106. IF numvoices% > numparts% THEN numvoices% = numparts%
  5107. holdnum% = numvoices%
  5108. :
  5109. IF numvoices% > 9 THEN
  5110. PRINT '" Are the voice numbers"
  5111. PRINT " successive?"
  5112. CASE GET$ OF
  5113. WHEN "Y","y" :
  5114. INPUT " starting at voice number "vce%
  5115. FOR count% = 1 TO numvoices%
  5116. displayvoices%(count%) = vce% + count% - 1
  5117. holddisplay%(count%) = vce% + count% - 1
  5118. NEXT
  5119. methd$ = "first"
  5120. OTHERWISE
  5121. ENDCASE
  5122. ENDIF
  5123. IF methd$ = "second" THEN
  5124. FOR count% = 1 TO numvoices%
  5125. PRINT '" voice ";count%;
  5126. INPUT " is voice "vce%
  5127. displayvoices%(count%) = vce%
  5128. holddisplay%(count%) = vce%
  5129. NEXT
  5130. ENDIF
  5131. startv% = 1 : holdstart% = 1
  5132. PROCdisplay
  5133. ENDPROC
  5134. :
  5135. REM********************************************
  5136. :
  5137. DEF PROCquickdisplay
  5138. :
  5139. FOR count% = 1 TO quicknum%
  5140. prequickdisplay%(count%) = quickdisplay%(count%)
  5141. NEXT
  5142. prequicknum% = quicknum%
  5143. :
  5144. IF quickdisplaywindow$ = "y" THEN
  5145. PROCwindow(20,63,48,55) : ON
  5146. ENDIF
  5147. :
  5148. IF numvoicesgiven$ = "n" THEN
  5149. REPEAT
  5150. INPUT'" How many voices "numvoices%
  5151. UNTIL numvoices% > 0 : REM stops a crash if 0 accidentally input
  5152. quicknum% = numvoices%
  5153. ENDIF
  5154. :
  5155. IF numvoices% > 1 THEN
  5156. PRINT'" Are the voices successive "
  5157. CASE GET$ OF
  5158. WHEN "N","n","2" : succ$ = "n"
  5159. OTHERWISE succ$ = "y"
  5160. ENDCASE
  5161. ELSE
  5162. succ$ = "n"
  5163. ENDIF
  5164. :
  5165. IF succ$ = "y" THEN
  5166. INPUT'" starting at voice "vce%
  5167. FOR count% = 1 TO numvoices%
  5168. displayvoices%(count%) = vce%+count%-1
  5169. quickdisplay%(count%) = vce%+count%-1
  5170. NEXT
  5171. :
  5172. ELSE
  5173. FOR count% = 1 TO numvoices%
  5174. IF numvoices% = 1 THEN
  5175. PRINT'" which voice "
  5176. ELSE
  5177. PRINT'" voice ";count%;" is voice "
  5178. ENDIF
  5179. REPEAT
  5180. INPUT vce%
  5181. UNTIL vce% > 0
  5182. displayvoices%(count%) = vce%
  5183. quickdisplay%(count%) = vce%
  5184. NEXT
  5185. ENDIF
  5186. :
  5187. quicknum% = numvoices%
  5188. startv% = 1
  5189. toggle$ = "quick" : numvoicesgiven$ = "n"
  5190. quickdisplaywindow$ = "y"
  5191. PROCdisplay
  5192. ENDPROC
  5193. :
  5194. REM********************************************
  5195. :
  5196. DEF PROCdisplay
  5197. :
  5198. *CONFIGURE ScreenSize 256K
  5199. MODE 31
  5200. VDU 5
  5201. ledgerkey% = 1 : height1% = 0 : wideness1% = 0 : along% = 0
  5202. :
  5203. VDU 23,17,7,6,7;7;0;
  5204. REM penultimate and pre-penultimate values determine text size
  5205. :
  5206. endv% = startv% + numvoices% - 1
  5207. IF longscore$ = "y" AND (endv%-startv%)>2 THEN endv% = startv%+2
  5208. :
  5209. IF printing$ = "n" THEN
  5210. GCOL 0 : GCOL 135 : CLG
  5211. ENDIF
  5212. :
  5213. REM display of beatnumbers, notenumbers etc shuffle up to occupy empty space
  5214. beatsheight% = 0 : numbersheight% = 0 : intheight% = 0
  5215. IF amplitudes$ = "y" THEN
  5216. beatsheight% += 40 : numbersheight% += 40 : intheight% += 40
  5217. ENDIF
  5218. IF beatnumbers$ = "y" THEN
  5219. numbersheight% += 40 : intheight% += 40
  5220. ENDIF
  5221. IF notenumbers$ = "y" OR notenumbers$ = "from1" THEN intheight% += 40
  5222. :
  5223. IF longscore$ = "n" THEN width% = 1520 ELSE width% = 1480
  5224. IF printing$ = "y" THEN width% -= 0
  5225. factor = width%/((numbars%/2)*960)
  5226. IF longscore$ = "y" THEN factor = factor/2
  5227. :
  5228. REM stave lines, barlines & beats for shortscore
  5229. IF longscore$ = "n" THEN
  5230. IF staves$ = "y" THEN
  5231. FOR count% = 938 TO 874 STEP -16 : LINE 0,count%,2112,count% : NEXT
  5232. IF lowerstave$ = "y" THEN
  5233. FOR count% = 794 TO 730 STEP -16 : LINE 0,count%,2112,count% : NEXT
  5234. ENDIF
  5235. FOR count% = 414 TO 350 STEP -16 : LINE 0,count%,2112,count% : NEXT
  5236. IF lowerstave$ = "y" THEN
  5237. FOR count% = 270 TO 206 STEP -16 : LINE 0,count%,2112,count% : NEXT
  5238. ENDIF
  5239. ENDIF
  5240. :
  5241. REM barlines
  5242. IF barlines$ = "y" THEN
  5243. FOR system% = 0 TO 1
  5244. FOR barline% = 1 TO (numbars%/2)
  5245. horpos% = (960*barline%*factor)+40
  5246. IF notehead$ = "small" THEN horpos% += 16
  5247. IF notehead$ = "vsmall" THEN horpos% += 24
  5248. FOR thickness% = 2 TO 8 STEP 2
  5249. LINE horpos%+thickness%,874-(524*system%),horpos%+thickness%,794-(524*system%)
  5250. NEXT
  5251. REM bar nos
  5252. IF printing$ = "n" THEN GCOL 1
  5253. IF tempi%(startbar%) <> tempi%(startbar%-1) THEN
  5254. MOVE 40,1145 : PRINT "b.";startbar%;" MM.";tempi%(startbar%)
  5255. ELSE MOVE 40,1145 : PRINT "b.";startbar%;" (MM.";tempi%(startbar%);")"
  5256. ENDIF
  5257. IF remarks$(startbar%,0) <> "" OR remarks$(startbar%,1) <> "" THEN
  5258. MOVE 40,1120 : PRINT remarks$(startbar%,0) : MOVE 40,1095 : PRINT remarks$(startbar%,1)
  5259. ENDIF
  5260. IF printing$ = "n" THEN GCOL 0
  5261. barline1% = (system%*(numbars%/2))+barline%
  5262. MOVE horpos%-125,1145-(533*system%)
  5263. IF printing$ = "n" THEN GCOL 1
  5264. IF tempi%(startbar% + barline1%) <> tempi%(startbar% + barline1% - 1) THEN
  5265. PRINT startbar% + barline1%;" MM.";tempi%(startbar% + barline1%);
  5266. ELSE IF barline1% MOD barnosoften% = 0 THEN PRINT startbar% + barline1%
  5267. ENDIF
  5268. IF remarks$(startbar%+barline1%,0) <> "" OR remarks$(startbar%+barline1%,1) <> "" THEN
  5269. MOVE horpos%,1120-(533*system%) : PRINT remarks$(startbar%+barline1%,0)
  5270. MOVE horpos%,1095-(533*system%) : PRINT remarks$(startbar%+barline1%,1)
  5271. ENDIF
  5272. REM print duration at bottom right
  5273. IF seeduration$ = "y" THEN
  5274. IF startbar% + barline1% = startbar% + numbars% - 1 THEN
  5275. totaldur = 0
  5276. FOR count% = 1 TO startbar% + numbars% - 1
  5277. duration = 60/tempi%(count%)
  5278. totaldur = totaldur + duration
  5279. NEXT
  5280. totaldur% = totaldur
  5281. mins% = totaldur% DIV 60
  5282. secs% = totaldur% - (mins%*60)
  5283. MOVE 1200,50 : PRINT "duration ";mins%;" mins ";secs%;" secs"
  5284. ENDIF
  5285. ENDIF
  5286. IF printing$ = "n" THEN GCOL 0
  5287. NEXT
  5288. NEXT
  5289. REM bar no for system 2 first bar
  5290. MOVE -70,612
  5291. IF printing$ = "n" THEN GCOL 1
  5292. IF tempi%(startbar%+(numbars%/2)) <> tempi%(startbar%+(numbars%/2)-1) THEN
  5293. PRINT startbar%+(numbars%/2);" MM.";tempi%(startbar%+(numbars%/2))
  5294. ELSE IF (numbars%/2) MOD barnosoften% = 0 THEN PRINT startbar%+(numbars%/2)
  5295. ENDIF
  5296. IF remarks$(startbar%+(numbars%/2),0) <> "" OR remarks$(startbar%+(numbars%/2),1) <> "" THEN
  5297. MOVE 40,587 : PRINT remarks$(startbar%+(numbars%/2),0)
  5298. MOVE 40,562 : PRINT remarks$(startbar%+(numbars%/2),1)
  5299. ENDIF
  5300. IF printing$ = "n" THEN GCOL 0
  5301. ENDIF
  5302. :
  5303. REM beats
  5304. IF beats$ = "y" THEN
  5305. IF notehead$ = "big" THEN add% = 26
  5306. IF notehead$ = "small" THEN add% = 34
  5307. IF notehead$ = "vsmall" THEN add% = 38
  5308. :
  5309. FOR system% = 0 TO 1
  5310. FOR br% = 0 TO (numbars%/2)-1
  5311. horpos% = (960*br%*factor)+add%+40
  5312. FOR bt% = 0 TO (factor%-1) STEP beatstep%
  5313. CIRCLE horpos%+(bt%*960/factor%*factor),834-(524*system%),4
  5314. NEXT
  5315. NEXT
  5316. NEXT
  5317. ENDIF
  5318. :
  5319. ENDIF
  5320. :
  5321. REM staves, barlines, beats etc for longscore
  5322. IF longscore$ = "y" THEN
  5323. longinsts$() = ""
  5324. REM staves
  5325. lastcount% = numvoices%-1
  5326. IF lastcount% > 2 THEN lastcount% = 2
  5327. FOR count% = 0 TO lastcount%
  5328. longinsts$(count%,0) = insts$(displayvoices%(startv%+count%),0)
  5329. longinsts$(count%,1) = insts$(displayvoices%(startv%+count%),1)
  5330. longinsts$(count%,2) = insts$(displayvoices%(startv%+count%),2)
  5331. NEXT
  5332. stavecombination$ = longinsts$(0,2) + longinsts$(1,2) + longinsts$(2,2)
  5333. clefcombination$ = longinsts$(0,1)+longinsts$(1,1)+longinsts$(2,1)
  5334. CASE stavecombination$ OF
  5335. WHEN "111" :
  5336. IF staves$ = "y" THEN
  5337. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5338. FOR count% = 0 TO 64 STEP16 : LINE 0,604-count%,2112,604-count% : NEXT
  5339. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5340. ENDIF
  5341. PROCclef(3,938,604,270,0,0,0,clefcombination$)
  5342. PROClongvalue(938,604,270,clefcombination$)
  5343. WHEN "121" :
  5344. IF staves$ = "y" THEN
  5345. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5346. FOR count% = 0 TO 64 STEP16 : LINE 0,652-count%,2112,652-count% : NEXT
  5347. FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
  5348. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5349. ENDIF
  5350. PROCclef(4,938,652,556,270,0,0,clefcombination$)
  5351. PROClongvalue(938,652,270,clefcombination$)
  5352. WHEN "211" :
  5353. IF staves$ = "y" THEN
  5354. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5355. FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
  5356. FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
  5357. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5358. ENDIF
  5359. PROCclef(4,938,842,556,270,0,0,clefcombination$)
  5360. PROClongvalue(938,556,270,clefcombination$)
  5361. WHEN "112" :
  5362. IF staves$ = "y" THEN
  5363. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5364. FOR count% = 0 TO 64 STEP16 : LINE 0,652-count%,2112,652-count% : NEXT
  5365. FOR count% = 0 TO 64 STEP16 : LINE 0,366-count%,2112,366-count% : NEXT
  5366. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5367. ENDIF
  5368. PROCclef(4,938,652,366,270,0,0,clefcombination$)
  5369. PROClongvalue(938,652,366,clefcombination$)
  5370. WHEN "221" :
  5371. IF staves$ = "y" THEN
  5372. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5373. FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
  5374. FOR count% = 0 TO 64 STEP16 : LINE 0,604-count%,2112,604-count% : NEXT
  5375. FOR count% = 0 TO 64 STEP16 : LINE 0,508-count%,2112,508-count% : NEXT
  5376. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5377. ENDIF
  5378. PROCclef(5,938,842,604,508,270,0,clefcombination$)
  5379. PROClongvalue(938,604,270,clefcombination$)
  5380. WHEN "222" :
  5381. IF staves$ = "y" THEN
  5382. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5383. FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
  5384. FOR count% = 0 TO 64 STEP16 : LINE 0,652-count%,2112,652-count% : NEXT
  5385. FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
  5386. FOR count% = 0 TO 64 STEP16 : LINE 0,366-count%,2112,366-count% : NEXT
  5387. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5388. ENDIF
  5389. PROCclef(6,938,842,652,556,366,270,clefcombination$)
  5390. PROClongvalue(938,652,366,clefcombination$)
  5391. WHEN "122" :
  5392. IF staves$ = "y" THEN
  5393. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5394. FOR count% = 0 TO 64 STEP16 : LINE 0,700-count%,2112,700-count% : NEXT
  5395. FOR count% = 0 TO 64 STEP16 : LINE 0,604-count%,2112,604-count% : NEXT
  5396. FOR count% = 0 TO 64 STEP16 : LINE 0,366-count%,2112,366-count% : NEXT
  5397. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5398. ENDIF
  5399. PROCclef(5,938,700,604,366,270,0,clefcombination$)
  5400. PROClongvalue(938,700,366,clefcombination$)
  5401. WHEN "212" :
  5402. IF staves$ = "y" THEN
  5403. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5404. FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
  5405. FOR count% = 0 TO 64 STEP16 : LINE 0,604-count%,2112,604-count% : NEXT
  5406. FOR count% = 0 TO 64 STEP16 : LINE 0,366-count%,2112,366-count% : NEXT
  5407. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5408. ENDIF
  5409. PROCclef(5,938,842,604,366,270,0,clefcombination$)
  5410. PROClongvalue(938,604,366,clefcombination$)
  5411. WHEN "1" :
  5412. IF staves$ = "y" THEN
  5413. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5414. ENDIF
  5415. PROCclef(1,938,0,0,0,0,0,clefcombination$)
  5416. PROClongvalue(938,0,0,clefcombination$)
  5417. WHEN "2" :
  5418. IF staves$ = "y" THEN
  5419. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5420. FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
  5421. ENDIF
  5422. PROCclef(2,938,842,0,0,0,0,clefcombination$)
  5423. PROClongvalue(938,0,0,clefcombination$)
  5424. WHEN "11" :
  5425. IF staves$ = "y" THEN
  5426. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5427. FOR count% = 0 TO 64 STEP16 : LINE 0,604-count%,2112,604-count% : NEXT
  5428. ENDIF
  5429. PROCclef(2,938,604,0,0,0,0,clefcombination$)
  5430. PROClongvalue(938,604,0,clefcombination$)
  5431. WHEN "12" :
  5432. IF staves$ = "y" THEN
  5433. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5434. FOR count% = 0 TO 64 STEP16 : LINE 0,652-count%,2112,652-count% : NEXT
  5435. FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
  5436. ENDIF
  5437. PROCclef(3,938,652,556,0,0,0,clefcombination$)
  5438. PROClongvalue(938,652,0,clefcombination$)
  5439. WHEN "21" :
  5440. IF staves$ = "y" THEN
  5441. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5442. FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
  5443. FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
  5444. ENDIF
  5445. PROCclef(3,938,842,556,0,0,0,clefcombination$)
  5446. PROClongvalue(938,556,0,clefcombination$)
  5447. WHEN "22" :
  5448. IF staves$ = "y" THEN
  5449. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5450. FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
  5451. FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
  5452. FOR count% = 0 TO 64 STEP16 : LINE 0,460-count%,2112,460-count% : NEXT
  5453. ENDIF
  5454. PROCclef(4,938,842,556,460,0,0,clefcombination$)
  5455. PROClongvalue(938,556,0,clefcombination$)
  5456. ENDCASE
  5457. :
  5458. REM time signature
  5459. beatstothebar% = (960/beatfactor%)/8
  5460. CASE beams% OF
  5461. WHEN 1 : whichvalue% = 1
  5462. WHEN 2 : whichvalue% = 2
  5463. WHEN 3 : whichvalue% = 4
  5464. WHEN 4 : whichvalue% = 8
  5465. WHEN 5 : whichvalue% = 16
  5466. WHEN 6 : whichvalue% = 32
  5467. ENDCASE
  5468. MOVE 15,1050
  5469. PRINT "meter"
  5470. MOVE 15,1030
  5471. PRINT" ";beatstothebar%;"/";whichvalue%
  5472. :
  5473. REM beats
  5474. IF beats$ = "y" THEN
  5475. IF notehead$ = "big" THEN add% = 26
  5476. IF notehead$ = "small" THEN add% = 34
  5477. IF notehead$ = "vsmall" THEN add% = 38
  5478. :
  5479. FOR br% = 0 TO (numbars%-1)
  5480. horpos% = (960*br%*factor)+add%+80
  5481. FOR bt% = 0 TO (factor%-1) STEP beatstep%
  5482. CIRCLE horpos%+(bt%*960/factor%*factor),longbeatsupper%,4:CIRCLE horpos%+(bt%*960/factor%*factor),longbeatslower%,4
  5483. NEXT
  5484. NEXT
  5485. ENDIF
  5486. ENDIF
  5487. :
  5488. IF longscore$ = "n" THEN number% = 2 ELSE number% = 1
  5489. FOR system% = 1 TO number%
  5490. :
  5491. FOR count% = startv% TO endv%
  5492. :
  5493. voice% = (displayvoices%(count%))-1
  5494. addingnotes$ = "n"
  5495. current% = 0 : lowernumber% = 0
  5496. IF system% = 1 THEN firstbar% = startbar%
  5497. IF system% = 2 THEN firstbar% = startbar%+(numbars%/2)
  5498. PROCnewnotereception(voice%,firstbar%,0,0,0,0,0,0,0)
  5499. CASE option% OF
  5500. WHEN 1 : startcell% = 0
  5501. WHEN 2 : startcell% = numusedcells%(voice%)
  5502. WHEN 3 : startcell% = 0
  5503. WHEN 4 : start% = firstbar%*10^3 : PROCsearch(start%)
  5504. ENDCASE
  5505. holdstartcell%(voice%) = startcell%
  5506. :
  5507. IF array%(startcell%,0,voice%)DIV10^6 > 0 THEN
  5508. :
  5509. howmany% = 0
  5510. REPEAT
  5511. howmany% += 1
  5512. :
  5513. carrybars% = (array%(startcell%,0,voice%)DIV10^6) - firstbar%
  5514. beat% = ((array%(startcell%,0,voice%)DIV10^3)MOD10^3)+(carrybars%*960)
  5515. hposn% = (beat%*factor)+50 : REM gives horiz co-ordinate
  5516. :
  5517. IF howmany% = 1 THEN firsttrack% = hposn%
  5518. :
  5519. IF longscore$ = "y" THEN hposn% += 40
  5520. :
  5521. octave% = (array%(startcell%,0,voice%)MOD10)
  5522. IF longscore$ = "n" THEN
  5523. IF octave% < 4 AND system% = 1 THEN value% = 586
  5524. IF octave% >= 4 AND system% = 1 THEN value% = 858
  5525. IF octave% < 4 AND system% = 2 THEN value% = 62
  5526. IF octave% >= 4 AND system% = 2 THEN value% = 334
  5527. IF octave% > 3 THEN octave% = octave%-4
  5528. ENDIF
  5529. :
  5530. ENDCASE
  5531. IF longscore$ = "y" THEN value% = value%(count%-startv%)
  5532. :
  5533. vposn% = value%+(((array%(startcell%,0,voice%)MOD10^3)DIV10^2)*8)+(octave%*56) : REM gives vert co-ordinate
  5534. :
  5535. REM notehead
  5536. IF redpitches$ = "y" THEN PROCredpitches
  5537. IF notehead$ = "big" THEN
  5538. LINE hposn%+12,vposn%+8,hposn%+26,vposn%+8
  5539. LINE hposn%+4,vposn%+4,hposn%+30,vposn%+4
  5540. LINE hposn%,vposn%,hposn%+32,vposn%
  5541. LINE hposn%+2,vposn%-4,hposn%+28,vposn%-4
  5542. LINE hposn%+6,vposn%-8,hposn%+20,vposn%-8
  5543. ENDIF
  5544. IF notehead$ = "small" THEN
  5545. LINE hposn%+24,vposn%+8,hposn%+28,vposn%+8
  5546. LINE hposn%+20,vposn%+4,hposn%+30,vposn%+4
  5547. LINE hposn%+16,vposn%,hposn%+32,vposn%
  5548. LINE hposn%+18,vposn%-4,hposn%+28,vposn%-4
  5549. LINE hposn%+20,vposn%-8,hposn%+24,vposn%-8
  5550. ENDIF
  5551. IF notehead$ = "vsmall" THEN
  5552. LINE hposn%+28,vposn%+8,hposn%+28,vposn%+8
  5553. LINE hposn%+27,vposn%+6,hposn%+29,vposn%+6
  5554. LINE hposn%+26,vposn%+4,hposn%+30,vposn%+4
  5555. LINE hposn%+25,vposn%+2,hposn%+31,vposn%+2
  5556. LINE hposn%+24,vposn%,hposn%+32,vposn%
  5557. LINE hposn%+25,vposn%-2,hposn%+31,vposn%-2
  5558. LINE hposn%+26,vposn%-4,hposn%+30,vposn%-4
  5559. LINE hposn%+27,vposn%-6,hposn%+29,vposn%-6
  5560. LINE hposn%+28,vposn%-8,hposn%+28,vposn%-8
  5561. ENDIF
  5562. IF printing$ = "n" THEN GCOL 0
  5563. :
  5564. REM beatnumbers
  5565. IF beatnumbers$ = "y" OR (beatnumbers$ = "first" AND howmany% = 1) THEN
  5566. PROCnotenumbersep
  5567. IF longscore$ = "y" THEN
  5568. MOVE hposn%-100,actamppos%(voice%+1)-beatsheight%-lower%-lowernumber%
  5569. PROCbeatnumbers
  5570. ELSE MOVE hposn%-100,674+shortamppos%(voice%)-((system%-1)*524)-beatsheight%+40-lower%
  5571. PROCbeatnumbers
  5572. ENDIF
  5573. ENDIF
  5574. :
  5575. REM notenumbers
  5576. IF notenumbers$ = "y" THEN
  5577. PROCnotenumbersep
  5578. IF longscore$ = "y" THEN
  5579. MOVE hposn%-100,actamppos%(voice%+1)-numbersheight%-lowernumber%
  5580. PRINT startcell%+1
  5581. ELSE MOVE hposn%-100,(674+shortamppos%(voice%)-((system%-1)*524))-numbersheight%+40
  5582. PRINT startcell%+1
  5583. ENDIF
  5584. ENDIF
  5585. :
  5586. IF notenumbers$ = "last" THEN
  5587. IF (array%(startcell%+1,0,voice%) DIV10^6) >= (numbars%+firstbar%) OR array%(startcell%+1,0,voice%) = 0 THEN print$ = "y" ELSE print$ = "n"
  5588. IF print$ = "y" THEN
  5589. MOVE hposn%-100,actamppos%(voice%+1)-numbersheight%
  5590. PRINT startcell%+1
  5591. ENDIF
  5592. ENDIF
  5593. :
  5594. IF notenumbers$ = "from1" THEN
  5595. PROCnotenumberfreq
  5596. PROCnotenumbersep
  5597. IF printnumber$ = "y" THEN
  5598. IF longscore$ = "y" THEN
  5599. MOVE hposn%-100,actamppos%(voice%+1)-numbersheight%-lowernumber%
  5600. PRINT howmany%
  5601. ELSE MOVE hposn%-100,(674+shortamppos%(voice%)-((system%-1)*524))-numbersheight%+40
  5602. PRINT howmany%
  5603. ENDIF
  5604. ENDIF
  5605. ENDIF
  5606. :
  5607. REM intervals
  5608. IF displayintervals$ = "y" THEN
  5609. pitch% = array%(startcell%,0,voice%)MOD10^3
  5610. CASE typeintervals$ OF
  5611. WHEN "s" : PROCconvertpitch
  5612. WHEN "q" : PROCconvertquarter
  5613. WHEN "e" : PROCconverteighth
  5614. WHEN "c" : cent% = (array%(startcell%,2,voice%)MOD10^2)-50 : PROCconvertcent
  5615. OTHERWISE
  5616. ENDCASE
  5617. currentpitch% = note%
  5618. FOR cout% = 1 TO numintervals%
  5619. IF (startcell%-cout%) >= 0 THEN
  5620. pitch% = array%((startcell%-cout%),0,voice%)MOD10^3
  5621. CASE typeintervals$ OF
  5622. WHEN "s" : PROCconvertpitch
  5623. WHEN "q" : PROCconvertquarter
  5624. WHEN "e" : PROCconverteighth
  5625. WHEN "c" : cent% = (array%((startcell%-cout%),2,voice%)MOD10^2)-50 : PROCconvertcent
  5626. OTHERWISE
  5627. ENDCASE
  5628. comparepitch% = note%
  5629. IF currentpitch% >= comparepitch% THEN
  5630. interval% = currentpitch% - comparepitch%
  5631. ELSE interval% = comparepitch% - currentpitch%
  5632. ENDIF
  5633. REPEAT : IF interval% > compoundint% THEN interval% -= chunk% : UNTIL interval% <= compoundint%
  5634. IF longscore$ = "y" THEN
  5635. MOVE hposn%-125,actamppos%(voice%+1)-(intheight%+(40*(cout%-1)))
  5636. PRINT interval%
  5637. ELSE MOVE hposn%-125,(674+shortamppos%(voice%)-((system%-1)*524))-(intheight%+(40*(cout%-1))-40)
  5638. PRINT interval%
  5639. ENDIF
  5640. ENDIF
  5641. NEXT
  5642. ENDIF
  5643. :
  5644. REM note names
  5645. IF notenames$ = "y" THEN
  5646. whichnote% = (array%(startcell%,0,voice%)MOD10^3)DIV10^2
  5647. CASE whichnote% OF
  5648. WHEN 0 : name$ = "C"
  5649. WHEN 1 : name$ = "D"
  5650. WHEN 2 : name$ = "E"
  5651. WHEN 3 : name$ = "F"
  5652. WHEN 4 : name$ = "G"
  5653. WHEN 5 : name$ = "A"
  5654. WHEN 6 : name$ = "B"
  5655. OTHERWISE
  5656. ENDCASE
  5657. MOVE hposn%+10,actamppos%(voice%+1)-(numbersheight%+32)
  5658. PRINT name$;array%(startcell%,0,voice%)MOD10
  5659. ENDIF
  5660. :
  5661. REM durations/glissandos
  5662. IF durations$ = "y" THEN
  5663. dur% = (array%(startcell%,1,voice%)DIV10)MOD10^3
  5664. brrr% = array%(startcell%,0,voice%)DIV10^6 : PROCreconvertdur
  5665. IF notehead$ = "big" THEN pointplus% = 16
  5666. IF notehead$ = "small" THEN pointplus% = 24
  5667. IF notehead$ = "vsmall" THEN pointplus% = 28
  5668. point% = (dur%*factor)+hposn%+pointplus%
  5669. thirdphase$ = "n"
  5670. :
  5671. number% = array%(startcell%,2,voice%)DIV10^5
  5672. IF number% = 0 THEN numphases% = 1
  5673. IF number% > 0 AND number% < 100 THEN numphases% = 2
  5674. IF number% > 99 THEN numphases% = 3
  5675. :
  5676. CASE numphases% OF
  5677. :
  5678. WHEN 1 :
  5679. gl% = (array%(startcell%,1,voice%)DIV10^4)MOD10^2
  5680. IF gl% <> 50 THEN
  5681. PROCroundgliss
  5682. LINE hposn%+40,vposn%+4,point%,vposn%+4+gl%
  5683. hp% = ((point%-hposn%)/2)+hposn%
  5684. vp% = vposn%+44+(gl%/2)
  5685. MOVE hp%,vp% : PRINT "gl.";gl1%
  5686. ELSE
  5687. LINE hposn%+40,vposn%+4,point%,vposn%+4
  5688. ENDIF
  5689. :
  5690. WHEN 2 :
  5691. REM extra horizontal point in middle
  5692. ph1% = number% MOD 10^2
  5693. point1% = ((dur%*ph1%/100)*factor)+hposn%+pointplus%
  5694. :
  5695. REM first phase
  5696. gl% = (array%(startcell%,1,voice%)DIV10^4)MOD10^2
  5697. IF gl% <> 50 THEN
  5698. PROCroundgliss
  5699. LINE hposn%+40,vposn%+4,point1%,vposn%+4+gl%
  5700. hp% = ((point1%-hposn%)/2)+hposn%
  5701. vp% = vposn%+44+(gl%/2)
  5702. MOVE hp%,vp% : PRINT "gl.";gl1%
  5703. ELSE
  5704. gl% = 0
  5705. LINE hposn%+40,vposn%+4,point1%,vposn%+4
  5706. ENDIF
  5707. IF envelopedata$ <> "none" THEN
  5708. hp% = point1%-130
  5709. vp% = vposn%-10
  5710. MOVE hp%,vp%
  5711. CASE envelopedata$ OF
  5712. WHEN "percentage" :PRINT ph1%;"%"
  5713. WHEN "marker" : PRINT hp%
  5714. ENDCASE
  5715. ENDIF
  5716. :
  5717. REM second phase
  5718. vposn1% = vposn%+gl%
  5719. gl% = (array%(startcell%,1,voice%)DIV10^6)MOD10^2
  5720. IF gl% <> 50 THEN
  5721. PROCroundgliss
  5722. LINE point1%,vposn1%+4,point%,vposn1%+4+gl%
  5723. hp% = ((point%-point1%)/2)+point1%
  5724. vp% = vposn1%+44+(gl%/2)
  5725. MOVE hp%,vp% : PRINT "gl.";gl1%
  5726. ELSE
  5727. LINE point1%,vposn1%+4,point%,vposn1%+4
  5728. ENDIF
  5729. :
  5730. WHEN 3 :
  5731. REM two extra horizontal points in middle
  5732. ph1% = number% MOD 10^2
  5733. point1% = ((dur%*ph1%/100)*factor)+hposn%+pointplus%
  5734. ph2% = number% DIV 10^2
  5735. point2% = ((dur%*ph2%/100)*factor)+hposn%+pointplus%
  5736. :
  5737. REM first phase
  5738. gl% = (array%(startcell%,1,voice%)DIV10^4)MOD10^2
  5739. IF gl% <> 50 THEN
  5740. PROCroundgliss
  5741. LINE hposn%+40,vposn%+4,point1%,vposn%+4+gl%
  5742. hp% = ((point1%-hposn%)/2)+hposn%
  5743. vp% = vposn%+44+(gl%/2)
  5744. MOVE hp%,vp% : PRINT "gl.";gl1%
  5745. ELSE
  5746. gl% = 0
  5747. LINE hposn%+40,vposn%+4,point1%,vposn%+4
  5748. ENDIF
  5749. IF envelopedata$ <> "none" THEN
  5750. hp% = point1%-130
  5751. vp% = vposn%-10
  5752. MOVE hp%,vp%
  5753. CASE envelopedata$ OF
  5754. WHEN "percentage" :PRINT ph1%;"%"
  5755. WHEN "marker" : PRINT hp%
  5756. ENDCASE
  5757. ENDIF
  5758. :
  5759. REM second phase
  5760. vposn1% = vposn%+gl%
  5761. gl% = (array%(startcell%,1,voice%)DIV10^6)MOD10^2
  5762. IF gl% <> 50 THEN
  5763. PROCroundgliss
  5764. LINE point1%,vposn1%+4,point2%,vposn1%+4+gl%
  5765. hp% = ((point2%-point1%)/2)+point1%
  5766. vp% = vposn1%+44+(gl%/2)
  5767. MOVE hp%,vp% : PRINT "gl.";gl1%
  5768. ELSE
  5769. gl% = 0
  5770. LINE point1%,vposn1%+4,point2%,vposn1%+4
  5771. ENDIF
  5772. IF envelopedata$ <> "none" THEN
  5773. hp% = point2%-130
  5774. vp% = vposn%-10
  5775. MOVE hp%,vp%
  5776. CASE envelopedata$ OF
  5777. WHEN "percentage" :PRINT ph2%;"%"
  5778. WHEN "marker" : PRINT hp%
  5779. ENDCASE
  5780. ENDIF
  5781. :
  5782. REM third phase
  5783. vposn2% = vposn1%+gl%
  5784. gl% = array%(startcell%,1,voice%)DIV10^8
  5785. IF gl% <> 10 THEN
  5786. thirdphase$ = "y" : PROCroundgliss : thirdphase$ = "n"
  5787. LINE point2%,vposn2%+4,point%,vposn2%+4+gl%
  5788. hp% = ((point%-point2%)/2)+point2%
  5789. vp% = vposn2%+44+(gl%/2)
  5790. MOVE hp%,vp% : PRINT "gl.";gl1%
  5791. ELSE
  5792. LINE point2%,vposn2%+4,point%,vposn2%+4
  5793. ENDIF
  5794. :
  5795. ENDCASE
  5796. :
  5797. ENDIF
  5798. :
  5799. REM next block of code added just to print durations
  5800. IF seedurinbts$ = "y" OR seedurinbts$ = "stepped" THEN
  5801. IF seedurinbts$ = "stepped" THEN
  5802. IF lower% = 0 THEN lower% = 23 ELSE lower% = 0
  5803. ENDIF
  5804. IF longscore$ = "y" THEN
  5805. MOVE hposn%,actamppos%(voice%+1)-lower%
  5806. PRINT dur%
  5807. ELSE MOVE hposn%,714+shortamppos%(voice%)-((system%-1)*524)-lower%
  5808. PRINT dur%
  5809. ENDIF
  5810. ENDIF
  5811. IF seedurincrots$ = "y" OR seedurincrots$ = "stepped" THEN
  5812. REM dur = (((dur%/480)*100)DIV1)/100
  5813. dur = (((dur%/(beatfactor%*8))*100)DIV1)/100
  5814. IF seedurincrots$ = "stepped" THEN
  5815. IF lower% = 0 THEN lower% = 23 ELSE lower% = 0
  5816. ENDIF
  5817. IF longscore$ = "y" THEN
  5818. MOVE hposn%,actamppos%(voice%+1)-lower%
  5819. PRINT dur
  5820. ELSE MOVE hposn%,714+shortamppos%(voice%)-((system%-1)*524)-lower%
  5821. PRINT dur
  5822. ENDIF
  5823. ENDIF
  5824. :
  5825. REM amplitudes
  5826. :
  5827. IF amplitudes$ = "y" OR amplitudes$ = "stepped" THEN
  5828. amp$=""
  5829. amp1% = array%(startcell%,1,voice%)MOD10
  5830. amp2% = (array%(startcell%,2,voice%)DIV10^2)MOD10
  5831. amp3% = (array%(startcell%,2,voice%)DIV10^3)MOD10
  5832. amp4% = (array%(startcell%,2,voice%)DIV10^4)MOD10
  5833. FOR something% = 1 TO 4
  5834. IF something% = 1 THEN amp% = amp1%
  5835. IF something% = 2 THEN amp% = amp2%
  5836. IF something% = 3 THEN amp% = amp3%
  5837. IF something% = 4 THEN amp% = amp4%
  5838. CASE amp% OF
  5839. WHEN 0 :
  5840. IF amp1% = 0 AND amp2% = 9 THEN
  5841. amp$ = "" : x% = 22 : y% = 20 : REM releases
  5842. ELSE
  5843. amp$ = "0" : x% = 22 : y% = 20
  5844. ENDIF
  5845. WHEN 1 : amp$ = "ppp" : x% = 8 : y% = 50
  5846. WHEN 2 : amp$ = "pp" : x% = 15 : y% = 35
  5847. WHEN 3 : amp$ = "p" : x% = 22 : y% = 20
  5848. WHEN 4 : amp$ = "mp" : x% = 15 : y% = 35
  5849. WHEN 5 : amp$ = "mf" : x% = 15 : y% = 35
  5850. WHEN 6 : amp$ = "f" : x% = 22 : y% = 20
  5851. WHEN 7 : amp$ = "ff" : x% = 15 : y% = 35
  5852. WHEN 8 : amp$ = "fff" : x% = 8 : y% = 50
  5853. ENDCASE
  5854. IF something% = 1 THEN amp1$ = amp$ : x1% = x% : y1% = y%
  5855. IF something% = 2 THEN amp2$ = amp$ : x2% = x% : y2% = y%
  5856. IF something% = 3 THEN amp3$ = amp$ : x3% = x% : y3% = y%
  5857. IF something% = 4 THEN amp4$ = amp$ : x4% = x% : y4% = y%
  5858. NEXT
  5859. :
  5860. IF amplitudes$ = "stepped" THEN
  5861. IF lower% = 0 THEN lower% = 23 ELSE lower% = 0
  5862. ENDIF
  5863. :
  5864. IF longscore$ = "y" THEN
  5865. MOVE hposn%+x1%,actamppos%(voice%+1)-lower%
  5866. PRINT amp1$
  5867. :
  5868. IF amp2% = 9 AND amp3% <> 0 THEN
  5869. MOVE hposn%+20,(actamppos%(voice%+1)-lower%)-20
  5870. PRINT "+";amp3%
  5871. ENDIF
  5872. :
  5873. ELSE MOVE hposn%+x1%,714+shortamppos%(voice%)-((system%-1)*524)-lower%
  5874. PRINT amp1$
  5875. ENDIF
  5876. :
  5877. dur% = (array%(startcell%,1,voice%)DIV10)MOD10^3
  5878. brrr% = array%(startcell%,0,voice%)DIV10^6 : PROCreconvertdur
  5879. IF notehead$ = "big" THEN pointplus% = 16
  5880. IF notehead$ = "small" THEN pointplus% = 24
  5881. IF notehead$ = "vsmall" THEN pointplus% = 28
  5882. point% = (dur%*factor)+hposn%+pointplus%
  5883. :
  5884. number% = array%(startcell%,2,voice%)DIV10^5
  5885. IF amp2% = 9 THEN numphases% = 0
  5886. IF amp2% <> 9 AND number% = 0 THEN numphases% = 1
  5887. IF number% > 0 AND number% < 100 THEN numphases% = 2
  5888. IF number% > 99 THEN numphases% = 3
  5889. :
  5890. CASE numphases% OF
  5891. :
  5892. WHEN 1 :
  5893. IF amp2% < amp1% THEN
  5894. IF longscore$ = "y" THEN
  5895. LINE hposn%+x1%+y1%,actamppos%(voice%+1)+8,point%-90+(x2%*2),actamppos%(voice%+1)-8
  5896. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-24,point%-90+(x2%*2),actamppos%(voice%+1)-8
  5897. MOVE point%-80+(x2%*2),actamppos%(voice%+1) : PRINT amp2$
  5898. ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)+8,point%-90+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
  5899. LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-24,point%-90+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
  5900. MOVE point%-80+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
  5901. ENDIF
  5902. ENDIF
  5903. IF amp2% > amp1% THEN
  5904. IF longscore$ = "y" THEN
  5905. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point%-90+(x2%*2),actamppos%(voice%+1)+8
  5906. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point%-90+(x2%*2),actamppos%(voice%+1)-24
  5907. MOVE point%-80+(x2%*2),actamppos%(voice%+1) : PRINT amp2$
  5908. ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524)+8
  5909. LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524)-24
  5910. MOVE point%-80+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
  5911. ENDIF
  5912. ENDIF
  5913. :
  5914. WHEN 2 :
  5915. ph1% = number% MOD 10^2
  5916. point1% = ((dur%*ph1%/100)*factor)+hposn%+pointplus%
  5917. :
  5918. REM first phase
  5919. IF amp2% < amp1% THEN
  5920. IF longscore$ = "y" THEN
  5921. LINE hposn%+x1%+y1%,actamppos%(voice%+1)+8,point1%-35+x2%,actamppos%(voice%+1)-8
  5922. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-24,point1%-35+x2%,actamppos%(voice%+1)-8
  5923. MOVE point1%-25+x2%,actamppos%(voice%+1) : PRINT amp2$
  5924. ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)+8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-8
  5925. LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-24,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-8
  5926. MOVE point1%-25+x2%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
  5927. ENDIF
  5928. ENDIF
  5929. IF amp2% > amp1% THEN
  5930. IF longscore$ = "y" THEN
  5931. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point1%-35+x2%,actamppos%(voice%+1)+8
  5932. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point1%-35+x2%,actamppos%(voice%+1)-24
  5933. MOVE point1%-25+x2%,actamppos%(voice%+1) : PRINT amp2$
  5934. ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)+8
  5935. LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-24
  5936. MOVE point1%-25+x2%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
  5937. ENDIF
  5938. ENDIF
  5939. :
  5940. REM second phase
  5941. IF amp1% <> amp2% THEN start% = point1%-25+x2%+y2% ELSE start% = point1%
  5942. IF amp3% < amp2% THEN
  5943. IF longscore$ = "y" THEN
  5944. LINE start%,actamppos%(voice%+1)+8,point%-90+(x3%*2),actamppos%(voice%+1)-8
  5945. LINE start%,actamppos%(voice%+1)-24,point%-90+(x3%*2),actamppos%(voice%+1)-8
  5946. MOVE point%-80+(x3%*2),actamppos%(voice%+1) : PRINT amp3$
  5947. ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)+8,point%-90+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
  5948. LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-24,point%-90+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
  5949. MOVE point%-80+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp3$
  5950. ENDIF
  5951. ENDIF
  5952. IF amp3% > amp2% THEN
  5953. IF longscore$ = "y" THEN
  5954. LINE start%,actamppos%(voice%+1)-8,point%-90+(x3%*2),actamppos%(voice%+1)+8
  5955. LINE start%,actamppos%(voice%+1)-8,point%-90+(x3%*2),actamppos%(voice%+1)-24
  5956. MOVE point%-80+(x3%*2),actamppos%(voice%+1) : PRINT amp3$
  5957. ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524)+8
  5958. LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524)-24
  5959. MOVE point%-80+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp3$
  5960. ENDIF
  5961. ENDIF
  5962. :
  5963. WHEN 3 :
  5964. ph1% = number% MOD 10^2
  5965. point1% = ((dur%*ph1%/100)*factor)+hposn%+pointplus%
  5966. ph2% = number% DIV 10^2
  5967. point2% = ((dur%*ph2%/100)*factor)+hposn%+pointplus%
  5968. :
  5969. REM first phase
  5970. IF amp2% < amp1% THEN
  5971. IF longscore$ = "y" THEN
  5972. LINE hposn%+x1%+y1%,actamppos%(voice%+1)+8,point1%-35+x2%,actamppos%(voice%+1)-8
  5973. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-24,point1%-35+x2%,actamppos%(voice%+1)-8
  5974. MOVE point1%-25+x2%,actamppos%(voice%+1) : PRINT amp2$
  5975. ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)+8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-8
  5976. LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-24,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-8
  5977. MOVE point1%-25+x2%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
  5978. ENDIF
  5979. ENDIF
  5980. IF amp2% > amp1% THEN
  5981. IF longscore$ = "y" THEN
  5982. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point1%-35+x2%,actamppos%(voice%+1)+8
  5983. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point1%-35+x2%,actamppos%(voice%+1)-24
  5984. MOVE point1%-25+x2%,actamppos%(voice%+1) : PRINT amp2$
  5985. ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)+8
  5986. LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-24
  5987. MOVE point1%-25+x2%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
  5988. ENDIF
  5989. ENDIF
  5990. :
  5991. REM second phase
  5992. IF amp1% <> amp2% THEN start% = point1%-25+x2%+y2% ELSE start% = point1%
  5993. IF amp3% < amp2% THEN
  5994. IF longscore$ = "y" THEN
  5995. LINE start%,actamppos%(voice%+1)+8,point2%-35+x3%,actamppos%(voice%+1)-8
  5996. LINE start%,actamppos%(voice%+1)-24,point2%-35+x3%,actamppos%(voice%+1)-8
  5997. MOVE point2%-25+x3%,actamppos%(voice%+1) : PRINT amp3$
  5998. ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)+8,point2%-35+x3%,714+shortamppos%(voice%)-((system%-1)*524)-8
  5999. LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-24,point2%-35+x3%,714+shortamppos%(voice%)-((system%-1)*524)-8
  6000. MOVE point2%-25+x3%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp3$
  6001. ENDIF
  6002. ENDIF
  6003. IF amp3% > amp2% THEN
  6004. IF longscore$ = "y" THEN
  6005. LINE start%,actamppos%(voice%+1)-8,point2%-35+x3%,actamppos%(voice%+1)+8
  6006. LINE start%,actamppos%(voice%+1)-8,point2%-35+x3%,actamppos%(voice%+1)-24
  6007. MOVE point2%-25+x3%,actamppos%(voice%+1) : PRINT amp3$
  6008. ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point2%-35+x3%,714+shortamppos%(voice%)-((system%-1)*524)+8
  6009. LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point2%-35+x3%,714+shortamppos%(voice%)-((system%-1)*524)-24
  6010. MOVE point2%-25+x3%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp3$
  6011. ENDIF
  6012. ENDIF
  6013. :
  6014. REM third phase
  6015. IF amp2% <> amp3% THEN start% = point2%-25+x3%+y3% ELSE start% = point2%
  6016. IF amp4% < amp3% THEN
  6017. IF longscore$ = "y" THEN
  6018. LINE start%,actamppos%(voice%+1)+8,point%-90+(x4%*2),actamppos%(voice%+1)-8
  6019. LINE start%,actamppos%(voice%+1)-24,point%-90+(x4%*2),actamppos%(voice%+1)-8
  6020. MOVE point%-80+(x4%*2),actamppos%(voice%+1) : PRINT amp4$
  6021. ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)+8,point%-90+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
  6022. LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-24,point%-90+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
  6023. MOVE point%-80+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp4$
  6024. ENDIF
  6025. ENDIF
  6026. IF amp4% > amp3% THEN
  6027. IF longscore$ = "y" THEN
  6028. LINE start%,actamppos%(voice%+1)-8,point%-90+(x4%*2),actamppos%(voice%+1)+8
  6029. LINE start%,actamppos%(voice%+1)-8,point%-90+(x4%*2),actamppos%(voice%+1)-24
  6030. MOVE point%-80+(x4%*2),actamppos%(voice%+1) : PRINT amp4$
  6031. ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524)+8
  6032. LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524)-24
  6033. MOVE point%-80+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp4$
  6034. ENDIF
  6035. ENDIF
  6036. :
  6037. ENDCASE
  6038. :
  6039. ENDIF
  6040. :
  6041. :
  6042. REM ledger lines
  6043. IF staves$ = "y" THEN
  6044. IF notehead$ = "big" THEN
  6045. lend% = -12 : rend% = 44
  6046. ENDIF
  6047. IF notehead$ = "small" THEN
  6048. lend% = 8 : rend% = 40
  6049. ENDIF
  6050. IF notehead$ = "vsmall" THEN
  6051. lend% = 18 : rend% = 38
  6052. ENDIF
  6053. :
  6054. IF longscore$ = "n" THEN
  6055. IF value% = 858 THEN
  6056. IF vposn% >= 954 THEN
  6057. numledgers% = (vposn%-938)/16
  6058. FOR ct% = 1 TO numledgers%
  6059. LINE hposn%+lend%,954+((ct%-1)*16),hposn%+rend%,954+((ct%-1)*16)
  6060. NEXT
  6061. ENDIF
  6062. IF vposn% = 858 THEN LINE hposn%+lend%,858,hposn%+rend%,858
  6063. ENDIF
  6064. IF value% = 586 THEN
  6065. IF vposn% <= 714 THEN
  6066. numledgers% = (730-vposn%)/16
  6067. FOR ct% = 1 TO numledgers%
  6068. LINE hposn%+lend%,714-((ct%-1)*16),hposn%+rend%,714-((ct%-1)*16)
  6069. NEXT
  6070. ENDIF
  6071. ENDIF
  6072. IF value% = 334 THEN
  6073. IF vposn% >= 430 THEN
  6074. numledgers% = (vposn%-414)/16
  6075. FOR ct% = 1 TO numledgers%
  6076. LINE hposn%+lend%,430+((ct%-1)*16),hposn%+rend%,430+((ct%-1)*16)
  6077. NEXT
  6078. ENDIF
  6079. IF vposn% = 334 THEN LINE hposn%+lend%,334,hposn%+rend%,334
  6080. ENDIF
  6081. IF value% = 62 THEN
  6082. IF vposn% <= 190 THEN
  6083. numledgers% = (206-vposn%)/16
  6084. FOR ct% = 1 TO numledgers%
  6085. LINE hposn%+lend%,190-((ct%-1)*16),hposn%+rend%,190-((ct%-1)*16)
  6086. NEXT
  6087. ENDIF
  6088. ENDIF
  6089. ENDIF
  6090. :
  6091. IF longscore$ = "y" THEN
  6092. CASE MID$(clefcombination$,ledgerkey%,1) OF
  6093. WHEN "T" : num% = 320
  6094. WHEN "P" : num% = 376
  6095. WHEN "B" : num% = 224
  6096. WHEN "D" : num% = 168
  6097. ENDCASE
  6098. IF vposn% - value% >= num% THEN
  6099. numledgers% = ((vposn%-value%)-(num%-16))/16
  6100. FOR ct% = 1 TO numledgers%
  6101. LINE hposn% + lend%,value%+(num%-16)+(16*ct%),hposn%+rend%,value%+(num%-16)+(16*ct%)
  6102. NEXT
  6103. ENDIF
  6104. IF vposn%-value% <= (num%-96) THEN
  6105. numledgers% = ((num%-80)-(vposn%-value%))/16
  6106. FOR ct% = 1 TO numledgers%
  6107. LINE hposn%+lend%,(value%+(num%-80))-(16*ct%),hposn%+rend%,(value%+(num%-80))-(16*ct%)
  6108. NEXT
  6109. ENDIF
  6110. ENDIF
  6111. :
  6112. ENDIF : REM applies to 'IF staves$ = "y" '
  6113. :
  6114. REM stems
  6115. IF stems$ = "y" THEN
  6116. IF longscore$ = "n" THEN
  6117. IF notehead$ = "big" THEN
  6118. LINE hposn%+30,vposn%,hposn%+30,938+shortbeamposn%(voice%)-(524*(system%-1))
  6119. ENDIF
  6120. LINE hposn%+32,vposn%,hposn%+32,938+shortbeamposn%(voice%)-(524*(system%-1))
  6121. ENDIF
  6122. :
  6123. IF longscore$ = "y" THEN
  6124. IF notehead$ = "big" THEN
  6125. LINE hposn%+30,vposn%,hposn%+30,actbeamposn%(count%-startv%)
  6126. ENDIF
  6127. LINE hposn%+32,vposn%,hposn%+32,actbeamposn%(count%-startv%)
  6128. ENDIF
  6129. ENDIF
  6130. :
  6131. REM accidentals
  6132. IF accidentals$ = "y" THEN
  6133. acc% = (array%(startcell%,0,voice%)MOD100)DIV10
  6134. IF notehead$ = "big" THEN
  6135. CASE acc% OF
  6136. WHEN 9 : REM sharp
  6137. LINE hposn%-30,vposn%-24,hposn%-30,vposn%+24
  6138. LINE hposn%-28,vposn%-24,hposn%-28,vposn%+24
  6139. LINE hposn%-16,vposn%-24,hposn%-16,vposn%+24
  6140. LINE hposn%-14,vposn%-24,hposn%-14,vposn%+24
  6141. LINE hposn%-36,vposn%+4,hposn%-8,vposn%+12
  6142. LINE hposn%-36,vposn%-12,hposn%-8,vposn%-4
  6143. WHEN 8 : REM 3/8 sharp
  6144. LINE hposn%-30,vposn%-24,hposn%-30,vposn%+24
  6145. LINE hposn%-28,vposn%-24,hposn%-28,vposn%+24
  6146. LINE hposn%-16,vposn%-24,hposn%-16,vposn%+24
  6147. LINE hposn%-14,vposn%-24,hposn%-14,vposn%+24
  6148. LINE hposn%-36,vposn%+4,hposn%-8,vposn%+12
  6149. LINE hposn%-36,vposn%-12,hposn%-8,vposn%-4
  6150. LINE hposn%-20,vposn%-20,hposn%-16,vposn%-28
  6151. LINE hposn%-14,vposn%-28,hposn%-10,vposn%-20
  6152. LINE hposn%-18,vposn%-20,hposn%-16,vposn%-28
  6153. LINE hposn%-14,vposn%-28,hposn%-12,vposn%-20
  6154. WHEN 1 : REM flat
  6155. LINE hposn%-28,vposn%-12,hposn%-28,vposn%+28
  6156. LINE hposn%-26,vposn%-12,hposn%-26,vposn%+28
  6157. LINE hposn%-20,vposn%+8,hposn%-10,vposn%+8
  6158. LINE hposn%-24,vposn%+4,hposn%-22,vposn%+4
  6159. LINE hposn%-12,vposn%+4,hposn%-8,vposn%+4
  6160. LINE hposn%-28,vposn%,hposn%-26,vposn%
  6161. LINE hposn%-12,vposn%,hposn%-8,vposn%
  6162. LINE hposn%-16,vposn%-4,hposn%-12,vposn%-4
  6163. LINE hposn%-28,vposn%-8,hposn%-18,vposn%-8
  6164. WHEN 2 : REM 3/8 flat
  6165. LINE hposn%-28,vposn%-12,hposn%-28,vposn%+28
  6166. LINE hposn%-26,vposn%-12,hposn%-26,vposn%+28
  6167. LINE hposn%-20,vposn%+8,hposn%-10,vposn%+8
  6168. LINE hposn%-24,vposn%+4,hposn%-22,vposn%+4
  6169. LINE hposn%-12,vposn%+4,hposn%-8,vposn%+4
  6170. LINE hposn%-28,vposn%,hposn%-26,vposn%
  6171. LINE hposn%-12,vposn%,hposn%-8,vposn%
  6172. LINE hposn%-16,vposn%-4,hposn%-12,vposn%-4
  6173. LINE hposn%-28,vposn%-8,hposn%-18,vposn%-8
  6174. LINE hposn%-32,vposn%+20,hposn%-28,vposn%+28
  6175. LINE hposn%-26,vposn%+28,hposn%-22,vposn%+20
  6176. LINE hposn%-30,vposn%+20,hposn%-28,vposn%+28
  6177. LINE hposn%-26,vposn%+28,hposn%-24,vposn%+20
  6178. WHEN 7 : REM quartersharp
  6179. LINE hposn%-18,vposn%+24,hposn%-18,vposn%-24
  6180. LINE hposn%-16,vposn%+24,hposn%-16,vposn%-24
  6181. LINE hposn%-26,vposn%+4,hposn%-8,vposn%+12
  6182. LINE hposn%-26,vposn%-12,hposn%-8,vposn%-4
  6183. WHEN 3 : REM quarterflat
  6184. LINE hposn%-12,vposn%-12,hposn%-12,vposn%+28
  6185. LINE hposn%-10,vposn%-12,hposn%-10,vposn%+28
  6186. LINE hposn%-28,vposn%+8,hposn%-18,vposn%+8
  6187. LINE hposn%-30,vposn%+4,hposn%-26,vposn%+4
  6188. LINE hposn%-16,vposn%+4,hposn%-14,vposn%+4
  6189. LINE hposn%-30,vposn%,hposn%-26,vposn%
  6190. LINE hposn%-26,vposn%-4,hposn%-22,vposn%-4
  6191. LINE hposn%-20,vposn%-8,hposn%-10,vposn%-8
  6192. WHEN 5 : REM natural
  6193. LINE hposn%-30,vposn%+24,hposn%-30,vposn%-8
  6194. LINE hposn%-28,vposn%+24,hposn%-28,vposn%-8
  6195. LINE hposn%-12,vposn%+8,hposn%-12,vposn%-24
  6196. LINE hposn%-10,vposn%+8,hposn%-10,vposn%-24
  6197. LINE hposn%-30,vposn%+4,hposn%-24,vposn%+4
  6198. LINE hposn%-22,vposn%+8,hposn%-18,vposn%+8
  6199. LINE hposn%-16,vposn%+12,hposn%-10,vposn%+12
  6200. LINE hposn%-30,vposn%-12,hposn%-24,vposn%-12
  6201. LINE hposn%-22,vposn%-8,hposn%-18,vposn%-8
  6202. LINE hposn%-16,vposn%-4,hposn%-10,vposn%-4
  6203. WHEN 4 : REM 1/8 flat
  6204. LINE hposn%-30,vposn%+24,hposn%-30,vposn%-8
  6205. LINE hposn%-28,vposn%+24,hposn%-28,vposn%-8
  6206. LINE hposn%-12,vposn%+8,hposn%-12,vposn%-24
  6207. LINE hposn%-10,vposn%+8,hposn%-10,vposn%-24
  6208. LINE hposn%-30,vposn%+4,hposn%-24,vposn%+4
  6209. LINE hposn%-22,vposn%+8,hposn%-18,vposn%+8
  6210. LINE hposn%-16,vposn%+12,hposn%-10,vposn%+12
  6211. LINE hposn%-30,vposn%-12,hposn%-24,vposn%-12
  6212. LINE hposn%-22,vposn%-8,hposn%-18,vposn%-8
  6213. LINE hposn%-16,vposn%-4,hposn%-10,vposn%-4
  6214. LINE hposn%-16,vposn%-20,hposn%-12,vposn%-28
  6215. LINE hposn%-10,vposn%-28,hposn%-6,vposn%-20
  6216. LINE hposn%-14,vposn%-20,hposn%-12,vposn%-28
  6217. LINE hposn%-10,vposn%-28,hposn%-8,vposn%-20
  6218. WHEN 6 : REM 1/8 sharp
  6219. LINE hposn%-30,vposn%+24,hposn%-30,vposn%-8
  6220. LINE hposn%-28,vposn%+24,hposn%-28,vposn%-8
  6221. LINE hposn%-12,vposn%+8,hposn%-12,vposn%-24
  6222. LINE hposn%-10,vposn%+8,hposn%-10,vposn%-24
  6223. LINE hposn%-30,vposn%+4,hposn%-24,vposn%+4
  6224. LINE hposn%-22,vposn%+8,hposn%-18,vposn%+8
  6225. LINE hposn%-16,vposn%+12,hposn%-10,vposn%+12
  6226. LINE hposn%-30,vposn%-12,hposn%-24,vposn%-12
  6227. LINE hposn%-22,vposn%-8,hposn%-18,vposn%-8
  6228. LINE hposn%-16,vposn%-4,hposn%-10,vposn%-4
  6229. LINE hposn%-34,vposn%+20,hposn%-30,vposn%+28
  6230. LINE hposn%-32,vposn%+20,hposn%-30,vposn%+28
  6231. LINE hposn%-26,vposn%+20,hposn%-28,vposn%+28
  6232. LINE hposn%-24,vposn%+20,hposn%-28,vposn%+28
  6233. ENDCASE
  6234. ENDIF
  6235. IF notehead$ = "vsmall" THEN
  6236. CASE acc% OF
  6237. WHEN 5 : REM natural
  6238. LINE hposn%+12,vposn%+24,hposn%+12,vposn%-4
  6239. LINE hposn%+20,vposn%+4,hposn%+20,vposn%-24
  6240. LINE hposn%+12,vposn%+4,hposn%+20,vposn%+8
  6241. LINE hposn%+12,vposn%-8,hposn%+20,vposn%-4
  6242. WHEN 6 : REM 1/8 sharp
  6243. LINE hposn%+12,vposn%+24,hposn%+12,vposn%-4
  6244. LINE hposn%+20,vposn%+4,hposn%+20,vposn%-24
  6245. LINE hposn%+12,vposn%+4,hposn%+20,vposn%+8
  6246. LINE hposn%+12,vposn%-8,hposn%+20,vposn%-4
  6247. LINE hposn%+10,vposn%+20,hposn%+12,vposn%+28
  6248. LINE hposn%+14,vposn%+20,hposn%+12,vposn%+28
  6249. LINE hposn%+8,vposn%+20,hposn%+12,vposn%+28
  6250. LINE hposn%+16,vposn%+20,hposn%+12,vposn%+28
  6251. WHEN 9 : REM sharp
  6252. LINE hposn%+12,vposn%+24,hposn%+12,vposn%-24
  6253. LINE hposn%+18,vposn%+24,hposn%+18,vposn%-24
  6254. LINE hposn%+10,vposn%+4,hposn%+20,vposn%+8
  6255. LINE hposn%+10,vposn%-8,hposn%+20,vposn%-4
  6256. WHEN 8 : REM 3/8 sharp
  6257. LINE hposn%+12,vposn%+24,hposn%+12,vposn%-24
  6258. LINE hposn%+18,vposn%+24,hposn%+18,vposn%-24
  6259. LINE hposn%+10,vposn%+4,hposn%+20,vposn%+8
  6260. LINE hposn%+10,vposn%-8,hposn%+20,vposn%-4
  6261. LINE hposn%+14,vposn%-20,hposn%+18,vposn%-28
  6262. LINE hposn%+16,vposn%-20,hposn%+18,vposn%-28
  6263. LINE hposn%+20,vposn%-20,hposn%+18,vposn%-28
  6264. LINE hposn%+22,vposn%-20,hposn%+18,vposn%-28
  6265. WHEN 4 : REM 1/8 flat
  6266. LINE hposn%+12,vposn%+24,hposn%+12,vposn%-4
  6267. LINE hposn%+20,vposn%+4,hposn%+20,vposn%-24
  6268. LINE hposn%+12,vposn%+4,hposn%+20,vposn%+8
  6269. LINE hposn%+12,vposn%-8,hposn%+20,vposn%-4
  6270. LINE hposn%+16,vposn%-20,hposn%+20,vposn%-28
  6271. LINE hposn%+18,vposn%-20,hposn%+20,vposn%-28
  6272. LINE hposn%+22,vposn%-20,hposn%+20,vposn%-28
  6273. LINE hposn%+24,vposn%-20,hposn%+20,vposn%-28
  6274. WHEN 7 : REM quartersharp
  6275. LINE hposn%+18,vposn%+24,hposn%+18,vposn%-24
  6276. LINE hposn%+16,vposn%+4,hposn%+20,vposn%+8
  6277. LINE hposn%+16,vposn%-8,hposn%+20,vposn%-4
  6278. WHEN 2 : REM 3/8 flat
  6279. LINE hposn%+12,vposn%+28,hposn%+12,vposn%-12
  6280. LINE hposn%+16,vposn%+8,hposn%+18,vposn%+8
  6281. LINE hposn%+14,vposn%+4,hposn%+14,vposn%+4
  6282. LINE hposn%+20,vposn%+4,hposn%+20,vposn%+4
  6283. LINE hposn%+20,vposn%,hposn%+20,vposn%
  6284. LINE hposn%+18,vposn%-4,hposn%+18,vposn%-4
  6285. LINE hposn%+12,vposn%-8,hposn%+16,vposn%-8
  6286. LINE hposn%+8,vposn%+20,hposn%+12,vposn%+28
  6287. LINE hposn%+10,vposn%+20,hposn%+12,vposn%+28
  6288. LINE hposn%+14,vposn%+20,hposn%+12,vposn%+28
  6289. LINE hposn%+16,vposn%+20,hposn%+12,vposn%+28
  6290. WHEN 1 : REM flat
  6291. LINE hposn%+12,vposn%+28,hposn%+12,vposn%-12
  6292. LINE hposn%+16,vposn%+8,hposn%+18,vposn%+8
  6293. LINE hposn%+14,vposn%+4,hposn%+14,vposn%+4
  6294. LINE hposn%+20,vposn%+4,hposn%+20,vposn%+4
  6295. LINE hposn%+20,vposn%,hposn%+20,vposn%
  6296. LINE hposn%+18,vposn%-4,hposn%+18,vposn%-4
  6297. LINE hposn%+12,vposn%-8,hposn%+16,vposn%-8
  6298. WHEN 3 : REM quarterflat
  6299. LINE hposn%+20,vposn%+28,hposn%+20,vposn%-12
  6300. LINE hposn%+14,vposn%+8,hposn%+16,vposn%+8
  6301. LINE hposn%+12,vposn%+4,hposn%+12,vposn%+4
  6302. LINE hposn%+18,vposn%+4,hposn%+18,vposn%+4
  6303. LINE hposn%+12,vposn%,hposn%+12,vposn%
  6304. LINE hposn%+14,vposn%-4,hposn%+14,vposn%-4
  6305. LINE hposn%+16,vposn%-8,hposn%+20,vposn%-8
  6306. ENDCASE
  6307. inf% = (array%(startcell%,2,voice%)MOD100)-50
  6308. IF inf% < 0 THEN
  6309. MOVE hposn%-125,vposn%-30 : PRINT inf%;"c"
  6310. ENDIF
  6311. IF inf% > 0 THEN
  6312. MOVE hposn%-16,vposn%+45 : PRINT "+";inf%;"c"
  6313. ENDIF
  6314. ENDIF
  6315. :
  6316. IF notehead$ = "small" THEN
  6317. CASE acc% OF
  6318. WHEN 1 : REM flat
  6319. LINE hposn%-2,vposn%+28,hposn%-2,vposn%-12
  6320. LINE hposn%+4,vposn%+8,hposn%+8,vposn%+8
  6321. LINE hposn%,vposn%+4,hposn%+2,vposn%+4
  6322. LINE hposn%+8,vposn%+4,hposn%+10,vposn%+4
  6323. LINE hposn%+8,vposn%,hposn%+10,vposn%
  6324. LINE hposn%+4,vposn%-4,hposn%+6,vposn%-4
  6325. LINE hposn%-2,vposn%-8,hposn%+2,vposn%-8
  6326. WHEN 2 : REM 3/8 flat
  6327. LINE hposn%-2,vposn%+28,hposn%-2,vposn%-12
  6328. LINE hposn%+4,vposn%+8,hposn%+8,vposn%+8
  6329. LINE hposn%,vposn%+4,hposn%+2,vposn%+4
  6330. LINE hposn%+8,vposn%+4,hposn%+10,vposn%+4
  6331. LINE hposn%+8,vposn%,hposn%+10,vposn%
  6332. LINE hposn%+4,vposn%-4,hposn%+6,vposn%-4
  6333. LINE hposn%-2,vposn%-8,hposn%+2,vposn%-8
  6334. LINE hposn%-6,vposn%+20,hposn%-2,vposn%+28
  6335. LINE hposn%-4,vposn%+20,hposn%-2,vposn%+28
  6336. LINE hposn%,vposn%+20,hposn%-2,vposn%+28
  6337. LINE hposn%+2,vposn%+20,hposn%-2,vposn%+28
  6338. WHEN 3 : REM quarterflat
  6339. LINE hposn%+10,vposn%+28,hposn%+10,vposn%-12
  6340. LINE hposn%,vposn%+8,hposn%+4,vposn%+8
  6341. LINE hposn%-2,vposn%+4,hposn%,vposn%+4
  6342. LINE hposn%+6,vposn%+4,hposn%+8,vposn%+4
  6343. LINE hposn%-2,vposn%,hposn%,vposn%
  6344. LINE hposn%+2,vposn%-4,hposn%+4,vposn%-4
  6345. LINE hposn%+6,vposn%-8,hposn%+10,vposn%-8
  6346. WHEN 5 : REM natural
  6347. LINE hposn%,vposn%+24,hposn%,vposn%-4
  6348. LINE hposn%+10,vposn%+4,hposn%+10,vposn%-24
  6349. LINE hposn%,vposn%+4,hposn%+10,vposn%+8
  6350. LINE hposn%,vposn%-8,hposn%+10,vposn%-4
  6351. WHEN 6 : REM 1/8 sharp
  6352. LINE hposn%,vposn%+24,hposn%,vposn%-4
  6353. LINE hposn%+10,vposn%+4,hposn%+10,vposn%-24
  6354. LINE hposn%,vposn%+4,hposn%+10,vposn%+8
  6355. LINE hposn%,vposn%-8,hposn%+10,vposn%-4
  6356. LINE hposn%-4,vposn%+20,hposn%,vposn%+28
  6357. LINE hposn%-2,vposn%+20,hposn%,vposn%+28
  6358. LINE hposn%+2,vposn%+20,hposn%,vposn%+28
  6359. LINE hposn%+4,vposn%+20,hposn%,vposn%+28
  6360. WHEN 7 : REM quartersharp
  6361. LINE hposn%+6,vposn%+24,hposn%+6,vposn%-24
  6362. LINE hposn%+2,vposn%+4,hposn%+10,vposn%+8
  6363. LINE hposn%+2,vposn%-8,hposn%+10,vposn%-4
  6364. WHEN 4 : REM 1/8 flat
  6365. LINE hposn%,vposn%+24,hposn%,vposn%-4
  6366. LINE hposn%+10,vposn%+4,hposn%+10,vposn%-24
  6367. LINE hposn%,vposn%+4,hposn%+10,vposn%+8
  6368. LINE hposn%,vposn%-8,hposn%+10,vposn%-4
  6369. LINE hposn%+6,vposn%-20,hposn%+10,vposn%-28
  6370. LINE hposn%+8,vposn%-20,hposn%+10,vposn%-28
  6371. LINE hposn%+12,vposn%-20,hposn%+10,vposn%-28
  6372. LINE hposn%+14,vposn%-20,hposn%+10,vposn%-28
  6373. WHEN 9 : REM sharp
  6374. LINE hposn%-2,vposn%+24,hposn%-2,vposn%-24
  6375. LINE hposn%+6,vposn%+24,hposn%+6,vposn%-24
  6376. LINE hposn%-6,vposn%+4,hposn%+10,vposn%+8
  6377. LINE hposn%-6,vposn%-8,hposn%+10,vposn%-4
  6378. WHEN 8 : REM 3/8 sharp
  6379. LINE hposn%-2,vposn%+24,hposn%-2,vposn%-24
  6380. LINE hposn%+6,vposn%+24,hposn%+6,vposn%-24
  6381. LINE hposn%-6,vposn%+4,hposn%+10,vposn%+8
  6382. LINE hposn%-6,vposn%-8,hposn%+10,vposn%-4
  6383. LINE hposn%+2,vposn%-20,hposn%+6,vposn%-28
  6384. LINE hposn%+4,vposn%-20,hposn%+6,vposn%-28
  6385. LINE hposn%+8,vposn%-20,hposn%+6,vposn%-28
  6386. LINE hposn%+10,vposn%-20,hposn%+6,vposn%-28
  6387. ENDCASE
  6388. :
  6389. ENDIF
  6390. ENDIF
  6391. startcell% += 1
  6392. IF longscore$ = "n" THEN div% = 2 ELSE div% = 1
  6393. :
  6394. UNTIL (array%(startcell%,0,voice%) DIV10^6) >= ((numbars%/div%)+firstbar%) OR array%(startcell%,0,voice%) = 0
  6395. ENDIF
  6396. :
  6397. IF stems$ = "y" THEN PROCrhythmdisplay
  6398. :
  6399. IF longscore$ = "y" THEN ledgerkey% += EVAL(MID$(stavecombination$,count%-startv%+1,1))
  6400. :
  6401. NEXT
  6402. :
  6403. NEXT
  6404. :
  6405. VDU 4 : OFF : box$ = "n" : biga% = 10^5 : bigb% = 0 : bigc% = 0 : bigd% = 10^5
  6406. IF printing$ = "n" AND preplaydisplay$ = "n" THEN PROCpostdisplay
  6407. ENDPROC
  6408. :
  6409. REM*************************************************
  6410. :
  6411. DEF PROCroundgliss
  6412. :
  6413. IF thirdphase$ = "n" THEN gl1% = 50-gl% ELSE gl1% = 10-gl%
  6414. gl% = gl1%*1.1665 : gl% = (gl%DIV4)*4
  6415. IF gl% = 0 THEN
  6416. IF gl1% > 0 THEN gl% = 4 ELSE gl% = -4
  6417. ENDIF
  6418. IF gl% < 0 THEN g% = gl%*-1 ELSE g% = gl%
  6419. rem = g%/8
  6420. IF (rem*10)MOD10 <> 0 THEN
  6421. IF gl% > 0 THEN gl% += 4 ELSE gl% -= 4
  6422. ENDIF
  6423. :
  6424. ENDPROC
  6425. :
  6426. REM**************************************************
  6427. :
  6428. DEF PROCpostdisplay
  6429. :
  6430. distort$ = "OFF"
  6431. REM in case of Escqping from a distort routine before switching it off
  6432. :
  6433. OFF
  6434. CASE GET$ OF
  6435. :
  6436. WHEN "i" :
  6437. PROCwindow(20,69,60,55)
  6438. CLS : PRINT'" Copy-extract or move-extract? (C/M) "
  6439. CASE GET$ OF
  6440. WHEN "C","c" : copymove$ = "EC"
  6441. OTHERWISE copymove$ = "EM"
  6442. ENDCASE
  6443. savevoice$ = "N"
  6444. PROCcopy2
  6445. :
  6446. WHEN "{" : quickcopy$ = "y" : PROCdisplay
  6447. WHEN "}" : quickcopy$ = "n" : PROCdisplay
  6448. WHEN "¬" :
  6449. PROCwindow(20,69,60,55) : CLS
  6450. INPUT'" Display from which voice "startv%
  6451. PROCdisplay
  6452. :
  6453. WHEN "`" :
  6454. distort$ = "ON" : distortpara$ = "attacks" : ON
  6455. PROCwindow(20,69,60,55) : CLS : OFF :
  6456. incre$ = INKEY$(50)
  6457. IF incre$ = "`" THEN
  6458. distortpara$ = "pitches"
  6459. ENDIF
  6460. PROCcopy
  6461. :
  6462. WHEN "+" :
  6463. numvoices% = numparts%
  6464. FOR count% = 1 TO numvoices%
  6465. displayvoices%(count%) = 1 + count% - 1
  6466. holddisplay%(count%) = 1 + count% - 1
  6467. NEXT
  6468. holdnum% = numvoices%
  6469. PROCdisplay
  6470. :
  6471. WHEN "!" : copydownwards% = 1 :
  6472. IF addten$ = "y" THEN copydownwards% +=10
  6473. IF addten$ = "twenty" THEN copydownwards% += 20
  6474. incre$ = INKEY$(downwardsspeed%)
  6475. IF incre$ <> "" THEN
  6476. CASE incre$ OF
  6477. WHEN "!" : downby% = 1
  6478. WHEN """" : downby% = 2
  6479. WHEN "£" : downby% = 3
  6480. WHEN "$" : downby% = 4
  6481. WHEN "%" : downby% = 5
  6482. WHEN "^" : downby% = 6
  6483. WHEN "&" : downby% = 7
  6484. WHEN "*" : downby% = 8
  6485. WHEN "(" : downby% = 9
  6486. WHEN ")" : downby% = 10
  6487. ENDCASE
  6488. ELSE downby% = 1
  6489. ENDIF
  6490. PROCcopydownwards
  6491. WHEN """" : copydownwards% = 2 :
  6492. IF addten$ = "y" THEN copydownwards% +=10
  6493. IF addten$ = "twenty" THEN copydownwards% +=20
  6494. incre$ = INKEY$(downwardsspeed%)
  6495. IF incre$ <> "" THEN
  6496. CASE incre$ OF
  6497. WHEN "!" : downby% = 1
  6498. WHEN """" : downby% = 2
  6499. WHEN "£" : downby% = 3
  6500. WHEN "$" : downby% = 4
  6501. WHEN "%" : downby% = 5
  6502. WHEN "^" : downby% = 6
  6503. WHEN "&" : downby% = 7
  6504. WHEN "*" : downby% = 8
  6505. WHEN "(" : downby% = 9
  6506. ENDCASE
  6507. ELSE downby% = 1
  6508. ENDIF
  6509. PROCcopydownwards
  6510. WHEN "£" : copydownwards% = 3 :
  6511. IF addten$ = "y" THEN copydownwards% +=10
  6512. IF addten$ = "twenty" THEN copydownwards% +=20
  6513. incre$ = INKEY$(downwardsspeed%)
  6514. IF incre$ <> "" THEN
  6515. CASE incre$ OF
  6516. WHEN "!" : downby% = 1
  6517. WHEN """" : downby% = 2
  6518. WHEN "£" : downby% = 3
  6519. WHEN "$" : downby% = 4
  6520. WHEN "%" : downby% = 5
  6521. WHEN "^" : downby% = 6
  6522. WHEN "&" : downby% = 7
  6523. WHEN "*" : downby% = 8
  6524. WHEN "(" : downby% = 9
  6525. ENDCASE
  6526. ELSE downby% = 1
  6527. ENDIF
  6528. PROCcopydownwards
  6529. WHEN "$" : copydownwards% = 4 :
  6530. IF addten$ = "y" THEN copydownwards% +=10
  6531. IF addten$ = "twenty" THEN copydownwards% +=20
  6532. incre$ = INKEY$(downwardsspeed%)
  6533. IF incre$ <> "" THEN
  6534. CASE incre$ OF
  6535. WHEN "!" : downby% = 1
  6536. WHEN """" : downby% = 2
  6537. WHEN "£" : downby% = 3
  6538. WHEN "$" : downby% = 4
  6539. WHEN "%" : downby% = 5
  6540. WHEN "^" : downby% = 6
  6541. WHEN "&" : downby% = 7
  6542. WHEN "*" : downby% = 8
  6543. WHEN "(" : downby% = 9
  6544. ENDCASE
  6545. ELSE downby% = 1
  6546. ENDIF
  6547. PROCcopydownwards
  6548. WHEN "%" : copydownwards% = 5 :
  6549. IF addten$ = "y" THEN copydownwards% +=10
  6550. IF addten$ = "twenty" THEN copydownwards% +=20
  6551. incre$ = INKEY$(downwardsspeed%)
  6552. IF incre$ <> "" THEN
  6553. CASE incre$ OF
  6554. WHEN "!" : downby% = 1
  6555. WHEN """" : downby% = 2
  6556. WHEN "£" : downby% = 3
  6557. WHEN "$" : downby% = 4
  6558. WHEN "%" : downby% = 5
  6559. WHEN "^" : downby% = 6
  6560. WHEN "&" : downby% = 7
  6561. WHEN "*" : downby% = 8
  6562. WHEN "(" : downby% = 9
  6563. ENDCASE
  6564. ELSE downby% = 1
  6565. ENDIF
  6566. PROCcopydownwards
  6567. WHEN "^" : copydownwards% = 6 :
  6568. IF addten$ = "y" THEN copydownwards% +=10
  6569. IF addten$ = "twenty" THEN copydownwards% +=20
  6570. incre$ = INKEY$(downwardsspeed%)
  6571. IF incre$ <> "" THEN
  6572. CASE incre$ OF
  6573. WHEN "!" : downby% = 1
  6574. WHEN """" : downby% = 2
  6575. WHEN "£" : downby% = 3
  6576. WHEN "$" : downby% = 4
  6577. WHEN "%" : downby% = 5
  6578. WHEN "^" : downby% = 6
  6579. WHEN "&" : downby% = 7
  6580. WHEN "*" : downby% = 8
  6581. WHEN "(" : downby% = 9
  6582. ENDCASE
  6583. ELSE downby% = 1
  6584. ENDIF
  6585. PROCcopydownwards
  6586. WHEN "&" : copydownwards% = 7 :
  6587. IF addten$ = "y" THEN copydownwards% +=10
  6588. IF addten$ = "twenty" THEN copydownwards% +=20
  6589. incre$ = INKEY$(downwardsspeed%)
  6590. IF incre$ <> "" THEN
  6591. CASE incre$ OF
  6592. WHEN "!" : downby% = 1
  6593. WHEN """" : downby% = 2
  6594. WHEN "£" : downby% = 3
  6595. WHEN "$" : downby% = 4
  6596. WHEN "%" : downby% = 5
  6597. WHEN "^" : downby% = 6
  6598. WHEN "&" : downby% = 7
  6599. WHEN "*" : downby% = 8
  6600. WHEN "(" : downby% = 9
  6601. ENDCASE
  6602. ELSE downby% = 1
  6603. ENDIF
  6604. PROCcopydownwards
  6605. WHEN "*" : copydownwards% = 8 :
  6606. IF addten$ = "y" THEN copydownwards% +=10
  6607. IF addten$ = "twenty" THEN copydownwards% +=20
  6608. incre$ = INKEY$(downwardsspeed%)
  6609. IF incre$ <> "" THEN
  6610. CASE incre$ OF
  6611. WHEN "!" : downby% = 1
  6612. WHEN """" : downby% = 2
  6613. WHEN "£" : downby% = 3
  6614. WHEN "$" : downby% = 4
  6615. WHEN "%" : downby% = 5
  6616. WHEN "^" : downby% = 6
  6617. WHEN "&" : downby% = 7
  6618. WHEN "*" : downby% = 8
  6619. WHEN "(" : downby% = 9
  6620. ENDCASE
  6621. ELSE downby% = 1
  6622. ENDIF
  6623. PROCcopydownwards
  6624. WHEN "(" : copydownwards% = 9 :
  6625. IF addten$ = "y" THEN copydownwards% +=10
  6626. IF addten$ = "twenty" THEN copydownwards% +=20
  6627. incre$ = INKEY$(downwardsspeed%)
  6628. IF incre$ <> "" THEN
  6629. CASE incre$ OF
  6630. WHEN "!" : downby% = 1
  6631. WHEN """" : downby% = 2
  6632. WHEN "£" : downby% = 3
  6633. WHEN "$" : downby% = 4
  6634. WHEN "%" : downby% = 5
  6635. WHEN "^" : downby% = 6
  6636. WHEN "&" : downby% = 7
  6637. WHEN "*" : downby% = 8
  6638. WHEN "(" : downby% = 9
  6639. ENDCASE
  6640. ELSE downby% = 1
  6641. ENDIF
  6642. PROCcopydownwards
  6643. WHEN ")" : copydownwards% = 10 :
  6644. IF addten$ = "y" THEN copydownwards% +=10
  6645. IF addten$ = "twenty" THEN copydownwards% +=20
  6646. incre$ = INKEY$(downwardsspeed%)
  6647. IF incre$ <> "" THEN
  6648. CASE incre$ OF
  6649. WHEN "!" : downby% = 1
  6650. WHEN """" : downby% = 2
  6651. WHEN "£" : downby% = 3
  6652. WHEN "$" : downby% = 4
  6653. WHEN "%" : downby% = 5
  6654. WHEN "^" : downby% = 6
  6655. WHEN "&" : downby% = 7
  6656. WHEN "*" : downby% = 8
  6657. WHEN "(" : downby% = 9
  6658. ENDCASE
  6659. ELSE downby% = 1
  6660. ENDIF
  6661. PROCcopydownwards
  6662. :
  6663. WHEN "c" : PROCincrementcalc
  6664. WHEN "k" : ON : PROCkeyboardshortcuts
  6665. WHEN "I" : copymove$ = "C" : savevoice$ = "N" : PROCwindow(20,69,60,55) : PROCimportvoice
  6666. WHEN "0",")" : PROCseriesattacks
  6667. WHEN "a" : PROCfunctionprelude
  6668. WHEN "m" : ON : PROCawait
  6669. WHEN "n" : ON : rerun$ = "n" : PROCrandomnumber
  6670. WHEN "N" : ON : rerun$ = "y" : PROCrandomnumber
  6671. WHEN "o" : ON : PROCdisplaysubmenu
  6672. WHEN "O" : deleteone$ = "top" : PROCdelete
  6673. WHEN "K" : deleteone$ = "middle" : PROCdelete
  6674. WHEN "M" : deleteone$ = "bottom" : PROCdelete
  6675. WHEN "r" : play$ = "replay" : PROCplay
  6676. WHEN "u" : ON : PROCseriesdurations
  6677. WHEN "G", "g" : ON : numdurations% = 111 : PROCdurationsbetween
  6678. WHEN "\" : ON : PROCshortmove
  6679. WHEN "|" : ON : PROCshortmoveone
  6680. WHEN "y" : ON : PROCseriespitches
  6681. WHEN "Y" :
  6682. IF addpitches$ = "y" THEN
  6683. PROCwindow(20,69,60,55)
  6684. ON
  6685. CLS
  6686. PROCinsertpitches
  6687. ELSE
  6688. voix% = 1 : son% = 5 : PROCedit
  6689. ENDIF
  6690. WHEN "l" : ON : PROCseriesamplitudes
  6691. WHEN "J","j" : ON : PROCseriesenvelopes
  6692. WHEN "h" : ON : PROCwindow(20,57,74,55)
  6693. PRINT'" Have you allocated at least 260K for system sprites?"
  6694. CASE GET$ OF
  6695. WHEN "N","n" : PROCdisplay
  6696. WHEN "Y","y" :
  6697. printing$ = "y" : printno% += 1 : PROCdisplay
  6698. MOVE 0,0
  6699. MOVE 1800,1223
  6700. *SGet mysprite
  6701. OSCLI "SSave HostFS::HardDisc4.$.CAC.Printing.print"+STR$(printno%)
  6702. printing$ = "n" : PROCdisplay
  6703. ENDCASE
  6704. WHEN "v" : startv% += updisplay%
  6705. incre$ = INKEY$(vertscroll%)
  6706. IF incre$ <> "" THEN
  6707. CASE incre$ OF
  6708. WHEN "V","v" :
  6709. IF screenmovesby% = 10 THEN startv%+=9 ELSE startv%+=2
  6710. WHEN "0" : startv%+=49
  6711. OTHERWISE startv% += EVAL(incre$)-1
  6712. ENDCASE
  6713. ENDIF
  6714. IF startv% > (numvoices%-lastcount%) THEN startv%= numvoices%-lastcount%
  6715. PROCdisplay
  6716. WHEN "6" :
  6717. startv% -= updisplay%
  6718. decre$ = INKEY$(vertscroll%)
  6719. IF decre$ <> "" THEN
  6720. CASE decre$ OF
  6721. WHEN "6" :
  6722. IF screenmovesby% = 10 THEN startv%-=9 ELSE startv%-=2
  6723. WHEN "0" : startv%-=49
  6724. OTHERWISE startv% -= EVAL(decre$)-1
  6725. ENDCASE
  6726. ENDIF
  6727. IF startv% < 1 THEN startv% = 1
  6728. PROCdisplay
  6729. WHEN "." : startbar% += 1
  6730. incre$ = INKEY$(horizscroll%)
  6731. IF incre$ <> "" THEN
  6732. IF incre$ = ">" OR incre$ = "." THEN startbar% += numbars%-1 ELSE startbar% += EVAL(incre$)-1
  6733. ENDIF
  6734. requestedend% = startbar% + numbars%
  6735. IF requestedend% > nobars% THEN startbar% -= (requestedend%-nobars%)
  6736. PROCdisplay
  6737. WHEN "," : startbar% -= 1
  6738. decre$ = INKEY$(horizscroll%)
  6739. IF decre$ <> "" THEN
  6740. IF decre$ = "<" OR decre$ = "," THEN startbar% -= numbars%-1 ELSE startbar% -= EVAL(decre$)-1
  6741. ENDIF
  6742. IF startbar%<1 THEN startbar% = 1
  6743. PROCdisplay
  6744. WHEN "V" : ON : PROCwindow(20,69,60,55)
  6745. IF namestaves$ = "nameone" THEN PROCnamestaves ELSE PROCdeletenames
  6746. PROCdisplay
  6747. WHEN "b" :
  6748. PROCwindow(20,57,34,55) : ON : INPUT'" Go to bar "startbar%
  6749. requestedend% = startbar% + numbars%
  6750. IF requestedend% > nobars% THEN startbar% -= (requestedend% - nobars%)
  6751. PROCdisplay
  6752. WHEN "s" :
  6753. CASE sequalssection$ OF
  6754. WHEN "y" :
  6755. PROCwindow(20,17,38,15) : ON : INPUT'" Go to section "section$
  6756. count% = 0 : found$ = "n"
  6757. REPEAT
  6758. count% += 1
  6759. IF remarks$(count%,0) = "SECTION "+section$ OR remarks$(count%,1) = "SECTION "+section$ THEN
  6760. startbar% = count% : found$ = "y"
  6761. ENDIF
  6762. UNTIL found$ = "y" OR count% > nobars%
  6763. PROCdisplay
  6764. WHEN "n" :
  6765. copysuccessively$ = "y" : PROCcopygroupofnotes
  6766. ENDCASE : REM sequalussection
  6767. WHEN "d" : PROCwindow(20,58,44,55) : ON
  6768. INPUT'" Display how many bars? "numbars%
  6769. requestedend% = startbar% + numbars%
  6770. IF requestedend% > nobars% THEN startbar% -= (requestedend%-nobars%)
  6771. IF startbar% < 1 THEN
  6772. startbar% = 1 : numbars% = nobars%-1
  6773. ENDIF
  6774. PROCdisplay
  6775. WHEN "=" : numbars% = numbars%*2
  6776. requestedend% = startbar% + numbars%
  6777. IF requestedend% > nobars% THEN startbar% -= (requestedend%-nobars%)
  6778. IF startbar% < 1 THEN
  6779. startbar% = 1 : numbars% = nobars%-1
  6780. ENDIF
  6781. PROCdisplay
  6782. WHEN "q" :
  6783. PROCquickdisplay
  6784. WHEN "w" :
  6785. CASE toggle$ OF
  6786. WHEN "prevquick" : toggle$ = "orig"
  6787. WHEN "quick" : toggle$ = "prevquick"
  6788. WHEN "orig" : toggle$ = "quick"
  6789. ENDCASE
  6790. CASE toggle$ OF
  6791. WHEN "prevquick" :
  6792. numvoices% = prequicknum%
  6793. FOR count% = 1 TO numvoices%
  6794. displayvoices%(count%) = prequickdisplay%(count%)
  6795. NEXT
  6796. startv% = prequickstart%
  6797. WHEN "quick" :
  6798. numvoices% = quicknum%
  6799. FOR count% = 1 TO numvoices%
  6800. displayvoices%(count%) = quickdisplay%(count%)
  6801. NEXT
  6802. startv% = quickstart%
  6803. WHEN "orig" :
  6804. numvoices% = holdnum%
  6805. FOR count% = 1 TO numvoices%
  6806. displayvoices%(count%) = holddisplay%(count%)
  6807. NEXT
  6808. startv% = holdstart%
  6809. ENDCASE
  6810. PROCdisplay
  6811. WHEN "p" :
  6812. play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
  6813. endbar% = nobars% : nvoices% = quickplay%
  6814. FOR count% = 1 TO quickplay%
  6815. playvoices%(count%) = displayvoices%(startv%+count%-1)
  6816. NEXT
  6817. PROCplay
  6818. WHEN ";" :
  6819. play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
  6820. endbar% = nobars% : nvoices% = 1
  6821. playvoices%(1) = displayvoices%(startv%+1)
  6822. PROCplay
  6823. WHEN "/" :
  6824. play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
  6825. endbar% = nobars% : nvoices% = 1
  6826. playvoices%(1) = displayvoices%(startv%+2)
  6827. PROCplay
  6828. WHEN "P" :
  6829. play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
  6830. endbar% = startbar%+numbars%-1 : nvoices% = quickplay%
  6831. FOR count% = 1 TO quickplay%
  6832. playvoices%(count%) = displayvoices%(startv%+count%-1)
  6833. NEXT
  6834. PROCplay
  6835. WHEN ":" :
  6836. play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
  6837. endbar% = startbar%+numbars%-1 : nvoices% = 1
  6838. playvoices%(1) = displayvoices%(startv%+1)
  6839. PROCplay
  6840. WHEN "?" :
  6841. play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
  6842. endbar% = startbar%+numbars%-1 : nvoices% = 1
  6843. playvoices%(1) = displayvoices%(startv%+2)
  6844. PROCplay
  6845. WHEN "z" : PROCcopyonenote
  6846. WHEN "x" : PROCcopygroupofnotes
  6847. WHEN "-" :
  6848. IF numbars% > 1 THEN numbars% = numbars%/2
  6849. PROCdisplay
  6850. WHEN "t" : funcinput$ = "durat" : PROCdisplay
  6851. WHEN "e" : funcinput$ = "points" : PROCdisplay
  6852. WHEN "f" : funcinput$ = "displayed" : PROCdisplay
  6853. :
  6854. WHEN "1" :
  6855. IF setalong$ = "y" THEN along% = 0 : PROCpostdisplay
  6856. IF setalong$ = "n" THEN numvoices% = 1 : numvoicesgiven$ = "y" : PROCquickdisplay
  6857. IF setalong$ = "playnovoices" THEN quickplay% = 1 : PROCdisplay
  6858. WHEN "2" :
  6859. IF setalong$ = "y" THEN along% = 1 : PROCpostdisplay
  6860. IF setalong$ = "n" THEN numvoices% = 2 : numvoicesgiven$ = "y" : PROCquickdisplay
  6861. IF setalong$ = "playnovoices" THEN quickplay% = 2 : PROCdisplay
  6862. WHEN "3" :
  6863. IF setalong$ = "y" THEN along% = 2 : PROCpostdisplay
  6864. IF setalong$ = "n" THEN numvoices% = 3 : numvoicesgiven$ = "y" : PROCquickdisplay
  6865. IF setalong$ = "playnovoices" THEN quickplay% = 3 : PROCdisplay
  6866. WHEN "4" :
  6867. IF setalong$ = "y" THEN along% = 3 : PROCpostdisplay
  6868. IF setalong$ = "n" THEN numvoices% = 4 : numvoicesgiven$ = "y" : PROCquickdisplay
  6869. IF setalong$ = "playnovoices" THEN quickplay% = 4 : PROCdisplay
  6870. WHEN "5" :
  6871. IF setalong$ = "y" THEN along% = 4 : PROCpostdisplay
  6872. IF setalong$ = "n" THEN numvoices% = 5 : numvoicesgiven$ = "y" : PROCquickdisplay
  6873. IF setalong$ = "playnovoices" THEN quickplay% = 5 : PROCdisplay
  6874. WHEN "7" :
  6875. IF setalong$ = "y" THEN along% = 6 : PROCpostdisplay
  6876. IF setalong$ = "n" THEN numvoices% = 7 : numvoicesgiven$ = "y" : PROCquickdisplay
  6877. IF setalong$ = "playnovoices" THEN quickplay% = 7 : PROCdisplay
  6878. WHEN "8" :
  6879. IF setalong$ = "y" THEN along% = 7 : PROCpostdisplay
  6880. IF setalong$ = "n" THEN numvoices% = 8 : numvoicesgiven$ = "y" : PROCquickdisplay
  6881. IF setalong$ = "playnovoices" THEN quickplay% = 8 : PROCdisplay
  6882. WHEN "9" :
  6883. IF setalong$ = "y" THEN along% = 8 : PROCpostdisplay
  6884. IF setalong$ = "n" THEN numvoices% = 9 : numvoicesgiven$ = "y" : PROCquickdisplay
  6885. IF setalong$ = "playnovoices" THEN
  6886. PROCwindow(20,69,60,55)
  6887. PRINT'" The maximum number of voices "
  6888. PRINT " that can be played is 8 "
  6889. PRINT'" (press a key to continue) "
  6890. CASE GET$ OF
  6891. OTHERWSE PROCdisplay
  6892. ENDCASE
  6893. ENDIF
  6894. WHEN "]" :
  6895. IF squarebracket$ = "remarks" THEN
  6896. count% = startbar%-1
  6897. REPEAT
  6898. count%+=1
  6899. IF remarks$(count%,0) <> "" THEN itt% = count%
  6900. UNTIL remarks$(count%,0) <> ""
  6901. remarks$(itt%+1,0) = remarks$(itt%,0)
  6902. remarks$(itt%,0) = ""
  6903. ELSE
  6904. addten$ = "y"
  6905. ENDIF
  6906. PROCdisplay
  6907. WHEN "}" :
  6908. count% = startbar%-1
  6909. REPEAT
  6910. count%+=1
  6911. IF remarks$(count%,0) <> "" THEN itt% = count%
  6912. UNTIL remarks$(count%,0) <> ""
  6913. remarks$(itt%+10,0) = remarks$(itt%,0)
  6914. remarks$(itt%,0) = ""
  6915. PROCdisplay
  6916. WHEN "[" :
  6917. IF squarebracket$ = "remarks" THEN
  6918. count% = startbar%-1
  6919. REPEAT
  6920. count%+=1
  6921. IF remarks$(count%,0) <> "" THEN itt% = count%
  6922. UNTIL remarks$(count%,0) <> ""
  6923. remarks$(itt%-1,0) = remarks$(itt%,0)
  6924. remarks$(itt%,0) = ""
  6925. ELSE
  6926. addten$ = "n"
  6927. ENDIF
  6928. PROCdisplay
  6929. WHEN "{" :
  6930. count% = startbar%-1
  6931. REPEAT
  6932. count%+=1
  6933. IF remarks$(count%,0) <> "" THEN itt% = count%
  6934. UNTIL remarks$(count%,0) <> ""
  6935. remarks$(itt%-10,0) = remarks$(itt%,0)
  6936. remarks$(itt%,0) = ""
  6937. PROCdisplay
  6938. WHEN "#" :
  6939. IF squarebracket$ = "remarks" THEN
  6940. count% = startbar%-1
  6941. REPEAT
  6942. count%+=1
  6943. IF remarks$(count%,1) <> "" THEN itt% = count%
  6944. UNTIL remarks$(count%,1) <> ""
  6945. remarks$(itt%+1,1) = remarks$(itt%,1)
  6946. remarks$(itt%,1) = ""
  6947. ENDIF
  6948. PROCdisplay
  6949. WHEN "'" :
  6950. IF squarebracket$ = "remarks" THEN
  6951. count% = startbar%-1
  6952. REPEAT
  6953. count%+=1
  6954. IF remarks$(count%,1) <> "" THEN itt% = count%
  6955. UNTIL remarks$(count%,1) <> ""
  6956. remarks$(itt%-1,1) = remarks$(itt%,1)
  6957. remarks$(itt%,1) = ""
  6958. ELSE
  6959. addten$ = "twenty"
  6960. ENDIF
  6961. PROCdisplay
  6962. WHEN "L" : slavemethod$ = "random" : quickslave$ = "y" : PROCslave
  6963. WHEN "Q" : voix% = 1 : son% = 0 : PROCedit
  6964. WHEN "W" : voix% = 1 : son% = 1 : PROCedit
  6965. WHEN "E" : voix% = 1 : son% = 2 : PROCedit
  6966. WHEN "R" : voix% = 1 : son% = 3 : PROCedit
  6967. WHEN "T" : voix% = 1 : son% = 4 : PROCedit
  6968. WHEN "A" : voix% = 2 : son% = 0 : PROCedit
  6969. WHEN "S" : voix% = 2 : son% = 1 : PROCedit
  6970. WHEN "D" : voix% = 2 : son% = 2 : PROCedit
  6971. WHEN "F" : voix% = 2 : son% = 3 : PROCedit
  6972. WHEN "G" : voix% = 2 : son% = 4 : PROCedit
  6973. WHEN "H" : voix% = 2 : son% = 5 : PROCedit
  6974. WHEN "Z" : voix% = 3 : son% = 0 : PROCedit
  6975. WHEN "X" : voix% = 3 : son% = 1 : PROCedit
  6976. WHEN "C" : voix% = 3 : son% = 2 : PROCedit
  6977. WHEN "V" : voix% = 3 : son% = 3 : PROCedit
  6978. WHEN "B" : voix% = 3 : son% = 4 : PROCedit
  6979. WHEN "N" : voix% = 3 : son% = 5 : PROCedit
  6980. WHEN ">" :
  6981. voice% = displayvoices%(voix%+(startv%-1))-1
  6982. CASE editwhat$ OF
  6983. WHEN "1stenvelope" :
  6984. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 100000
  6985. WHEN "2ndenvelope" :
  6986. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 10000000
  6987. WHEN "1stamplitude" :
  6988. array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) + 1
  6989. IF array%(holdstartcell%(voice%)+son%,1,voice%)MOD10 = 9 THEN
  6990. array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) - 9
  6991. ENDIF
  6992. WHEN "2ndamplitude" :
  6993. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 100
  6994. IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^2)MOD10 = 9 THEN
  6995. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 900
  6996. ENDIF
  6997. WHEN "3rdamplitude" :
  6998. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 1000
  6999. IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^3)MOD10 = 9 THEN
  7000. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 9000
  7001. ENDIF
  7002. WHEN "4thamplitude" :
  7003. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 10000
  7004. IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^4)MOD10 = 9 THEN
  7005. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 90000
  7006. ENDIF
  7007. WHEN "movetwo" :
  7008. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 60000
  7009. IF (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3 > 900 THEN
  7010. number% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
  7011. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - (number%*1000)
  7012. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 1000000
  7013. ENDIF
  7014. array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) + 60000
  7015. IF (array%(holdstartcell%(voice%)+son%+1,0,voice%)DIV10^3)MOD10^3 > 900 THEN
  7016. number% = (array%(holdstartcell%(voice%)+son%+1,0,voice%)DIV10^3)MOD10^3
  7017. array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) - (number%*1000)
  7018. array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) + 1000000
  7019. ENDIF
  7020. WHEN "move&drag" :
  7021. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 60000
  7022. IF (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3 > 900 THEN
  7023. number% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
  7024. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - (number%*1000)
  7025. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 1000000
  7026. ENDIF
  7027. bar1% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^6)
  7028. beat1% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
  7029. position1% = (bar1%*960) + beat1%
  7030. bar2% = (array%(holdstartcell%(voice%)+son%-1,0,voice%)DIV10^6)
  7031. beat2% = (array%(holdstartcell%(voice%)+son%-1,0,voice%)DIV10^3)MOD10^3
  7032. position2% = (bar2%*960) + beat2%
  7033. dur% = position1% - position2%
  7034. PROCconvertdur
  7035. number% = (array%(holdstartcell%(voice%)+son%-1,1,voice%)DIV10)MOD10^3
  7036. array%(holdstartcell%(voice%)+son%-1,1,voice%) = array%(holdstartcell%(voice%)+son%-1,1,voice%) - (number%*10)
  7037. array%(holdstartcell%(voice%)+son%-1,1,voice%) = array%(holdstartcell%(voice%)+son%-1,1,voice%) + (dur%*10)
  7038. WHEN "duration" :
  7039. array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) + 10
  7040. IF (array%(holdstartcell%(voice%)+son%,1,voice%)DIV10)MOD10^3 > 998 THEN (array%(holdstartcell%(voice%)+son%,1,voice%)DIV10)MOD10^3 = 998
  7041. ENDCASE
  7042. PROCdisplay
  7043. WHEN "<" :
  7044. voice% = displayvoices%(voix%+(startv%-1))-1
  7045. CASE editwhat$ OF
  7046. WHEN "1stenvelope" :
  7047. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 100000
  7048. WHEN "2ndenvelope" :
  7049. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 10000000
  7050. WHEN "1stamplitude" :
  7051. array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) - 1
  7052. IF array%(holdstartcell%(voice%)+son%,1,voice%)MOD10 = 9 THEN
  7053. array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) + 9
  7054. ENDIF
  7055. WHEN "2ndamplitude" :
  7056. IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^2)MOD10 = 0 THEN
  7057. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 800
  7058. ELSEarray%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 100
  7059. ENDIF
  7060. WHEN "3rdamplitude" :
  7061. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 1000
  7062. IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^3)MOD10 = 9 THEN
  7063. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 9000
  7064. ENDIF
  7065. WHEN "4thamplitude" :
  7066. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 10000
  7067. IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^4)MOD10 = 9 THEN
  7068. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 90000
  7069. ENDIF
  7070. WHEN "movetwo" :
  7071. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - 60000
  7072. IF (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3 > 900 THEN
  7073. number% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
  7074. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - (number%*1000)
  7075. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 900000
  7076. ENDIF
  7077. array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) - 60000
  7078. IF (array%(holdstartcell%(voice%)+son%+1,0,voice%)DIV10^3)MOD10^3 > 900 THEN
  7079. number% = (array%(holdstartcell%(voice%)+son%+1,0,voice%)DIV10^3)MOD10^3
  7080. array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) - (number%*1000)
  7081. array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) + 900000
  7082. ENDIF
  7083. WHEN "move&drag" :
  7084. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - 60000
  7085. IF (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3 > 900 THEN
  7086. number% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
  7087. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - (number%*1000)
  7088. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 900000
  7089. ENDIF
  7090. bar1% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^6)
  7091. beat1% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
  7092. position1% = (bar1%*960) + beat1%
  7093. bar2% = (array%(holdstartcell%(voice%)+son%-1,0,voice%)DIV10^6)
  7094. beat2% = (array%(holdstartcell%(voice%)+son%-1,0,voice%)DIV10^3)MOD10^3
  7095. position2% = (bar2%*960) + beat2%
  7096. dur% = position1% - position2%
  7097. PROCconvertdur
  7098. number% = (array%(holdstartcell%(voice%)+son%-1,1,voice%)DIV10)MOD10^3
  7099. array%(holdstartcell%(voice%)+son%-1,1,voice%) = array%(holdstartcell%(voice%)+son%-1,1,voice%) - (number%*10)
  7100. array%(holdstartcell%(voice%)+son%-1,1,voice%) = array%(holdstartcell%(voice%)+son%-1,1,voice%) + (dur%*10)
  7101. WHEN "duration" :
  7102. array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) - 10
  7103. ENDCASE
  7104. PROCdisplay
  7105. :
  7106. OTHERWISE PROCawait
  7107. :
  7108. ENDCASE
  7109. ENDPROC
  7110. :
  7111. REM**********************************************
  7112. :
  7113. DEF PROCrhythmdisplay
  7114. :
  7115. IF longscore$ = "n" THEN finalbar% = (firstbar%+((numbars%/2)))-1 ELSE finalbar% = (firstbar%+(numbars%))-1
  7116. FOR bar% = firstbar% TO finalbar%
  7117. :
  7118. rgroup%(1) = disarray%(bar%,0,voice%)DIV10^3
  7119. rgroup%(2) = ((disarray%(bar%,0,voice%)MOD10^3)*10^3)+(disarray%(bar%,1,voice%)DIV10^6)
  7120. rgroup%(3) = disarray%(bar%,1,voice%)MOD10^6
  7121. rgroup%(4) = disarray%(bar%,2,voice%)DIV10^3
  7122. rgroup%(5) = disarray%(bar%,3,voice%)
  7123. :
  7124. FOR group% = 1 TO 5
  7125. :
  7126. IF rgroup%(group%) <> 0 THEN
  7127. IF group% < 5 THEN
  7128. beat% = rgroup%(group%)DIV10^4
  7129. addition% = (960*factor)*(bar%-firstbar%)
  7130. leftend% = (beat%*beatfactor%)
  7131. grouplength% = ((rgroup%(group%)MOD10^4)DIV10^2)*beatfactor%
  7132. divs% = (rgroup%(group%)MOD10^2)
  7133. rightend% = leftend%+((grouplength%/divs%)*(divs%-1))
  7134. ELSE
  7135. beat% = rgroup%(group%)DIV10^7
  7136. addition% = (960*factor)*(bar%-firstbar%)
  7137. leftend% = (beat%*beatfactor%)
  7138. grouplength% = ((rgroup%(group%)MOD10^7)DIV10^4)*beatfactor%
  7139. divs% = (rgroup%(group%)MOD10^4)
  7140. rightend% = leftend%+((grouplength%/divs%)*(divs%-1))
  7141. ENDIF
  7142. :
  7143. value = divs%/(grouplength%/beatfactor%)
  7144. IF value >= 1 AND value < 2 THEN change% = 0
  7145. IF value >= 2 AND value < 4 THEN change% = 1
  7146. IF value >= 4 AND value < 8 THEN change% = 2
  7147. IF value >= 8 AND value < 16 THEN change% = 3
  7148. IF value >= 0.5 AND value < 1 THEN change% = -1
  7149. IF value >= 0.25 AND value < 0.5 THEN change% = -2
  7150. IF value >= 0.125 AND value < 0.25 THEN change% = -3
  7151. IF value >= 0.0625 AND value < 0.125 THEN change% = -4
  7152. IF value >= 0.03125 AND value < 0.0625 THEN change% = -5
  7153. numbeams% = beams% + change%
  7154. IF numbeams% < 0 THEN numbeams% = 0
  7155. :
  7156. IF longscore$ = "n" THEN v% = 938 + shortbeamposn%(voice%) ELSE v% = actbeamposn%(count%-startv%)
  7157. IF longscore$ = "n" THEN
  7158. IF shortstemdir$(voice%) = "D" THEN x% = -12 ELSE x% = 12
  7159. ELSE IF longstemdir$(voice%) = "D" THEN x% = -12 ELSE x% = 12
  7160. ENDIF
  7161. IF longscore$ = "n" THEN inc% = 80 ELSE inc% = 120
  7162. :
  7163. IF numbeams% > 0 THEN
  7164. :
  7165. left% = (leftend%*factor)+inc%+addition%
  7166. right% = (rightend%*factor)+inc%+addition%
  7167. gap% = (right% - left%)/(divs%-1)
  7168. FOR times% = 1 TO numbeams%
  7169. pt1% = left%
  7170. space = grouplength%/divs%
  7171. pt2% = ((leftend%*factor)+(inc%+2)+((space*factor)))+addition%
  7172. ct% = -1
  7173. power% = (5-times%)
  7174. IF power% < 1 THEN power% = 1
  7175. n% = 2^power%
  7176. WHILE pt2%<= (right%+10)
  7177. ct% += 1
  7178. IF ((ct%+1)/n%*10)MOD10 <> 0 OR times% = 1 THEN
  7179. LINE pt1%,((v%-(524*(system%-1)))-(x%*(times%-1))),pt2%,((v%-(524*(system%-1)))-(x%*(times%-1)))
  7180. LINE pt1%,(((v%-2)-(524*(system%-1)))-(x%*(times%-1))),pt2%,(((v%-2)-(524*(system%-1)))-(x%*(times%-1)))
  7181. LINE pt1%,(((v%-4)-(524*(system%-1)))-(x%*(times%-1))),pt2%,(((v%-4)-(524*(system%-1)))-(x%*(times%-1)))
  7182. REM for beams crossing systems
  7183. IF right% > 1600 THEN crossing$ = "y" ELSE crossing$ = "n"
  7184. IF crossing$ = "y" AND longscore$ = "n" AND system% = 1 THEN
  7185. LINE pt1%-1600+inc%,((v%-(524*(system%-1)))-(x%*(times%-1)))-524,pt2%-1600+inc%,((v%-(524*(system%-1)))-(x%*(times%-1)))-524
  7186. LINE pt1%-1600+inc%,(((v%-2)-(524*(system%-1)))-(x%*(times%-1)))-524,pt2%-1600+inc%,(((v%-2)-(524*(system%-1)))-(x%*(times%-1)))-524
  7187. LINE pt1%-1600+inc%,(((v%-4)-(524*(system%-1)))-(x%*(times%-1)))-524,pt2%-1600+inc%,(((v%-4)-(524*(system%-1)))-(x%*(times%-1)))-524
  7188. ENDIF
  7189. ENDIF
  7190. pt1% = pt2%
  7191. pt2% = ((leftend%*factor)+(inc%+2)+((ct%+2)*(space*factor)))+addition%
  7192. ENDWHILE
  7193. NEXT
  7194. ENDIF
  7195. :
  7196. space = grouplength%/divs%
  7197. IF longscore$ = "y" THEN
  7198. IF longstemdir$(voice%) = "U" THEN dir% = 1 ELSE dir% = -1
  7199. ELSE
  7200. IF shortstemdir$(voice%) = "U" THEN dir% = 1 ELSE dir% = -1
  7201. ENDIF
  7202. :
  7203. FOR counter% = 0 TO (divs%-1)
  7204. REM grouping% adds to length of stems to group in 2's, 4's etc
  7205. grouping% = 0
  7206. CASE shortstemdir$(voice%) OF
  7207. WHEN "D" :
  7208. IF (counter%/2*10)MOD10 = 0 THEN grouping% = -20
  7209. IF (counter%/4*10)MOD10 = 0 THEN grouping% = -40
  7210. IF (counter%/8*10)MOD10 = 0 THEN grouping% = -60
  7211. OTHERWISE
  7212. IF (counter%/2*10)MOD10 = 0 THEN grouping% = 20
  7213. IF (counter%/4*10)MOD10 = 0 THEN grouping% = 40
  7214. IF (counter%/8*10)MOD10 = 0 THEN grouping% = 60
  7215. ENDCASE
  7216. LINE ((leftend%*factor)+(inc%+2)+(counter%*(space*factor)))+addition%,(((v%)-(524*(system%-1)))),((leftend%*factor)+(inc%+2)+(counter%*(space*factor)))+addition%,((((v%)-(524*(system%-1))))-(((numbeams%*12)+32)*dir%)-grouping%)
  7217. NEXT
  7218. REM routine for groups crossing systems
  7219. IF system% = 1 AND longscore$ = "n" AND crossing$ = "y" THEN
  7220. FOR counter% = 0 TO (divs%-1)
  7221. LINE (((leftend%*factor)+(inc%+2)+(counter%*(space*factor)))+addition%)-1600+inc%,(((v%)-(524*(system%-1))))-524,(((leftend%*factor)+(inc%+2)+(counter%*(space*factor)))+addition%)-1600+inc%,(((v%)-(524*(system%-1))))-(((numbeams%*12)+32)*dir%)-524
  7222. :
  7223. NEXT
  7224. ENDIF
  7225. :
  7226. hposition% = (leftend%*factor)+inc%+addition%+(grouplength%/divs%*(divs%-1)/2*factor)
  7227. vposition% =((v%+32)-(524*(system%-1)))
  7228. REM routine for groups crossing systems
  7229. IF hposition% > 2112 THEN
  7230. hposition% = hposition% - 2062
  7231. vposition% = vposition% - 524
  7232. ENDIF
  7233. IF longscore$ = "y" THEN
  7234. IF longstemdir$(voice%) = "D" THEN vposition% -= 50
  7235. ELSE
  7236. IF shortstemdir$(voice%) ="D" THEN vposition% -= 50
  7237. ENDIF
  7238. IF longstemdir$(voice%) = "U" THEN vposition% -= 6
  7239. IF shortstemdir$(voice%) ="U" THEN vposition% -= 6
  7240. :
  7241. grouplength% = grouplength%/beatfactor%
  7242. lownum% = grouplength%
  7243. IF change% = 0 THEN decimal% = 0
  7244. IF change% = 1 THEN lownum% = lownum%*2 : decimal% = 0
  7245. IF change% = 2 THEN lownum% = lownum%*4 : decimal% = 0
  7246. IF change% = 3 THEN lownum% = lownum%*8 : decimal% = 0
  7247. IF change% = -1 THEN lownum = lownum%/2 : decimal% = (lownum*10)MOD10 : lownum% = lownum*1
  7248. IF change% = -2 THEN lownum = lownum%/4 : decimal% = (lownum*10)MOD10 : lownum% = lownum*1
  7249. IF change% = -3 THEN lownum = lownum%/8 : decimal% = (lownum*10)MOD10 : lownum% = lownum*1
  7250. IF change% = -4 THEN lownum = lownum%/16 :decimal% = (lownum*10)MOD10 : lownum% = lownum*1
  7251. IF change% = -5 THEN lownum = lownum%/32 :decimal% = (lownum*10)MOD10 : lownum% = lownum*1
  7252. :
  7253. printname$ = "n"
  7254. WHILE ((divs%/2)*10)MOD10 = 0 AND ((lownum%/2)*10)MOD10 = 0 AND decimal% = 0
  7255. divs% = divs%/2 : lownum% = lownum%/2 : change% -= 1 : printname$ = "y"
  7256. ENDWHILE
  7257. IF change% < -2 THEN printname$ = "y"
  7258. :
  7259. VDU 23,128,32,32,32,32,32,32,32,32
  7260. VDU 23,129,48,40,36,34,32,32,32,32
  7261. VDU 23,130,48,40,36,50,40,36,34,32
  7262. VDU 23,131,36,34,32,32,32,32,32,32
  7263. VDU 23,132,48,40,36,50,40,36,50,40
  7264. VDU 23,133,36,50,40,36,50,32,32,32
  7265. VDU 23,134,36,50,40,36,50,40,36,34
  7266. VDU 23,135,1,1,1,29,63,63,62,28
  7267. VDU 23,136,0,0,1,1,1,1,1,1
  7268. VDU 23,137,1,1,1,29,35,35,34,28
  7269. VDU 23,138,0,0,0,28,34,34,34,28
  7270. :
  7271. MOVE hposition%,vposition%
  7272. IF divs% < 10 THEN VDU 8
  7273. IF divs% >= 10 THEN
  7274. VDU 8 : VDU 8
  7275. ENDIF
  7276. :
  7277. IF decimal% = 0 THEN
  7278. IF divs% <> lownum% THEN
  7279. IF printname$ = "y" THEN
  7280. PRINT ,;divs%;":";lownum%;
  7281. CASE change% OF
  7282. WHEN 3 : PRINT"//////"
  7283. WHEN 2 : PRINT CHR$(134) : MOVE hposition%,vposition%+16
  7284. IF divs% < 10 THEN VDU 8
  7285. IF divs% >= 10 THEN
  7286. VDU 8 : VDU 8
  7287. ENDIF
  7288. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7289. PRINT ,;divs%;":";lownum%;
  7290. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7291. PRINT CHR$(132)
  7292. WHEN 1 : PRINT CHR$(133) : MOVE hposition%,vposition%+16
  7293. IF divs% < 10 THEN VDU 8
  7294. IF divs% >= 10 THEN
  7295. VDU 8 : VDU 8
  7296. ENDIF
  7297. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7298. PRINT ,;divs%;":";lownum%;
  7299. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7300. PRINT CHR$(132)
  7301. WHEN 0 : PRINT CHR$(131) : MOVE hposition%,vposition%+16
  7302. IF divs% < 10 THEN VDU 8
  7303. IF divs% >= 10 THEN
  7304. VDU 8 : VDU 8
  7305. ENDIF
  7306. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7307. PRINT ,;divs%;":";lownum%;
  7308. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7309. PRINT CHR$(132)
  7310. WHEN -1 : PRINT CHR$(128) : MOVE hposition%,vposition%+16
  7311. IF divs% < 10 THEN VDU 8
  7312. IF divs% >= 10 THEN
  7313. VDU 8 : VDU 8
  7314. ENDIF
  7315. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7316. PRINT ,;divs%;":";lownum%;
  7317. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7318. PRINT CHR$(130)
  7319. WHEN -2 : PRINT CHR$(128) : MOVE hposition%,vposition%+16
  7320. IF divs% < 10 THEN VDU 8
  7321. IF divs% >= 10 THEN
  7322. VDU 8 : VDU 8
  7323. ENDIF
  7324. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7325. PRINT ,;divs%;":";lownum%;
  7326. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7327. PRINT CHR$(129)
  7328. WHEN -3 : PRINT CHR$(135) : MOVE hposition%,vposition%+16
  7329. IF divs% < 10 THEN VDU 8
  7330. IF divs% >= 10 THEN
  7331. VDU 8 : VDU 8
  7332. ENDIF
  7333. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7334. PRINT ,;divs%;":";lownum%;
  7335. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7336. PRINT CHR$(136)
  7337. WHEN -4 : PRINT CHR$(137) : MOVE hposition%,vposition%+16
  7338. IF divs% < 10 THEN VDU 8
  7339. IF divs% >= 10 THEN
  7340. VDU 8 : VDU 8
  7341. ENDIF
  7342. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7343. PRINT ,;divs%;":";lownum%;
  7344. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7345. PRINT CHR$(136)
  7346. WHEN -5 : PRINT CHR$(138)
  7347. OTHERWISE
  7348. ENDCASE
  7349. ELSE PRINT ,;divs%;":";lownum%
  7350. ENDIF
  7351. ENDIF
  7352. ELSE PRINT ,;divs%;":";lownum%;".";decimal%;
  7353. CASE change% OF
  7354. WHEN -1 : PRINT CHR$(128) : MOVE hposition%,vposition%+16
  7355. IF divs% < 10 THEN VDU 8
  7356. IF divs% >= 10 THEN
  7357. VDU 8 : VDU 8
  7358. ENDIF
  7359. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7360. PRINT ,;divs%;":";lownum%;".";decimal%;
  7361. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7362. PRINT CHR$(130)
  7363. WHEN -2 : PRINT CHR$(128) : MOVE hposition%,vposition%+16
  7364. IF divs% < 10 THEN VDU 8
  7365. IF divs% >= 10 THEN
  7366. VDU 8 : VDU 8
  7367. ENDIF
  7368. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7369. PRINT ,;divs%;":";lownum%;".";decimal%;
  7370. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7371. PRINT CHR$(129)
  7372. WHEN -3 : PRINT CHR$(135) : MOVE hposition%,vposition%+16
  7373. IF divs% < 10 THEN VDU 8
  7374. IF divs% >= 10 THEN
  7375. VDU 8 : VDU 8
  7376. ENDIF
  7377. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7378. PRINT ,;divs%;":";lownum%;".";decimal%;
  7379. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7380. PRINT CHR$(136)
  7381. WHEN -4 : PRINT CHR$(137) : MOVE hposition%,vposition%+16
  7382. IF divs% < 10 THEN VDU 8
  7383. IF divs% >= 10 THEN
  7384. VDU 8 : VDU 8
  7385. ENDIF
  7386. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7387. PRINT ,;divs%;":";lownum%;".";decimal%;
  7388. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7389. PRINT CHR$(136)
  7390. WHEN -5 : PRINT CHR$(138)
  7391. OTHERWISE
  7392. ENDCASE
  7393. ENDCASE
  7394. ENDIF
  7395. :
  7396. REM routine for groups crossing systems
  7397. IF system% = 1 AND longscore$ = "n" AND crossing$ = "y" THEN
  7398. MOVE hposition%-1600+inc%,vposition%-524
  7399. IF divs% < 10 THEN VDU 8
  7400. IF divs% >= 10 THEN
  7401. VDU 8 : VDU 8
  7402. ENDIF
  7403. :
  7404. IF decimal% = 0 THEN
  7405. IF divs% <> lownum% THEN
  7406. IF printname$ = "y" THEN
  7407. PRINT ,;divs%;":";lownum%;
  7408. CASE change% OF
  7409. WHEN 3 : PRINT"//////"
  7410. WHEN 2 : PRINT CHR$(134) : MOVE hposition%-1600+inc%,vposition%+16-524
  7411. IF divs% < 10 THEN VDU 8
  7412. IF divs% >= 10 THEN
  7413. VDU 8 : VDU 8
  7414. ENDIF
  7415. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7416. PRINT ,;divs%;":";lownum%;
  7417. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7418. PRINT CHR$(132)
  7419. WHEN 1 : PRINT CHR$(133) : MOVE hposition%-1600+inc%,vposition%+16-524
  7420. IF divs% < 10 THEN VDU 8
  7421. IF divs% >= 10 THEN
  7422. VDU 8 : VDU 8
  7423. ENDIF
  7424. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7425. PRINT ,;divs%;":";lownum%;
  7426. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7427. PRINT CHR$(132)
  7428. WHEN 0 : PRINT CHR$(131) : MOVE hposition%-1600+inc%,vposition%+16-524
  7429. IF divs% < 10 THEN VDU 8
  7430. IF divs% >= 10 THEN
  7431. VDU 8 : VDU 8
  7432. ENDIF
  7433. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7434. PRINT ,;divs%;":";lownum%;
  7435. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7436. PRINT CHR$(132)
  7437. WHEN -1 : PRINT CHR$(128) : MOVE hposition%-1600+inc%,vposition%+16-524
  7438. IF divs% < 10 THEN VDU 8
  7439. IF divs% >= 10 THEN
  7440. VDU 8 : VDU 8
  7441. ENDIF
  7442. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7443. PRINT ,;divs%;":";lownum%;
  7444. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7445. PRINT CHR$(130)
  7446. WHEN -2 : PRINT CHR$(128) : MOVE hposition%-1600+inc%,vposition%+16-524
  7447. IF divs% < 10 THEN VDU 8
  7448. IF divs% >= 10 THEN
  7449. VDU 8 : VDU 8
  7450. ENDIF
  7451. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7452. PRINT ,;divs%;":";lownum%;
  7453. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7454. PRINT CHR$(129)
  7455. WHEN -3 : PRINT CHR$(135) : MOVE hposition%-1600+inc%,vposition%+16-524
  7456. IF divs% < 10 THEN VDU 8
  7457. IF divs% >= 10 THEN
  7458. VDU 8 : VDU 8
  7459. ENDIF
  7460. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7461. PRINT ,;divs%;":";lownum%;
  7462. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7463. PRINT CHR$(136)
  7464. WHEN -4 : PRINT CHR$(137) : MOVE hposition%-1600+inc%,vposition%+16-524
  7465. IF divs% < 10 THEN VDU 8
  7466. IF divs% >= 10 THEN
  7467. VDU 8 : VDU 8
  7468. ENDIF
  7469. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7470. PRINT ,;divs%;":";lownum%;
  7471. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7472. PRINT CHR$(136)
  7473. WHEN -5 : PRINT CHR$(138)
  7474. OTHERWISE
  7475. ENDCASE
  7476. ELSE PRINT ,;divs%;":";lownum%
  7477. ENDIF
  7478. ENDIF
  7479. ELSE PRINT ,;divs%;":";lownum%;".";decimal%;
  7480. CASE change% OF
  7481. WHEN -1 : PRINT CHR$(128) : MOVE hposition%-1600+inc%,vposition%+16-524
  7482. IF divs% < 10 THEN VDU 8
  7483. IF divs% >= 10 THEN
  7484. VDU 8 : VDU 8
  7485. ENDIF
  7486. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7487. PRINT ,;divs%;":";lownum%;".";decimal%;
  7488. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7489. PRINT CHR$(130)
  7490. WHEN -2 : PRINT CHR$(128) : MOVE hposition%-1600+inc%,vposition%+16-524
  7491. IF divs% < 10 THEN VDU 8
  7492. IF divs% >= 10 THEN
  7493. VDU 8 : VDU 8
  7494. ENDIF
  7495. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7496. PRINT ,;divs%;":";lownum%;".";decimal%;
  7497. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7498. PRINT CHR$(129)
  7499. WHEN -3 : PRINT CHR$(135) : MOVE hposition%-1600,+inc%,vposition%+16-524
  7500. IF divs% < 10 THEN VDU 8
  7501. IF divs% >= 10 THEN
  7502. VDU 8 : VDU 8
  7503. ENDIF
  7504. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7505. PRINT ,;divs%;":";lownum%;".";decimal%;
  7506. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7507. PRINT CHR$(136)
  7508. WHEN -4 : PRINT CHR$(137) : MOVE hposition%-1600+inc%,vposition%+16-524
  7509. IF divs% < 10 THEN VDU 8
  7510. IF divs% >= 10 THEN
  7511. VDU 8 : VDU 8
  7512. ENDIF
  7513. IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
  7514. PRINT ,;divs%;":";lownum%;".";decimal%;
  7515. IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
  7516. PRINT CHR$(136)
  7517. WHEN -5 : PRINT CHR$(138)
  7518. OTHERWISE
  7519. ENDCASE
  7520. ENDCASE
  7521. ENDIF
  7522. ENDIF
  7523. :
  7524. ENDIF
  7525. NEXT
  7526. :
  7527. NEXT
  7528. :
  7529. ENDPROC
  7530. :
  7531. REM*******************************************************
  7532. :
  7533. DEF PROCdisplaysubmenu
  7534. :
  7535. PROCwindow(20,66,60,39)
  7536. CLS : OFF
  7537. PRINT'" Notehead sizes N"
  7538. PRINT " Longscore/Shortscore L"
  7539. PRINT " Stem lengths S"
  7540. PRINT " Beats positions/freq P"
  7541. PRINT " Beat numbers/diffs I"
  7542. PRINT " Beat numbers/diffs unit J"
  7543. PRINT " Dynamics positions F"
  7544. PRINT " Note number freq G"
  7545. PRINT " Bar numbers Z"
  7546. PRINT " Intervals settings Q"
  7547. PRINT " Remove: "
  7548. PRINT " staves, ledgers, clefs C"
  7549. PRINT " lower stave (shrt sc) U"
  7550. PRINT " barlines B"
  7551. PRINT " beats T"
  7552. PRINT " names, voice numbers V"
  7553. PRINT " accidentals A"
  7554. PRINT " stems, beams R"
  7555. PRINT " durations D"
  7556. PRINT " dynamics M"
  7557. PRINT " beat numbers (n,1st,y) O"
  7558. PRINT " notenumbers H"
  7559. PRINT " notenames E"
  7560. PRINT " intervals K"
  7561. PRINT " play screen renew Y"
  7562. PRINT " all except noteheads X"
  7563. :
  7564. CASE GET$ OF
  7565. WHEN "E","e" :
  7566. IF notenames$ = "y" THEN notenames$ = "n" ELSE notenames$ = "y"
  7567. WHEN "N","n" :
  7568. CLS
  7569. PRINT'" What size note-heads? (B/S/V) "
  7570. CASE GET$ OF
  7571. WHEN "B","b" : notehead$ = "big"
  7572. WHEN "S","s" : notehead$ = "small"
  7573. WHEN "V","v" : notehead$ = "vsmall"
  7574. ENDCASE
  7575. WHEN "L","l" :
  7576. IF longscore$ = "n" THEN longscore$ = "y" ELSE longscore$ = "n"
  7577. IF longscore$ = "n" THEN
  7578. startv1% = startv% : startv% =1
  7579. ELSE startv% = startv1%
  7580. ENDIF
  7581. WHEN "S","s" :
  7582. CLS
  7583. INPUT'" Which voice "voys%
  7584. voys% -= 1
  7585. PRINT'" stems to end how many"
  7586. PRINT" octaves from top"
  7587. INPUT" stave-line (0,1,-1 etc) "st
  7588. INPUT " stems up or down (U/D)"stemdir$
  7589. IF longscore$ = "n" THEN
  7590. shortbeamposn%(voys%) = st*56
  7591. IF shortbeamposn%(voys%) <= -112 THEN shortbeamposn%(voys%)-=48
  7592. shortstemdir$(voys%) = stemdir$
  7593. ENDIF
  7594. IF longscore$ = "y" THEN
  7595. longbeamposn%(voys%) = st*56
  7596. longstemdir$(voys%) = stemdir$
  7597. ENDIF
  7598. :
  7599. WHEN "P","p" :
  7600. CLS
  7601. PRINT'" Beats positions or frequecy (P/F)"
  7602. CASE GET$ OF
  7603. WHEN "P","p" :
  7604. INPUT'" Upper or lower beats (U/L)"whichset$
  7605. PRINT '" up or down by how many"
  7606. INPUT " stave-lines (1,-1 etc)"move%
  7607. IF whichset$ = "U" THEN
  7608. longbeatsupper% += (move%*16)
  7609. ELSE longbeatslower% += (move%*16)
  7610. ENDIF
  7611. OTHERWISE
  7612. PRINT'" Beats frequency doubled/halved (+/-) "
  7613. CASE GET$ OF
  7614. WHEN "+","=" : beatstep% = beatstep%/2
  7615. WHEN "_","-" : beatstep% = beatstep%*2
  7616. OTHERWISE
  7617. ENDCASE
  7618. :
  7619. ENDCASE
  7620. :
  7621. WHEN "Z","z" : CLS : INPUT'" Bar nos how often (1,2 etc) "barnosoften%
  7622. WHEN "Y","y" :
  7623. IF playnewscreen$ = "y" THEN playnewscreen$ = "n" ELSE playnewscreen$ = "y"
  7624. WHEN "I","i" :
  7625. IF beatnum_diff$ = "num" THEN beatnum_diff$ = "diff" ELSE beatnum_diff$ = "num"
  7626. WHEN "J","j" :
  7627. IF beatunits$ = "big" THEN beatunits$ = "small" ELSE beatunits$ = "big"
  7628. WHEN "C","c" :
  7629. IF staves$ = "y" THEN staves$ = "n" ELSE staves$ = "y"
  7630. WHEN "B","b" :
  7631. IF barlines$ = "y" THEN barlines$ = "n" ELSE barlines$ = "y"
  7632. WHEN "T","t" :
  7633. IF beats$ = "y" THEN beats$ = "n" ELSE beats$ = "y"
  7634. WHEN "U","u" :
  7635. IF lowerstave$ = "y" THEN lowerstave$ = "n" ELSE lowerstave$ = "y"
  7636. WHEN "V","v" :
  7637. IF names$ = "y" THEN names$ = "n" ELSE names$ = "y"
  7638. WHEN "A","a" :
  7639. IF accidentals$ = "y" THEN accidentals$ = "n" ELSE accidentals$ = "y"
  7640. WHEN "R","r" :
  7641. IF stems$ = "y" THEN stems$ = "n" ELSE stems$ = "y"
  7642. WHEN "D","d" :
  7643. IF durations$ = "y" THEN durations$ = "n" ELSE durations$ = "y"
  7644. WHEN "M","m" :
  7645. CASE amplitudes$ OF
  7646. WHEN "n" : amplitudes$ = "y"
  7647. WHEN "y" : amplitudes$ = "stepped"
  7648. WHEN "stepped" : amplitudes$ = "n"
  7649. ENDCASE
  7650. WHEN "O","o" :
  7651. CASE beatnumbers$ OF
  7652. WHEN "y" : beatnumbers$ = "n"
  7653. WHEN "n" : beatnumbers$ = "first"
  7654. WHEN "first" : beatnumbers$ = "y"
  7655. ENDCASE
  7656. WHEN "H","h" :
  7657. CASE notenumbers$ OF
  7658. WHEN "last" : notenumbers$ = "n"
  7659. WHEN "y" : notenumbers$ = "last"
  7660. WHEN "from1" : notenumbers$ = "y"
  7661. WHEN "n" : notenumbers$ = "from1"
  7662. ENDCASE
  7663. WHEN "F","f" :
  7664. CLS
  7665. INPUT'" Which voice "voys%
  7666. voys% -= 1
  7667. PRINT' " dynamics up/down by how many "
  7668. INPUT " stave-lines (1,-1 etc) "dy%
  7669. dy% = dy%*16
  7670. IF longscore$ = "y" THEN
  7671. longamppos%(voys%) += dy%
  7672. ELSE shortamppos%(voys%) += dy%
  7673. ENDIF
  7674. WHEN "G","g" :
  7675. CLS
  7676. PRINT'" Note numbers every 1/2/4/10 notes (0 = 10) "
  7677. CASE GET$ OF
  7678. WHEN "1" : nosevery% = 1
  7679. WHEN "2" : nosevery% = 2
  7680. WHEN "4" : nosevery% = 4
  7681. OTHERWISE nosevery% = 10
  7682. ENDCASE
  7683. INPUT' " starting at note number "startnos%
  7684. :
  7685. WHEN "Q","q" :
  7686. CLS
  7687. PRINT'" Set number/type of intervals displayed"
  7688. PRINT" or compound reduction point? (N/C)"
  7689. CASE GET$ OF
  7690. WHEN "N","n" :
  7691. PRINT'" Display intervals for how"
  7692. INPUT" many previous notes "numintervals%
  7693. PRINT'" Semitones, quartertones, "
  7694. PRINT" eighthtones or cents (S/Q/E/C) "
  7695. CASE GET$ OF
  7696. WHEN "S","s" : typeintervals$ = "s"
  7697. WHEN "Q","q" : typeintervals$ = "q"
  7698. WHEN "E","e" : typeintervals$ = "e"
  7699. WHEN "C","c" : typeintervals$ = "c"
  7700. ENDCASE
  7701. WHEN "C","c" :
  7702. PRINT'" Above which interval should"
  7703. PRINT" compounds be reduced for "
  7704. INPUT" the current interval type "compound%
  7705. CASE typeintervals$ OF
  7706. WHEN "s" : compoundpitch% = compound%
  7707. WHEN "q" : compoundquarter% = compound%
  7708. WHEN "e" : compoundeighth% = compound%
  7709. WHEN "c" : compoundcent% = compound%
  7710. ENDCASE
  7711. ENDCASE
  7712. WHEN "K","k" :
  7713. IF displayintervals$ = "y" THEN displayintervals$ = "n" ELSE displayintervals$ = "y"
  7714. WHEN "X","x" :
  7715. IF xoption$ = "y" THEN xoption$ = "n" ELSE xoption$ = "y"
  7716. IF xoption$ = "y" THEN
  7717. staves$ = "y" : barlines$ = "y" : beats$ = "y" : names$ = "y"
  7718. accidentals$ = "y" : stems$ = "y" : durations$ = "y"
  7719. amplitudes$ = "y" : envelopes$ = "y" : glissandos$ = "y"
  7720. beatnumbers$ = "y"
  7721. ELSE
  7722. staves$ = "n" : barlines$ = "n" : beats$ = "n" : names$ = "n"
  7723. accidentals$ = "n" : stems$ = "n" : durations$ = "n"
  7724. amplitudes$ = "n" : envelopes$ = "n" : glissandos$ = "n"
  7725. beatnumbers$ = "n"
  7726. ENDIF
  7727. OTHERWISE VDU 7 : PROCdisplaysubmenu
  7728. ENDCASE
  7729. ON
  7730. PROCdisplay
  7731. ENDPROC
  7732. :
  7733. REM*********************************************************
  7734. :
  7735. DEF PROCclef(numstaves%,staves%(1),staves%(2),staves%(3),staves%(4),staves%(5),staves%(6),clefcomb$)
  7736. :
  7737. IF staves$ = "y" THEN
  7738. FOR count% = 1 TO numstaves%
  7739. IF MID$(clefcomb$,count%,1) = "T" OR MID$(clefcomb$,count%,1) = "P" THEN
  7740. LINE 48,staves%(count%)+20,52,staves%(count%)+20
  7741. LINE 44,staves%(count%)+16,56,staves%(count%)+16
  7742. LINE 42,staves%(count%)+12,52,staves%(count%)+12
  7743. LINE 58,staves%(count%)+12,58,staves%(count%)+12
  7744. LINE 40,staves%(count%)+8,48,staves%(count%)+8
  7745. LINE 58,staves%(count%)+8,58,staves%(count%)+8
  7746. LINE 40,staves%(count%)+4,42,staves%(count%)+4
  7747. LINE 58,staves%(count%)+4,58,staves%(count%)+4
  7748. LINE 38,staves%(count%)+0,40,staves%(count%)+0
  7749. LINE 54,staves%(count%)+0,56,staves%(count%)+0
  7750. LINE 38,staves%(count%)-4,38,staves%(count%)-4
  7751. LINE 50,staves%(count%)-4,54,staves%(count%)-4
  7752. LINE 38,staves%(count%)-8,38,staves%(count%)-8
  7753. LINE 46,staves%(count%)-8,52,staves%(count%)-8
  7754. LINE 36,staves%(count%)-12,52,staves%(count%)-12
  7755. LINE 32,staves%(count%)-16,50,staves%(count%)-16
  7756. LINE 24,staves%(count%)-20,44,staves%(count%)-20
  7757. LINE 20,staves%(count%)-24,42,staves%(count%)-24
  7758. LINE 14,staves%(count%)-28,26,staves%(count%)-28
  7759. LINE 42,staves%(count%)-28,42,staves%(count%)-28
  7760. LINE 12,staves%(count%)-32,22,staves%(count%)-32
  7761. LINE 42,staves%(count%)-32,42,staves%(count%)-32
  7762. LINE 12,staves%(count%)-36,22,staves%(count%)-36
  7763. LINE 34,staves%(count%)-36,52,staves%(count%)-36
  7764. LINE 10,staves%(count%)-40,18,staves%(count%)-40
  7765. LINE 30,staves%(count%)-40,56,staves%(count%)-40
  7766. LINE 10,staves%(count%)-44,14,staves%(count%)-44
  7767. LINE 24,staves%(count%)-44,32,staves%(count%)-44
  7768. LINE 42,staves%(count%)-44,42,staves%(count%)-44
  7769. LINE 56,staves%(count%)-44,60,staves%(count%)-44
  7770. LINE 10,staves%(count%)-48,14,staves%(count%)-48
  7771. LINE 24,staves%(count%)-48,32,staves%(count%)-48
  7772. LINE 42,staves%(count%)-48,42,staves%(count%)-48
  7773. LINE 56,staves%(count%)-48,60,staves%(count%)-48
  7774. LINE 10,staves%(count%)-52,16,staves%(count%)-52
  7775. LINE 24,staves%(count%)-52,26,staves%(count%)-52
  7776. LINE 42,staves%(count%)-52,42,staves%(count%)-52
  7777. LINE 56,staves%(count%)-52,60,staves%(count%)-52
  7778. LINE 12,staves%(count%)-56,16,staves%(count%)-56
  7779. LINE 28,staves%(count%)-56,30,staves%(count%)-56
  7780. LINE 42,staves%(count%)-56,42,staves%(count%)-56
  7781. LINE 56,staves%(count%)-56,60,staves%(count%)-56
  7782. LINE 18,staves%(count%)-60,22,staves%(count%)-60
  7783. LINE 42,staves%(count%)-60,42,staves%(count%)-60
  7784. LINE 52,staves%(count%)-60,58,staves%(count%)-60
  7785. LINE 22,staves%(count%)-64,54,staves%(count%)-64
  7786. LINE 42,staves%(count%)-68,42,staves%(count%)-68
  7787. LINE 42,staves%(count%)-72,42,staves%(count%)-72
  7788. LINE 22,staves%(count%)-76,28,staves%(count%)-76
  7789. LINE 42,staves%(count%)-76,42,staves%(count%)-76
  7790. LINE 18,staves%(count%)-80,32,staves%(count%)-80
  7791. LINE 42,staves%(count%)-80,42,staves%(count%)-80
  7792. LINE 14,staves%(count%)-84,28,staves%(count%)-84
  7793. LINE 44,staves%(count%)-84,44,staves%(count%)-84
  7794. LINE 14,staves%(count%)-88,22,staves%(count%)-88
  7795. LINE 44,staves%(count%)-88,44,staves%(count%)-88
  7796. LINE 24,staves%(count%)-92,42,staves%(count%)-92
  7797. IF MID$(clefcomb$,count%,1) = "P" THEN
  7798. MOVE 42,staves%(count%)+44
  7799. PRINT;"8"
  7800. ENDIF
  7801. ENDIF
  7802. IF MID$(clefcomb$,count%,1) = "B" OR MID$(clefcomb$,count%,1) = "D" THEN
  7803. LINE 20,staves%(count%)-4,38,staves%(count%)-4
  7804. LINE 16,staves%(count%)-8,18,staves%(count%)-8
  7805. LINE 38,staves%(count%)-8,44,staves%(count%)-8
  7806. LINE 58,staves%(count%)-8,60,staves%(count%)-8
  7807. LINE 12,staves%(count%)-12,24,staves%(count%)-12
  7808. LINE 40,staves%(count%)-12,48,staves%(count%)-12
  7809. LINE 12,staves%(count%)-16,28,staves%(count%)-16
  7810. LINE 40,staves%(count%)-16,48,staves%(count%)-16
  7811. LINE 16,staves%(count%)-20,28,staves%(count%)-20
  7812. LINE 40,staves%(count%)-20,48,staves%(count%)-20
  7813. LINE 20,staves%(count%)-24,24,staves%(count%)-24
  7814. LINE 40,staves%(count%)-24,48,staves%(count%)-24
  7815. LINE 58,staves%(count%)-24,60,staves%(count%)-24
  7816. LINE 40,staves%(count%)-28,48,staves%(count%)-28
  7817. LINE 40,staves%(count%)-32,48,staves%(count%)-32
  7818. LINE 36,staves%(count%)-36,44,staves%(count%)-36
  7819. LINE 32,staves%(count%)-40,40,staves%(count%)-40
  7820. LINE 28,staves%(count%)-44,34,staves%(count%)-44
  7821. LINE 20,staves%(count%)-48,30,staves%(count%)-48
  7822. LINE 10,staves%(count%)-52,18,staves%(count%)-52
  7823. IFMID$(clefcomb$,count%,1) = "D" THEN
  7824. MOVE 10,staves%(count%)-56
  7825. PRINT;"8"
  7826. ENDIF
  7827. ENDIF
  7828. NEXT
  7829. ENDIF
  7830. :
  7831. IF names$ = "y" THEN
  7832. stave% = 1
  7833. FOR count% = 0 TO lastcount%
  7834. IF MID$(clefcomb$,count%+1,1) = "P" THEN MOVE 20,staves%(stave%)+78 ELSE MOVE 20,staves%(stave%)+58
  7835. PRINT longinsts$(count%,0);
  7836. PRINT;"(";displayvoices%(startv%+count%);")" : REM voice number
  7837. stave% += EVAL(MID$(stavecombination$,count%+1,1))
  7838. NEXT
  7839. ENDIF
  7840. :
  7841. REM defining actamppos%() values
  7842. stave% = 1
  7843. FOR count% = 0 TO lastcount%
  7844. IF MID$(stavecombination$,count%+1,1) = "1" THEN
  7845. actamppos%(displayvoices%(startv%+count%)) = staves%(stave%)-128+longamppos%(displayvoices%(startv%+count%)-1)
  7846. ELSE actamppos%(displayvoices%(startv%+count%)) = staves%(stave%)-224+longamppos%(displayvoices%(startv%+count%)-1)
  7847. ENDIF
  7848. stave% += EVAL(MID$(stavecombination$,count%+1,1))
  7849. NEXT
  7850. :
  7851. :
  7852. REM barlines
  7853. IF barlines$ = "y" THEN
  7854. stave% = 1
  7855. FOR system% = 0 TO lastcount%
  7856. FOR barline% = 1 TO numbars%
  7857. horpos% = (960*barline%*factor)+80
  7858. IF notehead$ = "small" THEN horpos% += 16
  7859. IF notehead$ = "vsmall" THEN horpos% += 24
  7860. FOR thickness% = 2 TO 8 STEP 2
  7861. IF MID$(stavecombination$,system%+1,1) = "1" THEN
  7862. LINE horpos%+thickness%,staves%(stave%),horpos%+thickness%,staves%(stave%)-64
  7863. ELSE
  7864. LINE horpos%+thickness%,staves%(stave%),horpos%+thickness%,staves%(stave%)-160
  7865. ENDIF
  7866. NEXT
  7867. REM bar nos
  7868. IF printing$ = "n" THEN GCOL 1
  7869. IF tempi%(startbar%) <> tempi%(startbar%-1) THEN
  7870. MOVE 40,1145 : PRINT "b.";startbar%;" MM.";tempi%(startbar%)
  7871. ELSE MOVE 40,1145 : PRINT "b.";startbar%;" (MM.";tempi%(startbar%);")"
  7872. ENDIF
  7873. IF remarks$(startbar%,0) <> "" OR remarks$(startbar%,1) <> "" THEN
  7874. MOVE 40,1120 : PRINT remarks$(startbar%,0) : MOVE 40,1095 : PRINT remarks$(startbar%,1)
  7875. ENDIF
  7876. IF printing$ = "n" THEN GCOL 0
  7877. IF system% = 0 THEN
  7878. IF printing$ = "n" THEN GCOL 1
  7879. IF tempi%(startbar%+barline%) <> tempi%(startbar%+barline%-1) THEN
  7880. MOVE horpos%-125,1145 : PRINT startbar%+barline%;" MM.";tempi%(startbar%+barline%)
  7881. ELSE IF barline% MOD barnosoften% = 0 THEN MOVE horpos%-125,1145 : PRINT startbar%+barline%
  7882. ENDIF
  7883. IF remarks$(startbar%+barline%,0) <> "" OR remarks$(startbar%+barline%,1) <> "" THEN
  7884. MOVE horpos%,1120 : PRINT remarks$(startbar%+barline%,0)
  7885. MOVE horpos%,1095 : PRINT remarks$(startbar%+barline%,1)
  7886. ENDIF
  7887. REM print duration at bottom right
  7888. IF seeduration$ = "y" THEN
  7889. IF startbar% + barline% = startbar% + numbars% - 1 THEN
  7890. totaldur = 0
  7891. FOR count% = 1 TO startbar% + numbars% - 1
  7892. duration = 60/tempi%(count%)
  7893. totaldur = totaldur + duration
  7894. NEXT
  7895. totaldur% = totaldur
  7896. mins% = totaldur% DIV 60
  7897. secs% = totaldur% - (mins%*60)
  7898. MOVE 1200,50 : PRINT "duration ";mins%;" mins ";secs%;" secs"
  7899. ENDIF
  7900. ENDIF
  7901. IF printing$ = "n" THEN GCOL 0
  7902. ENDIF
  7903. NEXT
  7904. stave% += EVAL(MID$(stavecombination$,system%+1,1))
  7905. NEXT
  7906. ENDIF
  7907. :
  7908. ENDPROC
  7909. :
  7910. REM*************************************************
  7911. :
  7912. DEF PROClongvalue(pos%(0),pos%(1),pos%(2),clefcomb$)
  7913. :
  7914. staff% = 1
  7915. finish% = endv%-startv%
  7916. IF finish% > 2 THEN finish% = 2
  7917. FOR ct% = 0 TO finish%
  7918. CASE MID$(clefcomb$,staff%,1) OF
  7919. WHEN "P" : decrement% = 360
  7920. WHEN "T" : decrement% = 304
  7921. WHEN "B" : decrement% = 208
  7922. WHEN "D" : decrement% = 152
  7923. ENDCASE
  7924. value%(ct%) = pos%(ct%) - decrement%
  7925. staff% += EVAL(MID$(stavecombination$,ct%+1,1))
  7926. NEXT
  7927. :
  7928. FOR ct% = 0 TO finish%
  7929. actbeamposn%(ct%) = longbeamposn%(displayvoices%(startv%+ct%)-1) + pos%(ct%)
  7930. NEXT
  7931. ENDPROC
  7932. :
  7933. REM*************************************************
  7934. :
  7935. DEF PROCconvertdur
  7936. :
  7937. REM converts dur% from beats to 1/20ths of a second
  7938. converter = (60 * 20)/(tempi%(barno%) * 960)
  7939. dur = dur% * converter
  7940. fraction = ((dur*10)DIV1)MOD10
  7941. IF fraction>4 THEN dur% = dur+1 ELSE dur% = dur
  7942. IF dur% = 0 THEN dur% = 1
  7943. IF dur% > 999 THEN dur% = 998 : REM max 3 array cells available
  7944. :
  7945. ENDPROC
  7946. :
  7947. REM**********************************************
  7948. :
  7949. DEF PROCreconvertdur
  7950. :
  7951. converter = (60 * 20)/(tempi%(brrr%) * 960)
  7952. dur% = dur%/converter
  7953. :
  7954. ENDPROC
  7955. :
  7956. REM************************************************
  7957. :
  7958. DEF PROCseriesdurations
  7959. :
  7960. PROCwindow(20,69,60,55)
  7961. CLS
  7962. PRINT'" How many durations (for 1 press 0) "
  7963. PRINT'" (to fill gaps between attacks "
  7964. PRINT " press 111 or to half-fill gaps "
  7965. INPUT " between attacks press 222) "numdurations%
  7966. IF numdurations% = 0 THEN numdurations% = 1
  7967. IF numdurations% = 111 OR numdurations% = 222 THEN PROCdurationsbetween
  7968. :
  7969. IF numdurations% = 1 THEN
  7970. PRINT'" the duration is:" : INPUT " bars "b% : INPUT " beats "beats%
  7971. PROCalterbeats : dur% = (b%*960)+beats%
  7972. durations%(0) = dur%
  7973. ELSE
  7974. PRINT'" Are all the durations the same?"
  7975. PRINT " (no = n/2)"
  7976. CASE GET$ OF
  7977. WHEN "N","n","2"
  7978. FOR count% = 0 TO (numdurations% - 1)
  7979. PRINT'" duration ";count%;" is:"
  7980. INPUT " bars "b%
  7981. INPUT " beats "beats% : PROCalterbeats
  7982. dur% = (b%*960)+beats%
  7983. durations%(count%) = dur%
  7984. NEXT
  7985. OTHERWISE
  7986. : PRINT'" the duration is:" : INPUT " bars "b% : INPUT " beats "beats%
  7987. PROCalterbeats : dur% = (b%*960)+beats%
  7988. FOR count% = 0 TO (numdurations%-1) : durations%(count%) = dur% : NEXT
  7989. ENDCASE
  7990. ENDIF
  7991. :
  7992. REM function can feed durats similarly into durations%()
  7993. :
  7994. PROCinsertdurations
  7995. :
  7996. ENDPROC
  7997. :
  7998. REM***********************************************
  7999. :
  8000. DEF PROCinsertdurations
  8001. :
  8002. CLS
  8003. IF seequery$ = "y" THEN
  8004. PRINT'" Do you want to read these "
  8005. PRINT " durations into the array? "
  8006. CASE GET$ OF
  8007. WHEN "N","n" : PROCdisplay : REM durations%() remains intact
  8008. OTHERWISE
  8009. ENDCASE
  8010. ENDIF : REM seequery$
  8011. :
  8012. IF screenvoices$ = "n" THEN
  8013. INPUT' " Which voice/strand (0 = top)"voice%
  8014. IF voice% = 0 THEN PROCpressenter
  8015. ELSE
  8016. PRINT'" Which screen voice "
  8017. CASE GET$ OF
  8018. WHEN "1" : voice% = 1
  8019. WHEN "2" : voice% = 2
  8020. WHEN "3" : voice% = 3
  8021. OTHERWISE PROCpressenter
  8022. ENDCASE
  8023. ENDIF
  8024. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  8025. voice% -= 1
  8026. IF voice% >= 0 THEN samevoice% = voice%
  8027. IF voice% = -1 THEN voice% = samevoice%
  8028. :
  8029. IF quickcopy$ = "n" THEN
  8030. INPUT'" Starting at bar number "bars%
  8031. INPUT " beat "beats% : PROCalterbeats
  8032. startat% = (bars%*(10^3))+beats%
  8033. ELSE
  8034. INPUT ' " starting at note number (0 counts as 1) "along%
  8035. IF along% = 0 THEN along% = 1
  8036. along%-=1
  8037. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  8038. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  8039. beats% = copystartbeat%
  8040. PROCalterbeats
  8041. startat% = (copystartbar%*(10^3))+beats%
  8042. ENDIF
  8043. :
  8044. PROCsearch(startat%)
  8045. shunt$ = "N"
  8046. :
  8047. FOR count% = startcell% TO (startcell%+(numdurations%-1))
  8048. PROCcellfill(count%,voice%,999,999,999,9,999,durations%(count%-startcell%),99,99)
  8049. NEXT
  8050. :
  8051. PROCdisplay
  8052. :
  8053. ENDPROC
  8054. :
  8055. REM*************************************************
  8056. :
  8057. DEF PROCinsertamplitudes
  8058. :
  8059. CLS
  8060. repeatposit$ = "n"
  8061. IF seequery$ = "y" THEN
  8062. PRINT'" Do you want to read these amplitudes "
  8063. PRINT " into the array? "
  8064. CASE GET$ OF
  8065. WHEN "N","n" : PROCdisplay : REM amplitudes%()) remains intact
  8066. OTHERWISE
  8067. ENDCASE
  8068. ENDIF : REM seequery$
  8069. :
  8070. IF ampmethod$ = "sample" THEN
  8071. IF screenvoices$ = "n" THEN
  8072. INPUT' " Which voice/strand (0 = top)"voice%
  8073. IF voice% = 0 THEN PROCpressenter
  8074. ELSE
  8075. PRINT'" Which screen voice "
  8076. CASE GET$ OF
  8077. WHEN "1" : voice% = 1
  8078. WHEN "2" : voice% = 2
  8079. WHEN "3" : voice% = 3
  8080. OTHERWISE PROCpressenter
  8081. ENDCASE
  8082. ENDIF
  8083. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  8084. voice% -= 1
  8085. IF voice% >= 0 THEN samevoice% = voice%
  8086. IF voice% = -1 THEN voice% = samevoice%
  8087. :
  8088. IF quickcopy$ = "y" THEN
  8089. INPUT ' " starting at note number (0 counts as 1) "along%
  8090. IF along% = 0 THEN along% = 1
  8091. along%-=1
  8092. bars% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  8093. beats% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  8094. holdbar% = bars%
  8095. holdbeat% = beats%
  8096. PROCalterbeats
  8097. startat% = (bars%*(10^3))+beats%
  8098. :
  8099. ELSE
  8100. :
  8101. INPUT'" Starting at bar number "bars%
  8102. IF bars% = 0 THEN
  8103. bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
  8104. ENDIF
  8105. holdbar% = bars%
  8106. IF repeatposit$ = "y" THEN
  8107. PRINT'" bar ";bars%;" beat ";beats%;"?"
  8108. PRINT'" (for OK press 0, if not OK press X)"
  8109. CASE GET$ OF
  8110. WHEN"X","x" : PROCinsertpitches
  8111. OTHERWISE
  8112. ENDCASE
  8113. ELSE
  8114. INPUT " beat "beats%
  8115. holdbeat% = beats%
  8116. ENDIF
  8117. PROCalterbeats
  8118. startat% = (bars%*(10^3))+beats%
  8119. :
  8120. ENDIF
  8121. :
  8122. ENDIF
  8123. :
  8124. PROCsearch(startat%)
  8125. shunt$ = "N"
  8126. :
  8127. FOR count% = startcell% TO (startcell%+(numamplitudes%-1))
  8128. PROCcellfill(count%,voice%,999,999,999,amplitudes%(count%-startcell%),999,999,99,99)
  8129. NEXT
  8130. :
  8131. PROCdisplay
  8132. :
  8133. ENDPROC
  8134. :
  8135. REM************************************************
  8136. :
  8137. DEF PROCassignvoices
  8138. :
  8139. IF defaultvoices$ = "y" THEN
  8140. waveforms$() = "WaveSynth-Beep"
  8141. ELSE
  8142. CLS
  8143. PRINT '" Assign waveforms to"
  8144. INPUT" how many voices "vcesx%
  8145. FOR count% = 1 TO vcesx%
  8146. PRINT'" voice ";count%;" is which voice number"
  8147. INPUT vcen%
  8148. PRINT'" voice ";vcen%;
  8149. IF insts$(vcen%,0) <> "" THEN PRINT " (";insts$(vcen%,0);")"
  8150. PRINT" is assigned which waveform?"
  8151. INPUT waveform$
  8152. waveforms$(vcen%) = waveform$
  8153. NEXT
  8154. ENDIF
  8155. :
  8156. ENDPROC
  8157. :
  8158. REM************************************************
  8159. :
  8160. DEF PROCseriesenvelopes
  8161. :
  8162. REM envelopes%() and glissandos%() are always input at the same time
  8163. PROCwindow(20,69,73,45)
  8164. IF gradations$ = "y" THEN PRINT'" Input gradations as if envelopes with 4 phases "
  8165. PRINT'" How many envelopes/glissandos "
  8166. INPUT " (for 1 press 0) "numenvelopes%
  8167. IF numenvelopes% = 0 THEN numenvelopes% = 1
  8168. :
  8169. IF numenvelopes% > 1 THEN
  8170. PRINT '" are the envelopes all the same? "
  8171. PRINT " (Y/0/1, N/2) "
  8172. CASE GET$ OF
  8173. WHEN "N","n","2" : sameenvelopes$ = "n"
  8174. OTHERWISE sameenvelopes$ = "y"
  8175. ENDCASE
  8176. ELSE
  8177. sameenvelopes$ = "y"
  8178. ENDIF
  8179. :
  8180. FOR count% = 0 TO (numenvelopes%-1)
  8181. IF sameenvelopes$ = "n" OR (sameenvelopes$ ="y" AND count% = 0) THEN
  8182. IF numphases% <> 4 THEN
  8183. PRINT'" Envelope ";count%+1;" has how many phases? "
  8184. PRINT " (for 1 press 0, for 0 press 9) "
  8185. INPUT numphases%
  8186. IF numphases% = 0 THEN numphases% = 1
  8187. IF numphases% = 9 THEN numphases% = 0
  8188. ENDIF
  8189. :
  8190. CASE numphases% OF
  8191. :
  8192. WHEN 0 :
  8193. INPUT'" amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
  8194. amp2% = 9
  8195. gliss1% = 50
  8196. ph2% = 0 : ph1% = 0 : amp4% = 0 : amp3% = 0 : gliss3% = 10 : gliss2% = 50
  8197. :
  8198. WHEN 4 :
  8199. INPUT'" amplitude is (0 = previous) "amp$
  8200. IF amp$ = "" THEN amp$ = prevamp$
  8201. COLOUR 1 : PRINT amp$
  8202. wait$ = INKEY$(20) : COLOUR 0
  8203. PROCconvertdynamics : amp1% = amp%
  8204. INPUT'" gradation is (select from 1-9) "gradation%
  8205. IF gradation% = 0 THEN gradation% = prevgradation%
  8206. COLOUR 1 : PRINT gradation%
  8207. wait$ = INKEY$(20) : COLOUR 0
  8208. amp2% = 9
  8209. amp3% = gradation%
  8210. gliss1% = 50
  8211. ph2% = 0 : ph1% = 0 : amp4% = 0 : gliss3% = 10 : gliss2% = 50
  8212. prevamp$ = amp$ : prevgradation% = gradation%
  8213. :
  8214. WHEN 1 :
  8215. INPUT'" starting amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
  8216. INPUT " destination amplitude is "amp$ : PROCconvertdynamics : amp2% = amp%
  8217. INPUT'" glissando is (in 1/8 tones, max 48,-48) "gliss%
  8218. gliss1% = 50-gliss%
  8219. ph2% = 0 : ph1% = 0 : amp4% = 0 : amp3% = 0 : gliss3% = 10 : gliss2% = 50
  8220. :
  8221. WHEN 2 :
  8222. INPUT'" starting amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
  8223. PRINT'" phase 1 ends after what percentage "
  8224. INPUT " of the note's duration "ph1%
  8225. INPUT " phase 1's destination amplitude is "amp$ : PROCconvertdynamics : amp2% = amp%
  8226. INPUT " phase 1's glissando is (in 1/8 tones, max 48,-48) "gliss%
  8227. gliss1% = 50-gliss%
  8228. INPUT'" phase 2's destination amplitude is "amp$ : PROCconvertdynamics : amp3% = amp%
  8229. INPUT " phase 2's glissando is (in 1/8 tones, max 48,-48) "gliss%
  8230. gliss2% = 50-gliss%
  8231. ph2% = 0 : amp4% = 0 : gliss3% = 10
  8232. :
  8233. WHEN 3 :
  8234. INPUT'" starting amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
  8235. PRINT'" phase 1 ends after what percentage "
  8236. INPUT " of the note's duration "ph1%
  8237. INPUT " phase 1's destination amplitude is "amp$ : PROCconvertdynamics : amp2% = amp%
  8238. INPUT " phase 1's glissando is (in 1/8 tones, max 48,-48) "gliss%
  8239. gliss1% = 50-gliss%
  8240. PRINT'" phase 2 ends after what percentage "
  8241. INPUT " of the note's duration "ph2%
  8242. INPUT'" phase 2's destination amplitude is "amp$ : PROCconvertdynamics : amp3% = amp%
  8243. INPUT " phase 2's glissando is (in 1/8 tones, max 48,-48) "gliss%
  8244. gliss2% = 50-gliss%
  8245. INPUT'" phase 3's destination amplitude is "amp$ : PROCconvertdynamics : amp4% = amp%
  8246. REPEAT
  8247. INPUT " phase 3's glissando is (in 1/8 tones, max 10,-10) "gliss%
  8248. gliss3% = 10-gliss%
  8249. IF gliss3% > 20 THEN VDU7
  8250. IF gliss3% < 0 THEN VDU7
  8251. UNTIL gliss3% < 21 AND gliss3% >= 0
  8252. :
  8253. ENDCASE
  8254. :
  8255. envelopes%(count%) = (ph2%*10^5)+(ph1%*10^3)+(amp4%*10^2)+(amp3%*10)+amp2%
  8256. amplitudes%(count%) = amp1%
  8257. glissandos%(count%) = (gliss3%*10^4)+(gliss2%*10^2)+gliss1%
  8258. :
  8259. :
  8260. ENDIF
  8261. NEXT
  8262. :
  8263. IF sameenvelopes$ = "y" THEN
  8264. FOR count% = 1 TO (numenvelopes%-1)
  8265. envelopes%(count%) = (ph2%*10^5)+(ph1%*10^3)+(amp4%*10^2)+(amp3%*10)+amp2%
  8266. amplitudes%(count%) = amp1%
  8267. glissandos%(count%) = (gliss3%*10^4)+(gliss2%*10^2)+gliss1%
  8268. NEXT
  8269. ENDIF
  8270. :
  8271. gradations$ = "n"
  8272. REM function can feed envelopes similarly into envelopes%()
  8273. :
  8274. PROCinsertenvelopes
  8275. :
  8276. ENDPROC
  8277. :
  8278. REM*******************************************
  8279. :
  8280. DEF PROCconvertdynamics
  8281. CASE amp$ OF
  8282. WHEN "0" : amp% = 0
  8283. WHEN "ppp" : amp% = 1
  8284. WHEN "pp" : amp% = 2
  8285. WHEN "p" : amp% = 3
  8286. WHEN "mp" : amp% = 4
  8287. WHEN "mf" : amp% = 5
  8288. WHEN "f" : amp% = 6
  8289. WHEN "ff" : amp% = 7
  8290. WHEN "fff" : amp% = 8
  8291. ENDCASE
  8292. ENDPROC
  8293. :
  8294. REM*******************************************
  8295. :
  8296. DEF PROCinsertenvelopes
  8297. :
  8298. CLS
  8299. repeatposit$ = "n"
  8300. IF seequery$ = "y" THEN
  8301. PRINT '" Do you want to read these envelopes into the array?"
  8302. CASE GET$ OF
  8303. WHEN "N","n" : PROCdisplay : REM envelopes%() stays intact
  8304. OTHERWISE
  8305. ENDCASE
  8306. ENDIF : REM seequery$
  8307. :
  8308. IF screenvoices$ = "n" THEN
  8309. INPUT' " Which voice/strand (0 = top)"voice%
  8310. IF voice% = 0 THEN PROCpressenter
  8311. ELSE
  8312. PRINT'" Which screen voice "
  8313. CASE GET$ OF
  8314. WHEN "1" : voice% = 1
  8315. WHEN "2" : voice% = 2
  8316. WHEN "3" : voice% = 3
  8317. OTHERWISE PROCpressenter
  8318. ENDCASE
  8319. ENDIF
  8320. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  8321. voice% -= 1
  8322. IF voice% >= 0 THEN samevoice% = voice%
  8323. IF voice% = -1 THEN voice% = samevoice%
  8324. :
  8325. IF quickcopy$ = "y" THEN
  8326. INPUT ' " starting at note number (0 counts as 1) "along%
  8327. IF along% = 0 THEN along% = 1
  8328. along%-=1
  8329. bars% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  8330. beats% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  8331. holdbar% = bars%
  8332. holdbeat% = beats%
  8333. PROCalterbeats
  8334. startat% = (bars%*(10^3))+beats%
  8335. :
  8336. ELSE
  8337. :
  8338. INPUT'" Starting at bar number "bars%
  8339. IF bars% = 0 THEN
  8340. bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
  8341. ENDIF
  8342. holdbar% = bars%
  8343. IF repeatposit$ = "y" THEN
  8344. PRINT'" bar ";bars%;" beat ";beats%;"?"
  8345. PRINT" (for OK press 0, if not OK press X)"
  8346. CASE GET$ OF
  8347. WHEN"X","x" : PROCinsertpitches
  8348. OTHERWISE
  8349. ENDCASE
  8350. ELSE
  8351. INPUT " beat "beats%
  8352. holdbeat% = beats%
  8353. ENDIF
  8354. PROCalterbeats
  8355. startat% = (bars%*(10^3))+beats%
  8356. :
  8357. ENDIF
  8358. :
  8359. PROCsearch(startat%)
  8360. shunt$ = "N"
  8361. :
  8362. FOR count% = startcell% TO (startcell%+(numenvelopes%-1))
  8363. PROCcellfill(count%,voice%,999,999,999,amplitudes%(count%-startcell%),envelopes%(count%-startcell%),999,glissandos%(count%-startcell%),99)
  8364. NEXT
  8365. :
  8366. PROCdisplay
  8367. :
  8368. ENDPROC
  8369. :
  8370. REM**********************************************
  8371. :
  8372. DEF PROCseriesinflections
  8373. :
  8374. PROCwindow(20,69,88,45)
  8375. PRINT'" semitone = 100 cents quartertone = 50 cents eigthtone = 25 cents"
  8376. PRINT " sixteenthtone = 12 cents sixthtone = 33 cents"
  8377. PRINT'" harmonic 3 = perfect 5th + 2 cents"
  8378. PRINT " harmonic 5 = major 3rd eigthtone flat + 11 cents "
  8379. PRINT " harmonic 7 = minor 7th eightone flat -6 cents"
  8380. PRINT " harmonic 9 = major 2nd + 4 cents"
  8381. PRINT " harmonic 11 = perfect 4th quartertone sharp + 1 cent"
  8382. PRINT " harmonic 13 = major 6th quartertone flat - 9 cents"
  8383. PRINT " harmonic 15 = major 7th - 12 cents"
  8384. INPUT'" How many inflections "numinflections%
  8385. FOR count% = 0 TO (numinflections%-1)
  8386. PRINT'" inflection ";count%+1;" is (in cents:"
  8387. INPUT " 1,-1 etc; max 49,-49) "inf%
  8388. inf% = 50+inf%
  8389. inflections%(count%) = inf%
  8390. NEXT
  8391. :
  8392. REM function can feed similarly into inflections%()
  8393. :
  8394. PROCinsertinflections
  8395. :
  8396. ENDPROC
  8397. :
  8398. REM**********************************************
  8399. :
  8400. DEF PROCinsertinflections
  8401. :
  8402. CLS
  8403. repeatposit$ = "n"
  8404. IF seequery$ = "y" THEN
  8405. PRINT'" Do you want to read these inflections into the array?"
  8406. CASE GET$ OF
  8407. WHEN "N","n" : PROCdisplay : REM inflections%() remains intact
  8408. OTHERWISE
  8409. ENDCASE
  8410. ENDIF : REM seequery$
  8411. IF screenvoices$ = "n" THEN
  8412. INPUT' " Which voice/strand "voice%
  8413. ELSE
  8414. PRINT'" Which screen voice "
  8415. CASE GET$ OF
  8416. WHEN "1" : voice% = 1
  8417. WHEN "2" : voice% = 2
  8418. WHEN "3" : voice% = 3
  8419. OTHERWISE PROCpressenter
  8420. ENDCASE
  8421. ENDIF
  8422. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  8423. voice% -= 1
  8424. IF voice% >= 0 THEN samevoice% = voice%
  8425. IF voice% = -1 THEN voice% = samevoice%
  8426. :
  8427. IF quickcopy$ = "y" THEN
  8428. INPUT ' " starting at note number (0 counts as 1) "along%
  8429. IF along% = 0 THEN along% = 1
  8430. along%-=1
  8431. bars% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  8432. beats% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  8433. holdbar% = bars%
  8434. holdbeat% = beats%
  8435. PROCalterbeats
  8436. startat% = (bars%*(10^3))+beats%
  8437. :
  8438. ELSE
  8439. :
  8440. INPUT'" Starting at bar number "bars%
  8441. IF bars% = 0 THEN
  8442. bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
  8443. ENDIF
  8444. holdbar% = bars%
  8445. IF repeatposit$ = "y" THEN
  8446. PRINT'" bar ";bars%;" beat ";beats%;"?"
  8447. PRINT" (for OK press 0, if not OK press X)"
  8448. CASE GET$ OF
  8449. WHEN"X","x" : PROCinsertpitches
  8450. OTHERWISE
  8451. ENDCASE
  8452. ELSE
  8453. INPUT " beat "beats%
  8454. holdbeat% = beats%
  8455. ENDIF
  8456. PROCalterbeats
  8457. startat% = (bars%*(10^3))+beats%
  8458. :
  8459. ENDIF
  8460. :
  8461. PROCsearch(startat%)
  8462. shunt$ = "N"
  8463. :
  8464. FOR count% = startcell% TO (startcell%+(numinflections%-1))
  8465. PROCcellfill(count%,voice%,999,999,999,9,999,999,99,inflections%(count%-startcell%))
  8466. NEXT
  8467. PROCdisplay
  8468. ENDPROC
  8469. :
  8470. REM****************************************************
  8471. :
  8472. DEF PROCenv
  8473. :
  8474. temp = tempi%(brrr%)
  8475. IF waveload$ = "done" THEN temp = temp*1.23065
  8476. converter = 1200/(temp*960)
  8477. dur1 = dur%/converter
  8478. dur2 = dur1*10
  8479. dur3 = dur2 MOD 10
  8480. IF dur3 >= 5 THEN dur% = dur1+1 ELSE dur% = dur1
  8481. :
  8482. dyn1% = dyn% + 128
  8483. :
  8484. number% = array%(cell%(voicenum%),2,voicenum%)DIV10^5
  8485. IF number% = 0 THEN numphases% = 1
  8486. IF number% > 0 AND number% < 100 THEN numphases% = 2
  8487. IF number% > 99 THEN numphases% = 3
  8488. :
  8489. CASE nvoices% OF
  8490. WHEN 1 : st% = 1
  8491. OTHERWISE st% = 2
  8492. ENDCASE
  8493. :
  8494. CASE numphases% OF
  8495. :
  8496. WHEN 1 :
  8497. :
  8498. gliss1% = (array%(cell%(voicenum%),1,voicenum%)DIV10^4)MOD10^2
  8499. gliss1% = 50 - gliss1%
  8500. gliss1% = gliss1% * 85.5
  8501. pitchinc = gliss1%/dur%
  8502. :
  8503. amp2% = (array%(cell%(voicenum%),2,voicenum%)DIV10^2)MOD10
  8504. dyn2% = 384 + (16*amp2%)
  8505. IF dyn2% = 512 THEN dyn2% = 511
  8506. dynspan% = dyn2% - dyn1%
  8507. dyninc = dynspan%/dur%
  8508. :
  8509. FOR loop% = 10 TO dur% STEP (dur%/32)*st%
  8510. loud% = dyninc*loop%
  8511. high% = pitchinc*loop%
  8512. SOUND count%, dyn1%+loud%, pitch%+high%, 0, after%+loop%
  8513. NEXT
  8514. :
  8515. WHEN 2 :
  8516. ph1% = number% MOD 10^2
  8517. point1% = dur%*ph1%/100
  8518. :
  8519. REM first phase
  8520. gliss1% = (array%(cell%(voicenum%),1,voicenum%)DIV10^4)MOD10^2
  8521. gliss1% = 50 - gliss1%
  8522. gliss1% = gliss1% * 85.5
  8523. pitchinc = gliss1%/point1%
  8524. :
  8525. amp2% = (array%(cell%(voicenum%),2,voicenum%)DIV10^2)MOD10
  8526. dyn2% = 384 + (16*amp2%)
  8527. IF dyn2% = 512 THEN dyn2% = 511
  8528. dynspan% = dyn2% - dyn1%
  8529. dyninc = dynspan%/point1%
  8530. :
  8531. FOR loop% = 10 TO point1%-10 STEP ((point1%)/32)*st%
  8532. loud% = dyninc*loop%
  8533. high% = pitchinc*loop%
  8534. SOUND count%, dyn1%+loud%, pitch%+high%, 0, after%+loop%
  8535. NEXT
  8536. :
  8537. REM second phase
  8538. gliss2% = (array%(cell%(voicenum%),1,voicenum%)DIV10^6)MOD10^2
  8539. gliss2% = 50 - gliss2%
  8540. gliss2% = gliss2% * 85.5
  8541. pitchinc = gliss2%/(dur%-point1%)
  8542. :
  8543. amp3% = (array%(cell%(voicenum%),2,voicenum%)DIV10^3)MOD10
  8544. dyn3% = 384 + (16*amp3%)
  8545. IF dyn3% = 512 THEN dyn2% = 511
  8546. dynspan% = dyn3% - dyn2%
  8547. dyninc = dynspan%/(dur%-point1%)
  8548. :
  8549. FOR loop% = 0 TO dur%-point1% STEP ((dur%-point1%)/32)*st%
  8550. loud% = dyninc*loop%
  8551. high% = pitchinc*loop%
  8552. SOUND count%, dyn2%+loud%, pitch%+gliss1%+high%, 0, after%+point1%+loop%
  8553. NEXT
  8554. :
  8555. WHEN 3 :
  8556. ph1% = number% MOD 10^2
  8557. point1% = dur%*ph1%/100
  8558. ph2% = number% DIV 10^2
  8559. point2% = dur%*ph2%/100
  8560. :
  8561. REM first phase
  8562. gliss1% = (array%(cell%(voicenum%),1,voicenum%)DIV10^4)MOD10^2
  8563. gliss1% = 50 - gliss1%
  8564. gliss1% = gliss1% * 85.5
  8565. pitchinc = gliss1%/point1%
  8566. :
  8567. amp2% = (array%(cell%(voicenum%),2,voicenum%)DIV10^2)MOD10
  8568. dyn2% = 384 + (16*amp2%)
  8569. IF dyn2% = 512 THEN dyn2% = 511
  8570. dynspan% = dyn2% - dyn1%
  8571. dyninc = dynspan%/point1%
  8572. :
  8573. FOR loop% = 10 TO point1%-10 STEP ((point1%)/32)*st%
  8574. loud% = dyninc*loop%
  8575. high% = pitchinc*loop%
  8576. SOUND count%, dyn1%+loud%, pitch%+high%, 0, after%+loop%
  8577. NEXT
  8578. :
  8579. REM second phase
  8580. gliss2% = (array%(cell%(voicenum%),1,voicenum%)DIV10^6)MOD10^2
  8581. gliss2% = 50 - gliss2%
  8582. gliss2% = gliss2% * 85.5
  8583. pitchinc = gliss2%/(point2%-point1%)
  8584. :
  8585. amp3% = (array%(cell%(voicenum%),2,voicenum%)DIV10^3)MOD10
  8586. dyn3% = 384 + (16*amp3%)
  8587. IF dyn3% = 512 THEN dyn3% = 511
  8588. dynspan% = dyn3% - dyn2%
  8589. dyninc = dynspan%/(point2%-point1%)
  8590. :
  8591. FOR loop% = 0 TO point2%-point1%-10 STEP ((point2%-point1%)/32)*st%
  8592. loud% = dyninc*loop%
  8593. high% = pitchinc*loop%
  8594. SOUND count%, dyn2%+loud%, pitch%+gliss1%+high%, 0, after%+point1%+loop%
  8595. NEXT
  8596. :
  8597. REM third phase
  8598. gliss3% = (array%(cell%(voicenum%),1,voicenum%)DIV10^8)
  8599. gliss3% = 10 - gliss3%
  8600. gliss3% = gliss3% * 85.5
  8601. pitchinc = gliss3%/(dur%-point2%)
  8602. :
  8603. amp4% = (array%(cell%(voicenum%),2,voicenum%)DIV10^4)MOD10
  8604. dyn4% = 384 + (16*amp4%)
  8605. IF dyn4% = 512 THEN dyn4% = 511
  8606. dynspan% = dyn4% - dyn3%
  8607. dyninc = dynspan%/(dur%-point2%)
  8608. :
  8609. FOR loop% = 0 TO dur%-point2% STEP ((dur%-point2%)/32)*st%
  8610. loud% = dyninc*loop%
  8611. high% = pitchinc*loop%
  8612. SOUND count%, dyn3%+loud%, pitch%+gliss1%+gliss2%+high%, 0, after%+point2%+loop%
  8613. NEXT
  8614. :
  8615. ENDCASE
  8616. :
  8617. ENDPROC
  8618. :
  8619. REM******************************************************
  8620. :
  8621. DEF PROCquit
  8622. :
  8623. CLS
  8624. PRINT''''" Do you want to SAVE"
  8625. PRINT" before quitting?"
  8626. CASE GET$ OF
  8627. WHEN "N","n" :
  8628. REM this line and next two 'deleted' for now - IF wavefilingsystem$ = "loaded" THEN
  8629. REM *RMKill WFS
  8630. REM ENDIF
  8631. *NoDir
  8632. QUIT
  8633. OTHERWISE
  8634. quitnow$ = "y"
  8635. PROCsave
  8636. ENDCASE
  8637. ENDPROC
  8638. :
  8639. REM******************************************************
  8640. :
  8641. DEF PROCsave
  8642. :
  8643. firstnaming$ = "n"
  8644. CLS
  8645. IF filename$ = "" THEN
  8646. INPUT'" filename "filename$
  8647. firstnaming$ = "y"
  8648. DIM lastfilename$(9)
  8649. housekeepingdimmed$ = "y"
  8650. PROChousekeeping
  8651. ENDIF
  8652. IF firstnaming$ = "n" THEN
  8653. PRINT'" as '";filename$;"'?"
  8654. CASE GET$ OF
  8655. WHEN "N","n" :
  8656. INPUT'" filename "filename$
  8657. OTHERWISE
  8658. ENDCASE
  8659. ENDIF
  8660. :
  8661. *Dir HostFS::HardDisc4.$.CAC.Files
  8662. :
  8663. channel = OPENOUT filename$
  8664. PRINT#channel, manynotes%
  8665. PRINT#channel, numparts%
  8666. PRINT#channel, nobars%
  8667. PRINT#channel, startv%
  8668. PRINT#channel, startv1%
  8669. PRINT#channel, numbars%
  8670. PRINT#channel, startbar%
  8671. PRINT#channel, numvoices%
  8672. PRINT#channel, factor%
  8673. PRINT#channel, beatfactor%
  8674. PRINT#channel, beams%
  8675. PRINT#channel, longbeatsupper%
  8676. PRINT#channel, longbeatslower%
  8677. PRINT#channel, tempo%
  8678. PRINT#channel, MM%
  8679. PRINT#channel, notehead$
  8680. PRINT#channel, longscore$
  8681. PRINT#channel, barlines$
  8682. PRINT#channel, staves$
  8683. PRINT#channel, beats$
  8684. PRINT#channel, amplitudes$
  8685. PRINT#channel, names$
  8686. PRINT#channel, accidentals$
  8687. PRINT#channel, stems$
  8688. PRINT#channel, xoption$
  8689. PRINT#channel, durations$
  8690. PRINT#channel, envelopes$
  8691. PRINT#channel, glissandos$
  8692. PRINT#channel, numwaves%
  8693. PRINT#channel, manywaves%
  8694. PRINT#channel, barnosoften%
  8695. FOR c% = 0 TO (numparts%-1)
  8696. PRINT#channel, numusedcells%(c%)
  8697. NEXT
  8698. FOR e% = 0 TO (numparts%-1)
  8699. FOR d% = 0 TO 2
  8700. FOR c% = 0 TO numusedcells%(e%)
  8701. PRINT#channel, array%(c%,d%,e%)
  8702. NEXT
  8703. NEXT
  8704. NEXT
  8705. FOR c% = 0 TO numparts%
  8706. FOR d% = 0 TO 2
  8707. PRINT#channel, insts$(c%,d%)
  8708. NEXT
  8709. NEXT
  8710. FOR c% = 0 TO nobars%
  8711. FOR d% = 0 TO 3
  8712. FOR e% = 0 TO (numparts%-1)
  8713. PRINT#channel, disarray%(c%,d%,e%)
  8714. NEXT
  8715. NEXT
  8716. NEXT
  8717. FOR c% = 0 TO numparts%
  8718. PRINT#channel, longbeamposn%(c%)
  8719. NEXT
  8720. FOR c% = 0 TO numparts%
  8721. PRINT#channel, shortbeamposn%(c%)
  8722. NEXT
  8723. FOR c% = 0 TO numparts%
  8724. PRINT#channel, shortamppos%(c%)
  8725. NEXT
  8726. FOR c% = 0 TO numparts%
  8727. PRINT#channel, longamppos%(c%)
  8728. NEXT
  8729. FOR c% = 0 TO (numparts%-1)
  8730. PRINT#channel, longstemdir$(c%)
  8731. NEXT
  8732. FOR c% = 0 TO (numparts%-1)
  8733. PRINT#channel, shortstemdir$(c%)
  8734. NEXT
  8735. FOR c% = 0 TO numparts%
  8736. PRINT#channel, waveforms$(c%)
  8737. NEXT
  8738. FOR c% = 0 TO numvoices%
  8739. PRINT#channel, displayvoices%(c%)
  8740. NEXT
  8741. FOR c% = 0 TO 19
  8742. PRINT#channel, wforms$(c%)
  8743. NEXT
  8744. FOR c% = 0 TO 8
  8745. FOR d% = 0 TO 9
  8746. PRINT#channel, lvdata%(c%,d%)
  8747. NEXT
  8748. NEXT
  8749. FOR a% = 0 TO 47
  8750. PRINT#channel, pitchset%(a%)
  8751. NEXT
  8752. FOR a% = 0 TO 47
  8753. PRINT#channel, durset%(a%)
  8754. NEXT
  8755. FOR a% = 0 TO 47
  8756. PRINT#channel, ampset%(a%)
  8757. NEXT
  8758. FOR a% = 0 TO 47
  8759. PRINT#channel, glissset%(a%)
  8760. NEXT
  8761. FOR a% = 0 TO 47
  8762. PRINT#channel, envset%(a%)
  8763. NEXT
  8764. FOR a% = 0 TO nobars%
  8765. PRINT#channel, tempi%(a%)
  8766. NEXT
  8767. FOR a% = 0 TO nobars%
  8768. FOR b% = 0 TO 1
  8769. PRINT#channel, remarks$(a%,b%)
  8770. NEXT
  8771. NEXT
  8772. :
  8773. CLOSE#channel
  8774. *NoDir
  8775. :
  8776. goproc$ = "y"
  8777. FOR count% = 1 TO 9
  8778. IF lastfilename$(count%) = filename$ THEN
  8779. goproc$ = "n" : theone% = count%
  8780. ENDIF
  8781. NEXT
  8782. IF goproc$ = "n" THEN
  8783. IF theone% > 1 THEN
  8784. PROCspecialshunt : PROCfornexttime
  8785. ENDIF
  8786. ENDIF
  8787. IF goproc$ = "y" THEN
  8788. PROCshuntlastfilename : PROCfornexttime
  8789. ENDIF
  8790. :
  8791. PROCdisplay
  8792. ENDPROC
  8793. :
  8794. REM******************************************
  8795. :
  8796. DEF PROCloadfile
  8797. :
  8798. housekeepingdimmed$ = "n"
  8799. PROChousekeeping
  8800. PRINT'" The most recent files saved were "
  8801. FOR count% = 1 TO 9
  8802. PRINT'count%;". ";lastfilename$(count%)
  8803. NEXT
  8804. PRINT'" To open one press its number, for another press 0 "
  8805. CASE GET$ OF
  8806. WHEN "1" : filename$ = lastfilename$(1)
  8807. WHEN "2" : filename$ = lastfilename$(2)
  8808. WHEN "3" : filename$ = lastfilename$(3)
  8809. WHEN "4" : filename$ = lastfilename$(4)
  8810. WHEN "5" : filename$ = lastfilename$(5)
  8811. WHEN "6" : filename$ = lastfilename$(6)
  8812. WHEN "7" : filename$ = lastfilename$(7)
  8813. WHEN "8" : filename$ = lastfilename$(8)
  8814. WHEN "9" : filename$ = lastfilename$(9)
  8815. OTHERWISE
  8816. INPUT'" the one you want is "filename$
  8817. ENDCASE
  8818. :
  8819. *Dir HostFS::HardDisc4.$.CAC.Files
  8820. channel = OPENIN filename$
  8821. REPEAT
  8822. INPUT#channel, manynotes%
  8823. INPUT#channel, numparts%
  8824. INPUT#channel, nobars%
  8825. instsdimmed$ = "n"
  8826. PROCarraysetup
  8827. INPUT#channel, startv%
  8828. INPUT#channel, startv1%
  8829. INPUT#channel, numbars%
  8830. INPUT#channel, startbar%
  8831. INPUT#channel, numvoices%
  8832. INPUT#channel, factor%
  8833. INPUT#channel, beatfactor%
  8834. INPUT#channel, beams%
  8835. INPUT#channel, longbeatsupper%
  8836. INPUT#channel, longbeatslower%
  8837. INPUT#channel, tempo%
  8838. INPUT#channel, MM%
  8839. INPUT#channel, notehead$
  8840. INPUT#channel, longscore$
  8841. INPUT#channel, barlines$
  8842. INPUT#channel, staves$
  8843. INPUT#channel, beats$
  8844. INPUT#channel, amplitudes$
  8845. INPUT#channel, names$
  8846. INPUT#channel, accidentals$
  8847. INPUT#channel, stems$
  8848. INPUT#channel, xoption$
  8849. INPUT#channel, durations$
  8850. INPUT#channel, envelopes$
  8851. INPUT#channel, glissandos$
  8852. INPUT#channel, numwaves%
  8853. INPUT#channel, manywaves%
  8854. INPUT#channel, barnosoften%
  8855. FOR c% = 0 TO (numparts%-1)
  8856. INPUT#channel, numusedcells%(c%)
  8857. NEXT
  8858. FOR e% = 0 TO (numparts%-1)
  8859. FOR d% = 0 TO 2
  8860. FOR c% = 0 TO numusedcells%(e%)
  8861. INPUT#channel, array%(c%,d%,e%)
  8862. NEXT
  8863. NEXT
  8864. NEXT
  8865. FOR c% = 0 TO numparts%
  8866. FOR d% = 0 TO 2
  8867. INPUT#channel, insts$(c%,d%)
  8868. NEXT
  8869. NEXT
  8870. FOR c% = 0 TO nobars%
  8871. FOR d% = 0 TO 3
  8872. FOR e% = 0 TO (numparts%-1)
  8873. INPUT#channel, disarray%(c%,d%,e%)
  8874. NEXT
  8875. NEXT
  8876. NEXT
  8877. FOR c% = 0 TO numparts%
  8878. INPUT#channel, longbeamposn%(c%)
  8879. NEXT
  8880. FOR c% = 0 TO numparts%
  8881. INPUT#channel, shortbeamposn%(c%)
  8882. NEXT
  8883. FOR c% = 0 TO numparts%
  8884. INPUT#channel, shortamppos%(c%)
  8885. NEXT
  8886. FOR c% = 0 TO numparts%
  8887. INPUT#channel, longamppos%(c%)
  8888. NEXT
  8889. FOR c% = 0 TO (numparts%-1)
  8890. INPUT#channel, longstemdir$(c%)
  8891. NEXT
  8892. FOR c% = 0 TO (numparts%-1)
  8893. INPUT#channel, shortstemdir$(c%)
  8894. NEXT
  8895. FOR c% = 0 TO numparts%
  8896. INPUT#channel, waveforms$(c%)
  8897. NEXT
  8898. FOR c% = 0 TO numvoices%
  8899. INPUT#channel, displayvoices%(c%)
  8900. NEXT
  8901. FOR c% = 0 TO 19
  8902. INPUT#channel, wforms$(c%)
  8903. NEXT
  8904. FOR c% = 0 TO 8
  8905. FOR d% = 0 TO 9
  8906. INPUT#channel, lvdata%(c%,d%)
  8907. NEXT
  8908. NEXT
  8909. FOR a% = 0 TO 47
  8910. INPUT#channel, pitchset%(a%)
  8911. NEXT
  8912. FOR a% = 0 TO 47
  8913. INPUT#channel, durset%(a%)
  8914. NEXT
  8915. FOR a% = 0 TO 47
  8916. INPUT#channel, ampset%(a%)
  8917. NEXT
  8918. FOR a% = 0 TO 47
  8919. INPUT#channel, glissset%(a%)
  8920. NEXT
  8921. FOR a% = 0 TO 47
  8922. INPUT#channel, envset%(a%)
  8923. NEXT
  8924. FOR a% = 0 TO nobars%
  8925. INPUT#channel, tempi%(a%)
  8926. tempi%(0) = tempi%(1)
  8927. NEXT
  8928. FOR a% = 0 TO nobars%
  8929. FOR b% = 0 TO 1
  8930. INPUT#channel, remarks$(a%,b%)
  8931. NEXT
  8932. NEXT
  8933. :
  8934. holdnum% = numvoices% : holdstart% = startv%
  8935. FOR count% = 1 TO numvoices% : holddisplay%(count%) = displayvoices%(count%) : NEXT
  8936. :
  8937. UNTIL EOF#channel
  8938. CLOSE#channel
  8939. *NoDir
  8940. :
  8941. alterbeatsat% = (960/beatfactor%)/8
  8942. :
  8943. PROCdisplay
  8944. :
  8945. ENDPROC
  8946. :
  8947. REM******************************************************
  8948. :
  8949. DEF PROCplaysubmenu
  8950. :
  8951. PROCwindow(20,71,60,54)
  8952. PRINT'" Load waveforms W"
  8953. PRINT " Assign waveforms to voices A"
  8954. PRINT " Set tempo T"
  8955. PRINT " Set l.v. L"
  8956. PRINT " Beats input B"
  8957. PRINT " Memory setup M"
  8958. PRINT " Display pitches in colours C"
  8959. PRINT " Display options D"
  8960. PRINT " Remarks R"
  8961. PRINT " Rename staves S"
  8962. PRINT " Change a stave's clef K"
  8963. PRINT " Quickplay options Q"
  8964. PRINT " Set stereo positions P"
  8965. PRINT " Set key response speeds E"
  8966. PRINT " Tutorial U"
  8967. PRINT " Re-set parameter defaults V"
  8968. CASE GET$ OF
  8969. WHEN "v" : CLS
  8970. PRINT'" Amplitude A"
  8971. CASE GET$ OF
  8972. WHEN "a" :
  8973. PRINT'" Re-set default amplitude"
  8974. INPUT " in a batch between which voice "firstvoice%
  8975. INPUT'" and which voice "secondvoice%
  8976. INPUT'" And set it at which amplitude "value$
  8977. CASE value$ OF
  8978. WHEN "fff" : value% = 8
  8979. WHEN "ff" : value% = 7
  8980. WHEN "f" : value% = 6
  8981. WHEN "mf" : value% = 5
  8982. WHEN "mp" : value% = 4
  8983. WHEN "p" : value% = 3
  8984. WHEN "pp" : value% = 2
  8985. WHEN "ppp" : value% = 1
  8986. WHEN "0" : value% = 0
  8987. ENDCASE
  8988. FOR count% = (firstvoice%-1) TO (secondvoice%-1)
  8989. ampset%(count%) = value%
  8990. NEXT
  8991. ENDCASE
  8992. PROCdisplay
  8993. :
  8994. WHEN "U","u" : CLS
  8995. PRINT ' " Handling of durations D"
  8996. PRINT ' " Bar '0' bug B"
  8997. PRINT ' " Only voices with content O"
  8998. PRINT ' " Exiting dialogue windows E"
  8999. CASE GET$ OF
  9000. WHEN "D","d" : PROCwindow(10,71,72,20) : CLS
  9001. PRINT '" When a duration is input in bars/beats it is converted "
  9002. PRINT '" into 1/20ths of a second at the current tempo "
  9003. PRINT '" before being saved in the array. "
  9004. PRINT '" (This is because when sounds are played, their durations "
  9005. PRINT '" are given by BASIC to the OS as so many 1/20ths of a second). "
  9006. PRINT' '" The Display procedure then reconverts back to bars/beats. "
  9007. PRINT' '" Unavoidable floating point discrepencies occur during "
  9008. PRINT '" this conversion/reconversion process, which often lead to "
  9009. PRINT '" durations being displayed with different values to those "
  9010. PRINT '" initially input, especially in the case of very small values. "
  9011. PRINT ''" (to return to program press any key)"
  9012. CASE GET$ OF
  9013. WHEN "R","r" : PROCdisplay
  9014. OTHERWISE PROCdisplay
  9015. ENDCASE
  9016. WHEN "B","b" : PROCwindow(10,71,72,20) : CLS
  9017. PRINT '" Some files created before Oct 2017 will occasionally "
  9018. PRINT '" display rogue notes to the left of the first bar with "
  9019. PRINT '" odd gliss's and inflections, caused by inputting more "
  9020. PRINT '" pitches than there were attacks (now not possible). "
  9021. PRINT' '" To correct the file, use function Remove Rogue Notes. "
  9022. PRINT' '" (to return to program press any key)"
  9023. CASE GET$ OF
  9024. WHEN "R","r" : PROCdisplay
  9025. OTHERWISE PROCdisplay
  9026. ENDCASE
  9027. WHEN "O","o" : PROCwindow(10,71,72,20) : CLS
  9028. PRINT '" This displays only the voices containing music out of the "
  9029. PRINT '" currently requested display. Thus, to show the voices with "
  9030. PRINT '" music for a different selection of bars/voices, first display "
  9031. PRINT '" those bars/voices with this function turned off (by toggling) "
  9032. PRINT '" then turn it back on again. "
  9033. PRINT ''" (to return to program press any key)"
  9034. CASE GET$ OF
  9035. WHEN "R","r" : PROCdisplay
  9036. OTHERWISE PROCdisplay
  9037. ENDCASE
  9038. WHEN "E","e" : PROCwindow(10,71,72,20) : CLS
  9039. PRINT '" When no obvious key-presses are indicated, e.g. when you "
  9040. PRINT '" want to exit a dialogue window at any point etc., simply "
  9041. PRINT '" press <Esc> to return to the display. "
  9042. CASE GET$ OF
  9043. WHEN "R","r" : PROCdisplay
  9044. OTHERWISE PROCdisplay
  9045. ENDCASE
  9046. :
  9047. ENDCASE
  9048. :
  9049. WHEN "E","e" : CLS
  9050. PRINT '" To set response time for downward "
  9051. PRINT " copying from top stave press D "
  9052. PRINT '" To set response time for "
  9053. PRINT " move left/right press M "
  9054. PRINT '" To set response time for "
  9055. PRINT " move up/down press U "
  9056. PRINT '" To set response time for pause "
  9057. PRINT " after first digit input press F "
  9058. PRINT '" To set response time for pause "
  9059. PRINT " after second digit input press S "
  9060. CASE GET$ OF
  9061. WHEN "D","d" :
  9062. CLS
  9063. PRINT'" delay how many hundredths of a second "
  9064. PRINT " (default is 50,";
  9065. PRINT " currently set at ";downwardsspeed%;")"
  9066. INPUT ' downwardsspeed%
  9067. WHEN "M","m" :
  9068. PRINT'" delay how many hundredths of a second "
  9069. PRINT " (default is 25, currently set at ";horizscroll%;")"
  9070. INPUT horizscroll%
  9071. WHEN "U","u" :
  9072. PRINT'" delay how many hundredths of a second "
  9073. PRINT " (default is 25, currently set at ";vertscroll%;")"
  9074. INPUT vertscroll%
  9075. WHEN "F","f" :
  9076. PRINT'" pause for how many hundredths "
  9077. PRINT " of a second (currently ";waitafterfirst%;")"
  9078. INPUT waitafterfirst%
  9079. waitaftersecond% = waitafterfirst% : REM stops waiting unnecessarily for a 3rd digit
  9080. WHEN "S","s" :
  9081. PRINT'" pause for how many hundredths "
  9082. PRINT " of a second (currently ";waitaftersecond%;")"
  9083. INPUT waitaftersecond%
  9084. ENDCASE
  9085. PROCdisplay
  9086. :
  9087. WHEN "A","a" :
  9088. PROCwindow(20,72,83,25)
  9089. VDU 14
  9090. PRINT'" Current assignations are "
  9091. PRINT " (press Ctrl-Shift to scroll down) "
  9092. FOR count% = 1 TO numparts%
  9093. IF waveforms$(count%) <> "" THEN
  9094. PRINT'" voice ";count%;
  9095. IF insts$(count%,0)<> "" THEN PRINT " (";insts$(count%,0);")";
  9096. PRINT " - ";waveforms$(count%)
  9097. ENDIF
  9098. NEXT
  9099. VDU 15
  9100. PRINT'" Do you want to keep these, reassign,"
  9101. PRINT " use WaveSynth-Beep defaults, "
  9102. PRINT " randomly assign sustaining/dry instruments/drums "
  9103. PRINT " to all staves, or assign in groups "
  9104. PRINT " (K/R/W/S/D/M/G) "
  9105. CASE GET$ OF
  9106. WHEN "R","r" : defaultvoices$ = "n" : PROCassignvoices : PROCdisplay
  9107. WHEN "W","w" : defaultvoices$ = "y" : PROCassignvoices : PROCdisplay
  9108. WHEN "K","k" : defaultvoices$ = "n" : PROCdisplay
  9109. WHEN "S","s" : defaultvoices$ = "n" : type$ = "sustaining" : PROCrandomassign : PROCdisplay
  9110. WHEN "M","m" : defaultvoices$ = "n" : type$ = "drums" : PROCrandomassign : PROCdisplay
  9111. WHEN "D","d" : defaultvoices$ = "n" : PROCrandomdry : PROCdisplay
  9112. WHEN "G","g" : defaultvoices$ = "n" : PROCgroupassign : PROCdisplay
  9113. ENDCASE
  9114. WHEN "T","t" : PROCtempo
  9115. WHEN "L","l" : PROClv
  9116. WHEN "W","w" : PROCloadwaveforms
  9117. WHEN "B","b" :
  9118. CLS : PRINT' " Typing numbers up to ";((960/beatfactor%)/8)-1
  9119. PRINT " should be read as macro-beats "
  9120. PRINT" or micro-beats? (+/-) "
  9121. CASE GET$ OF
  9122. WHEN "+","=" : alterbeatsat% = (960/beatfactor%)/8
  9123. OTHERWISE
  9124. alterbeatsat% = 0
  9125. ENDCASE
  9126. :
  9127. PROCdisplay
  9128. WHEN "M","m" :
  9129. CLS : PRINT '" This file was set up as follows:"
  9130. PRINT" Number of bars - ";nobars%
  9131. PRINT" Notes per bar in busiest - ";manynotes%/nobars%
  9132. PRINT" Number of voices - ";numparts%
  9133. PRINT'" (Press a key to continue)"
  9134. CASE GET$ OF
  9135. WHEN "C","c" :
  9136. OTHERWISE
  9137. ENDCASE
  9138. PROCdisplay
  9139. WHEN "C","c" :
  9140. CLS : PRINT'" Do you want any pitches displayed in "
  9141. PRINT " in colours?"
  9142. CASE GET$ OF
  9143. WHEN "Y","y" :
  9144. PRINT'" Re-define these, or use previous "
  9145. PRINT " settings? (R/P)"
  9146. CASE GET$ OF
  9147. WHEN "R","r" :
  9148. INPUT'" How many colours "numcols%
  9149. FOR tt% = 1 TO numcols%
  9150. PRINT'" Colour ";tt%;" has how many pitches "
  9151. INPUT numredpitches%(tt%)
  9152. FOR ttt% = 1 TO numredpitches%(tt%)
  9153. PRINT' " Note name for pitch ";ttt%;" is ";
  9154. COLOUR 3
  9155. CASE GET$ OF
  9156. WHEN "C","c" : note% = 0 : PRINT "C"
  9157. WHEN "D","d" : note% = 1 : PRINT "D"
  9158. WHEN "E","e" : note% = 2 : PRINT "E"
  9159. WHEN "F","f" : note% = 3 : PRINT "F"
  9160. WHEN "G","g" : note% = 4 : PRINT "G"
  9161. WHEN "A","a" : note% = 5 : PRINT "A"
  9162. WHEN "B","b" : note% = 6 : PRINT "B"
  9163. ENDCASE
  9164. COLOUR 0
  9165. PRINT " accidental ";
  9166. COLOUR 3
  9167. CASE GET$ OF
  9168. WHEN "1" : accid% = 1 : PRINT "flat"
  9169. WHEN "2" : accid% = 2 : PRINT "3/8flat"
  9170. WHEN "3" : accid% = 3 : PRINT "1/4flat"
  9171. WHEN "4" : accid% = 4 : PRINT "1/8flat"
  9172. WHEN "5" : accid% = 5 : PRINT "nat"
  9173. WHEN "6" : accid% = 6 : PRINT "1/8shrp"
  9174. WHEN "7" : accid% = 7 : PRINT "1/4shrp"
  9175. WHEN "8" : accid% = 8 : PRINT "3/8shrp"
  9176. WHEN "9" : accid% = 9 : PRINT "shrp"
  9177. ENDCASE
  9178. COLOUR 0
  9179. PRINT " octave ";
  9180. COLOUR 3
  9181. CASE GET$ OF
  9182. WHEN "0" : octave% = 0 : PRINT "0"
  9183. WHEN "1" : octave% = 1 : PRINT "1"
  9184. WHEN "2" : octave% = 2 : PRINT "2"
  9185. WHEN "3" : octave% = 3 : PRINT "3"
  9186. WHEN "4" : octave% = 4 : PRINT "4"
  9187. WHEN "5" : octave% = 5 : PRINT "5"
  9188. WHEN "6" : octave% = 6 : PRINT "6"
  9189. WHEN "7" : octave% = 7 : PRINT "7"
  9190. WHEN "8" : octave% = 8 : PRINT "8"
  9191. ENDCASE
  9192. COLOUR 0
  9193. redpitches%(tt%,ttt%) = (note%*100)+(accid%*10)+octave%
  9194. NEXT
  9195. NEXT
  9196. redpitches$ = "y"
  9197. OTHERWISE
  9198. redpitches$ = "n"
  9199. FOR count% = 0 TO 9
  9200. IF numredpitches%(count%) <> 0 THEN redpitches$ = "y"
  9201. NEXT
  9202. ENDCASE
  9203. OTHERWISE redpitches$ = "n"
  9204. ENDCASE
  9205. PROCdisplay
  9206. :
  9207. WHEN "D","d" : PROCdisplayoptions : PROCdisplay
  9208. WHEN "R","r" : PROCremarks : PROCdisplay
  9209. WHEN "S","s" : PROCnamestaves : PROCdisplay
  9210. WHEN "K","k" : PROCchangeclef : PROCdisplay
  9211. WHEN "Q","q" :
  9212. CLS
  9213. PRINT '" Quickplay (by pressing P)"
  9214. PRINT " how many voices downwards"
  9215. INPUT" from top of screen "quickplay%
  9216. PROCdisplay
  9217. WHEN "P","p" :
  9218. CLS
  9219. PRINT' " (Voices are assigned to channels 1-8 "
  9220. PRINT " according to the order in which "
  9221. PRINT " they are typed into Play) "
  9222. PRINT' " Set the 8 channels to stereo "
  9223. PRINT " positions 12344567, keep mono default, "
  9224. PRINT " set the 8 channels to random positions "
  9225. PRINT " or define channels' stereo positions "
  9226. PRINT " (S/M/R/D) "
  9227. CASE GET$ OF
  9228. WHEN "S","s" :
  9229. STEREO 1, -127
  9230. STEREO 2, -79
  9231. STEREO 3, -47
  9232. STEREO 4, -15
  9233. STEREO 5, -15
  9234. STEREO 6, +16
  9235. STEREO 7, +48
  9236. STEREO 8, +80
  9237. WHEN "M","m" :
  9238. STEREO 1, -15
  9239. STEREO 2, -15
  9240. STEREO 3, -15
  9241. STEREO 4, -15
  9242. STEREO 5, -15
  9243. STEREO 6, -15
  9244. STEREO 7, -15
  9245. STEREO 8, -15
  9246. WHEN "D","d" :
  9247. CLS
  9248. PRINT '" Define positions for how many "
  9249. INPUT " channels "numchannels%
  9250. FOR count% = 1 TO numchannels%
  9251. PRINT' " Channel ";count%;" is set to which "
  9252. INPUT " stereo position of the 7 available "position%
  9253. CASE count% OF
  9254. WHEN 1 :
  9255. CASE position% OF
  9256. WHEN 1 : STEREO 1, -127
  9257. WHEN 2 : STEREO 1, -79
  9258. WHEN 3 : STEREO 1, -47
  9259. WHEN 4 : STEREO 1, -15
  9260. WHEN 5 : STEREO 1, +16
  9261. WHEN 6 : STEREO 1, +48
  9262. WHEN 7 : STEREO 1, +80
  9263. ENDCASE
  9264. WHEN 2 :
  9265. CASE position% OF
  9266. WHEN 1 : STEREO 2, -127
  9267. WHEN 2 : STEREO 2, -79
  9268. WHEN 3 : STEREO 2, -47
  9269. WHEN 4 : STEREO 2, -15
  9270. WHEN 5 : STEREO 2, +16
  9271. WHEN 6 : STEREO 2, +48
  9272. WHEN 7 : STEREO 2, +80
  9273. ENDCASE
  9274. WHEN 3 :
  9275. CASE position% OF
  9276. WHEN 1 : STEREO 3, -127
  9277. WHEN 2 : STEREO 3, -79
  9278. WHEN 3 : STEREO 3, -47
  9279. WHEN 4 : STEREO 3, -15
  9280. WHEN 5 : STEREO 3, +16
  9281. WHEN 6 : STEREO 3, +48
  9282. WHEN 7 : STEREO 3, +80
  9283. ENDCASE
  9284. WHEN 4 :
  9285. CASE position% OF
  9286. WHEN 1 : STEREO 4, -127
  9287. WHEN 2 : STEREO 4, -79
  9288. WHEN 3 : STEREO 4, -47
  9289. WHEN 4 : STEREO 4, -15
  9290. WHEN 5 : STEREO 4, +16
  9291. WHEN 6 : STEREO 4, +48
  9292. WHEN 7 : STEREO 4, +80
  9293. ENDCASE
  9294. WHEN 5 :
  9295. CASE position% OF
  9296. WHEN 1 : STEREO 5, -127
  9297. WHEN 2 : STEREO 5, -79
  9298. WHEN 3 : STEREO 5, -47
  9299. WHEN 4 : STEREO 5, -15
  9300. WHEN 5 : STEREO 5, +16
  9301. WHEN 6 : STEREO 5, +48
  9302. WHEN 7 : STEREO 5, +80
  9303. ENDCASE
  9304. WHEN 6 :
  9305. CASE position% OF
  9306. WHEN 1 : STEREO 6, -127
  9307. WHEN 2 : STEREO 6, -79
  9308. WHEN 3 : STEREO 6, -47
  9309. WHEN 4 : STEREO 6, -15
  9310. WHEN 5 : STEREO 6, +16
  9311. WHEN 6 : STEREO 6, +48
  9312. WHEN 7 : STEREO 6, +80
  9313. ENDCASE
  9314. WHEN 7 :
  9315. CASE position% OF
  9316. WHEN 1 : STEREO 7, -127
  9317. WHEN 2 : STEREO 7, -79
  9318. WHEN 3 : STEREO 7, -47
  9319. WHEN 4 : STEREO 7, -15
  9320. WHEN 5 : STEREO 7, +16
  9321. WHEN 6 : STEREO 7, +48
  9322. WHEN 7 : STEREO 7, +80
  9323. ENDCASE
  9324. WHEN 8 :
  9325. CASE position% OF
  9326. WHEN 1 : STEREO 8, -127
  9327. WHEN 2 : STEREO 8, -79
  9328. WHEN 3 : STEREO 8, -47
  9329. WHEN 4 : STEREO 8, -15
  9330. WHEN 5 : STEREO 8, +16
  9331. WHEN 6 : STEREO 8, +48
  9332. WHEN 7 : STEREO 8, +80
  9333. ENDCASE
  9334. ENDCASE
  9335. NEXT
  9336. WHEN "R","r" :
  9337. position% = RND(7)
  9338. CASE position% OF
  9339. WHEN 1 : STEREO 1, -127
  9340. WHEN 2 : STEREO 1, -79
  9341. WHEN 3 : STEREO 1, -47
  9342. WHEN 4 : STEREO 1, -15
  9343. WHEN 5 : STEREO 1, +16
  9344. WHEN 6 : STEREO 1, +48
  9345. WHEN 7 : STEREO 1, +80
  9346. ENDCASE
  9347. position% = RND(7)
  9348. CASE position% OF
  9349. WHEN 1 : STEREO 2, -127
  9350. WHEN 2 : STEREO 2, -79
  9351. WHEN 3 : STEREO 2, -47
  9352. WHEN 4 : STEREO 2, -15
  9353. WHEN 5 : STEREO 2, +16
  9354. WHEN 6 : STEREO 2, +48
  9355. WHEN 7 : STEREO 2, +80
  9356. ENDCASE
  9357. position% = RND(7)
  9358. CASE position% OF
  9359. WHEN 1 : STEREO 3, -127
  9360. WHEN 2 : STEREO 3, -79
  9361. WHEN 3 : STEREO 3, -47
  9362. WHEN 4 : STEREO 3, -15
  9363. WHEN 5 : STEREO 3, +16
  9364. WHEN 6 : STEREO 3, +48
  9365. WHEN 7 : STEREO 3, +80
  9366. ENDCASE
  9367. position% = RND(7)
  9368. CASE position% OF
  9369. WHEN 1 : STEREO 4, -127
  9370. WHEN 2 : STEREO 4, -79
  9371. WHEN 3 : STEREO 4, -47
  9372. WHEN 4 : STEREO 4, -15
  9373. WHEN 5 : STEREO 4, +16
  9374. WHEN 6 : STEREO 4, +48
  9375. WHEN 7 : STEREO 4, +80
  9376. ENDCASE
  9377. position% = RND(7)
  9378. CASE position% OF
  9379. WHEN 1 : STEREO 5, -127
  9380. WHEN 2 : STEREO 5, -79
  9381. WHEN 3 : STEREO 5, -47
  9382. WHEN 4 : STEREO 5, -15
  9383. WHEN 5 : STEREO 5, +16
  9384. WHEN 6 : STEREO 5, +48
  9385. WHEN 7 : STEREO 5, +80
  9386. ENDCASE
  9387. position% = RND(7)
  9388. CASE position% OF
  9389. WHEN 1 : STEREO 6, -127
  9390. WHEN 2 : STEREO 6, -79
  9391. WHEN 3 : STEREO 6, -47
  9392. WHEN 4 : STEREO 6, -15
  9393. WHEN 5 : STEREO 6, +16
  9394. WHEN 6 : STEREO 6, +48
  9395. WHEN 7 : STEREO 6, +80
  9396. ENDCASE
  9397. position% = RND(7)
  9398. CASE position% OF
  9399. WHEN 1 : STEREO 7, -127
  9400. WHEN 2 : STEREO 7, -79
  9401. WHEN 3 : STEREO 7, -47
  9402. WHEN 4 : STEREO 7, -15
  9403. WHEN 5 : STEREO 7, +16
  9404. WHEN 6 : STEREO 7, +48
  9405. WHEN 7 : STEREO 7, +80
  9406. ENDCASE
  9407. position% = RND(7)
  9408. CASE position% OF
  9409. WHEN 1 : STEREO 8, -127
  9410. WHEN 2 : STEREO 8, -79
  9411. WHEN 3 : STEREO 8, -47
  9412. WHEN 4 : STEREO 8, -15
  9413. WHEN 5 : STEREO 8, +16
  9414. WHEN 6 : STEREO 8, +48
  9415. WHEN 7 : STEREO 8, +80
  9416. ENDCASE
  9417. :
  9418. ENDCASE
  9419. PROCdisplay
  9420. OTHERWISE VDU 7 : PROCplaysubmenu
  9421. ENDCASE
  9422. :
  9423. ENDPROC
  9424. :
  9425. REM*******************************************
  9426. :
  9427. DEF PROClv
  9428. :
  9429. CLS
  9430. lvdata%() = 0
  9431. PRINT'" How many sound channels"
  9432. INPUT" are to generate lv "nlv%
  9433. IF nlv% = 0 THEN
  9434. lvdata%() = 0
  9435. ELSE
  9436. FOR count% = 1 TO nlv%
  9437. PRINT '" lv channel ";count%;" is to use"
  9438. PRINT " how many other channels?"
  9439. INPUT numchans%
  9440. FOR c% = 1 TO numchans%
  9441. PRINT '" of these, channel ";c%;" is channel"
  9442. INPUT ch%
  9443. lvdata%(count%,c%+1) = ch%
  9444. NEXT
  9445. lvdata%(count%,1) = count%
  9446. NEXT
  9447. ENDIF
  9448. :
  9449. PROCdisplay
  9450. :
  9451. ENDPROC
  9452. :
  9453. REM***********************************
  9454. :
  9455. DEF PROCloadwaveforms
  9456. :
  9457. CLS
  9458. IF waveload$ = "done" THEN
  9459. PROCwindow(20,71,60,35) : CLS
  9460. PRINT'" These waveforms have already been loaded"
  9461. PRINT " (press Ctrl-Shft to scroll down)"
  9462. VDU 14
  9463. FOR count% = 1 TO manywaves%
  9464. PRINT'wforms$(count%)
  9465. NEXT
  9466. VDU 15
  9467. PRINT' " Do you want to load a fresh group?"
  9468. CASE GET$ OF
  9469. WHEN "Y","y" : PRINT' " Press M then quit, to"
  9470. PRINT " flush present waveforms"
  9471. CASE GET$ OF
  9472. WHEN "M","m" : PROCawait
  9473. ENDCASE
  9474. OTHERWISE PROCdisplay
  9475. ENDCASE
  9476. ELSE
  9477. load$ = "new"
  9478. IF filename$ <> "" AND wforms$(1) <> "" THEN
  9479. PROCwindow(20,71,60,45)
  9480. PRINT'" The waveforms previously "
  9481. PRINT" loaded for this file were"
  9482. PRINT" (press Ctrl-Shift to scroll down)"
  9483. VDU 14
  9484. FOR count% = 1 TO manywaves%
  9485. PRINT'wforms$(count%)
  9486. NEXT
  9487. VDU 15
  9488. PRINT'" Do you want to reload"
  9489. PRINT " these or choose new ones (R/N)"
  9490. CASE GET$ OF
  9491. WHEN "R","r" : load$ = "previous"
  9492. OTHERWISE
  9493. ENDCASE
  9494. ENDIF
  9495. :
  9496. IF load$ = "new" THEN
  9497. :
  9498. PRINT '" load individually or from lists? (I/L) "
  9499. CASE GET$ OF
  9500. WHEN "I","i" :
  9501. PRINT '" How many waveforms do you want to load"
  9502. PRINT " (the maximum for this file is ";numwaves%;")"
  9503. INPUT manywaves%
  9504. FOR count% = 1 TO manywaves%
  9505. PRINT '" waveform ";count%;" is "
  9506. INPUT wform$
  9507. wforms$(count%) = wform$
  9508. NEXT
  9509. OTHERWISE
  9510. PRINT'" Sustaining insts A "
  9511. PRINT'" Percussion insts B "
  9512. PRINT'" Percussion insts C "
  9513. PRINT " (press A/B/C) "
  9514. CASE GET$ OF
  9515. WHEN "A","a" :
  9516. manywaves% = 19
  9517. wforms$(1) = "RecorderGb"
  9518. wforms$(2) = "PiccoloE"
  9519. wforms$(3) = "SaxSoprnoE"
  9520. wforms$(4) = "JapFlute"
  9521. wforms$(5) = "SaxBbTenrE"
  9522. wforms$(6) = "BugleC"
  9523. wforms$(7) = "Trombone1"
  9524. wforms$(8) = "Trumpet"
  9525. wforms$(9) = "EngHornGb"
  9526. wforms$(10) = "ClarinetBb"
  9527. wforms$(11) = "ClarVibEb"
  9528. wforms$(12) = "BassoonEb"
  9529. wforms$(13) = "FlugelHnEb"
  9530. wforms$(14) = "CornetEb"
  9531. wforms$(15) = "TubaGb"
  9532. wforms$(16) = "HiString"
  9533. wforms$(17) = "MidStrings"
  9534. wforms$(18) = "BassBowAb"
  9535. wforms$(19) = "SaxEbBarC"
  9536. WHEN "B","b" :
  9537. manywaves% = 19
  9538. wforms$(1) = "Harp1"
  9539. wforms$(2) = "Piano"
  9540. wforms$(3) = "Vibe"
  9541. wforms$(4) = "Timpani"
  9542. wforms$(5) = "TimpRollEb"
  9543. wforms$(6) = "Xylophone"
  9544. wforms$(7) = "TablaHi"
  9545. wforms$(8) = "BDPiloMute"
  9546. wforms$(9) = "Snare"
  9547. wforms$(10) = "TablaHi"
  9548. wforms$(11) = "CymRStRoll"
  9549. wforms$(12) = "CowBell"
  9550. wforms$(13) = "AcuBassAb1"
  9551. wforms$(14) = "GongSoft"
  9552. wforms$(15) = "RotoTomRev"
  9553. wforms$(16) = "HiHat"
  9554. wforms$(17) = "Maracas1"
  9555. wforms$(18) = "SimmonsBD1"
  9556. wforms$(19) = "HiHatFoot"
  9557. WHEN "C","c" :
  9558. manywaves% = 19
  9559. wforms$(1) = "CymSplshCa"
  9560. wforms$(2) = "BassBowAb"
  9561. wforms$(3) = "Bass"
  9562. wforms$(4) = "HiHat"
  9563. wforms$(5) = "HiHatFoot"
  9564. wforms$(6) = "Maracas1"
  9565. wforms$(7) = "CachichiTr"
  9566. wforms$(8) = "BDPiloMute"
  9567. wforms$(9) = "AcuBassAb1"
  9568. wforms$(10) = "SimmonsBD1"
  9569. wforms$(11) = "CymRideBel"
  9570. wforms$(12) = "CowBell"
  9571. wforms$(13) = "AcouBass"
  9572. wforms$(14) = "RotoTomRev"
  9573. wforms$(15) = "Castanets"
  9574. wforms$(16) = "ElecTom1"
  9575. wforms$(17) = "CymbalCrsh"
  9576. wforms$(18) = "CymRStRoll"
  9577. wforms$(19) = "Tomtom1"
  9578. ENDCASE
  9579. :
  9580. ENDCASE
  9581. :
  9582. ENDIF
  9583. :
  9584. *Dir HostFS::HardDisc4.$.CAC.CACvar.Voices
  9585. *RMLOAD WFS 500000
  9586. wavefilingsystem$ = "loaded"
  9587. :
  9588. FOR count% = 1 TO manywaves%
  9589. wave$ = wforms$(count%)
  9590. CASE wave$ OF
  9591. WHEN "BassBowAb" :
  9592. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9593. *WLOAD BassBowAb
  9594. *WINSTALL BassBowAb
  9595. WHEN "Vibe" :
  9596. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9597. *WLOAD Vibe
  9598. *WINSTALL Vibe
  9599. WHEN "AcouBass" :
  9600. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9601. *WLOAD AcouBass
  9602. *WINSTALL AcouBass
  9603. WHEN "BugleC" :
  9604. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9605. *WLOAD BugleC
  9606. *WINSTALL BugleC
  9607. WHEN "CornetEb" :
  9608. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9609. *WLOAD CornetEb
  9610. *WINSTALL CornetEb
  9611. WHEN "SaxEbBarC" :
  9612. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9613. *WLOAD SaxEbBarC
  9614. *WINSTALL SaxEbBarC
  9615. WHEN "SaxBbTenrE" :
  9616. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9617. *WLOAD SaxBbTenrE
  9618. *WINSTALL SaxBbTenrE
  9619. WHEN "BassoonEb" :
  9620. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9621. *WLOAD BassoonEb
  9622. *WINSTALL BassoonEb
  9623. WHEN "ClarinetBb" :
  9624. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9625. *WLOAD ClarinetBb
  9626. *WINSTALL ClarinetBb
  9627. WHEN "EngHornGb" :
  9628. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9629. *WLOAD EngHornGb
  9630. *WINSTALL EngHornGb
  9631. WHEN "MandolinDb" :
  9632. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9633. *WLOAD MandolinDb
  9634. *WINSTALL MandolinDb
  9635. WHEN "Piano2B" :
  9636. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9637. *WLOAD Piano2B
  9638. *WINSTALL Piano2B
  9639. WHEN "ClarVibEb" :
  9640. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9641. *WLOAD ClarVibEb
  9642. *WINSTALL ClarVibEb
  9643. WHEN "GtrDobroB" :
  9644. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9645. *WLOAD GtrDobroB
  9646. *WINSTALL GtrDobroB
  9647. WHEN "RecorderGb" :
  9648. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9649. *WLOAD RecorderGb
  9650. *WINSTALL RecorderGb
  9651. WHEN "FlugelHnEb" :
  9652. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9653. *WLOAD FlugelHnEb
  9654. *WINSTALL FlugelHnEb
  9655. WHEN "VceMmmGb23" :
  9656. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations3
  9657. *WLOAD VceMmmGb23
  9658. *WINSTALL VceMmmGb23
  9659. WHEN "VceMOooGb3" :
  9660. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations3
  9661. *WLOAD VceMOooGb3
  9662. *WINSTALL VceMOooGb3
  9663. WHEN "VceFemAahC" :
  9664. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations3
  9665. *WLOAD VceFemAahC
  9666. *WINSTALL VceFemAahC
  9667. WHEN "VceFMmmGb4" :
  9668. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations3
  9669. *WLOAD VceFMmmGb4
  9670. *WINSTALL VceFMmmGb4
  9671. WHEN "Bass" :
  9672. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.SoundSynth
  9673. *WLOAD Bass
  9674. *WINSTALL Bass
  9675. WHEN "ChurchBell" :
  9676. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.SoundSynth
  9677. *WLOAD ChurchBell
  9678. *WINSTALL ChurchBell
  9679. WHEN "GuiroFast" :
  9680. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9681. *WLOAD GuiroFast
  9682. *WINSTALL GuiroFast
  9683. WHEN "Clave" :
  9684. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9685. *WLOAD Clave
  9686. *WINSTALL Clave
  9687. WHEN "CowBell" :
  9688. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9689. *WLOAD CowBell
  9690. *WINSTALL CowBell
  9691. WHEN "CymbRideHd" :
  9692. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9693. *WLOAD CymbRideHd
  9694. *WINSTALL CymbRideHd
  9695. WHEN "AcGuitar1" :
  9696. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9697. *WLOAD AcGuitar1
  9698. *WINSTALL AcGuitar1
  9699. WHEN "CongaHi" :
  9700. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9701. *WLOAD CongaHi
  9702. *WINSTALL CongaHi
  9703. WHEN "DrumExplo" :
  9704. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9705. *WLOAD DrumExplo
  9706. *WINSTALL DrumExplo
  9707. WHEN "ElecTom1" :
  9708. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9709. *WLOAD ElecTom1
  9710. *WINSTALL ElecTom1
  9711. WHEN "Harp1" :
  9712. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9713. *WLOAD Harp1
  9714. *WINSTALL Harp1
  9715. WHEN "Harpsi" :
  9716. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9717. *WLOAD Harpsi
  9718. *WINSTALL Harpsi
  9719. WHEN "HiString" :
  9720. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9721. *WLOAD HiString
  9722. *WINSTALL HiString
  9723. WHEN "HonkyPiano" :
  9724. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9725. *WLOAD HonkyPiano
  9726. *WINSTALL HonkyPiano
  9727. WHEN "JapFlute" :
  9728. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9729. *WLOAD JapFlute
  9730. *WINSTALL JapFlute
  9731. WHEN "JazzOrgan" :
  9732. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9733. *WLOAD JazzOrgan
  9734. *WINSTALL JazzOrgan
  9735. WHEN "MidStrings" :
  9736. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9737. *WLOAD MidStrings
  9738. *WINSTALL MidStrings
  9739. WHEN "NoteArp1" :
  9740. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9741. *WLOAD NoteArp1
  9742. *WINSTALL NoteArp1
  9743. WHEN "SnareEcho" :
  9744. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9745. *WLOAD SnareEcho
  9746. *WINSTALL SnareEcho
  9747. WHEN "TablaHi" :
  9748. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9749. *WLOAD TablaHi
  9750. *WINSTALL TablaHi
  9751. WHEN "Timpani" :
  9752. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9753. *WLOAD Timpani
  9754. *WINSTALL Timpani
  9755. WHEN "Tomtom1" :
  9756. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9757. *WLOAD Tomtom1
  9758. *WINSTALL Tomtom1
  9759. WHEN "Trombone1" :
  9760. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9761. *WLOAD Trombone1
  9762. *WINSTALL Trombone1
  9763. WHEN "Trumpet" :
  9764. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9765. *WLOAD Trumpet
  9766. *WINSTALL Trumpet
  9767. WHEN "Xylophone" :
  9768. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9769. *WLOAD Xylophone
  9770. *WINSTALL Xylophone
  9771. WHEN "AcouGtr2B" :
  9772. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9773. *WLOAD AcouGtr2B
  9774. *WINSTALL AcouGtr2B
  9775. WHEN "AcuBassAb1" :
  9776. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9777. *WLOAD AcuBassAb1
  9778. *WINSTALL AcuBassAb1
  9779. WHEN "BagPipeG" :
  9780. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9781. *WLOAD BagPipeG
  9782. *WINSTALL BagPipeG
  9783. WHEN "BanjoChdBb" :
  9784. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9785. *WLOAD BanjoChdBb
  9786. *WINSTALL BanjoChdBb
  9787. WHEN "BazookiE" :
  9788. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9789. *WLOAD BazookiE
  9790. *WINSTALL BazookiE
  9791. WHEN "BellC" :
  9792. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9793. *WLOAD BellC
  9794. *WINSTALL BellC
  9795. WHEN "BrassEns1B" :
  9796. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9797. *WLOAD BrassEns1B
  9798. *WINSTALL BrassEns1B
  9799. WHEN "ClavichdBb" :
  9800. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9801. *WLOAD ClavichdBb
  9802. *WINSTALL ClavichdBb
  9803. WHEN "ClavinetBb" :
  9804. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9805. *WLOAD ClavinetBb
  9806. *WINSTALL ClavinetBb
  9807. WHEN "CornetEb" :
  9808. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9809. *WLOAD CornetEb
  9810. *WINSTALL CornetEb
  9811. WHEN "EnsWodAb45" :
  9812. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9813. *WLOAD EnsWodAb45
  9814. *WINSTALL EnsWodAb45
  9815. WHEN "EnsWodGb12" :
  9816. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9817. *WLOAD EnsWodGb12
  9818. *WINSTALL EnsWodGb12
  9819. WHEN "Glock2Ab5" :
  9820. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9821. *WLOAD Glock2Ab5
  9822. *WINSTALL Glock2Ab5
  9823. WHEN "GtMelobarC" :
  9824. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9825. *WLOAD GtMelobarC
  9826. *WINSTALL GtMelobarC
  9827. WHEN "GtWashbnBb" :
  9828. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9829. *WLOAD GtWashbnBb
  9830. *WINSTALL GtWashbnBb
  9831. WHEN "HarmonicaE" :
  9832. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9833. *WLOAD HarmonicaE
  9834. *WINSTALL HarmonicaE
  9835. WHEN "Jew'sHarpA" :
  9836. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9837. *WLOAD Jew'sHarpA
  9838. *WINSTALL Jew'sHarpA
  9839. WHEN "MusetteB" :
  9840. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9841. *WLOAD MusetteB
  9842. *WINSTALL MusetteB
  9843. WHEN "OboeGb" :
  9844. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9845. *WLOAD OboeGb
  9846. *WINSTALL OboeGb
  9847. WHEN "OrchHit2B" :
  9848. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9849. *WLOAD OrchHit2B
  9850. *WINSTALL OrchHit2B
  9851. WHEN "OrcSusBb23" :
  9852. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9853. *WLOAD OrcSusBb23
  9854. *WINSTALL OrcSusBb23
  9855. WHEN "PiccoloE" :
  9856. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9857. *WLOAD PiccoloE
  9858. *WINSTALL PiccoloE
  9859. WHEN "SaxSoprnoE" :
  9860. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9861. *WLOAD SaxSoprnoE
  9862. *WINSTALL SaxSoprnoE
  9863. WHEN "StrngThkBb" :
  9864. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9865. *WLOAD StrngThkBb
  9866. *WINSTALL StrngThkBb
  9867. WHEN "TubaGb" :
  9868. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
  9869. *WLOAD TubaGb
  9870. *WINSTALL TubaGb
  9871. WHEN "BassDrum" :
  9872. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.SoundSynth
  9873. *WLOAD BassDrum
  9874. *WINSTALL BassDrum
  9875. WHEN "HiHat" :
  9876. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.SoundSynth
  9877. *WLOAD HiHat
  9878. *WINSTALL HiHat
  9879. WHEN "OrcHit" :
  9880. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.SoundSynth
  9881. *WLOAD OrcHit
  9882. *WINSTALL OrcHit
  9883. WHEN "Piano" :
  9884. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.SoundSynth
  9885. *WLOAD Piano
  9886. *WINSTALL Piano
  9887. WHEN "Sax" :
  9888. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.SoundSynth
  9889. *WLOAD Sax
  9890. *WINSTALL Sax
  9891. WHEN "Snare" :
  9892. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.SoundSynth
  9893. *WLOAD Snare
  9894. *WINSTALL Snare
  9895. WHEN "Choir1" :
  9896. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9897. *WLOAD Choir1
  9898. *WINSTALL Choir1
  9899. WHEN "ChurOrgan" :
  9900. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9901. *WLOAD ChurOrgan
  9902. *WINSTALL ChurOrgan
  9903. WHEN "Opera" :
  9904. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9905. *WLOAD Opera
  9906. *WINSTALL Opera
  9907. WHEN "OrchChoir" :
  9908. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9909. *WLOAD OrchChoir
  9910. *WINSTALL OrchChoir
  9911. WHEN "OrganHit" :
  9912. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
  9913. *WLOAD OrganHit
  9914. *WINSTALL OrganHit
  9915. WHEN "AgogoAfric" :
  9916. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9917. *WLOAD AgogoAfric
  9918. *WINSTALL AgogoAfric
  9919. WHEN "AgogoBrazi" :
  9920. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9921. *WLOAD AgogoBrazi
  9922. *WINSTALL AgogoBrazi
  9923. WHEN "AgogoWood" :
  9924. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9925. *WLOAD AgogoWood
  9926. *WINSTALL AgogoWood
  9927. WHEN "BDGatedRev" :
  9928. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9929. *WLOAD BDGatedRev
  9930. *WINSTALL BDGatedRev
  9931. WHEN "BDMarching" :
  9932. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9933. *WLOAD BDMarching
  9934. *WINSTALL BDMarching
  9935. WHEN "BDPiloMute" :
  9936. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9937. *WLOAD BDPiloMute
  9938. *WINSTALL BDPiloMute
  9939. WHEN "Cabasa" :
  9940. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9941. *WLOAD Cabasa
  9942. *WINSTALL Cabasa
  9943. WHEN "Cachichi1" :
  9944. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9945. *WLOAD Cachichi1
  9946. *WINSTALL Cachichi1
  9947. WHEN "CachichiTr" :
  9948. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9949. *WLOAD CachichiTr
  9950. *WINSTALL CachichiTr
  9951. WHEN "Castanets" :
  9952. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9953. *WLOAD Castanets
  9954. *WINSTALL Castanets
  9955. WHEN "CongaMid" :
  9956. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9957. *WLOAD CongaMid
  9958. *WINSTALL CongaMid
  9959. WHEN "CongaSmCl" :
  9960. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9961. *WLOAD CongaSmCl
  9962. *WINSTALL CongaSmCl
  9963. WHEN "CymbalCrsh" :
  9964. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9965. *WLOAD CymbalCrsh
  9966. *WINSTALL CymbalCrsh
  9967. WHEN "CymRideBel" :
  9968. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9969. *WLOAD CymRideBel
  9970. *WINSTALL CymRideBel
  9971. WHEN "CymRStRoll" :
  9972. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9973. *WLOAD CymRStRoll
  9974. *WINSTALL CymRStRoll
  9975. WHEN "CymSplshCa" :
  9976. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9977. *WLOAD CymSplshCa
  9978. *WINSTALL CymSplshCa
  9979. WHEN "Flexitone" :
  9980. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9981. *WLOAD Flexitone
  9982. *WINSTALL Flexitone
  9983. WHEN "GongSoft" :
  9984. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9985. *WLOAD GongSoft
  9986. *WINSTALL GongSoft
  9987. WHEN "Gonza1" :
  9988. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9989. *WLOAD Gonza1
  9990. *WINSTALL Gonza1
  9991. WHEN "GuiroSlow" :
  9992. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9993. *WLOAD GuiroSlow
  9994. *WINSTALL GuiroSlow
  9995. WHEN "HandClaps" :
  9996. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  9997. *WLOAD HandClaps
  9998. *WINSTALL HandClaps
  9999. WHEN "HiHatFoot" :
  10000. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  10001. *WLOAD HiHatFoot
  10002. *WINSTALL HiHatFoot
  10003. WHEN "Maracas1" :
  10004. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  10005. *WLOAD Maracas1
  10006. *WINSTALL Maracas1
  10007. WHEN "Ratchet" :
  10008. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  10009. *WLOAD Ratchet
  10010. *WINSTALL Ratchet
  10011. WHEN "RotoTomRev" :
  10012. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  10013. *WLOAD RotoTomRev
  10014. *WINSTALL RotoTomRev
  10015. WHEN "SimmonsBD1" :
  10016. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  10017. *WLOAD SimmonsBD1
  10018. *WINSTALL SimmonsBD1
  10019. WHEN "SimmonsSn1" :
  10020. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  10021. *WLOAD SimmonsSn1
  10022. *WINSTALL SimmonsSn1
  10023. WHEN "SuperGong" :
  10024. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  10025. *WLOAD SuperGong
  10026. *WINSTALL SuperGong
  10027. WHEN "SynTom" :
  10028. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  10029. *WLOAD SynTom
  10030. *WINSTALL SynTom
  10031. WHEN "TimpCresBb" :
  10032. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  10033. *WLOAD TimpCresBb
  10034. *WINSTALL TimpCresBb
  10035. WHEN "TimpLowBb" :
  10036. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  10037. *WLOAD TimpLowBb
  10038. *WINSTALL TimpLowBb
  10039. WHEN "TimpRollEb" :
  10040. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  10041. *WLOAD TimpRollEb
  10042. *WINSTALL TimpRollEb
  10043. WHEN "TomRoll" :
  10044. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  10045. *WLOAD TomRoll
  10046. *WINSTALL TomRoll
  10047. WHEN "ToyHooter" :
  10048. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  10049. *WLOAD ToyHooter
  10050. *WINSTALL ToyHooter
  10051. WHEN "ToyWhistle" :
  10052. *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
  10053. *WLOAD ToyWhistle
  10054. *WINSTALL ToyWhistle
  10055. OTHERWISE VDU 7 : PRINT''" !!! ";wave$;" not loaded !!!"
  10056. PRINT'" Press C to continue loading"
  10057. CASE GET$ OF
  10058. WHEN"C","c" :
  10059. ENDCASE
  10060. ENDCASE
  10061. NEXT
  10062. waveload$ = "done"
  10063. ENDIF
  10064. *NoDir
  10065. PROCdisplay
  10066. ENDPROC
  10067. :
  10068. REM*********************************************
  10069. :
  10070. DEF PROCtempo
  10071. :
  10072. warning$ = "y"
  10073. CLS
  10074. PRINT'" Tempo to start at which bar "
  10075. INPUT " (for 1 type 0)"sbar%
  10076. PRINT'" and last until which bar "
  10077. INPUT " (for end type 0) "ebar%
  10078. IF ebar% = 0 THEN ebar% = nobars%
  10079. INPUT'" Tempo per bar is "MM%
  10080. :
  10081. REM convert durations to new tempo
  10082. FOR count% = 0 TO numparts%-1
  10083. FOR counter% = 0 TO numusedcells%(count%)
  10084. bar% = array%(counter%,0,count%)DIV10^6
  10085. IF bar% >= sbar% AND bar% <= ebar% THEN
  10086. oldtempo% = tempi%(bar%)
  10087. dur% = (array%(counter%,1,count%)DIV10)MOD10^3
  10088. converter = oldtempo%/MM%
  10089. dur = dur% * converter
  10090. fraction = ((dur*10)DIV1)MOD10
  10091. IF fraction>4 THEN dur% = dur+1 ELSE dur% = dur
  10092. IF dur% > 999 THEN
  10093. dur% = 998 : REM only 3 array cells available
  10094. IF warning$ = "y" THEN
  10095. VDU 7
  10096. CLS
  10097. PRINT'" This tempo change has resulted in some "
  10098. PRINT " voices, starting with voice ";count%+1;", being "
  10099. PRINT " given a duration which will now be "
  10100. PRINT " permanently too short (max = 50 secs). "
  10101. PRINT'" If this is okay simply continue, "
  10102. PRINT " otherwise now QUIT and reload the file. "
  10103. PRINT'" (to continue press a key - NOT Esc)"
  10104. CASE GET$ OF
  10105. WHEN "c" : warning$ = "n"
  10106. OTHERWISE warning$ = "n"
  10107. ENDCASE
  10108. ENDIF
  10109. ENDIF
  10110. part1% = (array%(counter%,1,count%)DIV10^4)*10^4
  10111. part2% = dur% * 10
  10112. part3% = array%(counter%,1,count%)MOD10
  10113. array%(counter%,1,count%) = part1% + part2% + part3%
  10114. ENDIF
  10115. NEXT
  10116. NEXT
  10117. :
  10118. FOR count% = sbar% TO ebar%
  10119. tempi%(count%) = MM%
  10120. NEXT
  10121. IF sbar% = 1 THEN tempi%(0) = MM% : REM anticipates a bug when bars 1 - 1 PLAYed
  10122. :
  10123. PROCdisplay
  10124. :
  10125. ENDPROC
  10126. :
  10127. REM************************************************
  10128. :
  10129. DEF PROCerror
  10130. :
  10131. CASE errorbeforedisplay$ OF
  10132. WHEN "y":
  10133. CLS
  10134. REPORT
  10135. PRINT " at line ";ERL
  10136. PRINT '" To continue press Q to quit"
  10137. PRINT '" then allocate more memory in "
  10138. PRINT '" Tasks before starting CAC "
  10139. CASE GET$ OF
  10140. WHEN "Q","q" : QUIT
  10141. ENDCASE
  10142. WHEN "debug" :
  10143. PROCwindow(20,69,60,54)
  10144. REPORT
  10145. PRINT " at line ";ERL
  10146. PRINT'" To continue press a key"
  10147. PRINT'" or to quit press Q "
  10148. CASE GET$ OF
  10149. WHEN "Q","q": QUIT
  10150. OTHERWISE
  10151. PROCdisplay
  10152. ENDCASE
  10153. OTHERWISE
  10154. PROCdisplay
  10155. ENDCASE
  10156. :
  10157. ENDPROC
  10158. :
  10159. REM*************************************************
  10160. :
  10161. DEF PROCtobegin
  10162. :
  10163. PRINT''''" Open a new file or an existing one? (N/E)"
  10164. CASE GET$ OF
  10165. WHEN "N","n" : PROCprearraysetup : PROCarraysetup
  10166. alterbeatsat% = (960/beatfactor%)/8 : PROCdisplay
  10167. WHEN "E","e" : PROCloadfile
  10168. OTHERWISE VDU 7 : PROCtobegin
  10169. ENDCASE
  10170. :
  10171. ENDPROC
  10172. :
  10173. REM************************************************
  10174. :
  10175. DEF PROCfunctionreception
  10176. :
  10177. PROCwindow(20,69,60,54)
  10178. CLS : OFF
  10179. :
  10180. PRINT'" Accel/rit A"
  10181. PRINT " Layered attacks L"
  10182. PRINT " Pitch string P"
  10183. PRINT " Pitch string 2 S"
  10184. PRINT " Pitch string 3 N"
  10185. PRINT " Pitch string 4 (trill/trem) T"
  10186. PRINT " pitch string 5 (pattern) R"
  10187. PRINT " pitch string 6 (equal steps) C"
  10188. PRINT " Interval string I"
  10189. PRINT " Distort D"
  10190. PRINT " Slave voice V"
  10191. PRINT " Double-stop B"
  10192. PRINT " Convert old envelopes E"
  10193. PRINT " Remove rogue notes O"
  10194. CASE GET$ OF
  10195. WHEN "A","a" : PROCfunctionprelude
  10196. WHEN "L","l" : PROCprelayeredattacks
  10197. WHEN "P","p" : PROCpitchstring
  10198. WHEN "S","s" : PROCpitchstring2
  10199. WHEN "N","n" : PROCpitchstring3
  10200. WHEN "T","t" : PROCpitchstring4
  10201. WHEN "R","r" : PROCpitchstring5
  10202. WHEN "C","c" : PROCpitchstring6
  10203. WHEN "I","i" : PROCpreintervalstring
  10204. WHEN "D","d" : distort$ = "ON" : CLS
  10205. PRINT''" Distort"
  10206. PRINT'" ATTACKS A"
  10207. PRINT " PITCHES P"
  10208. PRINT " DURATIONS D"
  10209. PRINT " AMPLITUDES M"
  10210. PRINT " ENVELOPES E"
  10211. PRINT " INFLECTIONS I"
  10212. CASE GET$ OF
  10213. WHEN "A","a" : distortpara$ = "attacks"
  10214. WHEN "P","p" : distortpara$ = "pitches"
  10215. WHEN "D","d" : distortpara$ = "durations"
  10216. WHEN "M","m" : distortpara$ = "amplitudes"
  10217. WHEN "E","e" : distortpara$ = "envelopes"
  10218. WHEN "I","i" : distortpara$ = "inflections"
  10219. OTHERWISE VDU 7 : PROCfunctionreception
  10220. ENDCASE
  10221. PROCcopy
  10222. WHEN "V","v" : quickslave$ = "n" : PROCslave
  10223. WHEN "B","b" : PROCdoublestop
  10224. WHEN "E", "e" : PROCconvertoldenvelopes
  10225. WHEN "O", "o" : PROCroguenotes
  10226. OTHERWISE VDU 7 : PROCfunctionreception
  10227. ENDCASE
  10228. ON
  10229. :
  10230. ENDPROC
  10231. :
  10232. REM**********************************************
  10233. :
  10234. DEF PROCprelayeredattacks
  10235. :
  10236. PROCwindow(20,69,70,55)
  10237. :
  10238. PRINT'" Re-run current settings, or edit current settings,"
  10239. PRINT" or create new ones, or load a file? (R/E/N/F)"
  10240. CASE GET$ OF
  10241. WHEN "R","r" : PROClayeredattacks
  10242. WHEN "E","e" : PROCeditlayers
  10243. WHEN "F","f" : PROCloadlayers :PROCeditlayers
  10244. OTHERWISE
  10245. filenamelyr$ = ""
  10246. :
  10247. chanceoflayer%(1) = 1 : numlayersections% = 1 : numlayerOKsects%() = 0
  10248. :
  10249. INPUT'" Total duration is how many bars "bars%
  10250. INPUT'" and how many beats "beats%
  10251. PROCalterbeats : totallength% = (bars%*960)+beats%
  10252. PRINT''" LAYERS -"
  10253. INPUT'" How many layers "numlayers%
  10254. PRINT'" Are the layers to appear equally frequently,"
  10255. PRINT " or in certain proportions (E/P) "
  10256. :
  10257. CASE GET$ OF
  10258. :
  10259. WHEN "P","p" :
  10260. PRINT'" Piece is divided into how many sections"
  10261. INPUT " of different contribution-proportions "numlayersections%
  10262. :
  10263. IF numlayersections% > 1 THEN
  10264. :
  10265. FOR count% = 2 TO numlayersections%
  10266. PRINT'" Section ";count%;" starts at beat number "
  10267. INPUT beats%
  10268. PROCalterbeats : startoflayersection%(count%) = beats%
  10269. NEXT
  10270. ENDIF
  10271. :
  10272. FOR count% = 1 TO numlayersections%
  10273. FOR count1% = 1 TO numlayers%
  10274. PRINT '"In section ";count%;", layer ";count1%;" has "
  10275. PRINT "how many proportions?"
  10276. INPUT shareoflayers%(count%,count1%)
  10277. NEXT
  10278. NEXT
  10279. :
  10280. OTHERWISE shareoflayers%() = 1
  10281. ENDCASE
  10282. :
  10283. PRINT''" Are number of attacks or unit durations to be"
  10284. PRINT " divided into sections or appearance numbers?"
  10285. CASE GET$ OF
  10286. WHEN "Y","y" : bysections$ = "y"
  10287. OTHERWISE bysections$ = "n"
  10288. ENDCASE
  10289. PRINT'" Are unit durations in any layers to be multiplied?"
  10290. CASE GET$ OF
  10291. WHEN "Y","y" : tomultiply$ = "y"
  10292. OTHERWISE tomultiply$ = "n"
  10293. ENDCASE
  10294. PRINT'" Are the occurance of layers to be controlled?"
  10295. CASE GET$ OF
  10296. WHEN "Y","y" : tooccur$ = "y"
  10297. OTHERWISE tooccur$ = "n"
  10298. ENDCASE
  10299. PRINT'" Does the number of attacks ever exceed 1?"
  10300. CASE GET$ OF
  10301. WHEN "Y","y" : exceed1$ = "y"
  10302. OTHERWISE exceed1$ = "n"
  10303. ENDCASE
  10304. :
  10305. FOR count% = 1 TO numlayers%
  10306. :
  10307. PRINT''" NUMBER OF ATTACKS -"
  10308. :
  10309. IF bysections$ = "y" THEN
  10310. PRINT'" In layer ";count%;" are the number of attacks controlled"
  10311. PRINT " by sections or by appearance number (S/A)"
  10312. CASE GET$ OF
  10313. WHEN "S","s" :
  10314. attackscontrol$(count%) = "S"
  10315. INPUT'" How many sections "numattackssections%(count%)
  10316. IF numattackssections%(count%) > 1 THEN
  10317. FOR count1% = 2 TO numattackssections%(count%)
  10318. PRINT'" (layer ";count%;") section ";count1%;" starts at beat"
  10319. INPUT beats%
  10320. PROCalterbeats : startofattackssection%(count%,count1%) = beats%
  10321. NEXT
  10322. ENDIF
  10323. :
  10324. IF exceed1$ = "y" THEN
  10325. FOR count1% = 1 TO numattackssections%(count%)
  10326. PRINT'" In layer ";count%;", section ";count1%;" the number"
  10327. PRINT" of attacks varies between..."
  10328. INPUT numattax%(count%,count1%,0)
  10329. INPUT" and..."numattax%(count%,count1%,1)
  10330. NEXT
  10331. ELSE numattax%() = 1
  10332. ENDIF
  10333. :
  10334. WHEN "A","a" :
  10335. attackscontrol$(count%) = "A"
  10336. INPUT'" How many 'sections' of appearances "numattackssections1%(count%)
  10337. IF numattackssections1%(count%) > 1 THEN
  10338. FOR count1% = 2 TO numattackssections1%(count%)
  10339. PRINT'" (layer ";count%;") section ";count1%;" starts at appearance "
  10340. INPUT startofattackssection1%(count%,count1%)
  10341. NEXT
  10342. ENDIF
  10343. :
  10344. IF exceed1$ = "y" THEN
  10345. FOR count1% = 1 TO numattackssections1%(count%)
  10346. PRINT'" In layer ";count%;", section ";count1%;" the number"
  10347. PRINT" of attacks varies between..."
  10348. INPUT numattax1%(count%,count1%,0)
  10349. INPUT" and... "numattax1%(count%,count1%,1)
  10350. NEXT
  10351. ELSE numattax1%() = 1
  10352. ENDIF
  10353. ENDCASE
  10354. :
  10355. ELSE
  10356. attackscontrol$(count%) = "S" : numattackssections%(count%) = 1
  10357. IF exceed1$ = "y" THEN
  10358. PRINT'" In layer ";count%;" the number"
  10359. PRINT" of attacks varies between "
  10360. INPUT numattax%(count%,1,0)
  10361. INPUT" and..."numattax%(count%,1,1)
  10362. ELSE numattax%() = 1
  10363. ENDIF
  10364. ENDIF
  10365. :
  10366. PRINT''" DURATIONS"
  10367. :
  10368. IF bysections$ = "y" THEN
  10369. :
  10370. PRINT'" In layer ";count%;" are the unit durations controlled"
  10371. PRINT" by sections or by appearance number (S/A)"
  10372. CASE GET$ OF
  10373. WHEN "S","s" :
  10374. durationscontrol$(count%) = "S"
  10375. INPUT'" How many sections "numdurationssections%(count%)
  10376. IF numdurationssections%(count%) > 1 THEN
  10377. FOR count1% = 2 TO numdurationssections%(count%)
  10378. PRINT'" (layer ";count%;") section ";count1%;" starts at beat "
  10379. INPUT beats%
  10380. PROCalterbeats : startofdurationssection%(count%,count1%) = beats%
  10381. NEXT
  10382. ENDIF
  10383. :
  10384. FOR count1% = 1 TO numdurationssections%(count%)
  10385. PRINT'" In layer ";count%;", section ";count1%;" the unit duration is"
  10386. INPUT beats%
  10387. PROCalterbeats : doorations%(count%,count1%) = beats%
  10388. NEXT
  10389. :
  10390. WHEN "A","a" :
  10391. durationscontrol$(count%) = "A"
  10392. INPUT'" How many 'sections' "numdurationssections1%(count%)
  10393. IF numdurationssections1%(count%) > 1 THEN
  10394. FOR count1% = 2 TO numdurationssections1%(count%)
  10395. PRINT'" (layer ";count%;") section ";count1%;" starts at appearance "
  10396. INPUT startofdurationssection1%(count%,count1%)
  10397. NEXT
  10398. ENDIF
  10399. FOR count1% = 1 TO numdurationssections1%(count%)
  10400. PRINT'" In layer ";count%;", section ";count1%;" the unit duration is "
  10401. INPUT beats%
  10402. PROCalterbeats : doorations1%(count%,count1%) = beats%
  10403. NEXT
  10404. ENDCASE
  10405. :
  10406. ELSE durationscontrol$(count%) = "S" : numdurationssections%(count%) = 1
  10407. PRINT'" In layer ";count%;" the unit duration is"
  10408. INPUT beats%
  10409. PROCalterbeats : doorations%(count%,1) = beats%
  10410. ENDIF
  10411. :
  10412. IF tomultiply$ = "y" THEN
  10413. :
  10414. PRINT'" Do you want the unit duration to be multiplied"
  10415. PRINT " by a given series of values (Y/N) "
  10416. CASE GET$ OF
  10417. WHEN "Y","y" :
  10418. multiplier$(count%) = "Y"
  10419. PRINT'" starting fresh at each appearance or irrespective (F/I) "
  10420. CASE GET$ OF
  10421. WHEN "F","f" :
  10422. multipliermode$(count%) = "F"
  10423. OTHERWISE multipliermode$(count%) = "I"
  10424. ENDCASE
  10425. :
  10426. PRINT'" How many values "
  10427. INPUT numvalues%(count%)
  10428. FOR count1% = 1 TO numvalues%(count%)
  10429. PRINT'" value ";count1%;" is "
  10430. INPUT values(count%,count1%)
  10431. NEXT
  10432. OTHERWISE multiplier$(count%) = "N"
  10433. ENDCASE
  10434. :
  10435. ELSE multiplier$(count%) = "N"
  10436. ENDIF
  10437. :
  10438. IF tooccur$ = "y" THEN
  10439. :
  10440. PRINT'" Do you want this layer to reoccur according"
  10441. PRINT " to minimum and maximum intervals (eg to"
  10442. PRINT " control phrase-lengths)?"
  10443. CASE GET$ OF
  10444. WHEN "Y","y" :
  10445. INPUT'" How many sections of this "numlayerOKsects%(count%)
  10446. FOR count1% = 1 TO numlayerOKsects%(count%)
  10447. IF numlayerOKsects%(count%) > 1 THEN
  10448. PRINT'" section ";count1%;" begins at beat "
  10449. INPUT beats%
  10450. PROCalterbeats : x% = beats%
  10451. ELSE x% = 0
  10452. ENDIF
  10453. PRINT'" in this section the layer should NOT reoccur"
  10454. PRINT" until at least how many beats from the"
  10455. PRINT" end of its previous occurence?"
  10456. INPUT beats%
  10457. PROCalterbeats : y% = beats%
  10458. PRINT'" but SHOULD be made to reoccur after how "
  10459. PRINT" many beats from the end of its previous"
  10460. PRINT" occurence?"
  10461. INPUT beats%
  10462. PROCalterbeats : z% = beats%
  10463. layersOK%(count%,count1%,0) = x%
  10464. layersOK%(count%,count1%,1) = y%
  10465. layersOK%(count%,count1%,2) = z%
  10466. NEXT
  10467. OTHERWISE
  10468. ENDCASE
  10469. :
  10470. ENDIF
  10471. :
  10472. NEXT
  10473. :
  10474. ENDCASE
  10475. :
  10476. PROClayeredattacks
  10477. :
  10478. ENDPROC
  10479. :
  10480. REM**************************************************
  10481. :
  10482. DEF PROClayeredattacks
  10483. :
  10484. REM line below to come BEFORE the loop
  10485. cellsused% = 0 : attacks1%() = 0 : layer% = 0 : appearances%() = 0
  10486. valuescounter%() = 1 : layerends%() = 0
  10487. :
  10488. REPEAT
  10489. REM WHICH LAYER (loop starts here)
  10490. layer1% = layer%
  10491. layerends%(layer1%) = attacks1%(cellsused%)
  10492. :
  10493. REM fill OKtouselayers%() according to which section you're in
  10494. :
  10495. FOR count% = 1 TO numlayers%
  10496. IF numlayerOKsects%(count%) > 0 THEN
  10497. FOR counter% = 1 TO numlayerOKsects%(count%)
  10498. IF attacks1%(cellsused%) >= layersOK%(count%,counter%,0) THEN
  10499. OKtouselayers%(count%,0) = layerends%(count%) + layersOK%(count%,counter%,1)
  10500. OKtouselayers%(count%,1) = layerends%(count%) + layersOK%(count%,counter%,2)
  10501. ENDIF
  10502. NEXT
  10503. ENDIF
  10504. NEXT
  10505. :
  10506. REM use any layers due
  10507. FOR count% = 1 TO numlayers%
  10508. IF numlayerOKsects%(count%) > 0 THEN
  10509. IF attacks1%(cellsused%) >= OKtouselayers%(count%,1) THEN layer% = count%
  10510. ENDIF
  10511. NEXT
  10512. :
  10513. IF layer1% = layer% THEN
  10514. :
  10515. REPEAT
  10516. :
  10517. REM fill layershare%() according to which section you're in
  10518. FOR count% = 1 TO numlayersections%
  10519. :
  10520. IF attacks1%(cellsused%) >= startoflayersection%(count%) THEN
  10521. FOR count1% = 1 TO numlayers%
  10522. layershare%(count1%) = shareoflayers%(count%,count1%)
  10523. NEXT
  10524. ENDIF
  10525. NEXT
  10526. :
  10527. FOR count% = 1 TO numlayers%
  10528. chanceoflayer%(count%+1) = chanceoflayer%(count%)+layershare%(count%)
  10529. NEXT
  10530. x% = RND((chanceoflayer%(numlayers%+1))-1)
  10531. FOR count% = 1 TO numlayers%
  10532. IF x% >= chanceoflayer%(count%) THEN layer% = count%
  10533. NEXT
  10534. :
  10535. REM exclude layers coming too soon
  10536. IF numlayerOKsects%(layer%) > 0 THEN
  10537. IF attacks1%(cellsused%) < OKtouselayers%(layer%,0) THEN layerOK$ = "n" ELSE layerOK$ = "y"
  10538. ELSE layerOK$ = "y"
  10539. ENDIF
  10540. UNTIL layer% <> layer1% AND layerOK$ = "y"
  10541. :
  10542. ENDIF
  10543. appearances%(layer%) += 1
  10544. :
  10545. REM NUMBER OF ATTACKS
  10546. IF attackscontrol$(layer%) = "S" THEN
  10547. FOR count% = 1 TO numattackssections%(layer%)
  10548. IF attacks1%(cellsused%) >= startofattackssection%(layer%,count%) THEN
  10549. a% = numattax%(layer%,count%,0) : b% = numattax%(layer%,count%,1)
  10550. IF (b%-a%) = 0 THEN
  10551. noattax% = 1
  10552. ELSE
  10553. noattax% = RND((b%-a%)+1)
  10554. ENDIF
  10555. noattax% += (a%-1)
  10556. ENDIF
  10557. NEXT
  10558. ELSE
  10559. FOR count% = 1 TO numattackssections1%(layer%)
  10560. IF appearances%(layer%) >= startofattackssection1%(layer%,count%) THEN
  10561. a% = numattax1%(layer%,count%,0) : b% = numattax1%(layer%,count%,1)
  10562. IF (b%-a%) = 0 THEN
  10563. noattax% = 1
  10564. ELSE
  10565. noattax% = RND((b%-a%)+1)
  10566. ENDIF
  10567. noattax% += (a%-1)
  10568. ENDIF
  10569. NEXT
  10570. ENDIF
  10571. :
  10572. IF durationscontrol$(layer%) = "S" THEN
  10573. FOR count% = 1 TO numdurationssections%(layer%)
  10574. IF attacks1%(cellsused%) >= startofdurationssection%(layer%,count%) THEN
  10575. duration% = doorations%(layer%,count%)
  10576. ENDIF
  10577. NEXT
  10578. ELSE
  10579. FOR count% = 1 TO numdurationssections1%(layer%)
  10580. IF appearances%(layer%) >= startofdurationssection1%(layer%,count%) THEN
  10581. duration% = doorations1%(layer%,count%)
  10582. ENDIF
  10583. NEXT
  10584. ENDIF
  10585. :
  10586. IF multiplier$(layer%) = "N" THEN
  10587. FOR count% = 1 TO noattax%
  10588. attacks1%(cellsused%+1) = attacks1%(cellsused%)+duration%
  10589. cellsused% += 1
  10590. NEXT
  10591. ELSE
  10592. IF multipliermode$(layer%) = "F" THEN
  10593. FOR count% = 1 TO noattax%
  10594. attacks1%(cellsused%+1)=attacks1%(cellsused%)+(duration%*values(layer%,count%))
  10595. cellsused% += 1
  10596. NEXT
  10597. ELSE
  10598. FOR count% = 1 TO noattax%
  10599. attacks1%(cellsused%+1)=attacks1%(cellsused%)+(duration%*values(layer%,valuescounter%(layer%)))
  10600. cellsused% += 1
  10601. valuescounter%(layer%) += 1
  10602. IF valuescounter%(layer%) > numvalues%(layer%) THEN valuescounter%(layer%) = 1
  10603. NEXT
  10604. ENDIF
  10605. ENDIF
  10606. :
  10607. UNTIL attacks1%(cellsused%) >= totallength%
  10608. manyattacks% = cellsused%+1
  10609. :
  10610. PRINT'" Do you want to save these settings?"
  10611. CASE GET$ OF
  10612. WHEN "Y","y" : PROCsavelayers
  10613. OTHERWISE
  10614. ENDCASE
  10615. :
  10616. method$ = "raw" : PROCinsertattacks
  10617. :
  10618. ENDPROC
  10619. :
  10620. REM*********************************************************
  10621. :
  10622. DEF PROCconvertsamplenote
  10623. :
  10624. pitchclass% = samplenote% DIV 100
  10625. CASE pitchclass% OF
  10626. WHEN 0 : eighthtone% = 1
  10627. WHEN 1 : eighthtone% = 9
  10628. WHEN 2 : eighthtone% = 17
  10629. WHEN 3 : eighthtone% = 21
  10630. WHEN 4 : eighthtone% = 29
  10631. WHEN 5 : eighthtone% = 37
  10632. WHEN 6 : eighthtone% = 45
  10633. ENDCASE
  10634. octave% = samplenote% MOD 10
  10635. eighthtone% += (octave%*48)
  10636. accidental% = ((samplenote% MOD 100)DIV10)-1
  10637. eighthtone% += accidental%
  10638. samplenote% = eighthtone%
  10639. ENDPROC
  10640. :
  10641. REM*******************************************
  10642. :
  10643. DEF PROCconvertsimplenote
  10644. :
  10645. IF simplenote% > 2 THEN oct% = 0
  10646. IF simplenote% > 50 THEN oct% = 1
  10647. IF simplenote% > 98 THEN oct% = 2
  10648. IF simplenote% > 146 THEN oct% = 3
  10649. IF simplenote% > 194 THEN oct% = 4
  10650. IF simplenote% > 242 THEN oct% = 5
  10651. IF simplenote% > 290 THEN oct% = 6
  10652. IF simplenote% > 338 THEN oct% = 7
  10653. IF simplenote% > 386 THEN oct% = 8
  10654. :
  10655. WHILE simplenote% > 50
  10656. simplenote% -= 48
  10657. ENDWHILE
  10658. :
  10659. CASE simplenote% OF
  10660. WHEN 3 : pitch% = 3
  10661. WHEN 4 : pitch% = 4
  10662. WHEN 5 : pitch% = 5
  10663. WHEN 6 : pitch% = 6
  10664. WHEN 7 : pitch% = 7
  10665. WHEN 8 : pitch% = 8
  10666. WHEN 9 : pitch% = 11
  10667. WHEN 10 : pitch% = 12
  10668. WHEN 11 : pitch% = 13
  10669. WHEN 12 : pitch% = 14
  10670. WHEN 13 : pitch% = 15
  10671. WHEN 14 : pitch% = 16
  10672. WHEN 15 : pitch% = 17
  10673. WHEN 16 : pitch% = 18
  10674. WHEN 17 : pitch% = 21
  10675. WHEN 18 : pitch% = 22
  10676. WHEN 19 : pitch% = 23
  10677. WHEN 20 : pitch% = 24
  10678. WHEN 21 : pitch% = 25
  10679. WHEN 22 : pitch% = 26
  10680. WHEN 23 : pitch% = 27
  10681. WHEN 24 : pitch% = 34
  10682. WHEN 25 : pitch% = 35
  10683. WHEN 26 : pitch% = 36
  10684. WHEN 27 : pitch% = 37
  10685. WHEN 28 : pitch% = 38
  10686. WHEN 29 : pitch% = 39
  10687. WHEN 30 : pitch% = 42
  10688. WHEN 31 : pitch% = 43
  10689. WHEN 32 : pitch% = 44
  10690. WHEN 33 : pitch% = 45
  10691. WHEN 34 : pitch% = 46
  10692. WHEN 35 : pitch% = 47
  10693. WHEN 36 : pitch% = 48
  10694. WHEN 37 : pitch% = 51
  10695. WHEN 38 : pitch% = 52
  10696. WHEN 39 : pitch% = 53
  10697. WHEN 40 : pitch% = 54
  10698. WHEN 41 : pitch% = 55
  10699. WHEN 42 : pitch% = 56
  10700. WHEN 43 : pitch% = 57
  10701. WHEN 44 : pitch% = 58
  10702. WHEN 45 : pitch% = 61
  10703. WHEN 46 : pitch% = 62
  10704. WHEN 47 : pitch% = 63
  10705. WHEN 48 : pitch% = 64
  10706. WHEN 49 : pitch% = 65
  10707. WHEN 50 : pitch% = 66
  10708. ENDCASE
  10709. :
  10710. simplenote% = (pitch%*10)+oct%
  10711. ENDPROC
  10712. :
  10713. REM**************************************
  10714. :
  10715. :
  10716. DEF PROCpitchstring
  10717. :
  10718. PROCwindow(20,25,70,35)
  10719. :
  10720. :
  10721. PRINT'" Create a new pitch string or edit the"
  10722. PRINT " current one, or load a file (N/E/F)"
  10723. CASE GET$ OF
  10724. WHEN "E","e" : loadstring$ = "n" :PROCeditpitchstring
  10725. WHEN "F","f" : loadstring$ = "y" :PROCeditpitchstring
  10726. OTHERWISE
  10727. ENDCASE
  10728. :
  10729. filenamestg$ = ""
  10730. contoursequences%() = 0
  10731. transpositionsequences%() = 0
  10732. octavesequences%() = 0
  10733. PRINT'" Total number of notes in the"
  10734. INPUT " pitch string (inc. sample) "numpitches%
  10735. PRINT'" Is the grid semi, quarter or eighth-tone (S/Q/E) "
  10736. PRINT'" (0 = semi) "
  10737. CASE GET$ OF
  10738. WHEN "S","s" : grid$ = "s"
  10739. WHEN "Q","q" : grid$ = "q"
  10740. WHEN "E","e" : grid$ = "e"
  10741. OTHERWISE grid$ = "s"
  10742. ENDCASE
  10743. CLS
  10744. :
  10745. PRINT'" SAMPLE "
  10746. INPUT'" How many notes in the sample? "samplesize%
  10747. FOR count% = 1 TO samplesize%
  10748. PRINT'" note ";count%;" is pitchclass ";
  10749. COLOUR 1
  10750. CASE GET$ OF
  10751. WHEN "C","c" : samplenote% = 0 : PRINT "C"
  10752. WHEN "D","d" : samplenote% = 1 : PRINT "D"
  10753. WHEN "E","e" : samplenote% = 2 : PRINT "E"
  10754. WHEN "F","f" : samplenote% = 3 : PRINT "F"
  10755. WHEN "G","g" : samplenote% = 4 : PRINT "G"
  10756. WHEN "A","a" : samplenote% = 5 : PRINT "A"
  10757. WHEN "B","b" : samplenote% = 6 : PRINT "B"
  10758. ENDCASE
  10759. samplenote% = samplenote%*100
  10760. COLOUR 0
  10761. PRINT " accidental ";
  10762. COLOUR 1
  10763. CASE GET$ OF
  10764. WHEN "1" : samplenote% += 10 : PRINT "flat"
  10765. WHEN "2" : samplenote% += 20 : PRINT "3/8 flat"
  10766. WHEN "3" : samplenote% += 30 : PRINT "1/4 flat"
  10767. WHEN "4" : samplenote% += 40 : PRINT "1/8 flat"
  10768. WHEN "5" : samplenote% += 50 : PRINT "nat"
  10769. WHEN "6" : samplenote% += 60 : PRINT "1/8 shrp"
  10770. WHEN "7" : samplenote% += 70 : PRINT "1/4 shrp"
  10771. WHEN "8" : samplenote% += 80 : PRINT "3/8 shrp"
  10772. WHEN "9" : samplenote% += 90 : PRINT "shrp"
  10773. ENDCASE
  10774. COLOUR 0
  10775. samplenote% += 5
  10776. PROCconvertsamplenote
  10777. sample%(count%) = samplenote%
  10778. :
  10779. NEXT
  10780. :
  10781. CLS
  10782. PRINT'" OCTAVE SEQUENCES"
  10783. PRINT'" How many different sections of"
  10784. INPUT " octave sequences are there "octavesections%
  10785. IF octavesections% > 1 THEN
  10786. FOR count% = 2 TO octavesections%
  10787. PRINT'" section ";count%;" begins at note number "
  10788. INPUT x%
  10789. octavesequences%(count%,0,0) = x%
  10790. NEXT
  10791. ENDIF
  10792. :
  10793. FOR count% = 1 TO octavesections%
  10794. FOR pitch% = 0 TO 47
  10795. entry$ = "n"
  10796. IF pitch% MOD 4 = 0 AND grid$<>"s" THEN entry$ = "y"
  10797. IF (pitch%-2)MOD4 = 0 THEN entry$ = "y"
  10798. IF (pitch%-1)MOD2 = 0 AND grid$ = "e" THEN entry$ = "y"
  10799. IF entry$ = "y" THEN
  10800. PRINT '"In section ";count%;" the sequence of octaves for ";
  10801. COLOUR 1 : PRINT pitchnames$(pitch%)
  10802. COLOUR 0 : PRINT "has how many elements "
  10803. INPUT e%
  10804. PRINT""
  10805. octavesequences%(count%,pitch%+1,0) = e%
  10806. FOR counter% = 1 TO e%
  10807. PRINT " element ";counter%;
  10808. INPUT " is octave "o%
  10809. octavesequences%(count%,pitch%+1,counter%) = o%
  10810. NEXT
  10811. ENDIF
  10812. NEXT
  10813. NEXT
  10814. :
  10815. CLS
  10816. PRINT'" TRANSPOSITION LEVELS"
  10817. PRINT'" How many different sections of"
  10818. INPUT" transposition are there "transpositionsections%
  10819. IF transpositionsections% > 1 THEN
  10820. FOR count% = 2 TO transpositionsections%
  10821. PRINT'" Section ";count%;
  10822. INPUT " begins at note number "n%
  10823. transpositionsequences%(count%,0) = n%
  10824. PRINT" and transposes up/down by how many ";
  10825. CASE grid$ OF
  10826. WHEN "e" : PRINT "eighthtones" : INPUT " (+/- 1 etc) "x%
  10827. transpositionsequences%(count%,1) = x%
  10828. WHEN "q" : PRINT "quartertones" : INPUT " (+/- 1 etc) "x%
  10829. transpositionsequences%(count%,1) = x% * 2
  10830. WHEN "s" : PRINT "semitones" : INPUT " (+/- 1 etc) "x%
  10831. transpositionsequences%(count%,1) = x% * 4
  10832. ENDCASE
  10833. NEXT
  10834. ENDIF
  10835. :
  10836. CLS
  10837. PRINT'" CONTOUR SEQUENCES"
  10838. PRINT'" How many different sections of "
  10839. INPUT " contour sequences are there "contoursections%
  10840. IF contoursections%>1 THEN
  10841. FOR count% = 2 TO contoursections%
  10842. PRINT'" Section ";count%;
  10843. INPUT " begins at note number "n%
  10844. contoursequences%(count%,0) = n%
  10845. NEXT
  10846. ENDIF
  10847. :
  10848. FOR count% = 1 TO contoursections%
  10849. PRINT'" In section ";count%;
  10850. INPUT " there are how many contours "c%
  10851. contoursequences%(count%,1) = c%
  10852. PRINT""
  10853. FOR counter% = 1 TO c%
  10854. PRINT " number ";counter%;
  10855. INPUT " is contour "contoor%
  10856. contoursequences%(count%,counter%+1) = contoor%
  10857. NEXT
  10858. NEXT
  10859. :
  10860. contoursize% = 0 : seriesnote% = 1 : samplenote% = 0
  10861. contoursequence% = 1 : transpositionsequence% = 1
  10862. octavesequence% = 1 : transpositionsequences%(1,1) = 0
  10863. contourloop% = 0 : octaveloop%() = 0
  10864. :
  10865. REPEAT
  10866. seriesnote% += contoursize%
  10867. IF seriesnote% >= contoursequences%(contoursequence%+1,0) AND contoursequences%(contoursequence%+1,0) <> 0 THEN
  10868. contoursequence% += 1
  10869. contourloop% = 0
  10870. ENDIF
  10871. :
  10872. contourloop% += 1
  10873. IF contourloop% > contoursequences%(contoursequence%,1) THEN contourloop% = 1
  10874. contour% = contoursequences%(contoursequence%,contourloop%+1)
  10875. contoursize% = contours%(contour%,0)
  10876. :
  10877. IF seriesnote% >= transpositionsequences%(transpositionsequence%+1,0) AND transpositionsequences%(transpositionsequence%+1,0) <> 0 THEN
  10878. transpositionsequence% += 1
  10879. ENDIF
  10880. transposition% = transpositionsequences%(transpositionsequence%,1)
  10881. :
  10882. FOR count% = 1 TO contoursize%
  10883. samplenote% += 1
  10884. IF samplenote% > samplesize% THEN samplenote% = 1
  10885. group%(count%) = sample%(samplenote%) + transposition%
  10886. NEXT
  10887. :
  10888. IF seriesnote% >= octavesequences%(octavesequence%+1,0,0) AND octavesequences%(octavesequence%+1,0,0) <> 0 THEN
  10889. octavesequence% += 1
  10890. octaveloop%() = 0
  10891. ENDIF
  10892. :
  10893. FOR count% = 1 TO contoursize%
  10894. pitchclass% = group%(count%)
  10895. REPEAT
  10896. pitchclass% -= 48
  10897. UNTIL pitchclass% < 51
  10898. pitchclass% -= 2
  10899. octaveloop%(pitchclass%) += 1
  10900. IF octaveloop%(pitchclass%) > octavesequences%(octavesequence%,pitchclass%,0) THEN octaveloop%(pitchclass%) = 1
  10901. oxtave% = octavesequences%(octavesequence%,pitchclass%,octaveloop%(pitchclass%))
  10902. group%(count%) = (pitchclass%+2) + (48*oxtave%)
  10903. NEXT
  10904. :
  10905. IF contoursize% > 1 THEN
  10906. REPEAT
  10907. FOR count% = 1 TO (contoursize%-1)
  10908. IF group%(count%) >= group%(count%+1) THEN
  10909. save% = group%(count%)
  10910. group%(count%) = group%(count%+1)
  10911. group%(count%+1) = save%
  10912. ENDIF
  10913. NEXT
  10914. no% = 0
  10915. FOR count% = 1 TO (contoursize%-1)
  10916. IF group%(count%) > group%(count%+1) THEN no% = 1
  10917. NEXT
  10918. UNTIL no% = 0
  10919. ENDIF
  10920. :
  10921. FOR count% = 1 TO contoursize%
  10922. simplenote% = group%(contours%(contour%,count%))
  10923. PROCconvertsimplenote
  10924. pitches%((seriesnote%+count%)-1) = simplenote%
  10925. NEXT
  10926. :
  10927. UNTIL ((seriesnote%+contoursize%)-1) >= numpitches%
  10928. :
  10929. FOR count% = 0 TO numpitches%-1 : pitches%(count%) = pitches%(count%+1) : NEXT
  10930. PRINT'" Do you want to save this pitch string?"
  10931. CASE GET$ OF
  10932. WHEN "Y","y","+" : PROCsavepitchstring
  10933. OTHERWISE
  10934. ENDCASE
  10935. :
  10936. PROCinsertpitches
  10937. :
  10938. ENDPROC
  10939. :
  10940. REM*******************************************************
  10941. :
  10942. DEF PROCcopy
  10943. :
  10944. CLS : OFF
  10945. repeatposit$ = "n"
  10946. IF distort$ = "OFF" THEN dothis$ = "YES"
  10947. IF distort$ = "ON" THEN
  10948. IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
  10949. ENDIF
  10950. IF dothis$ = "YES" THEN
  10951. PRINT'" Copy one note - C "
  10952. PRINT " Copy passage - c "
  10953. PRINT " Move one note - M "
  10954. PRINT " Move passage - m "
  10955. PRINT " Extract - E "
  10956. PRINT " Copy rhythm - R "
  10957. PRINT " Save - S "
  10958. PRINT " Import - I "
  10959. CASE GET$ OF
  10960. WHEN "c" : copymove$ = "C" : savevoice$ = "N" : justone$ = "n"
  10961. WHEN "m" : copymove$ = "M" : savevoice$ = "N" : justone$ = "n"
  10962. WHEN "C" : copymove$ = "C" : savevoice$ = "N" : justone$ = "y"
  10963. WHEN "M" : copymove$ = "M" : savevoice$ = "N" : justone$ = "y"
  10964. WHEN "E","e" :
  10965. CLS : PRINT'" Copy-extract or move-extract? (C/M) "
  10966. CASE GET$ OF
  10967. WHEN "C","c" : copymove$ = "EC" : justone$ = "n"
  10968. OTHERWISE copymove$ = "EM": justone$ = "n"
  10969. ENDCASE
  10970. savevoice$ = "N"
  10971. WHEN "R","r" : PROCcopyrhythm
  10972. WHEN "S","s" : copymove$ = "C" : savevoice$ = "Y"
  10973. WHEN "I","i" : copymove$ = "C" : savevoice$ = "N" : PROCimportvoice
  10974. OTHERWISE
  10975. copymove$ = "C" : savevoice$ = "N" : justone$ = "n"
  10976. ENDCASE
  10977. ELSE copymove$ = "C"
  10978. ENDIF
  10979. :
  10980. PROCcopy2
  10981. IF quickextract$ = "y" THEN quickextract$ = "n"
  10982. :
  10983. ENDPROC
  10984. :
  10985. *******************************************************************
  10986. :
  10987. DEF PROCcopy2
  10988. :
  10989. PROCwindow(20,69,67,54)
  10990. CLS
  10991. :
  10992. IF quickcopy$ = "n" THEN
  10993. :
  10994. IF screenvoices$ = "n" THEN
  10995. INPUT'" Which voice? (0 = 1) "voice%
  10996. IF voice% = 0 THEN PROCpressenter
  10997. ELSE
  10998. PRINT'" Which screen voice "
  10999. CASE GET$ OF
  11000. WHEN "1" : voice% = 1
  11001. WHEN "2" : voice% = 2
  11002. WHEN "3" : voice% = 3
  11003. OTHERWISE PROCpressenter
  11004. ENDCASE
  11005. ENDIF
  11006. :
  11007. IF copymove$ = "EC" OR copymove$ = "EM" THEN
  11008. IF screenvoices$ = "y" THEN extractvoice% = displayvoices%(startv%+voice%-1) ELSE extractvoice% = voice%
  11009. ENDIF : REM copymove$
  11010. :
  11011. IF screenvoices$ = "y" THEN voice% = displayvoices%(startv%+voice%-1)
  11012. voice% -= 1
  11013. samevoice% = voice%
  11014. :
  11015. CLS
  11016. INPUT'" Starting at bar "copystartbar%
  11017. IF copystartbar% = 0 THEN
  11018. copystartbar% = holdbar1% : copystartbeat% = holdbeat1% : repeatposit$ = "y"
  11019. ENDIF
  11020. holdbar% = copystartbar%
  11021. holdbar1% = copystartbar%
  11022. IF repeatposit$ = "y" THEN
  11023. PRINT'" bar ";copystartbar%;" beat ";copystartbeat%;"?"
  11024. PRINT'" (for OK press 0, if not OK press X)"
  11025. CASE GET$ OF
  11026. WHEN"X","x" : PROCcopy
  11027. OTHERWISE
  11028. ENDCASE
  11029. ELSE
  11030. INPUT" beat "beats%
  11031. PROCalterbeats : copystartbeat% = beats%
  11032. holdbeat% = copystartbeat%
  11033. holdbeat1% = copystartbeat%
  11034. ENDIF : REM repeatposit$
  11035. :
  11036. IF justone$ = "n" THEN
  11037. PRINT'" Ending at bar "
  11038. PRINT '" (for last bar press 0, for previous "
  11039. INPUT " last bar press 0 twice) "copyendbar%
  11040. IF copyendbar% > 0 THEN savethisbar% = copyendbar%
  11041. IF copyendbar% > 0 THEN
  11042. INPUT " beat "beats%
  11043. PROCalterbeats : copyendbeat% = beats% : savethisbeats% = beats%
  11044. :
  11045. ELSE
  11046. thing$ = INKEY$(50)
  11047. IF thing$ <> "" THEN
  11048. copyendbar% = savethisbar% : copyendbeat% = savethisbeats%
  11049. COLOUR 3
  11050. PRINT'" bar ";copyendbar%;" beat ";copyendbeat%;"?"
  11051. COLOUR 0
  11052. PRINT '" (for OK press 0, if not OK press X)"
  11053. CASE GET$ OF
  11054. WHEN "X","x" : PROCcopy2
  11055. OTHERWISE
  11056. ENDCASE
  11057. ENDIF : REM thing$
  11058. :
  11059. ENDIF : REM copyendbar%
  11060. :
  11061. ELSE
  11062. copyendbar% = copystartbar%
  11063. copyendbeat% = copystartbeat%
  11064. ENDIF : REM justone$
  11065. :
  11066. IF copymove$ = "EC" OR copymove$ = "EM" THEN PROCextractinfo
  11067. :
  11068. ELSE : REM quickcopy$
  11069. :
  11070. IF screenvoices$ = "n" THEN
  11071. :
  11072. IF copysuccessively$ = "n" THEN
  11073. INPUT ' ' " Which voice? (0 = top) "voice%
  11074. :
  11075. IF voice% = 0 THEN
  11076. :
  11077. IF nodelay$ = "y" THEN voice% = displayvoices%(startv%) ELSE PROCpressenter
  11078. :
  11079. ENDIF : REM voice%
  11080. :
  11081. ELSE PROCcopysuccessively: REM copysuccessively
  11082. :
  11083. ENDIF : REM copysuccessively
  11084. :
  11085. ELSE : REM screenvoices$
  11086. PRINT'" Which screen voice "
  11087. CASE GET$ OF
  11088. WHEN "1" : voice% = 1
  11089. WHEN "2" : voice% = 2
  11090. WHEN "3" : voice% = 3
  11091. WHEN "x" : voice% = 1
  11092. OTHERWISE PROCpressenter
  11093. ENDCASE
  11094. ENDIF : REM screenvoices$
  11095. :
  11096. IF copymove$ = "EC" OR copymove$ = "EM" THEN
  11097. IF screenvoices$ = "y" THEN extractvoice% = displayvoices%(startv%+voice%-1) ELSE extractvoice% = voice%
  11098. ENDIF : REM copymove$
  11099. :
  11100. IF screenvoices$ = "y" AND quickextract$ = "n" THEN voice% = displayvoices%(startv%+voice%-1)
  11101. voice% -= 1 : samevoice% = voice%
  11102. :
  11103. PRINT ' " note number "
  11104. PRINT ' " (for first type 0) "
  11105. CASE GET$ OF
  11106. WHEN "1" : along% = 1
  11107. WHEN "2" : along% = 2
  11108. WHEN "3" : along% = 3
  11109. WHEN "4" : along% = 4
  11110. WHEN "5" : along% = 5
  11111. WHEN "6" : along% = 6
  11112. WHEN "7" : along% = 7
  11113. WHEN "8" : along% = 8
  11114. WHEN "9" : along% = 9
  11115. WHEN "0" : along% = 0
  11116. ENDCASE
  11117. :
  11118. IF along% <> 0 THEN
  11119. :
  11120. another$ = INKEY$(waitafterfirst%)
  11121. IF another$ <> "" THEN
  11122. CASE another$ OF
  11123. WHEN "1" : along% = (along%*10)+1
  11124. WHEN "2" : along% = (along%*10)+2
  11125. WHEN "3" : along% = (along%*10)+3
  11126. WHEN "4" : along% = (along%*10)+4
  11127. WHEN "5" : along% = (along%*10)+5
  11128. WHEN "6" : along% = (along%*10)+6
  11129. WHEN "7" : along% = (along%*10)+7
  11130. WHEN "8" : along% = (along%*10)+8
  11131. WHEN "9" : along% = (along%*10)+9
  11132. WHEN "0" : along% = (along%*10)+0
  11133. ENDCASE
  11134. ENDIF : REM another$
  11135. :
  11136. another$ = INKEY$(waitaftersecond%)
  11137. IF another$ <> "" THEN
  11138. CASE another$ OF
  11139. WHEN "1" : along% = (along%*10)+1
  11140. WHEN "2" : along% = (along%*10)+2
  11141. WHEN "3" : along% = (along%*10)+3
  11142. WHEN "4" : along% = (along%*10)+4
  11143. WHEN "5" : along% = (along%*10)+5
  11144. WHEN "6" : along% = (along%*10)+6
  11145. WHEN "7" : along% = (along%*10)+7
  11146. WHEN "8" : along% = (along%*10)+8
  11147. WHEN "9" : along% = (along%*10)+9
  11148. WHEN "0" : along% = (along%*10)+0
  11149. ENDCASE
  11150. ENDIF : REM another$
  11151. :
  11152. COLOUR 3 : PRINT ' along% : COLOUR 0
  11153. :
  11154. ENDIF : REM along% <> 0
  11155. :
  11156. IF along% = 0 THEN along% = 1
  11157. along%-=1
  11158. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  11159. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  11160. holdbar% = copystartbar%
  11161. holdbeat% = copystartbeat%
  11162. IF justone$ = "n" THEN
  11163. :
  11164. PRINT'" to note number "
  11165. :
  11166. IF firstasking$ = "y" THEN
  11167. IF copytoend$ = "y" THEN PRINT'" (for last type 0) "
  11168. ELSE
  11169. :
  11170. IF copytoend$ = "y" THEN
  11171. PRINT'" (for last type 0) "
  11172. ELSE
  11173. PRINT'" (for ";prevlast%;" type 0) "
  11174. ENDIF : REM copytoend$
  11175. :
  11176. ENDIF : REM firstasking$
  11177. :
  11178. CASE GET$ OF
  11179. WHEN "1" : along% = 1
  11180. WHEN "2" : along% = 2
  11181. WHEN "3" : along% = 3
  11182. WHEN "4" : along% = 4
  11183. WHEN "5" : along% = 5
  11184. WHEN "6" : along% = 6
  11185. WHEN "7" : along% = 7
  11186. WHEN "8" : along% = 8
  11187. WHEN "9" : along% = 9
  11188. WHEN "0" :
  11189. IF copytoend$ = "y" THEN
  11190. along% = 0
  11191. ELSE
  11192. along% = prevlast% : usedprev$ = "y"
  11193. ENDIF : REM copytoend$
  11194. OTHERWISE
  11195. IF copytoend$ = "y" THEN
  11196. along% = 0
  11197. ELSE
  11198. IF firstasking$ = "y" THEN
  11199. CLS : COLOUR 3
  11200. PRINT'" COPYING TO END NOT ENABLED "
  11201. COLOUR 0
  11202. PRINT '" (press a key to continue)"
  11203. prevlast% = 0
  11204. CASE GET$ OF
  11205. ENDCASE
  11206. ELSE
  11207. along% = prevlast% : usedprev$ = "y"
  11208. ENDIF : REM firstasking$
  11209. ENDIF : REM copytoend$
  11210. ENDCASE
  11211. firstasking$ = "n"
  11212. :
  11213. IF along% <> 0 AND usedprev$ = "n" THEN
  11214. :
  11215. another$ = INKEY$(waitafterfirst%)
  11216. IF another$ <> "" THEN
  11217. CASE another$ OF
  11218. WHEN "1" : along% = (along%*10)+1
  11219. WHEN "2" : along% = (along%*10)+2
  11220. WHEN "3" : along% = (along%*10)+3
  11221. WHEN "4" : along% = (along%*10)+4
  11222. WHEN "5" : along% = (along%*10)+5
  11223. WHEN "6" : along% = (along%*10)+6
  11224. WHEN "7" : along% = (along%*10)+7
  11225. WHEN "8" : along% = (along%*10)+8
  11226. WHEN "9" : along% = (along%*10)+9
  11227. WHEN "0" : along% = (along%*10)+0
  11228. ENDCASE
  11229. ENDIF : REM another$
  11230. :
  11231. another$ = INKEY$(waitaftersecond%)
  11232. IF another$ <> "" THEN
  11233. CASE another$ OF
  11234. WHEN "1" : along% = (along%*10)+1
  11235. WHEN "2" : along% = (along%*10)+2
  11236. WHEN "3" : along% = (along%*10)+3
  11237. WHEN "4" : along% = (along%*10)+4
  11238. WHEN "5" : along% = (along%*10)+5
  11239. WHEN "6" : along% = (along%*10)+6
  11240. WHEN "7" : along% = (along%*10)+7
  11241. WHEN "8" : along% = (along%*10)+8
  11242. WHEN "9" : along% = (along%*10)+9
  11243. WHEN "0" : along% = (along%*10)+0
  11244. ENDCASE
  11245. ENDIF : REM another$
  11246. :
  11247. prevlast% = along%
  11248. COLOUR 3 : PRINT ' along% : COLOUR 0
  11249. wait$ = INKEY$(50)
  11250. :
  11251. ENDIF : REM along% <> 0
  11252. :
  11253. usedprev$ = "n"
  11254. :
  11255. IF along% = 0 THEN
  11256. copyendbar% = 0
  11257. ELSE
  11258. along%-=1
  11259. copyendbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  11260. copyendbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  11261. ENDIF : REM along$
  11262. ELSE
  11263. copyendbar% = copystartbar%
  11264. copyendbeat% = copystartbeat%
  11265. ENDIF : REM justone$ = "n"
  11266. :
  11267. IF copymove$ = "EC" OR copymove$ = "EM" THEN PROCextractinfo
  11268. :
  11269. ENDIF : REM quickcopy$ = "n"
  11270. :
  11271. :
  11272. value% = (copystartbar%*10^3)+copystartbeat%
  11273. IF value% <= array%(0,0,voice%)DIV10^3 THEN
  11274. startatcell% = 0
  11275. ELSE
  11276. PROCsearch(value%)
  11277. startatcell% = startcell%
  11278. ENDIF : REM value%
  11279. :
  11280. IF copyendbar% = 0 THEN
  11281. endatcell% = numusedcells%(voice%) - 1
  11282. ELSE
  11283. value% = (copyendbar%*10^3)+copyendbeat%
  11284. IF value% >= array%(numusedcells%(voice%)-1,0,voice%)DIV10^3 THEN
  11285. endatcell% = numusedcells%(voice%) - 1
  11286. ELSE
  11287. PROCsearch(value%)
  11288. IF shunt$ = "N" THEN endatcell% = startcell% ELSE endatcell% = startcell% - 1
  11289. ENDIF : REM value%
  11290. :
  11291. ENDIF : REM copyendbar%
  11292. :
  11293. manyattacks% = endatcell% - startatcell% + 1
  11294. REM create 'gap' between beat-of-bar and first actual attack
  11295. carrybars% = (array%(startatcell%,0,voice%)DIV10^6)-copystartbar%
  11296. carrybeats% = ((array%(startatcell%,0,voice%)DIV10^3)MOD10^3)-copystartbeat%
  11297. attacks1%(0) = (carrybars%*960)+carrybeats%
  11298. :
  11299. IF copymove$ = "C" OR copymove$ = "M" THEN
  11300. FOR count% = 0 TO (manyattacks%-1)
  11301. IF count% > 0 THEN
  11302. carrybars% = (array%(startatcell%+count%,0,voice%)DIV10^6)-(array%(startatcell%+count%-1,0,voice%)DIV10^6)
  11303. carrybeats% = ((array%(startatcell%+count%,0,voice%)DIV10^3)MOD10^3)-((array%(startatcell%+count%-1,0,voice%)DIV10^3)MOD10^3)
  11304. attacks1%(count%) = attacks1%(count%-1) + ((carrybars%*960)+carrybeats%)
  11305. ENDIF : REM count% > 0
  11306. :
  11307. pitches%(count%) = array%(startatcell%+count%,0,voice%)MOD10^3
  11308. dur% = (array%(startatcell%+count%,1,voice%)DIV10)MOD10^3
  11309. brrr% = array%(startatcell%+count%,0,voice%)DIV10^6 : PROCreconvertdur
  11310. durations%(count%) = dur%
  11311. amplitudes%(count%) = (array%(startatcell%+count%,1,voice%))MOD10
  11312. envelopes%(count%) = (array%(startatcell%+count%,2,voice%))DIV10^2
  11313. glissandos%(count%) = array%(startatcell%+count%,1,voice%)DIV10^4
  11314. inflections%(count%) = array%(startatcell%+count%,2,voice%)MOD10^2
  11315. NEXT
  11316. ELSE
  11317. :
  11318. PROCextract
  11319. :
  11320. ENDIF : REM copymove$
  11321. :
  11322. IF copymove$ = "M" THEN
  11323. numnotes% = manyattacks% : startcell% = startatcell%
  11324. FOR count% = startcell% TO (startcell%+(numnotes%-1))
  11325. FOR counter% = 0 TO 1
  11326. barno% = (array%(count%,0,voice%)DIV10^6)-counter%
  11327. beatnum% = ((array%(count%,0,voice%)DIV10^3)MOD10^3)
  11328. :
  11329. group1start% = (disarray%(barno%,0,voice%)DIV10^7)*beatfactor%
  11330. group1end% = group1start% + (((disarray%(barno%,0,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
  11331. IF beatnum%+(960*counter%) >= group1start% AND beatnum%+(960*counter%) <= group1end% THEN
  11332. disarray%(barno%,0,voice%) = disarray%(barno%,0,voice%)MOD10^3
  11333. ENDIF : REM beatnum%
  11334. :
  11335. group2start% = ((disarray%(barno%,0,voice%)DIV10)MOD10^2)*beatfactor%
  11336. group2end% = group2start%+((((disarray%(barno%,0,voice%)MOD10)*10)+(disarray%(barno%,1,voice%)DIV10^8))*beatfactor%)-1
  11337. IF beatnum%+(960*counter%) >= group2start% AND beatnum%+(960*counter%) <= group2end% THEN
  11338. disarray%(barno%,0,voice%) = (disarray%(barno%,0,voice%)DIV10^3)*10^3
  11339. disarray%(barno%,1,voice%) = disarray%(barno%,1,voice%)MOD10^6
  11340. ENDIF : REM beatnum%
  11341. group3start%=((disarray%(barno%,1,voice%)DIV10^4)MOD10^2)*beatfactor%
  11342. group3end% = group3start% + (((disarray%(barno%,1,voice%)MOD10^4)DIV10^2)*beatfactor%)-1
  11343. IF beatnum%+(960*counter%) >= group3start% AND beatnum%+(960*counter%) <= group3end% THEN
  11344. disarray%(barno%,1,voice%) = (disarray%(barno%,1,voice%)DIV10^6)*10^6
  11345. ENDIF : REM beatnum%
  11346. group4start% = (disarray%(barno%,2,voice%)DIV10^7)*beatfactor%
  11347. group4end% = group4start%+(((disarray%(barno%,2,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
  11348. IF beatnum%+(960*counter%) >= group4start% AND beatnum%+(960*counter%) <= group4end% THEN
  11349. disarray%(barno%,2,voice%) = disarray%(barno%,2,voice%)MOD10^3
  11350. ENDIF : REM beatnum%
  11351. group5start% = ((disarray%(barno%,2,voice%)MOD10^3)DIV10)*beatfactor%
  11352. group5end% = group5start%+((((disarray%(barno%,2,voice%)MOD10)*10)+(disarray%(barno%,3,voice%)DIV10^8))*beatfactor%)-1
  11353. IF beatnum%+(960*counter%) >= group5start% AND beatnum%+(960*counter%) <= group5end% THEN
  11354. disarray%(barno%,2,voice%) = (disarray%(barno%,2,voice%)DIV10^3)*10^3
  11355. disarray%(barno%,3,voice%) = disarray%(barno%,3,voice%)MOD10^6
  11356. ENDIF : REM beatnum%
  11357. group6start% = ((disarray%(barno%,3,voice%)DIV10^4)MOD10^2)*beatfactor%
  11358. group6end% = group6start% + (((disarray%(barno%,3,voice%)DIV10^2)MOD10^2)*beatfactor%)-1
  11359. IF beatnum%+(960*counter%) >= group6start% AND beatnum%+(960*counter%) <= group6end% THEN
  11360. disarray%(barno%,3,voice%)=(disarray%(barno%,3,voice%)DIV10^6)*10^6
  11361. ENDIF : REM beatnum%
  11362. :
  11363. NEXT
  11364. :
  11365. NEXT : REM count%
  11366. :
  11367. PROCshuntleft(startcell%,numnotes%)
  11368. ENDIF : REM copymove$
  11369. :
  11370. IF distort$ = "OFF" THEN
  11371. numpitches% = manyattacks% : numdurations% = manyattacks% : numamplitudes% = manyattacks%
  11372. numenvelopes% = manyattacks% : numinflections% = manyattacks% : method$ = "raw" : copyit$ = "ON"
  11373. IF seeequalize$ = "y" THEN seeequalizey$ = "y"
  11374. IF seereorder$ = "y" THEN seereordery$ = "y"
  11375. PROCinsertattacks
  11376. ELSE
  11377. PROCdistort
  11378. ENDIF : REM distort$
  11379. :
  11380. $ = "n" : quickextract$ = "n" : usedprev$ = "n"
  11381. ENDPROC
  11382. :
  11383. REM**************************************************************
  11384. :
  11385. DEF PROCdistort
  11386. :
  11387. CLS
  11388. CASE distortpara$ OF
  11389. WHEN "attacks" :
  11390. :
  11391. INPUT'" How many bands? (0 = previous values) "answer%
  11392. IF answer% <> 0 THEN numbands% = answer%
  11393. :
  11394. IF answer% > 0 THEN
  11395. IF answer% = 1 THEN
  11396. PRINT'" intervals to be multiplied by"
  11397. PRINT" random percentages between..."
  11398. PRINT '"(for ";distortparas%(1,2);
  11399. INPUT" press 0) "number%
  11400. IF number% = 0 THEN distortparas%(1,2) = distortparas%(1,2) ELSE distortparas%(1,2) = number%
  11401. PRINT'" and...(for ";distortparas%(1,3);
  11402. INPUT " press 0) "number%
  11403. IF number% = 0 THEN distortparas%(1,3) = distortparas%(1,3) ELSE distortparas%(1,3) = number%
  11404. distortparas%(1,0) = 0 : distortparas%(1,1) = 960000
  11405. :
  11406. ELSE
  11407. :
  11408. FOR count% = 1 TO numbands%
  11409. CLS
  11410. PRINT'" Band ";count%;"'s intervals are between (incl.) "
  11411. INPUT'" bars..."bars%
  11412. INPUT " beats..."beats%
  11413. PROCalterbeats
  11414. distortparas%(count%,0) = (bars%*960) + beats%
  11415. INPUT " and bars..."bars%
  11416. INPUT " beats..."beats%
  11417. PROCalterbeats
  11418. distortparas%(count%,1) = (bars%*960) + beats%
  11419. PRINT'" which are to be multiplied by random "
  11420. INPUT" percentages between..."distortparas%(count%,2)
  11421. INPUT" and..."distortparas%(count%,3)
  11422. NEXT
  11423. :
  11424. ENDIF
  11425. ELSE
  11426. COLOUR 1
  11427. PRINT'" values as last time?"
  11428. PRINT'distortparas%(1,0);" - ";distortparas%(1,1);" ";distortparas%(1,2);"% - ";distortparas%(1,3)"%"
  11429. IF numbands% > 1 THEN PRINT distortparas%(2,0);" - ";distortparas%(2,1);" ";distortparas%(2,2);"% - ";distortparas%(2,3)"%"
  11430. COLOUR 0
  11431. CASE GET$ OF
  11432. WHEN"y","Y":
  11433. OTHERWISE
  11434. ENDCASE
  11435. ENDIF
  11436. :
  11437. nextinterval% = attacks1%(1) - attacks1%(0)
  11438. FOR count% = 1 TO manyattacks% - 1
  11439. :
  11440. interval% = nextinterval%
  11441. :
  11442. band% = 0
  11443. FOR counter% = 1 TO numbands%
  11444. IF interval% >= distortparas%(counter%,0) AND interval% <= distortparas%(counter%,1) THEN band% = counter%
  11445. NEXT
  11446. :
  11447. IF band% > 0 THEN percentage1% = distortparas%(band%,2) ELSE percentage1% = 100
  11448. IF band% > 0 THEN percentage2% = distortparas%(band%,3) ELSE percentage2% = 100
  11449. range% = percentage2%-percentage1%
  11450. IF range% = 0 THEN
  11451. percentage3 = percentage1%
  11452. ELSE
  11453. percentage3 = RND(range%) + percentage1% - 1
  11454. percentage3 += (RND(99))/100
  11455. ENDIF
  11456. :
  11457. nextinterval% = attacks1%(count%+1) - attacks1%(count%)
  11458. attacks1%(count%) = attacks1%(count%-1) + ((interval%*percentage3)DIV100)
  11459. :
  11460. NEXT
  11461. :
  11462. method$ = "raw" : copyit$ = "ON" : distort$ = "OFF"
  11463. PROCinsertattacks
  11464. :
  11465. WHEN "pitches" :
  11466. :
  11467. PROCwindow(20,69,70,54)
  11468. PRINT'" Is the grid semi-, quarter- or eighthtone (S/Q/E)"
  11469. PRINT'" (0 = previous) "
  11470. CASE GET$ OF
  11471. WHEN "S","s" : distortgrid$ = "S"
  11472. WHEN "Q","q" : distortgrid$ = "Q"
  11473. WHEN "E","e" : distortgrid$ = "E"
  11474. OTHERWISE distortgrid$ = distortgrid$
  11475. ENDCASE
  11476. :
  11477. INPUT'" How many bands? (0 = 1) "numbands%
  11478. IF numbands% = 0 THEN numbands% = 1
  11479. :
  11480. IF numbands% = 1 THEN
  11481. distortparas%(1,0) = 0
  11482. distortparas%(1,1) = 1000
  11483. PRINT'" Pitches are to be raised/lowered randomly by"
  11484. PRINT " between how many ";
  11485. CASE distortgrid$ OF
  11486. WHEN "S" : PRINT"semitones (-1,1 etc) "
  11487. INPUT" (11 = previous) "distortparas%(1,2)
  11488. IF distortparas%(1,2) = 11 THEN
  11489. distortparas%(1,2) = previousdistort1%
  11490. COLOUR 1
  11491. PRINT' previousdistort1%
  11492. COLOUR 0
  11493. ENDIF
  11494. WHEN "Q" : PRINT"quartertones (-1,1 etc) "
  11495. INPUT" (0 = previous) "distortparas%(1,2)
  11496. IF distortparas%(1,2) = 0 THEN
  11497. distortparas%(1,2) = previousdistort1%
  11498. COLOUR 1
  11499. PRINT' previousdistort1%
  11500. COLOUR 0
  11501. ENDIF
  11502. WHEN "E" : INPUT"eighthtones (-1,1 etc) "distortparas%(1,2)
  11503. ENDCASE
  11504. PRINT '" and how many ";
  11505. CASE distortgrid$ OF
  11506. WHEN "S" : INPUT"semitones "distortparas%(1,3)
  11507. IF distortparas%(1,3) = 11 THEN
  11508. distortparas%(1,3) = previousdistort2%
  11509. COLOUR 1
  11510. PRINT ' previousdistort2%
  11511. COLOUR 0
  11512. pause$ = INKEY$(50)
  11513. ENDIF
  11514. WHEN "Q" : INPUT"quartertones "distortparas%(1,3)
  11515. IF distortparas%(1,3) = 0 THEN
  11516. distortparas%(1,3) = previousdistort2%
  11517. COLOUR 1
  11518. PRINT' previousdistort2%
  11519. COLOUR 0
  11520. pause$ = INKEY$(50)
  11521. ENDIF
  11522. WHEN "E" : INPUT"eighthtones "distortparas%(1,3)
  11523. ENDCASE
  11524. previousdistort1% = distortparas%(1,2)
  11525. previousdistort2% = distortparas%(1,3)
  11526. :
  11527. ELSE
  11528. :
  11529. FOR count% = 1 TO numbands%
  11530. PRINT'" Band ";count%;" is from the ";
  11531. FOR counter% = 0 TO 1
  11532. IF counter% = 0 THEN PRINT"lower note" ELSE PRINT'"to the upper note"
  11533. PRINT'" pitchclass ";
  11534. COLOUR 1
  11535. CASE GET$ OF
  11536. WHEN "C","c" : note% = 4 : PRINT "C"
  11537. WHEN "D","d" : note% = 12 : PRINT "D"
  11538. WHEN "E","e" : note% = 20 : PRINT "E"
  11539. WHEN "F","f" : note% = 24 : PRINT "F"
  11540. WHEN "G","g" : note% = 32 : PRINT "G"
  11541. WHEN "A","a" : note% = 40 : PRINT "A"
  11542. WHEN "B","b" : note% = 48 : PRINT "B"
  11543. OTHERWISE VDU 7 : PROCdistort
  11544. ENDCASE
  11545. COLOUR 0
  11546. PRINT" accidental ";
  11547. COLOUR 1
  11548. CASE GET$ OF
  11549. WHEN "1" : note% -= 4 : PRINT "flat"
  11550. WHEN "2" : note% -= 3 : PRINT "3/8 flat"
  11551. WHEN "3" : note% -= 2 : PRINT "1/4 flat"
  11552. WHEN "4" : note% -= 1 : PRINT "1/8 flat"
  11553. WHEN "5" : note% -= 0 : PRINT "nat"
  11554. WHEN "6" : note% += 1 : PRINT "1/8 shrp"
  11555. WHEN "7" : note% += 2 : PRINT "1/4 shrp"
  11556. WHEN "8" : note% += 3 : PRINT "3/8 shrp"
  11557. WHEN "9" : note% += 4 : PRINT "shrp"
  11558. ENDCASE
  11559. COLOUR 0
  11560. PRINT" octave ";
  11561. COLOUR 1
  11562. oct% = VAL(GET$) : oct%=oct%DIV1 : note% += (48*oct%) : PRINT oct%
  11563. COLOUR 0
  11564. distortparas%(count%,counter%) = note%
  11565. NEXT
  11566. :
  11567. PRINT'" and pitches are to be raised/lowered"
  11568. PRINT " randomly by between how many ";
  11569. CASE distortgrid$ OF
  11570. WHEN "S" : INPUT"semitones "distortparas%(count%,2)
  11571. WHEN "Q" : INPUT"quartertones "distortparas%(count%,2)
  11572. WHEN "E" : INPUT"eighthtones "distortparas%(count%,2)
  11573. ENDCASE
  11574. PRINT" and how many ";
  11575. CASE distortgrid$ OF
  11576. WHEN "S" : INPUT"semitones "distortparas%(count%,3)
  11577. WHEN "Q" : INPUT"quartertones "distortparas%(count%,3)
  11578. WHEN "E" : INPUT"eighthtones "distortparas%(count%,3)
  11579. ENDCASE
  11580. :
  11581. NEXT
  11582. :
  11583. ENDIF
  11584. :
  11585. nextpitch% = pitches%(0)
  11586. FOR count% = 0 TO (manyattacks%-1)
  11587. :
  11588. note% = nextpitch%DIV100
  11589. accid% = (nextpitch%DIV10)MOD10
  11590. oct% = nextpitch%MOD10
  11591. CASE note% OF
  11592. WHEN 0 : pitch% = 4
  11593. WHEN 1 : pitch% = 12
  11594. WHEN 2 : pitch% = 20
  11595. WHEN 3 : pitch% = 24
  11596. WHEN 4 : pitch% = 32
  11597. WHEN 5 : pitch% = 40
  11598. WHEN 6 : pitch% = 48
  11599. ENDCASE
  11600. accid% -= 5 : pitch% += accid%
  11601. pitch% += (48*oct%)
  11602. :
  11603. FOR counter% = 1 TO numbands%
  11604. IF pitch%>=distortparas%(counter%,0)ANDpitch%<=distortparas%(counter%,1) THEN band% = counter%
  11605. NEXT
  11606. :
  11607. lower% = distortparas%(band%,2)
  11608. upper% = distortparas%(band%,3)
  11609. x% = 0 - lower%
  11610. range% = upper% + x% + 1
  11611. IF range% = 1 THEN inc% = 1-(x%+1) ELSE inc% = RND(range%)-(x%+1)
  11612. IF distortgrid$ = "S" THEN inc% = inc%*4
  11613. IF distortgrid$ = "Q" THEN inc% = inc%*2
  11614. pitch% += inc%
  11615. :
  11616. FOR counter% = 0 TO 9
  11617. IF pitch% > 2 + (48*counter%) THEN
  11618. octave% = counter%
  11619. ENDIF
  11620. NEXT
  11621. :
  11622. pitch% -= (48*octave%)
  11623. IF pitch% > 2 AND pitch% < 8 THEN
  11624. pitchclass% = 0 : diff% = pitch% - 4
  11625. ENDIF
  11626. IF pitch% > 7 AND pitch% < 16 THEN
  11627. pitchclass% = 1 : diff% = pitch% - 12
  11628. ENDIF
  11629. IF pitch% > 15 AND pitch% < 23 THEN
  11630. pitchclass% = 2 : diff% = pitch% - 20
  11631. ENDIF
  11632. IF pitch% > 22 AND pitch% < 29 THEN
  11633. pitchclass% = 3 : diff% = pitch% - 24
  11634. ENDIF
  11635. IF pitch% > 28 AND pitch% < 36 THEN
  11636. pitchclass% = 4 : diff% = pitch% - 32
  11637. ENDIF
  11638. IF pitch% > 35 AND pitch% < 44 THEN
  11639. pitchclass% = 5 : diff% = pitch% - 40
  11640. ENDIF
  11641. IF pitch% > 43 AND pitch% < 51 THEN
  11642. pitchclass% = 6 : diff% = pitch% - 48
  11643. ENDIF
  11644. accid% = diff% + 5 : nextpitch% = pitches%(count%+1)
  11645. pitches%(count%) = (pitchclass%*100)+(accid%*10)+octave%
  11646. :
  11647. NEXT
  11648. :
  11649. numpitches% = manyattacks%
  11650. distort$ = "OFF" : PROCinsertpitches
  11651. :
  11652. WHEN "durations" :
  11653. :
  11654. PROCwindow(20,69,70,54)
  11655. PRINT'" distort durations between"
  11656. INPUT" what percentage "firstpercent%
  11657. IF firstpercent% = 0 THEN
  11658. PRINT '" that's ";prevfirstpercent%;" then?"
  11659. CASE GET$ OF
  11660. WHEN "Y","y" :
  11661. firstpercent% = prevfirstpercent%
  11662. OTHERWISE firstpercent% = prevfirstpercent%
  11663. ENDCASE
  11664. ENDIF
  11665. INPUT" and what percentage "secondpercent%
  11666. IF secondpercent% = 0 THEN
  11667. PRINT '" that's ";prevsecondpercent%;" then?"
  11668. CASE GET$ OF
  11669. WHEN "Y","y","0" :
  11670. secondpercent% = prevsecondpercent%
  11671. OTHERWISE secondpercent% = prevsecondpercent%
  11672. ENDCASE
  11673. ENDIF
  11674. :
  11675. prevfirstpercent% = firstpercent% : prevsecondpercent% = secondpercent%
  11676. :
  11677. FOR count% = manyattacks% TO 1 STEP -1
  11678. durations%(count%) = durations%(count%-1)
  11679. NEXT
  11680. :
  11681. FOR count% = 1 TO manyattacks%
  11682. multiplier = (RND(secondpercent%-firstpercent%)+firstpercent%)/100
  11683. durations%(count%) = durations%(count%)*multiplier
  11684. NEXT
  11685. :
  11686. FOR count% = 0 TO (manyattacks%-1)
  11687. durations%(count%) = durations%(count%+1)
  11688. NEXT
  11689. durations%(manyattacks%) = 0
  11690. :
  11691. numdurations% = manyattacks%
  11692. distort$ = "OFF" : PROCinsertdurations
  11693. WHEN "amplitudes" :
  11694. :
  11695. PROCwindow(20,69,70,54)
  11696. CLS
  11697. PRINT'" Increase or decrease by 1 notch (I/D) "
  11698. CASE GET$ OF
  11699. WHEN "I","i" :
  11700. FOR count% = 0 TO manyattacks%-1
  11701. IF amplitudes%(count%) < 9 THEN amplitudes%(count%) += 1
  11702. IF envelopes%(count%) <> 9 THEN
  11703. number% = envelopes%(count%) DIV 10^3
  11704. IF number% = 0 THEN numphases% = 1
  11705. IF number% > 0 AND number% < 100 THEN numphases% = 2
  11706. IF number% > 99 THEN numphases% = 3
  11707. CASE numphases% OF
  11708. WHEN 1 :
  11709. IF envelopes%(count%)MOD10 < 9 THEN envelopes%(count%) += 1
  11710. WHEN 2 :
  11711. IF envelopes%(count%)MOD10 < 9 THEN envelopes%(count%) += 1
  11712. IF (envelopes%(count%)DIV10)MOD10 < 9 THEN envelopes%(count%) += 10
  11713. WHEN 3 :
  11714. IF envelopes%(count%)MOD10 < 9 THEN envelopes%(count%) += 1
  11715. IF (envelopes%(count%)DIV10)MOD10 < 9 THEN envelopes%(count%) += 10
  11716. IF (envelopes%(count%)DIV100)MOD10 < 9 THEN envelopes%(count%) += 100
  11717. ENDCASE
  11718. ENDIF
  11719. NEXT
  11720. :
  11721. OTHERWISE
  11722. FOR count% = 0 TO manyattacks%-1
  11723. IF amplitudes%(count%) > 0 THEN amplitudes%(count%) -= 1
  11724. IF envelopes%(count%) <> 9 THEN
  11725. number% = envelopes%(count%) DIV 10^3
  11726. IF number% = 0 THEN numphases% = 1
  11727. IF number% > 0 AND number% < 100 THEN numphases% = 2
  11728. IF number% > 99 THEN numphases% = 3
  11729. :
  11730. CASE numphases% OF
  11731. WHEN 1 :
  11732. IF envelopes%(count%)MOD10 > 0 THEN envelopes%(count%) -= 1
  11733. WHEN 2 :
  11734. IF envelopes%(count%)MOD10 > 0 THEN envelopes%(count%) -= 1
  11735. IF (envelopes%(count%)DIV10)MOD10 > 0 THEN envelopes%(count%) -= 10
  11736. WHEN 3 :
  11737. IF envelopes%(count%)MOD10 > 0 THEN envelopes%(count%) -= 1
  11738. IF (envelopes%(count%)DIV10)MOD10 > 0 THEN envelopes%(count%) -= 10
  11739. IF (envelopes%(count%)DIV100)MOD10 > 0 THEN envelopes%(count%) -= 100
  11740. ENDCASE
  11741. ENDIF
  11742. NEXT
  11743. :
  11744. ENDCASE
  11745. :
  11746. numenvelopes% = manyattacks%
  11747. distort$ = "OFF" : PROCinsertenvelopes
  11748. :
  11749. WHEN "envelopes" :
  11750. PRINT'" give 1st envelope point random "
  11751. INPUT" percentages between what percentage "firstpercent%
  11752. INPUT" and what percentage "secondpercent%
  11753. :
  11754. FOR count% = manyattacks% TO 1 STEP -1
  11755. envelopes%(count%) = envelopes%(count%-1)
  11756. glissandos%(count%) = glissandos%(count%-1)
  11757. NEXT
  11758. :
  11759. FOR count% = 1 TO manyattacks%
  11760. newpercentage% = RND(secondpercent%-(firstpercent%-1))+(firstpercent%)
  11761. ph2% = envelopes%(count%) DIV 10^5
  11762. amps% = envelopes%(count%) MOD 10^3
  11763. ph1% = newpercentage%
  11764. envelopes%(count%) = (ph2%*10^5)+(ph1%*10^3)+amps%
  11765. glissandos%(count%) = glissandos%(count%)
  11766. :
  11767. NEXT
  11768. :
  11769. IF numphases% = 3 THEN
  11770. :
  11771. PRINT'" give 2nd envelope point random "
  11772. INPUT" percentages between what percentage "firstpercent%
  11773. INPUT" and what percentage "secondpercent%
  11774. :
  11775. FOR count% = 1 TO manyattacks%
  11776. newpercentage% = RND(secondpercent%-(firstpercent%-1))+(firstpercent%)
  11777. ph1% = (envelopes%(count%) DIV 10^3) MOD 10^2
  11778. amps% = envelopes%(count%) MOD 10^3
  11779. ph2% = newpercentage%
  11780. envelopes%(count%) = (ph2%*10^5)+(ph1%*10^3)+amps%
  11781. glissandos%(count%) = glissandos%(count%)
  11782. :
  11783. NEXT
  11784. :
  11785. ENDIF
  11786. :
  11787. FOR count% = 0 TO (manyattacks%-1)
  11788. envelopes%(count%) = envelopes%(count%+1)
  11789. NEXT
  11790. envelopes%(manyattacks%) = 0
  11791. numenvelopes% = manyattacks%
  11792. distort$ = "OFF" : PROCinsertenvelopes
  11793. :
  11794. WHEN "inflections" :
  11795. :
  11796. PROCwindow(20,69,70,55)
  11797. PRINT'" distort inflections up or down "
  11798. PRINT" by up to how many cents "
  11799. INPUT" (max. 49) "cents%
  11800. :
  11801. FOR count% = manyattacks% TO 1 STEP -1
  11802. inflections%(count%) = inflections%(count%-1)
  11803. NEXT
  11804. :
  11805. FOR count% = 1 TO manyattacks%
  11806. :
  11807. REPEAT
  11808. factor% = RND(cents%)
  11809. upordown% = RND(2)
  11810. :
  11811. IF upordown% = 1 THEN
  11812. :
  11813. inflections%(count%) = inflections%(count%)+factor%
  11814. ELSE
  11815. inflections%(count%) = inflections%(count%)-factor% :
  11816. ENDIF
  11817. :
  11818. UNTIL inflections%(count%) > 0 AND inflections%(count%) < 100
  11819. :
  11820. NEXT
  11821. :
  11822. FOR count% = 0 TO (manyattacks%-1)
  11823. inflections%(count%) = inflections%(count%+1)
  11824. NEXT
  11825. inflections%(manyattacks%) = 0
  11826. :
  11827. numinflections% = manyattacks%
  11828. distort$ = "OFF" : PROCinsertinflections
  11829. :
  11830. ENDCASE
  11831. :
  11832. ENDPROC
  11833. :
  11834. REM****************************************************
  11835. :
  11836. DEF PROCreorderattacks
  11837. :
  11838. r1% = 0
  11839. :
  11840. REM fills attacks3% with original actual durats in beats
  11841. attacks2%() = attacks1%()
  11842. FOR count% = 0 TO manyattacks%-2
  11843. attacks3%(count%) = attacks2%(count%+1)-attacks2%(count%)
  11844. NEXT
  11845. :
  11846. PRINT''" Random or determined order? (R/1 or D)"
  11847. CASE GET$ OF
  11848. WHEN "D","d" :
  11849. CLS
  11850. PRINT''" There are ";manyattacks%-1;" durations in the group"
  11851. FOR count% = 1 TO manyattacks%-1
  11852. PRINT'" New duration ";count%;
  11853. INPUT" is now to be old duration "r%
  11854. attacks1%(count%) = attacks1%(count%-1)+attacks3%(r%-1)
  11855. NEXT
  11856. OTHERWISE
  11857. CLS
  11858. PRINT''" There are ";manyattacks%-1;" durations in the group"
  11859. PRINT'" How many durations do you want to re-order? "
  11860. INPUT " (for all press 0) "howmany%
  11861. IF howmany% = 0 THEN howmany% = manyattacks%-1
  11862. INPUT'" Starting at duration number (0 = 1) "number%
  11863. IF number% = 0 THEN number% = 1
  11864. INPUT'" Chance of repeating original order(%) "chanceofnext%
  11865. attacks2%() = 0 : count% = number%
  11866. REPEAT
  11867. PROCchoosenext
  11868. IF choosenext$ = "y" AND r1% < howmany% THEN
  11869. r1% = r1% + 1
  11870. ELSE
  11871. r1% = RND(howmany%)
  11872. ENDIF
  11873. r% = r1%+number%-1
  11874. IF attacks2%(r%) = 0 THEN
  11875. attacks1%(count%) = attacks1%(count%-1)+attacks3%(r%-1)
  11876. attacks2%(r%) = 1 : count% += 1
  11877. ENDIF
  11878. UNTIL count% = howmany%+number%
  11879. ENDCASE
  11880. :
  11881. reordered$ = "y" : seereordery$ = "n"
  11882. PROCinsertattacks
  11883. :
  11884. ENDPROC
  11885. :
  11886. REM********************************************************
  11887. :
  11888. DEF PROCchoosenext
  11889. :
  11890. numb% = RND(100)
  11891. IF numb% >= chanceofnext% THEN choosenext$ = "n" ELSE choosenext$ = "y"
  11892. ENDPROC
  11893. :
  11894. REM********************************************************
  11895. :
  11896. DEF PROCsavepitchstring
  11897. :
  11898. *Dir HostFS::HardDisc4.$.CAC.Files
  11899. firstnaming$ = "n"
  11900. CLS
  11901. IF filenamestg$ = "" THEN
  11902. INPUT'" filename "filenamestg$
  11903. firstnaming$ = "y"
  11904. ENDIF
  11905. IF firstnaming$ = "n" THEN
  11906. PRINT'" as '";filenamestg$;"'?"
  11907. CASE GET$ OF
  11908. WHEN "Y","y","+" :
  11909. OTHERWISE INPUT'" filename "filenamestg$
  11910. ENDCASE
  11911. ENDIF
  11912. :
  11913. channel = OPENOUT filenamestg$
  11914. PRINT#channel, numpitches%
  11915. PRINT#channel, grid$
  11916. PRINT#channel, samplesize%
  11917. PRINT#channel, octavesections%
  11918. PRINT#channel, transpositionsections%
  11919. PRINT#channel, contoursections%
  11920. FOR a% = 0 TO samplesize%
  11921. PRINT#channel, sample%(a%)
  11922. NEXT
  11923. FOR a% = 0 TO octavesections%
  11924. FOR b% = 0 TO 48
  11925. FOR c% = 0 TO 11
  11926. PRINT#channel, octavesequences%(a%,b%,c%)
  11927. NEXT
  11928. NEXT
  11929. NEXT
  11930. FOR a% = 0 TO transpositionsections%
  11931. FOR b% = 0 TO 1
  11932. PRINT#channel, transpositionsequences%(a%,b%)
  11933. NEXT
  11934. NEXT
  11935. FOR a% = 0 TO contoursections%
  11936. FOR b% = 0 TO 11
  11937. PRINT#channel, contoursequences%(a%,b%)
  11938. NEXT
  11939. NEXT
  11940. :
  11941. CLOSE#channel
  11942. *NoDir
  11943. :
  11944. ENDPROC
  11945. :
  11946. REM***************************************************
  11947. :
  11948. DEF PROCloadpitchstring
  11949. :
  11950. *Dir HostFS::HardDisc4.$.CAC.Files
  11951. INPUT'" filename "filenamestg$
  11952. channel = OPENIN filenamestg$
  11953. REPEAT
  11954. INPUT#channel, numpitches%
  11955. INPUT#channel, grid$
  11956. INPUT#channel, samplesize%
  11957. INPUT#channel, octavesections%
  11958. INPUT#channel, transpositionsections%
  11959. INPUT#channel, contoursections%
  11960. FOR a% = 0 TO samplesize%
  11961. INPUT#channel, sample%(a%)
  11962. NEXT
  11963. FOR a% = 0 TO octavesections%
  11964. FOR b% = 0 TO 48
  11965. FOR c% = 0 TO 11
  11966. INPUT#channel, octavesequences%(a%,b%,c%)
  11967. NEXT
  11968. NEXT
  11969. NEXT
  11970. FOR a% = 0 TO transpositionsections%
  11971. FOR b% = 0 TO 1
  11972. INPUT#channel, transpositionsequences%(a%,b%)
  11973. NEXT
  11974. NEXT
  11975. FOR a% = 0 TO contoursections%
  11976. FOR b% = 0 TO 11
  11977. INPUT#channel, contoursequences%(a%,b%)
  11978. NEXT
  11979. NEXT
  11980. UNTIL EOF#channel
  11981. CLOSE#channel
  11982. *NoDir
  11983. :
  11984. ENDPROC
  11985. :
  11986. REM*****************************************************
  11987. :
  11988. DEF PROCeditpitchstring
  11989. :
  11990. IF loadstring$ = "y" THEN PROCloadpitchstring
  11991. :
  11992. PRINT'" Change number of notes in the"
  11993. PRINT " pitch string? (Y/+ OR N/return)"
  11994. PRINT'" (currently ";numpitches%;")"
  11995. CASE GET$ OF
  11996. WHEN "Y","y","+","=" : do$ = "y"
  11997. OTHERWISE do$ = "n"
  11998. ENDCASE
  11999. IF do$ = "y" THEN
  12000. PRINT'" Total number of notes in the"
  12001. INPUT " pitch string (inc. sample) "numpitches%
  12002. ENDIF
  12003. CLS
  12004. :
  12005. PRINT'" Change the sample?"
  12006. PRINT'" currently "
  12007. FOR count% = 1 TO samplesize%
  12008. x% = sample%(count%)
  12009. WHILE x% > 52
  12010. x% -= 48
  12011. ENDWHILE
  12012. CASE x% OF
  12013. WHEN 5 : PRINT count%;". C nat"
  12014. WHEN 9 : PRINT count%;". C shrp"
  12015. WHEN 13 : PRINT count%;". D nat"
  12016. WHEN 17 : PRINT count%;". E flat"
  12017. WHEN 21 : PRINT count%;". E nat"
  12018. WHEN 25 : PRINT count%;". F nat"
  12019. WHEN 29 : PRINT count%;". F shrp"
  12020. WHEN 33 : PRINT count%;". G nat"
  12021. WHEN 37 : PRINT count%;". A flat"
  12022. WHEN 41 : PRINT count%;". A nat"
  12023. WHEN 45 : PRINT count%;". B flat"
  12024. WHEN 49 : PRINT count%;". B nat"
  12025. OTHERWISE
  12026. ENDCASE
  12027. NEXT
  12028. REM eighthtones not yet implemented!
  12029. CASE GET$ OF
  12030. WHEN "Y","y","+","=" : do$ = "y"
  12031. OTHERWISE do$ = "n"
  12032. ENDCASE
  12033. IF do$ = "y" THEN
  12034. PRINT'" Change the number of notes in the sample?"
  12035. PRINT'" Currently ";samplesize%
  12036. CASE GET$ OF
  12037. WHEN "Y","y","+" : do$ = "y"
  12038. OTHERWISE do$ = "n"
  12039. ENDCASE
  12040. IF do$ = "y" THEN
  12041. INPUT'" How many notes in the sample? "samplesize%
  12042. ENDIF
  12043. PRINT'" Change any of the sample's notes?"
  12044. CASE GET$ OF
  12045. WHEN "Y","y","+" : do$ = "y"
  12046. OTHERWISE do$ = "n"
  12047. ENDCASE
  12048. IF do$ = "y" THEN
  12049. INPUT'" How many "x%
  12050. FOR count% = 1 TO x%
  12051. IF x% < samplesize% THEN
  12052. PRINT'" note ";count%;" is note number "
  12053. INPUT y%
  12054. PRINT'" this note is now pitchclass ";
  12055. ELSE
  12056. y% = count%
  12057. PRINT'" note ";count%;" is now pitchclass ";
  12058. ENDIF
  12059. COLOUR 1
  12060. CASE GET$ OF
  12061. WHEN "C","c" : samplenote% = 0 : PRINT "C"
  12062. WHEN "D","d" : samplenote% = 1 : PRINT "D"
  12063. WHEN "E","e" : samplenote% = 2 : PRINT "E"
  12064. WHEN "F","f" : samplenote% = 3 : PRINT "F"
  12065. WHEN "G","g" : samplenote% = 4 : PRINT "G"
  12066. WHEN "A","a" : samplenote% = 5 : PRINT "A"
  12067. WHEN "B","b" : samplenote% = 6 : PRINT "B"
  12068. ENDCASE
  12069. samplenote% = samplenote%*100
  12070. COLOUR 0
  12071. PRINT " accidental ";
  12072. COLOUR 1
  12073. CASE GET$ OF
  12074. WHEN "1" : samplenote% += 10 : PRINT "flat"
  12075. WHEN "2" : samplenote% += 20 : PRINT "3/8 flat"
  12076. WHEN "3" : samplenote% += 30 : PRINT "1/4 flat"
  12077. WHEN "4" : samplenote% += 40 : PRINT "1/8 flat"
  12078. WHEN "5" : samplenote% += 50 : PRINT "nat"
  12079. WHEN "6" : samplenote% += 60 : PRINT "1/8 shrp"
  12080. WHEN "7" : samplenote% += 70 : PRINT "1/4 shrp"
  12081. WHEN "8" : samplenote% += 80 : PRINT "3/8 shrp"
  12082. WHEN "9" : samplenote% += 90 : PRINT "shrp"
  12083. ENDCASE
  12084. COLOUR 0
  12085. samplenote% += 5
  12086. PROCconvertsamplenote
  12087. sample%(y%) = samplenote%
  12088. :
  12089. NEXT
  12090. ENDIF
  12091. :
  12092. ENDIF
  12093. :
  12094. CLS
  12095. PRINT'" Make changes to the octave sequences?"
  12096. PRINT'" Currently"
  12097. VDU 14
  12098. FOR a% = 1 TO octavesections%
  12099. FOR b% = 3 TO 47 STEP 4
  12100. FOR c% = 1 TO 11
  12101. IF b% = 3 AND c% = 1 THEN PRINT'" C nat"
  12102. IF b% = 7 AND c% = 1 THEN PRINT'" C shrp"
  12103. IF b% = 11 AND c% = 1 THEN PRINT'" D nat"
  12104. IF b% = 15 AND c% = 1 THEN PRINT'" E flat"
  12105. IF b% = 19 AND c% = 1 THEN PRINT'" E nat"
  12106. IF b% = 23 AND c% = 1 THEN PRINT'" F nat"
  12107. IF b% = 27 AND c% = 1 THEN PRINT'" F shrp"
  12108. IF b% = 31 AND c% = 1 THEN PRINT'" G nat"
  12109. IF b% = 35 AND c% = 1 THEN PRINT'" A flat"
  12110. IF b% = 39 AND c% = 1 THEN PRINT'" A nat"
  12111. IF b% = 43 AND c% = 1 THEN PRINT'" B flat"
  12112. IF b% = 47 AND c% = 1 THEN PRINT'" B nat"
  12113. IF octavesequences%(a%,b%,c%) > 0 THEN PRINT octavesequences%(a%,b%,c%)
  12114. NEXT
  12115. NEXT
  12116. NEXT
  12117. VDU 15
  12118. CASE GET$ OF
  12119. WHEN "Y","y","+" : do$ = "y"
  12120. OTHERWISE do$ = "n"
  12121. ENDCASE
  12122. IF do$ = "y" THEN
  12123. PRINT'" Change the number of sections of "
  12124. PRINT" octave sequences?"
  12125. CASE GET$ OF
  12126. WHEN "Y","y","+" : do$ = "y"
  12127. OTHERWISE do$ = "n"
  12128. ENDCASE
  12129. IF do$ = "y" THEN
  12130. PRINT'" How many different sections of"
  12131. INPUT " octave sequences are there "octavesections%
  12132. ENDIF
  12133. IF octavesections% > 1 THEN
  12134. PRINT'" Change the starting point of"
  12135. PRINT" any sections?"
  12136. CASE GET$ OF
  12137. WHEN "Y","y","+" : do$ = "y"
  12138. OTHERWISE do$ = "n"
  12139. ENDCASE
  12140. IF do$ = "y" THEN
  12141. INPUT'" How many "z%
  12142. FOR count% = 1 TO z%
  12143. PRINT'" section ";count%;" is section "
  12144. INPUT y%
  12145. PRINT'" this section now begins at note number "
  12146. INPUT x%
  12147. octavesequences%(y%,0,0) = x%
  12148. NEXT
  12149. ENDIF
  12150. ENDIF
  12151. :
  12152. PRINT'" Make changes to the actual octave"
  12153. PRINT" sequences?"
  12154. CASE GET$ OF
  12155. WHEN "Y","y","+" : do$ = "y"
  12156. OTHERWISE do$ = "n"
  12157. ENDCASE
  12158. IF do$ = "y" THEN
  12159. FOR count% = 1 TO octavesections%
  12160. PRINT'" Any changes to section ";count%
  12161. CASE GET$ OF
  12162. WHEN "Y","y","+" : do$ = "y"
  12163. OTHERWISE do$ = "n"
  12164. ENDCASE
  12165. IF do$ = "y" THEN
  12166. FOR pitch% = 0 TO 47
  12167. entry$ = "n"
  12168. IF pitch% MOD 4 = 0 AND grid$<>"s" THEN entry$ = "y"
  12169. IF (pitch%-2)MOD4 = 0 THEN entry$ = "y"
  12170. IF (pitch%-1)MOD2 = 0 AND grid$ = "e" THEN entry$ = "y"
  12171. IF entry$ = "y" THEN
  12172. PRINT'" changes in section ";count%;" to ";
  12173. COLOUR 1 : PRINT pitchnames$(pitch%) : COLOUR 0
  12174. CASE GET$ OF
  12175. WHEN "Y","y","+" : do$ = "y"
  12176. OTHERWISE do$ = "n"
  12177. ENDCASE
  12178. IF do$ = "y" THEN
  12179. PRINT '"In section ";count%;" the sequence of octaves for ";
  12180. COLOUR 1 : PRINT pitchnames$(pitch%)
  12181. COLOUR 0 : PRINT "has how many elements "
  12182. INPUT e%
  12183. PRINT""
  12184. octavesequences%(count%,pitch%+1,0) = e%
  12185. FOR counter% = 1 TO 11
  12186. octavesequences%(count%,pitch%+1,counter%) = 0
  12187. NEXT
  12188. FOR counter% = 1 TO e%
  12189. PRINT " element ";counter%;
  12190. INPUT " is octave "o%
  12191. octavesequences%(count%,pitch%+1,counter%) = o%
  12192. NEXT
  12193. ENDIF
  12194. ENDIF
  12195. NEXT
  12196. ENDIF
  12197. NEXT
  12198. ENDIF
  12199. ENDIF
  12200. :
  12201. CLS
  12202. PRINT'" Make changes to transposition levels?"
  12203. PRINT'" Currently"
  12204. FOR a% = 1 TO transpositionsections%
  12205. PRINT'" section ";a%;". ";transpositionsequences%(a%,1)/4;" semitones starting at note number ";transpositionsequences%(a%,0)
  12206. NEXT
  12207. CASE GET$ OF
  12208. WHEN "Y","y","+" : do$ = "y"
  12209. OTHERWISE do$ = "n"
  12210. ENDCASE
  12211. IF do$ = "y" THEN
  12212. PRINT'" Change the number of sections "
  12213. PRINT" of transposition levels?"
  12214. CASE GET$ OF
  12215. WHEN "Y","y","+" : do$ = "y"
  12216. OTHERWISE do$ = "n"
  12217. ENDCASE
  12218. IF do$ = "y" THEN
  12219. PRINT'" How many different sections of"
  12220. INPUT" transposition are there "transpositionsections%
  12221. ENDIF
  12222. IF transpositionsections% > 1 THEN
  12223. PRINT'" Change the starting point of"
  12224. PRINT" any sections?"
  12225. CASE GET$ OF
  12226. WHEN "Y","y","+" : do$ = "y"
  12227. OTHERWISE do$ = "n"
  12228. ENDCASE
  12229. IF do$ = "y" THEN
  12230. INPUT'" How many "z%
  12231. FOR count% = 1 TO z%
  12232. PRINT'" Section ";count%;" is section "
  12233. INPUT y%
  12234. PRINT'" this section now begins at "
  12235. INPUT " note number "n%
  12236. transpositionsequences%(y%,0) = n%
  12237. NEXT
  12238. ENDIF
  12239. PRINT'" Change the degree of transposition"
  12240. PRINT" of any sections?"
  12241. CASE GET$ OF
  12242. WHEN "Y","y","+" : do$ = "y"
  12243. OTHERWISE do$ = "n"
  12244. ENDCASE
  12245. IF do$ = "y" THEN
  12246. INPUT'" How many "z%
  12247. FOR count% = 1 TO z%
  12248. PRINT'" Section ";count%;" is section "
  12249. INPUT y%
  12250. PRINT'" This section now transposes"
  12251. PRINT" up/down by how many ";
  12252. CASE grid$ OF
  12253. WHEN "e" : PRINT "eighthtones" : INPUT " (+/- 1 etc) "x%
  12254. transpositionsequences%(y%,1) = x%
  12255. WHEN "q" : PRINT "quartertones" : INPUT " (+/- 1 etc) "x%
  12256. transpositionsequences%(y%,1) = x% * 2
  12257. WHEN "s" : PRINT "semitones" : INPUT " (+/- 1 etc) "x%
  12258. transpositionsequences%(y%,1) = x% * 4
  12259. ENDCASE
  12260. NEXT
  12261. ENDIF
  12262. ENDIF
  12263. ENDIF
  12264. :
  12265. CLS
  12266. PRINT'" Make changes to the contour sequences?"
  12267. PRINT'" Currently"
  12268. FOR a% = 1 TO contoursections%
  12269. FOR b% = 2 TO contoursequences%(a%,1)+1
  12270. IF b% = 2 THEN PRINT'" section ";a%
  12271. PRINT contoursequences%(a%,b%)
  12272. NEXT
  12273. NEXT
  12274. CASE GET$ OF
  12275. WHEN "Y","y","+" : do$ = "y"
  12276. OTHERWISE do$ = "n"
  12277. ENDCASE
  12278. IF do$ = "y" THEN
  12279. PRINT'" Change the number of sections?"
  12280. CASE GET$ OF
  12281. WHEN "Y","y","+" : do$ = "y"
  12282. OTHERWISE do$ = "n"
  12283. ENDCASE
  12284. IF do$ = "y" THEN
  12285. PRINT'" How many different sections of "
  12286. INPUT " contour sequences are there "contoursections%
  12287. ENDIF
  12288. IF contoursections%>1 THEN
  12289. PRINT'" Change the starting point"
  12290. PRINT" of any sections?"
  12291. CASE GET$ OF
  12292. WHEN "Y","y","+" : do$ = "y"
  12293. OTHERWISE do$ = "n"
  12294. ENDCASE
  12295. IF do$ = "y" THEN
  12296. INPUT'" How many "z%
  12297. FOR count% = 1 TO z%
  12298. PRINT'" Section ";count%;" is section "
  12299. INPUT y%
  12300. PRINT'" This section"
  12301. INPUT " begins at note number "n%
  12302. contoursequences%(y%,0) = n%
  12303. NEXT
  12304. ENDIF
  12305. ENDIF
  12306. :
  12307. PRINT'" Make changes to any contours?"
  12308. CASE GET$ OF
  12309. WHEN "Y","y","+" : do$ = "y"
  12310. OTHERWISE do$ = "n"
  12311. ENDCASE
  12312. IF do$ = "y" THEN
  12313. FOR count% = 1 TO contoursections%
  12314. PRINT'" Change section ";count%;"?"
  12315. CASE GET$ OF
  12316. WHEN "Y","y","+" : do$ = "y"
  12317. OTHERWISE do$ = "n"
  12318. ENDCASE
  12319. IF do$ = "y" THEN
  12320. PRINT'" In section ";count%;
  12321. INPUT " there are how many contours "c%
  12322. contoursequences%(count%,1) = c%
  12323. PRINT""
  12324. FOR counter% = 1 TO c%
  12325. PRINT " number ";counter%;
  12326. INPUT " is contour "contoor%
  12327. contoursequences%(count%,counter%+1) = contoor%
  12328. NEXT
  12329. ENDIF
  12330. NEXT
  12331. ENDIF
  12332. ENDIF
  12333. :
  12334. PROCdeletesections
  12335. REM this deletes info about sections which existed in
  12336. REM previous versions of the string
  12337. :
  12338. contoursize% = 0 : seriesnote% = 1 : samplenote% = 0
  12339. contoursequence% = 1 : transpositionsequence% = 1
  12340. octavesequence% = 1 : transpositionsequences%(1,1) = 0
  12341. contourloop% = 0 : octaveloop%() = 0
  12342. :
  12343. REPEAT
  12344. seriesnote% += contoursize%
  12345. IF seriesnote% >= contoursequences%(contoursequence%+1,0) AND contoursequences%(contoursequence%+1,0) <> 0 THEN
  12346. contoursequence% += 1
  12347. contourloop% = 0
  12348. ENDIF
  12349. :
  12350. contourloop% += 1
  12351. IF contourloop% > contoursequences%(contoursequence%,1) THEN contourloop% = 1
  12352. contour% = contoursequences%(contoursequence%,contourloop%+1)
  12353. contoursize% = contours%(contour%,0)
  12354. :
  12355. IF seriesnote% >= transpositionsequences%(transpositionsequence%+1,0) AND transpositionsequences%(transpositionsequence%+1,0) <> 0 THEN
  12356. transpositionsequence% += 1
  12357. ENDIF
  12358. transposition% = transpositionsequences%(transpositionsequence%,1)
  12359. :
  12360. FOR count% = 1 TO contoursize%
  12361. samplenote% += 1
  12362. IF samplenote% > samplesize% THEN samplenote% = 1
  12363. group%(count%) = sample%(samplenote%) + transposition%
  12364. NEXT
  12365. :
  12366. IF seriesnote% >= octavesequences%(octavesequence%+1,0,0) AND octavesequences%(octavesequence%+1,0,0) <> 0 THEN
  12367. octavesequence% += 1
  12368. octaveloop%() = 0
  12369. ENDIF
  12370. :
  12371. FOR count% = 1 TO contoursize%
  12372. pitchclass% = group%(count%)
  12373. REPEAT
  12374. pitchclass% -= 48
  12375. UNTIL pitchclass% < 51
  12376. pitchclass% -= 2
  12377. octaveloop%(pitchclass%) += 1
  12378. IF octaveloop%(pitchclass%) > octavesequences%(octavesequence%,pitchclass%,0) THEN octaveloop%(pitchclass%) = 1
  12379. oxtave% = octavesequences%(octavesequence%,pitchclass%,octaveloop%(pitchclass%))
  12380. group%(count%) = (pitchclass%+2) + (48*oxtave%)
  12381. NEXT
  12382. :
  12383. IF contoursize% > 1 THEN
  12384. REPEAT
  12385. FOR count% = 1 TO (contoursize%-1)
  12386. IF group%(count%) >= group%(count%+1) THEN
  12387. save% = group%(count%)
  12388. group%(count%) = group%(count%+1)
  12389. group%(count%+1) = save%
  12390. ENDIF
  12391. NEXT
  12392. no% = 0
  12393. FOR count% = 1 TO (contoursize%-1)
  12394. IF group%(count%) > group%(count%+1) THEN no% = 1
  12395. NEXT
  12396. UNTIL no% = 0
  12397. ENDIF
  12398. :
  12399. FOR count% = 1 TO contoursize%
  12400. simplenote% = group%(contours%(contour%,count%))
  12401. PROCconvertsimplenote
  12402. pitches%((seriesnote%+count%)-1) = simplenote%
  12403. NEXT
  12404. :
  12405. UNTIL ((seriesnote%+contoursize%)-1) >= numpitches%
  12406. :
  12407. FOR count% = 0 TO numpitches%-1 : pitches%(count%) = pitches%(count%+1) : NEXT
  12408. PRINT'" Do you want to save this pitch string?"
  12409. CASE GET$ OF
  12410. WHEN "Y","y","+" : PROCsavepitchstring
  12411. OTHERWISE
  12412. ENDCASE
  12413. :
  12414. PROCinsertpitches
  12415. :
  12416. ENDPROC
  12417. :
  12418. REM************************************************
  12419. :
  12420. :
  12421. DEF PROCdeletesections
  12422. :
  12423. FOR count% = 2 TO 50
  12424. IF count% > octavesections% THEN
  12425. octavesequences%(count%,0,0) = 0
  12426. ENDIF
  12427. NEXT
  12428. :
  12429. FOR count% = 2 TO 199
  12430. IF count% > transpositionsections% THEN
  12431. transpositionsequences%(count%,0) = 0
  12432. ENDIF
  12433. NEXT
  12434. :
  12435. FOR count% = 2 TO 50
  12436. IF count% > contoursections% THEN
  12437. contoursequences%(count%,0) = 0
  12438. ENDIF
  12439. NEXT
  12440. :
  12441. ENDPROC
  12442. :
  12443. REM**************************************************
  12444. :
  12445. DEF PROCyesno
  12446. :
  12447. CASE GET$ OF
  12448. WHEN "Y","y" : on = 1
  12449. OTHERWISE on = 2
  12450. ENDCASE
  12451. :
  12452. ENDPROC
  12453. :
  12454. REM**************************************************
  12455. :
  12456. DEF PROCeditlayers
  12457. :
  12458. chanceoflayer%(1) = 1
  12459. :
  12460. PRINT'" Alter total length? [currently ";totallength%;"]"
  12461. PROCyesno
  12462. IF on = 1 THEN
  12463. INPUT'" Total duration, in BEATS "totallength%
  12464. ENDIF
  12465. PRINT''" LAYERS -"
  12466. PRINT'" Alter number of layers? [currently ";numlayers%;"]"
  12467. PROCyesno
  12468. IF on = 1 THEN
  12469. INPUT'" How many layers "numlayers%
  12470. ENDIF
  12471. :
  12472. PRINT'" Alter contribution proportions"
  12473. PRINT" of the layers?"
  12474. PROCyesno
  12475. IF on = 1 THEN
  12476. REM 1
  12477. :
  12478. PRINT'" Alter number of sections of"
  12479. PRINT" proportions?"
  12480. PROCyesno
  12481. IF on = 1 THEN
  12482. PRINT'" Piece is divided into how many sections"
  12483. PRINT " of different contribution-proportions "
  12484. PRINT " [currently "; numlayersections%;"]"
  12485. INPUT numlayersections%
  12486. ENDIF
  12487. :
  12488. IF numlayersections% > 1 THEN
  12489. :
  12490. PRINT'" Alter starting points of sections?"
  12491. PROCyesno
  12492. IF on = 1 THEN
  12493. FOR count% = 2 TO numlayersections%
  12494. PRINT'" Alter start point of section ";count%;" [currently ";startoflayersection%(count%);"]"
  12495. PROCyesno
  12496. IF on = 1 THEN
  12497. PRINT'" Section ";count%;" starts at beat number "
  12498. INPUT startoflayersection%(count%)
  12499. ENDIF
  12500. NEXT
  12501. ENDIF
  12502. ENDIF
  12503. :
  12504. PRINT'" Alter any of the proportions?"
  12505. PROCyesno
  12506. IF on = 1 THEN
  12507. REM 2
  12508. FOR count% = 1 TO numlayersections%
  12509. PRINT'" Alter proportions in section ";count%
  12510. PROCyesno
  12511. IF on = 1 THEN
  12512. REM 3
  12513. FOR count1% = 1 TO numlayers%
  12514. PRINT'" Alter (section ";count%;") layer ";count1%;" proportions? [currently ";shareoflayers%(count%,count1%);"]"
  12515. PROCyesno
  12516. IF on = 1 THEN
  12517. REM 4
  12518. PRINT '"In section ";count%;", layer ";count1%;" has "
  12519. PRINT "how many proportions?"
  12520. INPUT shareoflayers%(count%,count1%)
  12521. ENDIF : REM 4
  12522. NEXT
  12523. ENDIF : REM 3
  12524. NEXT
  12525. ENDIF : REM 2
  12526. :
  12527. ENDIF : REM 1
  12528. :
  12529. PRINT''" NUMBER OF ATTACKS, DURATIONS, MULTIPLIERS, RETURN AFTERS"
  12530. FOR count% = 1 TO numlayers%
  12531. PRINT'" Alterations to layer ";count%
  12532. PROCyesno
  12533. IF on = 1 THEN
  12534. REM 5
  12535. PRINT'" Alter number of attacks?"
  12536. PROCyesno
  12537. IF on = 1 THEN
  12538. REM 6
  12539. PRINT'" Alter whether controlled by sections/appearances?"
  12540. PROCyesno
  12541. IF on = 1 THEN
  12542. REM 7
  12543. PRINT'" In layer ";count%;" are the number of attacks controlled"
  12544. PRINT " by sections or by appearance number (S/A)"
  12545. PRINT " [currently ";attackscontrol$(count%);"]"
  12546. CASE GET$ OF
  12547. WHEN "S","s" :
  12548. attackscontrol$(count%) = "S"
  12549. OTHERWISE attackscontrol$(count%) = "A"
  12550. ENDCASE
  12551. ELSE
  12552. IF attackscontrol$(count%) = "" THEN attackscontrol$(count%) = "S" : REM default for added layers
  12553. ENDIF : REM 7
  12554. :
  12555. IF attackscontrol$(count%) = "S" THEN
  12556. REM 8
  12557. IF numattackssections%(count%) = 0 THEN numattackssections%(count%) = 1 : REM new layers
  12558. PRINT'" Alter number of sections? [currently ";numattackssections%(count%);"]"
  12559. PROCyesno
  12560. IF on = 1 THEN
  12561. REM 9
  12562. INPUT'" How many sections "numattackssections%(count%)
  12563. ENDIF : REM 9
  12564. IF numattackssections%(count%) > 1 THEN
  12565. PRINT'" Alter starting point of any sections?"
  12566. PROCyesno
  12567. IF on = 1 THEN
  12568. REM 10
  12569. FOR count1% = 2 TO numattackssections%(count%)
  12570. PRINT'" Alter starting point of section ";count1%;" currently [";startofattackssection%(count%,count1%);"]"
  12571. PROCyesno
  12572. IF on = 1 THEN
  12573. REM 11
  12574. PRINT'" (layer ";count%;") section ";count1%;" starts at beat"
  12575. INPUT startofattackssection%(count%,count1%)
  12576. ENDIF : REM 11
  12577. NEXT
  12578. ENDIF : REM 10
  12579. ENDIF
  12580. PRINT'" Alter the number of attacks in layer ";count%
  12581. PROCyesno
  12582. IF on = 1 THEN
  12583. REM 12
  12584. :
  12585. FOR count1% = 1 TO numattackssections%(count%)
  12586. PRINT'" Alter attacks in section ";count1%;" [currently ";numattax%(count%,count1%,0);"-";numattax%(count%,count1%,1);"]"
  12587. PROCyesno
  12588. IF on = 1 THEN
  12589. REM 13
  12590. PRINT'" In layer ";count%;", section ";count1%;" the number"
  12591. PRINT" of attacks varies between..."
  12592. INPUT numattax%(count%,count1%,0)
  12593. INPUT" and..."numattax%(count%,count1%,1)
  12594. ENDIF : REM 13
  12595. NEXT
  12596. ENDIF : REM 12
  12597. ENDIF : REM 8
  12598. :
  12599. IF attackscontrol$(count%) = "A" THEN
  12600. REM 14
  12601. PRINT'" Alter number of 'sections' of appearances? [currently ";numattackssections1%(count%);"]"
  12602. PROCyesno
  12603. IF on = 1 THEN
  12604. REM 15
  12605. INPUT'" How many 'sections' of appearances "numattackssections1%(count%)
  12606. ENDIF : REM 15
  12607. IF numattackssections1%(count%) > 1 THEN
  12608. PRINT'" Alter starting point of any sections?"
  12609. PROCyesno
  12610. IF on = 1 THEN
  12611. REM 16
  12612. FOR count1% = 2 TO numattackssections1%(count%)
  12613. PRINT'" Alter starting point of section ";count1%;" [currently appearance ";startofattackssection1%(count%,count1%);"]"
  12614. PROCyesno
  12615. IF on = 1 THEN
  12616. REM 17
  12617. PRINT'" (layer ";count%;") section ";count1%;" starts at appearance "
  12618. INPUT startofattackssection1%(count%,count1%)
  12619. ENDIF : REM 17
  12620. NEXT
  12621. ENDIF : REM 16
  12622. ENDIF
  12623. :
  12624. PRINT'" Alter number of attacks in layer ";count%
  12625. PROCyesno
  12626. IF on = 1 THEN
  12627. REM 18
  12628. FOR count1% = 1 TO numattackssections1%(count%)
  12629. PRINT'" Alter number of attacks in section ";count1%;" [currently ";numattax1%(count%,count1%,0);"-";numattax1%(count%,count1%,1);"]"
  12630. PROCyesno
  12631. IF on = 1 THEN
  12632. REM 19
  12633. PRINT'" In layer ";count%;", section ";count1%;" the number"
  12634. PRINT" of attacks varies between..."
  12635. INPUT numattax1%(count%,count1%,0)
  12636. INPUT" and... "numattax1%(count%,count1%,1)
  12637. ENDIF : REM 19
  12638. NEXT
  12639. ENDIF : REM 18
  12640. ENDIF : REM 14
  12641. ENDIF : REM 6
  12642. :
  12643. PRINT''" DURATIONS"
  12644. PRINT'" Alter durations in layer ";count%
  12645. PROCyesno
  12646. IF on = 1 THEN
  12647. REM 20
  12648. :
  12649. PRINT'" Alter whether durations in sections/appearances?"
  12650. PROCyesno
  12651. IF on = 1 THEN
  12652. REM 21
  12653. PRINT'" In layer ";count%;" are the unit durations controlled"
  12654. PRINT" by sections or by appearance number (S/A)"
  12655. PRINT " [currently ";durationscontrol$(count%);"]"
  12656. CASE GET$ OF
  12657. WHEN "S","s" :
  12658. durationscontrol$(count%) = "S"
  12659. OTHERWISE durationscontrol$(count%) = "A"
  12660. ENDCASE
  12661. ELSE
  12662. IF durationscontrol$(count%) = "" THEN durationscontrol$(count%) = "S" : REM new layers default
  12663. ENDIF : REM 21
  12664. IF durationscontrol$(count%) = "S" THEN
  12665. REM 22
  12666. IF numdurationssections%(count%) = 0 THEN numdurationssections%(count%) = 1 : REM new layers
  12667. PRINT'" Alter number of sections of durations? [currently ";numdurationssections%(count%);"]"
  12668. PROCyesno
  12669. IF on = 1 THEN
  12670. REM 23
  12671. INPUT'" How many sections "numdurationssections%(count%)
  12672. ENDIF : REM 23
  12673. IF numdurationssections%(count%) > 1 THEN
  12674. PRINT'" Alter starting point of sections?"
  12675. PROCyesno
  12676. IF on = 1 THEN
  12677. REM 24
  12678. FOR count1% = 2 TO numdurationssections%(count%)
  12679. PRINT'" Alter starting point of section ";count1%;" [currently ";startofdurationssection%(count%,count1%);"]"
  12680. PROCyesno
  12681. IF on = 1 THEN
  12682. REM 25
  12683. PRINT'" (layer ";count%;") section ";count1%;" starts at beat "
  12684. INPUT startofdurationssection%(count%,count1%)
  12685. ENDIF : REM 25
  12686. NEXT
  12687. ENDIF : REM 24
  12688. ENDIF
  12689. :
  12690. PRINT'" Alter the unit durations?"
  12691. PROCyesno
  12692. IF on = 1 THEN
  12693. REM 26
  12694. FOR count1% = 1 TO numdurationssections%(count%)
  12695. PRINT'" Alter the duration in section ";count1%;" [currently ";doorations%(count%,count1%);"]"
  12696. PROCyesno
  12697. IF on = 1 THEN
  12698. REM 27
  12699. PRINT'" In layer ";count%;", section ";count1%;" the unit duration is"
  12700. INPUT beats% : PROCalterbeats
  12701. doorations%(count%,count1%) = beats%
  12702. ENDIF : REM 27
  12703. NEXT
  12704. ENDIF : REM 26
  12705. ENDIF : REM 22
  12706. :
  12707. IF durationscontrol$(count%) = "A" THEN
  12708. REM 28
  12709. PRINT'" Alter number of 'sections'? [currently ";numdurationssections1%(count%);"]"
  12710. PROCyesno
  12711. IF on = 1 THEN
  12712. REM 29
  12713. INPUT'" How many 'sections' "numdurationssections1%(count%)
  12714. ENDIF : REM 29
  12715. IF numdurationssections1%(count%) > 1 THEN
  12716. PRINT'" Alter starting point of 'sections'?"
  12717. PROCyesno
  12718. IF on = 1 THEN
  12719. REM 30
  12720. FOR count1% = 2 TO numdurationssections1%(count%)
  12721. PRINT'" Alter section ";count1%;" [currently appearance ";startofdurationssection1%(count%,count1%);"]"
  12722. PROCyesno
  12723. IF on = 1 THEN
  12724. REM 31
  12725. PRINT'" (layer ";count%;") section ";count1%;" starts at appearance "
  12726. INPUT startofdurationssection1%(count%,count1%)
  12727. ENDIF : REM 31
  12728. NEXT
  12729. ENDIF : REM 30
  12730. ENDIF
  12731. PRINT'" Alter the unit durations?"
  12732. PROCyesno
  12733. IF on = 1 THEN
  12734. REM 32
  12735. FOR count1% = 1 TO numdurationssections1%(count%)
  12736. PRINT'" Alter section ";count1%;" [currently ";doorations1%(count%,count1%);"]"
  12737. PROCyesno
  12738. IF on = 1 THEN
  12739. REM 33
  12740. PRINT'" In layer ";count%;", section ";count1%;" the unit duration is "
  12741. INPUT doorations1%(count%,count1%)
  12742. ENDIF : REM 33
  12743. NEXT
  12744. ENDIF : REM 32
  12745. ENDIF : REM 28
  12746. ENDIF : REM 20
  12747. :
  12748. PRINT'" Alter multiplication of durations?"
  12749. PROCyesno
  12750. IF on = 1 THEN
  12751. REM 34
  12752. PRINT'" Do you want the unit duration to be multiplied"
  12753. PRINT " by a given series of values (Y/N) [currently ";multiplier$(count%);"]"
  12754. CASE GET$ OF
  12755. WHEN "Y","y" :
  12756. multiplier$(count%) = "Y"
  12757. PRINT'" starting fresh at each appearance or irrespective (F/I) "
  12758. PRINT " [currently ";multipliermode$(count%);"]"
  12759. CASE GET$ OF
  12760. WHEN "F","f" :
  12761. multipliermode$(count%) = "F"
  12762. OTHERWISE multipliermode$(count%) = "I"
  12763. ENDCASE
  12764. :
  12765. PRINT'" How many values [currently ";numvalues%(count%);"]"
  12766. INPUT numvalues%(count%)
  12767. FOR count1% = 1 TO numvalues%(count%)
  12768. PRINT'" value ";count1%;" is [currently ";values(count%,count1%);"]"
  12769. INPUT values(count%,count1%)
  12770. NEXT
  12771. OTHERWISE multiplier$(count%) = "N"
  12772. ENDCASE
  12773. ELSE
  12774. IF multiplier$(count%) = "" THEN multiplier$(count%) = "N" : REM default for new layers
  12775. ENDIF : REM 34
  12776. :
  12777. PRINT'" Alter control over reoccurence of layers?"
  12778. PROCyesno
  12779. IF on = 1 THEN
  12780. REM 35
  12781. IF numlayerOKsects%(count%) = 0 THEN word$ = "No" ELSE word$ = "Yes"
  12782. PRINT'" Do you want this layer to reoccur according"
  12783. PRINT " to minimum and maximum intervals (eg to"
  12784. PRINT " control phrase-lengths)? [currently ";word$;"]"
  12785. CASE GET$ OF
  12786. WHEN "Y","y" :
  12787. PRINT'" Alter number of sections? [currently ";numlayerOKsects%(count%);"]"
  12788. PROCyesno
  12789. IF on = 1 THEN
  12790. REM 36
  12791. INPUT'" How many sections of this "numlayerOKsects%(count%)
  12792. ENDIF : REM 36
  12793. FOR count1% = 1 TO numlayerOKsects%(count%)
  12794. PRINT'" Any alteration to section ";count1%
  12795. PROCyesno
  12796. IF on = 1 THEN
  12797. REM 37
  12798. PRINT'" Alter the starting point? [currently ";layersOK%(count%,count1%,0);"]"
  12799. PROCyesno
  12800. IF on = 1 THEN
  12801. REM 38
  12802. IF numlayerOKsects%(count%) > 1 THEN
  12803. PRINT'" section ";count1%;" begins at beat "
  12804. INPUT x%
  12805. ELSE x% = 0
  12806. ENDIF
  12807. layersOK%(count%,count1%,0) = x%
  12808. ENDIF : REM 38
  12809. PRINT'" Alter the controlling intervals?"
  12810. PROCyesno
  12811. IF on = 1 THEN
  12812. REM 39
  12813. PRINT'" in this section the layer should NOT reoccur"
  12814. PRINT" until at least how many beats from the"
  12815. PRINT" end of its previous occurence? [currently ";layersOK%(count%,count1%,1);"]"
  12816. INPUT y%
  12817. PRINT'" but SHOULD be made to reoccur after how "
  12818. PRINT" many beats from the end of its previous"
  12819. PRINT" occurence? [currently ";layersOK%(count%,count1%,2);"]"
  12820. INPUT z%
  12821. layersOK%(count%,count1%,1) = y%
  12822. layersOK%(count%,count1%,2) = z%
  12823. ENDIF : REM 39
  12824. ENDIF : REM 37
  12825. NEXT
  12826. OTHERWISE numlayerOKsects%(count%) = 0
  12827. ENDCASE
  12828. ENDIF : REM 35
  12829. :
  12830. ENDIF : REM 5
  12831. :
  12832. NEXT
  12833. :
  12834. :
  12835. PROClayeredattacks
  12836. :
  12837. ENDPROC
  12838. :
  12839. REM**************************************************
  12840. :
  12841. DEF PROCsavelayers
  12842. :
  12843. *Dir HostFS::HardDisc4.$.CAC.Files
  12844. firstnaming$ = "n"
  12845. CLS
  12846. IF filenamelyr$ = "" THEN
  12847. INPUT'" filename "filenamelyr$
  12848. firstnaming$ = "y"
  12849. ENDIF
  12850. IF firstnaming$ = "n" THEN
  12851. PRINT'" as '";filenamelyr$;"'?"
  12852. CASE GET$ OF
  12853. WHEN "N","n" : INPUT'" filename "filenamelyr$
  12854. OTHERWISE
  12855. ENDCASE
  12856. ENDIF
  12857. :
  12858. channel = OPENOUT filenamelyr$
  12859. PRINT#channel, totallength%
  12860. PRINT#channel, numlayers%
  12861. PRINT#channel, numlayersections%
  12862. FOR a% = 0 TO numlayersections%
  12863. PRINT#channel, startoflayersection%(a%)
  12864. NEXT
  12865. FOR a% = 0 TO numlayersections%
  12866. FOR b% = 0 TO numlayers%
  12867. PRINT#channel, shareoflayers%(a%,b%)
  12868. NEXT
  12869. NEXT
  12870. FOR a% = 0 TO numlayers%
  12871. PRINT#channel, attackscontrol$(a%)
  12872. NEXT
  12873. FOR a% = 0 TO numlayers%
  12874. PRINT#channel, numattackssections%(a%)
  12875. NEXT
  12876. FOR a% = 0 TO numlayers%
  12877. FOR b% = 0 TO numattackssections%(a%)
  12878. PRINT#channel, startofattackssection%(a%,b%)
  12879. NEXT
  12880. NEXT
  12881. FOR a% = 0 TO numlayers%
  12882. FOR b% = 0 TO numattackssections%(a%)
  12883. FOR c% = 0 TO 1
  12884. PRINT#channel, numattax%(a%,b%,c%)
  12885. NEXT
  12886. NEXT
  12887. NEXT
  12888. FOR a% = 0 TO numlayers%
  12889. PRINT#channel, numattackssections1%(a%)
  12890. NEXT
  12891. FOR a% = 0 TO numlayers%
  12892. FOR b% = 0 TO numattackssections1%(a%)
  12893. PRINT#channel, startofattackssection1%(a%,b%)
  12894. NEXT
  12895. NEXT
  12896. FOR a% = 0 TO numlayers%
  12897. FOR b% = 0 TO numattackssections1%(a%)
  12898. FOR c% = 0 TO 1
  12899. PRINT#channel, numattax1%(a%,b%,c%)
  12900. NEXT
  12901. NEXT
  12902. NEXT
  12903. FOR a% = 0 TO numlayers%
  12904. PRINT#channel, durationscontrol$(a%)
  12905. NEXT
  12906. FOR a% = 0 TO numlayers%
  12907. PRINT#channel, numdurationssections%(a%)
  12908. NEXT
  12909. FOR a% = 0 TO numlayers%
  12910. FOR b% = 0 TO numdurationssections%(a%)
  12911. PRINT#channel, startofdurationssection%(a%,b%)
  12912. NEXT
  12913. NEXT
  12914. FOR a% = 0 TO numlayers%
  12915. FOR b% = 0 TO numdurationssections%(a%)
  12916. PRINT#channel, doorations%(a%,b%)
  12917. NEXT
  12918. NEXT
  12919. FOR a% = 0 TO numlayers%
  12920. PRINT#channel, numdurationssections1%(a%)
  12921. NEXT
  12922. FOR a% = 0 TO numlayers%
  12923. FOR b% = 0 TO numdurationssections1%(a%)
  12924. PRINT#channel, doorations1%(a%,b%)
  12925. NEXT
  12926. NEXT
  12927. FOR a% = 0 TO numlayers%
  12928. FOR b% = 0 TO numdurationssections1%(a%)
  12929. PRINT#channel, startofdurationssection1%(a%,b%)
  12930. NEXT
  12931. NEXT
  12932. FOR a% = 0 TO numlayers%
  12933. PRINT#channel, multiplier$(a%)
  12934. NEXT
  12935. FOR a% = 0 TO numlayers%
  12936. PRINT#channel, multipliermode$(a%)
  12937. NEXT
  12938. FOR a% = 0 TO numlayers%
  12939. PRINT#channel, numvalues%(a%)
  12940. NEXT
  12941. FOR a% = 0 TO numlayers%
  12942. FOR b% = 0 TO numvalues%(a%)
  12943. PRINT#channel, values(a%,b%)
  12944. NEXT
  12945. NEXT
  12946. FOR a% = 0 TO numlayers%
  12947. PRINT#channel, numlayerOKsects%(a%)
  12948. NEXT
  12949. FOR a% = 0 TO numlayers%
  12950. FOR b% = 0 TO numlayerOKsects%(a%)
  12951. FOR c% = 0 TO 2
  12952. PRINT#channel, layersOK%(a%,b%,c%)
  12953. NEXT
  12954. NEXT
  12955. NEXT
  12956. :
  12957. CLOSE#channel
  12958. *NoDir
  12959. :
  12960. ENDPROC
  12961. :
  12962. REM****************************************************
  12963. :
  12964. DEF PROCloadlayers
  12965. :
  12966. *Dir HostFS::HardDisc4.$.CAC.Files
  12967. INPUT'" filename "filenamelyr$
  12968. channel = OPENIN filenamelyr$
  12969. REPEAT
  12970. INPUT#channel, totallength%
  12971. INPUT#channel, numlayers%
  12972. INPUT#channel, numlayersections%
  12973. FOR a% = 0 TO numlayersections%
  12974. INPUT#channel, startoflayersection%(a%)
  12975. NEXT
  12976. FOR a% = 0 TO numlayersections%
  12977. FOR b% = 0 TO numlayers%
  12978. INPUT#channel, shareoflayers%(a%,b%)
  12979. NEXT
  12980. NEXT
  12981. FOR a% = 0 TO numlayers%
  12982. INPUT#channel, attackscontrol$(a%)
  12983. NEXT
  12984. FOR a% = 0 TO numlayers%
  12985. INPUT#channel, numattackssections%(a%)
  12986. NEXT
  12987. FOR a% = 0 TO numlayers%
  12988. FOR b% = 0 TO numattackssections%(a%)
  12989. INPUT#channel, startofattackssection%(a%,b%)
  12990. NEXT
  12991. NEXT
  12992. FOR a% = 0 TO numlayers%
  12993. FOR b% = 0 TO numattackssections%(a%)
  12994. FOR c% = 0 TO 1
  12995. INPUT#channel, numattax%(a%,b%,c%)
  12996. NEXT
  12997. NEXT
  12998. NEXT
  12999. FOR a% = 0 TO numlayers%
  13000. INPUT#channel, numattackssections1%(a%)
  13001. NEXT
  13002. FOR a% = 0 TO numlayers%
  13003. FOR b% = 0 TO numattackssections1%(a%)
  13004. INPUT#channel, startofattackssection1%(a%,b%)
  13005. NEXT
  13006. NEXT
  13007. FOR a% = 0 TO numlayers%
  13008. FOR b% = 0 TO numattackssections1%(a%)
  13009. FOR c% = 0 TO 1
  13010. INPUT#channel, numattax1%(a%,b%,c%)
  13011. NEXT
  13012. NEXT
  13013. NEXT
  13014. FOR a% = 0 TO numlayers%
  13015. INPUT#channel, durationscontrol$(a%)
  13016. NEXT
  13017. FOR a% = 0 TO numlayers%
  13018. INPUT#channel, numdurationssections%(a%)
  13019. NEXT
  13020. FOR a% = 0 TO numlayers%
  13021. FOR b% = 0 TO numdurationssections%(a%)
  13022. INPUT#channel, startofdurationssection%(a%,b%)
  13023. NEXT
  13024. NEXT
  13025. FOR a% = 0 TO numlayers%
  13026. FOR b% = 0 TO numdurationssections%(a%)
  13027. INPUT#channel, doorations%(a%,b%)
  13028. NEXT
  13029. NEXT
  13030. FOR a% = 0 TO numlayers%
  13031. INPUT#channel, numdurationssections1%(a%)
  13032. NEXT
  13033. FOR a% = 0 TO numlayers%
  13034. FOR b% = 0 TO numdurationssections1%(a%)
  13035. INPUT#channel, doorations1%(a%,b%)
  13036. NEXT
  13037. NEXT
  13038. FOR a% = 0 TO numlayers%
  13039. FOR b% = 0 TO numdurationssections1%(a%)
  13040. INPUT#channel, startofdurationssection1%(a%,b%)
  13041. NEXT
  13042. NEXT
  13043. FOR a% = 0 TO numlayers%
  13044. INPUT#channel, multiplier$(a%)
  13045. NEXT
  13046. FOR a% = 0 TO numlayers%
  13047. INPUT#channel, multipliermode$(a%)
  13048. NEXT
  13049. FOR a% = 0 TO numlayers%
  13050. INPUT#channel, numvalues%(a%)
  13051. NEXT
  13052. FOR a% = 0 TO numlayers%
  13053. FOR b% = 0 TO numvalues%(a%)
  13054. INPUT#channel, values(a%,b%)
  13055. NEXT
  13056. NEXT
  13057. FOR a% = 0 TO numlayers%
  13058. INPUT#channel, numlayerOKsects%(a%)
  13059. NEXT
  13060. FOR a% = 0 TO numlayers%
  13061. FOR b% = 0 TO numlayerOKsects%(a%)
  13062. FOR c% = 0 TO 2
  13063. INPUT#channel, layersOK%(a%,b%,c%)
  13064. NEXT
  13065. NEXT
  13066. NEXT
  13067. UNTIL EOF#channel
  13068. CLOSE#channel
  13069. *NoDir
  13070. :
  13071. ENDPROC
  13072. :
  13073. REM************************************************
  13074. :
  13075. DEF PROCseriesamplitudes
  13076. :
  13077. PROCwindow(20,69,73,45)
  13078. :
  13079. IF ampoptions$ = "y" THEN
  13080. PRINT'" Create a new group, edit current group,"
  13081. PRINT" or load a file (N/E/F)"
  13082. CASE GET$ OF
  13083. WHEN "N","n" :
  13084. filenameamps$ = ""
  13085. PRINT'" from a sample of amplitudes or"
  13086. PRINT" according to attacks or by note"
  13087. PRINT" numbers (S/A/N)"
  13088. CASE GET$ OF
  13089. WHEN "S","s" : ampmethod$ = "sample" : PROCnewamps
  13090. WHEN "A","a" : ampmethod$ = "attacks" : PROCnewamps
  13091. WHEN "N","n" : ampmethod$ = "notenumber" : PROCnewamps
  13092. OTHERWISE VDU 7 : PROCseriesamplitudes
  13093. ENDCASE
  13094. WHEN "E","e" : PROCeditamps
  13095. WHEN "F","f" : PROCloadamps : PROCeditamps
  13096. OTHERWISE VDU 7 : PROCseriesamplitudes
  13097. ENDCASE
  13098. :
  13099. PRINT'" Save these settings?"
  13100. CASE GET$ OF
  13101. WHEN "Y","y" : PROCsaveamps
  13102. OTHERWISE
  13103. ENDCASE
  13104. :
  13105. PROCrunamps
  13106. :
  13107. PRINT'" Re-order amplitudes randomly?"
  13108. CASE GET$ OF
  13109. WHEN "Y","y" : PROCreorderamps
  13110. OTHERWISE
  13111. ENDCASE
  13112. :
  13113. numamplitudes% = manyattacks% : PROCinsertamplitudes
  13114. :
  13115. ELSE PROCsimpleamps
  13116. ENDIF
  13117. :
  13118. ENDPROC
  13119. :
  13120. REM***************************************
  13121. DEF PROCsimpleamps
  13122. :
  13123. PROCwindow(20,69,73,45)
  13124. PRINT'" How many amplitudes "
  13125. INPUT " (for 1 press 0) "numamplitudes%
  13126. IF numamplitudes% = 0 THEN numamplitudes% = 1
  13127. :
  13128. IF numamplitudes% = 1 THEN
  13129. INPUT'" the amplitude is: "dyn$
  13130. PROCconvertdyn
  13131. amplitudes%(0) = dyn%
  13132. ELSE
  13133. PRINT'" Are all the amplitudes the same?"
  13134. CASE GET$ OF
  13135. WHEN "N","n","2" :
  13136. FOR count% = 0 TO (numamplitudes%-1)
  13137. PRINT'" amplitude ";count%+1;" is: "
  13138. IF count% > 0 THEN PRINT " (0 = previous) "
  13139. INPUT dyn$
  13140. IF dyn$ = "" THEN
  13141. dyn$ = prevdyn$
  13142. COLOUR 1 : PRINT dyn$
  13143. wait$ = INKEY$(20) : COLOUR 0
  13144. ENDIF
  13145. prevdyn$ = dyn$
  13146. PROCconvertdyn
  13147. amplitudes%(count%) = dyn%
  13148. NEXT
  13149. OTHERWISE
  13150. INPUT'" the amplitude is: "dyn$
  13151. PROCconvertdyn
  13152. FOR count% = 0 TO (numamplitudes%-1) : amplitudes%(count%) = dyn% : NEXT
  13153. ENDCASE
  13154. ENDIF
  13155. :
  13156. REM function can feed amplitudes similarly into amplitudes%()
  13157. :
  13158. ampmethod$ = "sample"
  13159. PROCinsertamplitudes
  13160. :
  13161. ENDPROC
  13162. :
  13163. *************************************************************************
  13164. :
  13165. DEF PROCnewamps
  13166. :
  13167. CASE ampmethod$ OF
  13168. WHEN "attacks" :
  13169. PRINT'" Dynamics determined by the preceding"
  13170. PRINT" attack intervals, the succeeding ones, "
  13171. PRINT" or both (P/S/B)"
  13172. CASE GET$ OF
  13173. WHEN "P","p" : prepost$ = "P"
  13174. WHEN "S","s" : prepost$ = "S"
  13175. OTHERWISE prepost$ = "B"
  13176. ENDCASE
  13177. CLS
  13178. PRINT'" How many different 'layers' of dynamics?"
  13179. PRINT'" (NB layers inputted later override earlier ones;"
  13180. PRINT" existing dynamics remain unchanged if their"
  13181. PRINT" interval is not included, or if the interval is"
  13182. PRINT" set at 0 - 0)"
  13183. INPUT dynlayers%
  13184. :
  13185. FOR count% = 1 TO dynlayers%
  13186. IF prepost$ = "P" OR prepost$ = "B" THEN
  13187. PRINT'" In layer ";count%;" the preceding interval "
  13188. PRINT " is between how many beats..."
  13189. INPUT dynlayers%(count%,0)
  13190. PRINT'" and how many beats..."
  13191. INPUT dynlayers%(count%,1)
  13192. PRINT'" and the dynamic is "
  13193. INPUT dyn$
  13194. PROCconvertdyn : dynlayers%(count%,2) = dyn%
  13195. ENDIF
  13196. :
  13197. IF prepost$ = "S" OR prepost$ = "B" THEN
  13198. PRINT'" In layer ";count%;" the succeeding interval "
  13199. PRINT " is between how many beats..."
  13200. INPUT dynlayers%(count%,3)
  13201. PRINT'" and how many beats..."
  13202. INPUT dynlayers%(count%,4)
  13203. PRINT'" and the dynamic is "
  13204. INPUT dyn$
  13205. PROCconvertdyn : dynlayers%(count%,5) = dyn%
  13206. ENDIF
  13207. NEXT
  13208. :
  13209. WHEN "notenumber" :
  13210. INPUT'" How many elements in the (recycling) pattern "dynnumbers%
  13211. FOR count% = 1 TO dynnumbers%
  13212. PRINT'" Element ";count%;" places dynamics ";count%;" and ";count%+1
  13213. PRINT" how many notes apart?"
  13214. INPUT dynnumbers%(count%)
  13215. NEXT
  13216. PRINT" and the dynamic for these notes is "
  13217. INPUT dynnumbers$
  13218. :
  13219. WHEN "sample" :
  13220. INPUT'" Total number of amplitudes "manyattacks%
  13221. INPUT " Number of amplitudes in the sample "ampsample%
  13222. FOR count% = 0 TO (ampsample%-1)
  13223. PRINT'" Element ";count%+1;" in the sample is "
  13224. INPUT dyn$
  13225. PROCconvertdyn : ampsample%(count%) = dyn%
  13226. NEXT
  13227. :
  13228. ENDCASE
  13229. :
  13230. ENDPROC
  13231. :
  13232. REM*********************************************
  13233. :
  13234. DEF PROCconvertdyn
  13235. :
  13236. CASE dyn$ OF
  13237. WHEN "0" : dyn% = 0
  13238. WHEN "ppp" : dyn% = 1
  13239. WHEN "pp" : dyn% = 2
  13240. WHEN "p" : dyn% = 3
  13241. WHEN "mp" : dyn% = 4
  13242. WHEN "mf" : dyn% = 5
  13243. WHEN "f" : dyn% = 6
  13244. WHEN "ff" : dyn% = 7
  13245. WHEN "fff" : dyn% = 8
  13246. ENDCASE
  13247. ENDPROC
  13248. :
  13249. REM*********************************************
  13250. :
  13251. DEF PROCrunamps
  13252. :
  13253. IF ampmethod$ = "attacks" OR ampmethod$ = "notenumber" THEN
  13254. INPUT'" The dynamics are to be read into which voice? "voice%
  13255. voice% -= 1
  13256. INPUT'" Starting at bar "copystartbar%
  13257. INPUT" beat "beats%
  13258. PROCalterbeats : copystartbeat% = beats%
  13259. startat% = (copystartbar%*10^3)+beats%
  13260. INPUT'" Ending at bar "copyendbar%
  13261. INPUT " beat "beats%
  13262. PROCalterbeats : copyendbeat% = beats%
  13263. :
  13264. value% = (copystartbar%*10^3)+copystartbeat%
  13265. IF value% <= array%(0,0,voice%)DIV10^3 THEN
  13266. startatcell% = 0
  13267. ELSE
  13268. PROCsearch(value%)
  13269. startatcell% = startcell%
  13270. ENDIF
  13271. value% = (copyendbar%*10^3)+copyendbeat%
  13272. IF value% >= array%(numusedcells%(voice%)-1,0,voice%)DIV10^3 THEN
  13273. endatcell% = numusedcells%(voice%) - 1
  13274. ELSE
  13275. PROCsearch(value%)
  13276. IF shunt$ = "N" THEN endatcell% = startcell% ELSE endatcell% = startcell% - 1
  13277. ENDIF
  13278. :
  13279. manyattacks% = endatcell% - startatcell% + 1
  13280. REM create 'gap' between beat-of-bar and first actual attack
  13281. carrybars% = (array%(startatcell%,0,voice%)DIV10^6)-copystartbar%
  13282. carrybeats% = ((array%(startatcell%,0,voice%)DIV10^3)MOD10^3)-copystartbeat%
  13283. attacks1%(0) = (carrybars%*960)+carrybeats%
  13284. :
  13285. FOR count% = 0 TO (manyattacks%-1)
  13286. IF count% > 0 THEN
  13287. carrybars% = (array%(startatcell%+count%,0,voice%)DIV10^6)-(array%(startatcell%+count%-1,0,voice%)DIV10^6)
  13288. carrybeats% = ((array%(startatcell%+count%,0,voice%)DIV10^3)MOD10^3)-((array%(startatcell%+count%-1,0,voice%)DIV10^3)MOD10^3)
  13289. attacks1%(count%) = attacks1%(count%-1) + ((carrybars%*960)+carrybeats%)
  13290. ENDIF
  13291. :
  13292. pitches%(count%+1) = array%(startatcell%+count%,0,voice%)MOD10^3
  13293. durations%(count%+1) = (array%(startatcell%+count%,1,voice%)DIV10)MOD10^3
  13294. amplitudes%(count%+1) = (array%(startatcell%+count%,1,voice%))MOD10
  13295. envelopes%(count%+1) = (array%(startatcell%+count%,2,voice%))DIV10^2
  13296. glissandos%(count%+1) = (array%(startatcell%+count%,1,voice%)DIV10^4)
  13297. inflections%(count%+1) = array%(startatcell%+count%,2,voice%)MOD10^2
  13298. NEXT
  13299. ENDIF
  13300. :
  13301. CASE ampmethod$ OF
  13302. WHEN "attacks" :
  13303. FOR count% = 0 TO manyattacks%-1
  13304. FOR count1% = 1 TO dynlayers%
  13305. IF count% > 0 THEN
  13306. IF prepost$ = "P" OR prepost$ = "B" THEN
  13307. IF attacks1%(count%)-attacks1%(count%-1)>=dynlayers%(count1%,0) AND attacks1%(count%)-attacks1%(count%-1)<=dynlayers%(count1%,1) THEN amplitudes%(count%+1) = dynlayers%(count1%,2)
  13308. ENDIF
  13309. ENDIF
  13310. IF prepost$ = "S" OR prepost$ = "B" THEN
  13311. IF attacks1%(count%+1)-attacks1%(count%)>=dynlayers%(count1%,3)ANDattacks1%(count%+1)-attacks1%(count%)<=dynlayers%(count1%,4) THEN amplitudes%(count%+1) = dynlayers%(count1%,5)
  13312. ENDIF
  13313. NEXT
  13314. NEXT
  13315. :
  13316. WHEN "notenumber" :
  13317. count% = 1 : count1% = 0
  13318. dyn$ = dynnumbers$ : PROCconvertdyn
  13319. REPEAT
  13320. count1% += 1
  13321. IF count1% > dynnumbers% THEN count1% = 1
  13322. amplitudes%(count%) = dyn%
  13323. count% += dynnumbers%(count1%)
  13324. UNTIL count% > manyattacks%
  13325. :
  13326. WHEN "sample" :
  13327. count% = 1 : count1% = 1
  13328. REPEAT
  13329. amplitudes%(count%-1) = ampsample%(count1%-1)
  13330. count% += 1 : count1% += 1
  13331. IF count1% > ampsample% THEN count1% = 1
  13332. UNTIL count% > manyattacks%
  13333. :
  13334. ENDCASE
  13335. :
  13336. ENDPROC
  13337. :
  13338. REM******************************************************
  13339. :
  13340. DEF PROCreorderamps
  13341. :
  13342. FOR count% = 0 TO manyattacks%-1
  13343. REPEAT
  13344. x% = RND(manyattacks%)
  13345. x% = x%-1
  13346. IF amplitudes%(x%) = 0 THEN thiscell$ = "done" ELSE thiscell$ = "available"
  13347. UNTIL thiscell$ = "available"
  13348. amplitudes1%(count%) = amplitudes%(x%)
  13349. amplitudes%(x%) = 0
  13350. NEXT
  13351. amplitudes%() = amplitudes1%()
  13352. :
  13353. ENDPROC
  13354. :
  13355. REM*****************************************************
  13356. :
  13357. DEF PROCeditamps
  13358. :
  13359. CASE ampmethod$ OF
  13360. WHEN "attacks" :
  13361. PRINT'" Alter whether dynamics determined by"
  13362. PRINT" preceding, succeeding intervals or both?"
  13363. PROCyesno
  13364. IF on = 1 THEN
  13365. PRINT'" Dynamics determined by the preceding"
  13366. PRINT" attack intervals, the succeeding ones, "
  13367. PRINT" or both (P/S/B)"
  13368. CASE GET$ OF
  13369. WHEN "P","p" : prepost$ = "P"
  13370. WHEN "S","s" : prepost$ = "S"
  13371. OTHERWISE prepost$ = "B"
  13372. ENDCASE
  13373. ENDIF
  13374. CLS
  13375. PRINT'" Alter number of 'layers'?"
  13376. PROCyesno
  13377. IF on = 1 THEN
  13378. PRINT'" How many different 'layers' of dynamics?"
  13379. PRINT'" (NB layers inputted later override earlier ones;"
  13380. PRINT" existing dynamics remain unchanged if their"
  13381. PRINT" interval is not included, or if the interval is"
  13382. PRINT" set at 0 - 0)"
  13383. INPUT dynlayers%
  13384. ENDIF
  13385. :
  13386. PRINT'" Alter any of the layers?"
  13387. PROCyesno
  13388. IF on = 1 THEN
  13389. FOR count% = 1 TO dynlayers%
  13390. PRINT'" Alter layer ";count%
  13391. PROCyesno
  13392. IF on = 1 THEN
  13393. IF prepost$ = "P" OR prepost$ = "B" THEN
  13394. PRINT'" In layer ";count%;" the preceding interval "
  13395. PRINT " is between how many beats..."
  13396. INPUT dynlayers%(count%,0)
  13397. PRINT'" and how many beats..."
  13398. INPUT dynlayers%(count%,1)
  13399. PRINT'" and the dynamic is "
  13400. INPUT dyn$
  13401. PROCconvertdyn : dynlayers%(count%,2) = dyn%
  13402. ENDIF
  13403. :
  13404. IF prepost$ = "S" OR prepost$ = "B" THEN
  13405. PRINT'" In layer ";count%;" the succeeding interval "
  13406. PRINT " is between how many beats..."
  13407. INPUT dynlayers%(count%,3)
  13408. PRINT'" and how many beats..."
  13409. INPUT dynlayers%(count%,4)
  13410. PRINT'" and the dynamic is "
  13411. INPUT dyn$
  13412. PROCconvertdyn : dynlayers%(count%,5) = dyn%
  13413. ENDIF
  13414. ENDIF
  13415. NEXT
  13416. ENDIF
  13417. :
  13418. WHEN "notenumber" :
  13419. PRINT'" Alter number of elements in the pattern?"
  13420. PROCyesno
  13421. IF on = 1 THEN
  13422. INPUT'" How many elements in the (recycling) pattern "dynnumbers%
  13423. ENDIF
  13424. FOR count% = 1 TO dynnumbers%
  13425. PRINT'" Alter element ";count%
  13426. PROCyesno
  13427. IF on =1 THEN
  13428. PRINT'" Element ";count%;" places dynamics ";count%;" and ";count%+1
  13429. PRINT" how many notes apart?"
  13430. INPUT dynnumbers%(count%)
  13431. ENDIF
  13432. NEXT
  13433. PRINT'" Alter the dynamic?"
  13434. PROCyesno
  13435. IF on =1 THEN
  13436. PRINT" and the dynamic for these notes is "
  13437. INPUT dynnumbers$
  13438. ENDIF
  13439. :
  13440. WHEN "sample" :
  13441. PRINT'" Alter total number of amplitudes?"
  13442. PROCyesno
  13443. IF on =1 THEN
  13444. INPUT'" Total number of amplitudes "manyattacks%
  13445. ENDIF
  13446. PRINT'" Alter number of amplitudes in the sample?"
  13447. PROCyesno
  13448. IF on =1 THEN
  13449. INPUT " Number of amplitudes in the sample "ampsample%
  13450. ENDIF
  13451. PRINT'" Alter the sample?"
  13452. PROCyesno
  13453. IF on =1 THEN
  13454. FOR count% = 0 TO ampsample%-1
  13455. PRINT'" Alter element ";count%+1
  13456. PROCyesno
  13457. IF on =1 THEN
  13458. PRINT'" Element ";count%+1;" in the sample is "
  13459. INPUT dyn$
  13460. PROCconvertdyn : ampsample%(count%) = dyn%
  13461. ENDIF
  13462. NEXT
  13463. ENDIF
  13464. :
  13465. ENDCASE
  13466. :
  13467. ENDPROC
  13468. :
  13469. REM***************************************************
  13470. :
  13471. DEF PROCsaveamps
  13472. :
  13473. :
  13474. *Dir HostFS::HardDisc4.$.CAC.Files
  13475. firstnaming$ = "n"
  13476. CLS
  13477. IF filenameamps$ = "" THEN
  13478. INPUT'" filename "filenameamps$
  13479. firstnaming$ = "y"
  13480. ENDIF
  13481. IF firstnaming$ = "n" THEN
  13482. PRINT'" as '";filenameamps$;"'?"
  13483. CASE GET$ OF
  13484. WHEN "N","n" : INPUT'" filename "filenameamps$
  13485. OTHERWISE
  13486. ENDCASE
  13487. ENDIF
  13488. :
  13489. channel = OPENOUT filenameamps$
  13490. PRINT#channel, ampmethod$
  13491. IF ampmethod$ = "attacks" THEN
  13492. PRINT#channel, prepost$
  13493. PRINT#channel, dynlayers%
  13494. ENDIF
  13495. IF ampmethod$ = "notenumber" THEN
  13496. PRINT#channel, dynnumbers%
  13497. PRINT#channel, dynnumbers$
  13498. ENDIF
  13499. IF ampmethod$ = "sample" THEN
  13500. PRINT#channel, manyattacks%
  13501. PRINT#channel, ampsample%
  13502. ENDIF
  13503. IF ampmethod$ = "attacks" THEN
  13504. FOR a% = 0 TO 12
  13505. FOR b% = 0 TO 5
  13506. PRINT#channel, dynlayers%(a%,b%)
  13507. NEXT
  13508. NEXT
  13509. ENDIF
  13510. IF ampmethod$ = "notenumber" THEN
  13511. FOR a% = 0 TO 99
  13512. PRINT#channel, dynnumbers%(a%)
  13513. NEXT
  13514. ENDIF
  13515. IF ampmethod$ = "sample" THEN
  13516. FOR a% = 0 TO 49
  13517. PRINT#channel, ampsample%(a%)
  13518. NEXT
  13519. ENDIF
  13520. :
  13521. CLOSE#channel
  13522. *NoDir
  13523. :
  13524. ENDPROC
  13525. :
  13526. REM***********************************
  13527. :
  13528. DEF PROCloadamps
  13529. :
  13530. :
  13531. *Dir HostFS::HardDisc4.$.CAC.Files
  13532. INPUT'" filename "filenameamps$
  13533. channel = OPENIN filenameamps$
  13534. REPEAT
  13535. INPUT#channel, ampmethod$
  13536. IF ampmethod$ = "attacks" THEN
  13537. INPUT#channel, prepost$
  13538. INPUT#channel, dynlayers%
  13539. ENDIF
  13540. IF ampmethod$ = "notenumber" THEN
  13541. INPUT#channel, dynnumbers%
  13542. INPUT#channel, dynnumbers$
  13543. ENDIF
  13544. IF ampmethod$ = "sample" THEN
  13545. INPUT#channel, manyattacks%
  13546. INPUT#channel, ampsample%
  13547. ENDIF
  13548. IF ampmethod$ = "attacks" THEN
  13549. FOR a% = 0 TO 12
  13550. FOR b% = 0 TO 5
  13551. INPUT#channel, dynlayers%(a%,b%)
  13552. NEXT
  13553. NEXT
  13554. ENDIF
  13555. IF ampmethod$ = "notenumber" THEN
  13556. FOR a% = 0 TO 99
  13557. INPUT#channel, dynnumbers%(a%)
  13558. NEXT
  13559. ENDIF
  13560. IF ampmethod$ = "sample" THEN
  13561. FOR a% = 0 TO 49
  13562. INPUT#channel, ampsample%(a%)
  13563. NEXT
  13564. ENDIF
  13565. :
  13566. UNTIL EOF#channel
  13567. CLOSE#channel
  13568. *NoDir
  13569. :
  13570. ENDPROC
  13571. :
  13572. REM*********************************
  13573. :
  13574. DEF PROCbeatnumbers
  13575. :
  13576. amount% = 10
  13577. IF beatnum_diff$ = "num" THEN
  13578. IF beatunits$ = "big" THEN
  13579. PRINT (array%(startcell%,0,voice%)DIV10^3)MOD10^3
  13580. ELSE beatnum = ((array%(startcell%,0,voice%)DIV10^3)MOD10^3)/beatfactor%
  13581. IF beatnum MOD 1 > 0 THEN
  13582. beatnum = beatnum*10
  13583. beatnum% = beatnum DIV 1
  13584. PRINT beatnum%/amount%
  13585. ELSE PRINT beatnum
  13586. ENDIF
  13587. ENDIF
  13588. ELSE
  13589. beatdiff% = ((array%(startcell%+1,0,voice%)DIV10^3)MOD10^3)-((array%(startcell%,0,voice%)DIV10^3)MOD10^3)
  13590. beatdiff%+=(((array%(startcell%+1,0,voice%)DIV10^6)-(array%(startcell%,0,voice%)DIV10^6))*960)
  13591. :
  13592. IF beatdiff% > 0 THEN
  13593. IF beatunits$ = "big" THEN
  13594. PRINT beatdiff%
  13595. ELSE
  13596. beatdiff = beatdiff%/beatfactor%
  13597. IF beatdiff MOD 1 > 0 THEN
  13598. beatdiff = beatdiff*10
  13599. beatdiff% = beatdiff DIV 1
  13600. PRINT beatdiff%/amount%
  13601. ELSE PRINT beatdiff%/beatfactor%
  13602. ENDIF
  13603. ENDIF
  13604. ENDIF
  13605. :
  13606. ENDIF
  13607. ENDPROC
  13608. :
  13609. REM****************************************************
  13610. :
  13611. DEF PROCextract
  13612. :
  13613. counter% = -1 : attacks1%() = 0 : countt% = -1 : endcell% = manyattacks%
  13614. IF extractmode$ = "random" THEN numb% = RND(higher%-lower%+1)+lower%-2
  13615. REPEAT
  13616. countt% += 1
  13617. extract$ = "n"
  13618. :
  13619. CASE extractmode$ OF
  13620. WHEN "pitchclass" :
  13621. attempts% = 0
  13622. REPEAT
  13623. attempts% += 1
  13624. :
  13625. IF extractinfo%(attempts%) = array%(startatcell%+countt%,0,voice%)MOD10^3 THEN extract$ = "y"
  13626. UNTIL extract$ = "y" OR attempts% = npitches%
  13627. WHEN "band" :
  13628. attempts% = 0 : top$ = "n" : bottom$ = "n"
  13629. theoctave% = array%(startatcell%+countt%,0,voice%)MOD10
  13630. thepitch% = (array%(startatcell%+countt%,0,voice%)DIV10^2)MOD10
  13631. theaccid% = (array%(startatcell%+countt%,0,voice%)DIV10)MOD10
  13632. REPEAT
  13633. attempts% += 1
  13634. testoctave% = extractinfo%(attempts%)MOD10
  13635. testpitch% = extractinfo%(attempts%)DIV10^2
  13636. testaccid% = (extractinfo%(attempts%)DIV10)MOD10
  13637. IF ((attempts%/2)*10)MOD10 > 0 THEN
  13638. IF theoctave% >= testoctave% THEN bottom$ = "y" ELSE bottom$ = "n"
  13639. IF bottom$ = "y" AND theoctave% = testoctave% THEN
  13640. IF thepitch% >= testpitch% THEN bottom$ = "y" ELSE bottom$ = "n"
  13641. ENDIF
  13642. IF bottom$ = "y" AND theoctave% = testoctave% AND thepitch% = testpitch% THEN
  13643. IF theaccid% >= testaccid% THEN bottom$ = "y" ELSE bottom$ = "n"
  13644. ENDIF
  13645. ELSE
  13646. IF theoctave% <= testoctave% THEN top$ = "y" ELSE top$ = "n"
  13647. IF top$ = "y" AND theoctave% = testoctave% THEN
  13648. IF thepitch% <= testpitch% THEN top$ = "y" ELSE top$ = "n"
  13649. ENDIF
  13650. IF top$ = "y" AND theoctave% = testoctave% AND thepitch% = testpitch% THEN
  13651. IF theaccid% <= testaccid% THEN top$ = "y" ELSE top$ = "n"
  13652. ENDIF
  13653. ENDIF
  13654. IF bottom$ = "y" AND top$ = "y" THEN extract$ = "y"
  13655. UNTIL extract$ = "y" OR attempts% = npitches%
  13656. WHEN "random" :
  13657. extract$ = "n"
  13658. IF numb% = countt% THEN
  13659. extract$ = "y"
  13660. max% = higher%-lower%+1 : a% = RND(max%) : b% = lower% -1 : c% = countt%
  13661. IF a% = 0 THEN a% = 1
  13662. numb% = a% + b% + c%
  13663. IF copymove$ = "EM" THEN numb% -= 1
  13664. ENDIF
  13665. WHEN "attackinterval" :
  13666. bar1% = array%(startatcell%+countt%,0,voice%)DIV10^6
  13667. beat1% = (array%(startatcell%+countt%,0,voice%)DIV10^3)MOD10^3
  13668. beat1% = (bar1%*960)+beat1%
  13669. bar2% = array%(startatcell%+countt%+1,0,voice%)DIV10^6
  13670. beat2% = (array%(startatcell%+countt%+1,0,voice%)DIV10^3)MOD10^3
  13671. beat2% = (bar2%*960)+beat2%
  13672. interval% = beat2% - beat1%
  13673. IF interval% >= lower% AND interval% <= higher% THEN extract$ = "y"
  13674. ENDCASE
  13675. :
  13676. IF extract$ = "y" THEN
  13677. counter% += 1
  13678. attacks2%(counter%) = (array%(startatcell%+countt%,0,voice%))DIV10^3
  13679. pitches%(counter%) = array%(startatcell%+countt%,0,voice%)MOD10^3
  13680. durations%(counter%) = (array%(startatcell%+countt%,1,voice%)DIV10)MOD10^3
  13681. amplitudes%(counter%) = (array%(startatcell%+countt%,1,voice%))MOD10
  13682. envelopes%(counter%) = (array%(startatcell%+countt%,2,voice%))DIV10^2
  13683. glissandos%(counter%) = (array%(startatcell%+countt%,1,voice%)DIV10^4)
  13684. inflections%(counter%) = array%(startatcell%+countt%,2,voice%)MOD10^2
  13685. IF copymove$ = "EM" THEN
  13686. REM routine to delete each note as it is extracted, if move-extract wanted
  13687. numnotes% = 1
  13688. bar% = array%(startatcell%+countt%,0,voice%) DIV10^6
  13689. beats% = (array%(startatcell%+countt%,0,voice%)DIV10^3)MOD10^3
  13690. PROCalterbeats
  13691. start% = (bar%*(10^3))+beats%
  13692. PROCsearch(start%)
  13693. PROCshuntleft(startcell%,numnotes%)
  13694. countt% -= 1 : endcell% -= 1
  13695. REM prev line is because of deletion, ie array cells have all now shifted one to left!
  13696. ENDIF
  13697. REM end of delete routine
  13698. :
  13699. ENDIF
  13700. UNTIL countt% = endcell% - 1
  13701. manyattacks% = counter%+1
  13702. attacks1%(0) = (((attacks2%(0)DIV10^3)*960)+(attacks2%(0)MOD10^3)-960)-((copystartbar%*960)+copystartbeat%-960)
  13703. FOR count% = 1 TO manyattacks% - 1
  13704. bars% = (attacks2%(count%)DIV10^3)-(attacks2%(count%-1)DIV10^3)
  13705. beats% = (attacks2%(count%)MOD10^3)-(attacks2%(count%-1)MOD10^3)
  13706. attacks1%(count%) = attacks1%(count%-1) + (bars%*960) + beats%
  13707. NEXT
  13708. :
  13709. :
  13710. ENDPROC
  13711. :
  13712. REM********************************************************
  13713. :
  13714. DEF PROCextractinfo
  13715. :
  13716. IF quickextract$ = "n" THEN
  13717. :
  13718. CLS
  13719. aslasttime$ = "n"
  13720. PRINT'" Extract by pitch-class, pitch-band,"
  13721. PRINT" attack interval, random number"
  13722. PRINT" or as last time (P/B/A/R/L) "
  13723. CASE GET$ OF
  13724. WHEN "P","p","0" :
  13725. CLS
  13726. extractmode$ = "pitchclass"
  13727. WHEN "B","b" :
  13728. CLS : extractmode$ = "band"
  13729. WHEN "R","r" :
  13730. CLS : extractmode$ = "random"
  13731. PRINT'" Random extractions follow "
  13732. PRINT" each other at a distance "
  13733. INPUT " of between how many notes "lower%
  13734. INPUT " and how many notes "higher%
  13735. WHEN "A","a" :
  13736. CLS : extractmode$ = "attackinterval"
  13737. PRINT'" Extract notes which precede"
  13738. PRINT" next note by between"
  13739. INPUT" how many beats "lower%
  13740. INPUT" and how many beats "higher%
  13741. WHEN "L","l" :
  13742. aslasttime$ = "y"
  13743. OTHERWISE CLS : extractmode$ = "pitchclass"
  13744. ENDCASE
  13745. :
  13746. ENDIF
  13747. :
  13748. IF aslasttime$ = "n" THEN
  13749. :
  13750. IF extractmode$ = "pitchclass" OR extractmode$ = "band" THEN
  13751. :
  13752. IF quickextract$ = "n" THEN
  13753. IF extractmode$ = "pitchclass" THEN
  13754. INPUT'" How many pitch-classes? "npitches%
  13755. IF npitches% = 0 THEN npitches% = 1
  13756. ELSE
  13757. INPUT'" How many bands (0 = 1) "nbands%
  13758. IF nbands% = 0 THEN nbands% = 1
  13759. ENDIF
  13760. ENDIF
  13761. :
  13762. IF extractmode$ = "band" THEN npitches% = nbands%*2
  13763. FOR p% = 1 TO npitches%
  13764. IF extractmode$ = "pitchclass" THEN
  13765. PRINT' " Pitch-class ";p%;" has the note name ";
  13766. ELSE PRINT'" Going up, band-point ";p%;" is note ";
  13767. ENDIF
  13768. COLOUR 1
  13769. CASE GET$ OF
  13770. WHEN "C","c" : note% = 0 : PRINT "C" : finished$ = "n"
  13771. WHEN "D","d" : note% = 1 : PRINT "D" : finished$ = "n"
  13772. WHEN "E","e" : note% = 2 : PRINT "E" : finished$ = "n"
  13773. WHEN "F","f" : note% = 3 : PRINT "F" : finished$ = "n"
  13774. WHEN "G","g" : note% = 4 : PRINT "G" : finished$ = "n"
  13775. WHEN "A","a" : note% = 5 : PRINT "A" : finished$ = "n"
  13776. WHEN "B","b" : note% = 6 : PRINT "B" : finished$ = "n"
  13777. WHEN "1" : note% = 0 : accid% = 5 : octave% = 4 : finished$ = "y"
  13778. WHEN "2" : note% = 0 : accid% = 9 : octave% = 4 : finished$ = "y"
  13779. WHEN "3" : note% = 1 : accid% = 5 : octave% = 4 : finished$ = "y"
  13780. WHEN "4" : note% = 2 : accid% = 1 : octave% = 4 : finished$ = "y"
  13781. WHEN "5" : note% = 2 : accid% = 5 : octave% = 4 : finished$ = "y"
  13782. WHEN "6" : note% = 3 : accid% = 5 : octave% = 4 : finished$ = "y"
  13783. WHEN "7" : note% = 3 : accid% = 9 : octave% = 4 : finished$ = "y"
  13784. WHEN "8" : note% = 4 : accid% = 5 : octave% = 4 : finished$ = "y"
  13785. WHEN "9" : note% = 5 : accid% = 1 : octave% = 4 : finished$ = "y"
  13786. ENDCASE
  13787. COLOUR 0
  13788. :
  13789. IF finished$ = "n" THEN
  13790. :
  13791. PRINT " accidental ";
  13792. COLOUR 1
  13793. CASE GET$ OF
  13794. WHEN "1" : accid% = 1 : PRINT "flat"
  13795. WHEN "2" : accid% = 2 : PRINT "3/8flat"
  13796. WHEN "3" : accid% = 3 : PRINT "1/4flat"
  13797. WHEN "4" : accid% = 4 : PRINT "1/8flat"
  13798. WHEN "5" : accid% = 5 : PRINT "nat"
  13799. WHEN "6" : accid% = 6 : PRINT "1/8shrp"
  13800. WHEN "7" : accid% = 7 : PRINT "1/4shrp"
  13801. WHEN "8" : accid% = 8 : PRINT "3/8shrp"
  13802. WHEN "9" : accid% = 9 : PRINT "shrp"
  13803. ENDCASE
  13804. COLOUR 0
  13805. PRINT " octave ";
  13806. COLOUR 1
  13807. CASE GET$ OF
  13808. WHEN "0" : octave% = 0 : PRINT "0"
  13809. WHEN "1" : octave% = 1 : PRINT "1"
  13810. WHEN "2" : octave% = 2 : PRINT "2"
  13811. WHEN "3" : octave% = 3 : PRINT "3"
  13812. WHEN "4" : octave% = 4 : PRINT "4"
  13813. WHEN "5" : octave% = 5 : PRINT "5"
  13814. WHEN "6" : octave% = 6 : PRINT "6"
  13815. WHEN "7" : octave% = 7 : PRINT "7"
  13816. WHEN "8" : octave% = 8 : PRINT "8"
  13817. ENDCASE
  13818. COLOUR 0
  13819. :
  13820. ENDIF
  13821. :
  13822. extractinfo%(p%) = (note%*100)+(accid%*10)+octave%
  13823. NEXT
  13824. :
  13825. ENDIF
  13826. :
  13827. ENDIF
  13828. :
  13829. IF extractmode$ = "random" AND quickextract$ = "y" THEN
  13830. PRINT '" Random extractions follow "
  13831. PRINT " each other at a distance "
  13832. INPUT " of between how many notes "lower%
  13833. INPUT " and how many notes "higher%
  13834. ENDIF
  13835. ENDPROC
  13836. :
  13837. REM*************************************************
  13838. :
  13839. DEF PROCequalizedurats
  13840. :
  13841. CLS
  13842. PRINT'" There are ";manyattacks%-1;" durations "
  13843. PRINT'" How many do you want to equalise? "
  13844. PRINT " (0 = ";manyattacks%-1;")"
  13845. INPUTnumdurats%
  13846. IF numdurats% = 0 THEN numdurats% = manyattacks%-1
  13847. INPUT'" Starting at duration number (0 = 1) "startattack%
  13848. IF startattack% = 0 THEN startattack% = 1
  13849. IF (manyattacks%-startattack%)<numdurats% THEN startattack% = manyattacks%-numdurats%
  13850. totaldurats% = 0
  13851. FOR count% = startattack% TO (startattack%+numdurats%-1)
  13852. totaldurats%+=(attacks1%(count%)-attacks1%(count%-1))
  13853. NEXT
  13854. average = totaldurats%/numdurats%
  13855. residue% = average * 10
  13856. residue% = residue%MOD10
  13857. IF residue%>=5 THEN average% = ((average)DIV1)+1 ELSE average% = (average)DIV1
  13858. FOR count% = startattack% TO (startattack%+numdurats%-1)
  13859. attacks1%(count%) = attacks1%(count%-1)+average%
  13860. NEXT
  13861. adjust% = totaldurats% - (average%*numdurats%)
  13862. attacks1%(count%-1) += adjust%
  13863. equalized$ = "y" : seeequalizey$ = "n"
  13864. PROCinsertattacks
  13865. ENDPROC
  13866. :
  13867. REM************************************************
  13868. :
  13869. DEF PROCsavevoice
  13870. :
  13871. *Dir HostFS::HardDisc4.$.CAC.Files
  13872. INPUT'" filename "filenamevoice$
  13873. channel = OPENOUT filenamevoice$
  13874. PRINT#channel, manyattacks%
  13875. FOR a% = 0 TO manyattacks%-1
  13876. PRINT#channel, attacks1%(a%)
  13877. NEXT
  13878. FOR a% = 0 TO manyattacks%-1
  13879. PRINT#channel, pitches%(a%)
  13880. NEXT
  13881. FOR a% = 0 TO manyattacks%-1
  13882. PRINT#channel, durations%(a%)
  13883. NEXT
  13884. FOR a% = 0 TO manyattacks%-1
  13885. PRINT#channel, amplitudes%(a%)
  13886. NEXT
  13887. FOR a% = 0 TO manyattacks%-1
  13888. PRINT#channel, envelopes%(a%)
  13889. NEXT
  13890. FOR a% = 0 TO manyattacks%-1
  13891. PRINT#channel, glissandos%(a%)
  13892. NEXT
  13893. FOR a% = 0 TO manyattacks%-1
  13894. PRINT#channel, inflections%(a%)
  13895. NEXT
  13896. CLOSE#channel
  13897. *NoDir
  13898. savevoice$ = "N" : PROCdisplay
  13899. ENDPROC
  13900. :
  13901. REM**********************************
  13902. :
  13903. DEF PROCimportvoice
  13904. :
  13905. *Dir HostFS::HardDisc4.$.CAC.Files
  13906. INPUT'" filename "filenamevoice$
  13907. channel = OPENIN filenamevoice$
  13908. REPEAT
  13909. INPUT#channel, manyattacks%
  13910. FOR a% = 0 TO manyattacks%-1
  13911. INPUT#channel, attacks1%(a%)
  13912. NEXT
  13913. FOR a% = 0 TO manyattacks%-1
  13914. INPUT#channel, pitches%(a%)
  13915. NEXT
  13916. FOR a% = 0 TO manyattacks%-1
  13917. INPUT#channel, durations%(a%)
  13918. NEXT
  13919. FOR a% = 0 TO manyattacks%-1
  13920. INPUT#channel, amplitudes%(a%)
  13921. NEXT
  13922. FOR a% = 0 TO manyattacks%-1
  13923. INPUT#channel, envelopes%(a%)
  13924. NEXT
  13925. FOR a% = 0 TO manyattacks%-1
  13926. INPUT#channel, glissandos%(a%)
  13927. NEXT
  13928. FOR a% = 0 TO manyattacks%-1
  13929. INPUT#channel, inflections%(a%)
  13930. NEXT
  13931. UNTIL EOF#channel
  13932. CLOSE#channel
  13933. *NoDir
  13934. method$ = "raw" : copyit$ = "ON" : PROCinsertattacks
  13935. ENDPROC
  13936. :
  13937. REM***********************************
  13938. :
  13939. DEF PROCpreintervalstring
  13940. :
  13941. PROCwindow(20,60,70,35)
  13942. PRINT'" Re-run current interval string,"
  13943. PRINT" create a new string, edit the"
  13944. PRINT " current one, or load a file (R/N/E/F)"
  13945. CASE GET$ OF
  13946. WHEN "R","r" : PROCintervalstring
  13947. WHEN "E","e" : loadstring$ = "n" :PROCeditintervalstring
  13948. WHEN "F","f" : loadstring$ = "y" :PROCeditintervalstring
  13949. OTHERWISE
  13950. ENDCASE
  13951. :
  13952. filenamestg$ = ""
  13953. numbannedpitches% = 0 : numbannedints% = 0 : bannedpitches%() = 0
  13954. :
  13955. INPUT'" How many pitches "numpitches%
  13956. INPUT'" The tessitura is how many semitones wide "tess%
  13957. PRINT'" The bottom pitch of the tessitura is ";
  13958. COLOUR 1
  13959. CASE GET$ OF
  13960. WHEN "C","c" : note% = 1 : PRINT "C" : pitch$ = "C"
  13961. WHEN "D","d" : note% = 3 : PRINT "D" : pitch$ = "D"
  13962. WHEN "E","e" : note% = 5 : PRINT "E" : pitch$ = "E"
  13963. WHEN "F","f" : note% = 6 : PRINT "F" : pitch$ = "F"
  13964. WHEN "G","g" : note% = 8 : PRINT "G" : pitch$ = "G"
  13965. WHEN "A","a" : note% = 10 : PRINT "A" : pitch$ = "A"
  13966. WHEN "B","b" : note% = 12 : PRINT "B" : pitch$ = "B"
  13967. ENDCASE
  13968. COLOUR 0
  13969. PRINT " Accidental ";
  13970. COLOUR 1
  13971. CASE GET$ OF
  13972. WHEN "1" : note% -= 1 : PRINT "flat" : accid$ = "flat"
  13973. WHEN "5" : PRINT "nat" : accid$ = "nat"
  13974. WHEN "9" : note% += 1 : PRINT "shrp" : accid$ = "shrp"
  13975. OTHERWISE VDU 7
  13976. ENDCASE
  13977. COLOUR 0
  13978. PRINT " Octave ";
  13979. COLOUR 1
  13980. octave% = EVAL(GET$) : saveoctave% = octave%
  13981. PRINT octave%
  13982. COLOUR 0
  13983. transposer% = note% + (12*(octave%-1)) - 1
  13984. PRINT'" Are any pitches to be banned? "
  13985. CASE GET$ OF
  13986. WHEN "Y","y" :
  13987. REPEAT
  13988. numbannedpitches% += 1
  13989. PRINT '" Pitch ";numbannedpitches%;" is, going up,"
  13990. PRINT " semitone number what, starting at 0?"
  13991. INPUT " (type F to finish) "bannedpitch$
  13992. IF bannedpitch$ <> "F" AND bannedpitch$ <> "f" THEN bannedpitches%(numbannedpitches%) = EVAL(bannedpitch$) + 1
  13993. UNTIL bannedpitch$ = "F" OR bannedpitch$ = "f"
  13994. numbannedpitches% -= 1
  13995. OTHERWISE
  13996. ENDCASE
  13997. :
  13998. PRINT'" Are any intervals to be banned?"
  13999. CASE GET$ OF
  14000. WHEN "Y","y" :
  14001. REPEAT
  14002. numbannedints% += 1
  14003. PRINT''" Interval ";numbannedints%;" is how many semitones?"
  14004. PRINT" (NB intervals between 12 & 23 are "
  14005. PRINT" applied at all compounds - "
  14006. INPUT" type F to finish) "int$
  14007. IF int$ <> "F" AND int$ <> "f" THEN
  14008. PRINT'" And is banned at between a"
  14009. INPUT" minimum of how many notes from the last one "range%
  14010. INPUT" And a maximum of how many "range1%
  14011. bannedints%(numbannedints%,0) = EVAL(int$)
  14012. bannedints%(numbannedints%,1) = range%
  14013. bannedints%(numbannedints%,2) = range1%
  14014. ENDIF
  14015. UNTIL int$ = "F" OR int$ = "f"
  14016. numbannedints% -= 1
  14017. OTHERWISE
  14018. ENDCASE
  14019. :
  14020. stringattempts% = 0 : PROCintervalstring
  14021. :
  14022. ENDPROC
  14023. :
  14024. REM********************************************************
  14025. :
  14026. DEF PROCintervalstring
  14027. :
  14028. notenumber% = 0 : stringattempts% += 1
  14029. :
  14030. REPEAT
  14031. notenumber% += 1 : triednotes%() = 0
  14032. :
  14033. REPEAT
  14034. note% = RND(tess%+1) : triednotes%(note%) = 1
  14035. count% = 0
  14036. test$ = "pass"
  14037. IF numbannedpitches% > 0 THEN
  14038. REPEAT
  14039. count% += 1
  14040. IF note% = bannedpitches%(count%) THEN test$ = "fail"
  14041. UNTIL test$ = "fail" OR count% = numbannedpitches%
  14042. ENDIF
  14043. :
  14044. IF notenumber% > 1 AND numbannedints% > 0 AND test$ = "pass" THEN
  14045. count% = 0
  14046. REPEAT
  14047. count% += 1 : count1% = 0
  14048. REPEAT
  14049. count1% += 1
  14050. testnotenumber% = bannedints%(count%,1)+count1%-1
  14051. testnotenumber% = notenumber%-testnotenumber%
  14052. IF testnotenumber% > 0 THEN
  14053. IF note% >= amplitudes%(testnotenumber%) THEN
  14054. interval% = note%-amplitudes%(testnotenumber%)
  14055. ELSE interval% = amplitudes%(testnotenumber%)-note%
  14056. ENDIF
  14057. :
  14058. REPEAT
  14059. IF interval% > 23 THEN interval% -= 12
  14060. UNTIL interval% < 24
  14061. IF interval% = bannedints%(count%,0) THEN test$ = "fail"
  14062. :
  14063. ENDIF
  14064. UNTIL count1% > (bannedints%(count%,2)-bannedints%(count%,1)) OR test$ = "fail"
  14065. UNTIL count% = numbannedints% OR test$ = "fail"
  14066. ENDIF
  14067. :
  14068. REM check to see if all notes tried
  14069. check$ = "alltried"
  14070. FOR checker% = 1 TO tess%+1
  14071. IF triednotes%(checker%) = 0 THEN check$ = "notalltried"
  14072. NEXT
  14073. UNTIL test$ = "pass" OR check$ = "alltried"
  14074. :
  14075. amplitudes%(notenumber%) = note%
  14076. :
  14077. IF check$ = "alltried" AND test$ = "fail" THEN whattodo$ = "abort" ELSE whattodo$ = "continue"
  14078. UNTIL notenumber% = numpitches% OR whattodo$ = "abort"
  14079. :
  14080. IF whattodo$ = "abort" THEN
  14081. CLS : PRINT''" Attempts from fresh start - ";stringattempts%
  14082. PROCintervalstring
  14083. ELSE
  14084. FOR count% = 1 TO numpitches%
  14085. amplitudes%(count%) += transposer%
  14086. REM which octave
  14087. count1% = 0
  14088. REPEAT
  14089. count1% += 1
  14090. UNTIL (count1%*12) >= amplitudes%(count%)
  14091. octave% = count1%
  14092. REM which pitch and accid
  14093. amplitudes%(count%) -= (12*(octave%-1))
  14094. CASE amplitudes%(count%) OF
  14095. WHEN 1 : pitches%(count%-1) = 50 + octave%
  14096. WHEN 2 : pitches%(count%-1) = 90 + octave%
  14097. WHEN 3 : pitches%(count%-1) = 150 + octave%
  14098. WHEN 4 : pitches%(count%-1) = 210 + octave%
  14099. WHEN 5 : pitches%(count%-1) = 250 + octave%
  14100. WHEN 6 : pitches%(count%-1) = 350 + octave%
  14101. WHEN 7 : pitches%(count%-1) = 390 + octave%
  14102. WHEN 8 : pitches%(count%-1) = 450 + octave%
  14103. WHEN 9 : pitches%(count%-1) = 490 + octave%
  14104. WHEN 10 : pitches%(count%-1) = 550 + octave%
  14105. WHEN 11 : pitches%(count%-1) = 610 + octave%
  14106. WHEN 12 : pitches%(count%-1) = 650 + octave%
  14107. ENDCASE
  14108. NEXT
  14109. PRINT'" Do you want to save this interval string?"
  14110. CASE GET$ OF
  14111. WHEN "Y","y" : PROCsaveintervalstring
  14112. OTHERWISE
  14113. ENDCASE
  14114. PROCinsertpitches
  14115. ENDIF
  14116. :
  14117. ENDPROC
  14118. :
  14119. REM**********************************************
  14120. :
  14121. DEF PROCsaveintervalstring
  14122. :
  14123. *Dir HostFS::HardDisc4.$.CAC.Files
  14124. firstnaming$ = "n"
  14125. CLS
  14126. IF filenamestg$ = "" THEN
  14127. INPUT'" filename "filenamestg$
  14128. firstnaming$ = "y"
  14129. ENDIF
  14130. IF firstnaming$ = "n" THEN
  14131. PRINT'" as '";filenamestg$;"'?"
  14132. CASE GET$ OF
  14133. WHEN "N","n" : INPUT'" filename "filenamestg$
  14134. OTHERWISE
  14135. ENDCASE
  14136. ENDIF
  14137. :
  14138. channel = OPENOUT filenamestg$
  14139. PRINT#channel, numpitches%
  14140. PRINT#channel, tess%
  14141. PRINT#channel, numbannedpitches%
  14142. PRINT#channel, numbannedints%
  14143. PRINT#channel, transposer%
  14144. PRINT#channel, pitch$
  14145. PRINT#channel, accid$
  14146. PRINT#channel, saveoctave%
  14147. FOR a% = 1 TO numbannedpitches%
  14148. PRINT#channel, bannedpitches%(a%)
  14149. NEXT
  14150. FOR a% = 1 TO numbannedints%
  14151. FOR b% = 0 TO 2
  14152. PRINT#channel, bannedints%(a%,b%)
  14153. NEXT
  14154. NEXT
  14155. :
  14156. CLOSE#channel
  14157. *NoDir
  14158. :
  14159. ENDPROC
  14160. :
  14161. REM******************************************
  14162. :
  14163. DEF PROCloadintervalstring
  14164. :
  14165. *Dir HostFS::HardDisc4.$.CAC.Files
  14166. INPUT'" filename "filenamestg$
  14167. channel = OPENIN filenamestg$
  14168. REPEAT
  14169. INPUT#channel, numpitches%
  14170. INPUT#channel, tess%
  14171. INPUT#channel, numbannedpitches%
  14172. INPUT#channel, numbannedints%
  14173. INPUT#channel, transposer%
  14174. INPUT#channel, pitch$
  14175. INPUT#channel, accid$
  14176. INPUT#channel, saveoctave%
  14177. FOR a% = 1 TO numbannedpitches%
  14178. INPUT#channel, bannedpitches%(a%)
  14179. NEXT
  14180. FOR a% = 1 TO numbannedints%
  14181. FOR b% = 0 TO 2
  14182. INPUT#channel, bannedints%(a%,b%)
  14183. NEXT
  14184. NEXT
  14185. UNTIL EOF#channel
  14186. CLOSE#channel
  14187. *NoDir
  14188. :
  14189. ENDPROC
  14190. :
  14191. REM**************************************
  14192. :
  14193. DEF PROCeditintervalstring
  14194. :
  14195. IF loadstring$ = "y" THEN PROCloadintervalstring
  14196. :
  14197. CLS
  14198. PRINT'" Alter the number of pitches?"
  14199. PRINT" (currently ";numpitches%;")"
  14200. CASE GET$ OF
  14201. WHEN "Y","y" :
  14202. INPUT'" How many pitches "numpitches%
  14203. ENDCASE
  14204. CLS
  14205. PRINT'" Alter tessitura and/or location?"
  14206. PRINT" (currently ";tess%;" semitones wide"
  14207. PRINT" with a bottom note of ";pitch$;accid$;saveoctave%;")"
  14208. CASE GET$ OF
  14209. WHEN "Y","y" :
  14210. INPUT'" The tessitura is how many semitones wide "tess%
  14211. PRINT'" The bottom pitch of the tessitura is ";
  14212. COLOUR 1
  14213. CASE GET$ OF
  14214. WHEN "C","c" : note% = 1 : PRINT "C" : pitch$ = "C"
  14215. WHEN "D","d" : note% = 3 : PRINT "D" : pitch$ = "D"
  14216. WHEN "E","e" : note% = 5 : PRINT "E" : pitch$ = "E"
  14217. WHEN "F","f" : note% = 6 : PRINT "F" : pitch$ = "F"
  14218. WHEN "G","g" : note% = 8 : PRINT "G" : pitch$ = "G"
  14219. WHEN "A","a" : note% = 10 : PRINT "A" : pitch$ = "A"
  14220. WHEN "B","b" : note% = 12 : PRINT "B" : pitch$ = "B"
  14221. ENDCASE
  14222. COLOUR 0
  14223. PRINT " Accidental ";
  14224. COLOUR 1
  14225. CASE GET$ OF
  14226. WHEN "1" : note% -= 1 : PRINT "flat" : accid$ = "flat"
  14227. WHEN "5" : PRINT "nat" : accid$ = "nat"
  14228. WHEN "9" : note% += 1 : PRINT "shrp" : accid$ = "shrp"
  14229. OTHERWISE VDU 7
  14230. ENDCASE
  14231. COLOUR 0
  14232. PRINT " Octave ";
  14233. COLOUR 1
  14234. octave% = EVAL(GET$) : saveoctave% = octave%
  14235. PRINT octave%
  14236. COLOUR 0
  14237. transposer% = note% + (12*(octave%-1)) - 1
  14238. OTHERWISE
  14239. ENDCASE
  14240. :
  14241. PRINT'" Alter the banning of pitches? "
  14242. IF numbannedpitches% = 0 THEN
  14243. PRINT" No pitches are currently banned "
  14244. ELSE
  14245. PRINT" Currently banned pitches are,"
  14246. PRINT" going up, starting at 0 -"
  14247. PRINT" "
  14248. VDU 14
  14249. FOR count% = 1 TO numbannedpitches%
  14250. PRINT " ";count%;". semitone ";bannedpitches%(count%)-1
  14251. NEXT
  14252. VDU 15
  14253. ENDIF
  14254. CASE GET$ OF
  14255. WHEN "Y","y" :
  14256. INPUT'" The number of banned pitches is now to be "numbannedpitches%
  14257. FOR count% = 1 TO numbannedpitches%
  14258. PRINT'" Alter banned pitch ";count%
  14259. CASE GET$ OF
  14260. WHEN "Y","y" :
  14261. PRINT '" Pitch ";count%;" is, going up,"
  14262. INPUT " semitone number what, starting at 0?"semitone%
  14263. bannedpitches%(count%) = semitone%+1
  14264. ENDCASE
  14265. NEXT
  14266. ENDCASE
  14267. CLS : VDU 14
  14268. PRINT'" Alter the banning of intervals?"
  14269. IF numbannedints% = 0 THEN
  14270. PRINT" No intervals are currently banned "
  14271. ELSE
  14272. VDU 28,20,43,70,15
  14273. PRINT" Currently banned intervals are -"
  14274. PRINT" "
  14275. FOR count% = 1 TO numbannedints%
  14276. IF bannedints%(count%,1) > 0 THEN COLOUR 131 ELSE COLOUR 135
  14277. IF count% > 9 AND bannedints%(count%,0) > 9 THEN PRINT " ";count%;". ";bannedints%(count%,0);" semitones at between ";bannedints%(count%,1);" and ";bannedints%(count%,2);" notes"
  14278. IF count% < 10 EOR bannedints%(count%,0) < 10 THEN PRINT " ";count%;". ";bannedints%(count%,0);" semitones at between ";bannedints%(count%,1);" and ";bannedints%(count%,2);" notes"
  14279. IF count% < 10 AND bannedints%(count%,0) < 10 THEN PRINT " ";count%;". ";bannedints%(count%,0);" semitones at between ";bannedints%(count%,1);" and ";bannedints%(count%,2);" notes"
  14280. NEXT
  14281. COLOUR 135
  14282. VDU 15
  14283. ENDIF
  14284. CASE GET$ OF
  14285. WHEN "Y","y" :
  14286. VDU 28,20,65,70,45
  14287. PRINT'" Alter the number of banned intervals?"
  14288. CASE GET$ OF
  14289. WHEN "Y","y" :
  14290. INPUT'" The number of banned intervals is now to be "numbannedints%
  14291. ENDCASE
  14292. FOR count% = 1 TO numbannedints%
  14293. PRINT'" Alter interval ";count%
  14294. CASE GET$ OF
  14295. WHEN "Y","y" :
  14296. PRINT'" Interval ";count%;" is how many semitones?"
  14297. PRINT" (NB intervals between 12 & 23 are "
  14298. INPUT" applied at all compounds) "bannedints%(count%,0)
  14299. PRINT'" And is banned at between a minimum"
  14300. INPUT" of how many notes from the last one "range%
  14301. INPUT" And a maximum of how many "range1%
  14302. bannedints%(count%,1) = range%
  14303. bannedints%(count%,2) = range1%
  14304. OTHERWISE
  14305. ENDCASE
  14306. NEXT
  14307. ENDCASE
  14308. :
  14309. stringattempts% = 0 : PROCintervalstring
  14310. :
  14311. ENDPROC
  14312. :
  14313. REM********************************************************
  14314. :
  14315. DEF PROCconvertpitch
  14316. :
  14317. CASE (pitch%DIV10^2) OF
  14318. WHEN 0 : note% = 1
  14319. WHEN 1 : note% = 3
  14320. WHEN 2 : note% = 5
  14321. WHEN 3 : note% = 6
  14322. WHEN 4 : note% = 8
  14323. WHEN 5 : note% = 10
  14324. WHEN 6 : note% = 12
  14325. ENDCASE
  14326. :
  14327. CASE ((pitch%DIV10)MOD10) OF
  14328. WHEN 1 : note% -= 1
  14329. WHEN 9 : note% += 1
  14330. OTHERWISE
  14331. ENDCASE
  14332. :
  14333. octave% = pitch%MOD10
  14334. note% = note% + (12*(octave%-1))
  14335. chunk% = 12 : compoundint% = compoundpitch%
  14336. ENDPROC
  14337. :
  14338. REM****************************************************
  14339. :
  14340. DEF PROCconvertquarter
  14341. :
  14342. CASE (pitch%DIV10^2) OF
  14343. WHEN 0 : note% = 2
  14344. WHEN 1 : note% = 6
  14345. WHEN 2 : note% = 10
  14346. WHEN 3 : note% = 12
  14347. WHEN 4 : note% = 16
  14348. WHEN 5 : note% = 20
  14349. WHEN 6 : note% = 24
  14350. ENDCASE
  14351. :
  14352. CASE ((pitch%DIV10)MOD10) OF
  14353. WHEN 1 : note% -= 2
  14354. WHEN 3 : note% -= 1
  14355. WHEN 7 : note% += 1
  14356. WHEN 9 : note% += 2
  14357. OTHERWISE
  14358. ENDCASE
  14359. :
  14360. octave% = pitch%MOD10
  14361. note% = note% + (24*(octave%-1))
  14362. chunk% = 24 : compoundint% = compoundquarter%
  14363. ENDPROC
  14364. ENDPROC
  14365. :
  14366. REM****************************************************
  14367. :
  14368. DEF PROCconverteighth
  14369. :
  14370. CASE (pitch%DIV10^2) OF
  14371. WHEN 0 : note% = 4
  14372. WHEN 1 : note% = 12
  14373. WHEN 2 : note% = 20
  14374. WHEN 3 : note% = 24
  14375. WHEN 4 : note% = 32
  14376. WHEN 5 : note% = 40
  14377. WHEN 6 : note% = 48
  14378. ENDCASE
  14379. :
  14380. CASE ((pitch%DIV10)MOD10) OF
  14381. WHEN 1 : note% -= 4
  14382. WHEN 2 : note% -= 3
  14383. WHEN 3 : note% -= 2
  14384. WHEN 4 : note% -= 1
  14385. WHEN 6 : note% += 1
  14386. WHEN 7 : note% += 2
  14387. WHEN 8 : note% += 3
  14388. WHEN 9 : note% += 4
  14389. OTHERWISE
  14390. ENDCASE
  14391. :
  14392. octave% = pitch%MOD10
  14393. note% = note% + (48*(octave%-1))
  14394. chunk% = 48 : compoundint% = compoundeighth%
  14395. ENDPROC
  14396. :
  14397. REM****************************************************
  14398. :
  14399. DEF PROCconvertcent
  14400. :
  14401. CASE (pitch%DIV10^2) OF
  14402. WHEN 0 : note% = 100
  14403. WHEN 1 : note% = 300
  14404. WHEN 2 : note% = 500
  14405. WHEN 3 : note% = 600
  14406. WHEN 4 : note% = 800
  14407. WHEN 5 : note% = 1000
  14408. WHEN 6 : note% = 1200
  14409. ENDCASE
  14410. :
  14411. CASE ((pitch%DIV10)MOD10) OF
  14412. WHEN 1 : note% -= 100
  14413. WHEN 2 : note% -= 75
  14414. WHEN 3 : note% -= 50
  14415. WHEN 4 : note% -= 25
  14416. WHEN 6 : note% += 25
  14417. WHEN 7 : note% += 50
  14418. WHEN 8 : note% += 75
  14419. WHEN 9 : note% += 100
  14420. OTHERWISE
  14421. ENDCASE
  14422. :
  14423. octave% = pitch%MOD10
  14424. note% = note% + (1200*(octave%-1)) + cent%
  14425. chunk% = 1200 : compoundint% = compoundcent%
  14426. ENDPROC
  14427. :
  14428. REM****************************************************
  14429. :
  14430. DEF PROCrandomnumber
  14431. :
  14432. PROCwindow(20,65,65,55)
  14433. CLS
  14434. :
  14435. IF rerun$ = "n" THEN
  14436. INPUT'" Return a random number between ? "ranx%
  14437. INPUT " and ? "rany%
  14438. ENDIF
  14439. diff% = (rany%-ranx%)+1
  14440. PRINT' RND(diff%)+(ranx%-1)
  14441. :
  14442. PRINT '" (press R to re-run, U for new number "
  14443. PRINT " or any key to continue) "
  14444. CASE GET$ OF
  14445. WHEN "U","u" : rerun$ = "n" : PROCrandomnumber
  14446. WHEN "R","r" : rerun$ = "y" : PROCrandomnumber
  14447. OTHERWISE PROCdisplay
  14448. ENDCASE
  14449. ENDPROC
  14450. :
  14451. REM****************************************************
  14452. :
  14453. DEF PROCcheckproportiontotal
  14454. :
  14455. proportiontotal$ = "notOK"
  14456. :
  14457. it% = 0
  14458. REPEAT
  14459. it% += 1
  14460. mplier = 0.5
  14461. REPEAT
  14462. mplier = mplier*2
  14463. testnum% = it%*mplier
  14464. posslownum = grouplength%/beatfactor%
  14465. WHILE posslownum > proportiontotal%
  14466. posslownum = posslownum/2
  14467. ENDWHILE
  14468. WHILE posslownum <= (proportiontotal%/2)
  14469. posslownum = posslownum*2
  14470. ENDWHILE
  14471. IF proportiontotal% = testnum% AND ((it%/testnum%)*posslownum*10^3)MOD10^3=0 THEN proportiontotal$ = "OK"
  14472. IF proportiontotal% = posslownum THEN proportiontotal$ = "OK"
  14473. UNTIL proportiontotal$ = "OK" OR testnum% > (grouplength%/defaultmindur%)
  14474. UNTIL proportiontotal$ = "OK" OR it% = given%
  14475. :
  14476. IF proportiontotal%>9999 THEN proportiontotal$ = "notOK"
  14477. :
  14478. ENDPROC
  14479. :
  14480. REM***************************************************
  14481. :
  14482. DEF PROCredpitches
  14483. :
  14484. tiss% = 0
  14485. REPEAT
  14486. tiss%+=1
  14487. toss% = 0 : dored$ = "n"
  14488. REPEAT
  14489. toss%+=1
  14490. IF (array%(startcell%,0,voice%)MOD10^3) = redpitches%(tiss%,toss%) THEN
  14491. IF printing$ = "n" THEN GCOL tiss%
  14492. dored$ = "y"
  14493. ENDIF
  14494. UNTIL dored$ = "y" OR toss% = numredpitches%(tiss%)
  14495. UNTIL dored$ = "y" OR tiss% = numcols%
  14496. ENDPROC
  14497. :
  14498. REM****************************************************
  14499. :
  14500. DEF PROCpitchstring2
  14501. :
  14502. PROCwindow(20,65,60,55)
  14503. PRINT'" This function returns a string"
  14504. PRINT" of pitches drawn from a semitonal"
  14505. PRINT" cluster based on middle C,"
  14506. PRINT" with a controlled chance "
  14507. PRINT" of pitch repetitions"
  14508. INPUT'" How many semitones in the cluster "numsemis%
  14509. INPUT'" How many pitches in the string "numpitches%
  14510. PRINT'" Randomly occuring pitch repetitions "
  14511. PRINT" are included or not by what "
  14512. INPUT" percentage? "percentage%
  14513. :
  14514. x% = RND(numsemis%)
  14515. CASE x% OF
  14516. WHEN 1 : pitches%(0) = 54
  14517. WHEN 2 : pitches%(0) = 94
  14518. WHEN 3 : pitches%(0) = 154
  14519. WHEN 4 : pitches%(0) = 214
  14520. WHEN 5 : pitches%(0) = 254
  14521. WHEN 6 : pitches%(0) = 354
  14522. WHEN 7 : pitches%(0) = 394
  14523. WHEN 8 : pitches%(0) = 454
  14524. WHEN 9 : pitches%(0) = 514
  14525. WHEN 10 : pitches%(0) = 554
  14526. WHEN 11 : pitches%(0) = 614
  14527. WHEN 12 : pitches%(0) = 654
  14528. ENDCASE
  14529. :
  14530. FOR count% = 1 TO numpitches%-1
  14531. REPEAT
  14532. continue$ = "y"
  14533. x% = RND(numsemis%)
  14534. CASE x% OF
  14535. WHEN 1 : pitches%(count%) = 54
  14536. WHEN 2 : pitches%(count%) = 94
  14537. WHEN 3 : pitches%(count%) = 154
  14538. WHEN 4 : pitches%(count%) = 214
  14539. WHEN 5 : pitches%(count%) = 254
  14540. WHEN 6 : pitches%(count%) = 354
  14541. WHEN 7 : pitches%(count%) = 394
  14542. WHEN 8 : pitches%(count%) = 454
  14543. WHEN 9 : pitches%(count%) = 514
  14544. WHEN 10 : pitches%(count%) = 554
  14545. WHEN 11 : pitches%(count%) = 614
  14546. WHEN 12 : pitches%(count%) = 654
  14547. ENDCASE
  14548. :
  14549. IF pitches%(count%) = pitches%(count%-1) THEN
  14550. y% = RND(100)
  14551. IF y% <= percentage% THEN continue$ = "y" ELSE continue$ = "n"
  14552. ENDIF
  14553. UNTIL continue$ = "y"
  14554. NEXT
  14555. :
  14556. PROCinsertpitches
  14557. ENDPROC
  14558. :
  14559. REM***************************************
  14560. :
  14561. DEF PROCrhythmdefaults
  14562. shortirrat% = 480
  14563. longirrat% = 480
  14564. irratbeats% = 2
  14565. irratbeats1% = 2
  14566. mindur% = 60 : sieve = 960/mindur%
  14567. buffer% = 960/(sieve*2)
  14568. given% = 9
  14569. defaultsieve = 2
  14570. ENDPROC
  14571. :
  14572. REM******************************************
  14573. :
  14574. DEF PROCdisplayoptions
  14575. :
  14576. PROCwindow(2,72,97,1)
  14577. OFF
  14578. PRINT' " Do you want to (press to toggle)"
  14579. IF copytoend$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14580. IF seegraph$ = "y" THEN state1$ = "on" ELSE state1$ = "off"
  14581. PRINT' " See graph during accel/rit G (";state1$;") Allow copying to last note ^A (";state$;")"
  14582. IF seeinfo$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14583. IF nodelay$ = "y" THEN state1$ = "on" ELSE state1$ = "off"
  14584. PRINT' " See info on attacks A (";state$;") Pause for querying stave ^D (";state1$;")"
  14585. IF printinfo$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14586. IF askprevious$ = "y" THEN state1$ = "on" ELSE state1$ = "off"
  14587. PRINT' " get printout of info on attacks I (";state$;") Pause for previous position^F (";state1$;")"
  14588. IF seereorder$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14589. IF errorbeforedisplay$ = "n" THEN state1$ = "off" ELSE state1$ = "on"
  14590. PRINT' " Re-order attacks R (";state$;") Debugging mode ^G (";state1$;")"
  14591. IF seereorderx$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14592. PRINT' " Re-order attacks during accel/rit only ^R (";state$;")"
  14593. IF seeequalize$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14594. PRINT' " Equalize attacks E (";state$;") [press spacebar to continue] "
  14595. IF seeequalizex$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14596. PRINT' " Equalize attacks during accel/rit only ^E (";state$;")"
  14597. IF seerhythmicize$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14598. PRINT' " Rhythmicize attacks H (";state$;")"
  14599. IF reorderpitches$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14600. PRINT' " Re-order pitches using M/A/P ^P (";state$;")"
  14601. IF seequery$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14602. PRINT' " Query before adding new values to array Q (";state$;")"
  14603. PRINT' " Define parameter values during input P (";paraset$;")"
  14604. PRINT' " Accel/rit by total durat, endpoints or "
  14605. PRINT " first two notes displayed T/N/F (";funcinput$;")"
  14606. IF startfinishdurats$ = "Y" THEN state$ = "on" ELSE state$ = "off"
  14607. PRINT' " Accel/rit by start and finish durations S (";state$;")"
  14608. IF seeduration$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14609. PRINT' " See duration upto last displayed bar D (";state$;")"
  14610. IF quickcopy$ = "y" THEN state$ ="on" ELSE state$ = "off"
  14611. PRINT' " Quick copy B (";state$;")"
  14612. CASE seedurinbts$ OF
  14613. WHEN "y" : state$ = "on"
  14614. WHEN "stepped" : state$ = "stepped"
  14615. WHEN "n" : state$ = "off"
  14616. ENDCASE
  14617. PRINT' " See durations in micro-beats K (";state$;")"
  14618. CASE seedurincrots$ OF
  14619. WHEN "y" : state$ = "on"
  14620. WHEN "stepped" : state$ = "stepped"
  14621. WHEN "n" : state$ = "off"
  14622. ENDCASE
  14623. PRINT' " See durations in macro-beats C (";state$;")"
  14624. IF screenvoices$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14625. PRINT' " Voice numbers by 1/2/3 on screen V (";state$;")"
  14626. IF ampoptions$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14627. PRINT' " Use advanced amplitudes options O (";state$;")"
  14628. PRINT' " Double v/^ moves down/up by 3/10 staves Z (";screenmovesby%;")"
  14629. CASE setalong$ OF
  14630. WHEN "y" : state$ = "A/R"
  14631. WHEN "n" : state$ = "quick"
  14632. WHEN "playnovoices" : state$ = "play"
  14633. ENDCASE
  14634. PRINT' " 1,2 = A/R start/quickdisplay/play vces J (";state$;")"
  14635. CASE envelopedata$ OF
  14636. WHEN "none" : stage$ = "neither"
  14637. WHEN "percentage" : stage$ = "%'s"
  14638. WHEN "marker" : stage$ = "indicators"
  14639. ENDCASE
  14640. PRINT' " See envelope %'s/indicators/neither L (";stage$;")"
  14641. IF askaboutpitches$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14642. PRINT' " Query if pitches all the same M (";state$;")"
  14643. IF usebottomstave$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14644. PRINT' " Group of pitches fills bottom stave U (";state$;")"
  14645. CASE sequalssection$ OF
  14646. WHEN "y" : state$ = "sect"
  14647. WHEN "n" : state$ = "next"
  14648. ENDCASE
  14649. PRINT' " Copy from next voices/Go to section ^S (";state$;")"
  14650. IF addpitches$ = "y" THEN state$ = "pitch" ELSE state$ = "env"
  14651. PRINT' " ^Y = Add pitches/edit envelope Y (";state$;")"
  14652. IF squarebracket$ = "remarks" THEN state$ = "remarks" ELSE state$ = "copy +"
  14653. PRINT' " [] keys = move remarks/add to copydown [ (";state$;")"
  14654. IF queryalong$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14655. PRINT' " Accel/rit asks for starting attack ] (";state$;")"
  14656. PRINT' " Reset no.staves ^/v moves up/down by ~"
  14657. IF singlepitch$ = "m" THEN state$ = "multiple" ELSE state$ = "single"
  14658. PRINT' " Y = single/multiple pitch entry @ (";state$;")"
  14659. IF namestaves$ = "nameone" THEN state$ = "rename" ELSE state$ = "delete"
  14660. PRINT' " ^V = rename/delete batch of voice names^V (";state$;")"
  14661. IF usebeep$ = "n" THEN state$ = "assnd" ELSE state$ = "beep"
  14662. PRINT' " Play with beep or assigned voices ^B (";state$;")"
  14663. IF onlycontent$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14664. PRINT' " Display only voices with content ^C (";state$;")"
  14665. PRINT' " Show list of voices with content ^L"
  14666. :
  14667. CASE GET$ OF
  14668. :
  14669. WHEN "g" :
  14670. IF seegraph$ = "y" THEN seegraph$ = "n" ELSE seegraph$ = "y"
  14671. WHEN "a" :
  14672. IF seeinfo$ = "y" THEN seeinfo$ = "n" ELSE seeinfo$ = "y"
  14673. WHEN "A" :
  14674. IF copytoend$ = "y" THEN copytoend$ = "n" ELSE copytoend$ = "y"
  14675. WHEN "I","i" :
  14676. IF printinfo$ = "y" THEN printinfo$ = "n" ELSE printinfo$ = "y"
  14677. WHEN "r" :
  14678. IF seereorder$ = "y" THEN
  14679. seereorder$ = "n"
  14680. seereordery$ = "n"
  14681. ELSE
  14682. seereorder$ = "y"
  14683. seereorderx$ = "y"
  14684. seereordery$ = "y"
  14685. ENDIF
  14686. WHEN "R" :
  14687. IF seereorderx$ = "y" THEN
  14688. seereorderx$ = "n"
  14689. seereordery$ = "n"
  14690. ELSE seereorderx$ = "y"
  14691. ENDIF
  14692. WHEN "e" :
  14693. IF seeequalize$ = "y" THEN
  14694. seeequalize$ = "n"
  14695. seeequalizey$ = "n"
  14696. ELSE
  14697. seeequalize$ = "y"
  14698. seeequalizex$ = "y"
  14699. seeequalizey$ = "y"
  14700. ENDIF
  14701. WHEN "E" :
  14702. IF seeequalizex$ = "y" THEN
  14703. seeequalizex$ = "n"
  14704. seeequalizey$ = "n"
  14705. ELSE seereorderx$ = "y"
  14706. ENDIF
  14707. WHEN "P" :
  14708. IF reorderpitches$ = "y" THEN reorderpitches$ = "n" ELSE reorderpitches$ = "y"
  14709. WHEN "H","h" :
  14710. IF seerhythmicize$ = "y" THEN seerhythmicize$ = "n" ELSE seerhythmicize$ = "y"
  14711. WHEN "Q","q" :
  14712. IF seequery$ = "y" THEN seequery$ = "n" ELSE seequery$ = "y"
  14713. WHEN "p" :
  14714. IF paraset$ = "on" THEN paraset$ = "off" ELSE paraset$ = "on"
  14715. WHEN "T","t" :
  14716. funcinput$ = "durat"
  14717. WHEN "N","n" :
  14718. funcinput$ = "points"
  14719. WHEN "f" :
  14720. funcinput$ = "displayed"
  14721. WHEN "s" :
  14722. IF startfinishdurats$ = "Y" THEN startfinishdurats$ = "N" ELSE startfinishdurats$ = "Y"
  14723. WHEN "d" :
  14724. IF seeduration$ = "y" THEN
  14725. seeduration$ = "n" : PROCdisplay
  14726. ELSE seeduration$ = "y" : PROCdisplay
  14727. ENDIF
  14728. WHEN "b" :
  14729. IF quickcopy$ = "n" THEN quickcopy$ = "y" ELSE quickcopy$ = "n"
  14730. WHEN "K","k" :
  14731. IF seedurinbts$ = "n" THEN
  14732. seedurinbts$ = "y" : seedurincrots$ = "n" : PROCdisplay
  14733. ENDIF
  14734. IF seedurinbts$ = "y" THEN
  14735. seedurinbts$ = "stepped" : seedurincrots$ = "n" : PROCdisplay
  14736. ENDIF
  14737. IF seedurinbts$ = "stepped" THEN
  14738. seedurinbts$ = "n": PROCdisplay
  14739. ENDIF
  14740. WHEN "c" :
  14741. IF seedurincrots$ = "n" THEN
  14742. seedurincrots$ = "y" : seedurinbts$ = "n" : PROCdisplay
  14743. ENDIF
  14744. IF seedurincrots$ = "y" THEN
  14745. seedurincrots$ = "stepped" : seedurinbts$ = "n" : PROCdisplay
  14746. ENDIF
  14747. IF seedurincrots$ = "stepped" THEN
  14748. seedurincrots$ = "n" : PROCdisplay
  14749. ENDIF
  14750. WHEN "v" :
  14751. IF screenvoices$ = "n" THEN screenvoices$ = "y" ELSE screenvoices$ = "n" : PROCdisplay
  14752. WHEN "V" :
  14753. IF namestaves$ = "nameone" THEN namestaves$ = "deletemany" ELSE namestaves$ = "nameone"
  14754. WHEN "O","o" :
  14755. IF ampoptions$ = "n" THEN ampoptions$ = "y" ELSE ampoptions$ = "n" : PROCdisplay
  14756. WHEN "z","Z" : IF screenmovesby% = 10 THEN screenmovesby% = 3 ELSE screenmovesby% = 10 : PROCdisplay
  14757. WHEN "J","j" :
  14758. CASE setalong$ OF
  14759. WHEN "y" : setalong$ = "n"
  14760. WHEN "n" : setalong$ = "playnovoices"
  14761. WHEN "playnovoices" : setalong$ = "y"
  14762. ENDCASE
  14763. WHEN "l" :
  14764. CASE envelopedata$ OF
  14765. WHEN "none" : envelopedata$ = "percentage"
  14766. WHEN "percentage" : envelopedata$ = "marker"
  14767. WHEN "marker" : envelopedata$ = "none"
  14768. ENDCASE
  14769. WHEN "M","m" :
  14770. IF askaboutpitches$ = "y" THEN askaboutpitches$ = "n" ELSE askaboutpitches$ = "y"
  14771. WHEN "U","u" :
  14772. IF usebottomstave$ = "y" THEN usebottomstave$ = "n" ELSE usebottomstave$ = "y"
  14773. IF usebottomstave$ = "y" THEN askaboutpitches$ = "n" ELSE askaboutpitches$ = "y"
  14774. WHEN "S" :
  14775. CASE sequalssection$ OF
  14776. WHEN "y" : sequalssection$ = "n"
  14777. WHEN "n" : sequalssection$ = "y"
  14778. ENDCASE
  14779. WHEN "y","Y" :
  14780. IF addpitches$ = "y" THEN addpitches$ = "n" ELSE addpitches$ = "y"
  14781. WHEN "[" :
  14782. IF squarebracket$ = "remarks" THEN squarebracket$ = "addten" ELSE squarebracket$ = "remarks"
  14783. WHEN "]" :
  14784. IF queryalong$ = "y" THEN queryalong$ = "n" ELSEqueryalong$ = "y"
  14785. WHEN "~" :
  14786. CLS
  14787. INPUT " pressing ^ or v movesup/down by how many staves "updisplay%
  14788. WHEN "@" :
  14789. IF singlepitch$ = "s" THEN singlepitch$ = "m" ELSE singlepitch$ = "s"
  14790. WHEN "B" :
  14791. IF usebeep$ = "y" THEN usebeep$ = "n" ELSE usebeep$ = "y"
  14792. WHEN "C" :
  14793. IF onlycontent$ = "y" THEN onlycontent$ = "n" ELSE onlycontent$ = "y"
  14794. PROCdisplayonlycontent
  14795. WHEN "L" : PROCcontentonlylist
  14796. WHEN "D" : IF nodelay$ = "y" THEN nodelay$ = "n" ELSE nodelay$ = "y"
  14797. WHEN "F" : IF askprevious$ = "y" THEN askprevious$ = "n" ELSE askprevious$ = "y"
  14798. WHEN "G" : IF errorbeforedisplay$ = "n" THEN errorbeforedisplay$ = "debug" ELSE errorbeforedisplay$ = "n"
  14799. :
  14800. OTHERWISE
  14801. :
  14802. ENDCASE
  14803. ON
  14804. :
  14805. ENDPROC
  14806. :
  14807. REM******************************************************************
  14808. :
  14809. DEF PROCremarks
  14810. :
  14811. INPUT'" Which bar "baar%
  14812. PRINT" line 1 or 2 "
  14813. CASE GET$ OF
  14814. WHEN "1" : line% = 0
  14815. WHEN "2" : line% = 1
  14816. OTHERWISE VDU7 : PROCremarks
  14817. ENDCASE
  14818. INPUT " What are the remarks "remarks$
  14819. remarks$(baar%,line%) = remarks$
  14820. :
  14821. ENDPROC
  14822. :
  14823. REM********************************************************************
  14824. :
  14825. DEF PROCwindow(a%,b%,c%,d%)
  14826. :
  14827. bigger$ = "n"
  14828. IF a% < biga% THEN
  14829. biga% = a% : bigger$ = "y"
  14830. ENDIF
  14831. IF b% > bigb% THEN
  14832. bigb% = b% : bigger$ = "y"
  14833. ENDIF
  14834. IF c% > bigc% THEN
  14835. bigc% = c% : bigger$ = "y"
  14836. ENDIF
  14837. IF d% < bigd% THEN
  14838. bigd% = d% : bigger$ = "y"
  14839. ENDIF
  14840. :
  14841. IF box$ = "n" THEN
  14842. box$ = "y"
  14843. VDU 28,a%-1,b%+1,c%+1,d%-1 : COLOUR 129 : CLS
  14844. VDU 28,a%,b%,c%,d% : COLOUR 0 : COLOUR 135 : CLS : OFF
  14845. ELSE
  14846. IF bigger$ = "y" THEN
  14847. VDU 28,a%-1,b%+1,c%+1,d%-1 : COLOUR 129 : CLS
  14848. ENDIF
  14849. CLS : VDU 28,a%,b%,c%,d% : COLOUR 0 : COLOUR 135 : CLS : OFF
  14850. ENDIF
  14851. :
  14852. ENDPROC
  14853. :
  14854. REM***********************************************
  14855. :
  14856. DEF PROCslave
  14857. REM this program returns not simply a random
  14858. REM percentage (tends to be too high) nor
  14859. REM a random percentage of a random percentage
  14860. REM (tends to be too low), but something
  14861. REM inbetween, averaging not 50% nor 25% but 37.5%
  14862. :
  14863. IF quickslave$ = "n" THEN
  14864. PROCwindow(20,69,96,55)
  14865. PRINT''" To begin, display the Mastervoice's two half-phases first on the screen."
  14866. PRINT " This function then generates a Slavevoice's associated two half-phases,"
  14867. PRINT " their random starting and ending points averaging 37.5% and 62.5% of the"
  14868. PRINT " MV half-phases respectively (other averages tend to be too high or too low)"
  14869. PRINT '" Alternatively, percentages may be determined - "
  14870. PRINT " press D for determined or R for random now "
  14871. CASE GET$ OF
  14872. WHEN "D","d" : slavemethod$ = "determined"
  14873. OTHERWISE slavemethod$ = "random"
  14874. ENDCASE
  14875. ENDIF
  14876. :
  14877. test$ = "n"
  14878. PROCinput
  14879. :
  14880. DEF PROCinput
  14881. REM procedure for getting first 2 attacks displayed
  14882. IF quickslave$ = "y" THEN PROCwindow(20,67,48,55)
  14883. INPUT '" Mastervoice is which voice "voice%
  14884. IF voice% = 0 THEN voice% = savevoice%
  14885. IF voice% <> 0 THEN savevoice% = voice%
  14886. voice% -= 1
  14887. startingbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  14888. startbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  14889. midbar% = array%(holdstartcell%(voice%)+1+along%,0,voice%)DIV10^6
  14890. midbeat% = (array%(holdstartcell%(voice%)+1+along%,0,voice%)MOD10^6)DIV10^3
  14891. endbar% = array%(holdstartcell%(voice%)+2+along%,0,voice%)DIV10^6
  14892. endbeat% = (array%(holdstartcell%(voice%)+2+along%,0,voice%)MOD10^6)DIV10^3
  14893. startpoint% = startingbar%*960
  14894. startpoint% += startbeat%
  14895. midpoint% = midbar%*960
  14896. midpoint% += midbeat%
  14897. endpoint% = endbar% * 960
  14898. endpoint% += endbeat%
  14899. PROCprogram
  14900. ENDPROC
  14901. :
  14902. DEF PROCprogram
  14903. IF test$ = "y" THEN number% = 1000 ELSE number% = 1
  14904. total% = 0 : total1% = 0
  14905. FOR count% = 1 TO number%
  14906. firstdur% = midpoint%-startpoint%
  14907. seconddur% = endpoint%-midpoint%
  14908. REPEAT
  14909. IF slavemethod$ = "determined" THEN
  14910. INPUT'" Percentage for first half-phase is..."percentage%
  14911. ELSE
  14912. c% = RND(100)
  14913. percentage% = RND(100) * (RND(101-c%)+(c%-1)) / 100
  14914. ENDIF
  14915. UNTIL percentage% >= lowerstart% AND percentage% <= upperstart%
  14916. SVfirstdur% = firstdur%*percentage%/100
  14917. REPEAT
  14918. IF slavemethod$ = "determined" THEN
  14919. INPUT'" Percentage for second half-phase is..."percentage1%
  14920. ELSE
  14921. c% = RND(100)
  14922. percentage1% = 100 - (RND(100) * (RND(101-c%)+(c%-1)) / 100)
  14923. ENDIF
  14924. UNTIL percentage1% >= lowerend% AND percentage1% <= upperend%
  14925. SVseconddur% = seconddur%*percentage1%/100
  14926. :
  14927. SVtotaldur% = firstdur% - SVfirstdur% + SVseconddur%
  14928. SVthirddur% = SVtotaldur%/(firstdur%+seconddur%)*firstdur%
  14929. :
  14930. SVbar% = startingbar%
  14931. SVbeat% = startbeat% + SVfirstdur%
  14932. PROCbeats
  14933. SVstartbar% = SVbar% : SVstartbeat% = SVbeat%
  14934. :
  14935. SVbar% = SVstartbar%
  14936. SVbeat% = SVstartbeat% + SVthirddur%
  14937. PROCbeats
  14938. SVmidbar% = SVbar% : SVmidbeat% = SVbeat%
  14939. :
  14940. SVbar% = midbar%
  14941. SVbeat% = midbeat% + SVseconddur%
  14942. PROCbeats
  14943. SVendbar% = SVbar% : SVendbeat% = SVbeat%
  14944. :
  14945. IF quickslave$ = "y" THEN PROCwindow(20,69,82,55)
  14946. CLS
  14947. PRINT'" The Slavevoice's first half-phase starts at ";SVstartbar%;".";SVstartbeat%;" (";percentage%;"%)"
  14948. PRINT '" and ends at ";SVmidbar%;".";SVmidbeat%
  14949. PRINT '" And its second half-phase ends at ";SVendbar%;".";SVendbeat%;" (";percentage1%;"%)"
  14950. total% += percentage% : total1% += percentage1%
  14951. NEXT
  14952. IF test$ = "y" THEN
  14953. PRINT''" Average 1st percent = ";total%/1000
  14954. PRINT" Average second = ";total1%/1000
  14955. PRINT'" to continue press C"
  14956. CASE GET$ OF
  14957. WHEN"C","c" : PROCdisplay
  14958. ENDCASE
  14959. ENDIF
  14960. PRINT''" Do you want to add this slave voice to the array?"
  14961. PRINT" (or, to test average percentages out of 1000 throws, press P"
  14962. PRINT" or, to set limits for the random percentages, press L)"
  14963. CASE GET$ OF
  14964. WHEN"Y","y" :
  14965. WHEN"N","n" : PROCdisplay
  14966. WHEN "P","p" : test$ = "y" : PROCprogram
  14967. WHEN "L","l" : PROClimits
  14968. ENDCASE
  14969. attacks1%(1) = ((SVmidbar%*960)+SVmidbeat%) - ((SVstartbar%*960)+SVstartbeat%)
  14970. attacks1%(2) = ((SVendbar%*960)+SVendbeat%) - ((SVstartbar%*960)+SVstartbeat%)
  14971. funcbar% = SVstartbar% : funcbeat% = SVstartbeat%
  14972. method$ = "raw" : quiz$ = "no" : manyattacks% = 3
  14973. PROCinsertattacks
  14974. ENDPROC
  14975. :
  14976. DEF PROCbeats
  14977. WHILE SVbeat% > 959
  14978. SVbeat% -= 960 : SVbar% += 1
  14979. ENDWHILE
  14980. ENDPROC
  14981. :
  14982. DEF PROClimits
  14983. INPUT'" Give the lower limit for SV's start-point, between 1% & 99% "lowerstart%
  14984. INPUT " Give the upper limit for SV's start-point, between 1% & 99% "upperstart%
  14985. INPUT'" Give the lower limit for SV's end-point, between 1% & 99% "lowerend%
  14986. PRINT " Give the upper limit for SV's end-point, between 1% & 99% "
  14987. INPUT " (these limits last for the session) "upperend%
  14988. PROCdisplay
  14989. ENDPROC
  14990. :
  14991. ENDPROC
  14992. :
  14993. REM*******************************************
  14994. :
  14995. DEF PROCprintattacks
  14996. :
  14997. durat% = 0
  14998. MODE 16 : COLOUR 7 : COLOUR 128 : CLS
  14999. PRINT '" The group of attacks will be at "
  15000. PRINT" "
  15001. PRINT TAB(8) "ATTACKS AT";
  15002. PRINT TAB(30) "DURATIONS";
  15003. PRINT TAB(54) "RATIOS"
  15004. tal% = 0 : printnum% = 0
  15005. FOR count% = 0 TO (manyattacks%-1)
  15006. tal% += 1
  15007. PRINT TAB(1)(attacks2%(count%))DIV10^3;" ";
  15008. PRINT ;(attacks2%(count%))MOD10^3;
  15009. IF count% > 0 THEN
  15010. durat1% = durat%
  15011. durat% = (attacks2%(count%)MOD10^3)-(attacks2%(count%-1)MOD10^3)
  15012. addon% = ((attacks2%(count%)DIV(10^3))-(attacks2%(count%-1)DIV(10^3)))*960
  15013. durat% = durat% + addon%
  15014. PRINT TAB(26) durat%;
  15015. IF count%>1 THEN
  15016. IF direction$ = "rit" THEN ratio = durat%/durat1% ELSE ratio = durat1%/durat%
  15017. CASE ratio OF
  15018. WHEN 0.5 : PRINT TAB(52) "0.5"
  15019. WHEN 1.0 : PRINT TAB(52) "1.0"
  15020. WHEN 1.5 : PRINT TAB(52) "1.5"
  15021. WHEN 2.0 : PRINT TAB(52) "2.0"
  15022. WHEN 2.5 : PRINT TAB(52) "2.5"
  15023. OTHERWISE PRINT TAB(52) ratio
  15024. ENDCASE
  15025. ENDIF
  15026. ENDIF
  15027. IF tal% > 54 AND printinfo$ = "y" THEN
  15028. printnum% += 1
  15029. MOVE 0,0
  15030. MOVE 1800,1223
  15031. *SGet mysprite
  15032. OSCLI "SSave HostFS::HardDisc4.$.CAC.Printing."+STR$(printnum%)
  15033. tal% = 0
  15034. ENDIF
  15035. NEXT
  15036. IF printinfo$ = "y" THEN
  15037. MOVE 0,0
  15038. MOVE 1800,1223
  15039. *SGet mysprite
  15040. OSCLI "SSave HostFS::HardDisc4.$.CAC.Printing."+STR$(printnum%+1)
  15041. ENDIF
  15042. :
  15043. PROCdisplay
  15044. :
  15045. ENDPROC
  15046. :
  15047. REM*************************************************
  15048. :
  15049. DEF PROCnamestaves
  15050. :
  15051. INPUT'" Rename which voice "thevoice%
  15052. INPUT' " calling it what "thename$
  15053. insts$(thevoice%,0) = thename$
  15054. :
  15055. ENDPROC
  15056. :
  15057. REM**************************************************
  15058. :
  15059. DEF PROCdeletenames
  15060. :
  15061. INPUT'" Delete names between voice "firstvoice%
  15062. INPUT " and which voice "secondvoice%
  15063. FOR count% = firstvoice% TO secondvoice%
  15064. insts$(count%,0) = ""
  15065. NEXT
  15066. :
  15067. ENDPROC
  15068. :
  15069. REM***************************************************
  15070. :
  15071. DEF PROCcopyrhythm
  15072. :
  15073. REM copies disarray data from one voice to another directly
  15074. :
  15075. CLS
  15076. INPUT'" Copy rhythm from voice "fromvoice%
  15077. INPUT'" to voice "tovoice%
  15078. INPUT'" the passage starting at bar "frombar%
  15079. INPUT'" and ending with bar "tobar%
  15080. INPUT'" the copy to start at bar "copytobar%
  15081. diff% = copytobar% - frombar%
  15082. FOR count% = frombar% TO tobar%
  15083. disarray%(count%+diff%,0,tovoice%-1) = disarray%(count%,0,fromvoice%-1)
  15084. disarray%(count%+diff%,1,tovoice%-1) = disarray%(count%,1,fromvoice%-1)
  15085. disarray%(count%+diff%,2,tovoice%-1) = disarray%(count%,2,fromvoice%-1)
  15086. disarray%(count%+diff%,3,tovoice%-1) = disarray%(count%,3,fromvoice%-1)
  15087. NEXT
  15088. :
  15089. PROCdisplay
  15090. :
  15091. ENDPROC
  15092. :
  15093. REM****************************************************
  15094. :
  15095. DEF PROCquantize
  15096. :
  15097. FOR count% = 0 TO manyattacks%-1
  15098. :
  15099. proceed1$ = "yes"
  15100. proceed2$ = "yes"
  15101. REM routine to illimunate from quantizing attacks closer than 120 bts to adjacent attacks
  15102. IF count% > 0 THEN
  15103. value1% = (attacks2%(count%)MOD10^3) + ((attacks2%(count%)DIV10^3)*960)
  15104. value2% = (attacks2%(count%-1)MOD10^3) + ((attacks2%(count%-1)DIV10^3)*960)
  15105. IF (value1% - value2%) > 120 THEN proceed1$ = "yes" ELSE proceed1$ = "no"
  15106. ENDIF
  15107. :
  15108. IF count%<(manyattacks%-1) THEN
  15109. value1% = (attacks2%(count%)MOD10^3) + ((attacks2%(count%)DIV10^3)*960)
  15110. value2% = (attacks2%(count%+1)MOD10^3) + ((attacks2%(count%+1)DIV10^3)*960)
  15111. IF (value2% - value1%) > 120 THEN proceed2$ = "yes" ELSE proceed2$ = "no"
  15112. ENDIF
  15113. :
  15114. IF proceed1$ = "yes" AND proceed2$ = "yes" THEN
  15115. :
  15116. beat% = attacks2%(count%)MOD10^3
  15117. :
  15118. IF beat%>900 AND beat%<960 THEN
  15119. IF beat%<930 THEN
  15120. attacks2%(count%) = (attacks2%(count%)-beat%+900)
  15121. ELSE
  15122. attacks2%(count%) = (attacks2%(count%)-beat%+1000)
  15123. attacks3%(count%)+= 1000
  15124. ENDIF
  15125. ENDIF
  15126. :
  15127. IF beat%>0 AND beat%<60 THEN
  15128. IF beat%<31 THEN
  15129. attacks2%(count%)-=beat%
  15130. ELSE
  15131. attacks2%(count%) = (attacks2%(count%)-beat%+60)
  15132. ENDIF
  15133. ENDIF
  15134. :
  15135. IF beat%>420 AND beat%<480 THEN
  15136. IF beat%<430 THEN
  15137. attacks2%(count%)= (attacks2%(count%)-beat%+420)
  15138. ELSE
  15139. attacks2%(count%) = (attacks2%(count%)-beat%+480)
  15140. ENDIF
  15141. ENDIF
  15142. :
  15143. IF beat%>480 AND beat%<540 THEN
  15144. IF beat%<511 THEN
  15145. attacks2%(count%)= (attacks2%(count%)-beat%+480)
  15146. ELSE
  15147. attacks2%(count%) = (attacks2%(count%)-beat%+540)
  15148. ENDIF
  15149. ENDIF
  15150. :
  15151. ENDIF
  15152. :
  15153. NEXT
  15154. :
  15155. ENDPROC
  15156. :
  15157. REM**************************************************************
  15158. :
  15159. DEF PROCreleases
  15160. :
  15161. CLS
  15162. copymove$ = "C"
  15163. :
  15164. :
  15165. IF quickcopy$ = "n" THEN
  15166. PRINT'" Create envelope points for which voice? "
  15167. INPUT " (0 = top) "voice%
  15168. IF voice% = 0 THEN PROCpressenter
  15169. voice% -= 1
  15170. INPUT'" Starting at bar "copystartbar%
  15171. holdbar% = copystartbar%
  15172. INPUT" beat "beats%
  15173. PROCalterbeats : copystartbeat% = beats%
  15174. holdbeat% = copystartbeat%
  15175. IF justone$ = "n" THEN
  15176. PRINT'" Ending at bar "
  15177. INPUT" (for last type 0) "copyendbar%
  15178. IF copyendbar% > 0 THEN
  15179. INPUT " beat "beats%
  15180. PROCalterbeats : copyendbeat% = beats%
  15181. ENDIF
  15182. ELSE
  15183. copyendbar% = copystartbar%
  15184. copyendbeat% = copystartbeat%
  15185. ENDIF
  15186. :
  15187. ELSE
  15188. :
  15189. PRINT'" Create envelope points for which voice? "
  15190. INPUT " (0 = top) "voice%
  15191. IF voice% = 0 THEN PROCpressenter
  15192. voice% -= 1
  15193. INPUT '" note number (for 1 press 0) "along%
  15194. IF along% = 0 THEN along% = 1
  15195. along%-=1
  15196. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  15197. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  15198. holdbar% = copystartbar%
  15199. holdbeat% = copystartbeat%
  15200. IF justone$ = "n" THEN
  15201. PRINT'" to note number "
  15202. INPUT" (for last type 0) "along%
  15203. IF along% = 0 THEN
  15204. copyendbar% = 0
  15205. ELSE
  15206. along%-=1
  15207. copyendbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  15208. copyendbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  15209. ENDIF
  15210. ELSE
  15211. copyendbar% = copystartbar%
  15212. copyendbeat% = copystartbeat%
  15213. ENDIF
  15214. ENDIF
  15215. :
  15216. :
  15217. value% = (copystartbar%*10^3)+copystartbeat%
  15218. IF value% <= array%(0,0,voice%)DIV10^3 THEN
  15219. startatcell% = 0
  15220. ELSE
  15221. PROCsearch(value%)
  15222. startatcell% = startcell%
  15223. ENDIF
  15224. IF copyendbar% = 0 THEN
  15225. endatcell% = numusedcells%(voice%) - 1
  15226. ELSE
  15227. value% = (copyendbar%*10^3)+copyendbeat%
  15228. IF value% >= array%(numusedcells%(voice%)-1,0,voice%)DIV10^3 THEN
  15229. endatcell% = numusedcells%(voice%) - 1
  15230. ELSE
  15231. PROCsearch(value%)
  15232. IF shunt$ = "N" THEN endatcell% = startcell% ELSE endatcell% = startcell% - 1
  15233. ENDIF
  15234. ENDIF
  15235. :
  15236. manyattacks% = endatcell% - startatcell% + 1
  15237. REM create 'gap' between beat-of-bar and first actual attack
  15238. carrybars% = (array%(startatcell%,0,voice%)DIV10^6)-copystartbar%
  15239. carrybeats% = ((array%(startatcell%,0,voice%)DIV10^3)MOD10^3)-copystartbeat%
  15240. attacks1%(0) = (carrybars%*960)+carrybeats%
  15241. :
  15242. FOR count% = 0 TO (manyattacks%-1)
  15243. IF count% > 0 THEN
  15244. carrybars% = (array%(startatcell%+count%,0,voice%)DIV10^6)-(array%(startatcell%+count%-1,0,voice%)DIV10^6)
  15245. carrybeats% = ((array%(startatcell%+count%,0,voice%)DIV10^3)MOD10^3)-((array%(startatcell%+count%-1,0,voice%)DIV10^3)MOD10^3)
  15246. attacks1%(count%) = attacks1%(count%-1) + ((carrybars%*960)+carrybeats%)
  15247. ENDIF
  15248. :
  15249. pitches%(count%) = array%(startatcell%+count%,0,voice%)MOD10^3
  15250. dur% = (array%(startatcell%+count%,1,voice%)DIV10)MOD10^3
  15251. brrr% = array%(startatcell%+count%,0,voice%)DIV10^6 : PROCreconvertdur
  15252. durations%(count%) = dur%
  15253. NEXT
  15254. :
  15255. counter% = -1
  15256. FOR count% = 0 TO (manyattacks%-1)
  15257. :
  15258. counter% += 1
  15259. gliss1% = (array%(startatcell%+count%,1,voice%)DIV10^4)MOD10^2 : gliss1% = 50-gliss1%
  15260. gliss2% = (array%(startatcell%+count%,1,voice%)DIV10^6)MOD10^2 : gliss2% = 50 - gliss2%
  15261. gliss3% = array%(startatcell%+count%,1,voice%)DIV10^8 : gliss3% = 10 - gliss3%
  15262. note% = pitches%(count%)DIV10^2
  15263. accid% = (pitches%(count%)DIV10)MOD10
  15264. oct% = pitches%(count%)MOD10
  15265. :
  15266. ph1% = ((array%(startatcell%+count%,2,voice%))DIV10^5)MOD10^2
  15267. IF ph1% <> 0 THEN
  15268. envattacks%(counter%) = attacks1%(count%)+(durations%(count%)*ph1%/100)
  15269. gliss% = gliss1%
  15270. IF gliss% <> 0 THEN
  15271. PROCglisspitches
  15272. envpitches%(counter%) = (note1%*100)+(accid1%*10)+oct1%
  15273. ELSE
  15274. envpitches%(counter%) = (note%*100)+(accid%*10)+oct%
  15275. ENDIF
  15276. :
  15277. ENDIF
  15278. :
  15279. ph2% = (array%(startatcell%+count%,2,voice%))DIV10^7
  15280. IF ph2% <> 0 THEN
  15281. counter% += 1
  15282. envattacks%(counter%) = attacks1%(count%)+(durations%(count%)*ph2%/100)
  15283. gliss% = gliss1% + gliss2%
  15284. IF gliss% <> 0 THEN
  15285. PROCglisspitches
  15286. envpitches%(counter%) = (note1%*100)+(accid1%*10)+oct1%
  15287. ELSE
  15288. envpitches%(counter%) = (note%*100)+(accid%*10)+oct%
  15289. ENDIF
  15290. :
  15291. ENDIF
  15292. :
  15293. IF ph1% <> 0 THEN counter% += 1
  15294. envattacks%(counter%) = attacks1%(count%)+durations%(count%)
  15295. IF ph1% = 0 THEN gliss% = gliss1%
  15296. IF ph1% <> 0 AND ph2% = 0 THEN gliss% = gliss1% + gliss2%
  15297. IF ph2% <> 0 THEN gliss% = gliss1% + gliss2% + gliss3%
  15298. IF gliss% <> 0 THEN
  15299. PROCglisspitches
  15300. envpitches%(counter%) = (note1%*100)+(accid1%*10)+oct1%
  15301. ELSE
  15302. envpitches%(counter%) = (note%*100)+(accid%*10)+oct%
  15303. ENDIF
  15304. :
  15305. NEXT
  15306. :
  15307. FOR count% = 0 TO counter%
  15308. :
  15309. attacks1%(count%) = envattacks%(count%)
  15310. pitches%(count%) = envpitches%(count%)
  15311. durations%(count%) = 0
  15312. amplitudes%(count%) = 0
  15313. envelopes%(count%) = 9
  15314. glissandos%(count%) = 105050
  15315. inflections%(count%) = 50
  15316. NEXT
  15317. :
  15318. numpitches% = counter% + 1
  15319. manyattacks% = counter% + 1
  15320. method$ = "raw"
  15321. copyit$ = "ON"
  15322. PROCinsertattacks
  15323. :
  15324. justone$ = "n"
  15325. :
  15326. ENDPROC
  15327. :
  15328. REM**********************************************
  15329. :
  15330. DEF PROCglisspitches
  15331. :
  15332. note1% = note% : accid1% = accid% : oct1% = oct%
  15333. :
  15334. IF gliss% < 0 THEN step% = -1 ELSE step% = 1
  15335. IF gliss% > 0 THEN startloop% = 1 ELSE startloop% = -1
  15336. :
  15337. FOR country% = startloop% TO gliss% STEP step%
  15338. :
  15339. CASE step% OF
  15340. WHEN -1 :
  15341. CASE accid1% OF
  15342. WHEN 1 :
  15343. CASE note1% OF
  15344. WHEN 0 :
  15345. note1% = 6 : accid1% = 4 : oct1% -=1
  15346. WHEN 1, 2, 4, 5, 6 :
  15347. note1% -= 1 : accid1% = 8
  15348. WHEN 3 :
  15349. note1% -= 1 : accid1% = 4
  15350. ENDCASE
  15351. OTHERWISE accid1% -= 1
  15352. ENDCASE
  15353. WHEN 1 :
  15354. CASE accid1% OF
  15355. WHEN 9 :
  15356. CASE note1% OF
  15357. WHEN 0, 1, 3, 4, 5 :
  15358. note1% += 1 : accid1% = 2
  15359. WHEN 2 :
  15360. note1% += 1 : accid1% = 6
  15361. WHEN 6 :
  15362. note1% = 0 : accid1% = 6 : oct1% += 1
  15363. ENDCASE
  15364. OTHERWISE accid1% += 1
  15365. ENDCASE
  15366. ENDCASE
  15367. NEXT
  15368. :
  15369. ENDPROC
  15370. :
  15371. REM*********************************************
  15372. :
  15373. DEF PROCdoublestop
  15374. :
  15375. PROCwindow(20,69,96,55)
  15376. repeatposit$ = "n"
  15377. distort$ = "OFF"
  15378. dothis$ = "YES"
  15379. :
  15380. copymove$ = "DS"
  15381. savevoice$ = "N"
  15382. justone$ = "n"
  15383. :
  15384. PRINT'" Violin, viola, cello or bass (N,A,O,S)? "
  15385. PRINT'" (or press E for an explanation of the function) "
  15386. CASE GET$ OF
  15387. WHEN "N","n" : member$ = "violin"
  15388. WHEN "A","a" : member$ = "viola"
  15389. WHEN "O","o" : member$ = "cello"
  15390. WHEN "S","s" : member$ = "bass"
  15391. WHEN "E","e" :
  15392. PROCwindow(10,60,96,25)
  15393. VDU 14
  15394. CLS
  15395. PRINT'" The typical situation in which the double-stop function would play a part"
  15396. PRINT" is imagined to be this: up to four voices are employed to schedule attack-points "
  15397. PRINT" on each of the strings (at this stage make a single-voice reduction with the attacks "
  15398. PRINT" pitched on the open strings, because this will be needed in the function). "
  15399. PRINT'" Pitches are allocated to the attacks, including open strings and harmonics, with "
  15400. PRINT" the condition that all are within a single lh position at any one time. "
  15401. PRINT'" Now reduce these separate-string voices to a single voice - this is treated by "
  15402. PRINT" the function to produce a version inserting practical double-stops according to "
  15403. PRINT" user-defined probabilities; this is copied into two further voices to enable faithful "
  15404. PRINT" play-back; durations are correctly clipped, so a further reduction of these two "
  15405. PRINT" voices will give a clear indication of notation on a single stave. "
  15406. PRINT'" (press C to continue) "
  15407. CASE GET$ OF
  15408. ENDCASE
  15409. VDU 15
  15410. PROCdisplay
  15411. OTHERWISE PROCdoublestop
  15412. ENDCASE
  15413. INPUT'" Which single voice is to be treated? "treatvoice%
  15414. treatvoice% -= 1
  15415. INPUT'" Which other 2 voices is it divided into? - voice... "firstvoice%
  15416. firstvoice% -= 1
  15417. INPUT'" and voice... "secondvoice%
  15418. secondvoice% -= 1
  15419. INPUT'" And which single voice carries the open strings? - voice... "stringvoice%
  15420. stringvoice% -= 1
  15421. CLS
  15422. PRINT''" These 4 voices are assumed to correspond vertically; "
  15423. INPUT'" the passage is to start at bar "copystartbar%
  15424. IF copystartbar% = 0 THEN
  15425. copystartbar% = holdbar% : copystartbeat% = holdbeat% : repeatposit$ = "y"
  15426. ENDIF
  15427. holdbar% = copystartbar%
  15428. IF repeatposit$ = "y" THEN
  15429. PRINT'" bar ";copystartbar%;" beat ";copystartbeat%;"?"
  15430. PRINT" (for OK press 0, if not OK press X)"
  15431. CASE GET$ OF
  15432. WHEN"X","x" : PROCdoublestop
  15433. OTHERWISE
  15434. ENDCASE
  15435. ELSE
  15436. INPUT" beat "beats%
  15437. ENDIF
  15438. PROCalterbeats : copystartbeat% = beats%
  15439. holdbeat% = copystartbeat%
  15440. IF justone$ = "n" THEN
  15441. PRINT'" Ending at bar "
  15442. INPUT" (for last type 0) "copyendbar%
  15443. IF copyendbar% > 0 THEN
  15444. INPUT " beat "beats%
  15445. PROCalterbeats : copyendbeat% = beats%
  15446. ENDIF
  15447. ELSE
  15448. copyendbar% = copystartbar%
  15449. copyendbeat% = copystartbeat%
  15450. ENDIF
  15451. :
  15452. CLS
  15453. PRINT'" On what percentage of occasions do you want a potential "
  15454. PRINT" double-stop to be allowed? "
  15455. INPUT'" (a) following a single-stop... "singlechance%
  15456. INPUT'" (b) following a double-stop... "doublechance%
  15457. :
  15458. FOR run% = 0 TO 1
  15459. IF run% = 0 THEN voice% = stringvoice% ELSE voice% = treatvoice%
  15460. value% = (copystartbar%*10^3)+copystartbeat%
  15461. IF value% <= array%(0,0,voice%)DIV10^3 THEN
  15462. startatcell% = 0
  15463. ELSE
  15464. PROCsearch(value%)
  15465. startatcell% = startcell%
  15466. ENDIF
  15467. IF copyendbar% = 0 THEN
  15468. endatcell% = numusedcells%(voice%) - 1
  15469. ELSE
  15470. value% = (copyendbar%*10^3)+copyendbeat%
  15471. IF value% >= array%(numusedcells%(voice%)-1,0,voice%)DIV10^3 THEN
  15472. endatcell% = numusedcells%(voice%) - 1
  15473. ELSE
  15474. PROCsearch(value%)
  15475. IF shunt$ = "N" THEN endatcell% = startcell% ELSE endatcell% = startcell% - 1
  15476. ENDIF
  15477. ENDIF
  15478. :
  15479. manyattacks% = endatcell% - startatcell% + 1
  15480. REM create 'gap' between beat-of-bar and first actual attack
  15481. carrybars% = (array%(startatcell%,0,voice%)DIV10^6)-copystartbar%
  15482. carrybeats% = ((array%(startatcell%,0,voice%)DIV10^3)MOD10^3)-copystartbeat%
  15483. attacks1%(0) = (carrybars%*960)+carrybeats%
  15484. :
  15485. IF copymove$ = "DS" THEN
  15486. FOR count% = 0 TO (manyattacks%-1)
  15487. IF count% > 0 THEN
  15488. carrybars% = (array%(startatcell%+count%,0,voice%)DIV10^6)-(array%(startatcell%+count%-1,0,voice%)DIV10^6)
  15489. carrybeats% = ((array%(startatcell%+count%,0,voice%)DIV10^3)MOD10^3)-((array%(startatcell%+count%-1,0,voice%)DIV10^3)MOD10^3)
  15490. attacks1%(count%) = attacks1%(count%-1) + ((carrybars%*960)+carrybeats%)
  15491. ENDIF
  15492. :
  15493. pitches%(count%) = array%(startatcell%+count%,0,voice%)MOD10^3
  15494. IF run% = 0 THEN
  15495. pitch% = pitches%(count%)
  15496. PROCopenstgs
  15497. ENDIF
  15498. dur% = (array%(startatcell%+count%,1,voice%)DIV10)MOD10^3
  15499. brrr% = array%(startatcell%+count%,0,voice%)DIV10^6 : PROCreconvertdur
  15500. durations%(count%) = dur%
  15501. amplitudes%(count%) = (array%(startatcell%+count%,1,voice%))MOD10
  15502. envelopes%(count%) = (array%(startatcell%+count%,2,voice%))DIV10^2
  15503. glissandos%(count%) = (array%(startatcell%+count%,1,voice%)DIV10^4)
  15504. inflections%(count%) = array%(startatcell%+count%,2,voice%)MOD10^2
  15505. NEXT
  15506. ENDIF
  15507. NEXT run%
  15508. :
  15509. :
  15510. firstcutoff% = 0
  15511. secondcutoff% = 0
  15512. :
  15513. FOR count% = 0 TO (manyattacks%-1)
  15514. :
  15515. REM determine state before making decision
  15516. state$ = "tacet"
  15517. IF firstcutoff% > attacks1%(count%) THEN state$ = "single1"
  15518. IF secondcutoff% > attacks1%(count%) AND state$ = "tacet" THEN state$ = "single2"
  15519. IF secondcutoff% > attacks1%(count%) AND state$ = "single1" THEN state$ = "double"
  15520. :
  15521. CASE state$ OF
  15522. WHEN "tacet" :
  15523. dsvoice%(count%) = firstvoice%
  15524. firstcutoff% = attacks1%(count%) + durations%(count%)
  15525. firstcount% = count%
  15526. firststg% = openstgs%(count%)
  15527. :
  15528. WHEN "single1" :
  15529. newstg$ = "nonadj"
  15530. IF firststg% = openstgs%(count%) THEN newstg$ = "same"
  15531. IF firststg% = (openstgs%(count%)-1) OR firststg% = (openstgs%(count%)+1) THEN newstg$ = "adj"
  15532. :
  15533. CASE newstg$ OF
  15534. WHEN "same" :
  15535. dsvoice%(count%) = firstvoice%
  15536. firstcutoff% = attacks1%(count%) + durations%(count%)
  15537. firststg% = openstgs%(count%)
  15538. REM clip duration of interrupted note
  15539. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15540. firstcount% = count%
  15541. WHEN "adj" :
  15542. PROCsingleprob
  15543. IF ds$ = "n" THEN
  15544. dsvoice%(count%) = firstvoice%
  15545. firstcutoff% = attacks1%(count%) + durations%(count%)
  15546. firststg% = openstgs%(count%)
  15547. REM clip duration of interrupted note
  15548. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15549. firstcount% = count%
  15550. ELSE
  15551. dsvoice%(count%) = secondvoice%
  15552. secondcutoff% = attacks1%(count%) + durations%(count%)
  15553. secondcount% = count%
  15554. secondstg% = openstgs%(count%)
  15555. ENDIF
  15556. WHEN "nonadj" :
  15557. dsvoice%(count%) = firstvoice%
  15558. firstcutoff% = attacks1%(count%) + durations%(count%)
  15559. firststg% = openstgs%(count%)
  15560. REM clip duration of interrupted note and add slight 'rest'
  15561. durations%(firstcount%) = attacks1%(count%) - (attacks1%(firstcount%)+60)
  15562. IF durations%(firstcount%) <0 THEN durations%(firstcount%) = 1
  15563. firstcount% = count%
  15564. ENDCASE
  15565. :
  15566. WHEN "single2" :
  15567. newstg$ = "nonadj"
  15568. IF secondstg% = openstgs%(count%) THEN newstg$ = "same"
  15569. IF secondstg% = (openstgs%(count%)-1) OR secondstg% = (openstgs%(count%)+1) THEN newstg$ = "adj"
  15570. :
  15571. CASE newstg$ OF
  15572. WHEN "same" :
  15573. dsvoice%(count%) = secondvoice%
  15574. secondcutoff% = attacks1%(count%) + durations%(count%)
  15575. secondstg% = openstgs%(count%)
  15576. REM clip duration of interrupted note
  15577. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15578. secondcount% = count%
  15579. WHEN "adj" :
  15580. PROCsingleprob
  15581. IF ds$ = "n" THEN
  15582. dsvoice%(count%) = secondvoice%
  15583. secondcutoff% = attacks1%(count%) + durations%(count%)
  15584. secondstg% = openstgs%(count%)
  15585. REM clip duration of interrupted note
  15586. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15587. secondcount% = count%
  15588. ELSE
  15589. dsvoice%(count%) = firstvoice%
  15590. firstcutoff% = attacks1%(count%) + durations%(count%)
  15591. firstcount% = count%
  15592. firststg% = openstgs%(count%)
  15593. ENDIF
  15594. WHEN "nonadj" :
  15595. dsvoice%(count%) = secondvoice%
  15596. secondcutoff% = attacks1%(count%) + durations%(count%)
  15597. secondstg% = openstgs%(count%)
  15598. REM clip duration of interrupted note and add slight 'rest'
  15599. durations%(secondcount%) = attacks1%(count%) - (attacks1%(secondcount%)+60)
  15600. IF durations%(secondcount%) <0 THEN durations%(secondcount%) = 1
  15601. secondcount% = count%
  15602. ENDCASE
  15603. :
  15604. WHEN "double" :
  15605. newstg$ = "nonadj"
  15606. IF openstgs%(count%) = firststg% THEN newstg$ = "sameasfirst"
  15607. IF openstgs%(count%) = secondstg% THEN newstg$ = "sameassecond"
  15608. IF (openstgs%(count%) = (firststg%-1) OR openstgs%(count%) = (firststg%+1)) AND openstgs%(count%) <> secondstg% THEN newstg$ = "adjtofirst"
  15609. IF (openstgs%(count%) = (secondstg%-1) OR openstgs%(count%) = (secondstg%+1)) AND openstgs%(count%) <> firststg% THEN newstg$ = "adjtosecond"
  15610. :
  15611. CASE newstg$ OF
  15612. WHEN "sameasfirst" :
  15613. PROCdoubleprob
  15614. IF ds$ = "n" THEN
  15615. dsvoice%(count%) = firstvoice%
  15616. firstcutoff% = attacks1%(count%) + durations%(count%)
  15617. firststg% = openstgs%(count%)
  15618. REM clip durations of both interrupted notes
  15619. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15620. firstcount% = count%
  15621. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15622. secondcutoff% = attacks1%(secondcount%) + durations%(secondcount%)
  15623. ELSE
  15624. dsvoice%(count%) = firstvoice%
  15625. firstcutoff% = attacks1%(count%) + durations%(count%)
  15626. firststg% = openstgs%(count%)
  15627. REM clip duration of interrupted note
  15628. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15629. firstcount% = count%
  15630. ENDIF
  15631. WHEN "sameassecond" :
  15632. PROCdoubleprob
  15633. IF ds$ = "n" THEN
  15634. dsvoice%(count%) = secondvoice%
  15635. secondcutoff% = attacks1%(count%) + durations%(count%)
  15636. secondstg% = openstgs%(count%)
  15637. REM clip durations of both interrupted notes
  15638. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15639. secondcount% = count%
  15640. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15641. firstcutoff% = attacks1%(firstcount%) + durations%(firstcount%)
  15642. ELSE
  15643. dsvoice%(count%) = secondvoice%
  15644. secondcutoff% = attacks1%(count%) + durations%(count%)
  15645. secondstg% = openstgs%(count%)
  15646. REM clip duration of interrupted note
  15647. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15648. secondcount% = count%
  15649. ENDIF
  15650. WHEN "adjtofirst" :
  15651. PROCdoubleprob
  15652. IF ds$ = "n" THEN
  15653. dsvoice%(count%) = firstvoice%
  15654. firstcutoff% = attacks1%(count%) + durations%(count%)
  15655. firststg% = openstgs%(count%)
  15656. REM clip durations of both interrupted notes
  15657. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15658. firstcount% = count%
  15659. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15660. secondcutoff% = attacks1%(secondcount%) + durations%(secondcount%)
  15661. ELSE
  15662. dsvoice%(count%) = secondvoice%
  15663. secondcutoff% = attacks1%(count%) + durations%(count%)
  15664. secondstg% = openstgs%(count%)
  15665. REM clip duration of interrupted note
  15666. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15667. secondcount% = count%
  15668. ENDIF
  15669. WHEN "adjtosecond" :
  15670. PROCdoubleprob
  15671. IF ds$ = "n" THEN
  15672. dsvoice%(count%) = secondvoice%
  15673. secondcutoff% = attacks1%(count%) + durations%(count%)
  15674. secondstg% = openstgs%(count%)
  15675. REM clip durations of both interrupted notes
  15676. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15677. secondcount% = count%
  15678. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15679. firstcutoff% = attacks1%(firstcount%) + durations%(firstcount%)
  15680. ELSE
  15681. dsvoice%(count%) = firstvoice%
  15682. firstcutoff% = attacks1%(count%) + durations%(count%)
  15683. firststg% = openstgs%(count%)
  15684. REM clip duration of interrupted note
  15685. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15686. firstcount% = count%
  15687. ENDIF
  15688. WHEN "nonadj" :
  15689. dsvoice%(count%) = firstvoice%
  15690. firstcutoff% = attacks1%(count%) + durations%(count%)
  15691. firststg% = openstgs%(count%)
  15692. REM clip durations of both interrupted notes and add 'rests'
  15693. durations%(firstcount%) = attacks1%(count%) - (attacks1%(firstcount%)+60)
  15694. IF durations%(firstcount%) <0 THEN durations%(firstcount%) = 1
  15695. firstcount% = count%
  15696. durations%(secondcount%) = attacks1%(count%) - (attacks1%(secondcount%)+60)
  15697. IF durations%(secondcount%) <0 THEN durations%(secondcount%) = 1
  15698. secondcutoff% = attacks1%(secondcount%) + durations%(secondcount%)
  15699. ENDCASE
  15700. :
  15701. ENDCASE
  15702. :
  15703. NEXT
  15704. :
  15705. :
  15706. numpitches% = manyattacks% : method$ = "raw" : copyit$ = "ON" : justone$ = "n"
  15707. : repeatposit$ = "n" : reordered$ = "n" : equalized$ = "n" : rhythmicized$ = "n"
  15708. :
  15709. : startat% = (copystartbar%*(10^3))+copystartbeat%
  15710. attacks2%() = attacks1%()
  15711. :
  15712. attacks2%() = attacks2%() + (startat% MOD 10^3) : REM moves attacks further up bar, if necc
  15713. :
  15714. attacks3%() = attacks2%()
  15715. FOR count% = 0 TO (manyattacks%-1)
  15716. attacks3%(count%) = attacks3%(count%) DIV 960
  15717. NEXT
  15718. REM gives list of bar mos starting at 0
  15719. :
  15720. attacks3%() = attacks3%() * 960
  15721. attacks2%() = attacks2%() - attacks3%()
  15722. attacks3%() = attacks3%() / 960
  15723. REM list of actual beat numbers
  15724. :
  15725. attacks3%() = attacks3%() + (startat% DIV 10^3) : REM list of actual bar nos
  15726. :
  15727. attacks3%() = attacks3%()*(10^3)
  15728. attacks2%() = attacks2%() + attacks3%()
  15729. REM list of actual bar/beat numbers
  15730. :
  15731. :
  15732. addingnotes$ = "y"
  15733. :
  15734. FOR counter% = 0 TO (manyattacks%-1)
  15735. voice% = dsvoice%(counter%)
  15736. PROCnewnotereception(voice%, (attacks2%(counter%)DIV10^3), (attacks2%(counter%)MOD10^3), pitches%(counter%), amplitudes%(counter%), envelopes%(counter%), durations%(counter%), glissandos%(counter%), inflections%(counter%))
  15737. NEXT
  15738. :
  15739. copyit$ = "OFF" : displayedfunc$ = "n" : PROCdisplay
  15740. :
  15741. ENDPROC
  15742. :
  15743. REM******************************************************************
  15744. :
  15745. DEF PROCopenstgs
  15746. :
  15747. CASE member$ OF
  15748. WHEN "violin" :
  15749. CASE pitch% OF
  15750. WHEN 255 : openstgs%(count%) = 1
  15751. WHEN 554 : openstgs%(count%) = 2
  15752. WHEN 154 : openstgs%(count%) = 3
  15753. WHEN 453 : openstgs%(count%) = 4
  15754. OTHERWISE
  15755. VDU 7 : PRINT "NOT AN OPEN STRING"
  15756. PRINT "press C to continue"
  15757. CASE GET$ OF
  15758. ENDCASE
  15759. PROCdoublestop
  15760. ENDCASE
  15761. :
  15762. WHEN "viola" :
  15763. CASE pitch% OF
  15764. WHEN 554 : openstgs%(count%) = 1
  15765. WHEN 154 : openstgs%(count%) = 2
  15766. WHEN 453 : openstgs%(count%) = 3
  15767. WHEN 53 : openstgs%(count%) = 4
  15768. OTHERWISE
  15769. VDU 7 : PRINT "NOT AN OPEN STRING"
  15770. PRINT "press C to continue"
  15771. CASE GET$ OF
  15772. ENDCASE
  15773. PROCdoublestop
  15774. ENDCASE
  15775. :
  15776. WHEN "cello" :
  15777. CASE pitch% OF
  15778. WHEN 553 : openstgs%(count%) = 1
  15779. WHEN 153 : openstgs%(count%) = 2
  15780. WHEN 452 : openstgs%(count%) = 3
  15781. WHEN 52 : openstgs%(count%) = 4
  15782. OTHERWISE
  15783. VDU 7 : PRINT "NOT AN OPEN STRING"
  15784. PRINT "press C to continue"
  15785. CASE GET$ OF
  15786. ENDCASE
  15787. PROCdoublestop
  15788. ENDCASE
  15789. :
  15790. WHEN "bass" :
  15791. CASE pitch% OF
  15792. WHEN 452 : openstgs%(count%) = 1
  15793. WHEN 152 : openstgs%(count%) = 2
  15794. WHEN 551 : openstgs%(count%) = 3
  15795. WHEN 251 : openstgs%(count%) = 4
  15796. OTHERWISE
  15797. VDU 7 : PRINT "NOT AN OPEN STRING"
  15798. PRINT "press C to continue"
  15799. CASE GET$ OF
  15800. ENDCASE
  15801. PROCdoublestop
  15802. ENDCASE
  15803. :
  15804. ENDCASE
  15805. :
  15806. ENDPROC
  15807. :
  15808. REM****************************************************
  15809. :
  15810. DEF PROCsingleprob
  15811. :
  15812. number% = RND(100)
  15813. IF number% > 0 AND number% <= singlechance% THEN
  15814. ds$ = "y"
  15815. ELSE
  15816. ds$ = "n"
  15817. ENDIF
  15818. ENDPROC
  15819. :
  15820. REM***************************************************
  15821. :
  15822. DEF PROCdoubleprob
  15823. :
  15824. number% = RND(100)
  15825. IF number% > 0 AND number% <= doublechance% THEN
  15826. ds$ = "y"
  15827. ELSE
  15828. ds$ = "n"
  15829. ENDIF
  15830. ENDPROC
  15831. :
  15832. REM***************************************************
  15833. :
  15834. DEF PROCsamepitches
  15835. :
  15836. PRINT' " Note name for pitch is ";
  15837. COLOUR 1
  15838. CASE GET$ OF
  15839. WHEN "C","c" : note% = 0 : PRINT "C"
  15840. WHEN "D","d" : note% = 1 : PRINT "D"
  15841. WHEN "E","e" : note% = 2 : PRINT "E"
  15842. WHEN "F","f" : note% = 3 : PRINT "F"
  15843. WHEN "G","g" : note% = 4 : PRINT "G"
  15844. WHEN "A","a" : note% = 5 : PRINT "A"
  15845. WHEN "B","b" : note% = 6 : PRINT "B"
  15846. ENDCASE
  15847. COLOUR 0
  15848. PRINT " accidental ";
  15849. COLOUR 1
  15850. CASE GET$ OF
  15851. WHEN "1" : accid% = 1 : PRINT "flat"
  15852. WHEN "2" : accid% = 2 : PRINT "3/8flat"
  15853. WHEN "3" : accid% = 3 : PRINT "1/4flat"
  15854. WHEN "4" : accid% = 4 : PRINT "1/8flat"
  15855. WHEN "5" : accid% = 5 : PRINT "nat"
  15856. WHEN "6" : accid% = 6 : PRINT "1/8shrp"
  15857. WHEN "7" : accid% = 7 : PRINT "1/4shrp"
  15858. WHEN "8" : accid% = 8 : PRINT "3/8shrp"
  15859. WHEN "9" : accid% = 9 : PRINT "shrp"
  15860. ENDCASE
  15861. COLOUR 0
  15862. PRINT " octave ";
  15863. COLOUR 1
  15864. CASE GET$ OF
  15865. WHEN "0" : octave% = 0 : PRINT "0"
  15866. WHEN "1" : octave% = 1 : PRINT "1"
  15867. WHEN "2" : octave% = 2 : PRINT "2"
  15868. WHEN "3" : octave% = 3 : PRINT "3"
  15869. WHEN "4" : octave% = 4 : PRINT "4"
  15870. WHEN "5" : octave% = 5 : PRINT "5"
  15871. WHEN "6" : octave% = 6 : PRINT "6"
  15872. WHEN "7" : octave% = 7 : PRINT "7"
  15873. WHEN "8" : octave% = 8 : PRINT "8"
  15874. ENDCASE
  15875. COLOUR 0
  15876. FOR count% = 0 TO numpitches% - 1
  15877. pitches%(count%) = (note%*100)+(accid%*10)+octave%
  15878. NEXT
  15879. :
  15880. firstpitch$ = "n" : prevnumpitches% = numpitches%
  15881. REM function can feed pitches similarly into pitches%
  15882. :
  15883. PROCinsertpitches
  15884. :
  15885. ENDPROC
  15886. :
  15887. REM*************************************************
  15888. :
  15889. DEF PROCedit
  15890. :
  15891. PROCwindow(20,60,58,39)
  15892. PRINT ' " move 1st envelope point E"
  15893. PRINT ' " move 2nd envelope point R"
  15894. PRINT ' " change 1st amplitude A"
  15895. PRINT ' " change 2nd amplitude S"
  15896. PRINT ' " change 3rd amplitude D"
  15897. PRINT ' " change 4th amplitude F"
  15898. PRINT ' " move note+following note N"
  15899. PRINT ' " move note+drag previous duration M"
  15900. PRINT ' " change duration C"
  15901. PRINT ' " then Shift + < OR >"
  15902. CASE GET$ OF
  15903. WHEN "E", "e" : editwhat$ = "1stenvelope"
  15904. WHEN "R", "r" : editwhat$ = "2ndenvelope"
  15905. WHEN "A", "a" : editwhat$ = "1stamplitude"
  15906. WHEN "S", "s" : editwhat$ = "2ndamplitude"
  15907. WHEN "D", "d" : editwhat$ = "3rdamplitude"
  15908. WHEN "F", "f" : editwhat$ = "4thamplitude"
  15909. WHEN "N", "n" : editwhat$ = "movetwo"
  15910. WHEN "M", "m" : editwhat$ = "move&drag"
  15911. WHEN "C", "c" : editwhat$ = "duration"
  15912. ENDCASE
  15913. PROCdisplay
  15914. ENDPROC
  15915. :
  15916. REM*************************************************
  15917. :
  15918. DEF PROCconvertoldenvelopes
  15919. :
  15920. REM When a/dal niente was introduced, notes with amp2%=0 had to display an envelope
  15921. REM whereas previously amp2%=0 meant "no envelope"
  15922. REM Consequently files predating this change now undesirably display "no envelope" notes as single-phase "dim a niente" notes
  15923. REM To update the old files, use this proc to give a value amp2%=9 to all notes
  15924. PROCwindow(20,60,68,45)
  15925. PRINT' " Do you want to convert all the envelopes"
  15926. PRINT" in the file back to 0 phase envelopes?"
  15927. CASE GET$ OF
  15928. WHEN "Y", "y" :
  15929. FOR voice% = 0 TO (numparts%-1)
  15930. :
  15931. FOR count% = 0 TO numusedcells%(voice%)-1
  15932. number% = array%(count%,2,voice%) DIV 10^2
  15933. array%(count%,2,voice%) = array%(count%,2,voice%) - (number%*100)
  15934. array%(count%,2,voice%) = array%(count%,2,voice%) + 900
  15935. NEXT
  15936. :
  15937. NEXT
  15938. PROCdisplay
  15939. OTHERWISE PROCdisplay
  15940. ENDCASE
  15941. ENDPROC
  15942. :
  15943. REM************************************************
  15944. :
  15945. DEF PROCkeyboardshortcuts
  15946. :
  15947. PROCwindow(2,68,97,2)
  15948. :
  15949. PRINT ' " Menu M Accel/rit by total duration T"
  15950. PRINT ' " Display options O Accel/rit by start/end points E"
  15951. PRINT ' " Move down 1, 3/10, x many, 50 v/vv/vx/v0 Accel/rit between adjacent notes F"
  15952. PRINT ' " Move up 1, 3/10, x many, 50 ^/^^/^x/^0 Starting note for F above 1,2,3..."
  15953. PRINT ' " Move left </<</<9 Random number/with same values n/N"
  15954. PRINT ' " Move right >/>>/>9 Group of durations U"
  15955. PRINT ' " Go to bar B Quickplay top x voices (see M-V-Q) P"
  15956. PRINT ' " Go to SECTION S Quickplay 2nd voice only ;"
  15957. PRINT ' " Display x number of bars D Quickplay 3rd voice only /"
  15958. PRINT ' " Double number of bars + Quickplay top x voices, screen only ^P"
  15959. PRINT ' " Halve number of bars - Quickplay 2nd voice, screen only :"
  15960. PRINT ' " Quick display Q Quickplay 3rd voice, screem only ?"
  15961. PRINT ' " Prev Quick/Quick/Ord Display W Replay R"
  15962. PRINT ' " Top remarks left/right [/] Slavevoice function L"
  15963. PRINT ' " Bottom remarks left/right '/# Edit envelope voice 1, note 1,2,3... ^QWER..."
  15964. PRINT ' " [free keystroke] ~ Edit envelope voice 2, note 1,2,3... ^ASDF..."
  15965. PRINT ' " [free keystroke] @ Edit envelope voice 3, note 1,2,3... ^ZXCV..."
  15966. PRINT ' " Hard copy H Enter last value again Return"
  15967. PRINT ' " Name staves ^V Import ^I"
  15968. PRINT ' " Accel/rit A Group of attacks 0"
  15969. PRINT ' " Group of amplitudes l Group of envelopes J"
  15970. PRINT ' " Show keyboard shortcuts K Move a passage \"
  15971. PRINT ' " Distort attacks/pitches `/`` Move one note ^\"
  15972. PRINT ' " Increment calculator C Copy one note Z"
  15973. PRINT ' " Group of pitches Y Copy a passage X"
  15974. PRINT ' " Copy note x down 1/x stave(s)^x/^xx Quickdisplay x voices 1,2,3..."
  15975. PRINT ' " Delete note 1/x top stave ^O/^Ox Delete sim middle/bottom staves ^K/^M"
  15976. PRINT ' " [free keystroke] # Extract I"
  15977. PRINT ' " Fill gaps with durations G Copy successive voices to same voice S"
  15978. PRINT ' " Add 0/10/20 to copying down [/]/' Input screen voice Return 1/2/3 times"
  15979. PRINT ' " Display all voices ^= Display from which voice down ¬"
  15980. PRINT ' " Quick copy on { Quick copy off }"
  15981. PRINT ' " (press a key to continue)"
  15982. CASE GET$ OF
  15983. WHEN "c", "C" :
  15984. PROCdisplay
  15985. OTHERWISE
  15986. PROCdisplay
  15987. ENDCASE
  15988. :
  15989. ENDPROC
  15990. :
  15991. REM***************************************************************************************
  15992. :
  15993. DEF PROCmoveback
  15994. :
  15995. INPUT " Move back by how many bars "backbybars%
  15996. INPUT " and how many beats "backby%
  15997. backby% = backby%+(backbybars%*960)
  15998. :
  15999. IF backby% = 0 THEN
  16000. COLOUR 1 : PRINT' holdbackby%;"?"
  16001. CASE GET$ OF
  16002. WHEN "N","n" : COLOUR 0 : PROCmoveback
  16003. OTHERWISE backby% = holdbackby%
  16004. ENDCASE
  16005. COLOUR 0
  16006. ENDIF
  16007. :
  16008. holdbackby% = backby%
  16009. beats% = beats% - backby%
  16010. REPEAT
  16011. IF beats% < 0 THEN
  16012. REPEAT
  16013. beats% = 960 + beats%
  16014. bars% -= 1
  16015. UNTIL beats% >= 0
  16016. ENDIF
  16017. :
  16018. ENDPROC
  16019. :
  16020. REM******************************************************************************************
  16021. :
  16022. DEF PROCmoveforward
  16023. :
  16024. INPUT " Move forward by how many bars "backbybars%
  16025. INPUT " and how many beats "backby%
  16026. backby% = backby%+(backbybars%*960)
  16027. :
  16028. IF backby% = 0 THEN
  16029. COLOUR 1 : PRINT' holdbackby%;"?"
  16030. CASE GET$ OF
  16031. WHEN "N","n" : COLOUR 0 : PROCmoveforward
  16032. OTHERWISE backby% = holdbackby%
  16033. ENDCASE
  16034. COLOUR 0
  16035. ENDIF
  16036. :
  16037. holdbackby% = backby%
  16038. beats% = beats% + backby%
  16039. REPEAT
  16040. IF beats% > 960 THEN
  16041. REPEAT
  16042. beats% = beats% - 960
  16043. bars% += 1
  16044. UNTIL beats% <= 960
  16045. ENDIF
  16046. :
  16047. ENDPROC
  16048. :
  16049. REM******************************************************************************************
  16050. :
  16051. DEF PROCpitchstring3
  16052. :
  16053. PROCwindow(20,69,60,55)
  16054. PRINT'" Return a random pitch-class having"
  16055. PRINT" pre-defined its probability "
  16056. PRINT'" Use previous shares or re-define (P/R)? "
  16057. CASE GET$ OF
  16058. WHEN "r","R" :
  16059. :
  16060. totalshares% = 0
  16061. INPUT '" C nat has how many shares "many%
  16062. cnat% = 0 + many% : totalshares% += many%
  16063. INPUT '" C sharp has how many shares "many%
  16064. cshrp% = cnat% + many% : totalshares% += many%
  16065. INPUT '" D nat has how many shares "many%
  16066. dnat% = cshrp% + many% : totalshares% += many%
  16067. INPUT '" D sharp has how many shares "many%
  16068. dshrp% = dnat% + many% : totalshares% += many%
  16069. INPUT '" E nat has how many shares "many%
  16070. enat% = dshrp% + many% : totalshares% += many%
  16071. INPUT '" F nat has how many shares "many%
  16072. fnat% = enat% + many% : totalshares% += many%
  16073. INPUT '" F sharp has how many shares "many%
  16074. fshrp% = fnat% + many% : totalshares% += many%
  16075. INPUT '" G nat has how many shares "many%
  16076. gnat% = fshrp% + many% : totalshares% += many%
  16077. INPUT '" G sharp has how many shares "many%
  16078. gshrp% = gnat% + many% : totalshares% += many%
  16079. INPUT '" A nat has how many shares "many%
  16080. anat% = gshrp% + many% : totalshares% += many%
  16081. INPUT '" A sharp has how many shares "many%
  16082. ashrp% = anat% + many% : totalshares% += many%
  16083. INPUT '" B nat has how many shares "many%
  16084. bnat% = ashrp% + many% : totalshares% += many%
  16085. OTHERWISE
  16086. ENDCASE
  16087. throw% = RND(totalshares%)
  16088. IF throw% > 0 AND throw% <= cnat% THEN note$ = "C nat"
  16089. IF throw% > cnat% AND throw% <= cshrp% THEN note$ = "C sharp"
  16090. IF throw% > cshrp% AND throw% <= dnat% THEN note$ = "D nat"
  16091. IF throw% > dnat% AND throw% <= dshrp% THEN note$ = "D sharp"
  16092. IF throw% > dshrp% AND throw% <= enat% THEN note$ = "E nat"
  16093. IF throw% > enat% AND throw% <= fnat% THEN note$ = "F nat"
  16094. IF throw% > fnat% AND throw% <= fshrp% THEN note$ = "F sharp"
  16095. IF throw% > fshrp% AND throw% <= gnat% THEN note$ = "G nat"
  16096. IF throw% > gnat% AND throw% <= gshrp% THEN note$ = "G sharp"
  16097. IF throw% > gshrp% AND throw% <= anat% THEN note$ = "A nat"
  16098. IF throw% > anat% AND throw% <= ashrp% THEN note$ = "A sharp"
  16099. IF throw% > ashrp% AND throw% <= bnat% THEN note$ = "B nat"
  16100. PRINT ''" note = ";note$
  16101. PRINT '" use this? "
  16102. CASE GET$ OF
  16103. WHEN "n","N" :
  16104. PROCpitchstring3
  16105. OTHERWISE
  16106. ENDCASE
  16107. INPUT'" which octave "octave%
  16108. IF octave% > 0 THEN sameoctave% = octave%
  16109. IF octave% = 0 THEN octave% = sameoctave%
  16110. CASE note$ OF
  16111. WHEN "C nat" : note% = 0 : accid% = 5 : octave% = octave%
  16112. WHEN "C sharp" : note% = 0 : accid% = 9 : octave% = octave%
  16113. WHEN "D nat" : note% = 1 : accid% = 5 : octave% = octave%
  16114. WHEN "D sharp" : note% = 1 : accid% = 9 : octave% = octave%
  16115. WHEN "E nat" : note% = 2 : accid% = 5 : octave% = octave%
  16116. WHEN "F nat" : note% = 3 : accid% = 5 : octave% = octave%
  16117. WHEN "F sharp" : note% = 3 : accid% = 9 : octave% = octave%
  16118. WHEN "G nat" : note% = 4 : accid% = 5 : octave% = octave%
  16119. WHEN "G sharp" : note% = 4 : accid% = 9 : octave% = octave%
  16120. WHEN "A nat" : note% = 5 : accid% = 5 : octave% = octave%
  16121. WHEN "A sharp" : note% = 5 : accid% = 9 : octave% = octave%
  16122. WHEN "B nat" : note% = 6 : accid% = 5 : octave% = octave%
  16123. ENDCASE
  16124. numpitches% = 1 : pitches%(0) = (note%*100)+(accid%*10)+octave%
  16125. PROCinsertpitches
  16126. :
  16127. ENDPROC
  16128. :
  16129. REM******************************************************************
  16130. :
  16131. DEF PROCincrementcalc
  16132. :
  16133. PROCwindow(15,71,89,45)
  16134. CLS
  16135. :
  16136. PRINT'" As it is written, Accel/Rit allows no.attacks and rate"
  16137. PRINT" to be defined in one mode, or start/finish durs in the other"
  16138. PRINT" but not start dur AND a defined rate together (and just to"
  16139. PRINT" complicate things, the resultant rate in fact varies in different"
  16140. PRINT" contexts). If you want, say, a closely defined quickend and"
  16141. PRINT" also a closely defined rate of rit, to get this in accel/Rit"
  16142. PRINT" you will also need to know IN ADVANCE what the end dur will be"
  16143. PRINT" so as to input this when using Accel/Rit in its second mode."
  16144. PRINT" The proceedure below is for finding precisely this."
  16145. :
  16146. count% = 1
  16147. INPUT'" First type the start duration "value
  16148. PRINT'" then the arithmetic rate of increment (not the Accel/Rit rate)"
  16149. INPUT" as a decimal number "factor
  16150. total% = value
  16151. INPUT'" and finally the total duration "reqtotal%
  16152. PRINT'" (then press a key for successive increments)"
  16153. PRINT'count%;". duration = ";value;" total = ";total%
  16154. REPEAT
  16155. CASE GET$ OF
  16156. OTHERWISE
  16157. count% += 1
  16158. value = value * factor
  16159. total% = total% + value
  16160. gap% = reqtotal% - total%
  16161. value% = value DIV 1
  16162. PRINT'count%;". duration = ";value%;" total = ";total%;" (";gap%;" short of required total)"
  16163. ENDCASE
  16164. UNTIL gap% <0
  16165. :
  16166. PRINT'" (to return to display press F)"
  16167. REPEAT
  16168. key$ = GET$
  16169. IF key$ = "f" THEN PROCdisplay ELSE VDU 7
  16170. UNTIL key$ = "f"
  16171. ENDPROC
  16172. :
  16173. REM*********************************************************************************
  16174. :
  16175. DEF PROCchangeclef
  16176. :
  16177. PROCwindow(20,69,65,55)
  16178. INPUT'" Change clef for which voice "itsvoice%
  16179. INPUT'" How many staves does this voice have "numstaves$
  16180. PRINT'" And what is/are its clefs (P/T/B/D or"
  16181. INPUT" PP/PT etc.) "clef$
  16182. :
  16183. insts$(itsvoice%,2) = numstaves$
  16184. insts$(itsvoice%,1) = clef$
  16185. :
  16186. ENDPROC
  16187. :
  16188. REM**********************************************************************************
  16189. :
  16190. DEF PROCrandomassign
  16191. :
  16192. CLS
  16193. INPUT'" between voice (for 1 press 0) "first%
  16194. IF first% = 0 THEN firs% = 1
  16195. INPUT'" and voice (for last press 0) "last%
  16196. IF last% = 0 THEN last% = numparts%
  16197. :
  16198. INPUT '" using how many of the 19 voices "no%
  16199. taken%() = 0
  16200. :
  16201. FOR count% = 1 TO no%
  16202. result$ = "failure"
  16203. REPEAT
  16204. voice% = RND(19)
  16205. IF taken%(voice%) = 0 THEN
  16206. taken%(voice%) = 1
  16207. result$ = "success"
  16208. ENDIF
  16209. UNTIL result$ = "success"
  16210. NEXT
  16211. :
  16212. FOR count% = first% TO last%
  16213. REPEAT
  16214. x% = RND(19)
  16215. UNTIL taken%(x%) = 1
  16216. :
  16217. CASE x% OF
  16218. WHEN 1 : IF type$ = "drums" THEN waveforms$(count%) = "Timpani" ELSE waveforms$(count%) = "RecorderGb"
  16219. WHEN 2 : IF type$ = "drums" THEN waveforms$(count%) = "TimpCresBb" ELSE waveforms$(count%) = "PiccoloE"
  16220. WHEN 3 : IF type$ = "drums" THEN waveforms$(count%) = "TimpRollEb" ELSE waveforms$(count%) = "SaxSoprnoE"
  16221. WHEN 4 : IF type$ = "drums" THEN waveforms$(count%) = "TimpLowBb" ELSE waveforms$(count%) = "SaxEbBarC"
  16222. WHEN 5 : IF type$ = "drums" THEN waveforms$(count%) = "BassDrum" ELSE waveforms$(count%) = "SaxBbTenrE"
  16223. WHEN 7 : IF type$ = "drums" THEN waveforms$(count%) = "BDGatedRev" ELSE waveforms$(count%) = "BugleC"
  16224. WHEN 8 : IF type$ = "drums" THEN waveforms$(count%) = "BDMarching" ELSE waveforms$(count%) = "Trombone1"
  16225. WHEN 9 : IF type$ = "drums" THEN waveforms$(count%) = "BDPiloMute" ELSE waveforms$(count%) = "Trumpet"
  16226. WHEN 10 : IF type$ = "drums" THEN waveforms$(count%) = "CongaHi" ELSE waveforms$(count%) = "EngHornGb"
  16227. WHEN 11 : IF type$ = "drums" THEN waveforms$(count%) = "CongaMid" ELSE waveforms$(count%) = "ClarinetBb"
  16228. WHEN 12 : IF type$ = "drums" THEN waveforms$(count%) = "CongaSmCl" ELSE waveforms$(count%) = "ClarVibEb"
  16229. WHEN 14 : IF type$ = "drums" THEN waveforms$(count%) = "ElecTom1" ELSE waveforms$(count%) = "BassoonEb"
  16230. WHEN 16 : IF type$ = "drums" THEN waveforms$(count%) = "RotoTomRev" ELSE waveforms$(count%) = "FlugelHnEb"
  16231. WHEN 15 : IF type$ = "drums" THEN waveforms$(count%) = "SimmonsBD1" ELSE waveforms$(count%) = "CornetEb"
  16232. WHEN 13 : IF type$ = "drums" THEN waveforms$(count%) = "Snare" ELSE waveforms$(count%) = "TubaGb"
  16233. WHEN 6 : IF type$ = "drums" THEN waveforms$(count%) = "SnareEcho" ELSE waveforms$(count%) = "BassBowAb"
  16234. WHEN 17 : IF type$ = "drums" THEN waveforms$(count%) = "SynTom" ELSE waveforms$(count%) = "JapFlute"
  16235. WHEN 18 : IF type$ = "drums" THEN waveforms$(count%) = "TablaHi" ELSE waveforms$(count%) = "EnsWodAb45"
  16236. WHEN 19 : IF type$ = "drums" THEN waveforms$(count%) = "Tomtom1" ELSE waveforms$(count%) = "Bass"
  16237. ENDCASE
  16238. NEXT
  16239. :
  16240. PROCwindow(20,72,83,25)
  16241. VDU 14
  16242. PRINT'" Current assignations are now "
  16243. PRINT " (press Ctrl-Shift to scroll down) "
  16244. FOR count% = 1 TO numparts%
  16245. IF waveforms$(count%) <> "" THEN
  16246. PRINT'" voice ";count%;
  16247. IF insts$(count%,0)<> "" THEN PRINT " (";insts$(count%,0);")";
  16248. PRINT " - ";waveforms$(count%)
  16249. ENDIF
  16250. NEXT
  16251. VDU 15
  16252. PRINT'" Do you want to keep these, reassign,"
  16253. PRINT " use WaveSynth-Beep defaults, "
  16254. PRINT " randomly assign sustaining/dry instruments/drums "
  16255. PRINT " to all staves, or assign in groups "
  16256. PRINT " (K/R/W/S/D/M/G) "
  16257. CASE GET$ OF
  16258. WHEN "R","r" : defaultvoices$ = "n" : PROCassignvoices : PROCdisplay
  16259. WHEN "W","w" : defaultvoices$ = "y" : PROCassignvoices : PROCdisplay
  16260. WHEN "K","k" : defaultvoices$ = "n" : PROCdisplay
  16261. WHEN "S","s" : defaultvoices$ = "n" : type$ = "sustaining" : PROCrandomassign : PROCdisplay
  16262. WHEN "M","m" : defaultvoices$ = "n" : type$ = "drums" : PROCrandomassign : PROCdisplay
  16263. WHEN "D","d" : defaultvoices$ = "n" : PROCrandomdry : PROCdisplay
  16264. WHEN "G","g" : defaultvoices$ = "n" : PROCgroupassign : PROCdisplay
  16265. ENDCASE
  16266. :
  16267. ENDPROC
  16268. :
  16269. REM************************************************************************8
  16270. :
  16271. DEF PROCrandomdry
  16272. :
  16273. CLS
  16274. PRINT'" Group A = 'ch' sounds "
  16275. PRINT " Group B = 'donk' sounds "
  16276. PRINT " Group C = pizz sounds "
  16277. PRINT'" Select a group or to mix A+B press D, to mix A+C press E "
  16278. PRINT " to mix B+C press F, or to mix all three press G "
  16279. CASE GET$ OF
  16280. WHEN "A","a" : choice$ = "A"
  16281. WHEN "B","b" : choice$ = "B"
  16282. WHEN "C","c" : choice$ = "C"
  16283. WHEN "D","d" : choice$ = "D"
  16284. WHEN "E","e" : choice$ = "E"
  16285. WHEN "F","f" : choice$ = "F"
  16286. OTHERWISE choice$ = "G"
  16287. ENDCASE
  16288. :
  16289. INPUT'" between voice (for first press 0) "first%
  16290. IF first% = 0 THEN first% = 1
  16291. INPUT'" and voice (for last press 0) "last%
  16292. IF last% = 0 THEN last% = numparts%
  16293. :
  16294. FOR count% = first% TO last%
  16295. waveforms$(count%) = "empty"
  16296. NEXT
  16297. :
  16298. FOR count% = first% TO last%
  16299. :
  16300. REPEAT
  16301. x% = RND(19)
  16302. :
  16303. CASE x% OF
  16304. WHEN 1 : IF choice$ = "A" OR choice$ = "D" OR choice$ = "E" OR choice$ = "G" THEN waveforms$(count%) = "GuiroFast"
  16305. WHEN 2 : IF choice$ = "A" OR choice$ = "D" OR choice$ = "E" OR choice$ = "G" THEN waveforms$(count%) = "Cachichi1"
  16306. WHEN 3 : IF choice$ = "A" OR choice$ = "D" OR choice$ = "E" OR choice$ = "G" THEN waveforms$(count%) = "Cabasa"
  16307. WHEN 4 : IF choice$ = "A" OR choice$ = "D" OR choice$ = "E" OR choice$ = "G" THEN waveforms$(count%) = "HiHat"
  16308. WHEN 5 : IF choice$ = "A" OR choice$ = "D" OR choice$ = "E" OR choice$ = "G" THEN waveforms$(count%) = "HiHatFoot"
  16309. WHEN 7 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "TablaHi"
  16310. WHEN 8 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "Clave"
  16311. WHEN 9 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "AgogoWood"
  16312. WHEN 10 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "CongaHi"
  16313. WHEN 11 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "CowBell"
  16314. WHEN 12 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" waveforms$(count%) = "AgogoAfric"
  16315. WHEN 14 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "Vibe"
  16316. WHEN 16 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "Xylophone"
  16317. WHEN 15 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "AcouBass"
  16318. WHEN 13 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "AcuBassAb1"
  16319. WHEN 6 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "AcGuitar1"
  16320. WHEN 17 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "Bass"
  16321. WHEN 18 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "AcouGtr2B"
  16322. WHEN 19 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "GtrDobroB"
  16323. REM another possibility is Harp1
  16324. ENDCASE
  16325. :
  16326. UNTIL waveforms$(count%) <> "empty"
  16327. :
  16328. NEXT
  16329. :
  16330. PROCwindow(20,72,83,25)
  16331. VDU 14
  16332. PRINT'" Current assignations are now "
  16333. PRINT " (press Ctrl-Shift to scroll down) "
  16334. FOR count% = 1 TO numparts%
  16335. IF waveforms$(count%) <> "" THEN
  16336. PRINT'" voice ";count%;
  16337. IF insts$(count%,0)<> "" THEN PRINT " (";insts$(count%,0);")";
  16338. PRINT " - ";waveforms$(count%)
  16339. ENDIF
  16340. NEXT
  16341. VDU 15
  16342. PRINT'" Do you want to keep these, reassign,"
  16343. PRINT " use WaveSynth-Beep defaults, "
  16344. PRINT " randomly assign sustaining/dry instruments/drums "
  16345. PRINT " to all staves, or assign in groups "
  16346. PRINT " (K/R/W/S/D/M/G) "
  16347. CASE GET$ OF
  16348. WHEN "R","r" : defaultvoices$ = "n" : PROCassignvoices : PROCdisplay
  16349. WHEN "W","w" : defaultvoices$ = "y" : PROCassignvoices : PROCdisplay
  16350. WHEN "K","k" : defaultvoices$ = "n" : PROCdisplay
  16351. WHEN "S","s" : defaultvoices$ = "n" : type$ = "sustaining" : PROCrandomassign : PROCdisplay
  16352. WHEN "M","m" : defaultvoices$ = "n" : type$ = "drums" : PROCrandomassign : PROCdisplay
  16353. WHEN "D","d" : defaultvoices$ = "n" : PROCrandomdry : PROCdisplay
  16354. WHEN "G","g" : defaultvoices$ = "n" : PROCgroupassign : PROCdisplay
  16355. ENDCASE
  16356. :
  16357. ENDPROC
  16358. :
  16359. REM***********************************************************************************
  16360. :
  16361. DEF PROCgroupassign
  16362. :
  16363. CLS
  16364. PRINT'" Groups of voices ranging downwards are to "
  16365. PRINT " take the waveform of the first in the group "
  16366. INPUT " in batches of how many voices "gap%
  16367. INPUT'" To apply between voice "low%
  16368. INPUT " and voice "high%
  16369. :
  16370. FOR count% = 1 TO numparts%
  16371. :
  16372. IF count% >= low% AND count% <= high% THEN
  16373. :
  16374. x% = 0
  16375. REPEAT
  16376. :
  16377. IF count% > (low%+(gap%*x%)) AND count% < (low%+(gap%*(x%+1))) THEN
  16378. number% = low%+(gap%*x%)
  16379. waveforms$(count%) = waveforms$(number%)
  16380. ENDIF
  16381. :
  16382. x% = x%+1
  16383. UNTIL (low%+(gap%*x%)) > high%
  16384. :
  16385. ENDIF
  16386. :
  16387. NEXT
  16388. :
  16389. PROCwindow(20,72,83,25)
  16390. VDU 14
  16391. PRINT'" Current assignations are now "
  16392. PRINT " (press Ctrl-Shift to scroll down) "
  16393. FOR count% = 1 TO numparts%
  16394. IF waveforms$(count%) <> "" THEN
  16395. PRINT'" voice ";count%;
  16396. IF insts$(count%,0)<> "" THEN PRINT " (";insts$(count%,0);")";
  16397. PRINT " - ";waveforms$(count%)
  16398. ENDIF
  16399. NEXT
  16400. VDU 15
  16401. PRINT'" Do you want to keep these, reassign,"
  16402. PRINT " use WaveSynth-Beep defaults, "
  16403. PRINT " randomly assign sustaining/dry instruments "
  16404. PRINT " to all staves, or assign in groups "
  16405. PRINT " (K/R/W/S/D/G) "
  16406. CASE GET$ OF
  16407. WHEN "R","r" : defaultvoices$ = "n" : PROCassignvoices : PROCdisplay
  16408. WHEN "W","w" : defaultvoices$ = "y" : PROCassignvoices : PROCdisplay
  16409. WHEN "K","k" : defaultvoices$ = "n" : PROCdisplay
  16410. WHEN "S","s" : defaultvoices$ = "n" : PROCrandomassign : PROCdisplay
  16411. WHEN "D","d" : defaultvoices$ = "n" : PROCrandomdry : PROCdisplay
  16412. WHEN "G","g" : defaultvoices$ = "n" : PROCgroupassign : PROCdisplay
  16413. ENDCASE
  16414. :
  16415. ENDPROC
  16416. :
  16417. REM***********************************************************************************
  16418. :
  16419. DEF PROCpitchstring4
  16420. :
  16421. CLS
  16422. INPUT'" How many attacks "many%
  16423. PRINT'" the first note is ";
  16424. COLOUR 1
  16425. CASE GET$ OF
  16426. WHEN "c" : note1% = 0 : PRINT "C"
  16427. WHEN "d" : note1% = 1 : PRINT "D"
  16428. WHEN "e" : note1% = 2 : PRINT "E"
  16429. WHEN "f" : note1% = 3 : PRINT "F"
  16430. WHEN "g" : note1% = 4 : PRINT "G"
  16431. WHEN "a" : note1% = 5 : PRINT "A"
  16432. WHEN "b" : note1% = 6 : PRINT "B"
  16433. ENDCASE
  16434. COLOUR 0
  16435. PRINT " accidental ";
  16436. COLOUR 1
  16437. CASE GET$ OF
  16438. WHEN "1" : accid1% = 1 : PRINT " flat"
  16439. WHEN "2" : accid1% = 2 : PRINT " 3/8 flat"
  16440. WHEN "3" : accid1% = 3 : PRINT " 1/4 flat"
  16441. WHEN "4" : accid1% = 4 : PRINT " 1/8 flat"
  16442. WHEN "5" : accid1% = 5 : PRINT " natural"
  16443. WHEN "6" : accid1% = 6 : PRINT " 1/8 sharp"
  16444. WHEN "7" : accid1% = 7 : PRINT " 1/4 sharp"
  16445. WHEN "8" : accid1% = 8 : PRINT " 3/8 sharp"
  16446. WHEN "9" : accid1% = 9 : PRINT " sharp"
  16447. ENDCASE
  16448. COLOUR 0
  16449. PRINT " octave ";
  16450. COLOUR 1
  16451. CASE GET$ OF
  16452. WHEN "1" : octave1% = 1 : PRINT " octave 1"
  16453. WHEN "2" : octave1% = 2 : PRINT " octave 2"
  16454. WHEN "3" : octave1% = 3 : PRINT " octave 3"
  16455. WHEN "4" : octave1% = 4 : PRINT " octave 4"
  16456. WHEN "5" : octave1% = 5 : PRINT " octave 5"
  16457. WHEN "6" : octave1% = 6 : PRINT " octave 6"
  16458. WHEN "7" : octave1% = 7 : PRINT " octave 7"
  16459. WHEN "8" : octave1% = 8 : PRINT " octave 8"
  16460. ENDCASE
  16461. COLOUR 0
  16462. PRINT'" and the second note is ";
  16463. COLOUR 1
  16464. CASE GET$ OF
  16465. WHEN "c" : note2% = 0 : PRINT "C"
  16466. WHEN "d" : note2% = 1 : PRINT "D"
  16467. WHEN "e" : note2% = 2 : PRINT "E"
  16468. WHEN "f" : note2% = 3 : PRINT "F"
  16469. WHEN "g" : note2% = 4 : PRINT "G"
  16470. WHEN "a" : note2% = 5 : PRINT "A"
  16471. WHEN "b" : note2% = 6 : PRINT "B"
  16472. ENDCASE
  16473. COLOUR 0
  16474. PRINT " accidental ";
  16475. COLOUR 1
  16476. CASE GET$ OF
  16477. WHEN "1" : accid2% = 1 : PRINT " flat"
  16478. WHEN "2" : accid2% = 2 : PRINT " 3/8 flat"
  16479. WHEN "3" : accid2% = 3 : PRINT " 1/4 flat"
  16480. WHEN "4" : accid2% = 4 : PRINT " 1/8 flat"
  16481. WHEN "5" : accid2% = 5 : PRINT " natural"
  16482. WHEN "6" : accid2% = 6 : PRINT " 1/8 sharp"
  16483. WHEN "7" : accid2% = 7 : PRINT " 1/4 sharp"
  16484. WHEN "8" : accid2% = 8 : PRINT " 3/8 sharp"
  16485. WHEN "9" : accid2% = 9 : PRINT " sharp"
  16486. ENDCASE
  16487. COLOUR 0
  16488. PRINT " octave ";
  16489. COLOUR 1
  16490. CASE GET$ OF
  16491. WHEN "1" : octave2% = 1 : PRINT " octave 1"
  16492. WHEN "2" : octave2% = 2 : PRINT " octave 2"
  16493. WHEN "3" : octave2% = 3 : PRINT " octave 3"
  16494. WHEN "4" : octave2% = 4 : PRINT " octave 4"
  16495. WHEN "5" : octave2% = 5 : PRINT " octave 5"
  16496. WHEN "6" : octave2% = 6 : PRINT " octave 6"
  16497. WHEN "7" : octave2% = 7 : PRINT " octave 7"
  16498. WHEN "8" : octave2% = 8 : PRINT " octave 8"
  16499. ENDCASE
  16500. COLOUR 0
  16501. tick% = 1
  16502. FOR count% = 1 TO many%
  16503. IF tick% = 1 THEN
  16504. pitches%(count%-1) = (note1%*100)+(accid1%*10)+octave1%
  16505. ELSE
  16506. pitches%(count%-1) = (note2%*100)+(accid2%*10)+octave2%
  16507. ENDIF
  16508. IF tick% = 1 THEN tick% = 2 ELSE tick% = 1
  16509. NEXT
  16510. :
  16511. numpitches% = many%
  16512. PROCinsertpitches
  16513. :
  16514. ENDPROC
  16515. :
  16516. REM*********************************************************************************
  16517. :
  16518. DEF PROCcopyonenote
  16519. :
  16520. repeatposit$ = "n"
  16521. IF distort$ = "OFF" THEN dothis$ = "YES"
  16522. IF distort$ = "ON" THEN
  16523. IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
  16524. ENDIF
  16525. copymove$ = "C" : savevoice$ = "N" : justone$ = "y"
  16526. :
  16527. PROCcopy2
  16528. :
  16529. justone$ = "n"
  16530. :
  16531. ENDPROC
  16532. :
  16533. REM***********************************************************************************
  16534. :
  16535. DEF PROCcopygroupofnotes
  16536. :
  16537. repeatposit$ = "n"
  16538. IF distort$ = "OFF" THEN dothis$ = "YES"
  16539. IF distort$ = "ON" THEN
  16540. IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
  16541. ENDIF
  16542. :
  16543. copymove$ = "C" : savevoice$ = "N" : justone$ = "n"
  16544. :
  16545. PROCcopy2
  16546. :
  16547. ENDPROC
  16548. :
  16549. REM*************************************************************************************
  16550. :
  16551. DEF PROCcopydownwards
  16552. :
  16553. repeatposit$ = "n"
  16554. IF distort$ = "OFF" THEN dothis$ = "YES"
  16555. IF distort$ = "ON" THEN
  16556. IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
  16557. ENDIF
  16558. copymove$ = "C" : savevoice$ = "N" : justone$ = "y"
  16559. :
  16560. voice% = displayvoices%(startv%)
  16561. voice% = voice%-1
  16562. :
  16563. along% = copydownwards%
  16564. :
  16565. along%-=1
  16566. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  16567. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  16568. holdbar% = copystartbar%
  16569. holdbeat% = copystartbeat%
  16570. :
  16571. copyendbar% = copystartbar%
  16572. copyendbeat% = copystartbeat%
  16573. :
  16574. value% = (copystartbar%*10^3)+copystartbeat%
  16575. IF value% <= array%(0,0,voice%)DIV10^3 THEN
  16576. startatcell% = 0
  16577. ELSE
  16578. PROCsearch(value%)
  16579. startatcell% = startcell%
  16580. ENDIF
  16581. IF copyendbar% = 0 THEN
  16582. endatcell% = numusedcells%(voice%) - 1
  16583. ELSE
  16584. value% = (copyendbar%*10^3)+copyendbeat%
  16585. IF value% >= array%(numusedcells%(voice%)-1,0,voice%)DIV10^3 THEN
  16586. endatcell% = numusedcells%(voice%) - 1
  16587. ELSE
  16588. PROCsearch(value%)
  16589. IF shunt$ = "N" THEN endatcell% = startcell% ELSE endatcell% = startcell% - 1
  16590. ENDIF
  16591. ENDIF
  16592. :
  16593. manyattacks% = endatcell% - startatcell% + 1
  16594. REM create 'gap' between beat-of-bar and first actual attack
  16595. carrybars% = (array%(startatcell%,0,voice%)DIV10^6)-copystartbar%
  16596. carrybeats% = ((array%(startatcell%,0,voice%)DIV10^3)MOD10^3)-copystartbeat%
  16597. attacks1%(0) = (carrybars%*960)+carrybeats%
  16598. :
  16599. IF copymove$ = "C" OR copymove$ = "M" THEN
  16600. FOR count% = 0 TO (manyattacks%-1)
  16601. IF count% > 0 THEN
  16602. carrybars% = (array%(startatcell%+count%,0,voice%)DIV10^6)-(array%(startatcell%+count%-1,0,voice%)DIV10^6)
  16603. carrybeats% = ((array%(startatcell%+count%,0,voice%)DIV10^3)MOD10^3)-((array%(startatcell%+count%-1,0,voice%)DIV10^3)MOD10^3)
  16604. attacks1%(count%) = attacks1%(count%-1) + ((carrybars%*960)+carrybeats%)
  16605. ENDIF
  16606. :
  16607. pitches%(count%) = array%(startatcell%+count%,0,voice%)MOD10^3
  16608. dur% = (array%(startatcell%+count%,1,voice%)DIV10)MOD10^3
  16609. brrr% = array%(startatcell%+count%,0,voice%)DIV10^6 : PROCreconvertdur
  16610. durations%(count%) = dur%
  16611. amplitudes%(count%) = (array%(startatcell%+count%,1,voice%))MOD10
  16612. envelopes%(count%) = (array%(startatcell%+count%,2,voice%))DIV10^2
  16613. glissandos%(count%) = array%(startatcell%+count%,1,voice%)DIV10^4
  16614. inflections%(count%) = array%(startatcell%+count%,2,voice%)MOD10^2
  16615. NEXT
  16616. ELSE PROCextract
  16617. ENDIF
  16618. :
  16619. IF copymove$ = "M" THEN
  16620. numnotes% = manyattacks% : startcell% = startatcell%
  16621. FOR count% = startcell% TO (startcell%+(numnotes%-1))
  16622. FOR counter% = 0 TO 1
  16623. barno% = (array%(count%,0,voice%)DIV10^6)-counter%
  16624. beatnum% = ((array%(count%,0,voice%)DIV10^3)MOD10^3)
  16625. :
  16626. group1start% = (disarray%(barno%,0,voice%)DIV10^7)*beatfactor%
  16627. group1end% = group1start% + (((disarray%(barno%,0,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
  16628. IF beatnum%+(960*counter%) >= group1start% AND beatnum%+(960*counter%) <= group1end% THEN
  16629. disarray%(barno%,0,voice%) = disarray%(barno%,0,voice%)MOD10^3
  16630. ENDIF
  16631. :
  16632. group2start% = ((disarray%(barno%,0,voice%)DIV10)MOD10^2)*beatfactor%
  16633. group2end% = group2start%+((((disarray%(barno%,0,voice%)MOD10)*10)+(disarray%(barno%,1,voice%)DIV10^8))*beatfactor%)-1
  16634. IF beatnum%+(960*counter%) >= group2start% AND beatnum%+(960*counter%) <= group2end% THEN
  16635. disarray%(barno%,0,voice%) = (disarray%(barno%,0,voice%)DIV10^3)*10^3
  16636. disarray%(barno%,1,voice%) = disarray%(barno%,1,voice%)MOD10^6
  16637. ENDIF
  16638. group3start%=((disarray%(barno%,1,voice%)DIV10^4)MOD10^2)*beatfactor%
  16639. group3end% = group3start% + (((disarray%(barno%,1,voice%)MOD10^4)DIV10^2)*beatfactor%)-1
  16640. IF beatnum%+(960*counter%) >= group3start% AND beatnum%+(960*counter%) <= group3end% THEN
  16641. disarray%(barno%,1,voice%) = (disarray%(barno%,1,voice%)DIV10^6)*10^6
  16642. ENDIF
  16643. group4start% = (disarray%(barno%,2,voice%)DIV10^7)*beatfactor%
  16644. group4end% = group4start%+(((disarray%(barno%,2,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
  16645. IF beatnum%+(960*counter%) >= group4start% AND beatnum%+(960*counter%) <= group4end% THEN
  16646. disarray%(barno%,2,voice%) = disarray%(barno%,2,voice%)MOD10^3
  16647. ENDIF
  16648. group5start% = ((disarray%(barno%,2,voice%)MOD10^3)DIV10)*beatfactor%
  16649. group5end% = group5start%+((((disarray%(barno%,2,voice%)MOD10)*10)+(disarray%(barno%,3,voice%)DIV10^8))*beatfactor%)-1
  16650. IF beatnum%+(960*counter%) >= group5start% AND beatnum%+(960*counter%) <= group5end% THEN
  16651. disarray%(barno%,2,voice%) = (disarray%(barno%,2,voice%)DIV10^3)*10^3
  16652. disarray%(barno%,3,voice%) = disarray%(barno%,3,voice%)MOD10^6
  16653. ENDIF
  16654. group6start% = ((disarray%(barno%,3,voice%)DIV10^4)MOD10^2)*beatfactor%
  16655. group6end% = group6start% + (((disarray%(barno%,3,voice%)DIV10^2)MOD10^2)*beatfactor%)-1
  16656. IF beatnum%+(960*counter%) >= group6start% AND beatnum%+(960*counter%) <= group6end% THEN
  16657. disarray%(barno%,3,voice%)=(disarray%(barno%,3,voice%)DIV10^6)*10^6
  16658. ENDIF
  16659. NEXT
  16660. :
  16661. NEXT
  16662. PROCshuntleft(startcell%,numnotes%)
  16663. ENDIF
  16664. :
  16665. numpitches% = manyattacks% : method$ = "raw" : copyit$ = "ON" : copydownwards$ = "y"
  16666. :
  16667. PROCinsertattacks
  16668. :
  16669. justone$ = "n" : copydownwards$ = "n"
  16670. ENDPROC
  16671. :
  16672. REM****************************************************************
  16673. :
  16674. DEF PROCdeleteone
  16675. :
  16676. CASE deleteone$ OF
  16677. WHEN "top" :
  16678. voice% = 1
  16679. voice% = displayvoices%(startv%+voice%-1)
  16680. voice% -= 1
  16681. WHEN "middle" :
  16682. voice% = 2
  16683. voice% = displayvoices%(startv%+voice%-1)
  16684. voice% -= 1
  16685. WHEN "bottom" :
  16686. voice% = 3
  16687. voice% = displayvoices%(startv%+voice%-1)
  16688. voice% -= 1
  16689. ENDCASE
  16690. :
  16691. numnotes% = 1
  16692. :
  16693. incre$ = INKEY$(100)
  16694. IF incre$ <> "" THEN
  16695. CASE incre$ OF
  16696. WHEN "!" : along% = 1
  16697. WHEN """" : along% = 2
  16698. WHEN "£" : along% = 3
  16699. WHEN "$" : along% = 4
  16700. WHEN "%" : along% = 5
  16701. WHEN "^" : along% = 6
  16702. WHEN "&" : along% = 7
  16703. WHEN "*" : along% = 8
  16704. WHEN "(" : along% = 9
  16705. WHEN ")" : along% = 10
  16706. ENDCASE
  16707. ELSE along% = 1
  16708. ENDIF
  16709. :
  16710. IF addten$ = "y" THEN along% +=10
  16711. IF addten$ = "twenty" THEN along% +=20
  16712. :
  16713. along%-=1
  16714. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  16715. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  16716. beats% = copystartbeat%
  16717. PROCalterbeats
  16718. start% = (copystartbar%*(10^3))+beats%
  16719. PROCsearch(start%)
  16720. PROCshuntleft(startcell%,numnotes%)
  16721. :
  16722. deleteone$ = "none"
  16723. ENDPROC
  16724. :
  16725. REM**********************************************************************
  16726. :
  16727. DEF PROCpitchstring5
  16728. :
  16729. PROCwindow(20,65,60,55)
  16730. PRINT'" This function returns a string"
  16731. PRINT" of pitches which recycles an"
  16732. PRINT" ascending chromatic scale,"
  16733. PRINT" useful for subsequently"
  16734. PRINT" extracting certain pitches"
  16735. INPUT'" How many semitones in the scale "numsemis%
  16736. INPUT'" How many pitches in the string "numpitches%
  16737. counter% = 0
  16738. :
  16739. FOR count% = 0 TO numpitches%-1
  16740. counter% += 1
  16741. CASE counter% OF
  16742. WHEN 1 : pitches%(count%) = 54
  16743. WHEN 2 : pitches%(count%) = 94
  16744. WHEN 3 : pitches%(count%) = 154
  16745. WHEN 4 : pitches%(count%) = 214
  16746. WHEN 5 : pitches%(count%) = 254
  16747. WHEN 6 : pitches%(count%) = 354
  16748. WHEN 7 : pitches%(count%) = 394
  16749. WHEN 8 : pitches%(count%) = 454
  16750. WHEN 9 : pitches%(count%) = 514
  16751. WHEN 10 : pitches%(count%) = 554
  16752. WHEN 11 : pitches%(count%) = 614
  16753. WHEN 12 : pitches%(count%) = 654
  16754. ENDCASE
  16755. :
  16756. IF counter% = numsemis% THEN counter% = 0
  16757. :
  16758. NEXT
  16759. :
  16760. PROCinsertpitches
  16761. ENDPROC
  16762. :
  16763. ******************************************
  16764. :
  16765. DEF PROCdurationsbetween
  16766. :
  16767. IF numdurations% = 111 THEN mode$ = "legato"
  16768. IF numdurations% = 222 THEN mode$ = "mezzostacc"
  16769. PROCwindow(20,69,60,55)
  16770. CLS
  16771. :
  16772. IF screenvoices$ = "n" THEN
  16773. INPUT' " Which voice/strand (0 = top) "voice%
  16774. IF voice% = 0 THEN PROCpressenter
  16775. ELSE
  16776. PRINT'" Which screen voice "
  16777. CASE GET$ OF
  16778. WHEN "1" : voice% = 1
  16779. WHEN "2" : voice% = 2
  16780. WHEN "3" : voice% = 3
  16781. OTHERWISE PROCpressenter
  16782. ENDCASE
  16783. ENDIF
  16784. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  16785. voice% -= 1
  16786. IF voice% >= 0 THEN samevoice% = voice%
  16787. IF voice% = -1 THEN voice% = samevoice%
  16788. :
  16789. PRINT'" How many gaps to be filled "
  16790. INPUT " (for 1 press 0) "numdurations%
  16791. PRINT'" starting at note number "
  16792. INPUT " (for 1 press 0) "note%
  16793. IF note% = 0 THEN note% = 1
  16794. :
  16795. PROCnewnotereception(voice%,startbar%,0,0,0,0,0,0,0)
  16796. CASE option% OF
  16797. WHEN 1 : startcell% = 0
  16798. WHEN 2 : startcell% = numusedcells%(voice%)
  16799. WHEN 3 : startcell% = 0
  16800. WHEN 4 : start% = firstbar%*10^3 : PROCsearch(start%)
  16801. ENDCASE
  16802. silly% = startcell%+note%-1
  16803. :
  16804. FOR count% = 0 TO numdurations%-1
  16805. beatdiff% = ((array%(silly%+1+count%,0,voice%)DIV10^3)MOD10^3)-((array%(silly%+count%,0,voice%)DIV10^3)MOD10^3)
  16806. beatdiff%+=(((array%(silly%+1+count%,0,voice%)DIV10^6)-(array%(silly%+count%,0,voice%)DIV10^6))*960)
  16807. CASE mode$ OF
  16808. WHEN "legato" :
  16809. durations%(count%+1) = beatdiff%
  16810. OTHERWISE
  16811. durations%(count%+1) = beatdiff%/2
  16812. ENDCASE
  16813. :
  16814. NEXT
  16815. :
  16816. along% = note%-1
  16817. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  16818. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  16819. beats% = copystartbeat%
  16820. PROCalterbeats
  16821. startat% = (copystartbar%*(10^3))+beats%
  16822. :
  16823. PROCsearch(startat%)
  16824. shunt$ = "N"
  16825. :
  16826. FOR count% = startcell% TO (startcell%+(numdurations%-1))
  16827. PROCcellfill(count%,voice%,999,999,999,9,999,durations%(count%-startcell%+1),99,99)
  16828. NEXT
  16829. :
  16830. PROCdisplay
  16831. :
  16832. ENDPROC
  16833. :
  16834. REM************************************************************************88
  16835. :
  16836. DEF PROCshortmove
  16837. :
  16838. ON : PROCwindow(20,69,60,55)
  16839. CLS
  16840. repeatposit$ = "n"
  16841. IF distort$ = "OFF" THEN dothis$ = "YES"
  16842. IF distort$ = "ON" THEN
  16843. IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
  16844. ENDIF
  16845. :
  16846. IF dothis$ = "YES" THEN
  16847. copymove$ = "M" : savevoice$ = "N" : justone$ = "n"
  16848. ELSE copymove$ = "C"
  16849. ENDIF
  16850. :
  16851. PROCcopy2
  16852. IF quickextract$ = "y" THEN quickextract$ = "n"
  16853. :
  16854. ENDPROC
  16855. :
  16856. REM***********************************************************************8
  16857. :
  16858. DEF PROCshortmoveone
  16859. :
  16860. ON : PROCwindow(20,69,60,55)
  16861. CLS
  16862. repeatposit$ = "n"
  16863. IF distort$ = "OFF" THEN dothis$ = "YES"
  16864. IF distort$ = "ON" THEN
  16865. IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
  16866. ENDIF
  16867. :
  16868. IF dothis$ = "YES" THEN
  16869. copymove$ = "M" : savevoice$ = "N" : justone$ = "y"
  16870. ELSE copymove$ = "C"
  16871. ENDIF
  16872. :
  16873. PROCcopy2
  16874. IF quickextract$ = "y" THEN quickextract$ = "n"
  16875. :
  16876. ENDPROC
  16877. :
  16878. REM************************************************************************
  16879. :
  16880. DEF PROCcopysuccessively
  16881. :
  16882. IF succfirsttime$ = "y" THEN
  16883. INPUT'" Which voice? (0 = top) "voice%
  16884. IF voice% = 0 THEN PROCpressenter
  16885. fromvoice% = voice%
  16886. succfirsttime$ = "n"
  16887. succcounter% = 0
  16888. ELSE succcounter% += 1
  16889. ENDIF
  16890. :
  16891. IF succcounter% > 0 THEN
  16892. :
  16893. fromvoice% += 1 : voice% = fromvoice%
  16894. PRINT' " That's voice ";voice%;"?"
  16895. PRINT' " (0 = yes/C = cancel successive copying) "
  16896. CASE GET$ OF
  16897. WHEN "C","c" :
  16898. copysuccessively$ = "n" : succfirsttime$ = "y" : PROCdisplay
  16899. OTHERWISE
  16900. ENDCASE
  16901. :
  16902. ENDIF
  16903. :
  16904. ENDPROC
  16905. :
  16906. REM***************************************************************************
  16907. :
  16908. DEF PROCpressenter
  16909. :
  16910. COLOUR 1
  16911. incre$ = INKEY$(50)
  16912. IF incre$ = "" THEN
  16913. IF screenvoices$ = "y" THEN
  16914. voice% = 1 : PRINT ' voice%
  16915. ELSE
  16916. voice% = displayvoices%(startv%) : PRINT ' voice%
  16917. ENDIF
  16918. ELSE
  16919. incre$ = INKEY$(50)
  16920. IF screenvoices$ = "y" THEN
  16921. IF incre$ = "" THEN voice% = 2 ELSE voice% = 3
  16922. PRINT ' voice%
  16923. ELSE
  16924. IF incre$ = "" THEN voice% = displayvoices%(startv%+1) ELSE voice% = displayvoices%(startv%+2)
  16925. PRINT ' voice%
  16926. ENDIF
  16927. ENDIF
  16928. COLOUR 0
  16929. :
  16930. ENDPROC
  16931. :
  16932. REM***************************************************************************
  16933. :
  16934. DEF PROCfornexttime
  16935. :
  16936. IF housekeepingdimmed$ = "n" THEN
  16937. DIM lastfilename$(9)
  16938. ENDIF
  16939. *Dir HostFS::HardDisc4.$.CAC.Files
  16940. thisfilename$ = "housekeeping2"
  16941. channel = OPENOUT thisfilename$
  16942. FOR count% = 1 TO 9
  16943. PRINT#channel, lastfilename$(count%)
  16944. NEXT
  16945. CLOSE#channel
  16946. *NoDir
  16947. :
  16948. ENDPROC
  16949. :
  16950. REM****************************************************************************
  16951. :
  16952. DEF PROChousekeeping
  16953. :
  16954. IF housekeepingdimmed$ = "n" THEN
  16955. DIM lastfilename$(9) : housekeepingdimmed$ = "y"
  16956. ENDIF
  16957. *Dir HostFS::HardDisc4.$.CAC.Files
  16958. thisfilename$ = "housekeeping2"
  16959. channel = OPENIN thisfilename$
  16960. REPEAT
  16961. FOR count% = 1 TO 9
  16962. INPUT#channel, lastfilename$(count%)
  16963. NEXT
  16964. UNTIL EOF#channel
  16965. CLOSE#channel
  16966. *NoDir
  16967. :
  16968. ENDPROC
  16969. :
  16970. REM*****************************************************************************
  16971. :
  16972. DEF PROCshuntlastfilename
  16973. :
  16974. FOR count% = 9 TO 2 STEP -1
  16975. lastfilename$(count%) = lastfilename$(count%-1)
  16976. NEXT
  16977. lastfilename$(1) = filename$
  16978. :
  16979. ENDPROC
  16980. :
  16981. REM*****************************************************************************
  16982. :
  16983. DEF PROCspecialshunt
  16984. :
  16985. FOR count% = theone% TO 2 STEP -1
  16986. lastfilename$(count%) = lastfilename$(count%-1)
  16987. NEXT
  16988. lastfilename$(1) = filename$
  16989. :
  16990. ENDPROC
  16991. :
  16992. REM******************************************************************************
  16993. :
  16994. DEF PROCroguenotes
  16995. :
  16996. FOR count% = 0 TO numparts%-1
  16997. array%(numusedcells%(count%),0,count%) = 0
  16998. NEXT
  16999. :
  17000. PROCdisplay
  17001. :
  17002. ENDPROC
  17003. :
  17004. REM*******************************************************************
  17005. :
  17006. DEF PROCnotenumberfreq
  17007. :
  17008. CASE nosevery% OF
  17009. WHEN 1 :
  17010. IF howmany% >= startnos% THEN printnumber$ = "y" ELSE printnumber$ = "n"
  17011. WHEN 2 :
  17012. howmany = howmany%/2
  17013. howmany = (howmany * 10) MOD 10
  17014. IF howmany = 5 THEN printnumber$ = "n" ELSE printnumber$ = "y"
  17015. IF howmany% < startnos% THEN printnumber$ = "n"
  17016. WHEN 4 :
  17017. howmany = howmany%/4
  17018. howmany = (howmany * 10) MOD 10
  17019. IF howmany = 2 OR howmany = 5 OR howmany = 7 THEN printnumber$ = "n" ELSE printnumber$ = "y"
  17020. IF howmany% < startnos% THEN printnumber$ = "n"
  17021. WHEN 10 :
  17022. IF howmany% MOD 10 = 0 THEN printnumber$ = "y" ELSE printnumber$ = "n"
  17023. IF howmany% < startnos% THEN printnumber$ = "n"
  17024. ENDCASE
  17025. :
  17026. ENDPROC
  17027. :
  17028. REM**************************************************************************
  17029. :
  17030. DEF PROCnotenumbersep
  17031. old% = current%
  17032. current% = hposn%-100
  17033. gap% = current%-old%
  17034. IF old% <> 0 AND howmany% > 1 THEN
  17035. IF gap% < 50 THEN lowernumber% += 20 ELSE lowernumber% = 0
  17036. IF (hposn%-100) - firsttrack% > 50 THEN
  17037. lowernumber% = 0
  17038. firsttrack% = hposn%-100
  17039. ENDIF
  17040. ENDIF
  17041. ENDPROC
  17042. :
  17043. REM****************************************************************************
  17044. :
  17045. DEF PROCpitchstring6
  17046. :
  17047. CLS
  17048. PRINT'" How many semitones high is the "
  17049. INPUT " vertical space (0 = previous) "height
  17050. IF height = 0 THEN
  17051. height = previousheight
  17052. COLOUR 1
  17053. PRINT' previousheight
  17054. COLOUR 0
  17055. ENDIF
  17056. PRINT'" and this is to be divided into "
  17057. INPUT " how many steps "steps
  17058. IF steps = 0 THEN
  17059. steps = previoussteps
  17060. COLOUR 1
  17061. PRINT' previoussteps
  17062. COLOUR 0
  17063. ENDIF
  17064. :
  17065. each = height/(steps-1)
  17066. result = 0
  17067. FOR count% = 1 TO (steps-1)
  17068. result += each
  17069. IF ((result*10)MOD10) <= 5 add$ = "n" ELSE add$ = "y"
  17070. result% = result DIV 1
  17071. IF add$ = "y" result% += 1
  17072. :
  17073. oct% = 1
  17074. IF result% > 11 THEN
  17075. REPEAT
  17076. result% -= 12
  17077. oct% += 1
  17078. UNTIL result% < 12
  17079. ENDIF
  17080. :
  17081. CASE result% OF
  17082. WHEN 0 : pitch% = 050
  17083. WHEN 1 : pitch% = 090
  17084. WHEN 2 : pitch% = 150
  17085. WHEN 3 : pitch% = 210
  17086. WHEN 4 : pitch% = 250
  17087. WHEN 5 : pitch% = 350
  17088. WHEN 6 : pitch% = 390
  17089. WHEN 7 : pitch% = 450
  17090. WHEN 8 : pitch% = 490
  17091. WHEN 9 : pitch% = 550
  17092. WHEN 10 : pitch% = 610
  17093. WHEN 11 : pitch% = 650
  17094. ENDCASE
  17095. :
  17096. pitch% += oct%
  17097. pitches%(count%) = pitch%
  17098. pitches%(0) = 051
  17099. NEXT
  17100. numpitches% = steps
  17101. :
  17102. PRINT'" Contour upwards, downwards,"
  17103. PRINT " up-down, down-up (1/2/3/4) "
  17104. CASE GET$ OF
  17105. WHEN "1" : previouscontour$ = "1"
  17106. WHEN "2" : previouscontour$ = "2" : PROCcontourdown
  17107. WHEN "3" : previouscontour$ = "3" : PROCcontourupdown
  17108. WHEN "4" : previouscontour$ = "4" : PROCcontourdownup
  17109. OTHERWISE
  17110. CASE previouscontour$ OF
  17111. WHEN "1" : COLOUR 1 : PRINT'" upwards " : COLOUR 0
  17112. wait$ = INKEY$(50)
  17113. WHEN "2" : PROCcontourdown : COLOUR 1 : PRINT' "downwards " : COLOUR 0
  17114. wait$ = INKEY$(50)
  17115. WHEN "3" : PROCcontourupdown : COLOUR 1 : PRINT'" up-down " : COLOUR 0
  17116. wait$ = INKEY$(50)
  17117. WHEN "4" : PROCcontourdownup : COLOUR 1 : PRINT' " down-up " : COLOUR 0
  17118. wait$ = INKEY$(50)
  17119. ENDCASE
  17120. ENDCASE
  17121. :
  17122. previousheight = height
  17123. previoussteps = steps
  17124. :
  17125. PROCinsertpitches
  17126. :
  17127. ENDPROC
  17128. :
  17129. REM************************************************************************8
  17130. :
  17131. DEF PROCcontourdown
  17132. :
  17133. FOR count% = 0 TO (numpitches%-1)
  17134. pitches1%(count%) = pitches%((numpitches%-1)-count%)
  17135. NEXT
  17136. FOR count% = 0 TO (numpitches%-1)
  17137. pitches%(count%) = pitches1%(count%)
  17138. NEXT
  17139. :
  17140. ENDPROC
  17141. :
  17142. REM***************************************************************************
  17143. :
  17144. DEF PROCcontourupdown
  17145. :
  17146. middle% = ((numpitches%+1)/2)-1
  17147. addnumber% = 1
  17148. minusnumber% = 0
  17149. swing$ = "add"
  17150. FOR count% = 0 TO (numpitches%-1)
  17151. IF swing$ = "subtract" THEN swing$ = "add" ELSE swing$ = "subtract"
  17152. :
  17153. IF swing$ = "add" THEN
  17154. pitches1%(middle%+addnumber%) = pitches%((numpitches%-1)-count%)
  17155. addnumber% += 1
  17156. ELSE
  17157. pitches1%(middle%-minusnumber%) = pitches%((numpitches%-1)-count%)
  17158. minusnumber% += 1
  17159. ENDIF
  17160. NEXT
  17161. :
  17162. FOR count% = 0 TO (numpitches%-1)
  17163. pitches%(count%) = pitches1%(count%)
  17164. NEXT
  17165. :
  17166. ENDPROC
  17167. :
  17168. REM******************************************************************************
  17169. :
  17170. DEF PROCcontourdownup
  17171. :
  17172. middle% = ((numpitches%+1)/2)-1
  17173. addnumber% = 1
  17174. minusnumber% = 0
  17175. swing$ = "add"
  17176. FOR count% = 0 TO (numpitches%-1)
  17177. IF swing$ = "subtract" THEN swing$ = "add" ELSE swing$ = "subtract"
  17178. :
  17179. IF swing$ = "add" THEN
  17180. pitches1%(middle%+addnumber%) = pitches%(count%)
  17181. addnumber% += 1
  17182. ELSE
  17183. pitches1%(middle%-minusnumber%) = pitches%(count%)
  17184. minusnumber% += 1
  17185. ENDIF
  17186. NEXT
  17187. :
  17188. FOR count% = 0 TO (numpitches%-1)
  17189. pitches%(count%) = pitches1%(count%)
  17190. NEXT
  17191. :
  17192. ENDPROC
  17193. :
  17194. REM**********************************************************************************
  17195. :
  17196. DEF PROCdisplayonlycontent
  17197. :
  17198. IF onlycontent$ = "n" THEN
  17199. displayvoices%() = displayvoices1%() : numvoices% = numvoices1%
  17200. ELSE
  17201. voicedone% = -1 : voicesdone% = 0 : displayvoices1%() = displayvoices%()
  17202. numvoices1% = numvoices%
  17203. FOR count% = 1 TO numvoices%
  17204. FOR counter% = startbar% TO (startbar%+numbars%-1)
  17205. voice% = displayvoices%(count%)-1
  17206. addingnotes$ = "n"
  17207. PROCnewnotereception(voice%,counter%,0,0,0,0,0,0,0)
  17208. CASE option% OF
  17209. WHEN 1 : startcell% = 0
  17210. WHEN 2 : startcell% = numusedcells%(voice%)
  17211. WHEN 3 : startcell% = 0
  17212. WHEN 4 : PROCsearch(counter%*10^3)
  17213. ENDCASE
  17214. IF array%(startcell%,0,voice%) DIV10^6 > 0 THEN
  17215. IF (array%(startcell%,0,voice%) DIV10^6) < (startbar%+numbars%) THEN
  17216. IF voice% <> voicedone% THEN
  17217. voicesdone% += 1 : displayvoices%(voicesdone%) = (voice%+1) : holddisplay%(voicesdone%) = (voice%+1)
  17218. voicedone% = voice%
  17219. ENDIF
  17220. ENDIF
  17221. ENDIF
  17222. NEXT
  17223. NEXT
  17224. :
  17225. numvoices% = voicesdone% : startv% = 1 : holdstart% = 1
  17226. :
  17227. ENDIF
  17228. :
  17229. PROCdisplay
  17230. :
  17231. ENDPROC
  17232. :
  17233. REM**********************************************************8
  17234. :
  17235. DEF PROCcontentonlylist
  17236. :
  17237. CLS
  17238. PRINT ""
  17239. voicedone% = -1
  17240. FOR count% = 1 TO numvoices%
  17241. FOR counter% = startbar% TO (startbar%+numbars%-1)
  17242. voice% = displayvoices%(count%)-1
  17243. addingnotes$ = "n"
  17244. PROCnewnotereception(voice%,counter%,0,0,0,0,0,0,0)
  17245. CASE option% OF
  17246. WHEN 1 : startcell% = 0
  17247. WHEN 2 : startcell% = numusedcells%(voice%)
  17248. WHEN 3 : startcell% = 0
  17249. WHEN 4 : PROCsearch(counter%*10^3)
  17250. ENDCASE
  17251. IF array%(startcell%,0,voice%) DIV 10^6 > 0 THEN
  17252. IF (array%(startcell%,0,voice%)) DIV 10^6 < (startbar%+numbars%) THEN
  17253. IF voice% <> voicedone% THEN
  17254. IF compress$ = "n" THEN
  17255. PRINT ' voice%+1;". ";insts$(voice%+1,0)
  17256. ELSE
  17257. PRINT voice%+1;". ";insts$(voice%+1,0)
  17258. ENDIF
  17259. voicedone% = voice%
  17260. ENDIF
  17261. ENDIF
  17262. ENDIF
  17263. NEXT
  17264. NEXT
  17265. :
  17266. PRINT'" (press R to remove the list, press C to"
  17267. PRINT'" compress/uncompress the list or press Q to"
  17268. PRINT'" go to Quickdisplay without removing the list"
  17269. CASE GET$ OF
  17270. WHEN "C","c" :
  17271. IF compress$ = "y" THEN compress$ = "n" ELSE compress$ = "y"
  17272. PROCcontentonlylist
  17273. WHEN "Q","q" : quickdisplaywindow$ = "n" : PROCquickdisplay
  17274. OTHERWISE PROCdisplay
  17275. ENDCASE
  17276. :
  17277. ENDPROC
  17278. :
  17279. REM*************************************************************
  17280. :
  17281. DEF PROCundoprepare
  17282. :
  17283. manynotesX%=manynotes%
  17284. numpartsX%=numparts%
  17285. nobarsX% =nobars%
  17286. startvX% =startv%
  17287. startv1X% =startv1%
  17288. numbarsX% =numbars%
  17289. startbarX% =startbar%
  17290. numvoicesX%=numvoices%
  17291. factorX% =factor%
  17292. beatfactorX%=beatfactor%
  17293. beamsX% =beams%
  17294. longbeatsupperX%= longbeatsupper%
  17295. longbeatslowerX%=longbeatslower%
  17296. tempoX% =tempo%
  17297. MMX% =MM%
  17298. noteheadX$=notehead$
  17299. longscoreX$= longscore$
  17300. barlinesX$ =barlines$
  17301. stavesX$ =staves$
  17302. beatsX$ =beats$
  17303. amplitudesX$= amplitudes$
  17304. namesX$ =names$
  17305. accidentalsX$=accidentals$
  17306. stemsX$=stems$
  17307. xoptionX$= xoption$
  17308. durationsX$=durations$
  17309. envelopesX$ =envelopes$
  17310. glissandosX$ =glissandos$
  17311. numwavesX% =numwaves%
  17312. manywavesX% =manywaves%
  17313. barnosoftenX%= barnosoften%
  17314. FOR c% = 0 TO (numparts%-1)
  17315. numusedcellsX%(c%)=numusedcells%(c%)
  17316. NEXT
  17317. FOR e% = 0 TO (numparts%-1)
  17318. FOR d% = 0 TO 2
  17319. FOR c% = 0 TO manynotes%
  17320. arrayX%(c%,d%,e%)=array%(c%,d%,e%)
  17321. NEXT
  17322. NEXT
  17323. NEXT
  17324. FOR c% = 0 TO numparts%
  17325. FOR d% = 0 TO 2
  17326. instsX$(c%,d%)=insts$(c%,d%)
  17327. NEXT
  17328. NEXT
  17329. FOR c% = 0 TO nobars%
  17330. FOR d% = 0 TO 3
  17331. FOR e% = 0 TO (numparts%-1)
  17332. disarrayX%(c%,d%,e%)= disarray%(c%,d%,e%)
  17333. NEXT
  17334. NEXT
  17335. NEXT
  17336. FOR c% = 0 TO numparts%
  17337. longbeamposnX%(c%) =longbeamposn%(c%)
  17338. NEXT
  17339. FOR c% = 0 TO numparts%
  17340. shortbeamposnX%(c%) =shortbeamposn%(c%)
  17341. NEXT
  17342. FOR c% = 0 TO numparts%
  17343. shortampposX%(c%)=shortamppos%(c%)
  17344. NEXT
  17345. FOR c% = 0 TO numparts%
  17346. longampposX%(c%) =longamppos%(c%)
  17347. NEXT
  17348. FOR c% = 0 TO (numparts%-1)
  17349. longstemdirX$(c%)=longstemdir$(c%)
  17350. NEXT
  17351. FOR c% = 0 TO (numparts%-1)
  17352. shortstemdirX$(c%)=shortstemdir$(c%)
  17353. NEXT
  17354. FOR c% = 0 TO numparts%
  17355. waveformsX$(c%)=waveforms$(c%)
  17356. NEXT
  17357. FOR c% = 0 TO numvoices%
  17358. displayvoicesX%(c%)=displayvoices%(c%)
  17359. NEXT
  17360. FOR c% = 0 TO 19
  17361. wformsX$(c%)=wforms$(c%)
  17362. NEXT
  17363. FOR c% = 0 TO 8
  17364. FOR d% = 0 TO 9
  17365. lvdataX%(c%,d%)= lvdata%(c%,d%)
  17366. NEXT
  17367. NEXT
  17368. FOR a% = 0 TO 47
  17369. pitchsetX%(a%)=pitchset%(a%)
  17370. NEXT
  17371. FOR a% = 0 TO 47
  17372. dursetX%(a%)=durset%(a%)
  17373. NEXT
  17374. FOR a% = 0 TO 47
  17375. ampsetX%(a%) =ampset%(a%)
  17376. NEXT
  17377. FOR a% = 0 TO 47
  17378. glisssetX%(a%)=glissset%(a%)
  17379. NEXT
  17380. FOR a% = 0 TO 47
  17381. envsetX%(a%) =envset%(a%)
  17382. NEXT
  17383. FOR a% = 0 TO nobars%
  17384. tempiX%(a%) =tempi%(a%)
  17385. NEXT
  17386. FOR a% = 0 TO nobars%
  17387. FOR b% = 0 TO 1
  17388. remarksX$(a%,b%)= remarks$(a%,b%)
  17389. NEXT
  17390. NEXT
  17391. :
  17392. ENDPROC
  17393. :
  17394. REM****************************************
  17395. :
  17396. DEF PROCundo
  17397. :
  17398. manynotes%=manynotes%
  17399. numparts%=numpartsX%
  17400. nobars% =nobarsX%
  17401. startv% =startvX%
  17402. startv1% =startv1X%
  17403. numbars% =numbarsX%
  17404. startbar% =startbarX%
  17405. numvoices%=numvoicesX%
  17406. factor% =factorX%
  17407. beatfactor%=beatfactorX%
  17408. beams% =beamsX%
  17409. longbeatsupper%= longbeatsupperX%
  17410. longbeatslower%=longbeatslowerX%
  17411. tempo% =tempoX%
  17412. MM% =MMX%
  17413. notehead$=noteheadX$
  17414. longscore$= longscoreX$
  17415. barlines$ =barlinesX$
  17416. staves$ =stavesX$
  17417. beats$ =beatsX$
  17418. amplitudes$= amplitudesX$
  17419. names$ =namesX$
  17420. accidentals$=accidentalsX$
  17421. stems$=stemsX$
  17422. xoption$= xoptionX$
  17423. durations$=durationsX$
  17424. envelopes$ =envelopesX$
  17425. glissandos$ =glissandosX$
  17426. numwaves% =numwavesX%
  17427. manywaves% =manywavesX%
  17428. barnosoften%= barnosoftenX%
  17429. FOR c% = 0 TO (numparts%-1)
  17430. numusedcells%(c%)=numusedcellsX%(c%)
  17431. NEXT
  17432. FOR e% = 0 TO (numparts%-1)
  17433. FOR d% = 0 TO 2
  17434. FOR c% = 0 TO manynotes%
  17435. array%(c%,d%,e%)=arrayX%(c%,d%,e%)
  17436. NEXT
  17437. NEXT
  17438. NEXT
  17439. FOR c% = 0 TO numparts%
  17440. FOR d% = 0 TO 2
  17441. insts$(c%,d%)=instsX$(c%,d%)
  17442. NEXT
  17443. NEXT
  17444. FOR c% = 0 TO nobars%
  17445. FOR d% = 0 TO 3
  17446. FOR e% = 0 TO (numparts%-1)
  17447. disarray%(c%,d%,e%)= disarrayX%(c%,d%,e%)
  17448. NEXT
  17449. NEXT
  17450. NEXT
  17451. FOR c% = 0 TO numparts%
  17452. longbeamposn%(c%) =longbeamposnX%(c%)
  17453. NEXT
  17454. FOR c% = 0 TO numparts%
  17455. shortbeamposn%(c%) =shortbeamposnX%(c%)
  17456. NEXT
  17457. FOR c% = 0 TO numparts%
  17458. shortamppos%(c%)=shortampposX%(c%)
  17459. NEXT
  17460. FOR c% = 0 TO numparts%
  17461. longamppos%(c%) =longampposX%(c%)
  17462. NEXT
  17463. FOR c% = 0 TO (numparts%-1)
  17464. longstemdir$(c%)=longstemdirX$(c%)
  17465. NEXT
  17466. FOR c% = 0 TO (numparts%-1)
  17467. shortstemdir$(c%)=shortstemdirX$(c%)
  17468. NEXT
  17469. FOR c% = 0 TO numparts%
  17470. waveforms$(c%)=waveformsX$(c%)
  17471. NEXT
  17472. FOR c% = 0 TO numvoices%
  17473. displayvoices%(c%)=displayvoicesX%(c%)
  17474. NEXT
  17475. FOR c% = 0 TO 19
  17476. wforms$(c%)=wformsX$(c%)
  17477. NEXT
  17478. FOR c% = 0 TO 8
  17479. FOR d% = 0 TO 9
  17480. lvdata%(c%,d%)= lvdataX%(c%,d%)
  17481. NEXT
  17482. NEXT
  17483. FOR a% = 0 TO 47
  17484. pitchset%(a%)=pitchsetX%(a%)
  17485. NEXT
  17486. FOR a% = 0 TO 47
  17487. durset%(a%)=dursetX%(a%)
  17488. NEXT
  17489. FOR a% = 0 TO 47
  17490. ampset%(a%) =ampsetX%(a%)
  17491. NEXT
  17492. FOR a% = 0 TO 47
  17493. glissset%(a%)=glisssetX%(a%)
  17494. NEXT
  17495. FOR a% = 0 TO 47
  17496. envset%(a%) =envsetX%(a%)
  17497. NEXT
  17498. FOR a% = 0 TO nobars%
  17499. tempi%(a%) =tempiX%(a%)
  17500. NEXT
  17501. FOR a% = 0 TO nobars%
  17502. FOR b% = 0 TO 1
  17503. remarks$(a%,b%)= remarksX$(a%,b%)
  17504. NEXT
  17505. NEXT
  17506. :
  17507. PROCdisplay
  17508. :
  17509. ENDPROC