CAC-i.bas 534 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968
  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. MODE 12 : COLOUR 0 : COLOUR 191 : CLS
  17. *CONFIGURE spritesize 300K
  18. errorbeforedisplay$ = "y"
  19. ON ERROR PROCerror
  20. biga% = 10^5 : bigb% = 0 : bigc% = 0 : bigd% = 10^5 : box$ = "n"
  21. :
  22. PROCtobegin
  23. END
  24. :
  25. REM*******************************
  26. :
  27. DEF PROCawait
  28. :
  29. IF easiermenus$ = "n" THEN
  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 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. ELSE
  45. PROCwindow(20,69,60,42)
  46. PRINT' " Functions F"
  47. PRINT' " Add one note (fully defined) O"
  48. PRINT' " Delete notes X"
  49. PRINT' " Copy/move notes C"
  50. PRINT' " Define a group of values G"
  51. PRINT' " Add the group of values A"
  52. PRINT' " Rhythmicize R"
  53. PRINT' " Display D"
  54. PRINT' " Play P"
  55. PRINT' " Various V"
  56. PRINT' " Undo last operation Z"
  57. PRINT' " Save S"
  58. PRINT' " Quit Q"
  59. ENDIF
  60. :
  61. CASE GET$ OF
  62. WHEN "f" : ON : PROCfunctionreception
  63. WHEN "o" : ON : PROCaddonenote
  64. WHEN "x" : ON : PROCdelete
  65. WHEN "c","1","`" : ON : PROCcopy
  66. WHEN "g", "3" : ON : PROCsubawaitG
  67. WHEN "a" : ON : PROCsubawaitA
  68. WHEN "r" :
  69. VDU 7
  70. IF easiermenus$ = "n" THEN PROCwindow(20,69,63,52) ELSE PROCwindow(20,69,63,42)
  71. CLS
  72. PRINT'" To rhythmicize attacks, first switch on "
  73. PRINT'" Rhythmicize Attacks in Display Options "
  74. PRINT'" (M/V/D/H) then create a group of attacks "
  75. PRINT'" or copy some attacks or move some attacks "
  76. PRINT'" to itself, during the course of which you "
  77. PRINT'" will be invited to rhythmicize them. "
  78. PRINT'" (press a key to continue) "
  79. CASE GET$ OF
  80. WHEN "m" : PROCdisplay
  81. OTHERWISE
  82. PROCdisplay
  83. ENDCASE
  84. WHEN "d" : ON : PROCpredisplay
  85. WHEN "p" : ON : play$ = "play" : PROCplay
  86. WHEN "m" : ON :
  87. PROCdisplay : REM toggle
  88. WHEN "v" : ON : PROCplaysubmenu
  89. WHEN "s" : ON : PROCsave
  90. WHEN "Z","z" : PROCundo
  91. WHEN "q" : ON : PROCquit
  92. OTHERWISE ON : VDU 7 : PROCawait : REM bleep and loop back to start of proc
  93. ENDCASE
  94. :
  95. ENDPROC
  96. :
  97. REM*********************************
  98. :
  99. DEF PROCsubawaitG
  100. :
  101. IF easiermenus$ = "n" THEN
  102. CLS
  103. PRINT' " attacks A"
  104. PRINT " envelope points R"
  105. PRINT " pitches P"
  106. PRINT " amplitudes L"
  107. PRINT " amplitude gradations G"
  108. PRINT " envelopes/glissandos E"
  109. PRINT " durations D"
  110. PRINT " microtonal inflections M"
  111. ELSE
  112. CLS
  113. PRINT'" attacks A"
  114. PRINT'" envelope points R"
  115. PRINT'" pitches P"
  116. PRINT'" amplitudes L"
  117. PRINT'" amplitude gradations G"
  118. PRINT'" envelopes/glissandos E"
  119. PRINT'" durations D"
  120. PRINT'" microtonal inflections M"
  121. ENDIF
  122. :
  123. CASE GET$ OF
  124. WHEN "A","a" : PROCseriesattacks
  125. WHEN "R","r" : PROCreleases
  126. WHEN "P","p", "3" : PROCseriespitches
  127. WHEN "L","l" : PROCseriesamplitudes
  128. WHEN "E","e" : PROCseriesenvelopes
  129. WHEN "G","g" : gradations$ = "y" : PROCseriesenvelopes
  130. WHEN "D","d" : PROCseriesdurations
  131. WHEN "M","m" : PROCseriesinflections
  132. OTHERWISE VDU 7 : PROCsubawaitG
  133. ENDCASE
  134. :
  135. ENDPROC
  136. :
  137. REM***********************************
  138. :
  139. DEF PROCprearraysetup
  140. :
  141. MODE 12 : COLOUR 0 : COLOUR 191
  142. CLS
  143. numwaves% = 19
  144. INPUT'''''" Estimate the maximum number of bars "nobars%
  145. INPUT''" Estimate the average number of notes per bar in the busiest part "nonotes
  146. INPUT''" How many voices "numparts%
  147. :
  148. DIM insts$(numparts%,2) : instsdimmed$ = "y"
  149. PRINT''" Do you want to define the voices or use default ones (Y/D)"
  150. CASE GET$ OF
  151. WHEN "Y","y" :
  152. FOR count% = 1 TO numparts%
  153. PRINT '" voice ";count%;" is called"
  154. INPUT name$
  155. PRINT " and is in clef (P/T/B/D...TT/TB/BB etc)"
  156. INPUT clef$
  157. PRINT " and has how many staves"
  158. INPUT staves$
  159. insts$(count%,0) = name$ : insts$(count%,1) = clef$ : insts$(count%,2) = staves$
  160. NEXT
  161. WHEN "D","d" :
  162. FOR count% = 1 TO numparts%
  163. insts$(count%,0) = "" : insts$(count%,1) = "T" : insts$(count%,2)="1"
  164. NEXT
  165. OTHERWISE
  166. ENDCASE
  167. :
  168. REPEAT
  169. INPUT''" The time signature has how many beats to the bar "factor%
  170. :
  171. CASE factor% OF
  172. WHEN 1,2,3,4,5,6,8,10,12 : success$ = "YES"
  173. OTHERWISE
  174. success$ = "NO"
  175. VDU 7
  176. PRINT'" Only 1,2,3,4,5,6,8,10 or 12 are allowed "
  177. PRINT'" press a key to try again"
  178. CASE GET$ OF
  179. WHEN "m" : success$ = "NO"
  180. OTHERWISE
  181. success$ = "NO"
  182. ENDCASE
  183. :
  184. ENDCASE
  185. UNTIL success$ = "YES"
  186. :
  187. factor% = factor% * 8
  188. beatfactor% = 960/factor%
  189. :
  190. REPEAT
  191. success$ = "YES"
  192. PRINT''" of what note value "
  193. PRINT' " (minim/half-note = 2 "
  194. PRINT' " crotchet/quarter-note = 4 "
  195. PRINT' " quaver/eighth-note = 8 "
  196. PRINT' " semiquaver/sixteenth-note = 16 "
  197. INPUT' " demisemiquaver/thirtysecond-note = 32) "beams%
  198. :
  199. CASE beams% OF
  200. WHEN 2 : beams% = 2
  201. WHEN 4 : beams% = 3
  202. WHEN 8 : beams% = 4
  203. WHEN 16 : beams% = 5
  204. WHEN 32 : beams% = 6
  205. OTHERWISE
  206. PRINT'" sorry, try again "
  207. success$ = "NO"
  208. ENDCASE
  209. UNTIL success$ = "YES"
  210. :
  211. manynotes% = nobars%*nonotes
  212. filename$ = ""
  213. ENDPROC
  214. :
  215. REM***********************************************
  216. :
  217. DEF PROCarraysetup
  218. :
  219. DIM array%(manynotes%,2,(numparts%-1)) : DIM arrayX%(manynotes%,2,(numparts%-1))
  220. IF instsdimmed$ = "n" THEN DIM insts$(numparts%,2)
  221. DIM instsX$(numparts%,2)
  222. DIM numusedcells%(numparts%-1) : DIM numusedcellsX%(numparts%-1)
  223. DIM cell%(1999), bar%(1999)
  224. DIM attacks1%(10000), attacks2%(10000), attacks3%(10000), attacks4%(10000), attacks5%(10000)
  225. DIM pitches%(10000), pitches1%(10000), pitches2%(10000), amplitudes%(10000), envelopes%(10000)
  226. DIM durations%(10000), glissandos%(10000), inflections%(10000)
  227. DIM pitchset%(numparts%+47), ampset%(numparts%+47), envset%(numparts%+47), durset%(numparts%+47), glissset%(numparts%+47), infset%(numparts%+47)
  228. DIM pitchsetX%(numparts%+47), ampsetX%(numparts%+47), envsetX%(numparts%+47), dursetX%(numparts%+47), glisssetX%(numparts%+47)
  229. DIM functionattacks(10000)
  230. DIM nodes%(47), nodes1%(47)
  231. DIM dur%(999), proportion%(999), rhythmicattacks%(999), groupattacks%(999)
  232. DIM error%(999), notategroup%(999,1), errororder%(999), errororder1%(999)
  233. DIM disarray%(nobars%,3,(numparts%-1)) : DIM disarrayX%(nobars%,3,(numparts%-1))
  234. DIM displayvoices%(numparts%), holddisplay%(numparts%), rgroup%(6), longinsts$(2,2), staves%(6)
  235. DIM displayvoices1%(numparts%) : DIM displayvoicesX%(numparts%)
  236. DIM value%(2), pos%(2), longbeamposn%(numparts%), shortbeamposn%(numparts%), actbeamposn%(numparts%), shortamppos%(numparts%), longamppos%(numparts%), actamppos%(numparts%)
  237. DIM longbeamposnX%(numparts%), shortbeamposnX%(numparts%), shortampposX%(numparts%), longampposX%(numparts%)
  238. DIM longstemdir$(numparts%-1), shortstemdir$(numparts%-1)
  239. DIM longstemdirX$(numparts%-1), shortstemdirX$(numparts%-1)
  240. DIM waveforms$(numparts%), playvoices%(8), lvdata%(8,9), tic%(4), tun%(8)
  241. DIM waveformsX$(numparts%), lvdataX%(8,9)
  242. DIM wforms$(19) : waveload$ = "notdone"
  243. DIM wformsX$(19)
  244. DIM startoflayersection%(50), shareoflayers%(50,50), chanceoflayer%(50)
  245. DIM layershare%(50), numattackssections%(50), startofattackssection%(50,50)
  246. DIM numattax%(50,50,1), attackscontrol$(50)
  247. DIM numattackssections1%(50), startofattackssection1%(50,200)
  248. DIM numattax1%(50,200,1), appearances%(50)
  249. DIM durationscontrol$(50), numdurationssections%(50)
  250. DIM numdurationssections1%(50), startofdurationssection%(50,200)
  251. DIM startofdurationssection1%(50,200), doorations%(50,200), doorations1%(50,200)
  252. DIM numvalues%(50), values(50,50), valuescounter%(50), multiplier$(50)
  253. DIM multipliermode$(50)
  254. DIM contoursequences%(50,15), transpositionsequences%(199,1)
  255. DIM sample%(299), group%(7), contours%(69,7), octavesequences%(50,48,11)
  256. DIM pitchnames$(47), octaveloop%(48), distortparas%(50,3)
  257. DIM numlayerOKsects%(50), OKtouselayers%(50,1), layersOK%(50,50,2)
  258. DIM layerends%(50), amplitudes1%(10000), dynlayers%(12,5), dynnumbers%(99)
  259. DIM ampsample%(49)
  260. DIM tempi%(nobars%), bannedpitches%(80), bannedints%(24,2), triednotes%(88)
  261. DIM tempiX%(nobars%)
  262. DIM extractinfo%(20), redpitches%(9,30), numredpitches%(9), holdstartcell%(numparts%)
  263. DIM remarks$(nobars%,1), quickdisplay%(numparts%), prequickdisplay%(numparts%), thebeats%(15)
  264. DIM remarksX$(nobars%,1)
  265. DIM envattacks%(3000), envpitches%(3000), taken%(19)
  266. FOR count% = 0 TO nobars% : tempi%(count%) = 30 : NEXT
  267. FOR count% = 0 TO 47 : READ name$ : pitchnames$(count%) = name$ : NEXT
  268. DATA "C 1/4 flat","C 1/8 flat","C nat","C 1/8 shrp","C 1/4 shrp"
  269. DATA "C 3/8 shrp","D flat","D 3/8 flat","D 1/4 flat","D 1/8 flat"
  270. DATA "D nat","D 1/8 shrp","D 1/4 shrp","D 3/8 shrp","E flat","E 3/8 flat"
  271. DATA "E 1/4 flat","E 1/8 flat","E nat","E 1/8 shrp","E 1/4 shrp"
  272. DATA "F 1/8 flat","F nat","F 1/8 shrp","F 1/4 shrp","F 3/8 shrp"
  273. DATA "F shrp","G 3/8 flat","G 1/4 flat","G 1/8 flat","G nat","G 1/8 shrp"
  274. DATA "G 1/4 shrp","G 3/8 shrp","A flat","A 3/8 flat","A 1/4 flat"
  275. DATA "A 1/8 flat","A nat","A 1/8 shrp","A 1/4 shrp","A 3/8 shrp"
  276. DATA "B flat","B 3/8 flat","B 1/4 flat","B 1/8 flat","B nat","B 1/8 shrp"
  277. 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
  278. 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
  279. 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
  280. 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
  281. 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
  282. 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
  283. DATA 51,5,5,4,3,2,1,52,6,1,2,4,5,6,3,53,6,6,5,3,2,1,4
  284. 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
  285. 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
  286. 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
  287. 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
  288. 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
  289. DATA 69,7,1,7,6,5,4,3,2
  290. FOR count% = 1 TO 47
  291. READ a%,b%
  292. contours%(a%,0) = b%
  293. FOR counter% = 1 TO b%
  294. READ c%
  295. contours%(a%,counter%) = c%
  296. NEXT
  297. NEXT
  298. FOR count% = 0 TO numparts%-1 : pitchset%(count%) = 55 : NEXT
  299. FOR count% = 0 TO numparts%-1 : ampset%(count%) = 3 : NEXT
  300. FOR count% = 0 TO numparts%-1 : envset%(count%) = 9 : NEXT
  301. FOR count% = 0 TO numparts%-1 : durset%(count%) = 60 : NEXT
  302. FOR count% = 0 TO numparts%-1 : glissset%(count%) = 105050 : NEXT
  303. FOR count% = 0 TO numparts%-1 : infset%(count%) = 50 : NEXT
  304. *TUNING 0
  305. VOICES 8
  306. *CHANNELVOICE 1 WaveSynth-Beep
  307. *CHANNELVOICE 2 WaveSynth-Beep
  308. *CHANNELVOICE 3 WaveSynth-Beep
  309. *CHANNELVOICE 4 WaveSynth-Beep
  310. *CHANNELVOICE 5 WaveSynth-Beep
  311. *CHANNELVOICE 6 WaveSynth-Beep
  312. *CHANNELVOICE 7 WaveSynth-Beep
  313. *CHANNELVOICE 8 WaveSynth-Beep
  314. direction$ = "" : shortstemdir$() = "U" : longstemdir$() = "U" : shortbeamposn%() = 106 : longbeamposn%() = 106
  315. manyattacks% = 0 : longbeatsupper% = 739 : longbeatslower% = 405
  316. tempo% = 19660 : REM default tempo = MM30 per bar
  317. defaultvoices$ = "y" : PROCassignvoices
  318. CLS
  319. VDU 28,20,27,60,15
  320. COLOUR 0 : COLOUR 191 : CLS
  321. numbars% = 4 : startbar% = 1
  322. :
  323. numvoices% = numparts%
  324. FOR count% = 1 TO numvoices%
  325. displayvoices%(count%) = 1 + count% - 1
  326. holddisplay%(count%) = 1 + count% - 1
  327. NEXT
  328. holdnum% = numvoices%
  329. :
  330. quickdisplay%(1) = 1 : prequickdisplay%(1) = 1
  331. holdnum% = 1 : holdstart% = 1 : quicknum% = 1 : quickstart% = 1
  332. prequicknum% = 1 : prequickstart% = 1
  333. notehead$ = "vsmall" : longscore$ = "y" : startv% = 1 : startv1% = 1
  334. printing$ = "n"
  335. barlines$ = "y" : staves$ = "y" : beats$ = "n" : amplitudes$ = "y"
  336. staves$ = "y" : barlines$ = "y" : names$ = "y" : lowerstave$ = "y"
  337. accidentals$ = "y" : stems$ = "y" : xoption$ = "y" : durations$ = "n"
  338. envelopes$ = "y" : glissandos$ = "y" : MM% = 30 : beatstep% = 8
  339. copyit$ = "OFF" : distort$ = "OFF" : beatnumbers$ = "n"
  340. wavefilingsystem$ = "notloaded" : manywaves% = 0 : barnosoften% = 5
  341. reordered$ = "n" : equalized$ = "n" : notenumbers$ = "n" : beatnum_diff$ = "num"
  342. beatunits$ = "big" : parasdefined$ = "no" : preplaydisplay$ = "n"
  343. paraset$ = "off" : savevoice$ = "N"
  344. method$ = "raw" : reordered$ = "n" : quiz$ = "yes" : typeintervals$ = "s"
  345. displayintervals$ = "n" : numintervals% = 1 : alterbeatsat% = 0
  346. compoundpitch% = 12 : compoundquarter% = 24 : compoundeighth% = 48 : compoundcent% = 1200
  347. defaultsieve = 2 : funcinput$ = "durat" : redpitches$ = "n" : printno% = 0
  348. seegraph$ = "n" : seeinfo$ = "n" : seereorder$ = "n" : seereorderx$ = "n" : seereordery$ = "n"
  349. seeequalize$ = "n" : seeequalizex$ = "n" : seeequalizey$ = "n"
  350. seerhythmicize$ = "n" : seequery$ = "n" : startfinishdurats$ = "Y" : displayedfunc$ = "n"
  351. along% = 0 : playnewscreen$ = "y" : seeduration$ = "n" : lower% = 0 : justone$ = "n"
  352. biga% = 10^5 : bigb% = 0 : bigc% = 0 : bigd% = 10^5 : printinfo$ = "n"
  353. lowerstart% = 1 : upperstart% = 99 : lowerend% = 1 : upperend% = 99 : toggle$ = "orig"
  354. quickcopy$ = "y" : quickplay% = 1 : seedurinbts$ = "n" : seedurincrots$ = "n"
  355. screenvoices$ = "n" : ampoptions$ = "n" : screenmovesby% = 3 : copydownwards$ = "n"
  356. setalong$ = "y" : numvoicesgiven$ = "n" : envelopedata$ = "none" : deleteone$ = "none"
  357. quickextract$ = "n" : askaboutpitches$ = "y" : usebottomstave$ = "n" : copysuccessively$ = "n"
  358. succfirsttime$ = "y" : sequalssection$ = "n"
  359. addpitches$ = "y" : downwardsspeed% = 50
  360. horizscroll% = 25 : addten$ = "n" : squarebracket$ = "addten" : queryalong$ = "n"
  361. waitafterfirst% = 50 : waitaftersecond% = 50 : notenames$ = "n" : holdbackby% = 0
  362. updisplay% = 1 : vertscroll% = 25 : singlepitch$ = "m" : nosevery% = 1 : startnos% = 1
  363. reorderpitches$ = "n" : namestaves$ = "nameone" : usebeep$ = "n" : firsttimequick$ = "y"
  364. onlycontent$ = "n" : compress$ = "n" : quickdisplaywindow$ = "y" : ampmethod$ = "sample"
  365. holdbackby% = 960 : copytoend$ = "n" : gradations$ = "n" : firstasking$ = "y"
  366. resetdefaults$ = "n" : firstpitch$ = "y" : usedprev$ = "n" : nodelay$ = "n"
  367. askprevious$ = "y" : errorbeforedisplay$ = "n" : quitnow$ = "n"
  368. crossing$ = "n" : easiermenus$ = "y" : copymove$ = "C"
  369. PROCrhythmdefaults
  370. :
  371. ENDPROC
  372. :
  373. REM*************************************
  374. :
  375. DEF PROCsubawaitA
  376. :
  377. IF easiermenus$ = "n" THEN
  378. PROCwindow(20,69,70,55)
  379. CLS
  380. PRINT' " attacks A"
  381. PRINT " pitches P"
  382. PRINT " amplitudes L"
  383. PRINT " envelopes E"
  384. PRINT " durations D"
  385. PRINT " glissandos G"
  386. PRINT " microtonal inflections M"
  387. ELSE
  388. PROCwindow(20,69,70,42)
  389. CLS
  390. PRINT' " attacks A"
  391. PRINT '" pitches P"
  392. PRINT '" amplitudes L"
  393. PRINT '" envelopes E"
  394. PRINT '" durations D"
  395. PRINT '" glissandos G"
  396. PRINT '" microtonal inflections M"
  397. ENDIF
  398. :
  399. CASE GET$ OF
  400. WHEN "A","a" : PROCinsertattacks
  401. WHEN "P","p" : PROCinsertpitches
  402. WHEN "L","l" : PROCinsertamplitudes
  403. WHEN "E","e" : PROCinsertenvelopes
  404. WHEN "D","d" : PROCinsertdurations
  405. WHEN "M","m" : PROCinsertinflections
  406. OTHERWISE VDU 7 : PROCsubawaitA
  407. ENDCASE
  408. :
  409. ENDPROC
  410. :
  411. REM**************************************
  412. :
  413. DEF PROCnewnotereception(voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
  414. :
  415. value% = (barno% * 10^3) + beatno%
  416. :
  417. option% = 0
  418. :
  419. ::::::REM if new note is very first to be added::::::
  420. IF numusedcells%(voice%) = 0 THEN option% = 1
  421. :
  422. IF option% <> 1 THEN
  423. :
  424. :::::::REM to tack new note on at end:::::
  425. IF numusedcells%(voice%) > 0 AND value% > (array%((numusedcells%(voice%)-1),0,voice%)) DIV 10^3 THEN option% = 2
  426. :
  427. :::::::REM to tack new note on at START::::
  428. IF numusedcells%(voice%) > 0 AND value% < (array%(0,0,voice%)) DIV 10^3 THEN option% = 3
  429. :
  430. ::::::REM to put new note in middle::::::::::
  431. 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
  432. :
  433. ENDIF
  434. :
  435. IF addingnotes$ = "y" THEN
  436. CASE option% OF
  437. WHEN 1 : shunt$ = "Y"
  438. PROCcellfill(0,voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
  439. :
  440. WHEN 2 : shunt$="Y"
  441. PROCcellfill(numusedcells%(voice%),voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
  442. :
  443. WHEN 3 : shunt$="Y"
  444. PROCshuntright(0)
  445. PROCcellfill(0,voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
  446. :
  447. WHEN 4 : PROCsearch(value%)
  448. IF shunt$="Y" PROCshuntright(startcell%)
  449. PROCcellfill(startcell%,voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
  450. :
  451. ENDCASE
  452. ENDIF
  453. :
  454. ENDPROC
  455. :
  456. REM****************************************************
  457. :
  458. DEF PROCcellfill(cell%,voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
  459. :
  460. IF barno% = 999 THEN barno% = array%(cell%,0,voice%) DIV 10^6
  461. IF beatno% = 999 THEN beatno% = (array%(cell%,0,voice%)DIV 10^3)MOD 10^3
  462. IF pitch% = 999 THEN pitch% = array%(cell%,0,voice%) MOD 10^3
  463. IF amp% = 9 THEN amp% = array%(cell%,1,voice%) MOD10
  464. IF env% = 999 THEN env% = array%(cell%,2,voice%) DIV10^2
  465. IF dur% = 999 THEN dur% = (array%(cell%,1,voice%) DIV10) MOD 10^3 ELSE PROCconvertdur
  466. IF gliss% = 99 THEN gliss% = array%(cell%,1,voice%) DIV10^4
  467. IF inf% = 99 THEN inf% = array%(cell%,2,voice%) MOD 10^2
  468. :
  469. array%(cell%,0,voice%) = (barno%*10^6) + (beatno%*10^3) + pitch%
  470. array%(cell%,1,voice%) = (gliss%*10^4)+(dur%*10)+amp%
  471. array%(cell%,2,voice%) = (env%*10^2)+inf%
  472. :
  473. IF shunt$="Y" THEN numusedcells%(voice%) += 1
  474. :
  475. ENDPROC
  476. :
  477. REM******************************************************
  478. :
  479. DEF PROCshuntright(startcell%)
  480. :
  481. FOR tier% = 0 TO 2
  482. FOR count% = (numusedcells%(voice%)) TO (startcell%+1) STEP -1
  483. array%(count%,tier%,voice%) = array%((count%-1),tier%,voice%)
  484. NEXT
  485. NEXT
  486. :
  487. ENDPROC
  488. :
  489. REM*********************************************************
  490. :
  491. DEF PROCsearch(newvalue%)
  492. :
  493. startcell% = -1
  494. distance% = numusedcells%(voice%)/2
  495. cellnum% = distance%
  496. :
  497. REPEAT
  498. :
  499. :
  500. IF newvalue% = (array%(cellnum%,0,voice%)) DIV 10^3 THEN
  501. startcell% = cellnum% : REM this ALTERS, rather than adds, a note
  502. shunt$ = "N"
  503. ENDIF
  504. :
  505. IF cellnum% > 0 THEN
  506. :
  507. IF newvalue% = (array%(cellnum%+1,0,voice%)) DIV 10^3 THEN
  508. startcell% = cellnum%+1 : REM this ALTERS too
  509. shunt$ = "N"
  510. ENDIF
  511. :
  512. :
  513. IF newvalue% = (array%(cellnum%-1,0,voice%)) DIV 10^3 THEN
  514. startcell% = cellnum%-1 : REM this ALTERS too
  515. shunt$ = "N"
  516. ENDIF
  517. :
  518. IF newvalue% > (array%(cellnum%,0,voice%) DIV 10^3) AND newvalue% < (array%(cellnum%+1,0,voice%) DIV 10^3) THEN
  519. startcell% = (cellnum%+1) : REM newvalue immediately to right of cellnum
  520. shunt$ = "Y"
  521. ENDIF
  522. :
  523. :
  524. IF newvalue% < (array%(cellnum%,0,voice%) DIV 10^3) AND newvalue% > (array%(cellnum%-1,0,voice%) DIV 10^3) THEN
  525. startcell% = cellnum% : REM immediately to left
  526. shunt$ = "Y"
  527. ENDIF
  528. :
  529. :
  530. IF newvalue% > (array%(cellnum%+1,0,voice%) DIV 10^3) THEN
  531. IF distance% = 1 THEN distance% = 2
  532. distance% = distance%/2
  533. cellnum% = cellnum% + distance%
  534. ENDIF
  535. :
  536. :
  537. IF newvalue% < (array%(cellnum%-1,0,voice%) DIV 10^3) THEN
  538. IF distance% = 1 THEN distance% = 2
  539. distance% = distance%/2
  540. cellnum% = cellnum% - distance%
  541. ENDIF
  542. ENDIF
  543. :
  544. :
  545. UNTIL startcell% > -1
  546. :
  547. ENDPROC
  548. :
  549. REM***************************************************
  550. :
  551. DEF PROCplay
  552. :
  553. waveload$ = "notdone"
  554. :
  555. BEATS 960 : REM 2/4 bars, 480 each crotchet
  556. tic%() = 0
  557. tun%() = 0
  558. :
  559. IF play$ = "play" THEN
  560. IF easiermenus$ = "n" THEN PROCwindow(20,69,60,55) ELSE PROCwindow(20,69,60,42)
  561. CLS
  562. INPUT'" Starting at bar "startingbar%
  563. INPUT " beat "beats%
  564. PROCalterbeats : startbeat% = beats%
  565. INPUT " and ending at bar "endbar%
  566. INPUT'" How many voices "nvoices%
  567. ENDIF
  568. :
  569. :
  570. FOR count% = 1 TO nvoices%
  571. IF play$ = "play" THEN
  572. PRINT'" voice number ";count%;" is which voice number"
  573. INPUT vnumber%
  574. playvoices%(count%) = vnumber%
  575. ELSE vnumber% = playvoices%(count%)
  576. ENDIF
  577. :
  578. IF usebeep$ = "n" THEN
  579. CASE count% OF
  580. WHEN 1 :
  581. CASE waveforms$(vnumber%) OF
  582. WHEN "WaveSynth-Beep" : *CHANNELVOICE 1 WaveSynth-Beep
  583. WHEN "StringLib-Soft" : *CHANNELVOICE 1 StringLib-Soft
  584. WHEN "StringLib-Pluck" : *CHANNELVOICE 1 StringLib-Pluck
  585. WHEN "StringLib-Steel" : *CHANNELVOICE 1 StringLib-Steel
  586. WHEN "StringLib-Hard" : *CHANNELVOICE 1 StringLib-Hard
  587. WHEN "Percussion-Soft" : *CHANNELVOICE 1 Percussion-Soft
  588. WHEN "Percussion-Medium" : *CHANNELVOICE 1 Percussion-Medium
  589. WHEN "Percussion-Snare" : *CHANNELVOICE 1 Percussion-Snare
  590. WHEN "Percussion-Noise" : *CHANNELVOICE 1 Percussion-Noise
  591. WHEN "BassBowAb" : *CHANNELVOICE 1 BassBowAb
  592. tun%(1) = -1470
  593. WHEN "AcouBass" : *CHANNELVOICE 1 AcouBass
  594. tun%(1) = -2731
  595. WHEN "Vibe" : *CHANNELVOICE 1 Vibe
  596. tun%(1) = -6912
  597. WHEN "BugleC" : *CHANNELVOICE 1 BugleC
  598. tun%(1) = -11008
  599. WHEN "CornetEb" : *CHANNELVOICE 1 CornetEb
  600. tun%(1) = -12117
  601. WHEN "SaxEbBarC" : *CHANNELVOICE 1 SaxEbBarC
  602. tun%(1) = -2816
  603. WHEN "SaxBbTenrE" : *CHANNELVOICE 1 SaxBbTenrE
  604. tun%(1) = -4181
  605. WHEN "BassoonEb" : *CHANNELVOICE 1 BassoonEb
  606. tun%(1) = -4011
  607. WHEN "ClarinetBb" : *CHANNELVOICE 1 ClarinetBb
  608. tun%(1) = -10325
  609. WHEN "EngHornGb" : *CHANNELVOICE 1 EngHornGb
  610. tun%(1) = -8960
  611. WHEN "MandolinDb" : *CHANNELVOICE 1 MandolinDb
  612. tun%(1) = -11264
  613. WHEN "Piano2B" : *CHANNELVOICE 1 Piano2B
  614. tun%(1) = -2475
  615. WHEN "ClarVibEb" : *CHANNELVOICE 1 ClarVibEb
  616. tun%(1) = -7850
  617. WHEN "GtrDobroB" : *CHANNELVOICE 1 GtrDobroB
  618. tun%(1) = -6485
  619. WHEN "RecorderGb" : *CHANNELVOICE 1 RecorderGb
  620. tun%(1) = -13056
  621. WHEN "FlugelHnEb" : *CHANNELVOICE 1 FlugelHnEb
  622. tun%(1) = -12032
  623. WHEN "VceMmmGb23" : *CHANNELVOICE 1 VceMmmGb23
  624. tun%(1) = -853
  625. WHEN "VceMOooGb3" : *CHANNELVOICE 1 VceMOooGb3
  626. tun%(1) = -4843
  627. WHEN "VceFemAahC" : *CHANNELVOICE 1 VceFemAahC
  628. tun%(1) = -10948
  629. WHEN "VceFMmmGb4" : *CHANNELVOICE 1 VceFMmmGb4
  630. tun%(1) = -8918
  631. WHEN "Bass" : *CHANNELVOICE 1 Bass
  632. tun%(1) = 0
  633. WHEN "ChurchBell" : *CHANNELVOICE 1 ChurchBell
  634. tun%(1) = -2731
  635. WHEN "mysound" : *CHANNELVOICE 1 mysound
  636. tun%(1) = 0
  637. WHEN "GuiroFast" : *CHANNELVOICE 1 GuiroFast
  638. tun%(1) = -4000
  639. WHEN "Clave" : *CHANNELVOICE 1 Clave
  640. tun%(1) = -8096
  641. WHEN "CowBell" : *CHANNELVOICE 1 CowBell
  642. tun%(1) = -5707
  643. WHEN "CymbRideHd" : *CHANNELVOICE 1 CymbRideHd
  644. tun%(1) = -8096
  645. WHEN "AcGuitar1" : *CHANNELVOICE 1 AcGuitar1
  646. tun%(1) = -7072
  647. WHEN "CongaHi" : *CHANNELVOICE 1 CongaHi
  648. tun%(1) = -4000
  649. WHEN "DrumExplo" : *CHANNELVOICE 1 DrumExplo
  650. tun%(1) = -4000
  651. WHEN "ElecTom1" : *CHANNELVOICE 1 ElecTom1
  652. tun%(1) = -8096
  653. WHEN "Harp1" : *CHANNELVOICE 1 Harp1
  654. tun%(1) = -10997
  655. WHEN "Harpsi" : *CHANNELVOICE 1 Harpsi
  656. tun%(1) = -6901
  657. WHEN "HiString" : *CHANNELVOICE 1 HiString
  658. tun%(1) = -10997
  659. WHEN "HonkyPiano" : *CHANNELVOICE 1 HonkyPiano
  660. tun%(1) = -6901
  661. WHEN "JapFlute" : *CHANNELVOICE 1 JapFlute
  662. tun%(1) = -10997
  663. WHEN "JazzOrgan" : *CHANNELVOICE 1 JazzOrgan
  664. tun%(1) = -10997
  665. WHEN "MidStrings" : *CHANNELVOICE 1 MidStrings
  666. tun%(1) = -6901
  667. WHEN "NoteArp1" : *CHANNELVOICE 1 NoteArp1
  668. tun%(1) = -4000
  669. WHEN "SnareEcho" : *CHANNELVOICE 1 SnareEcho
  670. tun%(1) = -4341
  671. WHEN "TablaHi" : *CHANNELVOICE 1 TablaHi
  672. tun%(1) = -7669
  673. WHEN "Timpani" : *CHANNELVOICE 1 Timpani
  674. tun%(1) = -928
  675. WHEN "Tomtom1" : *CHANNELVOICE 1 Tomtom1
  676. tun%(1) = -5365
  677. WHEN "Trombone1" : *CHANNELVOICE 1 Trombone1
  678. tun%(1) = -6901
  679. WHEN "Trumpet" : *CHANNELVOICE 1 Trumpet
  680. tun%(1) = -10997
  681. WHEN "Xylophone" : *CHANNELVOICE 1 Xylophone
  682. tun%(1) = -6901
  683. WHEN "AcouGtr2B" : *CHANNELVOICE 1 AcouGtr2B
  684. tun%(1) = -6560
  685. WHEN "AcuBassAb1" : *CHANNELVOICE 1 AcuBassAb1
  686. tun%(1) = -1610
  687. WHEN "BagPipeG" : *CHANNELVOICE 1 BagPipeG
  688. tun%(1) = -9291
  689. WHEN "BanjoChdBb" : *CHANNELVOICE 1 BanjoChdBb
  690. tun%(1) = -4000
  691. WHEN "BazookiE" : *CHANNELVOICE 1 BazookiE
  692. tun%(1) = -8267
  693. WHEN "BellC" : *CHANNELVOICE 1 BellC
  694. tun%(1) = -10997
  695. WHEN "BrassEns1B" : *CHANNELVOICE 1 BrassEns1B
  696. tun%(1) = -6560
  697. WHEN "ClavichdBb" : *CHANNELVOICE 1 ClavichdBb
  698. tun%(1) = -10315
  699. WHEN "ClavinetBb" : *CHANNELVOICE 1 ClavinetBb
  700. tun%(1) = -6219
  701. WHEN "CornetEb" : *CHANNELVOICE 1 CornetEb
  702. tun%(1) = -4000
  703. WHEN "EnsWodAb45" : *CHANNELVOICE 1 EnsWodAb45
  704. tun%(1) = -9632
  705. WHEN "EnsWodGb12" : *CHANNELVOICE 1 EnsWodGb12
  706. tun%(1) = -4853
  707. WHEN "Glock2Ab5" : *CHANNELVOICE 1 Glock2Ab5
  708. tun%(1) = -9632
  709. WHEN "GtMelobarC" : *CHANNELVOICE 1 GtMelobarC
  710. tun%(1) = -6901
  711. WHEN "GtWashbnBb" : *CHANNELVOICE 1 GtWashbnBb
  712. tun%(1) = -6219
  713. WHEN "HarmonicaE" : *CHANNELVOICE 1 HarmonicaE
  714. tun%(1) = -4171
  715. WHEN "Jew'sHarpA" : *CHANNELVOICE 1 Jew'sHarpA
  716. tun%(1) = -6219
  717. WHEN "MusetteB" : *CHANNELVOICE 1 MusetteB
  718. tun%(1) = -10656
  719. WHEN "OboeGb" : *CHANNELVOICE 1 OboeGb
  720. tun%(1) = -13131
  721. WHEN "OrchHit2B" : *CHANNELVOICE 1 OrchHit2B
  722. tun%(1) = -5451
  723. WHEN "OrcSusBb23" : *CHANNELVOICE 1 OrcSusBb23
  724. tun%(1) = -6304
  725. WHEN "PiccoloE" : *CHANNELVOICE 1 PiccoloE
  726. tun%(1) = -16544
  727. WHEN "SaxSoprnoE" : *CHANNELVOICE 1 SaxSoprnoE
  728. tun%(1) = -12448
  729. WHEN "StrngThkBb" : *CHANNELVOICE 1 StrngThkBb
  730. tun%(1) = -5792
  731. WHEN "TubaGb" : *CHANNELVOICE 1 TubaGb
  732. tun%(1) = -929
  733. WHEN "BassDrum" : *CHANNELVOICE 1 BassDrum
  734. tun%(1) = -4000
  735. WHEN "HiHat" : *CHANNELVOICE 1 HiHat
  736. tun%(1) = -4000
  737. WHEN "OrcHit" : *CHANNELVOICE 1 OrcHit
  738. tun%(1) = -4085
  739. WHEN "Piano" : *CHANNELVOICE 1 Piano
  740. tun%(1) = -4171
  741. WHEN "Sax" : *CHANNELVOICE 1 Sax
  742. tun%(1) = -4085
  743. WHEN "Snare" : *CHANNELVOICE 1 Snare
  744. tun%(1) = -8096
  745. WHEN "Choir1" : *CHANNELVOICE 1 Choir1
  746. tun%(1) = -6901
  747. WHEN "ChurOrgan" : *CHANNELVOICE 1 ChurOrgan
  748. tun%(1) = -6901
  749. WHEN "Opera" : *CHANNELVOICE 1 Opera
  750. tun%(1) = -13387
  751. WHEN "OrchChoir" : *CHANNELVOICE 1 OrchChoir
  752. tun%(1) = -6133
  753. WHEN "OrganHit" : *CHANNELVOICE 1 OrganHit
  754. tun%(1) = -5024
  755. WHEN "AgogoAfric" : *CHANNELVOICE 1 AgogoAfric
  756. tun%(1) = -6219
  757. WHEN "AgogoBrazi" : *CHANNELVOICE 1 AgogoBrazi
  758. tun%(1) = -10997
  759. WHEN "AgogoWood" : *CHANNELVOICE 1 AgogoWood
  760. tun%(1) = -13728
  761. WHEN "BDGatedRev" : *CHANNELVOICE 1 BDGatedRev
  762. tun%(1) = -5877
  763. WHEN "BDMarching" : *CHANNELVOICE 1 BDMarching
  764. tun%(1) = -8608
  765. WHEN "BDPiloMute" : *CHANNELVOICE 1 BDPiloMute
  766. tun%(1) = -7072
  767. WHEN "Cabasa" : *CHANNELVOICE 1 Cabasa
  768. tun%(1) = -7072
  769. WHEN "Cachichi1" : *CHANNELVOICE 1 Cachichi1
  770. tun%(1) = -4000
  771. WHEN "CachichiTr" : *CHANNELVOICE 1 CachichiTr
  772. tun%(1) = -8096
  773. WHEN "Castanets" : *CHANNELVOICE 1 Castanets
  774. tun%(1) = -4000
  775. WHEN "CongaMid" : *CHANNELVOICE 1 CongaMid
  776. tun%(1) = -4171
  777. WHEN "CongaSmCl" : *CHANNELVOICE 1 CongaSmCl
  778. tun%(1) = -4683
  779. WHEN "CymbalCrsh" : *CHANNELVOICE 1 CymbalCrsh
  780. tun%(1) = -4000
  781. WHEN "CymRideBel" : *CHANNELVOICE 1 CymRideBel
  782. tun%(1) = -16288
  783. WHEN "CymRStRoll" : *CHANNELVOICE 1 CymRStRoll
  784. tun%(1) = -6389
  785. WHEN "CymSplshCa" : *CHANNELVOICE 1 CymSplshCa
  786. tun%(1) = -9120
  787. WHEN "Flexitone" : *CHANNELVOICE 1 Flexitone
  788. tun%(1) = -8096
  789. WHEN "GongSoft" : *CHANNELVOICE 1 GongSoft
  790. tun%(1) = -5365
  791. WHEN "Gonza1" : *CHANNELVOICE 1 Gonza1
  792. tun%(1) = -12192
  793. WHEN "GuiroSlow" : *CHANNELVOICE 1 GuiroSlow
  794. tun%(1) = -6048
  795. WHEN "HandClaps" : *CHANNELVOICE 1 HandClaps
  796. tun%(1) = -4000
  797. WHEN "HiHatFoot" : *CHANNELVOICE 1 HiHatFoot
  798. tun%(1) = -6389
  799. WHEN "Maracas1" : *CHANNELVOICE 1 Maracas1
  800. tun%(1) = -8096
  801. WHEN "MarimbaSB3" : *CHANNELVOICE 1 MarimbaSB3
  802. tun%(1) = -4000
  803. WHEN "Ratchet" : *CHANNELVOICE 1 Ratchet
  804. tun%(1) = -6731
  805. WHEN "RotoTomRev" : *CHANNELVOICE 1 RotoTomRev
  806. tun%(1) = -6133
  807. WHEN "SimmonsBD1" : *CHANNELVOICE 1 SimmonsBD1
  808. tun%(1) = -8096
  809. WHEN "SimmonsSn1" : *CHANNELVOICE 1 SimmonsSn1
  810. tun%(1) = -5707
  811. WHEN "SleighBell" : *CHANNELVOICE 1 SleighBell
  812. tun%(1) = -4000
  813. WHEN "SuperGong" : *CHANNELVOICE 1 SuperGong
  814. tun%(1) = -4341
  815. WHEN "SynthSnare" : *CHANNELVOICE 1 SynthSnare
  816. tun%(1) = -4000
  817. WHEN "SynTom" : *CHANNELVOICE 1 SynTom
  818. tun%(1) = -9120
  819. WHEN "TimpCresBb" : *CHANNELVOICE 1 TimpCresBb
  820. tun%(1) = -5962
  821. WHEN "TimpLowBb" : *CHANNELVOICE 1 TimpLowBb
  822. tun%(1) = -5707
  823. WHEN "TimpRollEb" : *CHANNELVOICE 1 TimpRollEb
  824. tun%(1) = -4000
  825. WHEN "TomRoll" : *CHANNELVOICE 1 TomRoll
  826. tun%(1) = -4000
  827. WHEN "ToyHooter" : *CHANNELVOICE 1 ToyHooter
  828. tun%(1) = -9717
  829. WHEN "ToyWhistle" : *CHANNELVOICE 1 ToyWhistle
  830. tun%(1) = -4000
  831. ENDCASE
  832. :
  833. WHEN 2 :
  834. CASE waveforms$(vnumber%) OF
  835. WHEN "WaveSynth-Beep" : *CHANNELVOICE 2 WaveSynth-Beep
  836. WHEN "StringLib-Soft" : *CHANNELVOICE 2 StringLib-Soft
  837. WHEN "StringLib-Pluck" : *CHANNELVOICE 2 StringLib-Pluck
  838. WHEN "StringLib-Steel" : *CHANNELVOICE 2 StringLib-Steel
  839. WHEN "StringLib-Hard" : *CHANNELVOICE 2 StringLib-Hard
  840. WHEN "Percussion-Soft" : *CHANNELVOICE 2 Percussion-Soft
  841. WHEN "Percussion-Medium" : *CHANNELVOICE 2 Percussion-Medium
  842. WHEN "Percussion-Snare" : *CHANNELVOICE 2 Percussion-Snare
  843. WHEN "Percussion-Noise" : *CHANNELVOICE 2 Percussion-Noise
  844. WHEN "BassBowAb" : *CHANNELVOICE 2 BassBowAb
  845. tun%(2) = -1470
  846. WHEN "AcouBass" : *CHANNELVOICE 2 AcouBass
  847. tun%(2) = -2731
  848. WHEN "Vibe" : *CHANNELVOICE 2 Vibe
  849. tun%(2) = -6912
  850. WHEN "BugleC" : *CHANNELVOICE 2 BugleC
  851. tun%(2) = -11008
  852. WHEN "CornetEb" : *CHANNELVOICE 2 CornetEb
  853. tun%(2) = -12117
  854. WHEN "SaxEbBarC" : *CHANNELVOICE 2 SaxEbBarC
  855. tun%(2) = -2816
  856. WHEN "SaxBbTenrE" : *CHANNELVOICE 2 SaxBbTenrE
  857. tun%(2) = -4181
  858. WHEN "BassoonEb" : *CHANNELVOICE 2 BassoonEb
  859. tun%(2) = -4011
  860. WHEN "ClarinetBb" : *CHANNELVOICE 2 ClarinetBb
  861. tun%(2) = -10325
  862. WHEN "EngHornGb" : *CHANNELVOICE 2 EngHornGb
  863. tun%(2) = -8960
  864. WHEN "MandolinDb" : *CHANNELVOICE 2 MandolinDb
  865. tun%(2) = -11264
  866. WHEN "Piano2B" : *CHANNELVOICE 2 Piano2B
  867. tun%(2) = -2475
  868. WHEN "ClarVibEb" : *CHANNELVOICE 2 ClarVibEb
  869. tun%(2) = -7850
  870. WHEN "GtrDobroB" : *CHANNELVOICE 2 GtrDobroB
  871. tun%(2) = -6485
  872. WHEN "RecorderGb" : *CHANNELVOICE 2 RecorderGb
  873. tun%(2) = -13056
  874. WHEN "FlugelHnEb" : *CHANNELVOICE 2 FlugelHnEb
  875. tun%(2) = -12032
  876. WHEN "VceMmmGb23" : *CHANNELVOICE 2 VceMmmGb23
  877. tun%(2) = -853
  878. WHEN "VceMOooGb3" : *CHANNELVOICE 2 VceMOooGb3
  879. tun%(2) = -4843
  880. WHEN "VceFemAahC" : *CHANNELVOICE 2 VceFemAahC
  881. tun%(2) = -10948
  882. WHEN "VceFMmmGb4" : *CHANNELVOICE 2 VceFMmmGb4
  883. tun%(2) = -8918
  884. WHEN "Bass" : *CHANNELVOICE 2 Bass
  885. tun%(2) = 0
  886. WHEN "ChurchBell" : *CHANNELVOICE 2 ChurchBell
  887. tun%(2) = -2731
  888. WHEN "mysound" : *CHANNELVOICE 2 mysound
  889. tun%(2) = 0
  890. WHEN "GuiroFast" : *CHANNELVOICE 2 GuiroFast
  891. tun%(2) = -4000
  892. WHEN "Clave" : *CHANNELVOICE 2 Clave
  893. tun%(2) = -8096
  894. WHEN "CowBell" : *CHANNELVOICE 2 CowBell
  895. tun%(2) = -5707
  896. WHEN "CymbRideHd" : *CHANNELVOICE 2 CymbRideHd
  897. tun%(2) = -8096
  898. WHEN "AcGuitar1" : *CHANNELVOICE 2 AcGuitar1
  899. tun%(2) = -7072
  900. WHEN "CongaHi" : *CHANNELVOICE 2 CongaHi
  901. tun%(2) = -4000
  902. WHEN "DrumExplo" : *CHANNELVOICE 2 DrumExplo
  903. tun%(2) = -4000
  904. WHEN "ElecTom1" : *CHANNELVOICE 2 ElecTom1
  905. tun%(2) = -8096
  906. WHEN "Harp1" : *CHANNELVOICE 2 Harp1
  907. tun%(2) = -10997
  908. WHEN "Harpsi" : *CHANNELVOICE 2 Harpsi
  909. tun%(2) = -6901
  910. WHEN "HiString" : *CHANNELVOICE 2 HiString
  911. tun%(2) = -10997
  912. WHEN "HonkyPiano" : *CHANNELVOICE 2 HonkyPiano
  913. tun%(2) = -6901
  914. WHEN "JapFlute" : *CHANNELVOICE 2 JapFlute
  915. tun%(2) = -10997
  916. WHEN "JazzOrgan" : *CHANNELVOICE 2 JazzOrgan
  917. tun%(2) = -10997
  918. WHEN "MidStrings" : *CHANNELVOICE 2 MidStrings
  919. tun%(2) = -6901
  920. WHEN "NoteArp1" : *CHANNELVOICE 2 NoteArp1
  921. tun%(2) = -4000
  922. WHEN "SnareEcho" : *CHANNELVOICE 2 SnareEcho
  923. tun%(2) = -4341
  924. WHEN "TablaHi" : *CHANNELVOICE 2 TablaHi
  925. tun%(2) = -7669
  926. WHEN "Timpani" : *CHANNELVOICE 2 Timpani
  927. tun%(2) = -928
  928. WHEN "Tomtom1" : *CHANNELVOICE 2 Tomtom1
  929. tun%(2) = -5365
  930. WHEN "Trombone1" : *CHANNELVOICE 2 Trombone1
  931. tun%(2) = -6901
  932. WHEN "Trumpet" : *CHANNELVOICE 2 Trumpet
  933. tun%(2) = -10997
  934. WHEN "Xylophone" : *CHANNELVOICE 2 Xylophone
  935. tun%(2) = -6901
  936. WHEN "AcouGtr2B" : *CHANNELVOICE 2 AcouGtr2B
  937. tun%(2) = -6560
  938. WHEN "AcuBassAb1" : *CHANNELVOICE 2 AcuBassAb1
  939. tun%(2) = -1610
  940. WHEN "BagPipeG" : *CHANNELVOICE 2 BagPipeG
  941. tun%(2) = -9291
  942. WHEN "BanjoChdBb" : *CHANNELVOICE 2 BanjoChdBb
  943. tun%(2) = -4000
  944. WHEN "BazookiE" : *CHANNELVOICE 2 BazookiE
  945. tun%(2) = -8267
  946. WHEN "BellC" : *CHANNELVOICE 2 BellC
  947. tun%(2) = -10997
  948. WHEN "BrassEns1B" : *CHANNELVOICE 2 BrassEns1B
  949. tun%(2) = -6560
  950. WHEN "ClavichdBb" : *CHANNELVOICE 2 ClavichdBb
  951. tun%(2) = -10315
  952. WHEN "ClavinetBb" : *CHANNELVOICE 2 ClavinetBb
  953. tun%(2) = -6219
  954. WHEN "CornetEb" : *CHANNELVOICE 2 CornetEb
  955. tun%(2) = -4000
  956. WHEN "EnsWodAb45" : *CHANNELVOICE 2 EnsWodAb45
  957. tun%(2) = -9632
  958. WHEN "EnsWodGb12" : *CHANNELVOICE 2 EnsWodGb12
  959. tun%(2) = -4853
  960. WHEN "Glock2Ab5" : *CHANNELVOICE 2 Glock2Ab5
  961. tun%(2) = -9632
  962. WHEN "GtMelobarC" : *CHANNELVOICE 2 GtMelobarC
  963. tun%(2) = -6901
  964. WHEN "GtWashbnBb" : *CHANNELVOICE 2 GtWashbnBb
  965. tun%(2) = -6219
  966. WHEN "HarmonicaE" : *CHANNELVOICE 2 HarmonicaE
  967. tun%(2) = -4171
  968. WHEN "Jew'sHarpA" : *CHANNELVOICE 2 Jew'sHarpA
  969. tun%(2) = -6219
  970. WHEN "MusetteB" : *CHANNELVOICE 2 MusetteB
  971. tun%(2) = -10656
  972. WHEN "OboeGb" : *CHANNELVOICE 2 OboeGb
  973. tun%(2) = -13131
  974. WHEN "OrchHit2B" : *CHANNELVOICE 2 OrchHit2B
  975. tun%(2) = -5451
  976. WHEN "OrcSusBb23" : *CHANNELVOICE 2 OrcSusBb23
  977. tun%(2) = -6304
  978. WHEN "PiccoloE" : *CHANNELVOICE 2 PiccoloE
  979. tun%(2) = -16544
  980. WHEN "SaxSoprnoE" : *CHANNELVOICE 2 SaxSoprnoE
  981. tun%(2) = -12448
  982. WHEN "StrngThkBb" : *CHANNELVOICE 2 StrngThkBb
  983. tun%(2) = -5792
  984. WHEN "TubaGb" : *CHANNELVOICE 2 TubaGb
  985. tun%(2) = -929
  986. WHEN "BassDrum" : *CHANNELVOICE 2 BassDrum
  987. tun%(2) = -4000
  988. WHEN "HiHat" : *CHANNELVOICE 2 HiHat
  989. tun%(2) = -4000
  990. WHEN "OrcHit" : *CHANNELVOICE 2 OrcHit
  991. tun%(2) = -4085
  992. WHEN "Piano" : *CHANNELVOICE 2 Piano
  993. tun%(2) = -4171
  994. WHEN "Sax" : *CHANNELVOICE 2 Sax
  995. tun%(2) = -4085
  996. WHEN "Snare" : *CHANNELVOICE 2 Snare
  997. tun%(2) = -8096
  998. WHEN "Choir1" : *CHANNELVOICE 2 Choir1
  999. tun%(2) = -6901
  1000. WHEN "ChurOrgan" : *CHANNELVOICE 2 ChurOrgan
  1001. tun%(2) = -6901
  1002. WHEN "Opera" : *CHANNELVOICE 2 Opera
  1003. tun%(2) = -13387
  1004. WHEN "OrchChoir" : *CHANNELVOICE 2 OrchChoir
  1005. tun%(2) = -6133
  1006. WHEN "OrganHit" : *CHANNELVOICE 2 OrganHit
  1007. tun%(2) = -5024
  1008. WHEN "AgogoAfric" : *CHANNELVOICE 2 AgogoAfric
  1009. tun%(2) = -6219
  1010. WHEN "AgogoBrazi" : *CHANNELVOICE 2 AgogoBrazi
  1011. tun%(2) = -10997
  1012. WHEN "AgogoWood" : *CHANNELVOICE 2 AgogoWood
  1013. tun%(2) = -13728
  1014. WHEN "BDGatedRev" : *CHANNELVOICE 2 BDGatedRev
  1015. tun%(2) = -5877
  1016. WHEN "BDMarching" : *CHANNELVOICE 2 BDMarching
  1017. tun%(2) = -8608
  1018. WHEN "BDPiloMute" : *CHANNELVOICE 2 BDPiloMute
  1019. tun%(2) = -7072
  1020. WHEN "Cabasa" : *CHANNELVOICE 2 Cabasa
  1021. tun%(2) = -7072
  1022. WHEN "Cachichi1" : *CHANNELVOICE 2 Cachichi1
  1023. tun%(2) = -4000
  1024. WHEN "CachichiTr" : *CHANNELVOICE 2 CachichiTr
  1025. tun%(2) = -8096
  1026. WHEN "Castanets" : *CHANNELVOICE 2 Castanets
  1027. tun%(2) = -4000
  1028. WHEN "CongaMid" : *CHANNELVOICE 2 CongaMid
  1029. tun%(2) = -4171
  1030. WHEN "CongaSmCl" : *CHANNELVOICE 2 CongaSmCl
  1031. tun%(2) = -4683
  1032. WHEN "CymbalCrsh" : *CHANNELVOICE 2 CymbalCrsh
  1033. tun%(2) = -4000
  1034. WHEN "CymRideBel" : *CHANNELVOICE 2 CymRideBel
  1035. tun%(2) = -16288
  1036. WHEN "CymRStRoll" : *CHANNELVOICE 2 CymRStRoll
  1037. tun%(2) = -6389
  1038. WHEN "CymSplshCa" : *CHANNELVOICE 2 CymSplshCa
  1039. tun%(2) = -9120
  1040. WHEN "Flexitone" : *CHANNELVOICE 2 Flexitone
  1041. tun%(2) = -8096
  1042. WHEN "GongSoft" : *CHANNELVOICE 2 GongSoft
  1043. tun%(2) = -5365
  1044. WHEN "Gonza1" : *CHANNELVOICE 2 Gonza1
  1045. tun%(2) = -12192
  1046. WHEN "GuiroSlow" : *CHANNELVOICE 2 GuiroSlow
  1047. tun%(2) = -6048
  1048. WHEN "HandClaps" : *CHANNELVOICE 2 HandClaps
  1049. tun%(2) = -4000
  1050. WHEN "HiHatFoot" : *CHANNELVOICE 2 HiHatFoot
  1051. tun%(2) = -6389
  1052. WHEN "Maracas1" : *CHANNELVOICE 2 Maracas1
  1053. tun%(2) = -8096
  1054. WHEN "MarimbaSB3" : *CHANNELVOICE 2 MarimbaSB3
  1055. tun%(2) = -4000
  1056. WHEN "Ratchet" : *CHANNELVOICE 2 Ratchet
  1057. tun%(2) = -6731
  1058. WHEN "RotoTomRev" : *CHANNELVOICE 2 RotoTomRev
  1059. tun%(2) = -6133
  1060. WHEN "SimmonsBD1" : *CHANNELVOICE 2 SimmonsBD1
  1061. tun%(2) = -8096
  1062. WHEN "SimmonsSn1" : *CHANNELVOICE 2 SimmonsSn1
  1063. tun%(2) = -5707
  1064. WHEN "SleighBell" : *CHANNELVOICE 2 SleighBell
  1065. tun%(2) = -4000
  1066. WHEN "SuperGong" : *CHANNELVOICE 2 SuperGong
  1067. tun%(2) = -4341
  1068. WHEN "SynthSnare" : *CHANNELVOICE 2 SynthSnare
  1069. tun%(2) = -4000
  1070. WHEN "SynTom" : *CHANNELVOICE 2 SynTom
  1071. tun%(2) = -9120
  1072. WHEN "TimpCresBb" : *CHANNELVOICE 2 TimpCresBb
  1073. tun%(2) = -5962
  1074. WHEN "TimpLowBb" : *CHANNELVOICE 2 TimpLowBb
  1075. tun%(2) = -5707
  1076. WHEN "TimpRollEb" : *CHANNELVOICE 2 TimpRollEb
  1077. tun%(2) = -4000
  1078. WHEN "TomRoll" : *CHANNELVOICE 2 TomRoll
  1079. tun%(2) = -4000
  1080. WHEN "ToyHooter" : *CHANNELVOICE 2 ToyHooter
  1081. tun%(2) = -9717
  1082. WHEN "ToyWhistle" : *CHANNELVOICE 2 ToyWhistle
  1083. tun%(2) = -4000
  1084. ENDCASE
  1085. WHEN 3 :
  1086. CASE waveforms$(vnumber%) OF
  1087. WHEN "WaveSynth-Beep" : *CHANNELVOICE 3 WaveSynth-Beep
  1088. WHEN "StringLib-Soft" : *CHANNELVOICE 3 StringLib-Soft
  1089. WHEN "StringLib-Pluck" : *CHANNELVOICE 3 StringLib-Pluck
  1090. WHEN "StringLib-Steel" : *CHANNELVOICE 3 StringLib-Steel
  1091. WHEN "StringLib-Hard" : *CHANNELVOICE 3 StringLib-Hard
  1092. WHEN "Percussion-Soft" : *CHANNELVOICE 3 Percussion-Soft
  1093. WHEN "Percussion-Medium" : *CHANNELVOICE 3 Percussion-Medium
  1094. WHEN "Percussion-Snare" : *CHANNELVOICE 3 Percussion-Snare
  1095. WHEN "Percussion-Noise" : *CHANNELVOICE 3 Percussion-Noise
  1096. WHEN "BassBowAb" : *CHANNELVOICE 3 BassBowAb
  1097. tun%(3) = -1470
  1098. WHEN "AcouBass" : *CHANNELVOICE 3 AcouBass
  1099. tun%(3) = -2731
  1100. WHEN "Vibe" : *CHANNELVOICE 3 Vibe
  1101. tun%(3) = -6912
  1102. WHEN "BugleC" : *CHANNELVOICE 3 BugleC
  1103. tun%(3) = -11008
  1104. WHEN "CornetEb" : *CHANNELVOICE 3 CornetEb
  1105. tun%(3) = -12117
  1106. WHEN "SaxEbBarC" : *CHANNELVOICE 3 SaxEbBarC
  1107. tun%(3) = -2816
  1108. WHEN "SaxBbTenrE" : *CHANNELVOICE 3 SaxBbTenrE
  1109. tun%(3) = -4181
  1110. WHEN "BassoonEb" : *CHANNELVOICE 3 BassoonEb
  1111. tun%(3) = -4011
  1112. WHEN "ClarinetBb" : *CHANNELVOICE 3 ClarinetBb
  1113. tun%(3) = -10325
  1114. WHEN "EngHornGb" : *CHANNELVOICE 3 EngHornGb
  1115. tun%(3) = -8960
  1116. WHEN "MandolinDb" : *CHANNELVOICE 3 MandolinDb
  1117. tun%(3) = -11264
  1118. WHEN "Piano2B" : *CHANNELVOICE 3 Piano2B
  1119. tun%(3) = -2475
  1120. WHEN "ClarVibEb" : *CHANNELVOICE 3 ClarVibEb
  1121. tun%(3) = -7850
  1122. WHEN "GtrDobroB" : *CHANNELVOICE 3 GtrDobroB
  1123. tun%(3) = -6485
  1124. WHEN "RecorderGb" : *CHANNELVOICE 3 RecorderGb
  1125. tun%(3) = -13056
  1126. WHEN "FlugelHnEb" : *CHANNELVOICE 3 FlugelHnEb
  1127. tun%(3) = -12032
  1128. WHEN "VceMmmGb23" : *CHANNELVOICE 3 VceMmmGb23
  1129. tun%(3) = -853
  1130. WHEN "VceMOooGb3" : *CHANNELVOICE 3 VceMOooGb3
  1131. tun%(3) = -4843
  1132. WHEN "VceFemAahC" : *CHANNELVOICE 3 VceFemAahC
  1133. tun%(3) = -10948
  1134. WHEN "VceFMmmGb4" : *CHANNELVOICE 3 VceFMmmGb4
  1135. tun%(3) = -8918
  1136. WHEN "Bass" : *CHANNELVOICE 3 Bass
  1137. tun%(3) = 0
  1138. WHEN "ChurchBell" : *CHANNELVOICE 3 ChurchBell
  1139. tun%(3) = -2731
  1140. WHEN "mysound" : *CHANNELVOICE 3 mysound
  1141. tun%(3) = 0
  1142. WHEN "GuiroFast" : *CHANNELVOICE 3 GuiroFast
  1143. tun%(3) = -4000
  1144. WHEN "Clave" : *CHANNELVOICE 3 Clave
  1145. tun%(3) = -8096
  1146. WHEN "CowBell" : *CHANNELVOICE 3 CowBell
  1147. tun%(3) = -5707
  1148. WHEN "CymbRideHd" : *CHANNELVOICE 3 CymbRideHd
  1149. tun%(3) = -8096
  1150. WHEN "AcGuitar1" : *CHANNELVOICE 3 AcGuitar1
  1151. tun%(3) = -7072
  1152. WHEN "CongaHi" : *CHANNELVOICE 3 CongaHi
  1153. tun%(3) = -4000
  1154. WHEN "DrumExplo" : *CHANNELVOICE 3 DrumExplo
  1155. tun%(3) = -4000
  1156. WHEN "ElecTom1" : *CHANNELVOICE 3 ElecTom1
  1157. tun%(3) = -8096
  1158. WHEN "Harp1" : *CHANNELVOICE 3 Harp1
  1159. tun%(3) = -10997
  1160. WHEN "Harpsi" : *CHANNELVOICE 3 Harpsi
  1161. tun%(3) = -6901
  1162. WHEN "HiString" : *CHANNELVOICE 3 HiString
  1163. tun%(3) = -10997
  1164. WHEN "HonkyPiano" : *CHANNELVOICE 3 HonkyPiano
  1165. tun%(3) = -6901
  1166. WHEN "JapFlute" : *CHANNELVOICE 3 JapFlute
  1167. tun%(3) = -10997
  1168. WHEN "JazzOrgan" : *CHANNELVOICE 3 JazzOrgan
  1169. tun%(3) = -10997
  1170. WHEN "MidStrings" : *CHANNELVOICE 3 MidStrings
  1171. tun%(3) = -6901
  1172. WHEN "NoteArp1" : *CHANNELVOICE 3 NoteArp1
  1173. tun%(3) = -4000
  1174. WHEN "SnareEcho" : *CHANNELVOICE 3 SnareEcho
  1175. tun%(3) = -4341
  1176. WHEN "TablaHi" : *CHANNELVOICE 3 TablaHi
  1177. tun%(3) = -7669
  1178. WHEN "Timpani" : *CHANNELVOICE 3 Timpani
  1179. tun%(3) = -928
  1180. WHEN "Tomtom1" : *CHANNELVOICE 3 Tomtom1
  1181. tun%(3) = -5365
  1182. WHEN "Trombone1" : *CHANNELVOICE 3 Trombone1
  1183. tun%(3) = -6901
  1184. WHEN "Trumpet" : *CHANNELVOICE 3 Trumpet
  1185. tun%(3) = -10997
  1186. WHEN "Xylophone" : *CHANNELVOICE 3 Xylophone
  1187. tun%(3) = -6901
  1188. WHEN "AcouGtr2B" : *CHANNELVOICE 3 AcouGtr2B
  1189. tun%(3) = -6560
  1190. WHEN "AcuBassAb1" : *CHANNELVOICE 3 AcuBassAb1
  1191. tun%(3) = -1610
  1192. WHEN "BagPipeG" : *CHANNELVOICE 3 BagPipeG
  1193. tun%(3) = -9291
  1194. WHEN "BanjoChdBb" : *CHANNELVOICE 3 BanjoChdBb
  1195. tun%(3) = -4000
  1196. WHEN "BazookiE" : *CHANNELVOICE 3 BazookiE
  1197. tun%(3) = -8267
  1198. WHEN "BellC" : *CHANNELVOICE 3 BellC
  1199. tun%(3) = -10997
  1200. WHEN "BrassEns1B" : *CHANNELVOICE 3 BrassEns1B
  1201. tun%(3) = -6560
  1202. WHEN "ClavichdBb" : *CHANNELVOICE 3 ClavichdBb
  1203. tun%(3) = -10315
  1204. WHEN "ClavinetBb" : *CHANNELVOICE 3 ClavinetBb
  1205. tun%(3) = -6219
  1206. WHEN "CornetEb" : *CHANNELVOICE 3 CornetEb
  1207. tun%(3) = -4000
  1208. WHEN "EnsWodAb45" : *CHANNELVOICE 3 EnsWodAb45
  1209. tun%(3) = -9632
  1210. WHEN "EnsWodGb12" : *CHANNELVOICE 3 EnsWodGb12
  1211. tun%(3) = -4853
  1212. WHEN "Glock2Ab5" : *CHANNELVOICE 3 Glock2Ab5
  1213. tun%(3) = -9632
  1214. WHEN "GtMelobarC" : *CHANNELVOICE 3 GtMelobarC
  1215. tun%(3) = -6901
  1216. WHEN "GtWashbnBb" : *CHANNELVOICE 3 GtWashbnBb
  1217. tun%(3) = -6219
  1218. WHEN "HarmonicaE" : *CHANNELVOICE 3 HarmonicaE
  1219. tun%(3) = -4171
  1220. WHEN "Jew'sHarpA" : *CHANNELVOICE 3 Jew'sHarpA
  1221. tun%(3) = -6219
  1222. WHEN "MusetteB" : *CHANNELVOICE 3 MusetteB
  1223. tun%(3) = -10656
  1224. WHEN "OboeGb" : *CHANNELVOICE 3 OboeGb
  1225. tun%(3) = -13131
  1226. WHEN "OrchHit2B" : *CHANNELVOICE 3 OrchHit2B
  1227. tun%(3) = -5451
  1228. WHEN "OrcSusBb23" : *CHANNELVOICE 3 OrcSusBb23
  1229. tun%(3) = -6304
  1230. WHEN "PiccoloE" : *CHANNELVOICE 3 PiccoloE
  1231. tun%(3) = -16544
  1232. WHEN "SaxSoprnoE" : *CHANNELVOICE 3 SaxSoprnoE
  1233. tun%(3) = -12448
  1234. WHEN "StrngThkBb" : *CHANNELVOICE 3 StrngThkBb
  1235. tun%(3) = -5792
  1236. WHEN "TubaGb" : *CHANNELVOICE 3 TubaGb
  1237. tun%(3) = -929
  1238. WHEN "BassDrum" : *CHANNELVOICE 3 BassDrum
  1239. tun%(3) = -4000
  1240. WHEN "HiHat" : *CHANNELVOICE 3 HiHat
  1241. tun%(3) = -4000
  1242. WHEN "OrcHit" : *CHANNELVOICE 3 OrcHit
  1243. tun%(3) = -4085
  1244. WHEN "Piano" : *CHANNELVOICE 3 Piano
  1245. tun%(3) = -4171
  1246. WHEN "Sax" : *CHANNELVOICE 3 Sax
  1247. tun%(3) = -4085
  1248. WHEN "Snare" : *CHANNELVOICE 3 Snare
  1249. tun%(3) = -8096
  1250. WHEN "Choir1" : *CHANNELVOICE 3 Choir1
  1251. tun%(3) = -6901
  1252. WHEN "ChurOrgan" : *CHANNELVOICE 3 ChurOrgan
  1253. tun%(3) = -6901
  1254. WHEN "Opera" : *CHANNELVOICE 3 Opera
  1255. tun%(3) = -13387
  1256. WHEN "OrchChoir" : *CHANNELVOICE 3 OrchChoir
  1257. tun%(3) = -6133
  1258. WHEN "OrganHit" : *CHANNELVOICE 3 OrganHit
  1259. tun%(3) = -5024
  1260. WHEN "AgogoAfric" : *CHANNELVOICE 3 AgogoAfric
  1261. tun%(3) = -6219
  1262. WHEN "AgogoBrazi" : *CHANNELVOICE 3 AgogoBrazi
  1263. tun%(3) = -10997
  1264. WHEN "AgogoWood" : *CHANNELVOICE 3 AgogoWood
  1265. tun%(3) = -13728
  1266. WHEN "BDGatedRev" : *CHANNELVOICE 3 BDGatedRev
  1267. tun%(3) = -5877
  1268. WHEN "BDMarching" : *CHANNELVOICE 3 BDMarching
  1269. tun%(3) = -8608
  1270. WHEN "BDPiloMute" : *CHANNELVOICE 3 BDPiloMute
  1271. tun%(3) = -7072
  1272. WHEN "Cabasa" : *CHANNELVOICE 3 Cabasa
  1273. tun%(3) = -7072
  1274. WHEN "Cachichi1" : *CHANNELVOICE 3 Cachichi1
  1275. tun%(3) = -4000
  1276. WHEN "CachichiTr" : *CHANNELVOICE 3 CachichiTr
  1277. tun%(3) = -8096
  1278. WHEN "Castanets" : *CHANNELVOICE 3 Castanets
  1279. tun%(3) = -4000
  1280. WHEN "CongaMid" : *CHANNELVOICE 3 CongaMid
  1281. tun%(3) = -4171
  1282. WHEN "CongaSmCl" : *CHANNELVOICE 3 CongaSmCl
  1283. tun%(3) = -4683
  1284. WHEN "CymbalCrsh" : *CHANNELVOICE 3 CymbalCrsh
  1285. tun%(3) = -4000
  1286. WHEN "CymRideBel" : *CHANNELVOICE 3 CymRideBel
  1287. tun%(3) = -16288
  1288. WHEN "CymRStRoll" : *CHANNELVOICE 3 CymRStRoll
  1289. tun%(3) = -6389
  1290. WHEN "CymSplshCa" : *CHANNELVOICE 3 CymSplshCa
  1291. tun%(3) = -9120
  1292. WHEN "Flexitone" : *CHANNELVOICE 3 Flexitone
  1293. tun%(3) = -8096
  1294. WHEN "GongSoft" : *CHANNELVOICE 3 GongSoft
  1295. tun%(3) = -5365
  1296. WHEN "Gonza1" : *CHANNELVOICE 3 Gonza1
  1297. tun%(3) = -12192
  1298. WHEN "GuiroSlow" : *CHANNELVOICE 3 GuiroSlow
  1299. tun%(3) = -6048
  1300. WHEN "HandClaps" : *CHANNELVOICE 3 HandClaps
  1301. tun%(3) = -4000
  1302. WHEN "HiHatFoot" : *CHANNELVOICE 3 HiHatFoot
  1303. tun%(3) = -6389
  1304. WHEN "Maracas1" : *CHANNELVOICE 3 Maracas1
  1305. tun%(3) = -8096
  1306. WHEN "MarimbaSB3" : *CHANNELVOICE 3 MarimbaSB3
  1307. tun%(3) = -4000
  1308. WHEN "Ratchet" : *CHANNELVOICE 3 Ratchet
  1309. tun%(3) = -6731
  1310. WHEN "RotoTomRev" : *CHANNELVOICE 3 RotoTomRev
  1311. tun%(3) = -6133
  1312. WHEN "SimmonsBD1" : *CHANNELVOICE 3 SimmonsBD1
  1313. tun%(3) = -8096
  1314. WHEN "SimmonsSn1" : *CHANNELVOICE 3 SimmonsSn1
  1315. tun%(3) = -5707
  1316. WHEN "SleighBell" : *CHANNELVOICE 3 SleighBell
  1317. tun%(3) = -4000
  1318. WHEN "SuperGong" : *CHANNELVOICE 3 SuperGong
  1319. tun%(3) = -4341
  1320. WHEN "SynthSnare" : *CHANNELVOICE 3 SynthSnare
  1321. tun%(3) = -4000
  1322. WHEN "SynTom" : *CHANNELVOICE 3 SynTom
  1323. tun%(3) = -9120
  1324. WHEN "TimpCresBb" : *CHANNELVOICE 3 TimpCresBb
  1325. tun%(3) = -5962
  1326. WHEN "TimpLowBb" : *CHANNELVOICE 3 TimpLowBb
  1327. tun%(3) = -5707
  1328. WHEN "TimpRollEb" : *CHANNELVOICE 3 TimpRollEb
  1329. tun%(3) = -4000
  1330. WHEN "TomRoll" : *CHANNELVOICE 3 TomRoll
  1331. tun%(3) = -4000
  1332. WHEN "ToyHooter" : *CHANNELVOICE 3 ToyHooter
  1333. tun%(3) = -9717
  1334. WHEN "ToyWhistle" : *CHANNELVOICE 3 ToyWhistle
  1335. tun%(3) = -4000
  1336. ENDCASE
  1337. WHEN 4 :
  1338. CASE waveforms$(vnumber%) OF
  1339. WHEN "WaveSynth-Beep" : *CHANNELVOICE 4 WaveSynth-Beep
  1340. WHEN "StringLib-Soft" : *CHANNELVOICE 4 StringLib-Soft
  1341. WHEN "StringLib-Pluck" : *CHANNELVOICE 4 StringLib-Pluck
  1342. WHEN "StringLib-Steel" : *CHANNELVOICE 4 StringLib-Steel
  1343. WHEN "StringLib-Hard" : *CHANNELVOICE 4 StringLib-Hard
  1344. WHEN "Percussion-Soft" : *CHANNELVOICE 4 Percussion-Soft
  1345. WHEN "Percussion-Medium" : *CHANNELVOICE 4 Percussion-Medium
  1346. WHEN "Percussion-Snare" : *CHANNELVOICE 4 Percussion-Snare
  1347. WHEN "Percussion-Noise" : *CHANNELVOICE 4 Percussion-Noise
  1348. WHEN "BassBowAb" : *CHANNELVOICE 4 BassBowAb
  1349. tun%(4) = -1470
  1350. WHEN "AcouBass" : *CHANNELVOICE 4 AcouBass
  1351. tun%(4) = -2731
  1352. WHEN "Vibe" : *CHANNELVOICE 4 Vibe
  1353. tun%(4) = -6912
  1354. WHEN "BugleC" : *CHANNELVOICE 4 BugleC
  1355. tun%(4) = -11008
  1356. WHEN "CornetEb" : *CHANNELVOICE 4 CornetEb
  1357. tun%(4) = -12117
  1358. WHEN "SaxEbBarC" : *CHANNELVOICE 4 SaxEbBarC
  1359. tun%(4) = -2816
  1360. WHEN "SaxBbTenrE" : *CHANNELVOICE 4 SaxBbTenrE
  1361. tun%(4) = -4181
  1362. WHEN "BassoonEb" : *CHANNELVOICE 4 BassoonEb
  1363. tun%(4) = -4011
  1364. WHEN "ClarinetBb" : *CHANNELVOICE 4 ClarinetBb
  1365. tun%(4) = -10325
  1366. WHEN "EngHornGb" : *CHANNELVOICE 4 EngHornGb
  1367. tun%(4) = -8960
  1368. WHEN "MandolinDb" : *CHANNELVOICE 4 MandolinDb
  1369. tun%(4) = -11264
  1370. WHEN "Piano2B" : *CHANNELVOICE 4 Piano2B
  1371. tun%(4) = -2475
  1372. WHEN "ClarVibEb" : *CHANNELVOICE 4 ClarVibEb
  1373. tun%(4) = -7850
  1374. WHEN "GtrDobroB" : *CHANNELVOICE 4 GtrDobroB
  1375. tun%(4) = -6485
  1376. WHEN "RecorderGb" : *CHANNELVOICE 4 RecorderGb
  1377. tun%(4) = -13056
  1378. WHEN "FlugelHnEb" : *CHANNELVOICE 4 FlugelHnEb
  1379. tun%(4) = -12032
  1380. WHEN "VceMmmGb23" : *CHANNELVOICE 4 VceMmmGb23
  1381. tun%(4) = -853
  1382. WHEN "VceMOooGb3" : *CHANNELVOICE 4 VceMOooGb3
  1383. tun%(4) = -4843
  1384. WHEN "VceFemAahC" : *CHANNELVOICE 4 VceFemAahC
  1385. tun%(4) = -10948
  1386. WHEN "VceFMmmGb4" : *CHANNELVOICE 4 VceFMmmGb4
  1387. tun%(4) = -8918
  1388. WHEN "Bass" : *CHANNELVOICE 4 Bass
  1389. tun%(4) = 0
  1390. WHEN "ChurchBell" : *CHANNELVOICE 4 ChurchBell
  1391. tun%(4) = -2731
  1392. WHEN "mysound" : *CHANNELVOICE 4 mysound
  1393. tun%(4) = 0
  1394. WHEN "GuiroFast" : *CHANNELVOICE 4 GuiroFast
  1395. tun%(4) = -4000
  1396. WHEN "Clave" : *CHANNELVOICE 4 Clave
  1397. tun%(4) = -8096
  1398. WHEN "CowBell" : *CHANNELVOICE 4 CowBell
  1399. tun%(4) = -5707
  1400. WHEN "CymbRideHd" : *CHANNELVOICE 4 CymbRideHd
  1401. tun%(4) = -8096
  1402. WHEN "AcGuitar1" : *CHANNELVOICE 4 AcGuitar1
  1403. tun%(4) = -7072
  1404. WHEN "CongaHi" : *CHANNELVOICE 4 CongaHi
  1405. tun%(4) = -4000
  1406. WHEN "DrumExplo" : *CHANNELVOICE 4 DrumExplo
  1407. tun%(4) = -4000
  1408. WHEN "ElecTom1" : *CHANNELVOICE 4 ElecTom1
  1409. tun%(4) = -8096
  1410. WHEN "Harp1" : *CHANNELVOICE 4 Harp1
  1411. tun%(4) = -10997
  1412. WHEN "Harpsi" : *CHANNELVOICE 4 Harpsi
  1413. tun%(4) = -6901
  1414. WHEN "HiString" : *CHANNELVOICE 4 HiString
  1415. tun%(4) = -10997
  1416. WHEN "HonkyPiano" : *CHANNELVOICE 4 HonkyPiano
  1417. tun%(4) = -6901
  1418. WHEN "JapFlute" : *CHANNELVOICE 4 JapFlute
  1419. tun%(4) = -10997
  1420. WHEN "JazzOrgan" : *CHANNELVOICE 4 JazzOrgan
  1421. tun%(4) = -10997
  1422. WHEN "MidStrings" : *CHANNELVOICE 4 MidStrings
  1423. tun%(4) = -6901
  1424. WHEN "NoteArp1" : *CHANNELVOICE 4 NoteArp1
  1425. tun%(4) = -4000
  1426. WHEN "SnareEcho" : *CHANNELVOICE 4 SnareEcho
  1427. tun%(4) = -4341
  1428. WHEN "TablaHi" : *CHANNELVOICE 4 TablaHi
  1429. tun%(4) = -7669
  1430. WHEN "Timpani" : *CHANNELVOICE 4 Timpani
  1431. tun%(4) = -928
  1432. WHEN "Tomtom1" : *CHANNELVOICE 4 Tomtom1
  1433. tun%(4) = -5365
  1434. WHEN "Trombone1" : *CHANNELVOICE 4 Trombone1
  1435. tun%(4) = -6901
  1436. WHEN "Trumpet" : *CHANNELVOICE 4 Trumpet
  1437. tun%(4) = -10997
  1438. WHEN "Xylophone" : *CHANNELVOICE 4 Xylophone
  1439. tun%(4) = -6901
  1440. WHEN "AcouGtr2B" : *CHANNELVOICE 4 AcouGtr2B
  1441. tun%(4) = -6560
  1442. WHEN "AcuBassAb1" : *CHANNELVOICE 4 AcuBassAb1
  1443. tun%(4) = -1610
  1444. WHEN "BagPipeG" : *CHANNELVOICE 4 BagPipeG
  1445. tun%(4) = -9291
  1446. WHEN "BanjoChdBb" : *CHANNELVOICE 4 BanjoChdBb
  1447. tun%(4) = -4000
  1448. WHEN "BazookiE" : *CHANNELVOICE 4 BazookiE
  1449. tun%(4) = -8267
  1450. WHEN "BellC" : *CHANNELVOICE 4 BellC
  1451. tun%(4) = -10997
  1452. WHEN "BrassEns1B" : *CHANNELVOICE 4 BrassEns1B
  1453. tun%(4) = -6560
  1454. WHEN "ClavichdBb" : *CHANNELVOICE 4 ClavichdBb
  1455. tun%(4) = -10315
  1456. WHEN "ClavinetBb" : *CHANNELVOICE 4 ClavinetBb
  1457. tun%(4) = -6219
  1458. WHEN "CornetEb" : *CHANNELVOICE 4 CornetEb
  1459. tun%(4) = -4000
  1460. WHEN "EnsWodAb45" : *CHANNELVOICE 4 EnsWodAb45
  1461. tun%(4) = -9632
  1462. WHEN "EnsWodGb12" : *CHANNELVOICE 4 EnsWodGb12
  1463. tun%(4) = -4853
  1464. WHEN "Glock2Ab5" : *CHANNELVOICE 4 Glock2Ab5
  1465. tun%(4) = -9632
  1466. WHEN "GtMelobarC" : *CHANNELVOICE 4 GtMelobarC
  1467. tun%(4) = -6901
  1468. WHEN "GtWashbnBb" : *CHANNELVOICE 4 GtWashbnBb
  1469. tun%(4) = -6219
  1470. WHEN "HarmonicaE" : *CHANNELVOICE 4 HarmonicaE
  1471. tun%(4) = -4171
  1472. WHEN "Jew'sHarpA" : *CHANNELVOICE 4 Jew'sHarpA
  1473. tun%(4) = -6219
  1474. WHEN "MusetteB" : *CHANNELVOICE 4 MusetteB
  1475. tun%(4) = -10656
  1476. WHEN "OboeGb" : *CHANNELVOICE 4 OboeGb
  1477. tun%(4) = -13131
  1478. WHEN "OrchHit2B" : *CHANNELVOICE 4 OrchHit2B
  1479. tun%(4) = -5451
  1480. WHEN "OrcSusBb23" : *CHANNELVOICE 4 OrcSusBb23
  1481. tun%(4) = -6304
  1482. WHEN "PiccoloE" : *CHANNELVOICE 4 PiccoloE
  1483. tun%(4) = -16544
  1484. WHEN "SaxSoprnoE" : *CHANNELVOICE 4 SaxSoprnoE
  1485. tun%(4) = -12448
  1486. WHEN "StrngThkBb" : *CHANNELVOICE 4 StrngThkBb
  1487. tun%(4) = -5792
  1488. WHEN "TubaGb" : *CHANNELVOICE 4 TubaGb
  1489. tun%(4) = -929
  1490. WHEN "BassDrum" : *CHANNELVOICE 4 BassDrum
  1491. tun%(4) = -4000
  1492. WHEN "HiHat" : *CHANNELVOICE 4 HiHat
  1493. tun%(4) = -4000
  1494. WHEN "OrcHit" : *CHANNELVOICE 4 OrcHit
  1495. tun%(4) = -4085
  1496. WHEN "Piano" : *CHANNELVOICE 4 Piano
  1497. tun%(4) = -4171
  1498. WHEN "Sax" : *CHANNELVOICE 4 Sax
  1499. tun%(4) = -4085
  1500. WHEN "Snare" : *CHANNELVOICE 4 Snare
  1501. tun%(4) = -8096
  1502. WHEN "Choir1" : *CHANNELVOICE 4 Choir1
  1503. tun%(4) = -6901
  1504. WHEN "ChurOrgan" : *CHANNELVOICE 4 ChurOrgan
  1505. tun%(4) = -6901
  1506. WHEN "Opera" : *CHANNELVOICE 4 Opera
  1507. tun%(4) = -13387
  1508. WHEN "OrchChoir" : *CHANNELVOICE 4 OrchChoir
  1509. tun%(4) = -6133
  1510. WHEN "OrganHit" : *CHANNELVOICE 4 OrganHit
  1511. tun%(4) = -5024
  1512. WHEN "AgogoAfric" : *CHANNELVOICE 4 AgogoAfric
  1513. tun%(4) = -6219
  1514. WHEN "AgogoBrazi" : *CHANNELVOICE 4 AgogoBrazi
  1515. tun%(4) = -10997
  1516. WHEN "AgogoWood" : *CHANNELVOICE 4 AgogoWood
  1517. tun%(4) = -13728
  1518. WHEN "BDGatedRev" : *CHANNELVOICE 4 BDGatedRev
  1519. tun%(4) = -5877
  1520. WHEN "BDMarching" : *CHANNELVOICE 4 BDMarching
  1521. tun%(4) = -8608
  1522. WHEN "BDPiloMute" : *CHANNELVOICE 4 BDPiloMute
  1523. tun%(4) = -7072
  1524. WHEN "Cabasa" : *CHANNELVOICE 4 Cabasa
  1525. tun%(4) = -7072
  1526. WHEN "Cachichi1" : *CHANNELVOICE 4 Cachichi1
  1527. tun%(4) = -4000
  1528. WHEN "CachichiTr" : *CHANNELVOICE 4 CachichiTr
  1529. tun%(4) = -8096
  1530. WHEN "Castanets" : *CHANNELVOICE 4 Castanets
  1531. tun%(4) = -4000
  1532. WHEN "CongaMid" : *CHANNELVOICE 4 CongaMid
  1533. tun%(4) = -4171
  1534. WHEN "CongaSmCl" : *CHANNELVOICE 4 CongaSmCl
  1535. tun%(4) = -4683
  1536. WHEN "CymbalCrsh" : *CHANNELVOICE 4 CymbalCrsh
  1537. tun%(4) = -4000
  1538. WHEN "CymRideBel" : *CHANNELVOICE 4 CymRideBel
  1539. tun%(4) = -16288
  1540. WHEN "CymRStRoll" : *CHANNELVOICE 4 CymRStRoll
  1541. tun%(4) = -6389
  1542. WHEN "CymSplshCa" : *CHANNELVOICE 4 CymSplshCa
  1543. tun%(4) = -9120
  1544. WHEN "Flexitone" : *CHANNELVOICE 4 Flexitone
  1545. tun%(4) = -8096
  1546. WHEN "GongSoft" : *CHANNELVOICE 4 GongSoft
  1547. tun%(4) = -5365
  1548. WHEN "Gonza1" : *CHANNELVOICE 4 Gonza1
  1549. tun%(4) = -12192
  1550. WHEN "GuiroSlow" : *CHANNELVOICE 4 GuiroSlow
  1551. tun%(4) = -6048
  1552. WHEN "HandClaps" : *CHANNELVOICE 4 HandClaps
  1553. tun%(4) = -4000
  1554. WHEN "HiHatFoot" : *CHANNELVOICE 4 HiHatFoot
  1555. tun%(4) = -6389
  1556. WHEN "Maracas1" : *CHANNELVOICE 4 Maracas1
  1557. tun%(4) = -8096
  1558. WHEN "MarimbaSB3" : *CHANNELVOICE 4 MarimbaSB3
  1559. tun%(4) = -4000
  1560. WHEN "Ratchet" : *CHANNELVOICE 4 Ratchet
  1561. tun%(4) = -6731
  1562. WHEN "RotoTomRev" : *CHANNELVOICE 4 RotoTomRev
  1563. tun%(4) = -6133
  1564. WHEN "SimmonsBD1" : *CHANNELVOICE 4 SimmonsBD1
  1565. tun%(4) = -8096
  1566. WHEN "SimmonsSn1" : *CHANNELVOICE 4 SimmonsSn1
  1567. tun%(4) = -5707
  1568. WHEN "SleighBell" : *CHANNELVOICE 4 SleighBell
  1569. tun%(4) = -4000
  1570. WHEN "SuperGong" : *CHANNELVOICE 4 SuperGong
  1571. tun%(4) = -4341
  1572. WHEN "SynthSnare" : *CHANNELVOICE 4 SynthSnare
  1573. tun%(4) = -4000
  1574. WHEN "SynTom" : *CHANNELVOICE 4 SynTom
  1575. tun%(4) = -9120
  1576. WHEN "TimpCresBb" : *CHANNELVOICE 4 TimpCresBb
  1577. tun%(4) = -5962
  1578. WHEN "TimpLowBb" : *CHANNELVOICE 4 TimpLowBb
  1579. tun%(4) = -5707
  1580. WHEN "TimpRollEb" : *CHANNELVOICE 4 TimpRollEb
  1581. tun%(4) = -4000
  1582. WHEN "TomRoll" : *CHANNELVOICE 4 TomRoll
  1583. tun%(4) = -4000
  1584. WHEN "ToyHooter" : *CHANNELVOICE 4 ToyHooter
  1585. tun%(4) = -9717
  1586. WHEN "ToyWhistle" : *CHANNELVOICE 4 ToyWhistle
  1587. tun%(4) = -4000
  1588. ENDCASE
  1589. WHEN 5 :
  1590. CASE waveforms$(vnumber%) OF
  1591. WHEN "WaveSynth-Beep" : *CHANNELVOICE 5 WaveSynth-Beep
  1592. WHEN "StringLib-Soft" : *CHANNELVOICE 5 StringLib-Soft
  1593. WHEN "StringLib-Pluck" : *CHANNELVOICE 5 StringLib-Pluck
  1594. WHEN "StringLib-Steel" : *CHANNELVOICE 5 StringLib-Steel
  1595. WHEN "StringLib-Hard" : *CHANNELVOICE 5 StringLib-Hard
  1596. WHEN "Percussion-Soft" : *CHANNELVOICE 5 Percussion-Soft
  1597. WHEN "Percussion-Medium" : *CHANNELVOICE 5 Percussion-Medium
  1598. WHEN "Percussion-Snare" : *CHANNELVOICE 5 Percussion-Snare
  1599. WHEN "Percussion-Noise" : *CHANNELVOICE 5 Percussion-Noise
  1600. WHEN "BassBowAb" : *CHANNELVOICE 5 BassBowAb
  1601. tun%(5) = -1470
  1602. WHEN "AcouBass" : *CHANNELVOICE 5 AcouBass
  1603. tun%(5) = -2731
  1604. WHEN "Vibe" : *CHANNELVOICE 5 Vibe
  1605. tun%(5) = -6912
  1606. WHEN "BugleC" : *CHANNELVOICE 5 BugleC
  1607. tun%(5) = -11008
  1608. WHEN "CornetEb" : *CHANNELVOICE 5 CornetEb
  1609. tun%(5) = -12117
  1610. WHEN "SaxEbBarC" : *CHANNELVOICE 5 SaxEbBarC
  1611. tun%(5) = -2816
  1612. WHEN "SaxBbTenrE" : *CHANNELVOICE 5 SaxBbTenrE
  1613. tun%(5) = -4181
  1614. WHEN "BassoonEb" : *CHANNELVOICE 5 BassoonEb
  1615. tun%(5) = -4011
  1616. WHEN "ClarinetBb" : *CHANNELVOICE 5 ClarinetBb
  1617. tun%(5) = -10325
  1618. WHEN "EngHornGb" : *CHANNELVOICE 5 EngHornGb
  1619. tun%(5) = -8960
  1620. WHEN "MandolinDb" : *CHANNELVOICE 5 MandolinDb
  1621. tun%(5) = -11264
  1622. WHEN "Piano2B" : *CHANNELVOICE 5 Piano2B
  1623. tun%(5) = -2475
  1624. WHEN "ClarVibEb" : *CHANNELVOICE 5 ClarVibEb
  1625. tun%(5) = -7850
  1626. WHEN "GtrDobroB" : *CHANNELVOICE 5 GtrDobroB
  1627. tun%(5) = -6485
  1628. WHEN "RecorderGb" : *CHANNELVOICE 5 RecorderGb
  1629. tun%(5) = -13056
  1630. WHEN "FlugelHnEb" : *CHANNELVOICE 5 FlugelHnEb
  1631. tun%(5) = -12032
  1632. WHEN "VceMmmGb23" : *CHANNELVOICE 5 VceMmmGb23
  1633. tun%(5) = -853
  1634. WHEN "VceMOooGb3" : *CHANNELVOICE 5 VceMOooGb3
  1635. tun%(5) = -4843
  1636. WHEN "VceFemAahC" : *CHANNELVOICE 5 VceFemAahC
  1637. tun%(5) = -10948
  1638. WHEN "VceFMmmGb4" : *CHANNELVOICE 5 VceFMmmGb4
  1639. tun%(5) = -8918
  1640. WHEN "Bass" : *CHANNELVOICE 5 Bass
  1641. tun%(5) = 0
  1642. WHEN "ChurchBell" : *CHANNELVOICE 5 ChurchBell
  1643. tun%(5) = -2731
  1644. WHEN "mysound" : *CHANNELVOICE 5 mysound
  1645. tun%(5) = 0
  1646. WHEN "GuiroFast" : *CHANNELVOICE 5 GuiroFast
  1647. tun%(5) = -4000
  1648. WHEN "Clave" : *CHANNELVOICE 5 Clave
  1649. tun%(5) = -8096
  1650. WHEN "CowBell" : *CHANNELVOICE 5 CowBell
  1651. tun%(5) = -5707
  1652. WHEN "CymbRideHd" : *CHANNELVOICE 5 CymbRideHd
  1653. tun%(5) = -8096
  1654. WHEN "AcGuitar1" : *CHANNELVOICE 5 AcGuitar1
  1655. tun%(5) = -7072
  1656. WHEN "CongaHi" : *CHANNELVOICE 5 CongaHi
  1657. tun%(5) = -4000
  1658. WHEN "DrumExplo" : *CHANNELVOICE 5 DrumExplo
  1659. tun%(5) = -4000
  1660. WHEN "ElecTom1" : *CHANNELVOICE 5 ElecTom1
  1661. tun%(5) = -8096
  1662. WHEN "Harp1" : *CHANNELVOICE 5 Harp1
  1663. tun%(5) = -10997
  1664. WHEN "Harpsi" : *CHANNELVOICE 5 Harpsi
  1665. tun%(5) = -6901
  1666. WHEN "HiString" : *CHANNELVOICE 5 HiString
  1667. tun%(5) = -10997
  1668. WHEN "HonkyPiano" : *CHANNELVOICE 5 HonkyPiano
  1669. tun%(5) = -6901
  1670. WHEN "JapFlute" : *CHANNELVOICE 5 JapFlute
  1671. tun%(5) = -10997
  1672. WHEN "JazzOrgan" : *CHANNELVOICE 5 JazzOrgan
  1673. tun%(5) = -10997
  1674. WHEN "MidStrings" : *CHANNELVOICE 5 MidStrings
  1675. tun%(5) = -6901
  1676. WHEN "NoteArp1" : *CHANNELVOICE 5 NoteArp1
  1677. tun%(5) = -4000
  1678. WHEN "SnareEcho" : *CHANNELVOICE 5 SnareEcho
  1679. tun%(5) = -4341
  1680. WHEN "TablaHi" : *CHANNELVOICE 5 TablaHi
  1681. tun%(5) = -7669
  1682. WHEN "Timpani" : *CHANNELVOICE 5 Timpani
  1683. tun%(5) = -928
  1684. WHEN "Tomtom1" : *CHANNELVOICE 5 Tomtom1
  1685. tun%(5) = -5365
  1686. WHEN "Trombone1" : *CHANNELVOICE 5 Trombone1
  1687. tun%(5) = -6901
  1688. WHEN "Trumpet" : *CHANNELVOICE 5 Trumpet
  1689. tun%(5) = -10997
  1690. WHEN "Xylophone" : *CHANNELVOICE 5 Xylophone
  1691. tun%(5) = -6901
  1692. WHEN "AcouGtr2B" : *CHANNELVOICE 5 AcouGtr2B
  1693. tun%(5) = -6560
  1694. WHEN "AcuBassAb1" : *CHANNELVOICE 5 AcuBassAb1
  1695. tun%(5) = -1610
  1696. WHEN "BagPipeG" : *CHANNELVOICE 5 BagPipeG
  1697. tun%(5) = -9291
  1698. WHEN "BanjoChdBb" : *CHANNELVOICE 5 BanjoChdBb
  1699. tun%(5) = -4000
  1700. WHEN "BazookiE" : *CHANNELVOICE 5 BazookiE
  1701. tun%(5) = -8267
  1702. WHEN "BellC" : *CHANNELVOICE 5 BellC
  1703. tun%(5) = -10997
  1704. WHEN "BrassEns1B" : *CHANNELVOICE 5 BrassEns1B
  1705. tun%(5) = -6560
  1706. WHEN "ClavichdBb" : *CHANNELVOICE 5 ClavichdBb
  1707. tun%(5) = -10315
  1708. WHEN "ClavinetBb" : *CHANNELVOICE 5 ClavinetBb
  1709. tun%(5) = -6219
  1710. WHEN "CornetEb" : *CHANNELVOICE 5 CornetEb
  1711. tun%(5) = -4000
  1712. WHEN "EnsWodAb45" : *CHANNELVOICE 5 EnsWodAb45
  1713. tun%(5) = -9632
  1714. WHEN "EnsWodGb12" : *CHANNELVOICE 5 EnsWodGb12
  1715. tun%(5) = -4853
  1716. WHEN "Glock2Ab5" : *CHANNELVOICE 5 Glock2Ab5
  1717. tun%(5) = -9632
  1718. WHEN "GtMelobarC" : *CHANNELVOICE 5 GtMelobarC
  1719. tun%(5) = -6901
  1720. WHEN "GtWashbnBb" : *CHANNELVOICE 5 GtWashbnBb
  1721. tun%(5) = -6219
  1722. WHEN "HarmonicaE" : *CHANNELVOICE 5 HarmonicaE
  1723. tun%(5) = -4171
  1724. WHEN "Jew'sHarpA" : *CHANNELVOICE 5 Jew'sHarpA
  1725. tun%(5) = -6219
  1726. WHEN "MusetteB" : *CHANNELVOICE 5 MusetteB
  1727. tun%(5) = -10656
  1728. WHEN "OboeGb" : *CHANNELVOICE 5 OboeGb
  1729. tun%(5) = -13131
  1730. WHEN "OrchHit2B" : *CHANNELVOICE 5 OrchHit2B
  1731. tun%(5) = -5451
  1732. WHEN "OrcSusBb23" : *CHANNELVOICE 5 OrcSusBb23
  1733. tun%(5) = -6304
  1734. WHEN "PiccoloE" : *CHANNELVOICE 5 PiccoloE
  1735. tun%(5) = -16544
  1736. WHEN "SaxSoprnoE" : *CHANNELVOICE 5 SaxSoprnoE
  1737. tun%(5) = -12448
  1738. WHEN "StrngThkBb" : *CHANNELVOICE 5 StrngThkBb
  1739. tun%(5) = -5792
  1740. WHEN "TubaGb" : *CHANNELVOICE 5 TubaGb
  1741. tun%(5) = -929
  1742. WHEN "BassDrum" : *CHANNELVOICE 5 BassDrum
  1743. tun%(5) = -4000
  1744. WHEN "HiHat" : *CHANNELVOICE 5 HiHat
  1745. tun%(5) = -4000
  1746. WHEN "OrcHit" : *CHANNELVOICE 5 OrcHit
  1747. tun%(5) = -4085
  1748. WHEN "Piano" : *CHANNELVOICE 5 Piano
  1749. tun%(5) = -4171
  1750. WHEN "Sax" : *CHANNELVOICE 5 Sax
  1751. tun%(5) = -4085
  1752. WHEN "Snare" : *CHANNELVOICE 5 Snare
  1753. tun%(5) = -8096
  1754. WHEN "Choir1" : *CHANNELVOICE 5 Choir1
  1755. tun%(5) = -6901
  1756. WHEN "ChurOrgan" : *CHANNELVOICE 5 ChurOrgan
  1757. tun%(5) = -6901
  1758. WHEN "Opera" : *CHANNELVOICE 5 Opera
  1759. tun%(5) = -13387
  1760. WHEN "OrchChoir" : *CHANNELVOICE 5 OrchChoir
  1761. tun%(5) = -6133
  1762. WHEN "OrganHit" : *CHANNELVOICE 5 OrganHit
  1763. tun%(5) = -5024
  1764. WHEN "AgogoAfric" : *CHANNELVOICE 5 AgogoAfric
  1765. tun%(5) = -6219
  1766. WHEN "AgogoBrazi" : *CHANNELVOICE 5 AgogoBrazi
  1767. tun%(5) = -10997
  1768. WHEN "AgogoWood" : *CHANNELVOICE 5 AgogoWood
  1769. tun%(5) = -13728
  1770. WHEN "BDGatedRev" : *CHANNELVOICE 5 BDGatedRev
  1771. tun%(5) = -5877
  1772. WHEN "BDMarching" : *CHANNELVOICE 5 BDMarching
  1773. tun%(5) = -8608
  1774. WHEN "BDPiloMute" : *CHANNELVOICE 5 BDPiloMute
  1775. tun%(5) = -7072
  1776. WHEN "Cabasa" : *CHANNELVOICE 5 Cabasa
  1777. tun%(5) = -7072
  1778. WHEN "Cachichi1" : *CHANNELVOICE 5 Cachichi1
  1779. tun%(5) = -4000
  1780. WHEN "CachichiTr" : *CHANNELVOICE 5 CachichiTr
  1781. tun%(5) = -8096
  1782. WHEN "Castanets" : *CHANNELVOICE 5 Castanets
  1783. tun%(5) = -4000
  1784. WHEN "CongaMid" : *CHANNELVOICE 5 CongaMid
  1785. tun%(5) = -4171
  1786. WHEN "CongaSmCl" : *CHANNELVOICE 5 CongaSmCl
  1787. tun%(5) = -4683
  1788. WHEN "CymbalCrsh" : *CHANNELVOICE 5 CymbalCrsh
  1789. tun%(5) = -4000
  1790. WHEN "CymRideBel" : *CHANNELVOICE 5 CymRideBel
  1791. tun%(5) = -16288
  1792. WHEN "CymRStRoll" : *CHANNELVOICE 5 CymRStRoll
  1793. tun%(5) = -6389
  1794. WHEN "CymSplshCa" : *CHANNELVOICE 5 CymSplshCa
  1795. tun%(5) = -9120
  1796. WHEN "Flexitone" : *CHANNELVOICE 5 Flexitone
  1797. tun%(5) = -8096
  1798. WHEN "GongSoft" : *CHANNELVOICE 5 GongSoft
  1799. tun%(5) = -5365
  1800. WHEN "Gonza1" : *CHANNELVOICE 5 Gonza1
  1801. tun%(5) = -12192
  1802. WHEN "GuiroSlow" : *CHANNELVOICE 5 GuiroSlow
  1803. tun%(5) = -6048
  1804. WHEN "HandClaps" : *CHANNELVOICE 5 HandClaps
  1805. tun%(5) = -4000
  1806. WHEN "HiHatFoot" : *CHANNELVOICE 5 HiHatFoot
  1807. tun%(5) = -6389
  1808. WHEN "Maracas1" : *CHANNELVOICE 5 Maracas1
  1809. tun%(5) = -8096
  1810. WHEN "MarimbaSB3" : *CHANNELVOICE 5 MarimbaSB3
  1811. tun%(5) = -4000
  1812. WHEN "Ratchet" : *CHANNELVOICE 5 Ratchet
  1813. tun%(5) = -6731
  1814. WHEN "RotoTomRev" : *CHANNELVOICE 5 RotoTomRev
  1815. tun%(5) = -6133
  1816. WHEN "SimmonsBD1" : *CHANNELVOICE 5 SimmonsBD1
  1817. tun%(5) = -8096
  1818. WHEN "SimmonsSn1" : *CHANNELVOICE 5 SimmonsSn1
  1819. tun%(5) = -5707
  1820. WHEN "SleighBell" : *CHANNELVOICE 5 SleighBell
  1821. tun%(5) = -4000
  1822. WHEN "SuperGong" : *CHANNELVOICE 5 SuperGong
  1823. tun%(5) = -4341
  1824. WHEN "SynthSnare" : *CHANNELVOICE 5 SynthSnare
  1825. tun%(5) = -4000
  1826. WHEN "SynTom" : *CHANNELVOICE 5 SynTom
  1827. tun%(5) = -9120
  1828. WHEN "TimpCresBb" : *CHANNELVOICE 5 TimpCresBb
  1829. tun%(5) = -5962
  1830. WHEN "TimpLowBb" : *CHANNELVOICE 5 TimpLowBb
  1831. tun%(5) = -5707
  1832. WHEN "TimpRollEb" : *CHANNELVOICE 5 TimpRollEb
  1833. tun%(5) = -4000
  1834. WHEN "TomRoll" : *CHANNELVOICE 5 TomRoll
  1835. tun%(5) = -4000
  1836. WHEN "ToyHooter" : *CHANNELVOICE 5 ToyHooter
  1837. tun%(5) = -9717
  1838. WHEN "ToyWhistle" : *CHANNELVOICE 5 ToyWhistle
  1839. tun%(5) = -4000
  1840. ENDCASE
  1841. WHEN 6 :
  1842. CASE waveforms$(vnumber%) OF
  1843. WHEN "WaveSynth-Beep" : *CHANNELVOICE 6 WaveSynth-Beep
  1844. WHEN "StringLib-Soft" : *CHANNELVOICE 6 StringLib-Soft
  1845. WHEN "StringLib-Pluck" : *CHANNELVOICE 6 StringLib-Pluck
  1846. WHEN "StringLib-Steel" : *CHANNELVOICE 6 StringLib-Steel
  1847. WHEN "StringLib-Hard" : *CHANNELVOICE 6 StringLib-Hard
  1848. WHEN "Percussion-Soft" : *CHANNELVOICE 6 Percussion-Soft
  1849. WHEN "Percussion-Medium" : *CHANNELVOICE 6 Percussion-Medium
  1850. WHEN "Percussion-Snare" : *CHANNELVOICE 6 Percussion-Snare
  1851. WHEN "Percussion-Noise" : *CHANNELVOICE 6 Percussion-Noise
  1852. WHEN "BassBowAb" : *CHANNELVOICE 6 BassBowAb
  1853. tun%(6) = -1470
  1854. WHEN "AcouBass" : *CHANNELVOICE 6 AcouBass
  1855. tun%(6) = -2731
  1856. WHEN "Vibe" : *CHANNELVOICE 6 Vibe
  1857. tun%(6) = -6912
  1858. WHEN "BugleC" : *CHANNELVOICE 6 BugleC
  1859. tun%(6) = -11008
  1860. WHEN "CornetEb" : *CHANNELVOICE 6 CornetEb
  1861. tun%(6) = -12117
  1862. WHEN "SaxEbBarC" : *CHANNELVOICE 6 SaxEbBarC
  1863. tun%(6) = -2816
  1864. WHEN "SaxBbTenrE" : *CHANNELVOICE 6 SaxBbTenrE
  1865. tun%(6) = -4181
  1866. WHEN "BassoonEb" : *CHANNELVOICE 6 BassoonEb
  1867. tun%(6) = -4011
  1868. WHEN "ClarinetBb" : *CHANNELVOICE 6 ClarinetBb
  1869. tun%(6) = -10325
  1870. WHEN "EngHornGb" : *CHANNELVOICE 6 EngHornGb
  1871. tun%(6) = -8960
  1872. WHEN "MandolinDb" : *CHANNELVOICE 6 MandolinDb
  1873. tun%(6) = -11264
  1874. WHEN "Piano2B" : *CHANNELVOICE 6 Piano2B
  1875. tun%(6) = -2475
  1876. WHEN "ClarVibEb" : *CHANNELVOICE 6 ClarVibEb
  1877. tun%(6) = -7850
  1878. WHEN "GtrDobroB" : *CHANNELVOICE 6 GtrDobroB
  1879. tun%(6) = -6485
  1880. WHEN "RecorderGb" : *CHANNELVOICE 6 RecorderGb
  1881. tun%(6) = -13056
  1882. WHEN "FlugelHnEb" : *CHANNELVOICE 6 FlugelHnEb
  1883. tun%(6) = -12032
  1884. WHEN "VceMmmGb23" : *CHANNELVOICE 6 VceMmmGb23
  1885. tun%(6) = -853
  1886. WHEN "VceMOooGb3" : *CHANNELVOICE 6 VceMOooGb3
  1887. tun%(6) = -4843
  1888. WHEN "VceFemAahC" : *CHANNELVOICE 6 VceFemAahC
  1889. tun%(6) = -10948
  1890. WHEN "VceFMmmGb4" : *CHANNELVOICE 6 VceFMmmGb4
  1891. tun%(6) = -8918
  1892. WHEN "Bass" : *CHANNELVOICE 6 Bass
  1893. tun%(6) = 0
  1894. WHEN "ChurchBell" : *CHANNELVOICE 6 ChurchBell
  1895. tun%(6) = -2731
  1896. WHEN "mysound" : *CHANNELVOICE 6 mysound
  1897. tun%(6) = 0
  1898. WHEN "GuiroFast" : *CHANNELVOICE 6 GuiroFast
  1899. tun%(6) = -4000
  1900. WHEN "Clave" : *CHANNELVOICE 6 Clave
  1901. tun%(6) = -8096
  1902. WHEN "CowBell" : *CHANNELVOICE 6 CowBell
  1903. tun%(6) = -5707
  1904. WHEN "CymbRideHd" : *CHANNELVOICE 6 CymbRideHd
  1905. tun%(6) = -8096
  1906. WHEN "AcGuitar1" : *CHANNELVOICE 6 AcGuitar1
  1907. tun%(6) = -7072
  1908. WHEN "CongaHi" : *CHANNELVOICE 6 CongaHi
  1909. tun%(6) = -4000
  1910. WHEN "DrumExplo" : *CHANNELVOICE 6 DrumExplo
  1911. tun%(6) = -4000
  1912. WHEN "ElecTom1" : *CHANNELVOICE 6 ElecTom1
  1913. tun%(6) = -8096
  1914. WHEN "Harp1" : *CHANNELVOICE 6 Harp1
  1915. tun%(6) = -10997
  1916. WHEN "Harpsi" : *CHANNELVOICE 6 Harpsi
  1917. tun%(6) = -6901
  1918. WHEN "HiString" : *CHANNELVOICE 6 HiString
  1919. tun%(6) = -10997
  1920. WHEN "HonkyPiano" : *CHANNELVOICE 6 HonkyPiano
  1921. tun%(6) = -6901
  1922. WHEN "JapFlute" : *CHANNELVOICE 6 JapFlute
  1923. tun%(6) = -10997
  1924. WHEN "JazzOrgan" : *CHANNELVOICE 6 JazzOrgan
  1925. tun%(6) = -10997
  1926. WHEN "MidStrings" : *CHANNELVOICE 6 MidStrings
  1927. tun%(6) = -6901
  1928. WHEN "NoteArp1" : *CHANNELVOICE 6 NoteArp1
  1929. tun%(6) = -4000
  1930. WHEN "SnareEcho" : *CHANNELVOICE 6 SnareEcho
  1931. tun%(6) = -4341
  1932. WHEN "TablaHi" : *CHANNELVOICE 6 TablaHi
  1933. tun%(6) = -7669
  1934. WHEN "Timpani" : *CHANNELVOICE 6 Timpani
  1935. tun%(6) = -928
  1936. WHEN "Tomtom1" : *CHANNELVOICE 6 Tomtom1
  1937. tun%(6) = -5365
  1938. WHEN "Trombone1" : *CHANNELVOICE 6 Trombone1
  1939. tun%(6) = -6901
  1940. WHEN "Trumpet" : *CHANNELVOICE 6 Trumpet
  1941. tun%(6) = -10997
  1942. WHEN "Xylophone" : *CHANNELVOICE 6 Xylophone
  1943. tun%(6) = -6901
  1944. WHEN "AcouGtr2B" : *CHANNELVOICE 6 AcouGtr2B
  1945. tun%(6) = -6560
  1946. WHEN "AcuBassAb1" : *CHANNELVOICE 6 AcuBassAb1
  1947. tun%(6) = -1610
  1948. WHEN "BagPipeG" : *CHANNELVOICE 6 BagPipeG
  1949. tun%(6) = -9291
  1950. WHEN "BanjoChdBb" : *CHANNELVOICE 6 BanjoChdBb
  1951. tun%(6) = -4000
  1952. WHEN "BazookiE" : *CHANNELVOICE 6 BazookiE
  1953. tun%(6) = -8267
  1954. WHEN "BellC" : *CHANNELVOICE 6 BellC
  1955. tun%(6) = -10997
  1956. WHEN "BrassEns1B" : *CHANNELVOICE 6 BrassEns1B
  1957. tun%(6) = -6560
  1958. WHEN "ClavichdBb" : *CHANNELVOICE 6 ClavichdBb
  1959. tun%(6) = -10315
  1960. WHEN "ClavinetBb" : *CHANNELVOICE 6 ClavinetBb
  1961. tun%(6) = -6219
  1962. WHEN "CornetEb" : *CHANNELVOICE 6 CornetEb
  1963. tun%(6) = -4000
  1964. WHEN "EnsWodAb45" : *CHANNELVOICE 6 EnsWodAb45
  1965. tun%(6) = -9632
  1966. WHEN "EnsWodGb12" : *CHANNELVOICE 6 EnsWodGb12
  1967. tun%(6) = -4853
  1968. WHEN "Glock2Ab5" : *CHANNELVOICE 6 Glock2Ab5
  1969. tun%(6) = -9632
  1970. WHEN "GtMelobarC" : *CHANNELVOICE 6 GtMelobarC
  1971. tun%(6) = -6901
  1972. WHEN "GtWashbnBb" : *CHANNELVOICE 6 GtWashbnBb
  1973. tun%(6) = -6219
  1974. WHEN "HarmonicaE" : *CHANNELVOICE 6 HarmonicaE
  1975. tun%(6) = -4171
  1976. WHEN "Jew'sHarpA" : *CHANNELVOICE 6 Jew'sHarpA
  1977. tun%(6) = -6219
  1978. WHEN "MusetteB" : *CHANNELVOICE 6 MusetteB
  1979. tun%(6) = -10656
  1980. WHEN "OboeGb" : *CHANNELVOICE 6 OboeGb
  1981. tun%(6) = -13131
  1982. WHEN "OrchHit2B" : *CHANNELVOICE 6 OrchHit2B
  1983. tun%(6) = -5451
  1984. WHEN "OrcSusBb23" : *CHANNELVOICE 6 OrcSusBb23
  1985. tun%(6) = -6304
  1986. WHEN "PiccoloE" : *CHANNELVOICE 6 PiccoloE
  1987. tun%(6) = -16544
  1988. WHEN "SaxSoprnoE" : *CHANNELVOICE 6 SaxSoprnoE
  1989. tun%(6) = -12448
  1990. WHEN "StrngThkBb" : *CHANNELVOICE 6 StrngThkBb
  1991. tun%(6) = -5792
  1992. WHEN "TubaGb" : *CHANNELVOICE 6 TubaGb
  1993. tun%(6) = -929
  1994. WHEN "BassDrum" : *CHANNELVOICE 6 BassDrum
  1995. tun%(6) = -4000
  1996. WHEN "HiHat" : *CHANNELVOICE 6 HiHat
  1997. tun%(6) = -4000
  1998. WHEN "OrcHit" : *CHANNELVOICE 6 OrcHit
  1999. tun%(6) = -4085
  2000. WHEN "Piano" : *CHANNELVOICE 6 Piano
  2001. tun%(6) = -4171
  2002. WHEN "Sax" : *CHANNELVOICE 6 Sax
  2003. tun%(6) = -4085
  2004. WHEN "Snare" : *CHANNELVOICE 6 Snare
  2005. tun%(6) = -8096
  2006. WHEN "Choir1" : *CHANNELVOICE 6 Choir1
  2007. tun%(6) = -6901
  2008. WHEN "ChurOrgan" : *CHANNELVOICE 6 ChurOrgan
  2009. tun%(6) = -6901
  2010. WHEN "Opera" : *CHANNELVOICE 6 Opera
  2011. tun%(6) = -13387
  2012. WHEN "OrchChoir" : *CHANNELVOICE 6 OrchChoir
  2013. tun%(6) = -6133
  2014. WHEN "OrganHit" : *CHANNELVOICE 6 OrganHit
  2015. tun%(6) = -5024
  2016. WHEN "AgogoAfric" : *CHANNELVOICE 6 AgogoAfric
  2017. tun%(6) = -6219
  2018. WHEN "AgogoBrazi" : *CHANNELVOICE 6 AgogoBrazi
  2019. tun%(6) = -10997
  2020. WHEN "AgogoWood" : *CHANNELVOICE 6 AgogoWood
  2021. tun%(6) = -13728
  2022. WHEN "BDGatedRev" : *CHANNELVOICE 6 BDGatedRev
  2023. tun%(6) = -5877
  2024. WHEN "BDMarching" : *CHANNELVOICE 6 BDMarching
  2025. tun%(6) = -8608
  2026. WHEN "BDPiloMute" : *CHANNELVOICE 6 BDPiloMute
  2027. tun%(6) = -7072
  2028. WHEN "Cabasa" : *CHANNELVOICE 6 Cabasa
  2029. tun%(6) = -7072
  2030. WHEN "Cachichi1" : *CHANNELVOICE 6 Cachichi1
  2031. tun%(6) = -4000
  2032. WHEN "CachichiTr" : *CHANNELVOICE 6 CachichiTr
  2033. tun%(6) = -8096
  2034. WHEN "Castanets" : *CHANNELVOICE 6 Castanets
  2035. tun%(6) = -4000
  2036. WHEN "CongaMid" : *CHANNELVOICE 6 CongaMid
  2037. tun%(6) = -4171
  2038. WHEN "CongaSmCl" : *CHANNELVOICE 6 CongaSmCl
  2039. tun%(6) = -4683
  2040. WHEN "CymbalCrsh" : *CHANNELVOICE 6 CymbalCrsh
  2041. tun%(6) = -4000
  2042. WHEN "CymRideBel" : *CHANNELVOICE 6 CymRideBel
  2043. tun%(6) = -16288
  2044. WHEN "CymRStRoll" : *CHANNELVOICE 6 CymRStRoll
  2045. tun%(6) = -6389
  2046. WHEN "CymSplshCa" : *CHANNELVOICE 6 CymSplshCa
  2047. tun%(6) = -9120
  2048. WHEN "Flexitone" : *CHANNELVOICE 6 Flexitone
  2049. tun%(6) = -8096
  2050. WHEN "GongSoft" : *CHANNELVOICE 6 GongSoft
  2051. tun%(6) = -5365
  2052. WHEN "Gonza1" : *CHANNELVOICE 6 Gonza1
  2053. tun%(6) = -12192
  2054. WHEN "GuiroSlow" : *CHANNELVOICE 6 GuiroSlow
  2055. tun%(6) = -6048
  2056. WHEN "HandClaps" : *CHANNELVOICE 6 HandClaps
  2057. tun%(6) = -4000
  2058. WHEN "HiHatFoot" : *CHANNELVOICE 6 HiHatFoot
  2059. tun%(6) = -6389
  2060. WHEN "Maracas1" : *CHANNELVOICE 6 Maracas1
  2061. tun%(6) = -8096
  2062. WHEN "MarimbaSB3" : *CHANNELVOICE 6 MarimbaSB3
  2063. tun%(6) = -4000
  2064. WHEN "Ratchet" : *CHANNELVOICE 6 Ratchet
  2065. tun%(6) = -6731
  2066. WHEN "RotoTomRev" : *CHANNELVOICE 6 RotoTomRev
  2067. tun%(6) = -6133
  2068. WHEN "SimmonsBD1" : *CHANNELVOICE 6 SimmonsBD1
  2069. tun%(6) = -8096
  2070. WHEN "SimmonsSn1" : *CHANNELVOICE 6 SimmonsSn1
  2071. tun%(6) = -5707
  2072. WHEN "SleighBell" : *CHANNELVOICE 6 SleighBell
  2073. tun%(6) = -4000
  2074. WHEN "SuperGong" : *CHANNELVOICE 6 SuperGong
  2075. tun%(6) = -4341
  2076. WHEN "SynthSnare" : *CHANNELVOICE 6 SynthSnare
  2077. tun%(6) = -4000
  2078. WHEN "SynTom" : *CHANNELVOICE 6 SynTom
  2079. tun%(6) = -9120
  2080. WHEN "TimpCresBb" : *CHANNELVOICE 6 TimpCresBb
  2081. tun%(6) = -5962
  2082. WHEN "TimpLowBb" : *CHANNELVOICE 6 TimpLowBb
  2083. tun%(6) = -5707
  2084. WHEN "TimpRollEb" : *CHANNELVOICE 6 TimpRollEb
  2085. tun%(6) = -4000
  2086. WHEN "TomRoll" : *CHANNELVOICE 6 TomRoll
  2087. tun%(6) = -4000
  2088. WHEN "ToyHooter" : *CHANNELVOICE 6 ToyHooter
  2089. tun%(6) = -9717
  2090. WHEN "ToyWhistle" : *CHANNELVOICE 6 ToyWhistle
  2091. tun%(6) = -4000
  2092. ENDCASE
  2093. WHEN 7 :
  2094. CASE waveforms$(vnumber%) OF
  2095. WHEN "WaveSynth-Beep" : *CHANNELVOICE 7 WaveSynth-Beep
  2096. WHEN "StringLib-Soft" : *CHANNELVOICE 7 StringLib-Soft
  2097. WHEN "StringLib-Pluck" : *CHANNELVOICE 7 StringLib-Pluck
  2098. WHEN "StringLib-Steel" : *CHANNELVOICE 7 StringLib-Steel
  2099. WHEN "StringLib-Hard" : *CHANNELVOICE 7 StringLib-Hard
  2100. WHEN "Percussion-Soft" : *CHANNELVOICE 7 Percussion-Soft
  2101. WHEN "Percussion-Medium" : *CHANNELVOICE 7 Percussion-Medium
  2102. WHEN "Percussion-Snare" : *CHANNELVOICE 7 Percussion-Snare
  2103. WHEN "Percussion-Noise" : *CHANNELVOICE 7 Percussion-Noise
  2104. WHEN "BassBowAb" : *CHANNELVOICE 7 BassBowAb
  2105. tun%(7) = -1470
  2106. WHEN "AcouBass" : *CHANNELVOICE 7 AcouBass
  2107. tun%(7) = -2731
  2108. WHEN "Vibe" : *CHANNELVOICE 7 Vibe
  2109. tun%(7) = -6912
  2110. WHEN "BugleC" : *CHANNELVOICE 7 BugleC
  2111. tun%(7) = -11008
  2112. WHEN "CornetEb" : *CHANNELVOICE 7 CornetEb
  2113. tun%(7) = -12117
  2114. WHEN "SaxEbBarC" : *CHANNELVOICE 7 SaxEbBarC
  2115. tun%(7) = -2816
  2116. WHEN "SaxBbTenrE" : *CHANNELVOICE 7 SaxBbTenrE
  2117. tun%(7) = -4181
  2118. WHEN "BassoonEb" : *CHANNELVOICE 7 BassoonEb
  2119. tun%(7) = -4011
  2120. WHEN "ClarinetBb" : *CHANNELVOICE 7 ClarinetBb
  2121. tun%(7) = -10325
  2122. WHEN "EngHornGb" : *CHANNELVOICE 7 EngHornGb
  2123. tun%(7) = -8960
  2124. WHEN "MandolinDb" : *CHANNELVOICE 7 MandolinDb
  2125. tun%(7) = -11264
  2126. WHEN "Piano2B" : *CHANNELVOICE 7 Piano2B
  2127. tun%(7) = -2475
  2128. WHEN "ClarVibEb" : *CHANNELVOICE 7 ClarVibEb
  2129. tun%(7) = -7850
  2130. WHEN "GtrDobroB" : *CHANNELVOICE 7 GtrDobroB
  2131. tun%(7) = -6485
  2132. WHEN "RecorderGb" : *CHANNELVOICE 7 RecorderGb
  2133. tun%(7) = -13056
  2134. WHEN "FlugelHnEb" : *CHANNELVOICE 7 FlugelHnEb
  2135. tun%(7) = -12032
  2136. WHEN "VceMmmGb23" : *CHANNELVOICE 7 VceMmmGb23
  2137. tun%(7) = -853
  2138. WHEN "VceMOooGb3" : *CHANNELVOICE 7 VceMOooGb3
  2139. tun%(7) = -4843
  2140. WHEN "VceFemAahC" : *CHANNELVOICE 7 VceFemAahC
  2141. tun%(7) = -10948
  2142. WHEN "VceFMmmGb4" : *CHANNELVOICE 7 VceFMmmGb4
  2143. tun%(7) = -8918
  2144. WHEN "Bass" : *CHANNELVOICE 7 Bass
  2145. tun%(7) = 0
  2146. WHEN "ChurchBell" : *CHANNELVOICE 7 ChurchBell
  2147. tun%(7) = -2731
  2148. WHEN "mysound" : *CHANNELVOICE 7 mysound
  2149. tun%(7) = 0
  2150. WHEN "GuiroFast" : *CHANNELVOICE 7 GuiroFast
  2151. tun%(7) = -4000
  2152. WHEN "Clave" : *CHANNELVOICE 7 Clave
  2153. tun%(7) = -8096
  2154. WHEN "CowBell" : *CHANNELVOICE 7 CowBell
  2155. tun%(7) = -5707
  2156. WHEN "CymbRideHd" : *CHANNELVOICE 7 CymbRideHd
  2157. tun%(7) = -8096
  2158. WHEN "AcGuitar1" : *CHANNELVOICE 7 AcGuitar1
  2159. tun%(7) = -7072
  2160. WHEN "CongaHi" : *CHANNELVOICE 7 CongaHi
  2161. tun%(7) = -4000
  2162. WHEN "DrumExplo" : *CHANNELVOICE 7 DrumExplo
  2163. tun%(7) = -4000
  2164. WHEN "ElecTom1" : *CHANNELVOICE 7 ElecTom1
  2165. tun%(7) = -8096
  2166. WHEN "Harp1" : *CHANNELVOICE 7 Harp1
  2167. tun%(7) = -10997
  2168. WHEN "Harpsi" : *CHANNELVOICE 7 Harpsi
  2169. tun%(7) = -6901
  2170. WHEN "HiString" : *CHANNELVOICE 7 HiString
  2171. tun%(7) = -10997
  2172. WHEN "HonkyPiano" : *CHANNELVOICE 7 HonkyPiano
  2173. tun%(7) = -6901
  2174. WHEN "JapFlute" : *CHANNELVOICE 7 JapFlute
  2175. tun%(7) = -10997
  2176. WHEN "JazzOrgan" : *CHANNELVOICE 7 JazzOrgan
  2177. tun%(7) = -10997
  2178. WHEN "MidStrings" : *CHANNELVOICE 7 MidStrings
  2179. tun%(7) = -6901
  2180. WHEN "NoteArp1" : *CHANNELVOICE 7 NoteArp1
  2181. tun%(7) = -4000
  2182. WHEN "SnareEcho" : *CHANNELVOICE 7 SnareEcho
  2183. tun%(7) = -4341
  2184. WHEN "TablaHi" : *CHANNELVOICE 7 TablaHi
  2185. tun%(7) = -7669
  2186. WHEN "Timpani" : *CHANNELVOICE 7 Timpani
  2187. tun%(7) = -928
  2188. WHEN "Tomtom1" : *CHANNELVOICE 7 Tomtom1
  2189. tun%(7) = -5365
  2190. WHEN "Trombone1" : *CHANNELVOICE 7 Trombone1
  2191. tun%(7) = -6901
  2192. WHEN "Trumpet" : *CHANNELVOICE 7 Trumpet
  2193. tun%(7) = -10997
  2194. WHEN "Xylophone" : *CHANNELVOICE 7 Xylophone
  2195. tun%(7) = -6901
  2196. WHEN "AcouGtr2B" : *CHANNELVOICE 7 AcouGtr2B
  2197. tun%(7) = -6560
  2198. WHEN "AcuBassAb1" : *CHANNELVOICE 7 AcuBassAb1
  2199. tun%(7) = -1610
  2200. WHEN "BagPipeG" : *CHANNELVOICE 7 BagPipeG
  2201. tun%(7) = -9291
  2202. WHEN "BanjoChdBb" : *CHANNELVOICE 7 BanjoChdBb
  2203. tun%(7) = -4000
  2204. WHEN "BazookiE" : *CHANNELVOICE 7 BazookiE
  2205. tun%(7) = -8267
  2206. WHEN "BellC" : *CHANNELVOICE 7 BellC
  2207. tun%(7) = -10997
  2208. WHEN "BrassEns1B" : *CHANNELVOICE 7 BrassEns1B
  2209. tun%(7) = -6560
  2210. WHEN "ClavichdBb" : *CHANNELVOICE 7 ClavichdBb
  2211. tun%(7) = -10315
  2212. WHEN "ClavinetBb" : *CHANNELVOICE 7 ClavinetBb
  2213. tun%(7) = -6219
  2214. WHEN "CornetEb" : *CHANNELVOICE 7 CornetEb
  2215. tun%(7) = -4000
  2216. WHEN "EnsWodAb45" : *CHANNELVOICE 7 EnsWodAb45
  2217. tun%(7) = -9632
  2218. WHEN "EnsWodGb12" : *CHANNELVOICE 7 EnsWodGb12
  2219. tun%(7) = -4853
  2220. WHEN "Glock2Ab5" : *CHANNELVOICE 7 Glock2Ab5
  2221. tun%(7) = -9632
  2222. WHEN "GtMelobarC" : *CHANNELVOICE 7 GtMelobarC
  2223. tun%(7) = -6901
  2224. WHEN "GtWashbnBb" : *CHANNELVOICE 7 GtWashbnBb
  2225. tun%(7) = -6219
  2226. WHEN "HarmonicaE" : *CHANNELVOICE 7 HarmonicaE
  2227. tun%(7) = -4171
  2228. WHEN "Jew'sHarpA" : *CHANNELVOICE 7 Jew'sHarpA
  2229. tun%(7) = -6219
  2230. WHEN "MusetteB" : *CHANNELVOICE 7 MusetteB
  2231. tun%(7) = -10656
  2232. WHEN "OboeGb" : *CHANNELVOICE 7 OboeGb
  2233. tun%(7) = -13131
  2234. WHEN "OrchHit2B" : *CHANNELVOICE 7 OrchHit2B
  2235. tun%(7) = -5451
  2236. WHEN "OrcSusBb23" : *CHANNELVOICE 7 OrcSusBb23
  2237. tun%(7) = -6304
  2238. WHEN "PiccoloE" : *CHANNELVOICE 7 PiccoloE
  2239. tun%(7) = -16544
  2240. WHEN "SaxSoprnoE" : *CHANNELVOICE 7 SaxSoprnoE
  2241. tun%(7) = -12448
  2242. WHEN "StrngThkBb" : *CHANNELVOICE 7 StrngThkBb
  2243. tun%(7) = -5792
  2244. WHEN "TubaGb" : *CHANNELVOICE 7 TubaGb
  2245. tun%(7) = -929
  2246. WHEN "BassDrum" : *CHANNELVOICE 7 BassDrum
  2247. tun%(7) = -4000
  2248. WHEN "HiHat" : *CHANNELVOICE 7 HiHat
  2249. tun%(7) = -4000
  2250. WHEN "OrcHit" : *CHANNELVOICE 7 OrcHit
  2251. tun%(7) = -4085
  2252. WHEN "Piano" : *CHANNELVOICE 7 Piano
  2253. tun%(7) = -4171
  2254. WHEN "Sax" : *CHANNELVOICE 7 Sax
  2255. tun%(7) = -4085
  2256. WHEN "Snare" : *CHANNELVOICE 7 Snare
  2257. tun%(7) = -8096
  2258. WHEN "Choir1" : *CHANNELVOICE 7 Choir1
  2259. tun%(7) = -6901
  2260. WHEN "ChurOrgan" : *CHANNELVOICE 7 ChurOrgan
  2261. tun%(7) = -6901
  2262. WHEN "Opera" : *CHANNELVOICE 7 Opera
  2263. tun%(7) = -13387
  2264. WHEN "OrchChoir" : *CHANNELVOICE 7 OrchChoir
  2265. tun%(7) = -6133
  2266. WHEN "OrganHit" : *CHANNELVOICE 7 OrganHit
  2267. tun%(7) = -5024
  2268. WHEN "AgogoAfric" : *CHANNELVOICE 7 AgogoAfric
  2269. tun%(7) = -6219
  2270. WHEN "AgogoBrazi" : *CHANNELVOICE 7 AgogoBrazi
  2271. tun%(7) = -10997
  2272. WHEN "AgogoWood" : *CHANNELVOICE 7 AgogoWood
  2273. tun%(7) = -13728
  2274. WHEN "BDGatedRev" : *CHANNELVOICE 7 BDGatedRev
  2275. tun%(7) = -5877
  2276. WHEN "BDMarching" : *CHANNELVOICE 7 BDMarching
  2277. tun%(7) = -8608
  2278. WHEN "BDPiloMute" : *CHANNELVOICE 7 BDPiloMute
  2279. tun%(7) = -7072
  2280. WHEN "Cabasa" : *CHANNELVOICE 7 Cabasa
  2281. tun%(7) = -7072
  2282. WHEN "Cachichi1" : *CHANNELVOICE 7 Cachichi1
  2283. tun%(7) = -4000
  2284. WHEN "CachichiTr" : *CHANNELVOICE 7 CachichiTr
  2285. tun%(7) = -8096
  2286. WHEN "Castanets" : *CHANNELVOICE 7 Castanets
  2287. tun%(7) = -4000
  2288. WHEN "CongaMid" : *CHANNELVOICE 7 CongaMid
  2289. tun%(7) = -4171
  2290. WHEN "CongaSmCl" : *CHANNELVOICE 7 CongaSmCl
  2291. tun%(7) = -4683
  2292. WHEN "CymbalCrsh" : *CHANNELVOICE 7 CymbalCrsh
  2293. tun%(7) = -4000
  2294. WHEN "CymRideBel" : *CHANNELVOICE 7 CymRideBel
  2295. tun%(7) = -16288
  2296. WHEN "CymRStRoll" : *CHANNELVOICE 7 CymRStRoll
  2297. tun%(7) = -6389
  2298. WHEN "CymSplshCa" : *CHANNELVOICE 7 CymSplshCa
  2299. tun%(7) = -9120
  2300. WHEN "Flexitone" : *CHANNELVOICE 7 Flexitone
  2301. tun%(7) = -8096
  2302. WHEN "GongSoft" : *CHANNELVOICE 7 GongSoft
  2303. tun%(7) = -5365
  2304. WHEN "Gonza1" : *CHANNELVOICE 7 Gonza1
  2305. tun%(7) = -12192
  2306. WHEN "GuiroSlow" : *CHANNELVOICE 7 GuiroSlow
  2307. tun%(7) = -6048
  2308. WHEN "HandClaps" : *CHANNELVOICE 7 HandClaps
  2309. tun%(7) = -4000
  2310. WHEN "HiHatFoot" : *CHANNELVOICE 7 HiHatFoot
  2311. tun%(7) = -6389
  2312. WHEN "Maracas1" : *CHANNELVOICE 7 Maracas1
  2313. tun%(7) = -8096
  2314. WHEN "MarimbaSB3" : *CHANNELVOICE 7 MarimbaSB3
  2315. tun%(7) = -4000
  2316. WHEN "Ratchet" : *CHANNELVOICE 7 Ratchet
  2317. tun%(7) = -6731
  2318. WHEN "RotoTomRev" : *CHANNELVOICE 7 RotoTomRev
  2319. tun%(7) = -6133
  2320. WHEN "SimmonsBD1" : *CHANNELVOICE 7 SimmonsBD1
  2321. tun%(7) = -8096
  2322. WHEN "SimmonsSn1" : *CHANNELVOICE 7 SimmonsSn1
  2323. tun%(7) = -5707
  2324. WHEN "SleighBell" : *CHANNELVOICE 7 SleighBell
  2325. tun%(7) = -4000
  2326. WHEN "SuperGong" : *CHANNELVOICE 7 SuperGong
  2327. tun%(7) = -4341
  2328. WHEN "SynthSnare" : *CHANNELVOICE 7 SynthSnare
  2329. tun%(7) = -4000
  2330. WHEN "SynTom" : *CHANNELVOICE 7 SynTom
  2331. tun%(7) = -9120
  2332. WHEN "TimpCresBb" : *CHANNELVOICE 7 TimpCresBb
  2333. tun%(7) = -5962
  2334. WHEN "TimpLowBb" : *CHANNELVOICE 7 TimpLowBb
  2335. tun%(7) = -5707
  2336. WHEN "TimpRollEb" : *CHANNELVOICE 7 TimpRollEb
  2337. tun%(7) = -4000
  2338. WHEN "TomRoll" : *CHANNELVOICE 7 TomRoll
  2339. tun%(7) = -4000
  2340. WHEN "ToyHooter" : *CHANNELVOICE 7 ToyHooter
  2341. tun%(7) = -9717
  2342. WHEN "ToyWhistle" : *CHANNELVOICE 7 ToyWhistle
  2343. tun%(7) = -4000
  2344. ENDCASE
  2345. WHEN 8 :
  2346. CASE waveforms$(vnumber%) OF
  2347. WHEN "WaveSynth-Beep" : *CHANNELVOICE 8 WaveSynth-Beep
  2348. WHEN "StringLib-Soft" : *CHANNELVOICE 8 StringLib-Soft
  2349. WHEN "StringLib-Pluck" : *CHANNELVOICE 8 StringLib-Pluck
  2350. WHEN "StringLib-Steel" : *CHANNELVOICE 8 StringLib-Steel
  2351. WHEN "StringLib-Hard" : *CHANNELVOICE 8 StringLib-Hard
  2352. WHEN "Percussion-Soft" : *CHANNELVOICE 8 Percussion-Soft
  2353. WHEN "Percussion-Medium" : *CHANNELVOICE 8 Percussion-Medium
  2354. WHEN "Percussion-Snare" : *CHANNELVOICE 8 Percussion-Snare
  2355. WHEN "Percussion-Noise" : *CHANNELVOICE 8 Percussion-Noise
  2356. WHEN "BassBowAb" : *CHANNELVOICE 8 BassBowAb
  2357. tun%(8) = -1470
  2358. WHEN "AcouBass" : *CHANNELVOICE 8 AcouBass
  2359. tun%(8) = -2731
  2360. WHEN "Vibe" : *CHANNELVOICE 8 Vibe
  2361. tun%(8) = -6912
  2362. WHEN "BugleC" : *CHANNELVOICE 8 BugleC
  2363. tun%(8) = -11008
  2364. WHEN "CornetEb" : *CHANNELVOICE 8 CornetEb
  2365. tun%(8) = -12117
  2366. WHEN "SaxEbBarC" : *CHANNELVOICE 8 SaxEbBarC
  2367. tun%(8) = -2816
  2368. WHEN "SaxBbTenrE" : *CHANNELVOICE 8 SaxBbTenrE
  2369. tun%(8) = -4181
  2370. WHEN "BassoonEb" : *CHANNELVOICE 8 BassoonEb
  2371. tun%(8) = -4011
  2372. WHEN "ClarinetBb" : *CHANNELVOICE 8 ClarinetBb
  2373. tun%(8) = -10325
  2374. WHEN "EngHornGb" : *CHANNELVOICE 8 EngHornGb
  2375. tun%(8) = -8960
  2376. WHEN "MandolinDb" : *CHANNELVOICE 8 MandolinDb
  2377. tun%(8) = -11264
  2378. WHEN "Piano2B" : *CHANNELVOICE 8 Piano2B
  2379. tun%(8) = -2475
  2380. WHEN "ClarVibEb" : *CHANNELVOICE 8 ClarVibEb
  2381. tun%(8) = -7850
  2382. WHEN "GtrDobroB" : *CHANNELVOICE 8 GtrDobroB
  2383. tun%(8) = -6485
  2384. WHEN "RecorderGb" : *CHANNELVOICE 8 RecorderGb
  2385. tun%(8) = -13056
  2386. WHEN "FlugelHnEb" : *CHANNELVOICE 8 FlugelHnEb
  2387. tun%(8) = -12032
  2388. WHEN "VceMmmGb23" : *CHANNELVOICE 8 VceMmmGb23
  2389. tun%(8) = -853
  2390. WHEN "VceMOooGb3" : *CHANNELVOICE 8 VceMOooGb3
  2391. tun%(8) = -4843
  2392. WHEN "VceFemAahC" : *CHANNELVOICE 8 VceFemAahC
  2393. tun%(8) = -10948
  2394. WHEN "VceFMmmGb4" : *CHANNELVOICE 8 VceFMmmGb4
  2395. tun%(8) = -8918
  2396. WHEN "Bass" : *CHANNELVOICE 8 Bass
  2397. tun%(8) = 0
  2398. WHEN "ChurchBell" : *CHANNELVOICE 8 ChurchBell
  2399. tun%(8) = -2731
  2400. WHEN "mysound" : *CHANNELVOICE 8 mysound
  2401. tun%(8) = 0
  2402. WHEN "GuiroFast" : *CHANNELVOICE 8 GuiroFast
  2403. tun%(8) = -4000
  2404. WHEN "Clave" : *CHANNELVOICE 8 Clave
  2405. tun%(8) = -8096
  2406. WHEN "CowBell" : *CHANNELVOICE 8 CowBell
  2407. tun%(8) = -5707
  2408. WHEN "CymbRideHd" : *CHANNELVOICE 8 CymbRideHd
  2409. tun%(8) = -8096
  2410. WHEN "AcGuitar1" : *CHANNELVOICE 8 AcGuitar1
  2411. tun%(8) = -7072
  2412. WHEN "CongaHi" : *CHANNELVOICE 8 CongaHi
  2413. tun%(8) = -4000
  2414. WHEN "DrumExplo" : *CHANNELVOICE 8 DrumExplo
  2415. tun%(8) = -4000
  2416. WHEN "ElecTom1" : *CHANNELVOICE 8 ElecTom1
  2417. tun%(8) = -8096
  2418. WHEN "Harp1" : *CHANNELVOICE 8 Harp1
  2419. tun%(8) = -10997
  2420. WHEN "Harpsi" : *CHANNELVOICE 8 Harpsi
  2421. tun%(8) = -6901
  2422. WHEN "HiString" : *CHANNELVOICE 8 HiString
  2423. tun%(8) = -10997
  2424. WHEN "HonkyPiano" : *CHANNELVOICE 8 HonkyPiano
  2425. tun%(8) = -6901
  2426. WHEN "JapFlute" : *CHANNELVOICE 8 JapFlute
  2427. tun%(8) = -10997
  2428. WHEN "JazzOrgan" : *CHANNELVOICE 8 JazzOrgan
  2429. tun%(8) = -10997
  2430. WHEN "MidStrings" : *CHANNELVOICE 8 MidStrings
  2431. tun%(8) = -6901
  2432. WHEN "NoteArp1" : *CHANNELVOICE 8 NoteArp1
  2433. tun%(8) = -4000
  2434. WHEN "SnareEcho" : *CHANNELVOICE 8 SnareEcho
  2435. tun%(8) = -4341
  2436. WHEN "TablaHi" : *CHANNELVOICE 8 TablaHi
  2437. tun%(8) = -7669
  2438. WHEN "Timpani" : *CHANNELVOICE 8 Timpani
  2439. tun%(8) = -928
  2440. WHEN "Tomtom1" : *CHANNELVOICE 8 Tomtom1
  2441. tun%(8) = -5365
  2442. WHEN "Trombone1" : *CHANNELVOICE 8 Trombone1
  2443. tun%(8) = -6901
  2444. WHEN "Trumpet" : *CHANNELVOICE 8 Trumpet
  2445. tun%(8) = -10997
  2446. WHEN "Xylophone" : *CHANNELVOICE 8 Xylophone
  2447. tun%(8) = -6901
  2448. WHEN "AcouGtr2B" : *CHANNELVOICE 8 AcouGtr2B
  2449. tun%(8) = -6560
  2450. WHEN "AcuBassAb1" : *CHANNELVOICE 8 AcuBassAb1
  2451. tun%(8) = -1610
  2452. WHEN "BagPipeG" : *CHANNELVOICE 8 BagPipeG
  2453. tun%(8) = -9291
  2454. WHEN "BanjoChdBb" : *CHANNELVOICE 8 BanjoChdBb
  2455. tun%(8) = -4000
  2456. WHEN "BazookiE" : *CHANNELVOICE 8 BazookiE
  2457. tun%(8) = -8267
  2458. WHEN "BellC" : *CHANNELVOICE 8 BellC
  2459. tun%(8) = -10997
  2460. WHEN "BrassEns1B" : *CHANNELVOICE 8 BrassEns1B
  2461. tun%(8) = -6560
  2462. WHEN "ClavichdBb" : *CHANNELVOICE 8 ClavichdBb
  2463. tun%(8) = -10315
  2464. WHEN "ClavinetBb" : *CHANNELVOICE 8 ClavinetBb
  2465. tun%(8) = -6219
  2466. WHEN "CornetEb" : *CHANNELVOICE 8 CornetEb
  2467. tun%(8) = -4000
  2468. WHEN "EnsWodAb45" : *CHANNELVOICE 8 EnsWodAb45
  2469. tun%(8) = -9632
  2470. WHEN "EnsWodGb12" : *CHANNELVOICE 8 EnsWodGb12
  2471. tun%(8) = -4853
  2472. WHEN "Glock2Ab5" : *CHANNELVOICE 8 Glock2Ab5
  2473. tun%(8) = -9632
  2474. WHEN "GtMelobarC" : *CHANNELVOICE 8 GtMelobarC
  2475. tun%(8) = -6901
  2476. WHEN "GtWashbnBb" : *CHANNELVOICE 8 GtWashbnBb
  2477. tun%(8) = -6219
  2478. WHEN "HarmonicaE" : *CHANNELVOICE 8 HarmonicaE
  2479. tun%(8) = -4171
  2480. WHEN "Jew'sHarpA" : *CHANNELVOICE 8 Jew'sHarpA
  2481. tun%(8) = -6219
  2482. WHEN "MusetteB" : *CHANNELVOICE 8 MusetteB
  2483. tun%(8) = -10656
  2484. WHEN "OboeGb" : *CHANNELVOICE 8 OboeGb
  2485. tun%(8) = -13131
  2486. WHEN "OrchHit2B" : *CHANNELVOICE 8 OrchHit2B
  2487. tun%(8) = -5451
  2488. WHEN "OrcSusBb23" : *CHANNELVOICE 8 OrcSusBb23
  2489. tun%(8) = -6304
  2490. WHEN "PiccoloE" : *CHANNELVOICE 8 PiccoloE
  2491. tun%(8) = -16544
  2492. WHEN "SaxSoprnoE" : *CHANNELVOICE 8 SaxSoprnoE
  2493. tun%(8) = -12448
  2494. WHEN "StrngThkBb" : *CHANNELVOICE 8 StrngThkBb
  2495. tun%(8) = -5792
  2496. WHEN "TubaGb" : *CHANNELVOICE 8 TubaGb
  2497. tun%(8) = -929
  2498. WHEN "BassDrum" : *CHANNELVOICE 8 BassDrum
  2499. tun%(8) = -4000
  2500. WHEN "HiHat" : *CHANNELVOICE 8 HiHat
  2501. tun%(8) = -4000
  2502. WHEN "OrcHit" : *CHANNELVOICE 8 OrcHit
  2503. tun%(8) = -4085
  2504. WHEN "Piano" : *CHANNELVOICE 8 Piano
  2505. tun%(8) = -4171
  2506. WHEN "Sax" : *CHANNELVOICE 8 Sax
  2507. tun%(8) = -4085
  2508. WHEN "Snare" : *CHANNELVOICE 8 Snare
  2509. tun%(8) = -8096
  2510. WHEN "Choir1" : *CHANNELVOICE 8 Choir1
  2511. tun%(8) = -6901
  2512. WHEN "ChurOrgan" : *CHANNELVOICE 8 ChurOrgan
  2513. tun%(8) = -6901
  2514. WHEN "Opera" : *CHANNELVOICE 8 Opera
  2515. tun%(8) = -13387
  2516. WHEN "OrchChoir" : *CHANNELVOICE 8 OrchChoir
  2517. tun%(8) = -6133
  2518. WHEN "OrganHit" : *CHANNELVOICE 8 OrganHit
  2519. tun%(8) = -5024
  2520. WHEN "AgogoAfric" : *CHANNELVOICE 8 AgogoAfric
  2521. tun%(8) = -6219
  2522. WHEN "AgogoBrazi" : *CHANNELVOICE 8 AgogoBrazi
  2523. tun%(8) = -10997
  2524. WHEN "AgogoWood" : *CHANNELVOICE 8 AgogoWood
  2525. tun%(8) = -13728
  2526. WHEN "BDGatedRev" : *CHANNELVOICE 8 BDGatedRev
  2527. tun%(8) = -5877
  2528. WHEN "BDMarching" : *CHANNELVOICE 8 BDMarching
  2529. tun%(8) = -8608
  2530. WHEN "BDPiloMute" : *CHANNELVOICE 8 BDPiloMute
  2531. tun%(8) = -7072
  2532. WHEN "Cabasa" : *CHANNELVOICE 8 Cabasa
  2533. tun%(8) = -7072
  2534. WHEN "Cachichi1" : *CHANNELVOICE 8 Cachichi1
  2535. tun%(8) = -4000
  2536. WHEN "CachichiTr" : *CHANNELVOICE 8 CachichiTr
  2537. tun%(8) = -8096
  2538. WHEN "Castanets" : *CHANNELVOICE 8 Castanets
  2539. tun%(8) = -4000
  2540. WHEN "CongaMid" : *CHANNELVOICE 8 CongaMid
  2541. tun%(8) = -4171
  2542. WHEN "CongaSmCl" : *CHANNELVOICE 8 CongaSmCl
  2543. tun%(8) = -4683
  2544. WHEN "CymbalCrsh" : *CHANNELVOICE 8 CymbalCrsh
  2545. tun%(8) = -4000
  2546. WHEN "CymRideBel" : *CHANNELVOICE 8 CymRideBel
  2547. tun%(8) = -16288
  2548. WHEN "CymRStRoll" : *CHANNELVOICE 8 CymRStRoll
  2549. tun%(8) = -6389
  2550. WHEN "CymSplshCa" : *CHANNELVOICE 8 CymSplshCa
  2551. tun%(8) = -9120
  2552. WHEN "Flexitone" : *CHANNELVOICE 8 Flexitone
  2553. tun%(8) = -8096
  2554. WHEN "GongSoft" : *CHANNELVOICE 8 GongSoft
  2555. tun%(8) = -5365
  2556. WHEN "Gonza1" : *CHANNELVOICE 8 Gonza1
  2557. tun%(8) = -12192
  2558. WHEN "GuiroSlow" : *CHANNELVOICE 8 GuiroSlow
  2559. tun%(8) = -6048
  2560. WHEN "HandClaps" : *CHANNELVOICE 8 HandClaps
  2561. tun%(8) = -4000
  2562. WHEN "HiHatFoot" : *CHANNELVOICE 8 HiHatFoot
  2563. tun%(8) = -6389
  2564. WHEN "Maracas1" : *CHANNELVOICE 8 Maracas1
  2565. tun%(8) = -8096
  2566. WHEN "MarimbaSB3" : *CHANNELVOICE 8 MarimbaSB3
  2567. tun%(8) = -4000
  2568. WHEN "Ratchet" : *CHANNELVOICE 8 Ratchet
  2569. tun%(8) = -6731
  2570. WHEN "RotoTomRev" : *CHANNELVOICE 8 RotoTomRev
  2571. tun%(8) = -6133
  2572. WHEN "SimmonsBD1" : *CHANNELVOICE 8 SimmonsBD1
  2573. tun%(8) = -8096
  2574. WHEN "SimmonsSn1" : *CHANNELVOICE 8 SimmonsSn1
  2575. tun%(8) = -5707
  2576. WHEN "SleighBell" : *CHANNELVOICE 8 SleighBell
  2577. tun%(8) = -4000
  2578. WHEN "SuperGong" : *CHANNELVOICE 8 SuperGong
  2579. tun%(8) = -4341
  2580. WHEN "SynthSnare" : *CHANNELVOICE 8 SynthSnare
  2581. tun%(8) = -4000
  2582. WHEN "SynTom" : *CHANNELVOICE 8 SynTom
  2583. tun%(8) = -9120
  2584. WHEN "TimpCresBb" : *CHANNELVOICE 8 TimpCresBb
  2585. tun%(8) = -5962
  2586. WHEN "TimpLowBb" : *CHANNELVOICE 8 TimpLowBb
  2587. tun%(8) = -5707
  2588. WHEN "TimpRollEb" : *CHANNELVOICE 8 TimpRollEb
  2589. tun%(8) = -4000
  2590. WHEN "TomRoll" : *CHANNELVOICE 8 TomRoll
  2591. tun%(8) = -4000
  2592. WHEN "ToyHooter" : *CHANNELVOICE 8 ToyHooter
  2593. tun%(8) = -9717
  2594. WHEN "ToyWhistle" : *CHANNELVOICE 8 ToyWhistle
  2595. tun%(8) = -4000
  2596. ENDCASE
  2597. ENDCASE
  2598. :
  2599. ELSE
  2600. *CHANNELVOICE 1 WaveSynth-Beep
  2601. *CHANNELVOICE 2 WaveSynth-Beep
  2602. *CHANNELVOICE 3 WaveSynth-Beep
  2603. *CHANNELVOICE 4 WaveSynth-Beep
  2604. *CHANNELVOICE 5 WaveSynth-Beep
  2605. *CHANNELVOICE 6 WaveSynth-Beep
  2606. *CHANNELVOICE 7 WaveSynth-Beep
  2607. *CHANNELVOICE 8 WaveSynth-Beep
  2608. ENDIF
  2609. :
  2610. REM fill bar%() with starting bar nos for each voice
  2611. PROCnewnotereception((vnumber%-1),startingbar%,startbeat%,0,0,0,0,0,0)
  2612. CASE option% OF
  2613. WHEN 1,3 : startcell% = 0
  2614. WHEN 2 : startcell% = numusedcells%(vnumber%-1)
  2615. WHEN 4 : start% = (startingbar%*10^3)+startbeat%
  2616. voice% = vnumber%-1 : PROCsearch(start%)
  2617. ENDCASE
  2618. cell%(vnumber%-1) = startcell%
  2619. bar%(vnumber%-1) = array%(cell%(vnumber%-1),0,vnumber%-1)DIV10^6
  2620. NEXT
  2621. :
  2622. startbar% = startingbar% : preplaydisplay$ = "y" : PROCdisplay : preplaydisplay$ = "n"
  2623. tempo% = tempi%(startingbar%)*960*0.681595
  2624. IF waveload$ = "done" THEN tempo% = tempo%*1.23065
  2625. TEMPO tempo%
  2626. kount% = 1
  2627. :
  2628. FOR barnum% = startingbar% TO endbar%
  2629. :
  2630. IF playnewscreen$ = "y" AND ((startbar%+(numbars%*2)) <= nobars%) THEN
  2631. IF barnum% = startingbar% + (numbars%*kount%) + 1 THEN
  2632. startbar% += numbars% : preplaydisplay$ = "y" : PROCdisplay: kount% += 1
  2633. preplaydisplay$ = "n"
  2634. ENDIF
  2635. ENDIF
  2636. :
  2637. tempo% = tempi%(barnum%-1)*960*0.681595
  2638. IF waveload$ = "done" THEN tempo% = tempo%*1.23065
  2639. TEMPO tempo%
  2640. REPEAT UNTIL BEAT < 20
  2641. :
  2642. FOR count% = 1 TO nvoices%
  2643. voicenum% = playvoices%(count%)-1
  2644. lv$ = "n"
  2645. IF lvdata%(count%,1)>0 THEN lv$ = "y"
  2646. :
  2647. WHILE bar%(voicenum%) = barnum%
  2648. after% = ((array%(cell%(voicenum%),0,voicenum%) DIV 10^3) MOD 10^3) + 20
  2649. pitchdata% = (array%(cell%(voicenum%),0,voicenum%)MOD10^3)
  2650. notename% = pitchdata% DIV 100
  2651. accid% = (pitchdata% MOD 100) DIV 10
  2652. octave% = pitchdata%MOD10
  2653. inflect% = (array%(cell%(voicenum%),2,voicenum%)MOD10^2) : inflect% -= 50
  2654. :
  2655. CASE notename% OF
  2656. WHEN 6 : pitch% = 3755
  2657. WHEN 5 : pitch% = 3072
  2658. WHEN 4 : pitch% = 2389
  2659. WHEN 3 : pitch% = 1707
  2660. WHEN 2 : pitch% = 1365
  2661. WHEN 1 : pitch% = 683
  2662. WHEN 0 : pitch% = 0
  2663. ENDCASE
  2664. accid% = accid%-5
  2665. accid% = accid%*85.34
  2666. pitch% = pitch% + accid%
  2667. pitch% = pitch% + (4096*octave%) + tun%(count%) + (inflect%*3.41)
  2668. amp2% = (array%(cell%(voicenum%),2,voicenum%)DIV10^2)MOD10
  2669. amp3% = (array%(cell%(voicenum%),2,voicenum%)DIV10^3)MOD10
  2670. :
  2671. dyn% = array%(cell%(voicenum%),1,voicenum%)MOD10
  2672. dyn% = 257 + (16*dyn%)
  2673. IF amp2% = 9 AND amp3% <> 0 THEN
  2674. CASE amp3% OF
  2675. WHEN 1 : dyn% += 1
  2676. WHEN 2 : dyn% += 2
  2677. WHEN 3 : dyn% += 4
  2678. WHEN 4 : dyn% += 6
  2679. WHEN 5 : dyn% += 8
  2680. WHEN 6 : dyn% += 10
  2681. WHEN 7 : dyn% += 12
  2682. WHEN 8 : dyn% += 14
  2683. WHEN 9 : dyn% += 15
  2684. ENDCASE
  2685. ENDIF
  2686. IF dyn% > 383 THEN dyn% = 383
  2687. :
  2688. dur% = (array%(cell%(voicenum%),1,voicenum%)MOD10^4)DIV10
  2689. IF waveload$ = "done" THEN dur% = dur%/1.23065
  2690. IF dur% < 1 THEN dur% = 1
  2691. IF lv$ = "n" THEN
  2692. chan% = count%
  2693. ELSE
  2694. tic%(count%)+=1
  2695. IF lvdata%(count%,tic%(count%)) = 0 THEN tic%(count%) = 1
  2696. chan% = lvdata%(count%,tic%(count%))
  2697. ENDIF
  2698. :
  2699. SOUND chan%, dyn%, pitch%, dur%, after%
  2700. :
  2701. IF amp2% <> 9 THEN PROCenv
  2702. :
  2703. cell%(voicenum%) += 1
  2704. bar%(voicenum%) = array%(cell%(voicenum%),0,voicenum%) DIV 10^6
  2705. :
  2706. ENDWHILE
  2707. :
  2708. NEXT count%
  2709. :
  2710. REPEAT UNTIL BEAT > 20
  2711. :
  2712. NEXT barnum%
  2713. :
  2714. PROCpostdisplay
  2715. :
  2716. ENDPROC
  2717. :
  2718. REM*******************************
  2719. :
  2720. DEF PROCaddonenote
  2721. :
  2722. IF easiermenus$ = "n" THEN PROCwindow(20,72,72,55) ELSE PROCwindow(20,69,60,42)
  2723. CLS
  2724. INPUT' " Which voice (0 = top) "voice%
  2725. IF voice% = 0 THEN PROCpressenter
  2726. voice% -= 1
  2727. INPUT '" Bar number (for 1 press 0) "barno%
  2728. IF barno% = 0 THEN barno% = 1
  2729. INPUT '" Beat number "beats%
  2730. PROCalterbeats
  2731. beatno% = beats%
  2732. :
  2733. PRINT '" Pitch name ";
  2734. COLOUR 3
  2735. CASE GET$ OF
  2736. WHEN "C","c" : note% = 0 : PRINT "C"
  2737. WHEN "D","d" : note% = 1 : PRINT "D"
  2738. WHEN "E","e" : note% = 2 : PRINT "E"
  2739. WHEN "F","f" : note% = 3 : PRINT "F"
  2740. WHEN "G","g" : note% = 4 : PRINT "G"
  2741. WHEN "A","a" : note% = 5 : PRINT "A"
  2742. WHEN "B","b" : note% = 6 : PRINT "B"
  2743. ENDCASE
  2744. COLOUR 0
  2745. PRINT '" Accidental ";
  2746. COLOUR 3
  2747. CASE GET$ OF
  2748. WHEN "1" : accid% = 1 : PRINT "flat"
  2749. WHEN "2" : accid% = 2 : PRINT "3/8flat"
  2750. WHEN "3" : accid% = 3 : PRINT "1/4flat"
  2751. WHEN "4" : accid% = 4 : PRINT "1/8flat"
  2752. WHEN "5" : accid% = 5 : PRINT "nat"
  2753. WHEN "6" : accid% = 6 : PRINT "1/8shrp"
  2754. WHEN "7" : accid% = 7 : PRINT "1/4shrp"
  2755. WHEN "8" : accid% = 8 : PRINT "3/8shrp"
  2756. WHEN "9" : accid% = 9 : PRINT "shrp"
  2757. ENDCASE
  2758. COLOUR 0
  2759. PRINT '" octave ";
  2760. COLOUR 3
  2761. CASE GET$ OF
  2762. WHEN "0" : octave% = 0 : PRINT "0"
  2763. WHEN "1" : octave% = 1 : PRINT "1"
  2764. WHEN "2" : octave% = 2 : PRINT "2"
  2765. WHEN "3" : octave% = 3 : PRINT "3"
  2766. WHEN "4" : octave% = 4 : PRINT "4"
  2767. WHEN "5" : octave% = 5 : PRINT "5"
  2768. WHEN "6" : octave% = 6 : PRINT "6"
  2769. WHEN "7" : octave% = 7 : PRINT "7"
  2770. WHEN "8" : octave% = 8 : PRINT "8"
  2771. ENDCASE
  2772. COLOUR 0
  2773. pitch% = (note%*100)+(accid%*10)+octave%
  2774. INPUT '" Duration: bars "b%
  2775. INPUT '" beats "beats% : PROCalterbeats
  2776. dur% = (b%*960)+beats%
  2777. :
  2778. CLS
  2779. :
  2780. PRINT'" Envelope/glissando has how many phases? "
  2781. INPUT'" (if no envelope/glissando type 0) "numphases%
  2782. :
  2783. CASE numphases% OF
  2784. :
  2785. WHEN 0 :
  2786. INPUT'" ampitude is "amp$ : PROCconvertdynamics : amp1% = amp%
  2787. ph2% = 0 : ph1% = 0 : amp4% = 0 : amp3% = 0 : amp2% = 9 : gliss3% = 10 : gliss2% = 50 : gliss1% = 50
  2788. :
  2789. WHEN 1 :
  2790. INPUT'" starting amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
  2791. INPUT " destination amplitude is "amp$ : PROCconvertdynamics : amp2% = amp%
  2792. IF amp2% = amp1% THEN amp2% = 0
  2793. INPUT'" glissando is (in 1/8 tones, max 48,-48) "gliss%
  2794. gliss1% = 50-gliss%
  2795. ph2% = 0 : ph1% = 0 : amp4% = 0 : amp3% = 0 : gliss3% = 10 : gliss2% = 50
  2796. :
  2797. WHEN 2 :
  2798. INPUT'" starting amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
  2799. PRINT'" phase 1 ends after what percentage "
  2800. INPUT " of the note's duration "ph1%
  2801. INPUT " phase 1's destination amplitude is "amp$ : PROCconvertdynamics : amp2% = amp%
  2802. INPUT " phase 1's glissando is (in 1/8 tones, max 48,-48) "gliss%
  2803. gliss1% = 50-gliss%
  2804. INPUT'" phase 2's destination amplitude is "amp$ : PROCconvertdynamics : amp3% = amp%
  2805. INPUT " phase 2's glissando is (in 1/8 tones, max 48,-48) "gliss%
  2806. gliss2% = 50-gliss%
  2807. ph2% = 0 : amp4% = 0 : gliss3% = 10
  2808. :
  2809. WHEN 3 :
  2810. INPUT'" starting amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
  2811. PRINT'" phase 1 ends after what percentage "
  2812. INPUT " of the note's duration "ph1%
  2813. INPUT " phase 1's destination amplitude is "amp$ : PROCconvertdynamics : amp2% = amp%
  2814. INPUT " phase 1's glissando is (in 1/8 tones, max 48,-48) "gliss%
  2815. gliss1% = 50-gliss%
  2816. PRINT'" phase 2 ends after what percentage "
  2817. INPUT " of the note's duration "ph2%
  2818. INPUT'" phase 2's destination amplitude is "amp$ : PROCconvertdynamics : amp3% = amp%
  2819. INPUT " phase 2's glissando is (in 1/8 tones, max 48,-48) "gliss%
  2820. gliss2% = 50-gliss%
  2821. INPUT'" phase 3's destination amplitude is "amp$ : PROCconvertdynamics : amp4% = amp%
  2822. REPEAT
  2823. INPUT " phase 3's glissando is (in 1/8 tones, max 10,-10) "gliss%
  2824. gliss3% = 10-gliss%
  2825. IF gliss3% > 20 THEN VDU7
  2826. IF gliss3% < 0 THEN VDU7
  2827. UNTIL gliss3% < 21 AND gliss3% >= 0
  2828. :
  2829. ENDCASE
  2830. :
  2831. env% = (ph2%*10^5)+(ph1%*10^3)+(amp4%*10^2)+(amp3%*10)+amp2%
  2832. dyn% = amp1%
  2833. gliss% = (gliss3%*10^4)+(gliss2%*10^2)+gliss1%
  2834. :
  2835. PRINT '" Microtonal inflection "
  2836. INPUT'" (in cents, eg 1, -1, etc., max.49) "inf%
  2837. inf% = 50+inf%
  2838. :
  2839. addingnotes$ = "y"
  2840. PROCnewnotereception(voice%,barno%,beatno%,pitch%,dyn%,env%,dur%,gliss%,inf%)
  2841. :
  2842. PROCdisplay
  2843. :
  2844. ENDPROC
  2845. :
  2846. REM*************************************
  2847. :
  2848. DEF PROCinsertattacks
  2849. :
  2850. PROCundoprepare
  2851. :
  2852. destinationdone$ = "n"
  2853. :
  2854. CASE savevoice$ OF
  2855. WHEN "Y" : PROCsavevoice
  2856. OTHERWISE
  2857. ENDCASE
  2858. REM PROCwindow(20,69,70,55)
  2859. CLS
  2860. repeatposit$ = "n"
  2861. IF method$ = "raw" THEN
  2862. IF reordered$ = "n" THEN
  2863. IF equalized$ = "n" THEN
  2864. IF quiz$ = "yes" THEN
  2865. IF copyit$ = "ON" THEN
  2866. :
  2867. IF copydownwards$ = "n" THEN
  2868. PRINT ' " the passage is to be copied/moved to bar... "
  2869. PRINT ' " (press 0 for same position as original "
  2870. PRINT " or forward/back from it by so much) "
  2871. INPUT ' " (press 0 twice for previous position) "bars%
  2872. IF bars% <> 0 THEN memorybar% = bars%
  2873. IF bars% = 0 THEN
  2874. bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
  2875. IF askprevious$ = "y" THEN
  2876. thing$ = INKEY$(50)
  2877. IF thing$ <> "" THEN
  2878. bars% = memorybar% : beats% = memorybeat%
  2879. COLOUR 3
  2880. PRINT'" bar ";bars%;" beat ";beats%;"?"
  2881. COLOUR 0
  2882. PRINT '" (for OK press 0, if not OK press X) "
  2883. destinationdone$ = "y"
  2884. CASE GET$ OF
  2885. WHEN "X","x" : PROCinsertattacks
  2886. OTHERWISE
  2887. ENDCASE
  2888. ENDIF
  2889. ENDIF
  2890. ENDIF
  2891. ELSE bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
  2892. :
  2893. ENDIF
  2894. :
  2895. ELSE
  2896. :
  2897. PRINT' " the passage is to start at bar "
  2898. INPUT' " (0 = first bar displayed) "bars%
  2899. IF bars% = 0 THEN
  2900. bars% = startbar%
  2901. COLOUR 3 : PRINT' bars% : COLOUR 0
  2902. nothing$ = INKEY$(100)
  2903. ENDIF
  2904. :
  2905. ENDIF : REM copyit$
  2906. :
  2907. IF repeatposit$ = "n" THEN
  2908. INPUT' " beat "beats%
  2909. IF beats% = 0 THEN
  2910. COLOUR 3 : PRINT beats% : COLOUR 0
  2911. nothing$ = INKEY$(100)
  2912. ENDIF
  2913. memorybeat% = beats%
  2914. ELSE
  2915. :
  2916. IF copydownwards$ = "n" AND destinationdone$ = "n" THEN
  2917. COLOUR 3
  2918. PRINT'" bar ";bars%;" beat ";beats%;"?"
  2919. COLOUR 0
  2920. PRINT'" (press 0 for OK, B for Back"
  2921. PRINT " F for Forward, X if not OK)"
  2922. CASE GET$ OF
  2923. WHEN "b", "B" : PROCmoveback
  2924. WHEN "f", "F" : PROCmoveforward
  2925. WHEN "x","X" : PROCinsertattacks
  2926. OTHERWISE
  2927. ENDCASE
  2928. ELSE
  2929. ENDIF
  2930. :
  2931. ENDIF : REM repeatposit$
  2932. :
  2933. ELSE
  2934. bars% = funcbar% : beats% = funcbeat%
  2935. ENDIF : REM quiz$
  2936. :
  2937. quiz$ = "yes"
  2938. PROCalterbeats
  2939. startat% = (bars%*(10^3))+beats%
  2940. ENDIF : REM equalized$
  2941. ENDIF : REM reordered$
  2942. :
  2943. reordered$ = "n" : equalized$ = "n"
  2944. :
  2945. attacks2%() = attacks1%()
  2946. :
  2947. attacks2%() = attacks2%() + (startat% MOD 10^3) : REM moves attacks further up bar, if necc
  2948. :
  2949. attacks3%() = attacks2%()
  2950. FOR count% = 0 TO (manyattacks%-1)
  2951. attacks3%(count%) = attacks3%(count%) DIV 960
  2952. NEXT
  2953. REM gives list of bar mos starting at 0
  2954. :
  2955. attacks3%() = attacks3%() * 960
  2956. attacks2%() = attacks2%() - attacks3%()
  2957. attacks3%() = attacks3%() / 960
  2958. REM list of actual beat numbers
  2959. :
  2960. attacks3%() = attacks3%() + (startat% DIV 10^3) : REM list of actual bar nos
  2961. :
  2962. attacks3%() = attacks3%()*(10^3)
  2963. attacks2%() = attacks2%() + attacks3%()
  2964. REM list of actual bar/beat numbers
  2965. :
  2966. ENDIF : REM method$
  2967. :
  2968. : IF method$ <> "alreadyrhythmicized" THEN rhythmicized$ = "n"
  2969. IF seeinfo$ = "y" THEN
  2970. :
  2971. IF printinfo$ = "y" THEN PROCprintattacks
  2972. durat% = 0
  2973. PROCwindow(10,60,90,5)
  2974. VDU 14
  2975. PRINT '" The group of attacks will be at "
  2976. PRINT" "
  2977. PRINT TAB(8) "ATTACKS AT";
  2978. PRINT TAB(30) "DURATIONS";
  2979. PRINT TAB(54) "RATIOS"
  2980. FOR count% = 0 TO (manyattacks%-1)
  2981. COLOUR 3 : PRINT TAB(1)(attacks2%(count%))DIV10^3;" ";
  2982. COLOUR 0 : PRINT ;(attacks2%(count%))MOD10^3;
  2983. IF count% > 0 THEN
  2984. durat1% = durat%
  2985. durat% = (attacks2%(count%)MOD10^3)-(attacks2%(count%-1)MOD10^3)
  2986. addon% = ((attacks2%(count%)DIV(10^3))-(attacks2%(count%-1)DIV(10^3)))*960
  2987. durat% = durat% + addon%
  2988. PRINT TAB(26) durat%;
  2989. IF count%>1 THEN
  2990. IF direction$ = "rit" THEN ratio = durat%/durat1% ELSE ratio = durat1%/durat%
  2991. CASE ratio OF
  2992. WHEN 0.5 : PRINT TAB(52) "0.5"
  2993. WHEN 1.0 : PRINT TAB(52) "1.0"
  2994. WHEN 1.5 : PRINT TAB(52) "1.5"
  2995. WHEN 2.0 : PRINT TAB(52) "2.0"
  2996. WHEN 2.5 : PRINT TAB(52) "2.5"
  2997. OTHERWISE PRINT TAB(52) ratio
  2998. ENDCASE
  2999. ENDIF
  3000. ENDIF
  3001. NEXT
  3002. :
  3003. VDU 15
  3004. :
  3005. ENDIF : REM seeinfo
  3006. :
  3007. IF method$ = "raw" THEN
  3008. IF seereordery$ = "y" THEN
  3009. PRINT'" Do you want this group to be re-ordered?"
  3010. PRINT'" (Y/1 = yes, any other key = no) "
  3011. :
  3012. CASE GET$ OF
  3013. WHEN "Y","y","1" : PROCreorderattacks
  3014. OTHERWISE
  3015. ENDCASE
  3016. seereordery$ = "n"
  3017. rhythmicized$ = "n"
  3018. ENDIF
  3019. IF seeequalizey$ = "y" THEN
  3020. PRINT'" Do you want to equalize any durations? "
  3021. PRINT'" (Y/0/1 = yes, N/2 = no) "
  3022. CASE GET$ OF
  3023. WHEN "n","N","2" :
  3024. OTHERWISE PROCequalizedurats
  3025. ENDCASE
  3026. seeequalizey$ = "n"
  3027. ENDIF
  3028. IF seerhythmicize$ = "y" THEN
  3029. PRINT'" Do you want this group to be rhythmicized? "
  3030. CASE GET$ OF
  3031. WHEN "Y","y" : PROCprerhythmicize
  3032. rhythmicized$ = "y"
  3033. OTHERWISE
  3034. ENDCASE
  3035. ENDIF
  3036. ENDIF : REM method$ = raw?
  3037. IF seequery$ = "y" THEN
  3038. PRINT ' " Do you want to add this group to the array? "
  3039. CASE GET$ OF
  3040. 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
  3041. OTHERWISE
  3042. ENDCASE
  3043. ENDIF : REM seequery
  3044. :
  3045. IF displayedfunc$ = "n" THEN
  3046. :
  3047. IF copydownwards$ = "n" THEN
  3048. IF screenvoices$ = "n" THEN
  3049. :
  3050. IF copysuccessively$ = "y" THEN
  3051. INPUT' " Which voice (0 = top)"voice%
  3052. IF voice% <> 0 THEN succto% = voice% ELSE PROCpressenter
  3053. ELSE
  3054. INPUT'" Which voice (0 = top) "voice%
  3055. IF voice% = 0 THEN PROCpressenter
  3056. ENDIF : REM copysuccessively$
  3057. :
  3058. ELSE
  3059. PRINT'" Which screen voice "
  3060. CASE GET$ OF
  3061. WHEN "1" : voice% = 1
  3062. WHEN "2" : voice% = 2
  3063. WHEN "3" : voice% = 3
  3064. OTHERWISE PROCpressenter
  3065. ENDCASE
  3066. ENDIF
  3067. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  3068. voice% -= 1
  3069. IF voice% >= 0 THEN samevoice% = voice%
  3070. IF voice% = -1 THEN
  3071. IF copysuccessively$ = "n" THEN
  3072. voice% = samevoice%
  3073. ELSE
  3074. voice% = succto%-1
  3075. ENDIF : REM copysucc
  3076. ENDIF : REM if voice = -1
  3077. :
  3078. ELSE voice% = displayvoices%(startv%+downby%) : voice% = voice%-1
  3079. ENDIF
  3080. :
  3081. ENDIF
  3082. :
  3083. IF copyit$ = "OFF" THEN
  3084. IF paraset$ = "on" THEN
  3085. PRINT'" Do you want to (re)define the values assigned "
  3086. PRINT " to each parameter when inputting a group of "
  3087. PRINT " attacks, use defaults or reset defaults? "
  3088. PRINT " (press Y/N/D/R)"
  3089. PRINT'" - press M/V/D/P again to go back to always "
  3090. PRINT " using the assigned values without asking "
  3091. CASE GET$ OF
  3092. WHEN "R","r" : resetdefaults$ = "y"
  3093. PRINT'" Please press the same key again to proceed"
  3094. OTHERWISE
  3095. PRINT'" Please press the same key again to proceed"
  3096. ENDCASE
  3097. :
  3098. CASE GET$ OF
  3099. WHEN "Y","y","R","r" :
  3100. CLS : parasdefined$ = "yes" : PRINT' " all at pitch name ";
  3101. COLOUR 3
  3102. CASE GET$ OF
  3103. WHEN "C","c" : note% = 0 : PRINT "C"
  3104. WHEN "D","d" : note% = 1 : PRINT "D"
  3105. WHEN "E","e" : note% = 2 : PRINT "E"
  3106. WHEN "F","f" : note% = 3 : PRINT "F"
  3107. WHEN "G","g" : note% = 4 : PRINT "G"
  3108. WHEN "A","a" : note% = 5 : PRINT "A"
  3109. WHEN "B","b" : note% = 6 : PRINT "B"
  3110. ENDCASE
  3111. COLOUR 0
  3112. PRINT " accidental ";
  3113. COLOUR 3
  3114. CASE GET$ OF
  3115. WHEN "1" : accid% = 1 : PRINT "flat"
  3116. WHEN "2" : accid% = 2 : PRINT "3/8flat"
  3117. WHEN "3" : accid% = 3 : PRINT "1/4flat"
  3118. WHEN "4" : accid% = 4 : PRINT "1/8flat"
  3119. WHEN "5" : accid% = 5 : PRINT "nat"
  3120. WHEN "6" : accid% = 6 : PRINT "1/8shrp"
  3121. WHEN "7" : accid% = 7 : PRINT "1/4shrp"
  3122. WHEN "8" : accid% = 8 : PRINT "3/8shrp"
  3123. WHEN "9" : accid% = 9 : PRINT "shrp"
  3124. ENDCASE
  3125. COLOUR 0
  3126. PRINT " octave ";
  3127. COLOUR 3
  3128. CASE GET$ OF
  3129. WHEN "0" : octave% = 0 : PRINT "0"
  3130. WHEN "1" : octave% = 1 : PRINT "1"
  3131. WHEN "2" : octave% = 2 : PRINT "2"
  3132. WHEN "3" : octave% = 3 : PRINT "3"
  3133. WHEN "4" : octave% = 4 : PRINT "4"
  3134. WHEN "5" : octave% = 5 : PRINT "5"
  3135. WHEN "6" : octave% = 6 : PRINT "6"
  3136. WHEN "7" : octave% = 7 : PRINT "7"
  3137. WHEN "8" : octave% = 8 : PRINT "8"
  3138. ENDCASE
  3139. COLOUR 0
  3140. pitchset%(voice%) = (note%*100)+(accid%*10)+octave%
  3141. IF resetdefaults$ = "y" THEN
  3142. FOR count% = 0 TO (numparts%-1)
  3143. pitchset%(count%) = pitchset%(voice%)
  3144. NEXT
  3145. ENDIF
  3146. INPUT " all at duration: bars "b%
  3147. INPUT " beats "beats% : PROCalterbeats
  3148. dur% = (b%*960)+beats%
  3149. durset%(voice%) = dur%
  3150. IF resetdefaults$ = "y" THEN
  3151. FOR count% = 0 TO (numparts%-1)
  3152. durset%(count%) = durset%(voice%)
  3153. NEXT
  3154. ENDIF
  3155. :
  3156. INPUT " all at amplitude "amp$
  3157. CASE amp$ OF
  3158. WHEN "0" : ampset%(voice%) = 0
  3159. WHEN "ppp" : ampset%(voice%) = 1
  3160. WHEN "pp" : ampset%(voice%) = 2
  3161. WHEN "p" : ampset%(voice%) = 3
  3162. WHEN "mp" : ampset%(voice%) = 4
  3163. WHEN "mf" : ampset%(voice%) = 5
  3164. WHEN "f" : ampset%(voice%) = 6
  3165. WHEN "ff" : ampset%(voice%) = 7
  3166. WHEN "fff" : ampset%(voice%) = 8
  3167. ENDCASE
  3168. IF resetdefaults$ = "y" THEN
  3169. FOR count% = 0 TO (numparts%-1)
  3170. ampset%(count%) = ampset%(voice%)
  3171. NEXT
  3172. ENDIF
  3173. :
  3174. INPUT " all at microtonal inflection (in cents: 1,-1 etc) [max 49,-49]: "infset%
  3175. infset%(voice%) = 50+infset%
  3176. envset%(voice%) = 9
  3177. glissset%(voice%) = 105050
  3178. resetdefaults$ = "n"
  3179. WHEN "D","d" : pitchset%(voice%) = 55
  3180. ampset%(voice%) = 6
  3181. envset%(voice%) = 9
  3182. durset%(voice%) = 319
  3183. glissset%(voice%) = 105050
  3184. infset%(voice%) = 50
  3185. OTHERWISE
  3186. ENDCASE
  3187. ENDIF
  3188. ENDIF
  3189. :
  3190. addingnotes$ = "y"
  3191. IF copyit$ = "OFF" THEN
  3192. IF rhythmicized$ = "n" THEN
  3193. FOR counter% = 0 TO (manyattacks%-1)
  3194. PROCnewnotereception(voice%,(attacks2%(counter%)DIV10^3), (attacks2%(counter%) MOD 10^3), pitchset%(voice%), ampset%(voice%), envset%(voice%), durset%(voice%), glissset%(voice%), infset%(voice%))
  3195. NEXT
  3196. ELSE
  3197. FOR counter% = 0 TO (manyattacks%-1)
  3198. PROCnewnotereception(voice%,(attacks5%(counter%)DIV10^3), (attacks5%(counter%) MOD 10^3), pitchset%(voice%), ampset%(voice%), envset%(voice%), durset%(voice%), glissset%(voice%), infset%(voice%))
  3199. NEXT
  3200. PROCdisarrayfill
  3201. ENDIF
  3202. ELSE
  3203. IF rhythmicized$ = "n" THEN
  3204. FOR counter% = 0 TO (manyattacks%-1)
  3205. PROCnewnotereception(voice%, (attacks2%(counter%)DIV10^3), (attacks2%(counter%)MOD10^3), pitches%(counter%), amplitudes%(counter%), envelopes%(counter%), durations%(counter%), glissandos%(counter%), inflections%(counter%))
  3206. NEXT
  3207. ELSE
  3208. FOR counter% = 0 TO (manyattacks%-1)
  3209. PROCnewnotereception(voice%, (attacks5%(counter%)DIV10^3), (attacks5%(counter%)MOD10^3), pitches%(counter%), amplitudes%(counter%), envelopes%(counter%), durations%(counter%), glissandos%(counter%), inflections%(counter%))
  3210. NEXT
  3211. PROCdisarrayfill
  3212. ENDIF
  3213. :
  3214. ENDIF
  3215. :
  3216. copyit$ = "OFF" : displayedfunc$ = "n" : copydownwards$ = "n" : justone$ = "n"
  3217. quickextract$ = "n"
  3218. PROCdisplay
  3219. :
  3220. ENDPROC
  3221. :
  3222. REM*********************************************
  3223. :
  3224. DEF PROCseriespitches
  3225. :
  3226. IF easiermenus$ = "n" THEN PROCwindow(20,69,60,55) ELSE PROCwindow(20,69,60,42)
  3227. :
  3228. IF usebottomstave$ = "n" THEN
  3229. :
  3230. IF singlepitch$ = "m" THEN
  3231. IF firstpitch$ = "y" THEN
  3232. PRINT' " How many pitches "
  3233. INPUT' " (for 1 press 0) "numpitches%
  3234. ELSE
  3235. PRINT' " How many pitches "
  3236. PRINT' " (for 1 press 0,";
  3237. PRINT " for "; prevnumpitches%;
  3238. INPUT " press 0 twice) "numpitches%
  3239. IF numpitches% = 0 THEN
  3240. wait$ = INKEY$(50)
  3241. IF wait$ <> "" THEN numpitches% = prevnumpitches%
  3242. ENDIF
  3243. ENDIF
  3244. ELSE
  3245. numpitches% = 1
  3246. ENDIF
  3247. :
  3248. ELSE
  3249. numpitches% = howmany%
  3250. ENDIF
  3251. :
  3252. IF numpitches% = 0 THEN numpitches% = 1
  3253. IF numpitches% > 1 THEN
  3254. :
  3255. IF askaboutpitches$ = "y" THEN
  3256. PRINT'" Are the pitches all the same?"
  3257. PRINT'" (0/1 count as yes, 2 counts as no) "
  3258. CASE GET$ OF
  3259. WHEN "N","n","2" :
  3260. OTHERWISE PROCsamepitches
  3261. ENDCASE
  3262. ELSE PROCsamepitches
  3263. ENDIF
  3264. :
  3265. ENDIF
  3266. :
  3267. FOR count% = 0 TO numpitches% - 1
  3268. PRINT' " Note name for pitch ";count%+1;" is ";
  3269. COLOUR 3
  3270. CASE GET$ OF
  3271. WHEN "C","c" : note% = 0 : PRINT "C"
  3272. WHEN "D","d" : note% = 1 : PRINT "D"
  3273. WHEN "E","e" : note% = 2 : PRINT "E"
  3274. WHEN "F","f" : note% = 3 : PRINT "F"
  3275. WHEN "G","g" : note% = 4 : PRINT "G"
  3276. WHEN "A","a" : note% = 5 : PRINT "A"
  3277. WHEN "B","b" : note% = 6 : PRINT "B"
  3278. ENDCASE
  3279. COLOUR 0
  3280. PRINT' " accidental ";
  3281. COLOUR 3
  3282. CASE GET$ OF
  3283. WHEN "1" : accid% = 1 : PRINT "flat"
  3284. WHEN "2" : accid% = 2 : PRINT "3/8flat"
  3285. WHEN "3" : accid% = 3 : PRINT "1/4flat"
  3286. WHEN "4" : accid% = 4 : PRINT "1/8flat"
  3287. WHEN "5" : accid% = 5 : PRINT "nat"
  3288. WHEN "6" : accid% = 6 : PRINT "1/8shrp"
  3289. WHEN "7" : accid% = 7 : PRINT "1/4shrp"
  3290. WHEN "8" : accid% = 8 : PRINT "3/8shrp"
  3291. WHEN "9" : accid% = 9 : PRINT "shrp"
  3292. ENDCASE
  3293. COLOUR 0
  3294. PRINT '" octave ";
  3295. COLOUR 3
  3296. CASE GET$ OF
  3297. WHEN "0" : octave% = 0 : PRINT "0"
  3298. WHEN "1" : octave% = 1 : PRINT "1"
  3299. WHEN "2" : octave% = 2 : PRINT "2"
  3300. WHEN "3" : octave% = 3 : PRINT "3"
  3301. WHEN "4" : octave% = 4 : PRINT "4"
  3302. WHEN "5" : octave% = 5 : PRINT "5"
  3303. WHEN "6" : octave% = 6 : PRINT "6"
  3304. WHEN "7" : octave% = 7 : PRINT "7"
  3305. WHEN "8" : octave% = 8 : PRINT "8"
  3306. ENDCASE
  3307. COLOUR 0
  3308. pitches%(count%) = (note%*100)+(accid%*10)+octave%
  3309. NEXT
  3310. :
  3311. prevnumpitches% = numpitches% : firstpitch$ = "n"
  3312. REM function can feed pitches similarly into pitches%
  3313. :
  3314. PROCinsertpitches
  3315. :
  3316. ENDPROC
  3317. :
  3318. REM************************************************
  3319. :
  3320. DEF PROCinsertpitches
  3321. :
  3322. CLS
  3323. :
  3324. IF reorderpitches$ = "y" THEN
  3325. PRINT'" Do you want to randomly re-order"
  3326. PRINT " the pitches (0 = yes, 2 = no)"
  3327. CASE GET$ OF
  3328. WHEN "2" :
  3329. OTHERWISE
  3330. CLS
  3331. PRINT'" Randomly reorder pitches in batches of "
  3332. INPUT " between how many (0 = previous) "low%
  3333. IF low% = 0 THEN
  3334. low% = previouslow%
  3335. COLOUR 3
  3336. PRINT low%
  3337. COLOUR 0
  3338. wait$ = INKEY$(50)
  3339. ENDIF
  3340. INPUT'" and how many "high%
  3341. IF high% = 0 THEN
  3342. high% = previoushigh%
  3343. COLOUR 3
  3344. PRINT high%
  3345. COLOUR 0
  3346. wait$ = INKEY$(50)
  3347. ENDIF
  3348. :
  3349. startingcell% = 0
  3350. pitches1%() = 0
  3351. pitches2%() = 0
  3352. pitches1%() = pitches%()
  3353. REPEAT
  3354. diff% = high%-low%
  3355. batchsize% = RND(diff%+1)-1
  3356. batchsize% += low%
  3357. counter% = 0
  3358. REPEAT
  3359. cell% = RND(batchsize%)
  3360. cell% = startingcell% + cell% - 1
  3361. IF pitches1%(cell%) <> 0 THEN
  3362. pitches2%(startingcell%+counter%) = pitches1%(cell%)
  3363. counter% += 1
  3364. ENDIF
  3365. pitches1%(cell%) = 0
  3366. check% = 0
  3367. FOR count% = 1 TO batchsize%
  3368. check% += pitches1%(startingcell%+count%-1)
  3369. NEXT
  3370. UNTIL check% = 0
  3371. startingcell% += batchsize%
  3372. UNTIL (numpitches%-high%) < startingcell%
  3373. FOR count% = 0 TO numpitches%-1
  3374. IF pitches2%(count%) <> 0 THEN
  3375. pitches%(count%) = pitches2%(count%)
  3376. ENDIF
  3377. NEXT
  3378. previouslow% = low%
  3379. previoushigh% = high%
  3380. ENDCASE
  3381. ENDIF : REM reorderpitches$
  3382. :
  3383. repeatposit$ = "n"
  3384. IF seequery$ = "y" THEN
  3385. PRINT ' " Do you want to read these pitches "
  3386. PRINT " into the array? "
  3387. CASE GET$ OF
  3388. WHEN "N","n" : PROCdisplay : REM pitches% remains intact
  3389. OTHERWISE
  3390. ENDCASE
  3391. ENDIF : REM seequery$
  3392. :
  3393. IF usebottomstave$ = "n" THEN
  3394. IF screenvoices$ = "n" THEN
  3395. :
  3396. IF copysuccessively$ = "n" THEN
  3397. INPUT'' " Which voice? (0 = top) "voice%
  3398. IF voice% = 0 THEN PROCpressenter
  3399. ELSE PROCcopysuccessively
  3400. ENDIF
  3401. :
  3402. ELSE
  3403. PRINT'" Which screen voice "
  3404. CASE GET$ OF
  3405. WHEN "1" : voice% = 1
  3406. WHEN "2" : voice% = 2
  3407. WHEN "3" : voice% = 3
  3408. OTHERWISE PROCpressenter
  3409. ENDCASE
  3410. ENDIF
  3411. ENDIF : REM usebottomstave$
  3412. :
  3413. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  3414. IF usebottomstave$ = "y" THEN voice% = displayvoices%(startv%+2)
  3415. voice% -= 1
  3416. IF voice% >= 0 THEN samevoice% = voice%
  3417. IF voice% = -1 THEN voice% = samevoice%
  3418. :
  3419. IF usebottomstave$ = "n" THEN
  3420. :
  3421. IF quickcopy$ = "y" THEN
  3422. INPUT ' " starting at note number (0 counts as 1) "along%
  3423. IF along% = 0 THEN along% = 1
  3424. along%-=1
  3425. bars% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  3426. beats% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  3427. holdbar% = bars%
  3428. holdbeat% = beats%
  3429. PROCalterbeats
  3430. startat% = (bars%*(10^3))+beats%
  3431. :
  3432. ELSE
  3433. :
  3434. INPUT'" Starting at bar number "bars%
  3435. IF bars% = 0 THEN
  3436. bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
  3437. ENDIF
  3438. holdbar% = bars%
  3439. IF repeatposit$ = "y" THEN
  3440. PRINT'" bar ";bars%;" beat ";beats%;"?"
  3441. PRINT'" (for OK press 0, if not OK press X)"
  3442. CASE GET$ OF
  3443. WHEN"X","x" : PROCinsertpitches
  3444. OTHERWISE
  3445. ENDCASE
  3446. ELSE
  3447. INPUT " beat "beats%
  3448. holdbeat% = beats%
  3449. ENDIF
  3450. PROCalterbeats
  3451. startat% = (bars%*(10^3))+beats%
  3452. :
  3453. ENDIF : REM quickcopy$
  3454. :
  3455. ELSE
  3456. along% = 0
  3457. bars% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  3458. beats% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  3459. holdbar% = bars%
  3460. holdbeat% = beats%
  3461. PROCalterbeats
  3462. startat% = (bars%*(10^3))+beats%
  3463. :
  3464. ENDIF : REM usebottomstave$
  3465. :
  3466. PROCsearch(startat%)
  3467. shunt$ = "N"
  3468. :
  3469. endcell% = startcell% + numpitches% -1
  3470. IF endcell% >= numusedcells%(voice%) THEN endcell% = numusedcells%(voice%)-1
  3471. FOR count% = startcell% TO endcell%
  3472. PROCcellfill(count%,voice%,999,999,(pitches%(count%-startcell%)),9,999,999,99,99)
  3473. NEXT
  3474. :
  3475. PROCdisplay
  3476. :
  3477. ENDPROC
  3478. :
  3479. REM*************************************************
  3480. :
  3481. DEF PROCfunctionprelude
  3482. :
  3483. IF seereorderx$ = "y" THEN seereordery$ = "y"
  3484. IF seeequalizex$ = "y" THEN seeequalizey$ = "y"
  3485. :
  3486. IF easiermenus$ = "n" THEN PROCwindow(20,69,60,55) ELSE PROCwindow(20,69,60,42)
  3487. CLS
  3488. CASE startfinishdurats$ OF
  3489. WHEN "N", "n" :
  3490. INPUT' " rate "rate
  3491. IF rate = 0 THEN rate = 1 : REM for quick inputting
  3492. IF rate <> 1 THEN
  3493. INPUT'" bias (for 3.7 press 0) "bias
  3494. IF bias = 0 THEN bias = 3.7
  3495. ENDIF
  3496. INPUT'" number of attacks "manyattacks%
  3497. IF manyattacks% = 0 THEN manyattacks% = prevmanyattacks%
  3498. COLOUR 3 : PRINT'manyattacks% : COLOUR 0
  3499. prevmanyattacks% = manyattacks%
  3500. CASE funcinput$ OF
  3501. WHEN "durat" :
  3502. PRINT '" total duration "
  3503. INPUT' " bars "bars%
  3504. INPUT' " beats "beats%
  3505. PROCalterbeats
  3506. totaldur% = (bars%*960)+beats%
  3507. WHEN "points" :
  3508. INPUT '" first attack at bar "funcbar%
  3509. INPUT '" beat "funcbeat%
  3510. INPUT '" and last attack at bar "funcbar1%
  3511. INPUT '" beat "funcbeat1%
  3512. totaldur% = ((funcbar1%*960)+funcbeat1%)-((funcbar%*960)+funcbeat%)
  3513. WHEN "displayed" :
  3514. IF screenvoices$ = "n" THEN
  3515. INPUT' " Which voice (0 = top) "voice%
  3516. IF voice% = 0 THEN PROCpressenter
  3517. :
  3518. ELSE
  3519. PRINT'" Which screen voice "
  3520. CASE GET$ OF
  3521. WHEN "1" : voice% = 1
  3522. WHEN "2" : voice% = 2
  3523. WHEN "3" : voice% = 3
  3524. OTHERWISE PROCpressenter
  3525. ENDCASE
  3526. ENDIF
  3527. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  3528. voice% -= 1
  3529. IF voice% = -1 THEN voice% = samevoice% ELSE samevoice% = voice%
  3530. IF queryalong$ = "y" THEN
  3531. INPUT' " Starting at note number (0 counts as 1) "along%
  3532. IF along% = 0 THEN along% = 1
  3533. along%-=1
  3534. ENDIF
  3535. funcbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  3536. funcbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  3537. funcbar1% = array%(holdstartcell%(voice%)+1+along%,0,voice%)DIV10^6
  3538. funcbeat1% = (array%(holdstartcell%(voice%)+1+along%,0,voice%)MOD10^6)DIV10^3
  3539. totaldur% = ((funcbar1%*960)+funcbeat1%)-((funcbar%*960)+funcbeat%)
  3540. displayedfunc$ = "y" : along% = 0
  3541. OTHERWISE PROCfunctionprelude
  3542. ENDCASE
  3543. :
  3544. result$ = "success"
  3545. :
  3546. PROCfunction
  3547. IF rate <> 1 AND seegraph$ = "y" THEN
  3548. REM PROCwindow(20,69,50,55)
  3549. PRINT'" Do you want to see the graph? "
  3550. CASE GET$ OF
  3551. WHEN "Y","y" : PROCgraph
  3552. OTHERWISE PROCfunctionpostlude
  3553. ENDCASE
  3554. ELSE
  3555. PROCfunctionpostlude
  3556. ENDIF
  3557. ENDCASE
  3558. :
  3559. CASE funcinput$ OF
  3560. WHEN "durat" :
  3561. REM PROCwindow(20,69,69,55)
  3562. PRINT' " total duration "
  3563. INPUT' " bars "bars%
  3564. INPUT' " beats "beats%
  3565. PROCalterbeats
  3566. totaldur% = (bars%*960)+beats%
  3567. WHEN "points" :
  3568. REM PROCwindow(20,69,69,55)
  3569. INPUT' " first attack at bar "funcbar%
  3570. INPUT' " beat "funcbeat%
  3571. INPUT' " and last attack at bar "funcbar1%
  3572. INPUT' " beat "funcbeat1%
  3573. totaldur% = ((funcbar1%*960)+funcbeat1%)-((funcbar%*960)+funcbeat%)
  3574. WHEN "displayed" :
  3575. IF screenvoices$ = "n" THEN
  3576. INPUT' " Which voice (0 = top) "voice%
  3577. IF voice% = 0 THEN PROCpressenter
  3578. ELSE
  3579. PRINT'" Which screen voice "
  3580. CASE GET$ OF
  3581. WHEN "1" : voice% = 1
  3582. WHEN "2" : voice% = 2
  3583. WHEN "3" : voice% = 3
  3584. OTHERWISE PROCpressenter
  3585. ENDCASE
  3586. ENDIF
  3587. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  3588. voice% -= 1
  3589. IF voice% = -1 THEN voice% = samevoice%
  3590. funcbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  3591. funcbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  3592. funcbar1% = array%(holdstartcell%(voice%)+1+along%,0,voice%)DIV10^6
  3593. funcbeat1% = (array%(holdstartcell%(voice%)+1+along%,0,voice%)MOD10^6)DIV10^3
  3594. totaldur% = ((funcbar1%*960)+funcbeat1%)-((funcbar%*960)+funcbeat%)
  3595. displayedfunc$ = "y" : along% = 0
  3596. OTHERWISE PROCfunctionprelude
  3597. ENDCASE
  3598. :
  3599. IF easiermenus$ = "n" THEN PROCwindow(20,69,69,54) ELSE PROCwindow(20,69,69,42)
  3600. :
  3601. IF firsttimequick$ = "y" THEN
  3602. PRINT' " quick end duration to be... "
  3603. INPUT' " bars "bars%
  3604. INPUT' " beats "beats%
  3605. ELSE
  3606. PRINT' " quick end duration to be how many bars "
  3607. PRINT' " (for ";prevbars%;" press 0) "
  3608. INPUT " "bars%
  3609. :
  3610. IF bars% = 0 THEN
  3611. COLOUR 3 : PRINT prevbars% : COLOUR 0
  3612. ENDIF
  3613. :
  3614. PRINT' " and how many beats "
  3615. PRINT' " (for ";prevbeats%;" press 0) "
  3616. INPUT " "beats%
  3617. :
  3618. IF beats% = 0 THEN
  3619. COLOUR 3 : PRINT prevbeats% : COLOUR 0
  3620. ENDIF
  3621. IF bars% = 0 AND beats% = 0 THEN
  3622. bars% = prevbars% : beats% = prevbeats%
  3623. ENDIF
  3624. ENDIF
  3625. prevbars% = bars%
  3626. prevbeats% = beats%
  3627. PROCalterbeats
  3628. quickend% = (bars%*960)+beats%
  3629. :
  3630. IF firsttimequick$ = "y" THEN
  3631. PRINT' " slow end duration to be... "
  3632. INPUT' " bars "bars%
  3633. INPUT' " beats "beats%
  3634. ELSE
  3635. PRINT' " slow end duration to be how many bars "
  3636. PRINT' " (for ";prevslowbars%;" press 0) "
  3637. INPUT " "bars%
  3638. :
  3639. IF bars% = 0 THEN
  3640. COLOUR 3 : PRINT prevslowbars% : COLOUR 0
  3641. ENDIF
  3642. :
  3643. PRINT' " and how many beats "
  3644. PRINT' " (for ";prevslowbeats%;" press 0) "
  3645. INPUT " "beats%
  3646. :
  3647. IF beats% = 0 THEN
  3648. COLOUR 3 : PRINT prevslowbeats% : COLOUR 0
  3649. nothing$ = INKEY$(100)
  3650. ENDIF
  3651. :
  3652. IF bars% = 0 AND beats% = 0 THEN
  3653. bars% = prevslowbars% : beats% = prevslowbeats%
  3654. ENDIF
  3655. ENDIF
  3656. prevslowbars% = bars%
  3657. prevslowbeats% = beats%
  3658. PROCalterbeats
  3659. slowend% = (bars%*960)+beats%
  3660. :
  3661. CLS
  3662. IF firsttimequick$ = "y" THEN
  3663. INPUT' " bias (0 = 3.7) "bias
  3664. IF bias = 0 THEN bias = 3.7
  3665. ELSE
  3666. PRINT' " bias "
  3667. PRINT' " (for ";bias;" press 0) "
  3668. INPUT' " "newbias
  3669. :
  3670. IF newbias = 0 THEN
  3671. COLOUR 3 : PRINT bias : COLOUR 0
  3672. ELSE bias = newbias
  3673. ENDIF
  3674. :
  3675. ENDIF
  3676. :
  3677. IF firsttimequick$ = "y" THEN
  3678. INPUT' " estimated number of attacks "manyattacks%
  3679. ELSE
  3680. PRINT' " estimated number of attacks "
  3681. PRINT' " (for ";prevest%;" press 0) "
  3682. INPUT' " "manyattacks%
  3683. :
  3684. IF manyattacks% = 0 THEN
  3685. COLOUR 3 : PRINT prevest% : COLOUR 0
  3686. nothing$ = INKEY$(100)
  3687. ENDIF
  3688. :
  3689. IF manyattacks% = 0 THEN manyattacks% = prevest%
  3690. ENDIF
  3691. prevest% = manyattacks%
  3692. firsttimequick$ = "n"
  3693. :
  3694. rate = 5.1 : increment = 4
  3695. increment2% = manyattacks%
  3696. ratedir$ = "" : attacksdir$ = ""
  3697. result$ = "noresult"
  3698. doesitloop$ = "" : maybeloop$ = ""
  3699. manyattacks1% = 0 : manyattacks2% = 0 : manyattacks3% = 0 : manyattacks4% = 0 : manyattacks5% = 0
  3700. rate1=0 : rate2=0 : rate3=0 : rate4=0 : rate5=0
  3701. testquickend1% = 0 : testslowend1% = 0
  3702. testquickend% = 0 : testslowend% = 0
  3703. numberoftries%=0
  3704. goes% = 0 : goes1% = 0
  3705. :
  3706. REPEAT
  3707. :
  3708. PROCfunction
  3709. testquickend1% = testquickend%
  3710. testslowend1% = testslowend%
  3711. testquickend% = functionattacks(1)
  3712. testslowend% = functionattacks(manyattacks%-1) - functionattacks(manyattacks%-2)
  3713. manyattacks5% = manyattacks4% : manyattacks4% = manyattacks3%
  3714. manyattacks3% = manyattacks2% : manyattacks2% = manyattacks1%
  3715. manyattacks1% = manyattacks%
  3716. rate5=rate4 : rate4=rate3 : rate3=rate2 : rate2=rate1 : rate1=rate
  3717. IF testquickend% =quickend% AND testslowend% = slowend% THEN
  3718. result$ = "success"
  3719. ENDIF
  3720. :
  3721. IF result$ = "noresult" THEN
  3722. :
  3723. IF testquickend% <= quickend% AND testslowend% >= slowend% THEN
  3724. IF ratedir$ = "up" THEN increment = increment/2.1
  3725. IF increment < 0.01 THEN increment = 0.01
  3726. ratedir$ = "down"
  3727. rate = rate-increment
  3728. IF rate < 1.01 THEN rate = 1.01
  3729. ENDIF
  3730. :
  3731. IF testquickend% >= quickend% AND testslowend% <= slowend% THEN
  3732. IF ratedir$ = "down" THEN increment = increment/2.1
  3733. IF increment < 0.01 THEN increment = 0.01
  3734. ratedir$ = "up"
  3735. rate = rate+increment
  3736. ENDIF
  3737. :
  3738. IF testquickend% < quickend% AND testslowend% < slowend% THEN
  3739. IF attacksdir$ = "up" THEN increment2% = increment2%/2
  3740. IF increment2% < 1 THEN increment2% = 1
  3741. attacksdir$ = "down"
  3742. manyattacks% = manyattacks% - increment2%
  3743. IF manyattacks% < 4 THEN manyattacks% = 4
  3744. ENDIF
  3745. :
  3746. IF testquickend% > quickend% AND testslowend% > slowend% THEN
  3747. IF attacksdir$ = "down" THEN increment2% = increment2%/2
  3748. IF increment2% < 1 THEN increment2% = 1
  3749. attacksdir$ = "up"
  3750. manyattacks% = manyattacks% + increment2%
  3751. IF manyattacks% < 4 THEN manyattacks% = 4
  3752. ENDIF
  3753. :
  3754. ENDIF
  3755. :
  3756. 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
  3757. doesitloop$ = "yes"
  3758. ENDIF
  3759. :
  3760. 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"
  3761. 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
  3762. IF maybeloop$="yes" AND manyattacks%=manyattacks1% AND manyattacks% = manyattacks2% AND manyattacks% = manyattacks3% AND manyattacks%=manyattacks4% AND manyattacks%=manyattacks5% THEN doesitloop$ = "yes"
  3763. :
  3764. IF doesitloop$ = "yes" THEN
  3765. CLS
  3766. IF quickend% >= testquickend1% THEN
  3767. margin1 = (quickend%-testquickend1%)/quickend%*100
  3768. ELSE
  3769. margin1 = (testquickend1%-quickend%)/quickend%*100
  3770. ENDIF
  3771. IF slowend% >= testslowend1% THEN
  3772. margin2 = (slowend%-testslowend1%)/slowend%*100
  3773. ELSE
  3774. margin2 = (testslowend1%-slowend%)/slowend%*100
  3775. ENDIF
  3776. IF quickend% >= testquickend% THEN
  3777. margin3 = (quickend%-testquickend%)/quickend%*100
  3778. ELSE
  3779. margin3 = (testquickend%-quickend%)/quickend%*100
  3780. ENDIF
  3781. IF slowend%>=testslowend% THEN
  3782. margin4 = (slowend%-testslowend%)/slowend%*100
  3783. ELSE
  3784. margin4 = (testslowend%-slowend%)/slowend%*100
  3785. ENDIF
  3786. IF ((margin1*10)DIV1)MOD10>4 THEN margin1% = margin1 ELSE margin1% = margin1
  3787. IF ((margin2*10)DIV1)MOD10>4 THEN margin2% = margin2 ELSE margin2% = margin2
  3788. IF ((margin3*10)DIV1)MOD10>4 THEN margin3% = margin3 ELSE margin3% = margin3
  3789. IF ((margin4*10)DIV1)MOD10>4 THEN margin4% = margin4 ELSE margin4% = margin4
  3790. VDU 7
  3791. IF easiermenus$ = "n" THEN PROCwindow(10,69,90,48) ELSE PROCwindow(10,69,90,42)
  3792. PRINT''" the search is looping between the two closest possible solutions, "
  3793. PRINT " given the present bias (see below)"
  3794. PRINT ' " do you want to opt for one of these, or carry on searching with"
  3795. PRINT " a different bias (press A/B)"
  3796. PRINT'" quickend ";testquickend1%;" (";margin1%;"% off ";quickend%;")"
  3797. PRINT " slowend ";testslowend1%;" (";margin2%;"% off ";slowend%;")"
  3798. PRINT " number of attacks ";manyattacks2%
  3799. PRINT " rate ";rate2
  3800. PRINT " bias ";bias
  3801. PRINT'" quickend ";testquickend%;" (";margin3%;"% off ";quickend%;")"
  3802. PRINT " slowend ";testslowend%;" (";margin4%;"% off ";slowend%;")"
  3803. PRINT " number of attacks ";manyattacks1%
  3804. PRINT " rate ";rate1
  3805. PRINT " bias ";bias
  3806. CASE GET$ OF
  3807. WHEN "A","a" : numberoftries% = 3
  3808. OTHERWISE
  3809. ENDCASE
  3810. numberoftries% +=1 : IF numberoftries% = 1 THEN bias=bias/2
  3811. IF numberoftries% = 2 THEN bias =bias*4
  3812. IF numberoftries% = 3 THEN
  3813. PRINT'" three different biases now tried -"
  3814. PRINT " to opt for one of the last three tries press A/B/C"
  3815. PRINT " or to try again with fresh values press D"
  3816. CASE GET$ OF
  3817. WHEN "A","a" : bias = bias/2
  3818. WHEN "B","b" : bias = bias/4
  3819. WHEN "C","c" : result$ = "loop"
  3820. WHEN "D","d" : PROCfunctionprelude
  3821. ENDCASE
  3822. ENDIF
  3823. IF numberoftries% = 4 THEN result$ = "loop"
  3824. IF result$ <> "loop" THEN
  3825. manyattacks1% = 0 : manyattacks2% = 0 : manyattacks3% = 0 : manyattacks4% = 0 : manyattacks5% = 0
  3826. rate1=0 : rate2=0 : rate3=0 : rate4=0 : rate5=0
  3827. doesitloop$ = "" : maybeloop$ = ""
  3828. ENDIF
  3829. ENDIF
  3830. ENDIF
  3831. :
  3832. UNTIL result$ <> "noresult"
  3833. :
  3834. CASE result$ OF
  3835. WHEN "success" :
  3836. PROCfunction
  3837. IF easiermenus$ = "n" THEN PROCwindow(10,69,90,44) ELSE PROCwindow(10,69,90,42)
  3838. PRINT''" quickend ";testquickend%
  3839. PRINT' " slowend ";testslowend%
  3840. PRINT " "
  3841. PRINT'" rate ";rate
  3842. PRINT'" bias ";bias
  3843. PRINT'" number of attacks ";manyattacks%
  3844. :
  3845. IF seegraph$ = "y" THEN
  3846. PRINT'" Do you want to see the graph? "
  3847. CASE GET$ OF
  3848. WHEN "Y","y" : PROCgraph
  3849. OTHERWISE PROCfunctionpostlude
  3850. ENDCASE
  3851. ELSE PROCfunctionpostlude
  3852. ENDIF
  3853. :
  3854. WHEN "loop" :
  3855. PRINT'" - to opt for the first solution above press A, for the"
  3856. PRINT " second press B, to try again with fresh values press F"
  3857. CASE GET$ OF
  3858. WHEN "A","a" : PROCfunction
  3859. :
  3860. IF seegraph$ = "y" THEN
  3861. PRINT'" Do you want to see the graph? "
  3862. CASE GET$ OF
  3863. WHEN "Y","y" : PROCgraph
  3864. OTHERWISE PROCfunctionpostlude
  3865. ENDCASE
  3866. ELSE PROCfunctionpostlude
  3867. ENDIF
  3868. :
  3869. WHEN "B","b" : manyattacks%=manyattacks1% : rate = rate1
  3870. PROCfunction
  3871. IF seegraph$ = "y" THEN
  3872. PRINT'" Do you want to see the graph? "
  3873. CASE GET$ OF
  3874. WHEN "Y","y" : PROCgraph
  3875. OTHERWISE PROCfunctionpostlude
  3876. ENDCASE
  3877. ELSE PROCfunctionpostlude
  3878. ENDIF
  3879. WHEN "F","f" : PROCfunctionprelude
  3880. ENDCASE
  3881. ENDCASE
  3882. :
  3883. ENDPROC
  3884. :
  3885. REM**********************************************************
  3886. :
  3887. DEF PROCgraph
  3888. :
  3889. numplots% = 10000
  3890. segment = numplots%/(manyattacks%-1)
  3891. horizline = numplots% - segment
  3892. count =1
  3893. REM convolutions below necc simply to get a 'square' graph
  3894. factor1 = numplots%/rate
  3895. factor2 = rate/(rate-1)
  3896. factor3 = rate/numplots%
  3897. factor4 = numplots%/((FNfunction(1)*factor1)-(FNfunction(rate)*factor1))
  3898. factor5 = FNfunction(rate)*factor1
  3899. factor6 = (factor4*factor5)-factor5
  3900. MODE 31 : CLG : CLS
  3901. PRINT TAB(50) " rate ";rate
  3902. PRINT TAB(50) " bias ";bias
  3903. PRINT TAB(50) " number of attacks ";manyattacks%
  3904. PRINT TAB(50) " quickend ";functionattacks(1)
  3905. PRINT TAB(50) " slowend ";functionattacks(manyattacks%-1)-functionattacks(manyattacks%-2)
  3906. PRINT TAB(50) " total duration ";totaldur%
  3907. MOVE 1000,0 : DRAW 0,0 : DRAW 0,1000
  3908. scaling = 900/numplots%
  3909. FOR x = 1 TO rate STEP factor3
  3910. xaxis = ((x*factor1)-factor1)*2
  3911. yaxis = ((FNfunction(x)*factor1)*factor4)-(factor5 + factor6)
  3912. xplot = xaxis*scaling : yplot = yaxis*scaling
  3913. DRAW xplot,yplot
  3914. REM the function uses x = 1 to rate, but the graph plots (xaxis & yaxis) run from 0 to 1000 in each axis
  3915. IF yaxis <= horizline THEN
  3916. LINE 0,yplot, xplot,yplot
  3917. LINE xplot,yplot, xplot,0
  3918. MOVE xplot,yplot
  3919. count += 1
  3920. horizline -= segment
  3921. ENDIF
  3922. NEXT
  3923. PROCfunctionpostlude
  3924. ENDPROC
  3925. :
  3926. REM***************************************
  3927. :
  3928. DEF PROCfunctionpostlude
  3929. :
  3930. IF rate <> 1 THEN
  3931. PRINT '" Accel or rit"
  3932. PRINT " (press A/R or 1/2)"
  3933. CASE GET$ OF
  3934. WHEN "A","a","1" :
  3935. FOR count% = 0 TO (manyattacks%-1)
  3936. attacks1%(count%) = totaldur% - (functionattacks((manyattacks%-1)-count%))
  3937. NEXT
  3938. direction$ = "accel"
  3939. :
  3940. OTHERWISE
  3941. FOR count = 0 TO (manyattacks%-1)
  3942. attacks1%(count) = functionattacks(count)
  3943. NEXT
  3944. direction$ = "rit"
  3945. ENDCASE
  3946. ELSE
  3947. FOR count% = 0 TO (manyattacks%-1)
  3948. attacks1%(count%) = functionattacks(count%)
  3949. NEXT
  3950. direction$ = "rit"
  3951. ENDIF
  3952. :
  3953. method$ = "raw"
  3954. IF funcinput$ = "points" OR funcinput$ = "displayed" THEN quiz$ = "no"
  3955. COLOUR 0 : COLOUR 191 : CLS : PROCinsertattacks
  3956. ENDPROC
  3957. :
  3958. REM***************************************
  3959. :
  3960. DEF FNfunction(x)
  3961. = (rate/x)-(x/bias)+(rate/bias)
  3962. :
  3963. REM***************************************
  3964. :
  3965. DEF PROCprerhythmicize
  3966. :
  3967. PROCwindow(20,71,90,38)
  3968. CLS : PRINT' " Do you want to re-define the criteria for irrational groups, "
  3969. PRINT ' " keep them or use CAC's defaults (Y/K/D) "
  3970. PRINT''" (criteria are: "
  3971. PRINT' " GROUP LENGTHS ";shortirrat%;" beats - "; longirrat%;" beats "
  3972. PRINT' " GROUP LOCATIONS any 1/";irratbeats%;" of a bar "
  3973. PRINT' " FALLBACK LOCATIONS any 1/";irratbeats1%;" of a bar "
  3974. PRINT' " SHORTEST DURATION ";mindur%;" beats "
  3975. PRINT' " COMPLEXITY ";given%
  3976. PRINT' " DEFAULT DIVISIONS 1/";defaultsieve;" of a bar) "
  3977. CASE GET$ OF
  3978. WHEN "Y","y" :
  3979. PRINT''" Give GROUP LENGTH of the SHORTEST irrational group desired... "
  3980. INPUT' " bars "bars%
  3981. INPUT'" beats "beats%
  3982. PROCalterbeats
  3983. shortirrat% = (bars%*960)+beats%
  3984. PRINT'" Give GROUP LENGTH of the LONGEST irrational group desired... "
  3985. INPUT'" bars "bars%
  3986. INPUT'" beats "beats%
  3987. PROCalterbeats
  3988. longirrat% = (bars%*960)+beats%
  3989. IF longirrat%/beatfactor% > 999 THEN
  3990. VDU 7 : PRINT'" !!Maximum length for irrational groups is 999 beats!! "
  3991. PRINT'" (to try again press C) "
  3992. CASE GET$ OF
  3993. WHEN"C","c" : CLS :PROCprerhythmicize
  3994. ENDCASE
  3995. ENDIF
  3996. :
  3997. CLS
  3998. PRINT''" (criteria are now: "
  3999. PRINT' " GROUP LENGTHS ";shortirrat%;" beats - "; longirrat%;" beats "
  4000. PRINT' " GROUP LOCATIONS any 1/";irratbeats%;" of a bar "
  4001. PRINT' " FALLBACK LOCATIONS any 1/";irratbeats1%;" of a bar "
  4002. PRINT' " SHORTEST DURATION ";mindur%;" beats "
  4003. PRINT' " COMPLEXITY ";given%
  4004. PRINT' " DEFAULT DIVISIONS 1/";defaultsieve;" of a bar) "
  4005. :
  4006. PRINT''" For GROUP LOCATION which beats of the bar is it acceptable to "
  4007. PRINT '" begin irrational groups of attacks on (1 = first beat of bar only, "
  4008. PRINT '" 2 = any 1/2 bar, 3 = any 1/3 bar etc) "
  4009. INPUT '" (use this to control allowability of certain group lengths) "irratbeats%
  4010. REM 1-16 make integers except 7,9,11,13 & 14
  4011. PRINT''" And for FALLBACK LOCATIONS which beats of the bar is it acceptable "
  4012. PRINT' " to begin 'fall back' groups, ie ones beginning or ending with "
  4013. INPUT '" rests, on (1, 2, 3 etc - also for controlling lengths allowable) "irratbeats1%
  4014. PROCwindow(20,71,90,35)
  4015. CLS
  4016. PRINT''" (criteria are now: "
  4017. PRINT' " GROUP LENGTHS ";shortirrat%;" beats - "; longirrat%;" beats "
  4018. PRINT' " GROUP LOCATIONS any 1/";irratbeats%;" of a bar "
  4019. PRINT' " FALLBACK LOCATIONS any 1/";irratbeats1%;" of a bar "
  4020. PRINT' " SHORTEST DURATION ";mindur%;" beats "
  4021. PRINT' " COMPLEXITY ";given%
  4022. PRINT' " DEFAULT DIVISIONS 1/";defaultsieve;" of a bar) "
  4023. :
  4024. PRINT''" What is the SHORTEST ALLOWABLE DURATION, in beats "
  4025. INPUT' " (any less than this will be 'edited up') "mindur%
  4026. PROCalterbeats
  4027. sieve = 960/mindur%
  4028. buffer% = 960/(sieve*2)
  4029. PRINT''" What is the maximum allowable irrational COMPLEXITY, "
  4030. PRINT '" eg, '5' allows upto 5 'in the time of' (this parameter "
  4031. INPUT '" controls the trade-off between user-friendliness and accuracy) "given%
  4032. :
  4033. CLS
  4034. PRINT''" (criteria are now: "
  4035. PRINT' " GROUP LENGTHS ";shortirrat%;" beats - "; longirrat%;" beats "
  4036. PRINT' " GROUP LOCATIONS any 1/";irratbeats%;" of a bar "
  4037. PRINT' " FALLBACK LOCATIONS any 1/";irratbeats1%;" of a bar "
  4038. PRINT' " SHORTEST DURATION ";mindur%;" beats "
  4039. PRINT' " COMPLEXITY ";given%
  4040. PRINT' " DEFAULT DIVISIONS 1/";defaultsieve;" of a bar) "
  4041. :
  4042. PRINT''" According to DEFAULT DIVISIONS, irrationals will avoid small "
  4043. PRINT '" divisions beyond a certain point, unless required by the rhythm. "
  4044. PRINT '" Confirm or re-set this default, which is currently at ";defaultsieve;" divisions "
  4045. INPUT '" of the bar (same trade-off as above) "defaultsieve
  4046. WHEN "D","d" :
  4047. PROCrhythmdefaults
  4048. OTHERWISE
  4049. ENDCASE
  4050. :
  4051. PROCquantize
  4052. :
  4053. attacks5%() = attacks2%()
  4054. attacks3%() = attacks3%()/(10^3) : REM list of actual bar nos
  4055. FOR count% = 0 TO (manyattacks%-1)
  4056. attacks4%(count%) = attacks2%(count%) MOD (10^3)
  4057. NEXT : REM list of actual beat nos (attacks2 containing bar/beat nos remains intact)
  4058. :
  4059. REM routine to fill array nodes%() with acceptable beats of bar to start irrat groups on
  4060. IF irratbeats% > 0 THEN
  4061. nextbeat% = 960/irratbeats%
  4062. FOR count% = 1 TO (irratbeats%-1)
  4063. nodes%(count%) = nodes%(count%-1) + nextbeat%
  4064. NEXT
  4065. ENDIF
  4066. :
  4067. REM routine to fill nodes1%() with acceptable beats to start fallback groups on
  4068. nextbeat% = 960/irratbeats1%
  4069. FOR count% = 1 TO (irratbeats1% - 1)
  4070. nodes1%(count%) = nodes1%(count%-1) + nextbeat%
  4071. NEXT
  4072. nodes1%(irratbeats1%) = 960
  4073. :
  4074. REM routine to test whether first attack is on an acceptable beat
  4075. firstattack$ = "offbeat"
  4076. count% = 0
  4077. REPEAT
  4078. IF attacks4%(0) = nodes%(count%) THEN firstattack$ = "onbeat"
  4079. count% += 1
  4080. UNTIL firstattack$ = "onbeat" OR count% > (irratbeats%-1)
  4081. :
  4082. IF firstattack$ = "onbeat" THEN
  4083. endbeat% = attacks2%(0)
  4084. endcell% = 0
  4085. status$ = "onbeat"
  4086. firstgroup$ = "y"
  4087. ELSE
  4088. word$ = ""
  4089. count% = irratbeats1%
  4090. REPEAT
  4091. IF nodes1%(count%) < attacks4%(0) THEN
  4092. endbeat% = (attacks3%(0)*(10^3)) + nodes1%(count%)
  4093. word$ = "found"
  4094. ENDIF
  4095. count% -= 1
  4096. UNTIL word$ = "found" OR count% < 0
  4097. endcell% = 0
  4098. status$ = ""
  4099. firstgroup$ = "y"
  4100. ENDIF
  4101. PROCrhythmicize
  4102. :
  4103. ENDPROC
  4104. :
  4105. REM***************************************************************
  4106. :
  4107. DEF PROCfunction
  4108. :
  4109. IF rate = 1 THEN
  4110. :
  4111. unit = totaldur%/(manyattacks%-1)
  4112. :
  4113. FOR count% = 1 TO (manyattacks%-2)
  4114. :
  4115. attackpoint = unit * count%
  4116. :
  4117. REM rounding-off to nearest integer
  4118. attackpoint = attackpoint * 10
  4119. attackpoint = attackpoint DIV 1
  4120. fraction = attackpoint MOD 10
  4121. IF fraction > 4 THEN
  4122. attackpoint = (attackpoint DIV 10) + 1
  4123. ELSE
  4124. attackpoint = attackpoint DIV 10
  4125. ENDIF
  4126. functionattacks(count%) = attackpoint
  4127. REM list of 'real' attack-values 0-totaldur% rounded to nearest integer
  4128. :
  4129. NEXT
  4130. :
  4131. functionattacks(manyattacks%-1) = totaldur%
  4132. :
  4133. ELSE
  4134. :
  4135. yrange = FNfunction(1) - 1
  4136. segment = yrange/(manyattacks%-1)
  4137. ypoint = FNfunction(1)
  4138. :
  4139. FOR count% = 1 TO (manyattacks%-2)
  4140. :
  4141. ypoint -= segment
  4142. xincrement = rate - 1
  4143. xtry = 1 + (xincrement/2)
  4144. :
  4145. tolerance = yrange/100000 : REM this ought to give highly accurate results
  4146. :
  4147. IF result$ = "success" OR result$ = "loop" OR count% = 1 OR count% = (manyattacks%-2) THEN
  4148. :
  4149. WHILE FNfunction(xtry) > (ypoint+tolerance) OR FNfunction(xtry) < (ypoint-tolerance)
  4150. :
  4151. xincrement = xincrement/2
  4152. IF FNfunction(xtry) < ypoint THEN
  4153. xtry -= xincrement
  4154. ELSE
  4155. xtry += xincrement
  4156. ENDIF
  4157. :
  4158. ENDWHILE
  4159. :
  4160. ENDIF
  4161. :
  4162. functionattacks(count%) = xtry
  4163. :
  4164. NEXT
  4165. :
  4166. functionattacks(0) = 1
  4167. functionattacks(manyattacks%-1) = rate
  4168. :
  4169. REM scaling & rounding routine
  4170. functionattacks() -= 1
  4171. divider = rate-1
  4172. FOR count% = 0 TO (manyattacks%-1)
  4173. functionattacks(count%) = functionattacks(count%)/divider*totaldur%
  4174. NEXT
  4175. :
  4176. FOR count% = 1 TO (manyattacks%-1)
  4177. number = functionattacks(count%)
  4178. number = number*10
  4179. number = number DIV 1
  4180. fraction = number MOD 10
  4181. IF fraction > 4 THEN
  4182. number = (number DIV 10) + 1
  4183. ELSE
  4184. number = number DIV 10
  4185. ENDIF
  4186. functionattacks(count%) = number
  4187. REM list of 'real' attack-values 0-totaldur% rounded to nearest integer
  4188. NEXT
  4189. :
  4190. ENDIF
  4191. :
  4192. ENDPROC
  4193. :
  4194. REM**************************************************************
  4195. :
  4196. DEF PROCrhythmicize
  4197. :
  4198. cant% = 0 : REM for notategroup%() subscript - poss change later
  4199. notategroup%() = 0
  4200. :
  4201. REPEAT
  4202. :
  4203. status1$ = status$
  4204. status$ = ""
  4205. startbeat% = endbeat%
  4206. :
  4207. IF status1$ = "onbeat" OR firstgroup$ = "y" THEN
  4208. startcell% = endcell%
  4209. ELSE startcell% = endcell% + 1
  4210. ENDIF
  4211. firstgroup$ = "n"
  4212. :
  4213. cell% = startcell%
  4214. count% = 0
  4215. condition$ = "full"
  4216. :
  4217. PROCbuffers
  4218. :
  4219. WHILE status$ = "" AND attacks5%(cell%) <= rightbuffer% AND cell% < manyattacks%
  4220. :
  4221. IF attacks5%(cell%) >= leftbuffer% AND attacks5%(cell%) <= rightbuffer% THEN
  4222. :
  4223. IF attacks4%(cell%) >= (960-buffer%) THEN attacks4%(cell%) = (960-attacks4%(cell%))*-1 : REM catches attacks just before barline
  4224. :
  4225. REPEAT
  4226. :
  4227. IF attacks4%(cell%) >= (nodes%(count%)-(buffer%)) AND attacks4%(cell%) <= (nodes%(count%)+(buffer%)) THEN
  4228. :
  4229. IF attacks4%(cell%) < 0 THEN
  4230. br% = attacks3%(cell%)+1
  4231. attacks4%(cell%) = 960 - (attacks4%(cell%)*-1)
  4232. beforebar$ = "y"
  4233. ELSE
  4234. br% = attacks3%(cell%)
  4235. beforebar$ = "n"
  4236. ENDIF
  4237. :
  4238. IF attacks5%(cell%) >= ((br%*10^3)+nodes%(count%)) THEN
  4239. diff% = attacks4%(cell%) - nodes%(count%) + ((attacks3%(cell%)-br%)*960)
  4240. ELSE
  4241. diff% = nodes%(count%) - attacks4%(cell%) + ((br%-attacks3%(cell%))*960)
  4242. ENDIF
  4243. :
  4244. IF attacks5%(cell%+1) >= ((br%*10^3)+nodes%(count%)) THEN
  4245. diff1% = attacks4%(cell%+1)-nodes%(count%)+((attacks3%(cell%+1)-br%)*960)
  4246. ELSE
  4247. diff1% = nodes%(count%)-attacks4%(cell%+1)+((br%-attacks3%(cell%+1))*960)
  4248. ENDIF
  4249. :
  4250. IF diff% <= diff1% THEN
  4251. :
  4252. status$ = "onbeat"
  4253. IF beforebar$ = "y" THEN
  4254. attacks5%(cell%) = (attacks3%(cell%)*10^3) + 1000 + nodes%(count%)
  4255. ELSE
  4256. attacks5%(cell%) = (attacks3%(cell%)*10^3) + nodes%(count%)
  4257. ENDIF
  4258. endbeat% = attacks5%(cell%)
  4259. endcell% = cell%
  4260. difference% = endcell% - startcell%
  4261. IF status1$ = "onbeat" AND difference% = 1 THEN condition$ = "empty"
  4262. IF status1$ = "" AND difference% = 0 THEN condition$ = "empty"
  4263. :
  4264. ENDIF
  4265. :
  4266. ENDIF
  4267. :
  4268. count% += 1
  4269. :
  4270. UNTIL count% = irratbeats% OR status$ = "onbeat"
  4271. :
  4272. ENDIF
  4273. :
  4274. cell% += 1
  4275. count% = 0
  4276. :
  4277. ENDWHILE
  4278. :
  4279. :
  4280. IF status$ = "" THEN
  4281. word$ = ""
  4282. leftbuffer% = leftbuffer% + buffer%
  4283. :
  4284. REPEAT
  4285. :
  4286. IF nodes1%(count%) >= (leftbuffer%MOD10^3) THEN
  4287. :
  4288. IF nodes1%(count%) = 960 THEN
  4289. endbeat% = ((leftbuffer%DIV(10^3))*10^3)+(10^3)
  4290. ELSE
  4291. endbeat% = ((leftbuffer%DIV(10^3))*(10^3)) + nodes1%(count%)
  4292. ENDIF
  4293. :
  4294. IF status1$ = "" AND attacks5%(startcell%) > endbeat% THEN
  4295. condition$ = "empty"
  4296. ENDIF
  4297. IF status1$ = "onbeat" AND attacks5%(startcell%+1) > endbeat% THEN
  4298. condition$ = "empty"
  4299. ENDIF
  4300. :
  4301. IF condition$ = "full" THEN
  4302. :
  4303. searchcell% = startcell% - 1
  4304. REPEAT
  4305. searchcell% += 1
  4306. UNTIL attacks5%(searchcell%) > endbeat% OR searchcell% = manyattacks%
  4307. :
  4308. endcell% = searchcell% - 1
  4309. ENDIF
  4310. word$ = "done"
  4311. :
  4312. ENDIF
  4313. :
  4314. count% += 1
  4315. :
  4316. UNTIL word$ = "done"
  4317. :
  4318. :
  4319. ENDIF
  4320. :
  4321. PROCprechoosegroup
  4322. :
  4323. UNTIL endbeat% >= attacks5%(manyattacks%-1)
  4324. :
  4325. IF seeinfo$ = "y" THEN
  4326. CLS
  4327. durat% = 0
  4328. counter% = 0
  4329. thing$ = "on"
  4330. PROCwindow(10,60,90,5) : CLS
  4331. VDU 14
  4332. PRINT '" The group of rhythmicised attacks will be at "
  4333. PRINT" "
  4334. PRINT TAB(28) "ATTACKS AT";
  4335. PRINT TAB(46) "DURATIONS";
  4336. PRINT TAB(64) "RATIOS"
  4337. attacks5%(manyattacks%) = 10^9
  4338. FOR count% = 0 TO manyattacks%
  4339. IF counter% < cant% THEN
  4340. item% = ((notategroup%(counter%,1)DIV10^4)*10^3)+(notategroup%(counter%,0)MOD10^3)
  4341. IF item% = attacks5%(count%) THEN
  4342. PRINT TAB(15) item%;
  4343. counter% += 1
  4344. thing$ = "on"
  4345. ENDIF
  4346. ENDIF
  4347. IF counter% < cant% THEN
  4348. item% = ((notategroup%(counter%,1)DIV10^4)*10^3)+(notategroup%(counter%,0)MOD10^3)
  4349. IF item% < attacks5%(count%) THEN
  4350. PRINT TAB(15) item%
  4351. counter% += 1
  4352. thing$ = "on"
  4353. ENDIF
  4354. ENDIF
  4355. IF counter% < cant% THEN
  4356. IF thing$ = "on" THEN
  4357. IF (notategroup%(counter%,0)DIV1000)= attacks5%(count%) THEN
  4358. PRINT " "
  4359. PRINT " "
  4360. PRINT TAB(0) (notategroup%(counter%,1)MOD10000);
  4361. PRINT TAB(15) (notategroup%(counter%,0)DIV1000);
  4362. thing$ = "off"
  4363. ENDIF
  4364. :
  4365. IF (notategroup%(counter%,0)DIV1000)< attacks5%(count%) THEN
  4366. PRINT " "
  4367. PRINT " "
  4368. PRINT TAB(0) ((notategroup%(counter%,1))MOD10000);
  4369. PRINT TAB(15) (notategroup%(counter%,0)DIV1000)
  4370. thing$ = "off"
  4371. ENDIF
  4372. ENDIF
  4373. ENDIF
  4374. :
  4375. IF thing$ = "on" THEN PRINT'" "
  4376. :
  4377. IF count% < manyattacks% THEN
  4378. PRINT TAB(25)attacks5%(count%);
  4379. IF count% < (manyattacks%-1) THEN
  4380. durat1% = durat%
  4381. durat% = (attacks5%(count%+1)MOD10^3)-(attacks5%(count%)MOD10^3)
  4382. addon% = ((attacks5%(count%+1)DIV(10^3))-(attacks5%(count%)DIV(10^3)))*960
  4383. durat% = durat% + addon%
  4384. PRINT TAB(42) durat%;
  4385. IF count%>0 THEN
  4386. IF direction$ = "rit" THEN ratio = durat%/durat1% ELSE ratio = durat1%/durat%
  4387. CASE ratio OF
  4388. WHEN 0.5 : PRINT TAB(65) "0.5"
  4389. WHEN 1.0 : PRINT TAB(65) "1.0"
  4390. WHEN 1.5 : PRINT TAB(65) "1.5"
  4391. WHEN 2.0 : PRINT TAB(65) "2.0"
  4392. WHEN 2.5 : PRINT TAB(65) "2.5"
  4393. OTHERWISE PRINT TAB(65) ratio
  4394. ENDCASE
  4395. ENDIF
  4396. ENDIF
  4397. ENDIF
  4398. NEXT
  4399. :
  4400. VDU 15
  4401. ENDIF
  4402. :
  4403. CLS
  4404. :
  4405. ENDPROC
  4406. :
  4407. REM*******************************************
  4408. :
  4409. DEF PROCbuffers
  4410. :
  4411. beatnum% = (startbeat%MOD(10^3)) + shortirrat% - buffer%
  4412. carrybars% = beatnum% DIV 960
  4413. beatnum% = beatnum% - (carrybars%*960)
  4414. leftbuffer% = ((startbeat%DIV(10^3))*10^3) + (carrybars%*(10^3)) + beatnum%
  4415. :
  4416. beatnum% = (startbeat%MOD(10^3)) + longirrat% + buffer%
  4417. carrybars% = beatnum% DIV 960
  4418. beatnum% = beatnum% - (carrybars%*960)
  4419. rightbuffer% = ((startbeat%DIV(10^3))*10^3) + (carrybars%*(10^3)) + beatnum%
  4420. :
  4421. REM tolerance of 'buffer%' incorporated into buffers
  4422. :
  4423. ENDPROC
  4424. :
  4425. REM********************************************8
  4426. :
  4427. DEF PROCprechoosegroup
  4428. :
  4429. :
  4430. IF condition$ = "full" THEN
  4431. :
  4432. REM routine to find grouplength%
  4433. carrybars% = (endbeat% DIV (10^3)) - (startbeat% DIV (10^3))
  4434. grouplength% = (endbeat% MOD (10^3)) - (startbeat% MOD (10^3)) + (carrybars% * 960)
  4435. :
  4436. REM routine to find first and last durats
  4437. IF status1$ = "onbeat" THEN
  4438. :
  4439. carrybars% = attacks3%(startcell%+1)-attacks3%(startcell%)
  4440. firstdur% = attacks4%(startcell%+1)-attacks4%(startcell%)+(carrybars%*960)
  4441. ELSE
  4442. carrybars% = attacks3%(startcell%)-(startbeat%DIV(10^3))
  4443. firstdur% = attacks4%(startcell%)-(startbeat%MOD(10^3))+(carrybars%*960)
  4444. ENDIF
  4445. :
  4446. IF status$ = "onbeat" THEN
  4447. :
  4448. carrybars% = attacks3%(endcell%)-attacks3%(endcell%-1)
  4449. lastdur% = attacks4%(endcell%)-attacks4%(endcell%-1)+(carrybars%*960)
  4450. ELSE
  4451. carrybars% = (endbeat%DIV(10^3))-attacks3%(endcell%)
  4452. lastdur% = (endbeat%MOD(10^3))-attacks4%(endcell%)+(carrybars%*960)
  4453. ENDIF
  4454. :
  4455. :
  4456. :
  4457. REM routine to determine each individual duration
  4458. IF status1$ = "onbeat" AND status$ = "onbeat" THEN
  4459. numdurs% = endcell% - startcell%
  4460. FOR count% = 2 TO (numdurs%-1)
  4461. dur%(count%) = attacks1%(startcell%+count%)-attacks1%(startcell%+(count%-1))
  4462. NEXT
  4463. dur%(1) = firstdur%
  4464. dur%(numdurs%) = lastdur%
  4465. ENDIF
  4466. :
  4467. IF status1$ = "onbeat" AND status$ = "" THEN
  4468. numdurs% = endcell% - startcell% + 1
  4469. FOR count% = 2 TO (numdurs%-1)
  4470. dur%(count%) = attacks1%(startcell%+count%)-attacks1%(startcell%+(count%-1))
  4471. NEXT
  4472. dur%(1) = firstdur%
  4473. dur%(numdurs%) = lastdur%
  4474. ENDIF
  4475. :
  4476. IF status1$ = "" AND status$ = "onbeat" THEN
  4477. numdurs% = endcell% - startcell% + 1
  4478. FOR count% = 2 TO (numdurs%-1)
  4479. dur%(count%) = attacks1%(startcell%+(count%-1))-attacks1%(startcell%+(count%-2))
  4480. NEXT
  4481. dur%(1) = firstdur%
  4482. dur%(numdurs%) = lastdur%
  4483. ENDIF
  4484. :
  4485. IF status1$ = "" AND status$ = "" THEN
  4486. numdurs% = endcell% - startcell% + 2
  4487. FOR count% = 2 TO (numdurs%-1)
  4488. dur%(count%) = attacks1%(startcell%+(count%-1))-attacks1%(startcell%+(count%-2))
  4489. NEXT
  4490. dur%(1) = firstdur%
  4491. dur%(numdurs%) = lastdur%
  4492. ENDIF
  4493. :
  4494. REM routine to find enddur (ie smallest duration)
  4495. enddur = 10^9
  4496. FOR count% = 1 TO numdurs%
  4497. IF dur%(count%) < enddur THEN
  4498. enddur = dur%(count%) : enddurnum% = count%
  4499. ENDIF
  4500. NEXT
  4501. :
  4502. REM routine to find numsubdivs of enddur poss, using a default min division, forcing that
  4503. REM down with durats less than it, but not beyond the minimum div given by sieve
  4504. defaultmindur% = 960/defaultsieve
  4505. IF enddur < defaultmindur% THEN
  4506. x = 960/enddur : defaultmindur% = 960/x
  4507. ELSE x = defaultsieve
  4508. ENDIF
  4509. IF x > sieve THEN
  4510. x = sieve : defaultmindur% = mindur%
  4511. ENDIF
  4512. numsubdivs = x * enddur / 960 * 1.04 : REM 1.04 catches numbers just below whole nos eg 1.96
  4513. IF numsubdivs < 1 THEN numsubdivs% = 1 ELSE numsubdivs% = numsubdivs
  4514. :
  4515. REM repeat/until loop to keep increasing and decreasing enddur until a 'reasonable' proportiontotal% is found
  4516. switch$ = "A" : nudge% = -5
  4517. REPEAT
  4518. nudge% += 5
  4519. IF switch$ = "A" THEN enddur += (nudge%/100) ELSE enddur -= (nudge%/100)
  4520. IF enddur < 1 THEN
  4521. VDU 7 : PRINT''" !!!THE COMPLEXITY LEVEL IS TOO LOW "
  4522. PRINT" FOR LONG GROUPS CONSISTING "
  4523. PRINT" OF ODD NUMBERS OF BEATS, "
  4524. PRINT" eg 13 QUAVERS, 31 SEMIS ETC. "
  4525. PRINT" INCREASE THIS LEVEL OR SHORTEN "
  4526. PRINT" GROUPS OR, BEST, REDUCE INPUTS 3/4!!! "
  4527. PRINT" (press C to continue) "
  4528. CASE GET$ OF
  4529. WHEN"C","c" : PROCdisplay
  4530. ENDCASE
  4531. ENDIF
  4532. :
  4533. IF switch$ = "A" THEN switch$ = "B" ELSE switch$ = "A"
  4534. numsubdivs1 = x*enddur/960*1.04
  4535. IF numsubdivs1 < 1 THEN numsubdivs% = 1 ELSE numsubdivs% = numsubdivs1
  4536. REM prev 2 lines allow 'stretched' enddurs to include more (or less) subdivs
  4537. REM without altering original subdivs, which tends to vitiate the whole process
  4538. :
  4539. REM routine to create list of attacks 0 - totalduration
  4540. FOR count% = 1 TO numdurs%
  4541. groupattacks%(count%) = groupattacks%(count%-1)+dur%(count%)
  4542. NEXT
  4543. REM groupattacks%(numdurs%) SHOULD = grouplength%
  4544. :
  4545. timeround% = 1
  4546. PROCchoosegroup
  4547. :
  4548. REM routine to place error-values in order
  4549. errororder%() = 10000000
  4550. FOR count% = 1 TO numsubdivs%
  4551. tick% = 0
  4552. REPEAT
  4553. do$ = "n"
  4554. tick%+=1 : inplace$ = "n"
  4555. IF error%(count%) < errororder%(tick%) THEN
  4556. FOR tock% = numsubdivs% TO tick% STEP -1
  4557. errororder%(tock%+1) = errororder%(tock%)
  4558. errororder1%(tock%+1) = errororder1%(tock%)
  4559. NEXT
  4560. errororder%(tick%) = error%(count%) : errororder1%(tick%) = count% : inplace$ = "y"
  4561. ENDIF
  4562. UNTIL inplace$ = "y"
  4563. NEXT
  4564. :
  4565. timeround% = 2 : tog% = 0
  4566. REPEAT
  4567. tog%+=1 : closest% = errororder1%(tog%)
  4568. PROCchoosegroup
  4569. PROCcheckproportiontotal
  4570. UNTIL proportiontotal$ = "OK" OR tog% = numsubdivs%
  4571. UNTIL proportiontotal$ = "OK"
  4572. REM routine to alter attacks5%() to closest group & to save notation in a parallel temp array
  4573. IF status1$ = "onbeat" THEN
  4574. FOR count% = 1 TO (numdurs%-1)
  4575. totalbeat% = (startbeat%MOD(10^3))+rhythmicattacks%(count%)
  4576. carrybars% = ((totalbeat%/960)DIV1)
  4577. beat% = totalbeat%-(carrybars%*960)
  4578. bar% = (carrybars%+(startbeat%DIV(10^3)))*(10^3)
  4579. attacks5%(startcell%+count%) = beat% + bar%
  4580. NEXT
  4581. ENDIF
  4582. :
  4583. IF status1$ = "" THEN
  4584. FOR count% = 1 TO (numdurs%-1)
  4585. totalbeat% = (startbeat%MOD(10^3))+rhythmicattacks%(count%)
  4586. carrybars% = ((totalbeat%/960)DIV1)
  4587. beat% = totalbeat% - (carrybars%*960)
  4588. bar% = (carrybars% + (startbeat%DIV(10^3))) * (10^3)
  4589. attacks5%(startcell%+(count%-1)) = beat% + bar%
  4590. NEXT
  4591. ENDIF
  4592. :
  4593. notategroup%(cant%,0) = (startbeat%*10^3)+(endbeat%MOD10^3)
  4594. notategroup%(cant%,1) = ((endbeat%DIV10^3)*10^4)+proportiontotal%
  4595. cant% += 1
  4596. :
  4597. ENDIF
  4598. :
  4599. ENDPROC
  4600. :
  4601. REM******************************************************
  4602. :
  4603. DEF PROCchoosegroup
  4604. :
  4605. IF timeround% = 1 THEN
  4606. start% = 1 : finish% = numsubdivs%
  4607. ELSE start% = closest% : finish% = closest%
  4608. ENDIF
  4609. :
  4610. error%() = 0
  4611. FOR count% = start% TO finish%
  4612. :
  4613. FOR count1% = 1 TO numdurs%
  4614. IF count1% = enddurnum% THEN thedur% = enddur ELSE thedur% = dur%(count1%)
  4615. IF numsubdivs < 1 THEN
  4616. proportion = thedur%/enddur*numsubdivs/1.04
  4617. ELSE proportion = thedur%/enddur*count%
  4618. ENDIF
  4619. IF (((proportion*10)DIV1)MOD10) < 5 THEN
  4620. proportion%(count1%) = (proportion) DIV 1
  4621. ELSE proportion%(count1%) = ((proportion) DIV 1) + 1
  4622. ENDIF
  4623. IF proportion%(count1%) < 1 THEN proportion%(count1%) = 1
  4624. NEXT
  4625. :
  4626. proportiontotal% = 0
  4627. :
  4628. FOR count2% = 1 TO numdurs%
  4629. proportiontotal% = proportiontotal%+proportion%(count2%)
  4630. NEXT
  4631. :
  4632. unit = grouplength%/proportiontotal%
  4633. :
  4634. rhythmicattack = 0
  4635. FOR count3% = 1 TO numdurs%
  4636. rhythmicattack = rhythmicattack + (proportion%(count3%)*unit)
  4637. IF (((rhythmicattack*10)DIV1)MOD10) < 5 THEN
  4638. rhythmicattacks%(count3%) = rhythmicattack DIV 1
  4639. ELSE
  4640. rhythmicattacks%(count3%) = ((rhythmicattack)DIV1)+1
  4641. ENDIF
  4642. NEXT : REM rhythmicattacks%(numdurs%) SHOULD = grouplength%
  4643. :
  4644. REM compare attackpoints with attackpoints
  4645. FOR count4% = 1 TO (numdurs%-1)
  4646. IF rhythmicattacks%(count4%) <= groupattacks%(count4%) THEN
  4647. error%(count%) = error%(count%) + (groupattacks%(count4%) - rhythmicattacks%(count4%))
  4648. ELSE
  4649. error%(count%) = error%(count%)+(rhythmicattacks%(count4%)-groupattacks%(count4%))
  4650. ENDIF
  4651. NEXT
  4652. :
  4653. NEXT
  4654. :
  4655. ENDPROC
  4656. :
  4657. REM***************************************************************
  4658. :
  4659. DEF PROCseriesattacks
  4660. :
  4661. IF easiermenus$ = "n" THEN PROCwindow(20,69,70,55) ELSE PROCwindow(20,69,70,42)
  4662. PRINT '" Raw beat numbers R "
  4663. PRINT '" Already rhythmicized A "
  4664. PRINT '" Multiplied by factors F "
  4665. PRINT '" Played P "
  4666. PRINT '" Single attack 1 "
  4667. :
  4668. CASE GET$ OF
  4669. REM CASE 1
  4670. WHEN "A","a" :
  4671. count% = 0 : cant% = 0 :
  4672. notategroup%() = 0 : finished$ = "n"
  4673. :
  4674. REPEAT
  4675. :
  4676. CLS
  4677. PRINT '" single attack S "
  4678. PRINT '" group of attacks (including all tuplets) G "
  4679. PRINT '" finished F "
  4680. CASE GET$ OF
  4681. REM CASE 2
  4682. WHEN "S","s","1","0" :
  4683. :
  4684. CLS
  4685. INPUT' " bar"bar%
  4686. INPUT' " beat"beats%
  4687. PROCalterbeats
  4688. attacks2%(count%) = (bar%*(10^3)) + beats%
  4689. count% += 1
  4690. :
  4691. WHEN "G","g" :
  4692. CLS
  4693. INPUT' " starting at bar "bars%
  4694. INPUT' " beat "beats%
  4695. PROCalterbeats
  4696. start% = (bars%*(10^3))+beats%
  4697. INPUT' " ending at bar "bars%
  4698. INPUT' " beat "beats%
  4699. PROCalterbeats
  4700. end% = (bars%*(10^3))+beats%
  4701. INPUT '" number of divisions "numdivs%
  4702. notategroup%(cant%,0) = (start%*10^3)+(end%MOD10^3)
  4703. notategroup%(cant%,1) = ((end%DIV10^3)*10^4)+numdivs%
  4704. cant% += 1
  4705. beat% = (start%)MOD(10^3) : bar% = (start%)DIV(10^3)
  4706. :
  4707. grouplength% = ((end%MOD(10^3))-(start%MOD(10^3)))+(((end%DIV(10^3))-(start%DIV(10^3)))*960)
  4708. unit = grouplength%/numdivs%
  4709. :
  4710. IF (grouplength%/beatfactor%) > 999 THEN
  4711. PRINT'''" !!!Maximum group length is 999 macro-beats!!! "
  4712. PRINT" (press C to try again) "
  4713. CASE GET$ OF
  4714. REM CASE 3
  4715. WHEN "C","c": CLS : PROCseriesattacks
  4716. OTHERWISE PROCdisplay
  4717. ENDCASE
  4718. REM ENDCASE 3
  4719. ENDIF
  4720. IF numdivs% > 9999 THEN
  4721. PRINT'''" !!!Maximum number of divisions is 9999!!! "
  4722. PRINT" (press C to try again) "
  4723. CASE GET$ OF
  4724. REM CASE 4
  4725. WHEN "C","c": CLS : PROCseriesattacks
  4726. OTHERWISE PROCdisplay
  4727. ENDCASE
  4728. REM ENDCASE 4
  4729. ENDIF
  4730. :
  4731. INPUT '" how many attacks "numattacks%
  4732. CLS
  4733. FOR counter% = 1 TO numattacks%
  4734. PRINT '" attack ";counter%;" is on "
  4735. INPUT " division number "div%
  4736. place = ((div%-1)*unit)
  4737. IF (((place*10)DIV1)MOD10) < 5 THEN
  4738. place% = (place)DIV1
  4739. ELSE place% = ((place)DIV1)+1
  4740. ENDIF
  4741. :
  4742. beatnum% = beat% + place%
  4743. carrybars% = (beatnum%/960)DIV1
  4744. beatnum% = beatnum% - (carrybars%*960)
  4745. barnum% = carrybars% + bar%
  4746. attacks2%(count%) = (barnum%*(10^3)) + beatnum%
  4747. count% += 1
  4748. NEXT
  4749. :
  4750. WHEN "F","f" : finished$ = "y"
  4751. ENDCASE
  4752. REM ENDCASE 2
  4753. :
  4754. UNTIL finished$ = "y"
  4755. :
  4756. method$ = "alreadyrhythmicized" : manyattacks% = count%
  4757. attacks5%() = attacks2%() : rhythmicized$ = "y"
  4758. :
  4759. WHEN "R","r","0" :
  4760. REM function will feed a sim string of beat values 0 - n into attacks1%()
  4761. :
  4762. attacks1%() = 0
  4763. CLS
  4764. INPUT' " How many attacks "manyattacks%
  4765. :
  4766. IF manyattacks% > 2 THEN
  4767. PRINT'" Are the intervals between them the same? "
  4768. CASE GET$ OF
  4769. WHEN "N","n","2" : sameintervals$ = "n"
  4770. OTHERWISE sameintervals$ = "y"
  4771. ENDCASE
  4772. ELSE sameintervals$ = "y"
  4773. ENDIF
  4774. :
  4775. IF manyattacks% > 1 THEN
  4776. :
  4777. CASE sameintervals$ OF
  4778. WHEN "n" :
  4779. FOR count% = 1 TO (manyattacks% - 1)
  4780. PRINT' " Give the interval between attacks ";count%;" and ";count%+1;"... "
  4781. INPUT'" bars "bars%
  4782. INPUT'" beats "beats%
  4783. PROCalterbeats
  4784. onbeat% = (bars%*960)+beats%
  4785. attacks1%(count%) = attacks1%(count%-1) + onbeat%
  4786. NEXT
  4787. WHEN "y" :
  4788. PRINT'" The interval between them is "
  4789. INPUT'" bars "bars%
  4790. INPUT'" bears "beats%
  4791. PROCalterbeats
  4792. onbeat% = (bars%*960)+beats%
  4793. FOR count% = 1 TO (manyattacks%-1)
  4794. attacks1%(count%) = attacks1%(count%-1) + onbeat%
  4795. NEXT
  4796. :
  4797. ENDCASE
  4798. :
  4799. ENDIF
  4800. method$ = "raw" : attacks1%(0) = 0
  4801. WHEN "1" :
  4802. REM function will feed a sim string of beat values 0 - n into attacks1%()
  4803. :
  4804. manyattacks% = 1
  4805. :
  4806. method$ = "raw" : attacks1%(0) = 0
  4807. :
  4808. WHEN "F","f" :
  4809. REM function will feed a sim string of beat values 0 - n into attacks1%()
  4810. :
  4811. attacks1%() = 0
  4812. INPUT' " How many attacks "manyattacks%
  4813. :
  4814. FOR count% = 1 TO (manyattacks% - 1)
  4815. IF count% = 1 THEN
  4816. PRINT' " Give the interval between attacks ";count%;" and ";count%+1;"... "
  4817. INPUT'" bars "bars%
  4818. INPUT " beats "beats%
  4819. PROCalterbeats
  4820. onbeat% = (bars%*960)+beats%
  4821. attacks1%(count%) = attacks1%(count%-1) + onbeat%
  4822. ELSE
  4823. PRINT' " Multiply by ? to give the interval between attacks ";count%;" and ";count%+1;"... "
  4824. IF count% = 2 THEN onbeat% = attacks1%(count%-1)
  4825. CASE GET$ OF
  4826. WHEN "0": onbeat% = onbeat% * 1.03
  4827. WHEN "1": onbeat% = onbeat% * 1.04
  4828. WHEN "2": onbeat% = onbeat% * 1.06
  4829. WHEN "3": onbeat% = onbeat% * 1.09
  4830. WHEN "4": onbeat% = onbeat% * 1.13
  4831. WHEN "5": onbeat% = onbeat% * 1.19
  4832. WHEN "6": onbeat% = onbeat% * 1.29
  4833. WHEN "7": onbeat% = onbeat% * 1.41
  4834. WHEN "8": onbeat% = onbeat% * 1.61
  4835. WHEN "9": onbeat% = onbeat% * 1.91
  4836. ENDCASE
  4837. attacks1%(count%) = attacks1%(count%-1) + onbeat%
  4838. ENDIF
  4839. NEXT
  4840. method$ = "raw" : attacks1%(0) = 0
  4841. :
  4842. WHEN "P","p" :
  4843. CLS
  4844. PRINT " Play the rhythm using any"
  4845. PRINT " keys or the spacebar"
  4846. PRINT'" When finished, press ~"
  4847. :
  4848. key$ = GET$ : TIME = 0 : VDU 7 : manyattacks% = 1
  4849. :
  4850. REPEAT
  4851. manyattacks% += 1 : key$ = GET$
  4852. attacks2%(manyattacks%-1) = TIME : VDU 7
  4853. UNTIL key$ = "~" OR key$ = "`"
  4854. :
  4855. manyattacks% -= 1
  4856. :
  4857. FOR count% = 1 TO manyattacks% - 1
  4858. attacks1%(count%) = attacks2%(count%)*960*MM%/6000
  4859. NEXT
  4860. :
  4861. method$ = "raw"
  4862. :
  4863. ENDCASE
  4864. REM ENDCASE 1
  4865. :
  4866. PROCinsertattacks
  4867. :
  4868. ENDPROC
  4869. :
  4870. REM***************************************************************
  4871. :
  4872. DEF PROCalterbeats
  4873. :
  4874. IF beats% < alterbeatsat% THEN beats% = beats% * beatfactor% * 8
  4875. :
  4876. ENDPROC
  4877. :
  4878. REM****************************************************************
  4879. :
  4880. DEF PROCdisarrayfill
  4881. :
  4882. FOR count% = 0 TO (cant%-1)
  4883. :
  4884. bar% = notategroup%(count%,0)DIV(10^6)
  4885. carrybars% = (notategroup%(count%,1)DIV(10^4))-bar%
  4886. carrybeats% = (notategroup%(count%,0)MOD(10^3))-((notategroup%(count%,0)MOD(10^6))DIV(10^3))
  4887. grouplength% = (carrybars%*960)+carrybeats%
  4888. grouplength% = grouplength%/beatfactor%
  4889. :
  4890. beat% = ((notategroup%(count%,0)MOD(10^6))DIV(10^3))/beatfactor%
  4891. divs% = notategroup%(count%,1)MOD(10^4)
  4892. :
  4893. IF grouplength% > 99 OR divs% > 99 THEN bigirrat$ = "y" ELSE bigirrat$ = "n"
  4894. :
  4895. IF (disarray%(bar%,0,voice%) DIV(10^3)) MOD10^2 = 0 AND bigirrat$ = "n" THEN
  4896. hold% = disarray%(bar%,0,voice%)MOD10^3
  4897. add% = ((beat%*(10^4)) + (grouplength%*(10^2)) + divs%) * (10^3)
  4898. disarray%(bar%,0,voice%) = hold% + add%
  4899. ELSE
  4900. IF (disarray%(bar%,1,voice%)DIV(10^6))MOD10^2=0 AND bigirrat$ = "n" THEN
  4901. disarray%(bar%,0,voice%)=disarray%(bar%,0,voice%)+(beat%*10)+(grouplength%DIV10)
  4902. hold% = disarray%(bar%,1,voice%)MOD10^6
  4903. add% = (((grouplength%MOD10)*100)+divs%)*10^6
  4904. disarray%(bar%,1,voice%) = hold% + add%
  4905. ELSE
  4906. IF disarray%(bar%,1,voice%)MOD10^2=0 AND bigirrat$ = "n" THEN
  4907. disarray%(bar%,1,voice%)=disarray%(bar%,1,voice%)+(beat%*(10^4))+(grouplength%*(10^2))+divs%
  4908. ELSE
  4909. IF (disarray%(bar%,2,voice%)DIV(10^3))MOD10^2 = 0 AND bigirrat$ = "n" THEN
  4910. hold% = disarray%(bar%,2,voice%)MOD10^3
  4911. add% = ((beat%*(10^4)) + (grouplength%*(10^2)) + divs%) * (10^3)
  4912. disarray%(bar%,2,voice%)= hold% + add%
  4913. ELSE
  4914. IF disarray%(bar%,3,voice%)=0 THEN
  4915. disarray%(bar%,3,voice%)=(beat%*10^7)+(grouplength%*10^4)+divs%
  4916. ELSE
  4917. VDU 7
  4918. PRINT''''" THERE ARE ALREADY 5 RHYTHMIC GROUPS IN THIS BAR"
  4919. PRINT" (this is the maximum)"
  4920. PRINT''" TO CONTINUE PRESS C"
  4921. CASE GET$ OF
  4922. WHEN "C","c" : PROCawait
  4923. OTHERWISE
  4924. PROCawait
  4925. ENDCASE
  4926. ENDIF
  4927. ENDIF
  4928. ENDIF
  4929. ENDIF
  4930. ENDIF
  4931. :
  4932. NEXT
  4933. :
  4934. ENDPROC
  4935. :
  4936. REM**********************************************
  4937. :
  4938. DEF PROCdelete
  4939. :
  4940. IF deleteone$ <> "none" THEN
  4941. PROCdeleteone
  4942. ELSE
  4943. IF easiermenus$ = "n" THEN PROCwindow(20,69,80,55) ELSE PROCwindow(20,69,72,42)
  4944. PRINT '" One or several notes LEAVING rhythmic notation - A"
  4945. PRINT '" One or several notes DELETING rhythmic notation - B"
  4946. PRINT '" One or several bars - C"
  4947. PRINT '" Whole voice - D"
  4948. PRINT '" Group of voices - G"
  4949. :
  4950. CASE GET$ OF
  4951. WHEN "A","a" :
  4952. :
  4953. CLS
  4954. IF screenvoices$ = "n" THEN
  4955. INPUT' " Which voice (0 = top) "voice%
  4956. IF voice% = 0 THEN PROCpressenter
  4957. ELSE
  4958. PRINT'" Which screen voice "
  4959. CASE GET$ OF
  4960. WHEN "1" : voice% = 1
  4961. WHEN "2" : voice% = 2
  4962. WHEN "3" : voice% = 3
  4963. OTHERWISE PROCpressenter
  4964. ENDCASE
  4965. ENDIF
  4966. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  4967. voice% -= 1
  4968. IF voice% >= 0 THEN samevoice% = voice%
  4969. IF voice% = -1 THEN voice% = samevoice%
  4970. :
  4971. INPUT " how many notes (for 1 press 0) "numnotes%
  4972. IF numnotes% = 0 THEN numnotes% = 1
  4973. IF quickcopy$ = "n" THEN
  4974. PRINT'" Starting at bar number "
  4975. INPUT " (press 0 for first bar displayed) "bar%
  4976. IF bar% = 0 THEN bar% = startbar%
  4977. INPUT " beat "beats% : PROCalterbeats
  4978. start% = (bar%*(10^3))+beats%
  4979. ELSE
  4980. INPUT ' " starting at note number (0 counts as 1) "along%
  4981. IF along% = 0 THEN along% = 1
  4982. along%-=1
  4983. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  4984. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  4985. beats% = copystartbeat%
  4986. PROCalterbeats
  4987. start% = (copystartbar%*(10^3))+beats%
  4988. ENDIF
  4989. PROCsearch(start%)
  4990. PROCshuntleft(startcell%,numnotes%)
  4991. :
  4992. ENDIF
  4993. :
  4994. WHEN "B","b" :
  4995. :
  4996. CLS
  4997. IF screenvoices$ = "n" THEN
  4998. INPUT' " Which voice (0 = top) "voice%
  4999. IF voice% = 0 THEN PROCpressenter
  5000. ELSE
  5001. PRINT'" Which screen voice "
  5002. CASE GET$ OF
  5003. WHEN "1" : voice% = 1
  5004. WHEN "2" : voice% = 2
  5005. WHEN "3" : voice% = 3
  5006. OTHERWISE PROCpressenter
  5007. ENDCASE
  5008. ENDIF
  5009. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  5010. voice% -= 1
  5011. IF voice% >= 0 THEN samevoice% = voice%
  5012. IF voice% = -1 THEN voice% = samevoice%
  5013. :
  5014. INPUT " how many notes "numnotes%
  5015. :
  5016. IF quickcopy$ = "n" THEN
  5017. PRINT'" Starting at bar number "
  5018. INPUT " (press 0 for first bar displayed "bar%
  5019. IF bar% = 0 THEN bar% = startbar%
  5020. INPUT " beat "beats% : PROCalterbeats
  5021. start% = (bar%*(10^3))+beats%
  5022. ELSE
  5023. INPUT ' " starting at note number (0 counts as 1) "along%
  5024. IF along% = 0 THEN along% = 1
  5025. along%-=1
  5026. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  5027. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  5028. beats% = copystartbeat%
  5029. PROCalterbeats
  5030. start% = (copystartbar%*(10^3))+beats%
  5031. ENDIF
  5032. PROCsearch(start%)
  5033. FOR count% = startcell% TO (startcell%+(numnotes%-1))
  5034. FOR counter% = 0 TO 1
  5035. barno% = (array%(count%,0,voice%)DIV10^6)-counter%
  5036. beatnum% = ((array%(count%,0,voice%)DIV10^3)MOD10^3)
  5037. :
  5038. group1start% = (disarray%(barno%,0,voice%)DIV10^7)*beatfactor%
  5039. group1end% = group1start% + (((disarray%(barno%,0,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
  5040. IF beatnum%+(960*counter%) >= group1start% AND beatnum%+(960*counter%) <= group1end% THEN
  5041. disarray%(barno%,0,voice%) = disarray%(barno%,0,voice%)MOD10^3
  5042. ENDIF
  5043. :
  5044. group2start% = ((disarray%(barno%,0,voice%)DIV10)MOD10^2)*beatfactor%
  5045. group2end% = group2start%+((((disarray%(barno%,0,voice%)MOD10)*10)+(disarray%(barno%,1,voice%)DIV10^8))*beatfactor%)-1
  5046. IF beatnum%+(960*counter%) >= group2start% AND beatnum%+(960*counter%) <= group2end% THEN
  5047. disarray%(barno%,0,voice%) = (disarray%(barno%,0,voice%)DIV10^3)*10^3
  5048. disarray%(barno%,1,voice%) = disarray%(barno%,1,voice%)MOD10^6
  5049. ENDIF
  5050. :
  5051. group3start%=((disarray%(barno%,1,voice%)DIV10^4)MOD10^2)*beatfactor%
  5052. group3end% = group3start% + (((disarray%(barno%,1,voice%)MOD10^4)DIV10^2)*beatfactor%)-1
  5053. IF beatnum%+(960*counter%) >= group3start% AND beatnum%+(960*counter%) <= group3end% THEN
  5054. disarray%(barno%,1,voice%) = (disarray%(barno%,1,voice%)DIV10^6)*10^6
  5055. ENDIF
  5056. :
  5057. group4start% = (disarray%(barno%,2,voice%)DIV10^7)*beatfactor%
  5058. group4end% = group4start%+(((disarray%(barno%,2,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
  5059. IF beatnum%+(960*counter%) >= group4start% AND beatnum%+(960*counter%) <= group4end% THEN
  5060. disarray%(barno%,2,voice%) = disarray%(barno%,2,voice%)MOD10^3
  5061. ENDIF
  5062. :
  5063. group5start% = (disarray%(barno%,3,voice%)DIV10^7)*beatfactor%
  5064. group5end% = group5start%+(((disarray%(barno%,3,voice%)DIV10^4)MOD10^3)*beatfactor%)-1
  5065. IF beatnum%+(960*counter%) >= group5start% AND beatnum%+(960*counter%) <= group5end% THEN
  5066. disarray%(barno%,2,voice%) = (disarray%(barno%,2,voice%)DIV10^3)*10^3
  5067. disarray%(barno%,3,voice%) = 0
  5068. ENDIF
  5069. :
  5070. NEXT
  5071. :
  5072. NEXT
  5073. PROCshuntleft(startcell%,numnotes%)
  5074. :
  5075. WHEN "C","c" :
  5076. CLS
  5077. PRINT '" If rhythmic groups cross from the bar(s) in question "
  5078. PRINT " to other bars, use A or B to delete those groups, "
  5079. PRINT " in which case press X"
  5080. PRINT'" Otherwise, press C to continue with deleting"
  5081. PRINT" self-contained bar(s)"
  5082. CASE GET$ OF
  5083. WHEN "X","x" : PROCdelete
  5084. OTHERWISE
  5085. ENDCASE
  5086. CLS
  5087. INPUT '" how many bars (0 = 100) "NUMbars%
  5088. IF NUMbars% = 0 THEN NUMbars% = 100
  5089. PRINT '" starting at bar "
  5090. INPUT "(press 0 for first bar displayed) "STARTbar%
  5091. IF STARTbar% = 0 THEN STARTbar% = startbar%
  5092. :
  5093. IF screenvoices$ = "n" THEN
  5094. INPUT' " Which voice (0 = top) "voice%
  5095. IF voice% = 0 THEN PROCpressenter
  5096. ELSE
  5097. PRINT'" Which screen voice "
  5098. CASE GET$ OF
  5099. WHEN "1" : voice% = 1
  5100. WHEN "2" : voice% = 2
  5101. WHEN "3" : voice% = 3
  5102. OTHERWISE PROCpressenter
  5103. ENDCASE
  5104. ENDIF
  5105. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  5106. voice% -= 1
  5107. IF voice% >= 0 THEN samevoice% = voice%
  5108. IF voice% = -1 THEN voice% = samevoice%
  5109. :
  5110. startcell% = 0
  5111. :
  5112. FOR bar% = STARTbar% TO (STARTbar%+(NUMbars%-1))
  5113. :
  5114. IF numusedcells%(voice%)-startcell% > 0 THEN
  5115. :
  5116. start% = bar%*(10^3)
  5117. IF start% < (array%(0,0,voice%)DIV10^3) THEN
  5118. startcell% = 0
  5119. ELSE PROCsearch(start%)
  5120. ENDIF
  5121. :
  5122. numnotes% = 0
  5123. WHILE (array%((startcell%+numnotes%),0,voice%)DIV10^6) = bar%
  5124. numnotes% += 1
  5125. ENDWHILE
  5126. IF numnotes% > 0 THEN PROCshuntleft(startcell%,numnotes%)
  5127. :
  5128. FOR count% = 0 TO 3
  5129. disarray%(bar%,count%,voice%) = 0
  5130. NEXT
  5131. :
  5132. ENDIF
  5133. :
  5134. NEXT
  5135. :
  5136. WHEN "D","d" :
  5137. IF screenvoices$ = "n" THEN
  5138. INPUT' " Which voice "voice%
  5139. ELSE
  5140. PRINT'" Which screen voice "
  5141. CASE GET$ OF
  5142. WHEN "1" : voice% = 1
  5143. WHEN "2" : voice% = 2
  5144. WHEN "3" : voice% = 3
  5145. OTHERWISE PROCpressenter
  5146. ENDCASE
  5147. ENDIF
  5148. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  5149. voice% -= 1
  5150. IF voice% >= 0 THEN samevoice% = voice%
  5151. IF voice% = -1 THEN voice% = samevoice%
  5152. :
  5153. FOR count% = 0 TO (numusedcells%(voice%)-1)
  5154. array%(count%,0,voice%) = 0
  5155. array%(count%,1,voice%) = 0
  5156. array%(count%,2,voice%) = 0
  5157. NEXT
  5158. numusedcells%(voice%) = 0
  5159. :
  5160. FOR count% = 1 TO nobars%
  5161. FOR counter% = 0 TO 3
  5162. disarray%(count%,counter%,voice%) = 0
  5163. NEXT
  5164. NEXT
  5165. :
  5166. WHEN "G","g" :
  5167. INPUT'" Between which voice "voice1%
  5168. INPUT'" and which voice "voice2%
  5169. voice1% -= 1 : voice2% -= 1
  5170. FOR whichvoice% = voice1% TO voice2%
  5171. voice% = whichvoice%
  5172. FOR count% = 0 TO (numusedcells%(voice%)-1)
  5173. array%(count%,0,voice%) = 0
  5174. array%(count%,1,voice%) = 0
  5175. array%(count%,2,voice%) = 0
  5176. NEXT
  5177. numusedcells%(voice%) = 0
  5178. FOR count% = 1 TO nobars%
  5179. FOR counter% = 0 TO 3
  5180. disarray%(count%,counter%,voice%) = 0
  5181. NEXT
  5182. NEXT
  5183. NEXT
  5184. :
  5185. OTHERWISE VDU 7 : PROCdelete
  5186. :
  5187. ENDCASE
  5188. PROCdisplay
  5189. ENDPROC
  5190. :
  5191. REM************************************************
  5192. :
  5193. DEF PROCshuntleft(startcell%,numnotes%)
  5194. :
  5195. FOR count% = startcell% TO numusedcells%(voice%)-(numnotes%+1)
  5196. array%(count%,0,voice%) = array%(count%+numnotes%,0,voice%)
  5197. array%(count%,1,voice%) = array%(count%+numnotes%,1,voice%)
  5198. array%(count%,2,voice%) = array%(count%+numnotes%,2,voice%)
  5199. NEXT
  5200. FOR count% = (numusedcells%(voice%)-1) TO (numusedcells%(voice%)-numnotes%) STEP -1
  5201. array%(count%,0,voice%) = 0
  5202. array%(count%,1,voice%) = 0
  5203. array%(count%,2,voice%) = 0
  5204. NEXT
  5205. numusedcells%(voice%) = numusedcells%(voice%)-numnotes%
  5206. ENDPROC
  5207. :
  5208. REM********************************************************
  5209. :
  5210. DEF PROCpredisplay
  5211. :
  5212. CLS
  5213. methd$ = "second"
  5214. INPUT '" How many bars "numbars%
  5215. INPUT '" starting at bar "startbar%
  5216. INPUT '" How many voices "numvoices%
  5217. :
  5218. requestedend% = startbar% + numbars%
  5219. :
  5220. IF requestedend% > nobars% THEN startbar% -= (requestedend%-nobars%)
  5221. IF startbar% < 1 THEN
  5222. startbar% = 1 : numbars% = nobars%-1
  5223. ENDIF
  5224. IF numvoices% > numparts% THEN numvoices% = numparts%
  5225. holdnum% = numvoices%
  5226. :
  5227. IF numvoices% > 9 THEN
  5228. PRINT '" Are the voice numbers"
  5229. PRINT " successive?"
  5230. CASE GET$ OF
  5231. WHEN "Y","y" :
  5232. INPUT " starting at voice number "vce%
  5233. FOR count% = 1 TO numvoices%
  5234. displayvoices%(count%) = vce% + count% - 1
  5235. holddisplay%(count%) = vce% + count% - 1
  5236. NEXT
  5237. methd$ = "first"
  5238. OTHERWISE
  5239. ENDCASE
  5240. ENDIF
  5241. IF methd$ = "second" THEN
  5242. FOR count% = 1 TO numvoices%
  5243. PRINT '" voice ";count%;
  5244. INPUT " is voice "vce%
  5245. displayvoices%(count%) = vce%
  5246. holddisplay%(count%) = vce%
  5247. NEXT
  5248. ENDIF
  5249. startv% = 1 : holdstart% = 1
  5250. PROCdisplay
  5251. ENDPROC
  5252. :
  5253. REM********************************************
  5254. :
  5255. DEF PROCquickdisplay
  5256. :
  5257. FOR count% = 1 TO quicknum%
  5258. prequickdisplay%(count%) = quickdisplay%(count%)
  5259. NEXT
  5260. prequicknum% = quicknum%
  5261. :
  5262. IF quickdisplaywindow$ = "y" THEN
  5263. PROCwindow(20,63,48,55) : ON
  5264. ENDIF
  5265. :
  5266. IF numvoicesgiven$ = "n" THEN
  5267. REPEAT
  5268. INPUT'" How many voices "numvoices%
  5269. UNTIL numvoices% > 0 : REM stops a crash if 0 accidentally input
  5270. quicknum% = numvoices%
  5271. ENDIF
  5272. :
  5273. IF numvoices% > 1 THEN
  5274. PRINT'" Are the voices successive "
  5275. CASE GET$ OF
  5276. WHEN "N","n","2" : succ$ = "n"
  5277. OTHERWISE succ$ = "y"
  5278. ENDCASE
  5279. ELSE
  5280. succ$ = "n"
  5281. ENDIF
  5282. :
  5283. IF succ$ = "y" THEN
  5284. INPUT'" starting at voice "vce%
  5285. FOR count% = 1 TO numvoices%
  5286. displayvoices%(count%) = vce%+count%-1
  5287. quickdisplay%(count%) = vce%+count%-1
  5288. NEXT
  5289. :
  5290. ELSE
  5291. FOR count% = 1 TO numvoices%
  5292. IF numvoices% = 1 THEN
  5293. PRINT'" which voice "
  5294. ELSE
  5295. PRINT'" voice ";count%;" is voice "
  5296. ENDIF
  5297. REPEAT
  5298. INPUT vce%
  5299. UNTIL vce% > 0
  5300. displayvoices%(count%) = vce%
  5301. quickdisplay%(count%) = vce%
  5302. NEXT
  5303. ENDIF
  5304. :
  5305. quicknum% = numvoices%
  5306. startv% = 1
  5307. toggle$ = "quick" : numvoicesgiven$ = "n"
  5308. quickdisplaywindow$ = "y"
  5309. PROCdisplay
  5310. ENDPROC
  5311. :
  5312. REM********************************************
  5313. :
  5314. DEF PROCdisplay
  5315. :
  5316. *CONFIGURE ScreenSize 256K
  5317. MODE 31
  5318. VDU 5
  5319. ledgerkey% = 1 : height1% = 0 : wideness1% = 0 : along% = 0
  5320. :
  5321. VDU 23,17,7,6,7;7;0;
  5322. REM penultimate and pre-penultimate values determine text size
  5323. :
  5324. endv% = startv% + numvoices% - 1
  5325. IF longscore$ = "y" AND (endv%-startv%)>2 THEN endv% = startv%+2
  5326. :
  5327. IF printing$ = "n" THEN
  5328. GCOL 0 : GCOL 191 : CLG
  5329. ELSE
  5330. GCOL 0 : GCOL 191 : CLG
  5331. ENDIF
  5332. :
  5333. REM display of beatnumbers, notenumbers etc shuffle up to occupy empty space
  5334. beatsheight% = 0 : numbersheight% = 0 : intheight% = 0
  5335. IF amplitudes$ = "y" THEN
  5336. beatsheight% += 40 : numbersheight% += 40 : intheight% += 40
  5337. ENDIF
  5338. IF beatnumbers$ = "y" THEN
  5339. numbersheight% += 40 : intheight% += 40
  5340. ENDIF
  5341. IF notenumbers$ = "y" OR notenumbers$ = "from1" THEN intheight% += 40
  5342. :
  5343. IF longscore$ = "n" THEN width% = 1520 ELSE width% = 1480
  5344. IF printing$ = "y" THEN width% -= 0
  5345. factor = width%/((numbars%/2)*960)
  5346. IF longscore$ = "y" THEN factor = factor/2
  5347. :
  5348. REM stave lines, barlines & beats for shortscore
  5349. IF longscore$ = "n" THEN
  5350. IF staves$ = "y" THEN
  5351. FOR count% = 938 TO 874 STEP -16 : LINE 0,count%,2112,count% : NEXT
  5352. IF lowerstave$ = "y" THEN
  5353. FOR count% = 794 TO 730 STEP -16 : LINE 0,count%,2112,count% : NEXT
  5354. ENDIF
  5355. FOR count% = 414 TO 350 STEP -16 : LINE 0,count%,2112,count% : NEXT
  5356. IF lowerstave$ = "y" THEN
  5357. FOR count% = 270 TO 206 STEP -16 : LINE 0,count%,2112,count% : NEXT
  5358. ENDIF
  5359. ENDIF
  5360. :
  5361. REM barlines
  5362. IF barlines$ = "y" THEN
  5363. FOR system% = 0 TO 1
  5364. FOR barline% = 1 TO (numbars%/2)
  5365. horpos% = (960*barline%*factor)+40
  5366. IF notehead$ = "small" THEN horpos% += 16
  5367. IF notehead$ = "vsmall" THEN horpos% += 24
  5368. FOR thickness% = 2 TO 8 STEP 2
  5369. LINE horpos%+thickness%,874-(524*system%),horpos%+thickness%,794-(524*system%)
  5370. NEXT
  5371. REM bar nos
  5372. IF printing$ = "n" THEN GCOL 3
  5373. IF tempi%(startbar%) <> tempi%(startbar%-1) THEN
  5374. MOVE 40,1145 : PRINT "b.";startbar%;" MM.";tempi%(startbar%)
  5375. ELSE MOVE 40,1145 : PRINT "b.";startbar%;" (MM.";tempi%(startbar%);")"
  5376. ENDIF
  5377. IF remarks$(startbar%,0) <> "" OR remarks$(startbar%,1) <> "" THEN
  5378. MOVE 40,1120 : PRINT remarks$(startbar%,0) : MOVE 40,1095 : PRINT remarks$(startbar%,1)
  5379. ENDIF
  5380. IF printing$ = "n" THEN GCOL 0
  5381. barline1% = (system%*(numbars%/2))+barline%
  5382. MOVE horpos%-125,1145-(533*system%)
  5383. IF printing$ = "n" THEN GCOL 3
  5384. IF tempi%(startbar% + barline1%) <> tempi%(startbar% + barline1% - 1) THEN
  5385. PRINT startbar% + barline1%;" MM.";tempi%(startbar% + barline1%);
  5386. ELSE IF barline1% MOD barnosoften% = 0 THEN PRINT startbar% + barline1%
  5387. ENDIF
  5388. IF remarks$(startbar%+barline1%,0) <> "" OR remarks$(startbar%+barline1%,1) <> "" THEN
  5389. MOVE horpos%,1120-(533*system%) : PRINT remarks$(startbar%+barline1%,0)
  5390. MOVE horpos%,1095-(533*system%) : PRINT remarks$(startbar%+barline1%,1)
  5391. ENDIF
  5392. REM print duration at bottom right
  5393. IF seeduration$ = "y" THEN
  5394. IF startbar% + barline1% = startbar% + numbars% - 1 THEN
  5395. totaldur = 0
  5396. FOR count% = 1 TO startbar% + numbars% - 1
  5397. duration = 60/tempi%(count%)
  5398. totaldur = totaldur + duration
  5399. NEXT
  5400. totaldur% = totaldur
  5401. mins% = totaldur% DIV 60
  5402. secs% = totaldur% - (mins%*60)
  5403. MOVE 1200,50 : PRINT "duration ";mins%;" mins ";secs%;" secs"
  5404. ENDIF
  5405. ENDIF
  5406. IF printing$ = "n" THEN GCOL 0
  5407. NEXT
  5408. NEXT
  5409. REM bar no for system 2 first bar
  5410. MOVE -70,612
  5411. IF printing$ = "n" THEN GCOL 3
  5412. IF tempi%(startbar%+(numbars%/2)) <> tempi%(startbar%+(numbars%/2)-1) THEN
  5413. PRINT startbar%+(numbars%/2);" MM.";tempi%(startbar%+(numbars%/2))
  5414. ELSE IF (numbars%/2) MOD barnosoften% = 0 THEN PRINT startbar%+(numbars%/2)
  5415. ENDIF
  5416. IF remarks$(startbar%+(numbars%/2),0) <> "" OR remarks$(startbar%+(numbars%/2),1) <> "" THEN
  5417. MOVE 40,587 : PRINT remarks$(startbar%+(numbars%/2),0)
  5418. MOVE 40,562 : PRINT remarks$(startbar%+(numbars%/2),1)
  5419. ENDIF
  5420. IF printing$ = "n" THEN GCOL 0
  5421. ENDIF
  5422. :
  5423. REM beats
  5424. IF beats$ = "y" THEN
  5425. IF notehead$ = "big" THEN add% = 26
  5426. IF notehead$ = "small" THEN add% = 34
  5427. IF notehead$ = "vsmall" THEN add% = 38
  5428. :
  5429. FOR system% = 0 TO 1
  5430. FOR br% = 0 TO (numbars%/2)-1
  5431. horpos% = (960*br%*factor)+add%+40
  5432. FOR bt% = 0 TO (factor%-1) STEP beatstep%
  5433. CIRCLE horpos%+(bt%*960/factor%*factor),834-(524*system%),4
  5434. NEXT
  5435. NEXT
  5436. NEXT
  5437. ENDIF
  5438. :
  5439. ENDIF
  5440. :
  5441. REM staves, barlines, beats etc for longscore
  5442. IF longscore$ = "y" THEN
  5443. longinsts$() = ""
  5444. REM staves
  5445. lastcount% = numvoices%-1
  5446. IF lastcount% > 2 THEN lastcount% = 2
  5447. FOR count% = 0 TO lastcount%
  5448. longinsts$(count%,0) = insts$(displayvoices%(startv%+count%),0)
  5449. longinsts$(count%,1) = insts$(displayvoices%(startv%+count%),1)
  5450. longinsts$(count%,2) = insts$(displayvoices%(startv%+count%),2)
  5451. NEXT
  5452. stavecombination$ = longinsts$(0,2) + longinsts$(1,2) + longinsts$(2,2)
  5453. clefcombination$ = longinsts$(0,1)+longinsts$(1,1)+longinsts$(2,1)
  5454. CASE stavecombination$ OF
  5455. WHEN "111" :
  5456. IF staves$ = "y" THEN
  5457. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5458. FOR count% = 0 TO 64 STEP16 : LINE 0,604-count%,2112,604-count% : NEXT
  5459. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5460. ENDIF
  5461. PROCclef(3,938,604,270,0,0,0,clefcombination$)
  5462. PROClongvalue(938,604,270,clefcombination$)
  5463. WHEN "121" :
  5464. IF staves$ = "y" THEN
  5465. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5466. FOR count% = 0 TO 64 STEP16 : LINE 0,652-count%,2112,652-count% : NEXT
  5467. FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
  5468. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5469. ENDIF
  5470. PROCclef(4,938,652,556,270,0,0,clefcombination$)
  5471. PROClongvalue(938,652,270,clefcombination$)
  5472. WHEN "211" :
  5473. IF staves$ = "y" THEN
  5474. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5475. FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
  5476. FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
  5477. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5478. ENDIF
  5479. PROCclef(4,938,842,556,270,0,0,clefcombination$)
  5480. PROClongvalue(938,556,270,clefcombination$)
  5481. WHEN "112" :
  5482. IF staves$ = "y" THEN
  5483. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5484. FOR count% = 0 TO 64 STEP16 : LINE 0,652-count%,2112,652-count% : NEXT
  5485. FOR count% = 0 TO 64 STEP16 : LINE 0,366-count%,2112,366-count% : NEXT
  5486. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5487. ENDIF
  5488. PROCclef(4,938,652,366,270,0,0,clefcombination$)
  5489. PROClongvalue(938,652,366,clefcombination$)
  5490. WHEN "221" :
  5491. IF staves$ = "y" THEN
  5492. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5493. FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
  5494. FOR count% = 0 TO 64 STEP16 : LINE 0,604-count%,2112,604-count% : NEXT
  5495. FOR count% = 0 TO 64 STEP16 : LINE 0,508-count%,2112,508-count% : NEXT
  5496. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5497. ENDIF
  5498. PROCclef(5,938,842,604,508,270,0,clefcombination$)
  5499. PROClongvalue(938,604,270,clefcombination$)
  5500. WHEN "222" :
  5501. IF staves$ = "y" THEN
  5502. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5503. FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
  5504. FOR count% = 0 TO 64 STEP16 : LINE 0,652-count%,2112,652-count% : NEXT
  5505. FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
  5506. FOR count% = 0 TO 64 STEP16 : LINE 0,366-count%,2112,366-count% : NEXT
  5507. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5508. ENDIF
  5509. PROCclef(6,938,842,652,556,366,270,clefcombination$)
  5510. PROClongvalue(938,652,366,clefcombination$)
  5511. WHEN "122" :
  5512. IF staves$ = "y" THEN
  5513. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5514. FOR count% = 0 TO 64 STEP16 : LINE 0,700-count%,2112,700-count% : NEXT
  5515. FOR count% = 0 TO 64 STEP16 : LINE 0,604-count%,2112,604-count% : NEXT
  5516. FOR count% = 0 TO 64 STEP16 : LINE 0,366-count%,2112,366-count% : NEXT
  5517. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5518. ENDIF
  5519. PROCclef(5,938,700,604,366,270,0,clefcombination$)
  5520. PROClongvalue(938,700,366,clefcombination$)
  5521. WHEN "212" :
  5522. IF staves$ = "y" THEN
  5523. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5524. FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
  5525. FOR count% = 0 TO 64 STEP16 : LINE 0,604-count%,2112,604-count% : NEXT
  5526. FOR count% = 0 TO 64 STEP16 : LINE 0,366-count%,2112,366-count% : NEXT
  5527. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5528. ENDIF
  5529. PROCclef(5,938,842,604,366,270,0,clefcombination$)
  5530. PROClongvalue(938,604,366,clefcombination$)
  5531. WHEN "1" :
  5532. IF staves$ = "y" THEN
  5533. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5534. ENDIF
  5535. PROCclef(1,938,0,0,0,0,0,clefcombination$)
  5536. PROClongvalue(938,0,0,clefcombination$)
  5537. WHEN "2" :
  5538. IF staves$ = "y" THEN
  5539. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5540. FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
  5541. ENDIF
  5542. PROCclef(2,938,842,0,0,0,0,clefcombination$)
  5543. PROClongvalue(938,0,0,clefcombination$)
  5544. WHEN "11" :
  5545. IF staves$ = "y" THEN
  5546. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5547. FOR count% = 0 TO 64 STEP16 : LINE 0,604-count%,2112,604-count% : NEXT
  5548. ENDIF
  5549. PROCclef(2,938,604,0,0,0,0,clefcombination$)
  5550. PROClongvalue(938,604,0,clefcombination$)
  5551. WHEN "12" :
  5552. IF staves$ = "y" THEN
  5553. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5554. FOR count% = 0 TO 64 STEP16 : LINE 0,652-count%,2112,652-count% : NEXT
  5555. FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
  5556. ENDIF
  5557. PROCclef(3,938,652,556,0,0,0,clefcombination$)
  5558. PROClongvalue(938,652,0,clefcombination$)
  5559. WHEN "21" :
  5560. IF staves$ = "y" THEN
  5561. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5562. FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
  5563. FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
  5564. ENDIF
  5565. PROCclef(3,938,842,556,0,0,0,clefcombination$)
  5566. PROClongvalue(938,556,0,clefcombination$)
  5567. WHEN "22" :
  5568. IF staves$ = "y" THEN
  5569. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5570. FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
  5571. FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
  5572. FOR count% = 0 TO 64 STEP16 : LINE 0,460-count%,2112,460-count% : NEXT
  5573. ENDIF
  5574. PROCclef(4,938,842,556,460,0,0,clefcombination$)
  5575. PROClongvalue(938,556,0,clefcombination$)
  5576. ENDCASE
  5577. :
  5578. REM time signature
  5579. beatstothebar% = (960/beatfactor%)/8
  5580. CASE beams% OF
  5581. WHEN 1 : whichvalue% = 1
  5582. WHEN 2 : whichvalue% = 2
  5583. WHEN 3 : whichvalue% = 4
  5584. WHEN 4 : whichvalue% = 8
  5585. WHEN 5 : whichvalue% = 16
  5586. WHEN 6 : whichvalue% = 32
  5587. ENDCASE
  5588. MOVE 15,1050
  5589. PRINT "meter"
  5590. MOVE 15,1030
  5591. PRINT" ";beatstothebar%;"/";whichvalue%
  5592. :
  5593. REM beats
  5594. IF beats$ = "y" THEN
  5595. IF notehead$ = "big" THEN add% = 26
  5596. IF notehead$ = "small" THEN add% = 34
  5597. IF notehead$ = "vsmall" THEN add% = 38
  5598. :
  5599. FOR br% = 0 TO (numbars%-1)
  5600. horpos% = (960*br%*factor)+add%+80
  5601. FOR bt% = 0 TO (factor%-1) STEP beatstep%
  5602. CIRCLE horpos%+(bt%*960/factor%*factor),longbeatsupper%,4:CIRCLE horpos%+(bt%*960/factor%*factor),longbeatslower%,4
  5603. NEXT
  5604. NEXT
  5605. ENDIF
  5606. ENDIF
  5607. :
  5608. IF longscore$ = "n" THEN number% = 2 ELSE number% = 1
  5609. FOR system% = 1 TO number%
  5610. :
  5611. FOR count% = startv% TO endv%
  5612. :
  5613. voice% = (displayvoices%(count%))-1
  5614. addingnotes$ = "n"
  5615. current% = 0 : lowernumber% = 0
  5616. IF system% = 1 THEN firstbar% = startbar%
  5617. IF system% = 2 THEN firstbar% = startbar%+(numbars%/2)
  5618. PROCnewnotereception(voice%,firstbar%,0,0,0,0,0,0,0)
  5619. CASE option% OF
  5620. WHEN 1 : startcell% = 0
  5621. WHEN 2 : startcell% = numusedcells%(voice%)
  5622. WHEN 3 : startcell% = 0
  5623. WHEN 4 : start% = firstbar%*10^3 : PROCsearch(start%)
  5624. ENDCASE
  5625. holdstartcell%(voice%) = startcell%
  5626. :
  5627. IF array%(startcell%,0,voice%)DIV10^6 > 0 THEN
  5628. :
  5629. howmany% = 0
  5630. REPEAT
  5631. howmany% += 1
  5632. :
  5633. carrybars% = (array%(startcell%,0,voice%)DIV10^6) - firstbar%
  5634. beat% = ((array%(startcell%,0,voice%)DIV10^3)MOD10^3)+(carrybars%*960)
  5635. hposn% = (beat%*factor)+50 : REM gives horiz co-ordinate
  5636. :
  5637. IF howmany% = 1 THEN firsttrack% = hposn%
  5638. :
  5639. IF longscore$ = "y" THEN hposn% += 40
  5640. :
  5641. octave% = (array%(startcell%,0,voice%)MOD10)
  5642. IF longscore$ = "n" THEN
  5643. IF octave% < 4 AND system% = 1 THEN value% = 586
  5644. IF octave% >= 4 AND system% = 1 THEN value% = 858
  5645. IF octave% < 4 AND system% = 2 THEN value% = 62
  5646. IF octave% >= 4 AND system% = 2 THEN value% = 334
  5647. IF octave% > 3 THEN octave% = octave%-4
  5648. ENDIF
  5649. :
  5650. ENDCASE
  5651. IF longscore$ = "y" THEN value% = value%(count%-startv%)
  5652. :
  5653. vposn% = value%+(((array%(startcell%,0,voice%)MOD10^3)DIV10^2)*8)+(octave%*56) : REM gives vert co-ordinate
  5654. :
  5655. REM notehead
  5656. IF redpitches$ = "y" THEN PROCredpitches
  5657. IF notehead$ = "big" THEN
  5658. LINE hposn%+12,vposn%+8,hposn%+26,vposn%+8
  5659. LINE hposn%+4,vposn%+4,hposn%+30,vposn%+4
  5660. LINE hposn%,vposn%,hposn%+32,vposn%
  5661. LINE hposn%+2,vposn%-4,hposn%+28,vposn%-4
  5662. LINE hposn%+6,vposn%-8,hposn%+20,vposn%-8
  5663. ENDIF
  5664. IF notehead$ = "small" THEN
  5665. LINE hposn%+24,vposn%+8,hposn%+28,vposn%+8
  5666. LINE hposn%+20,vposn%+4,hposn%+30,vposn%+4
  5667. LINE hposn%+16,vposn%,hposn%+32,vposn%
  5668. LINE hposn%+18,vposn%-4,hposn%+28,vposn%-4
  5669. LINE hposn%+20,vposn%-8,hposn%+24,vposn%-8
  5670. ENDIF
  5671. IF notehead$ = "vsmall" THEN
  5672. LINE hposn%+28,vposn%+8,hposn%+28,vposn%+8
  5673. LINE hposn%+27,vposn%+6,hposn%+29,vposn%+6
  5674. LINE hposn%+26,vposn%+4,hposn%+30,vposn%+4
  5675. LINE hposn%+25,vposn%+2,hposn%+31,vposn%+2
  5676. LINE hposn%+24,vposn%,hposn%+32,vposn%
  5677. LINE hposn%+25,vposn%-2,hposn%+31,vposn%-2
  5678. LINE hposn%+26,vposn%-4,hposn%+30,vposn%-4
  5679. LINE hposn%+27,vposn%-6,hposn%+29,vposn%-6
  5680. LINE hposn%+28,vposn%-8,hposn%+28,vposn%-8
  5681. ENDIF
  5682. IF printing$ = "n" THEN GCOL 0
  5683. :
  5684. REM beatnumbers
  5685. IF beatnumbers$ = "y" OR (beatnumbers$ = "first" AND howmany% = 1) THEN
  5686. PROCnotenumbersep
  5687. IF longscore$ = "y" THEN
  5688. MOVE hposn%-100,actamppos%(voice%+1)-beatsheight%-lower%-lowernumber%
  5689. PROCbeatnumbers
  5690. ELSE MOVE hposn%-100,674+shortamppos%(voice%)-((system%-1)*524)-beatsheight%+40-lower%
  5691. PROCbeatnumbers
  5692. ENDIF
  5693. ENDIF
  5694. :
  5695. REM notenumbers
  5696. IF notenumbers$ = "y" THEN
  5697. PROCnotenumbersep
  5698. IF longscore$ = "y" THEN
  5699. MOVE hposn%-100,actamppos%(voice%+1)-numbersheight%-lowernumber%
  5700. PRINT startcell%+1
  5701. ELSE MOVE hposn%-100,(674+shortamppos%(voice%)-((system%-1)*524))-numbersheight%+40
  5702. PRINT startcell%+1
  5703. ENDIF
  5704. ENDIF
  5705. :
  5706. IF notenumbers$ = "last" THEN
  5707. IF (array%(startcell%+1,0,voice%) DIV10^6) >= (numbars%+firstbar%) OR array%(startcell%+1,0,voice%) = 0 THEN print$ = "y" ELSE print$ = "n"
  5708. IF print$ = "y" THEN
  5709. MOVE hposn%-100,actamppos%(voice%+1)-numbersheight%
  5710. PRINT startcell%+1
  5711. ENDIF
  5712. ENDIF
  5713. :
  5714. IF notenumbers$ = "from1" THEN
  5715. PROCnotenumberfreq
  5716. PROCnotenumbersep
  5717. IF printnumber$ = "y" THEN
  5718. IF longscore$ = "y" THEN
  5719. MOVE hposn%-100,actamppos%(voice%+1)-numbersheight%-lowernumber%
  5720. PRINT howmany%
  5721. ELSE MOVE hposn%-100,(674+shortamppos%(voice%)-((system%-1)*524))-numbersheight%+40
  5722. PRINT howmany%
  5723. ENDIF
  5724. ENDIF
  5725. ENDIF
  5726. :
  5727. REM intervals
  5728. IF displayintervals$ = "y" THEN
  5729. pitch% = array%(startcell%,0,voice%)MOD10^3
  5730. CASE typeintervals$ OF
  5731. WHEN "s" : PROCconvertpitch
  5732. WHEN "q" : PROCconvertquarter
  5733. WHEN "e" : PROCconverteighth
  5734. WHEN "c" : cent% = (array%(startcell%,2,voice%)MOD10^2)-50 : PROCconvertcent
  5735. OTHERWISE
  5736. ENDCASE
  5737. currentpitch% = note%
  5738. FOR cout% = 1 TO numintervals%
  5739. IF (startcell%-cout%) >= 0 THEN
  5740. pitch% = array%((startcell%-cout%),0,voice%)MOD10^3
  5741. CASE typeintervals$ OF
  5742. WHEN "s" : PROCconvertpitch
  5743. WHEN "q" : PROCconvertquarter
  5744. WHEN "e" : PROCconverteighth
  5745. WHEN "c" : cent% = (array%((startcell%-cout%),2,voice%)MOD10^2)-50 : PROCconvertcent
  5746. OTHERWISE
  5747. ENDCASE
  5748. comparepitch% = note%
  5749. IF currentpitch% >= comparepitch% THEN
  5750. interval% = currentpitch% - comparepitch%
  5751. ELSE interval% = comparepitch% - currentpitch%
  5752. ENDIF
  5753. REPEAT : IF interval% > compoundint% THEN interval% -= chunk% : UNTIL interval% <= compoundint%
  5754. IF longscore$ = "y" THEN
  5755. MOVE hposn%-125,actamppos%(voice%+1)-(intheight%+(40*(cout%-1)))
  5756. PRINT interval%
  5757. ELSE MOVE hposn%-125,(674+shortamppos%(voice%)-((system%-1)*524))-(intheight%+(40*(cout%-1))-40)
  5758. PRINT interval%
  5759. ENDIF
  5760. ENDIF
  5761. NEXT
  5762. ENDIF
  5763. :
  5764. REM note names
  5765. IF notenames$ = "y" THEN
  5766. whichnote% = (array%(startcell%,0,voice%)MOD10^3)DIV10^2
  5767. CASE whichnote% OF
  5768. WHEN 0 : name$ = "C"
  5769. WHEN 1 : name$ = "D"
  5770. WHEN 2 : name$ = "E"
  5771. WHEN 3 : name$ = "F"
  5772. WHEN 4 : name$ = "G"
  5773. WHEN 5 : name$ = "A"
  5774. WHEN 6 : name$ = "B"
  5775. OTHERWISE
  5776. ENDCASE
  5777. MOVE hposn%+10,actamppos%(voice%+1)-(numbersheight%+32)
  5778. PRINT name$;array%(startcell%,0,voice%)MOD10
  5779. ENDIF
  5780. :
  5781. REM durations/glissandos
  5782. IF durations$ = "y" THEN
  5783. dur% = (array%(startcell%,1,voice%)DIV10)MOD10^3
  5784. brrr% = array%(startcell%,0,voice%)DIV10^6 : PROCreconvertdur
  5785. IF notehead$ = "big" THEN pointplus% = 16
  5786. IF notehead$ = "small" THEN pointplus% = 24
  5787. IF notehead$ = "vsmall" THEN pointplus% = 28
  5788. point% = (dur%*factor)+hposn%+pointplus%
  5789. thirdphase$ = "n"
  5790. :
  5791. number% = array%(startcell%,2,voice%)DIV10^5
  5792. IF number% = 0 THEN numphases% = 1
  5793. IF number% > 0 AND number% < 100 THEN numphases% = 2
  5794. IF number% > 99 THEN numphases% = 3
  5795. :
  5796. CASE numphases% OF
  5797. :
  5798. WHEN 1 :
  5799. gl% = (array%(startcell%,1,voice%)DIV10^4)MOD10^2
  5800. IF gl% <> 50 THEN
  5801. PROCroundgliss
  5802. LINE hposn%+40,vposn%+4,point%,vposn%+4+gl%
  5803. hp% = ((point%-hposn%)/2)+hposn%
  5804. vp% = vposn%+44+(gl%/2)
  5805. MOVE hp%,vp% : PRINT "gl.";gl1%
  5806. ELSE
  5807. LINE hposn%+40,vposn%+4,point%,vposn%+4
  5808. ENDIF
  5809. :
  5810. WHEN 2 :
  5811. REM extra horizontal point in middle
  5812. ph1% = number% MOD 10^2
  5813. point1% = ((dur%*ph1%/100)*factor)+hposn%+pointplus%
  5814. :
  5815. REM first phase
  5816. gl% = (array%(startcell%,1,voice%)DIV10^4)MOD10^2
  5817. IF gl% <> 50 THEN
  5818. PROCroundgliss
  5819. LINE hposn%+40,vposn%+4,point1%,vposn%+4+gl%
  5820. hp% = ((point1%-hposn%)/2)+hposn%
  5821. vp% = vposn%+44+(gl%/2)
  5822. MOVE hp%,vp% : PRINT "gl.";gl1%
  5823. ELSE
  5824. gl% = 0
  5825. LINE hposn%+40,vposn%+4,point1%,vposn%+4
  5826. ENDIF
  5827. IF envelopedata$ <> "none" THEN
  5828. hp% = point1%-130
  5829. vp% = vposn%-10
  5830. MOVE hp%,vp%
  5831. CASE envelopedata$ OF
  5832. WHEN "percentage" :PRINT ph1%;"%"
  5833. WHEN "marker" : PRINT hp%
  5834. ENDCASE
  5835. ENDIF
  5836. :
  5837. REM second phase
  5838. vposn1% = vposn%+gl%
  5839. gl% = (array%(startcell%,1,voice%)DIV10^6)MOD10^2
  5840. IF gl% <> 50 THEN
  5841. PROCroundgliss
  5842. LINE point1%,vposn1%+4,point%,vposn1%+4+gl%
  5843. hp% = ((point%-point1%)/2)+point1%
  5844. vp% = vposn1%+44+(gl%/2)
  5845. MOVE hp%,vp% : PRINT "gl.";gl1%
  5846. ELSE
  5847. LINE point1%,vposn1%+4,point%,vposn1%+4
  5848. ENDIF
  5849. :
  5850. WHEN 3 :
  5851. REM two extra horizontal points in middle
  5852. ph1% = number% MOD 10^2
  5853. point1% = ((dur%*ph1%/100)*factor)+hposn%+pointplus%
  5854. ph2% = number% DIV 10^2
  5855. point2% = ((dur%*ph2%/100)*factor)+hposn%+pointplus%
  5856. :
  5857. REM first phase
  5858. gl% = (array%(startcell%,1,voice%)DIV10^4)MOD10^2
  5859. IF gl% <> 50 THEN
  5860. PROCroundgliss
  5861. LINE hposn%+40,vposn%+4,point1%,vposn%+4+gl%
  5862. hp% = ((point1%-hposn%)/2)+hposn%
  5863. vp% = vposn%+44+(gl%/2)
  5864. MOVE hp%,vp% : PRINT "gl.";gl1%
  5865. ELSE
  5866. gl% = 0
  5867. LINE hposn%+40,vposn%+4,point1%,vposn%+4
  5868. ENDIF
  5869. IF envelopedata$ <> "none" THEN
  5870. hp% = point1%-130
  5871. vp% = vposn%-10
  5872. MOVE hp%,vp%
  5873. CASE envelopedata$ OF
  5874. WHEN "percentage" :PRINT ph1%;"%"
  5875. WHEN "marker" : PRINT hp%
  5876. ENDCASE
  5877. ENDIF
  5878. :
  5879. REM second phase
  5880. vposn1% = vposn%+gl%
  5881. gl% = (array%(startcell%,1,voice%)DIV10^6)MOD10^2
  5882. IF gl% <> 50 THEN
  5883. PROCroundgliss
  5884. LINE point1%,vposn1%+4,point2%,vposn1%+4+gl%
  5885. hp% = ((point2%-point1%)/2)+point1%
  5886. vp% = vposn1%+44+(gl%/2)
  5887. MOVE hp%,vp% : PRINT "gl.";gl1%
  5888. ELSE
  5889. gl% = 0
  5890. LINE point1%,vposn1%+4,point2%,vposn1%+4
  5891. ENDIF
  5892. IF envelopedata$ <> "none" THEN
  5893. hp% = point2%-130
  5894. vp% = vposn%-10
  5895. MOVE hp%,vp%
  5896. CASE envelopedata$ OF
  5897. WHEN "percentage" :PRINT ph2%;"%"
  5898. WHEN "marker" : PRINT hp%
  5899. ENDCASE
  5900. ENDIF
  5901. :
  5902. REM third phase
  5903. vposn2% = vposn1%+gl%
  5904. gl% = array%(startcell%,1,voice%)DIV10^8
  5905. IF gl% <> 10 THEN
  5906. thirdphase$ = "y" : PROCroundgliss : thirdphase$ = "n"
  5907. LINE point2%,vposn2%+4,point%,vposn2%+4+gl%
  5908. hp% = ((point%-point2%)/2)+point2%
  5909. vp% = vposn2%+44+(gl%/2)
  5910. MOVE hp%,vp% : PRINT "gl.";gl1%
  5911. ELSE
  5912. LINE point2%,vposn2%+4,point%,vposn2%+4
  5913. ENDIF
  5914. :
  5915. ENDCASE
  5916. :
  5917. ENDIF
  5918. :
  5919. REM next block of code added just to print durations
  5920. IF seedurinbts$ = "y" OR seedurinbts$ = "stepped" THEN
  5921. IF seedurinbts$ = "stepped" THEN
  5922. IF lower% = 0 THEN lower% = 23 ELSE lower% = 0
  5923. ENDIF
  5924. IF longscore$ = "y" THEN
  5925. MOVE hposn%,actamppos%(voice%+1)-lower%
  5926. PRINT dur%
  5927. ELSE MOVE hposn%,714+shortamppos%(voice%)-((system%-1)*524)-lower%
  5928. PRINT dur%
  5929. ENDIF
  5930. ENDIF
  5931. IF seedurincrots$ = "y" OR seedurincrots$ = "stepped" THEN
  5932. REM dur = (((dur%/480)*100)DIV1)/100
  5933. dur = (((dur%/(beatfactor%*8))*100)DIV1)/100
  5934. IF seedurincrots$ = "stepped" THEN
  5935. IF lower% = 0 THEN lower% = 23 ELSE lower% = 0
  5936. ENDIF
  5937. IF longscore$ = "y" THEN
  5938. MOVE hposn%,actamppos%(voice%+1)-lower%
  5939. PRINT dur
  5940. ELSE MOVE hposn%,714+shortamppos%(voice%)-((system%-1)*524)-lower%
  5941. PRINT dur
  5942. ENDIF
  5943. ENDIF
  5944. :
  5945. REM amplitudes
  5946. :
  5947. IF amplitudes$ = "y" OR amplitudes$ = "stepped" THEN
  5948. amp$=""
  5949. amp1% = array%(startcell%,1,voice%)MOD10
  5950. amp2% = (array%(startcell%,2,voice%)DIV10^2)MOD10
  5951. amp3% = (array%(startcell%,2,voice%)DIV10^3)MOD10
  5952. amp4% = (array%(startcell%,2,voice%)DIV10^4)MOD10
  5953. FOR something% = 1 TO 4
  5954. IF something% = 1 THEN amp% = amp1%
  5955. IF something% = 2 THEN amp% = amp2%
  5956. IF something% = 3 THEN amp% = amp3%
  5957. IF something% = 4 THEN amp% = amp4%
  5958. CASE amp% OF
  5959. WHEN 0 :
  5960. IF amp1% = 0 AND amp2% = 9 THEN
  5961. amp$ = "" : x% = 22 : y% = 20 : REM releases
  5962. ELSE
  5963. amp$ = "0" : x% = 22 : y% = 20
  5964. ENDIF
  5965. WHEN 1 : amp$ = "ppp" : x% = 8 : y% = 50
  5966. WHEN 2 : amp$ = "pp" : x% = 15 : y% = 35
  5967. WHEN 3 : amp$ = "p" : x% = 22 : y% = 20
  5968. WHEN 4 : amp$ = "mp" : x% = 15 : y% = 35
  5969. WHEN 5 : amp$ = "mf" : x% = 15 : y% = 35
  5970. WHEN 6 : amp$ = "f" : x% = 22 : y% = 20
  5971. WHEN 7 : amp$ = "ff" : x% = 15 : y% = 35
  5972. WHEN 8 : amp$ = "fff" : x% = 8 : y% = 50
  5973. ENDCASE
  5974. IF something% = 1 THEN amp1$ = amp$ : x1% = x% : y1% = y%
  5975. IF something% = 2 THEN amp2$ = amp$ : x2% = x% : y2% = y%
  5976. IF something% = 3 THEN amp3$ = amp$ : x3% = x% : y3% = y%
  5977. IF something% = 4 THEN amp4$ = amp$ : x4% = x% : y4% = y%
  5978. NEXT
  5979. :
  5980. IF amplitudes$ = "stepped" THEN
  5981. IF lower% = 0 THEN lower% = 23 ELSE lower% = 0
  5982. ENDIF
  5983. :
  5984. IF longscore$ = "y" THEN
  5985. MOVE hposn%+x1%,actamppos%(voice%+1)-lower%
  5986. PRINT amp1$
  5987. :
  5988. IF amp2% = 9 AND amp3% <> 0 THEN
  5989. MOVE hposn%+20,(actamppos%(voice%+1)-lower%)-20
  5990. PRINT "+";amp3%
  5991. ENDIF
  5992. :
  5993. ELSE MOVE hposn%+x1%,714+shortamppos%(voice%)-((system%-1)*524)-lower%
  5994. PRINT amp1$
  5995. ENDIF
  5996. :
  5997. dur% = (array%(startcell%,1,voice%)DIV10)MOD10^3
  5998. brrr% = array%(startcell%,0,voice%)DIV10^6 : PROCreconvertdur
  5999. IF notehead$ = "big" THEN pointplus% = 16
  6000. IF notehead$ = "small" THEN pointplus% = 24
  6001. IF notehead$ = "vsmall" THEN pointplus% = 28
  6002. point% = (dur%*factor)+hposn%+pointplus%
  6003. :
  6004. number% = array%(startcell%,2,voice%)DIV10^5
  6005. IF amp2% = 9 THEN numphases% = 0
  6006. IF amp2% <> 9 AND number% = 0 THEN numphases% = 1
  6007. IF number% > 0 AND number% < 100 THEN numphases% = 2
  6008. IF number% > 99 THEN numphases% = 3
  6009. :
  6010. CASE numphases% OF
  6011. :
  6012. WHEN 1 :
  6013. IF amp2% < amp1% THEN
  6014. IF longscore$ = "y" THEN
  6015. LINE hposn%+x1%+y1%,actamppos%(voice%+1)+8,point%-90+(x2%*2),actamppos%(voice%+1)-8
  6016. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-24,point%-90+(x2%*2),actamppos%(voice%+1)-8
  6017. MOVE point%-80+(x2%*2),actamppos%(voice%+1) : PRINT amp2$
  6018. ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)+8,point%-90+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
  6019. LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-24,point%-90+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
  6020. MOVE point%-80+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
  6021. ENDIF
  6022. ENDIF
  6023. IF amp2% > amp1% THEN
  6024. IF longscore$ = "y" THEN
  6025. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point%-90+(x2%*2),actamppos%(voice%+1)+8
  6026. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point%-90+(x2%*2),actamppos%(voice%+1)-24
  6027. MOVE point%-80+(x2%*2),actamppos%(voice%+1) : PRINT amp2$
  6028. ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524)+8
  6029. LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524)-24
  6030. MOVE point%-80+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
  6031. ENDIF
  6032. ENDIF
  6033. :
  6034. WHEN 2 :
  6035. ph1% = number% MOD 10^2
  6036. point1% = ((dur%*ph1%/100)*factor)+hposn%+pointplus%
  6037. :
  6038. REM first phase
  6039. IF amp2% < amp1% THEN
  6040. IF longscore$ = "y" THEN
  6041. LINE hposn%+x1%+y1%,actamppos%(voice%+1)+8,point1%-35+x2%,actamppos%(voice%+1)-8
  6042. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-24,point1%-35+x2%,actamppos%(voice%+1)-8
  6043. MOVE point1%-25+x2%,actamppos%(voice%+1) : PRINT amp2$
  6044. ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)+8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-8
  6045. LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-24,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-8
  6046. MOVE point1%-25+x2%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
  6047. ENDIF
  6048. ENDIF
  6049. IF amp2% > amp1% THEN
  6050. IF longscore$ = "y" THEN
  6051. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point1%-35+x2%,actamppos%(voice%+1)+8
  6052. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point1%-35+x2%,actamppos%(voice%+1)-24
  6053. MOVE point1%-25+x2%,actamppos%(voice%+1) : PRINT amp2$
  6054. ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)+8
  6055. LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-24
  6056. MOVE point1%-25+x2%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
  6057. ENDIF
  6058. ENDIF
  6059. :
  6060. REM second phase
  6061. IF amp1% <> amp2% THEN start% = point1%-25+x2%+y2% ELSE start% = point1%
  6062. IF amp3% < amp2% THEN
  6063. IF longscore$ = "y" THEN
  6064. LINE start%,actamppos%(voice%+1)+8,point%-90+(x3%*2),actamppos%(voice%+1)-8
  6065. LINE start%,actamppos%(voice%+1)-24,point%-90+(x3%*2),actamppos%(voice%+1)-8
  6066. MOVE point%-80+(x3%*2),actamppos%(voice%+1) : PRINT amp3$
  6067. ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)+8,point%-90+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
  6068. LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-24,point%-90+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
  6069. MOVE point%-80+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp3$
  6070. ENDIF
  6071. ENDIF
  6072. IF amp3% > amp2% THEN
  6073. IF longscore$ = "y" THEN
  6074. LINE start%,actamppos%(voice%+1)-8,point%-90+(x3%*2),actamppos%(voice%+1)+8
  6075. LINE start%,actamppos%(voice%+1)-8,point%-90+(x3%*2),actamppos%(voice%+1)-24
  6076. MOVE point%-80+(x3%*2),actamppos%(voice%+1) : PRINT amp3$
  6077. ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524)+8
  6078. LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524)-24
  6079. MOVE point%-80+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp3$
  6080. ENDIF
  6081. ENDIF
  6082. :
  6083. WHEN 3 :
  6084. ph1% = number% MOD 10^2
  6085. point1% = ((dur%*ph1%/100)*factor)+hposn%+pointplus%
  6086. ph2% = number% DIV 10^2
  6087. point2% = ((dur%*ph2%/100)*factor)+hposn%+pointplus%
  6088. :
  6089. REM first phase
  6090. IF amp2% < amp1% THEN
  6091. IF longscore$ = "y" THEN
  6092. LINE hposn%+x1%+y1%,actamppos%(voice%+1)+8,point1%-35+x2%,actamppos%(voice%+1)-8
  6093. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-24,point1%-35+x2%,actamppos%(voice%+1)-8
  6094. MOVE point1%-25+x2%,actamppos%(voice%+1) : PRINT amp2$
  6095. ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)+8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-8
  6096. LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-24,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-8
  6097. MOVE point1%-25+x2%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
  6098. ENDIF
  6099. ENDIF
  6100. IF amp2% > amp1% THEN
  6101. IF longscore$ = "y" THEN
  6102. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point1%-35+x2%,actamppos%(voice%+1)+8
  6103. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point1%-35+x2%,actamppos%(voice%+1)-24
  6104. MOVE point1%-25+x2%,actamppos%(voice%+1) : PRINT amp2$
  6105. ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)+8
  6106. LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-24
  6107. MOVE point1%-25+x2%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
  6108. ENDIF
  6109. ENDIF
  6110. :
  6111. REM second phase
  6112. IF amp1% <> amp2% THEN start% = point1%-25+x2%+y2% ELSE start% = point1%
  6113. IF amp3% < amp2% THEN
  6114. IF longscore$ = "y" THEN
  6115. LINE start%,actamppos%(voice%+1)+8,point2%-35+x3%,actamppos%(voice%+1)-8
  6116. LINE start%,actamppos%(voice%+1)-24,point2%-35+x3%,actamppos%(voice%+1)-8
  6117. MOVE point2%-25+x3%,actamppos%(voice%+1) : PRINT amp3$
  6118. ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)+8,point2%-35+x3%,714+shortamppos%(voice%)-((system%-1)*524)-8
  6119. LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-24,point2%-35+x3%,714+shortamppos%(voice%)-((system%-1)*524)-8
  6120. MOVE point2%-25+x3%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp3$
  6121. ENDIF
  6122. ENDIF
  6123. IF amp3% > amp2% THEN
  6124. IF longscore$ = "y" THEN
  6125. LINE start%,actamppos%(voice%+1)-8,point2%-35+x3%,actamppos%(voice%+1)+8
  6126. LINE start%,actamppos%(voice%+1)-8,point2%-35+x3%,actamppos%(voice%+1)-24
  6127. MOVE point2%-25+x3%,actamppos%(voice%+1) : PRINT amp3$
  6128. ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point2%-35+x3%,714+shortamppos%(voice%)-((system%-1)*524)+8
  6129. LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point2%-35+x3%,714+shortamppos%(voice%)-((system%-1)*524)-24
  6130. MOVE point2%-25+x3%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp3$
  6131. ENDIF
  6132. ENDIF
  6133. :
  6134. REM third phase
  6135. IF amp2% <> amp3% THEN start% = point2%-25+x3%+y3% ELSE start% = point2%
  6136. IF amp4% < amp3% THEN
  6137. IF longscore$ = "y" THEN
  6138. LINE start%,actamppos%(voice%+1)+8,point%-90+(x4%*2),actamppos%(voice%+1)-8
  6139. LINE start%,actamppos%(voice%+1)-24,point%-90+(x4%*2),actamppos%(voice%+1)-8
  6140. MOVE point%-80+(x4%*2),actamppos%(voice%+1) : PRINT amp4$
  6141. ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)+8,point%-90+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
  6142. LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-24,point%-90+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
  6143. MOVE point%-80+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp4$
  6144. ENDIF
  6145. ENDIF
  6146. IF amp4% > amp3% THEN
  6147. IF longscore$ = "y" THEN
  6148. LINE start%,actamppos%(voice%+1)-8,point%-90+(x4%*2),actamppos%(voice%+1)+8
  6149. LINE start%,actamppos%(voice%+1)-8,point%-90+(x4%*2),actamppos%(voice%+1)-24
  6150. MOVE point%-80+(x4%*2),actamppos%(voice%+1) : PRINT amp4$
  6151. ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524)+8
  6152. LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524)-24
  6153. MOVE point%-80+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp4$
  6154. ENDIF
  6155. ENDIF
  6156. :
  6157. ENDCASE
  6158. :
  6159. ENDIF
  6160. :
  6161. :
  6162. REM ledger lines
  6163. IF staves$ = "y" THEN
  6164. IF notehead$ = "big" THEN
  6165. lend% = -12 : rend% = 44
  6166. ENDIF
  6167. IF notehead$ = "small" THEN
  6168. lend% = 8 : rend% = 40
  6169. ENDIF
  6170. IF notehead$ = "vsmall" THEN
  6171. lend% = 18 : rend% = 38
  6172. ENDIF
  6173. :
  6174. IF longscore$ = "n" THEN
  6175. IF value% = 858 THEN
  6176. IF vposn% >= 954 THEN
  6177. numledgers% = (vposn%-938)/16
  6178. FOR ct% = 1 TO numledgers%
  6179. LINE hposn%+lend%,954+((ct%-1)*16),hposn%+rend%,954+((ct%-1)*16)
  6180. NEXT
  6181. ENDIF
  6182. IF vposn% = 858 THEN LINE hposn%+lend%,858,hposn%+rend%,858
  6183. ENDIF
  6184. IF value% = 586 THEN
  6185. IF vposn% <= 714 THEN
  6186. numledgers% = (730-vposn%)/16
  6187. FOR ct% = 1 TO numledgers%
  6188. LINE hposn%+lend%,714-((ct%-1)*16),hposn%+rend%,714-((ct%-1)*16)
  6189. NEXT
  6190. ENDIF
  6191. ENDIF
  6192. IF value% = 334 THEN
  6193. IF vposn% >= 430 THEN
  6194. numledgers% = (vposn%-414)/16
  6195. FOR ct% = 1 TO numledgers%
  6196. LINE hposn%+lend%,430+((ct%-1)*16),hposn%+rend%,430+((ct%-1)*16)
  6197. NEXT
  6198. ENDIF
  6199. IF vposn% = 334 THEN LINE hposn%+lend%,334,hposn%+rend%,334
  6200. ENDIF
  6201. IF value% = 62 THEN
  6202. IF vposn% <= 190 THEN
  6203. numledgers% = (206-vposn%)/16
  6204. FOR ct% = 1 TO numledgers%
  6205. LINE hposn%+lend%,190-((ct%-1)*16),hposn%+rend%,190-((ct%-1)*16)
  6206. NEXT
  6207. ENDIF
  6208. ENDIF
  6209. ENDIF
  6210. :
  6211. IF longscore$ = "y" THEN
  6212. CASE MID$(clefcombination$,ledgerkey%,1) OF
  6213. WHEN "T" : num% = 320
  6214. WHEN "P" : num% = 376
  6215. WHEN "B" : num% = 224
  6216. WHEN "D" : num% = 168
  6217. ENDCASE
  6218. IF vposn% - value% >= num% THEN
  6219. numledgers% = ((vposn%-value%)-(num%-16))/16
  6220. FOR ct% = 1 TO numledgers%
  6221. LINE hposn% + lend%,value%+(num%-16)+(16*ct%),hposn%+rend%,value%+(num%-16)+(16*ct%)
  6222. NEXT
  6223. ENDIF
  6224. IF vposn%-value% <= (num%-96) THEN
  6225. numledgers% = ((num%-80)-(vposn%-value%))/16
  6226. FOR ct% = 1 TO numledgers%
  6227. LINE hposn%+lend%,(value%+(num%-80))-(16*ct%),hposn%+rend%,(value%+(num%-80))-(16*ct%)
  6228. NEXT
  6229. ENDIF
  6230. ENDIF
  6231. :
  6232. ENDIF : REM applies to 'IF staves$ = "y" '
  6233. :
  6234. REM stems
  6235. IF stems$ = "y" THEN
  6236. IF longscore$ = "n" THEN
  6237. IF notehead$ = "big" THEN
  6238. LINE hposn%+30,vposn%,hposn%+30,938+shortbeamposn%(voice%)-(524*(system%-1))
  6239. ENDIF
  6240. LINE hposn%+32,vposn%,hposn%+32,938+shortbeamposn%(voice%)-(524*(system%-1))
  6241. ENDIF
  6242. :
  6243. IF longscore$ = "y" THEN
  6244. IF notehead$ = "big" THEN
  6245. LINE hposn%+30,vposn%,hposn%+30,actbeamposn%(count%-startv%)
  6246. ENDIF
  6247. LINE hposn%+32,vposn%,hposn%+32,actbeamposn%(count%-startv%)
  6248. ENDIF
  6249. ENDIF
  6250. :
  6251. REM accidentals
  6252. IF accidentals$ = "y" THEN
  6253. acc% = (array%(startcell%,0,voice%)MOD100)DIV10
  6254. IF notehead$ = "big" THEN
  6255. CASE acc% OF
  6256. WHEN 9 : REM sharp
  6257. LINE hposn%-30,vposn%-24,hposn%-30,vposn%+24
  6258. LINE hposn%-28,vposn%-24,hposn%-28,vposn%+24
  6259. LINE hposn%-16,vposn%-24,hposn%-16,vposn%+24
  6260. LINE hposn%-14,vposn%-24,hposn%-14,vposn%+24
  6261. LINE hposn%-36,vposn%+4,hposn%-8,vposn%+12
  6262. LINE hposn%-36,vposn%-12,hposn%-8,vposn%-4
  6263. WHEN 8 : REM 3/8 sharp
  6264. LINE hposn%-30,vposn%-24,hposn%-30,vposn%+24
  6265. LINE hposn%-28,vposn%-24,hposn%-28,vposn%+24
  6266. LINE hposn%-16,vposn%-24,hposn%-16,vposn%+24
  6267. LINE hposn%-14,vposn%-24,hposn%-14,vposn%+24
  6268. LINE hposn%-36,vposn%+4,hposn%-8,vposn%+12
  6269. LINE hposn%-36,vposn%-12,hposn%-8,vposn%-4
  6270. LINE hposn%-20,vposn%-20,hposn%-16,vposn%-28
  6271. LINE hposn%-14,vposn%-28,hposn%-10,vposn%-20
  6272. LINE hposn%-18,vposn%-20,hposn%-16,vposn%-28
  6273. LINE hposn%-14,vposn%-28,hposn%-12,vposn%-20
  6274. WHEN 1 : REM flat
  6275. LINE hposn%-28,vposn%-12,hposn%-28,vposn%+28
  6276. LINE hposn%-26,vposn%-12,hposn%-26,vposn%+28
  6277. LINE hposn%-20,vposn%+8,hposn%-10,vposn%+8
  6278. LINE hposn%-24,vposn%+4,hposn%-22,vposn%+4
  6279. LINE hposn%-12,vposn%+4,hposn%-8,vposn%+4
  6280. LINE hposn%-28,vposn%,hposn%-26,vposn%
  6281. LINE hposn%-12,vposn%,hposn%-8,vposn%
  6282. LINE hposn%-16,vposn%-4,hposn%-12,vposn%-4
  6283. LINE hposn%-28,vposn%-8,hposn%-18,vposn%-8
  6284. WHEN 2 : REM 3/8 flat
  6285. LINE hposn%-28,vposn%-12,hposn%-28,vposn%+28
  6286. LINE hposn%-26,vposn%-12,hposn%-26,vposn%+28
  6287. LINE hposn%-20,vposn%+8,hposn%-10,vposn%+8
  6288. LINE hposn%-24,vposn%+4,hposn%-22,vposn%+4
  6289. LINE hposn%-12,vposn%+4,hposn%-8,vposn%+4
  6290. LINE hposn%-28,vposn%,hposn%-26,vposn%
  6291. LINE hposn%-12,vposn%,hposn%-8,vposn%
  6292. LINE hposn%-16,vposn%-4,hposn%-12,vposn%-4
  6293. LINE hposn%-28,vposn%-8,hposn%-18,vposn%-8
  6294. LINE hposn%-32,vposn%+20,hposn%-28,vposn%+28
  6295. LINE hposn%-26,vposn%+28,hposn%-22,vposn%+20
  6296. LINE hposn%-30,vposn%+20,hposn%-28,vposn%+28
  6297. LINE hposn%-26,vposn%+28,hposn%-24,vposn%+20
  6298. WHEN 7 : REM quartersharp
  6299. LINE hposn%-18,vposn%+24,hposn%-18,vposn%-24
  6300. LINE hposn%-16,vposn%+24,hposn%-16,vposn%-24
  6301. LINE hposn%-26,vposn%+4,hposn%-8,vposn%+12
  6302. LINE hposn%-26,vposn%-12,hposn%-8,vposn%-4
  6303. WHEN 3 : REM quarterflat
  6304. LINE hposn%-12,vposn%-12,hposn%-12,vposn%+28
  6305. LINE hposn%-10,vposn%-12,hposn%-10,vposn%+28
  6306. LINE hposn%-28,vposn%+8,hposn%-18,vposn%+8
  6307. LINE hposn%-30,vposn%+4,hposn%-26,vposn%+4
  6308. LINE hposn%-16,vposn%+4,hposn%-14,vposn%+4
  6309. LINE hposn%-30,vposn%,hposn%-26,vposn%
  6310. LINE hposn%-26,vposn%-4,hposn%-22,vposn%-4
  6311. LINE hposn%-20,vposn%-8,hposn%-10,vposn%-8
  6312. WHEN 5 : REM natural
  6313. LINE hposn%-30,vposn%+24,hposn%-30,vposn%-8
  6314. LINE hposn%-28,vposn%+24,hposn%-28,vposn%-8
  6315. LINE hposn%-12,vposn%+8,hposn%-12,vposn%-24
  6316. LINE hposn%-10,vposn%+8,hposn%-10,vposn%-24
  6317. LINE hposn%-30,vposn%+4,hposn%-24,vposn%+4
  6318. LINE hposn%-22,vposn%+8,hposn%-18,vposn%+8
  6319. LINE hposn%-16,vposn%+12,hposn%-10,vposn%+12
  6320. LINE hposn%-30,vposn%-12,hposn%-24,vposn%-12
  6321. LINE hposn%-22,vposn%-8,hposn%-18,vposn%-8
  6322. LINE hposn%-16,vposn%-4,hposn%-10,vposn%-4
  6323. WHEN 4 : REM 1/8 flat
  6324. LINE hposn%-30,vposn%+24,hposn%-30,vposn%-8
  6325. LINE hposn%-28,vposn%+24,hposn%-28,vposn%-8
  6326. LINE hposn%-12,vposn%+8,hposn%-12,vposn%-24
  6327. LINE hposn%-10,vposn%+8,hposn%-10,vposn%-24
  6328. LINE hposn%-30,vposn%+4,hposn%-24,vposn%+4
  6329. LINE hposn%-22,vposn%+8,hposn%-18,vposn%+8
  6330. LINE hposn%-16,vposn%+12,hposn%-10,vposn%+12
  6331. LINE hposn%-30,vposn%-12,hposn%-24,vposn%-12
  6332. LINE hposn%-22,vposn%-8,hposn%-18,vposn%-8
  6333. LINE hposn%-16,vposn%-4,hposn%-10,vposn%-4
  6334. LINE hposn%-16,vposn%-20,hposn%-12,vposn%-28
  6335. LINE hposn%-10,vposn%-28,hposn%-6,vposn%-20
  6336. LINE hposn%-14,vposn%-20,hposn%-12,vposn%-28
  6337. LINE hposn%-10,vposn%-28,hposn%-8,vposn%-20
  6338. WHEN 6 : REM 1/8 sharp
  6339. LINE hposn%-30,vposn%+24,hposn%-30,vposn%-8
  6340. LINE hposn%-28,vposn%+24,hposn%-28,vposn%-8
  6341. LINE hposn%-12,vposn%+8,hposn%-12,vposn%-24
  6342. LINE hposn%-10,vposn%+8,hposn%-10,vposn%-24
  6343. LINE hposn%-30,vposn%+4,hposn%-24,vposn%+4
  6344. LINE hposn%-22,vposn%+8,hposn%-18,vposn%+8
  6345. LINE hposn%-16,vposn%+12,hposn%-10,vposn%+12
  6346. LINE hposn%-30,vposn%-12,hposn%-24,vposn%-12
  6347. LINE hposn%-22,vposn%-8,hposn%-18,vposn%-8
  6348. LINE hposn%-16,vposn%-4,hposn%-10,vposn%-4
  6349. LINE hposn%-34,vposn%+20,hposn%-30,vposn%+28
  6350. LINE hposn%-32,vposn%+20,hposn%-30,vposn%+28
  6351. LINE hposn%-26,vposn%+20,hposn%-28,vposn%+28
  6352. LINE hposn%-24,vposn%+20,hposn%-28,vposn%+28
  6353. ENDCASE
  6354. ENDIF
  6355. IF notehead$ = "vsmall" THEN
  6356. CASE acc% OF
  6357. WHEN 5 : REM natural
  6358. LINE hposn%+12,vposn%+24,hposn%+12,vposn%-4
  6359. LINE hposn%+20,vposn%+4,hposn%+20,vposn%-24
  6360. LINE hposn%+12,vposn%+4,hposn%+20,vposn%+8
  6361. LINE hposn%+12,vposn%-8,hposn%+20,vposn%-4
  6362. WHEN 6 : REM 1/8 sharp
  6363. LINE hposn%+12,vposn%+24,hposn%+12,vposn%-4
  6364. LINE hposn%+20,vposn%+4,hposn%+20,vposn%-24
  6365. LINE hposn%+12,vposn%+4,hposn%+20,vposn%+8
  6366. LINE hposn%+12,vposn%-8,hposn%+20,vposn%-4
  6367. LINE hposn%+10,vposn%+20,hposn%+12,vposn%+28
  6368. LINE hposn%+14,vposn%+20,hposn%+12,vposn%+28
  6369. LINE hposn%+8,vposn%+20,hposn%+12,vposn%+28
  6370. LINE hposn%+16,vposn%+20,hposn%+12,vposn%+28
  6371. WHEN 9 : REM sharp
  6372. LINE hposn%+12,vposn%+24,hposn%+12,vposn%-24
  6373. LINE hposn%+18,vposn%+24,hposn%+18,vposn%-24
  6374. LINE hposn%+10,vposn%+4,hposn%+20,vposn%+8
  6375. LINE hposn%+10,vposn%-8,hposn%+20,vposn%-4
  6376. WHEN 8 : REM 3/8 sharp
  6377. LINE hposn%+12,vposn%+24,hposn%+12,vposn%-24
  6378. LINE hposn%+18,vposn%+24,hposn%+18,vposn%-24
  6379. LINE hposn%+10,vposn%+4,hposn%+20,vposn%+8
  6380. LINE hposn%+10,vposn%-8,hposn%+20,vposn%-4
  6381. LINE hposn%+14,vposn%-20,hposn%+18,vposn%-28
  6382. LINE hposn%+16,vposn%-20,hposn%+18,vposn%-28
  6383. LINE hposn%+20,vposn%-20,hposn%+18,vposn%-28
  6384. LINE hposn%+22,vposn%-20,hposn%+18,vposn%-28
  6385. WHEN 4 : REM 1/8 flat
  6386. LINE hposn%+12,vposn%+24,hposn%+12,vposn%-4
  6387. LINE hposn%+20,vposn%+4,hposn%+20,vposn%-24
  6388. LINE hposn%+12,vposn%+4,hposn%+20,vposn%+8
  6389. LINE hposn%+12,vposn%-8,hposn%+20,vposn%-4
  6390. LINE hposn%+16,vposn%-20,hposn%+20,vposn%-28
  6391. LINE hposn%+18,vposn%-20,hposn%+20,vposn%-28
  6392. LINE hposn%+22,vposn%-20,hposn%+20,vposn%-28
  6393. LINE hposn%+24,vposn%-20,hposn%+20,vposn%-28
  6394. WHEN 7 : REM quartersharp
  6395. LINE hposn%+18,vposn%+24,hposn%+18,vposn%-24
  6396. LINE hposn%+16,vposn%+4,hposn%+20,vposn%+8
  6397. LINE hposn%+16,vposn%-8,hposn%+20,vposn%-4
  6398. WHEN 2 : REM 3/8 flat
  6399. LINE hposn%+12,vposn%+28,hposn%+12,vposn%-12
  6400. LINE hposn%+16,vposn%+8,hposn%+18,vposn%+8
  6401. LINE hposn%+14,vposn%+4,hposn%+14,vposn%+4
  6402. LINE hposn%+20,vposn%+4,hposn%+20,vposn%+4
  6403. LINE hposn%+20,vposn%,hposn%+20,vposn%
  6404. LINE hposn%+18,vposn%-4,hposn%+18,vposn%-4
  6405. LINE hposn%+12,vposn%-8,hposn%+16,vposn%-8
  6406. LINE hposn%+8,vposn%+20,hposn%+12,vposn%+28
  6407. LINE hposn%+10,vposn%+20,hposn%+12,vposn%+28
  6408. LINE hposn%+14,vposn%+20,hposn%+12,vposn%+28
  6409. LINE hposn%+16,vposn%+20,hposn%+12,vposn%+28
  6410. WHEN 1 : REM flat
  6411. LINE hposn%+12,vposn%+28,hposn%+12,vposn%-12
  6412. LINE hposn%+16,vposn%+8,hposn%+18,vposn%+8
  6413. LINE hposn%+14,vposn%+4,hposn%+14,vposn%+4
  6414. LINE hposn%+20,vposn%+4,hposn%+20,vposn%+4
  6415. LINE hposn%+20,vposn%,hposn%+20,vposn%
  6416. LINE hposn%+18,vposn%-4,hposn%+18,vposn%-4
  6417. LINE hposn%+12,vposn%-8,hposn%+16,vposn%-8
  6418. WHEN 3 : REM quarterflat
  6419. LINE hposn%+20,vposn%+28,hposn%+20,vposn%-12
  6420. LINE hposn%+14,vposn%+8,hposn%+16,vposn%+8
  6421. LINE hposn%+12,vposn%+4,hposn%+12,vposn%+4
  6422. LINE hposn%+18,vposn%+4,hposn%+18,vposn%+4
  6423. LINE hposn%+12,vposn%,hposn%+12,vposn%
  6424. LINE hposn%+14,vposn%-4,hposn%+14,vposn%-4
  6425. LINE hposn%+16,vposn%-8,hposn%+20,vposn%-8
  6426. ENDCASE
  6427. inf% = (array%(startcell%,2,voice%)MOD100)-50
  6428. IF inf% < 0 THEN
  6429. MOVE hposn%-125,vposn%-30 : PRINT inf%;"c"
  6430. ENDIF
  6431. IF inf% > 0 THEN
  6432. MOVE hposn%-16,vposn%+45 : PRINT "+";inf%;"c"
  6433. ENDIF
  6434. ENDIF
  6435. :
  6436. IF notehead$ = "small" THEN
  6437. CASE acc% OF
  6438. WHEN 1 : REM flat
  6439. LINE hposn%-2,vposn%+28,hposn%-2,vposn%-12
  6440. LINE hposn%+4,vposn%+8,hposn%+8,vposn%+8
  6441. LINE hposn%,vposn%+4,hposn%+2,vposn%+4
  6442. LINE hposn%+8,vposn%+4,hposn%+10,vposn%+4
  6443. LINE hposn%+8,vposn%,hposn%+10,vposn%
  6444. LINE hposn%+4,vposn%-4,hposn%+6,vposn%-4
  6445. LINE hposn%-2,vposn%-8,hposn%+2,vposn%-8
  6446. WHEN 2 : REM 3/8 flat
  6447. LINE hposn%-2,vposn%+28,hposn%-2,vposn%-12
  6448. LINE hposn%+4,vposn%+8,hposn%+8,vposn%+8
  6449. LINE hposn%,vposn%+4,hposn%+2,vposn%+4
  6450. LINE hposn%+8,vposn%+4,hposn%+10,vposn%+4
  6451. LINE hposn%+8,vposn%,hposn%+10,vposn%
  6452. LINE hposn%+4,vposn%-4,hposn%+6,vposn%-4
  6453. LINE hposn%-2,vposn%-8,hposn%+2,vposn%-8
  6454. LINE hposn%-6,vposn%+20,hposn%-2,vposn%+28
  6455. LINE hposn%-4,vposn%+20,hposn%-2,vposn%+28
  6456. LINE hposn%,vposn%+20,hposn%-2,vposn%+28
  6457. LINE hposn%+2,vposn%+20,hposn%-2,vposn%+28
  6458. WHEN 3 : REM quarterflat
  6459. LINE hposn%+10,vposn%+28,hposn%+10,vposn%-12
  6460. LINE hposn%,vposn%+8,hposn%+4,vposn%+8
  6461. LINE hposn%-2,vposn%+4,hposn%,vposn%+4
  6462. LINE hposn%+6,vposn%+4,hposn%+8,vposn%+4
  6463. LINE hposn%-2,vposn%,hposn%,vposn%
  6464. LINE hposn%+2,vposn%-4,hposn%+4,vposn%-4
  6465. LINE hposn%+6,vposn%-8,hposn%+10,vposn%-8
  6466. WHEN 5 : REM natural
  6467. LINE hposn%,vposn%+24,hposn%,vposn%-4
  6468. LINE hposn%+10,vposn%+4,hposn%+10,vposn%-24
  6469. LINE hposn%,vposn%+4,hposn%+10,vposn%+8
  6470. LINE hposn%,vposn%-8,hposn%+10,vposn%-4
  6471. WHEN 6 : REM 1/8 sharp
  6472. LINE hposn%,vposn%+24,hposn%,vposn%-4
  6473. LINE hposn%+10,vposn%+4,hposn%+10,vposn%-24
  6474. LINE hposn%,vposn%+4,hposn%+10,vposn%+8
  6475. LINE hposn%,vposn%-8,hposn%+10,vposn%-4
  6476. LINE hposn%-4,vposn%+20,hposn%,vposn%+28
  6477. LINE hposn%-2,vposn%+20,hposn%,vposn%+28
  6478. LINE hposn%+2,vposn%+20,hposn%,vposn%+28
  6479. LINE hposn%+4,vposn%+20,hposn%,vposn%+28
  6480. WHEN 7 : REM quartersharp
  6481. LINE hposn%+6,vposn%+24,hposn%+6,vposn%-24
  6482. LINE hposn%+2,vposn%+4,hposn%+10,vposn%+8
  6483. LINE hposn%+2,vposn%-8,hposn%+10,vposn%-4
  6484. WHEN 4 : REM 1/8 flat
  6485. LINE hposn%,vposn%+24,hposn%,vposn%-4
  6486. LINE hposn%+10,vposn%+4,hposn%+10,vposn%-24
  6487. LINE hposn%,vposn%+4,hposn%+10,vposn%+8
  6488. LINE hposn%,vposn%-8,hposn%+10,vposn%-4
  6489. LINE hposn%+6,vposn%-20,hposn%+10,vposn%-28
  6490. LINE hposn%+8,vposn%-20,hposn%+10,vposn%-28
  6491. LINE hposn%+12,vposn%-20,hposn%+10,vposn%-28
  6492. LINE hposn%+14,vposn%-20,hposn%+10,vposn%-28
  6493. WHEN 9 : REM sharp
  6494. LINE hposn%-2,vposn%+24,hposn%-2,vposn%-24
  6495. LINE hposn%+6,vposn%+24,hposn%+6,vposn%-24
  6496. LINE hposn%-6,vposn%+4,hposn%+10,vposn%+8
  6497. LINE hposn%-6,vposn%-8,hposn%+10,vposn%-4
  6498. WHEN 8 : REM 3/8 sharp
  6499. LINE hposn%-2,vposn%+24,hposn%-2,vposn%-24
  6500. LINE hposn%+6,vposn%+24,hposn%+6,vposn%-24
  6501. LINE hposn%-6,vposn%+4,hposn%+10,vposn%+8
  6502. LINE hposn%-6,vposn%-8,hposn%+10,vposn%-4
  6503. LINE hposn%+2,vposn%-20,hposn%+6,vposn%-28
  6504. LINE hposn%+4,vposn%-20,hposn%+6,vposn%-28
  6505. LINE hposn%+8,vposn%-20,hposn%+6,vposn%-28
  6506. LINE hposn%+10,vposn%-20,hposn%+6,vposn%-28
  6507. ENDCASE
  6508. :
  6509. ENDIF
  6510. ENDIF
  6511. startcell% += 1
  6512. IF longscore$ = "n" THEN div% = 2 ELSE div% = 1
  6513. :
  6514. UNTIL (array%(startcell%,0,voice%) DIV10^6) >= ((numbars%/div%)+firstbar%) OR array%(startcell%,0,voice%) = 0
  6515. ENDIF
  6516. :
  6517. IF stems$ = "y" THEN PROCrhythmdisplay
  6518. :
  6519. IF longscore$ = "y" THEN ledgerkey% += EVAL(MID$(stavecombination$,count%-startv%+1,1))
  6520. :
  6521. NEXT
  6522. :
  6523. NEXT
  6524. :
  6525. VDU 4 : OFF : box$ = "n" : biga% = 10^5 : bigb% = 0 : bigc% = 0 : bigd% = 10^5
  6526. IF printing$ = "n" AND preplaydisplay$ = "n" THEN PROCpostdisplay
  6527. ENDPROC
  6528. :
  6529. REM*************************************************
  6530. :
  6531. DEF PROCroundgliss
  6532. :
  6533. IF thirdphase$ = "n" THEN gl1% = 50-gl% ELSE gl1% = 10-gl%
  6534. gl% = gl1%*1.1665 : gl% = (gl%DIV4)*4
  6535. IF gl% = 0 THEN
  6536. IF gl1% > 0 THEN gl% = 4 ELSE gl% = -4
  6537. ENDIF
  6538. IF gl% < 0 THEN g% = gl%*-1 ELSE g% = gl%
  6539. rem = g%/8
  6540. IF (rem*10)MOD10 <> 0 THEN
  6541. IF gl% > 0 THEN gl% += 4 ELSE gl% -= 4
  6542. ENDIF
  6543. :
  6544. ENDPROC
  6545. :
  6546. REM**************************************************
  6547. :
  6548. DEF PROCpostdisplay
  6549. :
  6550. distort$ = "OFF"
  6551. REM in case of Escaping from a distort routine before switching it off
  6552. :
  6553. OFF
  6554. CASE GET$ OF
  6555. :
  6556. WHEN "i" :
  6557. PROCwindow(20,69,60,55)
  6558. CLS : PRINT'" Copy-extract or move-extract? (C/M) "
  6559. CASE GET$ OF
  6560. WHEN "C","c" : copymove$ = "EC"
  6561. OTHERWISE copymove$ = "EM"
  6562. ENDCASE
  6563. savevoice$ = "N"
  6564. PROCcopy2
  6565. :
  6566. WHEN "{" : quickcopy$ = "y" : PROCdisplay
  6567. WHEN "}" : quickcopy$ = "n" : PROCdisplay
  6568. WHEN "¬" :
  6569. PROCwindow(20,69,60,55) : CLS
  6570. INPUT'" Display from which voice "startv%
  6571. PROCdisplay
  6572. :
  6573. WHEN "@" :
  6574. IF easiermenus$ = "y" THEN easiermenus$ = "n" ELSE easiermenus$ = "y"
  6575. PROCdisplay
  6576. WHEN "`" :
  6577. distort$ = "ON" : distortpara$ = "attacks" : ON
  6578. PROCwindow(20,69,60,55) : CLS : OFF :
  6579. incre$ = INKEY$(50)
  6580. IF incre$ = "`" THEN
  6581. distortpara$ = "pitches"
  6582. ENDIF
  6583. PROCcopy
  6584. :
  6585. WHEN "+" :
  6586. numvoices% = numparts%
  6587. FOR count% = 1 TO numvoices%
  6588. displayvoices%(count%) = 1 + count% - 1
  6589. holddisplay%(count%) = 1 + count% - 1
  6590. NEXT
  6591. holdnum% = numvoices%
  6592. PROCdisplay
  6593. :
  6594. WHEN "!" : copydownwards% = 1 :
  6595. IF addten$ = "y" THEN copydownwards% +=10
  6596. IF addten$ = "twenty" THEN copydownwards% += 20
  6597. incre$ = INKEY$(downwardsspeed%)
  6598. IF incre$ <> "" THEN
  6599. CASE incre$ OF
  6600. WHEN "!" : downby% = 1
  6601. WHEN """" : downby% = 2
  6602. WHEN "£" : downby% = 3
  6603. WHEN "$" : downby% = 4
  6604. WHEN "%" : downby% = 5
  6605. WHEN "^" : downby% = 6
  6606. WHEN "&" : downby% = 7
  6607. WHEN "*" : downby% = 8
  6608. WHEN "(" : downby% = 9
  6609. WHEN ")" : downby% = 10
  6610. ENDCASE
  6611. ELSE downby% = 1
  6612. ENDIF
  6613. PROCcopydownwards
  6614. WHEN """" : copydownwards% = 2 :
  6615. IF addten$ = "y" THEN copydownwards% +=10
  6616. IF addten$ = "twenty" THEN copydownwards% +=20
  6617. incre$ = INKEY$(downwardsspeed%)
  6618. IF incre$ <> "" THEN
  6619. CASE incre$ OF
  6620. WHEN "!" : downby% = 1
  6621. WHEN """" : downby% = 2
  6622. WHEN "£" : downby% = 3
  6623. WHEN "$" : downby% = 4
  6624. WHEN "%" : downby% = 5
  6625. WHEN "^" : downby% = 6
  6626. WHEN "&" : downby% = 7
  6627. WHEN "*" : downby% = 8
  6628. WHEN "(" : downby% = 9
  6629. ENDCASE
  6630. ELSE downby% = 1
  6631. ENDIF
  6632. PROCcopydownwards
  6633. WHEN "£" : copydownwards% = 3 :
  6634. IF addten$ = "y" THEN copydownwards% +=10
  6635. IF addten$ = "twenty" THEN copydownwards% +=20
  6636. incre$ = INKEY$(downwardsspeed%)
  6637. IF incre$ <> "" THEN
  6638. CASE incre$ OF
  6639. WHEN "!" : downby% = 1
  6640. WHEN """" : downby% = 2
  6641. WHEN "£" : downby% = 3
  6642. WHEN "$" : downby% = 4
  6643. WHEN "%" : downby% = 5
  6644. WHEN "^" : downby% = 6
  6645. WHEN "&" : downby% = 7
  6646. WHEN "*" : downby% = 8
  6647. WHEN "(" : downby% = 9
  6648. ENDCASE
  6649. ELSE downby% = 1
  6650. ENDIF
  6651. PROCcopydownwards
  6652. WHEN "$" : copydownwards% = 4 :
  6653. IF addten$ = "y" THEN copydownwards% +=10
  6654. IF addten$ = "twenty" THEN copydownwards% +=20
  6655. incre$ = INKEY$(downwardsspeed%)
  6656. IF incre$ <> "" THEN
  6657. CASE incre$ OF
  6658. WHEN "!" : downby% = 1
  6659. WHEN """" : downby% = 2
  6660. WHEN "£" : downby% = 3
  6661. WHEN "$" : downby% = 4
  6662. WHEN "%" : downby% = 5
  6663. WHEN "^" : downby% = 6
  6664. WHEN "&" : downby% = 7
  6665. WHEN "*" : downby% = 8
  6666. WHEN "(" : downby% = 9
  6667. ENDCASE
  6668. ELSE downby% = 1
  6669. ENDIF
  6670. PROCcopydownwards
  6671. WHEN "%" : copydownwards% = 5 :
  6672. IF addten$ = "y" THEN copydownwards% +=10
  6673. IF addten$ = "twenty" THEN copydownwards% +=20
  6674. incre$ = INKEY$(downwardsspeed%)
  6675. IF incre$ <> "" THEN
  6676. CASE incre$ OF
  6677. WHEN "!" : downby% = 1
  6678. WHEN """" : downby% = 2
  6679. WHEN "£" : downby% = 3
  6680. WHEN "$" : downby% = 4
  6681. WHEN "%" : downby% = 5
  6682. WHEN "^" : downby% = 6
  6683. WHEN "&" : downby% = 7
  6684. WHEN "*" : downby% = 8
  6685. WHEN "(" : downby% = 9
  6686. ENDCASE
  6687. ELSE downby% = 1
  6688. ENDIF
  6689. PROCcopydownwards
  6690. WHEN "^" : copydownwards% = 6 :
  6691. IF addten$ = "y" THEN copydownwards% +=10
  6692. IF addten$ = "twenty" THEN copydownwards% +=20
  6693. incre$ = INKEY$(downwardsspeed%)
  6694. IF incre$ <> "" THEN
  6695. CASE incre$ OF
  6696. WHEN "!" : downby% = 1
  6697. WHEN """" : downby% = 2
  6698. WHEN "£" : downby% = 3
  6699. WHEN "$" : downby% = 4
  6700. WHEN "%" : downby% = 5
  6701. WHEN "^" : downby% = 6
  6702. WHEN "&" : downby% = 7
  6703. WHEN "*" : downby% = 8
  6704. WHEN "(" : downby% = 9
  6705. ENDCASE
  6706. ELSE downby% = 1
  6707. ENDIF
  6708. PROCcopydownwards
  6709. WHEN "&" : copydownwards% = 7 :
  6710. IF addten$ = "y" THEN copydownwards% +=10
  6711. IF addten$ = "twenty" THEN copydownwards% +=20
  6712. incre$ = INKEY$(downwardsspeed%)
  6713. IF incre$ <> "" THEN
  6714. CASE incre$ OF
  6715. WHEN "!" : downby% = 1
  6716. WHEN """" : downby% = 2
  6717. WHEN "£" : downby% = 3
  6718. WHEN "$" : downby% = 4
  6719. WHEN "%" : downby% = 5
  6720. WHEN "^" : downby% = 6
  6721. WHEN "&" : downby% = 7
  6722. WHEN "*" : downby% = 8
  6723. WHEN "(" : downby% = 9
  6724. ENDCASE
  6725. ELSE downby% = 1
  6726. ENDIF
  6727. PROCcopydownwards
  6728. WHEN "*" : copydownwards% = 8 :
  6729. IF addten$ = "y" THEN copydownwards% +=10
  6730. IF addten$ = "twenty" THEN copydownwards% +=20
  6731. incre$ = INKEY$(downwardsspeed%)
  6732. IF incre$ <> "" THEN
  6733. CASE incre$ OF
  6734. WHEN "!" : downby% = 1
  6735. WHEN """" : downby% = 2
  6736. WHEN "£" : downby% = 3
  6737. WHEN "$" : downby% = 4
  6738. WHEN "%" : downby% = 5
  6739. WHEN "^" : downby% = 6
  6740. WHEN "&" : downby% = 7
  6741. WHEN "*" : downby% = 8
  6742. WHEN "(" : downby% = 9
  6743. ENDCASE
  6744. ELSE downby% = 1
  6745. ENDIF
  6746. PROCcopydownwards
  6747. WHEN "(" : copydownwards% = 9 :
  6748. IF addten$ = "y" THEN copydownwards% +=10
  6749. IF addten$ = "twenty" THEN copydownwards% +=20
  6750. incre$ = INKEY$(downwardsspeed%)
  6751. IF incre$ <> "" THEN
  6752. CASE incre$ OF
  6753. WHEN "!" : downby% = 1
  6754. WHEN """" : downby% = 2
  6755. WHEN "£" : downby% = 3
  6756. WHEN "$" : downby% = 4
  6757. WHEN "%" : downby% = 5
  6758. WHEN "^" : downby% = 6
  6759. WHEN "&" : downby% = 7
  6760. WHEN "*" : downby% = 8
  6761. WHEN "(" : downby% = 9
  6762. ENDCASE
  6763. ELSE downby% = 1
  6764. ENDIF
  6765. PROCcopydownwards
  6766. WHEN ")" : copydownwards% = 10 :
  6767. IF addten$ = "y" THEN copydownwards% +=10
  6768. IF addten$ = "twenty" THEN copydownwards% +=20
  6769. incre$ = INKEY$(downwardsspeed%)
  6770. IF incre$ <> "" THEN
  6771. CASE incre$ OF
  6772. WHEN "!" : downby% = 1
  6773. WHEN """" : downby% = 2
  6774. WHEN "£" : downby% = 3
  6775. WHEN "$" : downby% = 4
  6776. WHEN "%" : downby% = 5
  6777. WHEN "^" : downby% = 6
  6778. WHEN "&" : downby% = 7
  6779. WHEN "*" : downby% = 8
  6780. WHEN "(" : downby% = 9
  6781. ENDCASE
  6782. ELSE downby% = 1
  6783. ENDIF
  6784. PROCcopydownwards
  6785. :
  6786. WHEN "c" : PROCincrementcalc
  6787. WHEN "k" : ON : PROCkeyboardshortcuts
  6788. WHEN "I" : copymove$ = "C" : savevoice$ = "N" : PROCwindow(20,69,60,55) : PROCimportvoice
  6789. WHEN "0",")" : PROCseriesattacks
  6790. WHEN "a" : PROCfunctionprelude
  6791. WHEN "m" : ON : PROCawait
  6792. WHEN "n" : ON : rerun$ = "n" : PROCrandomnumber
  6793. WHEN "N" : ON : rerun$ = "y" : PROCrandomnumber
  6794. WHEN "o" : ON : PROCdisplaysubmenu
  6795. WHEN "O" : deleteone$ = "top" : PROCdelete
  6796. WHEN "K" : deleteone$ = "middle" : PROCdelete
  6797. WHEN "M" : deleteone$ = "bottom" : PROCdelete
  6798. WHEN "r" : play$ = "replay" : PROCplay
  6799. WHEN "u" : ON : PROCseriesdurations
  6800. WHEN "G", "g" : ON : numdurations% = 111 : PROCdurationsbetween
  6801. WHEN "\" : ON : PROCshortmove
  6802. WHEN "|" : ON : PROCshortmoveone
  6803. WHEN "y" : ON : PROCseriespitches
  6804. WHEN "Y" :
  6805. IF addpitches$ = "y" THEN
  6806. PROCwindow(20,69,60,55)
  6807. ON
  6808. CLS
  6809. PROCinsertpitches
  6810. ELSE
  6811. voix% = 1 : son% = 5 : PROCedit
  6812. ENDIF
  6813. WHEN "l" : ON : PROCseriesamplitudes
  6814. WHEN "J","j" : ON : PROCseriesenvelopes
  6815. WHEN "h" : ON : PROCwindow(20,57,74,55)
  6816. PRINT'" Have you previously allocated at least 260K memory "
  6817. PRINT " for system sprites and double-clicked !Paint "
  6818. CASE GET$ OF
  6819. WHEN "N","n" : PROCdisplay
  6820. WHEN "Y","y" :
  6821. printing$ = "y" : printno% += 1 : PROCdisplay
  6822. MOVE 0,0
  6823. MOVE 1800,1223
  6824. *SGet mysprite
  6825. OSCLI "SSave SDFS::RISCOSpi.$.CAC.Printing.print"+STR$(printno%)
  6826. printing$ = "n" : PROCdisplay
  6827. ENDCASE
  6828. WHEN "v" : startv% += updisplay%
  6829. incre$ = INKEY$(vertscroll%)
  6830. IF incre$ <> "" THEN
  6831. CASE incre$ OF
  6832. WHEN "V","v" :
  6833. IF screenmovesby% = 10 THEN startv%+=9 ELSE startv%+=2
  6834. WHEN "0" : startv%+=49
  6835. OTHERWISE startv% += EVAL(incre$)-1
  6836. ENDCASE
  6837. ENDIF
  6838. IF startv% > (numvoices%-lastcount%) THEN startv%= numvoices%-lastcount%
  6839. PROCdisplay
  6840. WHEN "6" :
  6841. startv% -= updisplay%
  6842. decre$ = INKEY$(vertscroll%)
  6843. IF decre$ <> "" THEN
  6844. CASE decre$ OF
  6845. WHEN "6" :
  6846. IF screenmovesby% = 10 THEN startv%-=9 ELSE startv%-=2
  6847. WHEN "0" : startv%-=49
  6848. OTHERWISE startv% -= EVAL(decre$)-1
  6849. ENDCASE
  6850. ENDIF
  6851. IF startv% < 1 THEN startv% = 1
  6852. PROCdisplay
  6853. WHEN "." : startbar% += 1
  6854. incre$ = INKEY$(horizscroll%)
  6855. IF incre$ <> "" THEN
  6856. IF incre$ = ">" OR incre$ = "." THEN startbar% += numbars%-1 ELSE startbar% += EVAL(incre$)-1
  6857. ENDIF
  6858. requestedend% = startbar% + numbars%
  6859. IF requestedend% > nobars% THEN startbar% -= (requestedend%-nobars%)
  6860. PROCdisplay
  6861. WHEN "," : startbar% -= 1
  6862. decre$ = INKEY$(horizscroll%)
  6863. IF decre$ <> "" THEN
  6864. IF decre$ = "<" OR decre$ = "," THEN startbar% -= numbars%-1 ELSE startbar% -= EVAL(decre$)-1
  6865. ENDIF
  6866. IF startbar%<1 THEN startbar% = 1
  6867. PROCdisplay
  6868. WHEN "V" : ON : PROCwindow(20,69,60,55)
  6869. IF namestaves$ = "nameone" THEN PROCnamestaves ELSE PROCdeletenames
  6870. PROCdisplay
  6871. WHEN "b" :
  6872. PROCwindow(20,57,34,55) : ON : INPUT'" Go to bar "startbar%
  6873. requestedend% = startbar% + numbars%
  6874. IF requestedend% > nobars% THEN startbar% -= (requestedend% - nobars%)
  6875. PROCdisplay
  6876. WHEN "s" :
  6877. CASE sequalssection$ OF
  6878. WHEN "y" :
  6879. PROCwindow(20,17,38,15) : ON : INPUT'" Go to section "section$
  6880. count% = 0 : found$ = "n"
  6881. REPEAT
  6882. count% += 1
  6883. IF remarks$(count%,0) = "SECTION "+section$ OR remarks$(count%,1) = "SECTION "+section$ THEN
  6884. startbar% = count% : found$ = "y"
  6885. ENDIF
  6886. UNTIL found$ = "y" OR count% > nobars%
  6887. PROCdisplay
  6888. WHEN "n" :
  6889. copysuccessively$ = "y" : PROCcopygroupofnotes
  6890. ENDCASE : REM sequalussection
  6891. WHEN "d" : PROCwindow(20,58,45,55) : ON
  6892. INPUT'" Display how many bars? "numbars%
  6893. requestedend% = startbar% + numbars%
  6894. IF requestedend% > nobars% THEN startbar% -= (requestedend%-nobars%)
  6895. IF startbar% < 1 THEN
  6896. startbar% = 1 : numbars% = nobars%-1
  6897. ENDIF
  6898. PROCdisplay
  6899. WHEN "=" : numbars% = numbars%*2
  6900. requestedend% = startbar% + numbars%
  6901. IF requestedend% > nobars% THEN startbar% -= (requestedend%-nobars%)
  6902. IF startbar% < 1 THEN
  6903. startbar% = 1 : numbars% = nobars%-1
  6904. ENDIF
  6905. PROCdisplay
  6906. WHEN "q" :
  6907. PROCquickdisplay
  6908. WHEN "w" :
  6909. CASE toggle$ OF
  6910. WHEN "prevquick" : toggle$ = "orig"
  6911. WHEN "quick" : toggle$ = "prevquick"
  6912. WHEN "orig" : toggle$ = "quick"
  6913. ENDCASE
  6914. CASE toggle$ OF
  6915. WHEN "prevquick" :
  6916. numvoices% = prequicknum%
  6917. FOR count% = 1 TO numvoices%
  6918. displayvoices%(count%) = prequickdisplay%(count%)
  6919. NEXT
  6920. startv% = prequickstart%
  6921. WHEN "quick" :
  6922. numvoices% = quicknum%
  6923. FOR count% = 1 TO numvoices%
  6924. displayvoices%(count%) = quickdisplay%(count%)
  6925. NEXT
  6926. startv% = quickstart%
  6927. WHEN "orig" :
  6928. numvoices% = holdnum%
  6929. FOR count% = 1 TO numvoices%
  6930. displayvoices%(count%) = holddisplay%(count%)
  6931. NEXT
  6932. startv% = holdstart%
  6933. ENDCASE
  6934. PROCdisplay
  6935. WHEN "p" :
  6936. play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
  6937. endbar% = nobars% : nvoices% = quickplay%
  6938. FOR count% = 1 TO quickplay%
  6939. playvoices%(count%) = displayvoices%(startv%+count%-1)
  6940. NEXT
  6941. PROCplay
  6942. WHEN ";" :
  6943. play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
  6944. endbar% = nobars% : nvoices% = 1
  6945. playvoices%(1) = displayvoices%(startv%+1)
  6946. PROCplay
  6947. WHEN "/" :
  6948. play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
  6949. endbar% = nobars% : nvoices% = 1
  6950. playvoices%(1) = displayvoices%(startv%+2)
  6951. PROCplay
  6952. WHEN "P" :
  6953. play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
  6954. endbar% = startbar%+numbars%-1 : nvoices% = quickplay%
  6955. FOR count% = 1 TO quickplay%
  6956. playvoices%(count%) = displayvoices%(startv%+count%-1)
  6957. NEXT
  6958. PROCplay
  6959. WHEN ":" :
  6960. play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
  6961. endbar% = startbar%+numbars%-1 : nvoices% = 1
  6962. playvoices%(1) = displayvoices%(startv%+1)
  6963. PROCplay
  6964. WHEN "?" :
  6965. play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
  6966. endbar% = startbar%+numbars%-1 : nvoices% = 1
  6967. playvoices%(1) = displayvoices%(startv%+2)
  6968. PROCplay
  6969. WHEN "z" : PROCcopyonenote
  6970. WHEN "x" : PROCcopygroupofnotes
  6971. WHEN "-" :
  6972. IF numbars% > 1 THEN numbars% = numbars%/2
  6973. PROCdisplay
  6974. WHEN "t" : funcinput$ = "durat" : PROCdisplay
  6975. WHEN "e" : funcinput$ = "points" : PROCdisplay
  6976. WHEN "f" : funcinput$ = "displayed" : PROCdisplay
  6977. :
  6978. WHEN "1" :
  6979. IF setalong$ = "y" THEN along% = 0 : PROCpostdisplay
  6980. IF setalong$ = "n" THEN numvoices% = 1 : numvoicesgiven$ = "y" : PROCquickdisplay
  6981. IF setalong$ = "playnovoices" THEN quickplay% = 1 : PROCdisplay
  6982. WHEN "2" :
  6983. IF setalong$ = "y" THEN along% = 1 : PROCpostdisplay
  6984. IF setalong$ = "n" THEN numvoices% = 2 : numvoicesgiven$ = "y" : PROCquickdisplay
  6985. IF setalong$ = "playnovoices" THEN quickplay% = 2 : PROCdisplay
  6986. WHEN "3" :
  6987. IF setalong$ = "y" THEN along% = 2 : PROCpostdisplay
  6988. IF setalong$ = "n" THEN numvoices% = 3 : numvoicesgiven$ = "y" : PROCquickdisplay
  6989. IF setalong$ = "playnovoices" THEN quickplay% = 3 : PROCdisplay
  6990. WHEN "4" :
  6991. IF setalong$ = "y" THEN along% = 3 : PROCpostdisplay
  6992. IF setalong$ = "n" THEN numvoices% = 4 : numvoicesgiven$ = "y" : PROCquickdisplay
  6993. IF setalong$ = "playnovoices" THEN quickplay% = 4 : PROCdisplay
  6994. WHEN "5" :
  6995. IF setalong$ = "y" THEN along% = 4 : PROCpostdisplay
  6996. IF setalong$ = "n" THEN numvoices% = 5 : numvoicesgiven$ = "y" : PROCquickdisplay
  6997. IF setalong$ = "playnovoices" THEN quickplay% = 5 : PROCdisplay
  6998. WHEN "7" :
  6999. IF setalong$ = "y" THEN along% = 6 : PROCpostdisplay
  7000. IF setalong$ = "n" THEN numvoices% = 7 : numvoicesgiven$ = "y" : PROCquickdisplay
  7001. IF setalong$ = "playnovoices" THEN quickplay% = 7 : PROCdisplay
  7002. WHEN "8" :
  7003. IF setalong$ = "y" THEN along% = 7 : PROCpostdisplay
  7004. IF setalong$ = "n" THEN numvoices% = 8 : numvoicesgiven$ = "y" : PROCquickdisplay
  7005. IF setalong$ = "playnovoices" THEN quickplay% = 8 : PROCdisplay
  7006. WHEN "9" :
  7007. IF setalong$ = "y" THEN along% = 8 : PROCpostdisplay
  7008. IF setalong$ = "n" THEN numvoices% = 9 : numvoicesgiven$ = "y" : PROCquickdisplay
  7009. IF setalong$ = "playnovoices" THEN
  7010. PROCwindow(20,69,60,55)
  7011. PRINT'" The maximum number of voices "
  7012. PRINT " that can be played is 8 "
  7013. PRINT'" (press a key to continue) "
  7014. CASE GET$ OF
  7015. OTHERWSE PROCdisplay
  7016. ENDCASE
  7017. ENDIF
  7018. WHEN "]" :
  7019. IF squarebracket$ = "remarks" THEN
  7020. count% = startbar%-1
  7021. REPEAT
  7022. count%+=1
  7023. IF remarks$(count%,0) <> "" THEN itt% = count%
  7024. UNTIL remarks$(count%,0) <> ""
  7025. remarks$(itt%+1,0) = remarks$(itt%,0)
  7026. remarks$(itt%,0) = ""
  7027. ELSE
  7028. addten$ = "y"
  7029. ENDIF
  7030. PROCdisplay
  7031. WHEN "}" :
  7032. count% = startbar%-1
  7033. REPEAT
  7034. count%+=1
  7035. IF remarks$(count%,0) <> "" THEN itt% = count%
  7036. UNTIL remarks$(count%,0) <> ""
  7037. remarks$(itt%+10,0) = remarks$(itt%,0)
  7038. remarks$(itt%,0) = ""
  7039. PROCdisplay
  7040. WHEN "[" :
  7041. IF squarebracket$ = "remarks" THEN
  7042. count% = startbar%-1
  7043. REPEAT
  7044. count%+=1
  7045. IF remarks$(count%,0) <> "" THEN itt% = count%
  7046. UNTIL remarks$(count%,0) <> ""
  7047. remarks$(itt%-1,0) = remarks$(itt%,0)
  7048. remarks$(itt%,0) = ""
  7049. ELSE
  7050. addten$ = "n"
  7051. ENDIF
  7052. PROCdisplay
  7053. WHEN "{" :
  7054. count% = startbar%-1
  7055. REPEAT
  7056. count%+=1
  7057. IF remarks$(count%,0) <> "" THEN itt% = count%
  7058. UNTIL remarks$(count%,0) <> ""
  7059. remarks$(itt%-10,0) = remarks$(itt%,0)
  7060. remarks$(itt%,0) = ""
  7061. PROCdisplay
  7062. WHEN "#" :
  7063. IF squarebracket$ = "remarks" THEN
  7064. count% = startbar%-1
  7065. REPEAT
  7066. count%+=1
  7067. IF remarks$(count%,1) <> "" THEN itt% = count%
  7068. UNTIL remarks$(count%,1) <> ""
  7069. remarks$(itt%+1,1) = remarks$(itt%,1)
  7070. remarks$(itt%,1) = ""
  7071. ENDIF
  7072. PROCdisplay
  7073. WHEN "'" :
  7074. IF squarebracket$ = "remarks" THEN
  7075. count% = startbar%-1
  7076. REPEAT
  7077. count%+=1
  7078. IF remarks$(count%,1) <> "" THEN itt% = count%
  7079. UNTIL remarks$(count%,1) <> ""
  7080. remarks$(itt%-1,1) = remarks$(itt%,1)
  7081. remarks$(itt%,1) = ""
  7082. ELSE
  7083. addten$ = "twenty"
  7084. ENDIF
  7085. PROCdisplay
  7086. WHEN "L" : slavemethod$ = "random" : quickslave$ = "y" : PROCslave
  7087. WHEN "Q" : voix% = 1 : son% = 0 : PROCedit
  7088. WHEN "W" : voix% = 1 : son% = 1 : PROCedit
  7089. WHEN "E" : voix% = 1 : son% = 2 : PROCedit
  7090. WHEN "R" : voix% = 1 : son% = 3 : PROCedit
  7091. WHEN "T" : voix% = 1 : son% = 4 : PROCedit
  7092. WHEN "A" : voix% = 2 : son% = 0 : PROCedit
  7093. WHEN "S" : voix% = 2 : son% = 1 : PROCedit
  7094. WHEN "D" : voix% = 2 : son% = 2 : PROCedit
  7095. WHEN "F" : voix% = 2 : son% = 3 : PROCedit
  7096. WHEN "G" : voix% = 2 : son% = 4 : PROCedit
  7097. WHEN "H" : voix% = 2 : son% = 5 : PROCedit
  7098. WHEN "Z" : voix% = 3 : son% = 0 : PROCedit
  7099. WHEN "X" : voix% = 3 : son% = 1 : PROCedit
  7100. WHEN "C" : voix% = 3 : son% = 2 : PROCedit
  7101. WHEN "V" : voix% = 3 : son% = 3 : PROCedit
  7102. WHEN "B" : voix% = 3 : son% = 4 : PROCedit
  7103. WHEN "N" : voix% = 3 : son% = 5 : PROCedit
  7104. WHEN ">" :
  7105. voice% = displayvoices%(voix%+(startv%-1))-1
  7106. CASE editwhat$ OF
  7107. WHEN "1stenvelope" :
  7108. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 100000
  7109. WHEN "2ndenvelope" :
  7110. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 10000000
  7111. WHEN "1stamplitude" :
  7112. array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) + 1
  7113. IF array%(holdstartcell%(voice%)+son%,1,voice%)MOD10 = 9 THEN
  7114. array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) - 9
  7115. ENDIF
  7116. WHEN "2ndamplitude" :
  7117. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 100
  7118. IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^2)MOD10 = 9 THEN
  7119. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 900
  7120. ENDIF
  7121. WHEN "3rdamplitude" :
  7122. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 1000
  7123. IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^3)MOD10 = 9 THEN
  7124. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 9000
  7125. ENDIF
  7126. WHEN "4thamplitude" :
  7127. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 10000
  7128. IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^4)MOD10 = 9 THEN
  7129. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 90000
  7130. ENDIF
  7131. WHEN "movetwo" :
  7132. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 60000
  7133. IF (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3 > 900 THEN
  7134. number% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
  7135. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - (number%*1000)
  7136. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 1000000
  7137. ENDIF
  7138. array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) + 60000
  7139. IF (array%(holdstartcell%(voice%)+son%+1,0,voice%)DIV10^3)MOD10^3 > 900 THEN
  7140. number% = (array%(holdstartcell%(voice%)+son%+1,0,voice%)DIV10^3)MOD10^3
  7141. array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) - (number%*1000)
  7142. array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) + 1000000
  7143. ENDIF
  7144. WHEN "move&drag" :
  7145. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 60000
  7146. IF (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3 > 900 THEN
  7147. number% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
  7148. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - (number%*1000)
  7149. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 1000000
  7150. ENDIF
  7151. bar1% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^6)
  7152. beat1% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
  7153. position1% = (bar1%*960) + beat1%
  7154. bar2% = (array%(holdstartcell%(voice%)+son%-1,0,voice%)DIV10^6)
  7155. beat2% = (array%(holdstartcell%(voice%)+son%-1,0,voice%)DIV10^3)MOD10^3
  7156. position2% = (bar2%*960) + beat2%
  7157. dur% = position1% - position2%
  7158. PROCconvertdur
  7159. number% = (array%(holdstartcell%(voice%)+son%-1,1,voice%)DIV10)MOD10^3
  7160. array%(holdstartcell%(voice%)+son%-1,1,voice%) = array%(holdstartcell%(voice%)+son%-1,1,voice%) - (number%*10)
  7161. array%(holdstartcell%(voice%)+son%-1,1,voice%) = array%(holdstartcell%(voice%)+son%-1,1,voice%) + (dur%*10)
  7162. WHEN "duration" :
  7163. array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) + 10
  7164. IF (array%(holdstartcell%(voice%)+son%,1,voice%)DIV10)MOD10^3 > 998 THEN (array%(holdstartcell%(voice%)+son%,1,voice%)DIV10)MOD10^3 = 998
  7165. ENDCASE
  7166. PROCdisplay
  7167. WHEN "<" :
  7168. voice% = displayvoices%(voix%+(startv%-1))-1
  7169. CASE editwhat$ OF
  7170. WHEN "1stenvelope" :
  7171. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 100000
  7172. WHEN "2ndenvelope" :
  7173. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 10000000
  7174. WHEN "1stamplitude" :
  7175. array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) - 1
  7176. IF array%(holdstartcell%(voice%)+son%,1,voice%)MOD10 = 9 THEN
  7177. array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) + 9
  7178. ENDIF
  7179. WHEN "2ndamplitude" :
  7180. IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^2)MOD10 = 0 THEN
  7181. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 800
  7182. ELSEarray%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 100
  7183. ENDIF
  7184. WHEN "3rdamplitude" :
  7185. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 1000
  7186. IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^3)MOD10 = 9 THEN
  7187. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 9000
  7188. ENDIF
  7189. WHEN "4thamplitude" :
  7190. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 10000
  7191. IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^4)MOD10 = 9 THEN
  7192. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 90000
  7193. ENDIF
  7194. WHEN "movetwo" :
  7195. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - 60000
  7196. IF (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3 > 900 THEN
  7197. number% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
  7198. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - (number%*1000)
  7199. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 900000
  7200. ENDIF
  7201. array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) - 60000
  7202. IF (array%(holdstartcell%(voice%)+son%+1,0,voice%)DIV10^3)MOD10^3 > 900 THEN
  7203. number% = (array%(holdstartcell%(voice%)+son%+1,0,voice%)DIV10^3)MOD10^3
  7204. array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) - (number%*1000)
  7205. array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) + 900000
  7206. ENDIF
  7207. WHEN "move&drag" :
  7208. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - 60000
  7209. IF (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3 > 900 THEN
  7210. number% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
  7211. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - (number%*1000)
  7212. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 900000
  7213. ENDIF
  7214. bar1% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^6)
  7215. beat1% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
  7216. position1% = (bar1%*960) + beat1%
  7217. bar2% = (array%(holdstartcell%(voice%)+son%-1,0,voice%)DIV10^6)
  7218. beat2% = (array%(holdstartcell%(voice%)+son%-1,0,voice%)DIV10^3)MOD10^3
  7219. position2% = (bar2%*960) + beat2%
  7220. dur% = position1% - position2%
  7221. PROCconvertdur
  7222. number% = (array%(holdstartcell%(voice%)+son%-1,1,voice%)DIV10)MOD10^3
  7223. array%(holdstartcell%(voice%)+son%-1,1,voice%) = array%(holdstartcell%(voice%)+son%-1,1,voice%) - (number%*10)
  7224. array%(holdstartcell%(voice%)+son%-1,1,voice%) = array%(holdstartcell%(voice%)+son%-1,1,voice%) + (dur%*10)
  7225. WHEN "duration" :
  7226. array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) - 10
  7227. ENDCASE
  7228. PROCdisplay
  7229. :
  7230. OTHERWISE PROCawait
  7231. :
  7232. ENDCASE
  7233. ENDPROC
  7234. :
  7235. REM**********************************************
  7236. :
  7237. DEF PROCrhythmdisplay
  7238. :
  7239. IF longscore$ = "n" THEN finalbar% = (firstbar%+((numbars%/2)))-1 ELSE finalbar% = (firstbar%+(numbars%))-1
  7240. FOR bar% = firstbar% TO finalbar%
  7241. :
  7242. rgroup%(1) = disarray%(bar%,0,voice%)DIV10^3
  7243. rgroup%(2) = ((disarray%(bar%,0,voice%)MOD10^3)*10^3)+(disarray%(bar%,1,voice%)DIV10^6)
  7244. rgroup%(3) = disarray%(bar%,1,voice%)MOD10^6
  7245. rgroup%(4) = disarray%(bar%,2,voice%)DIV10^3
  7246. rgroup%(5) = disarray%(bar%,3,voice%)
  7247. :
  7248. FOR group% = 1 TO 5
  7249. :
  7250. IF rgroup%(group%) <> 0 THEN
  7251. IF group% < 5 THEN
  7252. beat% = rgroup%(group%)DIV10^4
  7253. addition% = (960*factor)*(bar%-firstbar%)
  7254. leftend% = (beat%*beatfactor%)
  7255. grouplength% = ((rgroup%(group%)MOD10^4)DIV10^2)*beatfactor%
  7256. divs% = (rgroup%(group%)MOD10^2)
  7257. rightend% = leftend%+((grouplength%/divs%)*(divs%-1))
  7258. ELSE
  7259. beat% = rgroup%(group%)DIV10^7
  7260. addition% = (960*factor)*(bar%-firstbar%)
  7261. leftend% = (beat%*beatfactor%)
  7262. grouplength% = ((rgroup%(group%)MOD10^7)DIV10^4)*beatfactor%
  7263. divs% = (rgroup%(group%)MOD10^4)
  7264. rightend% = leftend%+((grouplength%/divs%)*(divs%-1))
  7265. ENDIF
  7266. :
  7267. value = divs%/(grouplength%/beatfactor%)
  7268. :
  7269. IF value >= 1 AND value < 2 THEN change% = 0
  7270. IF value >= 2 AND value < 4 THEN change% = 1
  7271. IF value >= 4 AND value < 8 THEN change% = 2
  7272. IF value >= 8 AND value < 16 THEN change% = 3
  7273. IF value >= 0.5 AND value < 1 THEN change% = -1
  7274. IF value >= 0.25 AND value < 0.5 THEN change% = -2
  7275. IF value >= 0.125 AND value < 0.25 THEN change% = -3
  7276. IF value >= 0.0625 AND value < 0.125 THEN change% = -4
  7277. IF value >= 0.03125 AND value < 0.0625 THEN change% = -5
  7278. numbeams% = beams% + change%
  7279. IF numbeams% < 0 THEN numbeams% = 0
  7280. :
  7281. IF longscore$ = "n" THEN v% = 938 + shortbeamposn%(voice%) ELSE v% = actbeamposn%(count%-startv%)
  7282. IF longscore$ = "n" THEN
  7283. IF shortstemdir$(voice%) = "D" THEN x% = -12 ELSE x% = 12
  7284. ELSE IF longstemdir$(voice%) = "D" THEN x% = -12 ELSE x% = 12
  7285. ENDIF
  7286. IF longscore$ = "n" THEN inc% = 80 ELSE inc% = 120
  7287. :
  7288. IF numbeams% > 0 THEN
  7289. :
  7290. left% = (leftend%*factor)+inc%+addition%
  7291. right% = (rightend%*factor)+inc%+addition%
  7292. gap% = (right% - left%)/(divs%-1)
  7293. FOR times% = 1 TO numbeams%
  7294. pt1% = left%
  7295. space = grouplength%/divs%
  7296. pt2% = ((leftend%*factor)+(inc%+2)+((space*factor)))+addition%
  7297. ct% = -1
  7298. power% = (5-times%)
  7299. IF power% < 1 THEN power% = 1
  7300. n% = 2^power%
  7301. WHILE pt2%<= (right%+10)
  7302. ct% += 1
  7303. IF ((ct%+1)/n%*10)MOD10 <> 0 OR times% = 1 THEN
  7304. LINE pt1%,((v%-(524*(system%-1)))-(x%*(times%-1))),pt2%,((v%-(524*(system%-1)))-(x%*(times%-1)))
  7305. LINE pt1%,(((v%-2)-(524*(system%-1)))-(x%*(times%-1))),pt2%,(((v%-2)-(524*(system%-1)))-(x%*(times%-1)))
  7306. LINE pt1%,(((v%-4)-(524*(system%-1)))-(x%*(times%-1))),pt2%,(((v%-4)-(524*(system%-1)))-(x%*(times%-1)))
  7307. REM for beams crossing systems
  7308. IF right% > 1600 THEN crossing$ = "y" ELSE crossing$ = "n"
  7309. IF crossing$ = "y" AND longscore$ = "n" AND system% = 1 THEN
  7310. LINE pt1%-1600+inc%,((v%-(524*(system%-1)))-(x%*(times%-1)))-524,pt2%-1600+inc%,((v%-(524*(system%-1)))-(x%*(times%-1)))-524
  7311. 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
  7312. 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
  7313. ENDIF
  7314. ENDIF
  7315. pt1% = pt2%
  7316. pt2% = ((leftend%*factor)+(inc%+2)+((ct%+2)*(space*factor)))+addition%
  7317. ENDWHILE
  7318. NEXT
  7319. ENDIF
  7320. :
  7321. space = grouplength%/divs%
  7322. IF longscore$ = "y" THEN
  7323. IF longstemdir$(voice%) = "U" THEN dir% = 1 ELSE dir% = -1
  7324. ELSE
  7325. IF shortstemdir$(voice%) = "U" THEN dir% = 1 ELSE dir% = -1
  7326. ENDIF
  7327. :
  7328. FOR counter% = 0 TO (divs%-1)
  7329. REM grouping% adds to length of stems to group in 2's, 4's etc
  7330. grouping% = 0
  7331. CASE shortstemdir$(voice%) OF
  7332. WHEN "D" :
  7333. IF (counter%/2*10)MOD10 = 0 THEN grouping% = -20
  7334. IF (counter%/4*10)MOD10 = 0 THEN grouping% = -40
  7335. IF (counter%/8*10)MOD10 = 0 THEN grouping% = -60
  7336. OTHERWISE
  7337. IF (counter%/2*10)MOD10 = 0 THEN grouping% = 20
  7338. IF (counter%/4*10)MOD10 = 0 THEN grouping% = 40
  7339. IF (counter%/8*10)MOD10 = 0 THEN grouping% = 60
  7340. ENDCASE
  7341. 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%)
  7342. NEXT
  7343. REM routine for groups crossing systems
  7344. IF system% = 1 AND longscore$ = "n" AND crossing$ = "y" THEN
  7345. FOR counter% = 0 TO (divs%-1)
  7346. 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
  7347. :
  7348. NEXT
  7349. ENDIF
  7350. :
  7351. hposition% = (leftend%*factor)+inc%+addition%+(grouplength%/divs%*(divs%-1)/2*factor)
  7352. vposition% =((v%+32)-(524*(system%-1)))
  7353. REM routine for groups crossing systems
  7354. IF hposition% > 2112 THEN
  7355. hposition% = hposition% - 2062
  7356. vposition% = vposition% - 524
  7357. ENDIF
  7358. IF longscore$ = "y" THEN
  7359. IF longstemdir$(voice%) = "D" THEN vposition% -= 50
  7360. ELSE
  7361. IF shortstemdir$(voice%) ="D" THEN vposition% -= 50
  7362. ENDIF
  7363. IF longstemdir$(voice%) = "U" THEN vposition% -= 6
  7364. IF shortstemdir$(voice%) ="U" THEN vposition% -= 6
  7365. :
  7366. grouplength% = grouplength%/beatfactor%
  7367. lownum% = grouplength%
  7368. IF change% = 0 THEN decimal% = 0
  7369. IF change% = 1 THEN lownum% = lownum%*2 : decimal% = 0
  7370. IF change% = 2 THEN lownum% = lownum%*4 : decimal% = 0
  7371. IF change% = 3 THEN lownum% = lownum%*8 : decimal% = 0
  7372. IF change% = -1 THEN lownum = lownum%/2 : decimal% = (lownum*10)MOD10 : lownum% = lownum*1
  7373. IF change% = -2 THEN lownum = lownum%/4 : decimal% = (lownum*10)MOD10 : lownum% = lownum*1
  7374. IF change% = -3 THEN lownum = lownum%/8 : decimal% = (lownum*10)MOD10 : lownum% = lownum*1
  7375. IF change% = -4 THEN lownum = lownum%/16 :decimal% = (lownum*10)MOD10 : lownum% = lownum*1
  7376. IF change% = -5 THEN lownum = lownum%/32 :decimal% = (lownum*10)MOD10 : lownum% = lownum*1
  7377. :
  7378. printname$ = "n"
  7379. WHILE ((divs%/2)*10)MOD10 = 0 AND ((lownum%/2)*10)MOD10 = 0 AND decimal% = 0
  7380. divs% = divs%/2 : lownum% = lownum%/2 : change% -= 1 : printname$ = "y"
  7381. ENDWHILE
  7382. IF change% < -2 THEN printname$ = "y"
  7383. :
  7384. VDU 23,128,32,32,32,32,32,32,32,32
  7385. VDU 23,129,48,40,36,34,32,32,32,32
  7386. VDU 23,130,48,40,36,50,40,36,34,32
  7387. VDU 23,131,36,34,32,32,32,32,32,32
  7388. VDU 23,132,48,40,36,50,40,36,50,40
  7389. VDU 23,133,36,50,40,36,50,32,32,32
  7390. VDU 23,134,36,50,40,36,50,40,36,34
  7391. VDU 23,135,1,1,1,29,63,63,62,28
  7392. VDU 23,136,0,0,1,1,1,1,1,1
  7393. VDU 23,137,1,1,1,29,35,35,34,28
  7394. VDU 23,138,0,0,0,28,34,34,34,28
  7395. :
  7396. MOVE hposition%,vposition%
  7397. IF divs% < 10 THEN VDU 8
  7398. IF divs% >= 10 THEN
  7399. VDU 8 : VDU 8
  7400. ENDIF
  7401. :
  7402. IF decimal% = 0 THEN
  7403. IF divs% <> lownum% THEN
  7404. IF printname$ = "y" THEN
  7405. PRINT ,;divs%;":";lownum%;
  7406. CASE change% OF
  7407. WHEN 3 : PRINT"//////"
  7408. WHEN 2 : PRINT CHR$(134) : MOVE hposition%,vposition%+16
  7409. IF divs% < 10 THEN VDU 8
  7410. IF divs% >= 10 THEN
  7411. VDU 8 : VDU 8
  7412. ENDIF
  7413. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7414. PRINT ,;" ";
  7415. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7416. PRINT CHR$(132)
  7417. WHEN 1 : PRINT CHR$(133) : MOVE hposition%,vposition%+16
  7418. IF divs% < 10 THEN VDU 8
  7419. IF divs% >= 10 THEN
  7420. VDU 8 : VDU 8
  7421. ENDIF
  7422. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7423. PRINT ,;" ";
  7424. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7425. PRINT CHR$(132)
  7426. WHEN 0 : PRINT CHR$(131) : MOVE hposition%,vposition%+16
  7427. IF divs% < 10 THEN VDU 8
  7428. IF divs% >= 10 THEN
  7429. VDU 8 : VDU 8
  7430. ENDIF
  7431. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7432. PRINT ,;" ";
  7433. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7434. PRINT CHR$(132)
  7435. WHEN -1 : PRINT CHR$(128) : MOVE hposition%,vposition%+16
  7436. IF divs% < 10 THEN VDU 8
  7437. IF divs% >= 10 THEN
  7438. VDU 8 : VDU 8
  7439. ENDIF
  7440. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7441. PRINT ,;" ";
  7442. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7443. PRINT CHR$(130)
  7444. WHEN -2 : PRINT CHR$(128) : MOVE hposition%,vposition%+16
  7445. IF divs% < 10 THEN VDU 8
  7446. IF divs% >= 10 THEN
  7447. VDU 8 : VDU 8
  7448. ENDIF
  7449. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7450. PRINT ,;" ";
  7451. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7452. PRINT CHR$(129)
  7453. WHEN -3 : PRINT CHR$(135) : MOVE hposition%,vposition%+16
  7454. IF divs% < 10 THEN VDU 8
  7455. IF divs% >= 10 THEN
  7456. VDU 8 : VDU 8
  7457. ENDIF
  7458. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7459. PRINT ,;" ";
  7460. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7461. PRINT CHR$(136)
  7462. WHEN -4 : PRINT CHR$(137) : MOVE hposition%,vposition%+16
  7463. IF divs% < 10 THEN VDU 8
  7464. IF divs% >= 10 THEN
  7465. VDU 8 : VDU 8
  7466. ENDIF
  7467. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7468. PRINT ,;" ";
  7469. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7470. PRINT CHR$(136)
  7471. WHEN -5 : PRINT CHR$(138)
  7472. OTHERWISE
  7473. ENDCASE
  7474. ELSE PRINT ,;divs%;":";lownum%
  7475. ENDIF
  7476. ENDIF
  7477. ELSE PRINT ,;divs%;":";lownum%;".";decimal%;
  7478. CASE change% OF
  7479. WHEN -1 : PRINT CHR$(128) : MOVE hposition%,vposition%+16
  7480. IF divs% < 10 THEN VDU 8
  7481. IF divs% >= 10 THEN
  7482. VDU 8 : VDU 8
  7483. ENDIF
  7484. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7485. PRINT ,;" ";".";decimal%;
  7486. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7487. PRINT CHR$(130)
  7488. WHEN -2 : PRINT CHR$(128) : MOVE hposition%,vposition%+16
  7489. IF divs% < 10 THEN VDU 8
  7490. IF divs% >= 10 THEN
  7491. VDU 8 : VDU 8
  7492. ENDIF
  7493. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7494. PRINT ,;" ";".";decimal%;
  7495. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7496. PRINT CHR$(129)
  7497. WHEN -3 : PRINT CHR$(135) : MOVE hposition%,vposition%+16
  7498. IF divs% < 10 THEN VDU 8
  7499. IF divs% >= 10 THEN
  7500. VDU 8 : VDU 8
  7501. ENDIF
  7502. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7503. PRINT ,;" ";".";decimal%;
  7504. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7505. PRINT CHR$(136)
  7506. WHEN -4 : PRINT CHR$(137) : MOVE hposition%,vposition%+16
  7507. IF divs% < 10 THEN VDU 8
  7508. IF divs% >= 10 THEN
  7509. VDU 8 : VDU 8
  7510. ENDIF
  7511. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7512. PRINT ,;" ";".";decimal%;
  7513. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7514. PRINT CHR$(136)
  7515. WHEN -5 : PRINT CHR$(138)
  7516. OTHERWISE
  7517. ENDCASE
  7518. ENDCASE
  7519. ENDIF
  7520. :
  7521. REM routine for groups crossing systems
  7522. IF system% = 1 AND longscore$ = "n" AND crossing$ = "y" THEN
  7523. MOVE hposition%-1600+inc%,vposition%-524
  7524. IF divs% < 10 THEN VDU 8
  7525. IF divs% >= 10 THEN
  7526. VDU 8 : VDU 8
  7527. ENDIF
  7528. :
  7529. IF decimal% = 0 THEN
  7530. IF divs% <> lownum% THEN
  7531. IF printname$ = "y" THEN
  7532. PRINT ,;divs%;":";lownum%;
  7533. CASE change% OF
  7534. WHEN 3 : PRINT"//////"
  7535. WHEN 2 : PRINT CHR$(134) : MOVE hposition%-1600+inc%,vposition%+16-524
  7536. IF divs% < 10 THEN VDU 8
  7537. IF divs% >= 10 THEN
  7538. VDU 8 : VDU 8
  7539. ENDIF
  7540. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7541. PRINT ,;" ";
  7542. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7543. PRINT CHR$(132)
  7544. WHEN 1 : PRINT CHR$(133) : MOVE hposition%-1600+inc%,vposition%+16-524
  7545. IF divs% < 10 THEN VDU 8
  7546. IF divs% >= 10 THEN
  7547. VDU 8 : VDU 8
  7548. ENDIF
  7549. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7550. PRINT ,;" ";
  7551. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7552. PRINT CHR$(132)
  7553. WHEN 0 : PRINT CHR$(131) : MOVE hposition%-1600+inc%,vposition%+16-524
  7554. IF divs% < 10 THEN VDU 8
  7555. IF divs% >= 10 THEN
  7556. VDU 8 : VDU 8
  7557. ENDIF
  7558. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7559. PRINT ,;" ";
  7560. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7561. PRINT CHR$(132)
  7562. WHEN -1 : PRINT CHR$(128) : MOVE hposition%-1600+inc%,vposition%+16-524
  7563. IF divs% < 10 THEN VDU 8
  7564. IF divs% >= 10 THEN
  7565. VDU 8 : VDU 8
  7566. ENDIF
  7567. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7568. PRINT ,;" ";
  7569. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7570. PRINT CHR$(130)
  7571. WHEN -2 : PRINT CHR$(128) : MOVE hposition%-1600+inc%,vposition%+16-524
  7572. IF divs% < 10 THEN VDU 8
  7573. IF divs% >= 10 THEN
  7574. VDU 8 : VDU 8
  7575. ENDIF
  7576. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7577. PRINT ,;" ";
  7578. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7579. PRINT CHR$(129)
  7580. WHEN -3 : PRINT CHR$(135) : MOVE hposition%-1600+inc%,vposition%+16-524
  7581. IF divs% < 10 THEN VDU 8
  7582. IF divs% >= 10 THEN
  7583. VDU 8 : VDU 8
  7584. ENDIF
  7585. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7586. PRINT ,;" ";
  7587. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7588. PRINT CHR$(136)
  7589. WHEN -4 : PRINT CHR$(137) : MOVE hposition%-1600+inc%,vposition%+16-524
  7590. IF divs% < 10 THEN VDU 8
  7591. IF divs% >= 10 THEN
  7592. VDU 8 : VDU 8
  7593. ENDIF
  7594. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7595. PRINT ,;" ";
  7596. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7597. PRINT CHR$(136)
  7598. WHEN -5 : PRINT CHR$(138)
  7599. OTHERWISE
  7600. ENDCASE
  7601. ELSE PRINT ,;divs%;":";lownum%
  7602. ENDIF
  7603. ENDIF
  7604. ELSE PRINT ,;divs%;":";lownum%;".";decimal%;
  7605. CASE change% OF
  7606. WHEN -1 : PRINT CHR$(128) : MOVE hposition%-1600+inc%,vposition%+16-524
  7607. IF divs% < 10 THEN VDU 8
  7608. IF divs% >= 10 THEN
  7609. VDU 8 : VDU 8
  7610. ENDIF
  7611. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7612. PRINT ,;" ";".";decimal%;
  7613. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7614. PRINT CHR$(130)
  7615. WHEN -2 : PRINT CHR$(128) : MOVE hposition%-1600+inc%,vposition%+16-524
  7616. IF divs% < 10 THEN VDU 8
  7617. IF divs% >= 10 THEN
  7618. VDU 8 : VDU 8
  7619. ENDIF
  7620. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7621. PRINT ,;" ";".";decimal%;
  7622. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7623. PRINT CHR$(129)
  7624. WHEN -3 : PRINT CHR$(135) : MOVE hposition%-1600,+inc%,vposition%+16-524
  7625. IF divs% < 10 THEN VDU 8
  7626. IF divs% >= 10 THEN
  7627. VDU 8 : VDU 8
  7628. ENDIF
  7629. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7630. PRINT ,;" ";".";decimal%;
  7631. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7632. PRINT CHR$(136)
  7633. WHEN -4 : PRINT CHR$(137) : MOVE hposition%-1600+inc%,vposition%+16-524
  7634. IF divs% < 10 THEN VDU 8
  7635. IF divs% >= 10 THEN
  7636. VDU 8 : VDU 8
  7637. ENDIF
  7638. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7639. PRINT ,;" ";".";decimal%;
  7640. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7641. PRINT CHR$(136)
  7642. WHEN -5 : PRINT CHR$(138)
  7643. OTHERWISE
  7644. ENDCASE
  7645. ENDCASE
  7646. ENDIF
  7647. ENDIF
  7648. :
  7649. ENDIF
  7650. NEXT
  7651. :
  7652. NEXT
  7653. :
  7654. ENDPROC
  7655. :
  7656. REM*******************************************************
  7657. :
  7658. DEF PROCdisplaysubmenu
  7659. :
  7660. IF easiermenus$ = "n" THEN
  7661. PROCwindow(20,66,60,39)
  7662. CLS : OFF
  7663. PRINT'" Notehead sizes N"
  7664. PRINT " Longscore/Shortscore L"
  7665. PRINT " Stem lengths S"
  7666. PRINT " Beats posns/frequecy P"
  7667. PRINT " Beat numbers/diffs I"
  7668. PRINT " Beat numbers/diffs unit J"
  7669. PRINT " Dynamics positions F"
  7670. PRINT " Note number freq G"
  7671. PRINT " Bar numbers Z"
  7672. PRINT " Intervals settings Q"
  7673. PRINT " Remove: "
  7674. PRINT " staves, ledgers, clefs C"
  7675. PRINT " lower stave (shrt sc) U"
  7676. PRINT " barlines B"
  7677. PRINT " beats T"
  7678. PRINT " names, voice numbers V"
  7679. PRINT " accidentals A"
  7680. PRINT " stems, beams R"
  7681. PRINT " durations D"
  7682. PRINT " amplitudes M"
  7683. PRINT " beat numbers (n,1st,y) O"
  7684. PRINT " notenumbers H"
  7685. PRINT " notenames E"
  7686. PRINT " intervals K"
  7687. PRINT " play screen renew Y"
  7688. PRINT " all except noteheads X"
  7689. ELSE
  7690. PROCwindow(20,66,60,12)
  7691. CLS : OFF
  7692. PRINT'" Notehead sizes N"
  7693. PRINT '" Longscore/Shortscore L"
  7694. PRINT '" Stem lengths S"
  7695. PRINT '" Beats posns/frequecy P"
  7696. PRINT '" Beat numbers/diffs I"
  7697. PRINT '" Beat numbers/diffs unit J"
  7698. PRINT '" Dynamics positions F"
  7699. PRINT '" Note number freq G"
  7700. PRINT '" Bar numbers Z"
  7701. PRINT '" Intervals settings Q"
  7702. PRINT '" Remove: "
  7703. PRINT '" staves, ledgers, clefs C"
  7704. PRINT '" lower stave (shrt sc) U"
  7705. PRINT '" barlines B"
  7706. PRINT '" beats T"
  7707. PRINT '" names, voice numbers V"
  7708. PRINT '" accidentals A"
  7709. PRINT '" stems, beams R"
  7710. PRINT '" durations D"
  7711. PRINT '" dynamics M"
  7712. PRINT '" beat numbers (n,1st,y) O"
  7713. PRINT '" notenumbers H"
  7714. PRINT '" notenames E"
  7715. PRINT '" intervals K"
  7716. PRINT '" play screen renew Y"
  7717. PRINT '" all except noteheads X"
  7718. ENDIF
  7719. :
  7720. CASE GET$ OF
  7721. WHEN "E","e" :
  7722. IF notenames$ = "y" THEN notenames$ = "n" ELSE notenames$ = "y"
  7723. WHEN "N","n" :
  7724. CLS
  7725. PRINT'" What size note-heads? (B/S/V) "
  7726. CASE GET$ OF
  7727. WHEN "B","b" : notehead$ = "big"
  7728. WHEN "S","s" : notehead$ = "small"
  7729. WHEN "V","v" : notehead$ = "vsmall"
  7730. ENDCASE
  7731. WHEN "L","l" :
  7732. IF longscore$ = "n" THEN longscore$ = "y" ELSE longscore$ = "n"
  7733. IF longscore$ = "n" THEN
  7734. startv1% = startv% : startv% =1
  7735. ELSE startv% = startv1%
  7736. ENDIF
  7737. WHEN "S","s" :
  7738. CLS
  7739. INPUT'" Which voice "voys%
  7740. voys% -= 1
  7741. PRINT'" stems to end how many"
  7742. PRINT" octaves from top"
  7743. INPUT" stave-line (0,1,-1 etc) "st
  7744. INPUT " stems up or down (U/D)"stemdir$
  7745. IF longscore$ = "n" THEN
  7746. shortbeamposn%(voys%) = st*56
  7747. IF shortbeamposn%(voys%) <= -112 THEN shortbeamposn%(voys%)-=48
  7748. shortstemdir$(voys%) = stemdir$
  7749. ENDIF
  7750. IF longscore$ = "y" THEN
  7751. longbeamposn%(voys%) = st*56
  7752. longstemdir$(voys%) = stemdir$
  7753. ENDIF
  7754. :
  7755. WHEN "P","p" :
  7756. CLS
  7757. PRINT'" Beats positions or frequecy (P/F)"
  7758. CASE GET$ OF
  7759. WHEN "P","p" :
  7760. INPUT'" Upper or lower beats (U/L)"whichset$
  7761. PRINT '" up or down by how many"
  7762. INPUT " stave-lines (1,-1 etc)"move%
  7763. IF whichset$ = "U" THEN
  7764. longbeatsupper% += (move%*16)
  7765. ELSE longbeatslower% += (move%*16)
  7766. ENDIF
  7767. OTHERWISE
  7768. PRINT'" Beats frequency doubled/halved (+/-) "
  7769. CASE GET$ OF
  7770. WHEN "+","=" : beatstep% = beatstep%/2
  7771. WHEN "_","-" : beatstep% = beatstep%*2
  7772. OTHERWISE
  7773. ENDCASE
  7774. :
  7775. ENDCASE
  7776. :
  7777. WHEN "Z","z" : CLS : INPUT'" Bar nos how often (1,2 etc) "barnosoften%
  7778. WHEN "Y","y" :
  7779. IF playnewscreen$ = "y" THEN playnewscreen$ = "n" ELSE playnewscreen$ = "y"
  7780. WHEN "I","i" :
  7781. IF beatnum_diff$ = "num" THEN beatnum_diff$ = "diff" ELSE beatnum_diff$ = "num"
  7782. WHEN "J","j" :
  7783. IF beatunits$ = "big" THEN beatunits$ = "small" ELSE beatunits$ = "big"
  7784. WHEN "C","c" :
  7785. IF staves$ = "y" THEN staves$ = "n" ELSE staves$ = "y"
  7786. WHEN "B","b" :
  7787. IF barlines$ = "y" THEN barlines$ = "n" ELSE barlines$ = "y"
  7788. WHEN "T","t" :
  7789. IF beats$ = "y" THEN beats$ = "n" ELSE beats$ = "y"
  7790. WHEN "U","u" :
  7791. IF lowerstave$ = "y" THEN lowerstave$ = "n" ELSE lowerstave$ = "y"
  7792. WHEN "V","v" :
  7793. IF names$ = "y" THEN names$ = "n" ELSE names$ = "y"
  7794. WHEN "A","a" :
  7795. IF accidentals$ = "y" THEN accidentals$ = "n" ELSE accidentals$ = "y"
  7796. WHEN "R","r" :
  7797. IF stems$ = "y" THEN stems$ = "n" ELSE stems$ = "y"
  7798. WHEN "D","d" :
  7799. IF durations$ = "y" THEN durations$ = "n" ELSE durations$ = "y"
  7800. WHEN "M","m" :
  7801. CASE amplitudes$ OF
  7802. WHEN "n" : amplitudes$ = "y"
  7803. WHEN "y" : amplitudes$ = "stepped"
  7804. WHEN "stepped" : amplitudes$ = "n"
  7805. ENDCASE
  7806. WHEN "O","o" :
  7807. CASE beatnumbers$ OF
  7808. WHEN "y" : beatnumbers$ = "n"
  7809. WHEN "n" : beatnumbers$ = "first"
  7810. WHEN "first" : beatnumbers$ = "y"
  7811. ENDCASE
  7812. WHEN "H","h" :
  7813. CASE notenumbers$ OF
  7814. WHEN "last" : notenumbers$ = "n"
  7815. WHEN "y" : notenumbers$ = "last"
  7816. WHEN "from1" : notenumbers$ = "y"
  7817. WHEN "n" : notenumbers$ = "from1"
  7818. ENDCASE
  7819. WHEN "F","f" :
  7820. CLS
  7821. INPUT'" Which voice "voys%
  7822. voys% -= 1
  7823. PRINT' " dynamics up/down by how many "
  7824. INPUT " stave-lines (1,-1 etc) "dy%
  7825. dy% = dy%*16
  7826. IF longscore$ = "y" THEN
  7827. longamppos%(voys%) += dy%
  7828. ELSE shortamppos%(voys%) += dy%
  7829. ENDIF
  7830. WHEN "G","g" :
  7831. CLS
  7832. PRINT'" Note numbers every 1/2/4/10 notes (0 = 10) "
  7833. CASE GET$ OF
  7834. WHEN "1" : nosevery% = 1
  7835. WHEN "2" : nosevery% = 2
  7836. WHEN "4" : nosevery% = 4
  7837. OTHERWISE nosevery% = 10
  7838. ENDCASE
  7839. INPUT' " starting at note number "startnos%
  7840. :
  7841. WHEN "Q","q" :
  7842. CLS
  7843. PRINT'" Set number/type of intervals displayed"
  7844. PRINT" or compound reduction point? (N/C)"
  7845. CASE GET$ OF
  7846. WHEN "N","n" :
  7847. PRINT'" Display intervals for how"
  7848. INPUT" many previous notes "numintervals%
  7849. PRINT'" Semitones, quartertones, "
  7850. PRINT" eighthtones or cents (S/Q/E/C) "
  7851. CASE GET$ OF
  7852. WHEN "S","s" : typeintervals$ = "s"
  7853. WHEN "Q","q" : typeintervals$ = "q"
  7854. WHEN "E","e" : typeintervals$ = "e"
  7855. WHEN "C","c" : typeintervals$ = "c"
  7856. ENDCASE
  7857. WHEN "C","c" :
  7858. PRINT'" Above which interval should"
  7859. PRINT" compounds be reduced for "
  7860. INPUT" the current interval type "compound%
  7861. CASE typeintervals$ OF
  7862. WHEN "s" : compoundpitch% = compound%
  7863. WHEN "q" : compoundquarter% = compound%
  7864. WHEN "e" : compoundeighth% = compound%
  7865. WHEN "c" : compoundcent% = compound%
  7866. ENDCASE
  7867. ENDCASE
  7868. WHEN "K","k" :
  7869. IF displayintervals$ = "y" THEN displayintervals$ = "n" ELSE displayintervals$ = "y"
  7870. WHEN "X","x" :
  7871. IF xoption$ = "y" THEN xoption$ = "n" ELSE xoption$ = "y"
  7872. IF xoption$ = "y" THEN
  7873. staves$ = "y" : barlines$ = "y" : beats$ = "y" : names$ = "y"
  7874. accidentals$ = "y" : stems$ = "y" : durations$ = "y"
  7875. amplitudes$ = "y" : envelopes$ = "y" : glissandos$ = "y"
  7876. beatnumbers$ = "y"
  7877. ELSE
  7878. staves$ = "n" : barlines$ = "n" : beats$ = "n" : names$ = "n"
  7879. accidentals$ = "n" : stems$ = "n" : durations$ = "n"
  7880. amplitudes$ = "n" : envelopes$ = "n" : glissandos$ = "n"
  7881. beatnumbers$ = "n"
  7882. ENDIF
  7883. OTHERWISE VDU 7 : PROCdisplaysubmenu
  7884. ENDCASE
  7885. ON
  7886. PROCdisplay
  7887. ENDPROC
  7888. :
  7889. REM*********************************************************
  7890. :
  7891. DEF PROCclef(numstaves%,staves%(1),staves%(2),staves%(3),staves%(4),staves%(5),staves%(6),clefcomb$)
  7892. :
  7893. IF staves$ = "y" THEN
  7894. FOR count% = 1 TO numstaves%
  7895. IF MID$(clefcomb$,count%,1) = "T" OR MID$(clefcomb$,count%,1) = "P" THEN
  7896. LINE 48,staves%(count%)+20,52,staves%(count%)+20
  7897. LINE 44,staves%(count%)+16,56,staves%(count%)+16
  7898. LINE 42,staves%(count%)+12,52,staves%(count%)+12
  7899. LINE 58,staves%(count%)+12,58,staves%(count%)+12
  7900. LINE 40,staves%(count%)+8,48,staves%(count%)+8
  7901. LINE 58,staves%(count%)+8,58,staves%(count%)+8
  7902. LINE 40,staves%(count%)+4,42,staves%(count%)+4
  7903. LINE 58,staves%(count%)+4,58,staves%(count%)+4
  7904. LINE 38,staves%(count%)+0,40,staves%(count%)+0
  7905. LINE 54,staves%(count%)+0,56,staves%(count%)+0
  7906. LINE 38,staves%(count%)-4,38,staves%(count%)-4
  7907. LINE 50,staves%(count%)-4,54,staves%(count%)-4
  7908. LINE 38,staves%(count%)-8,38,staves%(count%)-8
  7909. LINE 46,staves%(count%)-8,52,staves%(count%)-8
  7910. LINE 36,staves%(count%)-12,52,staves%(count%)-12
  7911. LINE 32,staves%(count%)-16,50,staves%(count%)-16
  7912. LINE 24,staves%(count%)-20,44,staves%(count%)-20
  7913. LINE 20,staves%(count%)-24,42,staves%(count%)-24
  7914. LINE 14,staves%(count%)-28,26,staves%(count%)-28
  7915. LINE 42,staves%(count%)-28,42,staves%(count%)-28
  7916. LINE 12,staves%(count%)-32,22,staves%(count%)-32
  7917. LINE 42,staves%(count%)-32,42,staves%(count%)-32
  7918. LINE 12,staves%(count%)-36,22,staves%(count%)-36
  7919. LINE 34,staves%(count%)-36,52,staves%(count%)-36
  7920. LINE 10,staves%(count%)-40,18,staves%(count%)-40
  7921. LINE 30,staves%(count%)-40,56,staves%(count%)-40
  7922. LINE 10,staves%(count%)-44,14,staves%(count%)-44
  7923. LINE 24,staves%(count%)-44,32,staves%(count%)-44
  7924. LINE 42,staves%(count%)-44,42,staves%(count%)-44
  7925. LINE 56,staves%(count%)-44,60,staves%(count%)-44
  7926. LINE 10,staves%(count%)-48,14,staves%(count%)-48
  7927. LINE 24,staves%(count%)-48,32,staves%(count%)-48
  7928. LINE 42,staves%(count%)-48,42,staves%(count%)-48
  7929. LINE 56,staves%(count%)-48,60,staves%(count%)-48
  7930. LINE 10,staves%(count%)-52,16,staves%(count%)-52
  7931. LINE 24,staves%(count%)-52,26,staves%(count%)-52
  7932. LINE 42,staves%(count%)-52,42,staves%(count%)-52
  7933. LINE 56,staves%(count%)-52,60,staves%(count%)-52
  7934. LINE 12,staves%(count%)-56,16,staves%(count%)-56
  7935. LINE 28,staves%(count%)-56,30,staves%(count%)-56
  7936. LINE 42,staves%(count%)-56,42,staves%(count%)-56
  7937. LINE 56,staves%(count%)-56,60,staves%(count%)-56
  7938. LINE 18,staves%(count%)-60,22,staves%(count%)-60
  7939. LINE 42,staves%(count%)-60,42,staves%(count%)-60
  7940. LINE 52,staves%(count%)-60,58,staves%(count%)-60
  7941. LINE 22,staves%(count%)-64,54,staves%(count%)-64
  7942. LINE 42,staves%(count%)-68,42,staves%(count%)-68
  7943. LINE 42,staves%(count%)-72,42,staves%(count%)-72
  7944. LINE 22,staves%(count%)-76,28,staves%(count%)-76
  7945. LINE 42,staves%(count%)-76,42,staves%(count%)-76
  7946. LINE 18,staves%(count%)-80,32,staves%(count%)-80
  7947. LINE 42,staves%(count%)-80,42,staves%(count%)-80
  7948. LINE 14,staves%(count%)-84,28,staves%(count%)-84
  7949. LINE 44,staves%(count%)-84,44,staves%(count%)-84
  7950. LINE 14,staves%(count%)-88,22,staves%(count%)-88
  7951. LINE 44,staves%(count%)-88,44,staves%(count%)-88
  7952. LINE 24,staves%(count%)-92,42,staves%(count%)-92
  7953. IF MID$(clefcomb$,count%,1) = "P" THEN
  7954. MOVE 42,staves%(count%)+44
  7955. PRINT;"8"
  7956. ENDIF
  7957. ENDIF
  7958. IF MID$(clefcomb$,count%,1) = "B" OR MID$(clefcomb$,count%,1) = "D" THEN
  7959. LINE 20,staves%(count%)-4,38,staves%(count%)-4
  7960. LINE 16,staves%(count%)-8,18,staves%(count%)-8
  7961. LINE 38,staves%(count%)-8,44,staves%(count%)-8
  7962. LINE 58,staves%(count%)-8,60,staves%(count%)-8
  7963. LINE 12,staves%(count%)-12,24,staves%(count%)-12
  7964. LINE 40,staves%(count%)-12,48,staves%(count%)-12
  7965. LINE 12,staves%(count%)-16,28,staves%(count%)-16
  7966. LINE 40,staves%(count%)-16,48,staves%(count%)-16
  7967. LINE 16,staves%(count%)-20,28,staves%(count%)-20
  7968. LINE 40,staves%(count%)-20,48,staves%(count%)-20
  7969. LINE 20,staves%(count%)-24,24,staves%(count%)-24
  7970. LINE 40,staves%(count%)-24,48,staves%(count%)-24
  7971. LINE 58,staves%(count%)-24,60,staves%(count%)-24
  7972. LINE 40,staves%(count%)-28,48,staves%(count%)-28
  7973. LINE 40,staves%(count%)-32,48,staves%(count%)-32
  7974. LINE 36,staves%(count%)-36,44,staves%(count%)-36
  7975. LINE 32,staves%(count%)-40,40,staves%(count%)-40
  7976. LINE 28,staves%(count%)-44,34,staves%(count%)-44
  7977. LINE 20,staves%(count%)-48,30,staves%(count%)-48
  7978. LINE 10,staves%(count%)-52,18,staves%(count%)-52
  7979. IFMID$(clefcomb$,count%,1) = "D" THEN
  7980. MOVE 10,staves%(count%)-56
  7981. PRINT;"8"
  7982. ENDIF
  7983. ENDIF
  7984. NEXT
  7985. ENDIF
  7986. :
  7987. IF names$ = "y" THEN
  7988. stave% = 1
  7989. FOR count% = 0 TO lastcount%
  7990. IF MID$(clefcomb$,count%+1,1) = "P" THEN MOVE 20,staves%(stave%)+78 ELSE MOVE 20,staves%(stave%)+58
  7991. PRINT longinsts$(count%,0);
  7992. PRINT;"(";displayvoices%(startv%+count%);")" : REM voice number
  7993. stave% += EVAL(MID$(stavecombination$,count%+1,1))
  7994. NEXT
  7995. ENDIF
  7996. :
  7997. REM defining actamppos%() values
  7998. stave% = 1
  7999. FOR count% = 0 TO lastcount%
  8000. IF MID$(stavecombination$,count%+1,1) = "1" THEN
  8001. actamppos%(displayvoices%(startv%+count%)) = staves%(stave%)-128+longamppos%(displayvoices%(startv%+count%)-1)
  8002. ELSE actamppos%(displayvoices%(startv%+count%)) = staves%(stave%)-224+longamppos%(displayvoices%(startv%+count%)-1)
  8003. ENDIF
  8004. stave% += EVAL(MID$(stavecombination$,count%+1,1))
  8005. NEXT
  8006. :
  8007. :
  8008. REM barlines
  8009. IF barlines$ = "y" THEN
  8010. stave% = 1
  8011. FOR system% = 0 TO lastcount%
  8012. FOR barline% = 1 TO numbars%
  8013. horpos% = (960*barline%*factor)+80
  8014. IF notehead$ = "small" THEN horpos% += 16
  8015. IF notehead$ = "vsmall" THEN horpos% += 24
  8016. FOR thickness% = 2 TO 8 STEP 2
  8017. IF MID$(stavecombination$,system%+1,1) = "1" THEN
  8018. LINE horpos%+thickness%,staves%(stave%),horpos%+thickness%,staves%(stave%)-64
  8019. ELSE
  8020. LINE horpos%+thickness%,staves%(stave%),horpos%+thickness%,staves%(stave%)-160
  8021. ENDIF
  8022. NEXT
  8023. REM bar nos
  8024. IF printing$ = "n" THEN GCOL 3
  8025. IF tempi%(startbar%) <> tempi%(startbar%-1) THEN
  8026. MOVE 40,1145 : PRINT "b.";startbar%;" MM.";tempi%(startbar%)
  8027. ELSE MOVE 40,1145 : PRINT "b.";startbar%;" (MM.";tempi%(startbar%);")"
  8028. ENDIF
  8029. IF remarks$(startbar%,0) <> "" OR remarks$(startbar%,1) <> "" THEN
  8030. MOVE 40,1120 : PRINT remarks$(startbar%,0) : MOVE 40,1095 : PRINT remarks$(startbar%,1)
  8031. ENDIF
  8032. IF printing$ = "n" THEN GCOL 0
  8033. IF system% = 0 THEN
  8034. IF printing$ = "n" THEN GCOL 3
  8035. IF tempi%(startbar%+barline%) <> tempi%(startbar%+barline%-1) THEN
  8036. MOVE horpos%-125,1145 : PRINT startbar%+barline%;" MM.";tempi%(startbar%+barline%)
  8037. ELSE IF barline% MOD barnosoften% = 0 THEN MOVE horpos%-125,1145 : PRINT startbar%+barline%
  8038. ENDIF
  8039. IF remarks$(startbar%+barline%,0) <> "" OR remarks$(startbar%+barline%,1) <> "" THEN
  8040. MOVE horpos%,1120 : PRINT remarks$(startbar%+barline%,0)
  8041. MOVE horpos%,1095 : PRINT remarks$(startbar%+barline%,1)
  8042. ENDIF
  8043. REM print duration at bottom right
  8044. IF seeduration$ = "y" THEN
  8045. IF startbar% + barline% = startbar% + numbars% - 1 THEN
  8046. totaldur = 0
  8047. FOR count% = 1 TO startbar% + numbars% - 1
  8048. duration = 60/tempi%(count%)
  8049. totaldur = totaldur + duration
  8050. NEXT
  8051. totaldur% = totaldur
  8052. mins% = totaldur% DIV 60
  8053. secs% = totaldur% - (mins%*60)
  8054. MOVE 1200,50 : PRINT "duration ";mins%;" mins ";secs%;" secs"
  8055. ENDIF
  8056. ENDIF
  8057. IF printing$ = "n" THEN GCOL 0
  8058. ENDIF
  8059. NEXT
  8060. stave% += EVAL(MID$(stavecombination$,system%+1,1))
  8061. NEXT
  8062. ENDIF
  8063. :
  8064. ENDPROC
  8065. :
  8066. REM*************************************************
  8067. :
  8068. DEF PROClongvalue(pos%(0),pos%(1),pos%(2),clefcomb$)
  8069. :
  8070. staff% = 1
  8071. finish% = endv%-startv%
  8072. IF finish% > 2 THEN finish% = 2
  8073. FOR ct% = 0 TO finish%
  8074. CASE MID$(clefcomb$,staff%,1) OF
  8075. WHEN "P" : decrement% = 360
  8076. WHEN "T" : decrement% = 304
  8077. WHEN "B" : decrement% = 208
  8078. WHEN "D" : decrement% = 152
  8079. ENDCASE
  8080. value%(ct%) = pos%(ct%) - decrement%
  8081. staff% += EVAL(MID$(stavecombination$,ct%+1,1))
  8082. NEXT
  8083. :
  8084. FOR ct% = 0 TO finish%
  8085. actbeamposn%(ct%) = longbeamposn%(displayvoices%(startv%+ct%)-1) + pos%(ct%)
  8086. NEXT
  8087. ENDPROC
  8088. :
  8089. REM*************************************************
  8090. :
  8091. DEF PROCconvertdur
  8092. :
  8093. REM converts dur% from beats to 1/20ths of a second
  8094. converter = (60 * 20)/(tempi%(barno%) * 960)
  8095. dur = dur% * converter
  8096. fraction = ((dur*10)DIV1)MOD10
  8097. IF fraction>4 THEN dur% = dur+1 ELSE dur% = dur
  8098. IF dur% = 0 THEN dur% = 1
  8099. IF dur% > 999 THEN dur% = 998 : REM max 3 array cells available
  8100. :
  8101. ENDPROC
  8102. :
  8103. REM**********************************************
  8104. :
  8105. DEF PROCreconvertdur
  8106. :
  8107. converter = (60 * 20)/(tempi%(brrr%) * 960)
  8108. dur% = dur%/converter
  8109. :
  8110. ENDPROC
  8111. :
  8112. REM************************************************
  8113. :
  8114. DEF PROCseriesdurations
  8115. :
  8116. IF easiermenus$ = "n" THEN PROCwindow(20,69,60,55) ELSE PROCwindow(20,69,60,42)
  8117. CLS
  8118. PRINT'" How many durations (for 1 press 0) "
  8119. PRINT'" (to fill gaps between attacks "
  8120. PRINT'" press 111 or to half-fill gaps "
  8121. INPUT'" between attacks press 222) "numdurations%
  8122. IF numdurations% = 0 THEN numdurations% = 1
  8123. IF numdurations% = 111 OR numdurations% = 222 THEN PROCdurationsbetween
  8124. :
  8125. IF numdurations% = 1 THEN
  8126. PRINT'" the duration is:" : INPUT' " bars "b% : INPUT' " beats "beats%
  8127. PROCalterbeats : dur% = (b%*960)+beats%
  8128. durations%(0) = dur%
  8129. ELSE
  8130. PRINT'" Are all the durations the same?"
  8131. PRINT'" (no = n/2)"
  8132. CASE GET$ OF
  8133. WHEN "N","n","2"
  8134. FOR count% = 0 TO (numdurations% - 1)
  8135. PRINT'" duration ";count%;" is:"
  8136. INPUT'" bars "b%
  8137. INPUT'" beats "beats% : PROCalterbeats
  8138. dur% = (b%*960)+beats%
  8139. durations%(count%) = dur%
  8140. NEXT
  8141. OTHERWISE
  8142. : PRINT'" the duration is:" : INPUT' " bars "b% : INPUT' " beats "beats%
  8143. PROCalterbeats : dur% = (b%*960)+beats%
  8144. FOR count% = 0 TO (numdurations%-1) : durations%(count%) = dur% : NEXT
  8145. ENDCASE
  8146. ENDIF
  8147. :
  8148. REM function can feed durats similarly into durations%()
  8149. :
  8150. PROCinsertdurations
  8151. :
  8152. ENDPROC
  8153. :
  8154. REM***********************************************
  8155. :
  8156. DEF PROCinsertdurations
  8157. :
  8158. CLS
  8159. IF seequery$ = "y" THEN
  8160. PRINT'" Do you want to read these "
  8161. PRINT " durations into the array? "
  8162. CASE GET$ OF
  8163. WHEN "N","n" : PROCdisplay : REM durations%() remains intact
  8164. OTHERWISE
  8165. ENDCASE
  8166. ENDIF : REM seequery$
  8167. :
  8168. IF screenvoices$ = "n" THEN
  8169. INPUT' " Which voice (0 = top)"voice%
  8170. IF voice% = 0 THEN PROCpressenter
  8171. ELSE
  8172. PRINT'" Which screen voice "
  8173. CASE GET$ OF
  8174. WHEN "1" : voice% = 1
  8175. WHEN "2" : voice% = 2
  8176. WHEN "3" : voice% = 3
  8177. OTHERWISE PROCpressenter
  8178. ENDCASE
  8179. ENDIF
  8180. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  8181. voice% -= 1
  8182. IF voice% >= 0 THEN samevoice% = voice%
  8183. IF voice% = -1 THEN voice% = samevoice%
  8184. :
  8185. IF quickcopy$ = "n" THEN
  8186. INPUT'" Starting at bar number "bars%
  8187. INPUT " beat "beats% : PROCalterbeats
  8188. startat% = (bars%*(10^3))+beats%
  8189. ELSE
  8190. INPUT ' " starting at note number (0 counts as 1) "along%
  8191. IF along% = 0 THEN along% = 1
  8192. along%-=1
  8193. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  8194. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  8195. beats% = copystartbeat%
  8196. PROCalterbeats
  8197. startat% = (copystartbar%*(10^3))+beats%
  8198. ENDIF
  8199. :
  8200. PROCsearch(startat%)
  8201. shunt$ = "N"
  8202. :
  8203. FOR count% = startcell% TO (startcell%+(numdurations%-1))
  8204. PROCcellfill(count%,voice%,999,999,999,9,999,durations%(count%-startcell%),99,99)
  8205. NEXT
  8206. :
  8207. PROCdisplay
  8208. :
  8209. ENDPROC
  8210. :
  8211. REM*************************************************
  8212. :
  8213. DEF PROCinsertamplitudes
  8214. :
  8215. CLS
  8216. repeatposit$ = "n"
  8217. IF seequery$ = "y" THEN
  8218. PRINT'" Do you want to read these amplitudes "
  8219. PRINT " into the array? "
  8220. CASE GET$ OF
  8221. WHEN "N","n" : PROCdisplay : REM amplitudes%()) remains intact
  8222. OTHERWISE
  8223. ENDCASE
  8224. ENDIF : REM seequery$
  8225. :
  8226. IF ampmethod$ = "sample" THEN
  8227. IF screenvoices$ = "n" THEN
  8228. INPUT' " Which voice (0 = top)"voice%
  8229. IF voice% = 0 THEN PROCpressenter
  8230. ELSE
  8231. PRINT'" Which screen voice "
  8232. CASE GET$ OF
  8233. WHEN "1" : voice% = 1
  8234. WHEN "2" : voice% = 2
  8235. WHEN "3" : voice% = 3
  8236. OTHERWISE PROCpressenter
  8237. ENDCASE
  8238. ENDIF
  8239. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  8240. voice% -= 1
  8241. IF voice% >= 0 THEN samevoice% = voice%
  8242. IF voice% = -1 THEN voice% = samevoice%
  8243. :
  8244. IF quickcopy$ = "y" THEN
  8245. INPUT ' " starting at note number (0 counts as 1) "along%
  8246. IF along% = 0 THEN along% = 1
  8247. along%-=1
  8248. bars% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  8249. beats% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  8250. holdbar% = bars%
  8251. holdbeat% = beats%
  8252. PROCalterbeats
  8253. startat% = (bars%*(10^3))+beats%
  8254. :
  8255. ELSE
  8256. :
  8257. INPUT'" Starting at bar number "bars%
  8258. IF bars% = 0 THEN
  8259. bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
  8260. ENDIF
  8261. holdbar% = bars%
  8262. IF repeatposit$ = "y" THEN
  8263. PRINT'" bar ";bars%;" beat ";beats%;"?"
  8264. PRINT'" (for OK press 0, if not OK press X)"
  8265. CASE GET$ OF
  8266. WHEN"X","x" : PROCinsertpitches
  8267. OTHERWISE
  8268. ENDCASE
  8269. ELSE
  8270. INPUT " beat "beats%
  8271. holdbeat% = beats%
  8272. ENDIF
  8273. PROCalterbeats
  8274. startat% = (bars%*(10^3))+beats%
  8275. :
  8276. ENDIF
  8277. :
  8278. ENDIF
  8279. :
  8280. PROCsearch(startat%)
  8281. shunt$ = "N"
  8282. :
  8283. FOR count% = startcell% TO (startcell%+(numamplitudes%-1))
  8284. PROCcellfill(count%,voice%,999,999,999,amplitudes%(count%-startcell%),999,999,99,99)
  8285. NEXT
  8286. :
  8287. PROCdisplay
  8288. :
  8289. ENDPROC
  8290. :
  8291. REM************************************************
  8292. :
  8293. DEF PROCassignvoices
  8294. :
  8295. IF defaultvoices$ = "y" THEN
  8296. waveforms$() = "WaveSynth-Beep"
  8297. ELSE
  8298. CLS
  8299. PRINT '" Assign waveforms to"
  8300. INPUT" how many voices "vcesx%
  8301. FOR count% = 1 TO vcesx%
  8302. PRINT'" voice ";count%;" is which voice number"
  8303. INPUT vcen%
  8304. PRINT'" voice ";vcen%;
  8305. IF insts$(vcen%,0) <> "" THEN PRINT " (";insts$(vcen%,0);")"
  8306. PRINT" is assigned which waveform?"
  8307. INPUT waveform$
  8308. waveforms$(vcen%) = waveform$
  8309. NEXT
  8310. ENDIF
  8311. :
  8312. ENDPROC
  8313. :
  8314. REM************************************************
  8315. :
  8316. DEF PROCseriesenvelopes
  8317. :
  8318. REM envelopes%() and glissandos%() are always input at the same time
  8319. IF easiermenus$ = "n" THEN PROCwindow(20,69,73,45) ELSE PROCwindow(20,69,73,42)
  8320. IF gradations$ = "y" THEN PRINT'" Input gradations as if envelopes with 4 phases "
  8321. PRINT'" How many envelopes/glissandos "
  8322. INPUT'" (for 1 press 0) "numenvelopes%
  8323. IF numenvelopes% = 0 THEN numenvelopes% = 1
  8324. :
  8325. IF numenvelopes% > 1 THEN
  8326. PRINT '" are the envelopes all the same? "
  8327. PRINT '" (Y/0/1, N/2) "
  8328. CASE GET$ OF
  8329. WHEN "N","n","2" : sameenvelopes$ = "n"
  8330. OTHERWISE sameenvelopes$ = "y"
  8331. ENDCASE
  8332. ELSE
  8333. sameenvelopes$ = "y"
  8334. ENDIF
  8335. :
  8336. FOR count% = 0 TO (numenvelopes%-1)
  8337. IF sameenvelopes$ = "n" OR (sameenvelopes$ ="y" AND count% = 0) THEN
  8338. IF numphases% <> 4 THEN
  8339. PRINT'" Envelope ";count%+1;" has how many phases? "
  8340. INPUT'" (for 1 press 0, for 0 press 9) "numphases%
  8341. IF numphases% = 0 THEN numphases% = 1
  8342. IF numphases% = 9 THEN numphases% = 0
  8343. ENDIF
  8344. :
  8345. CASE numphases% OF
  8346. :
  8347. WHEN 0 :
  8348. INPUT'" amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
  8349. amp2% = 9
  8350. gliss1% = 50
  8351. ph2% = 0 : ph1% = 0 : amp4% = 0 : amp3% = 0 : gliss3% = 10 : gliss2% = 50
  8352. :
  8353. WHEN 4 :
  8354. INPUT'" amplitude is (0 = previous) "amp$
  8355. IF amp$ = "" THEN amp$ = prevamp$
  8356. COLOUR 3 : PRINT'" ";amp$
  8357. wait$ = INKEY$(20) : COLOUR 0
  8358. PROCconvertdynamics : amp1% = amp%
  8359. INPUT'" gradation is (select from 1-9) "gradation%
  8360. IF gradation% = 0 THEN gradation% = prevgradation%
  8361. COLOUR 3 : PRINT' gradation%
  8362. wait$ = INKEY$(20) : COLOUR 0
  8363. amp2% = 9
  8364. amp3% = gradation%
  8365. gliss1% = 50
  8366. ph2% = 0 : ph1% = 0 : amp4% = 0 : gliss3% = 10 : gliss2% = 50
  8367. prevamp$ = amp$ : prevgradation% = gradation%
  8368. :
  8369. WHEN 1 :
  8370. INPUT'" starting amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
  8371. INPUT'" destination amplitude is "amp$ : PROCconvertdynamics : amp2% = amp%
  8372. INPUT'" glissando is (in 1/8 tones, max 48,-48) "gliss%
  8373. gliss1% = 50-gliss%
  8374. ph2% = 0 : ph1% = 0 : amp4% = 0 : amp3% = 0 : gliss3% = 10 : gliss2% = 50
  8375. :
  8376. WHEN 2 :
  8377. INPUT'" starting amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
  8378. PRINT'" phase 1 ends after what percentage "
  8379. INPUT'" of the note's duration "ph1%
  8380. INPUT'" phase 1's destination amplitude is "amp$ : PROCconvertdynamics : amp2% = amp%
  8381. INPUT'" phase 1's glissando is (in 1/8 tones, max 48,-48) "gliss%
  8382. gliss1% = 50-gliss%
  8383. INPUT'" phase 2's destination amplitude is "amp$ : PROCconvertdynamics : amp3% = amp%
  8384. INPUT'" phase 2's glissando is (in 1/8 tones, max 48,-48) "gliss%
  8385. gliss2% = 50-gliss%
  8386. ph2% = 0 : amp4% = 0 : gliss3% = 10
  8387. :
  8388. WHEN 3 :
  8389. INPUT'" starting amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
  8390. PRINT'" phase 1 ends after what percentage "
  8391. INPUT'" of the note's duration "ph1%
  8392. INPUT'" phase 1's destination amplitude is "amp$ : PROCconvertdynamics : amp2% = amp%
  8393. INPUT'" phase 1's glissando is (in 1/8 tones, max 48,-48) "gliss%
  8394. gliss1% = 50-gliss%
  8395. PRINT'" phase 2 ends after what percentage "
  8396. INPUT'" of the note's duration "ph2%
  8397. INPUT'" phase 2's destination amplitude is "amp$ : PROCconvertdynamics : amp3% = amp%
  8398. INPUT'" phase 2's glissando is (in 1/8 tones, max 48,-48) "gliss%
  8399. gliss2% = 50-gliss%
  8400. INPUT'" phase 3's destination amplitude is "amp$ : PROCconvertdynamics : amp4% = amp%
  8401. REPEAT
  8402. INPUT'" phase 3's glissando is (in 1/8 tones, max 10,-10) "gliss%
  8403. gliss3% = 10-gliss%
  8404. IF gliss3% > 20 THEN VDU7
  8405. IF gliss3% < 0 THEN VDU7
  8406. UNTIL gliss3% < 21 AND gliss3% >= 0
  8407. :
  8408. ENDCASE
  8409. :
  8410. envelopes%(count%) = (ph2%*10^5)+(ph1%*10^3)+(amp4%*10^2)+(amp3%*10)+amp2%
  8411. amplitudes%(count%) = amp1%
  8412. glissandos%(count%) = (gliss3%*10^4)+(gliss2%*10^2)+gliss1%
  8413. :
  8414. :
  8415. ENDIF
  8416. NEXT
  8417. :
  8418. IF sameenvelopes$ = "y" THEN
  8419. FOR count% = 1 TO (numenvelopes%-1)
  8420. envelopes%(count%) = (ph2%*10^5)+(ph1%*10^3)+(amp4%*10^2)+(amp3%*10)+amp2%
  8421. amplitudes%(count%) = amp1%
  8422. glissandos%(count%) = (gliss3%*10^4)+(gliss2%*10^2)+gliss1%
  8423. NEXT
  8424. ENDIF
  8425. :
  8426. gradations$ = "n"
  8427. REM function can feed envelopes similarly into envelopes%()
  8428. :
  8429. PROCinsertenvelopes
  8430. :
  8431. ENDPROC
  8432. :
  8433. REM*******************************************
  8434. :
  8435. DEF PROCconvertdynamics
  8436. CASE amp$ OF
  8437. WHEN "0" : amp% = 0
  8438. WHEN "ppp" : amp% = 1
  8439. WHEN "pp" : amp% = 2
  8440. WHEN "p" : amp% = 3
  8441. WHEN "mp" : amp% = 4
  8442. WHEN "mf" : amp% = 5
  8443. WHEN "f" : amp% = 6
  8444. WHEN "ff" : amp% = 7
  8445. WHEN "fff" : amp% = 8
  8446. ENDCASE
  8447. ENDPROC
  8448. :
  8449. REM*******************************************
  8450. :
  8451. DEF PROCinsertenvelopes
  8452. :
  8453. CLS
  8454. repeatposit$ = "n"
  8455. IF seequery$ = "y" THEN
  8456. PRINT '" Do you want to read these envelopes into the array?"
  8457. CASE GET$ OF
  8458. WHEN "N","n" : PROCdisplay : REM envelopes%() stays intact
  8459. OTHERWISE
  8460. ENDCASE
  8461. ENDIF : REM seequery$
  8462. :
  8463. IF screenvoices$ = "n" THEN
  8464. INPUT' " Which voice (0 = top)"voice%
  8465. IF voice% = 0 THEN PROCpressenter
  8466. ELSE
  8467. PRINT'" Which screen voice "
  8468. CASE GET$ OF
  8469. WHEN "1" : voice% = 1
  8470. WHEN "2" : voice% = 2
  8471. WHEN "3" : voice% = 3
  8472. OTHERWISE PROCpressenter
  8473. ENDCASE
  8474. ENDIF
  8475. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  8476. voice% -= 1
  8477. IF voice% >= 0 THEN samevoice% = voice%
  8478. IF voice% = -1 THEN voice% = samevoice%
  8479. :
  8480. IF quickcopy$ = "y" THEN
  8481. INPUT ' " starting at note number (0 counts as 1) "along%
  8482. IF along% = 0 THEN along% = 1
  8483. along%-=1
  8484. bars% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  8485. beats% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  8486. holdbar% = bars%
  8487. holdbeat% = beats%
  8488. PROCalterbeats
  8489. startat% = (bars%*(10^3))+beats%
  8490. :
  8491. ELSE
  8492. :
  8493. INPUT'" Starting at bar number "bars%
  8494. IF bars% = 0 THEN
  8495. bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
  8496. ENDIF
  8497. holdbar% = bars%
  8498. IF repeatposit$ = "y" THEN
  8499. PRINT'" bar ";bars%;" beat ";beats%;"?"
  8500. PRINT" (for OK press 0, if not OK press X)"
  8501. CASE GET$ OF
  8502. WHEN"X","x" : PROCinsertpitches
  8503. OTHERWISE
  8504. ENDCASE
  8505. ELSE
  8506. INPUT " beat "beats%
  8507. holdbeat% = beats%
  8508. ENDIF
  8509. PROCalterbeats
  8510. startat% = (bars%*(10^3))+beats%
  8511. :
  8512. ENDIF
  8513. :
  8514. PROCsearch(startat%)
  8515. shunt$ = "N"
  8516. :
  8517. FOR count% = startcell% TO (startcell%+(numenvelopes%-1))
  8518. PROCcellfill(count%,voice%,999,999,999,amplitudes%(count%-startcell%),envelopes%(count%-startcell%),999,glissandos%(count%-startcell%),99)
  8519. NEXT
  8520. :
  8521. PROCdisplay
  8522. :
  8523. ENDPROC
  8524. :
  8525. REM**********************************************
  8526. :
  8527. DEF PROCseriesinflections
  8528. :
  8529. IF easiermenus$ = "n" PROCwindow(20,69,88,45) ELSE PROCwindow(20,69,88,42)
  8530. PRINT'" semitone = 100 cents quartertone = 50 cents eigthtone = 25 cents"
  8531. PRINT " sixteenthtone = 12 cents sixthtone = 33 cents"
  8532. PRINT'" harmonic 3 = perfect 5th + 2 cents"
  8533. PRINT " harmonic 5 = major 3rd eigthtone flat + 11 cents "
  8534. PRINT " harmonic 7 = minor 7th eightone flat -6 cents"
  8535. PRINT " harmonic 9 = major 2nd + 4 cents"
  8536. PRINT " harmonic 11 = perfect 4th quartertone sharp + 1 cent"
  8537. PRINT " harmonic 13 = major 6th quartertone flat - 9 cents"
  8538. PRINT " harmonic 15 = major 7th - 12 cents"
  8539. INPUT'" How many inflections "numinflections%
  8540. FOR count% = 0 TO (numinflections%-1)
  8541. PRINT'" inflection ";count%+1;" is (in cents:"
  8542. INPUT'" 1,-1 etc; max 49,-49) "inf%
  8543. inf% = 50+inf%
  8544. inflections%(count%) = inf%
  8545. NEXT
  8546. :
  8547. REM function can feed similarly into inflections%()
  8548. :
  8549. PROCinsertinflections
  8550. :
  8551. ENDPROC
  8552. :
  8553. REM**********************************************
  8554. :
  8555. DEF PROCinsertinflections
  8556. :
  8557. CLS
  8558. repeatposit$ = "n"
  8559. IF seequery$ = "y" THEN
  8560. PRINT'" Do you want to read these inflections into the array?"
  8561. CASE GET$ OF
  8562. WHEN "N","n" : PROCdisplay : REM inflections%() remains intact
  8563. OTHERWISE
  8564. ENDCASE
  8565. ENDIF : REM seequery$
  8566. IF screenvoices$ = "n" THEN
  8567. INPUT' " Which voice (0 = top) "voice%
  8568. IF voice% = 0 THEN PROCpressenter
  8569. ELSE
  8570. PRINT'" Which screen voice "
  8571. CASE GET$ OF
  8572. WHEN "1" : voice% = 1
  8573. WHEN "2" : voice% = 2
  8574. WHEN "3" : voice% = 3
  8575. OTHERWISE PROCpressenter
  8576. ENDCASE
  8577. ENDIF
  8578. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  8579. voice% -= 1
  8580. IF voice% >= 0 THEN samevoice% = voice%
  8581. IF voice% = -1 THEN voice% = samevoice%
  8582. :
  8583. IF quickcopy$ = "y" THEN
  8584. INPUT ' " starting at note number (0 counts as 1) "along%
  8585. IF along% = 0 THEN along% = 1
  8586. along%-=1
  8587. bars% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  8588. beats% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  8589. holdbar% = bars%
  8590. holdbeat% = beats%
  8591. PROCalterbeats
  8592. startat% = (bars%*(10^3))+beats%
  8593. :
  8594. ELSE
  8595. :
  8596. INPUT'" Starting at bar number "bars%
  8597. IF bars% = 0 THEN
  8598. bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
  8599. ENDIF
  8600. holdbar% = bars%
  8601. IF repeatposit$ = "y" THEN
  8602. PRINT'" bar ";bars%;" beat ";beats%;"?"
  8603. PRINT" (for OK press 0, if not OK press X)"
  8604. CASE GET$ OF
  8605. WHEN"X","x" : PROCinsertpitches
  8606. OTHERWISE
  8607. ENDCASE
  8608. ELSE
  8609. INPUT " beat "beats%
  8610. holdbeat% = beats%
  8611. ENDIF
  8612. PROCalterbeats
  8613. startat% = (bars%*(10^3))+beats%
  8614. :
  8615. ENDIF
  8616. :
  8617. PROCsearch(startat%)
  8618. shunt$ = "N"
  8619. :
  8620. FOR count% = startcell% TO (startcell%+(numinflections%-1))
  8621. PROCcellfill(count%,voice%,999,999,999,9,999,999,99,inflections%(count%-startcell%))
  8622. NEXT
  8623. PROCdisplay
  8624. ENDPROC
  8625. :
  8626. REM****************************************************
  8627. :
  8628. DEF PROCenv
  8629. :
  8630. temp = tempi%(brrr%)
  8631. IF waveload$ = "done" THEN temp = temp*1.23065
  8632. converter = 1200/(temp*960)
  8633. dur1 = dur%/converter
  8634. dur2 = dur1*10
  8635. dur3 = dur2 MOD 10
  8636. IF dur3 >= 5 THEN dur% = dur1+1 ELSE dur% = dur1
  8637. :
  8638. dyn1% = dyn% + 128
  8639. :
  8640. number% = array%(cell%(voicenum%),2,voicenum%)DIV10^5
  8641. IF number% = 0 THEN numphases% = 1
  8642. IF number% > 0 AND number% < 100 THEN numphases% = 2
  8643. IF number% > 99 THEN numphases% = 3
  8644. :
  8645. CASE nvoices% OF
  8646. WHEN 1 : st% = 1
  8647. OTHERWISE st% = 2
  8648. ENDCASE
  8649. :
  8650. CASE numphases% OF
  8651. :
  8652. WHEN 1 :
  8653. :
  8654. gliss1% = (array%(cell%(voicenum%),1,voicenum%)DIV10^4)MOD10^2
  8655. gliss1% = 50 - gliss1%
  8656. gliss1% = gliss1% * 85.5
  8657. pitchinc = gliss1%/dur%
  8658. :
  8659. amp2% = (array%(cell%(voicenum%),2,voicenum%)DIV10^2)MOD10
  8660. dyn2% = 384 + (16*amp2%)
  8661. IF dyn2% = 512 THEN dyn2% = 511
  8662. dynspan% = dyn2% - dyn1%
  8663. dyninc = dynspan%/dur%
  8664. :
  8665. FOR loop% = 10 TO dur% STEP (dur%/32)*st%
  8666. loud% = dyninc*loop%
  8667. high% = pitchinc*loop%
  8668. SOUND count%, dyn1%+loud%, pitch%+high%, 0, after%+loop%
  8669. NEXT
  8670. :
  8671. WHEN 2 :
  8672. ph1% = number% MOD 10^2
  8673. point1% = dur%*ph1%/100
  8674. :
  8675. REM first phase
  8676. gliss1% = (array%(cell%(voicenum%),1,voicenum%)DIV10^4)MOD10^2
  8677. gliss1% = 50 - gliss1%
  8678. gliss1% = gliss1% * 85.5
  8679. pitchinc = gliss1%/point1%
  8680. :
  8681. amp2% = (array%(cell%(voicenum%),2,voicenum%)DIV10^2)MOD10
  8682. dyn2% = 384 + (16*amp2%)
  8683. IF dyn2% = 512 THEN dyn2% = 511
  8684. dynspan% = dyn2% - dyn1%
  8685. dyninc = dynspan%/point1%
  8686. :
  8687. FOR loop% = 10 TO point1%-10 STEP ((point1%)/32)*st%
  8688. loud% = dyninc*loop%
  8689. high% = pitchinc*loop%
  8690. SOUND count%, dyn1%+loud%, pitch%+high%, 0, after%+loop%
  8691. NEXT
  8692. :
  8693. REM second phase
  8694. gliss2% = (array%(cell%(voicenum%),1,voicenum%)DIV10^6)MOD10^2
  8695. gliss2% = 50 - gliss2%
  8696. gliss2% = gliss2% * 85.5
  8697. pitchinc = gliss2%/(dur%-point1%)
  8698. :
  8699. amp3% = (array%(cell%(voicenum%),2,voicenum%)DIV10^3)MOD10
  8700. dyn3% = 384 + (16*amp3%)
  8701. IF dyn3% = 512 THEN dyn2% = 511
  8702. dynspan% = dyn3% - dyn2%
  8703. dyninc = dynspan%/(dur%-point1%)
  8704. :
  8705. FOR loop% = 0 TO dur%-point1% STEP ((dur%-point1%)/32)*st%
  8706. loud% = dyninc*loop%
  8707. high% = pitchinc*loop%
  8708. SOUND count%, dyn2%+loud%, pitch%+gliss1%+high%, 0, after%+point1%+loop%
  8709. NEXT
  8710. :
  8711. WHEN 3 :
  8712. ph1% = number% MOD 10^2
  8713. point1% = dur%*ph1%/100
  8714. ph2% = number% DIV 10^2
  8715. point2% = dur%*ph2%/100
  8716. :
  8717. REM first phase
  8718. gliss1% = (array%(cell%(voicenum%),1,voicenum%)DIV10^4)MOD10^2
  8719. gliss1% = 50 - gliss1%
  8720. gliss1% = gliss1% * 85.5
  8721. pitchinc = gliss1%/point1%
  8722. :
  8723. amp2% = (array%(cell%(voicenum%),2,voicenum%)DIV10^2)MOD10
  8724. dyn2% = 384 + (16*amp2%)
  8725. IF dyn2% = 512 THEN dyn2% = 511
  8726. dynspan% = dyn2% - dyn1%
  8727. dyninc = dynspan%/point1%
  8728. :
  8729. FOR loop% = 10 TO point1%-10 STEP ((point1%)/32)*st%
  8730. loud% = dyninc*loop%
  8731. high% = pitchinc*loop%
  8732. SOUND count%, dyn1%+loud%, pitch%+high%, 0, after%+loop%
  8733. NEXT
  8734. :
  8735. REM second phase
  8736. gliss2% = (array%(cell%(voicenum%),1,voicenum%)DIV10^6)MOD10^2
  8737. gliss2% = 50 - gliss2%
  8738. gliss2% = gliss2% * 85.5
  8739. pitchinc = gliss2%/(point2%-point1%)
  8740. :
  8741. amp3% = (array%(cell%(voicenum%),2,voicenum%)DIV10^3)MOD10
  8742. dyn3% = 384 + (16*amp3%)
  8743. IF dyn3% = 512 THEN dyn3% = 511
  8744. dynspan% = dyn3% - dyn2%
  8745. dyninc = dynspan%/(point2%-point1%)
  8746. :
  8747. FOR loop% = 0 TO point2%-point1%-10 STEP ((point2%-point1%)/32)*st%
  8748. loud% = dyninc*loop%
  8749. high% = pitchinc*loop%
  8750. SOUND count%, dyn2%+loud%, pitch%+gliss1%+high%, 0, after%+point1%+loop%
  8751. NEXT
  8752. :
  8753. REM third phase
  8754. gliss3% = (array%(cell%(voicenum%),1,voicenum%)DIV10^8)
  8755. gliss3% = 10 - gliss3%
  8756. gliss3% = gliss3% * 85.5
  8757. pitchinc = gliss3%/(dur%-point2%)
  8758. :
  8759. amp4% = (array%(cell%(voicenum%),2,voicenum%)DIV10^4)MOD10
  8760. dyn4% = 384 + (16*amp4%)
  8761. IF dyn4% = 512 THEN dyn4% = 511
  8762. dynspan% = dyn4% - dyn3%
  8763. dyninc = dynspan%/(dur%-point2%)
  8764. :
  8765. FOR loop% = 0 TO dur%-point2% STEP ((dur%-point2%)/32)*st%
  8766. loud% = dyninc*loop%
  8767. high% = pitchinc*loop%
  8768. SOUND count%, dyn3%+loud%, pitch%+gliss1%+gliss2%+high%, 0, after%+point2%+loop%
  8769. NEXT
  8770. :
  8771. ENDCASE
  8772. :
  8773. ENDPROC
  8774. :
  8775. REM******************************************************
  8776. :
  8777. DEF PROCquit
  8778. :
  8779. CLS
  8780. PRINT''''" Do you want to SAVE"
  8781. PRINT" before quitting?"
  8782. CASE GET$ OF
  8783. WHEN "N","n" :
  8784. REM this line and next two 'deleted' for now - IF wavefilingsystem$ = "loaded" THEN
  8785. REM *RMKill WFS
  8786. REM ENDIF
  8787. *NoDir
  8788. QUIT
  8789. OTHERWISE
  8790. quitnow$ = "y"
  8791. PROCsave
  8792. ENDCASE
  8793. ENDPROC
  8794. :
  8795. REM******************************************************
  8796. :
  8797. DEF PROCsave
  8798. :
  8799. firstnaming$ = "n"
  8800. CLS
  8801. IF filename$ = "" THEN
  8802. INPUT'" filename "filename$
  8803. firstnaming$ = "y"
  8804. DIM lastfilename$(9)
  8805. housekeepingdimmed$ = "y"
  8806. PROChousekeeping
  8807. ENDIF
  8808. IF firstnaming$ = "n" THEN
  8809. PRINT'" as '";filename$;"'?"
  8810. CASE GET$ OF
  8811. WHEN "N","n" :
  8812. INPUT'" filename "filename$
  8813. OTHERWISE
  8814. ENDCASE
  8815. ENDIF
  8816. :
  8817. *Dir SDFS::RISCOSpi.$.CAC.Files
  8818. :
  8819. channel = OPENOUT filename$
  8820. PRINT#channel, manynotes%
  8821. PRINT#channel, numparts%
  8822. PRINT#channel, nobars%
  8823. PRINT#channel, startv%
  8824. PRINT#channel, startv1%
  8825. PRINT#channel, numbars%
  8826. PRINT#channel, startbar%
  8827. PRINT#channel, numvoices%
  8828. PRINT#channel, factor%
  8829. PRINT#channel, beatfactor%
  8830. PRINT#channel, beams%
  8831. PRINT#channel, longbeatsupper%
  8832. PRINT#channel, longbeatslower%
  8833. PRINT#channel, tempo%
  8834. PRINT#channel, MM%
  8835. PRINT#channel, notehead$
  8836. PRINT#channel, longscore$
  8837. PRINT#channel, barlines$
  8838. PRINT#channel, staves$
  8839. PRINT#channel, beats$
  8840. PRINT#channel, amplitudes$
  8841. PRINT#channel, names$
  8842. PRINT#channel, accidentals$
  8843. PRINT#channel, stems$
  8844. PRINT#channel, xoption$
  8845. PRINT#channel, durations$
  8846. PRINT#channel, envelopes$
  8847. PRINT#channel, glissandos$
  8848. PRINT#channel, numwaves%
  8849. PRINT#channel, manywaves%
  8850. PRINT#channel, barnosoften%
  8851. FOR c% = 0 TO (numparts%-1)
  8852. PRINT#channel, numusedcells%(c%)
  8853. NEXT
  8854. FOR e% = 0 TO (numparts%-1)
  8855. FOR d% = 0 TO 2
  8856. FOR c% = 0 TO numusedcells%(e%)
  8857. PRINT#channel, array%(c%,d%,e%)
  8858. NEXT
  8859. NEXT
  8860. NEXT
  8861. FOR c% = 0 TO numparts%
  8862. FOR d% = 0 TO 2
  8863. PRINT#channel, insts$(c%,d%)
  8864. NEXT
  8865. NEXT
  8866. FOR c% = 0 TO nobars%
  8867. FOR d% = 0 TO 3
  8868. FOR e% = 0 TO (numparts%-1)
  8869. PRINT#channel, disarray%(c%,d%,e%)
  8870. NEXT
  8871. NEXT
  8872. NEXT
  8873. FOR c% = 0 TO numparts%
  8874. PRINT#channel, longbeamposn%(c%)
  8875. NEXT
  8876. FOR c% = 0 TO numparts%
  8877. PRINT#channel, shortbeamposn%(c%)
  8878. NEXT
  8879. FOR c% = 0 TO numparts%
  8880. PRINT#channel, shortamppos%(c%)
  8881. NEXT
  8882. FOR c% = 0 TO numparts%
  8883. PRINT#channel, longamppos%(c%)
  8884. NEXT
  8885. FOR c% = 0 TO (numparts%-1)
  8886. PRINT#channel, longstemdir$(c%)
  8887. NEXT
  8888. FOR c% = 0 TO (numparts%-1)
  8889. PRINT#channel, shortstemdir$(c%)
  8890. NEXT
  8891. FOR c% = 0 TO numparts%
  8892. PRINT#channel, waveforms$(c%)
  8893. NEXT
  8894. FOR c% = 0 TO numvoices%
  8895. PRINT#channel, displayvoices%(c%)
  8896. NEXT
  8897. FOR c% = 0 TO 19
  8898. PRINT#channel, wforms$(c%)
  8899. NEXT
  8900. FOR c% = 0 TO 8
  8901. FOR d% = 0 TO 9
  8902. PRINT#channel, lvdata%(c%,d%)
  8903. NEXT
  8904. NEXT
  8905. FOR a% = 0 TO 47
  8906. PRINT#channel, pitchset%(a%)
  8907. NEXT
  8908. FOR a% = 0 TO 47
  8909. PRINT#channel, durset%(a%)
  8910. NEXT
  8911. FOR a% = 0 TO 47
  8912. PRINT#channel, ampset%(a%)
  8913. NEXT
  8914. FOR a% = 0 TO 47
  8915. PRINT#channel, glissset%(a%)
  8916. NEXT
  8917. FOR a% = 0 TO 47
  8918. PRINT#channel, envset%(a%)
  8919. NEXT
  8920. FOR a% = 0 TO nobars%
  8921. PRINT#channel, tempi%(a%)
  8922. NEXT
  8923. FOR a% = 0 TO nobars%
  8924. FOR b% = 0 TO 1
  8925. PRINT#channel, remarks$(a%,b%)
  8926. NEXT
  8927. NEXT
  8928. :
  8929. CLOSE#channel
  8930. *NoDir
  8931. :
  8932. goproc$ = "y"
  8933. FOR count% = 1 TO 9
  8934. IF lastfilename$(count%) = filename$ THEN
  8935. goproc$ = "n" : theone% = count%
  8936. ENDIF
  8937. NEXT
  8938. IF goproc$ = "n" THEN
  8939. IF theone% > 1 THEN
  8940. PROCspecialshunt : PROCfornexttime
  8941. ENDIF
  8942. ENDIF
  8943. IF goproc$ = "y" THEN
  8944. PROCshuntlastfilename : PROCfornexttime
  8945. ENDIF
  8946. :
  8947. IF quitnow$ = "y" THEN
  8948. *NoDir
  8949. QUIT
  8950. ELSE
  8951. PROCdisplay
  8952. ENDIF
  8953. :
  8954. ENDPROC
  8955. :
  8956. REM******************************************
  8957. :
  8958. DEF PROCloadfile
  8959. :
  8960. housekeepingdimmed$ = "n"
  8961. PROChousekeeping
  8962. PRINT'" The most recent files saved were "
  8963. FOR count% = 1 TO 9
  8964. PRINT'count%;". ";lastfilename$(count%)
  8965. NEXT
  8966. PRINT'" To open one press its number, for another press 0 "
  8967. CASE GET$ OF
  8968. WHEN "1" : filename$ = lastfilename$(1)
  8969. WHEN "2" : filename$ = lastfilename$(2)
  8970. WHEN "3" : filename$ = lastfilename$(3)
  8971. WHEN "4" : filename$ = lastfilename$(4)
  8972. WHEN "5" : filename$ = lastfilename$(5)
  8973. WHEN "6" : filename$ = lastfilename$(6)
  8974. WHEN "7" : filename$ = lastfilename$(7)
  8975. WHEN "8" : filename$ = lastfilename$(8)
  8976. WHEN "9" : filename$ = lastfilename$(9)
  8977. OTHERWISE
  8978. INPUT'" the one you want is "filename$
  8979. ENDCASE
  8980. :
  8981. *Dir SDFS::RISCOSpi.$.CAC.Files
  8982. channel = OPENIN filename$
  8983. REPEAT
  8984. INPUT#channel, manynotes%
  8985. INPUT#channel, numparts%
  8986. INPUT#channel, nobars%
  8987. instsdimmed$ = "n"
  8988. PROCarraysetup
  8989. INPUT#channel, startv%
  8990. INPUT#channel, startv1%
  8991. INPUT#channel, numbars%
  8992. INPUT#channel, startbar%
  8993. INPUT#channel, numvoices%
  8994. INPUT#channel, factor%
  8995. INPUT#channel, beatfactor%
  8996. INPUT#channel, beams%
  8997. INPUT#channel, longbeatsupper%
  8998. INPUT#channel, longbeatslower%
  8999. INPUT#channel, tempo%
  9000. INPUT#channel, MM%
  9001. INPUT#channel, notehead$
  9002. INPUT#channel, longscore$
  9003. INPUT#channel, barlines$
  9004. INPUT#channel, staves$
  9005. INPUT#channel, beats$
  9006. INPUT#channel, amplitudes$
  9007. INPUT#channel, names$
  9008. INPUT#channel, accidentals$
  9009. INPUT#channel, stems$
  9010. INPUT#channel, xoption$
  9011. INPUT#channel, durations$
  9012. INPUT#channel, envelopes$
  9013. INPUT#channel, glissandos$
  9014. INPUT#channel, numwaves%
  9015. INPUT#channel, manywaves%
  9016. INPUT#channel, barnosoften%
  9017. FOR c% = 0 TO (numparts%-1)
  9018. INPUT#channel, numusedcells%(c%)
  9019. NEXT
  9020. FOR e% = 0 TO (numparts%-1)
  9021. FOR d% = 0 TO 2
  9022. FOR c% = 0 TO numusedcells%(e%)
  9023. INPUT#channel, array%(c%,d%,e%)
  9024. NEXT
  9025. NEXT
  9026. NEXT
  9027. FOR c% = 0 TO numparts%
  9028. FOR d% = 0 TO 2
  9029. INPUT#channel, insts$(c%,d%)
  9030. NEXT
  9031. NEXT
  9032. FOR c% = 0 TO nobars%
  9033. FOR d% = 0 TO 3
  9034. FOR e% = 0 TO (numparts%-1)
  9035. INPUT#channel, disarray%(c%,d%,e%)
  9036. NEXT
  9037. NEXT
  9038. NEXT
  9039. FOR c% = 0 TO numparts%
  9040. INPUT#channel, longbeamposn%(c%)
  9041. NEXT
  9042. FOR c% = 0 TO numparts%
  9043. INPUT#channel, shortbeamposn%(c%)
  9044. NEXT
  9045. FOR c% = 0 TO numparts%
  9046. INPUT#channel, shortamppos%(c%)
  9047. NEXT
  9048. FOR c% = 0 TO numparts%
  9049. INPUT#channel, longamppos%(c%)
  9050. NEXT
  9051. FOR c% = 0 TO (numparts%-1)
  9052. INPUT#channel, longstemdir$(c%)
  9053. NEXT
  9054. FOR c% = 0 TO (numparts%-1)
  9055. INPUT#channel, shortstemdir$(c%)
  9056. NEXT
  9057. FOR c% = 0 TO numparts%
  9058. INPUT#channel, waveforms$(c%)
  9059. NEXT
  9060. FOR c% = 0 TO numvoices%
  9061. INPUT#channel, displayvoices%(c%)
  9062. NEXT
  9063. FOR c% = 0 TO 19
  9064. INPUT#channel, wforms$(c%)
  9065. NEXT
  9066. FOR c% = 0 TO 8
  9067. FOR d% = 0 TO 9
  9068. INPUT#channel, lvdata%(c%,d%)
  9069. NEXT
  9070. NEXT
  9071. FOR a% = 0 TO 47
  9072. INPUT#channel, pitchset%(a%)
  9073. NEXT
  9074. FOR a% = 0 TO 47
  9075. INPUT#channel, durset%(a%)
  9076. NEXT
  9077. FOR a% = 0 TO 47
  9078. INPUT#channel, ampset%(a%)
  9079. NEXT
  9080. FOR a% = 0 TO 47
  9081. INPUT#channel, glissset%(a%)
  9082. NEXT
  9083. FOR a% = 0 TO 47
  9084. INPUT#channel, envset%(a%)
  9085. NEXT
  9086. FOR a% = 0 TO nobars%
  9087. INPUT#channel, tempi%(a%)
  9088. tempi%(0) = tempi%(1)
  9089. NEXT
  9090. FOR a% = 0 TO nobars%
  9091. FOR b% = 0 TO 1
  9092. INPUT#channel, remarks$(a%,b%)
  9093. NEXT
  9094. NEXT
  9095. :
  9096. holdnum% = numvoices% : holdstart% = startv%
  9097. FOR count% = 1 TO numvoices% : holddisplay%(count%) = displayvoices%(count%) : NEXT
  9098. :
  9099. UNTIL EOF#channel
  9100. CLOSE#channel
  9101. *NoDir
  9102. :
  9103. alterbeatsat% = (960/beatfactor%)/8
  9104. :
  9105. PROCdisplay
  9106. :
  9107. ENDPROC
  9108. :
  9109. REM******************************************************
  9110. :
  9111. DEF PROCplaysubmenu
  9112. :
  9113. IF easiermenus$ = "n" THEN
  9114. PROCwindow(20,71,60,54)
  9115. COLOUR 63
  9116. PRINT'" Load waveforms W"
  9117. COLOUR 0
  9118. PRINT " Assign waveforms to voices A"
  9119. PRINT " Set tempo T"
  9120. PRINT " Set l.v. L"
  9121. PRINT " Beats input B"
  9122. PRINT " Memory setup M"
  9123. PRINT " Display pitches in colours C"
  9124. PRINT " Display options D"
  9125. PRINT " Remarks R"
  9126. PRINT " Rename staves S"
  9127. PRINT " Change a stave's clef K"
  9128. PRINT " Quickplay options Q"
  9129. PRINT " Set stereo positions P"
  9130. PRINT " Set key response speeds E"
  9131. PRINT " Tutorial U"
  9132. PRINT " Re-set parameter defaults V"
  9133. ELSE
  9134. PROCwindow(20,69,60,37)
  9135. COLOUR 63
  9136. PRINT'" Load waveforms W"
  9137. COLOUR 0
  9138. PRINT '" Assign waveforms to voices A"
  9139. PRINT '" Set tempo T"
  9140. PRINT '" Set l.v. L"
  9141. PRINT '" Beats input B"
  9142. PRINT '" Memory setup M"
  9143. PRINT '" Display pitches in colours C"
  9144. PRINT '" Display options D"
  9145. PRINT '" Remarks R"
  9146. PRINT '" Rename staves S"
  9147. PRINT '" Change a stave's clef K"
  9148. PRINT '" Quickplay options Q"
  9149. PRINT '" Set stereo positions P"
  9150. PRINT '" Set key response speeds E"
  9151. PRINT '" Tutorial U"
  9152. PRINT '" Re-set parameter defaults V"
  9153. ENDIF
  9154. CASE GET$ OF
  9155. WHEN "v" : CLS
  9156. PRINT'" Amplitude A"
  9157. CASE GET$ OF
  9158. WHEN "a" :
  9159. PRINT'" Re-set default amplitude"
  9160. INPUT " in a batch between which voice "firstvoice%
  9161. INPUT'" and which voice "secondvoice%
  9162. INPUT'" And set it at which amplitude "value$
  9163. CASE value$ OF
  9164. WHEN "fff" : value% = 8
  9165. WHEN "ff" : value% = 7
  9166. WHEN "f" : value% = 6
  9167. WHEN "mf" : value% = 5
  9168. WHEN "mp" : value% = 4
  9169. WHEN "p" : value% = 3
  9170. WHEN "pp" : value% = 2
  9171. WHEN "ppp" : value% = 1
  9172. WHEN "0" : value% = 0
  9173. ENDCASE
  9174. FOR count% = (firstvoice%-1) TO (secondvoice%-1)
  9175. ampset%(count%) = value%
  9176. NEXT
  9177. ENDCASE
  9178. PROCdisplay
  9179. :
  9180. WHEN "U","u" : PROCtutorial
  9181. :
  9182. WHEN "E","e" : CLS
  9183. PRINT '" To set response time for downward "
  9184. PRINT " copying from top stave press D "
  9185. PRINT '" To set response time for "
  9186. PRINT " move left/right press M "
  9187. PRINT '" To set response time for "
  9188. PRINT " move up/down press U "
  9189. PRINT '" To set response time for pause "
  9190. PRINT " after first digit input press F "
  9191. PRINT '" To set response time for pause "
  9192. PRINT " after second digit input press S "
  9193. CASE GET$ OF
  9194. WHEN "D","d" :
  9195. CLS
  9196. PRINT'" delay how many hundredths of a second "
  9197. PRINT " (default is 50,";
  9198. PRINT " currently set at ";downwardsspeed%;")"
  9199. INPUT ' downwardsspeed%
  9200. WHEN "M","m" :
  9201. PRINT'" delay how many hundredths of a second "
  9202. PRINT " (default is 25, currently set at ";horizscroll%;")"
  9203. INPUT horizscroll%
  9204. WHEN "U","u" :
  9205. PRINT'" delay how many hundredths of a second "
  9206. PRINT " (default is 25, currently set at ";vertscroll%;")"
  9207. INPUT vertscroll%
  9208. WHEN "F","f" :
  9209. PRINT'" pause for how many hundredths "
  9210. PRINT " of a second (currently ";waitafterfirst%;")"
  9211. INPUT waitafterfirst%
  9212. waitaftersecond% = waitafterfirst% : REM stops waiting unnecessarily for a 3rd digit
  9213. WHEN "S","s" :
  9214. PRINT'" pause for how many hundredths "
  9215. PRINT " of a second (currently ";waitaftersecond%;")"
  9216. INPUT waitaftersecond%
  9217. ENDCASE
  9218. PROCdisplay
  9219. :
  9220. WHEN "A","a" :
  9221. PROCwindow(20,72,83,25)
  9222. VDU 14
  9223. PRINT'" Current assignations are "
  9224. PRINT'" (press Ctrl-Shift to scroll down) "
  9225. PRINT " "
  9226. FOR count% = 1 TO numparts%
  9227. IF waveforms$(count%) <> "" THEN
  9228. PRINT'" voice ";count%;
  9229. IF insts$(count%,0)<> "" THEN PRINT " (";insts$(count%,0);")";
  9230. PRINT " - ";waveforms$(count%)
  9231. ENDIF
  9232. NEXT
  9233. VDU 15
  9234. PRINT''" Do you want to "
  9235. PRINT' " Keep these K "
  9236. PRINT' " Reassign R "
  9237. PRINT' " Use WaveSynth-Beep defaults W "
  9238. PRINT' " Randomly assign sustaining instruments, "
  9239. PRINT " dry instruments or drums S/D/M "
  9240. PRINT' " Assign in groups G "
  9241. :
  9242. CASE GET$ OF
  9243. WHEN "R","r" : defaultvoices$ = "n" : PROCassignvoices : PROCdisplay
  9244. WHEN "W","w" : defaultvoices$ = "y" : PROCassignvoices : PROCdisplay
  9245. WHEN "K","k" : defaultvoices$ = "n" : PROCdisplay
  9246. WHEN "S","s" : defaultvoices$ = "n" : type$ = "sustaining" : PROCrandomassign : PROCdisplay
  9247. WHEN "M","m" : defaultvoices$ = "n" : type$ = "drums" : PROCrandomassign : PROCdisplay
  9248. WHEN "D","d" : defaultvoices$ = "n" : PROCrandomdry : PROCdisplay
  9249. WHEN "G","g" : defaultvoices$ = "n" : PROCgroupassign : PROCdisplay
  9250. ENDCASE
  9251. WHEN "T","t" : PROCtempo
  9252. WHEN "L","l" : PROClv
  9253. WHEN "W","w" : PROCloadwaveforms
  9254. WHEN "B","b" :
  9255. CLS : PRINT' " Typing numbers up to ";((960/beatfactor%)/8)-1
  9256. PRINT " should be read as macro-beats "
  9257. PRINT" or micro-beats? (+/-) "
  9258. CASE GET$ OF
  9259. WHEN "+","=" : alterbeatsat% = (960/beatfactor%)/8
  9260. OTHERWISE
  9261. alterbeatsat% = 0
  9262. ENDCASE
  9263. :
  9264. PROCdisplay
  9265. WHEN "M","m" :
  9266. CLS : PRINT '" This file was set up as follows:"
  9267. PRINT" Number of bars - ";nobars%
  9268. PRINT" Notes per bar in busiest - ";manynotes%/nobars%
  9269. PRINT" Number of voices - ";numparts%
  9270. PRINT'" (Press a key to continue)"
  9271. CASE GET$ OF
  9272. WHEN "C","c" :
  9273. OTHERWISE
  9274. ENDCASE
  9275. PROCdisplay
  9276. WHEN "C","c" :
  9277. CLS : PRINT'" Do you want any pitches displayed in "
  9278. PRINT " in colours? "
  9279. CASE GET$ OF
  9280. WHEN "Y","y" :
  9281. PRINT'" Re-define these, or use previous "
  9282. PRINT " settings? (R/P)"
  9283. CASE GET$ OF
  9284. WHEN "R","r" :
  9285. INPUT'" How many colours "numcols%
  9286. FOR tt% = 1 TO numcols%
  9287. PRINT'" Colour ";tt%;" has how many pitches "
  9288. INPUT numredpitches%(tt%)
  9289. FOR ttt% = 1 TO numredpitches%(tt%)
  9290. PRINT' " Note name for pitch ";ttt%;" is ";
  9291. COLOUR 3
  9292. CASE GET$ OF
  9293. WHEN "C","c" : note% = 0 : PRINT "C"
  9294. WHEN "D","d" : note% = 1 : PRINT "D"
  9295. WHEN "E","e" : note% = 2 : PRINT "E"
  9296. WHEN "F","f" : note% = 3 : PRINT "F"
  9297. WHEN "G","g" : note% = 4 : PRINT "G"
  9298. WHEN "A","a" : note% = 5 : PRINT "A"
  9299. WHEN "B","b" : note% = 6 : PRINT "B"
  9300. ENDCASE
  9301. COLOUR 0
  9302. PRINT " accidental ";
  9303. COLOUR 3
  9304. CASE GET$ OF
  9305. WHEN "1" : accid% = 1 : PRINT "flat"
  9306. WHEN "2" : accid% = 2 : PRINT "3/8flat"
  9307. WHEN "3" : accid% = 3 : PRINT "1/4flat"
  9308. WHEN "4" : accid% = 4 : PRINT "1/8flat"
  9309. WHEN "5" : accid% = 5 : PRINT "nat"
  9310. WHEN "6" : accid% = 6 : PRINT "1/8shrp"
  9311. WHEN "7" : accid% = 7 : PRINT "1/4shrp"
  9312. WHEN "8" : accid% = 8 : PRINT "3/8shrp"
  9313. WHEN "9" : accid% = 9 : PRINT "shrp"
  9314. ENDCASE
  9315. COLOUR 0
  9316. PRINT " octave ";
  9317. COLOUR 3
  9318. CASE GET$ OF
  9319. WHEN "0" : octave% = 0 : PRINT "0"
  9320. WHEN "1" : octave% = 1 : PRINT "1"
  9321. WHEN "2" : octave% = 2 : PRINT "2"
  9322. WHEN "3" : octave% = 3 : PRINT "3"
  9323. WHEN "4" : octave% = 4 : PRINT "4"
  9324. WHEN "5" : octave% = 5 : PRINT "5"
  9325. WHEN "6" : octave% = 6 : PRINT "6"
  9326. WHEN "7" : octave% = 7 : PRINT "7"
  9327. WHEN "8" : octave% = 8 : PRINT "8"
  9328. ENDCASE
  9329. COLOUR 0
  9330. redpitches%(tt%,ttt%) = (note%*100)+(accid%*10)+octave%
  9331. NEXT
  9332. NEXT
  9333. redpitches$ = "y"
  9334. OTHERWISE
  9335. redpitches$ = "n"
  9336. FOR count% = 0 TO 9
  9337. IF numredpitches%(count%) <> 0 THEN redpitches$ = "y"
  9338. NEXT
  9339. ENDCASE
  9340. OTHERWISE redpitches$ = "n"
  9341. ENDCASE
  9342. PROCdisplay
  9343. :
  9344. WHEN "D","d" : PROCdisplayoptions : PROCdisplay
  9345. WHEN "R","r" : PROCremarks : PROCdisplay
  9346. WHEN "S","s" : PROCnamestaves : PROCdisplay
  9347. WHEN "K","k" : PROCchangeclef : PROCdisplay
  9348. WHEN "Q","q" :
  9349. CLS
  9350. PRINT '" Quickplay (by pressing P)"
  9351. PRINT '" how many voices downwards"
  9352. INPUT '" from top of screen "quickplay%
  9353. PROCdisplay
  9354. WHEN "P","p" :
  9355. CLS
  9356. PRINT' " (Voices are assigned to channels 1-8 "
  9357. PRINT " according to the order in which "
  9358. PRINT " they are typed into Play) "
  9359. PRINT' " Set the 8 channels to stereo "
  9360. PRINT " positions 12344567, keep mono default, "
  9361. PRINT " set the 8 channels to random positions "
  9362. PRINT " or define channels' stereo positions "
  9363. PRINT " (S/M/R/D) "
  9364. CASE GET$ OF
  9365. WHEN "S","s" :
  9366. STEREO 1, -127
  9367. STEREO 2, -79
  9368. STEREO 3, -47
  9369. STEREO 4, -15
  9370. STEREO 5, -15
  9371. STEREO 6, +16
  9372. STEREO 7, +48
  9373. STEREO 8, +80
  9374. WHEN "M","m" :
  9375. STEREO 1, -15
  9376. STEREO 2, -15
  9377. STEREO 3, -15
  9378. STEREO 4, -15
  9379. STEREO 5, -15
  9380. STEREO 6, -15
  9381. STEREO 7, -15
  9382. STEREO 8, -15
  9383. WHEN "D","d" :
  9384. CLS
  9385. PRINT '" Define positions for how many "
  9386. INPUT " channels "numchannels%
  9387. FOR count% = 1 TO numchannels%
  9388. PRINT' " Channel ";count%;" is set to which "
  9389. INPUT " stereo position of the 7 available "position%
  9390. CASE count% OF
  9391. WHEN 1 :
  9392. CASE position% OF
  9393. WHEN 1 : STEREO 1, -127
  9394. WHEN 2 : STEREO 1, -79
  9395. WHEN 3 : STEREO 1, -47
  9396. WHEN 4 : STEREO 1, -15
  9397. WHEN 5 : STEREO 1, +16
  9398. WHEN 6 : STEREO 1, +48
  9399. WHEN 7 : STEREO 1, +80
  9400. ENDCASE
  9401. WHEN 2 :
  9402. CASE position% OF
  9403. WHEN 1 : STEREO 2, -127
  9404. WHEN 2 : STEREO 2, -79
  9405. WHEN 3 : STEREO 2, -47
  9406. WHEN 4 : STEREO 2, -15
  9407. WHEN 5 : STEREO 2, +16
  9408. WHEN 6 : STEREO 2, +48
  9409. WHEN 7 : STEREO 2, +80
  9410. ENDCASE
  9411. WHEN 3 :
  9412. CASE position% OF
  9413. WHEN 1 : STEREO 3, -127
  9414. WHEN 2 : STEREO 3, -79
  9415. WHEN 3 : STEREO 3, -47
  9416. WHEN 4 : STEREO 3, -15
  9417. WHEN 5 : STEREO 3, +16
  9418. WHEN 6 : STEREO 3, +48
  9419. WHEN 7 : STEREO 3, +80
  9420. ENDCASE
  9421. WHEN 4 :
  9422. CASE position% OF
  9423. WHEN 1 : STEREO 4, -127
  9424. WHEN 2 : STEREO 4, -79
  9425. WHEN 3 : STEREO 4, -47
  9426. WHEN 4 : STEREO 4, -15
  9427. WHEN 5 : STEREO 4, +16
  9428. WHEN 6 : STEREO 4, +48
  9429. WHEN 7 : STEREO 4, +80
  9430. ENDCASE
  9431. WHEN 5 :
  9432. CASE position% OF
  9433. WHEN 1 : STEREO 5, -127
  9434. WHEN 2 : STEREO 5, -79
  9435. WHEN 3 : STEREO 5, -47
  9436. WHEN 4 : STEREO 5, -15
  9437. WHEN 5 : STEREO 5, +16
  9438. WHEN 6 : STEREO 5, +48
  9439. WHEN 7 : STEREO 5, +80
  9440. ENDCASE
  9441. WHEN 6 :
  9442. CASE position% OF
  9443. WHEN 1 : STEREO 6, -127
  9444. WHEN 2 : STEREO 6, -79
  9445. WHEN 3 : STEREO 6, -47
  9446. WHEN 4 : STEREO 6, -15
  9447. WHEN 5 : STEREO 6, +16
  9448. WHEN 6 : STEREO 6, +48
  9449. WHEN 7 : STEREO 6, +80
  9450. ENDCASE
  9451. WHEN 7 :
  9452. CASE position% OF
  9453. WHEN 1 : STEREO 7, -127
  9454. WHEN 2 : STEREO 7, -79
  9455. WHEN 3 : STEREO 7, -47
  9456. WHEN 4 : STEREO 7, -15
  9457. WHEN 5 : STEREO 7, +16
  9458. WHEN 6 : STEREO 7, +48
  9459. WHEN 7 : STEREO 7, +80
  9460. ENDCASE
  9461. WHEN 8 :
  9462. CASE position% OF
  9463. WHEN 1 : STEREO 8, -127
  9464. WHEN 2 : STEREO 8, -79
  9465. WHEN 3 : STEREO 8, -47
  9466. WHEN 4 : STEREO 8, -15
  9467. WHEN 5 : STEREO 8, +16
  9468. WHEN 6 : STEREO 8, +48
  9469. WHEN 7 : STEREO 8, +80
  9470. ENDCASE
  9471. ENDCASE
  9472. NEXT
  9473. WHEN "R","r" :
  9474. position% = RND(7)
  9475. CASE position% OF
  9476. WHEN 1 : STEREO 1, -127
  9477. WHEN 2 : STEREO 1, -79
  9478. WHEN 3 : STEREO 1, -47
  9479. WHEN 4 : STEREO 1, -15
  9480. WHEN 5 : STEREO 1, +16
  9481. WHEN 6 : STEREO 1, +48
  9482. WHEN 7 : STEREO 1, +80
  9483. ENDCASE
  9484. position% = RND(7)
  9485. CASE position% OF
  9486. WHEN 1 : STEREO 2, -127
  9487. WHEN 2 : STEREO 2, -79
  9488. WHEN 3 : STEREO 2, -47
  9489. WHEN 4 : STEREO 2, -15
  9490. WHEN 5 : STEREO 2, +16
  9491. WHEN 6 : STEREO 2, +48
  9492. WHEN 7 : STEREO 2, +80
  9493. ENDCASE
  9494. position% = RND(7)
  9495. CASE position% OF
  9496. WHEN 1 : STEREO 3, -127
  9497. WHEN 2 : STEREO 3, -79
  9498. WHEN 3 : STEREO 3, -47
  9499. WHEN 4 : STEREO 3, -15
  9500. WHEN 5 : STEREO 3, +16
  9501. WHEN 6 : STEREO 3, +48
  9502. WHEN 7 : STEREO 3, +80
  9503. ENDCASE
  9504. position% = RND(7)
  9505. CASE position% OF
  9506. WHEN 1 : STEREO 4, -127
  9507. WHEN 2 : STEREO 4, -79
  9508. WHEN 3 : STEREO 4, -47
  9509. WHEN 4 : STEREO 4, -15
  9510. WHEN 5 : STEREO 4, +16
  9511. WHEN 6 : STEREO 4, +48
  9512. WHEN 7 : STEREO 4, +80
  9513. ENDCASE
  9514. position% = RND(7)
  9515. CASE position% OF
  9516. WHEN 1 : STEREO 5, -127
  9517. WHEN 2 : STEREO 5, -79
  9518. WHEN 3 : STEREO 5, -47
  9519. WHEN 4 : STEREO 5, -15
  9520. WHEN 5 : STEREO 5, +16
  9521. WHEN 6 : STEREO 5, +48
  9522. WHEN 7 : STEREO 5, +80
  9523. ENDCASE
  9524. position% = RND(7)
  9525. CASE position% OF
  9526. WHEN 1 : STEREO 6, -127
  9527. WHEN 2 : STEREO 6, -79
  9528. WHEN 3 : STEREO 6, -47
  9529. WHEN 4 : STEREO 6, -15
  9530. WHEN 5 : STEREO 6, +16
  9531. WHEN 6 : STEREO 6, +48
  9532. WHEN 7 : STEREO 6, +80
  9533. ENDCASE
  9534. position% = RND(7)
  9535. CASE position% OF
  9536. WHEN 1 : STEREO 7, -127
  9537. WHEN 2 : STEREO 7, -79
  9538. WHEN 3 : STEREO 7, -47
  9539. WHEN 4 : STEREO 7, -15
  9540. WHEN 5 : STEREO 7, +16
  9541. WHEN 6 : STEREO 7, +48
  9542. WHEN 7 : STEREO 7, +80
  9543. ENDCASE
  9544. position% = RND(7)
  9545. CASE position% OF
  9546. WHEN 1 : STEREO 8, -127
  9547. WHEN 2 : STEREO 8, -79
  9548. WHEN 3 : STEREO 8, -47
  9549. WHEN 4 : STEREO 8, -15
  9550. WHEN 5 : STEREO 8, +16
  9551. WHEN 6 : STEREO 8, +48
  9552. WHEN 7 : STEREO 8, +80
  9553. ENDCASE
  9554. :
  9555. ENDCASE
  9556. PROCdisplay
  9557. OTHERWISE VDU 7 : PROCplaysubmenu
  9558. ENDCASE
  9559. :
  9560. ENDPROC
  9561. :
  9562. REM*******************************************
  9563. :
  9564. DEF PROClv
  9565. :
  9566. CLS
  9567. lvdata%() = 0
  9568. PRINT'" How many sound channels"
  9569. INPUT'" are to generate lv "nlv%
  9570. IF nlv% = 0 THEN
  9571. lvdata%() = 0
  9572. ELSE
  9573. FOR count% = 1 TO nlv%
  9574. PRINT '" lv channel ";count%;" is to use"
  9575. INPUT '" how many other channels? "numchans%
  9576. FOR c% = 1 TO numchans%
  9577. PRINT '" of these, channel ";c%;
  9578. INPUT " is channel "ch%
  9579. lvdata%(count%,c%+1) = ch%
  9580. NEXT
  9581. lvdata%(count%,1) = count%
  9582. NEXT
  9583. ENDIF
  9584. :
  9585. PROCdisplay
  9586. :
  9587. ENDPROC
  9588. :
  9589. REM***********************************
  9590. :
  9591. DEF PROCloadwaveforms
  9592. :
  9593. CLS
  9594. IF waveload$ = "done" THEN
  9595. PROCwindow(20,71,60,35) : CLS
  9596. PRINT'" These waveforms have already been loaded"
  9597. PRINT " (press Ctrl-Shft to scroll down)"
  9598. VDU 14
  9599. FOR count% = 1 TO manywaves%
  9600. PRINT'wforms$(count%)
  9601. NEXT
  9602. VDU 15
  9603. PRINT' " Do you want to load a fresh group?"
  9604. CASE GET$ OF
  9605. WHEN "Y","y" : PRINT' " Press M then quit, to"
  9606. PRINT " flush present waveforms"
  9607. CASE GET$ OF
  9608. WHEN "M","m" : PROCawait
  9609. ENDCASE
  9610. OTHERWISE PROCdisplay
  9611. ENDCASE
  9612. ELSE
  9613. load$ = "new"
  9614. IF filename$ <> "" AND wforms$(1) <> "" THEN
  9615. PROCwindow(20,71,60,45)
  9616. PRINT'" The waveforms previously "
  9617. PRINT" loaded for this file were"
  9618. PRINT" (press Ctrl-Shift to scroll down)"
  9619. VDU 14
  9620. FOR count% = 1 TO manywaves%
  9621. PRINT'wforms$(count%)
  9622. NEXT
  9623. VDU 15
  9624. PRINT'" Do you want to reload"
  9625. PRINT " these or choose new ones (R/N)"
  9626. CASE GET$ OF
  9627. WHEN "R","r" : load$ = "previous"
  9628. OTHERWISE
  9629. ENDCASE
  9630. ENDIF
  9631. :
  9632. IF load$ = "new" THEN
  9633. :
  9634. PRINT '" load individually or from lists? (I/L) "
  9635. CASE GET$ OF
  9636. WHEN "I","i" :
  9637. PRINT '" How many waveforms do you want to load"
  9638. PRINT " (the maximum for this file is ";numwaves%;")"
  9639. INPUT manywaves%
  9640. FOR count% = 1 TO manywaves%
  9641. PRINT '" waveform ";count%;" is "
  9642. INPUT wform$
  9643. wforms$(count%) = wform$
  9644. NEXT
  9645. OTHERWISE
  9646. PRINT'" Sustaining insts A "
  9647. PRINT'" Percussion insts B "
  9648. PRINT'" Percussion insts C "
  9649. PRINT " (press A/B/C) "
  9650. CASE GET$ OF
  9651. WHEN "A","a" :
  9652. manywaves% = 19
  9653. wforms$(1) = "RecorderGb"
  9654. wforms$(2) = "PiccoloE"
  9655. wforms$(3) = "SaxSoprnoE"
  9656. wforms$(4) = "JapFlute"
  9657. wforms$(5) = "SaxBbTenrE"
  9658. wforms$(6) = "BugleC"
  9659. wforms$(7) = "Trombone1"
  9660. wforms$(8) = "Trumpet"
  9661. wforms$(9) = "EngHornGb"
  9662. wforms$(10) = "ClarinetBb"
  9663. wforms$(11) = "ClarVibEb"
  9664. wforms$(12) = "BassoonEb"
  9665. wforms$(13) = "FlugelHnEb"
  9666. wforms$(14) = "CornetEb"
  9667. wforms$(15) = "TubaGb"
  9668. wforms$(16) = "HiString"
  9669. wforms$(17) = "MidStrings"
  9670. wforms$(18) = "BassBowAb"
  9671. wforms$(19) = "SaxEbBarC"
  9672. WHEN "B","b" :
  9673. manywaves% = 19
  9674. wforms$(1) = "Harp1"
  9675. wforms$(2) = "Piano"
  9676. wforms$(3) = "Vibe"
  9677. wforms$(4) = "Timpani"
  9678. wforms$(5) = "TimpRollEb"
  9679. wforms$(6) = "Xylophone"
  9680. wforms$(7) = "TablaHi"
  9681. wforms$(8) = "BDPiloMute"
  9682. wforms$(9) = "Snare"
  9683. wforms$(10) = "TablaHi"
  9684. wforms$(11) = "CymRStRoll"
  9685. wforms$(12) = "CowBell"
  9686. wforms$(13) = "AcuBassAb1"
  9687. wforms$(14) = "GongSoft"
  9688. wforms$(15) = "RotoTomRev"
  9689. wforms$(16) = "HiHat"
  9690. wforms$(17) = "Maracas1"
  9691. wforms$(18) = "SimmonsBD1"
  9692. wforms$(19) = "HiHatFoot"
  9693. WHEN "C","c" :
  9694. manywaves% = 19
  9695. wforms$(1) = "CymSplshCa"
  9696. wforms$(2) = "BassBowAb"
  9697. wforms$(3) = "Bass"
  9698. wforms$(4) = "HiHat"
  9699. wforms$(5) = "HiHatFoot"
  9700. wforms$(6) = "Maracas1"
  9701. wforms$(7) = "CachichiTr"
  9702. wforms$(8) = "BDPiloMute"
  9703. wforms$(9) = "AcuBassAb1"
  9704. wforms$(10) = "SimmonsBD1"
  9705. wforms$(11) = "CymRideBel"
  9706. wforms$(12) = "CowBell"
  9707. wforms$(13) = "AcouBass"
  9708. wforms$(14) = "RotoTomRev"
  9709. wforms$(15) = "Castanets"
  9710. wforms$(16) = "ElecTom1"
  9711. wforms$(17) = "CymbalCrsh"
  9712. wforms$(18) = "CymRStRoll"
  9713. wforms$(19) = "Tomtom1"
  9714. ENDCASE
  9715. :
  9716. ENDCASE
  9717. :
  9718. ENDIF
  9719. :
  9720. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Voices
  9721. *RMLOAD WFS 500000
  9722. wavefilingsystem$ = "loaded"
  9723. :
  9724. FOR count% = 1 TO manywaves%
  9725. wave$ = wforms$(count%)
  9726. CASE wave$ OF
  9727. WHEN "BassBowAb" :
  9728. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9729. *WLOAD BassBowAb
  9730. *WINSTALL BassBowAb
  9731. WHEN "Vibe" :
  9732. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9733. *WLOAD Vibe
  9734. *WINSTALL Vibe
  9735. WHEN "AcouBass" :
  9736. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9737. *WLOAD AcouBass
  9738. *WINSTALL AcouBass
  9739. WHEN "BugleC" :
  9740. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9741. *WLOAD BugleC
  9742. *WINSTALL BugleC
  9743. WHEN "CornetEb" :
  9744. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9745. *WLOAD CornetEb
  9746. *WINSTALL CornetEb
  9747. WHEN "SaxEbBarC" :
  9748. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9749. *WLOAD SaxEbBarC
  9750. *WINSTALL SaxEbBarC
  9751. WHEN "SaxBbTenrE" :
  9752. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9753. *WLOAD SaxBbTenrE
  9754. *WINSTALL SaxBbTenrE
  9755. WHEN "BassoonEb" :
  9756. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9757. *WLOAD BassoonEb
  9758. *WINSTALL BassoonEb
  9759. WHEN "ClarinetBb" :
  9760. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9761. *WLOAD ClarinetBb
  9762. *WINSTALL ClarinetBb
  9763. WHEN "EngHornGb" :
  9764. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9765. *WLOAD EngHornGb
  9766. *WINSTALL EngHornGb
  9767. WHEN "MandolinDb" :
  9768. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9769. *WLOAD MandolinDb
  9770. *WINSTALL MandolinDb
  9771. WHEN "Piano2B" :
  9772. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9773. *WLOAD Piano2B
  9774. *WINSTALL Piano2B
  9775. WHEN "ClarVibEb" :
  9776. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9777. *WLOAD ClarVibEb
  9778. *WINSTALL ClarVibEb
  9779. WHEN "GtrDobroB" :
  9780. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9781. *WLOAD GtrDobroB
  9782. *WINSTALL GtrDobroB
  9783. WHEN "RecorderGb" :
  9784. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9785. *WLOAD RecorderGb
  9786. *WINSTALL RecorderGb
  9787. WHEN "FlugelHnEb" :
  9788. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9789. *WLOAD FlugelHnEb
  9790. *WINSTALL FlugelHnEb
  9791. WHEN "VceMmmGb23" :
  9792. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations3
  9793. *WLOAD VceMmmGb23
  9794. *WINSTALL VceMmmGb23
  9795. WHEN "VceMOooGb3" :
  9796. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations3
  9797. *WLOAD VceMOooGb3
  9798. *WINSTALL VceMOooGb3
  9799. WHEN "VceFemAahC" :
  9800. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations3
  9801. *WLOAD VceFemAahC
  9802. *WINSTALL VceFemAahC
  9803. WHEN "VceFMmmGb4" :
  9804. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations3
  9805. *WLOAD VceFMmmGb4
  9806. *WINSTALL VceFMmmGb4
  9807. WHEN "Bass" :
  9808. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.SoundSynth
  9809. *WLOAD Bass
  9810. *WINSTALL Bass
  9811. WHEN "ChurchBell" :
  9812. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.SoundSynth
  9813. *WLOAD ChurchBell
  9814. *WINSTALL ChurchBell
  9815. WHEN "GuiroFast" :
  9816. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  9817. *WLOAD GuiroFast
  9818. *WINSTALL GuiroFast
  9819. WHEN "Clave" :
  9820. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  9821. *WLOAD Clave
  9822. *WINSTALL Clave
  9823. WHEN "CowBell" :
  9824. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  9825. *WLOAD CowBell
  9826. *WINSTALL CowBell
  9827. WHEN "CymbRideHd" :
  9828. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  9829. *WLOAD CymbRideHd
  9830. *WINSTALL CymbRideHd
  9831. WHEN "AcGuitar1" :
  9832. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9833. *WLOAD AcGuitar1
  9834. *WINSTALL AcGuitar1
  9835. WHEN "CongaHi" :
  9836. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9837. *WLOAD CongaHi
  9838. *WINSTALL CongaHi
  9839. WHEN "DrumExplo" :
  9840. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9841. *WLOAD DrumExplo
  9842. *WINSTALL DrumExplo
  9843. WHEN "ElecTom1" :
  9844. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9845. *WLOAD ElecTom1
  9846. *WINSTALL ElecTom1
  9847. WHEN "Harp1" :
  9848. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9849. *WLOAD Harp1
  9850. *WINSTALL Harp1
  9851. WHEN "Harpsi" :
  9852. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9853. *WLOAD Harpsi
  9854. *WINSTALL Harpsi
  9855. WHEN "HiString" :
  9856. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9857. *WLOAD HiString
  9858. *WINSTALL HiString
  9859. WHEN "HonkyPiano" :
  9860. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9861. *WLOAD HonkyPiano
  9862. *WINSTALL HonkyPiano
  9863. WHEN "JapFlute" :
  9864. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9865. *WLOAD JapFlute
  9866. *WINSTALL JapFlute
  9867. WHEN "JazzOrgan" :
  9868. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9869. *WLOAD JazzOrgan
  9870. *WINSTALL JazzOrgan
  9871. WHEN "MidStrings" :
  9872. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9873. *WLOAD MidStrings
  9874. *WINSTALL MidStrings
  9875. WHEN "NoteArp1" :
  9876. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9877. *WLOAD NoteArp1
  9878. *WINSTALL NoteArp1
  9879. WHEN "SnareEcho" :
  9880. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9881. *WLOAD SnareEcho
  9882. *WINSTALL SnareEcho
  9883. WHEN "TablaHi" :
  9884. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9885. *WLOAD TablaHi
  9886. *WINSTALL TablaHi
  9887. WHEN "Timpani" :
  9888. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9889. *WLOAD Timpani
  9890. *WINSTALL Timpani
  9891. WHEN "Tomtom1" :
  9892. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9893. *WLOAD Tomtom1
  9894. *WINSTALL Tomtom1
  9895. WHEN "Trombone1" :
  9896. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9897. *WLOAD Trombone1
  9898. *WINSTALL Trombone1
  9899. WHEN "Trumpet" :
  9900. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9901. *WLOAD Trumpet
  9902. *WINSTALL Trumpet
  9903. WHEN "Xylophone" :
  9904. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9905. *WLOAD Xylophone
  9906. *WINSTALL Xylophone
  9907. WHEN "AcouGtr2B" :
  9908. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9909. *WLOAD AcouGtr2B
  9910. *WINSTALL AcouGtr2B
  9911. WHEN "AcuBassAb1" :
  9912. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9913. *WLOAD AcuBassAb1
  9914. *WINSTALL AcuBassAb1
  9915. WHEN "BagPipeG" :
  9916. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9917. *WLOAD BagPipeG
  9918. *WINSTALL BagPipeG
  9919. WHEN "BanjoChdBb" :
  9920. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9921. *WLOAD BanjoChdBb
  9922. *WINSTALL BanjoChdBb
  9923. WHEN "BazookiE" :
  9924. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9925. *WLOAD BazookiE
  9926. *WINSTALL BazookiE
  9927. WHEN "BellC" :
  9928. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9929. *WLOAD BellC
  9930. *WINSTALL BellC
  9931. WHEN "BrassEns1B" :
  9932. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9933. *WLOAD BrassEns1B
  9934. *WINSTALL BrassEns1B
  9935. WHEN "ClavichdBb" :
  9936. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9937. *WLOAD ClavichdBb
  9938. *WINSTALL ClavichdBb
  9939. WHEN "ClavinetBb" :
  9940. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9941. *WLOAD ClavinetBb
  9942. *WINSTALL ClavinetBb
  9943. WHEN "CornetEb" :
  9944. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9945. *WLOAD CornetEb
  9946. *WINSTALL CornetEb
  9947. WHEN "EnsWodAb45" :
  9948. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9949. *WLOAD EnsWodAb45
  9950. *WINSTALL EnsWodAb45
  9951. WHEN "EnsWodGb12" :
  9952. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9953. *WLOAD EnsWodGb12
  9954. *WINSTALL EnsWodGb12
  9955. WHEN "Glock2Ab5" :
  9956. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9957. *WLOAD Glock2Ab5
  9958. *WINSTALL Glock2Ab5
  9959. WHEN "GtMelobarC" :
  9960. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9961. *WLOAD GtMelobarC
  9962. *WINSTALL GtMelobarC
  9963. WHEN "GtWashbnBb" :
  9964. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9965. *WLOAD GtWashbnBb
  9966. *WINSTALL GtWashbnBb
  9967. WHEN "HarmonicaE" :
  9968. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9969. *WLOAD HarmonicaE
  9970. *WINSTALL HarmonicaE
  9971. WHEN "Jew'sHarpA" :
  9972. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9973. *WLOAD Jew'sHarpA
  9974. *WINSTALL Jew'sHarpA
  9975. WHEN "MusetteB" :
  9976. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9977. *WLOAD MusetteB
  9978. *WINSTALL MusetteB
  9979. WHEN "OboeGb" :
  9980. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9981. *WLOAD OboeGb
  9982. *WINSTALL OboeGb
  9983. WHEN "OrchHit2B" :
  9984. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9985. *WLOAD OrchHit2B
  9986. *WINSTALL OrchHit2B
  9987. WHEN "OrcSusBb23" :
  9988. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9989. *WLOAD OrcSusBb23
  9990. *WINSTALL OrcSusBb23
  9991. WHEN "PiccoloE" :
  9992. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9993. *WLOAD PiccoloE
  9994. *WINSTALL PiccoloE
  9995. WHEN "SaxSoprnoE" :
  9996. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9997. *WLOAD SaxSoprnoE
  9998. *WINSTALL SaxSoprnoE
  9999. WHEN "StrngThkBb" :
  10000. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  10001. *WLOAD StrngThkBb
  10002. *WINSTALL StrngThkBb
  10003. WHEN "TubaGb" :
  10004. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  10005. *WLOAD TubaGb
  10006. *WINSTALL TubaGb
  10007. WHEN "BassDrum" :
  10008. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.SoundSynth
  10009. *WLOAD BassDrum
  10010. *WINSTALL BassDrum
  10011. WHEN "HiHat" :
  10012. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.SoundSynth
  10013. *WLOAD HiHat
  10014. *WINSTALL HiHat
  10015. WHEN "OrcHit" :
  10016. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.SoundSynth
  10017. *WLOAD OrcHit
  10018. *WINSTALL OrcHit
  10019. WHEN "Piano" :
  10020. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.SoundSynth
  10021. *WLOAD Piano
  10022. *WINSTALL Piano
  10023. WHEN "Sax" :
  10024. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.SoundSynth
  10025. *WLOAD Sax
  10026. *WINSTALL Sax
  10027. WHEN "Snare" :
  10028. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.SoundSynth
  10029. *WLOAD Snare
  10030. *WINSTALL Snare
  10031. WHEN "Choir1" :
  10032. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  10033. *WLOAD Choir1
  10034. *WINSTALL Choir1
  10035. WHEN "ChurOrgan" :
  10036. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  10037. *WLOAD ChurOrgan
  10038. *WINSTALL ChurOrgan
  10039. WHEN "Opera" :
  10040. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  10041. *WLOAD Opera
  10042. *WINSTALL Opera
  10043. WHEN "OrchChoir" :
  10044. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  10045. *WLOAD OrchChoir
  10046. *WINSTALL OrchChoir
  10047. WHEN "OrganHit" :
  10048. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  10049. *WLOAD OrganHit
  10050. *WINSTALL OrganHit
  10051. WHEN "AgogoAfric" :
  10052. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10053. *WLOAD AgogoAfric
  10054. *WINSTALL AgogoAfric
  10055. WHEN "AgogoBrazi" :
  10056. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10057. *WLOAD AgogoBrazi
  10058. *WINSTALL AgogoBrazi
  10059. WHEN "AgogoWood" :
  10060. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10061. *WLOAD AgogoWood
  10062. *WINSTALL AgogoWood
  10063. WHEN "BDGatedRev" :
  10064. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10065. *WLOAD BDGatedRev
  10066. *WINSTALL BDGatedRev
  10067. WHEN "BDMarching" :
  10068. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10069. *WLOAD BDMarching
  10070. *WINSTALL BDMarching
  10071. WHEN "BDPiloMute" :
  10072. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10073. *WLOAD BDPiloMute
  10074. *WINSTALL BDPiloMute
  10075. WHEN "Cabasa" :
  10076. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10077. *WLOAD Cabasa
  10078. *WINSTALL Cabasa
  10079. WHEN "Cachichi1" :
  10080. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10081. *WLOAD Cachichi1
  10082. *WINSTALL Cachichi1
  10083. WHEN "CachichiTr" :
  10084. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10085. *WLOAD CachichiTr
  10086. *WINSTALL CachichiTr
  10087. WHEN "Castanets" :
  10088. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10089. *WLOAD Castanets
  10090. *WINSTALL Castanets
  10091. WHEN "CongaMid" :
  10092. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10093. *WLOAD CongaMid
  10094. *WINSTALL CongaMid
  10095. WHEN "CongaSmCl" :
  10096. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10097. *WLOAD CongaSmCl
  10098. *WINSTALL CongaSmCl
  10099. WHEN "CymbalCrsh" :
  10100. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10101. *WLOAD CymbalCrsh
  10102. *WINSTALL CymbalCrsh
  10103. WHEN "CymRideBel" :
  10104. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10105. *WLOAD CymRideBel
  10106. *WINSTALL CymRideBel
  10107. WHEN "CymRStRoll" :
  10108. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10109. *WLOAD CymRStRoll
  10110. *WINSTALL CymRStRoll
  10111. WHEN "CymSplshCa" :
  10112. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10113. *WLOAD CymSplshCa
  10114. *WINSTALL CymSplshCa
  10115. WHEN "Flexitone" :
  10116. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10117. *WLOAD Flexitone
  10118. *WINSTALL Flexitone
  10119. WHEN "GongSoft" :
  10120. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10121. *WLOAD GongSoft
  10122. *WINSTALL GongSoft
  10123. WHEN "Gonza1" :
  10124. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10125. *WLOAD Gonza1
  10126. *WINSTALL Gonza1
  10127. WHEN "GuiroSlow" :
  10128. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10129. *WLOAD GuiroSlow
  10130. *WINSTALL GuiroSlow
  10131. WHEN "HandClaps" :
  10132. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10133. *WLOAD HandClaps
  10134. *WINSTALL HandClaps
  10135. WHEN "HiHatFoot" :
  10136. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10137. *WLOAD HiHatFoot
  10138. *WINSTALL HiHatFoot
  10139. WHEN "Maracas1" :
  10140. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10141. *WLOAD Maracas1
  10142. *WINSTALL Maracas1
  10143. WHEN "Ratchet" :
  10144. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10145. *WLOAD Ratchet
  10146. *WINSTALL Ratchet
  10147. WHEN "RotoTomRev" :
  10148. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10149. *WLOAD RotoTomRev
  10150. *WINSTALL RotoTomRev
  10151. WHEN "SimmonsBD1" :
  10152. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10153. *WLOAD SimmonsBD1
  10154. *WINSTALL SimmonsBD1
  10155. WHEN "SimmonsSn1" :
  10156. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10157. *WLOAD SimmonsSn1
  10158. *WINSTALL SimmonsSn1
  10159. WHEN "SuperGong" :
  10160. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10161. *WLOAD SuperGong
  10162. *WINSTALL SuperGong
  10163. WHEN "SynTom" :
  10164. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10165. *WLOAD SynTom
  10166. *WINSTALL SynTom
  10167. WHEN "TimpCresBb" :
  10168. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10169. *WLOAD TimpCresBb
  10170. *WINSTALL TimpCresBb
  10171. WHEN "TimpLowBb" :
  10172. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10173. *WLOAD TimpLowBb
  10174. *WINSTALL TimpLowBb
  10175. WHEN "TimpRollEb" :
  10176. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10177. *WLOAD TimpRollEb
  10178. *WINSTALL TimpRollEb
  10179. WHEN "TomRoll" :
  10180. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10181. *WLOAD TomRoll
  10182. *WINSTALL TomRoll
  10183. WHEN "ToyHooter" :
  10184. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10185. *WLOAD ToyHooter
  10186. *WINSTALL ToyHooter
  10187. WHEN "ToyWhistle" :
  10188. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10189. *WLOAD ToyWhistle
  10190. *WINSTALL ToyWhistle
  10191. OTHERWISE VDU 7 : PRINT''" !!! ";wave$;" not loaded !!!"
  10192. PRINT'" Press C to continue loading"
  10193. CASE GET$ OF
  10194. WHEN"C","c" :
  10195. ENDCASE
  10196. ENDCASE
  10197. NEXT
  10198. REM waveload$ = "done" !! remove REM if loading waveforms reinstated
  10199. ENDIF
  10200. *NoDir
  10201. PROCdisplay
  10202. ENDPROC
  10203. :
  10204. REM*********************************************
  10205. :
  10206. DEF PROCtempo
  10207. :
  10208. warning$ = "y"
  10209. CLS
  10210. PRINT'" Tempo to start at which bar "
  10211. INPUT' " (for 1 type 0)"sbar%
  10212. PRINT'" and last until which bar "
  10213. INPUT' " (for end type 0) "ebar%
  10214. IF ebar% = 0 THEN ebar% = nobars%
  10215. INPUT'" Tempo per bar is "MM%
  10216. :
  10217. REM convert durations to new tempo
  10218. FOR count% = 0 TO numparts%-1
  10219. FOR counter% = 0 TO numusedcells%(count%)
  10220. bar% = array%(counter%,0,count%)DIV10^6
  10221. IF bar% >= sbar% AND bar% <= ebar% THEN
  10222. oldtempo% = tempi%(bar%)
  10223. dur% = (array%(counter%,1,count%)DIV10)MOD10^3
  10224. converter = oldtempo%/MM%
  10225. dur = dur% * converter
  10226. fraction = ((dur*10)DIV1)MOD10
  10227. IF fraction>4 THEN dur% = dur+1 ELSE dur% = dur
  10228. IF dur% > 999 THEN
  10229. dur% = 998 : REM only 3 array cells available
  10230. IF warning$ = "y" THEN
  10231. VDU 7
  10232. CLS
  10233. PRINT'" This tempo change has resulted in some "
  10234. PRINT " voices, starting with voice ";count%+1;", being "
  10235. PRINT " given a duration which will now be "
  10236. PRINT " permanently too short (max = 50 secs). "
  10237. PRINT'" If this is okay simply continue, "
  10238. PRINT " otherwise now QUIT and reload the file. "
  10239. PRINT'" (to continue press a key - NOT Esc)"
  10240. CASE GET$ OF
  10241. WHEN "c" : warning$ = "n"
  10242. OTHERWISE warning$ = "n"
  10243. ENDCASE
  10244. ENDIF
  10245. ENDIF
  10246. part1% = (array%(counter%,1,count%)DIV10^4)*10^4
  10247. part2% = dur% * 10
  10248. part3% = array%(counter%,1,count%)MOD10
  10249. array%(counter%,1,count%) = part1% + part2% + part3%
  10250. ENDIF
  10251. NEXT
  10252. NEXT
  10253. :
  10254. FOR count% = sbar% TO ebar%
  10255. tempi%(count%) = MM%
  10256. NEXT
  10257. IF sbar% = 1 THEN tempi%(0) = MM% : REM anticipates a bug when bars 1 - 1 PLAYed
  10258. :
  10259. PROCdisplay
  10260. :
  10261. ENDPROC
  10262. :
  10263. REM************************************************
  10264. :
  10265. DEF PROCerror
  10266. :
  10267. CASE errorbeforedisplay$ OF
  10268. WHEN "y":
  10269. CLS
  10270. REPORT
  10271. PRINT " at line ";ERL
  10272. PRINT '" To continue press Q to quit"
  10273. PRINT '" then allocate more memory in "
  10274. PRINT '" Tasks before starting CAC "
  10275. CASE GET$ OF
  10276. WHEN "Q","q" : QUIT
  10277. ENDCASE
  10278. WHEN "debug" :
  10279. PROCwindow(20,69,60,54)
  10280. REPORT
  10281. PRINT " at line ";ERL
  10282. PRINT'" To continue press a key"
  10283. PRINT'" or to quit press Q "
  10284. CASE GET$ OF
  10285. WHEN "Q","q": QUIT
  10286. OTHERWISE
  10287. PROCdisplay
  10288. ENDCASE
  10289. OTHERWISE
  10290. PROCdisplay
  10291. ENDCASE
  10292. :
  10293. ENDPROC
  10294. :
  10295. REM*************************************************
  10296. :
  10297. DEF PROCtobegin
  10298. :
  10299. PRINT''''" Open a new file or an existing one? (N/E)"
  10300. CASE GET$ OF
  10301. WHEN "N","n" : PROCprearraysetup : PROCarraysetup
  10302. alterbeatsat% = (960/beatfactor%)/8 : PROCdisplay
  10303. WHEN "E","e" : PROCloadfile
  10304. OTHERWISE VDU 7 : PROCtobegin
  10305. ENDCASE
  10306. :
  10307. ENDPROC
  10308. :
  10309. REM************************************************
  10310. :
  10311. DEF PROCfunctionreception
  10312. :
  10313. IF easiermenus$ = "n" THEN
  10314. PROCwindow(20,69,60,54)
  10315. CLS : OFF
  10316. :
  10317. PRINT'" Accel/rit A"
  10318. PRINT " Layered attacks L"
  10319. PRINT " Pitch string P"
  10320. PRINT " Pitch string 2 S"
  10321. PRINT " Pitch string 3 N"
  10322. PRINT " Pitch string 4 (trill/trem) T"
  10323. PRINT " pitch string 5 (pattern) R"
  10324. PRINT " pitch string 6 (equal steps) C"
  10325. PRINT " Interval string I"
  10326. PRINT " Distort D"
  10327. PRINT " Slave voice V"
  10328. PRINT " Double-stop B"
  10329. ELSE
  10330. PROCwindow(20,69,60,42)
  10331. CLS : OFF
  10332. :
  10333. PRINT'" Accel/rit A"
  10334. PRINT '" Layered attacks L"
  10335. PRINT '" Pitch string P"
  10336. PRINT '" Pitch string 2 S"
  10337. PRINT '" Pitch string 3 N"
  10338. PRINT '" Pitch string 4 (trill/trem) T"
  10339. PRINT '" pitch string 5 (pattern) R"
  10340. PRINT '" pitch string 6 (equal steps) C"
  10341. PRINT '" Interval string I"
  10342. PRINT '" Distort D"
  10343. PRINT '" Slave voice V"
  10344. PRINT '" Double-stop B"
  10345. ENDIF
  10346. CASE GET$ OF
  10347. WHEN "A","a" : PROCfunctionprelude
  10348. WHEN "L","l" : PROCprelayeredattacks
  10349. WHEN "P","p" : PROCpitchstring
  10350. WHEN "S","s" : PROCpitchstring2
  10351. WHEN "N","n" : PROCpitchstring3
  10352. WHEN "T","t" : PROCpitchstring4
  10353. WHEN "R","r" : PROCpitchstring5
  10354. WHEN "C","c" : PROCpitchstring6
  10355. WHEN "I","i" : PROCpreintervalstring
  10356. WHEN "D","d" : distort$ = "ON" : CLS
  10357. IF easiermenus$ = "n" THEN
  10358. PROCwindow(20,69,60,54)
  10359. CLS : OFF
  10360. PRINT''" Distort"
  10361. PRINT'" ATTACKS A"
  10362. PRINT " PITCHES P"
  10363. PRINT " DURATIONS D"
  10364. PRINT " AMPLITUDES M"
  10365. PRINT " ENVELOPES E"
  10366. PRINT " INFLECTIONS I"
  10367. ELSE
  10368. PROCwindow(20,69,60,42)
  10369. CLS : OFF
  10370. PRINT''" Distort"
  10371. PRINT'" ATTACKS A"
  10372. PRINT' " PITCHES P"
  10373. PRINT '" DURATIONS D"
  10374. PRINT '" AMPLITUDES M"
  10375. PRINT '" ENVELOPES E"
  10376. PRINT '" INFLECTIONS I"
  10377. ENDIF
  10378. :
  10379. CASE GET$ OF
  10380. WHEN "A","a" : distortpara$ = "attacks"
  10381. WHEN "P","p" : distortpara$ = "pitches"
  10382. WHEN "D","d" : distortpara$ = "durations"
  10383. WHEN "M","m" : distortpara$ = "amplitudes"
  10384. WHEN "E","e" : distortpara$ = "envelopes"
  10385. WHEN "I","i" : distortpara$ = "inflections"
  10386. OTHERWISE VDU 7 : PROCfunctionreception
  10387. ENDCASE
  10388. PROCcopy
  10389. WHEN "V","v" : quickslave$ = "n" : PROCslave
  10390. WHEN "B","b" : PROCdoublestop
  10391. WHEN "E", "e" : PROCconvertoldenvelopes
  10392. WHEN "O", "o" : PROCroguenotes
  10393. OTHERWISE VDU 7 : PROCfunctionreception
  10394. ENDCASE
  10395. ON
  10396. :
  10397. ENDPROC
  10398. :
  10399. REM**********************************************
  10400. :
  10401. DEF PROCprelayeredattacks
  10402. :
  10403. IF easiermenus$ = "n" THEN PROCwindow(20,69,70,55) ELSE PROCwindow(20,69,70,42)
  10404. :
  10405. PRINT'" Re-run current settings, or edit current settings,"
  10406. PRINT" or create new ones, or load a file? (R/E/N/F)"
  10407. CASE GET$ OF
  10408. WHEN "R","r" : PROClayeredattacks
  10409. WHEN "E","e" : PROCeditlayers
  10410. WHEN "F","f" : PROCloadlayers :PROCeditlayers
  10411. OTHERWISE
  10412. filenamelyr$ = ""
  10413. :
  10414. chanceoflayer%(1) = 1 : numlayersections% = 1 : numlayerOKsects%() = 0
  10415. :
  10416. INPUT'" Total duration is how many bars "bars%
  10417. INPUT'" and how many beats "beats%
  10418. PROCalterbeats : totallength% = (bars%*960)+beats%
  10419. PRINT''" LAYERS -"
  10420. INPUT'" How many layers "numlayers%
  10421. PRINT'" Are the layers to appear equally frequently,"
  10422. PRINT " or in certain proportions (E/P) "
  10423. :
  10424. CASE GET$ OF
  10425. :
  10426. WHEN "P","p" :
  10427. PRINT'" Piece is divided into how many sections"
  10428. INPUT " of different contribution-proportions "numlayersections%
  10429. :
  10430. IF numlayersections% > 1 THEN
  10431. :
  10432. FOR count% = 2 TO numlayersections%
  10433. PRINT'" Section ";count%;" starts at beat number "
  10434. INPUT beats%
  10435. PROCalterbeats : startoflayersection%(count%) = beats%
  10436. NEXT
  10437. ENDIF
  10438. :
  10439. FOR count% = 1 TO numlayersections%
  10440. FOR count1% = 1 TO numlayers%
  10441. PRINT '"In section ";count%;", layer ";count1%;" has "
  10442. PRINT "how many proportions?"
  10443. INPUT shareoflayers%(count%,count1%)
  10444. NEXT
  10445. NEXT
  10446. :
  10447. OTHERWISE shareoflayers%() = 1
  10448. ENDCASE
  10449. :
  10450. PRINT''" Are number of attacks or unit durations to be"
  10451. PRINT " divided into sections or appearance numbers?"
  10452. CASE GET$ OF
  10453. WHEN "Y","y" : bysections$ = "y"
  10454. OTHERWISE bysections$ = "n"
  10455. ENDCASE
  10456. PRINT'" Are unit durations in any layers to be multiplied?"
  10457. CASE GET$ OF
  10458. WHEN "Y","y" : tomultiply$ = "y"
  10459. OTHERWISE tomultiply$ = "n"
  10460. ENDCASE
  10461. PRINT'" Are the occurance of layers to be controlled?"
  10462. CASE GET$ OF
  10463. WHEN "Y","y" : tooccur$ = "y"
  10464. OTHERWISE tooccur$ = "n"
  10465. ENDCASE
  10466. PRINT'" Does the number of attacks ever exceed 1?"
  10467. CASE GET$ OF
  10468. WHEN "Y","y" : exceed1$ = "y"
  10469. OTHERWISE exceed1$ = "n"
  10470. ENDCASE
  10471. :
  10472. FOR count% = 1 TO numlayers%
  10473. :
  10474. PRINT''" NUMBER OF ATTACKS -"
  10475. :
  10476. IF bysections$ = "y" THEN
  10477. PRINT'" In layer ";count%;" are the number of attacks controlled"
  10478. PRINT " by sections or by appearance number (S/A)"
  10479. CASE GET$ OF
  10480. WHEN "S","s" :
  10481. attackscontrol$(count%) = "S"
  10482. INPUT'" How many sections "numattackssections%(count%)
  10483. IF numattackssections%(count%) > 1 THEN
  10484. FOR count1% = 2 TO numattackssections%(count%)
  10485. PRINT'" (layer ";count%;") section ";count1%;" starts at beat"
  10486. INPUT beats%
  10487. PROCalterbeats : startofattackssection%(count%,count1%) = beats%
  10488. NEXT
  10489. ENDIF
  10490. :
  10491. IF exceed1$ = "y" THEN
  10492. FOR count1% = 1 TO numattackssections%(count%)
  10493. PRINT'" In layer ";count%;", section ";count1%;" the number"
  10494. PRINT" of attacks varies between..."
  10495. INPUT numattax%(count%,count1%,0)
  10496. INPUT" and..."numattax%(count%,count1%,1)
  10497. NEXT
  10498. ELSE numattax%() = 1
  10499. ENDIF
  10500. :
  10501. WHEN "A","a" :
  10502. attackscontrol$(count%) = "A"
  10503. INPUT'" How many 'sections' of appearances "numattackssections1%(count%)
  10504. IF numattackssections1%(count%) > 1 THEN
  10505. FOR count1% = 2 TO numattackssections1%(count%)
  10506. PRINT'" (layer ";count%;") section ";count1%;" starts at appearance "
  10507. INPUT startofattackssection1%(count%,count1%)
  10508. NEXT
  10509. ENDIF
  10510. :
  10511. IF exceed1$ = "y" THEN
  10512. FOR count1% = 1 TO numattackssections1%(count%)
  10513. PRINT'" In layer ";count%;", section ";count1%;" the number"
  10514. PRINT" of attacks varies between..."
  10515. INPUT numattax1%(count%,count1%,0)
  10516. INPUT" and... "numattax1%(count%,count1%,1)
  10517. NEXT
  10518. ELSE numattax1%() = 1
  10519. ENDIF
  10520. ENDCASE
  10521. :
  10522. ELSE
  10523. attackscontrol$(count%) = "S" : numattackssections%(count%) = 1
  10524. IF exceed1$ = "y" THEN
  10525. PRINT'" In layer ";count%;" the number"
  10526. PRINT" of attacks varies between "
  10527. INPUT numattax%(count%,1,0)
  10528. INPUT" and..."numattax%(count%,1,1)
  10529. ELSE numattax%() = 1
  10530. ENDIF
  10531. ENDIF
  10532. :
  10533. PRINT''" DURATIONS"
  10534. :
  10535. IF bysections$ = "y" THEN
  10536. :
  10537. PRINT'" In layer ";count%;" are the unit durations controlled"
  10538. PRINT" by sections or by appearance number (S/A)"
  10539. CASE GET$ OF
  10540. WHEN "S","s" :
  10541. durationscontrol$(count%) = "S"
  10542. INPUT'" How many sections "numdurationssections%(count%)
  10543. IF numdurationssections%(count%) > 1 THEN
  10544. FOR count1% = 2 TO numdurationssections%(count%)
  10545. PRINT'" (layer ";count%;") section ";count1%;" starts at beat "
  10546. INPUT beats%
  10547. PROCalterbeats : startofdurationssection%(count%,count1%) = beats%
  10548. NEXT
  10549. ENDIF
  10550. :
  10551. FOR count1% = 1 TO numdurationssections%(count%)
  10552. PRINT'" In layer ";count%;", section ";count1%;" the unit duration is"
  10553. INPUT beats%
  10554. PROCalterbeats : doorations%(count%,count1%) = beats%
  10555. NEXT
  10556. :
  10557. WHEN "A","a" :
  10558. durationscontrol$(count%) = "A"
  10559. INPUT'" How many 'sections' "numdurationssections1%(count%)
  10560. IF numdurationssections1%(count%) > 1 THEN
  10561. FOR count1% = 2 TO numdurationssections1%(count%)
  10562. PRINT'" (layer ";count%;") section ";count1%;" starts at appearance "
  10563. INPUT startofdurationssection1%(count%,count1%)
  10564. NEXT
  10565. ENDIF
  10566. FOR count1% = 1 TO numdurationssections1%(count%)
  10567. PRINT'" In layer ";count%;", section ";count1%;" the unit duration is "
  10568. INPUT beats%
  10569. PROCalterbeats : doorations1%(count%,count1%) = beats%
  10570. NEXT
  10571. ENDCASE
  10572. :
  10573. ELSE durationscontrol$(count%) = "S" : numdurationssections%(count%) = 1
  10574. PRINT'" In layer ";count%;" the unit duration is"
  10575. INPUT beats%
  10576. PROCalterbeats : doorations%(count%,1) = beats%
  10577. ENDIF
  10578. :
  10579. IF tomultiply$ = "y" THEN
  10580. :
  10581. PRINT'" Do you want the unit duration to be multiplied"
  10582. PRINT " by a given series of values (Y/N) "
  10583. CASE GET$ OF
  10584. WHEN "Y","y" :
  10585. multiplier$(count%) = "Y"
  10586. PRINT'" starting fresh at each appearance or irrespective (F/I) "
  10587. CASE GET$ OF
  10588. WHEN "F","f" :
  10589. multipliermode$(count%) = "F"
  10590. OTHERWISE multipliermode$(count%) = "I"
  10591. ENDCASE
  10592. :
  10593. PRINT'" How many values "
  10594. INPUT numvalues%(count%)
  10595. FOR count1% = 1 TO numvalues%(count%)
  10596. PRINT'" value ";count1%;" is "
  10597. INPUT values(count%,count1%)
  10598. NEXT
  10599. OTHERWISE multiplier$(count%) = "N"
  10600. ENDCASE
  10601. :
  10602. ELSE multiplier$(count%) = "N"
  10603. ENDIF
  10604. :
  10605. IF tooccur$ = "y" THEN
  10606. :
  10607. PRINT'" Do you want this layer to reoccur according"
  10608. PRINT " to minimum and maximum intervals (eg to"
  10609. PRINT " control phrase-lengths)?"
  10610. CASE GET$ OF
  10611. WHEN "Y","y" :
  10612. INPUT'" How many sections of this "numlayerOKsects%(count%)
  10613. FOR count1% = 1 TO numlayerOKsects%(count%)
  10614. IF numlayerOKsects%(count%) > 1 THEN
  10615. PRINT'" section ";count1%;" begins at beat "
  10616. INPUT beats%
  10617. PROCalterbeats : x% = beats%
  10618. ELSE x% = 0
  10619. ENDIF
  10620. PRINT'" in this section the layer should NOT reoccur"
  10621. PRINT" until at least how many beats from the"
  10622. PRINT" end of its previous occurence?"
  10623. INPUT beats%
  10624. PROCalterbeats : y% = beats%
  10625. PRINT'" but SHOULD be made to reoccur after how "
  10626. PRINT" many beats from the end of its previous"
  10627. PRINT" occurence?"
  10628. INPUT beats%
  10629. PROCalterbeats : z% = beats%
  10630. layersOK%(count%,count1%,0) = x%
  10631. layersOK%(count%,count1%,1) = y%
  10632. layersOK%(count%,count1%,2) = z%
  10633. NEXT
  10634. OTHERWISE
  10635. ENDCASE
  10636. :
  10637. ENDIF
  10638. :
  10639. NEXT
  10640. :
  10641. ENDCASE
  10642. :
  10643. PROClayeredattacks
  10644. :
  10645. ENDPROC
  10646. :
  10647. REM**************************************************
  10648. :
  10649. DEF PROClayeredattacks
  10650. :
  10651. REM line below to come BEFORE the loop
  10652. cellsused% = 0 : attacks1%() = 0 : layer% = 0 : appearances%() = 0
  10653. valuescounter%() = 1 : layerends%() = 0
  10654. :
  10655. REPEAT
  10656. REM WHICH LAYER (loop starts here)
  10657. layer1% = layer%
  10658. layerends%(layer1%) = attacks1%(cellsused%)
  10659. :
  10660. REM fill OKtouselayers%() according to which section you're in
  10661. :
  10662. FOR count% = 1 TO numlayers%
  10663. IF numlayerOKsects%(count%) > 0 THEN
  10664. FOR counter% = 1 TO numlayerOKsects%(count%)
  10665. IF attacks1%(cellsused%) >= layersOK%(count%,counter%,0) THEN
  10666. OKtouselayers%(count%,0) = layerends%(count%) + layersOK%(count%,counter%,1)
  10667. OKtouselayers%(count%,1) = layerends%(count%) + layersOK%(count%,counter%,2)
  10668. ENDIF
  10669. NEXT
  10670. ENDIF
  10671. NEXT
  10672. :
  10673. REM use any layers due
  10674. FOR count% = 1 TO numlayers%
  10675. IF numlayerOKsects%(count%) > 0 THEN
  10676. IF attacks1%(cellsused%) >= OKtouselayers%(count%,1) THEN layer% = count%
  10677. ENDIF
  10678. NEXT
  10679. :
  10680. IF layer1% = layer% THEN
  10681. :
  10682. REPEAT
  10683. :
  10684. REM fill layershare%() according to which section you're in
  10685. FOR count% = 1 TO numlayersections%
  10686. :
  10687. IF attacks1%(cellsused%) >= startoflayersection%(count%) THEN
  10688. FOR count1% = 1 TO numlayers%
  10689. layershare%(count1%) = shareoflayers%(count%,count1%)
  10690. NEXT
  10691. ENDIF
  10692. NEXT
  10693. :
  10694. FOR count% = 1 TO numlayers%
  10695. chanceoflayer%(count%+1) = chanceoflayer%(count%)+layershare%(count%)
  10696. NEXT
  10697. x% = RND((chanceoflayer%(numlayers%+1))-1)
  10698. FOR count% = 1 TO numlayers%
  10699. IF x% >= chanceoflayer%(count%) THEN layer% = count%
  10700. NEXT
  10701. :
  10702. REM exclude layers coming too soon
  10703. IF numlayerOKsects%(layer%) > 0 THEN
  10704. IF attacks1%(cellsused%) < OKtouselayers%(layer%,0) THEN layerOK$ = "n" ELSE layerOK$ = "y"
  10705. ELSE layerOK$ = "y"
  10706. ENDIF
  10707. UNTIL layer% <> layer1% AND layerOK$ = "y"
  10708. :
  10709. ENDIF
  10710. appearances%(layer%) += 1
  10711. :
  10712. REM NUMBER OF ATTACKS
  10713. IF attackscontrol$(layer%) = "S" THEN
  10714. FOR count% = 1 TO numattackssections%(layer%)
  10715. IF attacks1%(cellsused%) >= startofattackssection%(layer%,count%) THEN
  10716. a% = numattax%(layer%,count%,0) : b% = numattax%(layer%,count%,1)
  10717. IF (b%-a%) = 0 THEN
  10718. noattax% = 1
  10719. ELSE
  10720. noattax% = RND((b%-a%)+1)
  10721. ENDIF
  10722. noattax% += (a%-1)
  10723. ENDIF
  10724. NEXT
  10725. ELSE
  10726. FOR count% = 1 TO numattackssections1%(layer%)
  10727. IF appearances%(layer%) >= startofattackssection1%(layer%,count%) THEN
  10728. a% = numattax1%(layer%,count%,0) : b% = numattax1%(layer%,count%,1)
  10729. IF (b%-a%) = 0 THEN
  10730. noattax% = 1
  10731. ELSE
  10732. noattax% = RND((b%-a%)+1)
  10733. ENDIF
  10734. noattax% += (a%-1)
  10735. ENDIF
  10736. NEXT
  10737. ENDIF
  10738. :
  10739. IF durationscontrol$(layer%) = "S" THEN
  10740. FOR count% = 1 TO numdurationssections%(layer%)
  10741. IF attacks1%(cellsused%) >= startofdurationssection%(layer%,count%) THEN
  10742. duration% = doorations%(layer%,count%)
  10743. ENDIF
  10744. NEXT
  10745. ELSE
  10746. FOR count% = 1 TO numdurationssections1%(layer%)
  10747. IF appearances%(layer%) >= startofdurationssection1%(layer%,count%) THEN
  10748. duration% = doorations1%(layer%,count%)
  10749. ENDIF
  10750. NEXT
  10751. ENDIF
  10752. :
  10753. IF multiplier$(layer%) = "N" THEN
  10754. FOR count% = 1 TO noattax%
  10755. attacks1%(cellsused%+1) = attacks1%(cellsused%)+duration%
  10756. cellsused% += 1
  10757. NEXT
  10758. ELSE
  10759. IF multipliermode$(layer%) = "F" THEN
  10760. FOR count% = 1 TO noattax%
  10761. attacks1%(cellsused%+1)=attacks1%(cellsused%)+(duration%*values(layer%,count%))
  10762. cellsused% += 1
  10763. NEXT
  10764. ELSE
  10765. FOR count% = 1 TO noattax%
  10766. attacks1%(cellsused%+1)=attacks1%(cellsused%)+(duration%*values(layer%,valuescounter%(layer%)))
  10767. cellsused% += 1
  10768. valuescounter%(layer%) += 1
  10769. IF valuescounter%(layer%) > numvalues%(layer%) THEN valuescounter%(layer%) = 1
  10770. NEXT
  10771. ENDIF
  10772. ENDIF
  10773. :
  10774. UNTIL attacks1%(cellsused%) >= totallength%
  10775. manyattacks% = cellsused%+1
  10776. :
  10777. PRINT'" Do you want to save these settings?"
  10778. CASE GET$ OF
  10779. WHEN "Y","y" : PROCsavelayers
  10780. OTHERWISE
  10781. ENDCASE
  10782. :
  10783. method$ = "raw" : PROCinsertattacks
  10784. :
  10785. ENDPROC
  10786. :
  10787. REM*********************************************************
  10788. :
  10789. DEF PROCconvertsamplenote
  10790. :
  10791. pitchclass% = samplenote% DIV 100
  10792. CASE pitchclass% OF
  10793. WHEN 0 : eighthtone% = 1
  10794. WHEN 1 : eighthtone% = 9
  10795. WHEN 2 : eighthtone% = 17
  10796. WHEN 3 : eighthtone% = 21
  10797. WHEN 4 : eighthtone% = 29
  10798. WHEN 5 : eighthtone% = 37
  10799. WHEN 6 : eighthtone% = 45
  10800. ENDCASE
  10801. octave% = samplenote% MOD 10
  10802. eighthtone% += (octave%*48)
  10803. accidental% = ((samplenote% MOD 100)DIV10)-1
  10804. eighthtone% += accidental%
  10805. samplenote% = eighthtone%
  10806. ENDPROC
  10807. :
  10808. REM*******************************************
  10809. :
  10810. DEF PROCconvertsimplenote
  10811. :
  10812. IF simplenote% > 2 THEN oct% = 0
  10813. IF simplenote% > 50 THEN oct% = 1
  10814. IF simplenote% > 98 THEN oct% = 2
  10815. IF simplenote% > 146 THEN oct% = 3
  10816. IF simplenote% > 194 THEN oct% = 4
  10817. IF simplenote% > 242 THEN oct% = 5
  10818. IF simplenote% > 290 THEN oct% = 6
  10819. IF simplenote% > 338 THEN oct% = 7
  10820. IF simplenote% > 386 THEN oct% = 8
  10821. :
  10822. WHILE simplenote% > 50
  10823. simplenote% -= 48
  10824. ENDWHILE
  10825. :
  10826. CASE simplenote% OF
  10827. WHEN 3 : pitch% = 3
  10828. WHEN 4 : pitch% = 4
  10829. WHEN 5 : pitch% = 5
  10830. WHEN 6 : pitch% = 6
  10831. WHEN 7 : pitch% = 7
  10832. WHEN 8 : pitch% = 8
  10833. WHEN 9 : pitch% = 11
  10834. WHEN 10 : pitch% = 12
  10835. WHEN 11 : pitch% = 13
  10836. WHEN 12 : pitch% = 14
  10837. WHEN 13 : pitch% = 15
  10838. WHEN 14 : pitch% = 16
  10839. WHEN 15 : pitch% = 17
  10840. WHEN 16 : pitch% = 18
  10841. WHEN 17 : pitch% = 21
  10842. WHEN 18 : pitch% = 22
  10843. WHEN 19 : pitch% = 23
  10844. WHEN 20 : pitch% = 24
  10845. WHEN 21 : pitch% = 25
  10846. WHEN 22 : pitch% = 26
  10847. WHEN 23 : pitch% = 27
  10848. WHEN 24 : pitch% = 34
  10849. WHEN 25 : pitch% = 35
  10850. WHEN 26 : pitch% = 36
  10851. WHEN 27 : pitch% = 37
  10852. WHEN 28 : pitch% = 38
  10853. WHEN 29 : pitch% = 39
  10854. WHEN 30 : pitch% = 42
  10855. WHEN 31 : pitch% = 43
  10856. WHEN 32 : pitch% = 44
  10857. WHEN 33 : pitch% = 45
  10858. WHEN 34 : pitch% = 46
  10859. WHEN 35 : pitch% = 47
  10860. WHEN 36 : pitch% = 48
  10861. WHEN 37 : pitch% = 51
  10862. WHEN 38 : pitch% = 52
  10863. WHEN 39 : pitch% = 53
  10864. WHEN 40 : pitch% = 54
  10865. WHEN 41 : pitch% = 55
  10866. WHEN 42 : pitch% = 56
  10867. WHEN 43 : pitch% = 57
  10868. WHEN 44 : pitch% = 58
  10869. WHEN 45 : pitch% = 61
  10870. WHEN 46 : pitch% = 62
  10871. WHEN 47 : pitch% = 63
  10872. WHEN 48 : pitch% = 64
  10873. WHEN 49 : pitch% = 65
  10874. WHEN 50 : pitch% = 66
  10875. ENDCASE
  10876. :
  10877. simplenote% = (pitch%*10)+oct%
  10878. ENDPROC
  10879. :
  10880. REM**************************************
  10881. :
  10882. :
  10883. DEF PROCpitchstring
  10884. :
  10885. PROCwindow(20,25,70,35)
  10886. :
  10887. :
  10888. PRINT'" Create a new pitch string or edit the"
  10889. PRINT " current one, or load a file (N/E/F)"
  10890. CASE GET$ OF
  10891. WHEN "E","e" : loadstring$ = "n" :PROCeditpitchstring
  10892. WHEN "F","f" : loadstring$ = "y" :PROCeditpitchstring
  10893. OTHERWISE
  10894. ENDCASE
  10895. :
  10896. filenamestg$ = ""
  10897. contoursequences%() = 0
  10898. transpositionsequences%() = 0
  10899. octavesequences%() = 0
  10900. PRINT'" Total number of notes in the"
  10901. INPUT " pitch string (inc. sample) "numpitches%
  10902. PRINT'" Is the grid semi, quarter or eighth-tone (S/Q/E) "
  10903. PRINT'" (0 = semi) "
  10904. CASE GET$ OF
  10905. WHEN "S","s" : grid$ = "s"
  10906. WHEN "Q","q" : grid$ = "q"
  10907. WHEN "E","e" : grid$ = "e"
  10908. OTHERWISE grid$ = "s"
  10909. ENDCASE
  10910. CLS
  10911. :
  10912. PRINT'" SAMPLE "
  10913. INPUT'" How many notes in the sample? "samplesize%
  10914. FOR count% = 1 TO samplesize%
  10915. PRINT'" note ";count%;" is pitchclass ";
  10916. COLOUR 3
  10917. CASE GET$ OF
  10918. WHEN "C","c" : samplenote% = 0 : PRINT "C"
  10919. WHEN "D","d" : samplenote% = 1 : PRINT "D"
  10920. WHEN "E","e" : samplenote% = 2 : PRINT "E"
  10921. WHEN "F","f" : samplenote% = 3 : PRINT "F"
  10922. WHEN "G","g" : samplenote% = 4 : PRINT "G"
  10923. WHEN "A","a" : samplenote% = 5 : PRINT "A"
  10924. WHEN "B","b" : samplenote% = 6 : PRINT "B"
  10925. ENDCASE
  10926. samplenote% = samplenote%*100
  10927. COLOUR 0
  10928. PRINT " accidental ";
  10929. COLOUR 3
  10930. CASE GET$ OF
  10931. WHEN "1" : samplenote% += 10 : PRINT "flat"
  10932. WHEN "2" : samplenote% += 20 : PRINT "3/8 flat"
  10933. WHEN "3" : samplenote% += 30 : PRINT "1/4 flat"
  10934. WHEN "4" : samplenote% += 40 : PRINT "1/8 flat"
  10935. WHEN "5" : samplenote% += 50 : PRINT "nat"
  10936. WHEN "6" : samplenote% += 60 : PRINT "1/8 shrp"
  10937. WHEN "7" : samplenote% += 70 : PRINT "1/4 shrp"
  10938. WHEN "8" : samplenote% += 80 : PRINT "3/8 shrp"
  10939. WHEN "9" : samplenote% += 90 : PRINT "shrp"
  10940. ENDCASE
  10941. COLOUR 0
  10942. samplenote% += 5
  10943. PROCconvertsamplenote
  10944. sample%(count%) = samplenote%
  10945. :
  10946. NEXT
  10947. :
  10948. CLS
  10949. PRINT'" OCTAVE SEQUENCES"
  10950. PRINT'" How many different sections of"
  10951. INPUT " octave sequences are there "octavesections%
  10952. IF octavesections% > 1 THEN
  10953. FOR count% = 2 TO octavesections%
  10954. PRINT'" section ";count%;" begins at note number "
  10955. INPUT x%
  10956. octavesequences%(count%,0,0) = x%
  10957. NEXT
  10958. ENDIF
  10959. :
  10960. FOR count% = 1 TO octavesections%
  10961. FOR pitch% = 0 TO 47
  10962. entry$ = "n"
  10963. IF pitch% MOD 4 = 0 AND grid$<>"s" THEN entry$ = "y"
  10964. IF (pitch%-2)MOD4 = 0 THEN entry$ = "y"
  10965. IF (pitch%-1)MOD2 = 0 AND grid$ = "e" THEN entry$ = "y"
  10966. IF entry$ = "y" THEN
  10967. PRINT '"In section ";count%;" the sequence of octaves for ";
  10968. COLOUR 3 : PRINT pitchnames$(pitch%)
  10969. COLOUR 0 : PRINT "has how many elements "
  10970. INPUT e%
  10971. PRINT""
  10972. octavesequences%(count%,pitch%+1,0) = e%
  10973. FOR counter% = 1 TO e%
  10974. PRINT " element ";counter%;
  10975. INPUT " is octave "o%
  10976. octavesequences%(count%,pitch%+1,counter%) = o%
  10977. NEXT
  10978. ENDIF
  10979. NEXT
  10980. NEXT
  10981. :
  10982. CLS
  10983. PRINT'" TRANSPOSITION LEVELS"
  10984. PRINT'" How many different sections of"
  10985. INPUT" transposition are there "transpositionsections%
  10986. IF transpositionsections% > 1 THEN
  10987. FOR count% = 2 TO transpositionsections%
  10988. PRINT'" Section ";count%;
  10989. INPUT " begins at note number "n%
  10990. transpositionsequences%(count%,0) = n%
  10991. PRINT" and transposes up/down by how many ";
  10992. CASE grid$ OF
  10993. WHEN "e" : PRINT "eighthtones" : INPUT " (+/- 1 etc) "x%
  10994. transpositionsequences%(count%,1) = x%
  10995. WHEN "q" : PRINT "quartertones" : INPUT " (+/- 1 etc) "x%
  10996. transpositionsequences%(count%,1) = x% * 2
  10997. WHEN "s" : PRINT "semitones" : INPUT " (+/- 1 etc) "x%
  10998. transpositionsequences%(count%,1) = x% * 4
  10999. ENDCASE
  11000. NEXT
  11001. ENDIF
  11002. :
  11003. CLS
  11004. PRINT'" CONTOUR SEQUENCES"
  11005. PRINT'" How many different sections of "
  11006. INPUT " contour sequences are there "contoursections%
  11007. IF contoursections%>1 THEN
  11008. FOR count% = 2 TO contoursections%
  11009. PRINT'" Section ";count%;
  11010. INPUT " begins at note number "n%
  11011. contoursequences%(count%,0) = n%
  11012. NEXT
  11013. ENDIF
  11014. :
  11015. FOR count% = 1 TO contoursections%
  11016. PRINT'" In section ";count%;
  11017. INPUT " there are how many contours "c%
  11018. contoursequences%(count%,1) = c%
  11019. PRINT""
  11020. FOR counter% = 1 TO c%
  11021. PRINT " number ";counter%;
  11022. INPUT " is contour "contoor%
  11023. contoursequences%(count%,counter%+1) = contoor%
  11024. NEXT
  11025. NEXT
  11026. :
  11027. contoursize% = 0 : seriesnote% = 1 : samplenote% = 0
  11028. contoursequence% = 1 : transpositionsequence% = 1
  11029. octavesequence% = 1 : transpositionsequences%(1,1) = 0
  11030. contourloop% = 0 : octaveloop%() = 0
  11031. :
  11032. REPEAT
  11033. seriesnote% += contoursize%
  11034. IF seriesnote% >= contoursequences%(contoursequence%+1,0) AND contoursequences%(contoursequence%+1,0) <> 0 THEN
  11035. contoursequence% += 1
  11036. contourloop% = 0
  11037. ENDIF
  11038. :
  11039. contourloop% += 1
  11040. IF contourloop% > contoursequences%(contoursequence%,1) THEN contourloop% = 1
  11041. contour% = contoursequences%(contoursequence%,contourloop%+1)
  11042. contoursize% = contours%(contour%,0)
  11043. :
  11044. IF seriesnote% >= transpositionsequences%(transpositionsequence%+1,0) AND transpositionsequences%(transpositionsequence%+1,0) <> 0 THEN
  11045. transpositionsequence% += 1
  11046. ENDIF
  11047. transposition% = transpositionsequences%(transpositionsequence%,1)
  11048. :
  11049. FOR count% = 1 TO contoursize%
  11050. samplenote% += 1
  11051. IF samplenote% > samplesize% THEN samplenote% = 1
  11052. group%(count%) = sample%(samplenote%) + transposition%
  11053. NEXT
  11054. :
  11055. IF seriesnote% >= octavesequences%(octavesequence%+1,0,0) AND octavesequences%(octavesequence%+1,0,0) <> 0 THEN
  11056. octavesequence% += 1
  11057. octaveloop%() = 0
  11058. ENDIF
  11059. :
  11060. FOR count% = 1 TO contoursize%
  11061. pitchclass% = group%(count%)
  11062. REPEAT
  11063. pitchclass% -= 48
  11064. UNTIL pitchclass% < 51
  11065. pitchclass% -= 2
  11066. octaveloop%(pitchclass%) += 1
  11067. IF octaveloop%(pitchclass%) > octavesequences%(octavesequence%,pitchclass%,0) THEN octaveloop%(pitchclass%) = 1
  11068. oxtave% = octavesequences%(octavesequence%,pitchclass%,octaveloop%(pitchclass%))
  11069. group%(count%) = (pitchclass%+2) + (48*oxtave%)
  11070. NEXT
  11071. :
  11072. IF contoursize% > 1 THEN
  11073. REPEAT
  11074. FOR count% = 1 TO (contoursize%-1)
  11075. IF group%(count%) >= group%(count%+1) THEN
  11076. save% = group%(count%)
  11077. group%(count%) = group%(count%+1)
  11078. group%(count%+1) = save%
  11079. ENDIF
  11080. NEXT
  11081. no% = 0
  11082. FOR count% = 1 TO (contoursize%-1)
  11083. IF group%(count%) > group%(count%+1) THEN no% = 1
  11084. NEXT
  11085. UNTIL no% = 0
  11086. ENDIF
  11087. :
  11088. FOR count% = 1 TO contoursize%
  11089. simplenote% = group%(contours%(contour%,count%))
  11090. PROCconvertsimplenote
  11091. pitches%((seriesnote%+count%)-1) = simplenote%
  11092. NEXT
  11093. :
  11094. UNTIL ((seriesnote%+contoursize%)-1) >= numpitches%
  11095. :
  11096. FOR count% = 0 TO numpitches%-1 : pitches%(count%) = pitches%(count%+1) : NEXT
  11097. PRINT'" Do you want to save this pitch string?"
  11098. CASE GET$ OF
  11099. WHEN "Y","y","+" : PROCsavepitchstring
  11100. OTHERWISE
  11101. ENDCASE
  11102. :
  11103. PROCinsertpitches
  11104. :
  11105. ENDPROC
  11106. :
  11107. REM*******************************************************
  11108. :
  11109. DEF PROCcopy
  11110. :
  11111. CLS : OFF
  11112. repeatposit$ = "n"
  11113. IF distort$ = "OFF" THEN dothis$ = "YES"
  11114. IF distort$ = "ON" THEN
  11115. IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
  11116. ENDIF
  11117. IF dothis$ = "YES" THEN
  11118. IF easiermenus$ = "n" THEN
  11119. PRINT'" Copy one note - C "
  11120. PRINT " Copy passage - c "
  11121. PRINT " Move one note - M "
  11122. PRINT " Move passage - m "
  11123. PRINT " Extract - E "
  11124. PRINT " Copy rhythm - R "
  11125. PRINT " Save - S "
  11126. PRINT " Import - I "
  11127. ELSE
  11128. PRINT'" Copy one note - C "
  11129. PRINT '" Copy passage - c "
  11130. PRINT '" Move one note - M "
  11131. PRINT '" Move passage - m "
  11132. PRINT '" Extract - E "
  11133. PRINT '" Copy rhythm - R "
  11134. PRINT '" Save - S "
  11135. PRINT '" Import - I "
  11136. ENDIF
  11137. CASE GET$ OF
  11138. WHEN "c" : copymove$ = "C" : savevoice$ = "N" : justone$ = "n"
  11139. WHEN "m" : copymove$ = "M" : savevoice$ = "N" : justone$ = "n"
  11140. WHEN "C" : copymove$ = "C" : savevoice$ = "N" : justone$ = "y"
  11141. WHEN "M" : copymove$ = "M" : savevoice$ = "N" : justone$ = "y"
  11142. WHEN "E","e" :
  11143. CLS : PRINT'" Copy-extract or move-extract? (C/M) "
  11144. CASE GET$ OF
  11145. WHEN "C","c" : copymove$ = "EC" : justone$ = "n"
  11146. OTHERWISE copymove$ = "EM" : justone$ = "n"
  11147. ENDCASE
  11148. savevoice$ = "N"
  11149. WHEN "R","r" : PROCcopyrhythm
  11150. WHEN "S","s" : copymove$ = "C" : savevoice$ = "Y"
  11151. WHEN "I","i" : copymove$ = "C" : savevoice$ = "N" : PROCimportvoice
  11152. OTHERWISE
  11153. copymove$ = "C" : savevoice$ = "N" : justone$ = "n"
  11154. ENDCASE
  11155. ELSE copymove$ = "C"
  11156. ENDIF
  11157. :
  11158. PROCcopy2
  11159. IF quickextract$ = "y" THEN quickextract$ = "n"
  11160. :
  11161. ENDPROC
  11162. :
  11163. *******************************************************************
  11164. :
  11165. DEF PROCcopy2
  11166. :
  11167. IF easiermenus$ = "n" THEN PROCwindow(20,69,67,54) ELSE PROCwindow(20,69,67,42)
  11168. CLS
  11169. :
  11170. IF quickcopy$ = "n" THEN
  11171. :
  11172. IF screenvoices$ = "n" THEN
  11173. INPUT'" Which voice? (0 = 1) "voice%
  11174. IF voice% = 0 THEN PROCpressenter
  11175. ELSE
  11176. PRINT'" Which screen voice "
  11177. CASE GET$ OF
  11178. WHEN "1" : voice% = 1
  11179. WHEN "2" : voice% = 2
  11180. WHEN "3" : voice% = 3
  11181. OTHERWISE PROCpressenter
  11182. ENDCASE
  11183. ENDIF
  11184. :
  11185. IF copymove$ = "EC" OR copymove$ = "EM" THEN
  11186. IF screenvoices$ = "y" THEN extractvoice% = displayvoices%(startv%+voice%-1) ELSE extractvoice% = voice%
  11187. ENDIF : REM copymove$
  11188. :
  11189. IF screenvoices$ = "y" THEN voice% = displayvoices%(startv%+voice%-1)
  11190. voice% -= 1
  11191. samevoice% = voice%
  11192. :
  11193. CLS
  11194. INPUT'" Starting at bar "copystartbar%
  11195. IF copystartbar% = 0 THEN
  11196. copystartbar% = holdbar1% : copystartbeat% = holdbeat1% : repeatposit$ = "y"
  11197. ENDIF
  11198. holdbar% = copystartbar%
  11199. holdbar1% = copystartbar%
  11200. IF repeatposit$ = "y" THEN
  11201. PRINT'" bar ";copystartbar%;" beat ";copystartbeat%;"?"
  11202. PRINT'" (for OK press 0, if not OK press X)"
  11203. CASE GET$ OF
  11204. WHEN"X","x" : PROCcopy
  11205. OTHERWISE
  11206. ENDCASE
  11207. ELSE
  11208. INPUT" beat "beats%
  11209. PROCalterbeats : copystartbeat% = beats%
  11210. holdbeat% = copystartbeat%
  11211. holdbeat1% = copystartbeat%
  11212. ENDIF : REM repeatposit$
  11213. :
  11214. IF justone$ = "n" THEN
  11215. PRINT'" Ending at bar "
  11216. PRINT '" (for last bar press 0, for previous "
  11217. INPUT " last bar press 0 twice) "copyendbar%
  11218. IF copyendbar% > 0 THEN savethisbar% = copyendbar%
  11219. IF copyendbar% > 0 THEN
  11220. INPUT " beat "beats%
  11221. PROCalterbeats : copyendbeat% = beats% : savethisbeats% = beats%
  11222. :
  11223. ELSE
  11224. thing$ = INKEY$(50)
  11225. IF thing$ <> "" THEN
  11226. copyendbar% = savethisbar% : copyendbeat% = savethisbeats%
  11227. COLOUR 3
  11228. PRINT'" bar ";copyendbar%;" beat ";copyendbeat%;"?"
  11229. COLOUR 0
  11230. PRINT '" (for OK press 0, if not OK press X)"
  11231. CASE GET$ OF
  11232. WHEN "X","x" : PROCcopy2
  11233. OTHERWISE
  11234. ENDCASE
  11235. ENDIF : REM thing$
  11236. :
  11237. ENDIF : REM copyendbar%
  11238. :
  11239. ELSE
  11240. copyendbar% = copystartbar%
  11241. copyendbeat% = copystartbeat%
  11242. ENDIF : REM justone$
  11243. :
  11244. IF copymove$ = "EC" OR copymove$ = "EM" THEN PROCextractinfo
  11245. :
  11246. ELSE : REM quickcopy$
  11247. :
  11248. IF screenvoices$ = "n" THEN
  11249. :
  11250. IF copysuccessively$ = "n" THEN
  11251. INPUT ' ' " Which voice? (0 = top) "voice%
  11252. :
  11253. IF voice% = 0 THEN
  11254. :
  11255. IF nodelay$ = "y" THEN voice% = displayvoices%(startv%) ELSE PROCpressenter
  11256. :
  11257. ENDIF : REM voice%
  11258. :
  11259. ELSE PROCcopysuccessively: REM copysuccessively
  11260. :
  11261. ENDIF : REM copysuccessively
  11262. :
  11263. ELSE : REM screenvoices$
  11264. PRINT'" Which screen voice "
  11265. CASE GET$ OF
  11266. WHEN "1" : voice% = 1
  11267. WHEN "2" : voice% = 2
  11268. WHEN "3" : voice% = 3
  11269. WHEN "x" : voice% = 1
  11270. OTHERWISE PROCpressenter
  11271. ENDCASE
  11272. ENDIF : REM screenvoices$
  11273. :
  11274. IF copymove$ = "EC" OR copymove$ = "EM" THEN
  11275. IF screenvoices$ = "y" THEN extractvoice% = displayvoices%(startv%+voice%-1) ELSE extractvoice% = voice%
  11276. ENDIF : REM copymove$
  11277. :
  11278. IF screenvoices$ = "y" AND quickextract$ = "n" THEN voice% = displayvoices%(startv%+voice%-1)
  11279. voice% -= 1 : samevoice% = voice%
  11280. :
  11281. PRINT ' " note number "
  11282. PRINT ' " (for first type 0) "
  11283. CASE GET$ OF
  11284. WHEN "1" : along% = 1
  11285. WHEN "2" : along% = 2
  11286. WHEN "3" : along% = 3
  11287. WHEN "4" : along% = 4
  11288. WHEN "5" : along% = 5
  11289. WHEN "6" : along% = 6
  11290. WHEN "7" : along% = 7
  11291. WHEN "8" : along% = 8
  11292. WHEN "9" : along% = 9
  11293. WHEN "0" : along% = 0
  11294. ENDCASE
  11295. :
  11296. IF along% <> 0 THEN
  11297. :
  11298. another$ = INKEY$(waitafterfirst%)
  11299. IF another$ <> "" THEN
  11300. CASE another$ OF
  11301. WHEN "1" : along% = (along%*10)+1
  11302. WHEN "2" : along% = (along%*10)+2
  11303. WHEN "3" : along% = (along%*10)+3
  11304. WHEN "4" : along% = (along%*10)+4
  11305. WHEN "5" : along% = (along%*10)+5
  11306. WHEN "6" : along% = (along%*10)+6
  11307. WHEN "7" : along% = (along%*10)+7
  11308. WHEN "8" : along% = (along%*10)+8
  11309. WHEN "9" : along% = (along%*10)+9
  11310. WHEN "0" : along% = (along%*10)+0
  11311. ENDCASE
  11312. ENDIF : REM another$
  11313. :
  11314. another$ = INKEY$(waitaftersecond%)
  11315. IF another$ <> "" THEN
  11316. CASE another$ OF
  11317. WHEN "1" : along% = (along%*10)+1
  11318. WHEN "2" : along% = (along%*10)+2
  11319. WHEN "3" : along% = (along%*10)+3
  11320. WHEN "4" : along% = (along%*10)+4
  11321. WHEN "5" : along% = (along%*10)+5
  11322. WHEN "6" : along% = (along%*10)+6
  11323. WHEN "7" : along% = (along%*10)+7
  11324. WHEN "8" : along% = (along%*10)+8
  11325. WHEN "9" : along% = (along%*10)+9
  11326. WHEN "0" : along% = (along%*10)+0
  11327. ENDCASE
  11328. ENDIF : REM another$
  11329. :
  11330. COLOUR 3 : PRINT ' along% : COLOUR 0
  11331. :
  11332. ENDIF : REM along% <> 0
  11333. :
  11334. IF along% = 0 THEN along% = 1
  11335. along%-=1
  11336. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  11337. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  11338. holdbar% = copystartbar%
  11339. holdbeat% = copystartbeat%
  11340. IF justone$ = "n" THEN
  11341. :
  11342. PRINT'" to note number "
  11343. :
  11344. IF firstasking$ = "y" THEN
  11345. IF copytoend$ = "y" THEN PRINT'" (for last type 0) "
  11346. ELSE
  11347. :
  11348. IF copytoend$ = "y" THEN
  11349. PRINT'" (for last type 0) "
  11350. ELSE
  11351. PRINT'" (for ";prevlast%;" type 0) "
  11352. ENDIF : REM copytoend$
  11353. :
  11354. ENDIF : REM firstasking$
  11355. :
  11356. CASE GET$ OF
  11357. WHEN "1" : along% = 1
  11358. WHEN "2" : along% = 2
  11359. WHEN "3" : along% = 3
  11360. WHEN "4" : along% = 4
  11361. WHEN "5" : along% = 5
  11362. WHEN "6" : along% = 6
  11363. WHEN "7" : along% = 7
  11364. WHEN "8" : along% = 8
  11365. WHEN "9" : along% = 9
  11366. WHEN "0" :
  11367. IF copytoend$ = "y" THEN
  11368. along% = 0
  11369. ELSE
  11370. along% = prevlast% : usedprev$ = "y"
  11371. ENDIF : REM copytoend$
  11372. OTHERWISE
  11373. IF copytoend$ = "y" THEN
  11374. along% = 0
  11375. ELSE
  11376. IF firstasking$ = "y" THEN
  11377. CLS : COLOUR 3
  11378. PRINT'" COPYING TO END NOT ENABLED "
  11379. COLOUR 0
  11380. PRINT '" (press a key to continue)"
  11381. prevlast% = 0
  11382. CASE GET$ OF
  11383. ENDCASE
  11384. ELSE
  11385. along% = prevlast% : usedprev$ = "y"
  11386. ENDIF : REM firstasking$
  11387. ENDIF : REM copytoend$
  11388. ENDCASE
  11389. firstasking$ = "n"
  11390. :
  11391. IF along% <> 0 AND usedprev$ = "n" THEN
  11392. :
  11393. another$ = INKEY$(waitafterfirst%)
  11394. IF another$ <> "" THEN
  11395. CASE another$ OF
  11396. WHEN "1" : along% = (along%*10)+1
  11397. WHEN "2" : along% = (along%*10)+2
  11398. WHEN "3" : along% = (along%*10)+3
  11399. WHEN "4" : along% = (along%*10)+4
  11400. WHEN "5" : along% = (along%*10)+5
  11401. WHEN "6" : along% = (along%*10)+6
  11402. WHEN "7" : along% = (along%*10)+7
  11403. WHEN "8" : along% = (along%*10)+8
  11404. WHEN "9" : along% = (along%*10)+9
  11405. WHEN "0" : along% = (along%*10)+0
  11406. ENDCASE
  11407. ENDIF : REM another$
  11408. :
  11409. another$ = INKEY$(waitaftersecond%)
  11410. IF another$ <> "" THEN
  11411. CASE another$ OF
  11412. WHEN "1" : along% = (along%*10)+1
  11413. WHEN "2" : along% = (along%*10)+2
  11414. WHEN "3" : along% = (along%*10)+3
  11415. WHEN "4" : along% = (along%*10)+4
  11416. WHEN "5" : along% = (along%*10)+5
  11417. WHEN "6" : along% = (along%*10)+6
  11418. WHEN "7" : along% = (along%*10)+7
  11419. WHEN "8" : along% = (along%*10)+8
  11420. WHEN "9" : along% = (along%*10)+9
  11421. WHEN "0" : along% = (along%*10)+0
  11422. ENDCASE
  11423. ENDIF : REM another$
  11424. :
  11425. prevlast% = along%
  11426. COLOUR 3 : PRINT ' along% : COLOUR 0
  11427. wait$ = INKEY$(50)
  11428. :
  11429. ENDIF : REM along% <> 0
  11430. :
  11431. usedprev$ = "n"
  11432. :
  11433. IF along% = 0 THEN
  11434. copyendbar% = 0
  11435. ELSE
  11436. along%-=1
  11437. copyendbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  11438. copyendbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  11439. ENDIF : REM along$
  11440. ELSE
  11441. copyendbar% = copystartbar%
  11442. copyendbeat% = copystartbeat%
  11443. ENDIF : REM justone$ = "n"
  11444. :
  11445. IF copymove$ = "EC" OR copymove$ = "EM" THEN PROCextractinfo
  11446. :
  11447. ENDIF : REM quickcopy$ = "n"
  11448. :
  11449. :
  11450. value% = (copystartbar%*10^3)+copystartbeat%
  11451. IF value% <= array%(0,0,voice%)DIV10^3 THEN
  11452. startatcell% = 0
  11453. ELSE
  11454. PROCsearch(value%)
  11455. startatcell% = startcell%
  11456. ENDIF : REM value%
  11457. :
  11458. IF copyendbar% = 0 THEN
  11459. endatcell% = numusedcells%(voice%) - 1
  11460. ELSE
  11461. value% = (copyendbar%*10^3)+copyendbeat%
  11462. IF value% >= array%(numusedcells%(voice%)-1,0,voice%)DIV10^3 THEN
  11463. endatcell% = numusedcells%(voice%) - 1
  11464. ELSE
  11465. PROCsearch(value%)
  11466. IF shunt$ = "N" THEN endatcell% = startcell% ELSE endatcell% = startcell% - 1
  11467. ENDIF : REM value%
  11468. :
  11469. ENDIF : REM copyendbar%
  11470. :
  11471. manyattacks% = endatcell% - startatcell% + 1
  11472. REM create 'gap' between beat-of-bar and first actual attack
  11473. carrybars% = (array%(startatcell%,0,voice%)DIV10^6)-copystartbar%
  11474. carrybeats% = ((array%(startatcell%,0,voice%)DIV10^3)MOD10^3)-copystartbeat%
  11475. attacks1%(0) = (carrybars%*960)+carrybeats%
  11476. :
  11477. IF copymove$ = "C" OR copymove$ = "M" THEN
  11478. FOR count% = 0 TO (manyattacks%-1)
  11479. IF count% > 0 THEN
  11480. carrybars% = (array%(startatcell%+count%,0,voice%)DIV10^6)-(array%(startatcell%+count%-1,0,voice%)DIV10^6)
  11481. carrybeats% = ((array%(startatcell%+count%,0,voice%)DIV10^3)MOD10^3)-((array%(startatcell%+count%-1,0,voice%)DIV10^3)MOD10^3)
  11482. attacks1%(count%) = attacks1%(count%-1) + ((carrybars%*960)+carrybeats%)
  11483. ENDIF : REM count% > 0
  11484. :
  11485. pitches%(count%) = array%(startatcell%+count%,0,voice%)MOD10^3
  11486. dur% = (array%(startatcell%+count%,1,voice%)DIV10)MOD10^3
  11487. brrr% = array%(startatcell%+count%,0,voice%)DIV10^6 : PROCreconvertdur
  11488. durations%(count%) = dur%
  11489. amplitudes%(count%) = (array%(startatcell%+count%,1,voice%))MOD10
  11490. envelopes%(count%) = (array%(startatcell%+count%,2,voice%))DIV10^2
  11491. glissandos%(count%) = array%(startatcell%+count%,1,voice%)DIV10^4
  11492. inflections%(count%) = array%(startatcell%+count%,2,voice%)MOD10^2
  11493. NEXT
  11494. ELSE
  11495. :
  11496. PROCextract
  11497. :
  11498. ENDIF : REM copymove$
  11499. :
  11500. IF copymove$ = "M" THEN
  11501. numnotes% = manyattacks% : startcell% = startatcell%
  11502. FOR count% = startcell% TO (startcell%+(numnotes%-1))
  11503. FOR counter% = 0 TO 1
  11504. barno% = (array%(count%,0,voice%)DIV10^6)-counter%
  11505. beatnum% = ((array%(count%,0,voice%)DIV10^3)MOD10^3)
  11506. :
  11507. group1start% = (disarray%(barno%,0,voice%)DIV10^7)*beatfactor%
  11508. group1end% = group1start% + (((disarray%(barno%,0,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
  11509. IF beatnum%+(960*counter%) >= group1start% AND beatnum%+(960*counter%) <= group1end% THEN
  11510. disarray%(barno%,0,voice%) = disarray%(barno%,0,voice%)MOD10^3
  11511. ENDIF : REM beatnum%
  11512. :
  11513. group2start% = ((disarray%(barno%,0,voice%)DIV10)MOD10^2)*beatfactor%
  11514. group2end% = group2start%+((((disarray%(barno%,0,voice%)MOD10)*10)+(disarray%(barno%,1,voice%)DIV10^8))*beatfactor%)-1
  11515. IF beatnum%+(960*counter%) >= group2start% AND beatnum%+(960*counter%) <= group2end% THEN
  11516. disarray%(barno%,0,voice%) = (disarray%(barno%,0,voice%)DIV10^3)*10^3
  11517. disarray%(barno%,1,voice%) = disarray%(barno%,1,voice%)MOD10^6
  11518. ENDIF : REM beatnum%
  11519. group3start%=((disarray%(barno%,1,voice%)DIV10^4)MOD10^2)*beatfactor%
  11520. group3end% = group3start% + (((disarray%(barno%,1,voice%)MOD10^4)DIV10^2)*beatfactor%)-1
  11521. IF beatnum%+(960*counter%) >= group3start% AND beatnum%+(960*counter%) <= group3end% THEN
  11522. disarray%(barno%,1,voice%) = (disarray%(barno%,1,voice%)DIV10^6)*10^6
  11523. ENDIF : REM beatnum%
  11524. group4start% = (disarray%(barno%,2,voice%)DIV10^7)*beatfactor%
  11525. group4end% = group4start%+(((disarray%(barno%,2,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
  11526. IF beatnum%+(960*counter%) >= group4start% AND beatnum%+(960*counter%) <= group4end% THEN
  11527. disarray%(barno%,2,voice%) = disarray%(barno%,2,voice%)MOD10^3
  11528. ENDIF : REM beatnum%
  11529. group5start% = ((disarray%(barno%,2,voice%)MOD10^3)DIV10)*beatfactor%
  11530. group5end% = group5start%+((((disarray%(barno%,2,voice%)MOD10)*10)+(disarray%(barno%,3,voice%)DIV10^8))*beatfactor%)-1
  11531. IF beatnum%+(960*counter%) >= group5start% AND beatnum%+(960*counter%) <= group5end% THEN
  11532. disarray%(barno%,2,voice%) = (disarray%(barno%,2,voice%)DIV10^3)*10^3
  11533. disarray%(barno%,3,voice%) = disarray%(barno%,3,voice%)MOD10^6
  11534. ENDIF : REM beatnum%
  11535. group6start% = ((disarray%(barno%,3,voice%)DIV10^4)MOD10^2)*beatfactor%
  11536. group6end% = group6start% + (((disarray%(barno%,3,voice%)DIV10^2)MOD10^2)*beatfactor%)-1
  11537. IF beatnum%+(960*counter%) >= group6start% AND beatnum%+(960*counter%) <= group6end% THEN
  11538. disarray%(barno%,3,voice%)=(disarray%(barno%,3,voice%)DIV10^6)*10^6
  11539. ENDIF : REM beatnum%
  11540. :
  11541. NEXT
  11542. :
  11543. NEXT : REM count%
  11544. :
  11545. PROCshuntleft(startcell%,numnotes%)
  11546. ENDIF : REM copymove$
  11547. :
  11548. IF distort$ = "OFF" THEN
  11549. numpitches% = manyattacks% : numdurations% = manyattacks% : numamplitudes% = manyattacks%
  11550. numenvelopes% = manyattacks% : numinflections% = manyattacks% : method$ = "raw" : copyit$ = "ON"
  11551. IF seeequalize$ = "y" THEN seeequalizey$ = "y"
  11552. IF seereorder$ = "y" THEN seereordery$ = "y"
  11553. PROCinsertattacks
  11554. ELSE
  11555. PROCdistort
  11556. ENDIF : REM distort$
  11557. :
  11558. $ = "n" : quickextract$ = "n" : usedprev$ = "n"
  11559. ENDPROC
  11560. :
  11561. REM**************************************************************
  11562. :
  11563. DEF PROCdistort
  11564. :
  11565. CLS
  11566. CASE distortpara$ OF
  11567. WHEN "attacks" :
  11568. :
  11569. INPUT'" How many bands? (0 = previous values) "answer%
  11570. IF answer% <> 0 THEN numbands% = answer%
  11571. :
  11572. IF answer% > 0 THEN
  11573. IF answer% = 1 THEN
  11574. PRINT'" intervals to be multiplied by"
  11575. PRINT" random percentages between..."
  11576. PRINT '"(for ";distortparas%(1,2);
  11577. INPUT" press 0) "number%
  11578. IF number% = 0 THEN distortparas%(1,2) = distortparas%(1,2) ELSE distortparas%(1,2) = number%
  11579. PRINT'" and...(for ";distortparas%(1,3);
  11580. INPUT " press 0) "number%
  11581. IF number% = 0 THEN distortparas%(1,3) = distortparas%(1,3) ELSE distortparas%(1,3) = number%
  11582. distortparas%(1,0) = 0 : distortparas%(1,1) = 960000
  11583. :
  11584. ELSE
  11585. :
  11586. FOR count% = 1 TO numbands%
  11587. CLS
  11588. PRINT'" Band ";count%;"'s intervals are between (incl.) "
  11589. INPUT'" bars..."bars%
  11590. INPUT " beats..."beats%
  11591. PROCalterbeats
  11592. distortparas%(count%,0) = (bars%*960) + beats%
  11593. INPUT " and bars..."bars%
  11594. INPUT " beats..."beats%
  11595. PROCalterbeats
  11596. distortparas%(count%,1) = (bars%*960) + beats%
  11597. PRINT'" which are to be multiplied by random "
  11598. INPUT" percentages between..."distortparas%(count%,2)
  11599. INPUT" and..."distortparas%(count%,3)
  11600. NEXT
  11601. :
  11602. ENDIF
  11603. ELSE
  11604. COLOUR 3
  11605. PRINT'" values as last time?"
  11606. PRINT'distortparas%(1,0);" - ";distortparas%(1,1);" ";distortparas%(1,2);"% - ";distortparas%(1,3)"%"
  11607. IF numbands% > 1 THEN PRINT distortparas%(2,0);" - ";distortparas%(2,1);" ";distortparas%(2,2);"% - ";distortparas%(2,3)"%"
  11608. COLOUR 0
  11609. CASE GET$ OF
  11610. WHEN"y","Y":
  11611. OTHERWISE
  11612. ENDCASE
  11613. ENDIF
  11614. :
  11615. nextinterval% = attacks1%(1) - attacks1%(0)
  11616. FOR count% = 1 TO manyattacks% - 1
  11617. :
  11618. interval% = nextinterval%
  11619. :
  11620. band% = 0
  11621. FOR counter% = 1 TO numbands%
  11622. IF interval% >= distortparas%(counter%,0) AND interval% <= distortparas%(counter%,1) THEN band% = counter%
  11623. NEXT
  11624. :
  11625. IF band% > 0 THEN percentage1% = distortparas%(band%,2) ELSE percentage1% = 100
  11626. IF band% > 0 THEN percentage2% = distortparas%(band%,3) ELSE percentage2% = 100
  11627. range% = percentage2%-percentage1%
  11628. IF range% = 0 THEN
  11629. percentage3 = percentage1%
  11630. ELSE
  11631. percentage3 = RND(range%) + percentage1% - 1
  11632. percentage3 += (RND(99))/100
  11633. ENDIF
  11634. :
  11635. nextinterval% = attacks1%(count%+1) - attacks1%(count%)
  11636. attacks1%(count%) = attacks1%(count%-1) + ((interval%*percentage3)DIV100)
  11637. :
  11638. NEXT
  11639. :
  11640. method$ = "raw" : copyit$ = "ON" : distort$ = "OFF"
  11641. PROCinsertattacks
  11642. :
  11643. WHEN "pitches" :
  11644. :
  11645. PROCwindow(20,69,70,54)
  11646. PRINT'" Is the grid semi-, quarter- or eighthtone (S/Q/E)"
  11647. PRINT'" (0 = previous) "
  11648. CASE GET$ OF
  11649. WHEN "S","s" : distortgrid$ = "S"
  11650. WHEN "Q","q" : distortgrid$ = "Q"
  11651. WHEN "E","e" : distortgrid$ = "E"
  11652. OTHERWISE distortgrid$ = distortgrid$
  11653. ENDCASE
  11654. :
  11655. INPUT'" How many bands? (0 = 1) "numbands%
  11656. IF numbands% = 0 THEN numbands% = 1
  11657. :
  11658. IF numbands% = 1 THEN
  11659. distortparas%(1,0) = 0
  11660. distortparas%(1,1) = 1000
  11661. PRINT'" Pitches are to be raised/lowered randomly by"
  11662. PRINT " between how many ";
  11663. CASE distortgrid$ OF
  11664. WHEN "S" : PRINT"semitones (-1,1 etc) "
  11665. INPUT" (11 = previous) "distortparas%(1,2)
  11666. IF distortparas%(1,2) = 11 THEN
  11667. distortparas%(1,2) = previousdistort1%
  11668. COLOUR 3
  11669. PRINT' previousdistort1%
  11670. COLOUR 0
  11671. ENDIF
  11672. WHEN "Q" : PRINT"quartertones (-1,1 etc) "
  11673. INPUT" (0 = previous) "distortparas%(1,2)
  11674. IF distortparas%(1,2) = 0 THEN
  11675. distortparas%(1,2) = previousdistort1%
  11676. COLOUR 3
  11677. PRINT' previousdistort1%
  11678. COLOUR 0
  11679. ENDIF
  11680. WHEN "E" : INPUT"eighthtones (-1,1 etc) "distortparas%(1,2)
  11681. ENDCASE
  11682. PRINT '" and how many ";
  11683. CASE distortgrid$ OF
  11684. WHEN "S" : INPUT"semitones "distortparas%(1,3)
  11685. IF distortparas%(1,3) = 11 THEN
  11686. distortparas%(1,3) = previousdistort2%
  11687. COLOUR 3
  11688. PRINT ' previousdistort2%
  11689. COLOUR 0
  11690. pause$ = INKEY$(50)
  11691. ENDIF
  11692. WHEN "Q" : INPUT"quartertones "distortparas%(1,3)
  11693. IF distortparas%(1,3) = 0 THEN
  11694. distortparas%(1,3) = previousdistort2%
  11695. COLOUR 3
  11696. PRINT' previousdistort2%
  11697. COLOUR 0
  11698. pause$ = INKEY$(50)
  11699. ENDIF
  11700. WHEN "E" : INPUT"eighthtones "distortparas%(1,3)
  11701. ENDCASE
  11702. previousdistort1% = distortparas%(1,2)
  11703. previousdistort2% = distortparas%(1,3)
  11704. :
  11705. ELSE
  11706. :
  11707. FOR count% = 1 TO numbands%
  11708. PRINT'" Band ";count%;" is from the ";
  11709. FOR counter% = 0 TO 1
  11710. IF counter% = 0 THEN PRINT"lower note" ELSE PRINT'"to the upper note"
  11711. PRINT'" pitchclass ";
  11712. COLOUR 3
  11713. CASE GET$ OF
  11714. WHEN "C","c" : note% = 4 : PRINT "C"
  11715. WHEN "D","d" : note% = 12 : PRINT "D"
  11716. WHEN "E","e" : note% = 20 : PRINT "E"
  11717. WHEN "F","f" : note% = 24 : PRINT "F"
  11718. WHEN "G","g" : note% = 32 : PRINT "G"
  11719. WHEN "A","a" : note% = 40 : PRINT "A"
  11720. WHEN "B","b" : note% = 48 : PRINT "B"
  11721. OTHERWISE VDU 7 : PROCdistort
  11722. ENDCASE
  11723. COLOUR 0
  11724. PRINT" accidental ";
  11725. COLOUR 3
  11726. CASE GET$ OF
  11727. WHEN "1" : note% -= 4 : PRINT "flat"
  11728. WHEN "2" : note% -= 3 : PRINT "3/8 flat"
  11729. WHEN "3" : note% -= 2 : PRINT "1/4 flat"
  11730. WHEN "4" : note% -= 1 : PRINT "1/8 flat"
  11731. WHEN "5" : note% -= 0 : PRINT "nat"
  11732. WHEN "6" : note% += 1 : PRINT "1/8 shrp"
  11733. WHEN "7" : note% += 2 : PRINT "1/4 shrp"
  11734. WHEN "8" : note% += 3 : PRINT "3/8 shrp"
  11735. WHEN "9" : note% += 4 : PRINT "shrp"
  11736. ENDCASE
  11737. COLOUR 0
  11738. PRINT" octave ";
  11739. COLOUR 3
  11740. oct% = VAL(GET$) : oct%=oct%DIV1 : note% += (48*oct%) : PRINT oct%
  11741. COLOUR 0
  11742. distortparas%(count%,counter%) = note%
  11743. NEXT
  11744. :
  11745. PRINT'" and pitches are to be raised/lowered"
  11746. PRINT " randomly by between how many ";
  11747. CASE distortgrid$ OF
  11748. WHEN "S" : INPUT"semitones "distortparas%(count%,2)
  11749. WHEN "Q" : INPUT"quartertones "distortparas%(count%,2)
  11750. WHEN "E" : INPUT"eighthtones "distortparas%(count%,2)
  11751. ENDCASE
  11752. PRINT" and how many ";
  11753. CASE distortgrid$ OF
  11754. WHEN "S" : INPUT"semitones "distortparas%(count%,3)
  11755. WHEN "Q" : INPUT"quartertones "distortparas%(count%,3)
  11756. WHEN "E" : INPUT"eighthtones "distortparas%(count%,3)
  11757. ENDCASE
  11758. :
  11759. NEXT
  11760. :
  11761. ENDIF
  11762. :
  11763. nextpitch% = pitches%(0)
  11764. FOR count% = 0 TO (manyattacks%-1)
  11765. :
  11766. note% = nextpitch%DIV100
  11767. accid% = (nextpitch%DIV10)MOD10
  11768. oct% = nextpitch%MOD10
  11769. CASE note% OF
  11770. WHEN 0 : pitch% = 4
  11771. WHEN 1 : pitch% = 12
  11772. WHEN 2 : pitch% = 20
  11773. WHEN 3 : pitch% = 24
  11774. WHEN 4 : pitch% = 32
  11775. WHEN 5 : pitch% = 40
  11776. WHEN 6 : pitch% = 48
  11777. ENDCASE
  11778. accid% -= 5 : pitch% += accid%
  11779. pitch% += (48*oct%)
  11780. :
  11781. FOR counter% = 1 TO numbands%
  11782. IF pitch%>=distortparas%(counter%,0)ANDpitch%<=distortparas%(counter%,1) THEN band% = counter%
  11783. NEXT
  11784. :
  11785. lower% = distortparas%(band%,2)
  11786. upper% = distortparas%(band%,3)
  11787. x% = 0 - lower%
  11788. range% = upper% + x% + 1
  11789. IF range% = 1 THEN inc% = 1-(x%+1) ELSE inc% = RND(range%)-(x%+1)
  11790. IF distortgrid$ = "S" THEN inc% = inc%*4
  11791. IF distortgrid$ = "Q" THEN inc% = inc%*2
  11792. pitch% += inc%
  11793. :
  11794. FOR counter% = 0 TO 9
  11795. IF pitch% > 2 + (48*counter%) THEN
  11796. octave% = counter%
  11797. ENDIF
  11798. NEXT
  11799. :
  11800. pitch% -= (48*octave%)
  11801. IF pitch% > 2 AND pitch% < 8 THEN
  11802. pitchclass% = 0 : diff% = pitch% - 4
  11803. ENDIF
  11804. IF pitch% > 7 AND pitch% < 16 THEN
  11805. pitchclass% = 1 : diff% = pitch% - 12
  11806. ENDIF
  11807. IF pitch% > 15 AND pitch% < 23 THEN
  11808. pitchclass% = 2 : diff% = pitch% - 20
  11809. ENDIF
  11810. IF pitch% > 22 AND pitch% < 29 THEN
  11811. pitchclass% = 3 : diff% = pitch% - 24
  11812. ENDIF
  11813. IF pitch% > 28 AND pitch% < 36 THEN
  11814. pitchclass% = 4 : diff% = pitch% - 32
  11815. ENDIF
  11816. IF pitch% > 35 AND pitch% < 44 THEN
  11817. pitchclass% = 5 : diff% = pitch% - 40
  11818. ENDIF
  11819. IF pitch% > 43 AND pitch% < 51 THEN
  11820. pitchclass% = 6 : diff% = pitch% - 48
  11821. ENDIF
  11822. accid% = diff% + 5 : nextpitch% = pitches%(count%+1)
  11823. pitches%(count%) = (pitchclass%*100)+(accid%*10)+octave%
  11824. :
  11825. NEXT
  11826. :
  11827. numpitches% = manyattacks%
  11828. distort$ = "OFF" : PROCinsertpitches
  11829. :
  11830. WHEN "durations" :
  11831. :
  11832. PROCwindow(20,69,70,54)
  11833. PRINT'" distort durations between"
  11834. INPUT" what percentage "firstpercent%
  11835. IF firstpercent% = 0 THEN
  11836. PRINT '" that's ";prevfirstpercent%;" then?"
  11837. CASE GET$ OF
  11838. WHEN "Y","y" :
  11839. firstpercent% = prevfirstpercent%
  11840. OTHERWISE firstpercent% = prevfirstpercent%
  11841. ENDCASE
  11842. ENDIF
  11843. INPUT" and what percentage "secondpercent%
  11844. IF secondpercent% = 0 THEN
  11845. PRINT '" that's ";prevsecondpercent%;" then?"
  11846. CASE GET$ OF
  11847. WHEN "Y","y","0" :
  11848. secondpercent% = prevsecondpercent%
  11849. OTHERWISE secondpercent% = prevsecondpercent%
  11850. ENDCASE
  11851. ENDIF
  11852. :
  11853. prevfirstpercent% = firstpercent% : prevsecondpercent% = secondpercent%
  11854. :
  11855. FOR count% = manyattacks% TO 1 STEP -1
  11856. durations%(count%) = durations%(count%-1)
  11857. NEXT
  11858. :
  11859. FOR count% = 1 TO manyattacks%
  11860. multiplier = (RND(secondpercent%-firstpercent%)+firstpercent%)/100
  11861. durations%(count%) = durations%(count%)*multiplier
  11862. NEXT
  11863. :
  11864. FOR count% = 0 TO (manyattacks%-1)
  11865. durations%(count%) = durations%(count%+1)
  11866. NEXT
  11867. durations%(manyattacks%) = 0
  11868. :
  11869. numdurations% = manyattacks%
  11870. distort$ = "OFF" : PROCinsertdurations
  11871. WHEN "amplitudes" :
  11872. :
  11873. PROCwindow(20,69,70,54)
  11874. CLS
  11875. PRINT'" Increase or decrease by 1 notch (I/D) "
  11876. CASE GET$ OF
  11877. WHEN "I","i" :
  11878. FOR count% = 0 TO manyattacks%-1
  11879. IF amplitudes%(count%) < 9 THEN amplitudes%(count%) += 1
  11880. IF envelopes%(count%) <> 9 THEN
  11881. number% = envelopes%(count%) DIV 10^3
  11882. IF number% = 0 THEN numphases% = 1
  11883. IF number% > 0 AND number% < 100 THEN numphases% = 2
  11884. IF number% > 99 THEN numphases% = 3
  11885. CASE numphases% OF
  11886. WHEN 1 :
  11887. IF envelopes%(count%)MOD10 < 9 THEN envelopes%(count%) += 1
  11888. WHEN 2 :
  11889. IF envelopes%(count%)MOD10 < 9 THEN envelopes%(count%) += 1
  11890. IF (envelopes%(count%)DIV10)MOD10 < 9 THEN envelopes%(count%) += 10
  11891. WHEN 3 :
  11892. IF envelopes%(count%)MOD10 < 9 THEN envelopes%(count%) += 1
  11893. IF (envelopes%(count%)DIV10)MOD10 < 9 THEN envelopes%(count%) += 10
  11894. IF (envelopes%(count%)DIV100)MOD10 < 9 THEN envelopes%(count%) += 100
  11895. ENDCASE
  11896. ENDIF
  11897. NEXT
  11898. :
  11899. OTHERWISE
  11900. FOR count% = 0 TO manyattacks%-1
  11901. IF amplitudes%(count%) > 0 THEN amplitudes%(count%) -= 1
  11902. IF envelopes%(count%) <> 9 THEN
  11903. number% = envelopes%(count%) DIV 10^3
  11904. IF number% = 0 THEN numphases% = 1
  11905. IF number% > 0 AND number% < 100 THEN numphases% = 2
  11906. IF number% > 99 THEN numphases% = 3
  11907. :
  11908. CASE numphases% OF
  11909. WHEN 1 :
  11910. IF envelopes%(count%)MOD10 > 0 THEN envelopes%(count%) -= 1
  11911. WHEN 2 :
  11912. IF envelopes%(count%)MOD10 > 0 THEN envelopes%(count%) -= 1
  11913. IF (envelopes%(count%)DIV10)MOD10 > 0 THEN envelopes%(count%) -= 10
  11914. WHEN 3 :
  11915. IF envelopes%(count%)MOD10 > 0 THEN envelopes%(count%) -= 1
  11916. IF (envelopes%(count%)DIV10)MOD10 > 0 THEN envelopes%(count%) -= 10
  11917. IF (envelopes%(count%)DIV100)MOD10 > 0 THEN envelopes%(count%) -= 100
  11918. ENDCASE
  11919. ENDIF
  11920. NEXT
  11921. :
  11922. ENDCASE
  11923. :
  11924. numenvelopes% = manyattacks%
  11925. distort$ = "OFF" : PROCinsertenvelopes
  11926. :
  11927. WHEN "envelopes" :
  11928. PRINT'" give 1st envelope point random "
  11929. INPUT" percentages between what percentage "firstpercent%
  11930. INPUT" and what percentage "secondpercent%
  11931. :
  11932. FOR count% = manyattacks% TO 1 STEP -1
  11933. envelopes%(count%) = envelopes%(count%-1)
  11934. glissandos%(count%) = glissandos%(count%-1)
  11935. NEXT
  11936. :
  11937. FOR count% = 1 TO manyattacks%
  11938. newpercentage% = RND(secondpercent%-(firstpercent%-1))+(firstpercent%)
  11939. ph2% = envelopes%(count%) DIV 10^5
  11940. amps% = envelopes%(count%) MOD 10^3
  11941. ph1% = newpercentage%
  11942. envelopes%(count%) = (ph2%*10^5)+(ph1%*10^3)+amps%
  11943. glissandos%(count%) = glissandos%(count%)
  11944. :
  11945. NEXT
  11946. :
  11947. IF numphases% = 3 THEN
  11948. :
  11949. PRINT'" give 2nd envelope point random "
  11950. INPUT" percentages between what percentage "firstpercent%
  11951. INPUT" and what percentage "secondpercent%
  11952. :
  11953. FOR count% = 1 TO manyattacks%
  11954. newpercentage% = RND(secondpercent%-(firstpercent%-1))+(firstpercent%)
  11955. ph1% = (envelopes%(count%) DIV 10^3) MOD 10^2
  11956. amps% = envelopes%(count%) MOD 10^3
  11957. ph2% = newpercentage%
  11958. envelopes%(count%) = (ph2%*10^5)+(ph1%*10^3)+amps%
  11959. glissandos%(count%) = glissandos%(count%)
  11960. :
  11961. NEXT
  11962. :
  11963. ENDIF
  11964. :
  11965. FOR count% = 0 TO (manyattacks%-1)
  11966. envelopes%(count%) = envelopes%(count%+1)
  11967. NEXT
  11968. envelopes%(manyattacks%) = 0
  11969. numenvelopes% = manyattacks%
  11970. distort$ = "OFF" : PROCinsertenvelopes
  11971. :
  11972. WHEN "inflections" :
  11973. :
  11974. PROCwindow(20,69,70,55)
  11975. PRINT'" distort inflections up or down "
  11976. PRINT" by up to how many cents "
  11977. INPUT" (max. 49) "cents%
  11978. :
  11979. FOR count% = manyattacks% TO 1 STEP -1
  11980. inflections%(count%) = inflections%(count%-1)
  11981. NEXT
  11982. :
  11983. FOR count% = 1 TO manyattacks%
  11984. :
  11985. REPEAT
  11986. factor% = RND(cents%)
  11987. upordown% = RND(2)
  11988. :
  11989. IF upordown% = 1 THEN
  11990. :
  11991. inflections%(count%) = inflections%(count%)+factor%
  11992. ELSE
  11993. inflections%(count%) = inflections%(count%)-factor% :
  11994. ENDIF
  11995. :
  11996. UNTIL inflections%(count%) > 0 AND inflections%(count%) < 100
  11997. :
  11998. NEXT
  11999. :
  12000. FOR count% = 0 TO (manyattacks%-1)
  12001. inflections%(count%) = inflections%(count%+1)
  12002. NEXT
  12003. inflections%(manyattacks%) = 0
  12004. :
  12005. numinflections% = manyattacks%
  12006. distort$ = "OFF" : PROCinsertinflections
  12007. :
  12008. ENDCASE
  12009. :
  12010. ENDPROC
  12011. :
  12012. REM****************************************************
  12013. :
  12014. DEF PROCreorderattacks
  12015. :
  12016. r1% = 0
  12017. :
  12018. REM fills attacks3% with original actual durats in beats
  12019. attacks2%() = attacks1%()
  12020. FOR count% = 0 TO manyattacks%-2
  12021. attacks3%(count%) = attacks2%(count%+1)-attacks2%(count%)
  12022. NEXT
  12023. :
  12024. PRINT''" Random or determined order? (R/1 or D)"
  12025. CASE GET$ OF
  12026. WHEN "D","d" :
  12027. CLS
  12028. PRINT''" There are ";manyattacks%-1;" durations in the group"
  12029. FOR count% = 1 TO manyattacks%-1
  12030. PRINT'" New duration ";count%;
  12031. INPUT" is now to be old duration "r%
  12032. attacks1%(count%) = attacks1%(count%-1)+attacks3%(r%-1)
  12033. NEXT
  12034. OTHERWISE
  12035. CLS
  12036. PRINT''" There are ";manyattacks%-1;" durations in the group"
  12037. PRINT'" How many durations do you want to re-order? "
  12038. INPUT " (for all press 0) "howmany%
  12039. IF howmany% = 0 THEN howmany% = manyattacks%-1
  12040. INPUT'" Starting at duration number (0 = 1) "number%
  12041. IF number% = 0 THEN number% = 1
  12042. INPUT'" Chance of repeating original order(%) "chanceofnext%
  12043. attacks2%() = 0 : count% = number%
  12044. REPEAT
  12045. PROCchoosenext
  12046. IF choosenext$ = "y" AND r1% < howmany% THEN
  12047. r1% = r1% + 1
  12048. ELSE
  12049. r1% = RND(howmany%)
  12050. ENDIF
  12051. r% = r1%+number%-1
  12052. IF attacks2%(r%) = 0 THEN
  12053. attacks1%(count%) = attacks1%(count%-1)+attacks3%(r%-1)
  12054. attacks2%(r%) = 1 : count% += 1
  12055. ENDIF
  12056. UNTIL count% = howmany%+number%
  12057. ENDCASE
  12058. :
  12059. reordered$ = "y" : seereordery$ = "n"
  12060. PROCinsertattacks
  12061. :
  12062. ENDPROC
  12063. :
  12064. REM********************************************************
  12065. :
  12066. DEF PROCchoosenext
  12067. :
  12068. numb% = RND(100)
  12069. IF numb% >= chanceofnext% THEN choosenext$ = "n" ELSE choosenext$ = "y"
  12070. ENDPROC
  12071. :
  12072. REM********************************************************
  12073. :
  12074. DEF PROCsavepitchstring
  12075. :
  12076. *Dir SDFS::RISCOSpi.$.CAC.Files
  12077. firstnaming$ = "n"
  12078. CLS
  12079. IF filenamestg$ = "" THEN
  12080. INPUT'" filename "filenamestg$
  12081. firstnaming$ = "y"
  12082. ENDIF
  12083. IF firstnaming$ = "n" THEN
  12084. PRINT'" as '";filenamestg$;"'?"
  12085. CASE GET$ OF
  12086. WHEN "Y","y","+" :
  12087. OTHERWISE INPUT'" filename "filenamestg$
  12088. ENDCASE
  12089. ENDIF
  12090. :
  12091. channel = OPENOUT filenamestg$
  12092. PRINT#channel, numpitches%
  12093. PRINT#channel, grid$
  12094. PRINT#channel, samplesize%
  12095. PRINT#channel, octavesections%
  12096. PRINT#channel, transpositionsections%
  12097. PRINT#channel, contoursections%
  12098. FOR a% = 0 TO samplesize%
  12099. PRINT#channel, sample%(a%)
  12100. NEXT
  12101. FOR a% = 0 TO octavesections%
  12102. FOR b% = 0 TO 48
  12103. FOR c% = 0 TO 11
  12104. PRINT#channel, octavesequences%(a%,b%,c%)
  12105. NEXT
  12106. NEXT
  12107. NEXT
  12108. FOR a% = 0 TO transpositionsections%
  12109. FOR b% = 0 TO 1
  12110. PRINT#channel, transpositionsequences%(a%,b%)
  12111. NEXT
  12112. NEXT
  12113. FOR a% = 0 TO contoursections%
  12114. FOR b% = 0 TO 11
  12115. PRINT#channel, contoursequences%(a%,b%)
  12116. NEXT
  12117. NEXT
  12118. :
  12119. CLOSE#channel
  12120. *NoDir
  12121. :
  12122. ENDPROC
  12123. :
  12124. REM***************************************************
  12125. :
  12126. DEF PROCloadpitchstring
  12127. :
  12128. *Dir SDFS::RISCOSpi.$.CAC.Files
  12129. INPUT'" filename "filenamestg$
  12130. channel = OPENIN filenamestg$
  12131. REPEAT
  12132. INPUT#channel, numpitches%
  12133. INPUT#channel, grid$
  12134. INPUT#channel, samplesize%
  12135. INPUT#channel, octavesections%
  12136. INPUT#channel, transpositionsections%
  12137. INPUT#channel, contoursections%
  12138. FOR a% = 0 TO samplesize%
  12139. INPUT#channel, sample%(a%)
  12140. NEXT
  12141. FOR a% = 0 TO octavesections%
  12142. FOR b% = 0 TO 48
  12143. FOR c% = 0 TO 11
  12144. INPUT#channel, octavesequences%(a%,b%,c%)
  12145. NEXT
  12146. NEXT
  12147. NEXT
  12148. FOR a% = 0 TO transpositionsections%
  12149. FOR b% = 0 TO 1
  12150. INPUT#channel, transpositionsequences%(a%,b%)
  12151. NEXT
  12152. NEXT
  12153. FOR a% = 0 TO contoursections%
  12154. FOR b% = 0 TO 11
  12155. INPUT#channel, contoursequences%(a%,b%)
  12156. NEXT
  12157. NEXT
  12158. UNTIL EOF#channel
  12159. CLOSE#channel
  12160. *NoDir
  12161. :
  12162. ENDPROC
  12163. :
  12164. REM*****************************************************
  12165. :
  12166. DEF PROCeditpitchstring
  12167. :
  12168. IF loadstring$ = "y" THEN PROCloadpitchstring
  12169. :
  12170. PRINT'" Change number of notes in the"
  12171. PRINT " pitch string? (Y/+ OR N/return)"
  12172. PRINT'" (currently ";numpitches%;")"
  12173. CASE GET$ OF
  12174. WHEN "Y","y","+","=" : do$ = "y"
  12175. OTHERWISE do$ = "n"
  12176. ENDCASE
  12177. IF do$ = "y" THEN
  12178. PRINT'" Total number of notes in the"
  12179. INPUT " pitch string (inc. sample) "numpitches%
  12180. ENDIF
  12181. CLS
  12182. :
  12183. PRINT'" Change the sample?"
  12184. PRINT'" currently "
  12185. FOR count% = 1 TO samplesize%
  12186. x% = sample%(count%)
  12187. WHILE x% > 52
  12188. x% -= 48
  12189. ENDWHILE
  12190. CASE x% OF
  12191. WHEN 5 : PRINT count%;". C nat"
  12192. WHEN 9 : PRINT count%;". C shrp"
  12193. WHEN 13 : PRINT count%;". D nat"
  12194. WHEN 17 : PRINT count%;". E flat"
  12195. WHEN 21 : PRINT count%;". E nat"
  12196. WHEN 25 : PRINT count%;". F nat"
  12197. WHEN 29 : PRINT count%;". F shrp"
  12198. WHEN 33 : PRINT count%;". G nat"
  12199. WHEN 37 : PRINT count%;". A flat"
  12200. WHEN 41 : PRINT count%;". A nat"
  12201. WHEN 45 : PRINT count%;". B flat"
  12202. WHEN 49 : PRINT count%;". B nat"
  12203. OTHERWISE
  12204. ENDCASE
  12205. NEXT
  12206. REM eighthtones not yet implemented!
  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 notes in the sample?"
  12213. PRINT'" Currently ";samplesize%
  12214. CASE GET$ OF
  12215. WHEN "Y","y","+" : do$ = "y"
  12216. OTHERWISE do$ = "n"
  12217. ENDCASE
  12218. IF do$ = "y" THEN
  12219. INPUT'" How many notes in the sample? "samplesize%
  12220. ENDIF
  12221. PRINT'" Change any of the sample's notes?"
  12222. CASE GET$ OF
  12223. WHEN "Y","y","+" : do$ = "y"
  12224. OTHERWISE do$ = "n"
  12225. ENDCASE
  12226. IF do$ = "y" THEN
  12227. INPUT'" How many "x%
  12228. FOR count% = 1 TO x%
  12229. IF x% < samplesize% THEN
  12230. PRINT'" note ";count%;" is note number "
  12231. INPUT y%
  12232. PRINT'" this note is now pitchclass ";
  12233. ELSE
  12234. y% = count%
  12235. PRINT'" note ";count%;" is now pitchclass ";
  12236. ENDIF
  12237. COLOUR 3
  12238. CASE GET$ OF
  12239. WHEN "C","c" : samplenote% = 0 : PRINT "C"
  12240. WHEN "D","d" : samplenote% = 1 : PRINT "D"
  12241. WHEN "E","e" : samplenote% = 2 : PRINT "E"
  12242. WHEN "F","f" : samplenote% = 3 : PRINT "F"
  12243. WHEN "G","g" : samplenote% = 4 : PRINT "G"
  12244. WHEN "A","a" : samplenote% = 5 : PRINT "A"
  12245. WHEN "B","b" : samplenote% = 6 : PRINT "B"
  12246. ENDCASE
  12247. samplenote% = samplenote%*100
  12248. COLOUR 0
  12249. PRINT " accidental ";
  12250. COLOUR 3
  12251. CASE GET$ OF
  12252. WHEN "1" : samplenote% += 10 : PRINT "flat"
  12253. WHEN "2" : samplenote% += 20 : PRINT "3/8 flat"
  12254. WHEN "3" : samplenote% += 30 : PRINT "1/4 flat"
  12255. WHEN "4" : samplenote% += 40 : PRINT "1/8 flat"
  12256. WHEN "5" : samplenote% += 50 : PRINT "nat"
  12257. WHEN "6" : samplenote% += 60 : PRINT "1/8 shrp"
  12258. WHEN "7" : samplenote% += 70 : PRINT "1/4 shrp"
  12259. WHEN "8" : samplenote% += 80 : PRINT "3/8 shrp"
  12260. WHEN "9" : samplenote% += 90 : PRINT "shrp"
  12261. ENDCASE
  12262. COLOUR 0
  12263. samplenote% += 5
  12264. PROCconvertsamplenote
  12265. sample%(y%) = samplenote%
  12266. :
  12267. NEXT
  12268. ENDIF
  12269. :
  12270. ENDIF
  12271. :
  12272. CLS
  12273. PRINT'" Make changes to the octave sequences?"
  12274. PRINT'" Currently"
  12275. VDU 14
  12276. FOR a% = 1 TO octavesections%
  12277. FOR b% = 3 TO 47 STEP 4
  12278. FOR c% = 1 TO 11
  12279. IF b% = 3 AND c% = 1 THEN PRINT'" C nat"
  12280. IF b% = 7 AND c% = 1 THEN PRINT'" C shrp"
  12281. IF b% = 11 AND c% = 1 THEN PRINT'" D nat"
  12282. IF b% = 15 AND c% = 1 THEN PRINT'" E flat"
  12283. IF b% = 19 AND c% = 1 THEN PRINT'" E nat"
  12284. IF b% = 23 AND c% = 1 THEN PRINT'" F nat"
  12285. IF b% = 27 AND c% = 1 THEN PRINT'" F shrp"
  12286. IF b% = 31 AND c% = 1 THEN PRINT'" G nat"
  12287. IF b% = 35 AND c% = 1 THEN PRINT'" A flat"
  12288. IF b% = 39 AND c% = 1 THEN PRINT'" A nat"
  12289. IF b% = 43 AND c% = 1 THEN PRINT'" B flat"
  12290. IF b% = 47 AND c% = 1 THEN PRINT'" B nat"
  12291. IF octavesequences%(a%,b%,c%) > 0 THEN PRINT octavesequences%(a%,b%,c%)
  12292. NEXT
  12293. NEXT
  12294. NEXT
  12295. VDU 15
  12296. CASE GET$ OF
  12297. WHEN "Y","y","+" : do$ = "y"
  12298. OTHERWISE do$ = "n"
  12299. ENDCASE
  12300. IF do$ = "y" THEN
  12301. PRINT'" Change the number of sections of "
  12302. PRINT" octave sequences?"
  12303. CASE GET$ OF
  12304. WHEN "Y","y","+" : do$ = "y"
  12305. OTHERWISE do$ = "n"
  12306. ENDCASE
  12307. IF do$ = "y" THEN
  12308. PRINT'" How many different sections of"
  12309. INPUT " octave sequences are there "octavesections%
  12310. ENDIF
  12311. IF octavesections% > 1 THEN
  12312. PRINT'" Change the starting point of"
  12313. PRINT" any sections?"
  12314. CASE GET$ OF
  12315. WHEN "Y","y","+" : do$ = "y"
  12316. OTHERWISE do$ = "n"
  12317. ENDCASE
  12318. IF do$ = "y" THEN
  12319. INPUT'" How many "z%
  12320. FOR count% = 1 TO z%
  12321. PRINT'" section ";count%;" is section "
  12322. INPUT y%
  12323. PRINT'" this section now begins at note number "
  12324. INPUT x%
  12325. octavesequences%(y%,0,0) = x%
  12326. NEXT
  12327. ENDIF
  12328. ENDIF
  12329. :
  12330. PRINT'" Make changes to the actual octave"
  12331. PRINT" sequences?"
  12332. CASE GET$ OF
  12333. WHEN "Y","y","+" : do$ = "y"
  12334. OTHERWISE do$ = "n"
  12335. ENDCASE
  12336. IF do$ = "y" THEN
  12337. FOR count% = 1 TO octavesections%
  12338. PRINT'" Any changes to section ";count%
  12339. CASE GET$ OF
  12340. WHEN "Y","y","+" : do$ = "y"
  12341. OTHERWISE do$ = "n"
  12342. ENDCASE
  12343. IF do$ = "y" THEN
  12344. FOR pitch% = 0 TO 47
  12345. entry$ = "n"
  12346. IF pitch% MOD 4 = 0 AND grid$<>"s" THEN entry$ = "y"
  12347. IF (pitch%-2)MOD4 = 0 THEN entry$ = "y"
  12348. IF (pitch%-1)MOD2 = 0 AND grid$ = "e" THEN entry$ = "y"
  12349. IF entry$ = "y" THEN
  12350. PRINT'" changes in section ";count%;" to ";
  12351. COLOUR 3 : PRINT pitchnames$(pitch%) : COLOUR 0
  12352. CASE GET$ OF
  12353. WHEN "Y","y","+" : do$ = "y"
  12354. OTHERWISE do$ = "n"
  12355. ENDCASE
  12356. IF do$ = "y" THEN
  12357. PRINT '"In section ";count%;" the sequence of octaves for ";
  12358. COLOUR 3 : PRINT pitchnames$(pitch%)
  12359. COLOUR 0 : PRINT "has how many elements "
  12360. INPUT e%
  12361. PRINT""
  12362. octavesequences%(count%,pitch%+1,0) = e%
  12363. FOR counter% = 1 TO 11
  12364. octavesequences%(count%,pitch%+1,counter%) = 0
  12365. NEXT
  12366. FOR counter% = 1 TO e%
  12367. PRINT " element ";counter%;
  12368. INPUT " is octave "o%
  12369. octavesequences%(count%,pitch%+1,counter%) = o%
  12370. NEXT
  12371. ENDIF
  12372. ENDIF
  12373. NEXT
  12374. ENDIF
  12375. NEXT
  12376. ENDIF
  12377. ENDIF
  12378. :
  12379. CLS
  12380. PRINT'" Make changes to transposition levels?"
  12381. PRINT'" Currently"
  12382. FOR a% = 1 TO transpositionsections%
  12383. PRINT'" section ";a%;". ";transpositionsequences%(a%,1)/4;" semitones starting at note number ";transpositionsequences%(a%,0)
  12384. NEXT
  12385. CASE GET$ OF
  12386. WHEN "Y","y","+" : do$ = "y"
  12387. OTHERWISE do$ = "n"
  12388. ENDCASE
  12389. IF do$ = "y" THEN
  12390. PRINT'" Change the number of sections "
  12391. PRINT" of transposition levels?"
  12392. CASE GET$ OF
  12393. WHEN "Y","y","+" : do$ = "y"
  12394. OTHERWISE do$ = "n"
  12395. ENDCASE
  12396. IF do$ = "y" THEN
  12397. PRINT'" How many different sections of"
  12398. INPUT" transposition are there "transpositionsections%
  12399. ENDIF
  12400. IF transpositionsections% > 1 THEN
  12401. PRINT'" Change the starting point of"
  12402. PRINT" any sections?"
  12403. CASE GET$ OF
  12404. WHEN "Y","y","+" : do$ = "y"
  12405. OTHERWISE do$ = "n"
  12406. ENDCASE
  12407. IF do$ = "y" THEN
  12408. INPUT'" How many "z%
  12409. FOR count% = 1 TO z%
  12410. PRINT'" Section ";count%;" is section "
  12411. INPUT y%
  12412. PRINT'" this section now begins at "
  12413. INPUT " note number "n%
  12414. transpositionsequences%(y%,0) = n%
  12415. NEXT
  12416. ENDIF
  12417. PRINT'" Change the degree of transposition"
  12418. PRINT" of any sections?"
  12419. CASE GET$ OF
  12420. WHEN "Y","y","+" : do$ = "y"
  12421. OTHERWISE do$ = "n"
  12422. ENDCASE
  12423. IF do$ = "y" THEN
  12424. INPUT'" How many "z%
  12425. FOR count% = 1 TO z%
  12426. PRINT'" Section ";count%;" is section "
  12427. INPUT y%
  12428. PRINT'" This section now transposes"
  12429. PRINT" up/down by how many ";
  12430. CASE grid$ OF
  12431. WHEN "e" : PRINT "eighthtones" : INPUT " (+/- 1 etc) "x%
  12432. transpositionsequences%(y%,1) = x%
  12433. WHEN "q" : PRINT "quartertones" : INPUT " (+/- 1 etc) "x%
  12434. transpositionsequences%(y%,1) = x% * 2
  12435. WHEN "s" : PRINT "semitones" : INPUT " (+/- 1 etc) "x%
  12436. transpositionsequences%(y%,1) = x% * 4
  12437. ENDCASE
  12438. NEXT
  12439. ENDIF
  12440. ENDIF
  12441. ENDIF
  12442. :
  12443. CLS
  12444. PRINT'" Make changes to the contour sequences?"
  12445. PRINT'" Currently"
  12446. FOR a% = 1 TO contoursections%
  12447. FOR b% = 2 TO contoursequences%(a%,1)+1
  12448. IF b% = 2 THEN PRINT'" section ";a%
  12449. PRINT contoursequences%(a%,b%)
  12450. NEXT
  12451. NEXT
  12452. CASE GET$ OF
  12453. WHEN "Y","y","+" : do$ = "y"
  12454. OTHERWISE do$ = "n"
  12455. ENDCASE
  12456. IF do$ = "y" THEN
  12457. PRINT'" Change the number of sections?"
  12458. CASE GET$ OF
  12459. WHEN "Y","y","+" : do$ = "y"
  12460. OTHERWISE do$ = "n"
  12461. ENDCASE
  12462. IF do$ = "y" THEN
  12463. PRINT'" How many different sections of "
  12464. INPUT " contour sequences are there "contoursections%
  12465. ENDIF
  12466. IF contoursections%>1 THEN
  12467. PRINT'" Change the starting point"
  12468. PRINT" of any sections?"
  12469. CASE GET$ OF
  12470. WHEN "Y","y","+" : do$ = "y"
  12471. OTHERWISE do$ = "n"
  12472. ENDCASE
  12473. IF do$ = "y" THEN
  12474. INPUT'" How many "z%
  12475. FOR count% = 1 TO z%
  12476. PRINT'" Section ";count%;" is section "
  12477. INPUT y%
  12478. PRINT'" This section"
  12479. INPUT " begins at note number "n%
  12480. contoursequences%(y%,0) = n%
  12481. NEXT
  12482. ENDIF
  12483. ENDIF
  12484. :
  12485. PRINT'" Make changes to any contours?"
  12486. CASE GET$ OF
  12487. WHEN "Y","y","+" : do$ = "y"
  12488. OTHERWISE do$ = "n"
  12489. ENDCASE
  12490. IF do$ = "y" THEN
  12491. FOR count% = 1 TO contoursections%
  12492. PRINT'" Change section ";count%;"?"
  12493. CASE GET$ OF
  12494. WHEN "Y","y","+" : do$ = "y"
  12495. OTHERWISE do$ = "n"
  12496. ENDCASE
  12497. IF do$ = "y" THEN
  12498. PRINT'" In section ";count%;
  12499. INPUT " there are how many contours "c%
  12500. contoursequences%(count%,1) = c%
  12501. PRINT""
  12502. FOR counter% = 1 TO c%
  12503. PRINT " number ";counter%;
  12504. INPUT " is contour "contoor%
  12505. contoursequences%(count%,counter%+1) = contoor%
  12506. NEXT
  12507. ENDIF
  12508. NEXT
  12509. ENDIF
  12510. ENDIF
  12511. :
  12512. PROCdeletesections
  12513. REM this deletes info about sections which existed in
  12514. REM previous versions of the string
  12515. :
  12516. contoursize% = 0 : seriesnote% = 1 : samplenote% = 0
  12517. contoursequence% = 1 : transpositionsequence% = 1
  12518. octavesequence% = 1 : transpositionsequences%(1,1) = 0
  12519. contourloop% = 0 : octaveloop%() = 0
  12520. :
  12521. REPEAT
  12522. seriesnote% += contoursize%
  12523. IF seriesnote% >= contoursequences%(contoursequence%+1,0) AND contoursequences%(contoursequence%+1,0) <> 0 THEN
  12524. contoursequence% += 1
  12525. contourloop% = 0
  12526. ENDIF
  12527. :
  12528. contourloop% += 1
  12529. IF contourloop% > contoursequences%(contoursequence%,1) THEN contourloop% = 1
  12530. contour% = contoursequences%(contoursequence%,contourloop%+1)
  12531. contoursize% = contours%(contour%,0)
  12532. :
  12533. IF seriesnote% >= transpositionsequences%(transpositionsequence%+1,0) AND transpositionsequences%(transpositionsequence%+1,0) <> 0 THEN
  12534. transpositionsequence% += 1
  12535. ENDIF
  12536. transposition% = transpositionsequences%(transpositionsequence%,1)
  12537. :
  12538. FOR count% = 1 TO contoursize%
  12539. samplenote% += 1
  12540. IF samplenote% > samplesize% THEN samplenote% = 1
  12541. group%(count%) = sample%(samplenote%) + transposition%
  12542. NEXT
  12543. :
  12544. IF seriesnote% >= octavesequences%(octavesequence%+1,0,0) AND octavesequences%(octavesequence%+1,0,0) <> 0 THEN
  12545. octavesequence% += 1
  12546. octaveloop%() = 0
  12547. ENDIF
  12548. :
  12549. FOR count% = 1 TO contoursize%
  12550. pitchclass% = group%(count%)
  12551. REPEAT
  12552. pitchclass% -= 48
  12553. UNTIL pitchclass% < 51
  12554. pitchclass% -= 2
  12555. octaveloop%(pitchclass%) += 1
  12556. IF octaveloop%(pitchclass%) > octavesequences%(octavesequence%,pitchclass%,0) THEN octaveloop%(pitchclass%) = 1
  12557. oxtave% = octavesequences%(octavesequence%,pitchclass%,octaveloop%(pitchclass%))
  12558. group%(count%) = (pitchclass%+2) + (48*oxtave%)
  12559. NEXT
  12560. :
  12561. IF contoursize% > 1 THEN
  12562. REPEAT
  12563. FOR count% = 1 TO (contoursize%-1)
  12564. IF group%(count%) >= group%(count%+1) THEN
  12565. save% = group%(count%)
  12566. group%(count%) = group%(count%+1)
  12567. group%(count%+1) = save%
  12568. ENDIF
  12569. NEXT
  12570. no% = 0
  12571. FOR count% = 1 TO (contoursize%-1)
  12572. IF group%(count%) > group%(count%+1) THEN no% = 1
  12573. NEXT
  12574. UNTIL no% = 0
  12575. ENDIF
  12576. :
  12577. FOR count% = 1 TO contoursize%
  12578. simplenote% = group%(contours%(contour%,count%))
  12579. PROCconvertsimplenote
  12580. pitches%((seriesnote%+count%)-1) = simplenote%
  12581. NEXT
  12582. :
  12583. UNTIL ((seriesnote%+contoursize%)-1) >= numpitches%
  12584. :
  12585. FOR count% = 0 TO numpitches%-1 : pitches%(count%) = pitches%(count%+1) : NEXT
  12586. PRINT'" Do you want to save this pitch string?"
  12587. CASE GET$ OF
  12588. WHEN "Y","y","+" : PROCsavepitchstring
  12589. OTHERWISE
  12590. ENDCASE
  12591. :
  12592. PROCinsertpitches
  12593. :
  12594. ENDPROC
  12595. :
  12596. REM************************************************
  12597. :
  12598. :
  12599. DEF PROCdeletesections
  12600. :
  12601. FOR count% = 2 TO 50
  12602. IF count% > octavesections% THEN
  12603. octavesequences%(count%,0,0) = 0
  12604. ENDIF
  12605. NEXT
  12606. :
  12607. FOR count% = 2 TO 199
  12608. IF count% > transpositionsections% THEN
  12609. transpositionsequences%(count%,0) = 0
  12610. ENDIF
  12611. NEXT
  12612. :
  12613. FOR count% = 2 TO 50
  12614. IF count% > contoursections% THEN
  12615. contoursequences%(count%,0) = 0
  12616. ENDIF
  12617. NEXT
  12618. :
  12619. ENDPROC
  12620. :
  12621. REM**************************************************
  12622. :
  12623. DEF PROCyesno
  12624. :
  12625. CASE GET$ OF
  12626. WHEN "Y","y" : on = 1
  12627. OTHERWISE on = 2
  12628. ENDCASE
  12629. :
  12630. ENDPROC
  12631. :
  12632. REM**************************************************
  12633. :
  12634. DEF PROCeditlayers
  12635. :
  12636. chanceoflayer%(1) = 1
  12637. :
  12638. PRINT'" Alter total length? [currently ";totallength%;"]"
  12639. PROCyesno
  12640. IF on = 1 THEN
  12641. INPUT'" Total duration, in BEATS "totallength%
  12642. ENDIF
  12643. PRINT''" LAYERS -"
  12644. PRINT'" Alter number of layers? [currently ";numlayers%;"]"
  12645. PROCyesno
  12646. IF on = 1 THEN
  12647. INPUT'" How many layers "numlayers%
  12648. ENDIF
  12649. :
  12650. PRINT'" Alter contribution proportions"
  12651. PRINT" of the layers?"
  12652. PROCyesno
  12653. IF on = 1 THEN
  12654. REM 1
  12655. :
  12656. PRINT'" Alter number of sections of"
  12657. PRINT" proportions?"
  12658. PROCyesno
  12659. IF on = 1 THEN
  12660. PRINT'" Piece is divided into how many sections"
  12661. PRINT " of different contribution-proportions "
  12662. PRINT " [currently "; numlayersections%;"]"
  12663. INPUT numlayersections%
  12664. ENDIF
  12665. :
  12666. IF numlayersections% > 1 THEN
  12667. :
  12668. PRINT'" Alter starting points of sections?"
  12669. PROCyesno
  12670. IF on = 1 THEN
  12671. FOR count% = 2 TO numlayersections%
  12672. PRINT'" Alter start point of section ";count%;" [currently ";startoflayersection%(count%);"]"
  12673. PROCyesno
  12674. IF on = 1 THEN
  12675. PRINT'" Section ";count%;" starts at beat number "
  12676. INPUT startoflayersection%(count%)
  12677. ENDIF
  12678. NEXT
  12679. ENDIF
  12680. ENDIF
  12681. :
  12682. PRINT'" Alter any of the proportions?"
  12683. PROCyesno
  12684. IF on = 1 THEN
  12685. REM 2
  12686. FOR count% = 1 TO numlayersections%
  12687. PRINT'" Alter proportions in section ";count%
  12688. PROCyesno
  12689. IF on = 1 THEN
  12690. REM 3
  12691. FOR count1% = 1 TO numlayers%
  12692. PRINT'" Alter (section ";count%;") layer ";count1%;" proportions? [currently ";shareoflayers%(count%,count1%);"]"
  12693. PROCyesno
  12694. IF on = 1 THEN
  12695. REM 4
  12696. PRINT '"In section ";count%;", layer ";count1%;" has "
  12697. PRINT "how many proportions?"
  12698. INPUT shareoflayers%(count%,count1%)
  12699. ENDIF : REM 4
  12700. NEXT
  12701. ENDIF : REM 3
  12702. NEXT
  12703. ENDIF : REM 2
  12704. :
  12705. ENDIF : REM 1
  12706. :
  12707. PRINT''" NUMBER OF ATTACKS, DURATIONS, MULTIPLIERS, RETURN AFTERS"
  12708. FOR count% = 1 TO numlayers%
  12709. PRINT'" Alterations to layer ";count%
  12710. PROCyesno
  12711. IF on = 1 THEN
  12712. REM 5
  12713. PRINT'" Alter number of attacks?"
  12714. PROCyesno
  12715. IF on = 1 THEN
  12716. REM 6
  12717. PRINT'" Alter whether controlled by sections/appearances?"
  12718. PROCyesno
  12719. IF on = 1 THEN
  12720. REM 7
  12721. PRINT'" In layer ";count%;" are the number of attacks controlled"
  12722. PRINT " by sections or by appearance number (S/A)"
  12723. PRINT " [currently ";attackscontrol$(count%);"]"
  12724. CASE GET$ OF
  12725. WHEN "S","s" :
  12726. attackscontrol$(count%) = "S"
  12727. OTHERWISE attackscontrol$(count%) = "A"
  12728. ENDCASE
  12729. ELSE
  12730. IF attackscontrol$(count%) = "" THEN attackscontrol$(count%) = "S" : REM default for added layers
  12731. ENDIF : REM 7
  12732. :
  12733. IF attackscontrol$(count%) = "S" THEN
  12734. REM 8
  12735. IF numattackssections%(count%) = 0 THEN numattackssections%(count%) = 1 : REM new layers
  12736. PRINT'" Alter number of sections? [currently ";numattackssections%(count%);"]"
  12737. PROCyesno
  12738. IF on = 1 THEN
  12739. REM 9
  12740. INPUT'" How many sections "numattackssections%(count%)
  12741. ENDIF : REM 9
  12742. IF numattackssections%(count%) > 1 THEN
  12743. PRINT'" Alter starting point of any sections?"
  12744. PROCyesno
  12745. IF on = 1 THEN
  12746. REM 10
  12747. FOR count1% = 2 TO numattackssections%(count%)
  12748. PRINT'" Alter starting point of section ";count1%;" currently [";startofattackssection%(count%,count1%);"]"
  12749. PROCyesno
  12750. IF on = 1 THEN
  12751. REM 11
  12752. PRINT'" (layer ";count%;") section ";count1%;" starts at beat"
  12753. INPUT startofattackssection%(count%,count1%)
  12754. ENDIF : REM 11
  12755. NEXT
  12756. ENDIF : REM 10
  12757. ENDIF
  12758. PRINT'" Alter the number of attacks in layer ";count%
  12759. PROCyesno
  12760. IF on = 1 THEN
  12761. REM 12
  12762. :
  12763. FOR count1% = 1 TO numattackssections%(count%)
  12764. PRINT'" Alter attacks in section ";count1%;" [currently ";numattax%(count%,count1%,0);"-";numattax%(count%,count1%,1);"]"
  12765. PROCyesno
  12766. IF on = 1 THEN
  12767. REM 13
  12768. PRINT'" In layer ";count%;", section ";count1%;" the number"
  12769. PRINT" of attacks varies between..."
  12770. INPUT numattax%(count%,count1%,0)
  12771. INPUT" and..."numattax%(count%,count1%,1)
  12772. ENDIF : REM 13
  12773. NEXT
  12774. ENDIF : REM 12
  12775. ENDIF : REM 8
  12776. :
  12777. IF attackscontrol$(count%) = "A" THEN
  12778. REM 14
  12779. PRINT'" Alter number of 'sections' of appearances? [currently ";numattackssections1%(count%);"]"
  12780. PROCyesno
  12781. IF on = 1 THEN
  12782. REM 15
  12783. INPUT'" How many 'sections' of appearances "numattackssections1%(count%)
  12784. ENDIF : REM 15
  12785. IF numattackssections1%(count%) > 1 THEN
  12786. PRINT'" Alter starting point of any sections?"
  12787. PROCyesno
  12788. IF on = 1 THEN
  12789. REM 16
  12790. FOR count1% = 2 TO numattackssections1%(count%)
  12791. PRINT'" Alter starting point of section ";count1%;" [currently appearance ";startofattackssection1%(count%,count1%);"]"
  12792. PROCyesno
  12793. IF on = 1 THEN
  12794. REM 17
  12795. PRINT'" (layer ";count%;") section ";count1%;" starts at appearance "
  12796. INPUT startofattackssection1%(count%,count1%)
  12797. ENDIF : REM 17
  12798. NEXT
  12799. ENDIF : REM 16
  12800. ENDIF
  12801. :
  12802. PRINT'" Alter number of attacks in layer ";count%
  12803. PROCyesno
  12804. IF on = 1 THEN
  12805. REM 18
  12806. FOR count1% = 1 TO numattackssections1%(count%)
  12807. PRINT'" Alter number of attacks in section ";count1%;" [currently ";numattax1%(count%,count1%,0);"-";numattax1%(count%,count1%,1);"]"
  12808. PROCyesno
  12809. IF on = 1 THEN
  12810. REM 19
  12811. PRINT'" In layer ";count%;", section ";count1%;" the number"
  12812. PRINT" of attacks varies between..."
  12813. INPUT numattax1%(count%,count1%,0)
  12814. INPUT" and... "numattax1%(count%,count1%,1)
  12815. ENDIF : REM 19
  12816. NEXT
  12817. ENDIF : REM 18
  12818. ENDIF : REM 14
  12819. ENDIF : REM 6
  12820. :
  12821. PRINT''" DURATIONS"
  12822. PRINT'" Alter durations in layer ";count%
  12823. PROCyesno
  12824. IF on = 1 THEN
  12825. REM 20
  12826. :
  12827. PRINT'" Alter whether durations in sections/appearances?"
  12828. PROCyesno
  12829. IF on = 1 THEN
  12830. REM 21
  12831. PRINT'" In layer ";count%;" are the unit durations controlled"
  12832. PRINT" by sections or by appearance number (S/A)"
  12833. PRINT " [currently ";durationscontrol$(count%);"]"
  12834. CASE GET$ OF
  12835. WHEN "S","s" :
  12836. durationscontrol$(count%) = "S"
  12837. OTHERWISE durationscontrol$(count%) = "A"
  12838. ENDCASE
  12839. ELSE
  12840. IF durationscontrol$(count%) = "" THEN durationscontrol$(count%) = "S" : REM new layers default
  12841. ENDIF : REM 21
  12842. IF durationscontrol$(count%) = "S" THEN
  12843. REM 22
  12844. IF numdurationssections%(count%) = 0 THEN numdurationssections%(count%) = 1 : REM new layers
  12845. PRINT'" Alter number of sections of durations? [currently ";numdurationssections%(count%);"]"
  12846. PROCyesno
  12847. IF on = 1 THEN
  12848. REM 23
  12849. INPUT'" How many sections "numdurationssections%(count%)
  12850. ENDIF : REM 23
  12851. IF numdurationssections%(count%) > 1 THEN
  12852. PRINT'" Alter starting point of sections?"
  12853. PROCyesno
  12854. IF on = 1 THEN
  12855. REM 24
  12856. FOR count1% = 2 TO numdurationssections%(count%)
  12857. PRINT'" Alter starting point of section ";count1%;" [currently ";startofdurationssection%(count%,count1%);"]"
  12858. PROCyesno
  12859. IF on = 1 THEN
  12860. REM 25
  12861. PRINT'" (layer ";count%;") section ";count1%;" starts at beat "
  12862. INPUT startofdurationssection%(count%,count1%)
  12863. ENDIF : REM 25
  12864. NEXT
  12865. ENDIF : REM 24
  12866. ENDIF
  12867. :
  12868. PRINT'" Alter the unit durations?"
  12869. PROCyesno
  12870. IF on = 1 THEN
  12871. REM 26
  12872. FOR count1% = 1 TO numdurationssections%(count%)
  12873. PRINT'" Alter the duration in section ";count1%;" [currently ";doorations%(count%,count1%);"]"
  12874. PROCyesno
  12875. IF on = 1 THEN
  12876. REM 27
  12877. PRINT'" In layer ";count%;", section ";count1%;" the unit duration is"
  12878. INPUT beats% : PROCalterbeats
  12879. doorations%(count%,count1%) = beats%
  12880. ENDIF : REM 27
  12881. NEXT
  12882. ENDIF : REM 26
  12883. ENDIF : REM 22
  12884. :
  12885. IF durationscontrol$(count%) = "A" THEN
  12886. REM 28
  12887. PRINT'" Alter number of 'sections'? [currently ";numdurationssections1%(count%);"]"
  12888. PROCyesno
  12889. IF on = 1 THEN
  12890. REM 29
  12891. INPUT'" How many 'sections' "numdurationssections1%(count%)
  12892. ENDIF : REM 29
  12893. IF numdurationssections1%(count%) > 1 THEN
  12894. PRINT'" Alter starting point of 'sections'?"
  12895. PROCyesno
  12896. IF on = 1 THEN
  12897. REM 30
  12898. FOR count1% = 2 TO numdurationssections1%(count%)
  12899. PRINT'" Alter section ";count1%;" [currently appearance ";startofdurationssection1%(count%,count1%);"]"
  12900. PROCyesno
  12901. IF on = 1 THEN
  12902. REM 31
  12903. PRINT'" (layer ";count%;") section ";count1%;" starts at appearance "
  12904. INPUT startofdurationssection1%(count%,count1%)
  12905. ENDIF : REM 31
  12906. NEXT
  12907. ENDIF : REM 30
  12908. ENDIF
  12909. PRINT'" Alter the unit durations?"
  12910. PROCyesno
  12911. IF on = 1 THEN
  12912. REM 32
  12913. FOR count1% = 1 TO numdurationssections1%(count%)
  12914. PRINT'" Alter section ";count1%;" [currently ";doorations1%(count%,count1%);"]"
  12915. PROCyesno
  12916. IF on = 1 THEN
  12917. REM 33
  12918. PRINT'" In layer ";count%;", section ";count1%;" the unit duration is "
  12919. INPUT doorations1%(count%,count1%)
  12920. ENDIF : REM 33
  12921. NEXT
  12922. ENDIF : REM 32
  12923. ENDIF : REM 28
  12924. ENDIF : REM 20
  12925. :
  12926. PRINT'" Alter multiplication of durations?"
  12927. PROCyesno
  12928. IF on = 1 THEN
  12929. REM 34
  12930. PRINT'" Do you want the unit duration to be multiplied"
  12931. PRINT " by a given series of values (Y/N) [currently ";multiplier$(count%);"]"
  12932. CASE GET$ OF
  12933. WHEN "Y","y" :
  12934. multiplier$(count%) = "Y"
  12935. PRINT'" starting fresh at each appearance or irrespective (F/I) "
  12936. PRINT " [currently ";multipliermode$(count%);"]"
  12937. CASE GET$ OF
  12938. WHEN "F","f" :
  12939. multipliermode$(count%) = "F"
  12940. OTHERWISE multipliermode$(count%) = "I"
  12941. ENDCASE
  12942. :
  12943. PRINT'" How many values [currently ";numvalues%(count%);"]"
  12944. INPUT numvalues%(count%)
  12945. FOR count1% = 1 TO numvalues%(count%)
  12946. PRINT'" value ";count1%;" is [currently ";values(count%,count1%);"]"
  12947. INPUT values(count%,count1%)
  12948. NEXT
  12949. OTHERWISE multiplier$(count%) = "N"
  12950. ENDCASE
  12951. ELSE
  12952. IF multiplier$(count%) = "" THEN multiplier$(count%) = "N" : REM default for new layers
  12953. ENDIF : REM 34
  12954. :
  12955. PRINT'" Alter control over reoccurence of layers?"
  12956. PROCyesno
  12957. IF on = 1 THEN
  12958. REM 35
  12959. IF numlayerOKsects%(count%) = 0 THEN word$ = "No" ELSE word$ = "Yes"
  12960. PRINT'" Do you want this layer to reoccur according"
  12961. PRINT " to minimum and maximum intervals (eg to"
  12962. PRINT " control phrase-lengths)? [currently ";word$;"]"
  12963. CASE GET$ OF
  12964. WHEN "Y","y" :
  12965. PRINT'" Alter number of sections? [currently ";numlayerOKsects%(count%);"]"
  12966. PROCyesno
  12967. IF on = 1 THEN
  12968. REM 36
  12969. INPUT'" How many sections of this "numlayerOKsects%(count%)
  12970. ENDIF : REM 36
  12971. FOR count1% = 1 TO numlayerOKsects%(count%)
  12972. PRINT'" Any alteration to section ";count1%
  12973. PROCyesno
  12974. IF on = 1 THEN
  12975. REM 37
  12976. PRINT'" Alter the starting point? [currently ";layersOK%(count%,count1%,0);"]"
  12977. PROCyesno
  12978. IF on = 1 THEN
  12979. REM 38
  12980. IF numlayerOKsects%(count%) > 1 THEN
  12981. PRINT'" section ";count1%;" begins at beat "
  12982. INPUT x%
  12983. ELSE x% = 0
  12984. ENDIF
  12985. layersOK%(count%,count1%,0) = x%
  12986. ENDIF : REM 38
  12987. PRINT'" Alter the controlling intervals?"
  12988. PROCyesno
  12989. IF on = 1 THEN
  12990. REM 39
  12991. PRINT'" in this section the layer should NOT reoccur"
  12992. PRINT" until at least how many beats from the"
  12993. PRINT" end of its previous occurence? [currently ";layersOK%(count%,count1%,1);"]"
  12994. INPUT y%
  12995. PRINT'" but SHOULD be made to reoccur after how "
  12996. PRINT" many beats from the end of its previous"
  12997. PRINT" occurence? [currently ";layersOK%(count%,count1%,2);"]"
  12998. INPUT z%
  12999. layersOK%(count%,count1%,1) = y%
  13000. layersOK%(count%,count1%,2) = z%
  13001. ENDIF : REM 39
  13002. ENDIF : REM 37
  13003. NEXT
  13004. OTHERWISE numlayerOKsects%(count%) = 0
  13005. ENDCASE
  13006. ENDIF : REM 35
  13007. :
  13008. ENDIF : REM 5
  13009. :
  13010. NEXT
  13011. :
  13012. :
  13013. PROClayeredattacks
  13014. :
  13015. ENDPROC
  13016. :
  13017. REM**************************************************
  13018. :
  13019. DEF PROCsavelayers
  13020. :
  13021. *Dir SDFS::RISCOSpi.$.CAC.Files
  13022. firstnaming$ = "n"
  13023. CLS
  13024. IF filenamelyr$ = "" THEN
  13025. INPUT'" filename "filenamelyr$
  13026. firstnaming$ = "y"
  13027. ENDIF
  13028. IF firstnaming$ = "n" THEN
  13029. PRINT'" as '";filenamelyr$;"'?"
  13030. CASE GET$ OF
  13031. WHEN "N","n" : INPUT'" filename "filenamelyr$
  13032. OTHERWISE
  13033. ENDCASE
  13034. ENDIF
  13035. :
  13036. channel = OPENOUT filenamelyr$
  13037. PRINT#channel, totallength%
  13038. PRINT#channel, numlayers%
  13039. PRINT#channel, numlayersections%
  13040. FOR a% = 0 TO numlayersections%
  13041. PRINT#channel, startoflayersection%(a%)
  13042. NEXT
  13043. FOR a% = 0 TO numlayersections%
  13044. FOR b% = 0 TO numlayers%
  13045. PRINT#channel, shareoflayers%(a%,b%)
  13046. NEXT
  13047. NEXT
  13048. FOR a% = 0 TO numlayers%
  13049. PRINT#channel, attackscontrol$(a%)
  13050. NEXT
  13051. FOR a% = 0 TO numlayers%
  13052. PRINT#channel, numattackssections%(a%)
  13053. NEXT
  13054. FOR a% = 0 TO numlayers%
  13055. FOR b% = 0 TO numattackssections%(a%)
  13056. PRINT#channel, startofattackssection%(a%,b%)
  13057. NEXT
  13058. NEXT
  13059. FOR a% = 0 TO numlayers%
  13060. FOR b% = 0 TO numattackssections%(a%)
  13061. FOR c% = 0 TO 1
  13062. PRINT#channel, numattax%(a%,b%,c%)
  13063. NEXT
  13064. NEXT
  13065. NEXT
  13066. FOR a% = 0 TO numlayers%
  13067. PRINT#channel, numattackssections1%(a%)
  13068. NEXT
  13069. FOR a% = 0 TO numlayers%
  13070. FOR b% = 0 TO numattackssections1%(a%)
  13071. PRINT#channel, startofattackssection1%(a%,b%)
  13072. NEXT
  13073. NEXT
  13074. FOR a% = 0 TO numlayers%
  13075. FOR b% = 0 TO numattackssections1%(a%)
  13076. FOR c% = 0 TO 1
  13077. PRINT#channel, numattax1%(a%,b%,c%)
  13078. NEXT
  13079. NEXT
  13080. NEXT
  13081. FOR a% = 0 TO numlayers%
  13082. PRINT#channel, durationscontrol$(a%)
  13083. NEXT
  13084. FOR a% = 0 TO numlayers%
  13085. PRINT#channel, numdurationssections%(a%)
  13086. NEXT
  13087. FOR a% = 0 TO numlayers%
  13088. FOR b% = 0 TO numdurationssections%(a%)
  13089. PRINT#channel, startofdurationssection%(a%,b%)
  13090. NEXT
  13091. NEXT
  13092. FOR a% = 0 TO numlayers%
  13093. FOR b% = 0 TO numdurationssections%(a%)
  13094. PRINT#channel, doorations%(a%,b%)
  13095. NEXT
  13096. NEXT
  13097. FOR a% = 0 TO numlayers%
  13098. PRINT#channel, numdurationssections1%(a%)
  13099. NEXT
  13100. FOR a% = 0 TO numlayers%
  13101. FOR b% = 0 TO numdurationssections1%(a%)
  13102. PRINT#channel, doorations1%(a%,b%)
  13103. NEXT
  13104. NEXT
  13105. FOR a% = 0 TO numlayers%
  13106. FOR b% = 0 TO numdurationssections1%(a%)
  13107. PRINT#channel, startofdurationssection1%(a%,b%)
  13108. NEXT
  13109. NEXT
  13110. FOR a% = 0 TO numlayers%
  13111. PRINT#channel, multiplier$(a%)
  13112. NEXT
  13113. FOR a% = 0 TO numlayers%
  13114. PRINT#channel, multipliermode$(a%)
  13115. NEXT
  13116. FOR a% = 0 TO numlayers%
  13117. PRINT#channel, numvalues%(a%)
  13118. NEXT
  13119. FOR a% = 0 TO numlayers%
  13120. FOR b% = 0 TO numvalues%(a%)
  13121. PRINT#channel, values(a%,b%)
  13122. NEXT
  13123. NEXT
  13124. FOR a% = 0 TO numlayers%
  13125. PRINT#channel, numlayerOKsects%(a%)
  13126. NEXT
  13127. FOR a% = 0 TO numlayers%
  13128. FOR b% = 0 TO numlayerOKsects%(a%)
  13129. FOR c% = 0 TO 2
  13130. PRINT#channel, layersOK%(a%,b%,c%)
  13131. NEXT
  13132. NEXT
  13133. NEXT
  13134. :
  13135. CLOSE#channel
  13136. *NoDir
  13137. :
  13138. ENDPROC
  13139. :
  13140. REM****************************************************
  13141. :
  13142. DEF PROCloadlayers
  13143. :
  13144. *Dir SDFS::RISCOSpi.$.CAC.Files
  13145. INPUT'" filename "filenamelyr$
  13146. channel = OPENIN filenamelyr$
  13147. REPEAT
  13148. INPUT#channel, totallength%
  13149. INPUT#channel, numlayers%
  13150. INPUT#channel, numlayersections%
  13151. FOR a% = 0 TO numlayersections%
  13152. INPUT#channel, startoflayersection%(a%)
  13153. NEXT
  13154. FOR a% = 0 TO numlayersections%
  13155. FOR b% = 0 TO numlayers%
  13156. INPUT#channel, shareoflayers%(a%,b%)
  13157. NEXT
  13158. NEXT
  13159. FOR a% = 0 TO numlayers%
  13160. INPUT#channel, attackscontrol$(a%)
  13161. NEXT
  13162. FOR a% = 0 TO numlayers%
  13163. INPUT#channel, numattackssections%(a%)
  13164. NEXT
  13165. FOR a% = 0 TO numlayers%
  13166. FOR b% = 0 TO numattackssections%(a%)
  13167. INPUT#channel, startofattackssection%(a%,b%)
  13168. NEXT
  13169. NEXT
  13170. FOR a% = 0 TO numlayers%
  13171. FOR b% = 0 TO numattackssections%(a%)
  13172. FOR c% = 0 TO 1
  13173. INPUT#channel, numattax%(a%,b%,c%)
  13174. NEXT
  13175. NEXT
  13176. NEXT
  13177. FOR a% = 0 TO numlayers%
  13178. INPUT#channel, numattackssections1%(a%)
  13179. NEXT
  13180. FOR a% = 0 TO numlayers%
  13181. FOR b% = 0 TO numattackssections1%(a%)
  13182. INPUT#channel, startofattackssection1%(a%,b%)
  13183. NEXT
  13184. NEXT
  13185. FOR a% = 0 TO numlayers%
  13186. FOR b% = 0 TO numattackssections1%(a%)
  13187. FOR c% = 0 TO 1
  13188. INPUT#channel, numattax1%(a%,b%,c%)
  13189. NEXT
  13190. NEXT
  13191. NEXT
  13192. FOR a% = 0 TO numlayers%
  13193. INPUT#channel, durationscontrol$(a%)
  13194. NEXT
  13195. FOR a% = 0 TO numlayers%
  13196. INPUT#channel, numdurationssections%(a%)
  13197. NEXT
  13198. FOR a% = 0 TO numlayers%
  13199. FOR b% = 0 TO numdurationssections%(a%)
  13200. INPUT#channel, startofdurationssection%(a%,b%)
  13201. NEXT
  13202. NEXT
  13203. FOR a% = 0 TO numlayers%
  13204. FOR b% = 0 TO numdurationssections%(a%)
  13205. INPUT#channel, doorations%(a%,b%)
  13206. NEXT
  13207. NEXT
  13208. FOR a% = 0 TO numlayers%
  13209. INPUT#channel, numdurationssections1%(a%)
  13210. NEXT
  13211. FOR a% = 0 TO numlayers%
  13212. FOR b% = 0 TO numdurationssections1%(a%)
  13213. INPUT#channel, doorations1%(a%,b%)
  13214. NEXT
  13215. NEXT
  13216. FOR a% = 0 TO numlayers%
  13217. FOR b% = 0 TO numdurationssections1%(a%)
  13218. INPUT#channel, startofdurationssection1%(a%,b%)
  13219. NEXT
  13220. NEXT
  13221. FOR a% = 0 TO numlayers%
  13222. INPUT#channel, multiplier$(a%)
  13223. NEXT
  13224. FOR a% = 0 TO numlayers%
  13225. INPUT#channel, multipliermode$(a%)
  13226. NEXT
  13227. FOR a% = 0 TO numlayers%
  13228. INPUT#channel, numvalues%(a%)
  13229. NEXT
  13230. FOR a% = 0 TO numlayers%
  13231. FOR b% = 0 TO numvalues%(a%)
  13232. INPUT#channel, values(a%,b%)
  13233. NEXT
  13234. NEXT
  13235. FOR a% = 0 TO numlayers%
  13236. INPUT#channel, numlayerOKsects%(a%)
  13237. NEXT
  13238. FOR a% = 0 TO numlayers%
  13239. FOR b% = 0 TO numlayerOKsects%(a%)
  13240. FOR c% = 0 TO 2
  13241. INPUT#channel, layersOK%(a%,b%,c%)
  13242. NEXT
  13243. NEXT
  13244. NEXT
  13245. UNTIL EOF#channel
  13246. CLOSE#channel
  13247. *NoDir
  13248. :
  13249. ENDPROC
  13250. :
  13251. REM************************************************
  13252. :
  13253. DEF PROCseriesamplitudes
  13254. :
  13255. IF easiermenus$ = "n" THEN PROCwindow(20,69,73,45) ELSE PROCwindow(20,69,73,42)
  13256. :
  13257. IF ampoptions$ = "y" THEN
  13258. PRINT'" Create a new group, edit current group,"
  13259. PRINT" or load a file (N/E/F)"
  13260. CASE GET$ OF
  13261. WHEN "N","n" :
  13262. filenameamps$ = ""
  13263. PRINT'" from a sample of amplitudes or"
  13264. PRINT" according to attacks or by note"
  13265. PRINT" numbers (S/A/N)"
  13266. CASE GET$ OF
  13267. WHEN "S","s" : ampmethod$ = "sample" : PROCnewamps
  13268. WHEN "A","a" : ampmethod$ = "attacks" : PROCnewamps
  13269. WHEN "N","n" : ampmethod$ = "notenumber" : PROCnewamps
  13270. OTHERWISE VDU 7 : PROCseriesamplitudes
  13271. ENDCASE
  13272. WHEN "E","e" : PROCeditamps
  13273. WHEN "F","f" : PROCloadamps : PROCeditamps
  13274. OTHERWISE VDU 7 : PROCseriesamplitudes
  13275. ENDCASE
  13276. :
  13277. PRINT'" Save these settings?"
  13278. CASE GET$ OF
  13279. WHEN "Y","y" : PROCsaveamps
  13280. OTHERWISE
  13281. ENDCASE
  13282. :
  13283. PROCrunamps
  13284. :
  13285. PRINT'" Re-order amplitudes randomly?"
  13286. CASE GET$ OF
  13287. WHEN "Y","y" : PROCreorderamps
  13288. OTHERWISE
  13289. ENDCASE
  13290. :
  13291. numamplitudes% = manyattacks% : PROCinsertamplitudes
  13292. :
  13293. ELSE PROCsimpleamps
  13294. ENDIF
  13295. :
  13296. ENDPROC
  13297. :
  13298. REM***************************************
  13299. DEF PROCsimpleamps
  13300. :
  13301. IF easiermenus$ = "n" THEN PROCwindow(20,69,73,45) ELSE PROCwindow(20,69,73,42)
  13302. PRINT'" How many amplitudes "
  13303. INPUT " (for 1 press 0) "numamplitudes%
  13304. IF numamplitudes% = 0 THEN numamplitudes% = 1
  13305. :
  13306. IF numamplitudes% = 1 THEN
  13307. INPUT'" the amplitude is: "dyn$
  13308. PROCconvertdyn
  13309. amplitudes%(0) = dyn%
  13310. ELSE
  13311. PRINT'" Are all the amplitudes the same?"
  13312. CASE GET$ OF
  13313. WHEN "N","n","2" :
  13314. FOR count% = 0 TO (numamplitudes%-1)
  13315. PRINT'" amplitude ";count%+1;" is: "
  13316. IF count% > 0 THEN PRINT " (0 = previous) "
  13317. INPUT dyn$
  13318. IF dyn$ = "" THEN
  13319. dyn$ = prevdyn$
  13320. COLOUR 3 : PRINT dyn$
  13321. wait$ = INKEY$(20) : COLOUR 0
  13322. ENDIF
  13323. prevdyn$ = dyn$
  13324. PROCconvertdyn
  13325. amplitudes%(count%) = dyn%
  13326. NEXT
  13327. OTHERWISE
  13328. INPUT'" the amplitude is: "dyn$
  13329. PROCconvertdyn
  13330. FOR count% = 0 TO (numamplitudes%-1) : amplitudes%(count%) = dyn% : NEXT
  13331. ENDCASE
  13332. ENDIF
  13333. :
  13334. REM function can feed amplitudes similarly into amplitudes%()
  13335. :
  13336. ampmethod$ = "sample"
  13337. PROCinsertamplitudes
  13338. :
  13339. ENDPROC
  13340. :
  13341. *************************************************************************
  13342. :
  13343. DEF PROCnewamps
  13344. :
  13345. CASE ampmethod$ OF
  13346. WHEN "attacks" :
  13347. PRINT'" Dynamics determined by the preceding"
  13348. PRINT" attack intervals, the succeeding ones, "
  13349. PRINT" or both (P/S/B)"
  13350. CASE GET$ OF
  13351. WHEN "P","p" : prepost$ = "P"
  13352. WHEN "S","s" : prepost$ = "S"
  13353. OTHERWISE prepost$ = "B"
  13354. ENDCASE
  13355. CLS
  13356. PRINT'" How many different 'layers' of dynamics?"
  13357. PRINT'" (NB layers inputted later override earlier ones;"
  13358. PRINT" existing dynamics remain unchanged if their"
  13359. PRINT" interval is not included, or if the interval is"
  13360. PRINT" set at 0 - 0)"
  13361. INPUT dynlayers%
  13362. :
  13363. FOR count% = 1 TO dynlayers%
  13364. IF prepost$ = "P" OR prepost$ = "B" THEN
  13365. PRINT'" In layer ";count%;" the preceding interval "
  13366. PRINT " is between how many beats..."
  13367. INPUT dynlayers%(count%,0)
  13368. PRINT'" and how many beats..."
  13369. INPUT dynlayers%(count%,1)
  13370. PRINT'" and the dynamic is "
  13371. INPUT dyn$
  13372. PROCconvertdyn : dynlayers%(count%,2) = dyn%
  13373. ENDIF
  13374. :
  13375. IF prepost$ = "S" OR prepost$ = "B" THEN
  13376. PRINT'" In layer ";count%;" the succeeding interval "
  13377. PRINT " is between how many beats..."
  13378. INPUT dynlayers%(count%,3)
  13379. PRINT'" and how many beats..."
  13380. INPUT dynlayers%(count%,4)
  13381. PRINT'" and the dynamic is "
  13382. INPUT dyn$
  13383. PROCconvertdyn : dynlayers%(count%,5) = dyn%
  13384. ENDIF
  13385. NEXT
  13386. :
  13387. WHEN "notenumber" :
  13388. INPUT'" How many elements in the (recycling) pattern "dynnumbers%
  13389. FOR count% = 1 TO dynnumbers%
  13390. PRINT'" Element ";count%;" places dynamics ";count%;" and ";count%+1
  13391. PRINT" how many notes apart?"
  13392. INPUT dynnumbers%(count%)
  13393. NEXT
  13394. PRINT" and the dynamic for these notes is "
  13395. INPUT dynnumbers$
  13396. :
  13397. WHEN "sample" :
  13398. INPUT'" Total number of amplitudes "manyattacks%
  13399. INPUT " Number of amplitudes in the sample "ampsample%
  13400. FOR count% = 0 TO (ampsample%-1)
  13401. PRINT'" Element ";count%+1;" in the sample is "
  13402. INPUT dyn$
  13403. PROCconvertdyn : ampsample%(count%) = dyn%
  13404. NEXT
  13405. :
  13406. ENDCASE
  13407. :
  13408. ENDPROC
  13409. :
  13410. REM*********************************************
  13411. :
  13412. DEF PROCconvertdyn
  13413. :
  13414. CASE dyn$ OF
  13415. WHEN "0" : dyn% = 0
  13416. WHEN "ppp" : dyn% = 1
  13417. WHEN "pp" : dyn% = 2
  13418. WHEN "p" : dyn% = 3
  13419. WHEN "mp" : dyn% = 4
  13420. WHEN "mf" : dyn% = 5
  13421. WHEN "f" : dyn% = 6
  13422. WHEN "ff" : dyn% = 7
  13423. WHEN "fff" : dyn% = 8
  13424. ENDCASE
  13425. ENDPROC
  13426. :
  13427. REM*********************************************
  13428. :
  13429. DEF PROCrunamps
  13430. :
  13431. IF ampmethod$ = "attacks" OR ampmethod$ = "notenumber" THEN
  13432. INPUT'" The dynamics are to be read into which voice? "voice%
  13433. voice% -= 1
  13434. INPUT'" Starting at bar "copystartbar%
  13435. INPUT" beat "beats%
  13436. PROCalterbeats : copystartbeat% = beats%
  13437. startat% = (copystartbar%*10^3)+beats%
  13438. INPUT'" Ending at bar "copyendbar%
  13439. INPUT " beat "beats%
  13440. PROCalterbeats : copyendbeat% = beats%
  13441. :
  13442. value% = (copystartbar%*10^3)+copystartbeat%
  13443. IF value% <= array%(0,0,voice%)DIV10^3 THEN
  13444. startatcell% = 0
  13445. ELSE
  13446. PROCsearch(value%)
  13447. startatcell% = startcell%
  13448. ENDIF
  13449. value% = (copyendbar%*10^3)+copyendbeat%
  13450. IF value% >= array%(numusedcells%(voice%)-1,0,voice%)DIV10^3 THEN
  13451. endatcell% = numusedcells%(voice%) - 1
  13452. ELSE
  13453. PROCsearch(value%)
  13454. IF shunt$ = "N" THEN endatcell% = startcell% ELSE endatcell% = startcell% - 1
  13455. ENDIF
  13456. :
  13457. manyattacks% = endatcell% - startatcell% + 1
  13458. REM create 'gap' between beat-of-bar and first actual attack
  13459. carrybars% = (array%(startatcell%,0,voice%)DIV10^6)-copystartbar%
  13460. carrybeats% = ((array%(startatcell%,0,voice%)DIV10^3)MOD10^3)-copystartbeat%
  13461. attacks1%(0) = (carrybars%*960)+carrybeats%
  13462. :
  13463. FOR count% = 0 TO (manyattacks%-1)
  13464. IF count% > 0 THEN
  13465. carrybars% = (array%(startatcell%+count%,0,voice%)DIV10^6)-(array%(startatcell%+count%-1,0,voice%)DIV10^6)
  13466. carrybeats% = ((array%(startatcell%+count%,0,voice%)DIV10^3)MOD10^3)-((array%(startatcell%+count%-1,0,voice%)DIV10^3)MOD10^3)
  13467. attacks1%(count%) = attacks1%(count%-1) + ((carrybars%*960)+carrybeats%)
  13468. ENDIF
  13469. :
  13470. pitches%(count%+1) = array%(startatcell%+count%,0,voice%)MOD10^3
  13471. durations%(count%+1) = (array%(startatcell%+count%,1,voice%)DIV10)MOD10^3
  13472. amplitudes%(count%+1) = (array%(startatcell%+count%,1,voice%))MOD10
  13473. envelopes%(count%+1) = (array%(startatcell%+count%,2,voice%))DIV10^2
  13474. glissandos%(count%+1) = (array%(startatcell%+count%,1,voice%)DIV10^4)
  13475. inflections%(count%+1) = array%(startatcell%+count%,2,voice%)MOD10^2
  13476. NEXT
  13477. ENDIF
  13478. :
  13479. CASE ampmethod$ OF
  13480. WHEN "attacks" :
  13481. FOR count% = 0 TO manyattacks%-1
  13482. FOR count1% = 1 TO dynlayers%
  13483. IF count% > 0 THEN
  13484. IF prepost$ = "P" OR prepost$ = "B" THEN
  13485. 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)
  13486. ENDIF
  13487. ENDIF
  13488. IF prepost$ = "S" OR prepost$ = "B" THEN
  13489. IF attacks1%(count%+1)-attacks1%(count%)>=dynlayers%(count1%,3)ANDattacks1%(count%+1)-attacks1%(count%)<=dynlayers%(count1%,4) THEN amplitudes%(count%+1) = dynlayers%(count1%,5)
  13490. ENDIF
  13491. NEXT
  13492. NEXT
  13493. :
  13494. WHEN "notenumber" :
  13495. count% = 1 : count1% = 0
  13496. dyn$ = dynnumbers$ : PROCconvertdyn
  13497. REPEAT
  13498. count1% += 1
  13499. IF count1% > dynnumbers% THEN count1% = 1
  13500. amplitudes%(count%) = dyn%
  13501. count% += dynnumbers%(count1%)
  13502. UNTIL count% > manyattacks%
  13503. :
  13504. WHEN "sample" :
  13505. count% = 1 : count1% = 1
  13506. REPEAT
  13507. amplitudes%(count%-1) = ampsample%(count1%-1)
  13508. count% += 1 : count1% += 1
  13509. IF count1% > ampsample% THEN count1% = 1
  13510. UNTIL count% > manyattacks%
  13511. :
  13512. ENDCASE
  13513. :
  13514. ENDPROC
  13515. :
  13516. REM******************************************************
  13517. :
  13518. DEF PROCreorderamps
  13519. :
  13520. FOR count% = 0 TO manyattacks%-1
  13521. REPEAT
  13522. x% = RND(manyattacks%)
  13523. x% = x%-1
  13524. IF amplitudes%(x%) = 0 THEN thiscell$ = "done" ELSE thiscell$ = "available"
  13525. UNTIL thiscell$ = "available"
  13526. amplitudes1%(count%) = amplitudes%(x%)
  13527. amplitudes%(x%) = 0
  13528. NEXT
  13529. amplitudes%() = amplitudes1%()
  13530. :
  13531. ENDPROC
  13532. :
  13533. REM*****************************************************
  13534. :
  13535. DEF PROCeditamps
  13536. :
  13537. CASE ampmethod$ OF
  13538. WHEN "attacks" :
  13539. PRINT'" Alter whether dynamics determined by"
  13540. PRINT" preceding, succeeding intervals or both?"
  13541. PROCyesno
  13542. IF on = 1 THEN
  13543. PRINT'" Dynamics determined by the preceding"
  13544. PRINT" attack intervals, the succeeding ones, "
  13545. PRINT" or both (P/S/B)"
  13546. CASE GET$ OF
  13547. WHEN "P","p" : prepost$ = "P"
  13548. WHEN "S","s" : prepost$ = "S"
  13549. OTHERWISE prepost$ = "B"
  13550. ENDCASE
  13551. ENDIF
  13552. CLS
  13553. PRINT'" Alter number of 'layers'?"
  13554. PROCyesno
  13555. IF on = 1 THEN
  13556. PRINT'" How many different 'layers' of dynamics?"
  13557. PRINT'" (NB layers inputted later override earlier ones;"
  13558. PRINT" existing dynamics remain unchanged if their"
  13559. PRINT" interval is not included, or if the interval is"
  13560. PRINT" set at 0 - 0)"
  13561. INPUT dynlayers%
  13562. ENDIF
  13563. :
  13564. PRINT'" Alter any of the layers?"
  13565. PROCyesno
  13566. IF on = 1 THEN
  13567. FOR count% = 1 TO dynlayers%
  13568. PRINT'" Alter layer ";count%
  13569. PROCyesno
  13570. IF on = 1 THEN
  13571. IF prepost$ = "P" OR prepost$ = "B" THEN
  13572. PRINT'" In layer ";count%;" the preceding interval "
  13573. PRINT " is between how many beats..."
  13574. INPUT dynlayers%(count%,0)
  13575. PRINT'" and how many beats..."
  13576. INPUT dynlayers%(count%,1)
  13577. PRINT'" and the dynamic is "
  13578. INPUT dyn$
  13579. PROCconvertdyn : dynlayers%(count%,2) = dyn%
  13580. ENDIF
  13581. :
  13582. IF prepost$ = "S" OR prepost$ = "B" THEN
  13583. PRINT'" In layer ";count%;" the succeeding interval "
  13584. PRINT " is between how many beats..."
  13585. INPUT dynlayers%(count%,3)
  13586. PRINT'" and how many beats..."
  13587. INPUT dynlayers%(count%,4)
  13588. PRINT'" and the dynamic is "
  13589. INPUT dyn$
  13590. PROCconvertdyn : dynlayers%(count%,5) = dyn%
  13591. ENDIF
  13592. ENDIF
  13593. NEXT
  13594. ENDIF
  13595. :
  13596. WHEN "notenumber" :
  13597. PRINT'" Alter number of elements in the pattern?"
  13598. PROCyesno
  13599. IF on = 1 THEN
  13600. INPUT'" How many elements in the (recycling) pattern "dynnumbers%
  13601. ENDIF
  13602. FOR count% = 1 TO dynnumbers%
  13603. PRINT'" Alter element ";count%
  13604. PROCyesno
  13605. IF on =1 THEN
  13606. PRINT'" Element ";count%;" places dynamics ";count%;" and ";count%+1
  13607. PRINT" how many notes apart?"
  13608. INPUT dynnumbers%(count%)
  13609. ENDIF
  13610. NEXT
  13611. PRINT'" Alter the dynamic?"
  13612. PROCyesno
  13613. IF on =1 THEN
  13614. PRINT" and the dynamic for these notes is "
  13615. INPUT dynnumbers$
  13616. ENDIF
  13617. :
  13618. WHEN "sample" :
  13619. PRINT'" Alter total number of amplitudes?"
  13620. PROCyesno
  13621. IF on =1 THEN
  13622. INPUT'" Total number of amplitudes "manyattacks%
  13623. ENDIF
  13624. PRINT'" Alter number of amplitudes in the sample?"
  13625. PROCyesno
  13626. IF on =1 THEN
  13627. INPUT " Number of amplitudes in the sample "ampsample%
  13628. ENDIF
  13629. PRINT'" Alter the sample?"
  13630. PROCyesno
  13631. IF on =1 THEN
  13632. FOR count% = 0 TO ampsample%-1
  13633. PRINT'" Alter element ";count%+1
  13634. PROCyesno
  13635. IF on =1 THEN
  13636. PRINT'" Element ";count%+1;" in the sample is "
  13637. INPUT dyn$
  13638. PROCconvertdyn : ampsample%(count%) = dyn%
  13639. ENDIF
  13640. NEXT
  13641. ENDIF
  13642. :
  13643. ENDCASE
  13644. :
  13645. ENDPROC
  13646. :
  13647. REM***************************************************
  13648. :
  13649. DEF PROCsaveamps
  13650. :
  13651. :
  13652. *Dir SDFS::RISCOSpi.$.CAC.Files
  13653. firstnaming$ = "n"
  13654. CLS
  13655. IF filenameamps$ = "" THEN
  13656. INPUT'" filename "filenameamps$
  13657. firstnaming$ = "y"
  13658. ENDIF
  13659. IF firstnaming$ = "n" THEN
  13660. PRINT'" as '";filenameamps$;"'?"
  13661. CASE GET$ OF
  13662. WHEN "N","n" : INPUT'" filename "filenameamps$
  13663. OTHERWISE
  13664. ENDCASE
  13665. ENDIF
  13666. :
  13667. channel = OPENOUT filenameamps$
  13668. PRINT#channel, ampmethod$
  13669. IF ampmethod$ = "attacks" THEN
  13670. PRINT#channel, prepost$
  13671. PRINT#channel, dynlayers%
  13672. ENDIF
  13673. IF ampmethod$ = "notenumber" THEN
  13674. PRINT#channel, dynnumbers%
  13675. PRINT#channel, dynnumbers$
  13676. ENDIF
  13677. IF ampmethod$ = "sample" THEN
  13678. PRINT#channel, manyattacks%
  13679. PRINT#channel, ampsample%
  13680. ENDIF
  13681. IF ampmethod$ = "attacks" THEN
  13682. FOR a% = 0 TO 12
  13683. FOR b% = 0 TO 5
  13684. PRINT#channel, dynlayers%(a%,b%)
  13685. NEXT
  13686. NEXT
  13687. ENDIF
  13688. IF ampmethod$ = "notenumber" THEN
  13689. FOR a% = 0 TO 99
  13690. PRINT#channel, dynnumbers%(a%)
  13691. NEXT
  13692. ENDIF
  13693. IF ampmethod$ = "sample" THEN
  13694. FOR a% = 0 TO 49
  13695. PRINT#channel, ampsample%(a%)
  13696. NEXT
  13697. ENDIF
  13698. :
  13699. CLOSE#channel
  13700. *NoDir
  13701. :
  13702. ENDPROC
  13703. :
  13704. REM***********************************
  13705. :
  13706. DEF PROCloadamps
  13707. :
  13708. :
  13709. *Dir SDFS::RISCOSpi.$.CAC.Files
  13710. INPUT'" filename "filenameamps$
  13711. channel = OPENIN filenameamps$
  13712. REPEAT
  13713. INPUT#channel, ampmethod$
  13714. IF ampmethod$ = "attacks" THEN
  13715. INPUT#channel, prepost$
  13716. INPUT#channel, dynlayers%
  13717. ENDIF
  13718. IF ampmethod$ = "notenumber" THEN
  13719. INPUT#channel, dynnumbers%
  13720. INPUT#channel, dynnumbers$
  13721. ENDIF
  13722. IF ampmethod$ = "sample" THEN
  13723. INPUT#channel, manyattacks%
  13724. INPUT#channel, ampsample%
  13725. ENDIF
  13726. IF ampmethod$ = "attacks" THEN
  13727. FOR a% = 0 TO 12
  13728. FOR b% = 0 TO 5
  13729. INPUT#channel, dynlayers%(a%,b%)
  13730. NEXT
  13731. NEXT
  13732. ENDIF
  13733. IF ampmethod$ = "notenumber" THEN
  13734. FOR a% = 0 TO 99
  13735. INPUT#channel, dynnumbers%(a%)
  13736. NEXT
  13737. ENDIF
  13738. IF ampmethod$ = "sample" THEN
  13739. FOR a% = 0 TO 49
  13740. INPUT#channel, ampsample%(a%)
  13741. NEXT
  13742. ENDIF
  13743. :
  13744. UNTIL EOF#channel
  13745. CLOSE#channel
  13746. *NoDir
  13747. :
  13748. ENDPROC
  13749. :
  13750. REM*********************************
  13751. :
  13752. DEF PROCbeatnumbers
  13753. :
  13754. amount% = 10
  13755. IF beatnum_diff$ = "num" THEN
  13756. IF beatunits$ = "big" THEN
  13757. PRINT (array%(startcell%,0,voice%)DIV10^3)MOD10^3
  13758. ELSE beatnum = ((array%(startcell%,0,voice%)DIV10^3)MOD10^3)/beatfactor%
  13759. IF beatnum MOD 1 > 0 THEN
  13760. beatnum = beatnum*10
  13761. beatnum% = beatnum DIV 1
  13762. PRINT beatnum%/amount%
  13763. ELSE PRINT beatnum
  13764. ENDIF
  13765. ENDIF
  13766. ELSE
  13767. beatdiff% = ((array%(startcell%+1,0,voice%)DIV10^3)MOD10^3)-((array%(startcell%,0,voice%)DIV10^3)MOD10^3)
  13768. beatdiff%+=(((array%(startcell%+1,0,voice%)DIV10^6)-(array%(startcell%,0,voice%)DIV10^6))*960)
  13769. :
  13770. IF beatdiff% > 0 THEN
  13771. IF beatunits$ = "big" THEN
  13772. PRINT beatdiff%
  13773. ELSE
  13774. beatdiff = beatdiff%/beatfactor%
  13775. IF beatdiff MOD 1 > 0 THEN
  13776. beatdiff = beatdiff*10
  13777. beatdiff% = beatdiff DIV 1
  13778. PRINT beatdiff%/amount%
  13779. ELSE PRINT beatdiff%/beatfactor%
  13780. ENDIF
  13781. ENDIF
  13782. ENDIF
  13783. :
  13784. ENDIF
  13785. ENDPROC
  13786. :
  13787. REM****************************************************
  13788. :
  13789. DEF PROCextract
  13790. :
  13791. counter% = -1 : attacks1%() = 0 : countt% = -1 : endcell% = manyattacks%
  13792. IF extractmode$ = "random" THEN numb% = RND(higher%-lower%+1)+lower%-2
  13793. REPEAT
  13794. countt% += 1
  13795. extract$ = "n"
  13796. :
  13797. CASE extractmode$ OF
  13798. WHEN "pitchclass" :
  13799. attempts% = 0
  13800. REPEAT
  13801. attempts% += 1
  13802. :
  13803. IF extractinfo%(attempts%) = array%(startatcell%+countt%,0,voice%)MOD10^3 THEN extract$ = "y"
  13804. UNTIL extract$ = "y" OR attempts% = npitches%
  13805. WHEN "band" :
  13806. attempts% = 0 : top$ = "n" : bottom$ = "n"
  13807. theoctave% = array%(startatcell%+countt%,0,voice%)MOD10
  13808. thepitch% = (array%(startatcell%+countt%,0,voice%)DIV10^2)MOD10
  13809. theaccid% = (array%(startatcell%+countt%,0,voice%)DIV10)MOD10
  13810. REPEAT
  13811. attempts% += 1
  13812. testoctave% = extractinfo%(attempts%)MOD10
  13813. testpitch% = extractinfo%(attempts%)DIV10^2
  13814. testaccid% = (extractinfo%(attempts%)DIV10)MOD10
  13815. IF ((attempts%/2)*10)MOD10 > 0 THEN
  13816. IF theoctave% >= testoctave% THEN bottom$ = "y" ELSE bottom$ = "n"
  13817. IF bottom$ = "y" AND theoctave% = testoctave% THEN
  13818. IF thepitch% >= testpitch% THEN bottom$ = "y" ELSE bottom$ = "n"
  13819. ENDIF
  13820. IF bottom$ = "y" AND theoctave% = testoctave% AND thepitch% = testpitch% THEN
  13821. IF theaccid% >= testaccid% THEN bottom$ = "y" ELSE bottom$ = "n"
  13822. ENDIF
  13823. ELSE
  13824. IF theoctave% <= testoctave% THEN top$ = "y" ELSE top$ = "n"
  13825. IF top$ = "y" AND theoctave% = testoctave% THEN
  13826. IF thepitch% <= testpitch% THEN top$ = "y" ELSE top$ = "n"
  13827. ENDIF
  13828. IF top$ = "y" AND theoctave% = testoctave% AND thepitch% = testpitch% THEN
  13829. IF theaccid% <= testaccid% THEN top$ = "y" ELSE top$ = "n"
  13830. ENDIF
  13831. ENDIF
  13832. IF bottom$ = "y" AND top$ = "y" THEN extract$ = "y"
  13833. UNTIL extract$ = "y" OR attempts% = npitches%
  13834. WHEN "random" :
  13835. extract$ = "n"
  13836. IF numb% = countt% THEN
  13837. extract$ = "y"
  13838. max% = higher%-lower%+1 : a% = RND(max%) : b% = lower% -1 : c% = countt%
  13839. IF a% = 0 THEN a% = 1
  13840. numb% = a% + b% + c%
  13841. IF copymove$ = "EM" THEN numb% -= 1
  13842. ENDIF
  13843. WHEN "attackinterval" :
  13844. bar1% = array%(startatcell%+countt%,0,voice%)DIV10^6
  13845. beat1% = (array%(startatcell%+countt%,0,voice%)DIV10^3)MOD10^3
  13846. beat1% = (bar1%*960)+beat1%
  13847. bar2% = array%(startatcell%+countt%+1,0,voice%)DIV10^6
  13848. beat2% = (array%(startatcell%+countt%+1,0,voice%)DIV10^3)MOD10^3
  13849. beat2% = (bar2%*960)+beat2%
  13850. interval% = beat2% - beat1%
  13851. IF interval% >= lower% AND interval% <= higher% THEN extract$ = "y"
  13852. ENDCASE
  13853. :
  13854. IF extract$ = "y" THEN
  13855. counter% += 1
  13856. attacks2%(counter%) = (array%(startatcell%+countt%,0,voice%))DIV10^3
  13857. pitches%(counter%) = array%(startatcell%+countt%,0,voice%)MOD10^3
  13858. durations%(counter%) = (array%(startatcell%+countt%,1,voice%)DIV10)MOD10^3
  13859. amplitudes%(counter%) = (array%(startatcell%+countt%,1,voice%))MOD10
  13860. envelopes%(counter%) = (array%(startatcell%+countt%,2,voice%))DIV10^2
  13861. glissandos%(counter%) = (array%(startatcell%+countt%,1,voice%)DIV10^4)
  13862. inflections%(counter%) = array%(startatcell%+countt%,2,voice%)MOD10^2
  13863. IF copymove$ = "EM" THEN
  13864. REM routine to delete each note as it is extracted, if move-extract wanted
  13865. numnotes% = 1
  13866. bar% = array%(startatcell%+countt%,0,voice%) DIV10^6
  13867. beats% = (array%(startatcell%+countt%,0,voice%)DIV10^3)MOD10^3
  13868. PROCalterbeats
  13869. start% = (bar%*(10^3))+beats%
  13870. PROCsearch(start%)
  13871. PROCshuntleft(startcell%,numnotes%)
  13872. countt% -= 1 : endcell% -= 1
  13873. REM prev line is because of deletion, ie array cells have all now shifted one to left!
  13874. ENDIF
  13875. REM end of delete routine
  13876. :
  13877. ENDIF
  13878. UNTIL countt% = endcell% - 1
  13879. manyattacks% = counter%+1
  13880. attacks1%(0) = (((attacks2%(0)DIV10^3)*960)+(attacks2%(0)MOD10^3)-960)-((copystartbar%*960)+copystartbeat%-960)
  13881. FOR count% = 1 TO manyattacks% - 1
  13882. bars% = (attacks2%(count%)DIV10^3)-(attacks2%(count%-1)DIV10^3)
  13883. beats% = (attacks2%(count%)MOD10^3)-(attacks2%(count%-1)MOD10^3)
  13884. attacks1%(count%) = attacks1%(count%-1) + (bars%*960) + beats%
  13885. NEXT
  13886. :
  13887. :
  13888. ENDPROC
  13889. :
  13890. REM********************************************************
  13891. :
  13892. DEF PROCextractinfo
  13893. :
  13894. IF quickextract$ = "n" THEN
  13895. :
  13896. CLS
  13897. aslasttime$ = "n"
  13898. PRINT'" Extract by pitches, pitch-band,"
  13899. PRINT'" attack interval, random number"
  13900. PRINT'" or as last time (P/B/A/R/L) "
  13901. CASE GET$ OF
  13902. WHEN "P","p","0" :
  13903. CLS
  13904. extractmode$ = "pitchclass"
  13905. WHEN "B","b" :
  13906. CLS : extractmode$ = "band"
  13907. WHEN "R","r" :
  13908. CLS : extractmode$ = "random"
  13909. PRINT'" Random extractions follow "
  13910. PRINT'" each other at a distance "
  13911. INPUT '" of between how many notes "lower%
  13912. INPUT '" and how many notes "higher%
  13913. WHEN "A","a" :
  13914. CLS : extractmode$ = "attackinterval"
  13915. PRINT'" Extract notes which precede"
  13916. PRINT'" next note by between"
  13917. INPUT'" how many beats "lower%
  13918. INPUT'" and how many beats "higher%
  13919. WHEN "L","l" :
  13920. aslasttime$ = "y"
  13921. OTHERWISE CLS : extractmode$ = "pitchclass"
  13922. ENDCASE
  13923. :
  13924. ENDIF
  13925. :
  13926. IF aslasttime$ = "n" THEN
  13927. :
  13928. IF extractmode$ = "pitchclass" OR extractmode$ = "band" THEN
  13929. :
  13930. IF quickextract$ = "n" THEN
  13931. IF extractmode$ = "pitchclass" THEN
  13932. INPUT'" How many pitch-classes? "npitches%
  13933. IF npitches% = 0 THEN npitches% = 1
  13934. ELSE
  13935. INPUT'" How many bands (0 = 1) "nbands%
  13936. IF nbands% = 0 THEN nbands% = 1
  13937. ENDIF
  13938. ENDIF
  13939. :
  13940. IF extractmode$ = "band" THEN npitches% = nbands%*2
  13941. FOR p% = 1 TO npitches%
  13942. IF extractmode$ = "pitchclass" THEN
  13943. PRINT' " Pitch-class ";p%;" has the note name ";
  13944. ELSE PRINT'" Going up, band-point ";p%;" is note ";
  13945. ENDIF
  13946. COLOUR 3
  13947. CASE GET$ OF
  13948. WHEN "C","c" : note% = 0 : PRINT "C" : finished$ = "n"
  13949. WHEN "D","d" : note% = 1 : PRINT "D" : finished$ = "n"
  13950. WHEN "E","e" : note% = 2 : PRINT "E" : finished$ = "n"
  13951. WHEN "F","f" : note% = 3 : PRINT "F" : finished$ = "n"
  13952. WHEN "G","g" : note% = 4 : PRINT "G" : finished$ = "n"
  13953. WHEN "A","a" : note% = 5 : PRINT "A" : finished$ = "n"
  13954. WHEN "B","b" : note% = 6 : PRINT "B" : finished$ = "n"
  13955. WHEN "1" : note% = 0 : accid% = 5 : octave% = 4 : finished$ = "y"
  13956. WHEN "2" : note% = 0 : accid% = 9 : octave% = 4 : finished$ = "y"
  13957. WHEN "3" : note% = 1 : accid% = 5 : octave% = 4 : finished$ = "y"
  13958. WHEN "4" : note% = 2 : accid% = 1 : octave% = 4 : finished$ = "y"
  13959. WHEN "5" : note% = 2 : accid% = 5 : octave% = 4 : finished$ = "y"
  13960. WHEN "6" : note% = 3 : accid% = 5 : octave% = 4 : finished$ = "y"
  13961. WHEN "7" : note% = 3 : accid% = 9 : octave% = 4 : finished$ = "y"
  13962. WHEN "8" : note% = 4 : accid% = 5 : octave% = 4 : finished$ = "y"
  13963. WHEN "9" : note% = 5 : accid% = 1 : octave% = 4 : finished$ = "y"
  13964. ENDCASE
  13965. COLOUR 0
  13966. :
  13967. IF finished$ = "n" THEN
  13968. :
  13969. PRINT " accidental ";
  13970. COLOUR 3
  13971. CASE GET$ OF
  13972. WHEN "1" : accid% = 1 : PRINT "flat"
  13973. WHEN "2" : accid% = 2 : PRINT "3/8flat"
  13974. WHEN "3" : accid% = 3 : PRINT "1/4flat"
  13975. WHEN "4" : accid% = 4 : PRINT "1/8flat"
  13976. WHEN "5" : accid% = 5 : PRINT "nat"
  13977. WHEN "6" : accid% = 6 : PRINT "1/8shrp"
  13978. WHEN "7" : accid% = 7 : PRINT "1/4shrp"
  13979. WHEN "8" : accid% = 8 : PRINT "3/8shrp"
  13980. WHEN "9" : accid% = 9 : PRINT "shrp"
  13981. ENDCASE
  13982. COLOUR 0
  13983. PRINT " octave ";
  13984. COLOUR 3
  13985. CASE GET$ OF
  13986. WHEN "0" : octave% = 0 : PRINT "0"
  13987. WHEN "1" : octave% = 1 : PRINT "1"
  13988. WHEN "2" : octave% = 2 : PRINT "2"
  13989. WHEN "3" : octave% = 3 : PRINT "3"
  13990. WHEN "4" : octave% = 4 : PRINT "4"
  13991. WHEN "5" : octave% = 5 : PRINT "5"
  13992. WHEN "6" : octave% = 6 : PRINT "6"
  13993. WHEN "7" : octave% = 7 : PRINT "7"
  13994. WHEN "8" : octave% = 8 : PRINT "8"
  13995. ENDCASE
  13996. COLOUR 0
  13997. :
  13998. ENDIF
  13999. :
  14000. extractinfo%(p%) = (note%*100)+(accid%*10)+octave%
  14001. NEXT
  14002. :
  14003. ENDIF
  14004. :
  14005. ENDIF
  14006. :
  14007. IF extractmode$ = "random" AND quickextract$ = "y" THEN
  14008. PRINT '" Random extractions follow "
  14009. PRINT ' " each other at a distance "
  14010. INPUT '" of between how many notes "lower%
  14011. INPUT '" and how many notes "higher%
  14012. ENDIF
  14013. ENDPROC
  14014. :
  14015. REM*************************************************
  14016. :
  14017. DEF PROCequalizedurats
  14018. :
  14019. CLS
  14020. PRINT'" There are ";manyattacks%-1;" durations "
  14021. PRINT'" How many do you want to equalise? "
  14022. PRINT " (0 = ";manyattacks%-1;")"
  14023. INPUTnumdurats%
  14024. IF numdurats% = 0 THEN numdurats% = manyattacks%-1
  14025. INPUT'" Starting at duration number (0 = 1) "startattack%
  14026. IF startattack% = 0 THEN startattack% = 1
  14027. IF (manyattacks%-startattack%)<numdurats% THEN startattack% = manyattacks%-numdurats%
  14028. totaldurats% = 0
  14029. FOR count% = startattack% TO (startattack%+numdurats%-1)
  14030. totaldurats%+=(attacks1%(count%)-attacks1%(count%-1))
  14031. NEXT
  14032. average = totaldurats%/numdurats%
  14033. residue% = average * 10
  14034. residue% = residue%MOD10
  14035. IF residue%>=5 THEN average% = ((average)DIV1)+1 ELSE average% = (average)DIV1
  14036. FOR count% = startattack% TO (startattack%+numdurats%-1)
  14037. attacks1%(count%) = attacks1%(count%-1)+average%
  14038. NEXT
  14039. adjust% = totaldurats% - (average%*numdurats%)
  14040. attacks1%(count%-1) += adjust%
  14041. equalized$ = "y" : seeequalizey$ = "n"
  14042. PROCinsertattacks
  14043. ENDPROC
  14044. :
  14045. REM************************************************
  14046. :
  14047. DEF PROCsavevoice
  14048. :
  14049. *Dir SDFS::RISCOSpi.$.CAC.Files
  14050. INPUT'" filename "filenamevoice$
  14051. channel = OPENOUT filenamevoice$
  14052. PRINT#channel, manyattacks%
  14053. FOR a% = 0 TO manyattacks%-1
  14054. PRINT#channel, attacks1%(a%)
  14055. NEXT
  14056. FOR a% = 0 TO manyattacks%-1
  14057. PRINT#channel, pitches%(a%)
  14058. NEXT
  14059. FOR a% = 0 TO manyattacks%-1
  14060. PRINT#channel, durations%(a%)
  14061. NEXT
  14062. FOR a% = 0 TO manyattacks%-1
  14063. PRINT#channel, amplitudes%(a%)
  14064. NEXT
  14065. FOR a% = 0 TO manyattacks%-1
  14066. PRINT#channel, envelopes%(a%)
  14067. NEXT
  14068. FOR a% = 0 TO manyattacks%-1
  14069. PRINT#channel, glissandos%(a%)
  14070. NEXT
  14071. FOR a% = 0 TO manyattacks%-1
  14072. PRINT#channel, inflections%(a%)
  14073. NEXT
  14074. CLOSE#channel
  14075. *NoDir
  14076. savevoice$ = "N" : PROCdisplay
  14077. ENDPROC
  14078. :
  14079. REM**********************************
  14080. :
  14081. DEF PROCimportvoice
  14082. :
  14083. *Dir SDFS::RISCOSpi.$.CAC.Files
  14084. INPUT'" filename "filenamevoice$
  14085. channel = OPENIN filenamevoice$
  14086. REPEAT
  14087. INPUT#channel, manyattacks%
  14088. FOR a% = 0 TO manyattacks%-1
  14089. INPUT#channel, attacks1%(a%)
  14090. NEXT
  14091. FOR a% = 0 TO manyattacks%-1
  14092. INPUT#channel, pitches%(a%)
  14093. NEXT
  14094. FOR a% = 0 TO manyattacks%-1
  14095. INPUT#channel, durations%(a%)
  14096. NEXT
  14097. FOR a% = 0 TO manyattacks%-1
  14098. INPUT#channel, amplitudes%(a%)
  14099. NEXT
  14100. FOR a% = 0 TO manyattacks%-1
  14101. INPUT#channel, envelopes%(a%)
  14102. NEXT
  14103. FOR a% = 0 TO manyattacks%-1
  14104. INPUT#channel, glissandos%(a%)
  14105. NEXT
  14106. FOR a% = 0 TO manyattacks%-1
  14107. INPUT#channel, inflections%(a%)
  14108. NEXT
  14109. UNTIL EOF#channel
  14110. CLOSE#channel
  14111. *NoDir
  14112. method$ = "raw" : copyit$ = "ON" : PROCinsertattacks
  14113. ENDPROC
  14114. :
  14115. REM***********************************
  14116. :
  14117. DEF PROCpreintervalstring
  14118. :
  14119. PROCwindow(20,69,80,22)
  14120. PRINT'" Re-run current interval string,"
  14121. PRINT" create a new string, edit the"
  14122. PRINT " current one, or load a file (R/N/E/F)"
  14123. CASE GET$ OF
  14124. WHEN "R","r" : PROCintervalstring
  14125. WHEN "E","e" : loadstring$ = "n" :PROCeditintervalstring
  14126. WHEN "F","f" : loadstring$ = "y" :PROCeditintervalstring
  14127. OTHERWISE
  14128. ENDCASE
  14129. :
  14130. filenamestg$ = ""
  14131. numbannedpitches% = 0 : numbannedints% = 0 : bannedpitches%() = 0
  14132. :
  14133. INPUT'" How many pitches "numpitches%
  14134. INPUT'" The tessitura is how many semitones wide "tess%
  14135. PRINT'" The bottom pitch of the tessitura is ";
  14136. COLOUR 3
  14137. CASE GET$ OF
  14138. WHEN "C","c" : note% = 1 : PRINT "C" : pitch$ = "C"
  14139. WHEN "D","d" : note% = 3 : PRINT "D" : pitch$ = "D"
  14140. WHEN "E","e" : note% = 5 : PRINT "E" : pitch$ = "E"
  14141. WHEN "F","f" : note% = 6 : PRINT "F" : pitch$ = "F"
  14142. WHEN "G","g" : note% = 8 : PRINT "G" : pitch$ = "G"
  14143. WHEN "A","a" : note% = 10 : PRINT "A" : pitch$ = "A"
  14144. WHEN "B","b" : note% = 12 : PRINT "B" : pitch$ = "B"
  14145. ENDCASE
  14146. COLOUR 0
  14147. PRINT " Accidental ";
  14148. COLOUR 3
  14149. CASE GET$ OF
  14150. WHEN "1" : note% -= 1 : PRINT "flat" : accid$ = "flat"
  14151. WHEN "5" : PRINT "nat" : accid$ = "nat"
  14152. WHEN "9" : note% += 1 : PRINT "shrp" : accid$ = "shrp"
  14153. OTHERWISE VDU 7
  14154. ENDCASE
  14155. COLOUR 0
  14156. PRINT " Octave ";
  14157. COLOUR 3
  14158. octave% = EVAL(GET$) : saveoctave% = octave%
  14159. PRINT octave%
  14160. COLOUR 0
  14161. transposer% = note% + (12*(octave%-1)) - 1
  14162. PRINT'" Are any pitches to be banned? "
  14163. CASE GET$ OF
  14164. WHEN "Y","y" :
  14165. REPEAT
  14166. numbannedpitches% += 1
  14167. PRINT '" Pitch ";numbannedpitches%;" is, going up,"
  14168. PRINT " semitone number what, starting at 0?"
  14169. INPUT " (type F to finish) "bannedpitch$
  14170. IF bannedpitch$ <> "F" AND bannedpitch$ <> "f" THEN bannedpitches%(numbannedpitches%) = EVAL(bannedpitch$) + 1
  14171. UNTIL bannedpitch$ = "F" OR bannedpitch$ = "f"
  14172. numbannedpitches% -= 1
  14173. OTHERWISE
  14174. ENDCASE
  14175. :
  14176. PRINT'" Are any intervals to be banned?"
  14177. CASE GET$ OF
  14178. WHEN "Y","y" :
  14179. REPEAT
  14180. numbannedints% += 1
  14181. PRINT''" Interval ";numbannedints%;" is how many semitones?"
  14182. PRINT" (NB intervals between 12 & 23 are "
  14183. PRINT" applied at all compounds - "
  14184. INPUT" type F to finish) "int$
  14185. IF int$ <> "F" AND int$ <> "f" THEN
  14186. PRINT'" And is banned at between a"
  14187. INPUT" minimum of how many notes from the last one "range%
  14188. INPUT" And a maximum of how many "range1%
  14189. bannedints%(numbannedints%,0) = EVAL(int$)
  14190. bannedints%(numbannedints%,1) = range%
  14191. bannedints%(numbannedints%,2) = range1%
  14192. ENDIF
  14193. UNTIL int$ = "F" OR int$ = "f"
  14194. numbannedints% -= 1
  14195. OTHERWISE
  14196. ENDCASE
  14197. :
  14198. stringattempts% = 0 : PROCintervalstring
  14199. :
  14200. ENDPROC
  14201. :
  14202. REM********************************************************
  14203. :
  14204. DEF PROCintervalstring
  14205. :
  14206. notenumber% = 0 : stringattempts% += 1
  14207. :
  14208. REPEAT
  14209. notenumber% += 1 : triednotes%() = 0
  14210. :
  14211. REPEAT
  14212. note% = RND(tess%+1) : triednotes%(note%) = 1
  14213. count% = 0
  14214. test$ = "pass"
  14215. IF numbannedpitches% > 0 THEN
  14216. REPEAT
  14217. count% += 1
  14218. IF note% = bannedpitches%(count%) THEN test$ = "fail"
  14219. UNTIL test$ = "fail" OR count% = numbannedpitches%
  14220. ENDIF
  14221. :
  14222. IF notenumber% > 1 AND numbannedints% > 0 AND test$ = "pass" THEN
  14223. count% = 0
  14224. REPEAT
  14225. count% += 1 : count1% = 0
  14226. REPEAT
  14227. count1% += 1
  14228. testnotenumber% = bannedints%(count%,1)+count1%-1
  14229. testnotenumber% = notenumber%-testnotenumber%
  14230. IF testnotenumber% > 0 THEN
  14231. IF note% >= amplitudes%(testnotenumber%) THEN
  14232. interval% = note%-amplitudes%(testnotenumber%)
  14233. ELSE interval% = amplitudes%(testnotenumber%)-note%
  14234. ENDIF
  14235. :
  14236. REPEAT
  14237. IF interval% > 23 THEN interval% -= 12
  14238. UNTIL interval% < 24
  14239. IF interval% = bannedints%(count%,0) THEN test$ = "fail"
  14240. :
  14241. ENDIF
  14242. UNTIL count1% > (bannedints%(count%,2)-bannedints%(count%,1)) OR test$ = "fail"
  14243. UNTIL count% = numbannedints% OR test$ = "fail"
  14244. ENDIF
  14245. :
  14246. REM check to see if all notes tried
  14247. check$ = "alltried"
  14248. FOR checker% = 1 TO tess%+1
  14249. IF triednotes%(checker%) = 0 THEN check$ = "notalltried"
  14250. NEXT
  14251. UNTIL test$ = "pass" OR check$ = "alltried"
  14252. :
  14253. amplitudes%(notenumber%) = note%
  14254. :
  14255. IF check$ = "alltried" AND test$ = "fail" THEN whattodo$ = "abort" ELSE whattodo$ = "continue"
  14256. UNTIL notenumber% = numpitches% OR whattodo$ = "abort"
  14257. :
  14258. IF whattodo$ = "abort" THEN
  14259. CLS : PRINT''" Attempts from fresh start - ";stringattempts%
  14260. PROCintervalstring
  14261. ELSE
  14262. FOR count% = 1 TO numpitches%
  14263. amplitudes%(count%) += transposer%
  14264. REM which octave
  14265. count1% = 0
  14266. REPEAT
  14267. count1% += 1
  14268. UNTIL (count1%*12) >= amplitudes%(count%)
  14269. octave% = count1%
  14270. REM which pitch and accid
  14271. amplitudes%(count%) -= (12*(octave%-1))
  14272. CASE amplitudes%(count%) OF
  14273. WHEN 1 : pitches%(count%-1) = 50 + octave%
  14274. WHEN 2 : pitches%(count%-1) = 90 + octave%
  14275. WHEN 3 : pitches%(count%-1) = 150 + octave%
  14276. WHEN 4 : pitches%(count%-1) = 210 + octave%
  14277. WHEN 5 : pitches%(count%-1) = 250 + octave%
  14278. WHEN 6 : pitches%(count%-1) = 350 + octave%
  14279. WHEN 7 : pitches%(count%-1) = 390 + octave%
  14280. WHEN 8 : pitches%(count%-1) = 450 + octave%
  14281. WHEN 9 : pitches%(count%-1) = 490 + octave%
  14282. WHEN 10 : pitches%(count%-1) = 550 + octave%
  14283. WHEN 11 : pitches%(count%-1) = 610 + octave%
  14284. WHEN 12 : pitches%(count%-1) = 650 + octave%
  14285. ENDCASE
  14286. NEXT
  14287. PRINT'" Do you want to save this interval string?"
  14288. CASE GET$ OF
  14289. WHEN "Y","y" : PROCsaveintervalstring
  14290. OTHERWISE
  14291. ENDCASE
  14292. PROCinsertpitches
  14293. ENDIF
  14294. :
  14295. ENDPROC
  14296. :
  14297. REM**********************************************
  14298. :
  14299. DEF PROCsaveintervalstring
  14300. :
  14301. *Dir SDFS::RISCOSpi.$.CAC.Files
  14302. firstnaming$ = "n"
  14303. CLS
  14304. IF filenamestg$ = "" THEN
  14305. INPUT'" filename "filenamestg$
  14306. firstnaming$ = "y"
  14307. ENDIF
  14308. IF firstnaming$ = "n" THEN
  14309. PRINT'" as '";filenamestg$;"'?"
  14310. CASE GET$ OF
  14311. WHEN "N","n" : INPUT'" filename "filenamestg$
  14312. OTHERWISE
  14313. ENDCASE
  14314. ENDIF
  14315. :
  14316. channel = OPENOUT filenamestg$
  14317. PRINT#channel, numpitches%
  14318. PRINT#channel, tess%
  14319. PRINT#channel, numbannedpitches%
  14320. PRINT#channel, numbannedints%
  14321. PRINT#channel, transposer%
  14322. PRINT#channel, pitch$
  14323. PRINT#channel, accid$
  14324. PRINT#channel, saveoctave%
  14325. FOR a% = 1 TO numbannedpitches%
  14326. PRINT#channel, bannedpitches%(a%)
  14327. NEXT
  14328. FOR a% = 1 TO numbannedints%
  14329. FOR b% = 0 TO 2
  14330. PRINT#channel, bannedints%(a%,b%)
  14331. NEXT
  14332. NEXT
  14333. :
  14334. CLOSE#channel
  14335. *NoDir
  14336. :
  14337. ENDPROC
  14338. :
  14339. REM******************************************
  14340. :
  14341. DEF PROCloadintervalstring
  14342. :
  14343. *Dir SDFS::RISCOSpi.$.CAC.Files
  14344. INPUT'" filename "filenamestg$
  14345. channel = OPENIN filenamestg$
  14346. REPEAT
  14347. INPUT#channel, numpitches%
  14348. INPUT#channel, tess%
  14349. INPUT#channel, numbannedpitches%
  14350. INPUT#channel, numbannedints%
  14351. INPUT#channel, transposer%
  14352. INPUT#channel, pitch$
  14353. INPUT#channel, accid$
  14354. INPUT#channel, saveoctave%
  14355. FOR a% = 1 TO numbannedpitches%
  14356. INPUT#channel, bannedpitches%(a%)
  14357. NEXT
  14358. FOR a% = 1 TO numbannedints%
  14359. FOR b% = 0 TO 2
  14360. INPUT#channel, bannedints%(a%,b%)
  14361. NEXT
  14362. NEXT
  14363. UNTIL EOF#channel
  14364. CLOSE#channel
  14365. *NoDir
  14366. :
  14367. ENDPROC
  14368. :
  14369. REM**************************************
  14370. :
  14371. DEF PROCeditintervalstring
  14372. :
  14373. IF loadstring$ = "y" THEN PROCloadintervalstring
  14374. :
  14375. CLS
  14376. PRINT'" Alter the number of pitches?"
  14377. PRINT" (currently ";numpitches%;")"
  14378. CASE GET$ OF
  14379. WHEN "Y","y" :
  14380. INPUT'" How many pitches "numpitches%
  14381. ENDCASE
  14382. CLS
  14383. PRINT'" Alter tessitura and/or location?"
  14384. PRINT" (currently ";tess%;" semitones wide"
  14385. PRINT" with a bottom note of ";pitch$;accid$;saveoctave%;")"
  14386. CASE GET$ OF
  14387. WHEN "Y","y" :
  14388. INPUT'" The tessitura is how many semitones wide "tess%
  14389. PRINT'" The bottom pitch of the tessitura is ";
  14390. COLOUR 3
  14391. CASE GET$ OF
  14392. WHEN "C","c" : note% = 1 : PRINT "C" : pitch$ = "C"
  14393. WHEN "D","d" : note% = 3 : PRINT "D" : pitch$ = "D"
  14394. WHEN "E","e" : note% = 5 : PRINT "E" : pitch$ = "E"
  14395. WHEN "F","f" : note% = 6 : PRINT "F" : pitch$ = "F"
  14396. WHEN "G","g" : note% = 8 : PRINT "G" : pitch$ = "G"
  14397. WHEN "A","a" : note% = 10 : PRINT "A" : pitch$ = "A"
  14398. WHEN "B","b" : note% = 12 : PRINT "B" : pitch$ = "B"
  14399. ENDCASE
  14400. COLOUR 0
  14401. PRINT " Accidental ";
  14402. COLOUR 3
  14403. CASE GET$ OF
  14404. WHEN "1" : note% -= 1 : PRINT "flat" : accid$ = "flat"
  14405. WHEN "5" : PRINT "nat" : accid$ = "nat"
  14406. WHEN "9" : note% += 1 : PRINT "shrp" : accid$ = "shrp"
  14407. OTHERWISE VDU 7
  14408. ENDCASE
  14409. COLOUR 0
  14410. PRINT " Octave ";
  14411. COLOUR 3
  14412. octave% = EVAL(GET$) : saveoctave% = octave%
  14413. PRINT octave%
  14414. COLOUR 0
  14415. transposer% = note% + (12*(octave%-1)) - 1
  14416. OTHERWISE
  14417. ENDCASE
  14418. :
  14419. PRINT'" Alter the banning of pitches? "
  14420. IF numbannedpitches% = 0 THEN
  14421. PRINT" No pitches are currently banned "
  14422. ELSE
  14423. PRINT" Currently banned pitches are,"
  14424. PRINT" going up, starting at 0 -"
  14425. PRINT" "
  14426. VDU 14
  14427. FOR count% = 1 TO numbannedpitches%
  14428. PRINT " ";count%;". semitone ";bannedpitches%(count%)-1
  14429. NEXT
  14430. VDU 15
  14431. ENDIF
  14432. CASE GET$ OF
  14433. WHEN "Y","y" :
  14434. INPUT'" The number of banned pitches is now to be "numbannedpitches%
  14435. FOR count% = 1 TO numbannedpitches%
  14436. PRINT'" Alter banned pitch ";count%
  14437. CASE GET$ OF
  14438. WHEN "Y","y" :
  14439. PRINT '" Pitch ";count%;" is, going up,"
  14440. INPUT " semitone number what, starting at 0?"semitone%
  14441. bannedpitches%(count%) = semitone%+1
  14442. ENDCASE
  14443. NEXT
  14444. ENDCASE
  14445. CLS : VDU 14
  14446. PRINT'" Alter the banning of intervals?"
  14447. IF numbannedints% = 0 THEN
  14448. PRINT" No intervals are currently banned "
  14449. ELSE
  14450. VDU 28,20,43,70,15
  14451. PRINT" Currently banned intervals are -"
  14452. PRINT" "
  14453. FOR count% = 1 TO numbannedints%
  14454. IF bannedints%(count%,1) > 0 THEN COLOUR 131 ELSE COLOUR 191
  14455. 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"
  14456. 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"
  14457. 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"
  14458. NEXT
  14459. COLOUR 191
  14460. VDU 15
  14461. ENDIF
  14462. CASE GET$ OF
  14463. WHEN "Y","y" :
  14464. VDU 28,20,65,70,45
  14465. PRINT'" Alter the number of banned intervals?"
  14466. CASE GET$ OF
  14467. WHEN "Y","y" :
  14468. INPUT'" The number of banned intervals is now to be "numbannedints%
  14469. ENDCASE
  14470. FOR count% = 1 TO numbannedints%
  14471. PRINT'" Alter interval ";count%
  14472. CASE GET$ OF
  14473. WHEN "Y","y" :
  14474. PRINT'" Interval ";count%;" is how many semitones?"
  14475. PRINT" (NB intervals between 12 & 23 are "
  14476. INPUT" applied at all compounds) "bannedints%(count%,0)
  14477. PRINT'" And is banned at between a minimum"
  14478. INPUT" of how many notes from the last one "range%
  14479. INPUT" And a maximum of how many "range1%
  14480. bannedints%(count%,1) = range%
  14481. bannedints%(count%,2) = range1%
  14482. OTHERWISE
  14483. ENDCASE
  14484. NEXT
  14485. ENDCASE
  14486. :
  14487. stringattempts% = 0 : PROCintervalstring
  14488. :
  14489. ENDPROC
  14490. :
  14491. REM********************************************************
  14492. :
  14493. DEF PROCconvertpitch
  14494. :
  14495. CASE (pitch%DIV10^2) OF
  14496. WHEN 0 : note% = 1
  14497. WHEN 1 : note% = 3
  14498. WHEN 2 : note% = 5
  14499. WHEN 3 : note% = 6
  14500. WHEN 4 : note% = 8
  14501. WHEN 5 : note% = 10
  14502. WHEN 6 : note% = 12
  14503. ENDCASE
  14504. :
  14505. CASE ((pitch%DIV10)MOD10) OF
  14506. WHEN 1 : note% -= 1
  14507. WHEN 9 : note% += 1
  14508. OTHERWISE
  14509. ENDCASE
  14510. :
  14511. octave% = pitch%MOD10
  14512. note% = note% + (12*(octave%-1))
  14513. chunk% = 12 : compoundint% = compoundpitch%
  14514. ENDPROC
  14515. :
  14516. REM****************************************************
  14517. :
  14518. DEF PROCconvertquarter
  14519. :
  14520. CASE (pitch%DIV10^2) OF
  14521. WHEN 0 : note% = 2
  14522. WHEN 1 : note% = 6
  14523. WHEN 2 : note% = 10
  14524. WHEN 3 : note% = 12
  14525. WHEN 4 : note% = 16
  14526. WHEN 5 : note% = 20
  14527. WHEN 6 : note% = 24
  14528. ENDCASE
  14529. :
  14530. CASE ((pitch%DIV10)MOD10) OF
  14531. WHEN 1 : note% -= 2
  14532. WHEN 3 : note% -= 1
  14533. WHEN 7 : note% += 1
  14534. WHEN 9 : note% += 2
  14535. OTHERWISE
  14536. ENDCASE
  14537. :
  14538. octave% = pitch%MOD10
  14539. note% = note% + (24*(octave%-1))
  14540. chunk% = 24 : compoundint% = compoundquarter%
  14541. ENDPROC
  14542. ENDPROC
  14543. :
  14544. REM****************************************************
  14545. :
  14546. DEF PROCconverteighth
  14547. :
  14548. CASE (pitch%DIV10^2) OF
  14549. WHEN 0 : note% = 4
  14550. WHEN 1 : note% = 12
  14551. WHEN 2 : note% = 20
  14552. WHEN 3 : note% = 24
  14553. WHEN 4 : note% = 32
  14554. WHEN 5 : note% = 40
  14555. WHEN 6 : note% = 48
  14556. ENDCASE
  14557. :
  14558. CASE ((pitch%DIV10)MOD10) OF
  14559. WHEN 1 : note% -= 4
  14560. WHEN 2 : note% -= 3
  14561. WHEN 3 : note% -= 2
  14562. WHEN 4 : note% -= 1
  14563. WHEN 6 : note% += 1
  14564. WHEN 7 : note% += 2
  14565. WHEN 8 : note% += 3
  14566. WHEN 9 : note% += 4
  14567. OTHERWISE
  14568. ENDCASE
  14569. :
  14570. octave% = pitch%MOD10
  14571. note% = note% + (48*(octave%-1))
  14572. chunk% = 48 : compoundint% = compoundeighth%
  14573. ENDPROC
  14574. :
  14575. REM****************************************************
  14576. :
  14577. DEF PROCconvertcent
  14578. :
  14579. CASE (pitch%DIV10^2) OF
  14580. WHEN 0 : note% = 100
  14581. WHEN 1 : note% = 300
  14582. WHEN 2 : note% = 500
  14583. WHEN 3 : note% = 600
  14584. WHEN 4 : note% = 800
  14585. WHEN 5 : note% = 1000
  14586. WHEN 6 : note% = 1200
  14587. ENDCASE
  14588. :
  14589. CASE ((pitch%DIV10)MOD10) OF
  14590. WHEN 1 : note% -= 100
  14591. WHEN 2 : note% -= 75
  14592. WHEN 3 : note% -= 50
  14593. WHEN 4 : note% -= 25
  14594. WHEN 6 : note% += 25
  14595. WHEN 7 : note% += 50
  14596. WHEN 8 : note% += 75
  14597. WHEN 9 : note% += 100
  14598. OTHERWISE
  14599. ENDCASE
  14600. :
  14601. octave% = pitch%MOD10
  14602. note% = note% + (1200*(octave%-1)) + cent%
  14603. chunk% = 1200 : compoundint% = compoundcent%
  14604. ENDPROC
  14605. :
  14606. REM****************************************************
  14607. :
  14608. DEF PROCrandomnumber
  14609. :
  14610. PROCwindow(20,65,65,55)
  14611. CLS
  14612. :
  14613. IF rerun$ = "n" THEN
  14614. INPUT'" Return a random number between ? "ranx%
  14615. INPUT " and ? "rany%
  14616. ENDIF
  14617. diff% = (rany%-ranx%)+1
  14618. PRINT' RND(diff%)+(ranx%-1)
  14619. :
  14620. PRINT '" (press R to re-run, U for new number "
  14621. PRINT " or any key to continue) "
  14622. CASE GET$ OF
  14623. WHEN "U","u" : rerun$ = "n" : PROCrandomnumber
  14624. WHEN "R","r" : rerun$ = "y" : PROCrandomnumber
  14625. OTHERWISE PROCdisplay
  14626. ENDCASE
  14627. ENDPROC
  14628. :
  14629. REM****************************************************
  14630. :
  14631. DEF PROCcheckproportiontotal
  14632. :
  14633. proportiontotal$ = "notOK"
  14634. :
  14635. it% = 0
  14636. REPEAT
  14637. it% += 1
  14638. mplier = 0.5
  14639. REPEAT
  14640. mplier = mplier*2
  14641. testnum% = it%*mplier
  14642. posslownum = grouplength%/beatfactor%
  14643. WHILE posslownum > proportiontotal%
  14644. posslownum = posslownum/2
  14645. ENDWHILE
  14646. WHILE posslownum <= (proportiontotal%/2)
  14647. posslownum = posslownum*2
  14648. ENDWHILE
  14649. IF proportiontotal% = testnum% AND ((it%/testnum%)*posslownum*10^3)MOD10^3=0 THEN proportiontotal$ = "OK"
  14650. IF proportiontotal% = posslownum THEN proportiontotal$ = "OK"
  14651. UNTIL proportiontotal$ = "OK" OR testnum% > (grouplength%/defaultmindur%)
  14652. UNTIL proportiontotal$ = "OK" OR it% = given%
  14653. :
  14654. IF proportiontotal%>9999 THEN proportiontotal$ = "notOK"
  14655. :
  14656. ENDPROC
  14657. :
  14658. REM***************************************************
  14659. :
  14660. DEF PROCredpitches
  14661. :
  14662. tiss% = 0
  14663. REPEAT
  14664. tiss%+=1
  14665. toss% = 0 : dored$ = "n"
  14666. REPEAT
  14667. toss%+=1
  14668. IF (array%(startcell%,0,voice%)MOD10^3) = redpitches%(tiss%,toss%) THEN
  14669. IF printing$ = "n" THEN GCOL tiss%
  14670. dored$ = "y"
  14671. ENDIF
  14672. UNTIL dored$ = "y" OR toss% = numredpitches%(tiss%)
  14673. UNTIL dored$ = "y" OR tiss% = numcols%
  14674. ENDPROC
  14675. :
  14676. REM****************************************************
  14677. :
  14678. DEF PROCpitchstring2
  14679. :
  14680. IF easiermenus$ = "n" THEN PROCwindow(20,65,60,55) ELSE PROCwindow(20,65,60,42)
  14681. PRINT'" This function returns a string"
  14682. PRINT" of pitches drawn from a semitonal"
  14683. PRINT" cluster based on middle C,"
  14684. PRINT" with a controlled chance "
  14685. PRINT" of pitch repetitions"
  14686. INPUT'" How many semitones in the cluster "numsemis%
  14687. INPUT'" How many pitches in the string "numpitches%
  14688. PRINT'" Randomly occuring pitch repetitions "
  14689. PRINT" are included or not by what "
  14690. INPUT" percentage? "percentage%
  14691. :
  14692. x% = RND(numsemis%)
  14693. CASE x% OF
  14694. WHEN 1 : pitches%(0) = 54
  14695. WHEN 2 : pitches%(0) = 94
  14696. WHEN 3 : pitches%(0) = 154
  14697. WHEN 4 : pitches%(0) = 214
  14698. WHEN 5 : pitches%(0) = 254
  14699. WHEN 6 : pitches%(0) = 354
  14700. WHEN 7 : pitches%(0) = 394
  14701. WHEN 8 : pitches%(0) = 454
  14702. WHEN 9 : pitches%(0) = 514
  14703. WHEN 10 : pitches%(0) = 554
  14704. WHEN 11 : pitches%(0) = 614
  14705. WHEN 12 : pitches%(0) = 654
  14706. ENDCASE
  14707. :
  14708. FOR count% = 1 TO numpitches%-1
  14709. REPEAT
  14710. continue$ = "y"
  14711. x% = RND(numsemis%)
  14712. CASE x% OF
  14713. WHEN 1 : pitches%(count%) = 54
  14714. WHEN 2 : pitches%(count%) = 94
  14715. WHEN 3 : pitches%(count%) = 154
  14716. WHEN 4 : pitches%(count%) = 214
  14717. WHEN 5 : pitches%(count%) = 254
  14718. WHEN 6 : pitches%(count%) = 354
  14719. WHEN 7 : pitches%(count%) = 394
  14720. WHEN 8 : pitches%(count%) = 454
  14721. WHEN 9 : pitches%(count%) = 514
  14722. WHEN 10 : pitches%(count%) = 554
  14723. WHEN 11 : pitches%(count%) = 614
  14724. WHEN 12 : pitches%(count%) = 654
  14725. ENDCASE
  14726. :
  14727. IF pitches%(count%) = pitches%(count%-1) THEN
  14728. y% = RND(100)
  14729. IF y% <= percentage% THEN continue$ = "y" ELSE continue$ = "n"
  14730. ENDIF
  14731. UNTIL continue$ = "y"
  14732. NEXT
  14733. :
  14734. PROCinsertpitches
  14735. ENDPROC
  14736. :
  14737. REM***************************************
  14738. :
  14739. DEF PROCrhythmdefaults
  14740. shortirrat% = 240
  14741. longirrat% = 240
  14742. irratbeats% = 4
  14743. irratbeats1% = 4
  14744. mindur% = 60 : sieve = 960/mindur%
  14745. buffer% = 960/(sieve*2)
  14746. given% = 9
  14747. defaultsieve = 2
  14748. ENDPROC
  14749. :
  14750. REM******************************************
  14751. :
  14752. DEF PROCdisplayoptions
  14753. :
  14754. PROCwindow(2,72,97,1)
  14755. OFF
  14756. PRINT' " Do you want to (press to toggle)"
  14757. IF copytoend$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14758. IF seegraph$ = "y" THEN state1$ = "on" ELSE state1$ = "off"
  14759. PRINT' " See graph during accel/rit G (";state1$;") Allow copying to last note ^A (";state$;")"
  14760. IF seeinfo$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14761. IF nodelay$ = "y" THEN state1$ = "on" ELSE state1$ = "off"
  14762. PRINT' " See info on attacks A (";state$;") Pause for querying stave ^D (";state1$;")"
  14763. IF printinfo$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14764. IF askprevious$ = "y" THEN state1$ = "on" ELSE state1$ = "off"
  14765. PRINT' " get printout of info on attacks I (";state$;") Pause for previous position^F (";state1$;")"
  14766. IF seereorder$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14767. IF errorbeforedisplay$ = "n" THEN state1$ = "off" ELSE state1$ = "on"
  14768. PRINT' " Re-order attacks R (";state$;") Debugging mode ^G (";state1$;")"
  14769. IF seereorderx$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14770. PRINT' " Re-order attacks during accel/rit only ^R (";state$;")"
  14771. IF seeequalize$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14772. PRINT' " Equalize attacks E (";state$;") [press spacebar to continue] "
  14773. IF seeequalizex$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14774. PRINT' " Equalize attacks during accel/rit only ^E (";state$;")"
  14775. IF seerhythmicize$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14776. PRINT' " Rhythmicize attacks H (";state$;")"
  14777. IF reorderpitches$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14778. PRINT' " Re-order pitches using M/A/P ^P (";state$;")"
  14779. IF seequery$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14780. PRINT' " Query before adding new values to array Q (";state$;")"
  14781. PRINT' " Define parameter values during input P (";paraset$;")"
  14782. PRINT' " Accel/rit by total durat, endpoints or "
  14783. PRINT " first two notes displayed T/N/F (";funcinput$;")"
  14784. IF startfinishdurats$ = "Y" THEN state$ = "on" ELSE state$ = "off"
  14785. PRINT' " Accel/rit by start and finish durations S (";state$;")"
  14786. IF seeduration$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14787. PRINT' " See duration upto last displayed bar D (";state$;")"
  14788. IF quickcopy$ = "y" THEN state$ ="on" ELSE state$ = "off"
  14789. PRINT' " Quick copy B (";state$;")"
  14790. CASE seedurinbts$ OF
  14791. WHEN "y" : state$ = "on"
  14792. WHEN "stepped" : state$ = "stepped"
  14793. WHEN "n" : state$ = "off"
  14794. ENDCASE
  14795. PRINT' " See durations in micro-beats K (";state$;")"
  14796. CASE seedurincrots$ OF
  14797. WHEN "y" : state$ = "on"
  14798. WHEN "stepped" : state$ = "stepped"
  14799. WHEN "n" : state$ = "off"
  14800. ENDCASE
  14801. PRINT' " See durations in macro-beats C (";state$;")"
  14802. IF screenvoices$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14803. PRINT' " Voice numbers by 1/2/3 on screen V (";state$;")"
  14804. IF ampoptions$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14805. PRINT' " Use advanced amplitudes options O (";state$;")"
  14806. PRINT' " Double v/^ moves down/up by 3/10 staves Z (";screenmovesby%;")"
  14807. CASE setalong$ OF
  14808. WHEN "y" : state$ = "A/R"
  14809. WHEN "n" : state$ = "quick"
  14810. WHEN "playnovoices" : state$ = "play"
  14811. ENDCASE
  14812. PRINT' " 1,2 = A/R start/quickdisplay/play vces J (";state$;")"
  14813. CASE envelopedata$ OF
  14814. WHEN "none" : stage$ = "neither"
  14815. WHEN "percentage" : stage$ = "%'s"
  14816. WHEN "marker" : stage$ = "indicators"
  14817. ENDCASE
  14818. PRINT' " See envelope %'s/indicators/neither L (";stage$;")"
  14819. IF askaboutpitches$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14820. PRINT' " Query if pitches all the same M (";state$;")"
  14821. IF usebottomstave$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14822. PRINT' " Group of pitches fills bottom stave U (";state$;")"
  14823. CASE sequalssection$ OF
  14824. WHEN "y" : state$ = "sect"
  14825. WHEN "n" : state$ = "next"
  14826. ENDCASE
  14827. PRINT' " Copy from next voices/Go to section ^S (";state$;")"
  14828. IF addpitches$ = "y" THEN state$ = "pitch" ELSE state$ = "env"
  14829. PRINT' " ^Y = Add pitches/edit envelope Y (";state$;")"
  14830. IF squarebracket$ = "remarks" THEN state$ = "remarks" ELSE state$ = "copy +"
  14831. PRINT' " [] keys = move remarks/add to copydown [ (";state$;")"
  14832. IF queryalong$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14833. PRINT' " Accel/rit asks for starting attack ] (";state$;")"
  14834. PRINT' " Reset no.staves ^/v moves up/down by ~"
  14835. IF singlepitch$ = "m" THEN state$ = "multiple" ELSE state$ = "single"
  14836. PRINT' " Y = single/multiple pitch entry @ (";state$;")"
  14837. IF namestaves$ = "nameone" THEN state$ = "rename" ELSE state$ = "delete"
  14838. PRINT' " ^V = rename/delete batch of voice names^V (";state$;")"
  14839. IF usebeep$ = "n" THEN state$ = "assnd" ELSE state$ = "beep"
  14840. PRINT' " Play with beep or assigned voices ^B (";state$;")"
  14841. IF onlycontent$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14842. PRINT' " Display only voices with content ^C (";state$;")"
  14843. PRINT' " Show list of voices with content ^L"
  14844. :
  14845. CASE GET$ OF
  14846. :
  14847. WHEN "g" :
  14848. IF seegraph$ = "y" THEN seegraph$ = "n" ELSE seegraph$ = "y"
  14849. WHEN "a" :
  14850. IF seeinfo$ = "y" THEN seeinfo$ = "n" ELSE seeinfo$ = "y"
  14851. WHEN "A" :
  14852. IF copytoend$ = "y" THEN copytoend$ = "n" ELSE copytoend$ = "y"
  14853. WHEN "I","i" :
  14854. IF printinfo$ = "y" THEN printinfo$ = "n" ELSE printinfo$ = "y"
  14855. WHEN "r" :
  14856. IF seereorder$ = "y" THEN
  14857. seereorder$ = "n"
  14858. seereordery$ = "n"
  14859. ELSE
  14860. seereorder$ = "y"
  14861. seereorderx$ = "y"
  14862. seereordery$ = "y"
  14863. ENDIF
  14864. WHEN "R" :
  14865. IF seereorderx$ = "y" THEN
  14866. seereorderx$ = "n"
  14867. seereordery$ = "n"
  14868. ELSE seereorderx$ = "y"
  14869. ENDIF
  14870. WHEN "e" :
  14871. IF seeequalize$ = "y" THEN
  14872. seeequalize$ = "n"
  14873. seeequalizey$ = "n"
  14874. ELSE
  14875. seeequalize$ = "y"
  14876. seeequalizex$ = "y"
  14877. seeequalizey$ = "y"
  14878. ENDIF
  14879. WHEN "E" :
  14880. IF seeequalizex$ = "y" THEN
  14881. seeequalizex$ = "n"
  14882. seeequalizey$ = "n"
  14883. ELSE seereorderx$ = "y"
  14884. ENDIF
  14885. WHEN "P" :
  14886. IF reorderpitches$ = "y" THEN reorderpitches$ = "n" ELSE reorderpitches$ = "y"
  14887. WHEN "H","h" :
  14888. IF seerhythmicize$ = "y" THEN seerhythmicize$ = "n" ELSE seerhythmicize$ = "y"
  14889. WHEN "Q","q" :
  14890. IF seequery$ = "y" THEN seequery$ = "n" ELSE seequery$ = "y"
  14891. WHEN "p" :
  14892. IF paraset$ = "on" THEN paraset$ = "off" ELSE paraset$ = "on"
  14893. WHEN "T","t" :
  14894. funcinput$ = "durat"
  14895. WHEN "N","n" :
  14896. funcinput$ = "points"
  14897. WHEN "f" :
  14898. funcinput$ = "displayed"
  14899. WHEN "s" :
  14900. IF startfinishdurats$ = "Y" THEN startfinishdurats$ = "N" ELSE startfinishdurats$ = "Y"
  14901. WHEN "d" :
  14902. IF seeduration$ = "y" THEN
  14903. seeduration$ = "n" : PROCdisplay
  14904. ELSE seeduration$ = "y" : PROCdisplay
  14905. ENDIF
  14906. WHEN "b" :
  14907. IF quickcopy$ = "n" THEN quickcopy$ = "y" ELSE quickcopy$ = "n"
  14908. WHEN "K","k" :
  14909. IF seedurinbts$ = "n" THEN
  14910. seedurinbts$ = "y" : seedurincrots$ = "n" : PROCdisplay
  14911. ENDIF
  14912. IF seedurinbts$ = "y" THEN
  14913. seedurinbts$ = "stepped" : seedurincrots$ = "n" : PROCdisplay
  14914. ENDIF
  14915. IF seedurinbts$ = "stepped" THEN
  14916. seedurinbts$ = "n": PROCdisplay
  14917. ENDIF
  14918. WHEN "c" :
  14919. IF seedurincrots$ = "n" THEN
  14920. seedurincrots$ = "y" : seedurinbts$ = "n" : PROCdisplay
  14921. ENDIF
  14922. IF seedurincrots$ = "y" THEN
  14923. seedurincrots$ = "stepped" : seedurinbts$ = "n" : PROCdisplay
  14924. ENDIF
  14925. IF seedurincrots$ = "stepped" THEN
  14926. seedurincrots$ = "n" : PROCdisplay
  14927. ENDIF
  14928. WHEN "v" :
  14929. IF screenvoices$ = "n" THEN screenvoices$ = "y" ELSE screenvoices$ = "n" : PROCdisplay
  14930. WHEN "V" :
  14931. IF namestaves$ = "nameone" THEN namestaves$ = "deletemany" ELSE namestaves$ = "nameone"
  14932. WHEN "O","o" :
  14933. IF ampoptions$ = "n" THEN ampoptions$ = "y" ELSE ampoptions$ = "n" : PROCdisplay
  14934. WHEN "z","Z" : IF screenmovesby% = 10 THEN screenmovesby% = 3 ELSE screenmovesby% = 10 : PROCdisplay
  14935. WHEN "J","j" :
  14936. CASE setalong$ OF
  14937. WHEN "y" : setalong$ = "n"
  14938. WHEN "n" : setalong$ = "playnovoices"
  14939. WHEN "playnovoices" : setalong$ = "y"
  14940. ENDCASE
  14941. WHEN "l" :
  14942. CASE envelopedata$ OF
  14943. WHEN "none" : envelopedata$ = "percentage"
  14944. WHEN "percentage" : envelopedata$ = "marker"
  14945. WHEN "marker" : envelopedata$ = "none"
  14946. ENDCASE
  14947. WHEN "M","m" :
  14948. IF askaboutpitches$ = "y" THEN askaboutpitches$ = "n" ELSE askaboutpitches$ = "y"
  14949. WHEN "U","u" :
  14950. IF usebottomstave$ = "y" THEN usebottomstave$ = "n" ELSE usebottomstave$ = "y"
  14951. IF usebottomstave$ = "y" THEN askaboutpitches$ = "n" ELSE askaboutpitches$ = "y"
  14952. WHEN "S" :
  14953. CASE sequalssection$ OF
  14954. WHEN "y" : sequalssection$ = "n"
  14955. WHEN "n" : sequalssection$ = "y"
  14956. ENDCASE
  14957. WHEN "y","Y" :
  14958. IF addpitches$ = "y" THEN addpitches$ = "n" ELSE addpitches$ = "y"
  14959. WHEN "[" :
  14960. IF squarebracket$ = "remarks" THEN squarebracket$ = "addten" ELSE squarebracket$ = "remarks"
  14961. WHEN "]" :
  14962. IF queryalong$ = "y" THEN queryalong$ = "n" ELSEqueryalong$ = "y"
  14963. WHEN "~" :
  14964. CLS
  14965. INPUT " pressing ^ or v movesup/down by how many staves "updisplay%
  14966. WHEN "@" :
  14967. IF singlepitch$ = "s" THEN singlepitch$ = "m" ELSE singlepitch$ = "s"
  14968. WHEN "B" :
  14969. IF usebeep$ = "y" THEN usebeep$ = "n" ELSE usebeep$ = "y"
  14970. WHEN "C" :
  14971. IF onlycontent$ = "y" THEN onlycontent$ = "n" ELSE onlycontent$ = "y"
  14972. PROCdisplayonlycontent
  14973. WHEN "L" : PROCcontentonlylist
  14974. WHEN "D" : IF nodelay$ = "y" THEN nodelay$ = "n" ELSE nodelay$ = "y"
  14975. WHEN "F" : IF askprevious$ = "y" THEN askprevious$ = "n" ELSE askprevious$ = "y"
  14976. WHEN "G" : IF errorbeforedisplay$ = "n" THEN errorbeforedisplay$ = "debug" ELSE errorbeforedisplay$ = "n"
  14977. :
  14978. OTHERWISE
  14979. :
  14980. ENDCASE
  14981. ON
  14982. :
  14983. ENDPROC
  14984. :
  14985. REM******************************************************************
  14986. :
  14987. DEF PROCremarks
  14988. :
  14989. INPUT'" Which bar "baar%
  14990. PRINT" line 1 or 2 "
  14991. CASE GET$ OF
  14992. WHEN "1" : line% = 0
  14993. WHEN "2" : line% = 1
  14994. OTHERWISE VDU7 : PROCremarks
  14995. ENDCASE
  14996. INPUT " What are the remarks "remarks$
  14997. remarks$(baar%,line%) = remarks$
  14998. :
  14999. ENDPROC
  15000. :
  15001. REM********************************************************************
  15002. :
  15003. DEF PROCwindow(a%,b%,c%,d%)
  15004. :
  15005. bigger$ = "n"
  15006. IF a% < biga% THEN
  15007. biga% = a% : bigger$ = "y"
  15008. ENDIF
  15009. IF b% > bigb% THEN
  15010. bigb% = b% : bigger$ = "y"
  15011. ENDIF
  15012. IF c% > bigc% THEN
  15013. bigc% = c% : bigger$ = "y"
  15014. ENDIF
  15015. IF d% < bigd% THEN
  15016. bigd% = d% : bigger$ = "y"
  15017. ENDIF
  15018. :
  15019. IF box$ = "n" THEN
  15020. box$ = "y"
  15021. VDU 28,a%-1,b%+1,c%+1,d%-1 : COLOUR 131 : CLS
  15022. VDU 28,a%,b%,c%,d% : COLOUR 0 : COLOUR 191 : CLS : OFF
  15023. ELSE
  15024. IF bigger$ = "y" THEN
  15025. VDU 28,a%-1,b%+1,c%+1,d%-1 : COLOUR 131 : CLS
  15026. ENDIF
  15027. CLS : VDU 28,a%,b%,c%,d% : COLOUR 0 : COLOUR 191 : CLS : OFF
  15028. ENDIF
  15029. :
  15030. ENDPROC
  15031. :
  15032. REM***********************************************
  15033. :
  15034. DEF PROCslave
  15035. REM this program returns not simply a random
  15036. REM percentage (tends to be too high) nor
  15037. REM a random percentage of a random percentage
  15038. REM (tends to be too low), but something
  15039. REM inbetween, averaging not 50% nor 25% but 37.5%
  15040. :
  15041. IF quickslave$ = "n" THEN
  15042. IF easiermenus$ = "n" THEN PROCwindow(20,69,96,55) ELSE PROCwindow(20,69,96,42)
  15043. PRINT''" To begin, display the Mastervoice's two half-phases first on the screen."
  15044. PRINT " This function then generates a Slavevoice's associated two half-phases,"
  15045. PRINT " their random starting and ending points averaging 37.5% and 62.5% of the"
  15046. PRINT " MV half-phases respectively (other averages tend to be too high or too low)"
  15047. PRINT '" Alternatively, percentages may be determined - "
  15048. PRINT " press D for determined or R for random now "
  15049. CASE GET$ OF
  15050. WHEN "D","d" : slavemethod$ = "determined"
  15051. OTHERWISE slavemethod$ = "random"
  15052. ENDCASE
  15053. ENDIF
  15054. :
  15055. test$ = "n"
  15056. PROCinput
  15057. :
  15058. ENDPROC
  15059. :
  15060. DEF PROCinput
  15061. REM procedure for getting first 2 attacks displayed
  15062. IF quickslave$ = "y" THEN
  15063. IF easiermenus$ = "n" THEN PROCwindow(20,67,49,55) ELSE PROCwindow(20,67,49,42)
  15064. ENDIF
  15065. INPUT '" Mastervoice is which voice "voice%
  15066. IF voice% = 0 THEN voice% = savevoice%
  15067. IF voice% <> 0 THEN savevoice% = voice%
  15068. voice% -= 1
  15069. startingbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  15070. startbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  15071. midbar% = array%(holdstartcell%(voice%)+1+along%,0,voice%)DIV10^6
  15072. midbeat% = (array%(holdstartcell%(voice%)+1+along%,0,voice%)MOD10^6)DIV10^3
  15073. endbar% = array%(holdstartcell%(voice%)+2+along%,0,voice%)DIV10^6
  15074. endbeat% = (array%(holdstartcell%(voice%)+2+along%,0,voice%)MOD10^6)DIV10^3
  15075. startpoint% = startingbar%*960
  15076. startpoint% += startbeat%
  15077. midpoint% = midbar%*960
  15078. midpoint% += midbeat%
  15079. endpoint% = endbar% * 960
  15080. endpoint% += endbeat%
  15081. PROCprogram
  15082. ENDPROC
  15083. :
  15084. DEF PROCprogram
  15085. IF test$ = "y" THEN number% = 1000 ELSE number% = 1
  15086. total% = 0 : total1% = 0
  15087. FOR count% = 1 TO number%
  15088. firstdur% = midpoint%-startpoint%
  15089. seconddur% = endpoint%-midpoint%
  15090. REPEAT
  15091. IF slavemethod$ = "determined" THEN
  15092. INPUT'" Percentage for first half-phase is..."percentage%
  15093. ELSE
  15094. c% = RND(100)
  15095. percentage% = RND(100) * (RND(101-c%)+(c%-1)) / 100
  15096. ENDIF
  15097. UNTIL percentage% >= lowerstart% AND percentage% <= upperstart%
  15098. SVfirstdur% = firstdur%*percentage%/100
  15099. REPEAT
  15100. IF slavemethod$ = "determined" THEN
  15101. INPUT'" Percentage for second half-phase is..."percentage1%
  15102. ELSE
  15103. c% = RND(100)
  15104. percentage1% = 100 - (RND(100) * (RND(101-c%)+(c%-1)) / 100)
  15105. ENDIF
  15106. UNTIL percentage1% >= lowerend% AND percentage1% <= upperend%
  15107. SVseconddur% = seconddur%*percentage1%/100
  15108. :
  15109. SVtotaldur% = firstdur% - SVfirstdur% + SVseconddur%
  15110. SVthirddur% = SVtotaldur%/(firstdur%+seconddur%)*firstdur%
  15111. :
  15112. SVbar% = startingbar%
  15113. SVbeat% = startbeat% + SVfirstdur%
  15114. PROCbeats
  15115. SVstartbar% = SVbar% : SVstartbeat% = SVbeat%
  15116. :
  15117. SVbar% = SVstartbar%
  15118. SVbeat% = SVstartbeat% + SVthirddur%
  15119. PROCbeats
  15120. SVmidbar% = SVbar% : SVmidbeat% = SVbeat%
  15121. :
  15122. SVbar% = midbar%
  15123. SVbeat% = midbeat% + SVseconddur%
  15124. PROCbeats
  15125. SVendbar% = SVbar% : SVendbeat% = SVbeat%
  15126. :
  15127. IF quickslave$ = "y" THEN
  15128. IF easiermenus$ = "n" THEN PROCwindow(20,69,82,55) ELSE PROCwindow(20,69,82,42)
  15129. ENDIF
  15130. CLS
  15131. PRINT'" The Slavevoice's first half-phase starts at ";SVstartbar%;".";SVstartbeat%;" (";percentage%;"%)"
  15132. PRINT '" and ends at ";SVmidbar%;".";SVmidbeat%
  15133. PRINT '" And its second half-phase ends at ";SVendbar%;".";SVendbeat%;" (";percentage1%;"%)"
  15134. total% += percentage% : total1% += percentage1%
  15135. NEXT
  15136. IF test$ = "y" THEN
  15137. PRINT''" Average 1st percent = ";total%/1000
  15138. PRINT" Average second = ";total1%/1000
  15139. PRINT'" to continue press C"
  15140. CASE GET$ OF
  15141. WHEN"C","c" : PROCdisplay
  15142. ENDCASE
  15143. ENDIF
  15144. PRINT''" Do you want to add this slave voice to the array?"
  15145. PRINT" (or, to test average percentages out of 1000 throws, press P"
  15146. PRINT" or, to set limits for the random percentages, press L)"
  15147. CASE GET$ OF
  15148. WHEN"Y","y" :
  15149. WHEN"N","n" : PROCdisplay
  15150. WHEN "P","p" : test$ = "y" : PROCprogram
  15151. WHEN "L","l" : PROClimits
  15152. ENDCASE
  15153. attacks1%(1) = ((SVmidbar%*960)+SVmidbeat%) - ((SVstartbar%*960)+SVstartbeat%)
  15154. attacks1%(2) = ((SVendbar%*960)+SVendbeat%) - ((SVstartbar%*960)+SVstartbeat%)
  15155. funcbar% = SVstartbar% : funcbeat% = SVstartbeat%
  15156. method$ = "raw" : quiz$ = "no" : manyattacks% = 3
  15157. PROCinsertattacks
  15158. ENDPROC
  15159. :
  15160. DEF PROCbeats
  15161. WHILE SVbeat% > 959
  15162. SVbeat% -= 960 : SVbar% += 1
  15163. ENDWHILE
  15164. ENDPROC
  15165. :
  15166. DEF PROClimits
  15167. INPUT'" Give the lower limit for SV's start-point, between 1% & 99% "lowerstart%
  15168. INPUT " Give the upper limit for SV's start-point, between 1% & 99% "upperstart%
  15169. INPUT'" Give the lower limit for SV's end-point, between 1% & 99% "lowerend%
  15170. PRINT " Give the upper limit for SV's end-point, between 1% & 99% "
  15171. INPUT " (these limits last for the session) "upperend%
  15172. PROCdisplay
  15173. ENDPROC
  15174. :
  15175. ENDPROC
  15176. :
  15177. REM*******************************************
  15178. :
  15179. DEF PROCprintattacks
  15180. :
  15181. durat% = 0
  15182. MODE 16 : COLOUR 0 : COLOUR 191 : CLS
  15183. PRINT '" The group of attacks will be at "
  15184. PRINT" "
  15185. PRINT TAB(8) "ATTACKS AT";
  15186. PRINT TAB(30) "DURATIONS";
  15187. PRINT TAB(54) "RATIOS"
  15188. tal% = 0 : printnum% = 0
  15189. FOR count% = 0 TO (manyattacks%-1)
  15190. tal% += 1
  15191. PRINT TAB(1)(attacks2%(count%))DIV10^3;" ";
  15192. PRINT ;(attacks2%(count%))MOD10^3;
  15193. IF count% > 0 THEN
  15194. durat1% = durat%
  15195. durat% = (attacks2%(count%)MOD10^3)-(attacks2%(count%-1)MOD10^3)
  15196. addon% = ((attacks2%(count%)DIV(10^3))-(attacks2%(count%-1)DIV(10^3)))*960
  15197. durat% = durat% + addon%
  15198. PRINT TAB(26) durat%;
  15199. IF count%>1 THEN
  15200. IF direction$ = "rit" THEN ratio = durat%/durat1% ELSE ratio = durat1%/durat%
  15201. CASE ratio OF
  15202. WHEN 0.5 : PRINT TAB(52) "0.5"
  15203. WHEN 1.0 : PRINT TAB(52) "1.0"
  15204. WHEN 1.5 : PRINT TAB(52) "1.5"
  15205. WHEN 2.0 : PRINT TAB(52) "2.0"
  15206. WHEN 2.5 : PRINT TAB(52) "2.5"
  15207. OTHERWISE PRINT TAB(52) ratio
  15208. ENDCASE
  15209. ENDIF
  15210. ENDIF
  15211. IF tal% > 54 AND printinfo$ = "y" THEN
  15212. printnum% += 1
  15213. MOVE 0,0
  15214. MOVE 1800,1223
  15215. *SGet mysprite
  15216. OSCLI "SSave SDFS::RISCOSpi.$.CAC.Printing."+STR$(printnum%)
  15217. tal% = 0
  15218. ENDIF
  15219. NEXT
  15220. IF printinfo$ = "y" THEN
  15221. MOVE 0,0
  15222. MOVE 1800,1223
  15223. *SGet mysprite
  15224. OSCLI "SSave SDFS::RISCOSpi.$.CAC.Printing."+STR$(printnum%+1)
  15225. ENDIF
  15226. :
  15227. PROCdisplay
  15228. :
  15229. ENDPROC
  15230. :
  15231. REM*************************************************
  15232. :
  15233. DEF PROCnamestaves
  15234. :
  15235. INPUT'" Rename which voice "thevoice%
  15236. INPUT' " calling it what "thename$
  15237. insts$(thevoice%,0) = thename$
  15238. :
  15239. ENDPROC
  15240. :
  15241. REM**************************************************
  15242. :
  15243. DEF PROCdeletenames
  15244. :
  15245. INPUT'" Delete names between voice "firstvoice%
  15246. INPUT " and which voice "secondvoice%
  15247. FOR count% = firstvoice% TO secondvoice%
  15248. insts$(count%,0) = ""
  15249. NEXT
  15250. :
  15251. ENDPROC
  15252. :
  15253. REM***************************************************
  15254. :
  15255. DEF PROCcopyrhythm
  15256. :
  15257. REM copies disarray data from one voice to another directly
  15258. :
  15259. CLS
  15260. INPUT'" Copy rhythm from voice "fromvoice%
  15261. INPUT'" to voice "tovoice%
  15262. INPUT'" the passage starting at bar "frombar%
  15263. INPUT'" and ending with bar "tobar%
  15264. INPUT'" the copy to start at bar "copytobar%
  15265. diff% = copytobar% - frombar%
  15266. FOR count% = frombar% TO tobar%
  15267. disarray%(count%+diff%,0,tovoice%-1) = disarray%(count%,0,fromvoice%-1)
  15268. disarray%(count%+diff%,1,tovoice%-1) = disarray%(count%,1,fromvoice%-1)
  15269. disarray%(count%+diff%,2,tovoice%-1) = disarray%(count%,2,fromvoice%-1)
  15270. disarray%(count%+diff%,3,tovoice%-1) = disarray%(count%,3,fromvoice%-1)
  15271. NEXT
  15272. :
  15273. PROCdisplay
  15274. :
  15275. ENDPROC
  15276. :
  15277. REM****************************************************
  15278. :
  15279. DEF PROCquantize
  15280. :
  15281. FOR count% = 0 TO manyattacks%-1
  15282. :
  15283. proceed1$ = "yes"
  15284. proceed2$ = "yes"
  15285. REM routine to illimunate from quantizing attacks closer than 120 bts to adjacent attacks
  15286. IF count% > 0 THEN
  15287. value1% = (attacks2%(count%)MOD10^3) + ((attacks2%(count%)DIV10^3)*960)
  15288. value2% = (attacks2%(count%-1)MOD10^3) + ((attacks2%(count%-1)DIV10^3)*960)
  15289. IF (value1% - value2%) > 120 THEN proceed1$ = "yes" ELSE proceed1$ = "no"
  15290. ENDIF
  15291. :
  15292. IF count%<(manyattacks%-1) THEN
  15293. value1% = (attacks2%(count%)MOD10^3) + ((attacks2%(count%)DIV10^3)*960)
  15294. value2% = (attacks2%(count%+1)MOD10^3) + ((attacks2%(count%+1)DIV10^3)*960)
  15295. IF (value2% - value1%) > 120 THEN proceed2$ = "yes" ELSE proceed2$ = "no"
  15296. ENDIF
  15297. :
  15298. IF proceed1$ = "yes" AND proceed2$ = "yes" THEN
  15299. :
  15300. beat% = attacks2%(count%)MOD10^3
  15301. :
  15302. IF beat%>900 AND beat%<960 THEN
  15303. IF beat%<930 THEN
  15304. attacks2%(count%) = (attacks2%(count%)-beat%+900)
  15305. ELSE
  15306. attacks2%(count%) = (attacks2%(count%)-beat%+1000)
  15307. attacks3%(count%)+= 1000
  15308. ENDIF
  15309. ENDIF
  15310. :
  15311. IF beat%>0 AND beat%<60 THEN
  15312. IF beat%<31 THEN
  15313. attacks2%(count%)-=beat%
  15314. ELSE
  15315. attacks2%(count%) = (attacks2%(count%)-beat%+60)
  15316. ENDIF
  15317. ENDIF
  15318. :
  15319. IF beat%>420 AND beat%<480 THEN
  15320. IF beat%<430 THEN
  15321. attacks2%(count%)= (attacks2%(count%)-beat%+420)
  15322. ELSE
  15323. attacks2%(count%) = (attacks2%(count%)-beat%+480)
  15324. ENDIF
  15325. ENDIF
  15326. :
  15327. IF beat%>480 AND beat%<540 THEN
  15328. IF beat%<511 THEN
  15329. attacks2%(count%)= (attacks2%(count%)-beat%+480)
  15330. ELSE
  15331. attacks2%(count%) = (attacks2%(count%)-beat%+540)
  15332. ENDIF
  15333. ENDIF
  15334. :
  15335. ENDIF
  15336. :
  15337. NEXT
  15338. :
  15339. ENDPROC
  15340. :
  15341. REM**************************************************************
  15342. :
  15343. DEF PROCreleases
  15344. :
  15345. IF easiermenus$ = "n" THEN PROCwindow(20,69,64,55) ELSE PROCwindow(20,69,64,42)
  15346. CLS
  15347. copymove$ = "C"
  15348. :
  15349. IF quickcopy$ = "n" THEN
  15350. PRINT'" Create envelope points for which voice? "
  15351. INPUT'" (0 = top) "voice%
  15352. IF voice% = 0 THEN PROCpressenter
  15353. voice% -= 1
  15354. INPUT'" Starting at bar "copystartbar%
  15355. holdbar% = copystartbar%
  15356. INPUT'" beat "beats%
  15357. PROCalterbeats : copystartbeat% = beats%
  15358. holdbeat% = copystartbeat%
  15359. IF justone$ = "n" THEN
  15360. PRINT'" Ending at bar "
  15361. INPUT'" (for last type 0) "copyendbar%
  15362. IF copyendbar% > 0 THEN
  15363. INPUT '" beat "beats%
  15364. PROCalterbeats : copyendbeat% = beats%
  15365. ENDIF
  15366. ELSE
  15367. copyendbar% = copystartbar%
  15368. copyendbeat% = copystartbeat%
  15369. ENDIF
  15370. :
  15371. ELSE
  15372. :
  15373. PRINT'" Create envelope points for which voice? "
  15374. INPUT '" (0 = top) "voice%
  15375. IF voice% = 0 THEN PROCpressenter
  15376. voice% -= 1
  15377. INPUT '" note number (for 1 press 0) "along%
  15378. IF along% = 0 THEN along% = 1
  15379. along%-=1
  15380. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  15381. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  15382. holdbar% = copystartbar%
  15383. holdbeat% = copystartbeat%
  15384. IF justone$ = "n" THEN
  15385. PRINT'" to note number "
  15386. INPUT'" (for last type 0) "along%
  15387. IF along% = 0 THEN
  15388. copyendbar% = 0
  15389. ELSE
  15390. along%-=1
  15391. copyendbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  15392. copyendbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  15393. ENDIF
  15394. ELSE
  15395. copyendbar% = copystartbar%
  15396. copyendbeat% = copystartbeat%
  15397. ENDIF
  15398. ENDIF
  15399. :
  15400. :
  15401. value% = (copystartbar%*10^3)+copystartbeat%
  15402. IF value% <= array%(0,0,voice%)DIV10^3 THEN
  15403. startatcell% = 0
  15404. ELSE
  15405. PROCsearch(value%)
  15406. startatcell% = startcell%
  15407. ENDIF
  15408. IF copyendbar% = 0 THEN
  15409. endatcell% = numusedcells%(voice%) - 1
  15410. ELSE
  15411. value% = (copyendbar%*10^3)+copyendbeat%
  15412. IF value% >= array%(numusedcells%(voice%)-1,0,voice%)DIV10^3 THEN
  15413. endatcell% = numusedcells%(voice%) - 1
  15414. ELSE
  15415. PROCsearch(value%)
  15416. IF shunt$ = "N" THEN endatcell% = startcell% ELSE endatcell% = startcell% - 1
  15417. ENDIF
  15418. ENDIF
  15419. :
  15420. manyattacks% = endatcell% - startatcell% + 1
  15421. REM create 'gap' between beat-of-bar and first actual attack
  15422. carrybars% = (array%(startatcell%,0,voice%)DIV10^6)-copystartbar%
  15423. carrybeats% = ((array%(startatcell%,0,voice%)DIV10^3)MOD10^3)-copystartbeat%
  15424. attacks1%(0) = (carrybars%*960)+carrybeats%
  15425. :
  15426. FOR count% = 0 TO (manyattacks%-1)
  15427. IF count% > 0 THEN
  15428. carrybars% = (array%(startatcell%+count%,0,voice%)DIV10^6)-(array%(startatcell%+count%-1,0,voice%)DIV10^6)
  15429. carrybeats% = ((array%(startatcell%+count%,0,voice%)DIV10^3)MOD10^3)-((array%(startatcell%+count%-1,0,voice%)DIV10^3)MOD10^3)
  15430. attacks1%(count%) = attacks1%(count%-1) + ((carrybars%*960)+carrybeats%)
  15431. ENDIF
  15432. :
  15433. pitches%(count%) = array%(startatcell%+count%,0,voice%)MOD10^3
  15434. dur% = (array%(startatcell%+count%,1,voice%)DIV10)MOD10^3
  15435. brrr% = array%(startatcell%+count%,0,voice%)DIV10^6 : PROCreconvertdur
  15436. durations%(count%) = dur%
  15437. NEXT
  15438. :
  15439. counter% = -1
  15440. FOR count% = 0 TO (manyattacks%-1)
  15441. :
  15442. counter% += 1
  15443. gliss1% = (array%(startatcell%+count%,1,voice%)DIV10^4)MOD10^2 : gliss1% = 50-gliss1%
  15444. gliss2% = (array%(startatcell%+count%,1,voice%)DIV10^6)MOD10^2 : gliss2% = 50 - gliss2%
  15445. gliss3% = array%(startatcell%+count%,1,voice%)DIV10^8 : gliss3% = 10 - gliss3%
  15446. note% = pitches%(count%)DIV10^2
  15447. accid% = (pitches%(count%)DIV10)MOD10
  15448. oct% = pitches%(count%)MOD10
  15449. :
  15450. ph1% = ((array%(startatcell%+count%,2,voice%))DIV10^5)MOD10^2
  15451. IF ph1% <> 0 THEN
  15452. envattacks%(counter%) = attacks1%(count%)+(durations%(count%)*ph1%/100)
  15453. gliss% = gliss1%
  15454. IF gliss% <> 0 THEN
  15455. PROCglisspitches
  15456. envpitches%(counter%) = (note1%*100)+(accid1%*10)+oct1%
  15457. ELSE
  15458. envpitches%(counter%) = (note%*100)+(accid%*10)+oct%
  15459. ENDIF
  15460. :
  15461. ENDIF
  15462. :
  15463. ph2% = (array%(startatcell%+count%,2,voice%))DIV10^7
  15464. IF ph2% <> 0 THEN
  15465. counter% += 1
  15466. envattacks%(counter%) = attacks1%(count%)+(durations%(count%)*ph2%/100)
  15467. gliss% = gliss1% + gliss2%
  15468. IF gliss% <> 0 THEN
  15469. PROCglisspitches
  15470. envpitches%(counter%) = (note1%*100)+(accid1%*10)+oct1%
  15471. ELSE
  15472. envpitches%(counter%) = (note%*100)+(accid%*10)+oct%
  15473. ENDIF
  15474. :
  15475. ENDIF
  15476. :
  15477. IF ph1% <> 0 THEN counter% += 1
  15478. envattacks%(counter%) = attacks1%(count%)+durations%(count%)
  15479. IF ph1% = 0 THEN gliss% = gliss1%
  15480. IF ph1% <> 0 AND ph2% = 0 THEN gliss% = gliss1% + gliss2%
  15481. IF ph2% <> 0 THEN gliss% = gliss1% + gliss2% + gliss3%
  15482. IF gliss% <> 0 THEN
  15483. PROCglisspitches
  15484. envpitches%(counter%) = (note1%*100)+(accid1%*10)+oct1%
  15485. ELSE
  15486. envpitches%(counter%) = (note%*100)+(accid%*10)+oct%
  15487. ENDIF
  15488. :
  15489. NEXT
  15490. :
  15491. FOR count% = 0 TO counter%
  15492. :
  15493. attacks1%(count%) = envattacks%(count%)
  15494. pitches%(count%) = envpitches%(count%)
  15495. durations%(count%) = 0
  15496. amplitudes%(count%) = 0
  15497. envelopes%(count%) = 9
  15498. glissandos%(count%) = 105050
  15499. inflections%(count%) = 50
  15500. NEXT
  15501. :
  15502. numpitches% = counter% + 1
  15503. manyattacks% = counter% + 1
  15504. method$ = "raw"
  15505. copyit$ = "ON"
  15506. PROCinsertattacks
  15507. :
  15508. justone$ = "n"
  15509. :
  15510. ENDPROC
  15511. :
  15512. REM**********************************************
  15513. :
  15514. DEF PROCglisspitches
  15515. :
  15516. note1% = note% : accid1% = accid% : oct1% = oct%
  15517. :
  15518. IF gliss% < 0 THEN step% = -1 ELSE step% = 1
  15519. IF gliss% > 0 THEN startloop% = 1 ELSE startloop% = -1
  15520. :
  15521. FOR country% = startloop% TO gliss% STEP step%
  15522. :
  15523. CASE step% OF
  15524. WHEN -1 :
  15525. CASE accid1% OF
  15526. WHEN 1 :
  15527. CASE note1% OF
  15528. WHEN 0 :
  15529. note1% = 6 : accid1% = 4 : oct1% -=1
  15530. WHEN 1, 2, 4, 5, 6 :
  15531. note1% -= 1 : accid1% = 8
  15532. WHEN 3 :
  15533. note1% -= 1 : accid1% = 4
  15534. ENDCASE
  15535. OTHERWISE accid1% -= 1
  15536. ENDCASE
  15537. WHEN 1 :
  15538. CASE accid1% OF
  15539. WHEN 9 :
  15540. CASE note1% OF
  15541. WHEN 0, 1, 3, 4, 5 :
  15542. note1% += 1 : accid1% = 2
  15543. WHEN 2 :
  15544. note1% += 1 : accid1% = 6
  15545. WHEN 6 :
  15546. note1% = 0 : accid1% = 6 : oct1% += 1
  15547. ENDCASE
  15548. OTHERWISE accid1% += 1
  15549. ENDCASE
  15550. ENDCASE
  15551. NEXT
  15552. :
  15553. ENDPROC
  15554. :
  15555. REM*********************************************
  15556. :
  15557. DEF PROCdoublestop
  15558. :
  15559. IF easiermenus$ = "n" THEN PROCwindow(20,69,96,54) ELSE PROCwindow(20,69,96,42)
  15560. repeatposit$ = "n"
  15561. distort$ = "OFF"
  15562. dothis$ = "YES"
  15563. :
  15564. copymove$ = "DS"
  15565. savevoice$ = "N"
  15566. justone$ = "n"
  15567. :
  15568. PRINT'" Violin, viola, cello or bass (N,A,O,S)? "
  15569. PRINT'" (or press E for an explanation of the function) "
  15570. CASE GET$ OF
  15571. WHEN "N","n" : member$ = "violin"
  15572. WHEN "A","a" : member$ = "viola"
  15573. WHEN "O","o" : member$ = "cello"
  15574. WHEN "S","s" : member$ = "bass"
  15575. WHEN "E","e" :
  15576. IF easiermenus$ = "n" THEN PROCwindow(8,71,96,54) ELSE PROCwindow(11,69,96,42)
  15577. VDU 14
  15578. CLS
  15579. PRINT'" The typical situation in which the double-stop function would play a part"
  15580. PRINT" is imagined to be this: up to four voices are employed to schedule attack-points "
  15581. PRINT" on each of the strings (at this stage make a single-voice reduction with the attacks "
  15582. PRINT" pitched on the open strings, because this will be needed in the function). "
  15583. PRINT'" Pitches are allocated to the attacks, including open strings and harmonics, with "
  15584. PRINT" the condition that all are within a single lh position at any one time. "
  15585. PRINT'" Now reduce these separate-string voices to a single voice - this is treated by "
  15586. PRINT" the function to produce a version inserting practical double-stops according to "
  15587. PRINT" user-defined probabilities; this is copied into two further voices to enable faithful "
  15588. PRINT" play-back; durations are correctly clipped, so a further reduction of these two "
  15589. PRINT" voices will give a clear indication of notation on a single stave. "
  15590. PRINT'" (press C to continue) "
  15591. CASE GET$ OF
  15592. ENDCASE
  15593. VDU 15
  15594. PROCdisplay
  15595. OTHERWISE PROCdoublestop
  15596. ENDCASE
  15597. INPUT'" Which single voice is to be treated? "treatvoice%
  15598. treatvoice% -= 1
  15599. INPUT'" Which other 2 voices is it divided into? - voice... "firstvoice%
  15600. firstvoice% -= 1
  15601. INPUT'" and voice... "secondvoice%
  15602. secondvoice% -= 1
  15603. INPUT'" And which single voice carries the open strings? - voice... "stringvoice%
  15604. stringvoice% -= 1
  15605. CLS
  15606. PRINT''" These 4 voices are assumed to correspond vertically; "
  15607. INPUT'" the passage is to start at bar "copystartbar%
  15608. IF copystartbar% = 0 THEN
  15609. copystartbar% = holdbar% : copystartbeat% = holdbeat% : repeatposit$ = "y"
  15610. ENDIF
  15611. holdbar% = copystartbar%
  15612. IF repeatposit$ = "y" THEN
  15613. PRINT'" bar ";copystartbar%;" beat ";copystartbeat%;"?"
  15614. PRINT" (for OK press 0, if not OK press X)"
  15615. CASE GET$ OF
  15616. WHEN"X","x" : PROCdoublestop
  15617. OTHERWISE
  15618. ENDCASE
  15619. ELSE
  15620. INPUT" beat "beats%
  15621. ENDIF
  15622. PROCalterbeats : copystartbeat% = beats%
  15623. holdbeat% = copystartbeat%
  15624. IF justone$ = "n" THEN
  15625. PRINT'" Ending at bar "
  15626. INPUT" (for last type 0) "copyendbar%
  15627. IF copyendbar% > 0 THEN
  15628. INPUT " beat "beats%
  15629. PROCalterbeats : copyendbeat% = beats%
  15630. ENDIF
  15631. ELSE
  15632. copyendbar% = copystartbar%
  15633. copyendbeat% = copystartbeat%
  15634. ENDIF
  15635. :
  15636. CLS
  15637. PRINT'" On what percentage of occasions do you want a potential "
  15638. PRINT" double-stop to be allowed? "
  15639. INPUT'" (a) following a single-stop... "singlechance%
  15640. INPUT'" (b) following a double-stop... "doublechance%
  15641. :
  15642. FOR run% = 0 TO 1
  15643. IF run% = 0 THEN voice% = stringvoice% ELSE voice% = treatvoice%
  15644. value% = (copystartbar%*10^3)+copystartbeat%
  15645. IF value% <= array%(0,0,voice%)DIV10^3 THEN
  15646. startatcell% = 0
  15647. ELSE
  15648. PROCsearch(value%)
  15649. startatcell% = startcell%
  15650. ENDIF
  15651. IF copyendbar% = 0 THEN
  15652. endatcell% = numusedcells%(voice%) - 1
  15653. ELSE
  15654. value% = (copyendbar%*10^3)+copyendbeat%
  15655. IF value% >= array%(numusedcells%(voice%)-1,0,voice%)DIV10^3 THEN
  15656. endatcell% = numusedcells%(voice%) - 1
  15657. ELSE
  15658. PROCsearch(value%)
  15659. IF shunt$ = "N" THEN endatcell% = startcell% ELSE endatcell% = startcell% - 1
  15660. ENDIF
  15661. ENDIF
  15662. :
  15663. manyattacks% = endatcell% - startatcell% + 1
  15664. REM create 'gap' between beat-of-bar and first actual attack
  15665. carrybars% = (array%(startatcell%,0,voice%)DIV10^6)-copystartbar%
  15666. carrybeats% = ((array%(startatcell%,0,voice%)DIV10^3)MOD10^3)-copystartbeat%
  15667. attacks1%(0) = (carrybars%*960)+carrybeats%
  15668. :
  15669. IF copymove$ = "DS" THEN
  15670. FOR count% = 0 TO (manyattacks%-1)
  15671. IF count% > 0 THEN
  15672. carrybars% = (array%(startatcell%+count%,0,voice%)DIV10^6)-(array%(startatcell%+count%-1,0,voice%)DIV10^6)
  15673. carrybeats% = ((array%(startatcell%+count%,0,voice%)DIV10^3)MOD10^3)-((array%(startatcell%+count%-1,0,voice%)DIV10^3)MOD10^3)
  15674. attacks1%(count%) = attacks1%(count%-1) + ((carrybars%*960)+carrybeats%)
  15675. ENDIF
  15676. :
  15677. pitches%(count%) = array%(startatcell%+count%,0,voice%)MOD10^3
  15678. IF run% = 0 THEN
  15679. pitch% = pitches%(count%)
  15680. PROCopenstgs
  15681. ENDIF
  15682. dur% = (array%(startatcell%+count%,1,voice%)DIV10)MOD10^3
  15683. brrr% = array%(startatcell%+count%,0,voice%)DIV10^6 : PROCreconvertdur
  15684. durations%(count%) = dur%
  15685. amplitudes%(count%) = (array%(startatcell%+count%,1,voice%))MOD10
  15686. envelopes%(count%) = (array%(startatcell%+count%,2,voice%))DIV10^2
  15687. glissandos%(count%) = (array%(startatcell%+count%,1,voice%)DIV10^4)
  15688. inflections%(count%) = array%(startatcell%+count%,2,voice%)MOD10^2
  15689. NEXT
  15690. ENDIF
  15691. NEXT run%
  15692. :
  15693. :
  15694. firstcutoff% = 0
  15695. secondcutoff% = 0
  15696. :
  15697. FOR count% = 0 TO (manyattacks%-1)
  15698. :
  15699. REM determine state before making decision
  15700. state$ = "tacet"
  15701. IF firstcutoff% > attacks1%(count%) THEN state$ = "single1"
  15702. IF secondcutoff% > attacks1%(count%) AND state$ = "tacet" THEN state$ = "single2"
  15703. IF secondcutoff% > attacks1%(count%) AND state$ = "single1" THEN state$ = "double"
  15704. :
  15705. CASE state$ OF
  15706. WHEN "tacet" :
  15707. dsvoice%(count%) = firstvoice%
  15708. firstcutoff% = attacks1%(count%) + durations%(count%)
  15709. firstcount% = count%
  15710. firststg% = openstgs%(count%)
  15711. :
  15712. WHEN "single1" :
  15713. newstg$ = "nonadj"
  15714. IF firststg% = openstgs%(count%) THEN newstg$ = "same"
  15715. IF firststg% = (openstgs%(count%)-1) OR firststg% = (openstgs%(count%)+1) THEN newstg$ = "adj"
  15716. :
  15717. CASE newstg$ OF
  15718. WHEN "same" :
  15719. dsvoice%(count%) = firstvoice%
  15720. firstcutoff% = attacks1%(count%) + durations%(count%)
  15721. firststg% = openstgs%(count%)
  15722. REM clip duration of interrupted note
  15723. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15724. firstcount% = count%
  15725. WHEN "adj" :
  15726. PROCsingleprob
  15727. IF ds$ = "n" THEN
  15728. dsvoice%(count%) = firstvoice%
  15729. firstcutoff% = attacks1%(count%) + durations%(count%)
  15730. firststg% = openstgs%(count%)
  15731. REM clip duration of interrupted note
  15732. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15733. firstcount% = count%
  15734. ELSE
  15735. dsvoice%(count%) = secondvoice%
  15736. secondcutoff% = attacks1%(count%) + durations%(count%)
  15737. secondcount% = count%
  15738. secondstg% = openstgs%(count%)
  15739. ENDIF
  15740. WHEN "nonadj" :
  15741. dsvoice%(count%) = firstvoice%
  15742. firstcutoff% = attacks1%(count%) + durations%(count%)
  15743. firststg% = openstgs%(count%)
  15744. REM clip duration of interrupted note and add slight 'rest'
  15745. durations%(firstcount%) = attacks1%(count%) - (attacks1%(firstcount%)+60)
  15746. IF durations%(firstcount%) <0 THEN durations%(firstcount%) = 1
  15747. firstcount% = count%
  15748. ENDCASE
  15749. :
  15750. WHEN "single2" :
  15751. newstg$ = "nonadj"
  15752. IF secondstg% = openstgs%(count%) THEN newstg$ = "same"
  15753. IF secondstg% = (openstgs%(count%)-1) OR secondstg% = (openstgs%(count%)+1) THEN newstg$ = "adj"
  15754. :
  15755. CASE newstg$ OF
  15756. WHEN "same" :
  15757. dsvoice%(count%) = secondvoice%
  15758. secondcutoff% = attacks1%(count%) + durations%(count%)
  15759. secondstg% = openstgs%(count%)
  15760. REM clip duration of interrupted note
  15761. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15762. secondcount% = count%
  15763. WHEN "adj" :
  15764. PROCsingleprob
  15765. IF ds$ = "n" THEN
  15766. dsvoice%(count%) = secondvoice%
  15767. secondcutoff% = attacks1%(count%) + durations%(count%)
  15768. secondstg% = openstgs%(count%)
  15769. REM clip duration of interrupted note
  15770. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15771. secondcount% = count%
  15772. ELSE
  15773. dsvoice%(count%) = firstvoice%
  15774. firstcutoff% = attacks1%(count%) + durations%(count%)
  15775. firstcount% = count%
  15776. firststg% = openstgs%(count%)
  15777. ENDIF
  15778. WHEN "nonadj" :
  15779. dsvoice%(count%) = secondvoice%
  15780. secondcutoff% = attacks1%(count%) + durations%(count%)
  15781. secondstg% = openstgs%(count%)
  15782. REM clip duration of interrupted note and add slight 'rest'
  15783. durations%(secondcount%) = attacks1%(count%) - (attacks1%(secondcount%)+60)
  15784. IF durations%(secondcount%) <0 THEN durations%(secondcount%) = 1
  15785. secondcount% = count%
  15786. ENDCASE
  15787. :
  15788. WHEN "double" :
  15789. newstg$ = "nonadj"
  15790. IF openstgs%(count%) = firststg% THEN newstg$ = "sameasfirst"
  15791. IF openstgs%(count%) = secondstg% THEN newstg$ = "sameassecond"
  15792. IF (openstgs%(count%) = (firststg%-1) OR openstgs%(count%) = (firststg%+1)) AND openstgs%(count%) <> secondstg% THEN newstg$ = "adjtofirst"
  15793. IF (openstgs%(count%) = (secondstg%-1) OR openstgs%(count%) = (secondstg%+1)) AND openstgs%(count%) <> firststg% THEN newstg$ = "adjtosecond"
  15794. :
  15795. CASE newstg$ OF
  15796. WHEN "sameasfirst" :
  15797. PROCdoubleprob
  15798. IF ds$ = "n" THEN
  15799. dsvoice%(count%) = firstvoice%
  15800. firstcutoff% = attacks1%(count%) + durations%(count%)
  15801. firststg% = openstgs%(count%)
  15802. REM clip durations of both interrupted notes
  15803. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15804. firstcount% = count%
  15805. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15806. secondcutoff% = attacks1%(secondcount%) + durations%(secondcount%)
  15807. ELSE
  15808. dsvoice%(count%) = firstvoice%
  15809. firstcutoff% = attacks1%(count%) + durations%(count%)
  15810. firststg% = openstgs%(count%)
  15811. REM clip duration of interrupted note
  15812. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15813. firstcount% = count%
  15814. ENDIF
  15815. WHEN "sameassecond" :
  15816. PROCdoubleprob
  15817. IF ds$ = "n" THEN
  15818. dsvoice%(count%) = secondvoice%
  15819. secondcutoff% = attacks1%(count%) + durations%(count%)
  15820. secondstg% = openstgs%(count%)
  15821. REM clip durations of both interrupted notes
  15822. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15823. secondcount% = count%
  15824. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15825. firstcutoff% = attacks1%(firstcount%) + durations%(firstcount%)
  15826. ELSE
  15827. dsvoice%(count%) = secondvoice%
  15828. secondcutoff% = attacks1%(count%) + durations%(count%)
  15829. secondstg% = openstgs%(count%)
  15830. REM clip duration of interrupted note
  15831. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15832. secondcount% = count%
  15833. ENDIF
  15834. WHEN "adjtofirst" :
  15835. PROCdoubleprob
  15836. IF ds$ = "n" THEN
  15837. dsvoice%(count%) = firstvoice%
  15838. firstcutoff% = attacks1%(count%) + durations%(count%)
  15839. firststg% = openstgs%(count%)
  15840. REM clip durations of both interrupted notes
  15841. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15842. firstcount% = count%
  15843. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15844. secondcutoff% = attacks1%(secondcount%) + durations%(secondcount%)
  15845. ELSE
  15846. dsvoice%(count%) = secondvoice%
  15847. secondcutoff% = attacks1%(count%) + durations%(count%)
  15848. secondstg% = openstgs%(count%)
  15849. REM clip duration of interrupted note
  15850. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15851. secondcount% = count%
  15852. ENDIF
  15853. WHEN "adjtosecond" :
  15854. PROCdoubleprob
  15855. IF ds$ = "n" THEN
  15856. dsvoice%(count%) = secondvoice%
  15857. secondcutoff% = attacks1%(count%) + durations%(count%)
  15858. secondstg% = openstgs%(count%)
  15859. REM clip durations of both interrupted notes
  15860. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15861. secondcount% = count%
  15862. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15863. firstcutoff% = attacks1%(firstcount%) + durations%(firstcount%)
  15864. ELSE
  15865. dsvoice%(count%) = firstvoice%
  15866. firstcutoff% = attacks1%(count%) + durations%(count%)
  15867. firststg% = openstgs%(count%)
  15868. REM clip duration of interrupted note
  15869. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15870. firstcount% = count%
  15871. ENDIF
  15872. WHEN "nonadj" :
  15873. dsvoice%(count%) = firstvoice%
  15874. firstcutoff% = attacks1%(count%) + durations%(count%)
  15875. firststg% = openstgs%(count%)
  15876. REM clip durations of both interrupted notes and add 'rests'
  15877. durations%(firstcount%) = attacks1%(count%) - (attacks1%(firstcount%)+60)
  15878. IF durations%(firstcount%) <0 THEN durations%(firstcount%) = 1
  15879. firstcount% = count%
  15880. durations%(secondcount%) = attacks1%(count%) - (attacks1%(secondcount%)+60)
  15881. IF durations%(secondcount%) <0 THEN durations%(secondcount%) = 1
  15882. secondcutoff% = attacks1%(secondcount%) + durations%(secondcount%)
  15883. ENDCASE
  15884. :
  15885. ENDCASE
  15886. :
  15887. NEXT
  15888. :
  15889. :
  15890. numpitches% = manyattacks% : method$ = "raw" : copyit$ = "ON" : justone$ = "n"
  15891. : repeatposit$ = "n" : reordered$ = "n" : equalized$ = "n" : rhythmicized$ = "n"
  15892. :
  15893. : startat% = (copystartbar%*(10^3))+copystartbeat%
  15894. attacks2%() = attacks1%()
  15895. :
  15896. attacks2%() = attacks2%() + (startat% MOD 10^3) : REM moves attacks further up bar, if necc
  15897. :
  15898. attacks3%() = attacks2%()
  15899. FOR count% = 0 TO (manyattacks%-1)
  15900. attacks3%(count%) = attacks3%(count%) DIV 960
  15901. NEXT
  15902. REM gives list of bar mos starting at 0
  15903. :
  15904. attacks3%() = attacks3%() * 960
  15905. attacks2%() = attacks2%() - attacks3%()
  15906. attacks3%() = attacks3%() / 960
  15907. REM list of actual beat numbers
  15908. :
  15909. attacks3%() = attacks3%() + (startat% DIV 10^3) : REM list of actual bar nos
  15910. :
  15911. attacks3%() = attacks3%()*(10^3)
  15912. attacks2%() = attacks2%() + attacks3%()
  15913. REM list of actual bar/beat numbers
  15914. :
  15915. :
  15916. addingnotes$ = "y"
  15917. :
  15918. FOR counter% = 0 TO (manyattacks%-1)
  15919. voice% = dsvoice%(counter%)
  15920. PROCnewnotereception(voice%, (attacks2%(counter%)DIV10^3), (attacks2%(counter%)MOD10^3), pitches%(counter%), amplitudes%(counter%), envelopes%(counter%), durations%(counter%), glissandos%(counter%), inflections%(counter%))
  15921. NEXT
  15922. :
  15923. copyit$ = "OFF" : displayedfunc$ = "n" : PROCdisplay
  15924. :
  15925. ENDPROC
  15926. :
  15927. REM******************************************************************
  15928. :
  15929. DEF PROCopenstgs
  15930. :
  15931. CASE member$ OF
  15932. WHEN "violin" :
  15933. CASE pitch% OF
  15934. WHEN 255 : openstgs%(count%) = 1
  15935. WHEN 554 : openstgs%(count%) = 2
  15936. WHEN 154 : openstgs%(count%) = 3
  15937. WHEN 453 : openstgs%(count%) = 4
  15938. OTHERWISE
  15939. VDU 7 : PRINT "NOT AN OPEN STRING"
  15940. PRINT "press C to continue"
  15941. CASE GET$ OF
  15942. ENDCASE
  15943. PROCdoublestop
  15944. ENDCASE
  15945. :
  15946. WHEN "viola" :
  15947. CASE pitch% OF
  15948. WHEN 554 : openstgs%(count%) = 1
  15949. WHEN 154 : openstgs%(count%) = 2
  15950. WHEN 453 : openstgs%(count%) = 3
  15951. WHEN 53 : openstgs%(count%) = 4
  15952. OTHERWISE
  15953. VDU 7 : PRINT "NOT AN OPEN STRING"
  15954. PRINT "press C to continue"
  15955. CASE GET$ OF
  15956. ENDCASE
  15957. PROCdoublestop
  15958. ENDCASE
  15959. :
  15960. WHEN "cello" :
  15961. CASE pitch% OF
  15962. WHEN 553 : openstgs%(count%) = 1
  15963. WHEN 153 : openstgs%(count%) = 2
  15964. WHEN 452 : openstgs%(count%) = 3
  15965. WHEN 52 : openstgs%(count%) = 4
  15966. OTHERWISE
  15967. VDU 7 : PRINT "NOT AN OPEN STRING"
  15968. PRINT "press C to continue"
  15969. CASE GET$ OF
  15970. ENDCASE
  15971. PROCdoublestop
  15972. ENDCASE
  15973. :
  15974. WHEN "bass" :
  15975. CASE pitch% OF
  15976. WHEN 452 : openstgs%(count%) = 1
  15977. WHEN 152 : openstgs%(count%) = 2
  15978. WHEN 551 : openstgs%(count%) = 3
  15979. WHEN 251 : openstgs%(count%) = 4
  15980. OTHERWISE
  15981. VDU 7 : PRINT "NOT AN OPEN STRING"
  15982. PRINT "press C to continue"
  15983. CASE GET$ OF
  15984. ENDCASE
  15985. PROCdoublestop
  15986. ENDCASE
  15987. :
  15988. ENDCASE
  15989. :
  15990. ENDPROC
  15991. :
  15992. REM****************************************************
  15993. :
  15994. DEF PROCsingleprob
  15995. :
  15996. number% = RND(100)
  15997. IF number% > 0 AND number% <= singlechance% THEN
  15998. ds$ = "y"
  15999. ELSE
  16000. ds$ = "n"
  16001. ENDIF
  16002. ENDPROC
  16003. :
  16004. REM***************************************************
  16005. :
  16006. DEF PROCdoubleprob
  16007. :
  16008. number% = RND(100)
  16009. IF number% > 0 AND number% <= doublechance% THEN
  16010. ds$ = "y"
  16011. ELSE
  16012. ds$ = "n"
  16013. ENDIF
  16014. ENDPROC
  16015. :
  16016. REM***************************************************
  16017. :
  16018. DEF PROCsamepitches
  16019. :
  16020. PRINT' " Note name for pitch is ";
  16021. COLOUR 3
  16022. CASE GET$ OF
  16023. WHEN "C","c" : note% = 0 : PRINT "C"
  16024. WHEN "D","d" : note% = 1 : PRINT "D"
  16025. WHEN "E","e" : note% = 2 : PRINT "E"
  16026. WHEN "F","f" : note% = 3 : PRINT "F"
  16027. WHEN "G","g" : note% = 4 : PRINT "G"
  16028. WHEN "A","a" : note% = 5 : PRINT "A"
  16029. WHEN "B","b" : note% = 6 : PRINT "B"
  16030. ENDCASE
  16031. COLOUR 0
  16032. PRINT " accidental ";
  16033. COLOUR 3
  16034. CASE GET$ OF
  16035. WHEN "1" : accid% = 1 : PRINT "flat"
  16036. WHEN "2" : accid% = 2 : PRINT "3/8flat"
  16037. WHEN "3" : accid% = 3 : PRINT "1/4flat"
  16038. WHEN "4" : accid% = 4 : PRINT "1/8flat"
  16039. WHEN "5" : accid% = 5 : PRINT "nat"
  16040. WHEN "6" : accid% = 6 : PRINT "1/8shrp"
  16041. WHEN "7" : accid% = 7 : PRINT "1/4shrp"
  16042. WHEN "8" : accid% = 8 : PRINT "3/8shrp"
  16043. WHEN "9" : accid% = 9 : PRINT "shrp"
  16044. ENDCASE
  16045. COLOUR 0
  16046. PRINT " octave ";
  16047. COLOUR 3
  16048. CASE GET$ OF
  16049. WHEN "0" : octave% = 0 : PRINT "0"
  16050. WHEN "1" : octave% = 1 : PRINT "1"
  16051. WHEN "2" : octave% = 2 : PRINT "2"
  16052. WHEN "3" : octave% = 3 : PRINT "3"
  16053. WHEN "4" : octave% = 4 : PRINT "4"
  16054. WHEN "5" : octave% = 5 : PRINT "5"
  16055. WHEN "6" : octave% = 6 : PRINT "6"
  16056. WHEN "7" : octave% = 7 : PRINT "7"
  16057. WHEN "8" : octave% = 8 : PRINT "8"
  16058. ENDCASE
  16059. COLOUR 0
  16060. FOR count% = 0 TO numpitches% - 1
  16061. pitches%(count%) = (note%*100)+(accid%*10)+octave%
  16062. NEXT
  16063. :
  16064. firstpitch$ = "n" : prevnumpitches% = numpitches%
  16065. REM function can feed pitches similarly into pitches%
  16066. :
  16067. PROCinsertpitches
  16068. :
  16069. ENDPROC
  16070. :
  16071. REM*************************************************
  16072. :
  16073. DEF PROCedit
  16074. :
  16075. PROCwindow(20,60,58,39)
  16076. PRINT ' " move 1st envelope point E"
  16077. PRINT ' " move 2nd envelope point R"
  16078. PRINT ' " change 1st amplitude A"
  16079. PRINT ' " change 2nd amplitude S"
  16080. PRINT ' " change 3rd amplitude D"
  16081. PRINT ' " change 4th amplitude F"
  16082. PRINT ' " move note+following note N"
  16083. PRINT ' " move note+drag previous duration M"
  16084. PRINT ' " change duration C"
  16085. PRINT ' " then Shift + < OR >"
  16086. CASE GET$ OF
  16087. WHEN "E", "e" : editwhat$ = "1stenvelope"
  16088. WHEN "R", "r" : editwhat$ = "2ndenvelope"
  16089. WHEN "A", "a" : editwhat$ = "1stamplitude"
  16090. WHEN "S", "s" : editwhat$ = "2ndamplitude"
  16091. WHEN "D", "d" : editwhat$ = "3rdamplitude"
  16092. WHEN "F", "f" : editwhat$ = "4thamplitude"
  16093. WHEN "N", "n" : editwhat$ = "movetwo"
  16094. WHEN "M", "m" : editwhat$ = "move&drag"
  16095. WHEN "C", "c" : editwhat$ = "duration"
  16096. ENDCASE
  16097. PROCdisplay
  16098. ENDPROC
  16099. :
  16100. REM*************************************************
  16101. :
  16102. DEF PROCconvertoldenvelopes
  16103. :
  16104. REM When a/dal niente was introduced, notes with amp2%=0 had to display an envelope
  16105. REM whereas previously amp2%=0 meant "no envelope"
  16106. REM Consequently files predating this change now undesirably display "no envelope" notes as single-phase "dim a niente" notes
  16107. REM To update the old files, use this proc to give a value amp2%=9 to all notes
  16108. PROCwindow(20,60,68,45)
  16109. PRINT' " Do you want to convert all the envelopes"
  16110. PRINT" in the file back to 0 phase envelopes?"
  16111. CASE GET$ OF
  16112. WHEN "Y", "y" :
  16113. FOR voice% = 0 TO (numparts%-1)
  16114. :
  16115. FOR count% = 0 TO numusedcells%(voice%)-1
  16116. number% = array%(count%,2,voice%) DIV 10^2
  16117. array%(count%,2,voice%) = array%(count%,2,voice%) - (number%*100)
  16118. array%(count%,2,voice%) = array%(count%,2,voice%) + 900
  16119. NEXT
  16120. :
  16121. NEXT
  16122. PROCdisplay
  16123. OTHERWISE PROCdisplay
  16124. ENDCASE
  16125. ENDPROC
  16126. :
  16127. REM************************************************
  16128. :
  16129. DEF PROCkeyboardshortcuts
  16130. :
  16131. PROCwindow(2,68,97,2)
  16132. :
  16133. PRINT ' " Menu M Accel/rit by total duration T"
  16134. PRINT ' " Display menu O Accel/rit by start/end points E"
  16135. PRINT ' " Move down 1, 3/10, x many, 50 v/vv/vx/v0 Accel/rit between adjacent notes F"
  16136. PRINT ' " Move up 1, 3/10, x many, 50 ^/^^/^x/^0 Starting note for F above 1,2,3..."
  16137. PRINT ' " Move left </<</<9 Random number/with same values n/N"
  16138. PRINT ' " Move right >/>>/>9 Group of durations U"
  16139. PRINT ' " Go to bar B Quickplay top x voices (see M-V-Q) P"
  16140. PRINT ' " Go to SECTION S Quickplay 2nd voice only ;"
  16141. PRINT ' " Display x number of bars D Quickplay 3rd voice only /"
  16142. PRINT ' " Double number of bars + Quickplay top x voices, screen only ^P"
  16143. PRINT ' " Halve number of bars - Quickplay 2nd voice, screen only :"
  16144. PRINT ' " Quick display Q Quickplay 3rd voice, screem only ?"
  16145. PRINT ' " Prev Quick/Quick/Ord Display W Replay R"
  16146. PRINT ' " Top remarks left/right [/] Slavevoice function ^L"
  16147. PRINT ' " Bottom remarks left/right '/# Edit envelope voice 1, note 1,2,3... ^QWER..."
  16148. PRINT ' " [free keystroke] ~ Edit envelope voice 2, note 1,2,3... ^ASDF..."
  16149. PRINT ' " Menus easier to read @ Edit envelope voice 3, note 1,2,3... ^ZXCV..."
  16150. PRINT ' " Hard copy H Enter last value again Return"
  16151. PRINT ' " Name staves ^V Import ^I"
  16152. PRINT ' " Accel/rit A Group of attacks 0"
  16153. PRINT ' " Group of amplitudes L Group of envelopes J"
  16154. PRINT ' " Show keyboard shortcuts K Move a passage \"
  16155. PRINT ' " Distort attacks/pitches `/`` Move one note ^\"
  16156. PRINT ' " Increment calculator C Copy one note Z"
  16157. PRINT ' " Group of pitches Y Copy a passage X"
  16158. PRINT ' " Copy note x down 1/x stave(s)^x/^xx Quickdisplay x voices 1,2,3..."
  16159. PRINT ' " Delete note 1/x top stave ^O/^Ox Delete sim middle/bottom staves ^K/^M"
  16160. PRINT ' " [free keystroke] # Extract I"
  16161. PRINT ' " Fill gaps with durations G Copy successive voices to same voice S"
  16162. PRINT ' " Add 0/10/20 to copying down [/]/' Input screen voice Return 1/2/3 times"
  16163. PRINT ' " Display all voices ^= Display from which voice down ¬"
  16164. PRINT ' " Quick copy on { Quick copy off }"
  16165. PRINT ' " (press a key to continue)"
  16166. CASE GET$ OF
  16167. WHEN "c", "C" :
  16168. PROCdisplay
  16169. OTHERWISE
  16170. PROCdisplay
  16171. ENDCASE
  16172. :
  16173. ENDPROC
  16174. :
  16175. REM***************************************************************************************
  16176. :
  16177. DEF PROCmoveback
  16178. :
  16179. INPUT " Move back by how many bars "backbybars%
  16180. INPUT " and how many beats "backby%
  16181. backby% = backby%+(backbybars%*960)
  16182. :
  16183. IF backby% = 0 THEN
  16184. COLOUR 3 : PRINT' holdbackby%;"?"
  16185. CASE GET$ OF
  16186. WHEN "N","n" : COLOUR 0 : PROCmoveback
  16187. OTHERWISE backby% = holdbackby%
  16188. ENDCASE
  16189. COLOUR 0
  16190. ENDIF
  16191. :
  16192. holdbackby% = backby%
  16193. beats% = beats% - backby%
  16194. REPEAT
  16195. IF beats% < 0 THEN
  16196. REPEAT
  16197. beats% = 960 + beats%
  16198. bars% -= 1
  16199. UNTIL beats% >= 0
  16200. ENDIF
  16201. :
  16202. ENDPROC
  16203. :
  16204. REM******************************************************************************************
  16205. :
  16206. DEF PROCmoveforward
  16207. :
  16208. INPUT " Move forward by how many bars "backbybars%
  16209. INPUT " and how many beats "backby%
  16210. backby% = backby%+(backbybars%*960)
  16211. :
  16212. IF backby% = 0 THEN
  16213. COLOUR 3 : PRINT' holdbackby%;"?"
  16214. CASE GET$ OF
  16215. WHEN "N","n" : COLOUR 0 : PROCmoveforward
  16216. OTHERWISE backby% = holdbackby%
  16217. ENDCASE
  16218. COLOUR 0
  16219. ENDIF
  16220. :
  16221. holdbackby% = backby%
  16222. beats% = beats% + backby%
  16223. REPEAT
  16224. IF beats% > 960 THEN
  16225. REPEAT
  16226. beats% = beats% - 960
  16227. bars% += 1
  16228. UNTIL beats% <= 960
  16229. ENDIF
  16230. :
  16231. ENDPROC
  16232. :
  16233. REM******************************************************************************************
  16234. :
  16235. DEF PROCpitchstring3
  16236. :
  16237. IF easiermenus$ = "n" THEN PROCwindow(20,69,60,55) ELSE PROCwindow(20,69,60,42)
  16238. PRINT'" Return a random pitch-class having"
  16239. PRINT" pre-defined its probability "
  16240. PRINT'" Use previous shares or re-define (P/R)? "
  16241. CASE GET$ OF
  16242. WHEN "r","R" :
  16243. :
  16244. totalshares% = 0
  16245. INPUT '" C nat has how many shares "many%
  16246. cnat% = 0 + many% : totalshares% += many%
  16247. INPUT '" C sharp has how many shares "many%
  16248. cshrp% = cnat% + many% : totalshares% += many%
  16249. INPUT '" D nat has how many shares "many%
  16250. dnat% = cshrp% + many% : totalshares% += many%
  16251. INPUT '" D sharp has how many shares "many%
  16252. dshrp% = dnat% + many% : totalshares% += many%
  16253. INPUT '" E nat has how many shares "many%
  16254. enat% = dshrp% + many% : totalshares% += many%
  16255. INPUT '" F nat has how many shares "many%
  16256. fnat% = enat% + many% : totalshares% += many%
  16257. INPUT '" F sharp has how many shares "many%
  16258. fshrp% = fnat% + many% : totalshares% += many%
  16259. INPUT '" G nat has how many shares "many%
  16260. gnat% = fshrp% + many% : totalshares% += many%
  16261. INPUT '" G sharp has how many shares "many%
  16262. gshrp% = gnat% + many% : totalshares% += many%
  16263. INPUT '" A nat has how many shares "many%
  16264. anat% = gshrp% + many% : totalshares% += many%
  16265. INPUT '" A sharp has how many shares "many%
  16266. ashrp% = anat% + many% : totalshares% += many%
  16267. INPUT '" B nat has how many shares "many%
  16268. bnat% = ashrp% + many% : totalshares% += many%
  16269. OTHERWISE
  16270. ENDCASE
  16271. throw% = RND(totalshares%)
  16272. IF throw% > 0 AND throw% <= cnat% THEN note$ = "C nat"
  16273. IF throw% > cnat% AND throw% <= cshrp% THEN note$ = "C sharp"
  16274. IF throw% > cshrp% AND throw% <= dnat% THEN note$ = "D nat"
  16275. IF throw% > dnat% AND throw% <= dshrp% THEN note$ = "D sharp"
  16276. IF throw% > dshrp% AND throw% <= enat% THEN note$ = "E nat"
  16277. IF throw% > enat% AND throw% <= fnat% THEN note$ = "F nat"
  16278. IF throw% > fnat% AND throw% <= fshrp% THEN note$ = "F sharp"
  16279. IF throw% > fshrp% AND throw% <= gnat% THEN note$ = "G nat"
  16280. IF throw% > gnat% AND throw% <= gshrp% THEN note$ = "G sharp"
  16281. IF throw% > gshrp% AND throw% <= anat% THEN note$ = "A nat"
  16282. IF throw% > anat% AND throw% <= ashrp% THEN note$ = "A sharp"
  16283. IF throw% > ashrp% AND throw% <= bnat% THEN note$ = "B nat"
  16284. PRINT ''" note = ";note$
  16285. PRINT '" use this? "
  16286. CASE GET$ OF
  16287. WHEN "n","N" :
  16288. PROCpitchstring3
  16289. OTHERWISE
  16290. ENDCASE
  16291. INPUT'" which octave "octave%
  16292. IF octave% > 0 THEN sameoctave% = octave%
  16293. IF octave% = 0 THEN octave% = sameoctave%
  16294. CASE note$ OF
  16295. WHEN "C nat" : note% = 0 : accid% = 5 : octave% = octave%
  16296. WHEN "C sharp" : note% = 0 : accid% = 9 : octave% = octave%
  16297. WHEN "D nat" : note% = 1 : accid% = 5 : octave% = octave%
  16298. WHEN "D sharp" : note% = 1 : accid% = 9 : octave% = octave%
  16299. WHEN "E nat" : note% = 2 : accid% = 5 : octave% = octave%
  16300. WHEN "F nat" : note% = 3 : accid% = 5 : octave% = octave%
  16301. WHEN "F sharp" : note% = 3 : accid% = 9 : octave% = octave%
  16302. WHEN "G nat" : note% = 4 : accid% = 5 : octave% = octave%
  16303. WHEN "G sharp" : note% = 4 : accid% = 9 : octave% = octave%
  16304. WHEN "A nat" : note% = 5 : accid% = 5 : octave% = octave%
  16305. WHEN "A sharp" : note% = 5 : accid% = 9 : octave% = octave%
  16306. WHEN "B nat" : note% = 6 : accid% = 5 : octave% = octave%
  16307. ENDCASE
  16308. numpitches% = 1 : pitches%(0) = (note%*100)+(accid%*10)+octave%
  16309. PROCinsertpitches
  16310. :
  16311. ENDPROC
  16312. :
  16313. REM******************************************************************
  16314. :
  16315. DEF PROCincrementcalc
  16316. :
  16317. PROCwindow(15,71,89,45)
  16318. CLS
  16319. :
  16320. PRINT'" As it is written, Accel/Rit allows no.attacks and rate"
  16321. PRINT" to be defined in one mode, or start/finish durs in the other"
  16322. PRINT" but not start dur AND a defined rate together (and just to"
  16323. PRINT" complicate things, the resultant rate in fact varies in different"
  16324. PRINT" contexts). If you want, say, a closely defined quickend and"
  16325. PRINT" also a closely defined rate of rit, to get this in accel/Rit"
  16326. PRINT" you will also need to know IN ADVANCE what the end dur will be"
  16327. PRINT" so as to input this when using Accel/Rit in its second mode."
  16328. PRINT" The proceedure below is for finding precisely this."
  16329. :
  16330. count% = 1
  16331. INPUT'" First type the start duration "value
  16332. PRINT'" then the arithmetic rate of increment (not the Accel/Rit rate)"
  16333. INPUT" as a decimal number "factor
  16334. total% = value
  16335. INPUT'" and finally the total duration "reqtotal%
  16336. PRINT'" (then press a key for successive increments)"
  16337. PRINT'count%;". duration = ";value;" total = ";total%
  16338. REPEAT
  16339. CASE GET$ OF
  16340. OTHERWISE
  16341. count% += 1
  16342. value = value * factor
  16343. total% = total% + value
  16344. gap% = reqtotal% - total%
  16345. value% = value DIV 1
  16346. PRINT'count%;". duration = ";value%;" total = ";total%;" (";gap%;" short of required total)"
  16347. ENDCASE
  16348. UNTIL gap% <0
  16349. :
  16350. PRINT'" (to return to display press F)"
  16351. REPEAT
  16352. key$ = GET$
  16353. IF key$ = "f" THEN PROCdisplay ELSE VDU 7
  16354. UNTIL key$ = "f"
  16355. ENDPROC
  16356. :
  16357. REM*********************************************************************************
  16358. :
  16359. DEF PROCchangeclef
  16360. :
  16361. PROCwindow(20,69,65,55)
  16362. INPUT'" Change clef for which voice "itsvoice%
  16363. INPUT'" How many staves does this voice have "numstaves$
  16364. PRINT'" And what is/are its clefs (P/T/B/D or"
  16365. INPUT" PP/PT etc.) "clef$
  16366. :
  16367. insts$(itsvoice%,2) = numstaves$
  16368. insts$(itsvoice%,1) = clef$
  16369. :
  16370. ENDPROC
  16371. :
  16372. REM**********************************************************************************
  16373. :
  16374. DEF PROCrandomassign
  16375. :
  16376. CLS
  16377. INPUT'" between voice (for 1 press 0) "first%
  16378. IF first% = 0 THEN firs% = 1
  16379. INPUT'" and voice (for last press 0) "last%
  16380. IF last% = 0 THEN last% = numparts%
  16381. :
  16382. INPUT '" using how many of the 19 voices "no%
  16383. taken%() = 0
  16384. :
  16385. FOR count% = 1 TO no%
  16386. result$ = "failure"
  16387. REPEAT
  16388. voice% = RND(19)
  16389. IF taken%(voice%) = 0 THEN
  16390. taken%(voice%) = 1
  16391. result$ = "success"
  16392. ENDIF
  16393. UNTIL result$ = "success"
  16394. NEXT
  16395. :
  16396. FOR count% = first% TO last%
  16397. REPEAT
  16398. x% = RND(19)
  16399. UNTIL taken%(x%) = 1
  16400. :
  16401. CASE x% OF
  16402. WHEN 1 : IF type$ = "drums" THEN waveforms$(count%) = "Timpani" ELSE waveforms$(count%) = "RecorderGb"
  16403. WHEN 2 : IF type$ = "drums" THEN waveforms$(count%) = "TimpCresBb" ELSE waveforms$(count%) = "PiccoloE"
  16404. WHEN 3 : IF type$ = "drums" THEN waveforms$(count%) = "TimpRollEb" ELSE waveforms$(count%) = "SaxSoprnoE"
  16405. WHEN 4 : IF type$ = "drums" THEN waveforms$(count%) = "TimpLowBb" ELSE waveforms$(count%) = "SaxEbBarC"
  16406. WHEN 5 : IF type$ = "drums" THEN waveforms$(count%) = "BassDrum" ELSE waveforms$(count%) = "SaxBbTenrE"
  16407. WHEN 7 : IF type$ = "drums" THEN waveforms$(count%) = "BDGatedRev" ELSE waveforms$(count%) = "BugleC"
  16408. WHEN 8 : IF type$ = "drums" THEN waveforms$(count%) = "BDMarching" ELSE waveforms$(count%) = "Trombone1"
  16409. WHEN 9 : IF type$ = "drums" THEN waveforms$(count%) = "BDPiloMute" ELSE waveforms$(count%) = "Trumpet"
  16410. WHEN 10 : IF type$ = "drums" THEN waveforms$(count%) = "CongaHi" ELSE waveforms$(count%) = "EngHornGb"
  16411. WHEN 11 : IF type$ = "drums" THEN waveforms$(count%) = "CongaMid" ELSE waveforms$(count%) = "ClarinetBb"
  16412. WHEN 12 : IF type$ = "drums" THEN waveforms$(count%) = "CongaSmCl" ELSE waveforms$(count%) = "ClarVibEb"
  16413. WHEN 14 : IF type$ = "drums" THEN waveforms$(count%) = "ElecTom1" ELSE waveforms$(count%) = "BassoonEb"
  16414. WHEN 16 : IF type$ = "drums" THEN waveforms$(count%) = "RotoTomRev" ELSE waveforms$(count%) = "FlugelHnEb"
  16415. WHEN 15 : IF type$ = "drums" THEN waveforms$(count%) = "SimmonsBD1" ELSE waveforms$(count%) = "CornetEb"
  16416. WHEN 13 : IF type$ = "drums" THEN waveforms$(count%) = "Snare" ELSE waveforms$(count%) = "TubaGb"
  16417. WHEN 6 : IF type$ = "drums" THEN waveforms$(count%) = "SnareEcho" ELSE waveforms$(count%) = "BassBowAb"
  16418. WHEN 17 : IF type$ = "drums" THEN waveforms$(count%) = "SynTom" ELSE waveforms$(count%) = "JapFlute"
  16419. WHEN 18 : IF type$ = "drums" THEN waveforms$(count%) = "TablaHi" ELSE waveforms$(count%) = "EnsWodAb45"
  16420. WHEN 19 : IF type$ = "drums" THEN waveforms$(count%) = "Tomtom1" ELSE waveforms$(count%) = "Bass"
  16421. ENDCASE
  16422. NEXT
  16423. :
  16424. PROCwindow(20,72,83,25)
  16425. VDU 14
  16426. PRINT'" Current assignations are now "
  16427. PRINT " (press Ctrl-Shift to scroll down) "
  16428. FOR count% = 1 TO numparts%
  16429. IF waveforms$(count%) <> "" THEN
  16430. PRINT'" voice ";count%;
  16431. IF insts$(count%,0)<> "" THEN PRINT " (";insts$(count%,0);")";
  16432. PRINT " - ";waveforms$(count%)
  16433. ENDIF
  16434. NEXT
  16435. VDU 15
  16436. PRINT'" Do you want to keep these, reassign,"
  16437. PRINT " use WaveSynth-Beep defaults, "
  16438. PRINT " randomly assign sustaining/dry instruments/drums "
  16439. PRINT " to all staves, or assign in groups "
  16440. PRINT " (K/R/W/S/D/M/G) "
  16441. CASE GET$ OF
  16442. WHEN "R","r" : defaultvoices$ = "n" : PROCassignvoices : PROCdisplay
  16443. WHEN "W","w" : defaultvoices$ = "y" : PROCassignvoices : PROCdisplay
  16444. WHEN "K","k" : defaultvoices$ = "n" : PROCdisplay
  16445. WHEN "S","s" : defaultvoices$ = "n" : type$ = "sustaining" : PROCrandomassign : PROCdisplay
  16446. WHEN "M","m" : defaultvoices$ = "n" : type$ = "drums" : PROCrandomassign : PROCdisplay
  16447. WHEN "D","d" : defaultvoices$ = "n" : PROCrandomdry : PROCdisplay
  16448. WHEN "G","g" : defaultvoices$ = "n" : PROCgroupassign : PROCdisplay
  16449. ENDCASE
  16450. :
  16451. ENDPROC
  16452. :
  16453. REM************************************************************************8
  16454. :
  16455. DEF PROCrandomdry
  16456. :
  16457. CLS
  16458. PRINT'" Group A = 'ch' sounds "
  16459. PRINT " Group B = 'donk' sounds "
  16460. PRINT " Group C = pizz sounds "
  16461. PRINT'" Select a group or to mix A+B press D, to mix A+C press E "
  16462. PRINT " to mix B+C press F, or to mix all three press G "
  16463. CASE GET$ OF
  16464. WHEN "A","a" : choice$ = "A"
  16465. WHEN "B","b" : choice$ = "B"
  16466. WHEN "C","c" : choice$ = "C"
  16467. WHEN "D","d" : choice$ = "D"
  16468. WHEN "E","e" : choice$ = "E"
  16469. WHEN "F","f" : choice$ = "F"
  16470. OTHERWISE choice$ = "G"
  16471. ENDCASE
  16472. :
  16473. INPUT'" between voice (for first press 0) "first%
  16474. IF first% = 0 THEN first% = 1
  16475. INPUT'" and voice (for last press 0) "last%
  16476. IF last% = 0 THEN last% = numparts%
  16477. :
  16478. FOR count% = first% TO last%
  16479. waveforms$(count%) = "empty"
  16480. NEXT
  16481. :
  16482. FOR count% = first% TO last%
  16483. :
  16484. REPEAT
  16485. x% = RND(19)
  16486. :
  16487. CASE x% OF
  16488. WHEN 1 : IF choice$ = "A" OR choice$ = "D" OR choice$ = "E" OR choice$ = "G" THEN waveforms$(count%) = "GuiroFast"
  16489. WHEN 2 : IF choice$ = "A" OR choice$ = "D" OR choice$ = "E" OR choice$ = "G" THEN waveforms$(count%) = "Cachichi1"
  16490. WHEN 3 : IF choice$ = "A" OR choice$ = "D" OR choice$ = "E" OR choice$ = "G" THEN waveforms$(count%) = "Cabasa"
  16491. WHEN 4 : IF choice$ = "A" OR choice$ = "D" OR choice$ = "E" OR choice$ = "G" THEN waveforms$(count%) = "HiHat"
  16492. WHEN 5 : IF choice$ = "A" OR choice$ = "D" OR choice$ = "E" OR choice$ = "G" THEN waveforms$(count%) = "HiHatFoot"
  16493. WHEN 7 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "TablaHi"
  16494. WHEN 8 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "Clave"
  16495. WHEN 9 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "AgogoWood"
  16496. WHEN 10 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "CongaHi"
  16497. WHEN 11 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "CowBell"
  16498. WHEN 12 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" waveforms$(count%) = "AgogoAfric"
  16499. WHEN 14 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "Vibe"
  16500. WHEN 16 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "Xylophone"
  16501. WHEN 15 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "AcouBass"
  16502. WHEN 13 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "AcuBassAb1"
  16503. WHEN 6 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "AcGuitar1"
  16504. WHEN 17 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "Bass"
  16505. WHEN 18 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "AcouGtr2B"
  16506. WHEN 19 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "GtrDobroB"
  16507. REM another possibility is Harp1
  16508. ENDCASE
  16509. :
  16510. UNTIL waveforms$(count%) <> "empty"
  16511. :
  16512. NEXT
  16513. :
  16514. PROCwindow(20,72,83,25)
  16515. VDU 14
  16516. PRINT'" Current assignations are now "
  16517. PRINT " (press Ctrl-Shift to scroll down) "
  16518. FOR count% = 1 TO numparts%
  16519. IF waveforms$(count%) <> "" THEN
  16520. PRINT'" voice ";count%;
  16521. IF insts$(count%,0)<> "" THEN PRINT " (";insts$(count%,0);")";
  16522. PRINT " - ";waveforms$(count%)
  16523. ENDIF
  16524. NEXT
  16525. VDU 15
  16526. PRINT'" Do you want to keep these, reassign,"
  16527. PRINT " use WaveSynth-Beep defaults, "
  16528. PRINT " randomly assign sustaining/dry instruments/drums "
  16529. PRINT " to all staves, or assign in groups "
  16530. PRINT " (K/R/W/S/D/M/G) "
  16531. CASE GET$ OF
  16532. WHEN "R","r" : defaultvoices$ = "n" : PROCassignvoices : PROCdisplay
  16533. WHEN "W","w" : defaultvoices$ = "y" : PROCassignvoices : PROCdisplay
  16534. WHEN "K","k" : defaultvoices$ = "n" : PROCdisplay
  16535. WHEN "S","s" : defaultvoices$ = "n" : type$ = "sustaining" : PROCrandomassign : PROCdisplay
  16536. WHEN "M","m" : defaultvoices$ = "n" : type$ = "drums" : PROCrandomassign : PROCdisplay
  16537. WHEN "D","d" : defaultvoices$ = "n" : PROCrandomdry : PROCdisplay
  16538. WHEN "G","g" : defaultvoices$ = "n" : PROCgroupassign : PROCdisplay
  16539. ENDCASE
  16540. :
  16541. ENDPROC
  16542. :
  16543. REM***********************************************************************************
  16544. :
  16545. DEF PROCgroupassign
  16546. :
  16547. CLS
  16548. PRINT'" Groups of voices ranging downwards are to "
  16549. PRINT " take the waveform of the first in the group "
  16550. INPUT " in batches of how many voices "gap%
  16551. INPUT'" To apply between voice "low%
  16552. INPUT " and voice "high%
  16553. :
  16554. FOR count% = 1 TO numparts%
  16555. :
  16556. IF count% >= low% AND count% <= high% THEN
  16557. :
  16558. x% = 0
  16559. REPEAT
  16560. :
  16561. IF count% > (low%+(gap%*x%)) AND count% < (low%+(gap%*(x%+1))) THEN
  16562. number% = low%+(gap%*x%)
  16563. waveforms$(count%) = waveforms$(number%)
  16564. ENDIF
  16565. :
  16566. x% = x%+1
  16567. UNTIL (low%+(gap%*x%)) > high%
  16568. :
  16569. ENDIF
  16570. :
  16571. NEXT
  16572. :
  16573. PROCwindow(20,72,83,25)
  16574. VDU 14
  16575. PRINT'" Current assignations are now "
  16576. PRINT " (press Ctrl-Shift to scroll down) "
  16577. FOR count% = 1 TO numparts%
  16578. IF waveforms$(count%) <> "" THEN
  16579. PRINT'" voice ";count%;
  16580. IF insts$(count%,0)<> "" THEN PRINT " (";insts$(count%,0);")";
  16581. PRINT " - ";waveforms$(count%)
  16582. ENDIF
  16583. NEXT
  16584. VDU 15
  16585. PRINT'" Do you want to keep these, reassign,"
  16586. PRINT " use WaveSynth-Beep defaults, "
  16587. PRINT " randomly assign sustaining/dry instruments "
  16588. PRINT " to all staves, or assign in groups "
  16589. PRINT " (K/R/W/S/D/G) "
  16590. CASE GET$ OF
  16591. WHEN "R","r" : defaultvoices$ = "n" : PROCassignvoices : PROCdisplay
  16592. WHEN "W","w" : defaultvoices$ = "y" : PROCassignvoices : PROCdisplay
  16593. WHEN "K","k" : defaultvoices$ = "n" : PROCdisplay
  16594. WHEN "S","s" : defaultvoices$ = "n" : PROCrandomassign : PROCdisplay
  16595. WHEN "D","d" : defaultvoices$ = "n" : PROCrandomdry : PROCdisplay
  16596. WHEN "G","g" : defaultvoices$ = "n" : PROCgroupassign : PROCdisplay
  16597. ENDCASE
  16598. :
  16599. ENDPROC
  16600. :
  16601. REM***********************************************************************************
  16602. :
  16603. DEF PROCpitchstring4
  16604. :
  16605. CLS
  16606. INPUT'" How many attacks "many%
  16607. PRINT'" the first note is ";
  16608. COLOUR 3
  16609. CASE GET$ OF
  16610. WHEN "c" : note1% = 0 : PRINT "C"
  16611. WHEN "d" : note1% = 1 : PRINT "D"
  16612. WHEN "e" : note1% = 2 : PRINT "E"
  16613. WHEN "f" : note1% = 3 : PRINT "F"
  16614. WHEN "g" : note1% = 4 : PRINT "G"
  16615. WHEN "a" : note1% = 5 : PRINT "A"
  16616. WHEN "b" : note1% = 6 : PRINT "B"
  16617. ENDCASE
  16618. COLOUR 0
  16619. PRINT " accidental ";
  16620. COLOUR 3
  16621. CASE GET$ OF
  16622. WHEN "1" : accid1% = 1 : PRINT " flat"
  16623. WHEN "2" : accid1% = 2 : PRINT " 3/8 flat"
  16624. WHEN "3" : accid1% = 3 : PRINT " 1/4 flat"
  16625. WHEN "4" : accid1% = 4 : PRINT " 1/8 flat"
  16626. WHEN "5" : accid1% = 5 : PRINT " natural"
  16627. WHEN "6" : accid1% = 6 : PRINT " 1/8 sharp"
  16628. WHEN "7" : accid1% = 7 : PRINT " 1/4 sharp"
  16629. WHEN "8" : accid1% = 8 : PRINT " 3/8 sharp"
  16630. WHEN "9" : accid1% = 9 : PRINT " sharp"
  16631. ENDCASE
  16632. COLOUR 0
  16633. PRINT " octave ";
  16634. COLOUR 3
  16635. CASE GET$ OF
  16636. WHEN "1" : octave1% = 1 : PRINT " octave 1"
  16637. WHEN "2" : octave1% = 2 : PRINT " octave 2"
  16638. WHEN "3" : octave1% = 3 : PRINT " octave 3"
  16639. WHEN "4" : octave1% = 4 : PRINT " octave 4"
  16640. WHEN "5" : octave1% = 5 : PRINT " octave 5"
  16641. WHEN "6" : octave1% = 6 : PRINT " octave 6"
  16642. WHEN "7" : octave1% = 7 : PRINT " octave 7"
  16643. WHEN "8" : octave1% = 8 : PRINT " octave 8"
  16644. ENDCASE
  16645. COLOUR 0
  16646. PRINT'" and the second note is ";
  16647. COLOUR 3
  16648. CASE GET$ OF
  16649. WHEN "c" : note2% = 0 : PRINT "C"
  16650. WHEN "d" : note2% = 1 : PRINT "D"
  16651. WHEN "e" : note2% = 2 : PRINT "E"
  16652. WHEN "f" : note2% = 3 : PRINT "F"
  16653. WHEN "g" : note2% = 4 : PRINT "G"
  16654. WHEN "a" : note2% = 5 : PRINT "A"
  16655. WHEN "b" : note2% = 6 : PRINT "B"
  16656. ENDCASE
  16657. COLOUR 0
  16658. PRINT " accidental ";
  16659. COLOUR 3
  16660. CASE GET$ OF
  16661. WHEN "1" : accid2% = 1 : PRINT " flat"
  16662. WHEN "2" : accid2% = 2 : PRINT " 3/8 flat"
  16663. WHEN "3" : accid2% = 3 : PRINT " 1/4 flat"
  16664. WHEN "4" : accid2% = 4 : PRINT " 1/8 flat"
  16665. WHEN "5" : accid2% = 5 : PRINT " natural"
  16666. WHEN "6" : accid2% = 6 : PRINT " 1/8 sharp"
  16667. WHEN "7" : accid2% = 7 : PRINT " 1/4 sharp"
  16668. WHEN "8" : accid2% = 8 : PRINT " 3/8 sharp"
  16669. WHEN "9" : accid2% = 9 : PRINT " sharp"
  16670. ENDCASE
  16671. COLOUR 0
  16672. PRINT " octave ";
  16673. COLOUR 3
  16674. CASE GET$ OF
  16675. WHEN "1" : octave2% = 1 : PRINT " octave 1"
  16676. WHEN "2" : octave2% = 2 : PRINT " octave 2"
  16677. WHEN "3" : octave2% = 3 : PRINT " octave 3"
  16678. WHEN "4" : octave2% = 4 : PRINT " octave 4"
  16679. WHEN "5" : octave2% = 5 : PRINT " octave 5"
  16680. WHEN "6" : octave2% = 6 : PRINT " octave 6"
  16681. WHEN "7" : octave2% = 7 : PRINT " octave 7"
  16682. WHEN "8" : octave2% = 8 : PRINT " octave 8"
  16683. ENDCASE
  16684. COLOUR 0
  16685. tick% = 1
  16686. FOR count% = 1 TO many%
  16687. IF tick% = 1 THEN
  16688. pitches%(count%-1) = (note1%*100)+(accid1%*10)+octave1%
  16689. ELSE
  16690. pitches%(count%-1) = (note2%*100)+(accid2%*10)+octave2%
  16691. ENDIF
  16692. IF tick% = 1 THEN tick% = 2 ELSE tick% = 1
  16693. NEXT
  16694. :
  16695. numpitches% = many%
  16696. PROCinsertpitches
  16697. :
  16698. ENDPROC
  16699. :
  16700. REM*********************************************************************************
  16701. :
  16702. DEF PROCcopyonenote
  16703. :
  16704. repeatposit$ = "n"
  16705. IF distort$ = "OFF" THEN dothis$ = "YES"
  16706. IF distort$ = "ON" THEN
  16707. IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
  16708. ENDIF
  16709. copymove$ = "C" : savevoice$ = "N" : justone$ = "y"
  16710. :
  16711. PROCcopy2
  16712. :
  16713. justone$ = "n"
  16714. :
  16715. ENDPROC
  16716. :
  16717. REM***********************************************************************************
  16718. :
  16719. DEF PROCcopygroupofnotes
  16720. :
  16721. repeatposit$ = "n"
  16722. IF distort$ = "OFF" THEN dothis$ = "YES"
  16723. IF distort$ = "ON" THEN
  16724. IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
  16725. ENDIF
  16726. :
  16727. copymove$ = "C" : savevoice$ = "N" : justone$ = "n"
  16728. :
  16729. PROCcopy2
  16730. :
  16731. ENDPROC
  16732. :
  16733. REM*************************************************************************************
  16734. :
  16735. DEF PROCcopydownwards
  16736. :
  16737. repeatposit$ = "n"
  16738. IF distort$ = "OFF" THEN dothis$ = "YES"
  16739. IF distort$ = "ON" THEN
  16740. IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
  16741. ENDIF
  16742. copymove$ = "C" : savevoice$ = "N" : justone$ = "y"
  16743. :
  16744. voice% = displayvoices%(startv%)
  16745. voice% = voice%-1
  16746. :
  16747. along% = copydownwards%
  16748. :
  16749. along%-=1
  16750. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  16751. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  16752. holdbar% = copystartbar%
  16753. holdbeat% = copystartbeat%
  16754. :
  16755. copyendbar% = copystartbar%
  16756. copyendbeat% = copystartbeat%
  16757. :
  16758. value% = (copystartbar%*10^3)+copystartbeat%
  16759. IF value% <= array%(0,0,voice%)DIV10^3 THEN
  16760. startatcell% = 0
  16761. ELSE
  16762. PROCsearch(value%)
  16763. startatcell% = startcell%
  16764. ENDIF
  16765. IF copyendbar% = 0 THEN
  16766. endatcell% = numusedcells%(voice%) - 1
  16767. ELSE
  16768. value% = (copyendbar%*10^3)+copyendbeat%
  16769. IF value% >= array%(numusedcells%(voice%)-1,0,voice%)DIV10^3 THEN
  16770. endatcell% = numusedcells%(voice%) - 1
  16771. ELSE
  16772. PROCsearch(value%)
  16773. IF shunt$ = "N" THEN endatcell% = startcell% ELSE endatcell% = startcell% - 1
  16774. ENDIF
  16775. ENDIF
  16776. :
  16777. manyattacks% = endatcell% - startatcell% + 1
  16778. REM create 'gap' between beat-of-bar and first actual attack
  16779. carrybars% = (array%(startatcell%,0,voice%)DIV10^6)-copystartbar%
  16780. carrybeats% = ((array%(startatcell%,0,voice%)DIV10^3)MOD10^3)-copystartbeat%
  16781. attacks1%(0) = (carrybars%*960)+carrybeats%
  16782. :
  16783. IF copymove$ = "C" OR copymove$ = "M" THEN
  16784. FOR count% = 0 TO (manyattacks%-1)
  16785. IF count% > 0 THEN
  16786. carrybars% = (array%(startatcell%+count%,0,voice%)DIV10^6)-(array%(startatcell%+count%-1,0,voice%)DIV10^6)
  16787. carrybeats% = ((array%(startatcell%+count%,0,voice%)DIV10^3)MOD10^3)-((array%(startatcell%+count%-1,0,voice%)DIV10^3)MOD10^3)
  16788. attacks1%(count%) = attacks1%(count%-1) + ((carrybars%*960)+carrybeats%)
  16789. ENDIF
  16790. :
  16791. pitches%(count%) = array%(startatcell%+count%,0,voice%)MOD10^3
  16792. dur% = (array%(startatcell%+count%,1,voice%)DIV10)MOD10^3
  16793. brrr% = array%(startatcell%+count%,0,voice%)DIV10^6 : PROCreconvertdur
  16794. durations%(count%) = dur%
  16795. amplitudes%(count%) = (array%(startatcell%+count%,1,voice%))MOD10
  16796. envelopes%(count%) = (array%(startatcell%+count%,2,voice%))DIV10^2
  16797. glissandos%(count%) = array%(startatcell%+count%,1,voice%)DIV10^4
  16798. inflections%(count%) = array%(startatcell%+count%,2,voice%)MOD10^2
  16799. NEXT
  16800. ELSE PROCextract
  16801. ENDIF
  16802. :
  16803. IF copymove$ = "M" THEN
  16804. numnotes% = manyattacks% : startcell% = startatcell%
  16805. FOR count% = startcell% TO (startcell%+(numnotes%-1))
  16806. FOR counter% = 0 TO 1
  16807. barno% = (array%(count%,0,voice%)DIV10^6)-counter%
  16808. beatnum% = ((array%(count%,0,voice%)DIV10^3)MOD10^3)
  16809. :
  16810. group1start% = (disarray%(barno%,0,voice%)DIV10^7)*beatfactor%
  16811. group1end% = group1start% + (((disarray%(barno%,0,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
  16812. IF beatnum%+(960*counter%) >= group1start% AND beatnum%+(960*counter%) <= group1end% THEN
  16813. disarray%(barno%,0,voice%) = disarray%(barno%,0,voice%)MOD10^3
  16814. ENDIF
  16815. :
  16816. group2start% = ((disarray%(barno%,0,voice%)DIV10)MOD10^2)*beatfactor%
  16817. group2end% = group2start%+((((disarray%(barno%,0,voice%)MOD10)*10)+(disarray%(barno%,1,voice%)DIV10^8))*beatfactor%)-1
  16818. IF beatnum%+(960*counter%) >= group2start% AND beatnum%+(960*counter%) <= group2end% THEN
  16819. disarray%(barno%,0,voice%) = (disarray%(barno%,0,voice%)DIV10^3)*10^3
  16820. disarray%(barno%,1,voice%) = disarray%(barno%,1,voice%)MOD10^6
  16821. ENDIF
  16822. group3start%=((disarray%(barno%,1,voice%)DIV10^4)MOD10^2)*beatfactor%
  16823. group3end% = group3start% + (((disarray%(barno%,1,voice%)MOD10^4)DIV10^2)*beatfactor%)-1
  16824. IF beatnum%+(960*counter%) >= group3start% AND beatnum%+(960*counter%) <= group3end% THEN
  16825. disarray%(barno%,1,voice%) = (disarray%(barno%,1,voice%)DIV10^6)*10^6
  16826. ENDIF
  16827. group4start% = (disarray%(barno%,2,voice%)DIV10^7)*beatfactor%
  16828. group4end% = group4start%+(((disarray%(barno%,2,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
  16829. IF beatnum%+(960*counter%) >= group4start% AND beatnum%+(960*counter%) <= group4end% THEN
  16830. disarray%(barno%,2,voice%) = disarray%(barno%,2,voice%)MOD10^3
  16831. ENDIF
  16832. group5start% = ((disarray%(barno%,2,voice%)MOD10^3)DIV10)*beatfactor%
  16833. group5end% = group5start%+((((disarray%(barno%,2,voice%)MOD10)*10)+(disarray%(barno%,3,voice%)DIV10^8))*beatfactor%)-1
  16834. IF beatnum%+(960*counter%) >= group5start% AND beatnum%+(960*counter%) <= group5end% THEN
  16835. disarray%(barno%,2,voice%) = (disarray%(barno%,2,voice%)DIV10^3)*10^3
  16836. disarray%(barno%,3,voice%) = disarray%(barno%,3,voice%)MOD10^6
  16837. ENDIF
  16838. group6start% = ((disarray%(barno%,3,voice%)DIV10^4)MOD10^2)*beatfactor%
  16839. group6end% = group6start% + (((disarray%(barno%,3,voice%)DIV10^2)MOD10^2)*beatfactor%)-1
  16840. IF beatnum%+(960*counter%) >= group6start% AND beatnum%+(960*counter%) <= group6end% THEN
  16841. disarray%(barno%,3,voice%)=(disarray%(barno%,3,voice%)DIV10^6)*10^6
  16842. ENDIF
  16843. NEXT
  16844. :
  16845. NEXT
  16846. PROCshuntleft(startcell%,numnotes%)
  16847. ENDIF
  16848. :
  16849. numpitches% = manyattacks% : method$ = "raw" : copyit$ = "ON" : copydownwards$ = "y"
  16850. :
  16851. PROCinsertattacks
  16852. :
  16853. justone$ = "n" : copydownwards$ = "n"
  16854. ENDPROC
  16855. :
  16856. REM****************************************************************
  16857. :
  16858. DEF PROCdeleteone
  16859. :
  16860. CASE deleteone$ OF
  16861. WHEN "top" :
  16862. voice% = 1
  16863. voice% = displayvoices%(startv%+voice%-1)
  16864. voice% -= 1
  16865. WHEN "middle" :
  16866. voice% = 2
  16867. voice% = displayvoices%(startv%+voice%-1)
  16868. voice% -= 1
  16869. WHEN "bottom" :
  16870. voice% = 3
  16871. voice% = displayvoices%(startv%+voice%-1)
  16872. voice% -= 1
  16873. ENDCASE
  16874. :
  16875. numnotes% = 1
  16876. :
  16877. incre$ = INKEY$(100)
  16878. IF incre$ <> "" THEN
  16879. CASE incre$ OF
  16880. WHEN "!" : along% = 1
  16881. WHEN """" : along% = 2
  16882. WHEN "£" : along% = 3
  16883. WHEN "$" : along% = 4
  16884. WHEN "%" : along% = 5
  16885. WHEN "^" : along% = 6
  16886. WHEN "&" : along% = 7
  16887. WHEN "*" : along% = 8
  16888. WHEN "(" : along% = 9
  16889. WHEN ")" : along% = 10
  16890. ENDCASE
  16891. ELSE along% = 1
  16892. ENDIF
  16893. :
  16894. IF addten$ = "y" THEN along% +=10
  16895. IF addten$ = "twenty" THEN along% +=20
  16896. :
  16897. along%-=1
  16898. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  16899. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  16900. beats% = copystartbeat%
  16901. PROCalterbeats
  16902. start% = (copystartbar%*(10^3))+beats%
  16903. PROCsearch(start%)
  16904. PROCshuntleft(startcell%,numnotes%)
  16905. :
  16906. deleteone$ = "none"
  16907. ENDPROC
  16908. :
  16909. REM**********************************************************************
  16910. :
  16911. DEF PROCpitchstring5
  16912. :
  16913. IF easiermenus$ = "n" THEN PROCwindow(20,65,60,55) ELSE PROCwindow(20,65,60,42)
  16914. PRINT'" This function returns a string"
  16915. PRINT" of pitches which recycles an"
  16916. PRINT" ascending chromatic scale,"
  16917. PRINT" useful for subsequently"
  16918. PRINT" extracting certain pitches"
  16919. INPUT'" How many semitones in the scale "numsemis%
  16920. INPUT'" How many pitches in the string "numpitches%
  16921. counter% = 0
  16922. :
  16923. FOR count% = 0 TO numpitches%-1
  16924. counter% += 1
  16925. CASE counter% OF
  16926. WHEN 1 : pitches%(count%) = 54
  16927. WHEN 2 : pitches%(count%) = 94
  16928. WHEN 3 : pitches%(count%) = 154
  16929. WHEN 4 : pitches%(count%) = 214
  16930. WHEN 5 : pitches%(count%) = 254
  16931. WHEN 6 : pitches%(count%) = 354
  16932. WHEN 7 : pitches%(count%) = 394
  16933. WHEN 8 : pitches%(count%) = 454
  16934. WHEN 9 : pitches%(count%) = 514
  16935. WHEN 10 : pitches%(count%) = 554
  16936. WHEN 11 : pitches%(count%) = 614
  16937. WHEN 12 : pitches%(count%) = 654
  16938. ENDCASE
  16939. :
  16940. IF counter% = numsemis% THEN counter% = 0
  16941. :
  16942. NEXT
  16943. :
  16944. PROCinsertpitches
  16945. ENDPROC
  16946. :
  16947. ******************************************
  16948. :
  16949. DEF PROCdurationsbetween
  16950. :
  16951. IF numdurations% = 111 THEN mode$ = "legato"
  16952. IF numdurations% = 222 THEN mode$ = "mezzostacc"
  16953. PROCwindow(20,69,60,55)
  16954. CLS
  16955. :
  16956. IF screenvoices$ = "n" THEN
  16957. INPUT' " Which voice (0 = top) "voice%
  16958. IF voice% = 0 THEN PROCpressenter
  16959. ELSE
  16960. PRINT'" Which screen voice "
  16961. CASE GET$ OF
  16962. WHEN "1" : voice% = 1
  16963. WHEN "2" : voice% = 2
  16964. WHEN "3" : voice% = 3
  16965. OTHERWISE PROCpressenter
  16966. ENDCASE
  16967. ENDIF
  16968. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  16969. voice% -= 1
  16970. IF voice% >= 0 THEN samevoice% = voice%
  16971. IF voice% = -1 THEN voice% = samevoice%
  16972. :
  16973. PRINT'" How many gaps to be filled "
  16974. INPUT " (for 1 press 0) "numdurations%
  16975. PRINT'" starting at note number "
  16976. INPUT " (for 1 press 0) "note%
  16977. IF note% = 0 THEN note% = 1
  16978. :
  16979. PROCnewnotereception(voice%,startbar%,0,0,0,0,0,0,0)
  16980. CASE option% OF
  16981. WHEN 1 : startcell% = 0
  16982. WHEN 2 : startcell% = numusedcells%(voice%)
  16983. WHEN 3 : startcell% = 0
  16984. WHEN 4 : start% = firstbar%*10^3 : PROCsearch(start%)
  16985. ENDCASE
  16986. silly% = startcell%+note%-1
  16987. :
  16988. FOR count% = 0 TO numdurations%-1
  16989. beatdiff% = ((array%(silly%+1+count%,0,voice%)DIV10^3)MOD10^3)-((array%(silly%+count%,0,voice%)DIV10^3)MOD10^3)
  16990. beatdiff%+=(((array%(silly%+1+count%,0,voice%)DIV10^6)-(array%(silly%+count%,0,voice%)DIV10^6))*960)
  16991. CASE mode$ OF
  16992. WHEN "legato" :
  16993. durations%(count%+1) = beatdiff%
  16994. OTHERWISE
  16995. durations%(count%+1) = beatdiff%/2
  16996. ENDCASE
  16997. :
  16998. NEXT
  16999. :
  17000. along% = note%-1
  17001. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  17002. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  17003. beats% = copystartbeat%
  17004. PROCalterbeats
  17005. startat% = (copystartbar%*(10^3))+beats%
  17006. :
  17007. PROCsearch(startat%)
  17008. shunt$ = "N"
  17009. :
  17010. FOR count% = startcell% TO (startcell%+(numdurations%-1))
  17011. PROCcellfill(count%,voice%,999,999,999,9,999,durations%(count%-startcell%+1),99,99)
  17012. NEXT
  17013. :
  17014. PROCdisplay
  17015. :
  17016. ENDPROC
  17017. :
  17018. REM************************************************************************88
  17019. :
  17020. DEF PROCshortmove
  17021. :
  17022. ON : PROCwindow(20,69,60,55)
  17023. CLS
  17024. repeatposit$ = "n"
  17025. IF distort$ = "OFF" THEN dothis$ = "YES"
  17026. IF distort$ = "ON" THEN
  17027. IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
  17028. ENDIF
  17029. :
  17030. IF dothis$ = "YES" THEN
  17031. copymove$ = "M" : savevoice$ = "N" : justone$ = "n"
  17032. ELSE copymove$ = "C"
  17033. ENDIF
  17034. :
  17035. PROCcopy2
  17036. IF quickextract$ = "y" THEN quickextract$ = "n"
  17037. :
  17038. ENDPROC
  17039. :
  17040. REM***********************************************************************8
  17041. :
  17042. DEF PROCshortmoveone
  17043. :
  17044. ON : PROCwindow(20,69,60,55)
  17045. CLS
  17046. repeatposit$ = "n"
  17047. IF distort$ = "OFF" THEN dothis$ = "YES"
  17048. IF distort$ = "ON" THEN
  17049. IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
  17050. ENDIF
  17051. :
  17052. IF dothis$ = "YES" THEN
  17053. copymove$ = "M" : savevoice$ = "N" : justone$ = "y"
  17054. ELSE copymove$ = "C"
  17055. ENDIF
  17056. :
  17057. PROCcopy2
  17058. IF quickextract$ = "y" THEN quickextract$ = "n"
  17059. :
  17060. ENDPROC
  17061. :
  17062. REM************************************************************************
  17063. :
  17064. DEF PROCcopysuccessively
  17065. :
  17066. IF succfirsttime$ = "y" THEN
  17067. INPUT'" Which voice? (0 = top) "voice%
  17068. IF voice% = 0 THEN PROCpressenter
  17069. fromvoice% = voice%
  17070. succfirsttime$ = "n"
  17071. succcounter% = 0
  17072. ELSE succcounter% += 1
  17073. ENDIF
  17074. :
  17075. IF succcounter% > 0 THEN
  17076. :
  17077. fromvoice% += 1 : voice% = fromvoice%
  17078. PRINT' " That's voice ";voice%;"?"
  17079. PRINT' " (0 = yes/C = cancel successive copying) "
  17080. CASE GET$ OF
  17081. WHEN "C","c" :
  17082. copysuccessively$ = "n" : succfirsttime$ = "y" : PROCdisplay
  17083. OTHERWISE
  17084. ENDCASE
  17085. :
  17086. ENDIF
  17087. :
  17088. ENDPROC
  17089. :
  17090. REM***************************************************************************
  17091. :
  17092. DEF PROCpressenter
  17093. :
  17094. COLOUR 3
  17095. incre$ = INKEY$(50)
  17096. IF incre$ = "" THEN
  17097. IF screenvoices$ = "y" THEN
  17098. voice% = 1 : PRINT ' voice%
  17099. ELSE
  17100. voice% = displayvoices%(startv%) : PRINT ' voice%
  17101. ENDIF
  17102. ELSE
  17103. incre$ = INKEY$(50)
  17104. IF screenvoices$ = "y" THEN
  17105. IF incre$ = "" THEN voice% = 2 ELSE voice% = 3
  17106. PRINT ' voice%
  17107. ELSE
  17108. IF incre$ = "" THEN voice% = displayvoices%(startv%+1) ELSE voice% = displayvoices%(startv%+2)
  17109. PRINT ' voice%
  17110. ENDIF
  17111. ENDIF
  17112. COLOUR 0
  17113. :
  17114. ENDPROC
  17115. :
  17116. REM***************************************************************************
  17117. :
  17118. DEF PROCfornexttime
  17119. :
  17120. IF housekeepingdimmed$ = "n" THEN
  17121. DIM lastfilename$(9)
  17122. ENDIF
  17123. *Dir SDFS::RISCOSpi.$.CAC.Files
  17124. thisfilename$ = "housekeeping2"
  17125. channel = OPENOUT thisfilename$
  17126. FOR count% = 1 TO 9
  17127. PRINT#channel, lastfilename$(count%)
  17128. NEXT
  17129. CLOSE#channel
  17130. *NoDir
  17131. :
  17132. ENDPROC
  17133. :
  17134. REM****************************************************************************
  17135. :
  17136. DEF PROChousekeeping
  17137. :
  17138. IF housekeepingdimmed$ = "n" THEN
  17139. DIM lastfilename$(9) : housekeepingdimmed$ = "y"
  17140. ENDIF
  17141. *Dir SDFS::RISCOSpi.$.CAC.Files
  17142. thisfilename$ = "housekeeping2"
  17143. channel = OPENIN thisfilename$
  17144. REPEAT
  17145. FOR count% = 1 TO 9
  17146. INPUT#channel, lastfilename$(count%)
  17147. NEXT
  17148. UNTIL EOF#channel
  17149. CLOSE#channel
  17150. *NoDir
  17151. :
  17152. ENDPROC
  17153. :
  17154. REM*****************************************************************************
  17155. :
  17156. DEF PROCshuntlastfilename
  17157. :
  17158. FOR count% = 9 TO 2 STEP -1
  17159. lastfilename$(count%) = lastfilename$(count%-1)
  17160. NEXT
  17161. lastfilename$(1) = filename$
  17162. :
  17163. ENDPROC
  17164. :
  17165. REM*****************************************************************************
  17166. :
  17167. DEF PROCspecialshunt
  17168. :
  17169. FOR count% = theone% TO 2 STEP -1
  17170. lastfilename$(count%) = lastfilename$(count%-1)
  17171. NEXT
  17172. lastfilename$(1) = filename$
  17173. :
  17174. ENDPROC
  17175. :
  17176. REM******************************************************************************
  17177. :
  17178. DEF PROCroguenotes
  17179. :
  17180. FOR count% = 0 TO numparts%-1
  17181. array%(numusedcells%(count%),0,count%) = 0
  17182. NEXT
  17183. :
  17184. PROCdisplay
  17185. :
  17186. ENDPROC
  17187. :
  17188. REM*******************************************************************
  17189. :
  17190. DEF PROCnotenumberfreq
  17191. :
  17192. CASE nosevery% OF
  17193. WHEN 1 :
  17194. IF howmany% >= startnos% THEN printnumber$ = "y" ELSE printnumber$ = "n"
  17195. WHEN 2 :
  17196. howmany = howmany%/2
  17197. howmany = (howmany * 10) MOD 10
  17198. IF howmany = 5 THEN printnumber$ = "n" ELSE printnumber$ = "y"
  17199. IF howmany% < startnos% THEN printnumber$ = "n"
  17200. WHEN 4 :
  17201. howmany = howmany%/4
  17202. howmany = (howmany * 10) MOD 10
  17203. IF howmany = 2 OR howmany = 5 OR howmany = 7 THEN printnumber$ = "n" ELSE printnumber$ = "y"
  17204. IF howmany% < startnos% THEN printnumber$ = "n"
  17205. WHEN 10 :
  17206. IF howmany% MOD 10 = 0 THEN printnumber$ = "y" ELSE printnumber$ = "n"
  17207. IF howmany% < startnos% THEN printnumber$ = "n"
  17208. ENDCASE
  17209. :
  17210. ENDPROC
  17211. :
  17212. REM**************************************************************************
  17213. :
  17214. DEF PROCnotenumbersep
  17215. old% = current%
  17216. current% = hposn%-100
  17217. gap% = current%-old%
  17218. IF old% <> 0 AND howmany% > 1 THEN
  17219. IF gap% < 50 THEN lowernumber% += 20 ELSE lowernumber% = 0
  17220. IF (hposn%-100) - firsttrack% > 50 THEN
  17221. lowernumber% = 0
  17222. firsttrack% = hposn%-100
  17223. ENDIF
  17224. ENDIF
  17225. ENDPROC
  17226. :
  17227. REM****************************************************************************
  17228. :
  17229. DEF PROCpitchstring6
  17230. :
  17231. CLS
  17232. PRINT'" How many semitones high is the "
  17233. INPUT " vertical space (0 = previous) "height
  17234. IF height = 0 THEN
  17235. height = previousheight
  17236. COLOUR 3
  17237. PRINT' previousheight
  17238. COLOUR 0
  17239. ENDIF
  17240. PRINT'" and this is to be divided into "
  17241. INPUT " how many steps "steps
  17242. IF steps = 0 THEN
  17243. steps = previoussteps
  17244. COLOUR 3
  17245. PRINT' previoussteps
  17246. COLOUR 0
  17247. ENDIF
  17248. :
  17249. each = height/(steps-1)
  17250. result = 0
  17251. FOR count% = 1 TO (steps-1)
  17252. result += each
  17253. IF ((result*10)MOD10) <= 5 add$ = "n" ELSE add$ = "y"
  17254. result% = result DIV 1
  17255. IF add$ = "y" result% += 1
  17256. :
  17257. oct% = 1
  17258. IF result% > 11 THEN
  17259. REPEAT
  17260. result% -= 12
  17261. oct% += 1
  17262. UNTIL result% < 12
  17263. ENDIF
  17264. :
  17265. CASE result% OF
  17266. WHEN 0 : pitch% = 050
  17267. WHEN 1 : pitch% = 090
  17268. WHEN 2 : pitch% = 150
  17269. WHEN 3 : pitch% = 210
  17270. WHEN 4 : pitch% = 250
  17271. WHEN 5 : pitch% = 350
  17272. WHEN 6 : pitch% = 390
  17273. WHEN 7 : pitch% = 450
  17274. WHEN 8 : pitch% = 490
  17275. WHEN 9 : pitch% = 550
  17276. WHEN 10 : pitch% = 610
  17277. WHEN 11 : pitch% = 650
  17278. ENDCASE
  17279. :
  17280. pitch% += oct%
  17281. pitches%(count%) = pitch%
  17282. pitches%(0) = 051
  17283. NEXT
  17284. numpitches% = steps
  17285. :
  17286. PRINT'" Contour upwards, downwards,"
  17287. PRINT " up-down, down-up (1/2/3/4) "
  17288. CASE GET$ OF
  17289. WHEN "1" : previouscontour$ = "1"
  17290. WHEN "2" : previouscontour$ = "2" : PROCcontourdown
  17291. WHEN "3" : previouscontour$ = "3" : PROCcontourupdown
  17292. WHEN "4" : previouscontour$ = "4" : PROCcontourdownup
  17293. OTHERWISE
  17294. CASE previouscontour$ OF
  17295. WHEN "1" : COLOUR 3 : PRINT'" upwards " : COLOUR 0
  17296. wait$ = INKEY$(50)
  17297. WHEN "2" : PROCcontourdown : COLOUR 3 : PRINT' "downwards " : COLOUR 0
  17298. wait$ = INKEY$(50)
  17299. WHEN "3" : PROCcontourupdown : COLOUR 3 : PRINT'" up-down " : COLOUR 0
  17300. wait$ = INKEY$(50)
  17301. WHEN "4" : PROCcontourdownup : COLOUR 3 : PRINT' " down-up " : COLOUR 0
  17302. wait$ = INKEY$(50)
  17303. ENDCASE
  17304. ENDCASE
  17305. :
  17306. previousheight = height
  17307. previoussteps = steps
  17308. :
  17309. PROCinsertpitches
  17310. :
  17311. ENDPROC
  17312. :
  17313. REM************************************************************************8
  17314. :
  17315. DEF PROCcontourdown
  17316. :
  17317. FOR count% = 0 TO (numpitches%-1)
  17318. pitches1%(count%) = pitches%((numpitches%-1)-count%)
  17319. NEXT
  17320. FOR count% = 0 TO (numpitches%-1)
  17321. pitches%(count%) = pitches1%(count%)
  17322. NEXT
  17323. :
  17324. ENDPROC
  17325. :
  17326. REM***************************************************************************
  17327. :
  17328. DEF PROCcontourupdown
  17329. :
  17330. middle% = ((numpitches%+1)/2)-1
  17331. addnumber% = 1
  17332. minusnumber% = 0
  17333. swing$ = "add"
  17334. FOR count% = 0 TO (numpitches%-1)
  17335. IF swing$ = "subtract" THEN swing$ = "add" ELSE swing$ = "subtract"
  17336. :
  17337. IF swing$ = "add" THEN
  17338. pitches1%(middle%+addnumber%) = pitches%((numpitches%-1)-count%)
  17339. addnumber% += 1
  17340. ELSE
  17341. pitches1%(middle%-minusnumber%) = pitches%((numpitches%-1)-count%)
  17342. minusnumber% += 1
  17343. ENDIF
  17344. NEXT
  17345. :
  17346. FOR count% = 0 TO (numpitches%-1)
  17347. pitches%(count%) = pitches1%(count%)
  17348. NEXT
  17349. :
  17350. ENDPROC
  17351. :
  17352. REM******************************************************************************
  17353. :
  17354. DEF PROCcontourdownup
  17355. :
  17356. middle% = ((numpitches%+1)/2)-1
  17357. addnumber% = 1
  17358. minusnumber% = 0
  17359. swing$ = "add"
  17360. FOR count% = 0 TO (numpitches%-1)
  17361. IF swing$ = "subtract" THEN swing$ = "add" ELSE swing$ = "subtract"
  17362. :
  17363. IF swing$ = "add" THEN
  17364. pitches1%(middle%+addnumber%) = pitches%(count%)
  17365. addnumber% += 1
  17366. ELSE
  17367. pitches1%(middle%-minusnumber%) = pitches%(count%)
  17368. minusnumber% += 1
  17369. ENDIF
  17370. NEXT
  17371. :
  17372. FOR count% = 0 TO (numpitches%-1)
  17373. pitches%(count%) = pitches1%(count%)
  17374. NEXT
  17375. :
  17376. ENDPROC
  17377. :
  17378. REM**********************************************************************************
  17379. :
  17380. DEF PROCdisplayonlycontent
  17381. :
  17382. IF onlycontent$ = "n" THEN
  17383. displayvoices%() = displayvoices1%() : numvoices% = numvoices1%
  17384. ELSE
  17385. voicedone% = -1 : voicesdone% = 0 : displayvoices1%() = displayvoices%()
  17386. numvoices1% = numvoices%
  17387. FOR count% = 1 TO numvoices%
  17388. FOR counter% = startbar% TO (startbar%+numbars%-1)
  17389. voice% = displayvoices%(count%)-1
  17390. addingnotes$ = "n"
  17391. PROCnewnotereception(voice%,counter%,0,0,0,0,0,0,0)
  17392. CASE option% OF
  17393. WHEN 1 : startcell% = 0
  17394. WHEN 2 : startcell% = numusedcells%(voice%)
  17395. WHEN 3 : startcell% = 0
  17396. WHEN 4 : PROCsearch(counter%*10^3)
  17397. ENDCASE
  17398. IF array%(startcell%,0,voice%) DIV10^6 > 0 THEN
  17399. IF (array%(startcell%,0,voice%) DIV10^6) < (startbar%+numbars%) THEN
  17400. IF voice% <> voicedone% THEN
  17401. voicesdone% += 1 : displayvoices%(voicesdone%) = (voice%+1) : holddisplay%(voicesdone%) = (voice%+1)
  17402. voicedone% = voice%
  17403. ENDIF
  17404. ENDIF
  17405. ENDIF
  17406. NEXT
  17407. NEXT
  17408. :
  17409. numvoices% = voicesdone% : startv% = 1 : holdstart% = 1
  17410. :
  17411. ENDIF
  17412. :
  17413. PROCdisplay
  17414. :
  17415. ENDPROC
  17416. :
  17417. REM**********************************************************8
  17418. :
  17419. DEF PROCcontentonlylist
  17420. :
  17421. CLS
  17422. PRINT ""
  17423. voicedone% = -1
  17424. FOR count% = 1 TO numvoices%
  17425. FOR counter% = startbar% TO (startbar%+numbars%-1)
  17426. voice% = displayvoices%(count%)-1
  17427. addingnotes$ = "n"
  17428. PROCnewnotereception(voice%,counter%,0,0,0,0,0,0,0)
  17429. CASE option% OF
  17430. WHEN 1 : startcell% = 0
  17431. WHEN 2 : startcell% = numusedcells%(voice%)
  17432. WHEN 3 : startcell% = 0
  17433. WHEN 4 : PROCsearch(counter%*10^3)
  17434. ENDCASE
  17435. IF array%(startcell%,0,voice%) DIV 10^6 > 0 THEN
  17436. IF (array%(startcell%,0,voice%)) DIV 10^6 < (startbar%+numbars%) THEN
  17437. IF voice% <> voicedone% THEN
  17438. IF compress$ = "n" THEN
  17439. PRINT ' voice%+1;". ";insts$(voice%+1,0)
  17440. ELSE
  17441. PRINT voice%+1;". ";insts$(voice%+1,0)
  17442. ENDIF
  17443. voicedone% = voice%
  17444. ENDIF
  17445. ENDIF
  17446. ENDIF
  17447. NEXT
  17448. NEXT
  17449. :
  17450. PRINT'" (press R to remove the list, press C to"
  17451. PRINT'" compress/uncompress the list or press Q to"
  17452. PRINT'" go to Quickdisplay without removing the list"
  17453. CASE GET$ OF
  17454. WHEN "C","c" :
  17455. IF compress$ = "y" THEN compress$ = "n" ELSE compress$ = "y"
  17456. PROCcontentonlylist
  17457. WHEN "Q","q" : quickdisplaywindow$ = "n" : PROCquickdisplay
  17458. OTHERWISE PROCdisplay
  17459. ENDCASE
  17460. :
  17461. ENDPROC
  17462. :
  17463. REM*************************************************************
  17464. :
  17465. DEF PROCundoprepare
  17466. :
  17467. manynotesX%=manynotes%
  17468. numpartsX%=numparts%
  17469. nobarsX% =nobars%
  17470. startvX% =startv%
  17471. startv1X% =startv1%
  17472. numbarsX% =numbars%
  17473. startbarX% =startbar%
  17474. numvoicesX%=numvoices%
  17475. factorX% =factor%
  17476. beatfactorX%=beatfactor%
  17477. beamsX% =beams%
  17478. longbeatsupperX%= longbeatsupper%
  17479. longbeatslowerX%=longbeatslower%
  17480. tempoX% =tempo%
  17481. MMX% =MM%
  17482. noteheadX$=notehead$
  17483. longscoreX$= longscore$
  17484. barlinesX$ =barlines$
  17485. stavesX$ =staves$
  17486. beatsX$ =beats$
  17487. amplitudesX$= amplitudes$
  17488. namesX$ =names$
  17489. accidentalsX$=accidentals$
  17490. stemsX$=stems$
  17491. xoptionX$= xoption$
  17492. durationsX$=durations$
  17493. envelopesX$ =envelopes$
  17494. glissandosX$ =glissandos$
  17495. numwavesX% =numwaves%
  17496. manywavesX% =manywaves%
  17497. barnosoftenX%= barnosoften%
  17498. FOR c% = 0 TO (numparts%-1)
  17499. numusedcellsX%(c%)=numusedcells%(c%)
  17500. NEXT
  17501. FOR e% = 0 TO (numparts%-1)
  17502. FOR d% = 0 TO 2
  17503. FOR c% = 0 TO manynotes%
  17504. arrayX%(c%,d%,e%)=array%(c%,d%,e%)
  17505. NEXT
  17506. NEXT
  17507. NEXT
  17508. FOR c% = 0 TO numparts%
  17509. FOR d% = 0 TO 2
  17510. instsX$(c%,d%)=insts$(c%,d%)
  17511. NEXT
  17512. NEXT
  17513. FOR c% = 0 TO nobars%
  17514. FOR d% = 0 TO 3
  17515. FOR e% = 0 TO (numparts%-1)
  17516. disarrayX%(c%,d%,e%)= disarray%(c%,d%,e%)
  17517. NEXT
  17518. NEXT
  17519. NEXT
  17520. FOR c% = 0 TO numparts%
  17521. longbeamposnX%(c%) =longbeamposn%(c%)
  17522. NEXT
  17523. FOR c% = 0 TO numparts%
  17524. shortbeamposnX%(c%) =shortbeamposn%(c%)
  17525. NEXT
  17526. FOR c% = 0 TO numparts%
  17527. shortampposX%(c%)=shortamppos%(c%)
  17528. NEXT
  17529. FOR c% = 0 TO numparts%
  17530. longampposX%(c%) =longamppos%(c%)
  17531. NEXT
  17532. FOR c% = 0 TO (numparts%-1)
  17533. longstemdirX$(c%)=longstemdir$(c%)
  17534. NEXT
  17535. FOR c% = 0 TO (numparts%-1)
  17536. shortstemdirX$(c%)=shortstemdir$(c%)
  17537. NEXT
  17538. FOR c% = 0 TO numparts%
  17539. waveformsX$(c%)=waveforms$(c%)
  17540. NEXT
  17541. FOR c% = 0 TO numvoices%
  17542. displayvoicesX%(c%)=displayvoices%(c%)
  17543. NEXT
  17544. FOR c% = 0 TO 19
  17545. wformsX$(c%)=wforms$(c%)
  17546. NEXT
  17547. FOR c% = 0 TO 8
  17548. FOR d% = 0 TO 9
  17549. lvdataX%(c%,d%)= lvdata%(c%,d%)
  17550. NEXT
  17551. NEXT
  17552. FOR a% = 0 TO 47
  17553. pitchsetX%(a%)=pitchset%(a%)
  17554. NEXT
  17555. FOR a% = 0 TO 47
  17556. dursetX%(a%)=durset%(a%)
  17557. NEXT
  17558. FOR a% = 0 TO 47
  17559. ampsetX%(a%) =ampset%(a%)
  17560. NEXT
  17561. FOR a% = 0 TO 47
  17562. glisssetX%(a%)=glissset%(a%)
  17563. NEXT
  17564. FOR a% = 0 TO 47
  17565. envsetX%(a%) =envset%(a%)
  17566. NEXT
  17567. FOR a% = 0 TO nobars%
  17568. tempiX%(a%) =tempi%(a%)
  17569. NEXT
  17570. FOR a% = 0 TO nobars%
  17571. FOR b% = 0 TO 1
  17572. remarksX$(a%,b%)= remarks$(a%,b%)
  17573. NEXT
  17574. NEXT
  17575. :
  17576. ENDPROC
  17577. :
  17578. REM****************************************
  17579. :
  17580. DEF PROCundo
  17581. :
  17582. manynotes%=manynotes%
  17583. numparts%=numpartsX%
  17584. nobars% =nobarsX%
  17585. startv% =startvX%
  17586. startv1% =startv1X%
  17587. numbars% =numbarsX%
  17588. startbar% =startbarX%
  17589. numvoices%=numvoicesX%
  17590. factor% =factorX%
  17591. beatfactor%=beatfactorX%
  17592. beams% =beamsX%
  17593. longbeatsupper%= longbeatsupperX%
  17594. longbeatslower%=longbeatslowerX%
  17595. tempo% =tempoX%
  17596. MM% =MMX%
  17597. notehead$=noteheadX$
  17598. longscore$= longscoreX$
  17599. barlines$ =barlinesX$
  17600. staves$ =stavesX$
  17601. beats$ =beatsX$
  17602. amplitudes$= amplitudesX$
  17603. names$ =namesX$
  17604. accidentals$=accidentalsX$
  17605. stems$=stemsX$
  17606. xoption$= xoptionX$
  17607. durations$=durationsX$
  17608. envelopes$ =envelopesX$
  17609. glissandos$ =glissandosX$
  17610. numwaves% =numwavesX%
  17611. manywaves% =manywavesX%
  17612. barnosoften%= barnosoftenX%
  17613. FOR c% = 0 TO (numparts%-1)
  17614. numusedcells%(c%)=numusedcellsX%(c%)
  17615. NEXT
  17616. FOR e% = 0 TO (numparts%-1)
  17617. FOR d% = 0 TO 2
  17618. FOR c% = 0 TO manynotes%
  17619. array%(c%,d%,e%)=arrayX%(c%,d%,e%)
  17620. NEXT
  17621. NEXT
  17622. NEXT
  17623. FOR c% = 0 TO numparts%
  17624. FOR d% = 0 TO 2
  17625. insts$(c%,d%)=instsX$(c%,d%)
  17626. NEXT
  17627. NEXT
  17628. FOR c% = 0 TO nobars%
  17629. FOR d% = 0 TO 3
  17630. FOR e% = 0 TO (numparts%-1)
  17631. disarray%(c%,d%,e%)= disarrayX%(c%,d%,e%)
  17632. NEXT
  17633. NEXT
  17634. NEXT
  17635. FOR c% = 0 TO numparts%
  17636. longbeamposn%(c%) =longbeamposnX%(c%)
  17637. NEXT
  17638. FOR c% = 0 TO numparts%
  17639. shortbeamposn%(c%) =shortbeamposnX%(c%)
  17640. NEXT
  17641. FOR c% = 0 TO numparts%
  17642. shortamppos%(c%)=shortampposX%(c%)
  17643. NEXT
  17644. FOR c% = 0 TO numparts%
  17645. longamppos%(c%) =longampposX%(c%)
  17646. NEXT
  17647. FOR c% = 0 TO (numparts%-1)
  17648. longstemdir$(c%)=longstemdirX$(c%)
  17649. NEXT
  17650. FOR c% = 0 TO (numparts%-1)
  17651. shortstemdir$(c%)=shortstemdirX$(c%)
  17652. NEXT
  17653. FOR c% = 0 TO numparts%
  17654. waveforms$(c%)=waveformsX$(c%)
  17655. NEXT
  17656. FOR c% = 0 TO numvoices%
  17657. displayvoices%(c%)=displayvoicesX%(c%)
  17658. NEXT
  17659. FOR c% = 0 TO 19
  17660. wforms$(c%)=wformsX$(c%)
  17661. NEXT
  17662. FOR c% = 0 TO 8
  17663. FOR d% = 0 TO 9
  17664. lvdata%(c%,d%)= lvdataX%(c%,d%)
  17665. NEXT
  17666. NEXT
  17667. FOR a% = 0 TO 47
  17668. pitchset%(a%)=pitchsetX%(a%)
  17669. NEXT
  17670. FOR a% = 0 TO 47
  17671. durset%(a%)=dursetX%(a%)
  17672. NEXT
  17673. FOR a% = 0 TO 47
  17674. ampset%(a%) =ampsetX%(a%)
  17675. NEXT
  17676. FOR a% = 0 TO 47
  17677. glissset%(a%)=glisssetX%(a%)
  17678. NEXT
  17679. FOR a% = 0 TO 47
  17680. envset%(a%) =envsetX%(a%)
  17681. NEXT
  17682. FOR a% = 0 TO nobars%
  17683. tempi%(a%) =tempiX%(a%)
  17684. NEXT
  17685. FOR a% = 0 TO nobars%
  17686. FOR b% = 0 TO 1
  17687. remarks$(a%,b%)= remarksX$(a%,b%)
  17688. NEXT
  17689. NEXT
  17690. :
  17691. PROCdisplay
  17692. :
  17693. ENDPROC
  17694. :
  17695. REM*********************************
  17696. :
  17697. DEF PROCtutorial
  17698. :
  17699. CLS
  17700. :
  17701. PRINT ' " Bars and beats B"
  17702. PRINT ' " Handling of durations D"
  17703. PRINT ' " Only voices with content O"
  17704. PRINT ' " Exiting dialogue windows E"
  17705. PRINT ' " What does '0 = top' mean? W"
  17706. PRINT ' " Accel/rit A"
  17707. CASE GET$ OF
  17708. WHEN "D","d" : PROCwindow(10,71,72,20) : CLS
  17709. PRINT '" When a duration is input in bars/beats it is converted "
  17710. PRINT '" into 1/20ths of a second at the current tempo "
  17711. PRINT '" before being saved in the array. "
  17712. PRINT '" (This is because when sounds are played, their durations "
  17713. PRINT '" are given by BASIC to the OS as so many 1/20ths of a second). "
  17714. PRINT' '" The Display procedure then reconverts back to bars/beats. "
  17715. PRINT' '" Unavoidable floating point discrepencies occur during "
  17716. PRINT '" this conversion/reconversion process, which often lead to "
  17717. PRINT '" durations being displayed with different values to those "
  17718. PRINT '" initially input, especially in the case of very small values. "
  17719. PRINT ''" (to return to program press any key)"
  17720. CASE GET$ OF
  17721. WHEN "R","r" : PROCdisplay
  17722. OTHERWISE PROCdisplay
  17723. ENDCASE
  17724. :
  17725. WHEN "E","e" : PROCwindow(10,71,72,20) : CLS
  17726. PRINT '" When no obvious key-presses are indicated, e.g. when you "
  17727. PRINT '" want to exit a dialogue window at any point etc., simply "
  17728. PRINT '" press <Esc> to return to the display. "
  17729. CASE GET$ OF
  17730. WHEN "R","r" : PROCdisplay
  17731. OTHERWISE PROCdisplay
  17732. ENDCASE
  17733. :
  17734. WHEN "W","w" : PROCwindow(10,71,72,20) : CLS
  17735. PRINT '" This is a keyboard shortcut to select a voice which "
  17736. PRINT '" is already displayed on the screen. "
  17737. PRINT '" Press <Enter> once to select the top voice displayed. "
  17738. PRINT '" Press <Enter> twice quickly to select the second voice "
  17739. PRINT '" selected. Press <Enter> three times quickly to select "
  17740. PRINT '" the bottom voice displayed. "
  17741. CASE GET$ OF
  17742. WHEN "R","r" : PROCdisplay
  17743. OTHERWISE PROCdisplay
  17744. ENDCASE
  17745. :
  17746. WHEN "A","a": PROCwindow(10,71,72,20) : CLS
  17747. CASE GET$ OF
  17748. WHEN "R","r" : PROCdisplay
  17749. OTHERWISE PROCdisplay
  17750. ENDCASE
  17751. :
  17752. WHEN "B","b": PROCwindow(10,71,82,10) : CLS
  17753. PRINT '" CAC invariably understands that a bar consists of 960 beats, "
  17754. PRINT '" regardless of which file you create. This fine gradation allows "
  17755. PRINT '" you to position sounds effectively in continuous time, just as "
  17756. PRINT '" CAC allows you also to position sounds effectively in continuous "
  17757. PRINT '" pitch. "
  17758. PRINT ''" When you initially create a new file, you can decide how the bar "
  17759. PRINT '" is to be subdivided into a particular 'time signature'. For example, "
  17760. PRINT '" in 4/4 each crotchet is a quarter of the bar, and thus 240 beats each."
  17761. PRINT '" Each crotchet contains 4 semiquavers, making 16 semiquavers in the bar."
  17762. PRINT '" So in this case you would initially ask CAC to create a new file with "
  17763. PRINT '" 16 beats (in another sense of 'beats') each, being semiquavers, notated"
  17764. PRINT '" rhythmically as having two beams."
  17765. PRINT ''" When a passage will later be 'rhythmicized' to become musical notation "
  17766. PRINT '" each bar will consist of rhythms adding up to a 4/4 time signature."
  17767. PRINT ''" The position of the semiquavers can be displayed by pressing Display "
  17768. PRINT '" Menu/Add Beats (O/T). And you can choose whether your sounds are "
  17769. PRINT '" positioned in terms of semiquaver 'beats' or in terms of the fine grid "
  17770. PRINT '" of 960 'beats' by pressing Menu/Various/Beats Input (M/V/B)."
  17771. CASE GET$ OF
  17772. WHEN "R","r" : PROCdisplay
  17773. OTHERWISE PROCdisplay
  17774. ENDCASE
  17775. :
  17776. OTHERWISE
  17777. CASE GET$ OF
  17778. WHEN "R","r" : PROCdisplay
  17779. OTHERWISE PROCdisplay
  17780. ENDCASE
  17781. :
  17782. ENDCASE
  17783. :
  17784. ENDPROC