CAC_i_rpi 533 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956
  1. REM CAC is free software: you can redistribute it and/or modify
  2. REM it under the terms of the GNU General Public License as published by
  3. REM the Free Software Foundation, either version 2 of the License, or
  4. REM (at your option) any later version.
  5. REM
  6. REM CAC is distributed in the hope that it will be useful,
  7. REM but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. REM GNU General Public License for more details.
  10. REM
  11. REM You should have received a copy of the GNU General Public License
  12. REM along with CAC. If not, see <https://www.gnu.org/licenses/>.
  13. REM
  14. REM CAC
  15. REM Copyright (C) 1990 Richard Emsley
  16. REM >CAC
  17. MODE 12 : COLOUR 0 : COLOUR 191 : CLS
  18. *CONFIGURE spritesize 300K
  19. errorbeforedisplay$ = "y"
  20. ON ERROR PROCerror
  21. biga% = 10^5 : bigb% = 0 : bigc% = 0 : bigd% = 10^5 : box$ = "n"
  22. :
  23. PROCtobegin
  24. END
  25. :
  26. REM*******************************
  27. :
  28. DEF PROCawait
  29. :
  30. IF easiermenus$ = "n" THEN
  31. PROCwindow(20,69,60,55)
  32. PRINT'" Functions F"
  33. PRINT " Add one note (fully defined) O"
  34. PRINT " Delete notes X"
  35. PRINT " Copy/move notes C"
  36. PRINT " Define a group of values G"
  37. PRINT " Add the group of values A"
  38. PRINT " Rhythmicize R"
  39. PRINT " Display D"
  40. PRINT " Play P"
  41. PRINT " Various V"
  42. PRINT " Undo last operation Z"
  43. PRINT " Save S"
  44. PRINT " Quit Q"
  45. ELSE
  46. PROCwindow(20,69,60,42)
  47. PRINT' " Functions F"
  48. PRINT' " Add one note (fully defined) O"
  49. PRINT' " Delete notes X"
  50. PRINT' " Copy/move notes C"
  51. PRINT' " Define a group of values G"
  52. PRINT' " Add the group of values A"
  53. PRINT' " Rhythmicize R"
  54. PRINT' " Display D"
  55. PRINT' " Play P"
  56. PRINT' " Various V"
  57. PRINT' " Undo last operation Z"
  58. PRINT' " Save S"
  59. PRINT' " Quit Q"
  60. ENDIF
  61. :
  62. CASE GET$ OF
  63. WHEN "f" : PROCfunctionreception
  64. WHEN "o" : PROCaddonenote
  65. WHEN "x" : PROCdelete
  66. WHEN "c","1","`" : PROCcopy
  67. WHEN "g", "3" : PROCsubawaitG
  68. WHEN "a" : PROCsubawaitA
  69. WHEN "r" :
  70. VDU 7
  71. IF easiermenus$ = "n" THEN PROCwindow(20,69,63,52) ELSE PROCwindow(20,69,63,42)
  72. CLS
  73. PRINT'" To rhythmicize attacks, first switch on "
  74. PRINT'" Rhythmicize Attacks in Display Options "
  75. PRINT'" (M/V/D/H) then create a group of attacks "
  76. PRINT'" or copy some attacks or move some attacks "
  77. PRINT'" to itself, during the course of which you "
  78. PRINT'" will be invited to rhythmicize them. "
  79. PRINT'" (press a key to continue) "
  80. CASE GET$ OF
  81. WHEN "m" : PROCdisplay
  82. OTHERWISE
  83. PROCdisplay
  84. ENDCASE
  85. WHEN "d" : PROCpredisplay
  86. WHEN "p" : play$ = "play" : PROCplay
  87. WHEN "m" :
  88. PROCdisplay : REM toggle
  89. WHEN "v" : PROCplaysubmenu
  90. WHEN "s" : PROCsave
  91. WHEN "Z","z" : PROCundo
  92. WHEN "q" : PROCquit
  93. OTHERWISE VDU 7 : PROCawait : REM bleep and loop back to start of proc
  94. ENDCASE
  95. :
  96. ENDPROC
  97. :
  98. REM*********************************
  99. :
  100. DEF PROCsubawaitG
  101. :
  102. IF easiermenus$ = "n" THEN
  103. CLS
  104. PRINT' " attacks A"
  105. PRINT " envelope points R"
  106. PRINT " pitches P"
  107. PRINT " amplitudes L"
  108. PRINT " amplitude gradations G"
  109. PRINT " envelopes/glissandos E"
  110. PRINT " durations D"
  111. PRINT " microtonal inflections M"
  112. ELSE
  113. CLS
  114. PRINT'" attacks A"
  115. PRINT'" envelope points R"
  116. PRINT'" pitches P"
  117. PRINT'" amplitudes L"
  118. PRINT'" amplitude gradations G"
  119. PRINT'" envelopes/glissandos E"
  120. PRINT'" durations D"
  121. PRINT'" microtonal inflections M"
  122. ENDIF
  123. :
  124. CASE GET$ OF
  125. WHEN "A","a" : PROCseriesattacks
  126. WHEN "R","r" : PROCreleases
  127. WHEN "P","p", "3" : PROCseriespitches
  128. WHEN "L","l" : PROCseriesamplitudes
  129. WHEN "E","e" : PROCseriesenvelopes
  130. WHEN "G","g" : gradations$ = "y" : PROCseriesenvelopes
  131. WHEN "D","d" : PROCseriesdurations
  132. WHEN "M","m" : PROCseriesinflections
  133. OTHERWISE VDU 7 : PROCsubawaitG
  134. ENDCASE
  135. :
  136. ENDPROC
  137. :
  138. REM***********************************
  139. :
  140. DEF PROCprearraysetup
  141. :
  142. MODE 12 : COLOUR 0 : COLOUR 191
  143. CLS
  144. numwaves% = 19
  145. INPUT'''''" Estimate the maximum number of bars "nobars%
  146. INPUT''" Estimate the average number of notes per bar in the busiest part "nonotes
  147. INPUT''" How many voices "numparts%
  148. :
  149. DIM insts$(numparts%,2) : instsdimmed$ = "y"
  150. PRINT''" Do you want to define the voices or use default ones (Y/D)"
  151. CASE GET$ OF
  152. WHEN "Y","y" :
  153. FOR count% = 1 TO numparts%
  154. PRINT '" voice ";count%;" is called"
  155. INPUT name$
  156. PRINT " and is in clef (P/T/B/D...TT/TB/BB etc)"
  157. INPUT clef$
  158. PRINT " and has how many staves"
  159. INPUT staves$
  160. insts$(count%,0) = name$ : insts$(count%,1) = clef$ : insts$(count%,2) = staves$
  161. NEXT
  162. WHEN "D","d" :
  163. FOR count% = 1 TO numparts%
  164. insts$(count%,0) = "" : insts$(count%,1) = "T" : insts$(count%,2)="1"
  165. NEXT
  166. OTHERWISE
  167. ENDCASE
  168. :
  169. REPEAT
  170. INPUT''" The time signature has how many beats to the bar "factor%
  171. :
  172. CASE factor% OF
  173. WHEN 1,2,3,4,5,6,8,10,12 : success$ = "YES"
  174. OTHERWISE
  175. success$ = "NO"
  176. VDU 7
  177. PRINT'" Only 1,2,3,4,5,6,8,10 or 12 are allowed "
  178. PRINT'" press a key to try again"
  179. CASE GET$ OF
  180. WHEN "m" : success$ = "NO"
  181. OTHERWISE
  182. success$ = "NO"
  183. ENDCASE
  184. :
  185. ENDCASE
  186. UNTIL success$ = "YES"
  187. :
  188. factor% = factor% * 8
  189. beatfactor% = 960/factor%
  190. :
  191. REPEAT
  192. success$ = "YES"
  193. PRINT''" of what note value "
  194. PRINT' " (minim/half-note = 2 "
  195. PRINT' " crotchet/quarter-note = 4 "
  196. PRINT' " quaver/eighth-note = 8 "
  197. PRINT' " semiquaver/sixteenth-note = 16 "
  198. INPUT' " demisemiquaver/thirtysecond-note = 32) "beams%
  199. :
  200. CASE beams% OF
  201. WHEN 2 : beams% = 2
  202. WHEN 4 : beams% = 3
  203. WHEN 8 : beams% = 4
  204. WHEN 16 : beams% = 5
  205. WHEN 32 : beams% = 6
  206. OTHERWISE
  207. PRINT'" sorry, try again "
  208. success$ = "NO"
  209. ENDCASE
  210. UNTIL success$ = "YES"
  211. :
  212. manynotes% = nobars%*nonotes
  213. filename$ = ""
  214. ENDPROC
  215. :
  216. REM***********************************************
  217. :
  218. DEF PROCarraysetup
  219. :
  220. DIM array%(manynotes%,2,(numparts%-1)) : DIM arrayX%(manynotes%,2,(numparts%-1))
  221. IF instsdimmed$ = "n" THEN DIM insts$(numparts%,2)
  222. DIM instsX$(numparts%,2)
  223. DIM numusedcells%(numparts%-1) : DIM numusedcellsX%(numparts%-1)
  224. DIM cell%(1999), bar%(1999)
  225. DIM attacks1%(10000), attacks2%(10000), attacks3%(10000), attacks4%(10000), attacks5%(10000)
  226. DIM pitches%(10000), pitches1%(10000), pitches2%(10000), amplitudes%(10000), envelopes%(10000)
  227. DIM durations%(10000), glissandos%(10000), inflections%(10000)
  228. DIM pitchset%(numparts%+47), ampset%(numparts%+47), envset%(numparts%+47), durset%(numparts%+47), glissset%(numparts%+47), infset%(numparts%+47)
  229. DIM pitchsetX%(numparts%+47), ampsetX%(numparts%+47), envsetX%(numparts%+47), dursetX%(numparts%+47), glisssetX%(numparts%+47)
  230. DIM functionattacks(10000)
  231. DIM nodes%(47), nodes1%(47)
  232. DIM dur%(999), proportion%(999), rhythmicattacks%(999), groupattacks%(999)
  233. DIM error%(999), notategroup%(999,1), errororder%(999), errororder1%(999)
  234. DIM disarray%(nobars%,3,(numparts%-1)) : DIM disarrayX%(nobars%,3,(numparts%-1))
  235. DIM displayvoices%(numparts%), holddisplay%(numparts%), rgroup%(6), longinsts$(2,2), staves%(6)
  236. DIM displayvoices1%(numparts%) : DIM displayvoicesX%(numparts%)
  237. DIM value%(2), pos%(2), longbeamposn%(numparts%), shortbeamposn%(numparts%), actbeamposn%(numparts%), shortamppos%(numparts%), longamppos%(numparts%), actamppos%(numparts%)
  238. DIM longbeamposnX%(numparts%), shortbeamposnX%(numparts%), shortampposX%(numparts%), longampposX%(numparts%)
  239. DIM longstemdir$(numparts%-1), shortstemdir$(numparts%-1)
  240. DIM longstemdirX$(numparts%-1), shortstemdirX$(numparts%-1)
  241. DIM waveforms$(numparts%), playvoices%(8), lvdata%(8,9), tic%(4), tun%(8)
  242. DIM waveformsX$(numparts%), lvdataX%(8,9)
  243. DIM wforms$(19) : waveload$ = "notdone"
  244. DIM wformsX$(19)
  245. DIM startoflayersection%(50), shareoflayers%(50,50), chanceoflayer%(50)
  246. DIM layershare%(50), numattackssections%(50), startofattackssection%(50,50)
  247. DIM numattax%(50,50,1), attackscontrol$(50)
  248. DIM numattackssections1%(50), startofattackssection1%(50,200)
  249. DIM numattax1%(50,200,1), appearances%(50)
  250. DIM durationscontrol$(50), numdurationssections%(50)
  251. DIM numdurationssections1%(50), startofdurationssection%(50,200)
  252. DIM startofdurationssection1%(50,200), doorations%(50,200), doorations1%(50,200)
  253. DIM numvalues%(50), values(50,50), valuescounter%(50), multiplier$(50)
  254. DIM multipliermode$(50)
  255. DIM contoursequences%(50,15), transpositionsequences%(199,1)
  256. DIM sample%(299), group%(7), contours%(69,7), octavesequences%(50,48,11)
  257. DIM pitchnames$(47), octaveloop%(48), distortparas%(50,3)
  258. DIM numlayerOKsects%(50), OKtouselayers%(50,1), layersOK%(50,50,2)
  259. DIM layerends%(50), amplitudes1%(10000), dynlayers%(12,5), dynnumbers%(99)
  260. DIM ampsample%(49)
  261. DIM tempi%(nobars%), bannedpitches%(80), bannedints%(24,2), triednotes%(88)
  262. DIM tempiX%(nobars%)
  263. DIM extractinfo%(20), redpitches%(9,30), numredpitches%(9), holdstartcell%(numparts%)
  264. DIM remarks$(nobars%,1), quickdisplay%(numparts%), prequickdisplay%(numparts%), thebeats%(15)
  265. DIM remarksX$(nobars%,1)
  266. DIM envattacks%(3000), envpitches%(3000), taken%(19)
  267. FOR count% = 0 TO nobars% : tempi%(count%) = 30 : NEXT
  268. FOR count% = 0 TO 47 : READ name$ : pitchnames$(count%) = name$ : NEXT
  269. DATA "C 1/4 flat","C 1/8 flat","C nat","C 1/8 shrp","C 1/4 shrp"
  270. DATA "C 3/8 shrp","D flat","D 3/8 flat","D 1/4 flat","D 1/8 flat"
  271. DATA "D nat","D 1/8 shrp","D 1/4 shrp","D 3/8 shrp","E flat","E 3/8 flat"
  272. DATA "E 1/4 flat","E 1/8 flat","E nat","E 1/8 shrp","E 1/4 shrp"
  273. DATA "F 1/8 flat","F nat","F 1/8 shrp","F 1/4 shrp","F 3/8 shrp"
  274. DATA "F shrp","G 3/8 flat","G 1/4 flat","G 1/8 flat","G nat","G 1/8 shrp"
  275. DATA "G 1/4 shrp","G 3/8 shrp","A flat","A 3/8 flat","A 1/4 flat"
  276. DATA "A 1/8 flat","A nat","A 1/8 shrp","A 1/4 shrp","A 3/8 shrp"
  277. DATA "B flat","B 3/8 flat","B 1/4 flat","B 1/8 flat","B nat","B 1/8 shrp"
  278. 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
  279. 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
  280. 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
  281. 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
  282. 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
  283. 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
  284. DATA 51,5,5,4,3,2,1,52,6,1,2,4,5,6,3,53,6,6,5,3,2,1,4
  285. 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
  286. 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
  287. 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
  288. 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
  289. 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
  290. DATA 69,7,1,7,6,5,4,3,2
  291. FOR count% = 1 TO 47
  292. READ a%,b%
  293. contours%(a%,0) = b%
  294. FOR counter% = 1 TO b%
  295. READ c%
  296. contours%(a%,counter%) = c%
  297. NEXT
  298. NEXT
  299. FOR count% = 0 TO numparts%-1 : pitchset%(count%) = 55 : NEXT
  300. FOR count% = 0 TO numparts%-1 : ampset%(count%) = 3 : NEXT
  301. FOR count% = 0 TO numparts%-1 : envset%(count%) = 9 : NEXT
  302. FOR count% = 0 TO numparts%-1 : durset%(count%) = 60 : NEXT
  303. FOR count% = 0 TO numparts%-1 : glissset%(count%) = 105050 : NEXT
  304. FOR count% = 0 TO numparts%-1 : infset%(count%) = 50 : NEXT
  305. *TUNING 0
  306. VOICES 8
  307. *CHANNELVOICE 1 WaveSynth-Beep
  308. *CHANNELVOICE 2 WaveSynth-Beep
  309. *CHANNELVOICE 3 WaveSynth-Beep
  310. *CHANNELVOICE 4 WaveSynth-Beep
  311. *CHANNELVOICE 5 WaveSynth-Beep
  312. *CHANNELVOICE 6 WaveSynth-Beep
  313. *CHANNELVOICE 7 WaveSynth-Beep
  314. *CHANNELVOICE 8 WaveSynth-Beep
  315. direction$ = "" : shortstemdir$() = "U" : longstemdir$() = "U" : shortbeamposn%() = 106 : longbeamposn%() = 106
  316. manyattacks% = 0 : longbeatsupper% = 739 : longbeatslower% = 405
  317. tempo% = 19660 : REM default tempo = MM30 per bar
  318. defaultvoices$ = "y" : PROCassignvoices
  319. CLS
  320. VDU 28,20,27,60,15
  321. COLOUR 0 : COLOUR 191 : CLS
  322. numbars% = 4 : startbar% = 1
  323. :
  324. numvoices% = numparts%
  325. FOR count% = 1 TO numvoices%
  326. displayvoices%(count%) = 1 + count% - 1
  327. holddisplay%(count%) = 1 + count% - 1
  328. NEXT
  329. holdnum% = numvoices%
  330. :
  331. quickdisplay%(1) = 1 : prequickdisplay%(1) = 1
  332. holdnum% = 1 : holdstart% = 1 : quicknum% = 1 : quickstart% = 1
  333. prequicknum% = 1 : prequickstart% = 1
  334. notehead$ = "vsmall" : longscore$ = "y" : startv% = 1 : startv1% = 1
  335. printing$ = "n"
  336. barlines$ = "y" : staves$ = "y" : beats$ = "n" : amplitudes$ = "y"
  337. staves$ = "y" : barlines$ = "y" : names$ = "y" : lowerstave$ = "y"
  338. accidentals$ = "y" : stems$ = "y" : xoption$ = "y" : durations$ = "n"
  339. envelopes$ = "y" : glissandos$ = "y" : MM% = 30 : beatstep% = 8
  340. copyit$ = "OFF" : distort$ = "OFF" : beatnumbers$ = "n"
  341. wavefilingsystem$ = "notloaded" : manywaves% = 0 : barnosoften% = 5
  342. reordered$ = "n" : equalized$ = "n" : notenumbers$ = "n" : beatnum_diff$ = "num"
  343. beatunits$ = "big" : parasdefined$ = "no" : preplaydisplay$ = "n"
  344. paraset$ = "off" : savevoice$ = "N"
  345. method$ = "raw" : reordered$ = "n" : quiz$ = "yes" : typeintervals$ = "s"
  346. displayintervals$ = "n" : numintervals% = 1 : alterbeatsat% = 0
  347. compoundpitch% = 12 : compoundquarter% = 24 : compoundeighth% = 48 : compoundcent% = 1200
  348. defaultsieve = 2 : funcinput$ = "durat" : redpitches$ = "n" : printno% = 0
  349. seegraph$ = "n" : seeinfo$ = "n" : seereorder$ = "n" : seereorderx$ = "n" : seereordery$ = "n"
  350. seeequalize$ = "n" : seeequalizex$ = "n" : seeequalizey$ = "n"
  351. seerhythmicize$ = "n" : seequery$ = "n" : startfinishdurats$ = "Y" : displayedfunc$ = "n"
  352. along% = 0 : playnewscreen$ = "y" : seeduration$ = "n" : lower% = 0 : justone$ = "n"
  353. biga% = 10^5 : bigb% = 0 : bigc% = 0 : bigd% = 10^5 : printinfo$ = "n"
  354. lowerstart% = 1 : upperstart% = 99 : lowerend% = 1 : upperend% = 99 : toggle$ = "orig"
  355. quickcopy$ = "y" : quickplay% = 1 : seedurinbts$ = "n" : seedurincrots$ = "n"
  356. screenvoices$ = "n" : ampoptions$ = "n" : screenmovesby% = 3 : copydownwards$ = "n"
  357. setalong$ = "y" : numvoicesgiven$ = "n" : envelopedata$ = "none" : deleteone$ = "none"
  358. quickextract$ = "n" : askaboutpitches$ = "y" : usebottomstave$ = "n" : copysuccessively$ = "n"
  359. succfirsttime$ = "y" : sequalssection$ = "n"
  360. addpitches$ = "y" : downwardsspeed% = 50
  361. horizscroll% = 25 : addten$ = "n" : squarebracket$ = "addten" : queryalong$ = "n"
  362. waitafterfirst% = 50 : waitaftersecond% = 50 : notenames$ = "n" : holdbackby% = 0
  363. updisplay% = 1 : vertscroll% = 25 : singlepitch$ = "m" : nosevery% = 1 : startnos% = 1
  364. reorderpitches$ = "n" : namestaves$ = "nameone" : usebeep$ = "n" : firsttimequick$ = "y"
  365. onlycontent$ = "n" : compress$ = "n" : quickdisplaywindow$ = "y" : ampmethod$ = "sample"
  366. holdbackby% = 960 : copytoend$ = "n" : gradations$ = "n" : firstasking$ = "y"
  367. resetdefaults$ = "n" : firstpitch$ = "y" : usedprev$ = "n" : nodelay$ = "n"
  368. askprevious$ = "y" : errorbeforedisplay$ = "n" : quitnow$ = "n"
  369. crossing$ = "n" : easiermenus$ = "y" : copymove$ = "C"
  370. PROCrhythmdefaults
  371. :
  372. ENDPROC
  373. :
  374. REM*************************************
  375. :
  376. DEF PROCsubawaitA
  377. :
  378. IF easiermenus$ = "n" THEN
  379. PROCwindow(20,69,70,55)
  380. CLS
  381. PRINT' " attacks A"
  382. PRINT " pitches P"
  383. PRINT " amplitudes L"
  384. PRINT " envelopes/glissandos E"
  385. PRINT " durations D"
  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/glissandos E"
  394. PRINT '" durations D"
  395. PRINT '" microtonal inflections M"
  396. ENDIF
  397. :
  398. CASE GET$ OF
  399. WHEN "A","a" : PROCinsertattacks
  400. WHEN "P","p" : PROCinsertpitches
  401. WHEN "L","l" : PROCinsertamplitudes
  402. WHEN "E","e" : PROCinsertenvelopes
  403. WHEN "D","d" : PROCinsertdurations
  404. WHEN "M","m" : PROCinsertinflections
  405. OTHERWISE VDU 7 : PROCsubawaitA
  406. ENDCASE
  407. :
  408. ENDPROC
  409. :
  410. REM**************************************
  411. :
  412. DEF PROCnewnotereception(voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
  413. :
  414. value% = (barno% * 10^3) + beatno%
  415. :
  416. option% = 0
  417. :
  418. ::::::REM if new note is very first to be added::::::
  419. IF numusedcells%(voice%) = 0 THEN option% = 1
  420. :
  421. IF option% <> 1 THEN
  422. :
  423. :::::::REM to tack new note on at end:::::
  424. IF numusedcells%(voice%) > 0 AND value% > (array%((numusedcells%(voice%)-1),0,voice%)) DIV 10^3 THEN option% = 2
  425. :
  426. :::::::REM to tack new note on at START::::
  427. IF numusedcells%(voice%) > 0 AND value% < (array%(0,0,voice%)) DIV 10^3 THEN option% = 3
  428. :
  429. ::::::REM to put new note in middle::::::::::
  430. 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
  431. :
  432. ENDIF
  433. :
  434. IF addingnotes$ = "y" THEN
  435. CASE option% OF
  436. WHEN 1 : shunt$ = "Y"
  437. PROCcellfill(0,voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
  438. :
  439. WHEN 2 : shunt$="Y"
  440. PROCcellfill(numusedcells%(voice%),voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
  441. :
  442. WHEN 3 : shunt$="Y"
  443. PROCshuntright(0)
  444. PROCcellfill(0,voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
  445. :
  446. WHEN 4 : PROCsearch(value%)
  447. IF shunt$="Y" PROCshuntright(startcell%)
  448. PROCcellfill(startcell%,voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
  449. :
  450. ENDCASE
  451. ENDIF
  452. :
  453. ENDPROC
  454. :
  455. REM****************************************************
  456. :
  457. DEF PROCcellfill(cell%,voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
  458. :
  459. IF barno% = 999 THEN barno% = array%(cell%,0,voice%) DIV 10^6
  460. IF beatno% = 999 THEN beatno% = (array%(cell%,0,voice%)DIV 10^3)MOD 10^3
  461. IF pitch% = 999 THEN pitch% = array%(cell%,0,voice%) MOD 10^3
  462. IF amp% = 9 THEN amp% = array%(cell%,1,voice%) MOD10
  463. IF env% = 999 THEN env% = array%(cell%,2,voice%) DIV10^2
  464. IF dur% = 999 THEN dur% = (array%(cell%,1,voice%) DIV10) MOD 10^3 ELSE PROCconvertdur
  465. IF gliss% = 99 THEN gliss% = array%(cell%,1,voice%) DIV10^4
  466. IF inf% = 99 THEN inf% = array%(cell%,2,voice%) MOD 10^2
  467. :
  468. array%(cell%,0,voice%) = (barno%*10^6) + (beatno%*10^3) + pitch%
  469. array%(cell%,1,voice%) = (gliss%*10^4)+(dur%*10)+amp%
  470. array%(cell%,2,voice%) = (env%*10^2)+inf%
  471. :
  472. IF shunt$="Y" THEN numusedcells%(voice%) += 1
  473. :
  474. ENDPROC
  475. :
  476. REM******************************************************
  477. :
  478. DEF PROCshuntright(startcell%)
  479. :
  480. FOR tier% = 0 TO 2
  481. FOR count% = (numusedcells%(voice%)) TO (startcell%+1) STEP -1
  482. array%(count%,tier%,voice%) = array%((count%-1),tier%,voice%)
  483. NEXT
  484. NEXT
  485. :
  486. ENDPROC
  487. :
  488. REM*********************************************************
  489. :
  490. DEF PROCsearch(newvalue%)
  491. :
  492. startcell% = -1
  493. distance% = numusedcells%(voice%)/2
  494. cellnum% = distance%
  495. :
  496. REPEAT
  497. :
  498. :
  499. IF newvalue% = (array%(cellnum%,0,voice%)) DIV 10^3 THEN
  500. startcell% = cellnum% : REM this ALTERS, rather than adds, a note
  501. shunt$ = "N"
  502. ENDIF
  503. :
  504. IF cellnum% > 0 THEN
  505. :
  506. IF newvalue% = (array%(cellnum%+1,0,voice%)) DIV 10^3 THEN
  507. startcell% = cellnum%+1 : REM this ALTERS too
  508. shunt$ = "N"
  509. ENDIF
  510. :
  511. :
  512. IF newvalue% = (array%(cellnum%-1,0,voice%)) DIV 10^3 THEN
  513. startcell% = cellnum%-1 : REM this ALTERS too
  514. shunt$ = "N"
  515. ENDIF
  516. :
  517. IF newvalue% > (array%(cellnum%,0,voice%) DIV 10^3) AND newvalue% < (array%(cellnum%+1,0,voice%) DIV 10^3) THEN
  518. startcell% = (cellnum%+1) : REM newvalue immediately to right of cellnum
  519. shunt$ = "Y"
  520. ENDIF
  521. :
  522. :
  523. IF newvalue% < (array%(cellnum%,0,voice%) DIV 10^3) AND newvalue% > (array%(cellnum%-1,0,voice%) DIV 10^3) THEN
  524. startcell% = cellnum% : REM immediately to left
  525. shunt$ = "Y"
  526. ENDIF
  527. :
  528. :
  529. IF newvalue% > (array%(cellnum%+1,0,voice%) DIV 10^3) THEN
  530. IF distance% = 1 THEN distance% = 2
  531. distance% = distance%/2
  532. cellnum% = cellnum% + distance%
  533. ENDIF
  534. :
  535. :
  536. IF newvalue% < (array%(cellnum%-1,0,voice%) DIV 10^3) THEN
  537. IF distance% = 1 THEN distance% = 2
  538. distance% = distance%/2
  539. cellnum% = cellnum% - distance%
  540. ENDIF
  541. ENDIF
  542. :
  543. :
  544. UNTIL startcell% > -1
  545. :
  546. ENDPROC
  547. :
  548. REM***************************************************
  549. :
  550. DEF PROCplay
  551. :
  552. waveload$ = "notdone"
  553. :
  554. BEATS 960 : REM 2/4 bars, 480 each crotchet
  555. tic%() = 0
  556. tun%() = 0
  557. :
  558. IF play$ = "play" THEN
  559. IF easiermenus$ = "n" THEN PROCwindow(20,69,60,55) ELSE PROCwindow(20,69,60,42)
  560. CLS
  561. INPUT'" Starting at bar "startingbar%
  562. INPUT'" beat "beats%
  563. PROCalterbeats : startbeat% = beats%
  564. INPUT '" and ending at bar "endbar%
  565. INPUT'" How many voices "nvoices%
  566. ENDIF
  567. :
  568. :
  569. FOR count% = 1 TO nvoices%
  570. IF play$ = "play" THEN
  571. PRINT'" voice number ";count%;" is which voice number"
  572. INPUT vnumber%
  573. playvoices%(count%) = vnumber%
  574. ELSE vnumber% = playvoices%(count%)
  575. ENDIF
  576. :
  577. IF usebeep$ = "n" THEN
  578. CASE count% OF
  579. WHEN 1 :
  580. CASE waveforms$(vnumber%) OF
  581. WHEN "WaveSynth-Beep" : *CHANNELVOICE 1 WaveSynth-Beep
  582. WHEN "StringLib-Soft" : *CHANNELVOICE 1 StringLib-Soft
  583. WHEN "StringLib-Pluck" : *CHANNELVOICE 1 StringLib-Pluck
  584. WHEN "StringLib-Steel" : *CHANNELVOICE 1 StringLib-Steel
  585. WHEN "StringLib-Hard" : *CHANNELVOICE 1 StringLib-Hard
  586. WHEN "Percussion-Soft" : *CHANNELVOICE 1 Percussion-Soft
  587. WHEN "Percussion-Medium" : *CHANNELVOICE 1 Percussion-Medium
  588. WHEN "Percussion-Snare" : *CHANNELVOICE 1 Percussion-Snare
  589. WHEN "Percussion-Noise" : *CHANNELVOICE 1 Percussion-Noise
  590. WHEN "BassBowAb" : *CHANNELVOICE 1 BassBowAb
  591. tun%(1) = -1470
  592. WHEN "AcouBass" : *CHANNELVOICE 1 AcouBass
  593. tun%(1) = -2731
  594. WHEN "Vibe" : *CHANNELVOICE 1 Vibe
  595. tun%(1) = -6912
  596. WHEN "BugleC" : *CHANNELVOICE 1 BugleC
  597. tun%(1) = -11008
  598. WHEN "CornetEb" : *CHANNELVOICE 1 CornetEb
  599. tun%(1) = -12117
  600. WHEN "SaxEbBarC" : *CHANNELVOICE 1 SaxEbBarC
  601. tun%(1) = -2816
  602. WHEN "SaxBbTenrE" : *CHANNELVOICE 1 SaxBbTenrE
  603. tun%(1) = -4181
  604. WHEN "BassoonEb" : *CHANNELVOICE 1 BassoonEb
  605. tun%(1) = -4011
  606. WHEN "ClarinetBb" : *CHANNELVOICE 1 ClarinetBb
  607. tun%(1) = -10325
  608. WHEN "EngHornGb" : *CHANNELVOICE 1 EngHornGb
  609. tun%(1) = -8960
  610. WHEN "MandolinDb" : *CHANNELVOICE 1 MandolinDb
  611. tun%(1) = -11264
  612. WHEN "Piano2B" : *CHANNELVOICE 1 Piano2B
  613. tun%(1) = -2475
  614. WHEN "ClarVibEb" : *CHANNELVOICE 1 ClarVibEb
  615. tun%(1) = -7850
  616. WHEN "GtrDobroB" : *CHANNELVOICE 1 GtrDobroB
  617. tun%(1) = -6485
  618. WHEN "RecorderGb" : *CHANNELVOICE 1 RecorderGb
  619. tun%(1) = -13056
  620. WHEN "FlugelHnEb" : *CHANNELVOICE 1 FlugelHnEb
  621. tun%(1) = -12032
  622. WHEN "VceMmmGb23" : *CHANNELVOICE 1 VceMmmGb23
  623. tun%(1) = -853
  624. WHEN "VceMOooGb3" : *CHANNELVOICE 1 VceMOooGb3
  625. tun%(1) = -4843
  626. WHEN "VceFemAahC" : *CHANNELVOICE 1 VceFemAahC
  627. tun%(1) = -10948
  628. WHEN "VceFMmmGb4" : *CHANNELVOICE 1 VceFMmmGb4
  629. tun%(1) = -8918
  630. WHEN "Bass" : *CHANNELVOICE 1 Bass
  631. tun%(1) = 0
  632. WHEN "ChurchBell" : *CHANNELVOICE 1 ChurchBell
  633. tun%(1) = -2731
  634. WHEN "mysound" : *CHANNELVOICE 1 mysound
  635. tun%(1) = 0
  636. WHEN "GuiroFast" : *CHANNELVOICE 1 GuiroFast
  637. tun%(1) = -4000
  638. WHEN "Clave" : *CHANNELVOICE 1 Clave
  639. tun%(1) = -8096
  640. WHEN "CowBell" : *CHANNELVOICE 1 CowBell
  641. tun%(1) = -5707
  642. WHEN "CymbRideHd" : *CHANNELVOICE 1 CymbRideHd
  643. tun%(1) = -8096
  644. WHEN "AcGuitar1" : *CHANNELVOICE 1 AcGuitar1
  645. tun%(1) = -7072
  646. WHEN "CongaHi" : *CHANNELVOICE 1 CongaHi
  647. tun%(1) = -4000
  648. WHEN "DrumExplo" : *CHANNELVOICE 1 DrumExplo
  649. tun%(1) = -4000
  650. WHEN "ElecTom1" : *CHANNELVOICE 1 ElecTom1
  651. tun%(1) = -8096
  652. WHEN "Harp1" : *CHANNELVOICE 1 Harp1
  653. tun%(1) = -10997
  654. WHEN "Harpsi" : *CHANNELVOICE 1 Harpsi
  655. tun%(1) = -6901
  656. WHEN "HiString" : *CHANNELVOICE 1 HiString
  657. tun%(1) = -10997
  658. WHEN "HonkyPiano" : *CHANNELVOICE 1 HonkyPiano
  659. tun%(1) = -6901
  660. WHEN "JapFlute" : *CHANNELVOICE 1 JapFlute
  661. tun%(1) = -10997
  662. WHEN "JazzOrgan" : *CHANNELVOICE 1 JazzOrgan
  663. tun%(1) = -10997
  664. WHEN "MidStrings" : *CHANNELVOICE 1 MidStrings
  665. tun%(1) = -6901
  666. WHEN "NoteArp1" : *CHANNELVOICE 1 NoteArp1
  667. tun%(1) = -4000
  668. WHEN "SnareEcho" : *CHANNELVOICE 1 SnareEcho
  669. tun%(1) = -4341
  670. WHEN "TablaHi" : *CHANNELVOICE 1 TablaHi
  671. tun%(1) = -7669
  672. WHEN "Timpani" : *CHANNELVOICE 1 Timpani
  673. tun%(1) = -928
  674. WHEN "Tomtom1" : *CHANNELVOICE 1 Tomtom1
  675. tun%(1) = -5365
  676. WHEN "Trombone1" : *CHANNELVOICE 1 Trombone1
  677. tun%(1) = -6901
  678. WHEN "Trumpet" : *CHANNELVOICE 1 Trumpet
  679. tun%(1) = -10997
  680. WHEN "Xylophone" : *CHANNELVOICE 1 Xylophone
  681. tun%(1) = -6901
  682. WHEN "AcouGtr2B" : *CHANNELVOICE 1 AcouGtr2B
  683. tun%(1) = -6560
  684. WHEN "AcuBassAb1" : *CHANNELVOICE 1 AcuBassAb1
  685. tun%(1) = -1610
  686. WHEN "BagPipeG" : *CHANNELVOICE 1 BagPipeG
  687. tun%(1) = -9291
  688. WHEN "BanjoChdBb" : *CHANNELVOICE 1 BanjoChdBb
  689. tun%(1) = -4000
  690. WHEN "BazookiE" : *CHANNELVOICE 1 BazookiE
  691. tun%(1) = -8267
  692. WHEN "BellC" : *CHANNELVOICE 1 BellC
  693. tun%(1) = -10997
  694. WHEN "BrassEns1B" : *CHANNELVOICE 1 BrassEns1B
  695. tun%(1) = -6560
  696. WHEN "ClavichdBb" : *CHANNELVOICE 1 ClavichdBb
  697. tun%(1) = -10315
  698. WHEN "ClavinetBb" : *CHANNELVOICE 1 ClavinetBb
  699. tun%(1) = -6219
  700. WHEN "CornetEb" : *CHANNELVOICE 1 CornetEb
  701. tun%(1) = -4000
  702. WHEN "EnsWodAb45" : *CHANNELVOICE 1 EnsWodAb45
  703. tun%(1) = -9632
  704. WHEN "EnsWodGb12" : *CHANNELVOICE 1 EnsWodGb12
  705. tun%(1) = -4853
  706. WHEN "Glock2Ab5" : *CHANNELVOICE 1 Glock2Ab5
  707. tun%(1) = -9632
  708. WHEN "GtMelobarC" : *CHANNELVOICE 1 GtMelobarC
  709. tun%(1) = -6901
  710. WHEN "GtWashbnBb" : *CHANNELVOICE 1 GtWashbnBb
  711. tun%(1) = -6219
  712. WHEN "HarmonicaE" : *CHANNELVOICE 1 HarmonicaE
  713. tun%(1) = -4171
  714. WHEN "Jew'sHarpA" : *CHANNELVOICE 1 Jew'sHarpA
  715. tun%(1) = -6219
  716. WHEN "MusetteB" : *CHANNELVOICE 1 MusetteB
  717. tun%(1) = -10656
  718. WHEN "OboeGb" : *CHANNELVOICE 1 OboeGb
  719. tun%(1) = -13131
  720. WHEN "OrchHit2B" : *CHANNELVOICE 1 OrchHit2B
  721. tun%(1) = -5451
  722. WHEN "OrcSusBb23" : *CHANNELVOICE 1 OrcSusBb23
  723. tun%(1) = -6304
  724. WHEN "PiccoloE" : *CHANNELVOICE 1 PiccoloE
  725. tun%(1) = -16544
  726. WHEN "SaxSoprnoE" : *CHANNELVOICE 1 SaxSoprnoE
  727. tun%(1) = -12448
  728. WHEN "StrngThkBb" : *CHANNELVOICE 1 StrngThkBb
  729. tun%(1) = -5792
  730. WHEN "TubaGb" : *CHANNELVOICE 1 TubaGb
  731. tun%(1) = -929
  732. WHEN "BassDrum" : *CHANNELVOICE 1 BassDrum
  733. tun%(1) = -4000
  734. WHEN "HiHat" : *CHANNELVOICE 1 HiHat
  735. tun%(1) = -4000
  736. WHEN "OrcHit" : *CHANNELVOICE 1 OrcHit
  737. tun%(1) = -4085
  738. WHEN "Piano" : *CHANNELVOICE 1 Piano
  739. tun%(1) = -4171
  740. WHEN "Sax" : *CHANNELVOICE 1 Sax
  741. tun%(1) = -4085
  742. WHEN "Snare" : *CHANNELVOICE 1 Snare
  743. tun%(1) = -8096
  744. WHEN "Choir1" : *CHANNELVOICE 1 Choir1
  745. tun%(1) = -6901
  746. WHEN "ChurOrgan" : *CHANNELVOICE 1 ChurOrgan
  747. tun%(1) = -6901
  748. WHEN "Opera" : *CHANNELVOICE 1 Opera
  749. tun%(1) = -13387
  750. WHEN "OrchChoir" : *CHANNELVOICE 1 OrchChoir
  751. tun%(1) = -6133
  752. WHEN "OrganHit" : *CHANNELVOICE 1 OrganHit
  753. tun%(1) = -5024
  754. WHEN "AgogoAfric" : *CHANNELVOICE 1 AgogoAfric
  755. tun%(1) = -6219
  756. WHEN "AgogoBrazi" : *CHANNELVOICE 1 AgogoBrazi
  757. tun%(1) = -10997
  758. WHEN "AgogoWood" : *CHANNELVOICE 1 AgogoWood
  759. tun%(1) = -13728
  760. WHEN "BDGatedRev" : *CHANNELVOICE 1 BDGatedRev
  761. tun%(1) = -5877
  762. WHEN "BDMarching" : *CHANNELVOICE 1 BDMarching
  763. tun%(1) = -8608
  764. WHEN "BDPiloMute" : *CHANNELVOICE 1 BDPiloMute
  765. tun%(1) = -7072
  766. WHEN "Cabasa" : *CHANNELVOICE 1 Cabasa
  767. tun%(1) = -7072
  768. WHEN "Cachichi1" : *CHANNELVOICE 1 Cachichi1
  769. tun%(1) = -4000
  770. WHEN "CachichiTr" : *CHANNELVOICE 1 CachichiTr
  771. tun%(1) = -8096
  772. WHEN "Castanets" : *CHANNELVOICE 1 Castanets
  773. tun%(1) = -4000
  774. WHEN "CongaMid" : *CHANNELVOICE 1 CongaMid
  775. tun%(1) = -4171
  776. WHEN "CongaSmCl" : *CHANNELVOICE 1 CongaSmCl
  777. tun%(1) = -4683
  778. WHEN "CymbalCrsh" : *CHANNELVOICE 1 CymbalCrsh
  779. tun%(1) = -4000
  780. WHEN "CymRideBel" : *CHANNELVOICE 1 CymRideBel
  781. tun%(1) = -16288
  782. WHEN "CymRStRoll" : *CHANNELVOICE 1 CymRStRoll
  783. tun%(1) = -6389
  784. WHEN "CymSplshCa" : *CHANNELVOICE 1 CymSplshCa
  785. tun%(1) = -9120
  786. WHEN "Flexitone" : *CHANNELVOICE 1 Flexitone
  787. tun%(1) = -8096
  788. WHEN "GongSoft" : *CHANNELVOICE 1 GongSoft
  789. tun%(1) = -5365
  790. WHEN "Gonza1" : *CHANNELVOICE 1 Gonza1
  791. tun%(1) = -12192
  792. WHEN "GuiroSlow" : *CHANNELVOICE 1 GuiroSlow
  793. tun%(1) = -6048
  794. WHEN "HandClaps" : *CHANNELVOICE 1 HandClaps
  795. tun%(1) = -4000
  796. WHEN "HiHatFoot" : *CHANNELVOICE 1 HiHatFoot
  797. tun%(1) = -6389
  798. WHEN "Maracas1" : *CHANNELVOICE 1 Maracas1
  799. tun%(1) = -8096
  800. WHEN "MarimbaSB3" : *CHANNELVOICE 1 MarimbaSB3
  801. tun%(1) = -4000
  802. WHEN "Ratchet" : *CHANNELVOICE 1 Ratchet
  803. tun%(1) = -6731
  804. WHEN "RotoTomRev" : *CHANNELVOICE 1 RotoTomRev
  805. tun%(1) = -6133
  806. WHEN "SimmonsBD1" : *CHANNELVOICE 1 SimmonsBD1
  807. tun%(1) = -8096
  808. WHEN "SimmonsSn1" : *CHANNELVOICE 1 SimmonsSn1
  809. tun%(1) = -5707
  810. WHEN "SleighBell" : *CHANNELVOICE 1 SleighBell
  811. tun%(1) = -4000
  812. WHEN "SuperGong" : *CHANNELVOICE 1 SuperGong
  813. tun%(1) = -4341
  814. WHEN "SynthSnare" : *CHANNELVOICE 1 SynthSnare
  815. tun%(1) = -4000
  816. WHEN "SynTom" : *CHANNELVOICE 1 SynTom
  817. tun%(1) = -9120
  818. WHEN "TimpCresBb" : *CHANNELVOICE 1 TimpCresBb
  819. tun%(1) = -5962
  820. WHEN "TimpLowBb" : *CHANNELVOICE 1 TimpLowBb
  821. tun%(1) = -5707
  822. WHEN "TimpRollEb" : *CHANNELVOICE 1 TimpRollEb
  823. tun%(1) = -4000
  824. WHEN "TomRoll" : *CHANNELVOICE 1 TomRoll
  825. tun%(1) = -4000
  826. WHEN "ToyHooter" : *CHANNELVOICE 1 ToyHooter
  827. tun%(1) = -9717
  828. WHEN "ToyWhistle" : *CHANNELVOICE 1 ToyWhistle
  829. tun%(1) = -4000
  830. ENDCASE
  831. :
  832. WHEN 2 :
  833. CASE waveforms$(vnumber%) OF
  834. WHEN "WaveSynth-Beep" : *CHANNELVOICE 2 WaveSynth-Beep
  835. WHEN "StringLib-Soft" : *CHANNELVOICE 2 StringLib-Soft
  836. WHEN "StringLib-Pluck" : *CHANNELVOICE 2 StringLib-Pluck
  837. WHEN "StringLib-Steel" : *CHANNELVOICE 2 StringLib-Steel
  838. WHEN "StringLib-Hard" : *CHANNELVOICE 2 StringLib-Hard
  839. WHEN "Percussion-Soft" : *CHANNELVOICE 2 Percussion-Soft
  840. WHEN "Percussion-Medium" : *CHANNELVOICE 2 Percussion-Medium
  841. WHEN "Percussion-Snare" : *CHANNELVOICE 2 Percussion-Snare
  842. WHEN "Percussion-Noise" : *CHANNELVOICE 2 Percussion-Noise
  843. WHEN "BassBowAb" : *CHANNELVOICE 2 BassBowAb
  844. tun%(2) = -1470
  845. WHEN "AcouBass" : *CHANNELVOICE 2 AcouBass
  846. tun%(2) = -2731
  847. WHEN "Vibe" : *CHANNELVOICE 2 Vibe
  848. tun%(2) = -6912
  849. WHEN "BugleC" : *CHANNELVOICE 2 BugleC
  850. tun%(2) = -11008
  851. WHEN "CornetEb" : *CHANNELVOICE 2 CornetEb
  852. tun%(2) = -12117
  853. WHEN "SaxEbBarC" : *CHANNELVOICE 2 SaxEbBarC
  854. tun%(2) = -2816
  855. WHEN "SaxBbTenrE" : *CHANNELVOICE 2 SaxBbTenrE
  856. tun%(2) = -4181
  857. WHEN "BassoonEb" : *CHANNELVOICE 2 BassoonEb
  858. tun%(2) = -4011
  859. WHEN "ClarinetBb" : *CHANNELVOICE 2 ClarinetBb
  860. tun%(2) = -10325
  861. WHEN "EngHornGb" : *CHANNELVOICE 2 EngHornGb
  862. tun%(2) = -8960
  863. WHEN "MandolinDb" : *CHANNELVOICE 2 MandolinDb
  864. tun%(2) = -11264
  865. WHEN "Piano2B" : *CHANNELVOICE 2 Piano2B
  866. tun%(2) = -2475
  867. WHEN "ClarVibEb" : *CHANNELVOICE 2 ClarVibEb
  868. tun%(2) = -7850
  869. WHEN "GtrDobroB" : *CHANNELVOICE 2 GtrDobroB
  870. tun%(2) = -6485
  871. WHEN "RecorderGb" : *CHANNELVOICE 2 RecorderGb
  872. tun%(2) = -13056
  873. WHEN "FlugelHnEb" : *CHANNELVOICE 2 FlugelHnEb
  874. tun%(2) = -12032
  875. WHEN "VceMmmGb23" : *CHANNELVOICE 2 VceMmmGb23
  876. tun%(2) = -853
  877. WHEN "VceMOooGb3" : *CHANNELVOICE 2 VceMOooGb3
  878. tun%(2) = -4843
  879. WHEN "VceFemAahC" : *CHANNELVOICE 2 VceFemAahC
  880. tun%(2) = -10948
  881. WHEN "VceFMmmGb4" : *CHANNELVOICE 2 VceFMmmGb4
  882. tun%(2) = -8918
  883. WHEN "Bass" : *CHANNELVOICE 2 Bass
  884. tun%(2) = 0
  885. WHEN "ChurchBell" : *CHANNELVOICE 2 ChurchBell
  886. tun%(2) = -2731
  887. WHEN "mysound" : *CHANNELVOICE 2 mysound
  888. tun%(2) = 0
  889. WHEN "GuiroFast" : *CHANNELVOICE 2 GuiroFast
  890. tun%(2) = -4000
  891. WHEN "Clave" : *CHANNELVOICE 2 Clave
  892. tun%(2) = -8096
  893. WHEN "CowBell" : *CHANNELVOICE 2 CowBell
  894. tun%(2) = -5707
  895. WHEN "CymbRideHd" : *CHANNELVOICE 2 CymbRideHd
  896. tun%(2) = -8096
  897. WHEN "AcGuitar1" : *CHANNELVOICE 2 AcGuitar1
  898. tun%(2) = -7072
  899. WHEN "CongaHi" : *CHANNELVOICE 2 CongaHi
  900. tun%(2) = -4000
  901. WHEN "DrumExplo" : *CHANNELVOICE 2 DrumExplo
  902. tun%(2) = -4000
  903. WHEN "ElecTom1" : *CHANNELVOICE 2 ElecTom1
  904. tun%(2) = -8096
  905. WHEN "Harp1" : *CHANNELVOICE 2 Harp1
  906. tun%(2) = -10997
  907. WHEN "Harpsi" : *CHANNELVOICE 2 Harpsi
  908. tun%(2) = -6901
  909. WHEN "HiString" : *CHANNELVOICE 2 HiString
  910. tun%(2) = -10997
  911. WHEN "HonkyPiano" : *CHANNELVOICE 2 HonkyPiano
  912. tun%(2) = -6901
  913. WHEN "JapFlute" : *CHANNELVOICE 2 JapFlute
  914. tun%(2) = -10997
  915. WHEN "JazzOrgan" : *CHANNELVOICE 2 JazzOrgan
  916. tun%(2) = -10997
  917. WHEN "MidStrings" : *CHANNELVOICE 2 MidStrings
  918. tun%(2) = -6901
  919. WHEN "NoteArp1" : *CHANNELVOICE 2 NoteArp1
  920. tun%(2) = -4000
  921. WHEN "SnareEcho" : *CHANNELVOICE 2 SnareEcho
  922. tun%(2) = -4341
  923. WHEN "TablaHi" : *CHANNELVOICE 2 TablaHi
  924. tun%(2) = -7669
  925. WHEN "Timpani" : *CHANNELVOICE 2 Timpani
  926. tun%(2) = -928
  927. WHEN "Tomtom1" : *CHANNELVOICE 2 Tomtom1
  928. tun%(2) = -5365
  929. WHEN "Trombone1" : *CHANNELVOICE 2 Trombone1
  930. tun%(2) = -6901
  931. WHEN "Trumpet" : *CHANNELVOICE 2 Trumpet
  932. tun%(2) = -10997
  933. WHEN "Xylophone" : *CHANNELVOICE 2 Xylophone
  934. tun%(2) = -6901
  935. WHEN "AcouGtr2B" : *CHANNELVOICE 2 AcouGtr2B
  936. tun%(2) = -6560
  937. WHEN "AcuBassAb1" : *CHANNELVOICE 2 AcuBassAb1
  938. tun%(2) = -1610
  939. WHEN "BagPipeG" : *CHANNELVOICE 2 BagPipeG
  940. tun%(2) = -9291
  941. WHEN "BanjoChdBb" : *CHANNELVOICE 2 BanjoChdBb
  942. tun%(2) = -4000
  943. WHEN "BazookiE" : *CHANNELVOICE 2 BazookiE
  944. tun%(2) = -8267
  945. WHEN "BellC" : *CHANNELVOICE 2 BellC
  946. tun%(2) = -10997
  947. WHEN "BrassEns1B" : *CHANNELVOICE 2 BrassEns1B
  948. tun%(2) = -6560
  949. WHEN "ClavichdBb" : *CHANNELVOICE 2 ClavichdBb
  950. tun%(2) = -10315
  951. WHEN "ClavinetBb" : *CHANNELVOICE 2 ClavinetBb
  952. tun%(2) = -6219
  953. WHEN "CornetEb" : *CHANNELVOICE 2 CornetEb
  954. tun%(2) = -4000
  955. WHEN "EnsWodAb45" : *CHANNELVOICE 2 EnsWodAb45
  956. tun%(2) = -9632
  957. WHEN "EnsWodGb12" : *CHANNELVOICE 2 EnsWodGb12
  958. tun%(2) = -4853
  959. WHEN "Glock2Ab5" : *CHANNELVOICE 2 Glock2Ab5
  960. tun%(2) = -9632
  961. WHEN "GtMelobarC" : *CHANNELVOICE 2 GtMelobarC
  962. tun%(2) = -6901
  963. WHEN "GtWashbnBb" : *CHANNELVOICE 2 GtWashbnBb
  964. tun%(2) = -6219
  965. WHEN "HarmonicaE" : *CHANNELVOICE 2 HarmonicaE
  966. tun%(2) = -4171
  967. WHEN "Jew'sHarpA" : *CHANNELVOICE 2 Jew'sHarpA
  968. tun%(2) = -6219
  969. WHEN "MusetteB" : *CHANNELVOICE 2 MusetteB
  970. tun%(2) = -10656
  971. WHEN "OboeGb" : *CHANNELVOICE 2 OboeGb
  972. tun%(2) = -13131
  973. WHEN "OrchHit2B" : *CHANNELVOICE 2 OrchHit2B
  974. tun%(2) = -5451
  975. WHEN "OrcSusBb23" : *CHANNELVOICE 2 OrcSusBb23
  976. tun%(2) = -6304
  977. WHEN "PiccoloE" : *CHANNELVOICE 2 PiccoloE
  978. tun%(2) = -16544
  979. WHEN "SaxSoprnoE" : *CHANNELVOICE 2 SaxSoprnoE
  980. tun%(2) = -12448
  981. WHEN "StrngThkBb" : *CHANNELVOICE 2 StrngThkBb
  982. tun%(2) = -5792
  983. WHEN "TubaGb" : *CHANNELVOICE 2 TubaGb
  984. tun%(2) = -929
  985. WHEN "BassDrum" : *CHANNELVOICE 2 BassDrum
  986. tun%(2) = -4000
  987. WHEN "HiHat" : *CHANNELVOICE 2 HiHat
  988. tun%(2) = -4000
  989. WHEN "OrcHit" : *CHANNELVOICE 2 OrcHit
  990. tun%(2) = -4085
  991. WHEN "Piano" : *CHANNELVOICE 2 Piano
  992. tun%(2) = -4171
  993. WHEN "Sax" : *CHANNELVOICE 2 Sax
  994. tun%(2) = -4085
  995. WHEN "Snare" : *CHANNELVOICE 2 Snare
  996. tun%(2) = -8096
  997. WHEN "Choir1" : *CHANNELVOICE 2 Choir1
  998. tun%(2) = -6901
  999. WHEN "ChurOrgan" : *CHANNELVOICE 2 ChurOrgan
  1000. tun%(2) = -6901
  1001. WHEN "Opera" : *CHANNELVOICE 2 Opera
  1002. tun%(2) = -13387
  1003. WHEN "OrchChoir" : *CHANNELVOICE 2 OrchChoir
  1004. tun%(2) = -6133
  1005. WHEN "OrganHit" : *CHANNELVOICE 2 OrganHit
  1006. tun%(2) = -5024
  1007. WHEN "AgogoAfric" : *CHANNELVOICE 2 AgogoAfric
  1008. tun%(2) = -6219
  1009. WHEN "AgogoBrazi" : *CHANNELVOICE 2 AgogoBrazi
  1010. tun%(2) = -10997
  1011. WHEN "AgogoWood" : *CHANNELVOICE 2 AgogoWood
  1012. tun%(2) = -13728
  1013. WHEN "BDGatedRev" : *CHANNELVOICE 2 BDGatedRev
  1014. tun%(2) = -5877
  1015. WHEN "BDMarching" : *CHANNELVOICE 2 BDMarching
  1016. tun%(2) = -8608
  1017. WHEN "BDPiloMute" : *CHANNELVOICE 2 BDPiloMute
  1018. tun%(2) = -7072
  1019. WHEN "Cabasa" : *CHANNELVOICE 2 Cabasa
  1020. tun%(2) = -7072
  1021. WHEN "Cachichi1" : *CHANNELVOICE 2 Cachichi1
  1022. tun%(2) = -4000
  1023. WHEN "CachichiTr" : *CHANNELVOICE 2 CachichiTr
  1024. tun%(2) = -8096
  1025. WHEN "Castanets" : *CHANNELVOICE 2 Castanets
  1026. tun%(2) = -4000
  1027. WHEN "CongaMid" : *CHANNELVOICE 2 CongaMid
  1028. tun%(2) = -4171
  1029. WHEN "CongaSmCl" : *CHANNELVOICE 2 CongaSmCl
  1030. tun%(2) = -4683
  1031. WHEN "CymbalCrsh" : *CHANNELVOICE 2 CymbalCrsh
  1032. tun%(2) = -4000
  1033. WHEN "CymRideBel" : *CHANNELVOICE 2 CymRideBel
  1034. tun%(2) = -16288
  1035. WHEN "CymRStRoll" : *CHANNELVOICE 2 CymRStRoll
  1036. tun%(2) = -6389
  1037. WHEN "CymSplshCa" : *CHANNELVOICE 2 CymSplshCa
  1038. tun%(2) = -9120
  1039. WHEN "Flexitone" : *CHANNELVOICE 2 Flexitone
  1040. tun%(2) = -8096
  1041. WHEN "GongSoft" : *CHANNELVOICE 2 GongSoft
  1042. tun%(2) = -5365
  1043. WHEN "Gonza1" : *CHANNELVOICE 2 Gonza1
  1044. tun%(2) = -12192
  1045. WHEN "GuiroSlow" : *CHANNELVOICE 2 GuiroSlow
  1046. tun%(2) = -6048
  1047. WHEN "HandClaps" : *CHANNELVOICE 2 HandClaps
  1048. tun%(2) = -4000
  1049. WHEN "HiHatFoot" : *CHANNELVOICE 2 HiHatFoot
  1050. tun%(2) = -6389
  1051. WHEN "Maracas1" : *CHANNELVOICE 2 Maracas1
  1052. tun%(2) = -8096
  1053. WHEN "MarimbaSB3" : *CHANNELVOICE 2 MarimbaSB3
  1054. tun%(2) = -4000
  1055. WHEN "Ratchet" : *CHANNELVOICE 2 Ratchet
  1056. tun%(2) = -6731
  1057. WHEN "RotoTomRev" : *CHANNELVOICE 2 RotoTomRev
  1058. tun%(2) = -6133
  1059. WHEN "SimmonsBD1" : *CHANNELVOICE 2 SimmonsBD1
  1060. tun%(2) = -8096
  1061. WHEN "SimmonsSn1" : *CHANNELVOICE 2 SimmonsSn1
  1062. tun%(2) = -5707
  1063. WHEN "SleighBell" : *CHANNELVOICE 2 SleighBell
  1064. tun%(2) = -4000
  1065. WHEN "SuperGong" : *CHANNELVOICE 2 SuperGong
  1066. tun%(2) = -4341
  1067. WHEN "SynthSnare" : *CHANNELVOICE 2 SynthSnare
  1068. tun%(2) = -4000
  1069. WHEN "SynTom" : *CHANNELVOICE 2 SynTom
  1070. tun%(2) = -9120
  1071. WHEN "TimpCresBb" : *CHANNELVOICE 2 TimpCresBb
  1072. tun%(2) = -5962
  1073. WHEN "TimpLowBb" : *CHANNELVOICE 2 TimpLowBb
  1074. tun%(2) = -5707
  1075. WHEN "TimpRollEb" : *CHANNELVOICE 2 TimpRollEb
  1076. tun%(2) = -4000
  1077. WHEN "TomRoll" : *CHANNELVOICE 2 TomRoll
  1078. tun%(2) = -4000
  1079. WHEN "ToyHooter" : *CHANNELVOICE 2 ToyHooter
  1080. tun%(2) = -9717
  1081. WHEN "ToyWhistle" : *CHANNELVOICE 2 ToyWhistle
  1082. tun%(2) = -4000
  1083. ENDCASE
  1084. WHEN 3 :
  1085. CASE waveforms$(vnumber%) OF
  1086. WHEN "WaveSynth-Beep" : *CHANNELVOICE 3 WaveSynth-Beep
  1087. WHEN "StringLib-Soft" : *CHANNELVOICE 3 StringLib-Soft
  1088. WHEN "StringLib-Pluck" : *CHANNELVOICE 3 StringLib-Pluck
  1089. WHEN "StringLib-Steel" : *CHANNELVOICE 3 StringLib-Steel
  1090. WHEN "StringLib-Hard" : *CHANNELVOICE 3 StringLib-Hard
  1091. WHEN "Percussion-Soft" : *CHANNELVOICE 3 Percussion-Soft
  1092. WHEN "Percussion-Medium" : *CHANNELVOICE 3 Percussion-Medium
  1093. WHEN "Percussion-Snare" : *CHANNELVOICE 3 Percussion-Snare
  1094. WHEN "Percussion-Noise" : *CHANNELVOICE 3 Percussion-Noise
  1095. WHEN "BassBowAb" : *CHANNELVOICE 3 BassBowAb
  1096. tun%(3) = -1470
  1097. WHEN "AcouBass" : *CHANNELVOICE 3 AcouBass
  1098. tun%(3) = -2731
  1099. WHEN "Vibe" : *CHANNELVOICE 3 Vibe
  1100. tun%(3) = -6912
  1101. WHEN "BugleC" : *CHANNELVOICE 3 BugleC
  1102. tun%(3) = -11008
  1103. WHEN "CornetEb" : *CHANNELVOICE 3 CornetEb
  1104. tun%(3) = -12117
  1105. WHEN "SaxEbBarC" : *CHANNELVOICE 3 SaxEbBarC
  1106. tun%(3) = -2816
  1107. WHEN "SaxBbTenrE" : *CHANNELVOICE 3 SaxBbTenrE
  1108. tun%(3) = -4181
  1109. WHEN "BassoonEb" : *CHANNELVOICE 3 BassoonEb
  1110. tun%(3) = -4011
  1111. WHEN "ClarinetBb" : *CHANNELVOICE 3 ClarinetBb
  1112. tun%(3) = -10325
  1113. WHEN "EngHornGb" : *CHANNELVOICE 3 EngHornGb
  1114. tun%(3) = -8960
  1115. WHEN "MandolinDb" : *CHANNELVOICE 3 MandolinDb
  1116. tun%(3) = -11264
  1117. WHEN "Piano2B" : *CHANNELVOICE 3 Piano2B
  1118. tun%(3) = -2475
  1119. WHEN "ClarVibEb" : *CHANNELVOICE 3 ClarVibEb
  1120. tun%(3) = -7850
  1121. WHEN "GtrDobroB" : *CHANNELVOICE 3 GtrDobroB
  1122. tun%(3) = -6485
  1123. WHEN "RecorderGb" : *CHANNELVOICE 3 RecorderGb
  1124. tun%(3) = -13056
  1125. WHEN "FlugelHnEb" : *CHANNELVOICE 3 FlugelHnEb
  1126. tun%(3) = -12032
  1127. WHEN "VceMmmGb23" : *CHANNELVOICE 3 VceMmmGb23
  1128. tun%(3) = -853
  1129. WHEN "VceMOooGb3" : *CHANNELVOICE 3 VceMOooGb3
  1130. tun%(3) = -4843
  1131. WHEN "VceFemAahC" : *CHANNELVOICE 3 VceFemAahC
  1132. tun%(3) = -10948
  1133. WHEN "VceFMmmGb4" : *CHANNELVOICE 3 VceFMmmGb4
  1134. tun%(3) = -8918
  1135. WHEN "Bass" : *CHANNELVOICE 3 Bass
  1136. tun%(3) = 0
  1137. WHEN "ChurchBell" : *CHANNELVOICE 3 ChurchBell
  1138. tun%(3) = -2731
  1139. WHEN "mysound" : *CHANNELVOICE 3 mysound
  1140. tun%(3) = 0
  1141. WHEN "GuiroFast" : *CHANNELVOICE 3 GuiroFast
  1142. tun%(3) = -4000
  1143. WHEN "Clave" : *CHANNELVOICE 3 Clave
  1144. tun%(3) = -8096
  1145. WHEN "CowBell" : *CHANNELVOICE 3 CowBell
  1146. tun%(3) = -5707
  1147. WHEN "CymbRideHd" : *CHANNELVOICE 3 CymbRideHd
  1148. tun%(3) = -8096
  1149. WHEN "AcGuitar1" : *CHANNELVOICE 3 AcGuitar1
  1150. tun%(3) = -7072
  1151. WHEN "CongaHi" : *CHANNELVOICE 3 CongaHi
  1152. tun%(3) = -4000
  1153. WHEN "DrumExplo" : *CHANNELVOICE 3 DrumExplo
  1154. tun%(3) = -4000
  1155. WHEN "ElecTom1" : *CHANNELVOICE 3 ElecTom1
  1156. tun%(3) = -8096
  1157. WHEN "Harp1" : *CHANNELVOICE 3 Harp1
  1158. tun%(3) = -10997
  1159. WHEN "Harpsi" : *CHANNELVOICE 3 Harpsi
  1160. tun%(3) = -6901
  1161. WHEN "HiString" : *CHANNELVOICE 3 HiString
  1162. tun%(3) = -10997
  1163. WHEN "HonkyPiano" : *CHANNELVOICE 3 HonkyPiano
  1164. tun%(3) = -6901
  1165. WHEN "JapFlute" : *CHANNELVOICE 3 JapFlute
  1166. tun%(3) = -10997
  1167. WHEN "JazzOrgan" : *CHANNELVOICE 3 JazzOrgan
  1168. tun%(3) = -10997
  1169. WHEN "MidStrings" : *CHANNELVOICE 3 MidStrings
  1170. tun%(3) = -6901
  1171. WHEN "NoteArp1" : *CHANNELVOICE 3 NoteArp1
  1172. tun%(3) = -4000
  1173. WHEN "SnareEcho" : *CHANNELVOICE 3 SnareEcho
  1174. tun%(3) = -4341
  1175. WHEN "TablaHi" : *CHANNELVOICE 3 TablaHi
  1176. tun%(3) = -7669
  1177. WHEN "Timpani" : *CHANNELVOICE 3 Timpani
  1178. tun%(3) = -928
  1179. WHEN "Tomtom1" : *CHANNELVOICE 3 Tomtom1
  1180. tun%(3) = -5365
  1181. WHEN "Trombone1" : *CHANNELVOICE 3 Trombone1
  1182. tun%(3) = -6901
  1183. WHEN "Trumpet" : *CHANNELVOICE 3 Trumpet
  1184. tun%(3) = -10997
  1185. WHEN "Xylophone" : *CHANNELVOICE 3 Xylophone
  1186. tun%(3) = -6901
  1187. WHEN "AcouGtr2B" : *CHANNELVOICE 3 AcouGtr2B
  1188. tun%(3) = -6560
  1189. WHEN "AcuBassAb1" : *CHANNELVOICE 3 AcuBassAb1
  1190. tun%(3) = -1610
  1191. WHEN "BagPipeG" : *CHANNELVOICE 3 BagPipeG
  1192. tun%(3) = -9291
  1193. WHEN "BanjoChdBb" : *CHANNELVOICE 3 BanjoChdBb
  1194. tun%(3) = -4000
  1195. WHEN "BazookiE" : *CHANNELVOICE 3 BazookiE
  1196. tun%(3) = -8267
  1197. WHEN "BellC" : *CHANNELVOICE 3 BellC
  1198. tun%(3) = -10997
  1199. WHEN "BrassEns1B" : *CHANNELVOICE 3 BrassEns1B
  1200. tun%(3) = -6560
  1201. WHEN "ClavichdBb" : *CHANNELVOICE 3 ClavichdBb
  1202. tun%(3) = -10315
  1203. WHEN "ClavinetBb" : *CHANNELVOICE 3 ClavinetBb
  1204. tun%(3) = -6219
  1205. WHEN "CornetEb" : *CHANNELVOICE 3 CornetEb
  1206. tun%(3) = -4000
  1207. WHEN "EnsWodAb45" : *CHANNELVOICE 3 EnsWodAb45
  1208. tun%(3) = -9632
  1209. WHEN "EnsWodGb12" : *CHANNELVOICE 3 EnsWodGb12
  1210. tun%(3) = -4853
  1211. WHEN "Glock2Ab5" : *CHANNELVOICE 3 Glock2Ab5
  1212. tun%(3) = -9632
  1213. WHEN "GtMelobarC" : *CHANNELVOICE 3 GtMelobarC
  1214. tun%(3) = -6901
  1215. WHEN "GtWashbnBb" : *CHANNELVOICE 3 GtWashbnBb
  1216. tun%(3) = -6219
  1217. WHEN "HarmonicaE" : *CHANNELVOICE 3 HarmonicaE
  1218. tun%(3) = -4171
  1219. WHEN "Jew'sHarpA" : *CHANNELVOICE 3 Jew'sHarpA
  1220. tun%(3) = -6219
  1221. WHEN "MusetteB" : *CHANNELVOICE 3 MusetteB
  1222. tun%(3) = -10656
  1223. WHEN "OboeGb" : *CHANNELVOICE 3 OboeGb
  1224. tun%(3) = -13131
  1225. WHEN "OrchHit2B" : *CHANNELVOICE 3 OrchHit2B
  1226. tun%(3) = -5451
  1227. WHEN "OrcSusBb23" : *CHANNELVOICE 3 OrcSusBb23
  1228. tun%(3) = -6304
  1229. WHEN "PiccoloE" : *CHANNELVOICE 3 PiccoloE
  1230. tun%(3) = -16544
  1231. WHEN "SaxSoprnoE" : *CHANNELVOICE 3 SaxSoprnoE
  1232. tun%(3) = -12448
  1233. WHEN "StrngThkBb" : *CHANNELVOICE 3 StrngThkBb
  1234. tun%(3) = -5792
  1235. WHEN "TubaGb" : *CHANNELVOICE 3 TubaGb
  1236. tun%(3) = -929
  1237. WHEN "BassDrum" : *CHANNELVOICE 3 BassDrum
  1238. tun%(3) = -4000
  1239. WHEN "HiHat" : *CHANNELVOICE 3 HiHat
  1240. tun%(3) = -4000
  1241. WHEN "OrcHit" : *CHANNELVOICE 3 OrcHit
  1242. tun%(3) = -4085
  1243. WHEN "Piano" : *CHANNELVOICE 3 Piano
  1244. tun%(3) = -4171
  1245. WHEN "Sax" : *CHANNELVOICE 3 Sax
  1246. tun%(3) = -4085
  1247. WHEN "Snare" : *CHANNELVOICE 3 Snare
  1248. tun%(3) = -8096
  1249. WHEN "Choir1" : *CHANNELVOICE 3 Choir1
  1250. tun%(3) = -6901
  1251. WHEN "ChurOrgan" : *CHANNELVOICE 3 ChurOrgan
  1252. tun%(3) = -6901
  1253. WHEN "Opera" : *CHANNELVOICE 3 Opera
  1254. tun%(3) = -13387
  1255. WHEN "OrchChoir" : *CHANNELVOICE 3 OrchChoir
  1256. tun%(3) = -6133
  1257. WHEN "OrganHit" : *CHANNELVOICE 3 OrganHit
  1258. tun%(3) = -5024
  1259. WHEN "AgogoAfric" : *CHANNELVOICE 3 AgogoAfric
  1260. tun%(3) = -6219
  1261. WHEN "AgogoBrazi" : *CHANNELVOICE 3 AgogoBrazi
  1262. tun%(3) = -10997
  1263. WHEN "AgogoWood" : *CHANNELVOICE 3 AgogoWood
  1264. tun%(3) = -13728
  1265. WHEN "BDGatedRev" : *CHANNELVOICE 3 BDGatedRev
  1266. tun%(3) = -5877
  1267. WHEN "BDMarching" : *CHANNELVOICE 3 BDMarching
  1268. tun%(3) = -8608
  1269. WHEN "BDPiloMute" : *CHANNELVOICE 3 BDPiloMute
  1270. tun%(3) = -7072
  1271. WHEN "Cabasa" : *CHANNELVOICE 3 Cabasa
  1272. tun%(3) = -7072
  1273. WHEN "Cachichi1" : *CHANNELVOICE 3 Cachichi1
  1274. tun%(3) = -4000
  1275. WHEN "CachichiTr" : *CHANNELVOICE 3 CachichiTr
  1276. tun%(3) = -8096
  1277. WHEN "Castanets" : *CHANNELVOICE 3 Castanets
  1278. tun%(3) = -4000
  1279. WHEN "CongaMid" : *CHANNELVOICE 3 CongaMid
  1280. tun%(3) = -4171
  1281. WHEN "CongaSmCl" : *CHANNELVOICE 3 CongaSmCl
  1282. tun%(3) = -4683
  1283. WHEN "CymbalCrsh" : *CHANNELVOICE 3 CymbalCrsh
  1284. tun%(3) = -4000
  1285. WHEN "CymRideBel" : *CHANNELVOICE 3 CymRideBel
  1286. tun%(3) = -16288
  1287. WHEN "CymRStRoll" : *CHANNELVOICE 3 CymRStRoll
  1288. tun%(3) = -6389
  1289. WHEN "CymSplshCa" : *CHANNELVOICE 3 CymSplshCa
  1290. tun%(3) = -9120
  1291. WHEN "Flexitone" : *CHANNELVOICE 3 Flexitone
  1292. tun%(3) = -8096
  1293. WHEN "GongSoft" : *CHANNELVOICE 3 GongSoft
  1294. tun%(3) = -5365
  1295. WHEN "Gonza1" : *CHANNELVOICE 3 Gonza1
  1296. tun%(3) = -12192
  1297. WHEN "GuiroSlow" : *CHANNELVOICE 3 GuiroSlow
  1298. tun%(3) = -6048
  1299. WHEN "HandClaps" : *CHANNELVOICE 3 HandClaps
  1300. tun%(3) = -4000
  1301. WHEN "HiHatFoot" : *CHANNELVOICE 3 HiHatFoot
  1302. tun%(3) = -6389
  1303. WHEN "Maracas1" : *CHANNELVOICE 3 Maracas1
  1304. tun%(3) = -8096
  1305. WHEN "MarimbaSB3" : *CHANNELVOICE 3 MarimbaSB3
  1306. tun%(3) = -4000
  1307. WHEN "Ratchet" : *CHANNELVOICE 3 Ratchet
  1308. tun%(3) = -6731
  1309. WHEN "RotoTomRev" : *CHANNELVOICE 3 RotoTomRev
  1310. tun%(3) = -6133
  1311. WHEN "SimmonsBD1" : *CHANNELVOICE 3 SimmonsBD1
  1312. tun%(3) = -8096
  1313. WHEN "SimmonsSn1" : *CHANNELVOICE 3 SimmonsSn1
  1314. tun%(3) = -5707
  1315. WHEN "SleighBell" : *CHANNELVOICE 3 SleighBell
  1316. tun%(3) = -4000
  1317. WHEN "SuperGong" : *CHANNELVOICE 3 SuperGong
  1318. tun%(3) = -4341
  1319. WHEN "SynthSnare" : *CHANNELVOICE 3 SynthSnare
  1320. tun%(3) = -4000
  1321. WHEN "SynTom" : *CHANNELVOICE 3 SynTom
  1322. tun%(3) = -9120
  1323. WHEN "TimpCresBb" : *CHANNELVOICE 3 TimpCresBb
  1324. tun%(3) = -5962
  1325. WHEN "TimpLowBb" : *CHANNELVOICE 3 TimpLowBb
  1326. tun%(3) = -5707
  1327. WHEN "TimpRollEb" : *CHANNELVOICE 3 TimpRollEb
  1328. tun%(3) = -4000
  1329. WHEN "TomRoll" : *CHANNELVOICE 3 TomRoll
  1330. tun%(3) = -4000
  1331. WHEN "ToyHooter" : *CHANNELVOICE 3 ToyHooter
  1332. tun%(3) = -9717
  1333. WHEN "ToyWhistle" : *CHANNELVOICE 3 ToyWhistle
  1334. tun%(3) = -4000
  1335. ENDCASE
  1336. WHEN 4 :
  1337. CASE waveforms$(vnumber%) OF
  1338. WHEN "WaveSynth-Beep" : *CHANNELVOICE 4 WaveSynth-Beep
  1339. WHEN "StringLib-Soft" : *CHANNELVOICE 4 StringLib-Soft
  1340. WHEN "StringLib-Pluck" : *CHANNELVOICE 4 StringLib-Pluck
  1341. WHEN "StringLib-Steel" : *CHANNELVOICE 4 StringLib-Steel
  1342. WHEN "StringLib-Hard" : *CHANNELVOICE 4 StringLib-Hard
  1343. WHEN "Percussion-Soft" : *CHANNELVOICE 4 Percussion-Soft
  1344. WHEN "Percussion-Medium" : *CHANNELVOICE 4 Percussion-Medium
  1345. WHEN "Percussion-Snare" : *CHANNELVOICE 4 Percussion-Snare
  1346. WHEN "Percussion-Noise" : *CHANNELVOICE 4 Percussion-Noise
  1347. WHEN "BassBowAb" : *CHANNELVOICE 4 BassBowAb
  1348. tun%(4) = -1470
  1349. WHEN "AcouBass" : *CHANNELVOICE 4 AcouBass
  1350. tun%(4) = -2731
  1351. WHEN "Vibe" : *CHANNELVOICE 4 Vibe
  1352. tun%(4) = -6912
  1353. WHEN "BugleC" : *CHANNELVOICE 4 BugleC
  1354. tun%(4) = -11008
  1355. WHEN "CornetEb" : *CHANNELVOICE 4 CornetEb
  1356. tun%(4) = -12117
  1357. WHEN "SaxEbBarC" : *CHANNELVOICE 4 SaxEbBarC
  1358. tun%(4) = -2816
  1359. WHEN "SaxBbTenrE" : *CHANNELVOICE 4 SaxBbTenrE
  1360. tun%(4) = -4181
  1361. WHEN "BassoonEb" : *CHANNELVOICE 4 BassoonEb
  1362. tun%(4) = -4011
  1363. WHEN "ClarinetBb" : *CHANNELVOICE 4 ClarinetBb
  1364. tun%(4) = -10325
  1365. WHEN "EngHornGb" : *CHANNELVOICE 4 EngHornGb
  1366. tun%(4) = -8960
  1367. WHEN "MandolinDb" : *CHANNELVOICE 4 MandolinDb
  1368. tun%(4) = -11264
  1369. WHEN "Piano2B" : *CHANNELVOICE 4 Piano2B
  1370. tun%(4) = -2475
  1371. WHEN "ClarVibEb" : *CHANNELVOICE 4 ClarVibEb
  1372. tun%(4) = -7850
  1373. WHEN "GtrDobroB" : *CHANNELVOICE 4 GtrDobroB
  1374. tun%(4) = -6485
  1375. WHEN "RecorderGb" : *CHANNELVOICE 4 RecorderGb
  1376. tun%(4) = -13056
  1377. WHEN "FlugelHnEb" : *CHANNELVOICE 4 FlugelHnEb
  1378. tun%(4) = -12032
  1379. WHEN "VceMmmGb23" : *CHANNELVOICE 4 VceMmmGb23
  1380. tun%(4) = -853
  1381. WHEN "VceMOooGb3" : *CHANNELVOICE 4 VceMOooGb3
  1382. tun%(4) = -4843
  1383. WHEN "VceFemAahC" : *CHANNELVOICE 4 VceFemAahC
  1384. tun%(4) = -10948
  1385. WHEN "VceFMmmGb4" : *CHANNELVOICE 4 VceFMmmGb4
  1386. tun%(4) = -8918
  1387. WHEN "Bass" : *CHANNELVOICE 4 Bass
  1388. tun%(4) = 0
  1389. WHEN "ChurchBell" : *CHANNELVOICE 4 ChurchBell
  1390. tun%(4) = -2731
  1391. WHEN "mysound" : *CHANNELVOICE 4 mysound
  1392. tun%(4) = 0
  1393. WHEN "GuiroFast" : *CHANNELVOICE 4 GuiroFast
  1394. tun%(4) = -4000
  1395. WHEN "Clave" : *CHANNELVOICE 4 Clave
  1396. tun%(4) = -8096
  1397. WHEN "CowBell" : *CHANNELVOICE 4 CowBell
  1398. tun%(4) = -5707
  1399. WHEN "CymbRideHd" : *CHANNELVOICE 4 CymbRideHd
  1400. tun%(4) = -8096
  1401. WHEN "AcGuitar1" : *CHANNELVOICE 4 AcGuitar1
  1402. tun%(4) = -7072
  1403. WHEN "CongaHi" : *CHANNELVOICE 4 CongaHi
  1404. tun%(4) = -4000
  1405. WHEN "DrumExplo" : *CHANNELVOICE 4 DrumExplo
  1406. tun%(4) = -4000
  1407. WHEN "ElecTom1" : *CHANNELVOICE 4 ElecTom1
  1408. tun%(4) = -8096
  1409. WHEN "Harp1" : *CHANNELVOICE 4 Harp1
  1410. tun%(4) = -10997
  1411. WHEN "Harpsi" : *CHANNELVOICE 4 Harpsi
  1412. tun%(4) = -6901
  1413. WHEN "HiString" : *CHANNELVOICE 4 HiString
  1414. tun%(4) = -10997
  1415. WHEN "HonkyPiano" : *CHANNELVOICE 4 HonkyPiano
  1416. tun%(4) = -6901
  1417. WHEN "JapFlute" : *CHANNELVOICE 4 JapFlute
  1418. tun%(4) = -10997
  1419. WHEN "JazzOrgan" : *CHANNELVOICE 4 JazzOrgan
  1420. tun%(4) = -10997
  1421. WHEN "MidStrings" : *CHANNELVOICE 4 MidStrings
  1422. tun%(4) = -6901
  1423. WHEN "NoteArp1" : *CHANNELVOICE 4 NoteArp1
  1424. tun%(4) = -4000
  1425. WHEN "SnareEcho" : *CHANNELVOICE 4 SnareEcho
  1426. tun%(4) = -4341
  1427. WHEN "TablaHi" : *CHANNELVOICE 4 TablaHi
  1428. tun%(4) = -7669
  1429. WHEN "Timpani" : *CHANNELVOICE 4 Timpani
  1430. tun%(4) = -928
  1431. WHEN "Tomtom1" : *CHANNELVOICE 4 Tomtom1
  1432. tun%(4) = -5365
  1433. WHEN "Trombone1" : *CHANNELVOICE 4 Trombone1
  1434. tun%(4) = -6901
  1435. WHEN "Trumpet" : *CHANNELVOICE 4 Trumpet
  1436. tun%(4) = -10997
  1437. WHEN "Xylophone" : *CHANNELVOICE 4 Xylophone
  1438. tun%(4) = -6901
  1439. WHEN "AcouGtr2B" : *CHANNELVOICE 4 AcouGtr2B
  1440. tun%(4) = -6560
  1441. WHEN "AcuBassAb1" : *CHANNELVOICE 4 AcuBassAb1
  1442. tun%(4) = -1610
  1443. WHEN "BagPipeG" : *CHANNELVOICE 4 BagPipeG
  1444. tun%(4) = -9291
  1445. WHEN "BanjoChdBb" : *CHANNELVOICE 4 BanjoChdBb
  1446. tun%(4) = -4000
  1447. WHEN "BazookiE" : *CHANNELVOICE 4 BazookiE
  1448. tun%(4) = -8267
  1449. WHEN "BellC" : *CHANNELVOICE 4 BellC
  1450. tun%(4) = -10997
  1451. WHEN "BrassEns1B" : *CHANNELVOICE 4 BrassEns1B
  1452. tun%(4) = -6560
  1453. WHEN "ClavichdBb" : *CHANNELVOICE 4 ClavichdBb
  1454. tun%(4) = -10315
  1455. WHEN "ClavinetBb" : *CHANNELVOICE 4 ClavinetBb
  1456. tun%(4) = -6219
  1457. WHEN "CornetEb" : *CHANNELVOICE 4 CornetEb
  1458. tun%(4) = -4000
  1459. WHEN "EnsWodAb45" : *CHANNELVOICE 4 EnsWodAb45
  1460. tun%(4) = -9632
  1461. WHEN "EnsWodGb12" : *CHANNELVOICE 4 EnsWodGb12
  1462. tun%(4) = -4853
  1463. WHEN "Glock2Ab5" : *CHANNELVOICE 4 Glock2Ab5
  1464. tun%(4) = -9632
  1465. WHEN "GtMelobarC" : *CHANNELVOICE 4 GtMelobarC
  1466. tun%(4) = -6901
  1467. WHEN "GtWashbnBb" : *CHANNELVOICE 4 GtWashbnBb
  1468. tun%(4) = -6219
  1469. WHEN "HarmonicaE" : *CHANNELVOICE 4 HarmonicaE
  1470. tun%(4) = -4171
  1471. WHEN "Jew'sHarpA" : *CHANNELVOICE 4 Jew'sHarpA
  1472. tun%(4) = -6219
  1473. WHEN "MusetteB" : *CHANNELVOICE 4 MusetteB
  1474. tun%(4) = -10656
  1475. WHEN "OboeGb" : *CHANNELVOICE 4 OboeGb
  1476. tun%(4) = -13131
  1477. WHEN "OrchHit2B" : *CHANNELVOICE 4 OrchHit2B
  1478. tun%(4) = -5451
  1479. WHEN "OrcSusBb23" : *CHANNELVOICE 4 OrcSusBb23
  1480. tun%(4) = -6304
  1481. WHEN "PiccoloE" : *CHANNELVOICE 4 PiccoloE
  1482. tun%(4) = -16544
  1483. WHEN "SaxSoprnoE" : *CHANNELVOICE 4 SaxSoprnoE
  1484. tun%(4) = -12448
  1485. WHEN "StrngThkBb" : *CHANNELVOICE 4 StrngThkBb
  1486. tun%(4) = -5792
  1487. WHEN "TubaGb" : *CHANNELVOICE 4 TubaGb
  1488. tun%(4) = -929
  1489. WHEN "BassDrum" : *CHANNELVOICE 4 BassDrum
  1490. tun%(4) = -4000
  1491. WHEN "HiHat" : *CHANNELVOICE 4 HiHat
  1492. tun%(4) = -4000
  1493. WHEN "OrcHit" : *CHANNELVOICE 4 OrcHit
  1494. tun%(4) = -4085
  1495. WHEN "Piano" : *CHANNELVOICE 4 Piano
  1496. tun%(4) = -4171
  1497. WHEN "Sax" : *CHANNELVOICE 4 Sax
  1498. tun%(4) = -4085
  1499. WHEN "Snare" : *CHANNELVOICE 4 Snare
  1500. tun%(4) = -8096
  1501. WHEN "Choir1" : *CHANNELVOICE 4 Choir1
  1502. tun%(4) = -6901
  1503. WHEN "ChurOrgan" : *CHANNELVOICE 4 ChurOrgan
  1504. tun%(4) = -6901
  1505. WHEN "Opera" : *CHANNELVOICE 4 Opera
  1506. tun%(4) = -13387
  1507. WHEN "OrchChoir" : *CHANNELVOICE 4 OrchChoir
  1508. tun%(4) = -6133
  1509. WHEN "OrganHit" : *CHANNELVOICE 4 OrganHit
  1510. tun%(4) = -5024
  1511. WHEN "AgogoAfric" : *CHANNELVOICE 4 AgogoAfric
  1512. tun%(4) = -6219
  1513. WHEN "AgogoBrazi" : *CHANNELVOICE 4 AgogoBrazi
  1514. tun%(4) = -10997
  1515. WHEN "AgogoWood" : *CHANNELVOICE 4 AgogoWood
  1516. tun%(4) = -13728
  1517. WHEN "BDGatedRev" : *CHANNELVOICE 4 BDGatedRev
  1518. tun%(4) = -5877
  1519. WHEN "BDMarching" : *CHANNELVOICE 4 BDMarching
  1520. tun%(4) = -8608
  1521. WHEN "BDPiloMute" : *CHANNELVOICE 4 BDPiloMute
  1522. tun%(4) = -7072
  1523. WHEN "Cabasa" : *CHANNELVOICE 4 Cabasa
  1524. tun%(4) = -7072
  1525. WHEN "Cachichi1" : *CHANNELVOICE 4 Cachichi1
  1526. tun%(4) = -4000
  1527. WHEN "CachichiTr" : *CHANNELVOICE 4 CachichiTr
  1528. tun%(4) = -8096
  1529. WHEN "Castanets" : *CHANNELVOICE 4 Castanets
  1530. tun%(4) = -4000
  1531. WHEN "CongaMid" : *CHANNELVOICE 4 CongaMid
  1532. tun%(4) = -4171
  1533. WHEN "CongaSmCl" : *CHANNELVOICE 4 CongaSmCl
  1534. tun%(4) = -4683
  1535. WHEN "CymbalCrsh" : *CHANNELVOICE 4 CymbalCrsh
  1536. tun%(4) = -4000
  1537. WHEN "CymRideBel" : *CHANNELVOICE 4 CymRideBel
  1538. tun%(4) = -16288
  1539. WHEN "CymRStRoll" : *CHANNELVOICE 4 CymRStRoll
  1540. tun%(4) = -6389
  1541. WHEN "CymSplshCa" : *CHANNELVOICE 4 CymSplshCa
  1542. tun%(4) = -9120
  1543. WHEN "Flexitone" : *CHANNELVOICE 4 Flexitone
  1544. tun%(4) = -8096
  1545. WHEN "GongSoft" : *CHANNELVOICE 4 GongSoft
  1546. tun%(4) = -5365
  1547. WHEN "Gonza1" : *CHANNELVOICE 4 Gonza1
  1548. tun%(4) = -12192
  1549. WHEN "GuiroSlow" : *CHANNELVOICE 4 GuiroSlow
  1550. tun%(4) = -6048
  1551. WHEN "HandClaps" : *CHANNELVOICE 4 HandClaps
  1552. tun%(4) = -4000
  1553. WHEN "HiHatFoot" : *CHANNELVOICE 4 HiHatFoot
  1554. tun%(4) = -6389
  1555. WHEN "Maracas1" : *CHANNELVOICE 4 Maracas1
  1556. tun%(4) = -8096
  1557. WHEN "MarimbaSB3" : *CHANNELVOICE 4 MarimbaSB3
  1558. tun%(4) = -4000
  1559. WHEN "Ratchet" : *CHANNELVOICE 4 Ratchet
  1560. tun%(4) = -6731
  1561. WHEN "RotoTomRev" : *CHANNELVOICE 4 RotoTomRev
  1562. tun%(4) = -6133
  1563. WHEN "SimmonsBD1" : *CHANNELVOICE 4 SimmonsBD1
  1564. tun%(4) = -8096
  1565. WHEN "SimmonsSn1" : *CHANNELVOICE 4 SimmonsSn1
  1566. tun%(4) = -5707
  1567. WHEN "SleighBell" : *CHANNELVOICE 4 SleighBell
  1568. tun%(4) = -4000
  1569. WHEN "SuperGong" : *CHANNELVOICE 4 SuperGong
  1570. tun%(4) = -4341
  1571. WHEN "SynthSnare" : *CHANNELVOICE 4 SynthSnare
  1572. tun%(4) = -4000
  1573. WHEN "SynTom" : *CHANNELVOICE 4 SynTom
  1574. tun%(4) = -9120
  1575. WHEN "TimpCresBb" : *CHANNELVOICE 4 TimpCresBb
  1576. tun%(4) = -5962
  1577. WHEN "TimpLowBb" : *CHANNELVOICE 4 TimpLowBb
  1578. tun%(4) = -5707
  1579. WHEN "TimpRollEb" : *CHANNELVOICE 4 TimpRollEb
  1580. tun%(4) = -4000
  1581. WHEN "TomRoll" : *CHANNELVOICE 4 TomRoll
  1582. tun%(4) = -4000
  1583. WHEN "ToyHooter" : *CHANNELVOICE 4 ToyHooter
  1584. tun%(4) = -9717
  1585. WHEN "ToyWhistle" : *CHANNELVOICE 4 ToyWhistle
  1586. tun%(4) = -4000
  1587. ENDCASE
  1588. WHEN 5 :
  1589. CASE waveforms$(vnumber%) OF
  1590. WHEN "WaveSynth-Beep" : *CHANNELVOICE 5 WaveSynth-Beep
  1591. WHEN "StringLib-Soft" : *CHANNELVOICE 5 StringLib-Soft
  1592. WHEN "StringLib-Pluck" : *CHANNELVOICE 5 StringLib-Pluck
  1593. WHEN "StringLib-Steel" : *CHANNELVOICE 5 StringLib-Steel
  1594. WHEN "StringLib-Hard" : *CHANNELVOICE 5 StringLib-Hard
  1595. WHEN "Percussion-Soft" : *CHANNELVOICE 5 Percussion-Soft
  1596. WHEN "Percussion-Medium" : *CHANNELVOICE 5 Percussion-Medium
  1597. WHEN "Percussion-Snare" : *CHANNELVOICE 5 Percussion-Snare
  1598. WHEN "Percussion-Noise" : *CHANNELVOICE 5 Percussion-Noise
  1599. WHEN "BassBowAb" : *CHANNELVOICE 5 BassBowAb
  1600. tun%(5) = -1470
  1601. WHEN "AcouBass" : *CHANNELVOICE 5 AcouBass
  1602. tun%(5) = -2731
  1603. WHEN "Vibe" : *CHANNELVOICE 5 Vibe
  1604. tun%(5) = -6912
  1605. WHEN "BugleC" : *CHANNELVOICE 5 BugleC
  1606. tun%(5) = -11008
  1607. WHEN "CornetEb" : *CHANNELVOICE 5 CornetEb
  1608. tun%(5) = -12117
  1609. WHEN "SaxEbBarC" : *CHANNELVOICE 5 SaxEbBarC
  1610. tun%(5) = -2816
  1611. WHEN "SaxBbTenrE" : *CHANNELVOICE 5 SaxBbTenrE
  1612. tun%(5) = -4181
  1613. WHEN "BassoonEb" : *CHANNELVOICE 5 BassoonEb
  1614. tun%(5) = -4011
  1615. WHEN "ClarinetBb" : *CHANNELVOICE 5 ClarinetBb
  1616. tun%(5) = -10325
  1617. WHEN "EngHornGb" : *CHANNELVOICE 5 EngHornGb
  1618. tun%(5) = -8960
  1619. WHEN "MandolinDb" : *CHANNELVOICE 5 MandolinDb
  1620. tun%(5) = -11264
  1621. WHEN "Piano2B" : *CHANNELVOICE 5 Piano2B
  1622. tun%(5) = -2475
  1623. WHEN "ClarVibEb" : *CHANNELVOICE 5 ClarVibEb
  1624. tun%(5) = -7850
  1625. WHEN "GtrDobroB" : *CHANNELVOICE 5 GtrDobroB
  1626. tun%(5) = -6485
  1627. WHEN "RecorderGb" : *CHANNELVOICE 5 RecorderGb
  1628. tun%(5) = -13056
  1629. WHEN "FlugelHnEb" : *CHANNELVOICE 5 FlugelHnEb
  1630. tun%(5) = -12032
  1631. WHEN "VceMmmGb23" : *CHANNELVOICE 5 VceMmmGb23
  1632. tun%(5) = -853
  1633. WHEN "VceMOooGb3" : *CHANNELVOICE 5 VceMOooGb3
  1634. tun%(5) = -4843
  1635. WHEN "VceFemAahC" : *CHANNELVOICE 5 VceFemAahC
  1636. tun%(5) = -10948
  1637. WHEN "VceFMmmGb4" : *CHANNELVOICE 5 VceFMmmGb4
  1638. tun%(5) = -8918
  1639. WHEN "Bass" : *CHANNELVOICE 5 Bass
  1640. tun%(5) = 0
  1641. WHEN "ChurchBell" : *CHANNELVOICE 5 ChurchBell
  1642. tun%(5) = -2731
  1643. WHEN "mysound" : *CHANNELVOICE 5 mysound
  1644. tun%(5) = 0
  1645. WHEN "GuiroFast" : *CHANNELVOICE 5 GuiroFast
  1646. tun%(5) = -4000
  1647. WHEN "Clave" : *CHANNELVOICE 5 Clave
  1648. tun%(5) = -8096
  1649. WHEN "CowBell" : *CHANNELVOICE 5 CowBell
  1650. tun%(5) = -5707
  1651. WHEN "CymbRideHd" : *CHANNELVOICE 5 CymbRideHd
  1652. tun%(5) = -8096
  1653. WHEN "AcGuitar1" : *CHANNELVOICE 5 AcGuitar1
  1654. tun%(5) = -7072
  1655. WHEN "CongaHi" : *CHANNELVOICE 5 CongaHi
  1656. tun%(5) = -4000
  1657. WHEN "DrumExplo" : *CHANNELVOICE 5 DrumExplo
  1658. tun%(5) = -4000
  1659. WHEN "ElecTom1" : *CHANNELVOICE 5 ElecTom1
  1660. tun%(5) = -8096
  1661. WHEN "Harp1" : *CHANNELVOICE 5 Harp1
  1662. tun%(5) = -10997
  1663. WHEN "Harpsi" : *CHANNELVOICE 5 Harpsi
  1664. tun%(5) = -6901
  1665. WHEN "HiString" : *CHANNELVOICE 5 HiString
  1666. tun%(5) = -10997
  1667. WHEN "HonkyPiano" : *CHANNELVOICE 5 HonkyPiano
  1668. tun%(5) = -6901
  1669. WHEN "JapFlute" : *CHANNELVOICE 5 JapFlute
  1670. tun%(5) = -10997
  1671. WHEN "JazzOrgan" : *CHANNELVOICE 5 JazzOrgan
  1672. tun%(5) = -10997
  1673. WHEN "MidStrings" : *CHANNELVOICE 5 MidStrings
  1674. tun%(5) = -6901
  1675. WHEN "NoteArp1" : *CHANNELVOICE 5 NoteArp1
  1676. tun%(5) = -4000
  1677. WHEN "SnareEcho" : *CHANNELVOICE 5 SnareEcho
  1678. tun%(5) = -4341
  1679. WHEN "TablaHi" : *CHANNELVOICE 5 TablaHi
  1680. tun%(5) = -7669
  1681. WHEN "Timpani" : *CHANNELVOICE 5 Timpani
  1682. tun%(5) = -928
  1683. WHEN "Tomtom1" : *CHANNELVOICE 5 Tomtom1
  1684. tun%(5) = -5365
  1685. WHEN "Trombone1" : *CHANNELVOICE 5 Trombone1
  1686. tun%(5) = -6901
  1687. WHEN "Trumpet" : *CHANNELVOICE 5 Trumpet
  1688. tun%(5) = -10997
  1689. WHEN "Xylophone" : *CHANNELVOICE 5 Xylophone
  1690. tun%(5) = -6901
  1691. WHEN "AcouGtr2B" : *CHANNELVOICE 5 AcouGtr2B
  1692. tun%(5) = -6560
  1693. WHEN "AcuBassAb1" : *CHANNELVOICE 5 AcuBassAb1
  1694. tun%(5) = -1610
  1695. WHEN "BagPipeG" : *CHANNELVOICE 5 BagPipeG
  1696. tun%(5) = -9291
  1697. WHEN "BanjoChdBb" : *CHANNELVOICE 5 BanjoChdBb
  1698. tun%(5) = -4000
  1699. WHEN "BazookiE" : *CHANNELVOICE 5 BazookiE
  1700. tun%(5) = -8267
  1701. WHEN "BellC" : *CHANNELVOICE 5 BellC
  1702. tun%(5) = -10997
  1703. WHEN "BrassEns1B" : *CHANNELVOICE 5 BrassEns1B
  1704. tun%(5) = -6560
  1705. WHEN "ClavichdBb" : *CHANNELVOICE 5 ClavichdBb
  1706. tun%(5) = -10315
  1707. WHEN "ClavinetBb" : *CHANNELVOICE 5 ClavinetBb
  1708. tun%(5) = -6219
  1709. WHEN "CornetEb" : *CHANNELVOICE 5 CornetEb
  1710. tun%(5) = -4000
  1711. WHEN "EnsWodAb45" : *CHANNELVOICE 5 EnsWodAb45
  1712. tun%(5) = -9632
  1713. WHEN "EnsWodGb12" : *CHANNELVOICE 5 EnsWodGb12
  1714. tun%(5) = -4853
  1715. WHEN "Glock2Ab5" : *CHANNELVOICE 5 Glock2Ab5
  1716. tun%(5) = -9632
  1717. WHEN "GtMelobarC" : *CHANNELVOICE 5 GtMelobarC
  1718. tun%(5) = -6901
  1719. WHEN "GtWashbnBb" : *CHANNELVOICE 5 GtWashbnBb
  1720. tun%(5) = -6219
  1721. WHEN "HarmonicaE" : *CHANNELVOICE 5 HarmonicaE
  1722. tun%(5) = -4171
  1723. WHEN "Jew'sHarpA" : *CHANNELVOICE 5 Jew'sHarpA
  1724. tun%(5) = -6219
  1725. WHEN "MusetteB" : *CHANNELVOICE 5 MusetteB
  1726. tun%(5) = -10656
  1727. WHEN "OboeGb" : *CHANNELVOICE 5 OboeGb
  1728. tun%(5) = -13131
  1729. WHEN "OrchHit2B" : *CHANNELVOICE 5 OrchHit2B
  1730. tun%(5) = -5451
  1731. WHEN "OrcSusBb23" : *CHANNELVOICE 5 OrcSusBb23
  1732. tun%(5) = -6304
  1733. WHEN "PiccoloE" : *CHANNELVOICE 5 PiccoloE
  1734. tun%(5) = -16544
  1735. WHEN "SaxSoprnoE" : *CHANNELVOICE 5 SaxSoprnoE
  1736. tun%(5) = -12448
  1737. WHEN "StrngThkBb" : *CHANNELVOICE 5 StrngThkBb
  1738. tun%(5) = -5792
  1739. WHEN "TubaGb" : *CHANNELVOICE 5 TubaGb
  1740. tun%(5) = -929
  1741. WHEN "BassDrum" : *CHANNELVOICE 5 BassDrum
  1742. tun%(5) = -4000
  1743. WHEN "HiHat" : *CHANNELVOICE 5 HiHat
  1744. tun%(5) = -4000
  1745. WHEN "OrcHit" : *CHANNELVOICE 5 OrcHit
  1746. tun%(5) = -4085
  1747. WHEN "Piano" : *CHANNELVOICE 5 Piano
  1748. tun%(5) = -4171
  1749. WHEN "Sax" : *CHANNELVOICE 5 Sax
  1750. tun%(5) = -4085
  1751. WHEN "Snare" : *CHANNELVOICE 5 Snare
  1752. tun%(5) = -8096
  1753. WHEN "Choir1" : *CHANNELVOICE 5 Choir1
  1754. tun%(5) = -6901
  1755. WHEN "ChurOrgan" : *CHANNELVOICE 5 ChurOrgan
  1756. tun%(5) = -6901
  1757. WHEN "Opera" : *CHANNELVOICE 5 Opera
  1758. tun%(5) = -13387
  1759. WHEN "OrchChoir" : *CHANNELVOICE 5 OrchChoir
  1760. tun%(5) = -6133
  1761. WHEN "OrganHit" : *CHANNELVOICE 5 OrganHit
  1762. tun%(5) = -5024
  1763. WHEN "AgogoAfric" : *CHANNELVOICE 5 AgogoAfric
  1764. tun%(5) = -6219
  1765. WHEN "AgogoBrazi" : *CHANNELVOICE 5 AgogoBrazi
  1766. tun%(5) = -10997
  1767. WHEN "AgogoWood" : *CHANNELVOICE 5 AgogoWood
  1768. tun%(5) = -13728
  1769. WHEN "BDGatedRev" : *CHANNELVOICE 5 BDGatedRev
  1770. tun%(5) = -5877
  1771. WHEN "BDMarching" : *CHANNELVOICE 5 BDMarching
  1772. tun%(5) = -8608
  1773. WHEN "BDPiloMute" : *CHANNELVOICE 5 BDPiloMute
  1774. tun%(5) = -7072
  1775. WHEN "Cabasa" : *CHANNELVOICE 5 Cabasa
  1776. tun%(5) = -7072
  1777. WHEN "Cachichi1" : *CHANNELVOICE 5 Cachichi1
  1778. tun%(5) = -4000
  1779. WHEN "CachichiTr" : *CHANNELVOICE 5 CachichiTr
  1780. tun%(5) = -8096
  1781. WHEN "Castanets" : *CHANNELVOICE 5 Castanets
  1782. tun%(5) = -4000
  1783. WHEN "CongaMid" : *CHANNELVOICE 5 CongaMid
  1784. tun%(5) = -4171
  1785. WHEN "CongaSmCl" : *CHANNELVOICE 5 CongaSmCl
  1786. tun%(5) = -4683
  1787. WHEN "CymbalCrsh" : *CHANNELVOICE 5 CymbalCrsh
  1788. tun%(5) = -4000
  1789. WHEN "CymRideBel" : *CHANNELVOICE 5 CymRideBel
  1790. tun%(5) = -16288
  1791. WHEN "CymRStRoll" : *CHANNELVOICE 5 CymRStRoll
  1792. tun%(5) = -6389
  1793. WHEN "CymSplshCa" : *CHANNELVOICE 5 CymSplshCa
  1794. tun%(5) = -9120
  1795. WHEN "Flexitone" : *CHANNELVOICE 5 Flexitone
  1796. tun%(5) = -8096
  1797. WHEN "GongSoft" : *CHANNELVOICE 5 GongSoft
  1798. tun%(5) = -5365
  1799. WHEN "Gonza1" : *CHANNELVOICE 5 Gonza1
  1800. tun%(5) = -12192
  1801. WHEN "GuiroSlow" : *CHANNELVOICE 5 GuiroSlow
  1802. tun%(5) = -6048
  1803. WHEN "HandClaps" : *CHANNELVOICE 5 HandClaps
  1804. tun%(5) = -4000
  1805. WHEN "HiHatFoot" : *CHANNELVOICE 5 HiHatFoot
  1806. tun%(5) = -6389
  1807. WHEN "Maracas1" : *CHANNELVOICE 5 Maracas1
  1808. tun%(5) = -8096
  1809. WHEN "MarimbaSB3" : *CHANNELVOICE 5 MarimbaSB3
  1810. tun%(5) = -4000
  1811. WHEN "Ratchet" : *CHANNELVOICE 5 Ratchet
  1812. tun%(5) = -6731
  1813. WHEN "RotoTomRev" : *CHANNELVOICE 5 RotoTomRev
  1814. tun%(5) = -6133
  1815. WHEN "SimmonsBD1" : *CHANNELVOICE 5 SimmonsBD1
  1816. tun%(5) = -8096
  1817. WHEN "SimmonsSn1" : *CHANNELVOICE 5 SimmonsSn1
  1818. tun%(5) = -5707
  1819. WHEN "SleighBell" : *CHANNELVOICE 5 SleighBell
  1820. tun%(5) = -4000
  1821. WHEN "SuperGong" : *CHANNELVOICE 5 SuperGong
  1822. tun%(5) = -4341
  1823. WHEN "SynthSnare" : *CHANNELVOICE 5 SynthSnare
  1824. tun%(5) = -4000
  1825. WHEN "SynTom" : *CHANNELVOICE 5 SynTom
  1826. tun%(5) = -9120
  1827. WHEN "TimpCresBb" : *CHANNELVOICE 5 TimpCresBb
  1828. tun%(5) = -5962
  1829. WHEN "TimpLowBb" : *CHANNELVOICE 5 TimpLowBb
  1830. tun%(5) = -5707
  1831. WHEN "TimpRollEb" : *CHANNELVOICE 5 TimpRollEb
  1832. tun%(5) = -4000
  1833. WHEN "TomRoll" : *CHANNELVOICE 5 TomRoll
  1834. tun%(5) = -4000
  1835. WHEN "ToyHooter" : *CHANNELVOICE 5 ToyHooter
  1836. tun%(5) = -9717
  1837. WHEN "ToyWhistle" : *CHANNELVOICE 5 ToyWhistle
  1838. tun%(5) = -4000
  1839. ENDCASE
  1840. WHEN 6 :
  1841. CASE waveforms$(vnumber%) OF
  1842. WHEN "WaveSynth-Beep" : *CHANNELVOICE 6 WaveSynth-Beep
  1843. WHEN "StringLib-Soft" : *CHANNELVOICE 6 StringLib-Soft
  1844. WHEN "StringLib-Pluck" : *CHANNELVOICE 6 StringLib-Pluck
  1845. WHEN "StringLib-Steel" : *CHANNELVOICE 6 StringLib-Steel
  1846. WHEN "StringLib-Hard" : *CHANNELVOICE 6 StringLib-Hard
  1847. WHEN "Percussion-Soft" : *CHANNELVOICE 6 Percussion-Soft
  1848. WHEN "Percussion-Medium" : *CHANNELVOICE 6 Percussion-Medium
  1849. WHEN "Percussion-Snare" : *CHANNELVOICE 6 Percussion-Snare
  1850. WHEN "Percussion-Noise" : *CHANNELVOICE 6 Percussion-Noise
  1851. WHEN "BassBowAb" : *CHANNELVOICE 6 BassBowAb
  1852. tun%(6) = -1470
  1853. WHEN "AcouBass" : *CHANNELVOICE 6 AcouBass
  1854. tun%(6) = -2731
  1855. WHEN "Vibe" : *CHANNELVOICE 6 Vibe
  1856. tun%(6) = -6912
  1857. WHEN "BugleC" : *CHANNELVOICE 6 BugleC
  1858. tun%(6) = -11008
  1859. WHEN "CornetEb" : *CHANNELVOICE 6 CornetEb
  1860. tun%(6) = -12117
  1861. WHEN "SaxEbBarC" : *CHANNELVOICE 6 SaxEbBarC
  1862. tun%(6) = -2816
  1863. WHEN "SaxBbTenrE" : *CHANNELVOICE 6 SaxBbTenrE
  1864. tun%(6) = -4181
  1865. WHEN "BassoonEb" : *CHANNELVOICE 6 BassoonEb
  1866. tun%(6) = -4011
  1867. WHEN "ClarinetBb" : *CHANNELVOICE 6 ClarinetBb
  1868. tun%(6) = -10325
  1869. WHEN "EngHornGb" : *CHANNELVOICE 6 EngHornGb
  1870. tun%(6) = -8960
  1871. WHEN "MandolinDb" : *CHANNELVOICE 6 MandolinDb
  1872. tun%(6) = -11264
  1873. WHEN "Piano2B" : *CHANNELVOICE 6 Piano2B
  1874. tun%(6) = -2475
  1875. WHEN "ClarVibEb" : *CHANNELVOICE 6 ClarVibEb
  1876. tun%(6) = -7850
  1877. WHEN "GtrDobroB" : *CHANNELVOICE 6 GtrDobroB
  1878. tun%(6) = -6485
  1879. WHEN "RecorderGb" : *CHANNELVOICE 6 RecorderGb
  1880. tun%(6) = -13056
  1881. WHEN "FlugelHnEb" : *CHANNELVOICE 6 FlugelHnEb
  1882. tun%(6) = -12032
  1883. WHEN "VceMmmGb23" : *CHANNELVOICE 6 VceMmmGb23
  1884. tun%(6) = -853
  1885. WHEN "VceMOooGb3" : *CHANNELVOICE 6 VceMOooGb3
  1886. tun%(6) = -4843
  1887. WHEN "VceFemAahC" : *CHANNELVOICE 6 VceFemAahC
  1888. tun%(6) = -10948
  1889. WHEN "VceFMmmGb4" : *CHANNELVOICE 6 VceFMmmGb4
  1890. tun%(6) = -8918
  1891. WHEN "Bass" : *CHANNELVOICE 6 Bass
  1892. tun%(6) = 0
  1893. WHEN "ChurchBell" : *CHANNELVOICE 6 ChurchBell
  1894. tun%(6) = -2731
  1895. WHEN "mysound" : *CHANNELVOICE 6 mysound
  1896. tun%(6) = 0
  1897. WHEN "GuiroFast" : *CHANNELVOICE 6 GuiroFast
  1898. tun%(6) = -4000
  1899. WHEN "Clave" : *CHANNELVOICE 6 Clave
  1900. tun%(6) = -8096
  1901. WHEN "CowBell" : *CHANNELVOICE 6 CowBell
  1902. tun%(6) = -5707
  1903. WHEN "CymbRideHd" : *CHANNELVOICE 6 CymbRideHd
  1904. tun%(6) = -8096
  1905. WHEN "AcGuitar1" : *CHANNELVOICE 6 AcGuitar1
  1906. tun%(6) = -7072
  1907. WHEN "CongaHi" : *CHANNELVOICE 6 CongaHi
  1908. tun%(6) = -4000
  1909. WHEN "DrumExplo" : *CHANNELVOICE 6 DrumExplo
  1910. tun%(6) = -4000
  1911. WHEN "ElecTom1" : *CHANNELVOICE 6 ElecTom1
  1912. tun%(6) = -8096
  1913. WHEN "Harp1" : *CHANNELVOICE 6 Harp1
  1914. tun%(6) = -10997
  1915. WHEN "Harpsi" : *CHANNELVOICE 6 Harpsi
  1916. tun%(6) = -6901
  1917. WHEN "HiString" : *CHANNELVOICE 6 HiString
  1918. tun%(6) = -10997
  1919. WHEN "HonkyPiano" : *CHANNELVOICE 6 HonkyPiano
  1920. tun%(6) = -6901
  1921. WHEN "JapFlute" : *CHANNELVOICE 6 JapFlute
  1922. tun%(6) = -10997
  1923. WHEN "JazzOrgan" : *CHANNELVOICE 6 JazzOrgan
  1924. tun%(6) = -10997
  1925. WHEN "MidStrings" : *CHANNELVOICE 6 MidStrings
  1926. tun%(6) = -6901
  1927. WHEN "NoteArp1" : *CHANNELVOICE 6 NoteArp1
  1928. tun%(6) = -4000
  1929. WHEN "SnareEcho" : *CHANNELVOICE 6 SnareEcho
  1930. tun%(6) = -4341
  1931. WHEN "TablaHi" : *CHANNELVOICE 6 TablaHi
  1932. tun%(6) = -7669
  1933. WHEN "Timpani" : *CHANNELVOICE 6 Timpani
  1934. tun%(6) = -928
  1935. WHEN "Tomtom1" : *CHANNELVOICE 6 Tomtom1
  1936. tun%(6) = -5365
  1937. WHEN "Trombone1" : *CHANNELVOICE 6 Trombone1
  1938. tun%(6) = -6901
  1939. WHEN "Trumpet" : *CHANNELVOICE 6 Trumpet
  1940. tun%(6) = -10997
  1941. WHEN "Xylophone" : *CHANNELVOICE 6 Xylophone
  1942. tun%(6) = -6901
  1943. WHEN "AcouGtr2B" : *CHANNELVOICE 6 AcouGtr2B
  1944. tun%(6) = -6560
  1945. WHEN "AcuBassAb1" : *CHANNELVOICE 6 AcuBassAb1
  1946. tun%(6) = -1610
  1947. WHEN "BagPipeG" : *CHANNELVOICE 6 BagPipeG
  1948. tun%(6) = -9291
  1949. WHEN "BanjoChdBb" : *CHANNELVOICE 6 BanjoChdBb
  1950. tun%(6) = -4000
  1951. WHEN "BazookiE" : *CHANNELVOICE 6 BazookiE
  1952. tun%(6) = -8267
  1953. WHEN "BellC" : *CHANNELVOICE 6 BellC
  1954. tun%(6) = -10997
  1955. WHEN "BrassEns1B" : *CHANNELVOICE 6 BrassEns1B
  1956. tun%(6) = -6560
  1957. WHEN "ClavichdBb" : *CHANNELVOICE 6 ClavichdBb
  1958. tun%(6) = -10315
  1959. WHEN "ClavinetBb" : *CHANNELVOICE 6 ClavinetBb
  1960. tun%(6) = -6219
  1961. WHEN "CornetEb" : *CHANNELVOICE 6 CornetEb
  1962. tun%(6) = -4000
  1963. WHEN "EnsWodAb45" : *CHANNELVOICE 6 EnsWodAb45
  1964. tun%(6) = -9632
  1965. WHEN "EnsWodGb12" : *CHANNELVOICE 6 EnsWodGb12
  1966. tun%(6) = -4853
  1967. WHEN "Glock2Ab5" : *CHANNELVOICE 6 Glock2Ab5
  1968. tun%(6) = -9632
  1969. WHEN "GtMelobarC" : *CHANNELVOICE 6 GtMelobarC
  1970. tun%(6) = -6901
  1971. WHEN "GtWashbnBb" : *CHANNELVOICE 6 GtWashbnBb
  1972. tun%(6) = -6219
  1973. WHEN "HarmonicaE" : *CHANNELVOICE 6 HarmonicaE
  1974. tun%(6) = -4171
  1975. WHEN "Jew'sHarpA" : *CHANNELVOICE 6 Jew'sHarpA
  1976. tun%(6) = -6219
  1977. WHEN "MusetteB" : *CHANNELVOICE 6 MusetteB
  1978. tun%(6) = -10656
  1979. WHEN "OboeGb" : *CHANNELVOICE 6 OboeGb
  1980. tun%(6) = -13131
  1981. WHEN "OrchHit2B" : *CHANNELVOICE 6 OrchHit2B
  1982. tun%(6) = -5451
  1983. WHEN "OrcSusBb23" : *CHANNELVOICE 6 OrcSusBb23
  1984. tun%(6) = -6304
  1985. WHEN "PiccoloE" : *CHANNELVOICE 6 PiccoloE
  1986. tun%(6) = -16544
  1987. WHEN "SaxSoprnoE" : *CHANNELVOICE 6 SaxSoprnoE
  1988. tun%(6) = -12448
  1989. WHEN "StrngThkBb" : *CHANNELVOICE 6 StrngThkBb
  1990. tun%(6) = -5792
  1991. WHEN "TubaGb" : *CHANNELVOICE 6 TubaGb
  1992. tun%(6) = -929
  1993. WHEN "BassDrum" : *CHANNELVOICE 6 BassDrum
  1994. tun%(6) = -4000
  1995. WHEN "HiHat" : *CHANNELVOICE 6 HiHat
  1996. tun%(6) = -4000
  1997. WHEN "OrcHit" : *CHANNELVOICE 6 OrcHit
  1998. tun%(6) = -4085
  1999. WHEN "Piano" : *CHANNELVOICE 6 Piano
  2000. tun%(6) = -4171
  2001. WHEN "Sax" : *CHANNELVOICE 6 Sax
  2002. tun%(6) = -4085
  2003. WHEN "Snare" : *CHANNELVOICE 6 Snare
  2004. tun%(6) = -8096
  2005. WHEN "Choir1" : *CHANNELVOICE 6 Choir1
  2006. tun%(6) = -6901
  2007. WHEN "ChurOrgan" : *CHANNELVOICE 6 ChurOrgan
  2008. tun%(6) = -6901
  2009. WHEN "Opera" : *CHANNELVOICE 6 Opera
  2010. tun%(6) = -13387
  2011. WHEN "OrchChoir" : *CHANNELVOICE 6 OrchChoir
  2012. tun%(6) = -6133
  2013. WHEN "OrganHit" : *CHANNELVOICE 6 OrganHit
  2014. tun%(6) = -5024
  2015. WHEN "AgogoAfric" : *CHANNELVOICE 6 AgogoAfric
  2016. tun%(6) = -6219
  2017. WHEN "AgogoBrazi" : *CHANNELVOICE 6 AgogoBrazi
  2018. tun%(6) = -10997
  2019. WHEN "AgogoWood" : *CHANNELVOICE 6 AgogoWood
  2020. tun%(6) = -13728
  2021. WHEN "BDGatedRev" : *CHANNELVOICE 6 BDGatedRev
  2022. tun%(6) = -5877
  2023. WHEN "BDMarching" : *CHANNELVOICE 6 BDMarching
  2024. tun%(6) = -8608
  2025. WHEN "BDPiloMute" : *CHANNELVOICE 6 BDPiloMute
  2026. tun%(6) = -7072
  2027. WHEN "Cabasa" : *CHANNELVOICE 6 Cabasa
  2028. tun%(6) = -7072
  2029. WHEN "Cachichi1" : *CHANNELVOICE 6 Cachichi1
  2030. tun%(6) = -4000
  2031. WHEN "CachichiTr" : *CHANNELVOICE 6 CachichiTr
  2032. tun%(6) = -8096
  2033. WHEN "Castanets" : *CHANNELVOICE 6 Castanets
  2034. tun%(6) = -4000
  2035. WHEN "CongaMid" : *CHANNELVOICE 6 CongaMid
  2036. tun%(6) = -4171
  2037. WHEN "CongaSmCl" : *CHANNELVOICE 6 CongaSmCl
  2038. tun%(6) = -4683
  2039. WHEN "CymbalCrsh" : *CHANNELVOICE 6 CymbalCrsh
  2040. tun%(6) = -4000
  2041. WHEN "CymRideBel" : *CHANNELVOICE 6 CymRideBel
  2042. tun%(6) = -16288
  2043. WHEN "CymRStRoll" : *CHANNELVOICE 6 CymRStRoll
  2044. tun%(6) = -6389
  2045. WHEN "CymSplshCa" : *CHANNELVOICE 6 CymSplshCa
  2046. tun%(6) = -9120
  2047. WHEN "Flexitone" : *CHANNELVOICE 6 Flexitone
  2048. tun%(6) = -8096
  2049. WHEN "GongSoft" : *CHANNELVOICE 6 GongSoft
  2050. tun%(6) = -5365
  2051. WHEN "Gonza1" : *CHANNELVOICE 6 Gonza1
  2052. tun%(6) = -12192
  2053. WHEN "GuiroSlow" : *CHANNELVOICE 6 GuiroSlow
  2054. tun%(6) = -6048
  2055. WHEN "HandClaps" : *CHANNELVOICE 6 HandClaps
  2056. tun%(6) = -4000
  2057. WHEN "HiHatFoot" : *CHANNELVOICE 6 HiHatFoot
  2058. tun%(6) = -6389
  2059. WHEN "Maracas1" : *CHANNELVOICE 6 Maracas1
  2060. tun%(6) = -8096
  2061. WHEN "MarimbaSB3" : *CHANNELVOICE 6 MarimbaSB3
  2062. tun%(6) = -4000
  2063. WHEN "Ratchet" : *CHANNELVOICE 6 Ratchet
  2064. tun%(6) = -6731
  2065. WHEN "RotoTomRev" : *CHANNELVOICE 6 RotoTomRev
  2066. tun%(6) = -6133
  2067. WHEN "SimmonsBD1" : *CHANNELVOICE 6 SimmonsBD1
  2068. tun%(6) = -8096
  2069. WHEN "SimmonsSn1" : *CHANNELVOICE 6 SimmonsSn1
  2070. tun%(6) = -5707
  2071. WHEN "SleighBell" : *CHANNELVOICE 6 SleighBell
  2072. tun%(6) = -4000
  2073. WHEN "SuperGong" : *CHANNELVOICE 6 SuperGong
  2074. tun%(6) = -4341
  2075. WHEN "SynthSnare" : *CHANNELVOICE 6 SynthSnare
  2076. tun%(6) = -4000
  2077. WHEN "SynTom" : *CHANNELVOICE 6 SynTom
  2078. tun%(6) = -9120
  2079. WHEN "TimpCresBb" : *CHANNELVOICE 6 TimpCresBb
  2080. tun%(6) = -5962
  2081. WHEN "TimpLowBb" : *CHANNELVOICE 6 TimpLowBb
  2082. tun%(6) = -5707
  2083. WHEN "TimpRollEb" : *CHANNELVOICE 6 TimpRollEb
  2084. tun%(6) = -4000
  2085. WHEN "TomRoll" : *CHANNELVOICE 6 TomRoll
  2086. tun%(6) = -4000
  2087. WHEN "ToyHooter" : *CHANNELVOICE 6 ToyHooter
  2088. tun%(6) = -9717
  2089. WHEN "ToyWhistle" : *CHANNELVOICE 6 ToyWhistle
  2090. tun%(6) = -4000
  2091. ENDCASE
  2092. WHEN 7 :
  2093. CASE waveforms$(vnumber%) OF
  2094. WHEN "WaveSynth-Beep" : *CHANNELVOICE 7 WaveSynth-Beep
  2095. WHEN "StringLib-Soft" : *CHANNELVOICE 7 StringLib-Soft
  2096. WHEN "StringLib-Pluck" : *CHANNELVOICE 7 StringLib-Pluck
  2097. WHEN "StringLib-Steel" : *CHANNELVOICE 7 StringLib-Steel
  2098. WHEN "StringLib-Hard" : *CHANNELVOICE 7 StringLib-Hard
  2099. WHEN "Percussion-Soft" : *CHANNELVOICE 7 Percussion-Soft
  2100. WHEN "Percussion-Medium" : *CHANNELVOICE 7 Percussion-Medium
  2101. WHEN "Percussion-Snare" : *CHANNELVOICE 7 Percussion-Snare
  2102. WHEN "Percussion-Noise" : *CHANNELVOICE 7 Percussion-Noise
  2103. WHEN "BassBowAb" : *CHANNELVOICE 7 BassBowAb
  2104. tun%(7) = -1470
  2105. WHEN "AcouBass" : *CHANNELVOICE 7 AcouBass
  2106. tun%(7) = -2731
  2107. WHEN "Vibe" : *CHANNELVOICE 7 Vibe
  2108. tun%(7) = -6912
  2109. WHEN "BugleC" : *CHANNELVOICE 7 BugleC
  2110. tun%(7) = -11008
  2111. WHEN "CornetEb" : *CHANNELVOICE 7 CornetEb
  2112. tun%(7) = -12117
  2113. WHEN "SaxEbBarC" : *CHANNELVOICE 7 SaxEbBarC
  2114. tun%(7) = -2816
  2115. WHEN "SaxBbTenrE" : *CHANNELVOICE 7 SaxBbTenrE
  2116. tun%(7) = -4181
  2117. WHEN "BassoonEb" : *CHANNELVOICE 7 BassoonEb
  2118. tun%(7) = -4011
  2119. WHEN "ClarinetBb" : *CHANNELVOICE 7 ClarinetBb
  2120. tun%(7) = -10325
  2121. WHEN "EngHornGb" : *CHANNELVOICE 7 EngHornGb
  2122. tun%(7) = -8960
  2123. WHEN "MandolinDb" : *CHANNELVOICE 7 MandolinDb
  2124. tun%(7) = -11264
  2125. WHEN "Piano2B" : *CHANNELVOICE 7 Piano2B
  2126. tun%(7) = -2475
  2127. WHEN "ClarVibEb" : *CHANNELVOICE 7 ClarVibEb
  2128. tun%(7) = -7850
  2129. WHEN "GtrDobroB" : *CHANNELVOICE 7 GtrDobroB
  2130. tun%(7) = -6485
  2131. WHEN "RecorderGb" : *CHANNELVOICE 7 RecorderGb
  2132. tun%(7) = -13056
  2133. WHEN "FlugelHnEb" : *CHANNELVOICE 7 FlugelHnEb
  2134. tun%(7) = -12032
  2135. WHEN "VceMmmGb23" : *CHANNELVOICE 7 VceMmmGb23
  2136. tun%(7) = -853
  2137. WHEN "VceMOooGb3" : *CHANNELVOICE 7 VceMOooGb3
  2138. tun%(7) = -4843
  2139. WHEN "VceFemAahC" : *CHANNELVOICE 7 VceFemAahC
  2140. tun%(7) = -10948
  2141. WHEN "VceFMmmGb4" : *CHANNELVOICE 7 VceFMmmGb4
  2142. tun%(7) = -8918
  2143. WHEN "Bass" : *CHANNELVOICE 7 Bass
  2144. tun%(7) = 0
  2145. WHEN "ChurchBell" : *CHANNELVOICE 7 ChurchBell
  2146. tun%(7) = -2731
  2147. WHEN "mysound" : *CHANNELVOICE 7 mysound
  2148. tun%(7) = 0
  2149. WHEN "GuiroFast" : *CHANNELVOICE 7 GuiroFast
  2150. tun%(7) = -4000
  2151. WHEN "Clave" : *CHANNELVOICE 7 Clave
  2152. tun%(7) = -8096
  2153. WHEN "CowBell" : *CHANNELVOICE 7 CowBell
  2154. tun%(7) = -5707
  2155. WHEN "CymbRideHd" : *CHANNELVOICE 7 CymbRideHd
  2156. tun%(7) = -8096
  2157. WHEN "AcGuitar1" : *CHANNELVOICE 7 AcGuitar1
  2158. tun%(7) = -7072
  2159. WHEN "CongaHi" : *CHANNELVOICE 7 CongaHi
  2160. tun%(7) = -4000
  2161. WHEN "DrumExplo" : *CHANNELVOICE 7 DrumExplo
  2162. tun%(7) = -4000
  2163. WHEN "ElecTom1" : *CHANNELVOICE 7 ElecTom1
  2164. tun%(7) = -8096
  2165. WHEN "Harp1" : *CHANNELVOICE 7 Harp1
  2166. tun%(7) = -10997
  2167. WHEN "Harpsi" : *CHANNELVOICE 7 Harpsi
  2168. tun%(7) = -6901
  2169. WHEN "HiString" : *CHANNELVOICE 7 HiString
  2170. tun%(7) = -10997
  2171. WHEN "HonkyPiano" : *CHANNELVOICE 7 HonkyPiano
  2172. tun%(7) = -6901
  2173. WHEN "JapFlute" : *CHANNELVOICE 7 JapFlute
  2174. tun%(7) = -10997
  2175. WHEN "JazzOrgan" : *CHANNELVOICE 7 JazzOrgan
  2176. tun%(7) = -10997
  2177. WHEN "MidStrings" : *CHANNELVOICE 7 MidStrings
  2178. tun%(7) = -6901
  2179. WHEN "NoteArp1" : *CHANNELVOICE 7 NoteArp1
  2180. tun%(7) = -4000
  2181. WHEN "SnareEcho" : *CHANNELVOICE 7 SnareEcho
  2182. tun%(7) = -4341
  2183. WHEN "TablaHi" : *CHANNELVOICE 7 TablaHi
  2184. tun%(7) = -7669
  2185. WHEN "Timpani" : *CHANNELVOICE 7 Timpani
  2186. tun%(7) = -928
  2187. WHEN "Tomtom1" : *CHANNELVOICE 7 Tomtom1
  2188. tun%(7) = -5365
  2189. WHEN "Trombone1" : *CHANNELVOICE 7 Trombone1
  2190. tun%(7) = -6901
  2191. WHEN "Trumpet" : *CHANNELVOICE 7 Trumpet
  2192. tun%(7) = -10997
  2193. WHEN "Xylophone" : *CHANNELVOICE 7 Xylophone
  2194. tun%(7) = -6901
  2195. WHEN "AcouGtr2B" : *CHANNELVOICE 7 AcouGtr2B
  2196. tun%(7) = -6560
  2197. WHEN "AcuBassAb1" : *CHANNELVOICE 7 AcuBassAb1
  2198. tun%(7) = -1610
  2199. WHEN "BagPipeG" : *CHANNELVOICE 7 BagPipeG
  2200. tun%(7) = -9291
  2201. WHEN "BanjoChdBb" : *CHANNELVOICE 7 BanjoChdBb
  2202. tun%(7) = -4000
  2203. WHEN "BazookiE" : *CHANNELVOICE 7 BazookiE
  2204. tun%(7) = -8267
  2205. WHEN "BellC" : *CHANNELVOICE 7 BellC
  2206. tun%(7) = -10997
  2207. WHEN "BrassEns1B" : *CHANNELVOICE 7 BrassEns1B
  2208. tun%(7) = -6560
  2209. WHEN "ClavichdBb" : *CHANNELVOICE 7 ClavichdBb
  2210. tun%(7) = -10315
  2211. WHEN "ClavinetBb" : *CHANNELVOICE 7 ClavinetBb
  2212. tun%(7) = -6219
  2213. WHEN "CornetEb" : *CHANNELVOICE 7 CornetEb
  2214. tun%(7) = -4000
  2215. WHEN "EnsWodAb45" : *CHANNELVOICE 7 EnsWodAb45
  2216. tun%(7) = -9632
  2217. WHEN "EnsWodGb12" : *CHANNELVOICE 7 EnsWodGb12
  2218. tun%(7) = -4853
  2219. WHEN "Glock2Ab5" : *CHANNELVOICE 7 Glock2Ab5
  2220. tun%(7) = -9632
  2221. WHEN "GtMelobarC" : *CHANNELVOICE 7 GtMelobarC
  2222. tun%(7) = -6901
  2223. WHEN "GtWashbnBb" : *CHANNELVOICE 7 GtWashbnBb
  2224. tun%(7) = -6219
  2225. WHEN "HarmonicaE" : *CHANNELVOICE 7 HarmonicaE
  2226. tun%(7) = -4171
  2227. WHEN "Jew'sHarpA" : *CHANNELVOICE 7 Jew'sHarpA
  2228. tun%(7) = -6219
  2229. WHEN "MusetteB" : *CHANNELVOICE 7 MusetteB
  2230. tun%(7) = -10656
  2231. WHEN "OboeGb" : *CHANNELVOICE 7 OboeGb
  2232. tun%(7) = -13131
  2233. WHEN "OrchHit2B" : *CHANNELVOICE 7 OrchHit2B
  2234. tun%(7) = -5451
  2235. WHEN "OrcSusBb23" : *CHANNELVOICE 7 OrcSusBb23
  2236. tun%(7) = -6304
  2237. WHEN "PiccoloE" : *CHANNELVOICE 7 PiccoloE
  2238. tun%(7) = -16544
  2239. WHEN "SaxSoprnoE" : *CHANNELVOICE 7 SaxSoprnoE
  2240. tun%(7) = -12448
  2241. WHEN "StrngThkBb" : *CHANNELVOICE 7 StrngThkBb
  2242. tun%(7) = -5792
  2243. WHEN "TubaGb" : *CHANNELVOICE 7 TubaGb
  2244. tun%(7) = -929
  2245. WHEN "BassDrum" : *CHANNELVOICE 7 BassDrum
  2246. tun%(7) = -4000
  2247. WHEN "HiHat" : *CHANNELVOICE 7 HiHat
  2248. tun%(7) = -4000
  2249. WHEN "OrcHit" : *CHANNELVOICE 7 OrcHit
  2250. tun%(7) = -4085
  2251. WHEN "Piano" : *CHANNELVOICE 7 Piano
  2252. tun%(7) = -4171
  2253. WHEN "Sax" : *CHANNELVOICE 7 Sax
  2254. tun%(7) = -4085
  2255. WHEN "Snare" : *CHANNELVOICE 7 Snare
  2256. tun%(7) = -8096
  2257. WHEN "Choir1" : *CHANNELVOICE 7 Choir1
  2258. tun%(7) = -6901
  2259. WHEN "ChurOrgan" : *CHANNELVOICE 7 ChurOrgan
  2260. tun%(7) = -6901
  2261. WHEN "Opera" : *CHANNELVOICE 7 Opera
  2262. tun%(7) = -13387
  2263. WHEN "OrchChoir" : *CHANNELVOICE 7 OrchChoir
  2264. tun%(7) = -6133
  2265. WHEN "OrganHit" : *CHANNELVOICE 7 OrganHit
  2266. tun%(7) = -5024
  2267. WHEN "AgogoAfric" : *CHANNELVOICE 7 AgogoAfric
  2268. tun%(7) = -6219
  2269. WHEN "AgogoBrazi" : *CHANNELVOICE 7 AgogoBrazi
  2270. tun%(7) = -10997
  2271. WHEN "AgogoWood" : *CHANNELVOICE 7 AgogoWood
  2272. tun%(7) = -13728
  2273. WHEN "BDGatedRev" : *CHANNELVOICE 7 BDGatedRev
  2274. tun%(7) = -5877
  2275. WHEN "BDMarching" : *CHANNELVOICE 7 BDMarching
  2276. tun%(7) = -8608
  2277. WHEN "BDPiloMute" : *CHANNELVOICE 7 BDPiloMute
  2278. tun%(7) = -7072
  2279. WHEN "Cabasa" : *CHANNELVOICE 7 Cabasa
  2280. tun%(7) = -7072
  2281. WHEN "Cachichi1" : *CHANNELVOICE 7 Cachichi1
  2282. tun%(7) = -4000
  2283. WHEN "CachichiTr" : *CHANNELVOICE 7 CachichiTr
  2284. tun%(7) = -8096
  2285. WHEN "Castanets" : *CHANNELVOICE 7 Castanets
  2286. tun%(7) = -4000
  2287. WHEN "CongaMid" : *CHANNELVOICE 7 CongaMid
  2288. tun%(7) = -4171
  2289. WHEN "CongaSmCl" : *CHANNELVOICE 7 CongaSmCl
  2290. tun%(7) = -4683
  2291. WHEN "CymbalCrsh" : *CHANNELVOICE 7 CymbalCrsh
  2292. tun%(7) = -4000
  2293. WHEN "CymRideBel" : *CHANNELVOICE 7 CymRideBel
  2294. tun%(7) = -16288
  2295. WHEN "CymRStRoll" : *CHANNELVOICE 7 CymRStRoll
  2296. tun%(7) = -6389
  2297. WHEN "CymSplshCa" : *CHANNELVOICE 7 CymSplshCa
  2298. tun%(7) = -9120
  2299. WHEN "Flexitone" : *CHANNELVOICE 7 Flexitone
  2300. tun%(7) = -8096
  2301. WHEN "GongSoft" : *CHANNELVOICE 7 GongSoft
  2302. tun%(7) = -5365
  2303. WHEN "Gonza1" : *CHANNELVOICE 7 Gonza1
  2304. tun%(7) = -12192
  2305. WHEN "GuiroSlow" : *CHANNELVOICE 7 GuiroSlow
  2306. tun%(7) = -6048
  2307. WHEN "HandClaps" : *CHANNELVOICE 7 HandClaps
  2308. tun%(7) = -4000
  2309. WHEN "HiHatFoot" : *CHANNELVOICE 7 HiHatFoot
  2310. tun%(7) = -6389
  2311. WHEN "Maracas1" : *CHANNELVOICE 7 Maracas1
  2312. tun%(7) = -8096
  2313. WHEN "MarimbaSB3" : *CHANNELVOICE 7 MarimbaSB3
  2314. tun%(7) = -4000
  2315. WHEN "Ratchet" : *CHANNELVOICE 7 Ratchet
  2316. tun%(7) = -6731
  2317. WHEN "RotoTomRev" : *CHANNELVOICE 7 RotoTomRev
  2318. tun%(7) = -6133
  2319. WHEN "SimmonsBD1" : *CHANNELVOICE 7 SimmonsBD1
  2320. tun%(7) = -8096
  2321. WHEN "SimmonsSn1" : *CHANNELVOICE 7 SimmonsSn1
  2322. tun%(7) = -5707
  2323. WHEN "SleighBell" : *CHANNELVOICE 7 SleighBell
  2324. tun%(7) = -4000
  2325. WHEN "SuperGong" : *CHANNELVOICE 7 SuperGong
  2326. tun%(7) = -4341
  2327. WHEN "SynthSnare" : *CHANNELVOICE 7 SynthSnare
  2328. tun%(7) = -4000
  2329. WHEN "SynTom" : *CHANNELVOICE 7 SynTom
  2330. tun%(7) = -9120
  2331. WHEN "TimpCresBb" : *CHANNELVOICE 7 TimpCresBb
  2332. tun%(7) = -5962
  2333. WHEN "TimpLowBb" : *CHANNELVOICE 7 TimpLowBb
  2334. tun%(7) = -5707
  2335. WHEN "TimpRollEb" : *CHANNELVOICE 7 TimpRollEb
  2336. tun%(7) = -4000
  2337. WHEN "TomRoll" : *CHANNELVOICE 7 TomRoll
  2338. tun%(7) = -4000
  2339. WHEN "ToyHooter" : *CHANNELVOICE 7 ToyHooter
  2340. tun%(7) = -9717
  2341. WHEN "ToyWhistle" : *CHANNELVOICE 7 ToyWhistle
  2342. tun%(7) = -4000
  2343. ENDCASE
  2344. WHEN 8 :
  2345. CASE waveforms$(vnumber%) OF
  2346. WHEN "WaveSynth-Beep" : *CHANNELVOICE 8 WaveSynth-Beep
  2347. WHEN "StringLib-Soft" : *CHANNELVOICE 8 StringLib-Soft
  2348. WHEN "StringLib-Pluck" : *CHANNELVOICE 8 StringLib-Pluck
  2349. WHEN "StringLib-Steel" : *CHANNELVOICE 8 StringLib-Steel
  2350. WHEN "StringLib-Hard" : *CHANNELVOICE 8 StringLib-Hard
  2351. WHEN "Percussion-Soft" : *CHANNELVOICE 8 Percussion-Soft
  2352. WHEN "Percussion-Medium" : *CHANNELVOICE 8 Percussion-Medium
  2353. WHEN "Percussion-Snare" : *CHANNELVOICE 8 Percussion-Snare
  2354. WHEN "Percussion-Noise" : *CHANNELVOICE 8 Percussion-Noise
  2355. WHEN "BassBowAb" : *CHANNELVOICE 8 BassBowAb
  2356. tun%(8) = -1470
  2357. WHEN "AcouBass" : *CHANNELVOICE 8 AcouBass
  2358. tun%(8) = -2731
  2359. WHEN "Vibe" : *CHANNELVOICE 8 Vibe
  2360. tun%(8) = -6912
  2361. WHEN "BugleC" : *CHANNELVOICE 8 BugleC
  2362. tun%(8) = -11008
  2363. WHEN "CornetEb" : *CHANNELVOICE 8 CornetEb
  2364. tun%(8) = -12117
  2365. WHEN "SaxEbBarC" : *CHANNELVOICE 8 SaxEbBarC
  2366. tun%(8) = -2816
  2367. WHEN "SaxBbTenrE" : *CHANNELVOICE 8 SaxBbTenrE
  2368. tun%(8) = -4181
  2369. WHEN "BassoonEb" : *CHANNELVOICE 8 BassoonEb
  2370. tun%(8) = -4011
  2371. WHEN "ClarinetBb" : *CHANNELVOICE 8 ClarinetBb
  2372. tun%(8) = -10325
  2373. WHEN "EngHornGb" : *CHANNELVOICE 8 EngHornGb
  2374. tun%(8) = -8960
  2375. WHEN "MandolinDb" : *CHANNELVOICE 8 MandolinDb
  2376. tun%(8) = -11264
  2377. WHEN "Piano2B" : *CHANNELVOICE 8 Piano2B
  2378. tun%(8) = -2475
  2379. WHEN "ClarVibEb" : *CHANNELVOICE 8 ClarVibEb
  2380. tun%(8) = -7850
  2381. WHEN "GtrDobroB" : *CHANNELVOICE 8 GtrDobroB
  2382. tun%(8) = -6485
  2383. WHEN "RecorderGb" : *CHANNELVOICE 8 RecorderGb
  2384. tun%(8) = -13056
  2385. WHEN "FlugelHnEb" : *CHANNELVOICE 8 FlugelHnEb
  2386. tun%(8) = -12032
  2387. WHEN "VceMmmGb23" : *CHANNELVOICE 8 VceMmmGb23
  2388. tun%(8) = -853
  2389. WHEN "VceMOooGb3" : *CHANNELVOICE 8 VceMOooGb3
  2390. tun%(8) = -4843
  2391. WHEN "VceFemAahC" : *CHANNELVOICE 8 VceFemAahC
  2392. tun%(8) = -10948
  2393. WHEN "VceFMmmGb4" : *CHANNELVOICE 8 VceFMmmGb4
  2394. tun%(8) = -8918
  2395. WHEN "Bass" : *CHANNELVOICE 8 Bass
  2396. tun%(8) = 0
  2397. WHEN "ChurchBell" : *CHANNELVOICE 8 ChurchBell
  2398. tun%(8) = -2731
  2399. WHEN "mysound" : *CHANNELVOICE 8 mysound
  2400. tun%(8) = 0
  2401. WHEN "GuiroFast" : *CHANNELVOICE 8 GuiroFast
  2402. tun%(8) = -4000
  2403. WHEN "Clave" : *CHANNELVOICE 8 Clave
  2404. tun%(8) = -8096
  2405. WHEN "CowBell" : *CHANNELVOICE 8 CowBell
  2406. tun%(8) = -5707
  2407. WHEN "CymbRideHd" : *CHANNELVOICE 8 CymbRideHd
  2408. tun%(8) = -8096
  2409. WHEN "AcGuitar1" : *CHANNELVOICE 8 AcGuitar1
  2410. tun%(8) = -7072
  2411. WHEN "CongaHi" : *CHANNELVOICE 8 CongaHi
  2412. tun%(8) = -4000
  2413. WHEN "DrumExplo" : *CHANNELVOICE 8 DrumExplo
  2414. tun%(8) = -4000
  2415. WHEN "ElecTom1" : *CHANNELVOICE 8 ElecTom1
  2416. tun%(8) = -8096
  2417. WHEN "Harp1" : *CHANNELVOICE 8 Harp1
  2418. tun%(8) = -10997
  2419. WHEN "Harpsi" : *CHANNELVOICE 8 Harpsi
  2420. tun%(8) = -6901
  2421. WHEN "HiString" : *CHANNELVOICE 8 HiString
  2422. tun%(8) = -10997
  2423. WHEN "HonkyPiano" : *CHANNELVOICE 8 HonkyPiano
  2424. tun%(8) = -6901
  2425. WHEN "JapFlute" : *CHANNELVOICE 8 JapFlute
  2426. tun%(8) = -10997
  2427. WHEN "JazzOrgan" : *CHANNELVOICE 8 JazzOrgan
  2428. tun%(8) = -10997
  2429. WHEN "MidStrings" : *CHANNELVOICE 8 MidStrings
  2430. tun%(8) = -6901
  2431. WHEN "NoteArp1" : *CHANNELVOICE 8 NoteArp1
  2432. tun%(8) = -4000
  2433. WHEN "SnareEcho" : *CHANNELVOICE 8 SnareEcho
  2434. tun%(8) = -4341
  2435. WHEN "TablaHi" : *CHANNELVOICE 8 TablaHi
  2436. tun%(8) = -7669
  2437. WHEN "Timpani" : *CHANNELVOICE 8 Timpani
  2438. tun%(8) = -928
  2439. WHEN "Tomtom1" : *CHANNELVOICE 8 Tomtom1
  2440. tun%(8) = -5365
  2441. WHEN "Trombone1" : *CHANNELVOICE 8 Trombone1
  2442. tun%(8) = -6901
  2443. WHEN "Trumpet" : *CHANNELVOICE 8 Trumpet
  2444. tun%(8) = -10997
  2445. WHEN "Xylophone" : *CHANNELVOICE 8 Xylophone
  2446. tun%(8) = -6901
  2447. WHEN "AcouGtr2B" : *CHANNELVOICE 8 AcouGtr2B
  2448. tun%(8) = -6560
  2449. WHEN "AcuBassAb1" : *CHANNELVOICE 8 AcuBassAb1
  2450. tun%(8) = -1610
  2451. WHEN "BagPipeG" : *CHANNELVOICE 8 BagPipeG
  2452. tun%(8) = -9291
  2453. WHEN "BanjoChdBb" : *CHANNELVOICE 8 BanjoChdBb
  2454. tun%(8) = -4000
  2455. WHEN "BazookiE" : *CHANNELVOICE 8 BazookiE
  2456. tun%(8) = -8267
  2457. WHEN "BellC" : *CHANNELVOICE 8 BellC
  2458. tun%(8) = -10997
  2459. WHEN "BrassEns1B" : *CHANNELVOICE 8 BrassEns1B
  2460. tun%(8) = -6560
  2461. WHEN "ClavichdBb" : *CHANNELVOICE 8 ClavichdBb
  2462. tun%(8) = -10315
  2463. WHEN "ClavinetBb" : *CHANNELVOICE 8 ClavinetBb
  2464. tun%(8) = -6219
  2465. WHEN "CornetEb" : *CHANNELVOICE 8 CornetEb
  2466. tun%(8) = -4000
  2467. WHEN "EnsWodAb45" : *CHANNELVOICE 8 EnsWodAb45
  2468. tun%(8) = -9632
  2469. WHEN "EnsWodGb12" : *CHANNELVOICE 8 EnsWodGb12
  2470. tun%(8) = -4853
  2471. WHEN "Glock2Ab5" : *CHANNELVOICE 8 Glock2Ab5
  2472. tun%(8) = -9632
  2473. WHEN "GtMelobarC" : *CHANNELVOICE 8 GtMelobarC
  2474. tun%(8) = -6901
  2475. WHEN "GtWashbnBb" : *CHANNELVOICE 8 GtWashbnBb
  2476. tun%(8) = -6219
  2477. WHEN "HarmonicaE" : *CHANNELVOICE 8 HarmonicaE
  2478. tun%(8) = -4171
  2479. WHEN "Jew'sHarpA" : *CHANNELVOICE 8 Jew'sHarpA
  2480. tun%(8) = -6219
  2481. WHEN "MusetteB" : *CHANNELVOICE 8 MusetteB
  2482. tun%(8) = -10656
  2483. WHEN "OboeGb" : *CHANNELVOICE 8 OboeGb
  2484. tun%(8) = -13131
  2485. WHEN "OrchHit2B" : *CHANNELVOICE 8 OrchHit2B
  2486. tun%(8) = -5451
  2487. WHEN "OrcSusBb23" : *CHANNELVOICE 8 OrcSusBb23
  2488. tun%(8) = -6304
  2489. WHEN "PiccoloE" : *CHANNELVOICE 8 PiccoloE
  2490. tun%(8) = -16544
  2491. WHEN "SaxSoprnoE" : *CHANNELVOICE 8 SaxSoprnoE
  2492. tun%(8) = -12448
  2493. WHEN "StrngThkBb" : *CHANNELVOICE 8 StrngThkBb
  2494. tun%(8) = -5792
  2495. WHEN "TubaGb" : *CHANNELVOICE 8 TubaGb
  2496. tun%(8) = -929
  2497. WHEN "BassDrum" : *CHANNELVOICE 8 BassDrum
  2498. tun%(8) = -4000
  2499. WHEN "HiHat" : *CHANNELVOICE 8 HiHat
  2500. tun%(8) = -4000
  2501. WHEN "OrcHit" : *CHANNELVOICE 8 OrcHit
  2502. tun%(8) = -4085
  2503. WHEN "Piano" : *CHANNELVOICE 8 Piano
  2504. tun%(8) = -4171
  2505. WHEN "Sax" : *CHANNELVOICE 8 Sax
  2506. tun%(8) = -4085
  2507. WHEN "Snare" : *CHANNELVOICE 8 Snare
  2508. tun%(8) = -8096
  2509. WHEN "Choir1" : *CHANNELVOICE 8 Choir1
  2510. tun%(8) = -6901
  2511. WHEN "ChurOrgan" : *CHANNELVOICE 8 ChurOrgan
  2512. tun%(8) = -6901
  2513. WHEN "Opera" : *CHANNELVOICE 8 Opera
  2514. tun%(8) = -13387
  2515. WHEN "OrchChoir" : *CHANNELVOICE 8 OrchChoir
  2516. tun%(8) = -6133
  2517. WHEN "OrganHit" : *CHANNELVOICE 8 OrganHit
  2518. tun%(8) = -5024
  2519. WHEN "AgogoAfric" : *CHANNELVOICE 8 AgogoAfric
  2520. tun%(8) = -6219
  2521. WHEN "AgogoBrazi" : *CHANNELVOICE 8 AgogoBrazi
  2522. tun%(8) = -10997
  2523. WHEN "AgogoWood" : *CHANNELVOICE 8 AgogoWood
  2524. tun%(8) = -13728
  2525. WHEN "BDGatedRev" : *CHANNELVOICE 8 BDGatedRev
  2526. tun%(8) = -5877
  2527. WHEN "BDMarching" : *CHANNELVOICE 8 BDMarching
  2528. tun%(8) = -8608
  2529. WHEN "BDPiloMute" : *CHANNELVOICE 8 BDPiloMute
  2530. tun%(8) = -7072
  2531. WHEN "Cabasa" : *CHANNELVOICE 8 Cabasa
  2532. tun%(8) = -7072
  2533. WHEN "Cachichi1" : *CHANNELVOICE 8 Cachichi1
  2534. tun%(8) = -4000
  2535. WHEN "CachichiTr" : *CHANNELVOICE 8 CachichiTr
  2536. tun%(8) = -8096
  2537. WHEN "Castanets" : *CHANNELVOICE 8 Castanets
  2538. tun%(8) = -4000
  2539. WHEN "CongaMid" : *CHANNELVOICE 8 CongaMid
  2540. tun%(8) = -4171
  2541. WHEN "CongaSmCl" : *CHANNELVOICE 8 CongaSmCl
  2542. tun%(8) = -4683
  2543. WHEN "CymbalCrsh" : *CHANNELVOICE 8 CymbalCrsh
  2544. tun%(8) = -4000
  2545. WHEN "CymRideBel" : *CHANNELVOICE 8 CymRideBel
  2546. tun%(8) = -16288
  2547. WHEN "CymRStRoll" : *CHANNELVOICE 8 CymRStRoll
  2548. tun%(8) = -6389
  2549. WHEN "CymSplshCa" : *CHANNELVOICE 8 CymSplshCa
  2550. tun%(8) = -9120
  2551. WHEN "Flexitone" : *CHANNELVOICE 8 Flexitone
  2552. tun%(8) = -8096
  2553. WHEN "GongSoft" : *CHANNELVOICE 8 GongSoft
  2554. tun%(8) = -5365
  2555. WHEN "Gonza1" : *CHANNELVOICE 8 Gonza1
  2556. tun%(8) = -12192
  2557. WHEN "GuiroSlow" : *CHANNELVOICE 8 GuiroSlow
  2558. tun%(8) = -6048
  2559. WHEN "HandClaps" : *CHANNELVOICE 8 HandClaps
  2560. tun%(8) = -4000
  2561. WHEN "HiHatFoot" : *CHANNELVOICE 8 HiHatFoot
  2562. tun%(8) = -6389
  2563. WHEN "Maracas1" : *CHANNELVOICE 8 Maracas1
  2564. tun%(8) = -8096
  2565. WHEN "MarimbaSB3" : *CHANNELVOICE 8 MarimbaSB3
  2566. tun%(8) = -4000
  2567. WHEN "Ratchet" : *CHANNELVOICE 8 Ratchet
  2568. tun%(8) = -6731
  2569. WHEN "RotoTomRev" : *CHANNELVOICE 8 RotoTomRev
  2570. tun%(8) = -6133
  2571. WHEN "SimmonsBD1" : *CHANNELVOICE 8 SimmonsBD1
  2572. tun%(8) = -8096
  2573. WHEN "SimmonsSn1" : *CHANNELVOICE 8 SimmonsSn1
  2574. tun%(8) = -5707
  2575. WHEN "SleighBell" : *CHANNELVOICE 8 SleighBell
  2576. tun%(8) = -4000
  2577. WHEN "SuperGong" : *CHANNELVOICE 8 SuperGong
  2578. tun%(8) = -4341
  2579. WHEN "SynthSnare" : *CHANNELVOICE 8 SynthSnare
  2580. tun%(8) = -4000
  2581. WHEN "SynTom" : *CHANNELVOICE 8 SynTom
  2582. tun%(8) = -9120
  2583. WHEN "TimpCresBb" : *CHANNELVOICE 8 TimpCresBb
  2584. tun%(8) = -5962
  2585. WHEN "TimpLowBb" : *CHANNELVOICE 8 TimpLowBb
  2586. tun%(8) = -5707
  2587. WHEN "TimpRollEb" : *CHANNELVOICE 8 TimpRollEb
  2588. tun%(8) = -4000
  2589. WHEN "TomRoll" : *CHANNELVOICE 8 TomRoll
  2590. tun%(8) = -4000
  2591. WHEN "ToyHooter" : *CHANNELVOICE 8 ToyHooter
  2592. tun%(8) = -9717
  2593. WHEN "ToyWhistle" : *CHANNELVOICE 8 ToyWhistle
  2594. tun%(8) = -4000
  2595. ENDCASE
  2596. ENDCASE
  2597. :
  2598. ELSE
  2599. *CHANNELVOICE 1 WaveSynth-Beep
  2600. *CHANNELVOICE 2 WaveSynth-Beep
  2601. *CHANNELVOICE 3 WaveSynth-Beep
  2602. *CHANNELVOICE 4 WaveSynth-Beep
  2603. *CHANNELVOICE 5 WaveSynth-Beep
  2604. *CHANNELVOICE 6 WaveSynth-Beep
  2605. *CHANNELVOICE 7 WaveSynth-Beep
  2606. *CHANNELVOICE 8 WaveSynth-Beep
  2607. ENDIF
  2608. :
  2609. REM fill bar%() with starting bar nos for each voice
  2610. PROCnewnotereception((vnumber%-1),startingbar%,startbeat%,0,0,0,0,0,0)
  2611. CASE option% OF
  2612. WHEN 1,3 : startcell% = 0
  2613. WHEN 2 : startcell% = numusedcells%(vnumber%-1)
  2614. WHEN 4 : start% = (startingbar%*10^3)+startbeat%
  2615. voice% = vnumber%-1 : PROCsearch(start%)
  2616. ENDCASE
  2617. cell%(vnumber%-1) = startcell%
  2618. bar%(vnumber%-1) = array%(cell%(vnumber%-1),0,vnumber%-1)DIV10^6
  2619. NEXT
  2620. :
  2621. startbar% = startingbar% : preplaydisplay$ = "y" : PROCdisplay : preplaydisplay$ = "n"
  2622. tempo% = tempi%(startingbar%)*960*0.681595
  2623. IF waveload$ = "done" THEN tempo% = tempo%*1.23065
  2624. TEMPO tempo%
  2625. kount% = 1
  2626. :
  2627. FOR barnum% = startingbar% TO endbar%
  2628. :
  2629. IF playnewscreen$ = "y" AND ((startbar%+(numbars%*2)) <= nobars%) THEN
  2630. IF barnum% = startingbar% + (numbars%*kount%) + 1 THEN
  2631. startbar% += numbars% : preplaydisplay$ = "y" : PROCdisplay: kount% += 1
  2632. preplaydisplay$ = "n"
  2633. ENDIF
  2634. ENDIF
  2635. :
  2636. tempo% = tempi%(barnum%-1)*960*0.681595
  2637. IF waveload$ = "done" THEN tempo% = tempo%*1.23065
  2638. TEMPO tempo%
  2639. REPEAT UNTIL BEAT < 20
  2640. :
  2641. FOR count% = 1 TO nvoices%
  2642. voicenum% = playvoices%(count%)-1
  2643. lv$ = "n"
  2644. IF lvdata%(count%,1)>0 THEN lv$ = "y"
  2645. :
  2646. WHILE bar%(voicenum%) = barnum%
  2647. after% = ((array%(cell%(voicenum%),0,voicenum%) DIV 10^3) MOD 10^3) + 20
  2648. pitchdata% = (array%(cell%(voicenum%),0,voicenum%)MOD10^3)
  2649. notename% = pitchdata% DIV 100
  2650. accid% = (pitchdata% MOD 100) DIV 10
  2651. octave% = pitchdata%MOD10
  2652. inflect% = (array%(cell%(voicenum%),2,voicenum%)MOD10^2) : inflect% -= 50
  2653. :
  2654. CASE notename% OF
  2655. WHEN 6 : pitch% = 3755
  2656. WHEN 5 : pitch% = 3072
  2657. WHEN 4 : pitch% = 2389
  2658. WHEN 3 : pitch% = 1707
  2659. WHEN 2 : pitch% = 1365
  2660. WHEN 1 : pitch% = 683
  2661. WHEN 0 : pitch% = 0
  2662. ENDCASE
  2663. accid% = accid%-5
  2664. accid% = accid%*85.34
  2665. pitch% = pitch% + accid%
  2666. pitch% = pitch% + (4096*octave%) + tun%(count%) + (inflect%*3.41)
  2667. amp2% = (array%(cell%(voicenum%),2,voicenum%)DIV10^2)MOD10
  2668. amp3% = (array%(cell%(voicenum%),2,voicenum%)DIV10^3)MOD10
  2669. :
  2670. dyn% = array%(cell%(voicenum%),1,voicenum%)MOD10
  2671. dyn% = 257 + (16*dyn%)
  2672. IF amp2% = 9 AND amp3% <> 0 THEN
  2673. CASE amp3% OF
  2674. WHEN 1 : dyn% += 1
  2675. WHEN 2 : dyn% += 2
  2676. WHEN 3 : dyn% += 4
  2677. WHEN 4 : dyn% += 6
  2678. WHEN 5 : dyn% += 8
  2679. WHEN 6 : dyn% += 10
  2680. WHEN 7 : dyn% += 12
  2681. WHEN 8 : dyn% += 14
  2682. WHEN 9 : dyn% += 15
  2683. ENDCASE
  2684. ENDIF
  2685. IF dyn% > 383 THEN dyn% = 383
  2686. :
  2687. dur% = (array%(cell%(voicenum%),1,voicenum%)MOD10^4)DIV10
  2688. IF waveload$ = "done" THEN dur% = dur%/1.23065
  2689. IF dur% < 1 THEN dur% = 1
  2690. IF lv$ = "n" THEN
  2691. chan% = count%
  2692. ELSE
  2693. tic%(count%)+=1
  2694. IF lvdata%(count%,tic%(count%)) = 0 THEN tic%(count%) = 1
  2695. chan% = lvdata%(count%,tic%(count%))
  2696. ENDIF
  2697. :
  2698. SOUND chan%, dyn%, pitch%, dur%, after%
  2699. :
  2700. IF amp2% <> 9 THEN PROCenv
  2701. :
  2702. cell%(voicenum%) += 1
  2703. bar%(voicenum%) = array%(cell%(voicenum%),0,voicenum%) DIV 10^6
  2704. :
  2705. ENDWHILE
  2706. :
  2707. NEXT count%
  2708. :
  2709. REPEAT UNTIL BEAT > 20
  2710. :
  2711. NEXT barnum%
  2712. :
  2713. PROCpostdisplay
  2714. :
  2715. ENDPROC
  2716. :
  2717. REM*******************************
  2718. :
  2719. DEF PROCaddonenote
  2720. :
  2721. IF easiermenus$ = "n" THEN PROCwindow(20,72,72,55) ELSE PROCwindow(20,69,60,42)
  2722. CLS
  2723. INPUT' " Which voice "voice%
  2724. IF voice% = 0 THEN PROCpressenter
  2725. voice% -= 1
  2726. INPUT '" Bar number "barno%
  2727. IF barno% = 0 THEN barno% = 1
  2728. INPUT '" Beat number "beats%
  2729. PROCalterbeats
  2730. beatno% = beats%
  2731. :
  2732. PRINT '" Pitch name ";
  2733. COLOUR 3
  2734. CASE GET$ OF
  2735. WHEN "C","c" : note% = 0 : PRINT "C"
  2736. WHEN "D","d" : note% = 1 : PRINT "D"
  2737. WHEN "E","e" : note% = 2 : PRINT "E"
  2738. WHEN "F","f" : note% = 3 : PRINT "F"
  2739. WHEN "G","g" : note% = 4 : PRINT "G"
  2740. WHEN "A","a" : note% = 5 : PRINT "A"
  2741. WHEN "B","b" : note% = 6 : PRINT "B"
  2742. ENDCASE
  2743. COLOUR 0
  2744. PRINT '" Accidental ";
  2745. COLOUR 3
  2746. CASE GET$ OF
  2747. WHEN "1" : accid% = 1 : PRINT "flat"
  2748. WHEN "2" : accid% = 2 : PRINT "3/8flat"
  2749. WHEN "3" : accid% = 3 : PRINT "1/4flat"
  2750. WHEN "4" : accid% = 4 : PRINT "1/8flat"
  2751. WHEN "5" : accid% = 5 : PRINT "nat"
  2752. WHEN "6" : accid% = 6 : PRINT "1/8shrp"
  2753. WHEN "7" : accid% = 7 : PRINT "1/4shrp"
  2754. WHEN "8" : accid% = 8 : PRINT "3/8shrp"
  2755. WHEN "9" : accid% = 9 : PRINT "shrp"
  2756. ENDCASE
  2757. COLOUR 0
  2758. PRINT '" octave ";
  2759. COLOUR 3
  2760. CASE GET$ OF
  2761. WHEN "0" : octave% = 0 : PRINT "0"
  2762. WHEN "1" : octave% = 1 : PRINT "1"
  2763. WHEN "2" : octave% = 2 : PRINT "2"
  2764. WHEN "3" : octave% = 3 : PRINT "3"
  2765. WHEN "4" : octave% = 4 : PRINT "4"
  2766. WHEN "5" : octave% = 5 : PRINT "5"
  2767. WHEN "6" : octave% = 6 : PRINT "6"
  2768. WHEN "7" : octave% = 7 : PRINT "7"
  2769. WHEN "8" : octave% = 8 : PRINT "8"
  2770. ENDCASE
  2771. COLOUR 0
  2772. pitch% = (note%*100)+(accid%*10)+octave%
  2773. PRINT '" Duration "
  2774. INPUT '" 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. IF copymove$ = "C" OR copymove$ = "EC" THEN 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 start at "
  2869. INPUT ' " bar "bars%
  2870. IF bars% <> 0 THEN memorybar% = bars%
  2871. IF bars% = 0 THEN
  2872. bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
  2873. IF askprevious$ = "y" THEN
  2874. thing$ = INKEY$(50)
  2875. IF thing$ <> "" THEN
  2876. bars% = memorybar% : beats% = memorybeat%
  2877. COLOUR 3
  2878. PRINT'" bar ";bars%;" beat ";beats%;"?"
  2879. COLOUR 0
  2880. PRINT '" (for OK press 0, if not OK press X) "
  2881. destinationdone$ = "y"
  2882. CASE GET$ OF
  2883. WHEN "X","x" : PROCinsertattacks
  2884. OTHERWISE
  2885. ENDCASE
  2886. ENDIF
  2887. ENDIF
  2888. ENDIF
  2889. ELSE bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
  2890. :
  2891. ENDIF
  2892. :
  2893. ELSE
  2894. :
  2895. PRINT' " the passage is to start at "
  2896. INPUT' " bar "bars%
  2897. IF bars% = 0 THEN
  2898. bars% = startbar%
  2899. COLOUR 3 : PRINT' bars% : COLOUR 0
  2900. nothing$ = INKEY$(100)
  2901. ENDIF
  2902. :
  2903. ENDIF : REM copyit$
  2904. :
  2905. IF repeatposit$ = "n" THEN
  2906. INPUT' " beat "beats%
  2907. :
  2908. memorybeat% = beats%
  2909. ELSE
  2910. :
  2911. IF copydownwards$ = "n" AND destinationdone$ = "n" THEN
  2912. COLOUR 3
  2913. PRINT'" bar ";bars%;" beat ";beats%;"?"
  2914. COLOUR 0
  2915. PRINT'" (press 0 for OK, B for Back"
  2916. PRINT " F for Forward, X if not OK)"
  2917. CASE GET$ OF
  2918. WHEN "b", "B" : PROCmoveback
  2919. WHEN "f", "F" : PROCmoveforward
  2920. WHEN "x","X" : PROCinsertattacks
  2921. OTHERWISE
  2922. ENDCASE
  2923. ELSE
  2924. ENDIF
  2925. :
  2926. ENDIF : REM repeatposit$
  2927. :
  2928. ELSE
  2929. bars% = funcbar% : beats% = funcbeat%
  2930. ENDIF : REM quiz$
  2931. :
  2932. quiz$ = "yes"
  2933. PROCalterbeats
  2934. startat% = (bars%*(10^3))+beats%
  2935. ENDIF : REM equalized$
  2936. ENDIF : REM reordered$
  2937. :
  2938. reordered$ = "n" : equalized$ = "n"
  2939. :
  2940. attacks2%() = attacks1%()
  2941. :
  2942. attacks2%() = attacks2%() + (startat% MOD 10^3) : REM moves attacks further up bar, if necc
  2943. :
  2944. attacks3%() = attacks2%()
  2945. FOR count% = 0 TO (manyattacks%-1)
  2946. attacks3%(count%) = attacks3%(count%) DIV 960
  2947. NEXT
  2948. REM gives list of bar mos starting at 0
  2949. :
  2950. attacks3%() = attacks3%() * 960
  2951. attacks2%() = attacks2%() - attacks3%()
  2952. attacks3%() = attacks3%() / 960
  2953. REM list of actual beat numbers
  2954. :
  2955. attacks3%() = attacks3%() + (startat% DIV 10^3) : REM list of actual bar nos
  2956. :
  2957. attacks3%() = attacks3%()*(10^3)
  2958. attacks2%() = attacks2%() + attacks3%()
  2959. REM list of actual bar/beat numbers
  2960. :
  2961. ENDIF : REM method$
  2962. :
  2963. : IF method$ <> "alreadyrhythmicized" THEN rhythmicized$ = "n"
  2964. IF seeinfo$ = "y" THEN
  2965. :
  2966. IF printinfo$ = "y" THEN PROCprintattacks
  2967. durat% = 0
  2968. PROCwindow(10,60,90,5)
  2969. VDU 14
  2970. PRINT '" The group of attacks will be at "
  2971. PRINT" "
  2972. PRINT TAB(8) "ATTACKS AT";
  2973. PRINT TAB(30) "DURATIONS";
  2974. PRINT TAB(54) "RATIOS"
  2975. FOR count% = 0 TO (manyattacks%-1)
  2976. COLOUR 3 : PRINT TAB(1)(attacks2%(count%))DIV10^3;" ";
  2977. COLOUR 0 : PRINT ;(attacks2%(count%))MOD10^3;
  2978. IF count% > 0 THEN
  2979. durat1% = durat%
  2980. durat% = (attacks2%(count%)MOD10^3)-(attacks2%(count%-1)MOD10^3)
  2981. addon% = ((attacks2%(count%)DIV(10^3))-(attacks2%(count%-1)DIV(10^3)))*960
  2982. durat% = durat% + addon%
  2983. PRINT TAB(26) durat%;
  2984. IF count%>1 THEN
  2985. IF direction$ = "rit" THEN ratio = durat%/durat1% ELSE ratio = durat1%/durat%
  2986. CASE ratio OF
  2987. WHEN 0.5 : PRINT TAB(52) "0.5"
  2988. WHEN 1.0 : PRINT TAB(52) "1.0"
  2989. WHEN 1.5 : PRINT TAB(52) "1.5"
  2990. WHEN 2.0 : PRINT TAB(52) "2.0"
  2991. WHEN 2.5 : PRINT TAB(52) "2.5"
  2992. OTHERWISE PRINT TAB(52) ratio
  2993. ENDCASE
  2994. ENDIF
  2995. ENDIF
  2996. NEXT
  2997. :
  2998. VDU 15
  2999. :
  3000. ENDIF : REM seeinfo
  3001. :
  3002. IF method$ = "raw" THEN
  3003. IF seereordery$ = "y" THEN
  3004. PRINT'" Do you want this group to be re-ordered?"
  3005. PRINT'" (Y/1 = yes, any other key = no) "
  3006. :
  3007. CASE GET$ OF
  3008. WHEN "Y","y","1" : PROCreorderattacks
  3009. OTHERWISE
  3010. ENDCASE
  3011. seereordery$ = "n"
  3012. rhythmicized$ = "n"
  3013. ENDIF
  3014. IF seeequalizey$ = "y" THEN
  3015. PRINT'" Do you want to equalize any durations? "
  3016. PRINT'" (Y/0/1 = yes, N/2 = no) "
  3017. CASE GET$ OF
  3018. WHEN "n","N","2" :
  3019. OTHERWISE PROCequalizedurats
  3020. ENDCASE
  3021. seeequalizey$ = "n"
  3022. ENDIF
  3023. IF seerhythmicize$ = "y" THEN
  3024. PRINT'" Do you want this group to be rhythmicized? "
  3025. CASE GET$ OF
  3026. WHEN "Y","y" : PROCprerhythmicize
  3027. rhythmicized$ = "y"
  3028. OTHERWISE
  3029. ENDCASE
  3030. ENDIF
  3031. ENDIF : REM method$ = raw?
  3032. IF seequery$ = "y" THEN
  3033. PRINT ' " Do you want to add this group to the array? "
  3034. CASE GET$ OF
  3035. 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
  3036. OTHERWISE
  3037. ENDCASE
  3038. ENDIF : REM seequery
  3039. :
  3040. IF displayedfunc$ = "n" THEN
  3041. :
  3042. IF copydownwards$ = "n" THEN
  3043. IF screenvoices$ = "n" THEN
  3044. :
  3045. IF copysuccessively$ = "y" THEN
  3046. INPUT' " Which voice "voice%
  3047. IF voice% <> 0 THEN succto% = voice% ELSE PROCpressenter
  3048. ELSE
  3049. INPUT'" Which voice "voice%
  3050. IF voice% = 0 THEN PROCpressenter
  3051. ENDIF : REM copysuccessively$
  3052. :
  3053. ELSE
  3054. PRINT'" Which screen voice "
  3055. CASE GET$ OF
  3056. WHEN "1" : voice% = 1
  3057. WHEN "2" : voice% = 2
  3058. WHEN "3" : voice% = 3
  3059. OTHERWISE PROCpressenter
  3060. ENDCASE
  3061. ENDIF
  3062. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  3063. voice% -= 1
  3064. IF voice% >= 0 THEN samevoice% = voice%
  3065. IF voice% = -1 THEN
  3066. IF copysuccessively$ = "n" THEN
  3067. voice% = samevoice%
  3068. ELSE
  3069. voice% = succto%-1
  3070. ENDIF : REM copysucc
  3071. ENDIF : REM if voice = -1
  3072. :
  3073. ELSE voice% = displayvoices%(startv%+downby%) : voice% = voice%-1
  3074. ENDIF
  3075. :
  3076. ENDIF
  3077. :
  3078. IF copyit$ = "OFF" THEN
  3079. IF paraset$ = "on" THEN
  3080. PRINT'" Do you want to (re)define the values assigned "
  3081. PRINT " to each parameter when inputting a group of "
  3082. PRINT " attacks, use defaults or reset defaults? "
  3083. PRINT " (press Y/N/D/R)"
  3084. PRINT'" - press M/V/D/P again to go back to always "
  3085. PRINT " using the assigned values without asking "
  3086. CASE GET$ OF
  3087. WHEN "R","r" : resetdefaults$ = "y"
  3088. PRINT'" Please press the same key again to proceed"
  3089. OTHERWISE
  3090. PRINT'" Please press the same key again to proceed"
  3091. ENDCASE
  3092. :
  3093. CASE GET$ OF
  3094. WHEN "Y","y","R","r" :
  3095. CLS : parasdefined$ = "yes" : PRINT' " all at pitch name ";
  3096. COLOUR 3
  3097. CASE GET$ OF
  3098. WHEN "C","c" : note% = 0 : PRINT "C"
  3099. WHEN "D","d" : note% = 1 : PRINT "D"
  3100. WHEN "E","e" : note% = 2 : PRINT "E"
  3101. WHEN "F","f" : note% = 3 : PRINT "F"
  3102. WHEN "G","g" : note% = 4 : PRINT "G"
  3103. WHEN "A","a" : note% = 5 : PRINT "A"
  3104. WHEN "B","b" : note% = 6 : PRINT "B"
  3105. ENDCASE
  3106. COLOUR 0
  3107. PRINT " accidental ";
  3108. COLOUR 3
  3109. CASE GET$ OF
  3110. WHEN "1" : accid% = 1 : PRINT "flat"
  3111. WHEN "2" : accid% = 2 : PRINT "3/8flat"
  3112. WHEN "3" : accid% = 3 : PRINT "1/4flat"
  3113. WHEN "4" : accid% = 4 : PRINT "1/8flat"
  3114. WHEN "5" : accid% = 5 : PRINT "nat"
  3115. WHEN "6" : accid% = 6 : PRINT "1/8shrp"
  3116. WHEN "7" : accid% = 7 : PRINT "1/4shrp"
  3117. WHEN "8" : accid% = 8 : PRINT "3/8shrp"
  3118. WHEN "9" : accid% = 9 : PRINT "shrp"
  3119. ENDCASE
  3120. COLOUR 0
  3121. PRINT " octave ";
  3122. COLOUR 3
  3123. CASE GET$ OF
  3124. WHEN "0" : octave% = 0 : PRINT "0"
  3125. WHEN "1" : octave% = 1 : PRINT "1"
  3126. WHEN "2" : octave% = 2 : PRINT "2"
  3127. WHEN "3" : octave% = 3 : PRINT "3"
  3128. WHEN "4" : octave% = 4 : PRINT "4"
  3129. WHEN "5" : octave% = 5 : PRINT "5"
  3130. WHEN "6" : octave% = 6 : PRINT "6"
  3131. WHEN "7" : octave% = 7 : PRINT "7"
  3132. WHEN "8" : octave% = 8 : PRINT "8"
  3133. ENDCASE
  3134. COLOUR 0
  3135. pitchset%(voice%) = (note%*100)+(accid%*10)+octave%
  3136. IF resetdefaults$ = "y" THEN
  3137. FOR count% = 0 TO (numparts%-1)
  3138. pitchset%(count%) = pitchset%(voice%)
  3139. NEXT
  3140. ENDIF
  3141. INPUT " all at duration: bars "b%
  3142. INPUT " beats "beats% : PROCalterbeats
  3143. dur% = (b%*960)+beats%
  3144. durset%(voice%) = dur%
  3145. IF resetdefaults$ = "y" THEN
  3146. FOR count% = 0 TO (numparts%-1)
  3147. durset%(count%) = durset%(voice%)
  3148. NEXT
  3149. ENDIF
  3150. :
  3151. INPUT " all at amplitude "amp$
  3152. CASE amp$ OF
  3153. WHEN "0" : ampset%(voice%) = 0
  3154. WHEN "ppp" : ampset%(voice%) = 1
  3155. WHEN "pp" : ampset%(voice%) = 2
  3156. WHEN "p" : ampset%(voice%) = 3
  3157. WHEN "mp" : ampset%(voice%) = 4
  3158. WHEN "mf" : ampset%(voice%) = 5
  3159. WHEN "f" : ampset%(voice%) = 6
  3160. WHEN "ff" : ampset%(voice%) = 7
  3161. WHEN "fff" : ampset%(voice%) = 8
  3162. ENDCASE
  3163. IF resetdefaults$ = "y" THEN
  3164. FOR count% = 0 TO (numparts%-1)
  3165. ampset%(count%) = ampset%(voice%)
  3166. NEXT
  3167. ENDIF
  3168. :
  3169. INPUT " all at microtonal inflection (in cents: 1,-1 etc) [max 49,-49]: "infset%
  3170. infset%(voice%) = 50+infset%
  3171. envset%(voice%) = 9
  3172. glissset%(voice%) = 105050
  3173. resetdefaults$ = "n"
  3174. WHEN "D","d" : pitchset%(voice%) = 55
  3175. ampset%(voice%) = 6
  3176. envset%(voice%) = 9
  3177. durset%(voice%) = 319
  3178. glissset%(voice%) = 105050
  3179. infset%(voice%) = 50
  3180. OTHERWISE
  3181. ENDCASE
  3182. ENDIF
  3183. ENDIF
  3184. :
  3185. addingnotes$ = "y"
  3186. IF copyit$ = "OFF" THEN
  3187. IF rhythmicized$ = "n" THEN
  3188. FOR counter% = 0 TO (manyattacks%-1)
  3189. PROCnewnotereception(voice%,(attacks2%(counter%)DIV10^3), (attacks2%(counter%) MOD 10^3), pitchset%(voice%), ampset%(voice%), envset%(voice%), durset%(voice%), glissset%(voice%), infset%(voice%))
  3190. NEXT
  3191. ELSE
  3192. FOR counter% = 0 TO (manyattacks%-1)
  3193. PROCnewnotereception(voice%,(attacks5%(counter%)DIV10^3), (attacks5%(counter%) MOD 10^3), pitchset%(voice%), ampset%(voice%), envset%(voice%), durset%(voice%), glissset%(voice%), infset%(voice%))
  3194. NEXT
  3195. PROCdisarrayfill
  3196. ENDIF
  3197. ELSE
  3198. IF rhythmicized$ = "n" THEN
  3199. FOR counter% = 0 TO (manyattacks%-1)
  3200. PROCnewnotereception(voice%, (attacks2%(counter%)DIV10^3), (attacks2%(counter%)MOD10^3), pitches%(counter%), amplitudes%(counter%), envelopes%(counter%), durations%(counter%), glissandos%(counter%), inflections%(counter%))
  3201. NEXT
  3202. ELSE
  3203. FOR counter% = 0 TO (manyattacks%-1)
  3204. PROCnewnotereception(voice%, (attacks5%(counter%)DIV10^3), (attacks5%(counter%)MOD10^3), pitches%(counter%), amplitudes%(counter%), envelopes%(counter%), durations%(counter%), glissandos%(counter%), inflections%(counter%))
  3205. NEXT
  3206. PROCdisarrayfill
  3207. ENDIF
  3208. :
  3209. ENDIF
  3210. :
  3211. copyit$ = "OFF" : displayedfunc$ = "n" : copydownwards$ = "n" : justone$ = "n"
  3212. quickextract$ = "n"
  3213. PROCdisplay
  3214. :
  3215. ENDPROC
  3216. :
  3217. REM*********************************************
  3218. :
  3219. DEF PROCseriespitches
  3220. :
  3221. IF easiermenus$ = "n" THEN PROCwindow(20,69,60,55) ELSE PROCwindow(20,69,60,42)
  3222. :
  3223. IF usebottomstave$ = "n" THEN
  3224. :
  3225. IF singlepitch$ = "m" THEN
  3226. IF firstpitch$ = "y" THEN
  3227. INPUT' " How many pitches "numpitches%
  3228. ELSE
  3229. PRINT' " How many pitches "
  3230. PRINT' " for "; prevnumpitches%;
  3231. INPUT " press 0 twice) "numpitches%
  3232. IF numpitches% = 0 THEN
  3233. wait$ = INKEY$(50)
  3234. IF wait$ <> "" THEN numpitches% = prevnumpitches%
  3235. ENDIF
  3236. ENDIF
  3237. ELSE
  3238. numpitches% = 1
  3239. ENDIF
  3240. :
  3241. ELSE
  3242. numpitches% = howmany%
  3243. ENDIF
  3244. :
  3245. IF numpitches% = 0 THEN numpitches% = 1
  3246. IF numpitches% > 1 THEN
  3247. :
  3248. IF askaboutpitches$ = "y" THEN
  3249. PRINT'" Are the pitches all the same?"
  3250. PRINT'" (0/1 count as yes, 2 counts as no) "
  3251. CASE GET$ OF
  3252. WHEN "N","n","2" :
  3253. OTHERWISE PROCsamepitches
  3254. ENDCASE
  3255. ELSE PROCsamepitches
  3256. ENDIF
  3257. :
  3258. ENDIF
  3259. :
  3260. FOR count% = 0 TO numpitches% - 1
  3261. PRINT' " Note name for pitch ";count%+1;" is ";
  3262. COLOUR 3
  3263. CASE GET$ OF
  3264. WHEN "C","c" : note% = 0 : PRINT "C"
  3265. WHEN "D","d" : note% = 1 : PRINT "D"
  3266. WHEN "E","e" : note% = 2 : PRINT "E"
  3267. WHEN "F","f" : note% = 3 : PRINT "F"
  3268. WHEN "G","g" : note% = 4 : PRINT "G"
  3269. WHEN "A","a" : note% = 5 : PRINT "A"
  3270. WHEN "B","b" : note% = 6 : PRINT "B"
  3271. ENDCASE
  3272. COLOUR 0
  3273. PRINT' " accidental ";
  3274. COLOUR 3
  3275. CASE GET$ OF
  3276. WHEN "1" : accid% = 1 : PRINT "flat"
  3277. WHEN "2" : accid% = 2 : PRINT "3/8flat"
  3278. WHEN "3" : accid% = 3 : PRINT "1/4flat"
  3279. WHEN "4" : accid% = 4 : PRINT "1/8flat"
  3280. WHEN "5" : accid% = 5 : PRINT "nat"
  3281. WHEN "6" : accid% = 6 : PRINT "1/8shrp"
  3282. WHEN "7" : accid% = 7 : PRINT "1/4shrp"
  3283. WHEN "8" : accid% = 8 : PRINT "3/8shrp"
  3284. WHEN "9" : accid% = 9 : PRINT "shrp"
  3285. ENDCASE
  3286. COLOUR 0
  3287. PRINT '" octave ";
  3288. COLOUR 3
  3289. CASE GET$ OF
  3290. WHEN "0" : octave% = 0 : PRINT "0"
  3291. WHEN "1" : octave% = 1 : PRINT "1"
  3292. WHEN "2" : octave% = 2 : PRINT "2"
  3293. WHEN "3" : octave% = 3 : PRINT "3"
  3294. WHEN "4" : octave% = 4 : PRINT "4"
  3295. WHEN "5" : octave% = 5 : PRINT "5"
  3296. WHEN "6" : octave% = 6 : PRINT "6"
  3297. WHEN "7" : octave% = 7 : PRINT "7"
  3298. WHEN "8" : octave% = 8 : PRINT "8"
  3299. ENDCASE
  3300. COLOUR 0
  3301. pitches%(count%) = (note%*100)+(accid%*10)+octave%
  3302. NEXT
  3303. :
  3304. prevnumpitches% = numpitches% : firstpitch$ = "n"
  3305. REM function can feed pitches similarly into pitches%
  3306. :
  3307. PROCinsertpitches
  3308. :
  3309. ENDPROC
  3310. :
  3311. REM************************************************
  3312. :
  3313. DEF PROCinsertpitches
  3314. :
  3315. CLS
  3316. :
  3317. IF reorderpitches$ = "y" THEN
  3318. PRINT'" Do you want to randomly re-order"
  3319. PRINT " the pitches (0 = yes, 2 = no)"
  3320. CASE GET$ OF
  3321. WHEN "2" :
  3322. OTHERWISE
  3323. CLS
  3324. PRINT'" Randomly reorder pitches in batches of "
  3325. INPUT " between how many (0 = previous) "low%
  3326. IF low% = 0 THEN
  3327. low% = previouslow%
  3328. COLOUR 3
  3329. PRINT low%
  3330. COLOUR 0
  3331. wait$ = INKEY$(50)
  3332. ENDIF
  3333. INPUT'" and how many "high%
  3334. IF high% = 0 THEN
  3335. high% = previoushigh%
  3336. COLOUR 3
  3337. PRINT high%
  3338. COLOUR 0
  3339. wait$ = INKEY$(50)
  3340. ENDIF
  3341. :
  3342. startingcell% = 0
  3343. pitches1%() = 0
  3344. pitches2%() = 0
  3345. pitches1%() = pitches%()
  3346. REPEAT
  3347. diff% = high%-low%
  3348. batchsize% = RND(diff%+1)-1
  3349. batchsize% += low%
  3350. counter% = 0
  3351. REPEAT
  3352. cell% = RND(batchsize%)
  3353. cell% = startingcell% + cell% - 1
  3354. IF pitches1%(cell%) <> 0 THEN
  3355. pitches2%(startingcell%+counter%) = pitches1%(cell%)
  3356. counter% += 1
  3357. ENDIF
  3358. pitches1%(cell%) = 0
  3359. check% = 0
  3360. FOR count% = 1 TO batchsize%
  3361. check% += pitches1%(startingcell%+count%-1)
  3362. NEXT
  3363. UNTIL check% = 0
  3364. startingcell% += batchsize%
  3365. UNTIL (numpitches%-high%) < startingcell%
  3366. FOR count% = 0 TO numpitches%-1
  3367. IF pitches2%(count%) <> 0 THEN
  3368. pitches%(count%) = pitches2%(count%)
  3369. ENDIF
  3370. NEXT
  3371. previouslow% = low%
  3372. previoushigh% = high%
  3373. ENDCASE
  3374. ENDIF : REM reorderpitches$
  3375. :
  3376. repeatposit$ = "n"
  3377. IF seequery$ = "y" THEN
  3378. PRINT ' " Do you want to read these pitches "
  3379. PRINT " into the array? "
  3380. CASE GET$ OF
  3381. WHEN "N","n" : PROCdisplay : REM pitches% remains intact
  3382. OTHERWISE
  3383. ENDCASE
  3384. ENDIF : REM seequery$
  3385. :
  3386. IF usebottomstave$ = "n" THEN
  3387. IF screenvoices$ = "n" THEN
  3388. :
  3389. IF copysuccessively$ = "n" THEN
  3390. INPUT'' " Which voice? "voice%
  3391. IF voice% = 0 THEN PROCpressenter
  3392. ELSE PROCcopysuccessively
  3393. ENDIF
  3394. :
  3395. ELSE
  3396. PRINT'" Which screen voice "
  3397. CASE GET$ OF
  3398. WHEN "1" : voice% = 1
  3399. WHEN "2" : voice% = 2
  3400. WHEN "3" : voice% = 3
  3401. OTHERWISE PROCpressenter
  3402. ENDCASE
  3403. ENDIF
  3404. ENDIF : REM usebottomstave$
  3405. :
  3406. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  3407. IF usebottomstave$ = "y" THEN voice% = displayvoices%(startv%+2)
  3408. voice% -= 1
  3409. IF voice% >= 0 THEN samevoice% = voice%
  3410. IF voice% = -1 THEN voice% = samevoice%
  3411. :
  3412. IF usebottomstave$ = "n" THEN
  3413. :
  3414. IF quickcopy$ = "y" THEN
  3415. INPUT ' " starting at note number "along%
  3416. IF along% = 0 THEN along% = 1
  3417. along%-=1
  3418. bars% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  3419. beats% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  3420. holdbar% = bars%
  3421. holdbeat% = beats%
  3422. PROCalterbeats
  3423. startat% = (bars%*(10^3))+beats%
  3424. :
  3425. ELSE
  3426. :
  3427. INPUT'" Starting at bar number "bars%
  3428. IF bars% = 0 THEN
  3429. bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
  3430. ENDIF
  3431. holdbar% = bars%
  3432. IF repeatposit$ = "y" THEN
  3433. PRINT'" bar ";bars%;" beat ";beats%;"?"
  3434. PRINT'" (for OK press 0, if not OK press X)"
  3435. CASE GET$ OF
  3436. WHEN"X","x" : PROCinsertpitches
  3437. OTHERWISE
  3438. ENDCASE
  3439. ELSE
  3440. INPUT " beat "beats%
  3441. holdbeat% = beats%
  3442. ENDIF
  3443. PROCalterbeats
  3444. startat% = (bars%*(10^3))+beats%
  3445. :
  3446. ENDIF : REM quickcopy$
  3447. :
  3448. ELSE
  3449. along% = 0
  3450. bars% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  3451. beats% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  3452. holdbar% = bars%
  3453. holdbeat% = beats%
  3454. PROCalterbeats
  3455. startat% = (bars%*(10^3))+beats%
  3456. :
  3457. ENDIF : REM usebottomstave$
  3458. :
  3459. PROCsearch(startat%)
  3460. shunt$ = "N"
  3461. :
  3462. endcell% = startcell% + numpitches% -1
  3463. IF endcell% >= numusedcells%(voice%) THEN endcell% = numusedcells%(voice%)-1
  3464. FOR count% = startcell% TO endcell%
  3465. PROCcellfill(count%,voice%,999,999,(pitches%(count%-startcell%)),9,999,999,99,99)
  3466. NEXT
  3467. :
  3468. PROCdisplay
  3469. :
  3470. ENDPROC
  3471. :
  3472. REM*************************************************
  3473. :
  3474. DEF PROCfunctionprelude
  3475. :
  3476. IF seereorderx$ = "y" THEN seereordery$ = "y"
  3477. IF seeequalizex$ = "y" THEN seeequalizey$ = "y"
  3478. :
  3479. IF easiermenus$ = "n" THEN PROCwindow(20,69,60,55) ELSE PROCwindow(20,69,60,42)
  3480. CLS
  3481. CASE startfinishdurats$ OF
  3482. WHEN "N", "n" :
  3483. INPUT' " rate "rate
  3484. IF rate = 0 THEN rate = 1 : REM for quick inputting
  3485. IF rate <> 1 THEN
  3486. INPUT'" bias (for 3.7 press 0) "bias
  3487. IF bias = 0 THEN bias = 3.7
  3488. ENDIF
  3489. INPUT'" number of attacks "manyattacks%
  3490. IF manyattacks% = 0 THEN manyattacks% = prevmanyattacks%
  3491. COLOUR 3 : PRINT'manyattacks% : COLOUR 0
  3492. prevmanyattacks% = manyattacks%
  3493. CASE funcinput$ OF
  3494. WHEN "durat" :
  3495. PRINT '" total duration... "
  3496. INPUT' " bars "bars%
  3497. INPUT' " beats "beats%
  3498. PROCalterbeats
  3499. totaldur% = (bars%*960)+beats%
  3500. WHEN "points" :
  3501. INPUT '" first attack at bar "funcbar%
  3502. INPUT '" beat "funcbeat%
  3503. INPUT '" and last attack at bar "funcbar1%
  3504. INPUT '" beat "funcbeat1%
  3505. totaldur% = ((funcbar1%*960)+funcbeat1%)-((funcbar%*960)+funcbeat%)
  3506. WHEN "displayed" :
  3507. IF screenvoices$ = "n" THEN
  3508. INPUT' " Which voice "voice%
  3509. IF voice% = 0 THEN PROCpressenter
  3510. :
  3511. ELSE
  3512. PRINT'" Which screen voice "
  3513. CASE GET$ OF
  3514. WHEN "1" : voice% = 1
  3515. WHEN "2" : voice% = 2
  3516. WHEN "3" : voice% = 3
  3517. OTHERWISE PROCpressenter
  3518. ENDCASE
  3519. ENDIF
  3520. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  3521. voice% -= 1
  3522. IF voice% = -1 THEN voice% = samevoice% ELSE samevoice% = voice%
  3523. IF queryalong$ = "y" THEN
  3524. INPUT' " Starting at note number "along%
  3525. IF along% = 0 THEN along% = 1
  3526. along%-=1
  3527. ENDIF
  3528. funcbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  3529. funcbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  3530. funcbar1% = array%(holdstartcell%(voice%)+1+along%,0,voice%)DIV10^6
  3531. funcbeat1% = (array%(holdstartcell%(voice%)+1+along%,0,voice%)MOD10^6)DIV10^3
  3532. totaldur% = ((funcbar1%*960)+funcbeat1%)-((funcbar%*960)+funcbeat%)
  3533. displayedfunc$ = "y" : along% = 0
  3534. OTHERWISE PROCfunctionprelude
  3535. ENDCASE
  3536. :
  3537. result$ = "success"
  3538. :
  3539. PROCfunction
  3540. IF rate <> 1 AND seegraph$ = "y" THEN
  3541. REM PROCwindow(20,69,50,55)
  3542. PRINT'" Do you want to see the graph? "
  3543. CASE GET$ OF
  3544. WHEN "Y","y" : PROCgraph
  3545. OTHERWISE PROCfunctionpostlude
  3546. ENDCASE
  3547. ELSE
  3548. PROCfunctionpostlude
  3549. ENDIF
  3550. ENDCASE
  3551. :
  3552. CASE funcinput$ OF
  3553. WHEN "durat" :
  3554. REM PROCwindow(20,69,69,55)
  3555. PRINT' " total duration... "
  3556. INPUT' " bars "bars%
  3557. INPUT' " beats "beats%
  3558. PROCalterbeats
  3559. totaldur% = (bars%*960)+beats%
  3560. WHEN "points" :
  3561. REM PROCwindow(20,69,69,55)
  3562. INPUT' " first attack at bar "funcbar%
  3563. INPUT' " beat "funcbeat%
  3564. INPUT' " and last attack at bar "funcbar1%
  3565. INPUT' " beat "funcbeat1%
  3566. totaldur% = ((funcbar1%*960)+funcbeat1%)-((funcbar%*960)+funcbeat%)
  3567. WHEN "displayed" :
  3568. IF screenvoices$ = "n" THEN
  3569. INPUT' " Which voice "voice%
  3570. IF voice% = 0 THEN PROCpressenter
  3571. ELSE
  3572. PRINT'" Which screen voice "
  3573. CASE GET$ OF
  3574. WHEN "1" : voice% = 1
  3575. WHEN "2" : voice% = 2
  3576. WHEN "3" : voice% = 3
  3577. OTHERWISE PROCpressenter
  3578. ENDCASE
  3579. ENDIF
  3580. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  3581. voice% -= 1
  3582. IF voice% = -1 THEN voice% = samevoice%
  3583. funcbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  3584. funcbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  3585. funcbar1% = array%(holdstartcell%(voice%)+1+along%,0,voice%)DIV10^6
  3586. funcbeat1% = (array%(holdstartcell%(voice%)+1+along%,0,voice%)MOD10^6)DIV10^3
  3587. totaldur% = ((funcbar1%*960)+funcbeat1%)-((funcbar%*960)+funcbeat%)
  3588. displayedfunc$ = "y" : along% = 0
  3589. OTHERWISE PROCfunctionprelude
  3590. ENDCASE
  3591. :
  3592. IF easiermenus$ = "n" THEN PROCwindow(20,69,69,54) ELSE PROCwindow(20,69,69,42)
  3593. :
  3594. IF firsttimequick$ = "y" THEN
  3595. PRINT' " quick end duration to be... "
  3596. INPUT' " bars "bars%
  3597. INPUT' " beats "beats%
  3598. ELSE
  3599. PRINT' " quick end duration to be how many bars "
  3600. PRINT' " (for ";prevbars%;" press 0) "
  3601. INPUT " "bars%
  3602. :
  3603. IF bars% = 0 THEN
  3604. COLOUR 3 : PRINT prevbars% : COLOUR 0
  3605. ENDIF
  3606. :
  3607. PRINT' " and how many beats "
  3608. PRINT' " (for ";prevbeats%;" press 0) "
  3609. INPUT " "beats%
  3610. :
  3611. IF beats% = 0 THEN
  3612. COLOUR 3 : PRINT prevbeats% : COLOUR 0
  3613. ENDIF
  3614. IF bars% = 0 AND beats% = 0 THEN
  3615. bars% = prevbars% : beats% = prevbeats%
  3616. ENDIF
  3617. ENDIF
  3618. prevbars% = bars%
  3619. prevbeats% = beats%
  3620. PROCalterbeats
  3621. quickend% = (bars%*960)+beats%
  3622. :
  3623. IF firsttimequick$ = "y" THEN
  3624. PRINT' " slow end duration to be... "
  3625. INPUT' " bars "bars%
  3626. INPUT' " beats "beats%
  3627. ELSE
  3628. PRINT' " slow end duration to be how many bars "
  3629. PRINT' " (for ";prevslowbars%;" press 0) "
  3630. INPUT " "bars%
  3631. :
  3632. IF bars% = 0 THEN
  3633. COLOUR 3 : PRINT prevslowbars% : COLOUR 0
  3634. ENDIF
  3635. :
  3636. PRINT' " and how many beats "
  3637. PRINT' " (for ";prevslowbeats%;" press 0) "
  3638. INPUT " "beats%
  3639. :
  3640. IF beats% = 0 THEN
  3641. COLOUR 3 : PRINT prevslowbeats% : COLOUR 0
  3642. nothing$ = INKEY$(100)
  3643. ENDIF
  3644. :
  3645. IF bars% = 0 AND beats% = 0 THEN
  3646. bars% = prevslowbars% : beats% = prevslowbeats%
  3647. ENDIF
  3648. ENDIF
  3649. prevslowbars% = bars%
  3650. prevslowbeats% = beats%
  3651. PROCalterbeats
  3652. slowend% = (bars%*960)+beats%
  3653. :
  3654. CLS
  3655. IF firsttimequick$ = "y" THEN
  3656. INPUT' " bias (0 = 3.7) "bias
  3657. IF bias = 0 THEN bias = 3.7
  3658. ELSE
  3659. PRINT' " bias "
  3660. PRINT' " (for ";bias;" press 0) "
  3661. INPUT' " "newbias
  3662. :
  3663. IF newbias = 0 THEN
  3664. COLOUR 3 : PRINT bias : COLOUR 0
  3665. ELSE bias = newbias
  3666. ENDIF
  3667. :
  3668. ENDIF
  3669. :
  3670. IF firsttimequick$ = "y" THEN
  3671. INPUT' " estimated number of attacks "manyattacks%
  3672. ELSE
  3673. PRINT' " estimated number of attacks "
  3674. PRINT' " (for ";prevest%;" press 0) "
  3675. INPUT' " "manyattacks%
  3676. :
  3677. IF manyattacks% = 0 THEN
  3678. COLOUR 3 : PRINT prevest% : COLOUR 0
  3679. nothing$ = INKEY$(100)
  3680. ENDIF
  3681. :
  3682. IF manyattacks% = 0 THEN manyattacks% = prevest%
  3683. ENDIF
  3684. prevest% = manyattacks%
  3685. firsttimequick$ = "n"
  3686. :
  3687. rate = 5.1 : increment = 4
  3688. increment2% = manyattacks%
  3689. ratedir$ = "" : attacksdir$ = ""
  3690. result$ = "noresult"
  3691. doesitloop$ = "" : maybeloop$ = ""
  3692. manyattacks1% = 0 : manyattacks2% = 0 : manyattacks3% = 0 : manyattacks4% = 0 : manyattacks5% = 0
  3693. rate1=0 : rate2=0 : rate3=0 : rate4=0 : rate5=0
  3694. testquickend1% = 0 : testslowend1% = 0
  3695. testquickend% = 0 : testslowend% = 0
  3696. numberoftries%=0
  3697. goes% = 0 : goes1% = 0
  3698. :
  3699. REPEAT
  3700. :
  3701. PROCfunction
  3702. testquickend1% = testquickend%
  3703. testslowend1% = testslowend%
  3704. testquickend% = functionattacks(1)
  3705. testslowend% = functionattacks(manyattacks%-1) - functionattacks(manyattacks%-2)
  3706. manyattacks5% = manyattacks4% : manyattacks4% = manyattacks3%
  3707. manyattacks3% = manyattacks2% : manyattacks2% = manyattacks1%
  3708. manyattacks1% = manyattacks%
  3709. rate5=rate4 : rate4=rate3 : rate3=rate2 : rate2=rate1 : rate1=rate
  3710. IF testquickend% =quickend% AND testslowend% = slowend% THEN
  3711. result$ = "success"
  3712. ENDIF
  3713. :
  3714. IF result$ = "noresult" THEN
  3715. :
  3716. IF testquickend% <= quickend% AND testslowend% >= slowend% THEN
  3717. IF ratedir$ = "up" THEN increment = increment/2.1
  3718. IF increment < 0.01 THEN increment = 0.01
  3719. ratedir$ = "down"
  3720. rate = rate-increment
  3721. IF rate < 1.01 THEN rate = 1.01
  3722. ENDIF
  3723. :
  3724. IF testquickend% >= quickend% AND testslowend% <= slowend% THEN
  3725. IF ratedir$ = "down" THEN increment = increment/2.1
  3726. IF increment < 0.01 THEN increment = 0.01
  3727. ratedir$ = "up"
  3728. rate = rate+increment
  3729. ENDIF
  3730. :
  3731. IF testquickend% < quickend% AND testslowend% < slowend% THEN
  3732. IF attacksdir$ = "up" THEN increment2% = increment2%/2
  3733. IF increment2% < 1 THEN increment2% = 1
  3734. attacksdir$ = "down"
  3735. manyattacks% = manyattacks% - increment2%
  3736. IF manyattacks% < 4 THEN manyattacks% = 4
  3737. ENDIF
  3738. :
  3739. IF testquickend% > quickend% AND testslowend% > slowend% THEN
  3740. IF attacksdir$ = "down" THEN increment2% = increment2%/2
  3741. IF increment2% < 1 THEN increment2% = 1
  3742. attacksdir$ = "up"
  3743. manyattacks% = manyattacks% + increment2%
  3744. IF manyattacks% < 4 THEN manyattacks% = 4
  3745. ENDIF
  3746. :
  3747. ENDIF
  3748. :
  3749. 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
  3750. doesitloop$ = "yes"
  3751. ENDIF
  3752. :
  3753. 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"
  3754. 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
  3755. IF maybeloop$="yes" AND manyattacks%=manyattacks1% AND manyattacks% = manyattacks2% AND manyattacks% = manyattacks3% AND manyattacks%=manyattacks4% AND manyattacks%=manyattacks5% THEN doesitloop$ = "yes"
  3756. :
  3757. IF doesitloop$ = "yes" THEN
  3758. CLS
  3759. IF quickend% >= testquickend1% THEN
  3760. margin1 = (quickend%-testquickend1%)/quickend%*100
  3761. ELSE
  3762. margin1 = (testquickend1%-quickend%)/quickend%*100
  3763. ENDIF
  3764. IF slowend% >= testslowend1% THEN
  3765. margin2 = (slowend%-testslowend1%)/slowend%*100
  3766. ELSE
  3767. margin2 = (testslowend1%-slowend%)/slowend%*100
  3768. ENDIF
  3769. IF quickend% >= testquickend% THEN
  3770. margin3 = (quickend%-testquickend%)/quickend%*100
  3771. ELSE
  3772. margin3 = (testquickend%-quickend%)/quickend%*100
  3773. ENDIF
  3774. IF slowend%>=testslowend% THEN
  3775. margin4 = (slowend%-testslowend%)/slowend%*100
  3776. ELSE
  3777. margin4 = (testslowend%-slowend%)/slowend%*100
  3778. ENDIF
  3779. IF ((margin1*10)DIV1)MOD10>4 THEN margin1% = margin1 ELSE margin1% = margin1
  3780. IF ((margin2*10)DIV1)MOD10>4 THEN margin2% = margin2 ELSE margin2% = margin2
  3781. IF ((margin3*10)DIV1)MOD10>4 THEN margin3% = margin3 ELSE margin3% = margin3
  3782. IF ((margin4*10)DIV1)MOD10>4 THEN margin4% = margin4 ELSE margin4% = margin4
  3783. VDU 7
  3784. IF easiermenus$ = "n" THEN PROCwindow(10,69,90,48) ELSE PROCwindow(10,69,90,42)
  3785. PRINT''" the search is looping between the two closest possible solutions, "
  3786. PRINT " given the present bias (see below)"
  3787. PRINT ' " do you want to opt for one of these, or carry on searching with"
  3788. PRINT " a different bias (press A/B)"
  3789. PRINT'" quickend ";testquickend1%;" (";margin1%;"% off ";quickend%;")"
  3790. PRINT " slowend ";testslowend1%;" (";margin2%;"% off ";slowend%;")"
  3791. PRINT " number of attacks ";manyattacks2%
  3792. PRINT " rate ";rate2
  3793. PRINT " bias ";bias
  3794. PRINT'" quickend ";testquickend%;" (";margin3%;"% off ";quickend%;")"
  3795. PRINT " slowend ";testslowend%;" (";margin4%;"% off ";slowend%;")"
  3796. PRINT " number of attacks ";manyattacks1%
  3797. PRINT " rate ";rate1
  3798. PRINT " bias ";bias
  3799. CASE GET$ OF
  3800. WHEN "A","a" : numberoftries% = 3
  3801. OTHERWISE
  3802. ENDCASE
  3803. numberoftries% +=1 : IF numberoftries% = 1 THEN bias=bias/2
  3804. IF numberoftries% = 2 THEN bias =bias*4
  3805. IF numberoftries% = 3 THEN
  3806. PRINT'" three different biases now tried -"
  3807. PRINT " to opt for one of the last three tries press A/B/C"
  3808. PRINT " or to try again with fresh values press D"
  3809. CASE GET$ OF
  3810. WHEN "A","a" : bias = bias/2
  3811. WHEN "B","b" : bias = bias/4
  3812. WHEN "C","c" : result$ = "loop"
  3813. WHEN "D","d" : PROCfunctionprelude
  3814. ENDCASE
  3815. ENDIF
  3816. IF numberoftries% = 4 THEN result$ = "loop"
  3817. IF result$ <> "loop" THEN
  3818. manyattacks1% = 0 : manyattacks2% = 0 : manyattacks3% = 0 : manyattacks4% = 0 : manyattacks5% = 0
  3819. rate1=0 : rate2=0 : rate3=0 : rate4=0 : rate5=0
  3820. doesitloop$ = "" : maybeloop$ = ""
  3821. ENDIF
  3822. ENDIF
  3823. ENDIF
  3824. :
  3825. UNTIL result$ <> "noresult"
  3826. :
  3827. CASE result$ OF
  3828. WHEN "success" :
  3829. PROCfunction
  3830. IF easiermenus$ = "n" THEN PROCwindow(10,69,90,44) ELSE PROCwindow(10,69,90,42)
  3831. PRINT''" quickend ";testquickend%
  3832. PRINT' " slowend ";testslowend%
  3833. PRINT " "
  3834. PRINT'" rate ";rate
  3835. PRINT'" bias ";bias
  3836. PRINT'" number of attacks ";manyattacks%
  3837. :
  3838. IF seegraph$ = "y" THEN
  3839. PRINT'" Do you want to see the graph? "
  3840. CASE GET$ OF
  3841. WHEN "Y","y" : PROCgraph
  3842. OTHERWISE PROCfunctionpostlude
  3843. ENDCASE
  3844. ELSE PROCfunctionpostlude
  3845. ENDIF
  3846. :
  3847. WHEN "loop" :
  3848. PRINT'" - to opt for the first solution above press A, for the"
  3849. PRINT " second press B, to try again with fresh values press F"
  3850. CASE GET$ OF
  3851. WHEN "A","a" : PROCfunction
  3852. :
  3853. IF seegraph$ = "y" THEN
  3854. PRINT'" Do you want to see the graph? "
  3855. CASE GET$ OF
  3856. WHEN "Y","y" : PROCgraph
  3857. OTHERWISE PROCfunctionpostlude
  3858. ENDCASE
  3859. ELSE PROCfunctionpostlude
  3860. ENDIF
  3861. :
  3862. WHEN "B","b" : manyattacks%=manyattacks1% : rate = rate1
  3863. PROCfunction
  3864. IF seegraph$ = "y" THEN
  3865. PRINT'" Do you want to see the graph? "
  3866. CASE GET$ OF
  3867. WHEN "Y","y" : PROCgraph
  3868. OTHERWISE PROCfunctionpostlude
  3869. ENDCASE
  3870. ELSE PROCfunctionpostlude
  3871. ENDIF
  3872. WHEN "F","f" : PROCfunctionprelude
  3873. ENDCASE
  3874. ENDCASE
  3875. :
  3876. ENDPROC
  3877. :
  3878. REM**********************************************************
  3879. :
  3880. DEF PROCgraph
  3881. :
  3882. numplots% = 10000
  3883. segment = numplots%/(manyattacks%-1)
  3884. horizline = numplots% - segment
  3885. count =1
  3886. REM convolutions below necc simply to get a 'square' graph
  3887. factor1 = numplots%/rate
  3888. factor2 = rate/(rate-1)
  3889. factor3 = rate/numplots%
  3890. factor4 = numplots%/((FNfunction(1)*factor1)-(FNfunction(rate)*factor1))
  3891. factor5 = FNfunction(rate)*factor1
  3892. factor6 = (factor4*factor5)-factor5
  3893. MODE 31 : CLG : CLS
  3894. PRINT TAB(50) " rate ";rate
  3895. PRINT TAB(50) " bias ";bias
  3896. PRINT TAB(50) " number of attacks ";manyattacks%
  3897. PRINT TAB(50) " quickend ";functionattacks(1)
  3898. PRINT TAB(50) " slowend ";functionattacks(manyattacks%-1)-functionattacks(manyattacks%-2)
  3899. PRINT TAB(50) " total duration ";totaldur%
  3900. MOVE 1000,0 : DRAW 0,0 : DRAW 0,1000
  3901. scaling = 900/numplots%
  3902. FOR x = 1 TO rate STEP factor3
  3903. xaxis = ((x*factor1)-factor1)*2
  3904. yaxis = ((FNfunction(x)*factor1)*factor4)-(factor5 + factor6)
  3905. xplot = xaxis*scaling : yplot = yaxis*scaling
  3906. DRAW xplot,yplot
  3907. REM the function uses x = 1 to rate, but the graph plots (xaxis & yaxis) run from 0 to 1000 in each axis
  3908. IF yaxis <= horizline THEN
  3909. LINE 0,yplot, xplot,yplot
  3910. LINE xplot,yplot, xplot,0
  3911. MOVE xplot,yplot
  3912. count += 1
  3913. horizline -= segment
  3914. ENDIF
  3915. NEXT
  3916. PROCfunctionpostlude
  3917. ENDPROC
  3918. :
  3919. REM***************************************
  3920. :
  3921. DEF PROCfunctionpostlude
  3922. :
  3923. IF rate <> 1 THEN
  3924. PRINT '" Accel or rit"
  3925. PRINT " (press A/R or 1/2)"
  3926. CASE GET$ OF
  3927. WHEN "A","a","1" :
  3928. FOR count% = 0 TO (manyattacks%-1)
  3929. attacks1%(count%) = totaldur% - (functionattacks((manyattacks%-1)-count%))
  3930. NEXT
  3931. direction$ = "accel"
  3932. :
  3933. OTHERWISE
  3934. FOR count = 0 TO (manyattacks%-1)
  3935. attacks1%(count) = functionattacks(count)
  3936. NEXT
  3937. direction$ = "rit"
  3938. ENDCASE
  3939. ELSE
  3940. FOR count% = 0 TO (manyattacks%-1)
  3941. attacks1%(count%) = functionattacks(count%)
  3942. NEXT
  3943. direction$ = "rit"
  3944. ENDIF
  3945. :
  3946. method$ = "raw"
  3947. IF funcinput$ = "points" OR funcinput$ = "displayed" THEN quiz$ = "no"
  3948. COLOUR 0 : COLOUR 191 : CLS : PROCinsertattacks
  3949. ENDPROC
  3950. :
  3951. REM***************************************
  3952. :
  3953. DEF FNfunction(x)
  3954. = (rate/x)-(x/bias)+(rate/bias)
  3955. :
  3956. REM***************************************
  3957. :
  3958. DEF PROCprerhythmicize
  3959. :
  3960. PROCwindow(20,71,90,38)
  3961. CLS : PRINT' " Do you want to re-define the criteria for irrational groups, "
  3962. PRINT ' " keep them or use CAC's defaults (Y/K/D) "
  3963. PRINT''" (criteria are: "
  3964. PRINT' " GROUP LENGTHS ";shortirrat%;" beats - "; longirrat%;" beats "
  3965. PRINT' " GROUP LOCATIONS any 1/";irratbeats%;" of a bar "
  3966. PRINT' " FALLBACK LOCATIONS any 1/";irratbeats1%;" of a bar "
  3967. PRINT' " SHORTEST DURATION ";mindur%;" beats "
  3968. PRINT' " COMPLEXITY ";given%
  3969. PRINT' " DEFAULT DIVISIONS 1/";defaultsieve;" of a bar) "
  3970. CASE GET$ OF
  3971. WHEN "Y","y" :
  3972. PRINT''" Give GROUP LENGTH of the SHORTEST irrational group desired... "
  3973. INPUT' " bars "bars%
  3974. INPUT'" beats "beats%
  3975. PROCalterbeats
  3976. shortirrat% = (bars%*960)+beats%
  3977. PRINT'" Give GROUP LENGTH of the LONGEST irrational group desired... "
  3978. INPUT'" bars "bars%
  3979. INPUT'" beats "beats%
  3980. PROCalterbeats
  3981. longirrat% = (bars%*960)+beats%
  3982. IF longirrat%/beatfactor% > 999 THEN
  3983. VDU 7 : PRINT'" !!Maximum length for irrational groups is 999 beats!! "
  3984. PRINT'" (to try again press C) "
  3985. CASE GET$ OF
  3986. WHEN"C","c" : CLS :PROCprerhythmicize
  3987. ENDCASE
  3988. ENDIF
  3989. :
  3990. CLS
  3991. PRINT''" (criteria are now: "
  3992. PRINT' " GROUP LENGTHS ";shortirrat%;" beats - "; longirrat%;" beats "
  3993. PRINT' " GROUP LOCATIONS any 1/";irratbeats%;" of a bar "
  3994. PRINT' " FALLBACK LOCATIONS any 1/";irratbeats1%;" of a bar "
  3995. PRINT' " SHORTEST DURATION ";mindur%;" beats "
  3996. PRINT' " COMPLEXITY ";given%
  3997. PRINT' " DEFAULT DIVISIONS 1/";defaultsieve;" of a bar) "
  3998. :
  3999. PRINT''" For GROUP LOCATION which beats of the bar is it acceptable to "
  4000. PRINT '" begin irrational groups of attacks on (1 = first beat of bar only, "
  4001. PRINT '" 2 = any 1/2 bar, 3 = any 1/3 bar etc) "
  4002. INPUT '" (use this to control allowability of certain group lengths) "irratbeats%
  4003. REM 1-16 make integers except 7,9,11,13 & 14
  4004. PRINT''" And for FALLBACK LOCATIONS which beats of the bar is it acceptable "
  4005. PRINT' " to begin 'fall back' groups, ie ones beginning or ending with "
  4006. INPUT '" rests, on (1, 2, 3 etc - also for controlling lengths allowable) "irratbeats1%
  4007. PROCwindow(20,71,90,35)
  4008. CLS
  4009. PRINT''" (criteria are now: "
  4010. PRINT' " GROUP LENGTHS ";shortirrat%;" beats - "; longirrat%;" beats "
  4011. PRINT' " GROUP LOCATIONS any 1/";irratbeats%;" of a bar "
  4012. PRINT' " FALLBACK LOCATIONS any 1/";irratbeats1%;" of a bar "
  4013. PRINT' " SHORTEST DURATION ";mindur%;" beats "
  4014. PRINT' " COMPLEXITY ";given%
  4015. PRINT' " DEFAULT DIVISIONS 1/";defaultsieve;" of a bar) "
  4016. :
  4017. PRINT''" What is the SHORTEST ALLOWABLE DURATION, in beats "
  4018. INPUT' " (any less than this will be 'edited up') "mindur%
  4019. PROCalterbeats
  4020. sieve = 960/mindur%
  4021. buffer% = 960/(sieve*2)
  4022. PRINT''" What is the maximum allowable irrational COMPLEXITY, "
  4023. PRINT '" eg, '5' allows upto 5 'in the time of' (this parameter "
  4024. INPUT '" controls the trade-off between user-friendliness and accuracy) "given%
  4025. :
  4026. CLS
  4027. PRINT''" (criteria are now: "
  4028. PRINT' " GROUP LENGTHS ";shortirrat%;" beats - "; longirrat%;" beats "
  4029. PRINT' " GROUP LOCATIONS any 1/";irratbeats%;" of a bar "
  4030. PRINT' " FALLBACK LOCATIONS any 1/";irratbeats1%;" of a bar "
  4031. PRINT' " SHORTEST DURATION ";mindur%;" beats "
  4032. PRINT' " COMPLEXITY ";given%
  4033. PRINT' " DEFAULT DIVISIONS 1/";defaultsieve;" of a bar) "
  4034. :
  4035. PRINT''" According to DEFAULT DIVISIONS, irrationals will avoid small "
  4036. PRINT '" divisions beyond a certain point, unless required by the rhythm. "
  4037. PRINT '" Confirm or re-set this default, which is currently at ";defaultsieve;" divisions "
  4038. INPUT '" of the bar (same trade-off as above) "defaultsieve
  4039. WHEN "D","d" :
  4040. PROCrhythmdefaults
  4041. OTHERWISE
  4042. ENDCASE
  4043. :
  4044. PROCquantize
  4045. :
  4046. attacks5%() = attacks2%()
  4047. attacks3%() = attacks3%()/(10^3) : REM list of actual bar nos
  4048. FOR count% = 0 TO (manyattacks%-1)
  4049. attacks4%(count%) = attacks2%(count%) MOD (10^3)
  4050. NEXT : REM list of actual beat nos (attacks2 containing bar/beat nos remains intact)
  4051. :
  4052. REM routine to fill array nodes%() with acceptable beats of bar to start irrat groups on
  4053. IF irratbeats% > 0 THEN
  4054. nextbeat% = 960/irratbeats%
  4055. FOR count% = 1 TO (irratbeats%-1)
  4056. nodes%(count%) = nodes%(count%-1) + nextbeat%
  4057. NEXT
  4058. ENDIF
  4059. :
  4060. REM routine to fill nodes1%() with acceptable beats to start fallback groups on
  4061. nextbeat% = 960/irratbeats1%
  4062. FOR count% = 1 TO (irratbeats1% - 1)
  4063. nodes1%(count%) = nodes1%(count%-1) + nextbeat%
  4064. NEXT
  4065. nodes1%(irratbeats1%) = 960
  4066. :
  4067. REM routine to test whether first attack is on an acceptable beat
  4068. firstattack$ = "offbeat"
  4069. count% = 0
  4070. REPEAT
  4071. IF attacks4%(0) = nodes%(count%) THEN firstattack$ = "onbeat"
  4072. count% += 1
  4073. UNTIL firstattack$ = "onbeat" OR count% > (irratbeats%-1)
  4074. :
  4075. IF firstattack$ = "onbeat" THEN
  4076. endbeat% = attacks2%(0)
  4077. endcell% = 0
  4078. status$ = "onbeat"
  4079. firstgroup$ = "y"
  4080. ELSE
  4081. word$ = ""
  4082. count% = irratbeats1%
  4083. REPEAT
  4084. IF nodes1%(count%) < attacks4%(0) THEN
  4085. endbeat% = (attacks3%(0)*(10^3)) + nodes1%(count%)
  4086. word$ = "found"
  4087. ENDIF
  4088. count% -= 1
  4089. UNTIL word$ = "found" OR count% < 0
  4090. endcell% = 0
  4091. status$ = ""
  4092. firstgroup$ = "y"
  4093. ENDIF
  4094. PROCrhythmicize
  4095. :
  4096. ENDPROC
  4097. :
  4098. REM***************************************************************
  4099. :
  4100. DEF PROCfunction
  4101. :
  4102. IF rate = 1 THEN
  4103. :
  4104. unit = totaldur%/(manyattacks%-1)
  4105. :
  4106. FOR count% = 1 TO (manyattacks%-2)
  4107. :
  4108. attackpoint = unit * count%
  4109. :
  4110. REM rounding-off to nearest integer
  4111. attackpoint = attackpoint * 10
  4112. attackpoint = attackpoint DIV 1
  4113. fraction = attackpoint MOD 10
  4114. IF fraction > 4 THEN
  4115. attackpoint = (attackpoint DIV 10) + 1
  4116. ELSE
  4117. attackpoint = attackpoint DIV 10
  4118. ENDIF
  4119. functionattacks(count%) = attackpoint
  4120. REM list of 'real' attack-values 0-totaldur% rounded to nearest integer
  4121. :
  4122. NEXT
  4123. :
  4124. functionattacks(manyattacks%-1) = totaldur%
  4125. :
  4126. ELSE
  4127. :
  4128. yrange = FNfunction(1) - 1
  4129. segment = yrange/(manyattacks%-1)
  4130. ypoint = FNfunction(1)
  4131. :
  4132. FOR count% = 1 TO (manyattacks%-2)
  4133. :
  4134. ypoint -= segment
  4135. xincrement = rate - 1
  4136. xtry = 1 + (xincrement/2)
  4137. :
  4138. tolerance = yrange/100000 : REM this ought to give highly accurate results
  4139. :
  4140. IF result$ = "success" OR result$ = "loop" OR count% = 1 OR count% = (manyattacks%-2) THEN
  4141. :
  4142. WHILE FNfunction(xtry) > (ypoint+tolerance) OR FNfunction(xtry) < (ypoint-tolerance)
  4143. :
  4144. xincrement = xincrement/2
  4145. IF FNfunction(xtry) < ypoint THEN
  4146. xtry -= xincrement
  4147. ELSE
  4148. xtry += xincrement
  4149. ENDIF
  4150. :
  4151. ENDWHILE
  4152. :
  4153. ENDIF
  4154. :
  4155. functionattacks(count%) = xtry
  4156. :
  4157. NEXT
  4158. :
  4159. functionattacks(0) = 1
  4160. functionattacks(manyattacks%-1) = rate
  4161. :
  4162. REM scaling & rounding routine
  4163. functionattacks() -= 1
  4164. divider = rate-1
  4165. FOR count% = 0 TO (manyattacks%-1)
  4166. functionattacks(count%) = functionattacks(count%)/divider*totaldur%
  4167. NEXT
  4168. :
  4169. FOR count% = 1 TO (manyattacks%-1)
  4170. number = functionattacks(count%)
  4171. number = number*10
  4172. number = number DIV 1
  4173. fraction = number MOD 10
  4174. IF fraction > 4 THEN
  4175. number = (number DIV 10) + 1
  4176. ELSE
  4177. number = number DIV 10
  4178. ENDIF
  4179. functionattacks(count%) = number
  4180. REM list of 'real' attack-values 0-totaldur% rounded to nearest integer
  4181. NEXT
  4182. :
  4183. ENDIF
  4184. :
  4185. ENDPROC
  4186. :
  4187. REM**************************************************************
  4188. :
  4189. DEF PROCrhythmicize
  4190. :
  4191. cant% = 0 : REM for notategroup%() subscript - poss change later
  4192. notategroup%() = 0
  4193. :
  4194. REPEAT
  4195. :
  4196. status1$ = status$
  4197. status$ = ""
  4198. startbeat% = endbeat%
  4199. :
  4200. IF status1$ = "onbeat" OR firstgroup$ = "y" THEN
  4201. startcell% = endcell%
  4202. ELSE startcell% = endcell% + 1
  4203. ENDIF
  4204. firstgroup$ = "n"
  4205. :
  4206. cell% = startcell%
  4207. count% = 0
  4208. condition$ = "full"
  4209. :
  4210. PROCbuffers
  4211. :
  4212. WHILE status$ = "" AND attacks5%(cell%) <= rightbuffer% AND cell% < manyattacks%
  4213. :
  4214. IF attacks5%(cell%) >= leftbuffer% AND attacks5%(cell%) <= rightbuffer% THEN
  4215. :
  4216. IF attacks4%(cell%) >= (960-buffer%) THEN attacks4%(cell%) = (960-attacks4%(cell%))*-1 : REM catches attacks just before barline
  4217. :
  4218. REPEAT
  4219. :
  4220. IF attacks4%(cell%) >= (nodes%(count%)-(buffer%)) AND attacks4%(cell%) <= (nodes%(count%)+(buffer%)) THEN
  4221. :
  4222. IF attacks4%(cell%) < 0 THEN
  4223. br% = attacks3%(cell%)+1
  4224. attacks4%(cell%) = 960 - (attacks4%(cell%)*-1)
  4225. beforebar$ = "y"
  4226. ELSE
  4227. br% = attacks3%(cell%)
  4228. beforebar$ = "n"
  4229. ENDIF
  4230. :
  4231. IF attacks5%(cell%) >= ((br%*10^3)+nodes%(count%)) THEN
  4232. diff% = attacks4%(cell%) - nodes%(count%) + ((attacks3%(cell%)-br%)*960)
  4233. ELSE
  4234. diff% = nodes%(count%) - attacks4%(cell%) + ((br%-attacks3%(cell%))*960)
  4235. ENDIF
  4236. :
  4237. IF attacks5%(cell%+1) >= ((br%*10^3)+nodes%(count%)) THEN
  4238. diff1% = attacks4%(cell%+1)-nodes%(count%)+((attacks3%(cell%+1)-br%)*960)
  4239. ELSE
  4240. diff1% = nodes%(count%)-attacks4%(cell%+1)+((br%-attacks3%(cell%+1))*960)
  4241. ENDIF
  4242. :
  4243. IF diff% <= diff1% THEN
  4244. :
  4245. status$ = "onbeat"
  4246. IF beforebar$ = "y" THEN
  4247. attacks5%(cell%) = (attacks3%(cell%)*10^3) + 1000 + nodes%(count%)
  4248. ELSE
  4249. attacks5%(cell%) = (attacks3%(cell%)*10^3) + nodes%(count%)
  4250. ENDIF
  4251. endbeat% = attacks5%(cell%)
  4252. endcell% = cell%
  4253. difference% = endcell% - startcell%
  4254. IF status1$ = "onbeat" AND difference% = 1 THEN condition$ = "empty"
  4255. IF status1$ = "" AND difference% = 0 THEN condition$ = "empty"
  4256. :
  4257. ENDIF
  4258. :
  4259. ENDIF
  4260. :
  4261. count% += 1
  4262. :
  4263. UNTIL count% = irratbeats% OR status$ = "onbeat"
  4264. :
  4265. ENDIF
  4266. :
  4267. cell% += 1
  4268. count% = 0
  4269. :
  4270. ENDWHILE
  4271. :
  4272. :
  4273. IF status$ = "" THEN
  4274. word$ = ""
  4275. leftbuffer% = leftbuffer% + buffer%
  4276. :
  4277. REPEAT
  4278. :
  4279. IF nodes1%(count%) >= (leftbuffer%MOD10^3) THEN
  4280. :
  4281. IF nodes1%(count%) = 960 THEN
  4282. endbeat% = ((leftbuffer%DIV(10^3))*10^3)+(10^3)
  4283. ELSE
  4284. endbeat% = ((leftbuffer%DIV(10^3))*(10^3)) + nodes1%(count%)
  4285. ENDIF
  4286. :
  4287. IF status1$ = "" AND attacks5%(startcell%) > endbeat% THEN
  4288. condition$ = "empty"
  4289. ENDIF
  4290. IF status1$ = "onbeat" AND attacks5%(startcell%+1) > endbeat% THEN
  4291. condition$ = "empty"
  4292. ENDIF
  4293. :
  4294. IF condition$ = "full" THEN
  4295. :
  4296. searchcell% = startcell% - 1
  4297. REPEAT
  4298. searchcell% += 1
  4299. UNTIL attacks5%(searchcell%) > endbeat% OR searchcell% = manyattacks%
  4300. :
  4301. endcell% = searchcell% - 1
  4302. ENDIF
  4303. word$ = "done"
  4304. :
  4305. ENDIF
  4306. :
  4307. count% += 1
  4308. :
  4309. UNTIL word$ = "done"
  4310. :
  4311. :
  4312. ENDIF
  4313. :
  4314. PROCprechoosegroup
  4315. :
  4316. UNTIL endbeat% >= attacks5%(manyattacks%-1)
  4317. :
  4318. IF seeinfo$ = "y" THEN
  4319. CLS
  4320. durat% = 0
  4321. counter% = 0
  4322. thing$ = "on"
  4323. PROCwindow(10,60,90,5) : CLS
  4324. VDU 14
  4325. PRINT '" The group of rhythmicised attacks will be at "
  4326. PRINT" "
  4327. PRINT TAB(28) "ATTACKS AT";
  4328. PRINT TAB(46) "DURATIONS";
  4329. PRINT TAB(64) "RATIOS"
  4330. attacks5%(manyattacks%) = 10^9
  4331. FOR count% = 0 TO manyattacks%
  4332. IF counter% < cant% THEN
  4333. item% = ((notategroup%(counter%,1)DIV10^4)*10^3)+(notategroup%(counter%,0)MOD10^3)
  4334. IF item% = attacks5%(count%) THEN
  4335. PRINT TAB(15) item%;
  4336. counter% += 1
  4337. thing$ = "on"
  4338. ENDIF
  4339. ENDIF
  4340. IF counter% < cant% THEN
  4341. item% = ((notategroup%(counter%,1)DIV10^4)*10^3)+(notategroup%(counter%,0)MOD10^3)
  4342. IF item% < attacks5%(count%) THEN
  4343. PRINT TAB(15) item%
  4344. counter% += 1
  4345. thing$ = "on"
  4346. ENDIF
  4347. ENDIF
  4348. IF counter% < cant% THEN
  4349. IF thing$ = "on" THEN
  4350. IF (notategroup%(counter%,0)DIV1000)= attacks5%(count%) THEN
  4351. PRINT " "
  4352. PRINT " "
  4353. PRINT TAB(0) (notategroup%(counter%,1)MOD10000);
  4354. PRINT TAB(15) (notategroup%(counter%,0)DIV1000);
  4355. thing$ = "off"
  4356. ENDIF
  4357. :
  4358. IF (notategroup%(counter%,0)DIV1000)< attacks5%(count%) THEN
  4359. PRINT " "
  4360. PRINT " "
  4361. PRINT TAB(0) ((notategroup%(counter%,1))MOD10000);
  4362. PRINT TAB(15) (notategroup%(counter%,0)DIV1000)
  4363. thing$ = "off"
  4364. ENDIF
  4365. ENDIF
  4366. ENDIF
  4367. :
  4368. IF thing$ = "on" THEN PRINT'" "
  4369. :
  4370. IF count% < manyattacks% THEN
  4371. PRINT TAB(25)attacks5%(count%);
  4372. IF count% < (manyattacks%-1) THEN
  4373. durat1% = durat%
  4374. durat% = (attacks5%(count%+1)MOD10^3)-(attacks5%(count%)MOD10^3)
  4375. addon% = ((attacks5%(count%+1)DIV(10^3))-(attacks5%(count%)DIV(10^3)))*960
  4376. durat% = durat% + addon%
  4377. PRINT TAB(42) durat%;
  4378. IF count%>0 THEN
  4379. IF direction$ = "rit" THEN ratio = durat%/durat1% ELSE ratio = durat1%/durat%
  4380. CASE ratio OF
  4381. WHEN 0.5 : PRINT TAB(65) "0.5"
  4382. WHEN 1.0 : PRINT TAB(65) "1.0"
  4383. WHEN 1.5 : PRINT TAB(65) "1.5"
  4384. WHEN 2.0 : PRINT TAB(65) "2.0"
  4385. WHEN 2.5 : PRINT TAB(65) "2.5"
  4386. OTHERWISE PRINT TAB(65) ratio
  4387. ENDCASE
  4388. ENDIF
  4389. ENDIF
  4390. ENDIF
  4391. NEXT
  4392. :
  4393. VDU 15
  4394. ENDIF
  4395. :
  4396. CLS
  4397. :
  4398. ENDPROC
  4399. :
  4400. REM*******************************************
  4401. :
  4402. DEF PROCbuffers
  4403. :
  4404. beatnum% = (startbeat%MOD(10^3)) + shortirrat% - buffer%
  4405. carrybars% = beatnum% DIV 960
  4406. beatnum% = beatnum% - (carrybars%*960)
  4407. leftbuffer% = ((startbeat%DIV(10^3))*10^3) + (carrybars%*(10^3)) + beatnum%
  4408. :
  4409. beatnum% = (startbeat%MOD(10^3)) + longirrat% + buffer%
  4410. carrybars% = beatnum% DIV 960
  4411. beatnum% = beatnum% - (carrybars%*960)
  4412. rightbuffer% = ((startbeat%DIV(10^3))*10^3) + (carrybars%*(10^3)) + beatnum%
  4413. :
  4414. REM tolerance of 'buffer%' incorporated into buffers
  4415. :
  4416. ENDPROC
  4417. :
  4418. REM********************************************8
  4419. :
  4420. DEF PROCprechoosegroup
  4421. :
  4422. :
  4423. IF condition$ = "full" THEN
  4424. :
  4425. REM routine to find grouplength%
  4426. carrybars% = (endbeat% DIV (10^3)) - (startbeat% DIV (10^3))
  4427. grouplength% = (endbeat% MOD (10^3)) - (startbeat% MOD (10^3)) + (carrybars% * 960)
  4428. :
  4429. REM routine to find first and last durats
  4430. IF status1$ = "onbeat" THEN
  4431. :
  4432. carrybars% = attacks3%(startcell%+1)-attacks3%(startcell%)
  4433. firstdur% = attacks4%(startcell%+1)-attacks4%(startcell%)+(carrybars%*960)
  4434. ELSE
  4435. carrybars% = attacks3%(startcell%)-(startbeat%DIV(10^3))
  4436. firstdur% = attacks4%(startcell%)-(startbeat%MOD(10^3))+(carrybars%*960)
  4437. ENDIF
  4438. :
  4439. IF status$ = "onbeat" THEN
  4440. :
  4441. carrybars% = attacks3%(endcell%)-attacks3%(endcell%-1)
  4442. lastdur% = attacks4%(endcell%)-attacks4%(endcell%-1)+(carrybars%*960)
  4443. ELSE
  4444. carrybars% = (endbeat%DIV(10^3))-attacks3%(endcell%)
  4445. lastdur% = (endbeat%MOD(10^3))-attacks4%(endcell%)+(carrybars%*960)
  4446. ENDIF
  4447. :
  4448. :
  4449. :
  4450. REM routine to determine each individual duration
  4451. IF status1$ = "onbeat" AND status$ = "onbeat" THEN
  4452. numdurs% = endcell% - startcell%
  4453. FOR count% = 2 TO (numdurs%-1)
  4454. dur%(count%) = attacks1%(startcell%+count%)-attacks1%(startcell%+(count%-1))
  4455. NEXT
  4456. dur%(1) = firstdur%
  4457. dur%(numdurs%) = lastdur%
  4458. ENDIF
  4459. :
  4460. IF status1$ = "onbeat" AND status$ = "" THEN
  4461. numdurs% = endcell% - startcell% + 1
  4462. FOR count% = 2 TO (numdurs%-1)
  4463. dur%(count%) = attacks1%(startcell%+count%)-attacks1%(startcell%+(count%-1))
  4464. NEXT
  4465. dur%(1) = firstdur%
  4466. dur%(numdurs%) = lastdur%
  4467. ENDIF
  4468. :
  4469. IF status1$ = "" AND status$ = "onbeat" THEN
  4470. numdurs% = endcell% - startcell% + 1
  4471. FOR count% = 2 TO (numdurs%-1)
  4472. dur%(count%) = attacks1%(startcell%+(count%-1))-attacks1%(startcell%+(count%-2))
  4473. NEXT
  4474. dur%(1) = firstdur%
  4475. dur%(numdurs%) = lastdur%
  4476. ENDIF
  4477. :
  4478. IF status1$ = "" AND status$ = "" THEN
  4479. numdurs% = endcell% - startcell% + 2
  4480. FOR count% = 2 TO (numdurs%-1)
  4481. dur%(count%) = attacks1%(startcell%+(count%-1))-attacks1%(startcell%+(count%-2))
  4482. NEXT
  4483. dur%(1) = firstdur%
  4484. dur%(numdurs%) = lastdur%
  4485. ENDIF
  4486. :
  4487. REM routine to find enddur (ie smallest duration)
  4488. enddur = 10^9
  4489. FOR count% = 1 TO numdurs%
  4490. IF dur%(count%) < enddur THEN
  4491. enddur = dur%(count%) : enddurnum% = count%
  4492. ENDIF
  4493. NEXT
  4494. :
  4495. REM routine to find numsubdivs of enddur poss, using a default min division, forcing that
  4496. REM down with durats less than it, but not beyond the minimum div given by sieve
  4497. defaultmindur% = 960/defaultsieve
  4498. IF enddur < defaultmindur% THEN
  4499. x = 960/enddur : defaultmindur% = 960/x
  4500. ELSE x = defaultsieve
  4501. ENDIF
  4502. IF x > sieve THEN
  4503. x = sieve : defaultmindur% = mindur%
  4504. ENDIF
  4505. numsubdivs = x * enddur / 960 * 1.04 : REM 1.04 catches numbers just below whole nos eg 1.96
  4506. IF numsubdivs < 1 THEN numsubdivs% = 1 ELSE numsubdivs% = numsubdivs
  4507. :
  4508. REM repeat/until loop to keep increasing and decreasing enddur until a 'reasonable' proportiontotal% is found
  4509. switch$ = "A" : nudge% = -5
  4510. REPEAT
  4511. nudge% += 5
  4512. IF switch$ = "A" THEN enddur += (nudge%/100) ELSE enddur -= (nudge%/100)
  4513. IF enddur < 1 THEN
  4514. VDU 7 : PRINT''" !!!THE COMPLEXITY LEVEL IS TOO LOW "
  4515. PRINT" FOR LONG GROUPS CONSISTING "
  4516. PRINT" OF ODD NUMBERS OF BEATS, "
  4517. PRINT" eg 13 QUAVERS, 31 SEMIS ETC. "
  4518. PRINT" INCREASE THIS LEVEL OR SHORTEN "
  4519. PRINT" GROUPS OR, BEST, REDUCE INPUTS 3/4!!! "
  4520. PRINT" (press C to continue) "
  4521. CASE GET$ OF
  4522. WHEN"C","c" : PROCdisplay
  4523. ENDCASE
  4524. ENDIF
  4525. :
  4526. IF switch$ = "A" THEN switch$ = "B" ELSE switch$ = "A"
  4527. numsubdivs1 = x*enddur/960*1.04
  4528. IF numsubdivs1 < 1 THEN numsubdivs% = 1 ELSE numsubdivs% = numsubdivs1
  4529. REM prev 2 lines allow 'stretched' enddurs to include more (or less) subdivs
  4530. REM without altering original subdivs, which tends to vitiate the whole process
  4531. :
  4532. REM routine to create list of attacks 0 - totalduration
  4533. FOR count% = 1 TO numdurs%
  4534. groupattacks%(count%) = groupattacks%(count%-1)+dur%(count%)
  4535. NEXT
  4536. REM groupattacks%(numdurs%) SHOULD = grouplength%
  4537. :
  4538. timeround% = 1
  4539. PROCchoosegroup
  4540. :
  4541. REM routine to place error-values in order
  4542. errororder%() = 10000000
  4543. FOR count% = 1 TO numsubdivs%
  4544. tick% = 0
  4545. REPEAT
  4546. do$ = "n"
  4547. tick%+=1 : inplace$ = "n"
  4548. IF error%(count%) < errororder%(tick%) THEN
  4549. FOR tock% = numsubdivs% TO tick% STEP -1
  4550. errororder%(tock%+1) = errororder%(tock%)
  4551. errororder1%(tock%+1) = errororder1%(tock%)
  4552. NEXT
  4553. errororder%(tick%) = error%(count%) : errororder1%(tick%) = count% : inplace$ = "y"
  4554. ENDIF
  4555. UNTIL inplace$ = "y"
  4556. NEXT
  4557. :
  4558. timeround% = 2 : tog% = 0
  4559. REPEAT
  4560. tog%+=1 : closest% = errororder1%(tog%)
  4561. PROCchoosegroup
  4562. PROCcheckproportiontotal
  4563. UNTIL proportiontotal$ = "OK" OR tog% = numsubdivs%
  4564. UNTIL proportiontotal$ = "OK"
  4565. REM routine to alter attacks5%() to closest group & to save notation in a parallel temp array
  4566. IF status1$ = "onbeat" THEN
  4567. FOR count% = 1 TO (numdurs%-1)
  4568. totalbeat% = (startbeat%MOD(10^3))+rhythmicattacks%(count%)
  4569. carrybars% = ((totalbeat%/960)DIV1)
  4570. beat% = totalbeat%-(carrybars%*960)
  4571. bar% = (carrybars%+(startbeat%DIV(10^3)))*(10^3)
  4572. attacks5%(startcell%+count%) = beat% + bar%
  4573. NEXT
  4574. ENDIF
  4575. :
  4576. IF status1$ = "" THEN
  4577. FOR count% = 1 TO (numdurs%-1)
  4578. totalbeat% = (startbeat%MOD(10^3))+rhythmicattacks%(count%)
  4579. carrybars% = ((totalbeat%/960)DIV1)
  4580. beat% = totalbeat% - (carrybars%*960)
  4581. bar% = (carrybars% + (startbeat%DIV(10^3))) * (10^3)
  4582. attacks5%(startcell%+(count%-1)) = beat% + bar%
  4583. NEXT
  4584. ENDIF
  4585. :
  4586. notategroup%(cant%,0) = (startbeat%*10^3)+(endbeat%MOD10^3)
  4587. notategroup%(cant%,1) = ((endbeat%DIV10^3)*10^4)+proportiontotal%
  4588. cant% += 1
  4589. :
  4590. ENDIF
  4591. :
  4592. ENDPROC
  4593. :
  4594. REM******************************************************
  4595. :
  4596. DEF PROCchoosegroup
  4597. :
  4598. IF timeround% = 1 THEN
  4599. start% = 1 : finish% = numsubdivs%
  4600. ELSE start% = closest% : finish% = closest%
  4601. ENDIF
  4602. :
  4603. error%() = 0
  4604. FOR count% = start% TO finish%
  4605. :
  4606. FOR count1% = 1 TO numdurs%
  4607. IF count1% = enddurnum% THEN thedur% = enddur ELSE thedur% = dur%(count1%)
  4608. IF numsubdivs < 1 THEN
  4609. proportion = thedur%/enddur*numsubdivs/1.04
  4610. ELSE proportion = thedur%/enddur*count%
  4611. ENDIF
  4612. IF (((proportion*10)DIV1)MOD10) < 5 THEN
  4613. proportion%(count1%) = (proportion) DIV 1
  4614. ELSE proportion%(count1%) = ((proportion) DIV 1) + 1
  4615. ENDIF
  4616. IF proportion%(count1%) < 1 THEN proportion%(count1%) = 1
  4617. NEXT
  4618. :
  4619. proportiontotal% = 0
  4620. :
  4621. FOR count2% = 1 TO numdurs%
  4622. proportiontotal% = proportiontotal%+proportion%(count2%)
  4623. NEXT
  4624. :
  4625. unit = grouplength%/proportiontotal%
  4626. :
  4627. rhythmicattack = 0
  4628. FOR count3% = 1 TO numdurs%
  4629. rhythmicattack = rhythmicattack + (proportion%(count3%)*unit)
  4630. IF (((rhythmicattack*10)DIV1)MOD10) < 5 THEN
  4631. rhythmicattacks%(count3%) = rhythmicattack DIV 1
  4632. ELSE
  4633. rhythmicattacks%(count3%) = ((rhythmicattack)DIV1)+1
  4634. ENDIF
  4635. NEXT : REM rhythmicattacks%(numdurs%) SHOULD = grouplength%
  4636. :
  4637. REM compare attackpoints with attackpoints
  4638. FOR count4% = 1 TO (numdurs%-1)
  4639. IF rhythmicattacks%(count4%) <= groupattacks%(count4%) THEN
  4640. error%(count%) = error%(count%) + (groupattacks%(count4%) - rhythmicattacks%(count4%))
  4641. ELSE
  4642. error%(count%) = error%(count%)+(rhythmicattacks%(count4%)-groupattacks%(count4%))
  4643. ENDIF
  4644. NEXT
  4645. :
  4646. NEXT
  4647. :
  4648. ENDPROC
  4649. :
  4650. REM***************************************************************
  4651. :
  4652. DEF PROCseriesattacks
  4653. :
  4654. IF easiermenus$ = "n" THEN PROCwindow(20,69,70,55) ELSE PROCwindow(20,69,70,42)
  4655. PRINT '" Raw beat numbers R "
  4656. PRINT '" Already rhythmicized A "
  4657. PRINT '" Multiplied by factors F "
  4658. PRINT '" Played P "
  4659. PRINT '" Single attack 1 "
  4660. :
  4661. CASE GET$ OF
  4662. REM CASE 1
  4663. WHEN "A","a" :
  4664. count% = 0 : cant% = 0 :
  4665. notategroup%() = 0 : finished$ = "n"
  4666. :
  4667. REPEAT
  4668. :
  4669. CLS
  4670. PRINT '" single attack S "
  4671. PRINT '" group of attacks (including all tuplets) G "
  4672. PRINT '" finished F "
  4673. CASE GET$ OF
  4674. REM CASE 2
  4675. WHEN "S","s","1","0" :
  4676. :
  4677. CLS
  4678. INPUT' " bar"bar%
  4679. INPUT' " beat"beats%
  4680. PROCalterbeats
  4681. attacks2%(count%) = (bar%*(10^3)) + beats%
  4682. count% += 1
  4683. :
  4684. WHEN "G","g" :
  4685. CLS
  4686. INPUT' " starting at bar "bars%
  4687. INPUT' " beat "beats%
  4688. PROCalterbeats
  4689. start% = (bars%*(10^3))+beats%
  4690. INPUT' " ending at bar "bars%
  4691. INPUT' " beat "beats%
  4692. PROCalterbeats
  4693. end% = (bars%*(10^3))+beats%
  4694. INPUT '" number of divisions "numdivs%
  4695. notategroup%(cant%,0) = (start%*10^3)+(end%MOD10^3)
  4696. notategroup%(cant%,1) = ((end%DIV10^3)*10^4)+numdivs%
  4697. cant% += 1
  4698. beat% = (start%)MOD(10^3) : bar% = (start%)DIV(10^3)
  4699. :
  4700. grouplength% = ((end%MOD(10^3))-(start%MOD(10^3)))+(((end%DIV(10^3))-(start%DIV(10^3)))*960)
  4701. unit = grouplength%/numdivs%
  4702. :
  4703. IF (grouplength%/beatfactor%) > 999 THEN
  4704. PRINT'''" !!!Maximum group length is 999 macro-beats!!! "
  4705. PRINT" (press C to try again) "
  4706. CASE GET$ OF
  4707. REM CASE 3
  4708. WHEN "C","c": CLS : PROCseriesattacks
  4709. OTHERWISE PROCdisplay
  4710. ENDCASE
  4711. REM ENDCASE 3
  4712. ENDIF
  4713. IF numdivs% > 9999 THEN
  4714. PRINT'''" !!!Maximum number of divisions is 9999!!! "
  4715. PRINT" (press C to try again) "
  4716. CASE GET$ OF
  4717. REM CASE 4
  4718. WHEN "C","c": CLS : PROCseriesattacks
  4719. OTHERWISE PROCdisplay
  4720. ENDCASE
  4721. REM ENDCASE 4
  4722. ENDIF
  4723. :
  4724. INPUT '" how many attacks "numattacks%
  4725. CLS
  4726. FOR counter% = 1 TO numattacks%
  4727. PRINT '" attack ";counter%;" is on "
  4728. INPUT " division number "div%
  4729. place = ((div%-1)*unit)
  4730. IF (((place*10)DIV1)MOD10) < 5 THEN
  4731. place% = (place)DIV1
  4732. ELSE place% = ((place)DIV1)+1
  4733. ENDIF
  4734. :
  4735. beatnum% = beat% + place%
  4736. carrybars% = (beatnum%/960)DIV1
  4737. beatnum% = beatnum% - (carrybars%*960)
  4738. barnum% = carrybars% + bar%
  4739. attacks2%(count%) = (barnum%*(10^3)) + beatnum%
  4740. count% += 1
  4741. NEXT
  4742. :
  4743. WHEN "F","f" : finished$ = "y"
  4744. ENDCASE
  4745. REM ENDCASE 2
  4746. :
  4747. UNTIL finished$ = "y"
  4748. :
  4749. method$ = "alreadyrhythmicized" : manyattacks% = count%
  4750. attacks5%() = attacks2%() : rhythmicized$ = "y"
  4751. :
  4752. WHEN "R","r","0" :
  4753. REM function will feed a sim string of beat values 0 - n into attacks1%()
  4754. :
  4755. attacks1%() = 0
  4756. CLS
  4757. INPUT' " How many attacks "manyattacks%
  4758. :
  4759. IF manyattacks% > 2 THEN
  4760. PRINT'" Are the intervals between them the same? "
  4761. CASE GET$ OF
  4762. WHEN "N","n","2" : sameintervals$ = "n"
  4763. OTHERWISE sameintervals$ = "y"
  4764. ENDCASE
  4765. ELSE sameintervals$ = "y"
  4766. ENDIF
  4767. :
  4768. IF manyattacks% > 1 THEN
  4769. :
  4770. CASE sameintervals$ OF
  4771. WHEN "n" :
  4772. FOR count% = 1 TO (manyattacks% - 1)
  4773. PRINT' " Give the interval between attacks ";count%;" and ";count%+1;"... "
  4774. INPUT'" bars "bars%
  4775. INPUT'" beats "beats%
  4776. PROCalterbeats
  4777. onbeat% = (bars%*960)+beats%
  4778. attacks1%(count%) = attacks1%(count%-1) + onbeat%
  4779. NEXT
  4780. WHEN "y" :
  4781. PRINT'" The intervaly between them is "
  4782. INPUT'" bars "bars%
  4783. INPUT'" bears "beats%
  4784. PROCalterbeats
  4785. onbeat% = (bars%*960)+beats%
  4786. FOR count% = 1 TO (manyattacks%-1)
  4787. attacks1%(count%) = attacks1%(count%-1) + onbeat%
  4788. NEXT
  4789. :
  4790. ENDCASE
  4791. :
  4792. ENDIF
  4793. method$ = "raw" : attacks1%(0) = 0
  4794. WHEN "1" :
  4795. REM function will feed a sim string of beat values 0 - n into attacks1%()
  4796. :
  4797. manyattacks% = 1
  4798. :
  4799. method$ = "raw" : attacks1%(0) = 0
  4800. :
  4801. WHEN "F","f" :
  4802. REM function will feed a sim string of beat values 0 - n into attacks1%()
  4803. :
  4804. attacks1%() = 0
  4805. INPUT' " How many attacks "manyattacks%
  4806. :
  4807. FOR count% = 1 TO (manyattacks% - 1)
  4808. IF count% = 1 THEN
  4809. PRINT' " Give the interval between attacks ";count%;" and ";count%+1;"... "
  4810. INPUT'" bars "bars%
  4811. INPUT " beats "beats%
  4812. PROCalterbeats
  4813. onbeat% = (bars%*960)+beats%
  4814. attacks1%(count%) = attacks1%(count%-1) + onbeat%
  4815. ELSE
  4816. PRINT' " Multiply by ? to give the interval between attacks ";count%;" and ";count%+1;"... "
  4817. IF count% = 2 THEN onbeat% = attacks1%(count%-1)
  4818. CASE GET$ OF
  4819. WHEN "0": onbeat% = onbeat% * 1.03
  4820. WHEN "1": onbeat% = onbeat% * 1.04
  4821. WHEN "2": onbeat% = onbeat% * 1.06
  4822. WHEN "3": onbeat% = onbeat% * 1.09
  4823. WHEN "4": onbeat% = onbeat% * 1.13
  4824. WHEN "5": onbeat% = onbeat% * 1.19
  4825. WHEN "6": onbeat% = onbeat% * 1.29
  4826. WHEN "7": onbeat% = onbeat% * 1.41
  4827. WHEN "8": onbeat% = onbeat% * 1.61
  4828. WHEN "9": onbeat% = onbeat% * 1.91
  4829. ENDCASE
  4830. attacks1%(count%) = attacks1%(count%-1) + onbeat%
  4831. ENDIF
  4832. NEXT
  4833. method$ = "raw" : attacks1%(0) = 0
  4834. :
  4835. WHEN "P","p" :
  4836. CLS
  4837. PRINT " Play the rhythm using any"
  4838. PRINT " keys or the spacebar"
  4839. PRINT'" When finished, press ~"
  4840. :
  4841. key$ = GET$ : TIME = 0 : VDU 7 : manyattacks% = 1
  4842. :
  4843. REPEAT
  4844. manyattacks% += 1 : key$ = GET$
  4845. attacks2%(manyattacks%-1) = TIME : VDU 7
  4846. UNTIL key$ = "~" OR key$ = "`"
  4847. :
  4848. manyattacks% -= 1
  4849. :
  4850. FOR count% = 1 TO manyattacks% - 1
  4851. attacks1%(count%) = attacks2%(count%)*960*MM%/6000
  4852. NEXT
  4853. :
  4854. method$ = "raw"
  4855. :
  4856. ENDCASE
  4857. REM ENDCASE 1
  4858. :
  4859. PROCinsertattacks
  4860. :
  4861. ENDPROC
  4862. :
  4863. REM***************************************************************
  4864. :
  4865. DEF PROCalterbeats
  4866. :
  4867. IF beats% < alterbeatsat% THEN beats% = beats% * beatfactor% * 8
  4868. :
  4869. ENDPROC
  4870. :
  4871. REM****************************************************************
  4872. :
  4873. DEF PROCdisarrayfill
  4874. :
  4875. FOR count% = 0 TO (cant%-1)
  4876. :
  4877. bar% = notategroup%(count%,0)DIV(10^6)
  4878. carrybars% = (notategroup%(count%,1)DIV(10^4))-bar%
  4879. carrybeats% = (notategroup%(count%,0)MOD(10^3))-((notategroup%(count%,0)MOD(10^6))DIV(10^3))
  4880. grouplength% = (carrybars%*960)+carrybeats%
  4881. grouplength% = grouplength%/beatfactor%
  4882. :
  4883. beat% = ((notategroup%(count%,0)MOD(10^6))DIV(10^3))/beatfactor%
  4884. divs% = notategroup%(count%,1)MOD(10^4)
  4885. :
  4886. IF grouplength% > 99 OR divs% > 99 THEN bigirrat$ = "y" ELSE bigirrat$ = "n"
  4887. :
  4888. IF (disarray%(bar%,0,voice%) DIV(10^3)) MOD10^2 = 0 AND bigirrat$ = "n" THEN
  4889. hold% = disarray%(bar%,0,voice%)MOD10^3
  4890. add% = ((beat%*(10^4)) + (grouplength%*(10^2)) + divs%) * (10^3)
  4891. disarray%(bar%,0,voice%) = hold% + add%
  4892. ELSE
  4893. IF (disarray%(bar%,1,voice%)DIV(10^6))MOD10^2=0 AND bigirrat$ = "n" THEN
  4894. disarray%(bar%,0,voice%)=disarray%(bar%,0,voice%)+(beat%*10)+(grouplength%DIV10)
  4895. hold% = disarray%(bar%,1,voice%)MOD10^6
  4896. add% = (((grouplength%MOD10)*100)+divs%)*10^6
  4897. disarray%(bar%,1,voice%) = hold% + add%
  4898. ELSE
  4899. IF disarray%(bar%,1,voice%)MOD10^2=0 AND bigirrat$ = "n" THEN
  4900. disarray%(bar%,1,voice%)=disarray%(bar%,1,voice%)+(beat%*(10^4))+(grouplength%*(10^2))+divs%
  4901. ELSE
  4902. IF (disarray%(bar%,2,voice%)DIV(10^3))MOD10^2 = 0 AND bigirrat$ = "n" THEN
  4903. hold% = disarray%(bar%,2,voice%)MOD10^3
  4904. add% = ((beat%*(10^4)) + (grouplength%*(10^2)) + divs%) * (10^3)
  4905. disarray%(bar%,2,voice%)= hold% + add%
  4906. ELSE
  4907. IF disarray%(bar%,3,voice%)=0 THEN
  4908. disarray%(bar%,3,voice%)=(beat%*10^7)+(grouplength%*10^4)+divs%
  4909. ELSE
  4910. VDU 7
  4911. PRINT''''" THERE ARE ALREADY 5 RHYTHMIC GROUPS IN THIS BAR"
  4912. PRINT" (this is the maximum)"
  4913. PRINT''" TO CONTINUE PRESS C"
  4914. CASE GET$ OF
  4915. WHEN "C","c" : PROCawait
  4916. OTHERWISE
  4917. PROCawait
  4918. ENDCASE
  4919. ENDIF
  4920. ENDIF
  4921. ENDIF
  4922. ENDIF
  4923. ENDIF
  4924. :
  4925. NEXT
  4926. :
  4927. ENDPROC
  4928. :
  4929. REM**********************************************
  4930. :
  4931. DEF PROCdelete
  4932. :
  4933. PROCundoprepare
  4934. :
  4935. IF deleteone$ <> "none" THEN
  4936. PROCdeleteone
  4937. ELSE
  4938. IF easiermenus$ = "n" THEN PROCwindow(20,69,80,55) ELSE PROCwindow(20,69,72,42)
  4939. PRINT '" One or several notes LEAVING rhythmic notation - A"
  4940. PRINT '" One or several notes DELETING rhythmic notation - B"
  4941. PRINT '" One or several bars - C"
  4942. PRINT '" Whole voice - D"
  4943. PRINT '" Group of voices - G"
  4944. :
  4945. CASE GET$ OF
  4946. WHEN "A","a" :
  4947. :
  4948. CLS
  4949. IF screenvoices$ = "n" THEN
  4950. INPUT' " Which voice "voice%
  4951. IF voice% = 0 THEN PROCpressenter
  4952. ELSE
  4953. PRINT'" Which screen voice "
  4954. CASE GET$ OF
  4955. WHEN "1" : voice% = 1
  4956. WHEN "2" : voice% = 2
  4957. WHEN "3" : voice% = 3
  4958. OTHERWISE PROCpressenter
  4959. ENDCASE
  4960. ENDIF
  4961. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  4962. voice% -= 1
  4963. IF voice% >= 0 THEN samevoice% = voice%
  4964. IF voice% = -1 THEN voice% = samevoice%
  4965. :
  4966. INPUT '" how many notes "numnotes%
  4967. IF numnotes% = 0 THEN numnotes% = 1
  4968. IF quickcopy$ = "n" THEN
  4969. PRINT'" Starting at bar number "
  4970. INPUT " (press 0 for first bar displayed) "bar%
  4971. IF bar% = 0 THEN bar% = startbar%
  4972. INPUT " beat "beats% : PROCalterbeats
  4973. start% = (bar%*(10^3))+beats%
  4974. ELSE
  4975. INPUT ' " starting at note number "along%
  4976. IF along% = 0 THEN along% = 1
  4977. along%-=1
  4978. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  4979. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  4980. beats% = copystartbeat%
  4981. PROCalterbeats
  4982. start% = (copystartbar%*(10^3))+beats%
  4983. ENDIF
  4984. PROCsearch(start%)
  4985. PROCshuntleft(startcell%,numnotes%)
  4986. :
  4987. ENDIF
  4988. :
  4989. WHEN "B","b" :
  4990. :
  4991. CLS
  4992. IF screenvoices$ = "n" THEN
  4993. INPUT' " Which voice "voice%
  4994. IF voice% = 0 THEN PROCpressenter
  4995. ELSE
  4996. PRINT'" Which screen voice "
  4997. CASE GET$ OF
  4998. WHEN "1" : voice% = 1
  4999. WHEN "2" : voice% = 2
  5000. WHEN "3" : voice% = 3
  5001. OTHERWISE PROCpressenter
  5002. ENDCASE
  5003. ENDIF
  5004. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  5005. voice% -= 1
  5006. IF voice% >= 0 THEN samevoice% = voice%
  5007. IF voice% = -1 THEN voice% = samevoice%
  5008. :
  5009. INPUT '" how many notes "numnotes%
  5010. :
  5011. IF quickcopy$ = "n" THEN
  5012. PRINT'" Starting at bar number "
  5013. INPUT " (press 0 for first bar displayed "bar%
  5014. IF bar% = 0 THEN bar% = startbar%
  5015. INPUT " beat "beats% : PROCalterbeats
  5016. start% = (bar%*(10^3))+beats%
  5017. ELSE
  5018. INPUT ' " starting at note number "along%
  5019. IF along% = 0 THEN along% = 1
  5020. along%-=1
  5021. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  5022. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  5023. beats% = copystartbeat%
  5024. PROCalterbeats
  5025. start% = (copystartbar%*(10^3))+beats%
  5026. ENDIF
  5027. PROCsearch(start%)
  5028. FOR count% = startcell% TO (startcell%+(numnotes%-1))
  5029. FOR counter% = 0 TO 1
  5030. barno% = (array%(count%,0,voice%)DIV10^6)-counter%
  5031. beatnum% = ((array%(count%,0,voice%)DIV10^3)MOD10^3)
  5032. :
  5033. group1start% = (disarray%(barno%,0,voice%)DIV10^7)*beatfactor%
  5034. group1end% = group1start% + (((disarray%(barno%,0,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
  5035. IF beatnum%+(960*counter%) >= group1start% AND beatnum%+(960*counter%) <= group1end% THEN
  5036. disarray%(barno%,0,voice%) = disarray%(barno%,0,voice%)MOD10^3
  5037. ENDIF
  5038. :
  5039. group2start% = ((disarray%(barno%,0,voice%)DIV10)MOD10^2)*beatfactor%
  5040. group2end% = group2start%+((((disarray%(barno%,0,voice%)MOD10)*10)+(disarray%(barno%,1,voice%)DIV10^8))*beatfactor%)-1
  5041. IF beatnum%+(960*counter%) >= group2start% AND beatnum%+(960*counter%) <= group2end% THEN
  5042. disarray%(barno%,0,voice%) = (disarray%(barno%,0,voice%)DIV10^3)*10^3
  5043. disarray%(barno%,1,voice%) = disarray%(barno%,1,voice%)MOD10^6
  5044. ENDIF
  5045. :
  5046. group3start%=((disarray%(barno%,1,voice%)DIV10^4)MOD10^2)*beatfactor%
  5047. group3end% = group3start% + (((disarray%(barno%,1,voice%)MOD10^4)DIV10^2)*beatfactor%)-1
  5048. IF beatnum%+(960*counter%) >= group3start% AND beatnum%+(960*counter%) <= group3end% THEN
  5049. disarray%(barno%,1,voice%) = (disarray%(barno%,1,voice%)DIV10^6)*10^6
  5050. ENDIF
  5051. :
  5052. group4start% = (disarray%(barno%,2,voice%)DIV10^7)*beatfactor%
  5053. group4end% = group4start%+(((disarray%(barno%,2,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
  5054. IF beatnum%+(960*counter%) >= group4start% AND beatnum%+(960*counter%) <= group4end% THEN
  5055. disarray%(barno%,2,voice%) = disarray%(barno%,2,voice%)MOD10^3
  5056. ENDIF
  5057. :
  5058. group5start% = (disarray%(barno%,3,voice%)DIV10^7)*beatfactor%
  5059. group5end% = group5start%+(((disarray%(barno%,3,voice%)DIV10^4)MOD10^3)*beatfactor%)-1
  5060. IF beatnum%+(960*counter%) >= group5start% AND beatnum%+(960*counter%) <= group5end% THEN
  5061. disarray%(barno%,2,voice%) = (disarray%(barno%,2,voice%)DIV10^3)*10^3
  5062. disarray%(barno%,3,voice%) = 0
  5063. ENDIF
  5064. :
  5065. NEXT
  5066. :
  5067. NEXT
  5068. PROCshuntleft(startcell%,numnotes%)
  5069. :
  5070. WHEN "C","c" :
  5071. CLS
  5072. PRINT '" If rhythmic groups cross from the bar(s) in question "
  5073. PRINT " to other bars, use A or B to delete those groups, "
  5074. PRINT " in which case press X"
  5075. PRINT'" Otherwise, press C to continue with deleting"
  5076. PRINT" self-contained bar(s)"
  5077. CASE GET$ OF
  5078. WHEN "X","x" : PROCdelete
  5079. OTHERWISE
  5080. ENDCASE
  5081. CLS
  5082. INPUT '" how many bars (0 = 100) "NUMbars%
  5083. IF NUMbars% = 0 THEN NUMbars% = 100
  5084. PRINT '" starting at bar "
  5085. INPUT "(press 0 for first bar displayed) "STARTbar%
  5086. IF STARTbar% = 0 THEN STARTbar% = startbar%
  5087. :
  5088. IF screenvoices$ = "n" THEN
  5089. INPUT' " Which voice "voice%
  5090. IF voice% = 0 THEN PROCpressenter
  5091. ELSE
  5092. PRINT'" Which screen voice "
  5093. CASE GET$ OF
  5094. WHEN "1" : voice% = 1
  5095. WHEN "2" : voice% = 2
  5096. WHEN "3" : voice% = 3
  5097. OTHERWISE PROCpressenter
  5098. ENDCASE
  5099. ENDIF
  5100. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  5101. voice% -= 1
  5102. IF voice% >= 0 THEN samevoice% = voice%
  5103. IF voice% = -1 THEN voice% = samevoice%
  5104. :
  5105. startcell% = 0
  5106. :
  5107. FOR bar% = STARTbar% TO (STARTbar%+(NUMbars%-1))
  5108. :
  5109. IF numusedcells%(voice%)-startcell% > 0 THEN
  5110. :
  5111. start% = bar%*(10^3)
  5112. IF start% < (array%(0,0,voice%)DIV10^3) THEN
  5113. startcell% = 0
  5114. ELSE PROCsearch(start%)
  5115. ENDIF
  5116. :
  5117. numnotes% = 0
  5118. WHILE (array%((startcell%+numnotes%),0,voice%)DIV10^6) = bar%
  5119. numnotes% += 1
  5120. ENDWHILE
  5121. IF numnotes% > 0 THEN PROCshuntleft(startcell%,numnotes%)
  5122. :
  5123. FOR count% = 0 TO 3
  5124. disarray%(bar%,count%,voice%) = 0
  5125. NEXT
  5126. :
  5127. ENDIF
  5128. :
  5129. NEXT
  5130. :
  5131. WHEN "D","d" :
  5132. IF screenvoices$ = "n" THEN
  5133. INPUT' " Which voice "voice%
  5134. ELSE
  5135. PRINT'" Which screen voice "
  5136. CASE GET$ OF
  5137. WHEN "1" : voice% = 1
  5138. WHEN "2" : voice% = 2
  5139. WHEN "3" : voice% = 3
  5140. OTHERWISE PROCpressenter
  5141. ENDCASE
  5142. ENDIF
  5143. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  5144. voice% -= 1
  5145. IF voice% >= 0 THEN samevoice% = voice%
  5146. IF voice% = -1 THEN voice% = samevoice%
  5147. :
  5148. FOR count% = 0 TO (numusedcells%(voice%)-1)
  5149. array%(count%,0,voice%) = 0
  5150. array%(count%,1,voice%) = 0
  5151. array%(count%,2,voice%) = 0
  5152. NEXT
  5153. numusedcells%(voice%) = 0
  5154. :
  5155. FOR count% = 1 TO nobars%
  5156. FOR counter% = 0 TO 3
  5157. disarray%(count%,counter%,voice%) = 0
  5158. NEXT
  5159. NEXT
  5160. :
  5161. WHEN "G","g" :
  5162. INPUT'" Between which voice "voice1%
  5163. INPUT'" and which voice "voice2%
  5164. voice1% -= 1 : voice2% -= 1
  5165. FOR whichvoice% = voice1% TO voice2%
  5166. voice% = whichvoice%
  5167. FOR count% = 0 TO (numusedcells%(voice%)-1)
  5168. array%(count%,0,voice%) = 0
  5169. array%(count%,1,voice%) = 0
  5170. array%(count%,2,voice%) = 0
  5171. NEXT
  5172. numusedcells%(voice%) = 0
  5173. FOR count% = 1 TO nobars%
  5174. FOR counter% = 0 TO 3
  5175. disarray%(count%,counter%,voice%) = 0
  5176. NEXT
  5177. NEXT
  5178. NEXT
  5179. :
  5180. OTHERWISE VDU 7 : PROCdelete
  5181. :
  5182. ENDCASE
  5183. PROCdisplay
  5184. ENDPROC
  5185. :
  5186. REM************************************************
  5187. :
  5188. DEF PROCshuntleft(startcell%,numnotes%)
  5189. :
  5190. FOR count% = startcell% TO numusedcells%(voice%)-(numnotes%+1)
  5191. array%(count%,0,voice%) = array%(count%+numnotes%,0,voice%)
  5192. array%(count%,1,voice%) = array%(count%+numnotes%,1,voice%)
  5193. array%(count%,2,voice%) = array%(count%+numnotes%,2,voice%)
  5194. NEXT
  5195. FOR count% = (numusedcells%(voice%)-1) TO (numusedcells%(voice%)-numnotes%) STEP -1
  5196. array%(count%,0,voice%) = 0
  5197. array%(count%,1,voice%) = 0
  5198. array%(count%,2,voice%) = 0
  5199. NEXT
  5200. numusedcells%(voice%) = numusedcells%(voice%)-numnotes%
  5201. ENDPROC
  5202. :
  5203. REM********************************************************
  5204. :
  5205. DEF PROCpredisplay
  5206. :
  5207. CLS
  5208. methd$ = "second"
  5209. INPUT '" How many bars "numbars%
  5210. INPUT '" starting at bar "startbar%
  5211. INPUT '" How many voices "numvoices%
  5212. :
  5213. requestedend% = startbar% + numbars%
  5214. :
  5215. IF requestedend% > nobars% THEN startbar% -= (requestedend%-nobars%)
  5216. IF startbar% < 1 THEN
  5217. startbar% = 1 : numbars% = nobars%-1
  5218. ENDIF
  5219. IF numvoices% > numparts% THEN numvoices% = numparts%
  5220. holdnum% = numvoices%
  5221. :
  5222. IF numvoices% > 9 THEN
  5223. PRINT '" Are the voice numbers"
  5224. PRINT " successive?"
  5225. CASE GET$ OF
  5226. WHEN "Y","y" :
  5227. INPUT " starting at voice number "vce%
  5228. FOR count% = 1 TO numvoices%
  5229. displayvoices%(count%) = vce% + count% - 1
  5230. holddisplay%(count%) = vce% + count% - 1
  5231. NEXT
  5232. methd$ = "first"
  5233. OTHERWISE
  5234. ENDCASE
  5235. ENDIF
  5236. IF methd$ = "second" THEN
  5237. FOR count% = 1 TO numvoices%
  5238. PRINT '" voice ";count%;
  5239. INPUT " is voice "vce%
  5240. displayvoices%(count%) = vce%
  5241. holddisplay%(count%) = vce%
  5242. NEXT
  5243. ENDIF
  5244. startv% = 1 : holdstart% = 1
  5245. PROCdisplay
  5246. ENDPROC
  5247. :
  5248. REM********************************************
  5249. :
  5250. DEF PROCquickdisplay
  5251. :
  5252. FOR count% = 1 TO quicknum%
  5253. prequickdisplay%(count%) = quickdisplay%(count%)
  5254. NEXT
  5255. prequicknum% = quicknum%
  5256. :
  5257. IF quickdisplaywindow$ = "y" THEN
  5258. PROCwindow(20,63,48,55) : ON
  5259. ENDIF
  5260. :
  5261. IF numvoicesgiven$ = "n" THEN
  5262. REPEAT
  5263. INPUT'" How many voices "numvoices%
  5264. UNTIL numvoices% > 0 : REM stops a crash if 0 accidentally input
  5265. quicknum% = numvoices%
  5266. ENDIF
  5267. :
  5268. IF numvoices% > 1 THEN
  5269. PRINT'" Are the voices successive "
  5270. CASE GET$ OF
  5271. WHEN "N","n","2" : succ$ = "n"
  5272. OTHERWISE succ$ = "y"
  5273. ENDCASE
  5274. ELSE
  5275. succ$ = "n"
  5276. ENDIF
  5277. :
  5278. IF succ$ = "y" THEN
  5279. INPUT'" starting at voice "vce%
  5280. FOR count% = 1 TO numvoices%
  5281. displayvoices%(count%) = vce%+count%-1
  5282. quickdisplay%(count%) = vce%+count%-1
  5283. NEXT
  5284. :
  5285. ELSE
  5286. FOR count% = 1 TO numvoices%
  5287. IF numvoices% = 1 THEN
  5288. PRINT'" which voice "
  5289. ELSE
  5290. PRINT'" voice ";count%;" is voice "
  5291. ENDIF
  5292. REPEAT
  5293. INPUT vce%
  5294. UNTIL vce% > 0
  5295. displayvoices%(count%) = vce%
  5296. quickdisplay%(count%) = vce%
  5297. NEXT
  5298. ENDIF
  5299. :
  5300. quicknum% = numvoices%
  5301. startv% = 1
  5302. toggle$ = "quick" : numvoicesgiven$ = "n"
  5303. quickdisplaywindow$ = "y"
  5304. PROCdisplay
  5305. ENDPROC
  5306. :
  5307. REM********************************************
  5308. :
  5309. DEF PROCdisplay
  5310. :
  5311. *CONFIGURE ScreenSize 256K
  5312. MODE 31
  5313. VDU 5
  5314. ledgerkey% = 1 : height1% = 0 : wideness1% = 0 : along% = 0
  5315. :
  5316. VDU 23,17,7,6,7;7;0;
  5317. REM penultimate and pre-penultimate values determine text size
  5318. :
  5319. endv% = startv% + numvoices% - 1
  5320. IF longscore$ = "y" AND (endv%-startv%)>2 THEN endv% = startv%+2
  5321. :
  5322. IF printing$ = "n" THEN
  5323. GCOL 0 : GCOL 191 : CLG
  5324. ELSE
  5325. GCOL 0 : GCOL 191 : CLG
  5326. ENDIF
  5327. :
  5328. REM display of beatnumbers, notenumbers etc shuffle up to occupy empty space
  5329. beatsheight% = 0 : numbersheight% = 0 : intheight% = 0
  5330. IF amplitudes$ = "y" THEN
  5331. beatsheight% += 40 : numbersheight% += 40 : intheight% += 40
  5332. ENDIF
  5333. IF beatnumbers$ = "y" THEN
  5334. numbersheight% += 40 : intheight% += 40
  5335. ENDIF
  5336. IF notenumbers$ = "y" OR notenumbers$ = "from1" THEN intheight% += 40
  5337. :
  5338. IF longscore$ = "n" THEN width% = 1520 ELSE width% = 1480
  5339. IF printing$ = "y" THEN width% -= 0
  5340. factor = width%/((numbars%/2)*960)
  5341. IF longscore$ = "y" THEN factor = factor/2
  5342. :
  5343. REM stave lines, barlines & beats for shortscore
  5344. IF longscore$ = "n" THEN
  5345. IF staves$ = "y" THEN
  5346. FOR count% = 938 TO 874 STEP -16 : LINE 0,count%,2112,count% : NEXT
  5347. IF lowerstave$ = "y" THEN
  5348. FOR count% = 794 TO 730 STEP -16 : LINE 0,count%,2112,count% : NEXT
  5349. ENDIF
  5350. FOR count% = 414 TO 350 STEP -16 : LINE 0,count%,2112,count% : NEXT
  5351. IF lowerstave$ = "y" THEN
  5352. FOR count% = 270 TO 206 STEP -16 : LINE 0,count%,2112,count% : NEXT
  5353. ENDIF
  5354. ENDIF
  5355. :
  5356. REM barlines
  5357. IF barlines$ = "y" THEN
  5358. FOR system% = 0 TO 1
  5359. FOR barline% = 1 TO (numbars%/2)
  5360. horpos% = (960*barline%*factor)+40
  5361. IF notehead$ = "small" THEN horpos% += 16
  5362. IF notehead$ = "vsmall" THEN horpos% += 24
  5363. FOR thickness% = 2 TO 8 STEP 2
  5364. LINE horpos%+thickness%,874-(524*system%),horpos%+thickness%,794-(524*system%)
  5365. NEXT
  5366. REM bar nos
  5367. IF printing$ = "n" THEN GCOL 3
  5368. IF tempi%(startbar%) <> tempi%(startbar%-1) THEN
  5369. MOVE 40,1145 : PRINT "b.";startbar%;" MM.";tempi%(startbar%)
  5370. ELSE MOVE 40,1145 : PRINT "b.";startbar%;" (MM.";tempi%(startbar%);")"
  5371. ENDIF
  5372. IF remarks$(startbar%,0) <> "" OR remarks$(startbar%,1) <> "" THEN
  5373. MOVE 40,1120 : PRINT remarks$(startbar%,0) : MOVE 40,1095 : PRINT remarks$(startbar%,1)
  5374. ENDIF
  5375. IF printing$ = "n" THEN GCOL 0
  5376. barline1% = (system%*(numbars%/2))+barline%
  5377. MOVE horpos%-125,1145-(533*system%)
  5378. IF printing$ = "n" THEN GCOL 3
  5379. IF tempi%(startbar% + barline1%) <> tempi%(startbar% + barline1% - 1) THEN
  5380. PRINT startbar% + barline1%;" MM.";tempi%(startbar% + barline1%);
  5381. ELSE IF barline1% MOD barnosoften% = 0 THEN PRINT startbar% + barline1%
  5382. ENDIF
  5383. IF remarks$(startbar%+barline1%,0) <> "" OR remarks$(startbar%+barline1%,1) <> "" THEN
  5384. MOVE horpos%,1120-(533*system%) : PRINT remarks$(startbar%+barline1%,0)
  5385. MOVE horpos%,1095-(533*system%) : PRINT remarks$(startbar%+barline1%,1)
  5386. ENDIF
  5387. REM print duration at bottom right
  5388. IF seeduration$ = "y" THEN
  5389. IF startbar% + barline1% = startbar% + numbars% - 1 THEN
  5390. totaldur = 0
  5391. FOR count% = 1 TO startbar% + numbars% - 1
  5392. duration = 60/tempi%(count%)
  5393. totaldur = totaldur + duration
  5394. NEXT
  5395. totaldur% = totaldur
  5396. mins% = totaldur% DIV 60
  5397. secs% = totaldur% - (mins%*60)
  5398. MOVE 1200,50 : PRINT "duration ";mins%;" mins ";secs%;" secs"
  5399. ENDIF
  5400. ENDIF
  5401. IF printing$ = "n" THEN GCOL 0
  5402. NEXT
  5403. NEXT
  5404. REM bar no for system 2 first bar
  5405. MOVE -70,612
  5406. IF printing$ = "n" THEN GCOL 3
  5407. IF tempi%(startbar%+(numbars%/2)) <> tempi%(startbar%+(numbars%/2)-1) THEN
  5408. PRINT startbar%+(numbars%/2);" MM.";tempi%(startbar%+(numbars%/2))
  5409. ELSE IF (numbars%/2) MOD barnosoften% = 0 THEN PRINT startbar%+(numbars%/2)
  5410. ENDIF
  5411. IF remarks$(startbar%+(numbars%/2),0) <> "" OR remarks$(startbar%+(numbars%/2),1) <> "" THEN
  5412. MOVE 40,587 : PRINT remarks$(startbar%+(numbars%/2),0)
  5413. MOVE 40,562 : PRINT remarks$(startbar%+(numbars%/2),1)
  5414. ENDIF
  5415. IF printing$ = "n" THEN GCOL 0
  5416. ENDIF
  5417. :
  5418. REM beats
  5419. IF beats$ = "y" THEN
  5420. IF notehead$ = "big" THEN add% = 26
  5421. IF notehead$ = "small" THEN add% = 34
  5422. IF notehead$ = "vsmall" THEN add% = 38
  5423. :
  5424. FOR system% = 0 TO 1
  5425. FOR br% = 0 TO (numbars%/2)-1
  5426. horpos% = (960*br%*factor)+add%+40
  5427. FOR bt% = 0 TO (factor%-1) STEP beatstep%
  5428. CIRCLE horpos%+(bt%*960/factor%*factor),834-(524*system%),4
  5429. NEXT
  5430. NEXT
  5431. NEXT
  5432. ENDIF
  5433. :
  5434. ENDIF
  5435. :
  5436. REM staves, barlines, beats etc for longscore
  5437. IF longscore$ = "y" THEN
  5438. longinsts$() = ""
  5439. REM staves
  5440. lastcount% = numvoices%-1
  5441. IF lastcount% > 2 THEN lastcount% = 2
  5442. FOR count% = 0 TO lastcount%
  5443. longinsts$(count%,0) = insts$(displayvoices%(startv%+count%),0)
  5444. longinsts$(count%,1) = insts$(displayvoices%(startv%+count%),1)
  5445. longinsts$(count%,2) = insts$(displayvoices%(startv%+count%),2)
  5446. NEXT
  5447. stavecombination$ = longinsts$(0,2) + longinsts$(1,2) + longinsts$(2,2)
  5448. clefcombination$ = longinsts$(0,1)+longinsts$(1,1)+longinsts$(2,1)
  5449. CASE stavecombination$ OF
  5450. WHEN "111" :
  5451. IF staves$ = "y" THEN
  5452. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5453. FOR count% = 0 TO 64 STEP16 : LINE 0,604-count%,2112,604-count% : NEXT
  5454. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5455. ENDIF
  5456. PROCclef(3,938,604,270,0,0,0,clefcombination$)
  5457. PROClongvalue(938,604,270,clefcombination$)
  5458. WHEN "121" :
  5459. IF staves$ = "y" THEN
  5460. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5461. FOR count% = 0 TO 64 STEP16 : LINE 0,652-count%,2112,652-count% : NEXT
  5462. FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
  5463. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5464. ENDIF
  5465. PROCclef(4,938,652,556,270,0,0,clefcombination$)
  5466. PROClongvalue(938,652,270,clefcombination$)
  5467. WHEN "211" :
  5468. IF staves$ = "y" THEN
  5469. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5470. FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
  5471. FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
  5472. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5473. ENDIF
  5474. PROCclef(4,938,842,556,270,0,0,clefcombination$)
  5475. PROClongvalue(938,556,270,clefcombination$)
  5476. WHEN "112" :
  5477. IF staves$ = "y" THEN
  5478. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5479. FOR count% = 0 TO 64 STEP16 : LINE 0,652-count%,2112,652-count% : NEXT
  5480. FOR count% = 0 TO 64 STEP16 : LINE 0,366-count%,2112,366-count% : NEXT
  5481. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5482. ENDIF
  5483. PROCclef(4,938,652,366,270,0,0,clefcombination$)
  5484. PROClongvalue(938,652,366,clefcombination$)
  5485. WHEN "221" :
  5486. IF staves$ = "y" THEN
  5487. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5488. FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
  5489. FOR count% = 0 TO 64 STEP16 : LINE 0,604-count%,2112,604-count% : NEXT
  5490. FOR count% = 0 TO 64 STEP16 : LINE 0,508-count%,2112,508-count% : NEXT
  5491. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5492. ENDIF
  5493. PROCclef(5,938,842,604,508,270,0,clefcombination$)
  5494. PROClongvalue(938,604,270,clefcombination$)
  5495. WHEN "222" :
  5496. IF staves$ = "y" THEN
  5497. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5498. FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
  5499. FOR count% = 0 TO 64 STEP16 : LINE 0,652-count%,2112,652-count% : NEXT
  5500. FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
  5501. FOR count% = 0 TO 64 STEP16 : LINE 0,366-count%,2112,366-count% : NEXT
  5502. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5503. ENDIF
  5504. PROCclef(6,938,842,652,556,366,270,clefcombination$)
  5505. PROClongvalue(938,652,366,clefcombination$)
  5506. WHEN "122" :
  5507. IF staves$ = "y" THEN
  5508. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5509. FOR count% = 0 TO 64 STEP16 : LINE 0,700-count%,2112,700-count% : NEXT
  5510. FOR count% = 0 TO 64 STEP16 : LINE 0,604-count%,2112,604-count% : NEXT
  5511. FOR count% = 0 TO 64 STEP16 : LINE 0,366-count%,2112,366-count% : NEXT
  5512. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5513. ENDIF
  5514. PROCclef(5,938,700,604,366,270,0,clefcombination$)
  5515. PROClongvalue(938,700,366,clefcombination$)
  5516. WHEN "212" :
  5517. IF staves$ = "y" THEN
  5518. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5519. FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
  5520. FOR count% = 0 TO 64 STEP16 : LINE 0,604-count%,2112,604-count% : NEXT
  5521. FOR count% = 0 TO 64 STEP16 : LINE 0,366-count%,2112,366-count% : NEXT
  5522. FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
  5523. ENDIF
  5524. PROCclef(5,938,842,604,366,270,0,clefcombination$)
  5525. PROClongvalue(938,604,366,clefcombination$)
  5526. WHEN "1" :
  5527. IF staves$ = "y" THEN
  5528. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5529. ENDIF
  5530. PROCclef(1,938,0,0,0,0,0,clefcombination$)
  5531. PROClongvalue(938,0,0,clefcombination$)
  5532. WHEN "2" :
  5533. IF staves$ = "y" THEN
  5534. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5535. FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
  5536. ENDIF
  5537. PROCclef(2,938,842,0,0,0,0,clefcombination$)
  5538. PROClongvalue(938,0,0,clefcombination$)
  5539. WHEN "11" :
  5540. IF staves$ = "y" THEN
  5541. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5542. FOR count% = 0 TO 64 STEP16 : LINE 0,604-count%,2112,604-count% : NEXT
  5543. ENDIF
  5544. PROCclef(2,938,604,0,0,0,0,clefcombination$)
  5545. PROClongvalue(938,604,0,clefcombination$)
  5546. WHEN "12" :
  5547. IF staves$ = "y" THEN
  5548. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5549. FOR count% = 0 TO 64 STEP16 : LINE 0,652-count%,2112,652-count% : NEXT
  5550. FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
  5551. ENDIF
  5552. PROCclef(3,938,652,556,0,0,0,clefcombination$)
  5553. PROClongvalue(938,652,0,clefcombination$)
  5554. WHEN "21" :
  5555. IF staves$ = "y" THEN
  5556. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5557. FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
  5558. FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
  5559. ENDIF
  5560. PROCclef(3,938,842,556,0,0,0,clefcombination$)
  5561. PROClongvalue(938,556,0,clefcombination$)
  5562. WHEN "22" :
  5563. IF staves$ = "y" THEN
  5564. FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
  5565. FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
  5566. FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
  5567. FOR count% = 0 TO 64 STEP16 : LINE 0,460-count%,2112,460-count% : NEXT
  5568. ENDIF
  5569. PROCclef(4,938,842,556,460,0,0,clefcombination$)
  5570. PROClongvalue(938,556,0,clefcombination$)
  5571. ENDCASE
  5572. :
  5573. REM time signature
  5574. beatstothebar% = (960/beatfactor%)/8
  5575. CASE beams% OF
  5576. WHEN 1 : whichvalue% = 1
  5577. WHEN 2 : whichvalue% = 2
  5578. WHEN 3 : whichvalue% = 4
  5579. WHEN 4 : whichvalue% = 8
  5580. WHEN 5 : whichvalue% = 16
  5581. WHEN 6 : whichvalue% = 32
  5582. ENDCASE
  5583. MOVE 15,1050
  5584. PRINT "meter"
  5585. MOVE 15,1030
  5586. PRINT" ";beatstothebar%;"/";whichvalue%
  5587. :
  5588. REM beats
  5589. IF beats$ = "y" THEN
  5590. IF notehead$ = "big" THEN add% = 26
  5591. IF notehead$ = "small" THEN add% = 34
  5592. IF notehead$ = "vsmall" THEN add% = 38
  5593. :
  5594. FOR br% = 0 TO (numbars%-1)
  5595. horpos% = (960*br%*factor)+add%+80
  5596. FOR bt% = 0 TO (factor%-1) STEP beatstep%
  5597. CIRCLE horpos%+(bt%*960/factor%*factor),longbeatsupper%,4:CIRCLE horpos%+(bt%*960/factor%*factor),longbeatslower%,4
  5598. NEXT
  5599. NEXT
  5600. ENDIF
  5601. ENDIF
  5602. :
  5603. IF longscore$ = "n" THEN number% = 2 ELSE number% = 1
  5604. FOR system% = 1 TO number%
  5605. :
  5606. FOR count% = startv% TO endv%
  5607. :
  5608. voice% = (displayvoices%(count%))-1
  5609. addingnotes$ = "n"
  5610. current% = 0 : lowernumber% = 0
  5611. IF system% = 1 THEN firstbar% = startbar%
  5612. IF system% = 2 THEN firstbar% = startbar%+(numbars%/2)
  5613. PROCnewnotereception(voice%,firstbar%,0,0,0,0,0,0,0)
  5614. CASE option% OF
  5615. WHEN 1 : startcell% = 0
  5616. WHEN 2 : startcell% = numusedcells%(voice%)
  5617. WHEN 3 : startcell% = 0
  5618. WHEN 4 : start% = firstbar%*10^3 : PROCsearch(start%)
  5619. ENDCASE
  5620. holdstartcell%(voice%) = startcell%
  5621. :
  5622. IF array%(startcell%,0,voice%)DIV10^6 > 0 THEN
  5623. :
  5624. howmany% = 0
  5625. REPEAT
  5626. howmany% += 1
  5627. :
  5628. carrybars% = (array%(startcell%,0,voice%)DIV10^6) - firstbar%
  5629. beat% = ((array%(startcell%,0,voice%)DIV10^3)MOD10^3)+(carrybars%*960)
  5630. hposn% = (beat%*factor)+50 : REM gives horiz co-ordinate
  5631. :
  5632. IF howmany% = 1 THEN firsttrack% = hposn%
  5633. :
  5634. IF longscore$ = "y" THEN hposn% += 40
  5635. :
  5636. octave% = (array%(startcell%,0,voice%)MOD10)
  5637. IF longscore$ = "n" THEN
  5638. IF octave% < 4 AND system% = 1 THEN value% = 586
  5639. IF octave% >= 4 AND system% = 1 THEN value% = 858
  5640. IF octave% < 4 AND system% = 2 THEN value% = 62
  5641. IF octave% >= 4 AND system% = 2 THEN value% = 334
  5642. IF octave% > 3 THEN octave% = octave%-4
  5643. ENDIF
  5644. :
  5645. ENDCASE
  5646. IF longscore$ = "y" THEN value% = value%(count%-startv%)
  5647. :
  5648. vposn% = value%+(((array%(startcell%,0,voice%)MOD10^3)DIV10^2)*8)+(octave%*56) : REM gives vert co-ordinate
  5649. :
  5650. REM notehead
  5651. IF redpitches$ = "y" THEN PROCredpitches
  5652. IF notehead$ = "big" THEN
  5653. LINE hposn%+12,vposn%+8,hposn%+26,vposn%+8
  5654. LINE hposn%+4,vposn%+4,hposn%+30,vposn%+4
  5655. LINE hposn%,vposn%,hposn%+32,vposn%
  5656. LINE hposn%+2,vposn%-4,hposn%+28,vposn%-4
  5657. LINE hposn%+6,vposn%-8,hposn%+20,vposn%-8
  5658. ENDIF
  5659. IF notehead$ = "small" THEN
  5660. LINE hposn%+24,vposn%+8,hposn%+28,vposn%+8
  5661. LINE hposn%+20,vposn%+4,hposn%+30,vposn%+4
  5662. LINE hposn%+16,vposn%,hposn%+32,vposn%
  5663. LINE hposn%+18,vposn%-4,hposn%+28,vposn%-4
  5664. LINE hposn%+20,vposn%-8,hposn%+24,vposn%-8
  5665. ENDIF
  5666. IF notehead$ = "vsmall" THEN
  5667. LINE hposn%+28,vposn%+8,hposn%+28,vposn%+8
  5668. LINE hposn%+27,vposn%+6,hposn%+29,vposn%+6
  5669. LINE hposn%+26,vposn%+4,hposn%+30,vposn%+4
  5670. LINE hposn%+25,vposn%+2,hposn%+31,vposn%+2
  5671. LINE hposn%+24,vposn%,hposn%+32,vposn%
  5672. LINE hposn%+25,vposn%-2,hposn%+31,vposn%-2
  5673. LINE hposn%+26,vposn%-4,hposn%+30,vposn%-4
  5674. LINE hposn%+27,vposn%-6,hposn%+29,vposn%-6
  5675. LINE hposn%+28,vposn%-8,hposn%+28,vposn%-8
  5676. ENDIF
  5677. IF printing$ = "n" THEN GCOL 0
  5678. :
  5679. REM beatnumbers
  5680. IF beatnumbers$ = "y" OR (beatnumbers$ = "first" AND howmany% = 1) THEN
  5681. PROCnotenumbersep
  5682. IF longscore$ = "y" THEN
  5683. MOVE hposn%-100,actamppos%(voice%+1)-beatsheight%-lower%-lowernumber%
  5684. PROCbeatnumbers
  5685. ELSE MOVE hposn%-100,674+shortamppos%(voice%)-((system%-1)*524)-beatsheight%+40-lower%
  5686. PROCbeatnumbers
  5687. ENDIF
  5688. ENDIF
  5689. :
  5690. REM notenumbers
  5691. IF notenumbers$ = "y" THEN
  5692. PROCnotenumbersep
  5693. IF longscore$ = "y" THEN
  5694. MOVE hposn%-100,actamppos%(voice%+1)-numbersheight%-lowernumber%
  5695. PRINT startcell%+1
  5696. ELSE MOVE hposn%-100,(674+shortamppos%(voice%)-((system%-1)*524))-numbersheight%+40
  5697. PRINT startcell%+1
  5698. ENDIF
  5699. ENDIF
  5700. :
  5701. IF notenumbers$ = "last" THEN
  5702. IF (array%(startcell%+1,0,voice%) DIV10^6) >= (numbars%+firstbar%) OR array%(startcell%+1,0,voice%) = 0 THEN print$ = "y" ELSE print$ = "n"
  5703. IF print$ = "y" THEN
  5704. MOVE hposn%-100,actamppos%(voice%+1)-numbersheight%
  5705. PRINT startcell%+1
  5706. ENDIF
  5707. ENDIF
  5708. :
  5709. IF notenumbers$ = "from1" THEN
  5710. PROCnotenumberfreq
  5711. PROCnotenumbersep
  5712. IF printnumber$ = "y" THEN
  5713. IF longscore$ = "y" THEN
  5714. MOVE hposn%-100,actamppos%(voice%+1)-numbersheight%-lowernumber%
  5715. PRINT howmany%
  5716. ELSE MOVE hposn%-100,(674+shortamppos%(voice%)-((system%-1)*524))-numbersheight%+40
  5717. PRINT howmany%
  5718. ENDIF
  5719. ENDIF
  5720. ENDIF
  5721. :
  5722. REM intervals
  5723. IF displayintervals$ = "y" THEN
  5724. pitch% = array%(startcell%,0,voice%)MOD10^3
  5725. CASE typeintervals$ OF
  5726. WHEN "s" : PROCconvertpitch
  5727. WHEN "q" : PROCconvertquarter
  5728. WHEN "e" : PROCconverteighth
  5729. WHEN "c" : cent% = (array%(startcell%,2,voice%)MOD10^2)-50 : PROCconvertcent
  5730. OTHERWISE
  5731. ENDCASE
  5732. currentpitch% = note%
  5733. FOR cout% = 1 TO numintervals%
  5734. IF (startcell%-cout%) >= 0 THEN
  5735. pitch% = array%((startcell%-cout%),0,voice%)MOD10^3
  5736. CASE typeintervals$ OF
  5737. WHEN "s" : PROCconvertpitch
  5738. WHEN "q" : PROCconvertquarter
  5739. WHEN "e" : PROCconverteighth
  5740. WHEN "c" : cent% = (array%((startcell%-cout%),2,voice%)MOD10^2)-50 : PROCconvertcent
  5741. OTHERWISE
  5742. ENDCASE
  5743. comparepitch% = note%
  5744. IF currentpitch% >= comparepitch% THEN
  5745. interval% = currentpitch% - comparepitch%
  5746. ELSE interval% = comparepitch% - currentpitch%
  5747. ENDIF
  5748. REPEAT : IF interval% > compoundint% THEN interval% -= chunk% : UNTIL interval% <= compoundint%
  5749. IF longscore$ = "y" THEN
  5750. MOVE hposn%-125,actamppos%(voice%+1)-(intheight%+(40*(cout%-1)))
  5751. PRINT interval%
  5752. ELSE MOVE hposn%-125,(674+shortamppos%(voice%)-((system%-1)*524))-(intheight%+(40*(cout%-1))-40)
  5753. PRINT interval%
  5754. ENDIF
  5755. ENDIF
  5756. NEXT
  5757. ENDIF
  5758. :
  5759. REM note names
  5760. IF notenames$ = "y" THEN
  5761. whichnote% = (array%(startcell%,0,voice%)MOD10^3)DIV10^2
  5762. CASE whichnote% OF
  5763. WHEN 0 : name$ = "C"
  5764. WHEN 1 : name$ = "D"
  5765. WHEN 2 : name$ = "E"
  5766. WHEN 3 : name$ = "F"
  5767. WHEN 4 : name$ = "G"
  5768. WHEN 5 : name$ = "A"
  5769. WHEN 6 : name$ = "B"
  5770. OTHERWISE
  5771. ENDCASE
  5772. MOVE hposn%+10,actamppos%(voice%+1)-(numbersheight%+32)
  5773. PRINT name$;array%(startcell%,0,voice%)MOD10
  5774. ENDIF
  5775. :
  5776. REM durations/glissandos
  5777. IF durations$ = "y" THEN
  5778. dur% = (array%(startcell%,1,voice%)DIV10)MOD10^3
  5779. brrr% = array%(startcell%,0,voice%)DIV10^6 : PROCreconvertdur
  5780. IF notehead$ = "big" THEN pointplus% = 16
  5781. IF notehead$ = "small" THEN pointplus% = 24
  5782. IF notehead$ = "vsmall" THEN pointplus% = 28
  5783. point% = (dur%*factor)+hposn%+pointplus%
  5784. thirdphase$ = "n"
  5785. :
  5786. number% = array%(startcell%,2,voice%)DIV10^5
  5787. IF number% = 0 THEN numphases% = 1
  5788. IF number% > 0 AND number% < 100 THEN numphases% = 2
  5789. IF number% > 99 THEN numphases% = 3
  5790. :
  5791. CASE numphases% OF
  5792. :
  5793. WHEN 1 :
  5794. gl% = (array%(startcell%,1,voice%)DIV10^4)MOD10^2
  5795. IF gl% <> 50 THEN
  5796. PROCroundgliss
  5797. LINE hposn%+40,vposn%+4,point%,vposn%+4+gl%
  5798. hp% = ((point%-hposn%)/2)+hposn%
  5799. vp% = vposn%+44+(gl%/2)
  5800. MOVE hp%,vp% : PRINT "gl.";gl1%
  5801. ELSE
  5802. LINE hposn%+40,vposn%+4,point%,vposn%+4
  5803. ENDIF
  5804. :
  5805. WHEN 2 :
  5806. REM extra horizontal point in middle
  5807. ph1% = number% MOD 10^2
  5808. point1% = ((dur%*ph1%/100)*factor)+hposn%+pointplus%
  5809. :
  5810. REM first phase
  5811. gl% = (array%(startcell%,1,voice%)DIV10^4)MOD10^2
  5812. IF gl% <> 50 THEN
  5813. PROCroundgliss
  5814. LINE hposn%+40,vposn%+4,point1%,vposn%+4+gl%
  5815. hp% = ((point1%-hposn%)/2)+hposn%
  5816. vp% = vposn%+44+(gl%/2)
  5817. MOVE hp%,vp% : PRINT "gl.";gl1%
  5818. ELSE
  5819. gl% = 0
  5820. LINE hposn%+40,vposn%+4,point1%,vposn%+4
  5821. ENDIF
  5822. IF envelopedata$ <> "none" THEN
  5823. hp% = point1%-130
  5824. vp% = vposn%-10
  5825. MOVE hp%,vp%
  5826. CASE envelopedata$ OF
  5827. WHEN "percentage" :PRINT ph1%;"%"
  5828. WHEN "marker" : PRINT hp%
  5829. ENDCASE
  5830. ENDIF
  5831. :
  5832. REM second phase
  5833. vposn1% = vposn%+gl%
  5834. gl% = (array%(startcell%,1,voice%)DIV10^6)MOD10^2
  5835. IF gl% <> 50 THEN
  5836. PROCroundgliss
  5837. LINE point1%,vposn1%+4,point%,vposn1%+4+gl%
  5838. hp% = ((point%-point1%)/2)+point1%
  5839. vp% = vposn1%+44+(gl%/2)
  5840. MOVE hp%,vp% : PRINT "gl.";gl1%
  5841. ELSE
  5842. LINE point1%,vposn1%+4,point%,vposn1%+4
  5843. ENDIF
  5844. :
  5845. WHEN 3 :
  5846. REM two extra horizontal points in middle
  5847. ph1% = number% MOD 10^2
  5848. point1% = ((dur%*ph1%/100)*factor)+hposn%+pointplus%
  5849. ph2% = number% DIV 10^2
  5850. point2% = ((dur%*ph2%/100)*factor)+hposn%+pointplus%
  5851. :
  5852. REM first phase
  5853. gl% = (array%(startcell%,1,voice%)DIV10^4)MOD10^2
  5854. IF gl% <> 50 THEN
  5855. PROCroundgliss
  5856. LINE hposn%+40,vposn%+4,point1%,vposn%+4+gl%
  5857. hp% = ((point1%-hposn%)/2)+hposn%
  5858. vp% = vposn%+44+(gl%/2)
  5859. MOVE hp%,vp% : PRINT "gl.";gl1%
  5860. ELSE
  5861. gl% = 0
  5862. LINE hposn%+40,vposn%+4,point1%,vposn%+4
  5863. ENDIF
  5864. IF envelopedata$ <> "none" THEN
  5865. hp% = point1%-130
  5866. vp% = vposn%-10
  5867. MOVE hp%,vp%
  5868. CASE envelopedata$ OF
  5869. WHEN "percentage" :PRINT ph1%;"%"
  5870. WHEN "marker" : PRINT hp%
  5871. ENDCASE
  5872. ENDIF
  5873. :
  5874. REM second phase
  5875. vposn1% = vposn%+gl%
  5876. gl% = (array%(startcell%,1,voice%)DIV10^6)MOD10^2
  5877. IF gl% <> 50 THEN
  5878. PROCroundgliss
  5879. LINE point1%,vposn1%+4,point2%,vposn1%+4+gl%
  5880. hp% = ((point2%-point1%)/2)+point1%
  5881. vp% = vposn1%+44+(gl%/2)
  5882. MOVE hp%,vp% : PRINT "gl.";gl1%
  5883. ELSE
  5884. gl% = 0
  5885. LINE point1%,vposn1%+4,point2%,vposn1%+4
  5886. ENDIF
  5887. IF envelopedata$ <> "none" THEN
  5888. hp% = point2%-130
  5889. vp% = vposn%-10
  5890. MOVE hp%,vp%
  5891. CASE envelopedata$ OF
  5892. WHEN "percentage" :PRINT ph2%;"%"
  5893. WHEN "marker" : PRINT hp%
  5894. ENDCASE
  5895. ENDIF
  5896. :
  5897. REM third phase
  5898. vposn2% = vposn1%+gl%
  5899. gl% = array%(startcell%,1,voice%)DIV10^8
  5900. IF gl% <> 10 THEN
  5901. thirdphase$ = "y" : PROCroundgliss : thirdphase$ = "n"
  5902. LINE point2%,vposn2%+4,point%,vposn2%+4+gl%
  5903. hp% = ((point%-point2%)/2)+point2%
  5904. vp% = vposn2%+44+(gl%/2)
  5905. MOVE hp%,vp% : PRINT "gl.";gl1%
  5906. ELSE
  5907. LINE point2%,vposn2%+4,point%,vposn2%+4
  5908. ENDIF
  5909. :
  5910. ENDCASE
  5911. :
  5912. ENDIF
  5913. :
  5914. REM next block of code added just to print durations
  5915. IF seedurinbts$ = "y" OR seedurinbts$ = "stepped" THEN
  5916. IF seedurinbts$ = "stepped" THEN
  5917. IF lower% = 0 THEN lower% = 23 ELSE lower% = 0
  5918. ENDIF
  5919. IF longscore$ = "y" THEN
  5920. MOVE hposn%,actamppos%(voice%+1)-lower%
  5921. PRINT dur%
  5922. ELSE MOVE hposn%,714+shortamppos%(voice%)-((system%-1)*524)-lower%
  5923. PRINT dur%
  5924. ENDIF
  5925. ENDIF
  5926. IF seedurincrots$ = "y" OR seedurincrots$ = "stepped" THEN
  5927. REM dur = (((dur%/480)*100)DIV1)/100
  5928. dur = (((dur%/(beatfactor%*8))*100)DIV1)/100
  5929. IF seedurincrots$ = "stepped" THEN
  5930. IF lower% = 0 THEN lower% = 23 ELSE lower% = 0
  5931. ENDIF
  5932. IF longscore$ = "y" THEN
  5933. MOVE hposn%,actamppos%(voice%+1)-lower%
  5934. PRINT dur
  5935. ELSE MOVE hposn%,714+shortamppos%(voice%)-((system%-1)*524)-lower%
  5936. PRINT dur
  5937. ENDIF
  5938. ENDIF
  5939. :
  5940. REM amplitudes
  5941. :
  5942. IF amplitudes$ = "y" OR amplitudes$ = "stepped" THEN
  5943. amp$=""
  5944. amp1% = array%(startcell%,1,voice%)MOD10
  5945. amp2% = (array%(startcell%,2,voice%)DIV10^2)MOD10
  5946. amp3% = (array%(startcell%,2,voice%)DIV10^3)MOD10
  5947. amp4% = (array%(startcell%,2,voice%)DIV10^4)MOD10
  5948. FOR something% = 1 TO 4
  5949. IF something% = 1 THEN amp% = amp1%
  5950. IF something% = 2 THEN amp% = amp2%
  5951. IF something% = 3 THEN amp% = amp3%
  5952. IF something% = 4 THEN amp% = amp4%
  5953. CASE amp% OF
  5954. WHEN 0 :
  5955. IF amp1% = 0 AND amp2% = 9 THEN
  5956. amp$ = "" : x% = 22 : y% = 20 : REM releases
  5957. ELSE
  5958. amp$ = "0" : x% = 22 : y% = 20
  5959. ENDIF
  5960. WHEN 1 : amp$ = "ppp" : x% = 8 : y% = 50
  5961. WHEN 2 : amp$ = "pp" : x% = 15 : y% = 35
  5962. WHEN 3 : amp$ = "p" : x% = 22 : y% = 20
  5963. WHEN 4 : amp$ = "mp" : x% = 15 : y% = 35
  5964. WHEN 5 : amp$ = "mf" : x% = 15 : y% = 35
  5965. WHEN 6 : amp$ = "f" : x% = 22 : y% = 20
  5966. WHEN 7 : amp$ = "ff" : x% = 15 : y% = 35
  5967. WHEN 8 : amp$ = "fff" : x% = 8 : y% = 50
  5968. ENDCASE
  5969. IF something% = 1 THEN amp1$ = amp$ : x1% = x% : y1% = y%
  5970. IF something% = 2 THEN amp2$ = amp$ : x2% = x% : y2% = y%
  5971. IF something% = 3 THEN amp3$ = amp$ : x3% = x% : y3% = y%
  5972. IF something% = 4 THEN amp4$ = amp$ : x4% = x% : y4% = y%
  5973. NEXT
  5974. :
  5975. IF amplitudes$ = "stepped" THEN
  5976. IF lower% = 0 THEN lower% = 23 ELSE lower% = 0
  5977. ENDIF
  5978. :
  5979. IF longscore$ = "y" THEN
  5980. MOVE hposn%+x1%,actamppos%(voice%+1)-lower%
  5981. PRINT amp1$
  5982. :
  5983. IF amp2% = 9 AND amp3% <> 0 THEN
  5984. MOVE hposn%+20,(actamppos%(voice%+1)-lower%)-20
  5985. PRINT "+";amp3%
  5986. ENDIF
  5987. :
  5988. ELSE MOVE hposn%+x1%,714+shortamppos%(voice%)-((system%-1)*524)-lower%
  5989. PRINT amp1$
  5990. ENDIF
  5991. :
  5992. dur% = (array%(startcell%,1,voice%)DIV10)MOD10^3
  5993. brrr% = array%(startcell%,0,voice%)DIV10^6 : PROCreconvertdur
  5994. IF notehead$ = "big" THEN pointplus% = 16
  5995. IF notehead$ = "small" THEN pointplus% = 24
  5996. IF notehead$ = "vsmall" THEN pointplus% = 28
  5997. point% = (dur%*factor)+hposn%+pointplus%
  5998. :
  5999. number% = array%(startcell%,2,voice%)DIV10^5
  6000. IF amp2% = 9 THEN numphases% = 0
  6001. IF amp2% <> 9 AND number% = 0 THEN numphases% = 1
  6002. IF number% > 0 AND number% < 100 THEN numphases% = 2
  6003. IF number% > 99 THEN numphases% = 3
  6004. :
  6005. CASE numphases% OF
  6006. :
  6007. WHEN 1 :
  6008. IF amp2% < amp1% THEN
  6009. IF longscore$ = "y" THEN
  6010. LINE hposn%+x1%+y1%,actamppos%(voice%+1)+8,point%-90+(x2%*2),actamppos%(voice%+1)-8
  6011. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-24,point%-90+(x2%*2),actamppos%(voice%+1)-8
  6012. MOVE point%-80+(x2%*2),actamppos%(voice%+1) : PRINT amp2$
  6013. ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)+8,point%-90+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
  6014. LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-24,point%-90+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
  6015. MOVE point%-80+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
  6016. ENDIF
  6017. ENDIF
  6018. IF amp2% > amp1% THEN
  6019. IF longscore$ = "y" THEN
  6020. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point%-90+(x2%*2),actamppos%(voice%+1)+8
  6021. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point%-90+(x2%*2),actamppos%(voice%+1)-24
  6022. MOVE point%-80+(x2%*2),actamppos%(voice%+1) : PRINT amp2$
  6023. ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524)+8
  6024. LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524)-24
  6025. MOVE point%-80+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
  6026. ENDIF
  6027. ENDIF
  6028. :
  6029. WHEN 2 :
  6030. ph1% = number% MOD 10^2
  6031. point1% = ((dur%*ph1%/100)*factor)+hposn%+pointplus%
  6032. :
  6033. REM first phase
  6034. IF amp2% < amp1% THEN
  6035. IF longscore$ = "y" THEN
  6036. LINE hposn%+x1%+y1%,actamppos%(voice%+1)+8,point1%-35+x2%,actamppos%(voice%+1)-8
  6037. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-24,point1%-35+x2%,actamppos%(voice%+1)-8
  6038. MOVE point1%-25+x2%,actamppos%(voice%+1) : PRINT amp2$
  6039. ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)+8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-8
  6040. LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-24,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-8
  6041. MOVE point1%-25+x2%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
  6042. ENDIF
  6043. ENDIF
  6044. IF amp2% > amp1% THEN
  6045. IF longscore$ = "y" THEN
  6046. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point1%-35+x2%,actamppos%(voice%+1)+8
  6047. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point1%-35+x2%,actamppos%(voice%+1)-24
  6048. MOVE point1%-25+x2%,actamppos%(voice%+1) : PRINT amp2$
  6049. ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)+8
  6050. LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-24
  6051. MOVE point1%-25+x2%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
  6052. ENDIF
  6053. ENDIF
  6054. :
  6055. REM second phase
  6056. IF amp1% <> amp2% THEN start% = point1%-25+x2%+y2% ELSE start% = point1%
  6057. IF amp3% < amp2% THEN
  6058. IF longscore$ = "y" THEN
  6059. LINE start%,actamppos%(voice%+1)+8,point%-90+(x3%*2),actamppos%(voice%+1)-8
  6060. LINE start%,actamppos%(voice%+1)-24,point%-90+(x3%*2),actamppos%(voice%+1)-8
  6061. MOVE point%-80+(x3%*2),actamppos%(voice%+1) : PRINT amp3$
  6062. ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)+8,point%-90+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
  6063. LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-24,point%-90+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
  6064. MOVE point%-80+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp3$
  6065. ENDIF
  6066. ENDIF
  6067. IF amp3% > amp2% THEN
  6068. IF longscore$ = "y" THEN
  6069. LINE start%,actamppos%(voice%+1)-8,point%-90+(x3%*2),actamppos%(voice%+1)+8
  6070. LINE start%,actamppos%(voice%+1)-8,point%-90+(x3%*2),actamppos%(voice%+1)-24
  6071. MOVE point%-80+(x3%*2),actamppos%(voice%+1) : PRINT amp3$
  6072. ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524)+8
  6073. LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524)-24
  6074. MOVE point%-80+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp3$
  6075. ENDIF
  6076. ENDIF
  6077. :
  6078. WHEN 3 :
  6079. ph1% = number% MOD 10^2
  6080. point1% = ((dur%*ph1%/100)*factor)+hposn%+pointplus%
  6081. ph2% = number% DIV 10^2
  6082. point2% = ((dur%*ph2%/100)*factor)+hposn%+pointplus%
  6083. :
  6084. REM first phase
  6085. IF amp2% < amp1% THEN
  6086. IF longscore$ = "y" THEN
  6087. LINE hposn%+x1%+y1%,actamppos%(voice%+1)+8,point1%-35+x2%,actamppos%(voice%+1)-8
  6088. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-24,point1%-35+x2%,actamppos%(voice%+1)-8
  6089. MOVE point1%-25+x2%,actamppos%(voice%+1) : PRINT amp2$
  6090. ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)+8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-8
  6091. LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-24,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-8
  6092. MOVE point1%-25+x2%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
  6093. ENDIF
  6094. ENDIF
  6095. IF amp2% > amp1% THEN
  6096. IF longscore$ = "y" THEN
  6097. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point1%-35+x2%,actamppos%(voice%+1)+8
  6098. LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point1%-35+x2%,actamppos%(voice%+1)-24
  6099. MOVE point1%-25+x2%,actamppos%(voice%+1) : PRINT amp2$
  6100. ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)+8
  6101. LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-24
  6102. MOVE point1%-25+x2%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
  6103. ENDIF
  6104. ENDIF
  6105. :
  6106. REM second phase
  6107. IF amp1% <> amp2% THEN start% = point1%-25+x2%+y2% ELSE start% = point1%
  6108. IF amp3% < amp2% THEN
  6109. IF longscore$ = "y" THEN
  6110. LINE start%,actamppos%(voice%+1)+8,point2%-35+x3%,actamppos%(voice%+1)-8
  6111. LINE start%,actamppos%(voice%+1)-24,point2%-35+x3%,actamppos%(voice%+1)-8
  6112. MOVE point2%-25+x3%,actamppos%(voice%+1) : PRINT amp3$
  6113. ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)+8,point2%-35+x3%,714+shortamppos%(voice%)-((system%-1)*524)-8
  6114. LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-24,point2%-35+x3%,714+shortamppos%(voice%)-((system%-1)*524)-8
  6115. MOVE point2%-25+x3%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp3$
  6116. ENDIF
  6117. ENDIF
  6118. IF amp3% > amp2% THEN
  6119. IF longscore$ = "y" THEN
  6120. LINE start%,actamppos%(voice%+1)-8,point2%-35+x3%,actamppos%(voice%+1)+8
  6121. LINE start%,actamppos%(voice%+1)-8,point2%-35+x3%,actamppos%(voice%+1)-24
  6122. MOVE point2%-25+x3%,actamppos%(voice%+1) : PRINT amp3$
  6123. ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point2%-35+x3%,714+shortamppos%(voice%)-((system%-1)*524)+8
  6124. LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point2%-35+x3%,714+shortamppos%(voice%)-((system%-1)*524)-24
  6125. MOVE point2%-25+x3%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp3$
  6126. ENDIF
  6127. ENDIF
  6128. :
  6129. REM third phase
  6130. IF amp2% <> amp3% THEN start% = point2%-25+x3%+y3% ELSE start% = point2%
  6131. IF amp4% < amp3% THEN
  6132. IF longscore$ = "y" THEN
  6133. LINE start%,actamppos%(voice%+1)+8,point%-90+(x4%*2),actamppos%(voice%+1)-8
  6134. LINE start%,actamppos%(voice%+1)-24,point%-90+(x4%*2),actamppos%(voice%+1)-8
  6135. MOVE point%-80+(x4%*2),actamppos%(voice%+1) : PRINT amp4$
  6136. ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)+8,point%-90+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
  6137. LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-24,point%-90+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
  6138. MOVE point%-80+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp4$
  6139. ENDIF
  6140. ENDIF
  6141. IF amp4% > amp3% THEN
  6142. IF longscore$ = "y" THEN
  6143. LINE start%,actamppos%(voice%+1)-8,point%-90+(x4%*2),actamppos%(voice%+1)+8
  6144. LINE start%,actamppos%(voice%+1)-8,point%-90+(x4%*2),actamppos%(voice%+1)-24
  6145. MOVE point%-80+(x4%*2),actamppos%(voice%+1) : PRINT amp4$
  6146. ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524)+8
  6147. LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524)-24
  6148. MOVE point%-80+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp4$
  6149. ENDIF
  6150. ENDIF
  6151. :
  6152. ENDCASE
  6153. :
  6154. ENDIF
  6155. :
  6156. :
  6157. REM ledger lines
  6158. IF staves$ = "y" THEN
  6159. IF notehead$ = "big" THEN
  6160. lend% = -12 : rend% = 44
  6161. ENDIF
  6162. IF notehead$ = "small" THEN
  6163. lend% = 8 : rend% = 40
  6164. ENDIF
  6165. IF notehead$ = "vsmall" THEN
  6166. lend% = 18 : rend% = 38
  6167. ENDIF
  6168. :
  6169. IF longscore$ = "n" THEN
  6170. IF value% = 858 THEN
  6171. IF vposn% >= 954 THEN
  6172. numledgers% = (vposn%-938)/16
  6173. FOR ct% = 1 TO numledgers%
  6174. LINE hposn%+lend%,954+((ct%-1)*16),hposn%+rend%,954+((ct%-1)*16)
  6175. NEXT
  6176. ENDIF
  6177. IF vposn% = 858 THEN LINE hposn%+lend%,858,hposn%+rend%,858
  6178. ENDIF
  6179. IF value% = 586 THEN
  6180. IF vposn% <= 714 THEN
  6181. numledgers% = (730-vposn%)/16
  6182. FOR ct% = 1 TO numledgers%
  6183. LINE hposn%+lend%,714-((ct%-1)*16),hposn%+rend%,714-((ct%-1)*16)
  6184. NEXT
  6185. ENDIF
  6186. ENDIF
  6187. IF value% = 334 THEN
  6188. IF vposn% >= 430 THEN
  6189. numledgers% = (vposn%-414)/16
  6190. FOR ct% = 1 TO numledgers%
  6191. LINE hposn%+lend%,430+((ct%-1)*16),hposn%+rend%,430+((ct%-1)*16)
  6192. NEXT
  6193. ENDIF
  6194. IF vposn% = 334 THEN LINE hposn%+lend%,334,hposn%+rend%,334
  6195. ENDIF
  6196. IF value% = 62 THEN
  6197. IF vposn% <= 190 THEN
  6198. numledgers% = (206-vposn%)/16
  6199. FOR ct% = 1 TO numledgers%
  6200. LINE hposn%+lend%,190-((ct%-1)*16),hposn%+rend%,190-((ct%-1)*16)
  6201. NEXT
  6202. ENDIF
  6203. ENDIF
  6204. ENDIF
  6205. :
  6206. IF longscore$ = "y" THEN
  6207. CASE MID$(clefcombination$,ledgerkey%,1) OF
  6208. WHEN "T" : num% = 320
  6209. WHEN "P" : num% = 376
  6210. WHEN "B" : num% = 224
  6211. WHEN "D" : num% = 168
  6212. ENDCASE
  6213. IF vposn% - value% >= num% THEN
  6214. numledgers% = ((vposn%-value%)-(num%-16))/16
  6215. FOR ct% = 1 TO numledgers%
  6216. LINE hposn% + lend%,value%+(num%-16)+(16*ct%),hposn%+rend%,value%+(num%-16)+(16*ct%)
  6217. NEXT
  6218. ENDIF
  6219. IF vposn%-value% <= (num%-96) THEN
  6220. numledgers% = ((num%-80)-(vposn%-value%))/16
  6221. FOR ct% = 1 TO numledgers%
  6222. LINE hposn%+lend%,(value%+(num%-80))-(16*ct%),hposn%+rend%,(value%+(num%-80))-(16*ct%)
  6223. NEXT
  6224. ENDIF
  6225. ENDIF
  6226. :
  6227. ENDIF : REM applies to 'IF staves$ = "y" '
  6228. :
  6229. REM stems
  6230. IF stems$ = "y" THEN
  6231. IF longscore$ = "n" THEN
  6232. IF notehead$ = "big" THEN
  6233. LINE hposn%+30,vposn%,hposn%+30,938+shortbeamposn%(voice%)-(524*(system%-1))
  6234. ENDIF
  6235. LINE hposn%+32,vposn%,hposn%+32,938+shortbeamposn%(voice%)-(524*(system%-1))
  6236. ENDIF
  6237. :
  6238. IF longscore$ = "y" THEN
  6239. IF notehead$ = "big" THEN
  6240. LINE hposn%+30,vposn%,hposn%+30,actbeamposn%(count%-startv%)
  6241. ENDIF
  6242. LINE hposn%+32,vposn%,hposn%+32,actbeamposn%(count%-startv%)
  6243. ENDIF
  6244. ENDIF
  6245. :
  6246. REM accidentals
  6247. IF accidentals$ = "y" THEN
  6248. acc% = (array%(startcell%,0,voice%)MOD100)DIV10
  6249. IF notehead$ = "big" THEN
  6250. CASE acc% OF
  6251. WHEN 9 : REM sharp
  6252. LINE hposn%-30,vposn%-24,hposn%-30,vposn%+24
  6253. LINE hposn%-28,vposn%-24,hposn%-28,vposn%+24
  6254. LINE hposn%-16,vposn%-24,hposn%-16,vposn%+24
  6255. LINE hposn%-14,vposn%-24,hposn%-14,vposn%+24
  6256. LINE hposn%-36,vposn%+4,hposn%-8,vposn%+12
  6257. LINE hposn%-36,vposn%-12,hposn%-8,vposn%-4
  6258. WHEN 8 : REM 3/8 sharp
  6259. LINE hposn%-30,vposn%-24,hposn%-30,vposn%+24
  6260. LINE hposn%-28,vposn%-24,hposn%-28,vposn%+24
  6261. LINE hposn%-16,vposn%-24,hposn%-16,vposn%+24
  6262. LINE hposn%-14,vposn%-24,hposn%-14,vposn%+24
  6263. LINE hposn%-36,vposn%+4,hposn%-8,vposn%+12
  6264. LINE hposn%-36,vposn%-12,hposn%-8,vposn%-4
  6265. LINE hposn%-20,vposn%-20,hposn%-16,vposn%-28
  6266. LINE hposn%-14,vposn%-28,hposn%-10,vposn%-20
  6267. LINE hposn%-18,vposn%-20,hposn%-16,vposn%-28
  6268. LINE hposn%-14,vposn%-28,hposn%-12,vposn%-20
  6269. WHEN 1 : REM flat
  6270. LINE hposn%-28,vposn%-12,hposn%-28,vposn%+28
  6271. LINE hposn%-26,vposn%-12,hposn%-26,vposn%+28
  6272. LINE hposn%-20,vposn%+8,hposn%-10,vposn%+8
  6273. LINE hposn%-24,vposn%+4,hposn%-22,vposn%+4
  6274. LINE hposn%-12,vposn%+4,hposn%-8,vposn%+4
  6275. LINE hposn%-28,vposn%,hposn%-26,vposn%
  6276. LINE hposn%-12,vposn%,hposn%-8,vposn%
  6277. LINE hposn%-16,vposn%-4,hposn%-12,vposn%-4
  6278. LINE hposn%-28,vposn%-8,hposn%-18,vposn%-8
  6279. WHEN 2 : REM 3/8 flat
  6280. LINE hposn%-28,vposn%-12,hposn%-28,vposn%+28
  6281. LINE hposn%-26,vposn%-12,hposn%-26,vposn%+28
  6282. LINE hposn%-20,vposn%+8,hposn%-10,vposn%+8
  6283. LINE hposn%-24,vposn%+4,hposn%-22,vposn%+4
  6284. LINE hposn%-12,vposn%+4,hposn%-8,vposn%+4
  6285. LINE hposn%-28,vposn%,hposn%-26,vposn%
  6286. LINE hposn%-12,vposn%,hposn%-8,vposn%
  6287. LINE hposn%-16,vposn%-4,hposn%-12,vposn%-4
  6288. LINE hposn%-28,vposn%-8,hposn%-18,vposn%-8
  6289. LINE hposn%-32,vposn%+20,hposn%-28,vposn%+28
  6290. LINE hposn%-26,vposn%+28,hposn%-22,vposn%+20
  6291. LINE hposn%-30,vposn%+20,hposn%-28,vposn%+28
  6292. LINE hposn%-26,vposn%+28,hposn%-24,vposn%+20
  6293. WHEN 7 : REM quartersharp
  6294. LINE hposn%-18,vposn%+24,hposn%-18,vposn%-24
  6295. LINE hposn%-16,vposn%+24,hposn%-16,vposn%-24
  6296. LINE hposn%-26,vposn%+4,hposn%-8,vposn%+12
  6297. LINE hposn%-26,vposn%-12,hposn%-8,vposn%-4
  6298. WHEN 3 : REM quarterflat
  6299. LINE hposn%-12,vposn%-12,hposn%-12,vposn%+28
  6300. LINE hposn%-10,vposn%-12,hposn%-10,vposn%+28
  6301. LINE hposn%-28,vposn%+8,hposn%-18,vposn%+8
  6302. LINE hposn%-30,vposn%+4,hposn%-26,vposn%+4
  6303. LINE hposn%-16,vposn%+4,hposn%-14,vposn%+4
  6304. LINE hposn%-30,vposn%,hposn%-26,vposn%
  6305. LINE hposn%-26,vposn%-4,hposn%-22,vposn%-4
  6306. LINE hposn%-20,vposn%-8,hposn%-10,vposn%-8
  6307. WHEN 5 : REM natural
  6308. LINE hposn%-30,vposn%+24,hposn%-30,vposn%-8
  6309. LINE hposn%-28,vposn%+24,hposn%-28,vposn%-8
  6310. LINE hposn%-12,vposn%+8,hposn%-12,vposn%-24
  6311. LINE hposn%-10,vposn%+8,hposn%-10,vposn%-24
  6312. LINE hposn%-30,vposn%+4,hposn%-24,vposn%+4
  6313. LINE hposn%-22,vposn%+8,hposn%-18,vposn%+8
  6314. LINE hposn%-16,vposn%+12,hposn%-10,vposn%+12
  6315. LINE hposn%-30,vposn%-12,hposn%-24,vposn%-12
  6316. LINE hposn%-22,vposn%-8,hposn%-18,vposn%-8
  6317. LINE hposn%-16,vposn%-4,hposn%-10,vposn%-4
  6318. WHEN 4 : REM 1/8 flat
  6319. LINE hposn%-30,vposn%+24,hposn%-30,vposn%-8
  6320. LINE hposn%-28,vposn%+24,hposn%-28,vposn%-8
  6321. LINE hposn%-12,vposn%+8,hposn%-12,vposn%-24
  6322. LINE hposn%-10,vposn%+8,hposn%-10,vposn%-24
  6323. LINE hposn%-30,vposn%+4,hposn%-24,vposn%+4
  6324. LINE hposn%-22,vposn%+8,hposn%-18,vposn%+8
  6325. LINE hposn%-16,vposn%+12,hposn%-10,vposn%+12
  6326. LINE hposn%-30,vposn%-12,hposn%-24,vposn%-12
  6327. LINE hposn%-22,vposn%-8,hposn%-18,vposn%-8
  6328. LINE hposn%-16,vposn%-4,hposn%-10,vposn%-4
  6329. LINE hposn%-16,vposn%-20,hposn%-12,vposn%-28
  6330. LINE hposn%-10,vposn%-28,hposn%-6,vposn%-20
  6331. LINE hposn%-14,vposn%-20,hposn%-12,vposn%-28
  6332. LINE hposn%-10,vposn%-28,hposn%-8,vposn%-20
  6333. WHEN 6 : REM 1/8 sharp
  6334. LINE hposn%-30,vposn%+24,hposn%-30,vposn%-8
  6335. LINE hposn%-28,vposn%+24,hposn%-28,vposn%-8
  6336. LINE hposn%-12,vposn%+8,hposn%-12,vposn%-24
  6337. LINE hposn%-10,vposn%+8,hposn%-10,vposn%-24
  6338. LINE hposn%-30,vposn%+4,hposn%-24,vposn%+4
  6339. LINE hposn%-22,vposn%+8,hposn%-18,vposn%+8
  6340. LINE hposn%-16,vposn%+12,hposn%-10,vposn%+12
  6341. LINE hposn%-30,vposn%-12,hposn%-24,vposn%-12
  6342. LINE hposn%-22,vposn%-8,hposn%-18,vposn%-8
  6343. LINE hposn%-16,vposn%-4,hposn%-10,vposn%-4
  6344. LINE hposn%-34,vposn%+20,hposn%-30,vposn%+28
  6345. LINE hposn%-32,vposn%+20,hposn%-30,vposn%+28
  6346. LINE hposn%-26,vposn%+20,hposn%-28,vposn%+28
  6347. LINE hposn%-24,vposn%+20,hposn%-28,vposn%+28
  6348. ENDCASE
  6349. ENDIF
  6350. IF notehead$ = "vsmall" THEN
  6351. CASE acc% OF
  6352. WHEN 5 : REM natural
  6353. LINE hposn%+12,vposn%+24,hposn%+12,vposn%-4
  6354. LINE hposn%+20,vposn%+4,hposn%+20,vposn%-24
  6355. LINE hposn%+12,vposn%+4,hposn%+20,vposn%+8
  6356. LINE hposn%+12,vposn%-8,hposn%+20,vposn%-4
  6357. WHEN 6 : REM 1/8 sharp
  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. LINE hposn%+10,vposn%+20,hposn%+12,vposn%+28
  6363. LINE hposn%+14,vposn%+20,hposn%+12,vposn%+28
  6364. LINE hposn%+8,vposn%+20,hposn%+12,vposn%+28
  6365. LINE hposn%+16,vposn%+20,hposn%+12,vposn%+28
  6366. WHEN 9 : REM sharp
  6367. LINE hposn%+12,vposn%+24,hposn%+12,vposn%-24
  6368. LINE hposn%+18,vposn%+24,hposn%+18,vposn%-24
  6369. LINE hposn%+10,vposn%+4,hposn%+20,vposn%+8
  6370. LINE hposn%+10,vposn%-8,hposn%+20,vposn%-4
  6371. WHEN 8 : REM 3/8 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. LINE hposn%+14,vposn%-20,hposn%+18,vposn%-28
  6377. LINE hposn%+16,vposn%-20,hposn%+18,vposn%-28
  6378. LINE hposn%+20,vposn%-20,hposn%+18,vposn%-28
  6379. LINE hposn%+22,vposn%-20,hposn%+18,vposn%-28
  6380. WHEN 4 : REM 1/8 flat
  6381. LINE hposn%+12,vposn%+24,hposn%+12,vposn%-4
  6382. LINE hposn%+20,vposn%+4,hposn%+20,vposn%-24
  6383. LINE hposn%+12,vposn%+4,hposn%+20,vposn%+8
  6384. LINE hposn%+12,vposn%-8,hposn%+20,vposn%-4
  6385. LINE hposn%+16,vposn%-20,hposn%+20,vposn%-28
  6386. LINE hposn%+18,vposn%-20,hposn%+20,vposn%-28
  6387. LINE hposn%+22,vposn%-20,hposn%+20,vposn%-28
  6388. LINE hposn%+24,vposn%-20,hposn%+20,vposn%-28
  6389. WHEN 7 : REM quartersharp
  6390. LINE hposn%+18,vposn%+24,hposn%+18,vposn%-24
  6391. LINE hposn%+16,vposn%+4,hposn%+20,vposn%+8
  6392. LINE hposn%+16,vposn%-8,hposn%+20,vposn%-4
  6393. WHEN 2 : REM 3/8 flat
  6394. LINE hposn%+12,vposn%+28,hposn%+12,vposn%-12
  6395. LINE hposn%+16,vposn%+8,hposn%+18,vposn%+8
  6396. LINE hposn%+14,vposn%+4,hposn%+14,vposn%+4
  6397. LINE hposn%+20,vposn%+4,hposn%+20,vposn%+4
  6398. LINE hposn%+20,vposn%,hposn%+20,vposn%
  6399. LINE hposn%+18,vposn%-4,hposn%+18,vposn%-4
  6400. LINE hposn%+12,vposn%-8,hposn%+16,vposn%-8
  6401. LINE hposn%+8,vposn%+20,hposn%+12,vposn%+28
  6402. LINE hposn%+10,vposn%+20,hposn%+12,vposn%+28
  6403. LINE hposn%+14,vposn%+20,hposn%+12,vposn%+28
  6404. LINE hposn%+16,vposn%+20,hposn%+12,vposn%+28
  6405. WHEN 1 : REM flat
  6406. LINE hposn%+12,vposn%+28,hposn%+12,vposn%-12
  6407. LINE hposn%+16,vposn%+8,hposn%+18,vposn%+8
  6408. LINE hposn%+14,vposn%+4,hposn%+14,vposn%+4
  6409. LINE hposn%+20,vposn%+4,hposn%+20,vposn%+4
  6410. LINE hposn%+20,vposn%,hposn%+20,vposn%
  6411. LINE hposn%+18,vposn%-4,hposn%+18,vposn%-4
  6412. LINE hposn%+12,vposn%-8,hposn%+16,vposn%-8
  6413. WHEN 3 : REM quarterflat
  6414. LINE hposn%+20,vposn%+28,hposn%+20,vposn%-12
  6415. LINE hposn%+14,vposn%+8,hposn%+16,vposn%+8
  6416. LINE hposn%+12,vposn%+4,hposn%+12,vposn%+4
  6417. LINE hposn%+18,vposn%+4,hposn%+18,vposn%+4
  6418. LINE hposn%+12,vposn%,hposn%+12,vposn%
  6419. LINE hposn%+14,vposn%-4,hposn%+14,vposn%-4
  6420. LINE hposn%+16,vposn%-8,hposn%+20,vposn%-8
  6421. ENDCASE
  6422. inf% = (array%(startcell%,2,voice%)MOD100)-50
  6423. IF inf% < 0 THEN
  6424. MOVE hposn%-125,vposn%-30 : PRINT inf%;"c"
  6425. ENDIF
  6426. IF inf% > 0 THEN
  6427. MOVE hposn%-16,vposn%+45 : PRINT "+";inf%;"c"
  6428. ENDIF
  6429. ENDIF
  6430. :
  6431. IF notehead$ = "small" THEN
  6432. CASE acc% OF
  6433. WHEN 1 : REM flat
  6434. LINE hposn%-2,vposn%+28,hposn%-2,vposn%-12
  6435. LINE hposn%+4,vposn%+8,hposn%+8,vposn%+8
  6436. LINE hposn%,vposn%+4,hposn%+2,vposn%+4
  6437. LINE hposn%+8,vposn%+4,hposn%+10,vposn%+4
  6438. LINE hposn%+8,vposn%,hposn%+10,vposn%
  6439. LINE hposn%+4,vposn%-4,hposn%+6,vposn%-4
  6440. LINE hposn%-2,vposn%-8,hposn%+2,vposn%-8
  6441. WHEN 2 : REM 3/8 flat
  6442. LINE hposn%-2,vposn%+28,hposn%-2,vposn%-12
  6443. LINE hposn%+4,vposn%+8,hposn%+8,vposn%+8
  6444. LINE hposn%,vposn%+4,hposn%+2,vposn%+4
  6445. LINE hposn%+8,vposn%+4,hposn%+10,vposn%+4
  6446. LINE hposn%+8,vposn%,hposn%+10,vposn%
  6447. LINE hposn%+4,vposn%-4,hposn%+6,vposn%-4
  6448. LINE hposn%-2,vposn%-8,hposn%+2,vposn%-8
  6449. LINE hposn%-6,vposn%+20,hposn%-2,vposn%+28
  6450. LINE hposn%-4,vposn%+20,hposn%-2,vposn%+28
  6451. LINE hposn%,vposn%+20,hposn%-2,vposn%+28
  6452. LINE hposn%+2,vposn%+20,hposn%-2,vposn%+28
  6453. WHEN 3 : REM quarterflat
  6454. LINE hposn%+10,vposn%+28,hposn%+10,vposn%-12
  6455. LINE hposn%,vposn%+8,hposn%+4,vposn%+8
  6456. LINE hposn%-2,vposn%+4,hposn%,vposn%+4
  6457. LINE hposn%+6,vposn%+4,hposn%+8,vposn%+4
  6458. LINE hposn%-2,vposn%,hposn%,vposn%
  6459. LINE hposn%+2,vposn%-4,hposn%+4,vposn%-4
  6460. LINE hposn%+6,vposn%-8,hposn%+10,vposn%-8
  6461. WHEN 5 : REM natural
  6462. LINE hposn%,vposn%+24,hposn%,vposn%-4
  6463. LINE hposn%+10,vposn%+4,hposn%+10,vposn%-24
  6464. LINE hposn%,vposn%+4,hposn%+10,vposn%+8
  6465. LINE hposn%,vposn%-8,hposn%+10,vposn%-4
  6466. WHEN 6 : REM 1/8 sharp
  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. LINE hposn%-4,vposn%+20,hposn%,vposn%+28
  6472. LINE hposn%-2,vposn%+20,hposn%,vposn%+28
  6473. LINE hposn%+2,vposn%+20,hposn%,vposn%+28
  6474. LINE hposn%+4,vposn%+20,hposn%,vposn%+28
  6475. WHEN 7 : REM quartersharp
  6476. LINE hposn%+6,vposn%+24,hposn%+6,vposn%-24
  6477. LINE hposn%+2,vposn%+4,hposn%+10,vposn%+8
  6478. LINE hposn%+2,vposn%-8,hposn%+10,vposn%-4
  6479. WHEN 4 : REM 1/8 flat
  6480. LINE hposn%,vposn%+24,hposn%,vposn%-4
  6481. LINE hposn%+10,vposn%+4,hposn%+10,vposn%-24
  6482. LINE hposn%,vposn%+4,hposn%+10,vposn%+8
  6483. LINE hposn%,vposn%-8,hposn%+10,vposn%-4
  6484. LINE hposn%+6,vposn%-20,hposn%+10,vposn%-28
  6485. LINE hposn%+8,vposn%-20,hposn%+10,vposn%-28
  6486. LINE hposn%+12,vposn%-20,hposn%+10,vposn%-28
  6487. LINE hposn%+14,vposn%-20,hposn%+10,vposn%-28
  6488. WHEN 9 : REM sharp
  6489. LINE hposn%-2,vposn%+24,hposn%-2,vposn%-24
  6490. LINE hposn%+6,vposn%+24,hposn%+6,vposn%-24
  6491. LINE hposn%-6,vposn%+4,hposn%+10,vposn%+8
  6492. LINE hposn%-6,vposn%-8,hposn%+10,vposn%-4
  6493. WHEN 8 : REM 3/8 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. LINE hposn%+2,vposn%-20,hposn%+6,vposn%-28
  6499. LINE hposn%+4,vposn%-20,hposn%+6,vposn%-28
  6500. LINE hposn%+8,vposn%-20,hposn%+6,vposn%-28
  6501. LINE hposn%+10,vposn%-20,hposn%+6,vposn%-28
  6502. ENDCASE
  6503. :
  6504. ENDIF
  6505. ENDIF
  6506. startcell% += 1
  6507. IF longscore$ = "n" THEN div% = 2 ELSE div% = 1
  6508. :
  6509. UNTIL (array%(startcell%,0,voice%) DIV10^6) >= ((numbars%/div%)+firstbar%) OR array%(startcell%,0,voice%) = 0
  6510. ENDIF
  6511. :
  6512. IF stems$ = "y" THEN PROCrhythmdisplay
  6513. :
  6514. IF longscore$ = "y" THEN ledgerkey% += EVAL(MID$(stavecombination$,count%-startv%+1,1))
  6515. :
  6516. NEXT
  6517. :
  6518. NEXT
  6519. :
  6520. VDU 4 : OFF : box$ = "n" : biga% = 10^5 : bigb% = 0 : bigc% = 0 : bigd% = 10^5
  6521. IF printing$ = "n" AND preplaydisplay$ = "n" THEN PROCpostdisplay
  6522. ENDPROC
  6523. :
  6524. REM*************************************************
  6525. :
  6526. DEF PROCroundgliss
  6527. :
  6528. IF thirdphase$ = "n" THEN gl1% = 50-gl% ELSE gl1% = 10-gl%
  6529. gl% = gl1%*1.1665 : gl% = (gl%DIV4)*4
  6530. IF gl% = 0 THEN
  6531. IF gl1% > 0 THEN gl% = 4 ELSE gl% = -4
  6532. ENDIF
  6533. IF gl% < 0 THEN g% = gl%*-1 ELSE g% = gl%
  6534. rem = g%/8
  6535. IF (rem*10)MOD10 <> 0 THEN
  6536. IF gl% > 0 THEN gl% += 4 ELSE gl% -= 4
  6537. ENDIF
  6538. :
  6539. ENDPROC
  6540. :
  6541. REM**************************************************
  6542. :
  6543. DEF PROCpostdisplay
  6544. :
  6545. distort$ = "OFF"
  6546. REM in case of Escaping from a distort routine before switching it off
  6547. :
  6548. OFF
  6549. CASE GET$ OF
  6550. :
  6551. WHEN "i" :
  6552. PROCwindow(20,69,60,55)
  6553. CLS : PRINT'" Copy-extract or move-extract? (C/M) "
  6554. CASE GET$ OF
  6555. WHEN "C","c" : copymove$ = "EC"
  6556. OTHERWISE copymove$ = "EM"
  6557. ENDCASE
  6558. savevoice$ = "N"
  6559. PROCcopy2
  6560. :
  6561. WHEN "{" : quickcopy$ = "y" : PROCdisplay
  6562. WHEN "}" : quickcopy$ = "n" : PROCdisplay
  6563. WHEN "¬" :
  6564. PROCwindow(20,69,60,55) : CLS
  6565. INPUT'" Display from which voice "startv%
  6566. PROCdisplay
  6567. :
  6568. WHEN "@" :
  6569. IF easiermenus$ = "y" THEN easiermenus$ = "n" ELSE easiermenus$ = "y"
  6570. PROCdisplay
  6571. WHEN "`" :
  6572. distort$ = "ON" : distortpara$ = "attacks" : ON
  6573. PROCwindow(20,69,60,55) : CLS : OFF :
  6574. incre$ = INKEY$(50)
  6575. IF incre$ = "`" THEN
  6576. distortpara$ = "pitches"
  6577. ENDIF
  6578. PROCcopy
  6579. :
  6580. WHEN "+" :
  6581. numvoices% = numparts%
  6582. FOR count% = 1 TO numvoices%
  6583. displayvoices%(count%) = 1 + count% - 1
  6584. holddisplay%(count%) = 1 + count% - 1
  6585. NEXT
  6586. holdnum% = numvoices%
  6587. PROCdisplay
  6588. :
  6589. WHEN "!" : copydownwards% = 1 :
  6590. IF addten$ = "y" THEN copydownwards% +=10
  6591. IF addten$ = "twenty" THEN copydownwards% += 20
  6592. incre$ = INKEY$(downwardsspeed%)
  6593. IF incre$ <> "" THEN
  6594. CASE incre$ OF
  6595. WHEN "!" : downby% = 1
  6596. WHEN """" : downby% = 2
  6597. WHEN "£" : downby% = 3
  6598. WHEN "$" : downby% = 4
  6599. WHEN "%" : downby% = 5
  6600. WHEN "^" : downby% = 6
  6601. WHEN "&" : downby% = 7
  6602. WHEN "*" : downby% = 8
  6603. WHEN "(" : downby% = 9
  6604. WHEN ")" : downby% = 10
  6605. ENDCASE
  6606. ELSE downby% = 1
  6607. ENDIF
  6608. PROCcopydownwards
  6609. WHEN """" : copydownwards% = 2 :
  6610. IF addten$ = "y" THEN copydownwards% +=10
  6611. IF addten$ = "twenty" THEN copydownwards% +=20
  6612. incre$ = INKEY$(downwardsspeed%)
  6613. IF incre$ <> "" THEN
  6614. CASE incre$ OF
  6615. WHEN "!" : downby% = 1
  6616. WHEN """" : downby% = 2
  6617. WHEN "£" : downby% = 3
  6618. WHEN "$" : downby% = 4
  6619. WHEN "%" : downby% = 5
  6620. WHEN "^" : downby% = 6
  6621. WHEN "&" : downby% = 7
  6622. WHEN "*" : downby% = 8
  6623. WHEN "(" : downby% = 9
  6624. ENDCASE
  6625. ELSE downby% = 1
  6626. ENDIF
  6627. PROCcopydownwards
  6628. WHEN "£" : copydownwards% = 3 :
  6629. IF addten$ = "y" THEN copydownwards% +=10
  6630. IF addten$ = "twenty" THEN copydownwards% +=20
  6631. incre$ = INKEY$(downwardsspeed%)
  6632. IF incre$ <> "" THEN
  6633. CASE incre$ OF
  6634. WHEN "!" : downby% = 1
  6635. WHEN """" : downby% = 2
  6636. WHEN "£" : downby% = 3
  6637. WHEN "$" : downby% = 4
  6638. WHEN "%" : downby% = 5
  6639. WHEN "^" : downby% = 6
  6640. WHEN "&" : downby% = 7
  6641. WHEN "*" : downby% = 8
  6642. WHEN "(" : downby% = 9
  6643. ENDCASE
  6644. ELSE downby% = 1
  6645. ENDIF
  6646. PROCcopydownwards
  6647. WHEN "$" : copydownwards% = 4 :
  6648. IF addten$ = "y" THEN copydownwards% +=10
  6649. IF addten$ = "twenty" THEN copydownwards% +=20
  6650. incre$ = INKEY$(downwardsspeed%)
  6651. IF incre$ <> "" THEN
  6652. CASE incre$ OF
  6653. WHEN "!" : downby% = 1
  6654. WHEN """" : downby% = 2
  6655. WHEN "£" : downby% = 3
  6656. WHEN "$" : downby% = 4
  6657. WHEN "%" : downby% = 5
  6658. WHEN "^" : downby% = 6
  6659. WHEN "&" : downby% = 7
  6660. WHEN "*" : downby% = 8
  6661. WHEN "(" : downby% = 9
  6662. ENDCASE
  6663. ELSE downby% = 1
  6664. ENDIF
  6665. PROCcopydownwards
  6666. WHEN "%" : copydownwards% = 5 :
  6667. IF addten$ = "y" THEN copydownwards% +=10
  6668. IF addten$ = "twenty" THEN copydownwards% +=20
  6669. incre$ = INKEY$(downwardsspeed%)
  6670. IF incre$ <> "" THEN
  6671. CASE incre$ OF
  6672. WHEN "!" : downby% = 1
  6673. WHEN """" : downby% = 2
  6674. WHEN "£" : downby% = 3
  6675. WHEN "$" : downby% = 4
  6676. WHEN "%" : downby% = 5
  6677. WHEN "^" : downby% = 6
  6678. WHEN "&" : downby% = 7
  6679. WHEN "*" : downby% = 8
  6680. WHEN "(" : downby% = 9
  6681. ENDCASE
  6682. ELSE downby% = 1
  6683. ENDIF
  6684. PROCcopydownwards
  6685. WHEN "^" : copydownwards% = 6 :
  6686. IF addten$ = "y" THEN copydownwards% +=10
  6687. IF addten$ = "twenty" THEN copydownwards% +=20
  6688. incre$ = INKEY$(downwardsspeed%)
  6689. IF incre$ <> "" THEN
  6690. CASE incre$ OF
  6691. WHEN "!" : downby% = 1
  6692. WHEN """" : downby% = 2
  6693. WHEN "£" : downby% = 3
  6694. WHEN "$" : downby% = 4
  6695. WHEN "%" : downby% = 5
  6696. WHEN "^" : downby% = 6
  6697. WHEN "&" : downby% = 7
  6698. WHEN "*" : downby% = 8
  6699. WHEN "(" : downby% = 9
  6700. ENDCASE
  6701. ELSE downby% = 1
  6702. ENDIF
  6703. PROCcopydownwards
  6704. WHEN "&" : copydownwards% = 7 :
  6705. IF addten$ = "y" THEN copydownwards% +=10
  6706. IF addten$ = "twenty" THEN copydownwards% +=20
  6707. incre$ = INKEY$(downwardsspeed%)
  6708. IF incre$ <> "" THEN
  6709. CASE incre$ OF
  6710. WHEN "!" : downby% = 1
  6711. WHEN """" : downby% = 2
  6712. WHEN "£" : downby% = 3
  6713. WHEN "$" : downby% = 4
  6714. WHEN "%" : downby% = 5
  6715. WHEN "^" : downby% = 6
  6716. WHEN "&" : downby% = 7
  6717. WHEN "*" : downby% = 8
  6718. WHEN "(" : downby% = 9
  6719. ENDCASE
  6720. ELSE downby% = 1
  6721. ENDIF
  6722. PROCcopydownwards
  6723. WHEN "*" : copydownwards% = 8 :
  6724. IF addten$ = "y" THEN copydownwards% +=10
  6725. IF addten$ = "twenty" THEN copydownwards% +=20
  6726. incre$ = INKEY$(downwardsspeed%)
  6727. IF incre$ <> "" THEN
  6728. CASE incre$ OF
  6729. WHEN "!" : downby% = 1
  6730. WHEN """" : downby% = 2
  6731. WHEN "£" : downby% = 3
  6732. WHEN "$" : downby% = 4
  6733. WHEN "%" : downby% = 5
  6734. WHEN "^" : downby% = 6
  6735. WHEN "&" : downby% = 7
  6736. WHEN "*" : downby% = 8
  6737. WHEN "(" : downby% = 9
  6738. ENDCASE
  6739. ELSE downby% = 1
  6740. ENDIF
  6741. PROCcopydownwards
  6742. WHEN "(" : copydownwards% = 9 :
  6743. IF addten$ = "y" THEN copydownwards% +=10
  6744. IF addten$ = "twenty" THEN copydownwards% +=20
  6745. incre$ = INKEY$(downwardsspeed%)
  6746. IF incre$ <> "" THEN
  6747. CASE incre$ OF
  6748. WHEN "!" : downby% = 1
  6749. WHEN """" : downby% = 2
  6750. WHEN "£" : downby% = 3
  6751. WHEN "$" : downby% = 4
  6752. WHEN "%" : downby% = 5
  6753. WHEN "^" : downby% = 6
  6754. WHEN "&" : downby% = 7
  6755. WHEN "*" : downby% = 8
  6756. WHEN "(" : downby% = 9
  6757. ENDCASE
  6758. ELSE downby% = 1
  6759. ENDIF
  6760. PROCcopydownwards
  6761. WHEN ")" : copydownwards% = 10 :
  6762. IF addten$ = "y" THEN copydownwards% +=10
  6763. IF addten$ = "twenty" THEN copydownwards% +=20
  6764. incre$ = INKEY$(downwardsspeed%)
  6765. IF incre$ <> "" THEN
  6766. CASE incre$ OF
  6767. WHEN "!" : downby% = 1
  6768. WHEN """" : downby% = 2
  6769. WHEN "£" : downby% = 3
  6770. WHEN "$" : downby% = 4
  6771. WHEN "%" : downby% = 5
  6772. WHEN "^" : downby% = 6
  6773. WHEN "&" : downby% = 7
  6774. WHEN "*" : downby% = 8
  6775. WHEN "(" : downby% = 9
  6776. ENDCASE
  6777. ELSE downby% = 1
  6778. ENDIF
  6779. PROCcopydownwards
  6780. :
  6781. WHEN "c" : PROCincrementcalc
  6782. WHEN "k" : ON : PROCkeyboardshortcuts
  6783. WHEN "I" : copymove$ = "C" : savevoice$ = "N" : PROCwindow(20,69,60,55) : PROCimportvoice
  6784. WHEN "0",")" : PROCseriesattacks
  6785. WHEN "a" : PROCfunctionprelude
  6786. WHEN "m" : ON : PROCawait
  6787. WHEN "n" : ON : rerun$ = "n" : PROCrandomnumber
  6788. WHEN "N" : ON : rerun$ = "y" : PROCrandomnumber
  6789. WHEN "o" : ON : PROCdisplaysubmenu
  6790. WHEN "O" : deleteone$ = "top" : PROCdelete
  6791. WHEN "K" : deleteone$ = "middle" : PROCdelete
  6792. WHEN "M" : deleteone$ = "bottom" : PROCdelete
  6793. WHEN "r" : play$ = "replay" : PROCplay
  6794. WHEN "u" : ON : PROCseriesdurations
  6795. WHEN "G", "g" : ON : numdurations% = 111 : PROCdurationsbetween
  6796. WHEN "\" : ON : PROCshortmove
  6797. WHEN "|" : ON : PROCshortmoveone
  6798. WHEN "y" : ON : PROCseriespitches
  6799. WHEN "Y" :
  6800. IF addpitches$ = "y" THEN
  6801. PROCwindow(20,69,60,55)
  6802. ON
  6803. CLS
  6804. PROCinsertpitches
  6805. ELSE
  6806. voix% = 1 : son% = 5 : PROCedit
  6807. ENDIF
  6808. WHEN "l" : ON : PROCseriesamplitudes
  6809. WHEN "J","j" : ON : PROCseriesenvelopes
  6810. WHEN "h" : ON : PROCwindow(20,57,74,55)
  6811. PRINT'" Have you previously allocated at least 260K memory "
  6812. PRINT " for system sprites and double-clicked !Paint "
  6813. CASE GET$ OF
  6814. WHEN "N","n" : PROCdisplay
  6815. WHEN "Y","y" :
  6816. printing$ = "y" : printno% += 1 : PROCdisplay
  6817. MOVE 0,0
  6818. MOVE 1800,1223
  6819. *SGet mysprite
  6820. OSCLI "SSave SDFS::RISCOSpi.$.CAC.Printing.print"+STR$(printno%)
  6821. printing$ = "n" : PROCdisplay
  6822. ENDCASE
  6823. WHEN "v" : startv% += updisplay%
  6824. incre$ = INKEY$(vertscroll%)
  6825. IF incre$ <> "" THEN
  6826. CASE incre$ OF
  6827. WHEN "V","v" :
  6828. IF screenmovesby% = 10 THEN startv%+=9 ELSE startv%+=2
  6829. WHEN "0" : startv%+=49
  6830. OTHERWISE startv% += EVAL(incre$)-1
  6831. ENDCASE
  6832. ENDIF
  6833. IF startv% > (numvoices%-lastcount%) THEN startv%= numvoices%-lastcount%
  6834. PROCdisplay
  6835. WHEN "6" :
  6836. startv% -= updisplay%
  6837. decre$ = INKEY$(vertscroll%)
  6838. IF decre$ <> "" THEN
  6839. CASE decre$ OF
  6840. WHEN "6" :
  6841. IF screenmovesby% = 10 THEN startv%-=9 ELSE startv%-=2
  6842. WHEN "0" : startv%-=49
  6843. OTHERWISE startv% -= EVAL(decre$)-1
  6844. ENDCASE
  6845. ENDIF
  6846. IF startv% < 1 THEN startv% = 1
  6847. PROCdisplay
  6848. WHEN "." : startbar% += 1
  6849. incre$ = INKEY$(horizscroll%)
  6850. IF incre$ <> "" THEN
  6851. IF incre$ = ">" OR incre$ = "." THEN startbar% += numbars%-1 ELSE startbar% += EVAL(incre$)-1
  6852. ENDIF
  6853. requestedend% = startbar% + numbars%
  6854. IF requestedend% > nobars% THEN startbar% -= (requestedend%-nobars%)
  6855. PROCdisplay
  6856. WHEN "," : startbar% -= 1
  6857. decre$ = INKEY$(horizscroll%)
  6858. IF decre$ <> "" THEN
  6859. IF decre$ = "<" OR decre$ = "," THEN startbar% -= numbars%-1 ELSE startbar% -= EVAL(decre$)-1
  6860. ENDIF
  6861. IF startbar%<1 THEN startbar% = 1
  6862. PROCdisplay
  6863. WHEN "V" : ON : PROCwindow(20,69,60,55)
  6864. IF namestaves$ = "nameone" THEN PROCnamestaves ELSE PROCdeletenames
  6865. PROCdisplay
  6866. WHEN "b" :
  6867. PROCwindow(20,57,34,55) : ON : INPUT'" Go to bar "startbar%
  6868. requestedend% = startbar% + numbars%
  6869. IF requestedend% > nobars% THEN startbar% -= (requestedend% - nobars%)
  6870. PROCdisplay
  6871. WHEN "s" :
  6872. CASE sequalssection$ OF
  6873. WHEN "y" :
  6874. PROCwindow(20,17,38,15) : ON : INPUT'" Go to section "section$
  6875. count% = 0 : found$ = "n"
  6876. REPEAT
  6877. count% += 1
  6878. IF remarks$(count%,0) = "SECTION "+section$ OR remarks$(count%,1) = "SECTION "+section$ THEN
  6879. startbar% = count% : found$ = "y"
  6880. ENDIF
  6881. UNTIL found$ = "y" OR count% > nobars%
  6882. PROCdisplay
  6883. WHEN "n" :
  6884. copysuccessively$ = "y" : PROCcopygroupofnotes
  6885. ENDCASE : REM sequalussection
  6886. WHEN "d" : PROCwindow(20,58,45,55) : ON
  6887. INPUT'" Display how many bars? "numbars%
  6888. requestedend% = startbar% + numbars%
  6889. IF requestedend% > nobars% THEN startbar% -= (requestedend%-nobars%)
  6890. IF startbar% < 1 THEN
  6891. startbar% = 1 : numbars% = nobars%-1
  6892. ENDIF
  6893. PROCdisplay
  6894. WHEN "=" : numbars% = numbars%*2
  6895. requestedend% = startbar% + numbars%
  6896. IF requestedend% > nobars% THEN startbar% -= (requestedend%-nobars%)
  6897. IF startbar% < 1 THEN
  6898. startbar% = 1 : numbars% = nobars%-1
  6899. ENDIF
  6900. PROCdisplay
  6901. WHEN "q" :
  6902. PROCquickdisplay
  6903. WHEN "w" :
  6904. CASE toggle$ OF
  6905. WHEN "prevquick" : toggle$ = "orig"
  6906. WHEN "quick" : toggle$ = "prevquick"
  6907. WHEN "orig" : toggle$ = "quick"
  6908. ENDCASE
  6909. CASE toggle$ OF
  6910. WHEN "prevquick" :
  6911. numvoices% = prequicknum%
  6912. FOR count% = 1 TO numvoices%
  6913. displayvoices%(count%) = prequickdisplay%(count%)
  6914. NEXT
  6915. startv% = prequickstart%
  6916. WHEN "quick" :
  6917. numvoices% = quicknum%
  6918. FOR count% = 1 TO numvoices%
  6919. displayvoices%(count%) = quickdisplay%(count%)
  6920. NEXT
  6921. startv% = quickstart%
  6922. WHEN "orig" :
  6923. numvoices% = holdnum%
  6924. FOR count% = 1 TO numvoices%
  6925. displayvoices%(count%) = holddisplay%(count%)
  6926. NEXT
  6927. startv% = holdstart%
  6928. ENDCASE
  6929. PROCdisplay
  6930. WHEN "p" :
  6931. play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
  6932. endbar% = nobars% : nvoices% = quickplay%
  6933. FOR count% = 1 TO quickplay%
  6934. playvoices%(count%) = displayvoices%(startv%+count%-1)
  6935. NEXT
  6936. PROCplay
  6937. WHEN ";" :
  6938. play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
  6939. endbar% = nobars% : nvoices% = 1
  6940. playvoices%(1) = displayvoices%(startv%+1)
  6941. PROCplay
  6942. WHEN "/" :
  6943. play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
  6944. endbar% = nobars% : nvoices% = 1
  6945. playvoices%(1) = displayvoices%(startv%+2)
  6946. PROCplay
  6947. WHEN "P" :
  6948. play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
  6949. endbar% = startbar%+numbars%-1 : nvoices% = quickplay%
  6950. FOR count% = 1 TO quickplay%
  6951. playvoices%(count%) = displayvoices%(startv%+count%-1)
  6952. NEXT
  6953. PROCplay
  6954. WHEN ":" :
  6955. play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
  6956. endbar% = startbar%+numbars%-1 : nvoices% = 1
  6957. playvoices%(1) = displayvoices%(startv%+1)
  6958. PROCplay
  6959. WHEN "?" :
  6960. play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
  6961. endbar% = startbar%+numbars%-1 : nvoices% = 1
  6962. playvoices%(1) = displayvoices%(startv%+2)
  6963. PROCplay
  6964. WHEN "z" : PROCcopyonenote
  6965. WHEN "x" : PROCcopygroupofnotes
  6966. WHEN "-" :
  6967. IF numbars% > 1 THEN numbars% = numbars%/2
  6968. PROCdisplay
  6969. WHEN "t" : funcinput$ = "durat" : PROCdisplay
  6970. WHEN "e" : funcinput$ = "points" : PROCdisplay
  6971. WHEN "f" : funcinput$ = "displayed" : PROCdisplay
  6972. :
  6973. WHEN "1" :
  6974. IF setalong$ = "y" THEN along% = 0 : PROCpostdisplay
  6975. IF setalong$ = "n" THEN numvoices% = 1 : numvoicesgiven$ = "y" : PROCquickdisplay
  6976. IF setalong$ = "playnovoices" THEN quickplay% = 1 : PROCdisplay
  6977. WHEN "2" :
  6978. IF setalong$ = "y" THEN along% = 1 : PROCpostdisplay
  6979. IF setalong$ = "n" THEN numvoices% = 2 : numvoicesgiven$ = "y" : PROCquickdisplay
  6980. IF setalong$ = "playnovoices" THEN quickplay% = 2 : PROCdisplay
  6981. WHEN "3" :
  6982. IF setalong$ = "y" THEN along% = 2 : PROCpostdisplay
  6983. IF setalong$ = "n" THEN numvoices% = 3 : numvoicesgiven$ = "y" : PROCquickdisplay
  6984. IF setalong$ = "playnovoices" THEN quickplay% = 3 : PROCdisplay
  6985. WHEN "4" :
  6986. IF setalong$ = "y" THEN along% = 3 : PROCpostdisplay
  6987. IF setalong$ = "n" THEN numvoices% = 4 : numvoicesgiven$ = "y" : PROCquickdisplay
  6988. IF setalong$ = "playnovoices" THEN quickplay% = 4 : PROCdisplay
  6989. WHEN "5" :
  6990. IF setalong$ = "y" THEN along% = 4 : PROCpostdisplay
  6991. IF setalong$ = "n" THEN numvoices% = 5 : numvoicesgiven$ = "y" : PROCquickdisplay
  6992. IF setalong$ = "playnovoices" THEN quickplay% = 5 : PROCdisplay
  6993. WHEN "7" :
  6994. IF setalong$ = "y" THEN along% = 6 : PROCpostdisplay
  6995. IF setalong$ = "n" THEN numvoices% = 7 : numvoicesgiven$ = "y" : PROCquickdisplay
  6996. IF setalong$ = "playnovoices" THEN quickplay% = 7 : PROCdisplay
  6997. WHEN "8" :
  6998. IF setalong$ = "y" THEN along% = 7 : PROCpostdisplay
  6999. IF setalong$ = "n" THEN numvoices% = 8 : numvoicesgiven$ = "y" : PROCquickdisplay
  7000. IF setalong$ = "playnovoices" THEN quickplay% = 8 : PROCdisplay
  7001. WHEN "9" :
  7002. IF setalong$ = "y" THEN along% = 8 : PROCpostdisplay
  7003. IF setalong$ = "n" THEN numvoices% = 9 : numvoicesgiven$ = "y" : PROCquickdisplay
  7004. IF setalong$ = "playnovoices" THEN
  7005. PROCwindow(20,69,60,55)
  7006. PRINT'" The maximum number of voices "
  7007. PRINT " that can be played is 8 "
  7008. PRINT'" (press a key to continue) "
  7009. CASE GET$ OF
  7010. OTHERWSE PROCdisplay
  7011. ENDCASE
  7012. ENDIF
  7013. WHEN "]" :
  7014. IF squarebracket$ = "remarks" THEN
  7015. count% = startbar%-1
  7016. REPEAT
  7017. count%+=1
  7018. IF remarks$(count%,0) <> "" THEN itt% = count%
  7019. UNTIL remarks$(count%,0) <> ""
  7020. remarks$(itt%+1,0) = remarks$(itt%,0)
  7021. remarks$(itt%,0) = ""
  7022. ELSE
  7023. addten$ = "y"
  7024. ENDIF
  7025. PROCdisplay
  7026. WHEN "}" :
  7027. count% = startbar%-1
  7028. REPEAT
  7029. count%+=1
  7030. IF remarks$(count%,0) <> "" THEN itt% = count%
  7031. UNTIL remarks$(count%,0) <> ""
  7032. remarks$(itt%+10,0) = remarks$(itt%,0)
  7033. remarks$(itt%,0) = ""
  7034. PROCdisplay
  7035. WHEN "[" :
  7036. IF squarebracket$ = "remarks" THEN
  7037. count% = startbar%-1
  7038. REPEAT
  7039. count%+=1
  7040. IF remarks$(count%,0) <> "" THEN itt% = count%
  7041. UNTIL remarks$(count%,0) <> ""
  7042. remarks$(itt%-1,0) = remarks$(itt%,0)
  7043. remarks$(itt%,0) = ""
  7044. ELSE
  7045. addten$ = "n"
  7046. ENDIF
  7047. PROCdisplay
  7048. WHEN "{" :
  7049. count% = startbar%-1
  7050. REPEAT
  7051. count%+=1
  7052. IF remarks$(count%,0) <> "" THEN itt% = count%
  7053. UNTIL remarks$(count%,0) <> ""
  7054. remarks$(itt%-10,0) = remarks$(itt%,0)
  7055. remarks$(itt%,0) = ""
  7056. PROCdisplay
  7057. WHEN "#" :
  7058. IF squarebracket$ = "remarks" THEN
  7059. count% = startbar%-1
  7060. REPEAT
  7061. count%+=1
  7062. IF remarks$(count%,1) <> "" THEN itt% = count%
  7063. UNTIL remarks$(count%,1) <> ""
  7064. remarks$(itt%+1,1) = remarks$(itt%,1)
  7065. remarks$(itt%,1) = ""
  7066. ENDIF
  7067. PROCdisplay
  7068. WHEN "'" :
  7069. IF squarebracket$ = "remarks" THEN
  7070. count% = startbar%-1
  7071. REPEAT
  7072. count%+=1
  7073. IF remarks$(count%,1) <> "" THEN itt% = count%
  7074. UNTIL remarks$(count%,1) <> ""
  7075. remarks$(itt%-1,1) = remarks$(itt%,1)
  7076. remarks$(itt%,1) = ""
  7077. ELSE
  7078. addten$ = "twenty"
  7079. ENDIF
  7080. PROCdisplay
  7081. WHEN "L" : slavemethod$ = "random" : quickslave$ = "y" : PROCslave
  7082. WHEN "Q" : voix% = 1 : son% = 0 : PROCedit
  7083. WHEN "W" : voix% = 1 : son% = 1 : PROCedit
  7084. WHEN "E" : voix% = 1 : son% = 2 : PROCedit
  7085. WHEN "R" : voix% = 1 : son% = 3 : PROCedit
  7086. WHEN "T" : voix% = 1 : son% = 4 : PROCedit
  7087. WHEN "A" : voix% = 2 : son% = 0 : PROCedit
  7088. WHEN "S" : voix% = 2 : son% = 1 : PROCedit
  7089. WHEN "D" : voix% = 2 : son% = 2 : PROCedit
  7090. WHEN "F" : voix% = 2 : son% = 3 : PROCedit
  7091. WHEN "G" : voix% = 2 : son% = 4 : PROCedit
  7092. WHEN "H" : voix% = 2 : son% = 5 : PROCedit
  7093. WHEN "Z" : voix% = 3 : son% = 0 : PROCedit
  7094. WHEN "X" : voix% = 3 : son% = 1 : PROCedit
  7095. WHEN "C" : voix% = 3 : son% = 2 : PROCedit
  7096. WHEN "V" : voix% = 3 : son% = 3 : PROCedit
  7097. WHEN "B" : voix% = 3 : son% = 4 : PROCedit
  7098. WHEN "N" : voix% = 3 : son% = 5 : PROCedit
  7099. WHEN ">" :
  7100. voice% = displayvoices%(voix%+(startv%-1))-1
  7101. CASE editwhat$ OF
  7102. WHEN "1stenvelope" :
  7103. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 100000
  7104. WHEN "2ndenvelope" :
  7105. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 10000000
  7106. WHEN "1stamplitude" :
  7107. array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) + 1
  7108. IF array%(holdstartcell%(voice%)+son%,1,voice%)MOD10 = 9 THEN
  7109. array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) - 9
  7110. ENDIF
  7111. WHEN "2ndamplitude" :
  7112. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 100
  7113. IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^2)MOD10 = 9 THEN
  7114. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 900
  7115. ENDIF
  7116. WHEN "3rdamplitude" :
  7117. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 1000
  7118. IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^3)MOD10 = 9 THEN
  7119. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 9000
  7120. ENDIF
  7121. WHEN "4thamplitude" :
  7122. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 10000
  7123. IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^4)MOD10 = 9 THEN
  7124. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 90000
  7125. ENDIF
  7126. WHEN "movetwo" :
  7127. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 60000
  7128. IF (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3 > 900 THEN
  7129. number% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
  7130. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - (number%*1000)
  7131. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 1000000
  7132. ENDIF
  7133. array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) + 60000
  7134. IF (array%(holdstartcell%(voice%)+son%+1,0,voice%)DIV10^3)MOD10^3 > 900 THEN
  7135. number% = (array%(holdstartcell%(voice%)+son%+1,0,voice%)DIV10^3)MOD10^3
  7136. array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) - (number%*1000)
  7137. array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) + 1000000
  7138. ENDIF
  7139. WHEN "move&drag" :
  7140. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 60000
  7141. IF (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3 > 900 THEN
  7142. number% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
  7143. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - (number%*1000)
  7144. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 1000000
  7145. ENDIF
  7146. bar1% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^6)
  7147. beat1% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
  7148. position1% = (bar1%*960) + beat1%
  7149. bar2% = (array%(holdstartcell%(voice%)+son%-1,0,voice%)DIV10^6)
  7150. beat2% = (array%(holdstartcell%(voice%)+son%-1,0,voice%)DIV10^3)MOD10^3
  7151. position2% = (bar2%*960) + beat2%
  7152. dur% = position1% - position2%
  7153. PROCconvertdur
  7154. number% = (array%(holdstartcell%(voice%)+son%-1,1,voice%)DIV10)MOD10^3
  7155. array%(holdstartcell%(voice%)+son%-1,1,voice%) = array%(holdstartcell%(voice%)+son%-1,1,voice%) - (number%*10)
  7156. array%(holdstartcell%(voice%)+son%-1,1,voice%) = array%(holdstartcell%(voice%)+son%-1,1,voice%) + (dur%*10)
  7157. WHEN "duration" :
  7158. array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) + 10
  7159. IF (array%(holdstartcell%(voice%)+son%,1,voice%)DIV10)MOD10^3 > 998 THEN (array%(holdstartcell%(voice%)+son%,1,voice%)DIV10)MOD10^3 = 998
  7160. ENDCASE
  7161. PROCdisplay
  7162. WHEN "<" :
  7163. voice% = displayvoices%(voix%+(startv%-1))-1
  7164. CASE editwhat$ OF
  7165. WHEN "1stenvelope" :
  7166. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 100000
  7167. WHEN "2ndenvelope" :
  7168. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 10000000
  7169. WHEN "1stamplitude" :
  7170. array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) - 1
  7171. IF array%(holdstartcell%(voice%)+son%,1,voice%)MOD10 = 9 THEN
  7172. array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) + 9
  7173. ENDIF
  7174. WHEN "2ndamplitude" :
  7175. IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^2)MOD10 = 0 THEN
  7176. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 800
  7177. ELSEarray%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 100
  7178. ENDIF
  7179. WHEN "3rdamplitude" :
  7180. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 1000
  7181. IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^3)MOD10 = 9 THEN
  7182. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 9000
  7183. ENDIF
  7184. WHEN "4thamplitude" :
  7185. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 10000
  7186. IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^4)MOD10 = 9 THEN
  7187. array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 90000
  7188. ENDIF
  7189. WHEN "movetwo" :
  7190. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - 60000
  7191. IF (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3 > 900 THEN
  7192. number% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
  7193. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - (number%*1000)
  7194. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 900000
  7195. ENDIF
  7196. array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) - 60000
  7197. IF (array%(holdstartcell%(voice%)+son%+1,0,voice%)DIV10^3)MOD10^3 > 900 THEN
  7198. number% = (array%(holdstartcell%(voice%)+son%+1,0,voice%)DIV10^3)MOD10^3
  7199. array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) - (number%*1000)
  7200. array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) + 900000
  7201. ENDIF
  7202. WHEN "move&drag" :
  7203. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - 60000
  7204. IF (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3 > 900 THEN
  7205. number% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
  7206. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - (number%*1000)
  7207. array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 900000
  7208. ENDIF
  7209. bar1% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^6)
  7210. beat1% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
  7211. position1% = (bar1%*960) + beat1%
  7212. bar2% = (array%(holdstartcell%(voice%)+son%-1,0,voice%)DIV10^6)
  7213. beat2% = (array%(holdstartcell%(voice%)+son%-1,0,voice%)DIV10^3)MOD10^3
  7214. position2% = (bar2%*960) + beat2%
  7215. dur% = position1% - position2%
  7216. PROCconvertdur
  7217. number% = (array%(holdstartcell%(voice%)+son%-1,1,voice%)DIV10)MOD10^3
  7218. array%(holdstartcell%(voice%)+son%-1,1,voice%) = array%(holdstartcell%(voice%)+son%-1,1,voice%) - (number%*10)
  7219. array%(holdstartcell%(voice%)+son%-1,1,voice%) = array%(holdstartcell%(voice%)+son%-1,1,voice%) + (dur%*10)
  7220. WHEN "duration" :
  7221. array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) - 10
  7222. ENDCASE
  7223. PROCdisplay
  7224. :
  7225. OTHERWISE PROCawait
  7226. :
  7227. ENDCASE
  7228. ENDPROC
  7229. :
  7230. REM**********************************************
  7231. :
  7232. DEF PROCrhythmdisplay
  7233. :
  7234. IF longscore$ = "n" THEN finalbar% = (firstbar%+((numbars%/2)))-1 ELSE finalbar% = (firstbar%+(numbars%))-1
  7235. FOR bar% = firstbar% TO finalbar%
  7236. :
  7237. rgroup%(1) = disarray%(bar%,0,voice%)DIV10^3
  7238. rgroup%(2) = ((disarray%(bar%,0,voice%)MOD10^3)*10^3)+(disarray%(bar%,1,voice%)DIV10^6)
  7239. rgroup%(3) = disarray%(bar%,1,voice%)MOD10^6
  7240. rgroup%(4) = disarray%(bar%,2,voice%)DIV10^3
  7241. rgroup%(5) = disarray%(bar%,3,voice%)
  7242. :
  7243. FOR group% = 1 TO 5
  7244. :
  7245. IF rgroup%(group%) <> 0 THEN
  7246. IF group% < 5 THEN
  7247. beat% = rgroup%(group%)DIV10^4
  7248. addition% = (960*factor)*(bar%-firstbar%)
  7249. leftend% = (beat%*beatfactor%)
  7250. grouplength% = ((rgroup%(group%)MOD10^4)DIV10^2)*beatfactor%
  7251. divs% = (rgroup%(group%)MOD10^2)
  7252. rightend% = leftend%+((grouplength%/divs%)*(divs%-1))
  7253. ELSE
  7254. beat% = rgroup%(group%)DIV10^7
  7255. addition% = (960*factor)*(bar%-firstbar%)
  7256. leftend% = (beat%*beatfactor%)
  7257. grouplength% = ((rgroup%(group%)MOD10^7)DIV10^4)*beatfactor%
  7258. divs% = (rgroup%(group%)MOD10^4)
  7259. rightend% = leftend%+((grouplength%/divs%)*(divs%-1))
  7260. ENDIF
  7261. :
  7262. value = divs%/(grouplength%/beatfactor%)
  7263. :
  7264. IF value >= 1 AND value < 2 THEN change% = 0
  7265. IF value >= 2 AND value < 4 THEN change% = 1
  7266. IF value >= 4 AND value < 8 THEN change% = 2
  7267. IF value >= 8 AND value < 16 THEN change% = 3
  7268. IF value >= 0.5 AND value < 1 THEN change% = -1
  7269. IF value >= 0.25 AND value < 0.5 THEN change% = -2
  7270. IF value >= 0.125 AND value < 0.25 THEN change% = -3
  7271. IF value >= 0.0625 AND value < 0.125 THEN change% = -4
  7272. IF value >= 0.03125 AND value < 0.0625 THEN change% = -5
  7273. numbeams% = beams% + change%
  7274. IF numbeams% < 0 THEN numbeams% = 0
  7275. :
  7276. IF longscore$ = "n" THEN v% = 938 + shortbeamposn%(voice%) ELSE v% = actbeamposn%(count%-startv%)
  7277. IF longscore$ = "n" THEN
  7278. IF shortstemdir$(voice%) = "D" THEN x% = -12 ELSE x% = 12
  7279. ELSE IF longstemdir$(voice%) = "D" THEN x% = -12 ELSE x% = 12
  7280. ENDIF
  7281. IF longscore$ = "n" THEN inc% = 80 ELSE inc% = 120
  7282. :
  7283. IF numbeams% > 0 THEN
  7284. :
  7285. left% = (leftend%*factor)+inc%+addition%
  7286. right% = (rightend%*factor)+inc%+addition%
  7287. gap% = (right% - left%)/(divs%-1)
  7288. FOR times% = 1 TO numbeams%
  7289. pt1% = left%
  7290. space = grouplength%/divs%
  7291. pt2% = ((leftend%*factor)+(inc%+2)+((space*factor)))+addition%
  7292. ct% = -1
  7293. power% = (5-times%)
  7294. IF power% < 1 THEN power% = 1
  7295. n% = 2^power%
  7296. WHILE pt2%<= (right%+10)
  7297. ct% += 1
  7298. IF ((ct%+1)/n%*10)MOD10 <> 0 OR times% = 1 THEN
  7299. LINE pt1%,((v%-(524*(system%-1)))-(x%*(times%-1))),pt2%,((v%-(524*(system%-1)))-(x%*(times%-1)))
  7300. LINE pt1%,(((v%-2)-(524*(system%-1)))-(x%*(times%-1))),pt2%,(((v%-2)-(524*(system%-1)))-(x%*(times%-1)))
  7301. LINE pt1%,(((v%-4)-(524*(system%-1)))-(x%*(times%-1))),pt2%,(((v%-4)-(524*(system%-1)))-(x%*(times%-1)))
  7302. REM for beams crossing systems
  7303. IF right% > 1600 THEN crossing$ = "y" ELSE crossing$ = "n"
  7304. IF crossing$ = "y" AND longscore$ = "n" AND system% = 1 THEN
  7305. LINE pt1%-1600+inc%,((v%-(524*(system%-1)))-(x%*(times%-1)))-524,pt2%-1600+inc%,((v%-(524*(system%-1)))-(x%*(times%-1)))-524
  7306. 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
  7307. 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
  7308. ENDIF
  7309. ENDIF
  7310. pt1% = pt2%
  7311. pt2% = ((leftend%*factor)+(inc%+2)+((ct%+2)*(space*factor)))+addition%
  7312. ENDWHILE
  7313. NEXT
  7314. ENDIF
  7315. :
  7316. space = grouplength%/divs%
  7317. IF longscore$ = "y" THEN
  7318. IF longstemdir$(voice%) = "U" THEN dir% = 1 ELSE dir% = -1
  7319. ELSE
  7320. IF shortstemdir$(voice%) = "U" THEN dir% = 1 ELSE dir% = -1
  7321. ENDIF
  7322. :
  7323. FOR counter% = 0 TO (divs%-1)
  7324. REM grouping% adds to length of stems to group in 2's, 4's etc
  7325. grouping% = 0
  7326. CASE shortstemdir$(voice%) OF
  7327. WHEN "D" :
  7328. IF (counter%/2*10)MOD10 = 0 THEN grouping% = -20
  7329. IF (counter%/4*10)MOD10 = 0 THEN grouping% = -40
  7330. IF (counter%/8*10)MOD10 = 0 THEN grouping% = -60
  7331. OTHERWISE
  7332. IF (counter%/2*10)MOD10 = 0 THEN grouping% = 20
  7333. IF (counter%/4*10)MOD10 = 0 THEN grouping% = 40
  7334. IF (counter%/8*10)MOD10 = 0 THEN grouping% = 60
  7335. ENDCASE
  7336. 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%)
  7337. NEXT
  7338. REM routine for groups crossing systems
  7339. IF system% = 1 AND longscore$ = "n" AND crossing$ = "y" THEN
  7340. FOR counter% = 0 TO (divs%-1)
  7341. 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
  7342. :
  7343. NEXT
  7344. ENDIF
  7345. :
  7346. hposition% = (leftend%*factor)+inc%+addition%+(grouplength%/divs%*(divs%-1)/2*factor)
  7347. vposition% =((v%+32)-(524*(system%-1)))
  7348. REM routine for groups crossing systems
  7349. IF hposition% > 2112 THEN
  7350. hposition% = hposition% - 2062
  7351. vposition% = vposition% - 524
  7352. ENDIF
  7353. IF longscore$ = "y" THEN
  7354. IF longstemdir$(voice%) = "D" THEN vposition% -= 50
  7355. ELSE
  7356. IF shortstemdir$(voice%) ="D" THEN vposition% -= 50
  7357. ENDIF
  7358. IF longstemdir$(voice%) = "U" THEN vposition% -= 6
  7359. IF shortstemdir$(voice%) ="U" THEN vposition% -= 6
  7360. :
  7361. grouplength% = grouplength%/beatfactor%
  7362. lownum% = grouplength%
  7363. IF change% = 0 THEN decimal% = 0
  7364. IF change% = 1 THEN lownum% = lownum%*2 : decimal% = 0
  7365. IF change% = 2 THEN lownum% = lownum%*4 : decimal% = 0
  7366. IF change% = 3 THEN lownum% = lownum%*8 : decimal% = 0
  7367. IF change% = -1 THEN lownum = lownum%/2 : decimal% = (lownum*10)MOD10 : lownum% = lownum*1
  7368. IF change% = -2 THEN lownum = lownum%/4 : decimal% = (lownum*10)MOD10 : lownum% = lownum*1
  7369. IF change% = -3 THEN lownum = lownum%/8 : decimal% = (lownum*10)MOD10 : lownum% = lownum*1
  7370. IF change% = -4 THEN lownum = lownum%/16 :decimal% = (lownum*10)MOD10 : lownum% = lownum*1
  7371. IF change% = -5 THEN lownum = lownum%/32 :decimal% = (lownum*10)MOD10 : lownum% = lownum*1
  7372. :
  7373. printname$ = "n"
  7374. WHILE ((divs%/2)*10)MOD10 = 0 AND ((lownum%/2)*10)MOD10 = 0 AND decimal% = 0
  7375. divs% = divs%/2 : lownum% = lownum%/2 : change% -= 1 : printname$ = "y"
  7376. ENDWHILE
  7377. IF change% < -2 THEN printname$ = "y"
  7378. :
  7379. VDU 23,128,32,32,32,32,32,32,32,32
  7380. VDU 23,129,48,40,36,34,32,32,32,32
  7381. VDU 23,130,48,40,36,50,40,36,34,32
  7382. VDU 23,131,36,34,32,32,32,32,32,32
  7383. VDU 23,132,48,40,36,50,40,36,50,40
  7384. VDU 23,133,36,50,40,36,50,32,32,32
  7385. VDU 23,134,36,50,40,36,50,40,36,34
  7386. VDU 23,135,1,1,1,29,63,63,62,28
  7387. VDU 23,136,0,0,1,1,1,1,1,1
  7388. VDU 23,137,1,1,1,29,35,35,34,28
  7389. VDU 23,138,0,0,0,28,34,34,34,28
  7390. :
  7391. MOVE hposition%,vposition%
  7392. IF divs% < 10 THEN VDU 8
  7393. IF divs% >= 10 THEN
  7394. VDU 8 : VDU 8
  7395. ENDIF
  7396. :
  7397. IF decimal% = 0 THEN
  7398. IF divs% <> lownum% THEN
  7399. IF printname$ = "y" THEN
  7400. PRINT ,;divs%;":";lownum%;
  7401. CASE change% OF
  7402. WHEN 3 : PRINT"//////"
  7403. WHEN 2 : PRINT CHR$(134) : MOVE hposition%,vposition%+16
  7404. IF divs% < 10 THEN VDU 8
  7405. IF divs% >= 10 THEN
  7406. VDU 8 : VDU 8
  7407. ENDIF
  7408. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7409. PRINT ,;" ";
  7410. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7411. PRINT CHR$(132)
  7412. WHEN 1 : PRINT CHR$(133) : MOVE hposition%,vposition%+16
  7413. IF divs% < 10 THEN VDU 8
  7414. IF divs% >= 10 THEN
  7415. VDU 8 : VDU 8
  7416. ENDIF
  7417. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7418. PRINT ,;" ";
  7419. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7420. PRINT CHR$(132)
  7421. WHEN 0 : PRINT CHR$(131) : MOVE hposition%,vposition%+16
  7422. IF divs% < 10 THEN VDU 8
  7423. IF divs% >= 10 THEN
  7424. VDU 8 : VDU 8
  7425. ENDIF
  7426. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7427. PRINT ,;" ";
  7428. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7429. PRINT CHR$(132)
  7430. WHEN -1 : PRINT CHR$(128) : MOVE hposition%,vposition%+16
  7431. IF divs% < 10 THEN VDU 8
  7432. IF divs% >= 10 THEN
  7433. VDU 8 : VDU 8
  7434. ENDIF
  7435. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7436. PRINT ,;" ";
  7437. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7438. PRINT CHR$(130)
  7439. WHEN -2 : PRINT CHR$(128) : MOVE hposition%,vposition%+16
  7440. IF divs% < 10 THEN VDU 8
  7441. IF divs% >= 10 THEN
  7442. VDU 8 : VDU 8
  7443. ENDIF
  7444. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7445. PRINT ,;" ";
  7446. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7447. PRINT CHR$(129)
  7448. WHEN -3 : PRINT CHR$(135) : MOVE hposition%,vposition%+16
  7449. IF divs% < 10 THEN VDU 8
  7450. IF divs% >= 10 THEN
  7451. VDU 8 : VDU 8
  7452. ENDIF
  7453. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7454. PRINT ,;" ";
  7455. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7456. PRINT CHR$(136)
  7457. WHEN -4 : PRINT CHR$(137) : MOVE hposition%,vposition%+16
  7458. IF divs% < 10 THEN VDU 8
  7459. IF divs% >= 10 THEN
  7460. VDU 8 : VDU 8
  7461. ENDIF
  7462. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7463. PRINT ,;" ";
  7464. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7465. PRINT CHR$(136)
  7466. WHEN -5 : PRINT CHR$(138)
  7467. OTHERWISE
  7468. ENDCASE
  7469. ELSE PRINT ,;divs%;":";lownum%
  7470. ENDIF
  7471. ENDIF
  7472. ELSE PRINT ,;divs%;":";lownum%;".";decimal%;
  7473. CASE change% OF
  7474. WHEN -1 : PRINT CHR$(128) : MOVE hposition%,vposition%+16
  7475. IF divs% < 10 THEN VDU 8
  7476. IF divs% >= 10 THEN
  7477. VDU 8 : VDU 8
  7478. ENDIF
  7479. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7480. PRINT ,;" ";".";decimal%;
  7481. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7482. PRINT CHR$(130)
  7483. WHEN -2 : PRINT CHR$(128) : MOVE hposition%,vposition%+16
  7484. IF divs% < 10 THEN VDU 8
  7485. IF divs% >= 10 THEN
  7486. VDU 8 : VDU 8
  7487. ENDIF
  7488. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7489. PRINT ,;" ";".";decimal%;
  7490. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7491. PRINT CHR$(129)
  7492. WHEN -3 : PRINT CHR$(135) : MOVE hposition%,vposition%+16
  7493. IF divs% < 10 THEN VDU 8
  7494. IF divs% >= 10 THEN
  7495. VDU 8 : VDU 8
  7496. ENDIF
  7497. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7498. PRINT ,;" ";".";decimal%;
  7499. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7500. PRINT CHR$(136)
  7501. WHEN -4 : PRINT CHR$(137) : MOVE hposition%,vposition%+16
  7502. IF divs% < 10 THEN VDU 8
  7503. IF divs% >= 10 THEN
  7504. VDU 8 : VDU 8
  7505. ENDIF
  7506. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7507. PRINT ,;" ";".";decimal%;
  7508. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7509. PRINT CHR$(136)
  7510. WHEN -5 : PRINT CHR$(138)
  7511. OTHERWISE
  7512. ENDCASE
  7513. ENDCASE
  7514. ENDIF
  7515. :
  7516. REM routine for groups crossing systems
  7517. IF system% = 1 AND longscore$ = "n" AND crossing$ = "y" THEN
  7518. MOVE hposition%-1600+inc%,vposition%-524
  7519. IF divs% < 10 THEN VDU 8
  7520. IF divs% >= 10 THEN
  7521. VDU 8 : VDU 8
  7522. ENDIF
  7523. :
  7524. IF decimal% = 0 THEN
  7525. IF divs% <> lownum% THEN
  7526. IF printname$ = "y" THEN
  7527. PRINT ,;divs%;":";lownum%;
  7528. CASE change% OF
  7529. WHEN 3 : PRINT"//////"
  7530. WHEN 2 : PRINT CHR$(134) : MOVE hposition%-1600+inc%,vposition%+16-524
  7531. IF divs% < 10 THEN VDU 8
  7532. IF divs% >= 10 THEN
  7533. VDU 8 : VDU 8
  7534. ENDIF
  7535. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7536. PRINT ,;" ";
  7537. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7538. PRINT CHR$(132)
  7539. WHEN 1 : PRINT CHR$(133) : MOVE hposition%-1600+inc%,vposition%+16-524
  7540. IF divs% < 10 THEN VDU 8
  7541. IF divs% >= 10 THEN
  7542. VDU 8 : VDU 8
  7543. ENDIF
  7544. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7545. PRINT ,;" ";
  7546. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7547. PRINT CHR$(132)
  7548. WHEN 0 : PRINT CHR$(131) : MOVE hposition%-1600+inc%,vposition%+16-524
  7549. IF divs% < 10 THEN VDU 8
  7550. IF divs% >= 10 THEN
  7551. VDU 8 : VDU 8
  7552. ENDIF
  7553. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7554. PRINT ,;" ";
  7555. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7556. PRINT CHR$(132)
  7557. WHEN -1 : PRINT CHR$(128) : MOVE hposition%-1600+inc%,vposition%+16-524
  7558. IF divs% < 10 THEN VDU 8
  7559. IF divs% >= 10 THEN
  7560. VDU 8 : VDU 8
  7561. ENDIF
  7562. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7563. PRINT ,;" ";
  7564. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7565. PRINT CHR$(130)
  7566. WHEN -2 : PRINT CHR$(128) : MOVE hposition%-1600+inc%,vposition%+16-524
  7567. IF divs% < 10 THEN VDU 8
  7568. IF divs% >= 10 THEN
  7569. VDU 8 : VDU 8
  7570. ENDIF
  7571. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7572. PRINT ,;" ";
  7573. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7574. PRINT CHR$(129)
  7575. WHEN -3 : PRINT CHR$(135) : MOVE hposition%-1600+inc%,vposition%+16-524
  7576. IF divs% < 10 THEN VDU 8
  7577. IF divs% >= 10 THEN
  7578. VDU 8 : VDU 8
  7579. ENDIF
  7580. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7581. PRINT ,;" ";
  7582. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7583. PRINT CHR$(136)
  7584. WHEN -4 : PRINT CHR$(137) : MOVE hposition%-1600+inc%,vposition%+16-524
  7585. IF divs% < 10 THEN VDU 8
  7586. IF divs% >= 10 THEN
  7587. VDU 8 : VDU 8
  7588. ENDIF
  7589. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7590. PRINT ,;" ";
  7591. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7592. PRINT CHR$(136)
  7593. WHEN -5 : PRINT CHR$(138)
  7594. OTHERWISE
  7595. ENDCASE
  7596. ELSE PRINT ,;divs%;":";lownum%
  7597. ENDIF
  7598. ENDIF
  7599. ELSE PRINT ,;divs%;":";lownum%;".";decimal%;
  7600. CASE change% OF
  7601. WHEN -1 : PRINT CHR$(128) : MOVE hposition%-1600+inc%,vposition%+16-524
  7602. IF divs% < 10 THEN VDU 8
  7603. IF divs% >= 10 THEN
  7604. VDU 8 : VDU 8
  7605. ENDIF
  7606. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7607. PRINT ,;" ";".";decimal%;
  7608. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7609. PRINT CHR$(130)
  7610. WHEN -2 : PRINT CHR$(128) : MOVE hposition%-1600+inc%,vposition%+16-524
  7611. IF divs% < 10 THEN VDU 8
  7612. IF divs% >= 10 THEN
  7613. VDU 8 : VDU 8
  7614. ENDIF
  7615. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7616. PRINT ,;" ";".";decimal%;
  7617. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7618. PRINT CHR$(129)
  7619. WHEN -3 : PRINT CHR$(135) : MOVE hposition%-1600,+inc%,vposition%+16-524
  7620. IF divs% < 10 THEN VDU 8
  7621. IF divs% >= 10 THEN
  7622. VDU 8 : VDU 8
  7623. ENDIF
  7624. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7625. PRINT ,;" ";".";decimal%;
  7626. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7627. PRINT CHR$(136)
  7628. WHEN -4 : PRINT CHR$(137) : MOVE hposition%-1600+inc%,vposition%+16-524
  7629. IF divs% < 10 THEN VDU 8
  7630. IF divs% >= 10 THEN
  7631. VDU 8 : VDU 8
  7632. ENDIF
  7633. REM IF printing$ = "n" THEN GCOL 63 ELSE GCOL 0
  7634. PRINT ,;" ";".";decimal%;
  7635. REM IF printing$ = "n" THEN GCOL 0 ELSE GCOL 63
  7636. PRINT CHR$(136)
  7637. WHEN -5 : PRINT CHR$(138)
  7638. OTHERWISE
  7639. ENDCASE
  7640. ENDCASE
  7641. ENDIF
  7642. ENDIF
  7643. :
  7644. ENDIF
  7645. NEXT
  7646. :
  7647. NEXT
  7648. :
  7649. ENDPROC
  7650. :
  7651. REM*******************************************************
  7652. :
  7653. DEF PROCdisplaysubmenu
  7654. :
  7655. IF easiermenus$ = "n" THEN
  7656. PROCwindow(20,66,60,39)
  7657. CLS : OFF
  7658. PRINT'" Notehead sizes N"
  7659. PRINT " Longscore/Shortscore L"
  7660. PRINT " Stem lengths S"
  7661. PRINT " Beats posns/frequecy P"
  7662. PRINT " Beat numbers/diffs I"
  7663. PRINT " Beat numbers/diffs unit J"
  7664. PRINT " Dynamics positions F"
  7665. PRINT " Note number freq G"
  7666. PRINT " Bar numbers Z"
  7667. PRINT " Intervals settings Q"
  7668. PRINT " Remove: "
  7669. PRINT " staves, ledgers, clefs C"
  7670. PRINT " lower stave (shrt sc) U"
  7671. PRINT " barlines B"
  7672. PRINT " beats T"
  7673. PRINT " names, voice numbers V"
  7674. PRINT " accidentals A"
  7675. PRINT " stems, beams R"
  7676. PRINT " durations D"
  7677. PRINT " amplitudes M"
  7678. PRINT " beat numbers (n,1st,y) O"
  7679. PRINT " notenumbers H"
  7680. PRINT " notenames E"
  7681. PRINT " intervals K"
  7682. PRINT " play screen renew Y"
  7683. PRINT " all except noteheads X"
  7684. ELSE
  7685. PROCwindow(20,66,60,12)
  7686. CLS : OFF
  7687. PRINT'" Notehead sizes N"
  7688. PRINT '" Longscore/Shortscore L"
  7689. PRINT '" Stem lengths S"
  7690. PRINT '" Beats posns/frequecy P"
  7691. PRINT '" Beat numbers/diffs I"
  7692. PRINT '" Beat numbers/diffs unit J"
  7693. PRINT '" Dynamics positions F"
  7694. PRINT '" Note number freq G"
  7695. PRINT '" Bar numbers Z"
  7696. PRINT '" Intervals settings Q"
  7697. PRINT '" Remove: "
  7698. PRINT '" staves, ledgers, clefs C"
  7699. PRINT '" lower stave (shrt sc) U"
  7700. PRINT '" barlines B"
  7701. PRINT '" beats T"
  7702. PRINT '" names, voice numbers V"
  7703. PRINT '" accidentals A"
  7704. PRINT '" stems, beams R"
  7705. PRINT '" durations D"
  7706. PRINT '" dynamics M"
  7707. PRINT '" beat numbers (n,1st,y) O"
  7708. PRINT '" notenumbers H"
  7709. PRINT '" notenames E"
  7710. PRINT '" intervals K"
  7711. PRINT '" play screen renew Y"
  7712. PRINT '" all except noteheads X"
  7713. ENDIF
  7714. :
  7715. CASE GET$ OF
  7716. WHEN "E","e" :
  7717. IF notenames$ = "y" THEN notenames$ = "n" ELSE notenames$ = "y"
  7718. WHEN "N","n" :
  7719. CLS
  7720. PRINT'" What size note-heads? (B/S/V) "
  7721. CASE GET$ OF
  7722. WHEN "B","b" : notehead$ = "big"
  7723. WHEN "S","s" : notehead$ = "small"
  7724. WHEN "V","v" : notehead$ = "vsmall"
  7725. ENDCASE
  7726. WHEN "L","l" :
  7727. IF longscore$ = "n" THEN longscore$ = "y" ELSE longscore$ = "n"
  7728. IF longscore$ = "n" THEN
  7729. startv1% = startv% : startv% =1
  7730. ELSE startv% = startv1%
  7731. ENDIF
  7732. WHEN "S","s" :
  7733. CLS
  7734. INPUT'" Which voice "voys%
  7735. voys% -= 1
  7736. PRINT'" stems to end how many"
  7737. PRINT" octaves from top"
  7738. INPUT" stave-line (0,1,-1 etc) "st
  7739. INPUT " stems up or down (U/D)"stemdir$
  7740. IF longscore$ = "n" THEN
  7741. shortbeamposn%(voys%) = st*56
  7742. IF shortbeamposn%(voys%) <= -112 THEN shortbeamposn%(voys%)-=48
  7743. shortstemdir$(voys%) = stemdir$
  7744. ENDIF
  7745. IF longscore$ = "y" THEN
  7746. longbeamposn%(voys%) = st*56
  7747. longstemdir$(voys%) = stemdir$
  7748. ENDIF
  7749. :
  7750. WHEN "P","p" :
  7751. CLS
  7752. PRINT'" Beats positions or frequecy (P/F)"
  7753. CASE GET$ OF
  7754. WHEN "P","p" :
  7755. INPUT'" Upper or lower beats (U/L)"whichset$
  7756. PRINT '" up or down by how many"
  7757. INPUT " stave-lines (1,-1 etc)"move%
  7758. IF whichset$ = "U" THEN
  7759. longbeatsupper% += (move%*16)
  7760. ELSE longbeatslower% += (move%*16)
  7761. ENDIF
  7762. OTHERWISE
  7763. PRINT'" Beats frequency doubled/halved (+/-) "
  7764. CASE GET$ OF
  7765. WHEN "+","=" : beatstep% = beatstep%/2
  7766. WHEN "_","-" : beatstep% = beatstep%*2
  7767. OTHERWISE
  7768. ENDCASE
  7769. :
  7770. ENDCASE
  7771. :
  7772. WHEN "Z","z" : CLS : INPUT'" Bar nos how often (1,2 etc) "barnosoften%
  7773. WHEN "Y","y" :
  7774. IF playnewscreen$ = "y" THEN playnewscreen$ = "n" ELSE playnewscreen$ = "y"
  7775. WHEN "I","i" :
  7776. IF beatnum_diff$ = "num" THEN beatnum_diff$ = "diff" ELSE beatnum_diff$ = "num"
  7777. WHEN "J","j" :
  7778. IF beatunits$ = "big" THEN beatunits$ = "small" ELSE beatunits$ = "big"
  7779. WHEN "C","c" :
  7780. IF staves$ = "y" THEN staves$ = "n" ELSE staves$ = "y"
  7781. WHEN "B","b" :
  7782. IF barlines$ = "y" THEN barlines$ = "n" ELSE barlines$ = "y"
  7783. WHEN "T","t" :
  7784. IF beats$ = "y" THEN beats$ = "n" ELSE beats$ = "y"
  7785. WHEN "U","u" :
  7786. IF lowerstave$ = "y" THEN lowerstave$ = "n" ELSE lowerstave$ = "y"
  7787. WHEN "V","v" :
  7788. IF names$ = "y" THEN names$ = "n" ELSE names$ = "y"
  7789. WHEN "A","a" :
  7790. IF accidentals$ = "y" THEN accidentals$ = "n" ELSE accidentals$ = "y"
  7791. WHEN "R","r" :
  7792. IF stems$ = "y" THEN stems$ = "n" ELSE stems$ = "y"
  7793. WHEN "D","d" :
  7794. IF durations$ = "y" THEN durations$ = "n" ELSE durations$ = "y"
  7795. WHEN "M","m" :
  7796. CASE amplitudes$ OF
  7797. WHEN "n" : amplitudes$ = "y"
  7798. WHEN "y" : amplitudes$ = "stepped"
  7799. WHEN "stepped" : amplitudes$ = "n"
  7800. ENDCASE
  7801. WHEN "O","o" :
  7802. CASE beatnumbers$ OF
  7803. WHEN "y" : beatnumbers$ = "n"
  7804. WHEN "n" : beatnumbers$ = "first"
  7805. WHEN "first" : beatnumbers$ = "y"
  7806. ENDCASE
  7807. WHEN "H","h" :
  7808. CASE notenumbers$ OF
  7809. WHEN "last" : notenumbers$ = "n"
  7810. WHEN "y" : notenumbers$ = "last"
  7811. WHEN "from1" : notenumbers$ = "y"
  7812. WHEN "n" : notenumbers$ = "from1"
  7813. ENDCASE
  7814. WHEN "F","f" :
  7815. CLS
  7816. INPUT'" Which voice "voys%
  7817. voys% -= 1
  7818. PRINT' " dynamics up/down by how many "
  7819. INPUT " stave-lines (1,-1 etc) "dy%
  7820. dy% = dy%*16
  7821. IF longscore$ = "y" THEN
  7822. longamppos%(voys%) += dy%
  7823. ELSE shortamppos%(voys%) += dy%
  7824. ENDIF
  7825. WHEN "G","g" :
  7826. CLS
  7827. PRINT'" Note numbers every 1/2/4/10 notes (0 = 10) "
  7828. CASE GET$ OF
  7829. WHEN "1" : nosevery% = 1
  7830. WHEN "2" : nosevery% = 2
  7831. WHEN "4" : nosevery% = 4
  7832. OTHERWISE nosevery% = 10
  7833. ENDCASE
  7834. INPUT' " starting at note number "startnos%
  7835. :
  7836. WHEN "Q","q" :
  7837. CLS
  7838. PRINT'" Set number/type of intervals displayed"
  7839. PRINT" or compound reduction point? (N/C)"
  7840. CASE GET$ OF
  7841. WHEN "N","n" :
  7842. PRINT'" Display intervals for how"
  7843. INPUT" many previous notes "numintervals%
  7844. PRINT'" Semitones, quartertones, "
  7845. PRINT" eighthtones or cents (S/Q/E/C) "
  7846. CASE GET$ OF
  7847. WHEN "S","s" : typeintervals$ = "s"
  7848. WHEN "Q","q" : typeintervals$ = "q"
  7849. WHEN "E","e" : typeintervals$ = "e"
  7850. WHEN "C","c" : typeintervals$ = "c"
  7851. ENDCASE
  7852. WHEN "C","c" :
  7853. PRINT'" Above which interval should"
  7854. PRINT" compounds be reduced for "
  7855. INPUT" the current interval type "compound%
  7856. CASE typeintervals$ OF
  7857. WHEN "s" : compoundpitch% = compound%
  7858. WHEN "q" : compoundquarter% = compound%
  7859. WHEN "e" : compoundeighth% = compound%
  7860. WHEN "c" : compoundcent% = compound%
  7861. ENDCASE
  7862. ENDCASE
  7863. WHEN "K","k" :
  7864. IF displayintervals$ = "y" THEN displayintervals$ = "n" ELSE displayintervals$ = "y"
  7865. WHEN "X","x" :
  7866. IF xoption$ = "y" THEN xoption$ = "n" ELSE xoption$ = "y"
  7867. IF xoption$ = "y" THEN
  7868. staves$ = "y" : barlines$ = "y" : beats$ = "y" : names$ = "y"
  7869. accidentals$ = "y" : stems$ = "y" : durations$ = "y"
  7870. amplitudes$ = "y" : envelopes$ = "y" : glissandos$ = "y"
  7871. beatnumbers$ = "y"
  7872. ELSE
  7873. staves$ = "n" : barlines$ = "n" : beats$ = "n" : names$ = "n"
  7874. accidentals$ = "n" : stems$ = "n" : durations$ = "n"
  7875. amplitudes$ = "n" : envelopes$ = "n" : glissandos$ = "n"
  7876. beatnumbers$ = "n"
  7877. ENDIF
  7878. OTHERWISE VDU 7 : PROCdisplaysubmenu
  7879. ENDCASE
  7880. ON
  7881. PROCdisplay
  7882. ENDPROC
  7883. :
  7884. REM*********************************************************
  7885. :
  7886. DEF PROCclef(numstaves%,staves%(1),staves%(2),staves%(3),staves%(4),staves%(5),staves%(6),clefcomb$)
  7887. :
  7888. IF staves$ = "y" THEN
  7889. FOR count% = 1 TO numstaves%
  7890. IF MID$(clefcomb$,count%,1) = "T" OR MID$(clefcomb$,count%,1) = "P" THEN
  7891. LINE 48,staves%(count%)+20,52,staves%(count%)+20
  7892. LINE 44,staves%(count%)+16,56,staves%(count%)+16
  7893. LINE 42,staves%(count%)+12,52,staves%(count%)+12
  7894. LINE 58,staves%(count%)+12,58,staves%(count%)+12
  7895. LINE 40,staves%(count%)+8,48,staves%(count%)+8
  7896. LINE 58,staves%(count%)+8,58,staves%(count%)+8
  7897. LINE 40,staves%(count%)+4,42,staves%(count%)+4
  7898. LINE 58,staves%(count%)+4,58,staves%(count%)+4
  7899. LINE 38,staves%(count%)+0,40,staves%(count%)+0
  7900. LINE 54,staves%(count%)+0,56,staves%(count%)+0
  7901. LINE 38,staves%(count%)-4,38,staves%(count%)-4
  7902. LINE 50,staves%(count%)-4,54,staves%(count%)-4
  7903. LINE 38,staves%(count%)-8,38,staves%(count%)-8
  7904. LINE 46,staves%(count%)-8,52,staves%(count%)-8
  7905. LINE 36,staves%(count%)-12,52,staves%(count%)-12
  7906. LINE 32,staves%(count%)-16,50,staves%(count%)-16
  7907. LINE 24,staves%(count%)-20,44,staves%(count%)-20
  7908. LINE 20,staves%(count%)-24,42,staves%(count%)-24
  7909. LINE 14,staves%(count%)-28,26,staves%(count%)-28
  7910. LINE 42,staves%(count%)-28,42,staves%(count%)-28
  7911. LINE 12,staves%(count%)-32,22,staves%(count%)-32
  7912. LINE 42,staves%(count%)-32,42,staves%(count%)-32
  7913. LINE 12,staves%(count%)-36,22,staves%(count%)-36
  7914. LINE 34,staves%(count%)-36,52,staves%(count%)-36
  7915. LINE 10,staves%(count%)-40,18,staves%(count%)-40
  7916. LINE 30,staves%(count%)-40,56,staves%(count%)-40
  7917. LINE 10,staves%(count%)-44,14,staves%(count%)-44
  7918. LINE 24,staves%(count%)-44,32,staves%(count%)-44
  7919. LINE 42,staves%(count%)-44,42,staves%(count%)-44
  7920. LINE 56,staves%(count%)-44,60,staves%(count%)-44
  7921. LINE 10,staves%(count%)-48,14,staves%(count%)-48
  7922. LINE 24,staves%(count%)-48,32,staves%(count%)-48
  7923. LINE 42,staves%(count%)-48,42,staves%(count%)-48
  7924. LINE 56,staves%(count%)-48,60,staves%(count%)-48
  7925. LINE 10,staves%(count%)-52,16,staves%(count%)-52
  7926. LINE 24,staves%(count%)-52,26,staves%(count%)-52
  7927. LINE 42,staves%(count%)-52,42,staves%(count%)-52
  7928. LINE 56,staves%(count%)-52,60,staves%(count%)-52
  7929. LINE 12,staves%(count%)-56,16,staves%(count%)-56
  7930. LINE 28,staves%(count%)-56,30,staves%(count%)-56
  7931. LINE 42,staves%(count%)-56,42,staves%(count%)-56
  7932. LINE 56,staves%(count%)-56,60,staves%(count%)-56
  7933. LINE 18,staves%(count%)-60,22,staves%(count%)-60
  7934. LINE 42,staves%(count%)-60,42,staves%(count%)-60
  7935. LINE 52,staves%(count%)-60,58,staves%(count%)-60
  7936. LINE 22,staves%(count%)-64,54,staves%(count%)-64
  7937. LINE 42,staves%(count%)-68,42,staves%(count%)-68
  7938. LINE 42,staves%(count%)-72,42,staves%(count%)-72
  7939. LINE 22,staves%(count%)-76,28,staves%(count%)-76
  7940. LINE 42,staves%(count%)-76,42,staves%(count%)-76
  7941. LINE 18,staves%(count%)-80,32,staves%(count%)-80
  7942. LINE 42,staves%(count%)-80,42,staves%(count%)-80
  7943. LINE 14,staves%(count%)-84,28,staves%(count%)-84
  7944. LINE 44,staves%(count%)-84,44,staves%(count%)-84
  7945. LINE 14,staves%(count%)-88,22,staves%(count%)-88
  7946. LINE 44,staves%(count%)-88,44,staves%(count%)-88
  7947. LINE 24,staves%(count%)-92,42,staves%(count%)-92
  7948. IF MID$(clefcomb$,count%,1) = "P" THEN
  7949. MOVE 42,staves%(count%)+44
  7950. PRINT;"8"
  7951. ENDIF
  7952. ENDIF
  7953. IF MID$(clefcomb$,count%,1) = "B" OR MID$(clefcomb$,count%,1) = "D" THEN
  7954. LINE 20,staves%(count%)-4,38,staves%(count%)-4
  7955. LINE 16,staves%(count%)-8,18,staves%(count%)-8
  7956. LINE 38,staves%(count%)-8,44,staves%(count%)-8
  7957. LINE 58,staves%(count%)-8,60,staves%(count%)-8
  7958. LINE 12,staves%(count%)-12,24,staves%(count%)-12
  7959. LINE 40,staves%(count%)-12,48,staves%(count%)-12
  7960. LINE 12,staves%(count%)-16,28,staves%(count%)-16
  7961. LINE 40,staves%(count%)-16,48,staves%(count%)-16
  7962. LINE 16,staves%(count%)-20,28,staves%(count%)-20
  7963. LINE 40,staves%(count%)-20,48,staves%(count%)-20
  7964. LINE 20,staves%(count%)-24,24,staves%(count%)-24
  7965. LINE 40,staves%(count%)-24,48,staves%(count%)-24
  7966. LINE 58,staves%(count%)-24,60,staves%(count%)-24
  7967. LINE 40,staves%(count%)-28,48,staves%(count%)-28
  7968. LINE 40,staves%(count%)-32,48,staves%(count%)-32
  7969. LINE 36,staves%(count%)-36,44,staves%(count%)-36
  7970. LINE 32,staves%(count%)-40,40,staves%(count%)-40
  7971. LINE 28,staves%(count%)-44,34,staves%(count%)-44
  7972. LINE 20,staves%(count%)-48,30,staves%(count%)-48
  7973. LINE 10,staves%(count%)-52,18,staves%(count%)-52
  7974. IFMID$(clefcomb$,count%,1) = "D" THEN
  7975. MOVE 10,staves%(count%)-56
  7976. PRINT;"8"
  7977. ENDIF
  7978. ENDIF
  7979. NEXT
  7980. ENDIF
  7981. :
  7982. IF names$ = "y" THEN
  7983. stave% = 1
  7984. FOR count% = 0 TO lastcount%
  7985. IF MID$(clefcomb$,count%+1,1) = "P" THEN MOVE 20,staves%(stave%)+78 ELSE MOVE 20,staves%(stave%)+58
  7986. PRINT longinsts$(count%,0);
  7987. PRINT;"(";displayvoices%(startv%+count%);")" : REM voice number
  7988. stave% += EVAL(MID$(stavecombination$,count%+1,1))
  7989. NEXT
  7990. ENDIF
  7991. :
  7992. REM defining actamppos%() values
  7993. stave% = 1
  7994. FOR count% = 0 TO lastcount%
  7995. IF MID$(stavecombination$,count%+1,1) = "1" THEN
  7996. actamppos%(displayvoices%(startv%+count%)) = staves%(stave%)-128+longamppos%(displayvoices%(startv%+count%)-1)
  7997. ELSE actamppos%(displayvoices%(startv%+count%)) = staves%(stave%)-224+longamppos%(displayvoices%(startv%+count%)-1)
  7998. ENDIF
  7999. stave% += EVAL(MID$(stavecombination$,count%+1,1))
  8000. NEXT
  8001. :
  8002. :
  8003. REM barlines
  8004. IF barlines$ = "y" THEN
  8005. stave% = 1
  8006. FOR system% = 0 TO lastcount%
  8007. FOR barline% = 1 TO numbars%
  8008. horpos% = (960*barline%*factor)+80
  8009. IF notehead$ = "small" THEN horpos% += 16
  8010. IF notehead$ = "vsmall" THEN horpos% += 24
  8011. FOR thickness% = 2 TO 8 STEP 2
  8012. IF MID$(stavecombination$,system%+1,1) = "1" THEN
  8013. LINE horpos%+thickness%,staves%(stave%),horpos%+thickness%,staves%(stave%)-64
  8014. ELSE
  8015. LINE horpos%+thickness%,staves%(stave%),horpos%+thickness%,staves%(stave%)-160
  8016. ENDIF
  8017. NEXT
  8018. REM bar nos
  8019. IF printing$ = "n" THEN GCOL 3
  8020. IF tempi%(startbar%) <> tempi%(startbar%-1) THEN
  8021. MOVE 40,1145 : PRINT "b.";startbar%;" MM.";tempi%(startbar%)
  8022. ELSE MOVE 40,1145 : PRINT "b.";startbar%;" (MM.";tempi%(startbar%);")"
  8023. ENDIF
  8024. IF remarks$(startbar%,0) <> "" OR remarks$(startbar%,1) <> "" THEN
  8025. MOVE 40,1120 : PRINT remarks$(startbar%,0) : MOVE 40,1095 : PRINT remarks$(startbar%,1)
  8026. ENDIF
  8027. IF printing$ = "n" THEN GCOL 0
  8028. IF system% = 0 THEN
  8029. IF printing$ = "n" THEN GCOL 3
  8030. IF tempi%(startbar%+barline%) <> tempi%(startbar%+barline%-1) THEN
  8031. MOVE horpos%-125,1145 : PRINT startbar%+barline%;" MM.";tempi%(startbar%+barline%)
  8032. ELSE IF barline% MOD barnosoften% = 0 THEN MOVE horpos%-125,1145 : PRINT startbar%+barline%
  8033. ENDIF
  8034. IF remarks$(startbar%+barline%,0) <> "" OR remarks$(startbar%+barline%,1) <> "" THEN
  8035. MOVE horpos%,1120 : PRINT remarks$(startbar%+barline%,0)
  8036. MOVE horpos%,1095 : PRINT remarks$(startbar%+barline%,1)
  8037. ENDIF
  8038. REM print duration at bottom right
  8039. IF seeduration$ = "y" THEN
  8040. IF startbar% + barline% = startbar% + numbars% - 1 THEN
  8041. totaldur = 0
  8042. FOR count% = 1 TO startbar% + numbars% - 1
  8043. duration = 60/tempi%(count%)
  8044. totaldur = totaldur + duration
  8045. NEXT
  8046. totaldur% = totaldur
  8047. mins% = totaldur% DIV 60
  8048. secs% = totaldur% - (mins%*60)
  8049. MOVE 1200,50 : PRINT "duration ";mins%;" mins ";secs%;" secs"
  8050. ENDIF
  8051. ENDIF
  8052. IF printing$ = "n" THEN GCOL 0
  8053. ENDIF
  8054. NEXT
  8055. stave% += EVAL(MID$(stavecombination$,system%+1,1))
  8056. NEXT
  8057. ENDIF
  8058. :
  8059. ENDPROC
  8060. :
  8061. REM*************************************************
  8062. :
  8063. DEF PROClongvalue(pos%(0),pos%(1),pos%(2),clefcomb$)
  8064. :
  8065. staff% = 1
  8066. finish% = endv%-startv%
  8067. IF finish% > 2 THEN finish% = 2
  8068. FOR ct% = 0 TO finish%
  8069. CASE MID$(clefcomb$,staff%,1) OF
  8070. WHEN "P" : decrement% = 360
  8071. WHEN "T" : decrement% = 304
  8072. WHEN "B" : decrement% = 208
  8073. WHEN "D" : decrement% = 152
  8074. ENDCASE
  8075. value%(ct%) = pos%(ct%) - decrement%
  8076. staff% += EVAL(MID$(stavecombination$,ct%+1,1))
  8077. NEXT
  8078. :
  8079. FOR ct% = 0 TO finish%
  8080. actbeamposn%(ct%) = longbeamposn%(displayvoices%(startv%+ct%)-1) + pos%(ct%)
  8081. NEXT
  8082. ENDPROC
  8083. :
  8084. REM*************************************************
  8085. :
  8086. DEF PROCconvertdur
  8087. :
  8088. REM converts dur% from beats to 1/20ths of a second
  8089. converter = (60 * 20)/(tempi%(barno%) * 960)
  8090. dur = dur% * converter
  8091. fraction = ((dur*10)DIV1)MOD10
  8092. IF fraction>4 THEN dur% = dur+1 ELSE dur% = dur
  8093. IF dur% = 0 THEN dur% = 1
  8094. IF dur% > 999 THEN dur% = 998 : REM max 3 array cells available
  8095. :
  8096. ENDPROC
  8097. :
  8098. REM**********************************************
  8099. :
  8100. DEF PROCreconvertdur
  8101. :
  8102. converter = (60 * 20)/(tempi%(brrr%) * 960)
  8103. dur% = dur%/converter
  8104. :
  8105. ENDPROC
  8106. :
  8107. REM************************************************
  8108. :
  8109. DEF PROCseriesdurations
  8110. :
  8111. IF easiermenus$ = "n" THEN PROCwindow(20,69,60,55) ELSE PROCwindow(20,69,60,42)
  8112. CLS
  8113. PRINT'" How many durations "
  8114. PRINT'" (to fill gaps between attacks "
  8115. PRINT'" press 111 or to half-fill gaps "
  8116. INPUT'" between attacks press 222) "numdurations%
  8117. IF numdurations% = 0 THEN numdurations% = 1
  8118. IF numdurations% = 111 OR numdurations% = 222 THEN PROCdurationsbetween
  8119. :
  8120. IF numdurations% = 1 THEN
  8121. PRINT'" the duration is:" : INPUT' " bars "b% : INPUT' " beats "beats%
  8122. PROCalterbeats : dur% = (b%*960)+beats%
  8123. durations%(0) = dur%
  8124. ELSE
  8125. PRINT'" Are all the durations the same?"
  8126. PRINT'" (no = n/2)"
  8127. CASE GET$ OF
  8128. WHEN "N","n","2"
  8129. FOR count% = 0 TO (numdurations% - 1)
  8130. PRINT'" duration ";count%;" is:"
  8131. INPUT'" bars "b%
  8132. INPUT'" beats "beats% : PROCalterbeats
  8133. dur% = (b%*960)+beats%
  8134. durations%(count%) = dur%
  8135. NEXT
  8136. OTHERWISE
  8137. : PRINT'" the duration is:" : INPUT' " bars "b% : INPUT' " beats "beats%
  8138. PROCalterbeats : dur% = (b%*960)+beats%
  8139. FOR count% = 0 TO (numdurations%-1) : durations%(count%) = dur% : NEXT
  8140. ENDCASE
  8141. ENDIF
  8142. :
  8143. REM function can feed durats similarly into durations%()
  8144. :
  8145. PROCinsertdurations
  8146. :
  8147. ENDPROC
  8148. :
  8149. REM***********************************************
  8150. :
  8151. DEF PROCinsertdurations
  8152. :
  8153. CLS
  8154. IF seequery$ = "y" THEN
  8155. PRINT'" Do you want to read these "
  8156. PRINT " durations into the array? "
  8157. CASE GET$ OF
  8158. WHEN "N","n" : PROCdisplay : REM durations%() remains intact
  8159. OTHERWISE
  8160. ENDCASE
  8161. ENDIF : REM seequery$
  8162. :
  8163. IF screenvoices$ = "n" THEN
  8164. INPUT' " Which voice "voice%
  8165. IF voice% = 0 THEN PROCpressenter
  8166. ELSE
  8167. PRINT'" Which screen voice "
  8168. CASE GET$ OF
  8169. WHEN "1" : voice% = 1
  8170. WHEN "2" : voice% = 2
  8171. WHEN "3" : voice% = 3
  8172. OTHERWISE PROCpressenter
  8173. ENDCASE
  8174. ENDIF
  8175. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  8176. voice% -= 1
  8177. IF voice% >= 0 THEN samevoice% = voice%
  8178. IF voice% = -1 THEN voice% = samevoice%
  8179. :
  8180. IF quickcopy$ = "n" THEN
  8181. INPUT'" Starting at bar number "bars%
  8182. INPUT " beat "beats% : PROCalterbeats
  8183. startat% = (bars%*(10^3))+beats%
  8184. ELSE
  8185. INPUT ' " starting at note number "along%
  8186. IF along% = 0 THEN along% = 1
  8187. along%-=1
  8188. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  8189. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  8190. beats% = copystartbeat%
  8191. PROCalterbeats
  8192. startat% = (copystartbar%*(10^3))+beats%
  8193. ENDIF
  8194. :
  8195. PROCsearch(startat%)
  8196. shunt$ = "N"
  8197. :
  8198. FOR count% = startcell% TO (startcell%+(numdurations%-1))
  8199. PROCcellfill(count%,voice%,999,999,999,9,999,durations%(count%-startcell%),99,99)
  8200. NEXT
  8201. :
  8202. PROCdisplay
  8203. :
  8204. ENDPROC
  8205. :
  8206. REM*************************************************
  8207. :
  8208. DEF PROCinsertamplitudes
  8209. :
  8210. CLS
  8211. repeatposit$ = "n"
  8212. IF seequery$ = "y" THEN
  8213. PRINT'" Do you want to read these amplitudes "
  8214. PRINT " into the array? "
  8215. CASE GET$ OF
  8216. WHEN "N","n" : PROCdisplay : REM amplitudes%()) remains intact
  8217. OTHERWISE
  8218. ENDCASE
  8219. ENDIF : REM seequery$
  8220. :
  8221. IF ampmethod$ = "sample" THEN
  8222. IF screenvoices$ = "n" THEN
  8223. INPUT' " Which voice "voice%
  8224. IF voice% = 0 THEN PROCpressenter
  8225. ELSE
  8226. PRINT'" Which screen voice "
  8227. CASE GET$ OF
  8228. WHEN "1" : voice% = 1
  8229. WHEN "2" : voice% = 2
  8230. WHEN "3" : voice% = 3
  8231. OTHERWISE PROCpressenter
  8232. ENDCASE
  8233. ENDIF
  8234. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  8235. voice% -= 1
  8236. IF voice% >= 0 THEN samevoice% = voice%
  8237. IF voice% = -1 THEN voice% = samevoice%
  8238. :
  8239. IF quickcopy$ = "y" THEN
  8240. INPUT ' " starting at note number "along%
  8241. IF along% = 0 THEN along% = 1
  8242. along%-=1
  8243. bars% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  8244. beats% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  8245. holdbar% = bars%
  8246. holdbeat% = beats%
  8247. PROCalterbeats
  8248. startat% = (bars%*(10^3))+beats%
  8249. :
  8250. ELSE
  8251. :
  8252. INPUT'" Starting at bar number "bars%
  8253. IF bars% = 0 THEN
  8254. bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
  8255. ENDIF
  8256. holdbar% = bars%
  8257. IF repeatposit$ = "y" THEN
  8258. PRINT'" bar ";bars%;" beat ";beats%;"?"
  8259. PRINT'" (for OK press 0, if not OK press X)"
  8260. CASE GET$ OF
  8261. WHEN"X","x" : PROCinsertpitches
  8262. OTHERWISE
  8263. ENDCASE
  8264. ELSE
  8265. INPUT " beat "beats%
  8266. holdbeat% = beats%
  8267. ENDIF
  8268. PROCalterbeats
  8269. startat% = (bars%*(10^3))+beats%
  8270. :
  8271. ENDIF
  8272. :
  8273. ENDIF
  8274. :
  8275. PROCsearch(startat%)
  8276. shunt$ = "N"
  8277. :
  8278. FOR count% = startcell% TO (startcell%+(numamplitudes%-1))
  8279. PROCcellfill(count%,voice%,999,999,999,amplitudes%(count%-startcell%),999,999,99,99)
  8280. NEXT
  8281. :
  8282. PROCdisplay
  8283. :
  8284. ENDPROC
  8285. :
  8286. REM************************************************
  8287. :
  8288. DEF PROCassignvoices
  8289. :
  8290. IF defaultvoices$ = "y" THEN
  8291. waveforms$() = "WaveSynth-Beep"
  8292. ELSE
  8293. CLS
  8294. PRINT '" Assign waveforms to"
  8295. INPUT" how many voices "vcesx%
  8296. FOR count% = 1 TO vcesx%
  8297. PRINT'" voice ";count%;" is which voice number"
  8298. INPUT vcen%
  8299. PRINT'" voice ";vcen%;
  8300. IF insts$(vcen%,0) <> "" THEN PRINT " (";insts$(vcen%,0);")"
  8301. PRINT" is assigned which waveform?"
  8302. INPUT waveform$
  8303. waveforms$(vcen%) = waveform$
  8304. NEXT
  8305. ENDIF
  8306. :
  8307. ENDPROC
  8308. :
  8309. REM************************************************
  8310. :
  8311. DEF PROCseriesenvelopes
  8312. :
  8313. REM envelopes%() and glissandos%() are always input at the same time
  8314. IF easiermenus$ = "n" THEN PROCwindow(20,69,73,45) ELSE PROCwindow(20,69,73,42)
  8315. IF gradations$ = "y" THEN PRINT'" Input gradations as if envelopes with 4 phases "
  8316. INPUT'" How many envelopes/glissandos "numenvelopes%
  8317. IF numenvelopes% = 0 THEN numenvelopes% = 1
  8318. :
  8319. IF numenvelopes% > 1 THEN
  8320. PRINT '" are the envelopes all the same? "
  8321. PRINT '" (Y/0/1, N/2) "
  8322. CASE GET$ OF
  8323. WHEN "N","n","2" : sameenvelopes$ = "n"
  8324. OTHERWISE sameenvelopes$ = "y"
  8325. ENDCASE
  8326. ELSE
  8327. sameenvelopes$ = "y"
  8328. ENDIF
  8329. :
  8330. FOR count% = 0 TO (numenvelopes%-1)
  8331. IF sameenvelopes$ = "n" OR (sameenvelopes$ ="y" AND count% = 0) THEN
  8332. IF numphases% <> 4 THEN
  8333. PRINT'" Envelope ";count%+1;
  8334. INPUT " has how many phases? "numphases%
  8335. ENDIF
  8336. :
  8337. CASE numphases% OF
  8338. :
  8339. WHEN 0 :
  8340. INPUT'" amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
  8341. amp2% = 9
  8342. gliss1% = 50
  8343. ph2% = 0 : ph1% = 0 : amp4% = 0 : amp3% = 0 : gliss3% = 10 : gliss2% = 50
  8344. :
  8345. WHEN 4 :
  8346. INPUT'" amplitude is (0 = previous) "amp$
  8347. IF amp$ = "" THEN amp$ = prevamp$
  8348. COLOUR 3 : PRINT'" ";amp$
  8349. wait$ = INKEY$(20) : COLOUR 0
  8350. PROCconvertdynamics : amp1% = amp%
  8351. INPUT'" gradation is (select from 1-9) "gradation%
  8352. IF gradation% = 0 THEN gradation% = prevgradation%
  8353. COLOUR 3 : PRINT' gradation%
  8354. wait$ = INKEY$(20) : COLOUR 0
  8355. amp2% = 9
  8356. amp3% = gradation%
  8357. gliss1% = 50
  8358. ph2% = 0 : ph1% = 0 : amp4% = 0 : gliss3% = 10 : gliss2% = 50
  8359. prevamp$ = amp$ : prevgradation% = gradation%
  8360. :
  8361. WHEN 1 :
  8362. INPUT'" starting amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
  8363. INPUT'" destination amplitude is "amp$ : PROCconvertdynamics : amp2% = amp%
  8364. INPUT'" glissando is (in 1/8 tones, max 48,-48) "gliss%
  8365. gliss1% = 50-gliss%
  8366. ph2% = 0 : ph1% = 0 : amp4% = 0 : amp3% = 0 : gliss3% = 10 : gliss2% = 50
  8367. :
  8368. WHEN 2 :
  8369. INPUT'" starting amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
  8370. PRINT'" phase 1 ends after what percentage "
  8371. INPUT'" of the note's duration "ph1%
  8372. INPUT'" phase 1's destination amplitude is "amp$ : PROCconvertdynamics : amp2% = amp%
  8373. INPUT'" phase 1's glissando is (in 1/8 tones, max 48,-48) "gliss%
  8374. gliss1% = 50-gliss%
  8375. INPUT'" phase 2's destination amplitude is "amp$ : PROCconvertdynamics : amp3% = amp%
  8376. INPUT'" phase 2's glissando is (in 1/8 tones, max 48,-48) "gliss%
  8377. gliss2% = 50-gliss%
  8378. ph2% = 0 : amp4% = 0 : gliss3% = 10
  8379. :
  8380. WHEN 3 :
  8381. INPUT'" starting amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
  8382. PRINT'" phase 1 ends after what percentage "
  8383. INPUT'" of the note's duration "ph1%
  8384. INPUT'" phase 1's destination amplitude is "amp$ : PROCconvertdynamics : amp2% = amp%
  8385. INPUT'" phase 1's glissando is (in 1/8 tones, max 48,-48) "gliss%
  8386. gliss1% = 50-gliss%
  8387. PRINT'" phase 2 ends after what percentage "
  8388. INPUT'" of the note's duration "ph2%
  8389. INPUT'" phase 2's destination amplitude is "amp$ : PROCconvertdynamics : amp3% = amp%
  8390. INPUT'" phase 2's glissando is (in 1/8 tones, max 48,-48) "gliss%
  8391. gliss2% = 50-gliss%
  8392. INPUT'" phase 3's destination amplitude is "amp$ : PROCconvertdynamics : amp4% = amp%
  8393. REPEAT
  8394. INPUT'" phase 3's glissando is (in 1/8 tones, max 10,-10) "gliss%
  8395. gliss3% = 10-gliss%
  8396. IF gliss3% > 20 THEN VDU7
  8397. IF gliss3% < 0 THEN VDU7
  8398. UNTIL gliss3% < 21 AND gliss3% >= 0
  8399. :
  8400. ENDCASE
  8401. :
  8402. envelopes%(count%) = (ph2%*10^5)+(ph1%*10^3)+(amp4%*10^2)+(amp3%*10)+amp2%
  8403. amplitudes%(count%) = amp1%
  8404. glissandos%(count%) = (gliss3%*10^4)+(gliss2%*10^2)+gliss1%
  8405. :
  8406. :
  8407. ENDIF
  8408. NEXT
  8409. :
  8410. IF sameenvelopes$ = "y" THEN
  8411. FOR count% = 1 TO (numenvelopes%-1)
  8412. envelopes%(count%) = (ph2%*10^5)+(ph1%*10^3)+(amp4%*10^2)+(amp3%*10)+amp2%
  8413. amplitudes%(count%) = amp1%
  8414. glissandos%(count%) = (gliss3%*10^4)+(gliss2%*10^2)+gliss1%
  8415. NEXT
  8416. ENDIF
  8417. :
  8418. gradations$ = "n"
  8419. REM function can feed envelopes similarly into envelopes%()
  8420. :
  8421. PROCinsertenvelopes
  8422. :
  8423. ENDPROC
  8424. :
  8425. REM*******************************************
  8426. :
  8427. DEF PROCconvertdynamics
  8428. CASE amp$ OF
  8429. WHEN "0" : amp% = 0
  8430. WHEN "ppp" : amp% = 1
  8431. WHEN "pp" : amp% = 2
  8432. WHEN "p" : amp% = 3
  8433. WHEN "mp" : amp% = 4
  8434. WHEN "mf" : amp% = 5
  8435. WHEN "f" : amp% = 6
  8436. WHEN "ff" : amp% = 7
  8437. WHEN "fff" : amp% = 8
  8438. ENDCASE
  8439. ENDPROC
  8440. :
  8441. REM*******************************************
  8442. :
  8443. DEF PROCinsertenvelopes
  8444. :
  8445. CLS
  8446. repeatposit$ = "n"
  8447. IF seequery$ = "y" THEN
  8448. PRINT '" Do you want to read these envelopes into the array?"
  8449. CASE GET$ OF
  8450. WHEN "N","n" : PROCdisplay : REM envelopes%() stays intact
  8451. OTHERWISE
  8452. ENDCASE
  8453. ENDIF : REM seequery$
  8454. :
  8455. IF screenvoices$ = "n" THEN
  8456. INPUT' " Which voice "voice%
  8457. IF voice% = 0 THEN PROCpressenter
  8458. ELSE
  8459. PRINT'" Which screen voice "
  8460. CASE GET$ OF
  8461. WHEN "1" : voice% = 1
  8462. WHEN "2" : voice% = 2
  8463. WHEN "3" : voice% = 3
  8464. OTHERWISE PROCpressenter
  8465. ENDCASE
  8466. ENDIF
  8467. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  8468. voice% -= 1
  8469. IF voice% >= 0 THEN samevoice% = voice%
  8470. IF voice% = -1 THEN voice% = samevoice%
  8471. :
  8472. IF quickcopy$ = "y" THEN
  8473. INPUT ' " starting at note number "along%
  8474. IF along% = 0 THEN along% = 1
  8475. along%-=1
  8476. bars% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  8477. beats% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  8478. holdbar% = bars%
  8479. holdbeat% = beats%
  8480. PROCalterbeats
  8481. startat% = (bars%*(10^3))+beats%
  8482. :
  8483. ELSE
  8484. :
  8485. INPUT'" Starting at bar number "bars%
  8486. IF bars% = 0 THEN
  8487. bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
  8488. ENDIF
  8489. holdbar% = bars%
  8490. IF repeatposit$ = "y" THEN
  8491. PRINT'" bar ";bars%;" beat ";beats%;"?"
  8492. PRINT" (for OK press 0, if not OK press X)"
  8493. CASE GET$ OF
  8494. WHEN"X","x" : PROCinsertpitches
  8495. OTHERWISE
  8496. ENDCASE
  8497. ELSE
  8498. INPUT " beat "beats%
  8499. holdbeat% = beats%
  8500. ENDIF
  8501. PROCalterbeats
  8502. startat% = (bars%*(10^3))+beats%
  8503. :
  8504. ENDIF
  8505. :
  8506. PROCsearch(startat%)
  8507. shunt$ = "N"
  8508. :
  8509. FOR count% = startcell% TO (startcell%+(numenvelopes%-1))
  8510. PROCcellfill(count%,voice%,999,999,999,amplitudes%(count%-startcell%),envelopes%(count%-startcell%),999,glissandos%(count%-startcell%),99)
  8511. NEXT
  8512. :
  8513. PROCdisplay
  8514. :
  8515. ENDPROC
  8516. :
  8517. REM**********************************************
  8518. :
  8519. DEF PROCseriesinflections
  8520. :
  8521. IF easiermenus$ = "n" PROCwindow(20,69,88,45) ELSE PROCwindow(20,69,88,42)
  8522. PRINT'" semitone = 100 cents quartertone = 50 cents eigthtone = 25 cents"
  8523. PRINT " sixteenthtone = 12 cents sixthtone = 33 cents"
  8524. PRINT'" harmonic 3 = perfect 5th + 2 cents"
  8525. PRINT " harmonic 5 = major 3rd eigthtone flat + 11 cents "
  8526. PRINT " harmonic 7 = minor 7th eightone flat -6 cents"
  8527. PRINT " harmonic 9 = major 2nd + 4 cents"
  8528. PRINT " harmonic 11 = perfect 4th quartertone sharp + 1 cent"
  8529. PRINT " harmonic 13 = major 6th quartertone flat - 9 cents"
  8530. PRINT " harmonic 15 = major 7th - 12 cents"
  8531. INPUT'" How many inflections "numinflections%
  8532. FOR count% = 0 TO (numinflections%-1)
  8533. PRINT'" inflection ";count%+1;" is (in cents:"
  8534. INPUT'" 1,-1 etc; max 49,-49) "inf%
  8535. inf% = 50+inf%
  8536. inflections%(count%) = inf%
  8537. NEXT
  8538. :
  8539. REM function can feed similarly into inflections%()
  8540. :
  8541. PROCinsertinflections
  8542. :
  8543. ENDPROC
  8544. :
  8545. REM**********************************************
  8546. :
  8547. DEF PROCinsertinflections
  8548. :
  8549. CLS
  8550. repeatposit$ = "n"
  8551. IF seequery$ = "y" THEN
  8552. PRINT'" Do you want to read these inflections into the array?"
  8553. CASE GET$ OF
  8554. WHEN "N","n" : PROCdisplay : REM inflections%() remains intact
  8555. OTHERWISE
  8556. ENDCASE
  8557. ENDIF : REM seequery$
  8558. IF screenvoices$ = "n" THEN
  8559. INPUT' " Which voice "voice%
  8560. IF voice% = 0 THEN PROCpressenter
  8561. ELSE
  8562. PRINT'" Which screen voice "
  8563. CASE GET$ OF
  8564. WHEN "1" : voice% = 1
  8565. WHEN "2" : voice% = 2
  8566. WHEN "3" : voice% = 3
  8567. OTHERWISE PROCpressenter
  8568. ENDCASE
  8569. ENDIF
  8570. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  8571. voice% -= 1
  8572. IF voice% >= 0 THEN samevoice% = voice%
  8573. IF voice% = -1 THEN voice% = samevoice%
  8574. :
  8575. IF quickcopy$ = "y" THEN
  8576. INPUT ' " starting at note number "along%
  8577. IF along% = 0 THEN along% = 1
  8578. along%-=1
  8579. bars% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  8580. beats% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  8581. holdbar% = bars%
  8582. holdbeat% = beats%
  8583. PROCalterbeats
  8584. startat% = (bars%*(10^3))+beats%
  8585. :
  8586. ELSE
  8587. :
  8588. INPUT'" Starting at bar number "bars%
  8589. IF bars% = 0 THEN
  8590. bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
  8591. ENDIF
  8592. holdbar% = bars%
  8593. IF repeatposit$ = "y" THEN
  8594. PRINT'" bar ";bars%;" beat ";beats%;"?"
  8595. PRINT" (for OK press 0, if not OK press X)"
  8596. CASE GET$ OF
  8597. WHEN"X","x" : PROCinsertpitches
  8598. OTHERWISE
  8599. ENDCASE
  8600. ELSE
  8601. INPUT " beat "beats%
  8602. holdbeat% = beats%
  8603. ENDIF
  8604. PROCalterbeats
  8605. startat% = (bars%*(10^3))+beats%
  8606. :
  8607. ENDIF
  8608. :
  8609. PROCsearch(startat%)
  8610. shunt$ = "N"
  8611. :
  8612. FOR count% = startcell% TO (startcell%+(numinflections%-1))
  8613. PROCcellfill(count%,voice%,999,999,999,9,999,999,99,inflections%(count%-startcell%))
  8614. NEXT
  8615. PROCdisplay
  8616. ENDPROC
  8617. :
  8618. REM****************************************************
  8619. :
  8620. DEF PROCenv
  8621. :
  8622. temp = tempi%(brrr%)
  8623. IF waveload$ = "done" THEN temp = temp*1.23065
  8624. converter = 1200/(temp*960)
  8625. dur1 = dur%/converter
  8626. dur2 = dur1*10
  8627. dur3 = dur2 MOD 10
  8628. IF dur3 >= 5 THEN dur% = dur1+1 ELSE dur% = dur1
  8629. :
  8630. dyn1% = dyn% + 128
  8631. :
  8632. number% = array%(cell%(voicenum%),2,voicenum%)DIV10^5
  8633. IF number% = 0 THEN numphases% = 1
  8634. IF number% > 0 AND number% < 100 THEN numphases% = 2
  8635. IF number% > 99 THEN numphases% = 3
  8636. :
  8637. CASE nvoices% OF
  8638. WHEN 1 : st% = 1
  8639. OTHERWISE st% = 2
  8640. ENDCASE
  8641. :
  8642. CASE numphases% OF
  8643. :
  8644. WHEN 1 :
  8645. :
  8646. gliss1% = (array%(cell%(voicenum%),1,voicenum%)DIV10^4)MOD10^2
  8647. gliss1% = 50 - gliss1%
  8648. gliss1% = gliss1% * 85.5
  8649. pitchinc = gliss1%/dur%
  8650. :
  8651. amp2% = (array%(cell%(voicenum%),2,voicenum%)DIV10^2)MOD10
  8652. dyn2% = 384 + (16*amp2%)
  8653. IF dyn2% = 512 THEN dyn2% = 511
  8654. dynspan% = dyn2% - dyn1%
  8655. dyninc = dynspan%/dur%
  8656. :
  8657. FOR loop% = 10 TO dur% STEP (dur%/32)*st%
  8658. loud% = dyninc*loop%
  8659. high% = pitchinc*loop%
  8660. SOUND count%, dyn1%+loud%, pitch%+high%, 0, after%+loop%
  8661. NEXT
  8662. :
  8663. WHEN 2 :
  8664. ph1% = number% MOD 10^2
  8665. point1% = dur%*ph1%/100
  8666. :
  8667. REM first phase
  8668. gliss1% = (array%(cell%(voicenum%),1,voicenum%)DIV10^4)MOD10^2
  8669. gliss1% = 50 - gliss1%
  8670. gliss1% = gliss1% * 85.5
  8671. pitchinc = gliss1%/point1%
  8672. :
  8673. amp2% = (array%(cell%(voicenum%),2,voicenum%)DIV10^2)MOD10
  8674. dyn2% = 384 + (16*amp2%)
  8675. IF dyn2% = 512 THEN dyn2% = 511
  8676. dynspan% = dyn2% - dyn1%
  8677. dyninc = dynspan%/point1%
  8678. :
  8679. FOR loop% = 10 TO point1%-10 STEP ((point1%)/32)*st%
  8680. loud% = dyninc*loop%
  8681. high% = pitchinc*loop%
  8682. SOUND count%, dyn1%+loud%, pitch%+high%, 0, after%+loop%
  8683. NEXT
  8684. :
  8685. REM second phase
  8686. gliss2% = (array%(cell%(voicenum%),1,voicenum%)DIV10^6)MOD10^2
  8687. gliss2% = 50 - gliss2%
  8688. gliss2% = gliss2% * 85.5
  8689. pitchinc = gliss2%/(dur%-point1%)
  8690. :
  8691. amp3% = (array%(cell%(voicenum%),2,voicenum%)DIV10^3)MOD10
  8692. dyn3% = 384 + (16*amp3%)
  8693. IF dyn3% = 512 THEN dyn2% = 511
  8694. dynspan% = dyn3% - dyn2%
  8695. dyninc = dynspan%/(dur%-point1%)
  8696. :
  8697. FOR loop% = 0 TO dur%-point1% STEP ((dur%-point1%)/32)*st%
  8698. loud% = dyninc*loop%
  8699. high% = pitchinc*loop%
  8700. SOUND count%, dyn2%+loud%, pitch%+gliss1%+high%, 0, after%+point1%+loop%
  8701. NEXT
  8702. :
  8703. WHEN 3 :
  8704. ph1% = number% MOD 10^2
  8705. point1% = dur%*ph1%/100
  8706. ph2% = number% DIV 10^2
  8707. point2% = dur%*ph2%/100
  8708. :
  8709. REM first phase
  8710. gliss1% = (array%(cell%(voicenum%),1,voicenum%)DIV10^4)MOD10^2
  8711. gliss1% = 50 - gliss1%
  8712. gliss1% = gliss1% * 85.5
  8713. pitchinc = gliss1%/point1%
  8714. :
  8715. amp2% = (array%(cell%(voicenum%),2,voicenum%)DIV10^2)MOD10
  8716. dyn2% = 384 + (16*amp2%)
  8717. IF dyn2% = 512 THEN dyn2% = 511
  8718. dynspan% = dyn2% - dyn1%
  8719. dyninc = dynspan%/point1%
  8720. :
  8721. FOR loop% = 10 TO point1%-10 STEP ((point1%)/32)*st%
  8722. loud% = dyninc*loop%
  8723. high% = pitchinc*loop%
  8724. SOUND count%, dyn1%+loud%, pitch%+high%, 0, after%+loop%
  8725. NEXT
  8726. :
  8727. REM second phase
  8728. gliss2% = (array%(cell%(voicenum%),1,voicenum%)DIV10^6)MOD10^2
  8729. gliss2% = 50 - gliss2%
  8730. gliss2% = gliss2% * 85.5
  8731. pitchinc = gliss2%/(point2%-point1%)
  8732. :
  8733. amp3% = (array%(cell%(voicenum%),2,voicenum%)DIV10^3)MOD10
  8734. dyn3% = 384 + (16*amp3%)
  8735. IF dyn3% = 512 THEN dyn3% = 511
  8736. dynspan% = dyn3% - dyn2%
  8737. dyninc = dynspan%/(point2%-point1%)
  8738. :
  8739. FOR loop% = 0 TO point2%-point1%-10 STEP ((point2%-point1%)/32)*st%
  8740. loud% = dyninc*loop%
  8741. high% = pitchinc*loop%
  8742. SOUND count%, dyn2%+loud%, pitch%+gliss1%+high%, 0, after%+point1%+loop%
  8743. NEXT
  8744. :
  8745. REM third phase
  8746. gliss3% = (array%(cell%(voicenum%),1,voicenum%)DIV10^8)
  8747. gliss3% = 10 - gliss3%
  8748. gliss3% = gliss3% * 85.5
  8749. pitchinc = gliss3%/(dur%-point2%)
  8750. :
  8751. amp4% = (array%(cell%(voicenum%),2,voicenum%)DIV10^4)MOD10
  8752. dyn4% = 384 + (16*amp4%)
  8753. IF dyn4% = 512 THEN dyn4% = 511
  8754. dynspan% = dyn4% - dyn3%
  8755. dyninc = dynspan%/(dur%-point2%)
  8756. :
  8757. FOR loop% = 0 TO dur%-point2% STEP ((dur%-point2%)/32)*st%
  8758. loud% = dyninc*loop%
  8759. high% = pitchinc*loop%
  8760. SOUND count%, dyn3%+loud%, pitch%+gliss1%+gliss2%+high%, 0, after%+point2%+loop%
  8761. NEXT
  8762. :
  8763. ENDCASE
  8764. :
  8765. ENDPROC
  8766. :
  8767. REM******************************************************
  8768. :
  8769. DEF PROCquit
  8770. :
  8771. CLS
  8772. PRINT''''" Do you want to SAVE"
  8773. PRINT" before quitting?"
  8774. CASE GET$ OF
  8775. WHEN "N","n" :
  8776. REM this line and next two 'deleted' for now - IF wavefilingsystem$ = "loaded" THEN
  8777. REM *RMKill WFS
  8778. REM ENDIF
  8779. *NoDir
  8780. QUIT
  8781. OTHERWISE
  8782. quitnow$ = "y"
  8783. PROCsave
  8784. ENDCASE
  8785. ENDPROC
  8786. :
  8787. REM******************************************************
  8788. :
  8789. DEF PROCsave
  8790. :
  8791. firstnaming$ = "n"
  8792. CLS
  8793. IF filename$ = "" THEN
  8794. INPUT'" filename "filename$
  8795. firstnaming$ = "y"
  8796. DIM lastfilename$(9)
  8797. housekeepingdimmed$ = "y"
  8798. PROChousekeeping
  8799. ENDIF
  8800. IF firstnaming$ = "n" THEN
  8801. PRINT'" as '";filename$;"'?"
  8802. CASE GET$ OF
  8803. WHEN "N","n" :
  8804. INPUT'" filename "filename$
  8805. OTHERWISE
  8806. ENDCASE
  8807. ENDIF
  8808. :
  8809. *Dir SDFS::RISCOSpi.$.CAC.Files
  8810. :
  8811. channel = OPENOUT filename$
  8812. PRINT#channel, manynotes%
  8813. PRINT#channel, numparts%
  8814. PRINT#channel, nobars%
  8815. PRINT#channel, startv%
  8816. PRINT#channel, startv1%
  8817. PRINT#channel, numbars%
  8818. PRINT#channel, startbar%
  8819. PRINT#channel, numvoices%
  8820. PRINT#channel, factor%
  8821. PRINT#channel, beatfactor%
  8822. PRINT#channel, beams%
  8823. PRINT#channel, longbeatsupper%
  8824. PRINT#channel, longbeatslower%
  8825. PRINT#channel, tempo%
  8826. PRINT#channel, MM%
  8827. PRINT#channel, notehead$
  8828. PRINT#channel, longscore$
  8829. PRINT#channel, barlines$
  8830. PRINT#channel, staves$
  8831. PRINT#channel, beats$
  8832. PRINT#channel, amplitudes$
  8833. PRINT#channel, names$
  8834. PRINT#channel, accidentals$
  8835. PRINT#channel, stems$
  8836. PRINT#channel, xoption$
  8837. PRINT#channel, durations$
  8838. PRINT#channel, envelopes$
  8839. PRINT#channel, glissandos$
  8840. PRINT#channel, numwaves%
  8841. PRINT#channel, manywaves%
  8842. PRINT#channel, barnosoften%
  8843. FOR c% = 0 TO (numparts%-1)
  8844. PRINT#channel, numusedcells%(c%)
  8845. NEXT
  8846. FOR e% = 0 TO (numparts%-1)
  8847. FOR d% = 0 TO 2
  8848. FOR c% = 0 TO numusedcells%(e%)
  8849. PRINT#channel, array%(c%,d%,e%)
  8850. NEXT
  8851. NEXT
  8852. NEXT
  8853. FOR c% = 0 TO numparts%
  8854. FOR d% = 0 TO 2
  8855. PRINT#channel, insts$(c%,d%)
  8856. NEXT
  8857. NEXT
  8858. FOR c% = 0 TO nobars%
  8859. FOR d% = 0 TO 3
  8860. FOR e% = 0 TO (numparts%-1)
  8861. PRINT#channel, disarray%(c%,d%,e%)
  8862. NEXT
  8863. NEXT
  8864. NEXT
  8865. FOR c% = 0 TO numparts%
  8866. PRINT#channel, longbeamposn%(c%)
  8867. NEXT
  8868. FOR c% = 0 TO numparts%
  8869. PRINT#channel, shortbeamposn%(c%)
  8870. NEXT
  8871. FOR c% = 0 TO numparts%
  8872. PRINT#channel, shortamppos%(c%)
  8873. NEXT
  8874. FOR c% = 0 TO numparts%
  8875. PRINT#channel, longamppos%(c%)
  8876. NEXT
  8877. FOR c% = 0 TO (numparts%-1)
  8878. PRINT#channel, longstemdir$(c%)
  8879. NEXT
  8880. FOR c% = 0 TO (numparts%-1)
  8881. PRINT#channel, shortstemdir$(c%)
  8882. NEXT
  8883. FOR c% = 0 TO numparts%
  8884. PRINT#channel, waveforms$(c%)
  8885. NEXT
  8886. FOR c% = 0 TO numvoices%
  8887. PRINT#channel, displayvoices%(c%)
  8888. NEXT
  8889. FOR c% = 0 TO 19
  8890. PRINT#channel, wforms$(c%)
  8891. NEXT
  8892. FOR c% = 0 TO 8
  8893. FOR d% = 0 TO 9
  8894. PRINT#channel, lvdata%(c%,d%)
  8895. NEXT
  8896. NEXT
  8897. FOR a% = 0 TO 47
  8898. PRINT#channel, pitchset%(a%)
  8899. NEXT
  8900. FOR a% = 0 TO 47
  8901. PRINT#channel, durset%(a%)
  8902. NEXT
  8903. FOR a% = 0 TO 47
  8904. PRINT#channel, ampset%(a%)
  8905. NEXT
  8906. FOR a% = 0 TO 47
  8907. PRINT#channel, glissset%(a%)
  8908. NEXT
  8909. FOR a% = 0 TO 47
  8910. PRINT#channel, envset%(a%)
  8911. NEXT
  8912. FOR a% = 0 TO nobars%
  8913. PRINT#channel, tempi%(a%)
  8914. NEXT
  8915. FOR a% = 0 TO nobars%
  8916. FOR b% = 0 TO 1
  8917. PRINT#channel, remarks$(a%,b%)
  8918. NEXT
  8919. NEXT
  8920. :
  8921. CLOSE#channel
  8922. *NoDir
  8923. :
  8924. goproc$ = "y"
  8925. FOR count% = 1 TO 9
  8926. IF lastfilename$(count%) = filename$ THEN
  8927. goproc$ = "n" : theone% = count%
  8928. ENDIF
  8929. NEXT
  8930. IF goproc$ = "n" THEN
  8931. IF theone% > 1 THEN
  8932. PROCspecialshunt : PROCfornexttime
  8933. ENDIF
  8934. ENDIF
  8935. IF goproc$ = "y" THEN
  8936. PROCshuntlastfilename : PROCfornexttime
  8937. ENDIF
  8938. :
  8939. IF quitnow$ = "y" THEN
  8940. *NoDir
  8941. QUIT
  8942. ELSE
  8943. PROCdisplay
  8944. ENDIF
  8945. :
  8946. ENDPROC
  8947. :
  8948. REM******************************************
  8949. :
  8950. DEF PROCloadfile
  8951. :
  8952. housekeepingdimmed$ = "n"
  8953. PROChousekeeping
  8954. PRINT'" The most recent files saved were "
  8955. FOR count% = 1 TO 9
  8956. PRINT'count%;". ";lastfilename$(count%)
  8957. NEXT
  8958. PRINT'" To open one press its number, for another press 0 "
  8959. CASE GET$ OF
  8960. WHEN "1" : filename$ = lastfilename$(1)
  8961. WHEN "2" : filename$ = lastfilename$(2)
  8962. WHEN "3" : filename$ = lastfilename$(3)
  8963. WHEN "4" : filename$ = lastfilename$(4)
  8964. WHEN "5" : filename$ = lastfilename$(5)
  8965. WHEN "6" : filename$ = lastfilename$(6)
  8966. WHEN "7" : filename$ = lastfilename$(7)
  8967. WHEN "8" : filename$ = lastfilename$(8)
  8968. WHEN "9" : filename$ = lastfilename$(9)
  8969. OTHERWISE
  8970. INPUT'" the one you want is "filename$
  8971. ENDCASE
  8972. :
  8973. *Dir SDFS::RISCOSpi.$.CAC.Files
  8974. channel = OPENIN filename$
  8975. REPEAT
  8976. INPUT#channel, manynotes%
  8977. INPUT#channel, numparts%
  8978. INPUT#channel, nobars%
  8979. instsdimmed$ = "n"
  8980. PROCarraysetup
  8981. INPUT#channel, startv%
  8982. INPUT#channel, startv1%
  8983. INPUT#channel, numbars%
  8984. INPUT#channel, startbar%
  8985. INPUT#channel, numvoices%
  8986. INPUT#channel, factor%
  8987. INPUT#channel, beatfactor%
  8988. INPUT#channel, beams%
  8989. INPUT#channel, longbeatsupper%
  8990. INPUT#channel, longbeatslower%
  8991. INPUT#channel, tempo%
  8992. INPUT#channel, MM%
  8993. INPUT#channel, notehead$
  8994. INPUT#channel, longscore$
  8995. INPUT#channel, barlines$
  8996. INPUT#channel, staves$
  8997. INPUT#channel, beats$
  8998. INPUT#channel, amplitudes$
  8999. INPUT#channel, names$
  9000. INPUT#channel, accidentals$
  9001. INPUT#channel, stems$
  9002. INPUT#channel, xoption$
  9003. INPUT#channel, durations$
  9004. INPUT#channel, envelopes$
  9005. INPUT#channel, glissandos$
  9006. INPUT#channel, numwaves%
  9007. INPUT#channel, manywaves%
  9008. INPUT#channel, barnosoften%
  9009. FOR c% = 0 TO (numparts%-1)
  9010. INPUT#channel, numusedcells%(c%)
  9011. NEXT
  9012. FOR e% = 0 TO (numparts%-1)
  9013. FOR d% = 0 TO 2
  9014. FOR c% = 0 TO numusedcells%(e%)
  9015. INPUT#channel, array%(c%,d%,e%)
  9016. NEXT
  9017. NEXT
  9018. NEXT
  9019. FOR c% = 0 TO numparts%
  9020. FOR d% = 0 TO 2
  9021. INPUT#channel, insts$(c%,d%)
  9022. NEXT
  9023. NEXT
  9024. FOR c% = 0 TO nobars%
  9025. FOR d% = 0 TO 3
  9026. FOR e% = 0 TO (numparts%-1)
  9027. INPUT#channel, disarray%(c%,d%,e%)
  9028. NEXT
  9029. NEXT
  9030. NEXT
  9031. FOR c% = 0 TO numparts%
  9032. INPUT#channel, longbeamposn%(c%)
  9033. NEXT
  9034. FOR c% = 0 TO numparts%
  9035. INPUT#channel, shortbeamposn%(c%)
  9036. NEXT
  9037. FOR c% = 0 TO numparts%
  9038. INPUT#channel, shortamppos%(c%)
  9039. NEXT
  9040. FOR c% = 0 TO numparts%
  9041. INPUT#channel, longamppos%(c%)
  9042. NEXT
  9043. FOR c% = 0 TO (numparts%-1)
  9044. INPUT#channel, longstemdir$(c%)
  9045. NEXT
  9046. FOR c% = 0 TO (numparts%-1)
  9047. INPUT#channel, shortstemdir$(c%)
  9048. NEXT
  9049. FOR c% = 0 TO numparts%
  9050. INPUT#channel, waveforms$(c%)
  9051. NEXT
  9052. FOR c% = 0 TO numvoices%
  9053. INPUT#channel, displayvoices%(c%)
  9054. NEXT
  9055. FOR c% = 0 TO 19
  9056. INPUT#channel, wforms$(c%)
  9057. NEXT
  9058. FOR c% = 0 TO 8
  9059. FOR d% = 0 TO 9
  9060. INPUT#channel, lvdata%(c%,d%)
  9061. NEXT
  9062. NEXT
  9063. FOR a% = 0 TO 47
  9064. INPUT#channel, pitchset%(a%)
  9065. NEXT
  9066. FOR a% = 0 TO 47
  9067. INPUT#channel, durset%(a%)
  9068. NEXT
  9069. FOR a% = 0 TO 47
  9070. INPUT#channel, ampset%(a%)
  9071. NEXT
  9072. FOR a% = 0 TO 47
  9073. INPUT#channel, glissset%(a%)
  9074. NEXT
  9075. FOR a% = 0 TO 47
  9076. INPUT#channel, envset%(a%)
  9077. NEXT
  9078. FOR a% = 0 TO nobars%
  9079. INPUT#channel, tempi%(a%)
  9080. tempi%(0) = tempi%(1)
  9081. NEXT
  9082. FOR a% = 0 TO nobars%
  9083. FOR b% = 0 TO 1
  9084. INPUT#channel, remarks$(a%,b%)
  9085. NEXT
  9086. NEXT
  9087. :
  9088. holdnum% = numvoices% : holdstart% = startv%
  9089. FOR count% = 1 TO numvoices% : holddisplay%(count%) = displayvoices%(count%) : NEXT
  9090. :
  9091. UNTIL EOF#channel
  9092. CLOSE#channel
  9093. *NoDir
  9094. :
  9095. alterbeatsat% = (960/beatfactor%)/8
  9096. :
  9097. PROCdisplay
  9098. :
  9099. ENDPROC
  9100. :
  9101. REM******************************************************
  9102. :
  9103. DEF PROCplaysubmenu
  9104. :
  9105. IF easiermenus$ = "n" THEN
  9106. PROCwindow(20,71,60,54)
  9107. COLOUR 63
  9108. PRINT'" Load waveforms W"
  9109. COLOUR 0
  9110. PRINT " Assign waveforms to voices A"
  9111. PRINT " Set tempo T"
  9112. PRINT " Set l.v. L"
  9113. PRINT " Beats input B"
  9114. PRINT " Memory setup M"
  9115. PRINT " Display pitches in colours C"
  9116. PRINT " Display options D"
  9117. PRINT " Remarks R"
  9118. PRINT " Rename staves S"
  9119. PRINT " Change a stave's clef K"
  9120. PRINT " Quickplay options Q"
  9121. PRINT " Set stereo positions P"
  9122. PRINT " Set key response speeds E"
  9123. PRINT " Tutorial U"
  9124. PRINT " Re-set parameter defaults V"
  9125. ELSE
  9126. PROCwindow(20,69,60,37)
  9127. COLOUR 63
  9128. PRINT'" Load waveforms W"
  9129. COLOUR 0
  9130. PRINT '" Assign waveforms to voices A"
  9131. PRINT '" Set tempo T"
  9132. PRINT '" Set l.v. L"
  9133. PRINT '" Beats input B"
  9134. PRINT '" Memory setup M"
  9135. PRINT '" Display pitches in colours C"
  9136. PRINT '" Display options D"
  9137. PRINT '" Remarks R"
  9138. PRINT '" Rename staves S"
  9139. PRINT '" Change a stave's clef K"
  9140. PRINT '" Quickplay options Q"
  9141. PRINT '" Set stereo positions P"
  9142. PRINT '" Set key response speeds E"
  9143. PRINT '" Tutorial U"
  9144. PRINT '" Re-set parameter defaults V"
  9145. ENDIF
  9146. CASE GET$ OF
  9147. WHEN "v" : CLS
  9148. PRINT'" Amplitude A"
  9149. CASE GET$ OF
  9150. WHEN "a" :
  9151. PRINT'" Re-set default amplitude"
  9152. INPUT " in a batch between which voice "firstvoice%
  9153. INPUT'" and which voice "secondvoice%
  9154. INPUT'" And set it at which amplitude "value$
  9155. CASE value$ OF
  9156. WHEN "fff" : value% = 8
  9157. WHEN "ff" : value% = 7
  9158. WHEN "f" : value% = 6
  9159. WHEN "mf" : value% = 5
  9160. WHEN "mp" : value% = 4
  9161. WHEN "p" : value% = 3
  9162. WHEN "pp" : value% = 2
  9163. WHEN "ppp" : value% = 1
  9164. WHEN "0" : value% = 0
  9165. ENDCASE
  9166. FOR count% = (firstvoice%-1) TO (secondvoice%-1)
  9167. ampset%(count%) = value%
  9168. NEXT
  9169. ENDCASE
  9170. PROCdisplay
  9171. :
  9172. WHEN "U","u" : PROCtutorial
  9173. :
  9174. WHEN "E","e" : CLS
  9175. PRINT '" To set response time for downward "
  9176. PRINT " copying from top stave press D "
  9177. PRINT '" To set response time for "
  9178. PRINT " move left/right press M "
  9179. PRINT '" To set response time for "
  9180. PRINT " move up/down press U "
  9181. PRINT '" To set response time for pause "
  9182. PRINT " after first digit input press F "
  9183. PRINT '" To set response time for pause "
  9184. PRINT " after second digit input press S "
  9185. CASE GET$ OF
  9186. WHEN "D","d" :
  9187. CLS
  9188. PRINT'" delay how many hundredths of a second "
  9189. PRINT " (default is 50,";
  9190. PRINT " currently set at ";downwardsspeed%;")"
  9191. INPUT ' downwardsspeed%
  9192. WHEN "M","m" :
  9193. PRINT'" delay how many hundredths of a second "
  9194. PRINT " (default is 25, currently set at ";horizscroll%;")"
  9195. INPUT horizscroll%
  9196. WHEN "U","u" :
  9197. PRINT'" delay how many hundredths of a second "
  9198. PRINT " (default is 25, currently set at ";vertscroll%;")"
  9199. INPUT vertscroll%
  9200. WHEN "F","f" :
  9201. PRINT'" pause for how many hundredths "
  9202. PRINT " of a second (currently ";waitafterfirst%;")"
  9203. INPUT waitafterfirst%
  9204. waitaftersecond% = waitafterfirst% : REM stops waiting unnecessarily for a 3rd digit
  9205. WHEN "S","s" :
  9206. PRINT'" pause for how many hundredths "
  9207. PRINT " of a second (currently ";waitaftersecond%;")"
  9208. INPUT waitaftersecond%
  9209. ENDCASE
  9210. PROCdisplay
  9211. :
  9212. WHEN "A","a" :
  9213. PROCwindow(20,72,83,25)
  9214. VDU 14
  9215. PRINT'" Current assignations are "
  9216. PRINT'" (press Ctrl-Shift to scroll down) "
  9217. REM PRINT " "
  9218. FOR count% = 1 TO numparts%
  9219. IF waveforms$(count%) <> "" THEN
  9220. PRINT'" voice ";count%;
  9221. IF insts$(count%,0)<> "" THEN PRINT " (";insts$(count%,0);")";
  9222. PRINT " - ";waveforms$(count%)
  9223. ENDIF
  9224. NEXT
  9225. VDU 15
  9226. PRINT''" Do you want to "
  9227. PRINT' " Keep these K "
  9228. PRINT' " Reassign R "
  9229. PRINT' " Use WaveSynth-Beep defaults W "
  9230. PRINT' " Randomly assign sustaining instruments, "
  9231. PRINT " dry instruments or drums S/D/M "
  9232. PRINT' " Assign in groups G "
  9233. :
  9234. CASE GET$ OF
  9235. WHEN "R","r" : defaultvoices$ = "n" : PROCassignvoices : PROCdisplay
  9236. WHEN "W","w" : defaultvoices$ = "y" : PROCassignvoices : PROCdisplay
  9237. WHEN "K","k" : defaultvoices$ = "n" : PROCdisplay
  9238. WHEN "S","s" : defaultvoices$ = "n" : type$ = "sustaining" : PROCrandomassign : PROCdisplay
  9239. WHEN "M","m" : defaultvoices$ = "n" : type$ = "drums" : PROCrandomassign : PROCdisplay
  9240. WHEN "D","d" : defaultvoices$ = "n" : PROCrandomdry : PROCdisplay
  9241. WHEN "G","g" : defaultvoices$ = "n" : PROCgroupassign : PROCdisplay
  9242. OTHERWISE
  9243. PROCdisplay
  9244. ENDCASE
  9245. WHEN "T","t" : PROCtempo
  9246. WHEN "L","l" : PROClv
  9247. WHEN "W","w" : PROCloadwaveforms
  9248. WHEN "B","b" :
  9249. CLS : PRINT' " Typing numbers up to ";((960/beatfactor%)/8)-1
  9250. PRINT '" should be read as macro-beats "
  9251. PRINT'" or micro-beats? (+/-) "
  9252. CASE GET$ OF
  9253. WHEN "+","=" : alterbeatsat% = (960/beatfactor%)/8
  9254. OTHERWISE
  9255. alterbeatsat% = 0
  9256. ENDCASE
  9257. :
  9258. PROCdisplay
  9259. WHEN "M","m" :
  9260. CLS : PRINT '" This file was set up as follows:"
  9261. PRINT'" Number of bars - ";nobars%
  9262. PRINT'" Notes per bar in busiest - ";manynotes%/nobars%
  9263. PRINT'" Number of voices - ";numparts%
  9264. PRINT'" (Press a key to continue)"
  9265. CASE GET$ OF
  9266. WHEN "C","c" :
  9267. OTHERWISE
  9268. ENDCASE
  9269. PROCdisplay
  9270. WHEN "C","c" :
  9271. CLS : PRINT'" Do you want any pitches displayed in "
  9272. PRINT " in colours? "
  9273. CASE GET$ OF
  9274. WHEN "Y","y" :
  9275. PRINT'" Re-define these, or use previous "
  9276. PRINT " settings? (R/P)"
  9277. CASE GET$ OF
  9278. WHEN "R","r" :
  9279. INPUT'" How many colours "numcols%
  9280. FOR tt% = 1 TO numcols%
  9281. PRINT'" Colour ";tt%;" has how many pitches "
  9282. INPUT numredpitches%(tt%)
  9283. FOR ttt% = 1 TO numredpitches%(tt%)
  9284. PRINT' " Note name for pitch ";ttt%;" is ";
  9285. COLOUR 3
  9286. CASE GET$ OF
  9287. WHEN "C","c" : note% = 0 : PRINT "C"
  9288. WHEN "D","d" : note% = 1 : PRINT "D"
  9289. WHEN "E","e" : note% = 2 : PRINT "E"
  9290. WHEN "F","f" : note% = 3 : PRINT "F"
  9291. WHEN "G","g" : note% = 4 : PRINT "G"
  9292. WHEN "A","a" : note% = 5 : PRINT "A"
  9293. WHEN "B","b" : note% = 6 : PRINT "B"
  9294. ENDCASE
  9295. COLOUR 0
  9296. PRINT " accidental ";
  9297. COLOUR 3
  9298. CASE GET$ OF
  9299. WHEN "1" : accid% = 1 : PRINT "flat"
  9300. WHEN "2" : accid% = 2 : PRINT "3/8flat"
  9301. WHEN "3" : accid% = 3 : PRINT "1/4flat"
  9302. WHEN "4" : accid% = 4 : PRINT "1/8flat"
  9303. WHEN "5" : accid% = 5 : PRINT "nat"
  9304. WHEN "6" : accid% = 6 : PRINT "1/8shrp"
  9305. WHEN "7" : accid% = 7 : PRINT "1/4shrp"
  9306. WHEN "8" : accid% = 8 : PRINT "3/8shrp"
  9307. WHEN "9" : accid% = 9 : PRINT "shrp"
  9308. ENDCASE
  9309. COLOUR 0
  9310. PRINT " octave ";
  9311. COLOUR 3
  9312. CASE GET$ OF
  9313. WHEN "0" : octave% = 0 : PRINT "0"
  9314. WHEN "1" : octave% = 1 : PRINT "1"
  9315. WHEN "2" : octave% = 2 : PRINT "2"
  9316. WHEN "3" : octave% = 3 : PRINT "3"
  9317. WHEN "4" : octave% = 4 : PRINT "4"
  9318. WHEN "5" : octave% = 5 : PRINT "5"
  9319. WHEN "6" : octave% = 6 : PRINT "6"
  9320. WHEN "7" : octave% = 7 : PRINT "7"
  9321. WHEN "8" : octave% = 8 : PRINT "8"
  9322. ENDCASE
  9323. COLOUR 0
  9324. redpitches%(tt%,ttt%) = (note%*100)+(accid%*10)+octave%
  9325. NEXT
  9326. NEXT
  9327. redpitches$ = "y"
  9328. OTHERWISE
  9329. redpitches$ = "n"
  9330. FOR count% = 0 TO 9
  9331. IF numredpitches%(count%) <> 0 THEN redpitches$ = "y"
  9332. NEXT
  9333. ENDCASE
  9334. OTHERWISE redpitches$ = "n"
  9335. ENDCASE
  9336. PROCdisplay
  9337. :
  9338. WHEN "D","d" : PROCdisplayoptions : PROCdisplay
  9339. WHEN "R","r" : PROCremarks : PROCdisplay
  9340. WHEN "S","s" : PROCnamestaves : PROCdisplay
  9341. WHEN "K","k" : PROCchangeclef : PROCdisplay
  9342. WHEN "Q","q" :
  9343. CLS
  9344. PRINT '" Quickplay (by pressing P)"
  9345. PRINT '" how many voices downwards"
  9346. INPUT '" from top of screen "quickplay%
  9347. PROCdisplay
  9348. WHEN "P","p" :
  9349. CLS
  9350. PRINT' " (Voices are assigned to channels 1-8 "
  9351. PRINT " according to the order in which "
  9352. PRINT " they are typed into Play) "
  9353. PRINT' " Set the 8 channels to stereo "
  9354. PRINT " positions 12344567, keep mono default, "
  9355. PRINT " set the 8 channels to random positions "
  9356. PRINT " or define channels' stereo positions "
  9357. PRINT " (S/M/R/D) "
  9358. CASE GET$ OF
  9359. WHEN "S","s" :
  9360. STEREO 1, -127
  9361. STEREO 2, -79
  9362. STEREO 3, -47
  9363. STEREO 4, -15
  9364. STEREO 5, -15
  9365. STEREO 6, +16
  9366. STEREO 7, +48
  9367. STEREO 8, +80
  9368. WHEN "M","m" :
  9369. STEREO 1, -15
  9370. STEREO 2, -15
  9371. STEREO 3, -15
  9372. STEREO 4, -15
  9373. STEREO 5, -15
  9374. STEREO 6, -15
  9375. STEREO 7, -15
  9376. STEREO 8, -15
  9377. WHEN "D","d" :
  9378. CLS
  9379. PRINT '" Define positions for how many "
  9380. INPUT " channels "numchannels%
  9381. FOR count% = 1 TO numchannels%
  9382. PRINT' " Channel ";count%;" is set to which "
  9383. INPUT " stereo position of the 7 available "position%
  9384. CASE count% OF
  9385. WHEN 1 :
  9386. CASE position% OF
  9387. WHEN 1 : STEREO 1, -127
  9388. WHEN 2 : STEREO 1, -79
  9389. WHEN 3 : STEREO 1, -47
  9390. WHEN 4 : STEREO 1, -15
  9391. WHEN 5 : STEREO 1, +16
  9392. WHEN 6 : STEREO 1, +48
  9393. WHEN 7 : STEREO 1, +80
  9394. ENDCASE
  9395. WHEN 2 :
  9396. CASE position% OF
  9397. WHEN 1 : STEREO 2, -127
  9398. WHEN 2 : STEREO 2, -79
  9399. WHEN 3 : STEREO 2, -47
  9400. WHEN 4 : STEREO 2, -15
  9401. WHEN 5 : STEREO 2, +16
  9402. WHEN 6 : STEREO 2, +48
  9403. WHEN 7 : STEREO 2, +80
  9404. ENDCASE
  9405. WHEN 3 :
  9406. CASE position% OF
  9407. WHEN 1 : STEREO 3, -127
  9408. WHEN 2 : STEREO 3, -79
  9409. WHEN 3 : STEREO 3, -47
  9410. WHEN 4 : STEREO 3, -15
  9411. WHEN 5 : STEREO 3, +16
  9412. WHEN 6 : STEREO 3, +48
  9413. WHEN 7 : STEREO 3, +80
  9414. ENDCASE
  9415. WHEN 4 :
  9416. CASE position% OF
  9417. WHEN 1 : STEREO 4, -127
  9418. WHEN 2 : STEREO 4, -79
  9419. WHEN 3 : STEREO 4, -47
  9420. WHEN 4 : STEREO 4, -15
  9421. WHEN 5 : STEREO 4, +16
  9422. WHEN 6 : STEREO 4, +48
  9423. WHEN 7 : STEREO 4, +80
  9424. ENDCASE
  9425. WHEN 5 :
  9426. CASE position% OF
  9427. WHEN 1 : STEREO 5, -127
  9428. WHEN 2 : STEREO 5, -79
  9429. WHEN 3 : STEREO 5, -47
  9430. WHEN 4 : STEREO 5, -15
  9431. WHEN 5 : STEREO 5, +16
  9432. WHEN 6 : STEREO 5, +48
  9433. WHEN 7 : STEREO 5, +80
  9434. ENDCASE
  9435. WHEN 6 :
  9436. CASE position% OF
  9437. WHEN 1 : STEREO 6, -127
  9438. WHEN 2 : STEREO 6, -79
  9439. WHEN 3 : STEREO 6, -47
  9440. WHEN 4 : STEREO 6, -15
  9441. WHEN 5 : STEREO 6, +16
  9442. WHEN 6 : STEREO 6, +48
  9443. WHEN 7 : STEREO 6, +80
  9444. ENDCASE
  9445. WHEN 7 :
  9446. CASE position% OF
  9447. WHEN 1 : STEREO 7, -127
  9448. WHEN 2 : STEREO 7, -79
  9449. WHEN 3 : STEREO 7, -47
  9450. WHEN 4 : STEREO 7, -15
  9451. WHEN 5 : STEREO 7, +16
  9452. WHEN 6 : STEREO 7, +48
  9453. WHEN 7 : STEREO 7, +80
  9454. ENDCASE
  9455. WHEN 8 :
  9456. CASE position% OF
  9457. WHEN 1 : STEREO 8, -127
  9458. WHEN 2 : STEREO 8, -79
  9459. WHEN 3 : STEREO 8, -47
  9460. WHEN 4 : STEREO 8, -15
  9461. WHEN 5 : STEREO 8, +16
  9462. WHEN 6 : STEREO 8, +48
  9463. WHEN 7 : STEREO 8, +80
  9464. ENDCASE
  9465. ENDCASE
  9466. NEXT
  9467. WHEN "R","r" :
  9468. position% = RND(7)
  9469. CASE position% OF
  9470. WHEN 1 : STEREO 1, -127
  9471. WHEN 2 : STEREO 1, -79
  9472. WHEN 3 : STEREO 1, -47
  9473. WHEN 4 : STEREO 1, -15
  9474. WHEN 5 : STEREO 1, +16
  9475. WHEN 6 : STEREO 1, +48
  9476. WHEN 7 : STEREO 1, +80
  9477. ENDCASE
  9478. position% = RND(7)
  9479. CASE position% OF
  9480. WHEN 1 : STEREO 2, -127
  9481. WHEN 2 : STEREO 2, -79
  9482. WHEN 3 : STEREO 2, -47
  9483. WHEN 4 : STEREO 2, -15
  9484. WHEN 5 : STEREO 2, +16
  9485. WHEN 6 : STEREO 2, +48
  9486. WHEN 7 : STEREO 2, +80
  9487. ENDCASE
  9488. position% = RND(7)
  9489. CASE position% OF
  9490. WHEN 1 : STEREO 3, -127
  9491. WHEN 2 : STEREO 3, -79
  9492. WHEN 3 : STEREO 3, -47
  9493. WHEN 4 : STEREO 3, -15
  9494. WHEN 5 : STEREO 3, +16
  9495. WHEN 6 : STEREO 3, +48
  9496. WHEN 7 : STEREO 3, +80
  9497. ENDCASE
  9498. position% = RND(7)
  9499. CASE position% OF
  9500. WHEN 1 : STEREO 4, -127
  9501. WHEN 2 : STEREO 4, -79
  9502. WHEN 3 : STEREO 4, -47
  9503. WHEN 4 : STEREO 4, -15
  9504. WHEN 5 : STEREO 4, +16
  9505. WHEN 6 : STEREO 4, +48
  9506. WHEN 7 : STEREO 4, +80
  9507. ENDCASE
  9508. position% = RND(7)
  9509. CASE position% OF
  9510. WHEN 1 : STEREO 5, -127
  9511. WHEN 2 : STEREO 5, -79
  9512. WHEN 3 : STEREO 5, -47
  9513. WHEN 4 : STEREO 5, -15
  9514. WHEN 5 : STEREO 5, +16
  9515. WHEN 6 : STEREO 5, +48
  9516. WHEN 7 : STEREO 5, +80
  9517. ENDCASE
  9518. position% = RND(7)
  9519. CASE position% OF
  9520. WHEN 1 : STEREO 6, -127
  9521. WHEN 2 : STEREO 6, -79
  9522. WHEN 3 : STEREO 6, -47
  9523. WHEN 4 : STEREO 6, -15
  9524. WHEN 5 : STEREO 6, +16
  9525. WHEN 6 : STEREO 6, +48
  9526. WHEN 7 : STEREO 6, +80
  9527. ENDCASE
  9528. position% = RND(7)
  9529. CASE position% OF
  9530. WHEN 1 : STEREO 7, -127
  9531. WHEN 2 : STEREO 7, -79
  9532. WHEN 3 : STEREO 7, -47
  9533. WHEN 4 : STEREO 7, -15
  9534. WHEN 5 : STEREO 7, +16
  9535. WHEN 6 : STEREO 7, +48
  9536. WHEN 7 : STEREO 7, +80
  9537. ENDCASE
  9538. position% = RND(7)
  9539. CASE position% OF
  9540. WHEN 1 : STEREO 8, -127
  9541. WHEN 2 : STEREO 8, -79
  9542. WHEN 3 : STEREO 8, -47
  9543. WHEN 4 : STEREO 8, -15
  9544. WHEN 5 : STEREO 8, +16
  9545. WHEN 6 : STEREO 8, +48
  9546. WHEN 7 : STEREO 8, +80
  9547. ENDCASE
  9548. :
  9549. ENDCASE
  9550. PROCdisplay
  9551. OTHERWISE VDU 7 : PROCplaysubmenu
  9552. ENDCASE
  9553. :
  9554. ENDPROC
  9555. :
  9556. REM*******************************************
  9557. :
  9558. DEF PROClv
  9559. :
  9560. CLS
  9561. lvdata%() = 0
  9562. PRINT'" How many sound channels"
  9563. INPUT'" are to generate lv "nlv%
  9564. IF nlv% = 0 THEN
  9565. lvdata%() = 0
  9566. ELSE
  9567. FOR count% = 1 TO nlv%
  9568. PRINT '" lv channel ";count%;" is to use"
  9569. INPUT '" how many other channels? "numchans%
  9570. FOR c% = 1 TO numchans%
  9571. PRINT '" of these, channel ";c%;
  9572. INPUT " is channel "ch%
  9573. lvdata%(count%,c%+1) = ch%
  9574. NEXT
  9575. lvdata%(count%,1) = count%
  9576. NEXT
  9577. ENDIF
  9578. :
  9579. PROCdisplay
  9580. :
  9581. ENDPROC
  9582. :
  9583. REM***********************************
  9584. :
  9585. DEF PROCloadwaveforms
  9586. :
  9587. CLS
  9588. IF waveload$ = "done" THEN
  9589. PROCwindow(20,71,60,35) : CLS
  9590. PRINT'" These waveforms have already been loaded"
  9591. PRINT " (press Ctrl-Shft to scroll down)"
  9592. VDU 14
  9593. FOR count% = 1 TO manywaves%
  9594. PRINT'wforms$(count%)
  9595. NEXT
  9596. VDU 15
  9597. PRINT' " Do you want to load a fresh group?"
  9598. CASE GET$ OF
  9599. WHEN "Y","y" : PRINT' " Press M then quit, to"
  9600. PRINT " flush present waveforms"
  9601. CASE GET$ OF
  9602. WHEN "M","m" : PROCawait
  9603. ENDCASE
  9604. OTHERWISE PROCdisplay
  9605. ENDCASE
  9606. ELSE
  9607. load$ = "new"
  9608. IF filename$ <> "" AND wforms$(1) <> "" THEN
  9609. PROCwindow(20,71,60,45)
  9610. PRINT'" The waveforms previously "
  9611. PRINT" loaded for this file were"
  9612. PRINT" (press Ctrl-Shift to scroll down)"
  9613. VDU 14
  9614. FOR count% = 1 TO manywaves%
  9615. PRINT'wforms$(count%)
  9616. NEXT
  9617. VDU 15
  9618. PRINT'" Do you want to reload"
  9619. PRINT " these or choose new ones (R/N)"
  9620. CASE GET$ OF
  9621. WHEN "R","r" : load$ = "previous"
  9622. OTHERWISE
  9623. ENDCASE
  9624. ENDIF
  9625. :
  9626. IF load$ = "new" THEN
  9627. :
  9628. PRINT '" load individually or from lists? (I/L) "
  9629. CASE GET$ OF
  9630. WHEN "I","i" :
  9631. PRINT '" How many waveforms do you want to load"
  9632. PRINT " (the maximum for this file is ";numwaves%;")"
  9633. INPUT manywaves%
  9634. FOR count% = 1 TO manywaves%
  9635. PRINT '" waveform ";count%;" is "
  9636. INPUT wform$
  9637. wforms$(count%) = wform$
  9638. NEXT
  9639. OTHERWISE
  9640. PRINT'" Sustaining insts A "
  9641. PRINT'" Percussion insts B "
  9642. PRINT'" Percussion insts C "
  9643. PRINT " (press A/B/C) "
  9644. CASE GET$ OF
  9645. WHEN "A","a" :
  9646. manywaves% = 19
  9647. wforms$(1) = "RecorderGb"
  9648. wforms$(2) = "PiccoloE"
  9649. wforms$(3) = "SaxSoprnoE"
  9650. wforms$(4) = "JapFlute"
  9651. wforms$(5) = "SaxBbTenrE"
  9652. wforms$(6) = "BugleC"
  9653. wforms$(7) = "Trombone1"
  9654. wforms$(8) = "Trumpet"
  9655. wforms$(9) = "EngHornGb"
  9656. wforms$(10) = "ClarinetBb"
  9657. wforms$(11) = "ClarVibEb"
  9658. wforms$(12) = "BassoonEb"
  9659. wforms$(13) = "FlugelHnEb"
  9660. wforms$(14) = "CornetEb"
  9661. wforms$(15) = "TubaGb"
  9662. wforms$(16) = "HiString"
  9663. wforms$(17) = "MidStrings"
  9664. wforms$(18) = "BassBowAb"
  9665. wforms$(19) = "SaxEbBarC"
  9666. WHEN "B","b" :
  9667. manywaves% = 19
  9668. wforms$(1) = "Harp1"
  9669. wforms$(2) = "Piano"
  9670. wforms$(3) = "Vibe"
  9671. wforms$(4) = "Timpani"
  9672. wforms$(5) = "TimpRollEb"
  9673. wforms$(6) = "Xylophone"
  9674. wforms$(7) = "TablaHi"
  9675. wforms$(8) = "BDPiloMute"
  9676. wforms$(9) = "Snare"
  9677. wforms$(10) = "TablaHi"
  9678. wforms$(11) = "CymRStRoll"
  9679. wforms$(12) = "CowBell"
  9680. wforms$(13) = "AcuBassAb1"
  9681. wforms$(14) = "GongSoft"
  9682. wforms$(15) = "RotoTomRev"
  9683. wforms$(16) = "HiHat"
  9684. wforms$(17) = "Maracas1"
  9685. wforms$(18) = "SimmonsBD1"
  9686. wforms$(19) = "HiHatFoot"
  9687. WHEN "C","c" :
  9688. manywaves% = 19
  9689. wforms$(1) = "CymSplshCa"
  9690. wforms$(2) = "BassBowAb"
  9691. wforms$(3) = "Bass"
  9692. wforms$(4) = "HiHat"
  9693. wforms$(5) = "HiHatFoot"
  9694. wforms$(6) = "Maracas1"
  9695. wforms$(7) = "CachichiTr"
  9696. wforms$(8) = "BDPiloMute"
  9697. wforms$(9) = "AcuBassAb1"
  9698. wforms$(10) = "SimmonsBD1"
  9699. wforms$(11) = "CymRideBel"
  9700. wforms$(12) = "CowBell"
  9701. wforms$(13) = "AcouBass"
  9702. wforms$(14) = "RotoTomRev"
  9703. wforms$(15) = "Castanets"
  9704. wforms$(16) = "ElecTom1"
  9705. wforms$(17) = "CymbalCrsh"
  9706. wforms$(18) = "CymRStRoll"
  9707. wforms$(19) = "Tomtom1"
  9708. ENDCASE
  9709. :
  9710. ENDCASE
  9711. :
  9712. ENDIF
  9713. :
  9714. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Voices
  9715. *RMLOAD WFS 500000
  9716. wavefilingsystem$ = "loaded"
  9717. :
  9718. FOR count% = 1 TO manywaves%
  9719. wave$ = wforms$(count%)
  9720. CASE wave$ OF
  9721. WHEN "BassBowAb" :
  9722. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9723. *WLOAD BassBowAb
  9724. *WINSTALL BassBowAb
  9725. WHEN "Vibe" :
  9726. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9727. *WLOAD Vibe
  9728. *WINSTALL Vibe
  9729. WHEN "AcouBass" :
  9730. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9731. *WLOAD AcouBass
  9732. *WINSTALL AcouBass
  9733. WHEN "BugleC" :
  9734. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9735. *WLOAD BugleC
  9736. *WINSTALL BugleC
  9737. WHEN "CornetEb" :
  9738. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9739. *WLOAD CornetEb
  9740. *WINSTALL CornetEb
  9741. WHEN "SaxEbBarC" :
  9742. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9743. *WLOAD SaxEbBarC
  9744. *WINSTALL SaxEbBarC
  9745. WHEN "SaxBbTenrE" :
  9746. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9747. *WLOAD SaxBbTenrE
  9748. *WINSTALL SaxBbTenrE
  9749. WHEN "BassoonEb" :
  9750. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9751. *WLOAD BassoonEb
  9752. *WINSTALL BassoonEb
  9753. WHEN "ClarinetBb" :
  9754. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9755. *WLOAD ClarinetBb
  9756. *WINSTALL ClarinetBb
  9757. WHEN "EngHornGb" :
  9758. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9759. *WLOAD EngHornGb
  9760. *WINSTALL EngHornGb
  9761. WHEN "MandolinDb" :
  9762. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9763. *WLOAD MandolinDb
  9764. *WINSTALL MandolinDb
  9765. WHEN "Piano2B" :
  9766. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9767. *WLOAD Piano2B
  9768. *WINSTALL Piano2B
  9769. WHEN "ClarVibEb" :
  9770. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9771. *WLOAD ClarVibEb
  9772. *WINSTALL ClarVibEb
  9773. WHEN "GtrDobroB" :
  9774. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9775. *WLOAD GtrDobroB
  9776. *WINSTALL GtrDobroB
  9777. WHEN "RecorderGb" :
  9778. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9779. *WLOAD RecorderGb
  9780. *WINSTALL RecorderGb
  9781. WHEN "FlugelHnEb" :
  9782. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9783. *WLOAD FlugelHnEb
  9784. *WINSTALL FlugelHnEb
  9785. WHEN "VceMmmGb23" :
  9786. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations3
  9787. *WLOAD VceMmmGb23
  9788. *WINSTALL VceMmmGb23
  9789. WHEN "VceMOooGb3" :
  9790. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations3
  9791. *WLOAD VceMOooGb3
  9792. *WINSTALL VceMOooGb3
  9793. WHEN "VceFemAahC" :
  9794. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations3
  9795. *WLOAD VceFemAahC
  9796. *WINSTALL VceFemAahC
  9797. WHEN "VceFMmmGb4" :
  9798. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations3
  9799. *WLOAD VceFMmmGb4
  9800. *WINSTALL VceFMmmGb4
  9801. WHEN "Bass" :
  9802. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.SoundSynth
  9803. *WLOAD Bass
  9804. *WINSTALL Bass
  9805. WHEN "ChurchBell" :
  9806. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.SoundSynth
  9807. *WLOAD ChurchBell
  9808. *WINSTALL ChurchBell
  9809. WHEN "GuiroFast" :
  9810. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  9811. *WLOAD GuiroFast
  9812. *WINSTALL GuiroFast
  9813. WHEN "Clave" :
  9814. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  9815. *WLOAD Clave
  9816. *WINSTALL Clave
  9817. WHEN "CowBell" :
  9818. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  9819. *WLOAD CowBell
  9820. *WINSTALL CowBell
  9821. WHEN "CymbRideHd" :
  9822. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  9823. *WLOAD CymbRideHd
  9824. *WINSTALL CymbRideHd
  9825. WHEN "AcGuitar1" :
  9826. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9827. *WLOAD AcGuitar1
  9828. *WINSTALL AcGuitar1
  9829. WHEN "CongaHi" :
  9830. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9831. *WLOAD CongaHi
  9832. *WINSTALL CongaHi
  9833. WHEN "DrumExplo" :
  9834. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9835. *WLOAD DrumExplo
  9836. *WINSTALL DrumExplo
  9837. WHEN "ElecTom1" :
  9838. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9839. *WLOAD ElecTom1
  9840. *WINSTALL ElecTom1
  9841. WHEN "Harp1" :
  9842. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9843. *WLOAD Harp1
  9844. *WINSTALL Harp1
  9845. WHEN "Harpsi" :
  9846. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9847. *WLOAD Harpsi
  9848. *WINSTALL Harpsi
  9849. WHEN "HiString" :
  9850. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9851. *WLOAD HiString
  9852. *WINSTALL HiString
  9853. WHEN "HonkyPiano" :
  9854. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9855. *WLOAD HonkyPiano
  9856. *WINSTALL HonkyPiano
  9857. WHEN "JapFlute" :
  9858. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9859. *WLOAD JapFlute
  9860. *WINSTALL JapFlute
  9861. WHEN "JazzOrgan" :
  9862. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9863. *WLOAD JazzOrgan
  9864. *WINSTALL JazzOrgan
  9865. WHEN "MidStrings" :
  9866. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9867. *WLOAD MidStrings
  9868. *WINSTALL MidStrings
  9869. WHEN "NoteArp1" :
  9870. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9871. *WLOAD NoteArp1
  9872. *WINSTALL NoteArp1
  9873. WHEN "SnareEcho" :
  9874. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9875. *WLOAD SnareEcho
  9876. *WINSTALL SnareEcho
  9877. WHEN "TablaHi" :
  9878. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9879. *WLOAD TablaHi
  9880. *WINSTALL TablaHi
  9881. WHEN "Timpani" :
  9882. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9883. *WLOAD Timpani
  9884. *WINSTALL Timpani
  9885. WHEN "Tomtom1" :
  9886. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9887. *WLOAD Tomtom1
  9888. *WINSTALL Tomtom1
  9889. WHEN "Trombone1" :
  9890. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9891. *WLOAD Trombone1
  9892. *WINSTALL Trombone1
  9893. WHEN "Trumpet" :
  9894. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9895. *WLOAD Trumpet
  9896. *WINSTALL Trumpet
  9897. WHEN "Xylophone" :
  9898. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  9899. *WLOAD Xylophone
  9900. *WINSTALL Xylophone
  9901. WHEN "AcouGtr2B" :
  9902. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9903. *WLOAD AcouGtr2B
  9904. *WINSTALL AcouGtr2B
  9905. WHEN "AcuBassAb1" :
  9906. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9907. *WLOAD AcuBassAb1
  9908. *WINSTALL AcuBassAb1
  9909. WHEN "BagPipeG" :
  9910. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9911. *WLOAD BagPipeG
  9912. *WINSTALL BagPipeG
  9913. WHEN "BanjoChdBb" :
  9914. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9915. *WLOAD BanjoChdBb
  9916. *WINSTALL BanjoChdBb
  9917. WHEN "BazookiE" :
  9918. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9919. *WLOAD BazookiE
  9920. *WINSTALL BazookiE
  9921. WHEN "BellC" :
  9922. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9923. *WLOAD BellC
  9924. *WINSTALL BellC
  9925. WHEN "BrassEns1B" :
  9926. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9927. *WLOAD BrassEns1B
  9928. *WINSTALL BrassEns1B
  9929. WHEN "ClavichdBb" :
  9930. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9931. *WLOAD ClavichdBb
  9932. *WINSTALL ClavichdBb
  9933. WHEN "ClavinetBb" :
  9934. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9935. *WLOAD ClavinetBb
  9936. *WINSTALL ClavinetBb
  9937. WHEN "CornetEb" :
  9938. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9939. *WLOAD CornetEb
  9940. *WINSTALL CornetEb
  9941. WHEN "EnsWodAb45" :
  9942. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9943. *WLOAD EnsWodAb45
  9944. *WINSTALL EnsWodAb45
  9945. WHEN "EnsWodGb12" :
  9946. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9947. *WLOAD EnsWodGb12
  9948. *WINSTALL EnsWodGb12
  9949. WHEN "Glock2Ab5" :
  9950. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9951. *WLOAD Glock2Ab5
  9952. *WINSTALL Glock2Ab5
  9953. WHEN "GtMelobarC" :
  9954. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9955. *WLOAD GtMelobarC
  9956. *WINSTALL GtMelobarC
  9957. WHEN "GtWashbnBb" :
  9958. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9959. *WLOAD GtWashbnBb
  9960. *WINSTALL GtWashbnBb
  9961. WHEN "HarmonicaE" :
  9962. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9963. *WLOAD HarmonicaE
  9964. *WINSTALL HarmonicaE
  9965. WHEN "Jew'sHarpA" :
  9966. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9967. *WLOAD Jew'sHarpA
  9968. *WINSTALL Jew'sHarpA
  9969. WHEN "MusetteB" :
  9970. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9971. *WLOAD MusetteB
  9972. *WINSTALL MusetteB
  9973. WHEN "OboeGb" :
  9974. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9975. *WLOAD OboeGb
  9976. *WINSTALL OboeGb
  9977. WHEN "OrchHit2B" :
  9978. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9979. *WLOAD OrchHit2B
  9980. *WINSTALL OrchHit2B
  9981. WHEN "OrcSusBb23" :
  9982. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9983. *WLOAD OrcSusBb23
  9984. *WINSTALL OrcSusBb23
  9985. WHEN "PiccoloE" :
  9986. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9987. *WLOAD PiccoloE
  9988. *WINSTALL PiccoloE
  9989. WHEN "SaxSoprnoE" :
  9990. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9991. *WLOAD SaxSoprnoE
  9992. *WINSTALL SaxSoprnoE
  9993. WHEN "StrngThkBb" :
  9994. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9995. *WLOAD StrngThkBb
  9996. *WINSTALL StrngThkBb
  9997. WHEN "TubaGb" :
  9998. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations2
  9999. *WLOAD TubaGb
  10000. *WINSTALL TubaGb
  10001. WHEN "BassDrum" :
  10002. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.SoundSynth
  10003. *WLOAD BassDrum
  10004. *WINSTALL BassDrum
  10005. WHEN "HiHat" :
  10006. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.SoundSynth
  10007. *WLOAD HiHat
  10008. *WINSTALL HiHat
  10009. WHEN "OrcHit" :
  10010. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.SoundSynth
  10011. *WLOAD OrcHit
  10012. *WINSTALL OrcHit
  10013. WHEN "Piano" :
  10014. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.SoundSynth
  10015. *WLOAD Piano
  10016. *WINSTALL Piano
  10017. WHEN "Sax" :
  10018. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.SoundSynth
  10019. *WLOAD Sax
  10020. *WINSTALL Sax
  10021. WHEN "Snare" :
  10022. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.SoundSynth
  10023. *WLOAD Snare
  10024. *WINSTALL Snare
  10025. WHEN "Choir1" :
  10026. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  10027. *WLOAD Choir1
  10028. *WINSTALL Choir1
  10029. WHEN "ChurOrgan" :
  10030. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  10031. *WLOAD ChurOrgan
  10032. *WINSTALL ChurOrgan
  10033. WHEN "Opera" :
  10034. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  10035. *WLOAD Opera
  10036. *WINSTALL Opera
  10037. WHEN "OrchChoir" :
  10038. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  10039. *WLOAD OrchChoir
  10040. *WINSTALL OrchChoir
  10041. WHEN "OrganHit" :
  10042. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations1
  10043. *WLOAD OrganHit
  10044. *WINSTALL OrganHit
  10045. WHEN "AgogoAfric" :
  10046. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10047. *WLOAD AgogoAfric
  10048. *WINSTALL AgogoAfric
  10049. WHEN "AgogoBrazi" :
  10050. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10051. *WLOAD AgogoBrazi
  10052. *WINSTALL AgogoBrazi
  10053. WHEN "AgogoWood" :
  10054. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10055. *WLOAD AgogoWood
  10056. *WINSTALL AgogoWood
  10057. WHEN "BDGatedRev" :
  10058. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10059. *WLOAD BDGatedRev
  10060. *WINSTALL BDGatedRev
  10061. WHEN "BDMarching" :
  10062. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10063. *WLOAD BDMarching
  10064. *WINSTALL BDMarching
  10065. WHEN "BDPiloMute" :
  10066. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10067. *WLOAD BDPiloMute
  10068. *WINSTALL BDPiloMute
  10069. WHEN "Cabasa" :
  10070. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10071. *WLOAD Cabasa
  10072. *WINSTALL Cabasa
  10073. WHEN "Cachichi1" :
  10074. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10075. *WLOAD Cachichi1
  10076. *WINSTALL Cachichi1
  10077. WHEN "CachichiTr" :
  10078. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10079. *WLOAD CachichiTr
  10080. *WINSTALL CachichiTr
  10081. WHEN "Castanets" :
  10082. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10083. *WLOAD Castanets
  10084. *WINSTALL Castanets
  10085. WHEN "CongaMid" :
  10086. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10087. *WLOAD CongaMid
  10088. *WINSTALL CongaMid
  10089. WHEN "CongaSmCl" :
  10090. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10091. *WLOAD CongaSmCl
  10092. *WINSTALL CongaSmCl
  10093. WHEN "CymbalCrsh" :
  10094. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10095. *WLOAD CymbalCrsh
  10096. *WINSTALL CymbalCrsh
  10097. WHEN "CymRideBel" :
  10098. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10099. *WLOAD CymRideBel
  10100. *WINSTALL CymRideBel
  10101. WHEN "CymRStRoll" :
  10102. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10103. *WLOAD CymRStRoll
  10104. *WINSTALL CymRStRoll
  10105. WHEN "CymSplshCa" :
  10106. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10107. *WLOAD CymSplshCa
  10108. *WINSTALL CymSplshCa
  10109. WHEN "Flexitone" :
  10110. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10111. *WLOAD Flexitone
  10112. *WINSTALL Flexitone
  10113. WHEN "GongSoft" :
  10114. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10115. *WLOAD GongSoft
  10116. *WINSTALL GongSoft
  10117. WHEN "Gonza1" :
  10118. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10119. *WLOAD Gonza1
  10120. *WINSTALL Gonza1
  10121. WHEN "GuiroSlow" :
  10122. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10123. *WLOAD GuiroSlow
  10124. *WINSTALL GuiroSlow
  10125. WHEN "HandClaps" :
  10126. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10127. *WLOAD HandClaps
  10128. *WINSTALL HandClaps
  10129. WHEN "HiHatFoot" :
  10130. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10131. *WLOAD HiHatFoot
  10132. *WINSTALL HiHatFoot
  10133. WHEN "Maracas1" :
  10134. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10135. *WLOAD Maracas1
  10136. *WINSTALL Maracas1
  10137. WHEN "Ratchet" :
  10138. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10139. *WLOAD Ratchet
  10140. *WINSTALL Ratchet
  10141. WHEN "RotoTomRev" :
  10142. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10143. *WLOAD RotoTomRev
  10144. *WINSTALL RotoTomRev
  10145. WHEN "SimmonsBD1" :
  10146. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10147. *WLOAD SimmonsBD1
  10148. *WINSTALL SimmonsBD1
  10149. WHEN "SimmonsSn1" :
  10150. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10151. *WLOAD SimmonsSn1
  10152. *WINSTALL SimmonsSn1
  10153. WHEN "SuperGong" :
  10154. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10155. *WLOAD SuperGong
  10156. *WINSTALL SuperGong
  10157. WHEN "SynTom" :
  10158. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10159. *WLOAD SynTom
  10160. *WINSTALL SynTom
  10161. WHEN "TimpCresBb" :
  10162. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10163. *WLOAD TimpCresBb
  10164. *WINSTALL TimpCresBb
  10165. WHEN "TimpLowBb" :
  10166. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10167. *WLOAD TimpLowBb
  10168. *WINSTALL TimpLowBb
  10169. WHEN "TimpRollEb" :
  10170. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10171. *WLOAD TimpRollEb
  10172. *WINSTALL TimpRollEb
  10173. WHEN "TomRoll" :
  10174. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10175. *WLOAD TomRoll
  10176. *WINSTALL TomRoll
  10177. WHEN "ToyHooter" :
  10178. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10179. *WLOAD ToyHooter
  10180. *WINSTALL ToyHooter
  10181. WHEN "ToyWhistle" :
  10182. *Dir SDFS::RISCOSpi.$.CAC.CACvar.Creations.Creations6
  10183. *WLOAD ToyWhistle
  10184. *WINSTALL ToyWhistle
  10185. OTHERWISE VDU 7 : PRINT''" !!! ";wave$;" not loaded !!!"
  10186. PRINT'" Press C to continue loading"
  10187. CASE GET$ OF
  10188. WHEN"C","c" :
  10189. ENDCASE
  10190. ENDCASE
  10191. NEXT
  10192. REM waveload$ = "done" !! remove REM if loading waveforms reinstated
  10193. ENDIF
  10194. *NoDir
  10195. PROCdisplay
  10196. ENDPROC
  10197. :
  10198. REM*********************************************
  10199. :
  10200. DEF PROCtempo
  10201. :
  10202. warning$ = "y"
  10203. CLS
  10204. PRINT'" Tempo to start at which bar "
  10205. INPUT' " (for 1 type 0)"sbar%
  10206. PRINT'" and last until which bar "
  10207. INPUT' " (for end type 0) "ebar%
  10208. IF ebar% = 0 THEN ebar% = nobars%
  10209. INPUT'" Tempo per bar is "MM%
  10210. :
  10211. REM convert durations to new tempo
  10212. FOR count% = 0 TO numparts%-1
  10213. FOR counter% = 0 TO numusedcells%(count%)
  10214. bar% = array%(counter%,0,count%)DIV10^6
  10215. IF bar% >= sbar% AND bar% <= ebar% THEN
  10216. oldtempo% = tempi%(bar%)
  10217. dur% = (array%(counter%,1,count%)DIV10)MOD10^3
  10218. converter = oldtempo%/MM%
  10219. dur = dur% * converter
  10220. fraction = ((dur*10)DIV1)MOD10
  10221. IF fraction>4 THEN dur% = dur+1 ELSE dur% = dur
  10222. IF dur% > 999 THEN
  10223. dur% = 998 : REM only 3 array cells available
  10224. IF warning$ = "y" THEN
  10225. VDU 7
  10226. CLS
  10227. PRINT'" This tempo change has resulted in some "
  10228. PRINT " voices, starting with voice ";count%+1;", being "
  10229. PRINT " given a duration which will now be "
  10230. PRINT " permanently too short (max = 50 secs). "
  10231. PRINT'" If this is okay simply continue, "
  10232. PRINT " otherwise now QUIT and reload the file. "
  10233. PRINT'" (to continue press a key - NOT Esc)"
  10234. CASE GET$ OF
  10235. WHEN "c" : warning$ = "n"
  10236. OTHERWISE warning$ = "n"
  10237. ENDCASE
  10238. ENDIF
  10239. ENDIF
  10240. part1% = (array%(counter%,1,count%)DIV10^4)*10^4
  10241. part2% = dur% * 10
  10242. part3% = array%(counter%,1,count%)MOD10
  10243. array%(counter%,1,count%) = part1% + part2% + part3%
  10244. ENDIF
  10245. NEXT
  10246. NEXT
  10247. :
  10248. FOR count% = sbar% TO ebar%
  10249. tempi%(count%) = MM%
  10250. NEXT
  10251. IF sbar% = 1 THEN tempi%(0) = MM% : REM anticipates a bug when bars 1 - 1 PLAYed
  10252. :
  10253. PROCdisplay
  10254. :
  10255. ENDPROC
  10256. :
  10257. REM************************************************
  10258. :
  10259. DEF PROCerror
  10260. :
  10261. CASE errorbeforedisplay$ OF
  10262. WHEN "y":
  10263. CLS
  10264. REPORT
  10265. PRINT " at line ";ERL
  10266. PRINT '" To continue press Q to quit"
  10267. PRINT '" then allocate more memory in "
  10268. PRINT '" Tasks before starting CAC "
  10269. CASE GET$ OF
  10270. WHEN "Q","q" : QUIT
  10271. ENDCASE
  10272. WHEN "debug" :
  10273. PROCwindow(20,69,60,54)
  10274. REPORT
  10275. PRINT " at line ";ERL
  10276. PRINT'" To continue press a key"
  10277. PRINT'" or to quit press Q "
  10278. CASE GET$ OF
  10279. WHEN "Q","q": QUIT
  10280. OTHERWISE
  10281. PROCdisplay
  10282. ENDCASE
  10283. OTHERWISE
  10284. PROCdisplay
  10285. ENDCASE
  10286. :
  10287. ENDPROC
  10288. :
  10289. REM*************************************************
  10290. :
  10291. DEF PROCtobegin
  10292. :
  10293. PRINT''''" Open a new file or an existing one? (N/E)"
  10294. CASE GET$ OF
  10295. WHEN "N","n" : PROCprearraysetup : PROCarraysetup
  10296. alterbeatsat% = (960/beatfactor%)/8 : PROCdisplay
  10297. WHEN "E","e" : PROCloadfile
  10298. OTHERWISE VDU 7 : PROCtobegin
  10299. ENDCASE
  10300. :
  10301. ENDPROC
  10302. :
  10303. REM************************************************
  10304. :
  10305. DEF PROCfunctionreception
  10306. :
  10307. IF easiermenus$ = "n" THEN
  10308. PROCwindow(20,69,60,54)
  10309. CLS : OFF
  10310. :
  10311. PRINT'" Accel/rit A"
  10312. PRINT " Layered attacks L"
  10313. PRINT " Pitch string P"
  10314. PRINT " Pitch string 2 S"
  10315. PRINT " Pitch string 3 N"
  10316. PRINT " Pitch string 4 (trill/trem) T"
  10317. PRINT " pitch string 5 (pattern) R"
  10318. PRINT " pitch string 6 (equal steps) C"
  10319. PRINT " Interval string I"
  10320. PRINT " Distort D"
  10321. PRINT " Slave voice V"
  10322. PRINT " Double-stop B"
  10323. ELSE
  10324. PROCwindow(20,69,60,42)
  10325. CLS : OFF
  10326. :
  10327. PRINT'" Accel/rit A"
  10328. PRINT '" Layered attacks L"
  10329. PRINT '" Pitch string P"
  10330. PRINT '" Pitch string 2 S"
  10331. PRINT '" Pitch string 3 N"
  10332. PRINT '" Pitch string 4 (trill/trem) T"
  10333. PRINT '" pitch string 5 (pattern) R"
  10334. PRINT '" pitch string 6 (equal steps) C"
  10335. PRINT '" Interval string I"
  10336. PRINT '" Distort D"
  10337. PRINT '" Slave voice V"
  10338. PRINT '" Double-stop B"
  10339. ENDIF
  10340. CASE GET$ OF
  10341. WHEN "A","a" : PROCfunctionprelude
  10342. WHEN "L","l" : PROCprelayeredattacks
  10343. WHEN "P","p" : PROCpitchstring
  10344. WHEN "S","s" : PROCpitchstring2
  10345. WHEN "N","n" : PROCpitchstring3
  10346. WHEN "T","t" : PROCpitchstring4
  10347. WHEN "R","r" : PROCpitchstring5
  10348. WHEN "C","c" : PROCpitchstring6
  10349. WHEN "I","i" : PROCpreintervalstring
  10350. WHEN "D","d" : distort$ = "ON" : CLS
  10351. IF easiermenus$ = "n" THEN
  10352. PROCwindow(20,69,60,54)
  10353. CLS : OFF
  10354. PRINT''" Distort"
  10355. PRINT'" ATTACKS A"
  10356. PRINT " PITCHES P"
  10357. PRINT " DURATIONS D"
  10358. PRINT " AMPLITUDES M"
  10359. PRINT " ENVELOPES E"
  10360. PRINT " INFLECTIONS I"
  10361. ELSE
  10362. PROCwindow(20,69,60,42)
  10363. CLS : OFF
  10364. PRINT''" Distort"
  10365. PRINT'" ATTACKS A"
  10366. PRINT' " PITCHES P"
  10367. PRINT '" DURATIONS D"
  10368. PRINT '" AMPLITUDES M"
  10369. PRINT '" ENVELOPES E"
  10370. PRINT '" INFLECTIONS I"
  10371. ENDIF
  10372. :
  10373. CASE GET$ OF
  10374. WHEN "A","a" : distortpara$ = "attacks"
  10375. WHEN "P","p" : distortpara$ = "pitches"
  10376. WHEN "D","d" : distortpara$ = "durations"
  10377. WHEN "M","m" : distortpara$ = "amplitudes"
  10378. WHEN "E","e" : distortpara$ = "envelopes"
  10379. WHEN "I","i" : distortpara$ = "inflections"
  10380. OTHERWISE VDU 7 : PROCfunctionreception
  10381. ENDCASE
  10382. PROCcopy
  10383. WHEN "V","v" : quickslave$ = "n" : PROCslave
  10384. WHEN "B","b" : PROCdoublestop
  10385. WHEN "E", "e" : PROCconvertoldenvelopes
  10386. WHEN "O", "o" : PROCroguenotes
  10387. OTHERWISE VDU 7 : PROCfunctionreception
  10388. ENDCASE
  10389. ON
  10390. :
  10391. ENDPROC
  10392. :
  10393. REM**********************************************
  10394. :
  10395. DEF PROCprelayeredattacks
  10396. :
  10397. IF easiermenus$ = "n" THEN PROCwindow(20,69,70,55) ELSE PROCwindow(20,69,70,42)
  10398. :
  10399. PRINT'" Re-run current settings, or edit current settings,"
  10400. PRINT" or create new ones, or load a file? (R/E/N/F)"
  10401. CASE GET$ OF
  10402. WHEN "R","r" : PROClayeredattacks
  10403. WHEN "E","e" : PROCeditlayers
  10404. WHEN "F","f" : PROCloadlayers :PROCeditlayers
  10405. OTHERWISE
  10406. filenamelyr$ = ""
  10407. :
  10408. chanceoflayer%(1) = 1 : numlayersections% = 1 : numlayerOKsects%() = 0
  10409. :
  10410. INPUT'" Total duration is how many bars "bars%
  10411. INPUT'" and how many beats "beats%
  10412. PROCalterbeats : totallength% = (bars%*960)+beats%
  10413. PRINT''" LAYERS -"
  10414. INPUT'" How many layers "numlayers%
  10415. PRINT'" Are the layers to appear equally frequently,"
  10416. PRINT " or in certain proportions (E/P) "
  10417. :
  10418. CASE GET$ OF
  10419. :
  10420. WHEN "P","p" :
  10421. PRINT'" Piece is divided into how many sections"
  10422. INPUT " of different contribution-proportions "numlayersections%
  10423. :
  10424. IF numlayersections% > 1 THEN
  10425. :
  10426. FOR count% = 2 TO numlayersections%
  10427. PRINT'" Section ";count%;" starts at beat number "
  10428. INPUT beats%
  10429. PROCalterbeats : startoflayersection%(count%) = beats%
  10430. NEXT
  10431. ENDIF
  10432. :
  10433. FOR count% = 1 TO numlayersections%
  10434. FOR count1% = 1 TO numlayers%
  10435. PRINT '"In section ";count%;", layer ";count1%;" has "
  10436. PRINT "how many proportions?"
  10437. INPUT shareoflayers%(count%,count1%)
  10438. NEXT
  10439. NEXT
  10440. :
  10441. OTHERWISE shareoflayers%() = 1
  10442. ENDCASE
  10443. :
  10444. PRINT''" Are number of attacks or unit durations to be"
  10445. PRINT " divided into sections or appearance numbers?"
  10446. CASE GET$ OF
  10447. WHEN "Y","y" : bysections$ = "y"
  10448. OTHERWISE bysections$ = "n"
  10449. ENDCASE
  10450. PRINT'" Are unit durations in any layers to be multiplied?"
  10451. CASE GET$ OF
  10452. WHEN "Y","y" : tomultiply$ = "y"
  10453. OTHERWISE tomultiply$ = "n"
  10454. ENDCASE
  10455. PRINT'" Are the occurance of layers to be controlled?"
  10456. CASE GET$ OF
  10457. WHEN "Y","y" : tooccur$ = "y"
  10458. OTHERWISE tooccur$ = "n"
  10459. ENDCASE
  10460. PRINT'" Does the number of attacks ever exceed 1?"
  10461. CASE GET$ OF
  10462. WHEN "Y","y" : exceed1$ = "y"
  10463. OTHERWISE exceed1$ = "n"
  10464. ENDCASE
  10465. :
  10466. FOR count% = 1 TO numlayers%
  10467. :
  10468. PRINT''" NUMBER OF ATTACKS -"
  10469. :
  10470. IF bysections$ = "y" THEN
  10471. PRINT'" In layer ";count%;" are the number of attacks controlled"
  10472. PRINT " by sections or by appearance number (S/A)"
  10473. CASE GET$ OF
  10474. WHEN "S","s" :
  10475. attackscontrol$(count%) = "S"
  10476. INPUT'" How many sections "numattackssections%(count%)
  10477. IF numattackssections%(count%) > 1 THEN
  10478. FOR count1% = 2 TO numattackssections%(count%)
  10479. PRINT'" (layer ";count%;") section ";count1%;" starts at beat"
  10480. INPUT beats%
  10481. PROCalterbeats : startofattackssection%(count%,count1%) = beats%
  10482. NEXT
  10483. ENDIF
  10484. :
  10485. IF exceed1$ = "y" THEN
  10486. FOR count1% = 1 TO numattackssections%(count%)
  10487. PRINT'" In layer ";count%;", section ";count1%;" the number"
  10488. PRINT" of attacks varies between..."
  10489. INPUT numattax%(count%,count1%,0)
  10490. INPUT" and..."numattax%(count%,count1%,1)
  10491. NEXT
  10492. ELSE numattax%() = 1
  10493. ENDIF
  10494. :
  10495. WHEN "A","a" :
  10496. attackscontrol$(count%) = "A"
  10497. INPUT'" How many 'sections' of appearances "numattackssections1%(count%)
  10498. IF numattackssections1%(count%) > 1 THEN
  10499. FOR count1% = 2 TO numattackssections1%(count%)
  10500. PRINT'" (layer ";count%;") section ";count1%;" starts at appearance "
  10501. INPUT startofattackssection1%(count%,count1%)
  10502. NEXT
  10503. ENDIF
  10504. :
  10505. IF exceed1$ = "y" THEN
  10506. FOR count1% = 1 TO numattackssections1%(count%)
  10507. PRINT'" In layer ";count%;", section ";count1%;" the number"
  10508. PRINT" of attacks varies between..."
  10509. INPUT numattax1%(count%,count1%,0)
  10510. INPUT" and... "numattax1%(count%,count1%,1)
  10511. NEXT
  10512. ELSE numattax1%() = 1
  10513. ENDIF
  10514. ENDCASE
  10515. :
  10516. ELSE
  10517. attackscontrol$(count%) = "S" : numattackssections%(count%) = 1
  10518. IF exceed1$ = "y" THEN
  10519. PRINT'" In layer ";count%;" the number"
  10520. PRINT" of attacks varies between "
  10521. INPUT numattax%(count%,1,0)
  10522. INPUT" and..."numattax%(count%,1,1)
  10523. ELSE numattax%() = 1
  10524. ENDIF
  10525. ENDIF
  10526. :
  10527. PRINT''" DURATIONS"
  10528. :
  10529. IF bysections$ = "y" THEN
  10530. :
  10531. PRINT'" In layer ";count%;" are the unit durations controlled"
  10532. PRINT" by sections or by appearance number (S/A)"
  10533. CASE GET$ OF
  10534. WHEN "S","s" :
  10535. durationscontrol$(count%) = "S"
  10536. INPUT'" How many sections "numdurationssections%(count%)
  10537. IF numdurationssections%(count%) > 1 THEN
  10538. FOR count1% = 2 TO numdurationssections%(count%)
  10539. PRINT'" (layer ";count%;") section ";count1%;" starts at beat "
  10540. INPUT beats%
  10541. PROCalterbeats : startofdurationssection%(count%,count1%) = beats%
  10542. NEXT
  10543. ENDIF
  10544. :
  10545. FOR count1% = 1 TO numdurationssections%(count%)
  10546. PRINT'" In layer ";count%;", section ";count1%;" the unit duration is"
  10547. INPUT beats%
  10548. PROCalterbeats : doorations%(count%,count1%) = beats%
  10549. NEXT
  10550. :
  10551. WHEN "A","a" :
  10552. durationscontrol$(count%) = "A"
  10553. INPUT'" How many 'sections' "numdurationssections1%(count%)
  10554. IF numdurationssections1%(count%) > 1 THEN
  10555. FOR count1% = 2 TO numdurationssections1%(count%)
  10556. PRINT'" (layer ";count%;") section ";count1%;" starts at appearance "
  10557. INPUT startofdurationssection1%(count%,count1%)
  10558. NEXT
  10559. ENDIF
  10560. FOR count1% = 1 TO numdurationssections1%(count%)
  10561. PRINT'" In layer ";count%;", section ";count1%;" the unit duration is "
  10562. INPUT beats%
  10563. PROCalterbeats : doorations1%(count%,count1%) = beats%
  10564. NEXT
  10565. ENDCASE
  10566. :
  10567. ELSE durationscontrol$(count%) = "S" : numdurationssections%(count%) = 1
  10568. PRINT'" In layer ";count%;" the unit duration is"
  10569. INPUT beats%
  10570. PROCalterbeats : doorations%(count%,1) = beats%
  10571. ENDIF
  10572. :
  10573. IF tomultiply$ = "y" THEN
  10574. :
  10575. PRINT'" Do you want the unit duration to be multiplied"
  10576. PRINT " by a given series of values (Y/N) "
  10577. CASE GET$ OF
  10578. WHEN "Y","y" :
  10579. multiplier$(count%) = "Y"
  10580. PRINT'" starting fresh at each appearance or irrespective (F/I) "
  10581. CASE GET$ OF
  10582. WHEN "F","f" :
  10583. multipliermode$(count%) = "F"
  10584. OTHERWISE multipliermode$(count%) = "I"
  10585. ENDCASE
  10586. :
  10587. PRINT'" How many values "
  10588. INPUT numvalues%(count%)
  10589. FOR count1% = 1 TO numvalues%(count%)
  10590. PRINT'" value ";count1%;" is "
  10591. INPUT values(count%,count1%)
  10592. NEXT
  10593. OTHERWISE multiplier$(count%) = "N"
  10594. ENDCASE
  10595. :
  10596. ELSE multiplier$(count%) = "N"
  10597. ENDIF
  10598. :
  10599. IF tooccur$ = "y" THEN
  10600. :
  10601. PRINT'" Do you want this layer to reoccur according"
  10602. PRINT " to minimum and maximum intervals (eg to"
  10603. PRINT " control phrase-lengths)?"
  10604. CASE GET$ OF
  10605. WHEN "Y","y" :
  10606. INPUT'" How many sections of this "numlayerOKsects%(count%)
  10607. FOR count1% = 1 TO numlayerOKsects%(count%)
  10608. IF numlayerOKsects%(count%) > 1 THEN
  10609. PRINT'" section ";count1%;" begins at beat "
  10610. INPUT beats%
  10611. PROCalterbeats : x% = beats%
  10612. ELSE x% = 0
  10613. ENDIF
  10614. PRINT'" in this section the layer should NOT reoccur"
  10615. PRINT" until at least how many beats from the"
  10616. PRINT" end of its previous occurence?"
  10617. INPUT beats%
  10618. PROCalterbeats : y% = beats%
  10619. PRINT'" but SHOULD be made to reoccur after how "
  10620. PRINT" many beats from the end of its previous"
  10621. PRINT" occurence?"
  10622. INPUT beats%
  10623. PROCalterbeats : z% = beats%
  10624. layersOK%(count%,count1%,0) = x%
  10625. layersOK%(count%,count1%,1) = y%
  10626. layersOK%(count%,count1%,2) = z%
  10627. NEXT
  10628. OTHERWISE
  10629. ENDCASE
  10630. :
  10631. ENDIF
  10632. :
  10633. NEXT
  10634. :
  10635. ENDCASE
  10636. :
  10637. PROClayeredattacks
  10638. :
  10639. ENDPROC
  10640. :
  10641. REM**************************************************
  10642. :
  10643. DEF PROClayeredattacks
  10644. :
  10645. REM line below to come BEFORE the loop
  10646. cellsused% = 0 : attacks1%() = 0 : layer% = 0 : appearances%() = 0
  10647. valuescounter%() = 1 : layerends%() = 0
  10648. :
  10649. REPEAT
  10650. REM WHICH LAYER (loop starts here)
  10651. layer1% = layer%
  10652. layerends%(layer1%) = attacks1%(cellsused%)
  10653. :
  10654. REM fill OKtouselayers%() according to which section you're in
  10655. :
  10656. FOR count% = 1 TO numlayers%
  10657. IF numlayerOKsects%(count%) > 0 THEN
  10658. FOR counter% = 1 TO numlayerOKsects%(count%)
  10659. IF attacks1%(cellsused%) >= layersOK%(count%,counter%,0) THEN
  10660. OKtouselayers%(count%,0) = layerends%(count%) + layersOK%(count%,counter%,1)
  10661. OKtouselayers%(count%,1) = layerends%(count%) + layersOK%(count%,counter%,2)
  10662. ENDIF
  10663. NEXT
  10664. ENDIF
  10665. NEXT
  10666. :
  10667. REM use any layers due
  10668. FOR count% = 1 TO numlayers%
  10669. IF numlayerOKsects%(count%) > 0 THEN
  10670. IF attacks1%(cellsused%) >= OKtouselayers%(count%,1) THEN layer% = count%
  10671. ENDIF
  10672. NEXT
  10673. :
  10674. IF layer1% = layer% THEN
  10675. :
  10676. REPEAT
  10677. :
  10678. REM fill layershare%() according to which section you're in
  10679. FOR count% = 1 TO numlayersections%
  10680. :
  10681. IF attacks1%(cellsused%) >= startoflayersection%(count%) THEN
  10682. FOR count1% = 1 TO numlayers%
  10683. layershare%(count1%) = shareoflayers%(count%,count1%)
  10684. NEXT
  10685. ENDIF
  10686. NEXT
  10687. :
  10688. FOR count% = 1 TO numlayers%
  10689. chanceoflayer%(count%+1) = chanceoflayer%(count%)+layershare%(count%)
  10690. NEXT
  10691. x% = RND((chanceoflayer%(numlayers%+1))-1)
  10692. FOR count% = 1 TO numlayers%
  10693. IF x% >= chanceoflayer%(count%) THEN layer% = count%
  10694. NEXT
  10695. :
  10696. REM exclude layers coming too soon
  10697. IF numlayerOKsects%(layer%) > 0 THEN
  10698. IF attacks1%(cellsused%) < OKtouselayers%(layer%,0) THEN layerOK$ = "n" ELSE layerOK$ = "y"
  10699. ELSE layerOK$ = "y"
  10700. ENDIF
  10701. UNTIL layer% <> layer1% AND layerOK$ = "y"
  10702. :
  10703. ENDIF
  10704. appearances%(layer%) += 1
  10705. :
  10706. REM NUMBER OF ATTACKS
  10707. IF attackscontrol$(layer%) = "S" THEN
  10708. FOR count% = 1 TO numattackssections%(layer%)
  10709. IF attacks1%(cellsused%) >= startofattackssection%(layer%,count%) THEN
  10710. a% = numattax%(layer%,count%,0) : b% = numattax%(layer%,count%,1)
  10711. IF (b%-a%) = 0 THEN
  10712. noattax% = 1
  10713. ELSE
  10714. noattax% = RND((b%-a%)+1)
  10715. ENDIF
  10716. noattax% += (a%-1)
  10717. ENDIF
  10718. NEXT
  10719. ELSE
  10720. FOR count% = 1 TO numattackssections1%(layer%)
  10721. IF appearances%(layer%) >= startofattackssection1%(layer%,count%) THEN
  10722. a% = numattax1%(layer%,count%,0) : b% = numattax1%(layer%,count%,1)
  10723. IF (b%-a%) = 0 THEN
  10724. noattax% = 1
  10725. ELSE
  10726. noattax% = RND((b%-a%)+1)
  10727. ENDIF
  10728. noattax% += (a%-1)
  10729. ENDIF
  10730. NEXT
  10731. ENDIF
  10732. :
  10733. IF durationscontrol$(layer%) = "S" THEN
  10734. FOR count% = 1 TO numdurationssections%(layer%)
  10735. IF attacks1%(cellsused%) >= startofdurationssection%(layer%,count%) THEN
  10736. duration% = doorations%(layer%,count%)
  10737. ENDIF
  10738. NEXT
  10739. ELSE
  10740. FOR count% = 1 TO numdurationssections1%(layer%)
  10741. IF appearances%(layer%) >= startofdurationssection1%(layer%,count%) THEN
  10742. duration% = doorations1%(layer%,count%)
  10743. ENDIF
  10744. NEXT
  10745. ENDIF
  10746. :
  10747. IF multiplier$(layer%) = "N" THEN
  10748. FOR count% = 1 TO noattax%
  10749. attacks1%(cellsused%+1) = attacks1%(cellsused%)+duration%
  10750. cellsused% += 1
  10751. NEXT
  10752. ELSE
  10753. IF multipliermode$(layer%) = "F" THEN
  10754. FOR count% = 1 TO noattax%
  10755. attacks1%(cellsused%+1)=attacks1%(cellsused%)+(duration%*values(layer%,count%))
  10756. cellsused% += 1
  10757. NEXT
  10758. ELSE
  10759. FOR count% = 1 TO noattax%
  10760. attacks1%(cellsused%+1)=attacks1%(cellsused%)+(duration%*values(layer%,valuescounter%(layer%)))
  10761. cellsused% += 1
  10762. valuescounter%(layer%) += 1
  10763. IF valuescounter%(layer%) > numvalues%(layer%) THEN valuescounter%(layer%) = 1
  10764. NEXT
  10765. ENDIF
  10766. ENDIF
  10767. :
  10768. UNTIL attacks1%(cellsused%) >= totallength%
  10769. manyattacks% = cellsused%+1
  10770. :
  10771. PRINT'" Do you want to save these settings?"
  10772. CASE GET$ OF
  10773. WHEN "Y","y" : PROCsavelayers
  10774. OTHERWISE
  10775. ENDCASE
  10776. :
  10777. method$ = "raw" : PROCinsertattacks
  10778. :
  10779. ENDPROC
  10780. :
  10781. REM*********************************************************
  10782. :
  10783. DEF PROCconvertsamplenote
  10784. :
  10785. pitchclass% = samplenote% DIV 100
  10786. CASE pitchclass% OF
  10787. WHEN 0 : eighthtone% = 1
  10788. WHEN 1 : eighthtone% = 9
  10789. WHEN 2 : eighthtone% = 17
  10790. WHEN 3 : eighthtone% = 21
  10791. WHEN 4 : eighthtone% = 29
  10792. WHEN 5 : eighthtone% = 37
  10793. WHEN 6 : eighthtone% = 45
  10794. ENDCASE
  10795. octave% = samplenote% MOD 10
  10796. eighthtone% += (octave%*48)
  10797. accidental% = ((samplenote% MOD 100)DIV10)-1
  10798. eighthtone% += accidental%
  10799. samplenote% = eighthtone%
  10800. ENDPROC
  10801. :
  10802. REM*******************************************
  10803. :
  10804. DEF PROCconvertsimplenote
  10805. :
  10806. IF simplenote% > 2 THEN oct% = 0
  10807. IF simplenote% > 50 THEN oct% = 1
  10808. IF simplenote% > 98 THEN oct% = 2
  10809. IF simplenote% > 146 THEN oct% = 3
  10810. IF simplenote% > 194 THEN oct% = 4
  10811. IF simplenote% > 242 THEN oct% = 5
  10812. IF simplenote% > 290 THEN oct% = 6
  10813. IF simplenote% > 338 THEN oct% = 7
  10814. IF simplenote% > 386 THEN oct% = 8
  10815. :
  10816. WHILE simplenote% > 50
  10817. simplenote% -= 48
  10818. ENDWHILE
  10819. :
  10820. CASE simplenote% OF
  10821. WHEN 3 : pitch% = 3
  10822. WHEN 4 : pitch% = 4
  10823. WHEN 5 : pitch% = 5
  10824. WHEN 6 : pitch% = 6
  10825. WHEN 7 : pitch% = 7
  10826. WHEN 8 : pitch% = 8
  10827. WHEN 9 : pitch% = 11
  10828. WHEN 10 : pitch% = 12
  10829. WHEN 11 : pitch% = 13
  10830. WHEN 12 : pitch% = 14
  10831. WHEN 13 : pitch% = 15
  10832. WHEN 14 : pitch% = 16
  10833. WHEN 15 : pitch% = 17
  10834. WHEN 16 : pitch% = 18
  10835. WHEN 17 : pitch% = 21
  10836. WHEN 18 : pitch% = 22
  10837. WHEN 19 : pitch% = 23
  10838. WHEN 20 : pitch% = 24
  10839. WHEN 21 : pitch% = 25
  10840. WHEN 22 : pitch% = 26
  10841. WHEN 23 : pitch% = 27
  10842. WHEN 24 : pitch% = 34
  10843. WHEN 25 : pitch% = 35
  10844. WHEN 26 : pitch% = 36
  10845. WHEN 27 : pitch% = 37
  10846. WHEN 28 : pitch% = 38
  10847. WHEN 29 : pitch% = 39
  10848. WHEN 30 : pitch% = 42
  10849. WHEN 31 : pitch% = 43
  10850. WHEN 32 : pitch% = 44
  10851. WHEN 33 : pitch% = 45
  10852. WHEN 34 : pitch% = 46
  10853. WHEN 35 : pitch% = 47
  10854. WHEN 36 : pitch% = 48
  10855. WHEN 37 : pitch% = 51
  10856. WHEN 38 : pitch% = 52
  10857. WHEN 39 : pitch% = 53
  10858. WHEN 40 : pitch% = 54
  10859. WHEN 41 : pitch% = 55
  10860. WHEN 42 : pitch% = 56
  10861. WHEN 43 : pitch% = 57
  10862. WHEN 44 : pitch% = 58
  10863. WHEN 45 : pitch% = 61
  10864. WHEN 46 : pitch% = 62
  10865. WHEN 47 : pitch% = 63
  10866. WHEN 48 : pitch% = 64
  10867. WHEN 49 : pitch% = 65
  10868. WHEN 50 : pitch% = 66
  10869. ENDCASE
  10870. :
  10871. simplenote% = (pitch%*10)+oct%
  10872. ENDPROC
  10873. :
  10874. REM**************************************
  10875. :
  10876. :
  10877. DEF PROCpitchstring
  10878. :
  10879. PROCwindow(20,25,70,35)
  10880. :
  10881. :
  10882. PRINT'" Create a new pitch string or edit the"
  10883. PRINT " current one, or load a file (N/E/F)"
  10884. CASE GET$ OF
  10885. WHEN "E","e" : loadstring$ = "n" :PROCeditpitchstring
  10886. WHEN "F","f" : loadstring$ = "y" :PROCeditpitchstring
  10887. OTHERWISE
  10888. ENDCASE
  10889. :
  10890. filenamestg$ = ""
  10891. contoursequences%() = 0
  10892. transpositionsequences%() = 0
  10893. octavesequences%() = 0
  10894. PRINT'" Total number of notes in the"
  10895. INPUT " pitch string (inc. sample) "numpitches%
  10896. PRINT'" Is the grid semi, quarter or eighth-tone (S/Q/E) "
  10897. PRINT'" (0 = semi) "
  10898. CASE GET$ OF
  10899. WHEN "S","s" : grid$ = "s"
  10900. WHEN "Q","q" : grid$ = "q"
  10901. WHEN "E","e" : grid$ = "e"
  10902. OTHERWISE grid$ = "s"
  10903. ENDCASE
  10904. CLS
  10905. :
  10906. PRINT'" SAMPLE "
  10907. INPUT'" How many notes in the sample? "samplesize%
  10908. FOR count% = 1 TO samplesize%
  10909. PRINT'" note ";count%;" is pitchclass ";
  10910. COLOUR 3
  10911. CASE GET$ OF
  10912. WHEN "C","c" : samplenote% = 0 : PRINT "C"
  10913. WHEN "D","d" : samplenote% = 1 : PRINT "D"
  10914. WHEN "E","e" : samplenote% = 2 : PRINT "E"
  10915. WHEN "F","f" : samplenote% = 3 : PRINT "F"
  10916. WHEN "G","g" : samplenote% = 4 : PRINT "G"
  10917. WHEN "A","a" : samplenote% = 5 : PRINT "A"
  10918. WHEN "B","b" : samplenote% = 6 : PRINT "B"
  10919. ENDCASE
  10920. samplenote% = samplenote%*100
  10921. COLOUR 0
  10922. PRINT " accidental ";
  10923. COLOUR 3
  10924. CASE GET$ OF
  10925. WHEN "1" : samplenote% += 10 : PRINT "flat"
  10926. WHEN "2" : samplenote% += 20 : PRINT "3/8 flat"
  10927. WHEN "3" : samplenote% += 30 : PRINT "1/4 flat"
  10928. WHEN "4" : samplenote% += 40 : PRINT "1/8 flat"
  10929. WHEN "5" : samplenote% += 50 : PRINT "nat"
  10930. WHEN "6" : samplenote% += 60 : PRINT "1/8 shrp"
  10931. WHEN "7" : samplenote% += 70 : PRINT "1/4 shrp"
  10932. WHEN "8" : samplenote% += 80 : PRINT "3/8 shrp"
  10933. WHEN "9" : samplenote% += 90 : PRINT "shrp"
  10934. ENDCASE
  10935. COLOUR 0
  10936. samplenote% += 5
  10937. PROCconvertsamplenote
  10938. sample%(count%) = samplenote%
  10939. :
  10940. NEXT
  10941. :
  10942. CLS
  10943. PRINT'" OCTAVE SEQUENCES"
  10944. PRINT'" How many different sections of"
  10945. INPUT " octave sequences are there "octavesections%
  10946. IF octavesections% > 1 THEN
  10947. FOR count% = 2 TO octavesections%
  10948. PRINT'" section ";count%;" begins at note number "
  10949. INPUT x%
  10950. octavesequences%(count%,0,0) = x%
  10951. NEXT
  10952. ENDIF
  10953. :
  10954. FOR count% = 1 TO octavesections%
  10955. FOR pitch% = 0 TO 47
  10956. entry$ = "n"
  10957. IF pitch% MOD 4 = 0 AND grid$<>"s" THEN entry$ = "y"
  10958. IF (pitch%-2)MOD4 = 0 THEN entry$ = "y"
  10959. IF (pitch%-1)MOD2 = 0 AND grid$ = "e" THEN entry$ = "y"
  10960. IF entry$ = "y" THEN
  10961. PRINT '"In section ";count%;" the sequence of octaves for ";
  10962. COLOUR 3 : PRINT pitchnames$(pitch%)
  10963. COLOUR 0 : PRINT "has how many elements "
  10964. INPUT e%
  10965. PRINT""
  10966. octavesequences%(count%,pitch%+1,0) = e%
  10967. FOR counter% = 1 TO e%
  10968. PRINT " element ";counter%;
  10969. INPUT " is octave "o%
  10970. octavesequences%(count%,pitch%+1,counter%) = o%
  10971. NEXT
  10972. ENDIF
  10973. NEXT
  10974. NEXT
  10975. :
  10976. CLS
  10977. PRINT'" TRANSPOSITION LEVELS"
  10978. PRINT'" How many different sections of"
  10979. INPUT" transposition are there "transpositionsections%
  10980. IF transpositionsections% > 1 THEN
  10981. FOR count% = 2 TO transpositionsections%
  10982. PRINT'" Section ";count%;
  10983. INPUT " begins at note number "n%
  10984. transpositionsequences%(count%,0) = n%
  10985. PRINT" and transposes up/down by how many ";
  10986. CASE grid$ OF
  10987. WHEN "e" : PRINT "eighthtones" : INPUT " (+/- 1 etc) "x%
  10988. transpositionsequences%(count%,1) = x%
  10989. WHEN "q" : PRINT "quartertones" : INPUT " (+/- 1 etc) "x%
  10990. transpositionsequences%(count%,1) = x% * 2
  10991. WHEN "s" : PRINT "semitones" : INPUT " (+/- 1 etc) "x%
  10992. transpositionsequences%(count%,1) = x% * 4
  10993. ENDCASE
  10994. NEXT
  10995. ENDIF
  10996. :
  10997. CLS
  10998. PRINT'" CONTOUR SEQUENCES"
  10999. PRINT'" How many different sections of "
  11000. INPUT " contour sequences are there "contoursections%
  11001. IF contoursections%>1 THEN
  11002. FOR count% = 2 TO contoursections%
  11003. PRINT'" Section ";count%;
  11004. INPUT " begins at note number "n%
  11005. contoursequences%(count%,0) = n%
  11006. NEXT
  11007. ENDIF
  11008. :
  11009. FOR count% = 1 TO contoursections%
  11010. PRINT'" In section ";count%;
  11011. INPUT " there are how many contours "c%
  11012. contoursequences%(count%,1) = c%
  11013. PRINT""
  11014. FOR counter% = 1 TO c%
  11015. PRINT " number ";counter%;
  11016. INPUT " is contour "contoor%
  11017. contoursequences%(count%,counter%+1) = contoor%
  11018. NEXT
  11019. NEXT
  11020. :
  11021. contoursize% = 0 : seriesnote% = 1 : samplenote% = 0
  11022. contoursequence% = 1 : transpositionsequence% = 1
  11023. octavesequence% = 1 : transpositionsequences%(1,1) = 0
  11024. contourloop% = 0 : octaveloop%() = 0
  11025. :
  11026. REPEAT
  11027. seriesnote% += contoursize%
  11028. IF seriesnote% >= contoursequences%(contoursequence%+1,0) AND contoursequences%(contoursequence%+1,0) <> 0 THEN
  11029. contoursequence% += 1
  11030. contourloop% = 0
  11031. ENDIF
  11032. :
  11033. contourloop% += 1
  11034. IF contourloop% > contoursequences%(contoursequence%,1) THEN contourloop% = 1
  11035. contour% = contoursequences%(contoursequence%,contourloop%+1)
  11036. contoursize% = contours%(contour%,0)
  11037. :
  11038. IF seriesnote% >= transpositionsequences%(transpositionsequence%+1,0) AND transpositionsequences%(transpositionsequence%+1,0) <> 0 THEN
  11039. transpositionsequence% += 1
  11040. ENDIF
  11041. transposition% = transpositionsequences%(transpositionsequence%,1)
  11042. :
  11043. FOR count% = 1 TO contoursize%
  11044. samplenote% += 1
  11045. IF samplenote% > samplesize% THEN samplenote% = 1
  11046. group%(count%) = sample%(samplenote%) + transposition%
  11047. NEXT
  11048. :
  11049. IF seriesnote% >= octavesequences%(octavesequence%+1,0,0) AND octavesequences%(octavesequence%+1,0,0) <> 0 THEN
  11050. octavesequence% += 1
  11051. octaveloop%() = 0
  11052. ENDIF
  11053. :
  11054. FOR count% = 1 TO contoursize%
  11055. pitchclass% = group%(count%)
  11056. REPEAT
  11057. pitchclass% -= 48
  11058. UNTIL pitchclass% < 51
  11059. pitchclass% -= 2
  11060. octaveloop%(pitchclass%) += 1
  11061. IF octaveloop%(pitchclass%) > octavesequences%(octavesequence%,pitchclass%,0) THEN octaveloop%(pitchclass%) = 1
  11062. oxtave% = octavesequences%(octavesequence%,pitchclass%,octaveloop%(pitchclass%))
  11063. group%(count%) = (pitchclass%+2) + (48*oxtave%)
  11064. NEXT
  11065. :
  11066. IF contoursize% > 1 THEN
  11067. REPEAT
  11068. FOR count% = 1 TO (contoursize%-1)
  11069. IF group%(count%) >= group%(count%+1) THEN
  11070. save% = group%(count%)
  11071. group%(count%) = group%(count%+1)
  11072. group%(count%+1) = save%
  11073. ENDIF
  11074. NEXT
  11075. no% = 0
  11076. FOR count% = 1 TO (contoursize%-1)
  11077. IF group%(count%) > group%(count%+1) THEN no% = 1
  11078. NEXT
  11079. UNTIL no% = 0
  11080. ENDIF
  11081. :
  11082. FOR count% = 1 TO contoursize%
  11083. simplenote% = group%(contours%(contour%,count%))
  11084. PROCconvertsimplenote
  11085. pitches%((seriesnote%+count%)-1) = simplenote%
  11086. NEXT
  11087. :
  11088. UNTIL ((seriesnote%+contoursize%)-1) >= numpitches%
  11089. :
  11090. FOR count% = 0 TO numpitches%-1 : pitches%(count%) = pitches%(count%+1) : NEXT
  11091. PRINT'" Do you want to save this pitch string?"
  11092. CASE GET$ OF
  11093. WHEN "Y","y","+" : PROCsavepitchstring
  11094. OTHERWISE
  11095. ENDCASE
  11096. :
  11097. PROCinsertpitches
  11098. :
  11099. ENDPROC
  11100. :
  11101. REM*******************************************************
  11102. :
  11103. DEF PROCcopy
  11104. :
  11105. CLS : OFF
  11106. repeatposit$ = "n"
  11107. IF distort$ = "OFF" THEN dothis$ = "YES"
  11108. IF distort$ = "ON" THEN
  11109. IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
  11110. ENDIF
  11111. IF dothis$ = "YES" THEN
  11112. IF easiermenus$ = "n" THEN
  11113. PRINT'" Copy one note - C "
  11114. PRINT " Copy passage - c "
  11115. PRINT " Move one note - M "
  11116. PRINT " Move passage - m "
  11117. PRINT " Extract - E "
  11118. PRINT " Copy rhythm - R "
  11119. PRINT " Save - S "
  11120. PRINT " Import - I "
  11121. ELSE
  11122. PRINT'" Copy one note - C "
  11123. PRINT '" Copy passage - c "
  11124. PRINT '" Move one note - M "
  11125. PRINT '" Move passage - m "
  11126. PRINT '" Extract - E "
  11127. PRINT '" Copy rhythm - R "
  11128. PRINT '" Save - S "
  11129. PRINT '" Import - I "
  11130. ENDIF
  11131. CASE GET$ OF
  11132. WHEN "c" : copymove$ = "C" : savevoice$ = "N" : justone$ = "n"
  11133. WHEN "m" : copymove$ = "M" : savevoice$ = "N" : justone$ = "n"
  11134. WHEN "C" : copymove$ = "C" : savevoice$ = "N" : justone$ = "y"
  11135. WHEN "M" : copymove$ = "M" : savevoice$ = "N" : justone$ = "y"
  11136. WHEN "E","e" :
  11137. CLS : PRINT'" Copy-extract or move-extract? (C/M) "
  11138. CASE GET$ OF
  11139. WHEN "C","c" : copymove$ = "EC" : justone$ = "n"
  11140. OTHERWISE copymove$ = "EM" : justone$ = "n"
  11141. ENDCASE
  11142. savevoice$ = "N"
  11143. WHEN "R","r" : PROCcopyrhythm
  11144. WHEN "S","s" : copymove$ = "C" : savevoice$ = "Y"
  11145. WHEN "I","i" : copymove$ = "C" : savevoice$ = "N" : PROCimportvoice
  11146. OTHERWISE
  11147. copymove$ = "C" : savevoice$ = "N" : justone$ = "n"
  11148. ENDCASE
  11149. ELSE copymove$ = "C"
  11150. ENDIF
  11151. :
  11152. PROCcopy2
  11153. IF quickextract$ = "y" THEN quickextract$ = "n"
  11154. :
  11155. ENDPROC
  11156. :
  11157. *******************************************************************
  11158. :
  11159. DEF PROCcopy2
  11160. :
  11161. IF copymove$ = "M" OR copymove$ = "EM" THEN PROCundoprepare
  11162. :
  11163. IF easiermenus$ = "n" THEN PROCwindow(20,69,67,54) ELSE PROCwindow(20,69,67,42)
  11164. CLS
  11165. :
  11166. IF quickcopy$ = "n" THEN
  11167. :
  11168. IF screenvoices$ = "n" THEN
  11169. INPUT'" Which voice? "voice%
  11170. IF voice% = 0 THEN PROCpressenter
  11171. ELSE
  11172. PRINT'" Which screen voice "
  11173. CASE GET$ OF
  11174. WHEN "1" : voice% = 1
  11175. WHEN "2" : voice% = 2
  11176. WHEN "3" : voice% = 3
  11177. OTHERWISE PROCpressenter
  11178. ENDCASE
  11179. ENDIF
  11180. :
  11181. IF copymove$ = "EC" OR copymove$ = "EM" THEN
  11182. IF screenvoices$ = "y" THEN extractvoice% = displayvoices%(startv%+voice%-1) ELSE extractvoice% = voice%
  11183. ENDIF : REM copymove$
  11184. :
  11185. IF screenvoices$ = "y" THEN voice% = displayvoices%(startv%+voice%-1)
  11186. voice% -= 1
  11187. samevoice% = voice%
  11188. :
  11189. CLS
  11190. INPUT'" Starting at bar "copystartbar%
  11191. IF copystartbar% = 0 THEN
  11192. copystartbar% = holdbar1% : copystartbeat% = holdbeat1% : repeatposit$ = "y"
  11193. ENDIF
  11194. holdbar% = copystartbar%
  11195. holdbar1% = copystartbar%
  11196. IF repeatposit$ = "y" THEN
  11197. PRINT'" bar ";copystartbar%;" beat ";copystartbeat%;"?"
  11198. PRINT'" (for OK press 0, if not OK press X)"
  11199. CASE GET$ OF
  11200. WHEN"X","x" : PROCcopy
  11201. OTHERWISE
  11202. ENDCASE
  11203. ELSE
  11204. INPUT" beat "beats%
  11205. PROCalterbeats : copystartbeat% = beats%
  11206. holdbeat% = copystartbeat%
  11207. holdbeat1% = copystartbeat%
  11208. ENDIF : REM repeatposit$
  11209. :
  11210. IF justone$ = "n" THEN
  11211. PRINT'" Ending at bar "
  11212. PRINT '" (for last bar press 0, for previous "
  11213. INPUT " last bar press 0 twice) "copyendbar%
  11214. IF copyendbar% > 0 THEN savethisbar% = copyendbar%
  11215. IF copyendbar% > 0 THEN
  11216. INPUT " beat "beats%
  11217. PROCalterbeats : copyendbeat% = beats% : savethisbeats% = beats%
  11218. :
  11219. ELSE
  11220. thing$ = INKEY$(50)
  11221. IF thing$ <> "" THEN
  11222. copyendbar% = savethisbar% : copyendbeat% = savethisbeats%
  11223. COLOUR 3
  11224. PRINT'" bar ";copyendbar%;" beat ";copyendbeat%;"?"
  11225. COLOUR 0
  11226. PRINT '" (for OK press 0, if not OK press X)"
  11227. CASE GET$ OF
  11228. WHEN "X","x" : PROCcopy2
  11229. OTHERWISE
  11230. ENDCASE
  11231. ENDIF : REM thing$
  11232. :
  11233. ENDIF : REM copyendbar%
  11234. :
  11235. ELSE
  11236. copyendbar% = copystartbar%
  11237. copyendbeat% = copystartbeat%
  11238. ENDIF : REM justone$
  11239. :
  11240. IF copymove$ = "EC" OR copymove$ = "EM" THEN PROCextractinfo
  11241. :
  11242. ELSE : REM quickcopy$
  11243. :
  11244. IF screenvoices$ = "n" THEN
  11245. :
  11246. IF copysuccessively$ = "n" THEN
  11247. INPUT ' ' " Which voice "voice%
  11248. :
  11249. IF voice% = 0 THEN
  11250. :
  11251. IF nodelay$ = "y" THEN voice% = displayvoices%(startv%) ELSE PROCpressenter
  11252. :
  11253. ENDIF : REM voice%
  11254. :
  11255. ELSE PROCcopysuccessively: REM copysuccessively
  11256. :
  11257. ENDIF : REM copysuccessively
  11258. :
  11259. ELSE : REM screenvoices$
  11260. PRINT'" Which screen voice "
  11261. CASE GET$ OF
  11262. WHEN "1" : voice% = 1
  11263. WHEN "2" : voice% = 2
  11264. WHEN "3" : voice% = 3
  11265. WHEN "x" : voice% = 1
  11266. OTHERWISE PROCpressenter
  11267. ENDCASE
  11268. ENDIF : REM screenvoices$
  11269. :
  11270. IF copymove$ = "EC" OR copymove$ = "EM" THEN
  11271. IF screenvoices$ = "y" THEN extractvoice% = displayvoices%(startv%+voice%-1) ELSE extractvoice% = voice%
  11272. ENDIF : REM copymove$
  11273. :
  11274. IF screenvoices$ = "y" AND quickextract$ = "n" THEN voice% = displayvoices%(startv%+voice%-1)
  11275. voice% -= 1 : samevoice% = voice%
  11276. :
  11277. PRINT ' " note number "
  11278. CASE GET$ OF
  11279. WHEN "1" : along% = 1
  11280. WHEN "2" : along% = 2
  11281. WHEN "3" : along% = 3
  11282. WHEN "4" : along% = 4
  11283. WHEN "5" : along% = 5
  11284. WHEN "6" : along% = 6
  11285. WHEN "7" : along% = 7
  11286. WHEN "8" : along% = 8
  11287. WHEN "9" : along% = 9
  11288. WHEN "0" : along% = 0
  11289. ENDCASE
  11290. :
  11291. IF along% = 0 THEN
  11292. COLOUR 3 : PRINT ' along%+1 : COLOUR 0
  11293. nothing$ = INKEY$(50)
  11294. :
  11295. ELSE
  11296. another$ = INKEY$(waitafterfirst%)
  11297. IF another$ <> "" THEN
  11298. CASE another$ OF
  11299. WHEN "1" : along% = (along%*10)+1
  11300. WHEN "2" : along% = (along%*10)+2
  11301. WHEN "3" : along% = (along%*10)+3
  11302. WHEN "4" : along% = (along%*10)+4
  11303. WHEN "5" : along% = (along%*10)+5
  11304. WHEN "6" : along% = (along%*10)+6
  11305. WHEN "7" : along% = (along%*10)+7
  11306. WHEN "8" : along% = (along%*10)+8
  11307. WHEN "9" : along% = (along%*10)+9
  11308. WHEN "0" : along% = (along%*10)+0
  11309. ENDCASE
  11310. ENDIF : REM another$
  11311. :
  11312. another$ = INKEY$(waitaftersecond%)
  11313. IF another$ <> "" THEN
  11314. CASE another$ OF
  11315. WHEN "1" : along% = (along%*10)+1
  11316. WHEN "2" : along% = (along%*10)+2
  11317. WHEN "3" : along% = (along%*10)+3
  11318. WHEN "4" : along% = (along%*10)+4
  11319. WHEN "5" : along% = (along%*10)+5
  11320. WHEN "6" : along% = (along%*10)+6
  11321. WHEN "7" : along% = (along%*10)+7
  11322. WHEN "8" : along% = (along%*10)+8
  11323. WHEN "9" : along% = (along%*10)+9
  11324. WHEN "0" : along% = (along%*10)+0
  11325. ENDCASE
  11326. ENDIF : REM another$
  11327. :
  11328. COLOUR 3 : PRINT ' along% : COLOUR 0
  11329. :
  11330. ENDIF : REM along% <> 0
  11331. :
  11332. IF along% = 0 THEN along% = 1
  11333. along%-=1
  11334. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  11335. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  11336. holdbar% = copystartbar%
  11337. holdbeat% = copystartbeat%
  11338. IF justone$ = "n" THEN
  11339. :
  11340. PRINT'" to note number "
  11341. :
  11342. IF firstasking$ = "y" THEN
  11343. IF copytoend$ = "y" THEN PRINT'" (for last type 0) "
  11344. ELSE
  11345. :
  11346. IF copytoend$ = "y" THEN
  11347. PRINT'" (for last type 0) "
  11348. ELSE
  11349. PRINT'" (for ";prevlast%;" type 0) "
  11350. ENDIF : REM copytoend$
  11351. :
  11352. ENDIF : REM firstasking$
  11353. :
  11354. CASE GET$ OF
  11355. WHEN "1" : along% = 1
  11356. WHEN "2" : along% = 2
  11357. WHEN "3" : along% = 3
  11358. WHEN "4" : along% = 4
  11359. WHEN "5" : along% = 5
  11360. WHEN "6" : along% = 6
  11361. WHEN "7" : along% = 7
  11362. WHEN "8" : along% = 8
  11363. WHEN "9" : along% = 9
  11364. WHEN "0" :
  11365. IF copytoend$ = "y" THEN
  11366. along% = 0
  11367. ELSE
  11368. along% = prevlast% : usedprev$ = "y"
  11369. ENDIF : REM copytoend$
  11370. OTHERWISE
  11371. IF copytoend$ = "y" THEN
  11372. along% = 0
  11373. ELSE
  11374. IF firstasking$ = "y" THEN
  11375. CLS : COLOUR 3
  11376. PRINT'" COPYING TO END NOT ENABLED "
  11377. COLOUR 0
  11378. PRINT '" (press a key to continue)"
  11379. prevlast% = 0
  11380. CASE GET$ OF
  11381. ENDCASE
  11382. ELSE
  11383. along% = prevlast% : usedprev$ = "y"
  11384. ENDIF : REM firstasking$
  11385. ENDIF : REM copytoend$
  11386. ENDCASE
  11387. firstasking$ = "n"
  11388. :
  11389. IF along% <> 0 AND usedprev$ = "n" THEN
  11390. :
  11391. another$ = INKEY$(waitafterfirst%)
  11392. IF another$ <> "" THEN
  11393. CASE another$ OF
  11394. WHEN "1" : along% = (along%*10)+1
  11395. WHEN "2" : along% = (along%*10)+2
  11396. WHEN "3" : along% = (along%*10)+3
  11397. WHEN "4" : along% = (along%*10)+4
  11398. WHEN "5" : along% = (along%*10)+5
  11399. WHEN "6" : along% = (along%*10)+6
  11400. WHEN "7" : along% = (along%*10)+7
  11401. WHEN "8" : along% = (along%*10)+8
  11402. WHEN "9" : along% = (along%*10)+9
  11403. WHEN "0" : along% = (along%*10)+0
  11404. ENDCASE
  11405. ENDIF : REM another$
  11406. :
  11407. another$ = INKEY$(waitaftersecond%)
  11408. IF another$ <> "" THEN
  11409. CASE another$ OF
  11410. WHEN "1" : along% = (along%*10)+1
  11411. WHEN "2" : along% = (along%*10)+2
  11412. WHEN "3" : along% = (along%*10)+3
  11413. WHEN "4" : along% = (along%*10)+4
  11414. WHEN "5" : along% = (along%*10)+5
  11415. WHEN "6" : along% = (along%*10)+6
  11416. WHEN "7" : along% = (along%*10)+7
  11417. WHEN "8" : along% = (along%*10)+8
  11418. WHEN "9" : along% = (along%*10)+9
  11419. WHEN "0" : along% = (along%*10)+0
  11420. ENDCASE
  11421. ENDIF : REM another$
  11422. :
  11423. prevlast% = along%
  11424. COLOUR 3 : PRINT ' along% : COLOUR 0
  11425. wait$ = INKEY$(50)
  11426. :
  11427. ENDIF : REM along% <> 0
  11428. :
  11429. usedprev$ = "n"
  11430. :
  11431. IF along% = 0 THEN
  11432. copyendbar% = 0
  11433. ELSE
  11434. along%-=1
  11435. copyendbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  11436. copyendbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  11437. ENDIF : REM along$
  11438. ELSE
  11439. copyendbar% = copystartbar%
  11440. copyendbeat% = copystartbeat%
  11441. ENDIF : REM justone$ = "n"
  11442. :
  11443. IF copymove$ = "EC" OR copymove$ = "EM" THEN PROCextractinfo
  11444. :
  11445. ENDIF : REM quickcopy$ = "n"
  11446. :
  11447. :
  11448. value% = (copystartbar%*10^3)+copystartbeat%
  11449. IF value% <= array%(0,0,voice%)DIV10^3 THEN
  11450. startatcell% = 0
  11451. ELSE
  11452. PROCsearch(value%)
  11453. startatcell% = startcell%
  11454. ENDIF : REM value%
  11455. :
  11456. IF copyendbar% = 0 THEN
  11457. endatcell% = numusedcells%(voice%) - 1
  11458. ELSE
  11459. value% = (copyendbar%*10^3)+copyendbeat%
  11460. IF value% >= array%(numusedcells%(voice%)-1,0,voice%)DIV10^3 THEN
  11461. endatcell% = numusedcells%(voice%) - 1
  11462. ELSE
  11463. PROCsearch(value%)
  11464. IF shunt$ = "N" THEN endatcell% = startcell% ELSE endatcell% = startcell% - 1
  11465. ENDIF : REM value%
  11466. :
  11467. ENDIF : REM copyendbar%
  11468. :
  11469. manyattacks% = endatcell% - startatcell% + 1
  11470. REM create 'gap' between beat-of-bar and first actual attack
  11471. carrybars% = (array%(startatcell%,0,voice%)DIV10^6)-copystartbar%
  11472. carrybeats% = ((array%(startatcell%,0,voice%)DIV10^3)MOD10^3)-copystartbeat%
  11473. attacks1%(0) = (carrybars%*960)+carrybeats%
  11474. :
  11475. IF copymove$ = "C" OR copymove$ = "M" THEN
  11476. FOR count% = 0 TO (manyattacks%-1)
  11477. IF count% > 0 THEN
  11478. carrybars% = (array%(startatcell%+count%,0,voice%)DIV10^6)-(array%(startatcell%+count%-1,0,voice%)DIV10^6)
  11479. carrybeats% = ((array%(startatcell%+count%,0,voice%)DIV10^3)MOD10^3)-((array%(startatcell%+count%-1,0,voice%)DIV10^3)MOD10^3)
  11480. attacks1%(count%) = attacks1%(count%-1) + ((carrybars%*960)+carrybeats%)
  11481. ENDIF : REM count% > 0
  11482. :
  11483. pitches%(count%) = array%(startatcell%+count%,0,voice%)MOD10^3
  11484. dur% = (array%(startatcell%+count%,1,voice%)DIV10)MOD10^3
  11485. brrr% = array%(startatcell%+count%,0,voice%)DIV10^6 : PROCreconvertdur
  11486. durations%(count%) = dur%
  11487. amplitudes%(count%) = (array%(startatcell%+count%,1,voice%))MOD10
  11488. envelopes%(count%) = (array%(startatcell%+count%,2,voice%))DIV10^2
  11489. glissandos%(count%) = array%(startatcell%+count%,1,voice%)DIV10^4
  11490. inflections%(count%) = array%(startatcell%+count%,2,voice%)MOD10^2
  11491. NEXT
  11492. ELSE
  11493. :
  11494. PROCextract
  11495. :
  11496. ENDIF : REM copymove$
  11497. :
  11498. IF copymove$ = "M" THEN
  11499. numnotes% = manyattacks% : startcell% = startatcell%
  11500. FOR count% = startcell% TO (startcell%+(numnotes%-1))
  11501. FOR counter% = 0 TO 1
  11502. barno% = (array%(count%,0,voice%)DIV10^6)-counter%
  11503. beatnum% = ((array%(count%,0,voice%)DIV10^3)MOD10^3)
  11504. :
  11505. group1start% = (disarray%(barno%,0,voice%)DIV10^7)*beatfactor%
  11506. group1end% = group1start% + (((disarray%(barno%,0,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
  11507. IF beatnum%+(960*counter%) >= group1start% AND beatnum%+(960*counter%) <= group1end% THEN
  11508. disarray%(barno%,0,voice%) = disarray%(barno%,0,voice%)MOD10^3
  11509. ENDIF : REM beatnum%
  11510. :
  11511. group2start% = ((disarray%(barno%,0,voice%)DIV10)MOD10^2)*beatfactor%
  11512. group2end% = group2start%+((((disarray%(barno%,0,voice%)MOD10)*10)+(disarray%(barno%,1,voice%)DIV10^8))*beatfactor%)-1
  11513. IF beatnum%+(960*counter%) >= group2start% AND beatnum%+(960*counter%) <= group2end% THEN
  11514. disarray%(barno%,0,voice%) = (disarray%(barno%,0,voice%)DIV10^3)*10^3
  11515. disarray%(barno%,1,voice%) = disarray%(barno%,1,voice%)MOD10^6
  11516. ENDIF : REM beatnum%
  11517. group3start%=((disarray%(barno%,1,voice%)DIV10^4)MOD10^2)*beatfactor%
  11518. group3end% = group3start% + (((disarray%(barno%,1,voice%)MOD10^4)DIV10^2)*beatfactor%)-1
  11519. IF beatnum%+(960*counter%) >= group3start% AND beatnum%+(960*counter%) <= group3end% THEN
  11520. disarray%(barno%,1,voice%) = (disarray%(barno%,1,voice%)DIV10^6)*10^6
  11521. ENDIF : REM beatnum%
  11522. group4start% = (disarray%(barno%,2,voice%)DIV10^7)*beatfactor%
  11523. group4end% = group4start%+(((disarray%(barno%,2,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
  11524. IF beatnum%+(960*counter%) >= group4start% AND beatnum%+(960*counter%) <= group4end% THEN
  11525. disarray%(barno%,2,voice%) = disarray%(barno%,2,voice%)MOD10^3
  11526. ENDIF : REM beatnum%
  11527. group5start% = ((disarray%(barno%,2,voice%)MOD10^3)DIV10)*beatfactor%
  11528. group5end% = group5start%+((((disarray%(barno%,2,voice%)MOD10)*10)+(disarray%(barno%,3,voice%)DIV10^8))*beatfactor%)-1
  11529. IF beatnum%+(960*counter%) >= group5start% AND beatnum%+(960*counter%) <= group5end% THEN
  11530. disarray%(barno%,2,voice%) = (disarray%(barno%,2,voice%)DIV10^3)*10^3
  11531. disarray%(barno%,3,voice%) = disarray%(barno%,3,voice%)MOD10^6
  11532. ENDIF : REM beatnum%
  11533. group6start% = ((disarray%(barno%,3,voice%)DIV10^4)MOD10^2)*beatfactor%
  11534. group6end% = group6start% + (((disarray%(barno%,3,voice%)DIV10^2)MOD10^2)*beatfactor%)-1
  11535. IF beatnum%+(960*counter%) >= group6start% AND beatnum%+(960*counter%) <= group6end% THEN
  11536. disarray%(barno%,3,voice%)=(disarray%(barno%,3,voice%)DIV10^6)*10^6
  11537. ENDIF : REM beatnum%
  11538. :
  11539. NEXT
  11540. :
  11541. NEXT : REM count%
  11542. :
  11543. PROCshuntleft(startcell%,numnotes%)
  11544. ENDIF : REM copymove$
  11545. :
  11546. IF distort$ = "OFF" THEN
  11547. numpitches% = manyattacks% : numdurations% = manyattacks% : numamplitudes% = manyattacks%
  11548. numenvelopes% = manyattacks% : numinflections% = manyattacks% : method$ = "raw" : copyit$ = "ON"
  11549. IF seeequalize$ = "y" THEN seeequalizey$ = "y"
  11550. IF seereorder$ = "y" THEN seereordery$ = "y"
  11551. PROCinsertattacks
  11552. ELSE
  11553. PROCdistort
  11554. ENDIF : REM distort$
  11555. :
  11556. $ = "n" : quickextract$ = "n" : usedprev$ = "n"
  11557. ENDPROC
  11558. :
  11559. REM**************************************************************
  11560. :
  11561. DEF PROCdistort
  11562. :
  11563. CLS
  11564. CASE distortpara$ OF
  11565. WHEN "attacks" :
  11566. :
  11567. INPUT'" How many bands? (0 = previous values) "answer%
  11568. IF answer% <> 0 THEN numbands% = answer%
  11569. :
  11570. IF answer% > 0 THEN
  11571. IF answer% = 1 THEN
  11572. CLS
  11573. PRINT'" intervals to be multiplied by"
  11574. PRINT'" random percentages between..."
  11575. PRINT '" (for ";distortparas%(1,2);
  11576. INPUT" press 0) "number%
  11577. IF number% = 0 THEN distortparas%(1,2) = distortparas%(1,2) ELSE distortparas%(1,2) = number%
  11578. PRINT'" and...(for ";distortparas%(1,3);
  11579. INPUT " press 0) "number%
  11580. IF number% = 0 THEN distortparas%(1,3) = distortparas%(1,3) ELSE distortparas%(1,3) = number%
  11581. distortparas%(1,0) = 0 : distortparas%(1,1) = 960000
  11582. :
  11583. ELSE
  11584. :
  11585. FOR count% = 1 TO numbands%
  11586. CLS
  11587. PRINT'" Band ";count%;"'s intervals are between (incl.) "
  11588. INPUT'" bars..."bars%
  11589. INPUT'" beats..."beats%
  11590. PROCalterbeats
  11591. distortparas%(count%,0) = (bars%*960) + beats%
  11592. INPUT' " and bars..."bars%
  11593. INPUT' " beats..."beats%
  11594. PROCalterbeats
  11595. distortparas%(count%,1) = (bars%*960) + beats%
  11596. PRINT'" which are to be multiplied by random "
  11597. INPUT'" percentages between..."distortparas%(count%,2)
  11598. INPUT'" and..."distortparas%(count%,3)
  11599. NEXT
  11600. :
  11601. ENDIF
  11602. ELSE
  11603. COLOUR 3
  11604. PRINT'" values as last time?"
  11605. PRINT'distortparas%(1,0);" - ";distortparas%(1,1);" ";distortparas%(1,2);"% - ";distortparas%(1,3)"%"
  11606. IF numbands% > 1 THEN PRINT distortparas%(2,0);" - ";distortparas%(2,1);" ";distortparas%(2,2);"% - ";distortparas%(2,3)"%"
  11607. COLOUR 0
  11608. CASE GET$ OF
  11609. WHEN"y","Y":
  11610. OTHERWISE
  11611. ENDCASE
  11612. ENDIF
  11613. :
  11614. nextinterval% = attacks1%(1) - attacks1%(0)
  11615. FOR count% = 1 TO manyattacks% - 1
  11616. :
  11617. interval% = nextinterval%
  11618. :
  11619. band% = 0
  11620. FOR counter% = 1 TO numbands%
  11621. IF interval% >= distortparas%(counter%,0) AND interval% <= distortparas%(counter%,1) THEN band% = counter%
  11622. NEXT
  11623. :
  11624. IF band% > 0 THEN percentage1% = distortparas%(band%,2) ELSE percentage1% = 100
  11625. IF band% > 0 THEN percentage2% = distortparas%(band%,3) ELSE percentage2% = 100
  11626. range% = percentage2%-percentage1%
  11627. IF range% = 0 THEN
  11628. percentage3 = percentage1%
  11629. ELSE
  11630. percentage3 = RND(range%) + percentage1% - 1
  11631. percentage3 += (RND(99))/100
  11632. ENDIF
  11633. :
  11634. nextinterval% = attacks1%(count%+1) - attacks1%(count%)
  11635. attacks1%(count%) = attacks1%(count%-1) + ((interval%*percentage3)DIV100)
  11636. :
  11637. NEXT
  11638. :
  11639. method$ = "raw" : copyit$ = "ON" : distort$ = "OFF"
  11640. PROCinsertattacks
  11641. :
  11642. WHEN "pitches" :
  11643. :
  11644. PROCwindow(20,69,70,54)
  11645. PRINT'" Is the grid semi-, quarter- or eighthtone (S/Q/E)"
  11646. PRINT'" (0 = previous) "
  11647. CASE GET$ OF
  11648. WHEN "S","s" : distortgrid$ = "S"
  11649. WHEN "Q","q" : distortgrid$ = "Q"
  11650. WHEN "E","e" : distortgrid$ = "E"
  11651. OTHERWISE distortgrid$ = distortgrid$
  11652. ENDCASE
  11653. :
  11654. INPUT'" How many bands? "numbands%
  11655. IF numbands% = 0 THEN numbands% = 1
  11656. :
  11657. IF numbands% = 1 THEN
  11658. distortparas%(1,0) = 0
  11659. distortparas%(1,1) = 1000
  11660. PRINT'" Pitches are to be raised/lowered randomly by"
  11661. PRINT " between how many ";
  11662. CASE distortgrid$ OF
  11663. WHEN "S" : PRINT"semitones (-1,1 etc) "
  11664. INPUT" (11 = previous) "distortparas%(1,2)
  11665. IF distortparas%(1,2) = 11 THEN
  11666. distortparas%(1,2) = previousdistort1%
  11667. COLOUR 3
  11668. PRINT' previousdistort1%
  11669. COLOUR 0
  11670. ENDIF
  11671. WHEN "Q" : PRINT"quartertones (-1,1 etc) "
  11672. INPUT" (0 = previous) "distortparas%(1,2)
  11673. IF distortparas%(1,2) = 0 THEN
  11674. distortparas%(1,2) = previousdistort1%
  11675. COLOUR 3
  11676. PRINT' previousdistort1%
  11677. COLOUR 0
  11678. ENDIF
  11679. WHEN "E" : INPUT"eighthtones (-1,1 etc) "distortparas%(1,2)
  11680. ENDCASE
  11681. PRINT '" and how many ";
  11682. CASE distortgrid$ OF
  11683. WHEN "S" : INPUT"semitones "distortparas%(1,3)
  11684. IF distortparas%(1,3) = 11 THEN
  11685. distortparas%(1,3) = previousdistort2%
  11686. COLOUR 3
  11687. PRINT ' previousdistort2%
  11688. COLOUR 0
  11689. pause$ = INKEY$(50)
  11690. ENDIF
  11691. WHEN "Q" : INPUT"quartertones "distortparas%(1,3)
  11692. IF distortparas%(1,3) = 0 THEN
  11693. distortparas%(1,3) = previousdistort2%
  11694. COLOUR 3
  11695. PRINT' previousdistort2%
  11696. COLOUR 0
  11697. pause$ = INKEY$(50)
  11698. ENDIF
  11699. WHEN "E" : INPUT"eighthtones "distortparas%(1,3)
  11700. ENDCASE
  11701. previousdistort1% = distortparas%(1,2)
  11702. previousdistort2% = distortparas%(1,3)
  11703. :
  11704. ELSE
  11705. :
  11706. FOR count% = 1 TO numbands%
  11707. PRINT'" Band ";count%;" is from the ";
  11708. FOR counter% = 0 TO 1
  11709. IF counter% = 0 THEN PRINT"lower note" ELSE PRINT'"to the upper note"
  11710. PRINT'" pitchclass ";
  11711. COLOUR 3
  11712. CASE GET$ OF
  11713. WHEN "C","c" : note% = 4 : PRINT "C"
  11714. WHEN "D","d" : note% = 12 : PRINT "D"
  11715. WHEN "E","e" : note% = 20 : PRINT "E"
  11716. WHEN "F","f" : note% = 24 : PRINT "F"
  11717. WHEN "G","g" : note% = 32 : PRINT "G"
  11718. WHEN "A","a" : note% = 40 : PRINT "A"
  11719. WHEN "B","b" : note% = 48 : PRINT "B"
  11720. OTHERWISE VDU 7 : PROCdistort
  11721. ENDCASE
  11722. COLOUR 0
  11723. PRINT" accidental ";
  11724. COLOUR 3
  11725. CASE GET$ OF
  11726. WHEN "1" : note% -= 4 : PRINT "flat"
  11727. WHEN "2" : note% -= 3 : PRINT "3/8 flat"
  11728. WHEN "3" : note% -= 2 : PRINT "1/4 flat"
  11729. WHEN "4" : note% -= 1 : PRINT "1/8 flat"
  11730. WHEN "5" : note% -= 0 : PRINT "nat"
  11731. WHEN "6" : note% += 1 : PRINT "1/8 shrp"
  11732. WHEN "7" : note% += 2 : PRINT "1/4 shrp"
  11733. WHEN "8" : note% += 3 : PRINT "3/8 shrp"
  11734. WHEN "9" : note% += 4 : PRINT "shrp"
  11735. ENDCASE
  11736. COLOUR 0
  11737. PRINT" octave ";
  11738. COLOUR 3
  11739. oct% = VAL(GET$) : oct%=oct%DIV1 : note% += (48*oct%) : PRINT oct%
  11740. COLOUR 0
  11741. distortparas%(count%,counter%) = note%
  11742. NEXT
  11743. :
  11744. PRINT'" and pitches are to be raised/lowered"
  11745. PRINT " randomly by between how many ";
  11746. CASE distortgrid$ OF
  11747. WHEN "S" : INPUT"semitones "distortparas%(count%,2)
  11748. WHEN "Q" : INPUT"quartertones "distortparas%(count%,2)
  11749. WHEN "E" : INPUT"eighthtones "distortparas%(count%,2)
  11750. ENDCASE
  11751. PRINT" and how many ";
  11752. CASE distortgrid$ OF
  11753. WHEN "S" : INPUT"semitones "distortparas%(count%,3)
  11754. WHEN "Q" : INPUT"quartertones "distortparas%(count%,3)
  11755. WHEN "E" : INPUT"eighthtones "distortparas%(count%,3)
  11756. ENDCASE
  11757. :
  11758. NEXT
  11759. :
  11760. ENDIF
  11761. :
  11762. nextpitch% = pitches%(0)
  11763. FOR count% = 0 TO (manyattacks%-1)
  11764. :
  11765. note% = nextpitch%DIV100
  11766. accid% = (nextpitch%DIV10)MOD10
  11767. oct% = nextpitch%MOD10
  11768. CASE note% OF
  11769. WHEN 0 : pitch% = 4
  11770. WHEN 1 : pitch% = 12
  11771. WHEN 2 : pitch% = 20
  11772. WHEN 3 : pitch% = 24
  11773. WHEN 4 : pitch% = 32
  11774. WHEN 5 : pitch% = 40
  11775. WHEN 6 : pitch% = 48
  11776. ENDCASE
  11777. accid% -= 5 : pitch% += accid%
  11778. pitch% += (48*oct%)
  11779. :
  11780. FOR counter% = 1 TO numbands%
  11781. IF pitch%>=distortparas%(counter%,0)ANDpitch%<=distortparas%(counter%,1) THEN band% = counter%
  11782. NEXT
  11783. :
  11784. lower% = distortparas%(band%,2)
  11785. upper% = distortparas%(band%,3)
  11786. x% = 0 - lower%
  11787. range% = upper% + x% + 1
  11788. IF range% = 1 THEN inc% = 1-(x%+1) ELSE inc% = RND(range%)-(x%+1)
  11789. IF distortgrid$ = "S" THEN inc% = inc%*4
  11790. IF distortgrid$ = "Q" THEN inc% = inc%*2
  11791. pitch% += inc%
  11792. :
  11793. FOR counter% = 0 TO 9
  11794. IF pitch% > 2 + (48*counter%) THEN
  11795. octave% = counter%
  11796. ENDIF
  11797. NEXT
  11798. :
  11799. pitch% -= (48*octave%)
  11800. IF pitch% > 2 AND pitch% < 8 THEN
  11801. pitchclass% = 0 : diff% = pitch% - 4
  11802. ENDIF
  11803. IF pitch% > 7 AND pitch% < 16 THEN
  11804. pitchclass% = 1 : diff% = pitch% - 12
  11805. ENDIF
  11806. IF pitch% > 15 AND pitch% < 23 THEN
  11807. pitchclass% = 2 : diff% = pitch% - 20
  11808. ENDIF
  11809. IF pitch% > 22 AND pitch% < 29 THEN
  11810. pitchclass% = 3 : diff% = pitch% - 24
  11811. ENDIF
  11812. IF pitch% > 28 AND pitch% < 36 THEN
  11813. pitchclass% = 4 : diff% = pitch% - 32
  11814. ENDIF
  11815. IF pitch% > 35 AND pitch% < 44 THEN
  11816. pitchclass% = 5 : diff% = pitch% - 40
  11817. ENDIF
  11818. IF pitch% > 43 AND pitch% < 51 THEN
  11819. pitchclass% = 6 : diff% = pitch% - 48
  11820. ENDIF
  11821. accid% = diff% + 5 : nextpitch% = pitches%(count%+1)
  11822. pitches%(count%) = (pitchclass%*100)+(accid%*10)+octave%
  11823. :
  11824. NEXT
  11825. :
  11826. numpitches% = manyattacks%
  11827. distort$ = "OFF" : PROCinsertpitches
  11828. :
  11829. WHEN "durations" :
  11830. :
  11831. PROCwindow(20,69,70,54)
  11832. PRINT'" distort durations between"
  11833. INPUT" what percentage "firstpercent%
  11834. IF firstpercent% = 0 THEN
  11835. PRINT '" that's ";prevfirstpercent%;" then?"
  11836. CASE GET$ OF
  11837. WHEN "Y","y" :
  11838. firstpercent% = prevfirstpercent%
  11839. OTHERWISE firstpercent% = prevfirstpercent%
  11840. ENDCASE
  11841. ENDIF
  11842. INPUT" and what percentage "secondpercent%
  11843. IF secondpercent% = 0 THEN
  11844. PRINT '" that's ";prevsecondpercent%;" then?"
  11845. CASE GET$ OF
  11846. WHEN "Y","y","0" :
  11847. secondpercent% = prevsecondpercent%
  11848. OTHERWISE secondpercent% = prevsecondpercent%
  11849. ENDCASE
  11850. ENDIF
  11851. :
  11852. prevfirstpercent% = firstpercent% : prevsecondpercent% = secondpercent%
  11853. :
  11854. FOR count% = manyattacks% TO 1 STEP -1
  11855. durations%(count%) = durations%(count%-1)
  11856. NEXT
  11857. :
  11858. FOR count% = 1 TO manyattacks%
  11859. multiplier = (RND(secondpercent%-firstpercent%)+firstpercent%)/100
  11860. durations%(count%) = durations%(count%)*multiplier
  11861. NEXT
  11862. :
  11863. FOR count% = 0 TO (manyattacks%-1)
  11864. durations%(count%) = durations%(count%+1)
  11865. NEXT
  11866. durations%(manyattacks%) = 0
  11867. :
  11868. numdurations% = manyattacks%
  11869. distort$ = "OFF" : PROCinsertdurations
  11870. WHEN "amplitudes" :
  11871. :
  11872. PROCwindow(20,69,70,54)
  11873. CLS
  11874. PRINT'" Increase or decrease by 1 notch (I/D) "
  11875. CASE GET$ OF
  11876. WHEN "I","i" :
  11877. FOR count% = 0 TO manyattacks%-1
  11878. IF amplitudes%(count%) < 9 THEN amplitudes%(count%) += 1
  11879. IF envelopes%(count%) <> 9 THEN
  11880. number% = envelopes%(count%) DIV 10^3
  11881. IF number% = 0 THEN numphases% = 1
  11882. IF number% > 0 AND number% < 100 THEN numphases% = 2
  11883. IF number% > 99 THEN numphases% = 3
  11884. CASE numphases% OF
  11885. WHEN 1 :
  11886. IF envelopes%(count%)MOD10 < 9 THEN envelopes%(count%) += 1
  11887. WHEN 2 :
  11888. IF envelopes%(count%)MOD10 < 9 THEN envelopes%(count%) += 1
  11889. IF (envelopes%(count%)DIV10)MOD10 < 9 THEN envelopes%(count%) += 10
  11890. WHEN 3 :
  11891. IF envelopes%(count%)MOD10 < 9 THEN envelopes%(count%) += 1
  11892. IF (envelopes%(count%)DIV10)MOD10 < 9 THEN envelopes%(count%) += 10
  11893. IF (envelopes%(count%)DIV100)MOD10 < 9 THEN envelopes%(count%) += 100
  11894. ENDCASE
  11895. ENDIF
  11896. NEXT
  11897. :
  11898. OTHERWISE
  11899. FOR count% = 0 TO manyattacks%-1
  11900. IF amplitudes%(count%) > 0 THEN amplitudes%(count%) -= 1
  11901. IF envelopes%(count%) <> 9 THEN
  11902. number% = envelopes%(count%) DIV 10^3
  11903. IF number% = 0 THEN numphases% = 1
  11904. IF number% > 0 AND number% < 100 THEN numphases% = 2
  11905. IF number% > 99 THEN numphases% = 3
  11906. :
  11907. CASE numphases% OF
  11908. WHEN 1 :
  11909. IF envelopes%(count%)MOD10 > 0 THEN envelopes%(count%) -= 1
  11910. WHEN 2 :
  11911. IF envelopes%(count%)MOD10 > 0 THEN envelopes%(count%) -= 1
  11912. IF (envelopes%(count%)DIV10)MOD10 > 0 THEN envelopes%(count%) -= 10
  11913. WHEN 3 :
  11914. IF envelopes%(count%)MOD10 > 0 THEN envelopes%(count%) -= 1
  11915. IF (envelopes%(count%)DIV10)MOD10 > 0 THEN envelopes%(count%) -= 10
  11916. IF (envelopes%(count%)DIV100)MOD10 > 0 THEN envelopes%(count%) -= 100
  11917. ENDCASE
  11918. ENDIF
  11919. NEXT
  11920. :
  11921. ENDCASE
  11922. :
  11923. numenvelopes% = manyattacks%
  11924. distort$ = "OFF" : PROCinsertenvelopes
  11925. :
  11926. WHEN "envelopes" :
  11927. PRINT'" give 1st envelope point random "
  11928. INPUT" percentages between what percentage "firstpercent%
  11929. INPUT" and what percentage "secondpercent%
  11930. :
  11931. FOR count% = manyattacks% TO 1 STEP -1
  11932. envelopes%(count%) = envelopes%(count%-1)
  11933. glissandos%(count%) = glissandos%(count%-1)
  11934. NEXT
  11935. :
  11936. FOR count% = 1 TO manyattacks%
  11937. newpercentage% = RND(secondpercent%-(firstpercent%-1))+(firstpercent%)
  11938. ph2% = envelopes%(count%) DIV 10^5
  11939. amps% = envelopes%(count%) MOD 10^3
  11940. ph1% = newpercentage%
  11941. envelopes%(count%) = (ph2%*10^5)+(ph1%*10^3)+amps%
  11942. glissandos%(count%) = glissandos%(count%)
  11943. :
  11944. NEXT
  11945. :
  11946. IF numphases% = 3 THEN
  11947. :
  11948. PRINT'" give 2nd envelope point random "
  11949. INPUT" percentages between what percentage "firstpercent%
  11950. INPUT" and what percentage "secondpercent%
  11951. :
  11952. FOR count% = 1 TO manyattacks%
  11953. newpercentage% = RND(secondpercent%-(firstpercent%-1))+(firstpercent%)
  11954. ph1% = (envelopes%(count%) DIV 10^3) MOD 10^2
  11955. amps% = envelopes%(count%) MOD 10^3
  11956. ph2% = newpercentage%
  11957. envelopes%(count%) = (ph2%*10^5)+(ph1%*10^3)+amps%
  11958. glissandos%(count%) = glissandos%(count%)
  11959. :
  11960. NEXT
  11961. :
  11962. ENDIF
  11963. :
  11964. FOR count% = 0 TO (manyattacks%-1)
  11965. envelopes%(count%) = envelopes%(count%+1)
  11966. NEXT
  11967. envelopes%(manyattacks%) = 0
  11968. numenvelopes% = manyattacks%
  11969. distort$ = "OFF" : PROCinsertenvelopes
  11970. :
  11971. WHEN "inflections" :
  11972. :
  11973. PROCwindow(20,69,70,55)
  11974. PRINT'" distort inflections up or down "
  11975. PRINT" by up to how many cents "
  11976. INPUT" (max. 49) "cents%
  11977. :
  11978. FOR count% = manyattacks% TO 1 STEP -1
  11979. inflections%(count%) = inflections%(count%-1)
  11980. NEXT
  11981. :
  11982. FOR count% = 1 TO manyattacks%
  11983. :
  11984. REPEAT
  11985. factor% = RND(cents%)
  11986. upordown% = RND(2)
  11987. :
  11988. IF upordown% = 1 THEN
  11989. :
  11990. inflections%(count%) = inflections%(count%)+factor%
  11991. ELSE
  11992. inflections%(count%) = inflections%(count%)-factor% :
  11993. ENDIF
  11994. :
  11995. UNTIL inflections%(count%) > 0 AND inflections%(count%) < 100
  11996. :
  11997. NEXT
  11998. :
  11999. FOR count% = 0 TO (manyattacks%-1)
  12000. inflections%(count%) = inflections%(count%+1)
  12001. NEXT
  12002. inflections%(manyattacks%) = 0
  12003. :
  12004. numinflections% = manyattacks%
  12005. distort$ = "OFF" : PROCinsertinflections
  12006. :
  12007. ENDCASE
  12008. :
  12009. ENDPROC
  12010. :
  12011. REM****************************************************
  12012. :
  12013. DEF PROCreorderattacks
  12014. :
  12015. r1% = 0
  12016. :
  12017. REM fills attacks3% with original actual durats in beats
  12018. attacks2%() = attacks1%()
  12019. FOR count% = 0 TO manyattacks%-2
  12020. attacks3%(count%) = attacks2%(count%+1)-attacks2%(count%)
  12021. NEXT
  12022. :
  12023. PRINT''" Random or determined order? (R/1 or D)"
  12024. CASE GET$ OF
  12025. WHEN "D","d" :
  12026. CLS
  12027. PRINT''" There are ";manyattacks%-1;" durations in the group"
  12028. FOR count% = 1 TO manyattacks%-1
  12029. PRINT'" New duration ";count%;
  12030. INPUT" is now to be old duration "r%
  12031. attacks1%(count%) = attacks1%(count%-1)+attacks3%(r%-1)
  12032. NEXT
  12033. OTHERWISE
  12034. CLS
  12035. PRINT''" There are ";manyattacks%-1;" durations in the group"
  12036. PRINT'" How many durations do you want to re-order? "
  12037. INPUT " (for all press 0) "howmany%
  12038. IF howmany% = 0 THEN howmany% = manyattacks%-1
  12039. INPUT'" Starting at duration number "number%
  12040. IF number% = 0 THEN number% = 1
  12041. INPUT'" Chance of repeating original order(%) "chanceofnext%
  12042. attacks2%() = 0 : count% = number%
  12043. REPEAT
  12044. PROCchoosenext
  12045. IF choosenext$ = "y" AND r1% < howmany% THEN
  12046. r1% = r1% + 1
  12047. ELSE
  12048. r1% = RND(howmany%)
  12049. ENDIF
  12050. r% = r1%+number%-1
  12051. IF attacks2%(r%) = 0 THEN
  12052. attacks1%(count%) = attacks1%(count%-1)+attacks3%(r%-1)
  12053. attacks2%(r%) = 1 : count% += 1
  12054. ENDIF
  12055. UNTIL count% = howmany%+number%
  12056. ENDCASE
  12057. :
  12058. reordered$ = "y" : seereordery$ = "n"
  12059. PROCinsertattacks
  12060. :
  12061. ENDPROC
  12062. :
  12063. REM********************************************************
  12064. :
  12065. DEF PROCchoosenext
  12066. :
  12067. numb% = RND(100)
  12068. IF numb% >= chanceofnext% THEN choosenext$ = "n" ELSE choosenext$ = "y"
  12069. ENDPROC
  12070. :
  12071. REM********************************************************
  12072. :
  12073. DEF PROCsavepitchstring
  12074. :
  12075. *Dir SDFS::RISCOSpi.$.CAC.Files
  12076. firstnaming$ = "n"
  12077. CLS
  12078. IF filenamestg$ = "" THEN
  12079. INPUT'" filename "filenamestg$
  12080. firstnaming$ = "y"
  12081. ENDIF
  12082. IF firstnaming$ = "n" THEN
  12083. PRINT'" as '";filenamestg$;"'?"
  12084. CASE GET$ OF
  12085. WHEN "Y","y","+" :
  12086. OTHERWISE INPUT'" filename "filenamestg$
  12087. ENDCASE
  12088. ENDIF
  12089. :
  12090. channel = OPENOUT filenamestg$
  12091. PRINT#channel, numpitches%
  12092. PRINT#channel, grid$
  12093. PRINT#channel, samplesize%
  12094. PRINT#channel, octavesections%
  12095. PRINT#channel, transpositionsections%
  12096. PRINT#channel, contoursections%
  12097. FOR a% = 0 TO samplesize%
  12098. PRINT#channel, sample%(a%)
  12099. NEXT
  12100. FOR a% = 0 TO octavesections%
  12101. FOR b% = 0 TO 48
  12102. FOR c% = 0 TO 11
  12103. PRINT#channel, octavesequences%(a%,b%,c%)
  12104. NEXT
  12105. NEXT
  12106. NEXT
  12107. FOR a% = 0 TO transpositionsections%
  12108. FOR b% = 0 TO 1
  12109. PRINT#channel, transpositionsequences%(a%,b%)
  12110. NEXT
  12111. NEXT
  12112. FOR a% = 0 TO contoursections%
  12113. FOR b% = 0 TO 11
  12114. PRINT#channel, contoursequences%(a%,b%)
  12115. NEXT
  12116. NEXT
  12117. :
  12118. CLOSE#channel
  12119. *NoDir
  12120. :
  12121. ENDPROC
  12122. :
  12123. REM***************************************************
  12124. :
  12125. DEF PROCloadpitchstring
  12126. :
  12127. *Dir SDFS::RISCOSpi.$.CAC.Files
  12128. INPUT'" filename "filenamestg$
  12129. channel = OPENIN filenamestg$
  12130. REPEAT
  12131. INPUT#channel, numpitches%
  12132. INPUT#channel, grid$
  12133. INPUT#channel, samplesize%
  12134. INPUT#channel, octavesections%
  12135. INPUT#channel, transpositionsections%
  12136. INPUT#channel, contoursections%
  12137. FOR a% = 0 TO samplesize%
  12138. INPUT#channel, sample%(a%)
  12139. NEXT
  12140. FOR a% = 0 TO octavesections%
  12141. FOR b% = 0 TO 48
  12142. FOR c% = 0 TO 11
  12143. INPUT#channel, octavesequences%(a%,b%,c%)
  12144. NEXT
  12145. NEXT
  12146. NEXT
  12147. FOR a% = 0 TO transpositionsections%
  12148. FOR b% = 0 TO 1
  12149. INPUT#channel, transpositionsequences%(a%,b%)
  12150. NEXT
  12151. NEXT
  12152. FOR a% = 0 TO contoursections%
  12153. FOR b% = 0 TO 11
  12154. INPUT#channel, contoursequences%(a%,b%)
  12155. NEXT
  12156. NEXT
  12157. UNTIL EOF#channel
  12158. CLOSE#channel
  12159. *NoDir
  12160. :
  12161. ENDPROC
  12162. :
  12163. REM*****************************************************
  12164. :
  12165. DEF PROCeditpitchstring
  12166. :
  12167. IF loadstring$ = "y" THEN PROCloadpitchstring
  12168. :
  12169. PRINT'" Change number of notes in the"
  12170. PRINT " pitch string? (Y/+ OR N/return)"
  12171. PRINT'" (currently ";numpitches%;")"
  12172. CASE GET$ OF
  12173. WHEN "Y","y","+","=" : do$ = "y"
  12174. OTHERWISE do$ = "n"
  12175. ENDCASE
  12176. IF do$ = "y" THEN
  12177. PRINT'" Total number of notes in the"
  12178. INPUT " pitch string (inc. sample) "numpitches%
  12179. ENDIF
  12180. CLS
  12181. :
  12182. PRINT'" Change the sample?"
  12183. PRINT'" currently "
  12184. FOR count% = 1 TO samplesize%
  12185. x% = sample%(count%)
  12186. WHILE x% > 52
  12187. x% -= 48
  12188. ENDWHILE
  12189. CASE x% OF
  12190. WHEN 5 : PRINT count%;". C nat"
  12191. WHEN 9 : PRINT count%;". C shrp"
  12192. WHEN 13 : PRINT count%;". D nat"
  12193. WHEN 17 : PRINT count%;". E flat"
  12194. WHEN 21 : PRINT count%;". E nat"
  12195. WHEN 25 : PRINT count%;". F nat"
  12196. WHEN 29 : PRINT count%;". F shrp"
  12197. WHEN 33 : PRINT count%;". G nat"
  12198. WHEN 37 : PRINT count%;". A flat"
  12199. WHEN 41 : PRINT count%;". A nat"
  12200. WHEN 45 : PRINT count%;". B flat"
  12201. WHEN 49 : PRINT count%;". B nat"
  12202. OTHERWISE
  12203. ENDCASE
  12204. NEXT
  12205. REM eighthtones not yet implemented!
  12206. CASE GET$ OF
  12207. WHEN "Y","y","+","=" : do$ = "y"
  12208. OTHERWISE do$ = "n"
  12209. ENDCASE
  12210. IF do$ = "y" THEN
  12211. PRINT'" Change the number of notes in the sample?"
  12212. PRINT'" Currently ";samplesize%
  12213. CASE GET$ OF
  12214. WHEN "Y","y","+" : do$ = "y"
  12215. OTHERWISE do$ = "n"
  12216. ENDCASE
  12217. IF do$ = "y" THEN
  12218. INPUT'" How many notes in the sample? "samplesize%
  12219. ENDIF
  12220. PRINT'" Change any of the sample's notes?"
  12221. CASE GET$ OF
  12222. WHEN "Y","y","+" : do$ = "y"
  12223. OTHERWISE do$ = "n"
  12224. ENDCASE
  12225. IF do$ = "y" THEN
  12226. INPUT'" How many "x%
  12227. FOR count% = 1 TO x%
  12228. IF x% < samplesize% THEN
  12229. PRINT'" note ";count%;" is note number "
  12230. INPUT y%
  12231. PRINT'" this note is now pitchclass ";
  12232. ELSE
  12233. y% = count%
  12234. PRINT'" note ";count%;" is now pitchclass ";
  12235. ENDIF
  12236. COLOUR 3
  12237. CASE GET$ OF
  12238. WHEN "C","c" : samplenote% = 0 : PRINT "C"
  12239. WHEN "D","d" : samplenote% = 1 : PRINT "D"
  12240. WHEN "E","e" : samplenote% = 2 : PRINT "E"
  12241. WHEN "F","f" : samplenote% = 3 : PRINT "F"
  12242. WHEN "G","g" : samplenote% = 4 : PRINT "G"
  12243. WHEN "A","a" : samplenote% = 5 : PRINT "A"
  12244. WHEN "B","b" : samplenote% = 6 : PRINT "B"
  12245. ENDCASE
  12246. samplenote% = samplenote%*100
  12247. COLOUR 0
  12248. PRINT " accidental ";
  12249. COLOUR 3
  12250. CASE GET$ OF
  12251. WHEN "1" : samplenote% += 10 : PRINT "flat"
  12252. WHEN "2" : samplenote% += 20 : PRINT "3/8 flat"
  12253. WHEN "3" : samplenote% += 30 : PRINT "1/4 flat"
  12254. WHEN "4" : samplenote% += 40 : PRINT "1/8 flat"
  12255. WHEN "5" : samplenote% += 50 : PRINT "nat"
  12256. WHEN "6" : samplenote% += 60 : PRINT "1/8 shrp"
  12257. WHEN "7" : samplenote% += 70 : PRINT "1/4 shrp"
  12258. WHEN "8" : samplenote% += 80 : PRINT "3/8 shrp"
  12259. WHEN "9" : samplenote% += 90 : PRINT "shrp"
  12260. ENDCASE
  12261. COLOUR 0
  12262. samplenote% += 5
  12263. PROCconvertsamplenote
  12264. sample%(y%) = samplenote%
  12265. :
  12266. NEXT
  12267. ENDIF
  12268. :
  12269. ENDIF
  12270. :
  12271. CLS
  12272. PRINT'" Make changes to the octave sequences?"
  12273. PRINT'" Currently"
  12274. VDU 14
  12275. FOR a% = 1 TO octavesections%
  12276. FOR b% = 3 TO 47 STEP 4
  12277. FOR c% = 1 TO 11
  12278. IF b% = 3 AND c% = 1 THEN PRINT'" C nat"
  12279. IF b% = 7 AND c% = 1 THEN PRINT'" C shrp"
  12280. IF b% = 11 AND c% = 1 THEN PRINT'" D nat"
  12281. IF b% = 15 AND c% = 1 THEN PRINT'" E flat"
  12282. IF b% = 19 AND c% = 1 THEN PRINT'" E nat"
  12283. IF b% = 23 AND c% = 1 THEN PRINT'" F nat"
  12284. IF b% = 27 AND c% = 1 THEN PRINT'" F shrp"
  12285. IF b% = 31 AND c% = 1 THEN PRINT'" G nat"
  12286. IF b% = 35 AND c% = 1 THEN PRINT'" A flat"
  12287. IF b% = 39 AND c% = 1 THEN PRINT'" A nat"
  12288. IF b% = 43 AND c% = 1 THEN PRINT'" B flat"
  12289. IF b% = 47 AND c% = 1 THEN PRINT'" B nat"
  12290. IF octavesequences%(a%,b%,c%) > 0 THEN PRINT octavesequences%(a%,b%,c%)
  12291. NEXT
  12292. NEXT
  12293. NEXT
  12294. VDU 15
  12295. CASE GET$ OF
  12296. WHEN "Y","y","+" : do$ = "y"
  12297. OTHERWISE do$ = "n"
  12298. ENDCASE
  12299. IF do$ = "y" THEN
  12300. PRINT'" Change the number of sections of "
  12301. PRINT" octave sequences?"
  12302. CASE GET$ OF
  12303. WHEN "Y","y","+" : do$ = "y"
  12304. OTHERWISE do$ = "n"
  12305. ENDCASE
  12306. IF do$ = "y" THEN
  12307. PRINT'" How many different sections of"
  12308. INPUT " octave sequences are there "octavesections%
  12309. ENDIF
  12310. IF octavesections% > 1 THEN
  12311. PRINT'" Change the starting point of"
  12312. PRINT" any sections?"
  12313. CASE GET$ OF
  12314. WHEN "Y","y","+" : do$ = "y"
  12315. OTHERWISE do$ = "n"
  12316. ENDCASE
  12317. IF do$ = "y" THEN
  12318. INPUT'" How many "z%
  12319. FOR count% = 1 TO z%
  12320. PRINT'" section ";count%;" is section "
  12321. INPUT y%
  12322. PRINT'" this section now begins at note number "
  12323. INPUT x%
  12324. octavesequences%(y%,0,0) = x%
  12325. NEXT
  12326. ENDIF
  12327. ENDIF
  12328. :
  12329. PRINT'" Make changes to the actual octave"
  12330. PRINT" sequences?"
  12331. CASE GET$ OF
  12332. WHEN "Y","y","+" : do$ = "y"
  12333. OTHERWISE do$ = "n"
  12334. ENDCASE
  12335. IF do$ = "y" THEN
  12336. FOR count% = 1 TO octavesections%
  12337. PRINT'" Any changes to section ";count%
  12338. CASE GET$ OF
  12339. WHEN "Y","y","+" : do$ = "y"
  12340. OTHERWISE do$ = "n"
  12341. ENDCASE
  12342. IF do$ = "y" THEN
  12343. FOR pitch% = 0 TO 47
  12344. entry$ = "n"
  12345. IF pitch% MOD 4 = 0 AND grid$<>"s" THEN entry$ = "y"
  12346. IF (pitch%-2)MOD4 = 0 THEN entry$ = "y"
  12347. IF (pitch%-1)MOD2 = 0 AND grid$ = "e" THEN entry$ = "y"
  12348. IF entry$ = "y" THEN
  12349. PRINT'" changes in section ";count%;" to ";
  12350. COLOUR 3 : PRINT pitchnames$(pitch%) : COLOUR 0
  12351. CASE GET$ OF
  12352. WHEN "Y","y","+" : do$ = "y"
  12353. OTHERWISE do$ = "n"
  12354. ENDCASE
  12355. IF do$ = "y" THEN
  12356. PRINT '"In section ";count%;" the sequence of octaves for ";
  12357. COLOUR 3 : PRINT pitchnames$(pitch%)
  12358. COLOUR 0 : PRINT "has how many elements "
  12359. INPUT e%
  12360. PRINT""
  12361. octavesequences%(count%,pitch%+1,0) = e%
  12362. FOR counter% = 1 TO 11
  12363. octavesequences%(count%,pitch%+1,counter%) = 0
  12364. NEXT
  12365. FOR counter% = 1 TO e%
  12366. PRINT " element ";counter%;
  12367. INPUT " is octave "o%
  12368. octavesequences%(count%,pitch%+1,counter%) = o%
  12369. NEXT
  12370. ENDIF
  12371. ENDIF
  12372. NEXT
  12373. ENDIF
  12374. NEXT
  12375. ENDIF
  12376. ENDIF
  12377. :
  12378. CLS
  12379. PRINT'" Make changes to transposition levels?"
  12380. PRINT'" Currently"
  12381. FOR a% = 1 TO transpositionsections%
  12382. PRINT'" section ";a%;". ";transpositionsequences%(a%,1)/4;" semitones starting at note number ";transpositionsequences%(a%,0)
  12383. NEXT
  12384. CASE GET$ OF
  12385. WHEN "Y","y","+" : do$ = "y"
  12386. OTHERWISE do$ = "n"
  12387. ENDCASE
  12388. IF do$ = "y" THEN
  12389. PRINT'" Change the number of sections "
  12390. PRINT" of transposition levels?"
  12391. CASE GET$ OF
  12392. WHEN "Y","y","+" : do$ = "y"
  12393. OTHERWISE do$ = "n"
  12394. ENDCASE
  12395. IF do$ = "y" THEN
  12396. PRINT'" How many different sections of"
  12397. INPUT" transposition are there "transpositionsections%
  12398. ENDIF
  12399. IF transpositionsections% > 1 THEN
  12400. PRINT'" Change the starting point of"
  12401. PRINT" any sections?"
  12402. CASE GET$ OF
  12403. WHEN "Y","y","+" : do$ = "y"
  12404. OTHERWISE do$ = "n"
  12405. ENDCASE
  12406. IF do$ = "y" THEN
  12407. INPUT'" How many "z%
  12408. FOR count% = 1 TO z%
  12409. PRINT'" Section ";count%;" is section "
  12410. INPUT y%
  12411. PRINT'" this section now begins at "
  12412. INPUT " note number "n%
  12413. transpositionsequences%(y%,0) = n%
  12414. NEXT
  12415. ENDIF
  12416. PRINT'" Change the degree of transposition"
  12417. PRINT" of any sections?"
  12418. CASE GET$ OF
  12419. WHEN "Y","y","+" : do$ = "y"
  12420. OTHERWISE do$ = "n"
  12421. ENDCASE
  12422. IF do$ = "y" THEN
  12423. INPUT'" How many "z%
  12424. FOR count% = 1 TO z%
  12425. PRINT'" Section ";count%;" is section "
  12426. INPUT y%
  12427. PRINT'" This section now transposes"
  12428. PRINT" up/down by how many ";
  12429. CASE grid$ OF
  12430. WHEN "e" : PRINT "eighthtones" : INPUT " (+/- 1 etc) "x%
  12431. transpositionsequences%(y%,1) = x%
  12432. WHEN "q" : PRINT "quartertones" : INPUT " (+/- 1 etc) "x%
  12433. transpositionsequences%(y%,1) = x% * 2
  12434. WHEN "s" : PRINT "semitones" : INPUT " (+/- 1 etc) "x%
  12435. transpositionsequences%(y%,1) = x% * 4
  12436. ENDCASE
  12437. NEXT
  12438. ENDIF
  12439. ENDIF
  12440. ENDIF
  12441. :
  12442. CLS
  12443. PRINT'" Make changes to the contour sequences?"
  12444. PRINT'" Currently"
  12445. FOR a% = 1 TO contoursections%
  12446. FOR b% = 2 TO contoursequences%(a%,1)+1
  12447. IF b% = 2 THEN PRINT'" section ";a%
  12448. PRINT contoursequences%(a%,b%)
  12449. NEXT
  12450. NEXT
  12451. CASE GET$ OF
  12452. WHEN "Y","y","+" : do$ = "y"
  12453. OTHERWISE do$ = "n"
  12454. ENDCASE
  12455. IF do$ = "y" THEN
  12456. PRINT'" Change the number of sections?"
  12457. CASE GET$ OF
  12458. WHEN "Y","y","+" : do$ = "y"
  12459. OTHERWISE do$ = "n"
  12460. ENDCASE
  12461. IF do$ = "y" THEN
  12462. PRINT'" How many different sections of "
  12463. INPUT " contour sequences are there "contoursections%
  12464. ENDIF
  12465. IF contoursections%>1 THEN
  12466. PRINT'" Change the starting point"
  12467. PRINT" of any sections?"
  12468. CASE GET$ OF
  12469. WHEN "Y","y","+" : do$ = "y"
  12470. OTHERWISE do$ = "n"
  12471. ENDCASE
  12472. IF do$ = "y" THEN
  12473. INPUT'" How many "z%
  12474. FOR count% = 1 TO z%
  12475. PRINT'" Section ";count%;" is section "
  12476. INPUT y%
  12477. PRINT'" This section"
  12478. INPUT " begins at note number "n%
  12479. contoursequences%(y%,0) = n%
  12480. NEXT
  12481. ENDIF
  12482. ENDIF
  12483. :
  12484. PRINT'" Make changes to any contours?"
  12485. CASE GET$ OF
  12486. WHEN "Y","y","+" : do$ = "y"
  12487. OTHERWISE do$ = "n"
  12488. ENDCASE
  12489. IF do$ = "y" THEN
  12490. FOR count% = 1 TO contoursections%
  12491. PRINT'" Change section ";count%;"?"
  12492. CASE GET$ OF
  12493. WHEN "Y","y","+" : do$ = "y"
  12494. OTHERWISE do$ = "n"
  12495. ENDCASE
  12496. IF do$ = "y" THEN
  12497. PRINT'" In section ";count%;
  12498. INPUT " there are how many contours "c%
  12499. contoursequences%(count%,1) = c%
  12500. PRINT""
  12501. FOR counter% = 1 TO c%
  12502. PRINT " number ";counter%;
  12503. INPUT " is contour "contoor%
  12504. contoursequences%(count%,counter%+1) = contoor%
  12505. NEXT
  12506. ENDIF
  12507. NEXT
  12508. ENDIF
  12509. ENDIF
  12510. :
  12511. PROCdeletesections
  12512. REM this deletes info about sections which existed in
  12513. REM previous versions of the string
  12514. :
  12515. contoursize% = 0 : seriesnote% = 1 : samplenote% = 0
  12516. contoursequence% = 1 : transpositionsequence% = 1
  12517. octavesequence% = 1 : transpositionsequences%(1,1) = 0
  12518. contourloop% = 0 : octaveloop%() = 0
  12519. :
  12520. REPEAT
  12521. seriesnote% += contoursize%
  12522. IF seriesnote% >= contoursequences%(contoursequence%+1,0) AND contoursequences%(contoursequence%+1,0) <> 0 THEN
  12523. contoursequence% += 1
  12524. contourloop% = 0
  12525. ENDIF
  12526. :
  12527. contourloop% += 1
  12528. IF contourloop% > contoursequences%(contoursequence%,1) THEN contourloop% = 1
  12529. contour% = contoursequences%(contoursequence%,contourloop%+1)
  12530. contoursize% = contours%(contour%,0)
  12531. :
  12532. IF seriesnote% >= transpositionsequences%(transpositionsequence%+1,0) AND transpositionsequences%(transpositionsequence%+1,0) <> 0 THEN
  12533. transpositionsequence% += 1
  12534. ENDIF
  12535. transposition% = transpositionsequences%(transpositionsequence%,1)
  12536. :
  12537. FOR count% = 1 TO contoursize%
  12538. samplenote% += 1
  12539. IF samplenote% > samplesize% THEN samplenote% = 1
  12540. group%(count%) = sample%(samplenote%) + transposition%
  12541. NEXT
  12542. :
  12543. IF seriesnote% >= octavesequences%(octavesequence%+1,0,0) AND octavesequences%(octavesequence%+1,0,0) <> 0 THEN
  12544. octavesequence% += 1
  12545. octaveloop%() = 0
  12546. ENDIF
  12547. :
  12548. FOR count% = 1 TO contoursize%
  12549. pitchclass% = group%(count%)
  12550. REPEAT
  12551. pitchclass% -= 48
  12552. UNTIL pitchclass% < 51
  12553. pitchclass% -= 2
  12554. octaveloop%(pitchclass%) += 1
  12555. IF octaveloop%(pitchclass%) > octavesequences%(octavesequence%,pitchclass%,0) THEN octaveloop%(pitchclass%) = 1
  12556. oxtave% = octavesequences%(octavesequence%,pitchclass%,octaveloop%(pitchclass%))
  12557. group%(count%) = (pitchclass%+2) + (48*oxtave%)
  12558. NEXT
  12559. :
  12560. IF contoursize% > 1 THEN
  12561. REPEAT
  12562. FOR count% = 1 TO (contoursize%-1)
  12563. IF group%(count%) >= group%(count%+1) THEN
  12564. save% = group%(count%)
  12565. group%(count%) = group%(count%+1)
  12566. group%(count%+1) = save%
  12567. ENDIF
  12568. NEXT
  12569. no% = 0
  12570. FOR count% = 1 TO (contoursize%-1)
  12571. IF group%(count%) > group%(count%+1) THEN no% = 1
  12572. NEXT
  12573. UNTIL no% = 0
  12574. ENDIF
  12575. :
  12576. FOR count% = 1 TO contoursize%
  12577. simplenote% = group%(contours%(contour%,count%))
  12578. PROCconvertsimplenote
  12579. pitches%((seriesnote%+count%)-1) = simplenote%
  12580. NEXT
  12581. :
  12582. UNTIL ((seriesnote%+contoursize%)-1) >= numpitches%
  12583. :
  12584. FOR count% = 0 TO numpitches%-1 : pitches%(count%) = pitches%(count%+1) : NEXT
  12585. PRINT'" Do you want to save this pitch string?"
  12586. CASE GET$ OF
  12587. WHEN "Y","y","+" : PROCsavepitchstring
  12588. OTHERWISE
  12589. ENDCASE
  12590. :
  12591. PROCinsertpitches
  12592. :
  12593. ENDPROC
  12594. :
  12595. REM************************************************
  12596. :
  12597. :
  12598. DEF PROCdeletesections
  12599. :
  12600. FOR count% = 2 TO 50
  12601. IF count% > octavesections% THEN
  12602. octavesequences%(count%,0,0) = 0
  12603. ENDIF
  12604. NEXT
  12605. :
  12606. FOR count% = 2 TO 199
  12607. IF count% > transpositionsections% THEN
  12608. transpositionsequences%(count%,0) = 0
  12609. ENDIF
  12610. NEXT
  12611. :
  12612. FOR count% = 2 TO 50
  12613. IF count% > contoursections% THEN
  12614. contoursequences%(count%,0) = 0
  12615. ENDIF
  12616. NEXT
  12617. :
  12618. ENDPROC
  12619. :
  12620. REM**************************************************
  12621. :
  12622. DEF PROCyesno
  12623. :
  12624. CASE GET$ OF
  12625. WHEN "Y","y" : on = 1
  12626. OTHERWISE on = 2
  12627. ENDCASE
  12628. :
  12629. ENDPROC
  12630. :
  12631. REM**************************************************
  12632. :
  12633. DEF PROCeditlayers
  12634. :
  12635. chanceoflayer%(1) = 1
  12636. :
  12637. PRINT'" Alter total length? [currently ";totallength%;"]"
  12638. PROCyesno
  12639. IF on = 1 THEN
  12640. INPUT'" Total duration, in BEATS "totallength%
  12641. ENDIF
  12642. PRINT''" LAYERS -"
  12643. PRINT'" Alter number of layers? [currently ";numlayers%;"]"
  12644. PROCyesno
  12645. IF on = 1 THEN
  12646. INPUT'" How many layers "numlayers%
  12647. ENDIF
  12648. :
  12649. PRINT'" Alter contribution proportions"
  12650. PRINT" of the layers?"
  12651. PROCyesno
  12652. IF on = 1 THEN
  12653. REM 1
  12654. :
  12655. PRINT'" Alter number of sections of"
  12656. PRINT" proportions?"
  12657. PROCyesno
  12658. IF on = 1 THEN
  12659. PRINT'" Piece is divided into how many sections"
  12660. PRINT " of different contribution-proportions "
  12661. PRINT " [currently "; numlayersections%;"]"
  12662. INPUT numlayersections%
  12663. ENDIF
  12664. :
  12665. IF numlayersections% > 1 THEN
  12666. :
  12667. PRINT'" Alter starting points of sections?"
  12668. PROCyesno
  12669. IF on = 1 THEN
  12670. FOR count% = 2 TO numlayersections%
  12671. PRINT'" Alter start point of section ";count%;" [currently ";startoflayersection%(count%);"]"
  12672. PROCyesno
  12673. IF on = 1 THEN
  12674. PRINT'" Section ";count%;" starts at beat number "
  12675. INPUT startoflayersection%(count%)
  12676. ENDIF
  12677. NEXT
  12678. ENDIF
  12679. ENDIF
  12680. :
  12681. PRINT'" Alter any of the proportions?"
  12682. PROCyesno
  12683. IF on = 1 THEN
  12684. REM 2
  12685. FOR count% = 1 TO numlayersections%
  12686. PRINT'" Alter proportions in section ";count%
  12687. PROCyesno
  12688. IF on = 1 THEN
  12689. REM 3
  12690. FOR count1% = 1 TO numlayers%
  12691. PRINT'" Alter (section ";count%;") layer ";count1%;" proportions? [currently ";shareoflayers%(count%,count1%);"]"
  12692. PROCyesno
  12693. IF on = 1 THEN
  12694. REM 4
  12695. PRINT '"In section ";count%;", layer ";count1%;" has "
  12696. PRINT "how many proportions?"
  12697. INPUT shareoflayers%(count%,count1%)
  12698. ENDIF : REM 4
  12699. NEXT
  12700. ENDIF : REM 3
  12701. NEXT
  12702. ENDIF : REM 2
  12703. :
  12704. ENDIF : REM 1
  12705. :
  12706. PRINT''" NUMBER OF ATTACKS, DURATIONS, MULTIPLIERS, RETURN AFTERS"
  12707. FOR count% = 1 TO numlayers%
  12708. PRINT'" Alterations to layer ";count%
  12709. PROCyesno
  12710. IF on = 1 THEN
  12711. REM 5
  12712. PRINT'" Alter number of attacks?"
  12713. PROCyesno
  12714. IF on = 1 THEN
  12715. REM 6
  12716. PRINT'" Alter whether controlled by sections/appearances?"
  12717. PROCyesno
  12718. IF on = 1 THEN
  12719. REM 7
  12720. PRINT'" In layer ";count%;" are the number of attacks controlled"
  12721. PRINT " by sections or by appearance number (S/A)"
  12722. PRINT " [currently ";attackscontrol$(count%);"]"
  12723. CASE GET$ OF
  12724. WHEN "S","s" :
  12725. attackscontrol$(count%) = "S"
  12726. OTHERWISE attackscontrol$(count%) = "A"
  12727. ENDCASE
  12728. ELSE
  12729. IF attackscontrol$(count%) = "" THEN attackscontrol$(count%) = "S" : REM default for added layers
  12730. ENDIF : REM 7
  12731. :
  12732. IF attackscontrol$(count%) = "S" THEN
  12733. REM 8
  12734. IF numattackssections%(count%) = 0 THEN numattackssections%(count%) = 1 : REM new layers
  12735. PRINT'" Alter number of sections? [currently ";numattackssections%(count%);"]"
  12736. PROCyesno
  12737. IF on = 1 THEN
  12738. REM 9
  12739. INPUT'" How many sections "numattackssections%(count%)
  12740. ENDIF : REM 9
  12741. IF numattackssections%(count%) > 1 THEN
  12742. PRINT'" Alter starting point of any sections?"
  12743. PROCyesno
  12744. IF on = 1 THEN
  12745. REM 10
  12746. FOR count1% = 2 TO numattackssections%(count%)
  12747. PRINT'" Alter starting point of section ";count1%;" currently [";startofattackssection%(count%,count1%);"]"
  12748. PROCyesno
  12749. IF on = 1 THEN
  12750. REM 11
  12751. PRINT'" (layer ";count%;") section ";count1%;" starts at beat"
  12752. INPUT startofattackssection%(count%,count1%)
  12753. ENDIF : REM 11
  12754. NEXT
  12755. ENDIF : REM 10
  12756. ENDIF
  12757. PRINT'" Alter the number of attacks in layer ";count%
  12758. PROCyesno
  12759. IF on = 1 THEN
  12760. REM 12
  12761. :
  12762. FOR count1% = 1 TO numattackssections%(count%)
  12763. PRINT'" Alter attacks in section ";count1%;" [currently ";numattax%(count%,count1%,0);"-";numattax%(count%,count1%,1);"]"
  12764. PROCyesno
  12765. IF on = 1 THEN
  12766. REM 13
  12767. PRINT'" In layer ";count%;", section ";count1%;" the number"
  12768. PRINT" of attacks varies between..."
  12769. INPUT numattax%(count%,count1%,0)
  12770. INPUT" and..."numattax%(count%,count1%,1)
  12771. ENDIF : REM 13
  12772. NEXT
  12773. ENDIF : REM 12
  12774. ENDIF : REM 8
  12775. :
  12776. IF attackscontrol$(count%) = "A" THEN
  12777. REM 14
  12778. PRINT'" Alter number of 'sections' of appearances? [currently ";numattackssections1%(count%);"]"
  12779. PROCyesno
  12780. IF on = 1 THEN
  12781. REM 15
  12782. INPUT'" How many 'sections' of appearances "numattackssections1%(count%)
  12783. ENDIF : REM 15
  12784. IF numattackssections1%(count%) > 1 THEN
  12785. PRINT'" Alter starting point of any sections?"
  12786. PROCyesno
  12787. IF on = 1 THEN
  12788. REM 16
  12789. FOR count1% = 2 TO numattackssections1%(count%)
  12790. PRINT'" Alter starting point of section ";count1%;" [currently appearance ";startofattackssection1%(count%,count1%);"]"
  12791. PROCyesno
  12792. IF on = 1 THEN
  12793. REM 17
  12794. PRINT'" (layer ";count%;") section ";count1%;" starts at appearance "
  12795. INPUT startofattackssection1%(count%,count1%)
  12796. ENDIF : REM 17
  12797. NEXT
  12798. ENDIF : REM 16
  12799. ENDIF
  12800. :
  12801. PRINT'" Alter number of attacks in layer ";count%
  12802. PROCyesno
  12803. IF on = 1 THEN
  12804. REM 18
  12805. FOR count1% = 1 TO numattackssections1%(count%)
  12806. PRINT'" Alter number of attacks in section ";count1%;" [currently ";numattax1%(count%,count1%,0);"-";numattax1%(count%,count1%,1);"]"
  12807. PROCyesno
  12808. IF on = 1 THEN
  12809. REM 19
  12810. PRINT'" In layer ";count%;", section ";count1%;" the number"
  12811. PRINT" of attacks varies between..."
  12812. INPUT numattax1%(count%,count1%,0)
  12813. INPUT" and... "numattax1%(count%,count1%,1)
  12814. ENDIF : REM 19
  12815. NEXT
  12816. ENDIF : REM 18
  12817. ENDIF : REM 14
  12818. ENDIF : REM 6
  12819. :
  12820. PRINT''" DURATIONS"
  12821. PRINT'" Alter durations in layer ";count%
  12822. PROCyesno
  12823. IF on = 1 THEN
  12824. REM 20
  12825. :
  12826. PRINT'" Alter whether durations in sections/appearances?"
  12827. PROCyesno
  12828. IF on = 1 THEN
  12829. REM 21
  12830. PRINT'" In layer ";count%;" are the unit durations controlled"
  12831. PRINT" by sections or by appearance number (S/A)"
  12832. PRINT " [currently ";durationscontrol$(count%);"]"
  12833. CASE GET$ OF
  12834. WHEN "S","s" :
  12835. durationscontrol$(count%) = "S"
  12836. OTHERWISE durationscontrol$(count%) = "A"
  12837. ENDCASE
  12838. ELSE
  12839. IF durationscontrol$(count%) = "" THEN durationscontrol$(count%) = "S" : REM new layers default
  12840. ENDIF : REM 21
  12841. IF durationscontrol$(count%) = "S" THEN
  12842. REM 22
  12843. IF numdurationssections%(count%) = 0 THEN numdurationssections%(count%) = 1 : REM new layers
  12844. PRINT'" Alter number of sections of durations? [currently ";numdurationssections%(count%);"]"
  12845. PROCyesno
  12846. IF on = 1 THEN
  12847. REM 23
  12848. INPUT'" How many sections "numdurationssections%(count%)
  12849. ENDIF : REM 23
  12850. IF numdurationssections%(count%) > 1 THEN
  12851. PRINT'" Alter starting point of sections?"
  12852. PROCyesno
  12853. IF on = 1 THEN
  12854. REM 24
  12855. FOR count1% = 2 TO numdurationssections%(count%)
  12856. PRINT'" Alter starting point of section ";count1%;" [currently ";startofdurationssection%(count%,count1%);"]"
  12857. PROCyesno
  12858. IF on = 1 THEN
  12859. REM 25
  12860. PRINT'" (layer ";count%;") section ";count1%;" starts at beat "
  12861. INPUT startofdurationssection%(count%,count1%)
  12862. ENDIF : REM 25
  12863. NEXT
  12864. ENDIF : REM 24
  12865. ENDIF
  12866. :
  12867. PRINT'" Alter the unit durations?"
  12868. PROCyesno
  12869. IF on = 1 THEN
  12870. REM 26
  12871. FOR count1% = 1 TO numdurationssections%(count%)
  12872. PRINT'" Alter the duration in section ";count1%;" [currently ";doorations%(count%,count1%);"]"
  12873. PROCyesno
  12874. IF on = 1 THEN
  12875. REM 27
  12876. PRINT'" In layer ";count%;", section ";count1%;" the unit duration is"
  12877. INPUT beats% : PROCalterbeats
  12878. doorations%(count%,count1%) = beats%
  12879. ENDIF : REM 27
  12880. NEXT
  12881. ENDIF : REM 26
  12882. ENDIF : REM 22
  12883. :
  12884. IF durationscontrol$(count%) = "A" THEN
  12885. REM 28
  12886. PRINT'" Alter number of 'sections'? [currently ";numdurationssections1%(count%);"]"
  12887. PROCyesno
  12888. IF on = 1 THEN
  12889. REM 29
  12890. INPUT'" How many 'sections' "numdurationssections1%(count%)
  12891. ENDIF : REM 29
  12892. IF numdurationssections1%(count%) > 1 THEN
  12893. PRINT'" Alter starting point of 'sections'?"
  12894. PROCyesno
  12895. IF on = 1 THEN
  12896. REM 30
  12897. FOR count1% = 2 TO numdurationssections1%(count%)
  12898. PRINT'" Alter section ";count1%;" [currently appearance ";startofdurationssection1%(count%,count1%);"]"
  12899. PROCyesno
  12900. IF on = 1 THEN
  12901. REM 31
  12902. PRINT'" (layer ";count%;") section ";count1%;" starts at appearance "
  12903. INPUT startofdurationssection1%(count%,count1%)
  12904. ENDIF : REM 31
  12905. NEXT
  12906. ENDIF : REM 30
  12907. ENDIF
  12908. PRINT'" Alter the unit durations?"
  12909. PROCyesno
  12910. IF on = 1 THEN
  12911. REM 32
  12912. FOR count1% = 1 TO numdurationssections1%(count%)
  12913. PRINT'" Alter section ";count1%;" [currently ";doorations1%(count%,count1%);"]"
  12914. PROCyesno
  12915. IF on = 1 THEN
  12916. REM 33
  12917. PRINT'" In layer ";count%;", section ";count1%;" the unit duration is "
  12918. INPUT doorations1%(count%,count1%)
  12919. ENDIF : REM 33
  12920. NEXT
  12921. ENDIF : REM 32
  12922. ENDIF : REM 28
  12923. ENDIF : REM 20
  12924. :
  12925. PRINT'" Alter multiplication of durations?"
  12926. PROCyesno
  12927. IF on = 1 THEN
  12928. REM 34
  12929. PRINT'" Do you want the unit duration to be multiplied"
  12930. PRINT " by a given series of values (Y/N) [currently ";multiplier$(count%);"]"
  12931. CASE GET$ OF
  12932. WHEN "Y","y" :
  12933. multiplier$(count%) = "Y"
  12934. PRINT'" starting fresh at each appearance or irrespective (F/I) "
  12935. PRINT " [currently ";multipliermode$(count%);"]"
  12936. CASE GET$ OF
  12937. WHEN "F","f" :
  12938. multipliermode$(count%) = "F"
  12939. OTHERWISE multipliermode$(count%) = "I"
  12940. ENDCASE
  12941. :
  12942. PRINT'" How many values [currently ";numvalues%(count%);"]"
  12943. INPUT numvalues%(count%)
  12944. FOR count1% = 1 TO numvalues%(count%)
  12945. PRINT'" value ";count1%;" is [currently ";values(count%,count1%);"]"
  12946. INPUT values(count%,count1%)
  12947. NEXT
  12948. OTHERWISE multiplier$(count%) = "N"
  12949. ENDCASE
  12950. ELSE
  12951. IF multiplier$(count%) = "" THEN multiplier$(count%) = "N" : REM default for new layers
  12952. ENDIF : REM 34
  12953. :
  12954. PRINT'" Alter control over reoccurence of layers?"
  12955. PROCyesno
  12956. IF on = 1 THEN
  12957. REM 35
  12958. IF numlayerOKsects%(count%) = 0 THEN word$ = "No" ELSE word$ = "Yes"
  12959. PRINT'" Do you want this layer to reoccur according"
  12960. PRINT " to minimum and maximum intervals (eg to"
  12961. PRINT " control phrase-lengths)? [currently ";word$;"]"
  12962. CASE GET$ OF
  12963. WHEN "Y","y" :
  12964. PRINT'" Alter number of sections? [currently ";numlayerOKsects%(count%);"]"
  12965. PROCyesno
  12966. IF on = 1 THEN
  12967. REM 36
  12968. INPUT'" How many sections of this "numlayerOKsects%(count%)
  12969. ENDIF : REM 36
  12970. FOR count1% = 1 TO numlayerOKsects%(count%)
  12971. PRINT'" Any alteration to section ";count1%
  12972. PROCyesno
  12973. IF on = 1 THEN
  12974. REM 37
  12975. PRINT'" Alter the starting point? [currently ";layersOK%(count%,count1%,0);"]"
  12976. PROCyesno
  12977. IF on = 1 THEN
  12978. REM 38
  12979. IF numlayerOKsects%(count%) > 1 THEN
  12980. PRINT'" section ";count1%;" begins at beat "
  12981. INPUT x%
  12982. ELSE x% = 0
  12983. ENDIF
  12984. layersOK%(count%,count1%,0) = x%
  12985. ENDIF : REM 38
  12986. PRINT'" Alter the controlling intervals?"
  12987. PROCyesno
  12988. IF on = 1 THEN
  12989. REM 39
  12990. PRINT'" in this section the layer should NOT reoccur"
  12991. PRINT" until at least how many beats from the"
  12992. PRINT" end of its previous occurence? [currently ";layersOK%(count%,count1%,1);"]"
  12993. INPUT y%
  12994. PRINT'" but SHOULD be made to reoccur after how "
  12995. PRINT" many beats from the end of its previous"
  12996. PRINT" occurence? [currently ";layersOK%(count%,count1%,2);"]"
  12997. INPUT z%
  12998. layersOK%(count%,count1%,1) = y%
  12999. layersOK%(count%,count1%,2) = z%
  13000. ENDIF : REM 39
  13001. ENDIF : REM 37
  13002. NEXT
  13003. OTHERWISE numlayerOKsects%(count%) = 0
  13004. ENDCASE
  13005. ENDIF : REM 35
  13006. :
  13007. ENDIF : REM 5
  13008. :
  13009. NEXT
  13010. :
  13011. :
  13012. PROClayeredattacks
  13013. :
  13014. ENDPROC
  13015. :
  13016. REM**************************************************
  13017. :
  13018. DEF PROCsavelayers
  13019. :
  13020. *Dir SDFS::RISCOSpi.$.CAC.Files
  13021. firstnaming$ = "n"
  13022. CLS
  13023. IF filenamelyr$ = "" THEN
  13024. INPUT'" filename "filenamelyr$
  13025. firstnaming$ = "y"
  13026. ENDIF
  13027. IF firstnaming$ = "n" THEN
  13028. PRINT'" as '";filenamelyr$;"'?"
  13029. CASE GET$ OF
  13030. WHEN "N","n" : INPUT'" filename "filenamelyr$
  13031. OTHERWISE
  13032. ENDCASE
  13033. ENDIF
  13034. :
  13035. channel = OPENOUT filenamelyr$
  13036. PRINT#channel, totallength%
  13037. PRINT#channel, numlayers%
  13038. PRINT#channel, numlayersections%
  13039. FOR a% = 0 TO numlayersections%
  13040. PRINT#channel, startoflayersection%(a%)
  13041. NEXT
  13042. FOR a% = 0 TO numlayersections%
  13043. FOR b% = 0 TO numlayers%
  13044. PRINT#channel, shareoflayers%(a%,b%)
  13045. NEXT
  13046. NEXT
  13047. FOR a% = 0 TO numlayers%
  13048. PRINT#channel, attackscontrol$(a%)
  13049. NEXT
  13050. FOR a% = 0 TO numlayers%
  13051. PRINT#channel, numattackssections%(a%)
  13052. NEXT
  13053. FOR a% = 0 TO numlayers%
  13054. FOR b% = 0 TO numattackssections%(a%)
  13055. PRINT#channel, startofattackssection%(a%,b%)
  13056. NEXT
  13057. NEXT
  13058. FOR a% = 0 TO numlayers%
  13059. FOR b% = 0 TO numattackssections%(a%)
  13060. FOR c% = 0 TO 1
  13061. PRINT#channel, numattax%(a%,b%,c%)
  13062. NEXT
  13063. NEXT
  13064. NEXT
  13065. FOR a% = 0 TO numlayers%
  13066. PRINT#channel, numattackssections1%(a%)
  13067. NEXT
  13068. FOR a% = 0 TO numlayers%
  13069. FOR b% = 0 TO numattackssections1%(a%)
  13070. PRINT#channel, startofattackssection1%(a%,b%)
  13071. NEXT
  13072. NEXT
  13073. FOR a% = 0 TO numlayers%
  13074. FOR b% = 0 TO numattackssections1%(a%)
  13075. FOR c% = 0 TO 1
  13076. PRINT#channel, numattax1%(a%,b%,c%)
  13077. NEXT
  13078. NEXT
  13079. NEXT
  13080. FOR a% = 0 TO numlayers%
  13081. PRINT#channel, durationscontrol$(a%)
  13082. NEXT
  13083. FOR a% = 0 TO numlayers%
  13084. PRINT#channel, numdurationssections%(a%)
  13085. NEXT
  13086. FOR a% = 0 TO numlayers%
  13087. FOR b% = 0 TO numdurationssections%(a%)
  13088. PRINT#channel, startofdurationssection%(a%,b%)
  13089. NEXT
  13090. NEXT
  13091. FOR a% = 0 TO numlayers%
  13092. FOR b% = 0 TO numdurationssections%(a%)
  13093. PRINT#channel, doorations%(a%,b%)
  13094. NEXT
  13095. NEXT
  13096. FOR a% = 0 TO numlayers%
  13097. PRINT#channel, numdurationssections1%(a%)
  13098. NEXT
  13099. FOR a% = 0 TO numlayers%
  13100. FOR b% = 0 TO numdurationssections1%(a%)
  13101. PRINT#channel, doorations1%(a%,b%)
  13102. NEXT
  13103. NEXT
  13104. FOR a% = 0 TO numlayers%
  13105. FOR b% = 0 TO numdurationssections1%(a%)
  13106. PRINT#channel, startofdurationssection1%(a%,b%)
  13107. NEXT
  13108. NEXT
  13109. FOR a% = 0 TO numlayers%
  13110. PRINT#channel, multiplier$(a%)
  13111. NEXT
  13112. FOR a% = 0 TO numlayers%
  13113. PRINT#channel, multipliermode$(a%)
  13114. NEXT
  13115. FOR a% = 0 TO numlayers%
  13116. PRINT#channel, numvalues%(a%)
  13117. NEXT
  13118. FOR a% = 0 TO numlayers%
  13119. FOR b% = 0 TO numvalues%(a%)
  13120. PRINT#channel, values(a%,b%)
  13121. NEXT
  13122. NEXT
  13123. FOR a% = 0 TO numlayers%
  13124. PRINT#channel, numlayerOKsects%(a%)
  13125. NEXT
  13126. FOR a% = 0 TO numlayers%
  13127. FOR b% = 0 TO numlayerOKsects%(a%)
  13128. FOR c% = 0 TO 2
  13129. PRINT#channel, layersOK%(a%,b%,c%)
  13130. NEXT
  13131. NEXT
  13132. NEXT
  13133. :
  13134. CLOSE#channel
  13135. *NoDir
  13136. :
  13137. ENDPROC
  13138. :
  13139. REM****************************************************
  13140. :
  13141. DEF PROCloadlayers
  13142. :
  13143. *Dir SDFS::RISCOSpi.$.CAC.Files
  13144. INPUT'" filename "filenamelyr$
  13145. channel = OPENIN filenamelyr$
  13146. REPEAT
  13147. INPUT#channel, totallength%
  13148. INPUT#channel, numlayers%
  13149. INPUT#channel, numlayersections%
  13150. FOR a% = 0 TO numlayersections%
  13151. INPUT#channel, startoflayersection%(a%)
  13152. NEXT
  13153. FOR a% = 0 TO numlayersections%
  13154. FOR b% = 0 TO numlayers%
  13155. INPUT#channel, shareoflayers%(a%,b%)
  13156. NEXT
  13157. NEXT
  13158. FOR a% = 0 TO numlayers%
  13159. INPUT#channel, attackscontrol$(a%)
  13160. NEXT
  13161. FOR a% = 0 TO numlayers%
  13162. INPUT#channel, numattackssections%(a%)
  13163. NEXT
  13164. FOR a% = 0 TO numlayers%
  13165. FOR b% = 0 TO numattackssections%(a%)
  13166. INPUT#channel, startofattackssection%(a%,b%)
  13167. NEXT
  13168. NEXT
  13169. FOR a% = 0 TO numlayers%
  13170. FOR b% = 0 TO numattackssections%(a%)
  13171. FOR c% = 0 TO 1
  13172. INPUT#channel, numattax%(a%,b%,c%)
  13173. NEXT
  13174. NEXT
  13175. NEXT
  13176. FOR a% = 0 TO numlayers%
  13177. INPUT#channel, numattackssections1%(a%)
  13178. NEXT
  13179. FOR a% = 0 TO numlayers%
  13180. FOR b% = 0 TO numattackssections1%(a%)
  13181. INPUT#channel, startofattackssection1%(a%,b%)
  13182. NEXT
  13183. NEXT
  13184. FOR a% = 0 TO numlayers%
  13185. FOR b% = 0 TO numattackssections1%(a%)
  13186. FOR c% = 0 TO 1
  13187. INPUT#channel, numattax1%(a%,b%,c%)
  13188. NEXT
  13189. NEXT
  13190. NEXT
  13191. FOR a% = 0 TO numlayers%
  13192. INPUT#channel, durationscontrol$(a%)
  13193. NEXT
  13194. FOR a% = 0 TO numlayers%
  13195. INPUT#channel, numdurationssections%(a%)
  13196. NEXT
  13197. FOR a% = 0 TO numlayers%
  13198. FOR b% = 0 TO numdurationssections%(a%)
  13199. INPUT#channel, startofdurationssection%(a%,b%)
  13200. NEXT
  13201. NEXT
  13202. FOR a% = 0 TO numlayers%
  13203. FOR b% = 0 TO numdurationssections%(a%)
  13204. INPUT#channel, doorations%(a%,b%)
  13205. NEXT
  13206. NEXT
  13207. FOR a% = 0 TO numlayers%
  13208. INPUT#channel, numdurationssections1%(a%)
  13209. NEXT
  13210. FOR a% = 0 TO numlayers%
  13211. FOR b% = 0 TO numdurationssections1%(a%)
  13212. INPUT#channel, doorations1%(a%,b%)
  13213. NEXT
  13214. NEXT
  13215. FOR a% = 0 TO numlayers%
  13216. FOR b% = 0 TO numdurationssections1%(a%)
  13217. INPUT#channel, startofdurationssection1%(a%,b%)
  13218. NEXT
  13219. NEXT
  13220. FOR a% = 0 TO numlayers%
  13221. INPUT#channel, multiplier$(a%)
  13222. NEXT
  13223. FOR a% = 0 TO numlayers%
  13224. INPUT#channel, multipliermode$(a%)
  13225. NEXT
  13226. FOR a% = 0 TO numlayers%
  13227. INPUT#channel, numvalues%(a%)
  13228. NEXT
  13229. FOR a% = 0 TO numlayers%
  13230. FOR b% = 0 TO numvalues%(a%)
  13231. INPUT#channel, values(a%,b%)
  13232. NEXT
  13233. NEXT
  13234. FOR a% = 0 TO numlayers%
  13235. INPUT#channel, numlayerOKsects%(a%)
  13236. NEXT
  13237. FOR a% = 0 TO numlayers%
  13238. FOR b% = 0 TO numlayerOKsects%(a%)
  13239. FOR c% = 0 TO 2
  13240. INPUT#channel, layersOK%(a%,b%,c%)
  13241. NEXT
  13242. NEXT
  13243. NEXT
  13244. UNTIL EOF#channel
  13245. CLOSE#channel
  13246. *NoDir
  13247. :
  13248. ENDPROC
  13249. :
  13250. REM************************************************
  13251. :
  13252. DEF PROCseriesamplitudes
  13253. :
  13254. IF easiermenus$ = "n" THEN PROCwindow(20,69,73,45) ELSE PROCwindow(20,69,73,42)
  13255. :
  13256. IF ampoptions$ = "y" THEN
  13257. PRINT'" Create a new group, edit current group,"
  13258. PRINT" or load a file (N/E/F)"
  13259. CASE GET$ OF
  13260. WHEN "N","n" :
  13261. filenameamps$ = ""
  13262. PRINT'" from a sample of amplitudes or"
  13263. PRINT" according to attacks or by note"
  13264. PRINT" numbers (S/A/N)"
  13265. CASE GET$ OF
  13266. WHEN "S","s" : ampmethod$ = "sample" : PROCnewamps
  13267. WHEN "A","a" : ampmethod$ = "attacks" : PROCnewamps
  13268. WHEN "N","n" : ampmethod$ = "notenumber" : PROCnewamps
  13269. OTHERWISE VDU 7 : PROCseriesamplitudes
  13270. ENDCASE
  13271. WHEN "E","e" : PROCeditamps
  13272. WHEN "F","f" : PROCloadamps : PROCeditamps
  13273. OTHERWISE VDU 7 : PROCseriesamplitudes
  13274. ENDCASE
  13275. :
  13276. PRINT'" Save these settings?"
  13277. CASE GET$ OF
  13278. WHEN "Y","y" : PROCsaveamps
  13279. OTHERWISE
  13280. ENDCASE
  13281. :
  13282. PROCrunamps
  13283. :
  13284. PRINT'" Re-order amplitudes randomly?"
  13285. CASE GET$ OF
  13286. WHEN "Y","y" : PROCreorderamps
  13287. OTHERWISE
  13288. ENDCASE
  13289. :
  13290. numamplitudes% = manyattacks% : PROCinsertamplitudes
  13291. :
  13292. ELSE PROCsimpleamps
  13293. ENDIF
  13294. :
  13295. ENDPROC
  13296. :
  13297. REM***************************************
  13298. DEF PROCsimpleamps
  13299. :
  13300. IF easiermenus$ = "n" THEN PROCwindow(20,69,73,45) ELSE PROCwindow(20,69,73,42)
  13301. INPUT'" How many amplitudes "numamplitudes%
  13302. IF numamplitudes% = 0 THEN numamplitudes% = 1
  13303. :
  13304. IF numamplitudes% = 1 THEN
  13305. INPUT'" the amplitude is: "dyn$
  13306. PROCconvertdyn
  13307. amplitudes%(0) = dyn%
  13308. ELSE
  13309. PRINT'" Are all the amplitudes the same?"
  13310. CASE GET$ OF
  13311. WHEN "N","n","2" :
  13312. FOR count% = 0 TO (numamplitudes%-1)
  13313. PRINT'" amplitude ";count%+1;" is: "
  13314. IF count% > 0 THEN PRINT " (0 = previous) "
  13315. INPUT dyn$
  13316. IF dyn$ = "" THEN
  13317. dyn$ = prevdyn$
  13318. COLOUR 3 : PRINT dyn$
  13319. wait$ = INKEY$(20) : COLOUR 0
  13320. ENDIF
  13321. prevdyn$ = dyn$
  13322. PROCconvertdyn
  13323. amplitudes%(count%) = dyn%
  13324. NEXT
  13325. OTHERWISE
  13326. INPUT'" the amplitude is: "dyn$
  13327. PROCconvertdyn
  13328. FOR count% = 0 TO (numamplitudes%-1) : amplitudes%(count%) = dyn% : NEXT
  13329. ENDCASE
  13330. ENDIF
  13331. :
  13332. REM function can feed amplitudes similarly into amplitudes%()
  13333. :
  13334. ampmethod$ = "sample"
  13335. PROCinsertamplitudes
  13336. :
  13337. ENDPROC
  13338. :
  13339. *************************************************************************
  13340. :
  13341. DEF PROCnewamps
  13342. :
  13343. CASE ampmethod$ OF
  13344. WHEN "attacks" :
  13345. PRINT'" Dynamics determined by the preceding"
  13346. PRINT" attack intervals, the succeeding ones, "
  13347. PRINT" or both (P/S/B)"
  13348. CASE GET$ OF
  13349. WHEN "P","p" : prepost$ = "P"
  13350. WHEN "S","s" : prepost$ = "S"
  13351. OTHERWISE prepost$ = "B"
  13352. ENDCASE
  13353. CLS
  13354. PRINT'" How many different 'layers' of dynamics?"
  13355. PRINT'" (NB layers inputted later override earlier ones;"
  13356. PRINT" existing dynamics remain unchanged if their"
  13357. PRINT" interval is not included, or if the interval is"
  13358. PRINT" set at 0 - 0)"
  13359. INPUT dynlayers%
  13360. :
  13361. FOR count% = 1 TO dynlayers%
  13362. IF prepost$ = "P" OR prepost$ = "B" THEN
  13363. PRINT'" In layer ";count%;" the preceding interval "
  13364. PRINT " is between how many beats..."
  13365. INPUT dynlayers%(count%,0)
  13366. PRINT'" and how many beats..."
  13367. INPUT dynlayers%(count%,1)
  13368. PRINT'" and the dynamic is "
  13369. INPUT dyn$
  13370. PROCconvertdyn : dynlayers%(count%,2) = dyn%
  13371. ENDIF
  13372. :
  13373. IF prepost$ = "S" OR prepost$ = "B" THEN
  13374. PRINT'" In layer ";count%;" the succeeding interval "
  13375. PRINT " is between how many beats..."
  13376. INPUT dynlayers%(count%,3)
  13377. PRINT'" and how many beats..."
  13378. INPUT dynlayers%(count%,4)
  13379. PRINT'" and the dynamic is "
  13380. INPUT dyn$
  13381. PROCconvertdyn : dynlayers%(count%,5) = dyn%
  13382. ENDIF
  13383. NEXT
  13384. :
  13385. WHEN "notenumber" :
  13386. INPUT'" How many elements in the (recycling) pattern "dynnumbers%
  13387. FOR count% = 1 TO dynnumbers%
  13388. PRINT'" Element ";count%;" places dynamics ";count%;" and ";count%+1
  13389. PRINT" how many notes apart?"
  13390. INPUT dynnumbers%(count%)
  13391. NEXT
  13392. PRINT" and the dynamic for these notes is "
  13393. INPUT dynnumbers$
  13394. :
  13395. WHEN "sample" :
  13396. INPUT'" Total number of amplitudes "manyattacks%
  13397. INPUT " Number of amplitudes in the sample "ampsample%
  13398. FOR count% = 0 TO (ampsample%-1)
  13399. PRINT'" Element ";count%+1;" in the sample is "
  13400. INPUT dyn$
  13401. PROCconvertdyn : ampsample%(count%) = dyn%
  13402. NEXT
  13403. :
  13404. ENDCASE
  13405. :
  13406. ENDPROC
  13407. :
  13408. REM*********************************************
  13409. :
  13410. DEF PROCconvertdyn
  13411. :
  13412. CASE dyn$ OF
  13413. WHEN "0" : dyn% = 0
  13414. WHEN "ppp" : dyn% = 1
  13415. WHEN "pp" : dyn% = 2
  13416. WHEN "p" : dyn% = 3
  13417. WHEN "mp" : dyn% = 4
  13418. WHEN "mf" : dyn% = 5
  13419. WHEN "f" : dyn% = 6
  13420. WHEN "ff" : dyn% = 7
  13421. WHEN "fff" : dyn% = 8
  13422. ENDCASE
  13423. ENDPROC
  13424. :
  13425. REM*********************************************
  13426. :
  13427. DEF PROCrunamps
  13428. :
  13429. IF ampmethod$ = "attacks" OR ampmethod$ = "notenumber" THEN
  13430. INPUT'" The dynamics are to be read into which voice? "voice%
  13431. voice% -= 1
  13432. INPUT'" Starting at bar "copystartbar%
  13433. INPUT" beat "beats%
  13434. PROCalterbeats : copystartbeat% = beats%
  13435. startat% = (copystartbar%*10^3)+beats%
  13436. INPUT'" Ending at bar "copyendbar%
  13437. INPUT " beat "beats%
  13438. PROCalterbeats : copyendbeat% = beats%
  13439. :
  13440. value% = (copystartbar%*10^3)+copystartbeat%
  13441. IF value% <= array%(0,0,voice%)DIV10^3 THEN
  13442. startatcell% = 0
  13443. ELSE
  13444. PROCsearch(value%)
  13445. startatcell% = startcell%
  13446. ENDIF
  13447. value% = (copyendbar%*10^3)+copyendbeat%
  13448. IF value% >= array%(numusedcells%(voice%)-1,0,voice%)DIV10^3 THEN
  13449. endatcell% = numusedcells%(voice%) - 1
  13450. ELSE
  13451. PROCsearch(value%)
  13452. IF shunt$ = "N" THEN endatcell% = startcell% ELSE endatcell% = startcell% - 1
  13453. ENDIF
  13454. :
  13455. manyattacks% = endatcell% - startatcell% + 1
  13456. REM create 'gap' between beat-of-bar and first actual attack
  13457. carrybars% = (array%(startatcell%,0,voice%)DIV10^6)-copystartbar%
  13458. carrybeats% = ((array%(startatcell%,0,voice%)DIV10^3)MOD10^3)-copystartbeat%
  13459. attacks1%(0) = (carrybars%*960)+carrybeats%
  13460. :
  13461. FOR count% = 0 TO (manyattacks%-1)
  13462. IF count% > 0 THEN
  13463. carrybars% = (array%(startatcell%+count%,0,voice%)DIV10^6)-(array%(startatcell%+count%-1,0,voice%)DIV10^6)
  13464. carrybeats% = ((array%(startatcell%+count%,0,voice%)DIV10^3)MOD10^3)-((array%(startatcell%+count%-1,0,voice%)DIV10^3)MOD10^3)
  13465. attacks1%(count%) = attacks1%(count%-1) + ((carrybars%*960)+carrybeats%)
  13466. ENDIF
  13467. :
  13468. pitches%(count%+1) = array%(startatcell%+count%,0,voice%)MOD10^3
  13469. durations%(count%+1) = (array%(startatcell%+count%,1,voice%)DIV10)MOD10^3
  13470. amplitudes%(count%+1) = (array%(startatcell%+count%,1,voice%))MOD10
  13471. envelopes%(count%+1) = (array%(startatcell%+count%,2,voice%))DIV10^2
  13472. glissandos%(count%+1) = (array%(startatcell%+count%,1,voice%)DIV10^4)
  13473. inflections%(count%+1) = array%(startatcell%+count%,2,voice%)MOD10^2
  13474. NEXT
  13475. ENDIF
  13476. :
  13477. CASE ampmethod$ OF
  13478. WHEN "attacks" :
  13479. FOR count% = 0 TO manyattacks%-1
  13480. FOR count1% = 1 TO dynlayers%
  13481. IF count% > 0 THEN
  13482. IF prepost$ = "P" OR prepost$ = "B" THEN
  13483. 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)
  13484. ENDIF
  13485. ENDIF
  13486. IF prepost$ = "S" OR prepost$ = "B" THEN
  13487. IF attacks1%(count%+1)-attacks1%(count%)>=dynlayers%(count1%,3)ANDattacks1%(count%+1)-attacks1%(count%)<=dynlayers%(count1%,4) THEN amplitudes%(count%+1) = dynlayers%(count1%,5)
  13488. ENDIF
  13489. NEXT
  13490. NEXT
  13491. :
  13492. WHEN "notenumber" :
  13493. count% = 1 : count1% = 0
  13494. dyn$ = dynnumbers$ : PROCconvertdyn
  13495. REPEAT
  13496. count1% += 1
  13497. IF count1% > dynnumbers% THEN count1% = 1
  13498. amplitudes%(count%) = dyn%
  13499. count% += dynnumbers%(count1%)
  13500. UNTIL count% > manyattacks%
  13501. :
  13502. WHEN "sample" :
  13503. count% = 1 : count1% = 1
  13504. REPEAT
  13505. amplitudes%(count%-1) = ampsample%(count1%-1)
  13506. count% += 1 : count1% += 1
  13507. IF count1% > ampsample% THEN count1% = 1
  13508. UNTIL count% > manyattacks%
  13509. :
  13510. ENDCASE
  13511. :
  13512. ENDPROC
  13513. :
  13514. REM******************************************************
  13515. :
  13516. DEF PROCreorderamps
  13517. :
  13518. FOR count% = 0 TO manyattacks%-1
  13519. REPEAT
  13520. x% = RND(manyattacks%)
  13521. x% = x%-1
  13522. IF amplitudes%(x%) = 0 THEN thiscell$ = "done" ELSE thiscell$ = "available"
  13523. UNTIL thiscell$ = "available"
  13524. amplitudes1%(count%) = amplitudes%(x%)
  13525. amplitudes%(x%) = 0
  13526. NEXT
  13527. amplitudes%() = amplitudes1%()
  13528. :
  13529. ENDPROC
  13530. :
  13531. REM*****************************************************
  13532. :
  13533. DEF PROCeditamps
  13534. :
  13535. CASE ampmethod$ OF
  13536. WHEN "attacks" :
  13537. PRINT'" Alter whether dynamics determined by"
  13538. PRINT" preceding, succeeding intervals or both?"
  13539. PROCyesno
  13540. IF on = 1 THEN
  13541. PRINT'" Dynamics determined by the preceding"
  13542. PRINT" attack intervals, the succeeding ones, "
  13543. PRINT" or both (P/S/B)"
  13544. CASE GET$ OF
  13545. WHEN "P","p" : prepost$ = "P"
  13546. WHEN "S","s" : prepost$ = "S"
  13547. OTHERWISE prepost$ = "B"
  13548. ENDCASE
  13549. ENDIF
  13550. CLS
  13551. PRINT'" Alter number of 'layers'?"
  13552. PROCyesno
  13553. IF on = 1 THEN
  13554. PRINT'" How many different 'layers' of dynamics?"
  13555. PRINT'" (NB layers inputted later override earlier ones;"
  13556. PRINT" existing dynamics remain unchanged if their"
  13557. PRINT" interval is not included, or if the interval is"
  13558. PRINT" set at 0 - 0)"
  13559. INPUT dynlayers%
  13560. ENDIF
  13561. :
  13562. PRINT'" Alter any of the layers?"
  13563. PROCyesno
  13564. IF on = 1 THEN
  13565. FOR count% = 1 TO dynlayers%
  13566. PRINT'" Alter layer ";count%
  13567. PROCyesno
  13568. IF on = 1 THEN
  13569. IF prepost$ = "P" OR prepost$ = "B" THEN
  13570. PRINT'" In layer ";count%;" the preceding interval "
  13571. PRINT " is between how many beats..."
  13572. INPUT dynlayers%(count%,0)
  13573. PRINT'" and how many beats..."
  13574. INPUT dynlayers%(count%,1)
  13575. PRINT'" and the dynamic is "
  13576. INPUT dyn$
  13577. PROCconvertdyn : dynlayers%(count%,2) = dyn%
  13578. ENDIF
  13579. :
  13580. IF prepost$ = "S" OR prepost$ = "B" THEN
  13581. PRINT'" In layer ";count%;" the succeeding interval "
  13582. PRINT " is between how many beats..."
  13583. INPUT dynlayers%(count%,3)
  13584. PRINT'" and how many beats..."
  13585. INPUT dynlayers%(count%,4)
  13586. PRINT'" and the dynamic is "
  13587. INPUT dyn$
  13588. PROCconvertdyn : dynlayers%(count%,5) = dyn%
  13589. ENDIF
  13590. ENDIF
  13591. NEXT
  13592. ENDIF
  13593. :
  13594. WHEN "notenumber" :
  13595. PRINT'" Alter number of elements in the pattern?"
  13596. PROCyesno
  13597. IF on = 1 THEN
  13598. INPUT'" How many elements in the (recycling) pattern "dynnumbers%
  13599. ENDIF
  13600. FOR count% = 1 TO dynnumbers%
  13601. PRINT'" Alter element ";count%
  13602. PROCyesno
  13603. IF on =1 THEN
  13604. PRINT'" Element ";count%;" places dynamics ";count%;" and ";count%+1
  13605. PRINT" how many notes apart?"
  13606. INPUT dynnumbers%(count%)
  13607. ENDIF
  13608. NEXT
  13609. PRINT'" Alter the dynamic?"
  13610. PROCyesno
  13611. IF on =1 THEN
  13612. PRINT" and the dynamic for these notes is "
  13613. INPUT dynnumbers$
  13614. ENDIF
  13615. :
  13616. WHEN "sample" :
  13617. PRINT'" Alter total number of amplitudes?"
  13618. PROCyesno
  13619. IF on =1 THEN
  13620. INPUT'" Total number of amplitudes "manyattacks%
  13621. ENDIF
  13622. PRINT'" Alter number of amplitudes in the sample?"
  13623. PROCyesno
  13624. IF on =1 THEN
  13625. INPUT " Number of amplitudes in the sample "ampsample%
  13626. ENDIF
  13627. PRINT'" Alter the sample?"
  13628. PROCyesno
  13629. IF on =1 THEN
  13630. FOR count% = 0 TO ampsample%-1
  13631. PRINT'" Alter element ";count%+1
  13632. PROCyesno
  13633. IF on =1 THEN
  13634. PRINT'" Element ";count%+1;" in the sample is "
  13635. INPUT dyn$
  13636. PROCconvertdyn : ampsample%(count%) = dyn%
  13637. ENDIF
  13638. NEXT
  13639. ENDIF
  13640. :
  13641. ENDCASE
  13642. :
  13643. ENDPROC
  13644. :
  13645. REM***************************************************
  13646. :
  13647. DEF PROCsaveamps
  13648. :
  13649. :
  13650. *Dir SDFS::RISCOSpi.$.CAC.Files
  13651. firstnaming$ = "n"
  13652. CLS
  13653. IF filenameamps$ = "" THEN
  13654. INPUT'" filename "filenameamps$
  13655. firstnaming$ = "y"
  13656. ENDIF
  13657. IF firstnaming$ = "n" THEN
  13658. PRINT'" as '";filenameamps$;"'?"
  13659. CASE GET$ OF
  13660. WHEN "N","n" : INPUT'" filename "filenameamps$
  13661. OTHERWISE
  13662. ENDCASE
  13663. ENDIF
  13664. :
  13665. channel = OPENOUT filenameamps$
  13666. PRINT#channel, ampmethod$
  13667. IF ampmethod$ = "attacks" THEN
  13668. PRINT#channel, prepost$
  13669. PRINT#channel, dynlayers%
  13670. ENDIF
  13671. IF ampmethod$ = "notenumber" THEN
  13672. PRINT#channel, dynnumbers%
  13673. PRINT#channel, dynnumbers$
  13674. ENDIF
  13675. IF ampmethod$ = "sample" THEN
  13676. PRINT#channel, manyattacks%
  13677. PRINT#channel, ampsample%
  13678. ENDIF
  13679. IF ampmethod$ = "attacks" THEN
  13680. FOR a% = 0 TO 12
  13681. FOR b% = 0 TO 5
  13682. PRINT#channel, dynlayers%(a%,b%)
  13683. NEXT
  13684. NEXT
  13685. ENDIF
  13686. IF ampmethod$ = "notenumber" THEN
  13687. FOR a% = 0 TO 99
  13688. PRINT#channel, dynnumbers%(a%)
  13689. NEXT
  13690. ENDIF
  13691. IF ampmethod$ = "sample" THEN
  13692. FOR a% = 0 TO 49
  13693. PRINT#channel, ampsample%(a%)
  13694. NEXT
  13695. ENDIF
  13696. :
  13697. CLOSE#channel
  13698. *NoDir
  13699. :
  13700. ENDPROC
  13701. :
  13702. REM***********************************
  13703. :
  13704. DEF PROCloadamps
  13705. :
  13706. :
  13707. *Dir SDFS::RISCOSpi.$.CAC.Files
  13708. INPUT'" filename "filenameamps$
  13709. channel = OPENIN filenameamps$
  13710. REPEAT
  13711. INPUT#channel, ampmethod$
  13712. IF ampmethod$ = "attacks" THEN
  13713. INPUT#channel, prepost$
  13714. INPUT#channel, dynlayers%
  13715. ENDIF
  13716. IF ampmethod$ = "notenumber" THEN
  13717. INPUT#channel, dynnumbers%
  13718. INPUT#channel, dynnumbers$
  13719. ENDIF
  13720. IF ampmethod$ = "sample" THEN
  13721. INPUT#channel, manyattacks%
  13722. INPUT#channel, ampsample%
  13723. ENDIF
  13724. IF ampmethod$ = "attacks" THEN
  13725. FOR a% = 0 TO 12
  13726. FOR b% = 0 TO 5
  13727. INPUT#channel, dynlayers%(a%,b%)
  13728. NEXT
  13729. NEXT
  13730. ENDIF
  13731. IF ampmethod$ = "notenumber" THEN
  13732. FOR a% = 0 TO 99
  13733. INPUT#channel, dynnumbers%(a%)
  13734. NEXT
  13735. ENDIF
  13736. IF ampmethod$ = "sample" THEN
  13737. FOR a% = 0 TO 49
  13738. INPUT#channel, ampsample%(a%)
  13739. NEXT
  13740. ENDIF
  13741. :
  13742. UNTIL EOF#channel
  13743. CLOSE#channel
  13744. *NoDir
  13745. :
  13746. ENDPROC
  13747. :
  13748. REM*********************************
  13749. :
  13750. DEF PROCbeatnumbers
  13751. :
  13752. amount% = 10
  13753. IF beatnum_diff$ = "num" THEN
  13754. IF beatunits$ = "big" THEN
  13755. PRINT (array%(startcell%,0,voice%)DIV10^3)MOD10^3
  13756. ELSE beatnum = ((array%(startcell%,0,voice%)DIV10^3)MOD10^3)/beatfactor%
  13757. IF beatnum MOD 1 > 0 THEN
  13758. beatnum = beatnum*10
  13759. beatnum% = beatnum DIV 1
  13760. PRINT beatnum%/amount%
  13761. ELSE PRINT beatnum
  13762. ENDIF
  13763. ENDIF
  13764. ELSE
  13765. beatdiff% = ((array%(startcell%+1,0,voice%)DIV10^3)MOD10^3)-((array%(startcell%,0,voice%)DIV10^3)MOD10^3)
  13766. beatdiff%+=(((array%(startcell%+1,0,voice%)DIV10^6)-(array%(startcell%,0,voice%)DIV10^6))*960)
  13767. :
  13768. IF beatdiff% > 0 THEN
  13769. IF beatunits$ = "big" THEN
  13770. PRINT beatdiff%
  13771. ELSE
  13772. beatdiff = beatdiff%/beatfactor%
  13773. IF beatdiff MOD 1 > 0 THEN
  13774. beatdiff = beatdiff*10
  13775. beatdiff% = beatdiff DIV 1
  13776. PRINT beatdiff%/amount%
  13777. ELSE PRINT beatdiff%/beatfactor%
  13778. ENDIF
  13779. ENDIF
  13780. ENDIF
  13781. :
  13782. ENDIF
  13783. ENDPROC
  13784. :
  13785. REM****************************************************
  13786. :
  13787. DEF PROCextract
  13788. :
  13789. counter% = -1 : attacks1%() = 0 : countt% = -1 : endcell% = manyattacks%
  13790. IF extractmode$ = "random" THEN numb% = RND(higher%-lower%+1)+lower%-2
  13791. REPEAT
  13792. countt% += 1
  13793. extract$ = "n"
  13794. :
  13795. CASE extractmode$ OF
  13796. WHEN "pitchclass" :
  13797. attempts% = 0
  13798. REPEAT
  13799. attempts% += 1
  13800. :
  13801. IF extractinfo%(attempts%) = array%(startatcell%+countt%,0,voice%)MOD10^3 THEN extract$ = "y"
  13802. UNTIL extract$ = "y" OR attempts% = npitches%
  13803. WHEN "band" :
  13804. attempts% = 0 : top$ = "n" : bottom$ = "n"
  13805. theoctave% = array%(startatcell%+countt%,0,voice%)MOD10
  13806. thepitch% = (array%(startatcell%+countt%,0,voice%)DIV10^2)MOD10
  13807. theaccid% = (array%(startatcell%+countt%,0,voice%)DIV10)MOD10
  13808. REPEAT
  13809. attempts% += 1
  13810. testoctave% = extractinfo%(attempts%)MOD10
  13811. testpitch% = extractinfo%(attempts%)DIV10^2
  13812. testaccid% = (extractinfo%(attempts%)DIV10)MOD10
  13813. IF ((attempts%/2)*10)MOD10 > 0 THEN
  13814. IF theoctave% >= testoctave% THEN bottom$ = "y" ELSE bottom$ = "n"
  13815. IF bottom$ = "y" AND theoctave% = testoctave% THEN
  13816. IF thepitch% >= testpitch% THEN bottom$ = "y" ELSE bottom$ = "n"
  13817. ENDIF
  13818. IF bottom$ = "y" AND theoctave% = testoctave% AND thepitch% = testpitch% THEN
  13819. IF theaccid% >= testaccid% THEN bottom$ = "y" ELSE bottom$ = "n"
  13820. ENDIF
  13821. ELSE
  13822. IF theoctave% <= testoctave% THEN top$ = "y" ELSE top$ = "n"
  13823. IF top$ = "y" AND theoctave% = testoctave% THEN
  13824. IF thepitch% <= testpitch% THEN top$ = "y" ELSE top$ = "n"
  13825. ENDIF
  13826. IF top$ = "y" AND theoctave% = testoctave% AND thepitch% = testpitch% THEN
  13827. IF theaccid% <= testaccid% THEN top$ = "y" ELSE top$ = "n"
  13828. ENDIF
  13829. ENDIF
  13830. IF bottom$ = "y" AND top$ = "y" THEN extract$ = "y"
  13831. UNTIL extract$ = "y" OR attempts% = npitches%
  13832. WHEN "random" :
  13833. extract$ = "n"
  13834. IF numb% = countt% THEN
  13835. extract$ = "y"
  13836. max% = higher%-lower%+1 : a% = RND(max%) : b% = lower% -1 : c% = countt%
  13837. IF a% = 0 THEN a% = 1
  13838. numb% = a% + b% + c%
  13839. IF copymove$ = "EM" THEN numb% -= 1
  13840. ENDIF
  13841. WHEN "attackinterval" :
  13842. bar1% = array%(startatcell%+countt%,0,voice%)DIV10^6
  13843. beat1% = (array%(startatcell%+countt%,0,voice%)DIV10^3)MOD10^3
  13844. beat1% = (bar1%*960)+beat1%
  13845. bar2% = array%(startatcell%+countt%+1,0,voice%)DIV10^6
  13846. beat2% = (array%(startatcell%+countt%+1,0,voice%)DIV10^3)MOD10^3
  13847. beat2% = (bar2%*960)+beat2%
  13848. interval% = beat2% - beat1%
  13849. IF interval% >= lower% AND interval% <= higher% THEN extract$ = "y"
  13850. ENDCASE
  13851. :
  13852. IF extract$ = "y" THEN
  13853. counter% += 1
  13854. attacks2%(counter%) = (array%(startatcell%+countt%,0,voice%))DIV10^3
  13855. pitches%(counter%) = array%(startatcell%+countt%,0,voice%)MOD10^3
  13856. durations%(counter%) = (array%(startatcell%+countt%,1,voice%)DIV10)MOD10^3
  13857. amplitudes%(counter%) = (array%(startatcell%+countt%,1,voice%))MOD10
  13858. envelopes%(counter%) = (array%(startatcell%+countt%,2,voice%))DIV10^2
  13859. glissandos%(counter%) = (array%(startatcell%+countt%,1,voice%)DIV10^4)
  13860. inflections%(counter%) = array%(startatcell%+countt%,2,voice%)MOD10^2
  13861. IF copymove$ = "EM" THEN
  13862. REM routine to delete each note as it is extracted, if move-extract wanted
  13863. numnotes% = 1
  13864. bar% = array%(startatcell%+countt%,0,voice%) DIV10^6
  13865. beats% = (array%(startatcell%+countt%,0,voice%)DIV10^3)MOD10^3
  13866. PROCalterbeats
  13867. start% = (bar%*(10^3))+beats%
  13868. PROCsearch(start%)
  13869. PROCshuntleft(startcell%,numnotes%)
  13870. countt% -= 1 : endcell% -= 1
  13871. REM prev line is because of deletion, ie array cells have all now shifted one to left!
  13872. ENDIF
  13873. REM end of delete routine
  13874. :
  13875. ENDIF
  13876. UNTIL countt% = endcell% - 1
  13877. manyattacks% = counter%+1
  13878. attacks1%(0) = (((attacks2%(0)DIV10^3)*960)+(attacks2%(0)MOD10^3)-960)-((copystartbar%*960)+copystartbeat%-960)
  13879. FOR count% = 1 TO manyattacks% - 1
  13880. bars% = (attacks2%(count%)DIV10^3)-(attacks2%(count%-1)DIV10^3)
  13881. beats% = (attacks2%(count%)MOD10^3)-(attacks2%(count%-1)MOD10^3)
  13882. attacks1%(count%) = attacks1%(count%-1) + (bars%*960) + beats%
  13883. NEXT
  13884. :
  13885. :
  13886. ENDPROC
  13887. :
  13888. REM********************************************************
  13889. :
  13890. DEF PROCextractinfo
  13891. :
  13892. IF quickextract$ = "n" THEN
  13893. :
  13894. CLS
  13895. aslasttime$ = "n"
  13896. PRINT'" Extract by pitches, pitch-band,"
  13897. PRINT'" attack interval, random number"
  13898. PRINT'" or as last time (P/B/A/R/L) "
  13899. CASE GET$ OF
  13900. WHEN "P","p","0" :
  13901. CLS
  13902. extractmode$ = "pitchclass"
  13903. WHEN "B","b" :
  13904. CLS : extractmode$ = "band"
  13905. WHEN "R","r" :
  13906. CLS : extractmode$ = "random"
  13907. PRINT'" Random extractions follow "
  13908. PRINT'" each other at a distance "
  13909. INPUT '" of between how many notes "lower%
  13910. INPUT '" and how many notes "higher%
  13911. WHEN "A","a" :
  13912. CLS : extractmode$ = "attackinterval"
  13913. PRINT'" Extract notes which precede"
  13914. PRINT'" next note by between"
  13915. INPUT'" how many beats "lower%
  13916. INPUT'" and how many beats "higher%
  13917. WHEN "L","l" :
  13918. aslasttime$ = "y"
  13919. OTHERWISE CLS : extractmode$ = "pitchclass"
  13920. ENDCASE
  13921. :
  13922. ENDIF
  13923. :
  13924. IF aslasttime$ = "n" THEN
  13925. :
  13926. IF extractmode$ = "pitchclass" OR extractmode$ = "band" THEN
  13927. :
  13928. IF quickextract$ = "n" THEN
  13929. IF extractmode$ = "pitchclass" THEN
  13930. INPUT'" How many pitch-classes? "npitches%
  13931. IF npitches% = 0 THEN npitches% = 1
  13932. ELSE
  13933. INPUT'" How many bands "nbands%
  13934. IF nbands% = 0 THEN nbands% = 1
  13935. ENDIF
  13936. ENDIF
  13937. :
  13938. IF extractmode$ = "band" THEN npitches% = nbands%*2
  13939. FOR p% = 1 TO npitches%
  13940. IF extractmode$ = "pitchclass" THEN
  13941. PRINT' " Pitch-class ";p%;" has the note name ";
  13942. ELSE PRINT'" Going up, band-point ";p%;" is note ";
  13943. ENDIF
  13944. COLOUR 3
  13945. CASE GET$ OF
  13946. WHEN "C","c" : note% = 0 : PRINT "C" : finished$ = "n"
  13947. WHEN "D","d" : note% = 1 : PRINT "D" : finished$ = "n"
  13948. WHEN "E","e" : note% = 2 : PRINT "E" : finished$ = "n"
  13949. WHEN "F","f" : note% = 3 : PRINT "F" : finished$ = "n"
  13950. WHEN "G","g" : note% = 4 : PRINT "G" : finished$ = "n"
  13951. WHEN "A","a" : note% = 5 : PRINT "A" : finished$ = "n"
  13952. WHEN "B","b" : note% = 6 : PRINT "B" : finished$ = "n"
  13953. WHEN "1" : note% = 0 : accid% = 5 : octave% = 4 : finished$ = "y"
  13954. WHEN "2" : note% = 0 : accid% = 9 : octave% = 4 : finished$ = "y"
  13955. WHEN "3" : note% = 1 : accid% = 5 : octave% = 4 : finished$ = "y"
  13956. WHEN "4" : note% = 2 : accid% = 1 : octave% = 4 : finished$ = "y"
  13957. WHEN "5" : note% = 2 : accid% = 5 : octave% = 4 : finished$ = "y"
  13958. WHEN "6" : note% = 3 : accid% = 5 : octave% = 4 : finished$ = "y"
  13959. WHEN "7" : note% = 3 : accid% = 9 : octave% = 4 : finished$ = "y"
  13960. WHEN "8" : note% = 4 : accid% = 5 : octave% = 4 : finished$ = "y"
  13961. WHEN "9" : note% = 5 : accid% = 1 : octave% = 4 : finished$ = "y"
  13962. ENDCASE
  13963. COLOUR 0
  13964. :
  13965. IF finished$ = "n" THEN
  13966. :
  13967. PRINT " accidental ";
  13968. COLOUR 3
  13969. CASE GET$ OF
  13970. WHEN "1" : accid% = 1 : PRINT "flat"
  13971. WHEN "2" : accid% = 2 : PRINT "3/8flat"
  13972. WHEN "3" : accid% = 3 : PRINT "1/4flat"
  13973. WHEN "4" : accid% = 4 : PRINT "1/8flat"
  13974. WHEN "5" : accid% = 5 : PRINT "nat"
  13975. WHEN "6" : accid% = 6 : PRINT "1/8shrp"
  13976. WHEN "7" : accid% = 7 : PRINT "1/4shrp"
  13977. WHEN "8" : accid% = 8 : PRINT "3/8shrp"
  13978. WHEN "9" : accid% = 9 : PRINT "shrp"
  13979. ENDCASE
  13980. COLOUR 0
  13981. PRINT " octave ";
  13982. COLOUR 3
  13983. CASE GET$ OF
  13984. WHEN "0" : octave% = 0 : PRINT "0"
  13985. WHEN "1" : octave% = 1 : PRINT "1"
  13986. WHEN "2" : octave% = 2 : PRINT "2"
  13987. WHEN "3" : octave% = 3 : PRINT "3"
  13988. WHEN "4" : octave% = 4 : PRINT "4"
  13989. WHEN "5" : octave% = 5 : PRINT "5"
  13990. WHEN "6" : octave% = 6 : PRINT "6"
  13991. WHEN "7" : octave% = 7 : PRINT "7"
  13992. WHEN "8" : octave% = 8 : PRINT "8"
  13993. ENDCASE
  13994. COLOUR 0
  13995. :
  13996. ENDIF
  13997. :
  13998. extractinfo%(p%) = (note%*100)+(accid%*10)+octave%
  13999. NEXT
  14000. :
  14001. ENDIF
  14002. :
  14003. ENDIF
  14004. :
  14005. IF extractmode$ = "random" AND quickextract$ = "y" THEN
  14006. PRINT '" Random extractions follow "
  14007. PRINT ' " each other at a distance "
  14008. INPUT '" of between how many notes "lower%
  14009. INPUT '" and how many notes "higher%
  14010. ENDIF
  14011. ENDPROC
  14012. :
  14013. REM*************************************************
  14014. :
  14015. DEF PROCequalizedurats
  14016. :
  14017. CLS
  14018. PRINT'" There are ";manyattacks%-1;" durations "
  14019. PRINT'" How many do you want to equalise? "
  14020. PRINT " (0 = ";manyattacks%-1;")"
  14021. INPUTnumdurats%
  14022. IF numdurats% = 0 THEN numdurats% = manyattacks%-1
  14023. INPUT'" Starting at duration number "startattack%
  14024. IF startattack% = 0 THEN startattack% = 1
  14025. IF (manyattacks%-startattack%)<numdurats% THEN startattack% = manyattacks%-numdurats%
  14026. totaldurats% = 0
  14027. FOR count% = startattack% TO (startattack%+numdurats%-1)
  14028. totaldurats%+=(attacks1%(count%)-attacks1%(count%-1))
  14029. NEXT
  14030. average = totaldurats%/numdurats%
  14031. residue% = average * 10
  14032. residue% = residue%MOD10
  14033. IF residue%>=5 THEN average% = ((average)DIV1)+1 ELSE average% = (average)DIV1
  14034. FOR count% = startattack% TO (startattack%+numdurats%-1)
  14035. attacks1%(count%) = attacks1%(count%-1)+average%
  14036. NEXT
  14037. adjust% = totaldurats% - (average%*numdurats%)
  14038. attacks1%(count%-1) += adjust%
  14039. equalized$ = "y" : seeequalizey$ = "n"
  14040. PROCinsertattacks
  14041. ENDPROC
  14042. :
  14043. REM************************************************
  14044. :
  14045. DEF PROCsavevoice
  14046. :
  14047. *Dir SDFS::RISCOSpi.$.CAC.Files
  14048. INPUT'" filename "filenamevoice$
  14049. channel = OPENOUT filenamevoice$
  14050. PRINT#channel, manyattacks%
  14051. FOR a% = 0 TO manyattacks%-1
  14052. PRINT#channel, attacks1%(a%)
  14053. NEXT
  14054. FOR a% = 0 TO manyattacks%-1
  14055. PRINT#channel, pitches%(a%)
  14056. NEXT
  14057. FOR a% = 0 TO manyattacks%-1
  14058. PRINT#channel, durations%(a%)
  14059. NEXT
  14060. FOR a% = 0 TO manyattacks%-1
  14061. PRINT#channel, amplitudes%(a%)
  14062. NEXT
  14063. FOR a% = 0 TO manyattacks%-1
  14064. PRINT#channel, envelopes%(a%)
  14065. NEXT
  14066. FOR a% = 0 TO manyattacks%-1
  14067. PRINT#channel, glissandos%(a%)
  14068. NEXT
  14069. FOR a% = 0 TO manyattacks%-1
  14070. PRINT#channel, inflections%(a%)
  14071. NEXT
  14072. CLOSE#channel
  14073. *NoDir
  14074. savevoice$ = "N" : PROCdisplay
  14075. ENDPROC
  14076. :
  14077. REM**********************************
  14078. :
  14079. DEF PROCimportvoice
  14080. :
  14081. *Dir SDFS::RISCOSpi.$.CAC.Files
  14082. INPUT'" filename "filenamevoice$
  14083. channel = OPENIN filenamevoice$
  14084. REPEAT
  14085. INPUT#channel, manyattacks%
  14086. FOR a% = 0 TO manyattacks%-1
  14087. INPUT#channel, attacks1%(a%)
  14088. NEXT
  14089. FOR a% = 0 TO manyattacks%-1
  14090. INPUT#channel, pitches%(a%)
  14091. NEXT
  14092. FOR a% = 0 TO manyattacks%-1
  14093. INPUT#channel, durations%(a%)
  14094. NEXT
  14095. FOR a% = 0 TO manyattacks%-1
  14096. INPUT#channel, amplitudes%(a%)
  14097. NEXT
  14098. FOR a% = 0 TO manyattacks%-1
  14099. INPUT#channel, envelopes%(a%)
  14100. NEXT
  14101. FOR a% = 0 TO manyattacks%-1
  14102. INPUT#channel, glissandos%(a%)
  14103. NEXT
  14104. FOR a% = 0 TO manyattacks%-1
  14105. INPUT#channel, inflections%(a%)
  14106. NEXT
  14107. UNTIL EOF#channel
  14108. CLOSE#channel
  14109. *NoDir
  14110. method$ = "raw" : copyit$ = "ON" : PROCinsertattacks
  14111. ENDPROC
  14112. :
  14113. REM***********************************
  14114. :
  14115. DEF PROCpreintervalstring
  14116. :
  14117. PROCwindow(20,69,80,22)
  14118. PRINT'" Re-run current interval string,"
  14119. PRINT" create a new string, edit the"
  14120. PRINT " current one, or load a file (R/N/E/F)"
  14121. CASE GET$ OF
  14122. WHEN "R","r" : PROCintervalstring
  14123. WHEN "E","e" : loadstring$ = "n" :PROCeditintervalstring
  14124. WHEN "F","f" : loadstring$ = "y" :PROCeditintervalstring
  14125. OTHERWISE
  14126. ENDCASE
  14127. :
  14128. filenamestg$ = ""
  14129. numbannedpitches% = 0 : numbannedints% = 0 : bannedpitches%() = 0
  14130. :
  14131. INPUT'" How many pitches "numpitches%
  14132. INPUT'" The tessitura is how many semitones wide "tess%
  14133. PRINT'" The bottom pitch of the tessitura is ";
  14134. COLOUR 3
  14135. CASE GET$ OF
  14136. WHEN "C","c" : note% = 1 : PRINT "C" : pitch$ = "C"
  14137. WHEN "D","d" : note% = 3 : PRINT "D" : pitch$ = "D"
  14138. WHEN "E","e" : note% = 5 : PRINT "E" : pitch$ = "E"
  14139. WHEN "F","f" : note% = 6 : PRINT "F" : pitch$ = "F"
  14140. WHEN "G","g" : note% = 8 : PRINT "G" : pitch$ = "G"
  14141. WHEN "A","a" : note% = 10 : PRINT "A" : pitch$ = "A"
  14142. WHEN "B","b" : note% = 12 : PRINT "B" : pitch$ = "B"
  14143. ENDCASE
  14144. COLOUR 0
  14145. PRINT " Accidental ";
  14146. COLOUR 3
  14147. CASE GET$ OF
  14148. WHEN "1" : note% -= 1 : PRINT "flat" : accid$ = "flat"
  14149. WHEN "5" : PRINT "nat" : accid$ = "nat"
  14150. WHEN "9" : note% += 1 : PRINT "shrp" : accid$ = "shrp"
  14151. OTHERWISE VDU 7
  14152. ENDCASE
  14153. COLOUR 0
  14154. PRINT " Octave ";
  14155. COLOUR 3
  14156. octave% = EVAL(GET$) : saveoctave% = octave%
  14157. PRINT octave%
  14158. COLOUR 0
  14159. transposer% = note% + (12*(octave%-1)) - 1
  14160. PRINT'" Are any pitches to be banned? "
  14161. CASE GET$ OF
  14162. WHEN "Y","y" :
  14163. REPEAT
  14164. numbannedpitches% += 1
  14165. PRINT '" Pitch ";numbannedpitches%;" is, going up,"
  14166. PRINT " semitone number what, starting at 0?"
  14167. INPUT " (type F to finish) "bannedpitch$
  14168. IF bannedpitch$ <> "F" AND bannedpitch$ <> "f" THEN bannedpitches%(numbannedpitches%) = EVAL(bannedpitch$) + 1
  14169. UNTIL bannedpitch$ = "F" OR bannedpitch$ = "f"
  14170. numbannedpitches% -= 1
  14171. OTHERWISE
  14172. ENDCASE
  14173. :
  14174. PRINT'" Are any intervals to be banned?"
  14175. CASE GET$ OF
  14176. WHEN "Y","y" :
  14177. REPEAT
  14178. numbannedints% += 1
  14179. PRINT''" Interval ";numbannedints%;" is how many semitones?"
  14180. PRINT" (NB intervals between 12 & 23 are "
  14181. PRINT" applied at all compounds - "
  14182. INPUT" type F to finish) "int$
  14183. IF int$ <> "F" AND int$ <> "f" THEN
  14184. PRINT'" And is banned at between a"
  14185. INPUT" minimum of how many notes from the last one "range%
  14186. INPUT" And a maximum of how many "range1%
  14187. bannedints%(numbannedints%,0) = EVAL(int$)
  14188. bannedints%(numbannedints%,1) = range%
  14189. bannedints%(numbannedints%,2) = range1%
  14190. ENDIF
  14191. UNTIL int$ = "F" OR int$ = "f"
  14192. numbannedints% -= 1
  14193. OTHERWISE
  14194. ENDCASE
  14195. :
  14196. stringattempts% = 0 : PROCintervalstring
  14197. :
  14198. ENDPROC
  14199. :
  14200. REM********************************************************
  14201. :
  14202. DEF PROCintervalstring
  14203. :
  14204. notenumber% = 0 : stringattempts% += 1
  14205. :
  14206. REPEAT
  14207. notenumber% += 1 : triednotes%() = 0
  14208. :
  14209. REPEAT
  14210. note% = RND(tess%+1) : triednotes%(note%) = 1
  14211. count% = 0
  14212. test$ = "pass"
  14213. IF numbannedpitches% > 0 THEN
  14214. REPEAT
  14215. count% += 1
  14216. IF note% = bannedpitches%(count%) THEN test$ = "fail"
  14217. UNTIL test$ = "fail" OR count% = numbannedpitches%
  14218. ENDIF
  14219. :
  14220. IF notenumber% > 1 AND numbannedints% > 0 AND test$ = "pass" THEN
  14221. count% = 0
  14222. REPEAT
  14223. count% += 1 : count1% = 0
  14224. REPEAT
  14225. count1% += 1
  14226. testnotenumber% = bannedints%(count%,1)+count1%-1
  14227. testnotenumber% = notenumber%-testnotenumber%
  14228. IF testnotenumber% > 0 THEN
  14229. IF note% >= amplitudes%(testnotenumber%) THEN
  14230. interval% = note%-amplitudes%(testnotenumber%)
  14231. ELSE interval% = amplitudes%(testnotenumber%)-note%
  14232. ENDIF
  14233. :
  14234. REPEAT
  14235. IF interval% > 23 THEN interval% -= 12
  14236. UNTIL interval% < 24
  14237. IF interval% = bannedints%(count%,0) THEN test$ = "fail"
  14238. :
  14239. ENDIF
  14240. UNTIL count1% > (bannedints%(count%,2)-bannedints%(count%,1)) OR test$ = "fail"
  14241. UNTIL count% = numbannedints% OR test$ = "fail"
  14242. ENDIF
  14243. :
  14244. REM check to see if all notes tried
  14245. check$ = "alltried"
  14246. FOR checker% = 1 TO tess%+1
  14247. IF triednotes%(checker%) = 0 THEN check$ = "notalltried"
  14248. NEXT
  14249. UNTIL test$ = "pass" OR check$ = "alltried"
  14250. :
  14251. amplitudes%(notenumber%) = note%
  14252. :
  14253. IF check$ = "alltried" AND test$ = "fail" THEN whattodo$ = "abort" ELSE whattodo$ = "continue"
  14254. UNTIL notenumber% = numpitches% OR whattodo$ = "abort"
  14255. :
  14256. IF whattodo$ = "abort" THEN
  14257. CLS : PRINT''" Attempts from fresh start - ";stringattempts%
  14258. PROCintervalstring
  14259. ELSE
  14260. FOR count% = 1 TO numpitches%
  14261. amplitudes%(count%) += transposer%
  14262. REM which octave
  14263. count1% = 0
  14264. REPEAT
  14265. count1% += 1
  14266. UNTIL (count1%*12) >= amplitudes%(count%)
  14267. octave% = count1%
  14268. REM which pitch and accid
  14269. amplitudes%(count%) -= (12*(octave%-1))
  14270. CASE amplitudes%(count%) OF
  14271. WHEN 1 : pitches%(count%-1) = 50 + octave%
  14272. WHEN 2 : pitches%(count%-1) = 90 + octave%
  14273. WHEN 3 : pitches%(count%-1) = 150 + octave%
  14274. WHEN 4 : pitches%(count%-1) = 210 + octave%
  14275. WHEN 5 : pitches%(count%-1) = 250 + octave%
  14276. WHEN 6 : pitches%(count%-1) = 350 + octave%
  14277. WHEN 7 : pitches%(count%-1) = 390 + octave%
  14278. WHEN 8 : pitches%(count%-1) = 450 + octave%
  14279. WHEN 9 : pitches%(count%-1) = 490 + octave%
  14280. WHEN 10 : pitches%(count%-1) = 550 + octave%
  14281. WHEN 11 : pitches%(count%-1) = 610 + octave%
  14282. WHEN 12 : pitches%(count%-1) = 650 + octave%
  14283. ENDCASE
  14284. NEXT
  14285. PRINT'" Do you want to save this interval string?"
  14286. CASE GET$ OF
  14287. WHEN "Y","y" : PROCsaveintervalstring
  14288. OTHERWISE
  14289. ENDCASE
  14290. PROCinsertpitches
  14291. ENDIF
  14292. :
  14293. ENDPROC
  14294. :
  14295. REM**********************************************
  14296. :
  14297. DEF PROCsaveintervalstring
  14298. :
  14299. *Dir SDFS::RISCOSpi.$.CAC.Files
  14300. firstnaming$ = "n"
  14301. CLS
  14302. IF filenamestg$ = "" THEN
  14303. INPUT'" filename "filenamestg$
  14304. firstnaming$ = "y"
  14305. ENDIF
  14306. IF firstnaming$ = "n" THEN
  14307. PRINT'" as '";filenamestg$;"'?"
  14308. CASE GET$ OF
  14309. WHEN "N","n" : INPUT'" filename "filenamestg$
  14310. OTHERWISE
  14311. ENDCASE
  14312. ENDIF
  14313. :
  14314. channel = OPENOUT filenamestg$
  14315. PRINT#channel, numpitches%
  14316. PRINT#channel, tess%
  14317. PRINT#channel, numbannedpitches%
  14318. PRINT#channel, numbannedints%
  14319. PRINT#channel, transposer%
  14320. PRINT#channel, pitch$
  14321. PRINT#channel, accid$
  14322. PRINT#channel, saveoctave%
  14323. FOR a% = 1 TO numbannedpitches%
  14324. PRINT#channel, bannedpitches%(a%)
  14325. NEXT
  14326. FOR a% = 1 TO numbannedints%
  14327. FOR b% = 0 TO 2
  14328. PRINT#channel, bannedints%(a%,b%)
  14329. NEXT
  14330. NEXT
  14331. :
  14332. CLOSE#channel
  14333. *NoDir
  14334. :
  14335. ENDPROC
  14336. :
  14337. REM******************************************
  14338. :
  14339. DEF PROCloadintervalstring
  14340. :
  14341. *Dir SDFS::RISCOSpi.$.CAC.Files
  14342. INPUT'" filename "filenamestg$
  14343. channel = OPENIN filenamestg$
  14344. REPEAT
  14345. INPUT#channel, numpitches%
  14346. INPUT#channel, tess%
  14347. INPUT#channel, numbannedpitches%
  14348. INPUT#channel, numbannedints%
  14349. INPUT#channel, transposer%
  14350. INPUT#channel, pitch$
  14351. INPUT#channel, accid$
  14352. INPUT#channel, saveoctave%
  14353. FOR a% = 1 TO numbannedpitches%
  14354. INPUT#channel, bannedpitches%(a%)
  14355. NEXT
  14356. FOR a% = 1 TO numbannedints%
  14357. FOR b% = 0 TO 2
  14358. INPUT#channel, bannedints%(a%,b%)
  14359. NEXT
  14360. NEXT
  14361. UNTIL EOF#channel
  14362. CLOSE#channel
  14363. *NoDir
  14364. :
  14365. ENDPROC
  14366. :
  14367. REM**************************************
  14368. :
  14369. DEF PROCeditintervalstring
  14370. :
  14371. IF loadstring$ = "y" THEN PROCloadintervalstring
  14372. :
  14373. CLS
  14374. PRINT'" Alter the number of pitches?"
  14375. PRINT" (currently ";numpitches%;")"
  14376. CASE GET$ OF
  14377. WHEN "Y","y" :
  14378. INPUT'" How many pitches "numpitches%
  14379. ENDCASE
  14380. CLS
  14381. PRINT'" Alter tessitura and/or location?"
  14382. PRINT" (currently ";tess%;" semitones wide"
  14383. PRINT" with a bottom note of ";pitch$;accid$;saveoctave%;")"
  14384. CASE GET$ OF
  14385. WHEN "Y","y" :
  14386. INPUT'" The tessitura is how many semitones wide "tess%
  14387. PRINT'" The bottom pitch of the tessitura is ";
  14388. COLOUR 3
  14389. CASE GET$ OF
  14390. WHEN "C","c" : note% = 1 : PRINT "C" : pitch$ = "C"
  14391. WHEN "D","d" : note% = 3 : PRINT "D" : pitch$ = "D"
  14392. WHEN "E","e" : note% = 5 : PRINT "E" : pitch$ = "E"
  14393. WHEN "F","f" : note% = 6 : PRINT "F" : pitch$ = "F"
  14394. WHEN "G","g" : note% = 8 : PRINT "G" : pitch$ = "G"
  14395. WHEN "A","a" : note% = 10 : PRINT "A" : pitch$ = "A"
  14396. WHEN "B","b" : note% = 12 : PRINT "B" : pitch$ = "B"
  14397. ENDCASE
  14398. COLOUR 0
  14399. PRINT " Accidental ";
  14400. COLOUR 3
  14401. CASE GET$ OF
  14402. WHEN "1" : note% -= 1 : PRINT "flat" : accid$ = "flat"
  14403. WHEN "5" : PRINT "nat" : accid$ = "nat"
  14404. WHEN "9" : note% += 1 : PRINT "shrp" : accid$ = "shrp"
  14405. OTHERWISE VDU 7
  14406. ENDCASE
  14407. COLOUR 0
  14408. PRINT " Octave ";
  14409. COLOUR 3
  14410. octave% = EVAL(GET$) : saveoctave% = octave%
  14411. PRINT octave%
  14412. COLOUR 0
  14413. transposer% = note% + (12*(octave%-1)) - 1
  14414. OTHERWISE
  14415. ENDCASE
  14416. :
  14417. PRINT'" Alter the banning of pitches? "
  14418. IF numbannedpitches% = 0 THEN
  14419. PRINT" No pitches are currently banned "
  14420. ELSE
  14421. PRINT" Currently banned pitches are,"
  14422. PRINT" going up, starting at 0 -"
  14423. PRINT" "
  14424. VDU 14
  14425. FOR count% = 1 TO numbannedpitches%
  14426. PRINT " ";count%;". semitone ";bannedpitches%(count%)-1
  14427. NEXT
  14428. VDU 15
  14429. ENDIF
  14430. CASE GET$ OF
  14431. WHEN "Y","y" :
  14432. INPUT'" The number of banned pitches is now to be "numbannedpitches%
  14433. FOR count% = 1 TO numbannedpitches%
  14434. PRINT'" Alter banned pitch ";count%
  14435. CASE GET$ OF
  14436. WHEN "Y","y" :
  14437. PRINT '" Pitch ";count%;" is, going up,"
  14438. INPUT " semitone number what, starting at 0?"semitone%
  14439. bannedpitches%(count%) = semitone%+1
  14440. ENDCASE
  14441. NEXT
  14442. ENDCASE
  14443. CLS : VDU 14
  14444. PRINT'" Alter the banning of intervals?"
  14445. IF numbannedints% = 0 THEN
  14446. PRINT" No intervals are currently banned "
  14447. ELSE
  14448. VDU 28,20,43,70,15
  14449. PRINT" Currently banned intervals are -"
  14450. PRINT" "
  14451. FOR count% = 1 TO numbannedints%
  14452. IF bannedints%(count%,1) > 0 THEN COLOUR 131 ELSE COLOUR 191
  14453. 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"
  14454. 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"
  14455. 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"
  14456. NEXT
  14457. COLOUR 191
  14458. VDU 15
  14459. ENDIF
  14460. CASE GET$ OF
  14461. WHEN "Y","y" :
  14462. VDU 28,20,65,70,45
  14463. PRINT'" Alter the number of banned intervals?"
  14464. CASE GET$ OF
  14465. WHEN "Y","y" :
  14466. INPUT'" The number of banned intervals is now to be "numbannedints%
  14467. ENDCASE
  14468. FOR count% = 1 TO numbannedints%
  14469. PRINT'" Alter interval ";count%
  14470. CASE GET$ OF
  14471. WHEN "Y","y" :
  14472. PRINT'" Interval ";count%;" is how many semitones?"
  14473. PRINT" (NB intervals between 12 & 23 are "
  14474. INPUT" applied at all compounds) "bannedints%(count%,0)
  14475. PRINT'" And is banned at between a minimum"
  14476. INPUT" of how many notes from the last one "range%
  14477. INPUT" And a maximum of how many "range1%
  14478. bannedints%(count%,1) = range%
  14479. bannedints%(count%,2) = range1%
  14480. OTHERWISE
  14481. ENDCASE
  14482. NEXT
  14483. ENDCASE
  14484. :
  14485. stringattempts% = 0 : PROCintervalstring
  14486. :
  14487. ENDPROC
  14488. :
  14489. REM********************************************************
  14490. :
  14491. DEF PROCconvertpitch
  14492. :
  14493. CASE (pitch%DIV10^2) OF
  14494. WHEN 0 : note% = 1
  14495. WHEN 1 : note% = 3
  14496. WHEN 2 : note% = 5
  14497. WHEN 3 : note% = 6
  14498. WHEN 4 : note% = 8
  14499. WHEN 5 : note% = 10
  14500. WHEN 6 : note% = 12
  14501. ENDCASE
  14502. :
  14503. CASE ((pitch%DIV10)MOD10) OF
  14504. WHEN 1 : note% -= 1
  14505. WHEN 9 : note% += 1
  14506. OTHERWISE
  14507. ENDCASE
  14508. :
  14509. octave% = pitch%MOD10
  14510. note% = note% + (12*(octave%-1))
  14511. chunk% = 12 : compoundint% = compoundpitch%
  14512. ENDPROC
  14513. :
  14514. REM****************************************************
  14515. :
  14516. DEF PROCconvertquarter
  14517. :
  14518. CASE (pitch%DIV10^2) OF
  14519. WHEN 0 : note% = 2
  14520. WHEN 1 : note% = 6
  14521. WHEN 2 : note% = 10
  14522. WHEN 3 : note% = 12
  14523. WHEN 4 : note% = 16
  14524. WHEN 5 : note% = 20
  14525. WHEN 6 : note% = 24
  14526. ENDCASE
  14527. :
  14528. CASE ((pitch%DIV10)MOD10) OF
  14529. WHEN 1 : note% -= 2
  14530. WHEN 3 : note% -= 1
  14531. WHEN 7 : note% += 1
  14532. WHEN 9 : note% += 2
  14533. OTHERWISE
  14534. ENDCASE
  14535. :
  14536. octave% = pitch%MOD10
  14537. note% = note% + (24*(octave%-1))
  14538. chunk% = 24 : compoundint% = compoundquarter%
  14539. ENDPROC
  14540. ENDPROC
  14541. :
  14542. REM****************************************************
  14543. :
  14544. DEF PROCconverteighth
  14545. :
  14546. CASE (pitch%DIV10^2) OF
  14547. WHEN 0 : note% = 4
  14548. WHEN 1 : note% = 12
  14549. WHEN 2 : note% = 20
  14550. WHEN 3 : note% = 24
  14551. WHEN 4 : note% = 32
  14552. WHEN 5 : note% = 40
  14553. WHEN 6 : note% = 48
  14554. ENDCASE
  14555. :
  14556. CASE ((pitch%DIV10)MOD10) OF
  14557. WHEN 1 : note% -= 4
  14558. WHEN 2 : note% -= 3
  14559. WHEN 3 : note% -= 2
  14560. WHEN 4 : note% -= 1
  14561. WHEN 6 : note% += 1
  14562. WHEN 7 : note% += 2
  14563. WHEN 8 : note% += 3
  14564. WHEN 9 : note% += 4
  14565. OTHERWISE
  14566. ENDCASE
  14567. :
  14568. octave% = pitch%MOD10
  14569. note% = note% + (48*(octave%-1))
  14570. chunk% = 48 : compoundint% = compoundeighth%
  14571. ENDPROC
  14572. :
  14573. REM****************************************************
  14574. :
  14575. DEF PROCconvertcent
  14576. :
  14577. CASE (pitch%DIV10^2) OF
  14578. WHEN 0 : note% = 100
  14579. WHEN 1 : note% = 300
  14580. WHEN 2 : note% = 500
  14581. WHEN 3 : note% = 600
  14582. WHEN 4 : note% = 800
  14583. WHEN 5 : note% = 1000
  14584. WHEN 6 : note% = 1200
  14585. ENDCASE
  14586. :
  14587. CASE ((pitch%DIV10)MOD10) OF
  14588. WHEN 1 : note% -= 100
  14589. WHEN 2 : note% -= 75
  14590. WHEN 3 : note% -= 50
  14591. WHEN 4 : note% -= 25
  14592. WHEN 6 : note% += 25
  14593. WHEN 7 : note% += 50
  14594. WHEN 8 : note% += 75
  14595. WHEN 9 : note% += 100
  14596. OTHERWISE
  14597. ENDCASE
  14598. :
  14599. octave% = pitch%MOD10
  14600. note% = note% + (1200*(octave%-1)) + cent%
  14601. chunk% = 1200 : compoundint% = compoundcent%
  14602. ENDPROC
  14603. :
  14604. REM****************************************************
  14605. :
  14606. DEF PROCrandomnumber
  14607. :
  14608. PROCwindow(20,65,65,55)
  14609. CLS
  14610. :
  14611. IF rerun$ = "n" THEN
  14612. INPUT'" Return a random number between ? "ranx%
  14613. INPUT " and ? "rany%
  14614. ENDIF
  14615. diff% = (rany%-ranx%)+1
  14616. PRINT' RND(diff%)+(ranx%-1)
  14617. :
  14618. PRINT '" (press R to re-run, U for new number "
  14619. PRINT " or any key to continue) "
  14620. CASE GET$ OF
  14621. WHEN "U","u" : rerun$ = "n" : PROCrandomnumber
  14622. WHEN "R","r" : rerun$ = "y" : PROCrandomnumber
  14623. OTHERWISE PROCdisplay
  14624. ENDCASE
  14625. ENDPROC
  14626. :
  14627. REM****************************************************
  14628. :
  14629. DEF PROCcheckproportiontotal
  14630. :
  14631. proportiontotal$ = "notOK"
  14632. :
  14633. it% = 0
  14634. REPEAT
  14635. it% += 1
  14636. mplier = 0.5
  14637. REPEAT
  14638. mplier = mplier*2
  14639. testnum% = it%*mplier
  14640. posslownum = grouplength%/beatfactor%
  14641. WHILE posslownum > proportiontotal%
  14642. posslownum = posslownum/2
  14643. ENDWHILE
  14644. WHILE posslownum <= (proportiontotal%/2)
  14645. posslownum = posslownum*2
  14646. ENDWHILE
  14647. IF proportiontotal% = testnum% AND ((it%/testnum%)*posslownum*10^3)MOD10^3=0 THEN proportiontotal$ = "OK"
  14648. IF proportiontotal% = posslownum THEN proportiontotal$ = "OK"
  14649. UNTIL proportiontotal$ = "OK" OR testnum% > (grouplength%/defaultmindur%)
  14650. UNTIL proportiontotal$ = "OK" OR it% = given%
  14651. :
  14652. IF proportiontotal%>9999 THEN proportiontotal$ = "notOK"
  14653. :
  14654. ENDPROC
  14655. :
  14656. REM***************************************************
  14657. :
  14658. DEF PROCredpitches
  14659. :
  14660. tiss% = 0
  14661. REPEAT
  14662. tiss%+=1
  14663. toss% = 0 : dored$ = "n"
  14664. REPEAT
  14665. toss%+=1
  14666. IF (array%(startcell%,0,voice%)MOD10^3) = redpitches%(tiss%,toss%) THEN
  14667. IF printing$ = "n" THEN GCOL tiss%
  14668. dored$ = "y"
  14669. ENDIF
  14670. UNTIL dored$ = "y" OR toss% = numredpitches%(tiss%)
  14671. UNTIL dored$ = "y" OR tiss% = numcols%
  14672. ENDPROC
  14673. :
  14674. REM****************************************************
  14675. :
  14676. DEF PROCpitchstring2
  14677. :
  14678. IF easiermenus$ = "n" THEN PROCwindow(20,65,60,55) ELSE PROCwindow(20,65,60,42)
  14679. PRINT'" This function returns a string"
  14680. PRINT" of pitches drawn from a semitonal"
  14681. PRINT" cluster based on middle C,"
  14682. PRINT" with a controlled chance "
  14683. PRINT" of pitch repetitions"
  14684. INPUT'" How many semitones in the cluster "numsemis%
  14685. INPUT'" How many pitches in the string "numpitches%
  14686. PRINT'" Randomly occuring pitch repetitions "
  14687. PRINT" are included or not by what "
  14688. INPUT" percentage? "percentage%
  14689. :
  14690. x% = RND(numsemis%)
  14691. CASE x% OF
  14692. WHEN 1 : pitches%(0) = 54
  14693. WHEN 2 : pitches%(0) = 94
  14694. WHEN 3 : pitches%(0) = 154
  14695. WHEN 4 : pitches%(0) = 214
  14696. WHEN 5 : pitches%(0) = 254
  14697. WHEN 6 : pitches%(0) = 354
  14698. WHEN 7 : pitches%(0) = 394
  14699. WHEN 8 : pitches%(0) = 454
  14700. WHEN 9 : pitches%(0) = 514
  14701. WHEN 10 : pitches%(0) = 554
  14702. WHEN 11 : pitches%(0) = 614
  14703. WHEN 12 : pitches%(0) = 654
  14704. ENDCASE
  14705. :
  14706. FOR count% = 1 TO numpitches%-1
  14707. REPEAT
  14708. continue$ = "y"
  14709. x% = RND(numsemis%)
  14710. CASE x% OF
  14711. WHEN 1 : pitches%(count%) = 54
  14712. WHEN 2 : pitches%(count%) = 94
  14713. WHEN 3 : pitches%(count%) = 154
  14714. WHEN 4 : pitches%(count%) = 214
  14715. WHEN 5 : pitches%(count%) = 254
  14716. WHEN 6 : pitches%(count%) = 354
  14717. WHEN 7 : pitches%(count%) = 394
  14718. WHEN 8 : pitches%(count%) = 454
  14719. WHEN 9 : pitches%(count%) = 514
  14720. WHEN 10 : pitches%(count%) = 554
  14721. WHEN 11 : pitches%(count%) = 614
  14722. WHEN 12 : pitches%(count%) = 654
  14723. ENDCASE
  14724. :
  14725. IF pitches%(count%) = pitches%(count%-1) THEN
  14726. y% = RND(100)
  14727. IF y% <= percentage% THEN continue$ = "y" ELSE continue$ = "n"
  14728. ENDIF
  14729. UNTIL continue$ = "y"
  14730. NEXT
  14731. :
  14732. PROCinsertpitches
  14733. ENDPROC
  14734. :
  14735. REM***************************************
  14736. :
  14737. DEF PROCrhythmdefaults
  14738. shortirrat% = 240
  14739. longirrat% = 240
  14740. irratbeats% = 4
  14741. irratbeats1% = 4
  14742. mindur% = 60 : sieve = 960/mindur%
  14743. buffer% = 960/(sieve*2)
  14744. given% = 9
  14745. defaultsieve = 2
  14746. ENDPROC
  14747. :
  14748. REM******************************************
  14749. :
  14750. DEF PROCdisplayoptions
  14751. :
  14752. PROCwindow(2,72,97,1)
  14753. OFF
  14754. PRINT' " Do you want to (press to toggle)"
  14755. IF copytoend$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14756. IF seegraph$ = "y" THEN state1$ = "on" ELSE state1$ = "off"
  14757. PRINT' " See graph during accel/rit G (";state1$;") Allow copying to last note ^A (";state$;")"
  14758. IF seeinfo$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14759. IF nodelay$ = "y" THEN state1$ = "on" ELSE state1$ = "off"
  14760. PRINT' " See info on attacks A (";state$;") Pause for querying stave ^D (";state1$;")"
  14761. IF printinfo$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14762. IF askprevious$ = "y" THEN state1$ = "on" ELSE state1$ = "off"
  14763. PRINT' " get printout of info on attacks I (";state$;") Pause for previous position^F (";state1$;")"
  14764. IF seereorder$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14765. IF errorbeforedisplay$ = "n" THEN state1$ = "off" ELSE state1$ = "on"
  14766. PRINT' " Re-order attacks R (";state$;") Debugging mode ^G (";state1$;")"
  14767. IF seereorderx$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14768. PRINT' " Re-order attacks during accel/rit only ^R (";state$;")"
  14769. IF seeequalize$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14770. PRINT' " Equalize attacks E (";state$;") [press spacebar to continue] "
  14771. IF seeequalizex$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14772. PRINT' " Equalize attacks during accel/rit only ^E (";state$;")"
  14773. IF seerhythmicize$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14774. PRINT' " Rhythmicize attacks H (";state$;")"
  14775. IF reorderpitches$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14776. PRINT' " Re-order pitches using M/A/P ^P (";state$;")"
  14777. IF seequery$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14778. PRINT' " Query before adding new values to array Q (";state$;")"
  14779. PRINT' " Define parameter values during input P (";paraset$;")"
  14780. PRINT' " Accel/rit by total durat, endpoints or "
  14781. PRINT " first two notes displayed T/N/F (";funcinput$;")"
  14782. IF startfinishdurats$ = "Y" THEN state$ = "on" ELSE state$ = "off"
  14783. PRINT' " Accel/rit by start and finish durations S (";state$;")"
  14784. IF seeduration$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14785. PRINT' " See duration upto last displayed bar D (";state$;")"
  14786. IF quickcopy$ = "y" THEN state$ ="on" ELSE state$ = "off"
  14787. PRINT' " Quick copy B (";state$;")"
  14788. CASE seedurinbts$ OF
  14789. WHEN "y" : state$ = "on"
  14790. WHEN "stepped" : state$ = "stepped"
  14791. WHEN "n" : state$ = "off"
  14792. ENDCASE
  14793. PRINT' " See durations in micro-beats K (";state$;")"
  14794. CASE seedurincrots$ OF
  14795. WHEN "y" : state$ = "on"
  14796. WHEN "stepped" : state$ = "stepped"
  14797. WHEN "n" : state$ = "off"
  14798. ENDCASE
  14799. PRINT' " See durations in macro-beats C (";state$;")"
  14800. IF screenvoices$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14801. PRINT' " Voice numbers by 1/2/3 on screen V (";state$;")"
  14802. IF ampoptions$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14803. PRINT' " Use advanced amplitudes options O (";state$;")"
  14804. PRINT' " Double v/^ moves down/up by 3/10 staves Z (";screenmovesby%;")"
  14805. CASE setalong$ OF
  14806. WHEN "y" : state$ = "A/R"
  14807. WHEN "n" : state$ = "quick"
  14808. WHEN "playnovoices" : state$ = "play"
  14809. ENDCASE
  14810. PRINT' " 1,2 = A/R start/quickdisplay/play vces J (";state$;")"
  14811. CASE envelopedata$ OF
  14812. WHEN "none" : stage$ = "neither"
  14813. WHEN "percentage" : stage$ = "%'s"
  14814. WHEN "marker" : stage$ = "indicators"
  14815. ENDCASE
  14816. PRINT' " See envelope %'s/indicators/neither L (";stage$;")"
  14817. IF askaboutpitches$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14818. PRINT' " Query if pitches all the same M (";state$;")"
  14819. IF usebottomstave$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14820. PRINT' " Group of pitches fills bottom stave U (";state$;")"
  14821. CASE sequalssection$ OF
  14822. WHEN "y" : state$ = "sect"
  14823. WHEN "n" : state$ = "next"
  14824. ENDCASE
  14825. PRINT' " Copy from next voices/Go to section ^S (";state$;")"
  14826. IF addpitches$ = "y" THEN state$ = "pitch" ELSE state$ = "env"
  14827. PRINT' " ^Y = Add pitches/edit envelope Y (";state$;")"
  14828. IF squarebracket$ = "remarks" THEN state$ = "remarks" ELSE state$ = "copy +"
  14829. PRINT' " [] keys = move remarks/add to copydown [ (";state$;")"
  14830. IF queryalong$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14831. PRINT' " Accel/rit asks for starting attack ] (";state$;")"
  14832. PRINT' " Reset no.staves ^/v moves up/down by ~"
  14833. IF singlepitch$ = "m" THEN state$ = "multiple" ELSE state$ = "single"
  14834. PRINT' " Y = single/multiple pitch entry @ (";state$;")"
  14835. IF namestaves$ = "nameone" THEN state$ = "rename" ELSE state$ = "delete"
  14836. PRINT' " ^V = rename/delete batch of voice names^V (";state$;")"
  14837. IF usebeep$ = "n" THEN state$ = "assnd" ELSE state$ = "beep"
  14838. PRINT' " Play with beep or assigned voices ^B (";state$;")"
  14839. IF onlycontent$ = "y" THEN state$ = "on" ELSE state$ = "off"
  14840. PRINT' " Display only voices with content ^C (";state$;")"
  14841. PRINT' " Show list of voices with content ^L"
  14842. :
  14843. CASE GET$ OF
  14844. :
  14845. WHEN "g" :
  14846. IF seegraph$ = "y" THEN seegraph$ = "n" ELSE seegraph$ = "y"
  14847. WHEN "a" :
  14848. IF seeinfo$ = "y" THEN seeinfo$ = "n" ELSE seeinfo$ = "y"
  14849. WHEN "A" :
  14850. IF copytoend$ = "y" THEN copytoend$ = "n" ELSE copytoend$ = "y"
  14851. WHEN "I","i" :
  14852. IF printinfo$ = "y" THEN printinfo$ = "n" ELSE printinfo$ = "y"
  14853. WHEN "r" :
  14854. IF seereorder$ = "y" THEN
  14855. seereorder$ = "n"
  14856. seereordery$ = "n"
  14857. ELSE
  14858. seereorder$ = "y"
  14859. seereorderx$ = "y"
  14860. seereordery$ = "y"
  14861. ENDIF
  14862. WHEN "R" :
  14863. IF seereorderx$ = "y" THEN
  14864. seereorderx$ = "n"
  14865. seereordery$ = "n"
  14866. ELSE seereorderx$ = "y"
  14867. ENDIF
  14868. WHEN "e" :
  14869. IF seeequalize$ = "y" THEN
  14870. seeequalize$ = "n"
  14871. seeequalizey$ = "n"
  14872. ELSE
  14873. seeequalize$ = "y"
  14874. seeequalizex$ = "y"
  14875. seeequalizey$ = "y"
  14876. ENDIF
  14877. WHEN "E" :
  14878. IF seeequalizex$ = "y" THEN
  14879. seeequalizex$ = "n"
  14880. seeequalizey$ = "n"
  14881. ELSE seereorderx$ = "y"
  14882. ENDIF
  14883. WHEN "P" :
  14884. IF reorderpitches$ = "y" THEN reorderpitches$ = "n" ELSE reorderpitches$ = "y"
  14885. WHEN "H","h" :
  14886. IF seerhythmicize$ = "y" THEN seerhythmicize$ = "n" ELSE seerhythmicize$ = "y"
  14887. WHEN "Q","q" :
  14888. IF seequery$ = "y" THEN seequery$ = "n" ELSE seequery$ = "y"
  14889. WHEN "p" :
  14890. IF paraset$ = "on" THEN paraset$ = "off" ELSE paraset$ = "on"
  14891. WHEN "T","t" :
  14892. funcinput$ = "durat"
  14893. WHEN "N","n" :
  14894. funcinput$ = "points"
  14895. WHEN "f" :
  14896. funcinput$ = "displayed"
  14897. WHEN "s" :
  14898. IF startfinishdurats$ = "Y" THEN startfinishdurats$ = "N" ELSE startfinishdurats$ = "Y"
  14899. WHEN "d" :
  14900. IF seeduration$ = "y" THEN
  14901. seeduration$ = "n" : PROCdisplay
  14902. ELSE seeduration$ = "y" : PROCdisplay
  14903. ENDIF
  14904. WHEN "b" :
  14905. IF quickcopy$ = "n" THEN quickcopy$ = "y" ELSE quickcopy$ = "n"
  14906. WHEN "K","k" :
  14907. IF seedurinbts$ = "n" THEN
  14908. seedurinbts$ = "y" : seedurincrots$ = "n" : PROCdisplay
  14909. ENDIF
  14910. IF seedurinbts$ = "y" THEN
  14911. seedurinbts$ = "stepped" : seedurincrots$ = "n" : PROCdisplay
  14912. ENDIF
  14913. IF seedurinbts$ = "stepped" THEN
  14914. seedurinbts$ = "n": PROCdisplay
  14915. ENDIF
  14916. WHEN "c" :
  14917. IF seedurincrots$ = "n" THEN
  14918. seedurincrots$ = "y" : seedurinbts$ = "n" : PROCdisplay
  14919. ENDIF
  14920. IF seedurincrots$ = "y" THEN
  14921. seedurincrots$ = "stepped" : seedurinbts$ = "n" : PROCdisplay
  14922. ENDIF
  14923. IF seedurincrots$ = "stepped" THEN
  14924. seedurincrots$ = "n" : PROCdisplay
  14925. ENDIF
  14926. WHEN "v" :
  14927. IF screenvoices$ = "n" THEN screenvoices$ = "y" ELSE screenvoices$ = "n" : PROCdisplay
  14928. WHEN "V" :
  14929. IF namestaves$ = "nameone" THEN namestaves$ = "deletemany" ELSE namestaves$ = "nameone"
  14930. WHEN "O","o" :
  14931. IF ampoptions$ = "n" THEN ampoptions$ = "y" ELSE ampoptions$ = "n" : PROCdisplay
  14932. WHEN "z","Z" : IF screenmovesby% = 10 THEN screenmovesby% = 3 ELSE screenmovesby% = 10 : PROCdisplay
  14933. WHEN "J","j" :
  14934. CASE setalong$ OF
  14935. WHEN "y" : setalong$ = "n"
  14936. WHEN "n" : setalong$ = "playnovoices"
  14937. WHEN "playnovoices" : setalong$ = "y"
  14938. ENDCASE
  14939. WHEN "l" :
  14940. CASE envelopedata$ OF
  14941. WHEN "none" : envelopedata$ = "percentage"
  14942. WHEN "percentage" : envelopedata$ = "marker"
  14943. WHEN "marker" : envelopedata$ = "none"
  14944. ENDCASE
  14945. WHEN "M","m" :
  14946. IF askaboutpitches$ = "y" THEN askaboutpitches$ = "n" ELSE askaboutpitches$ = "y"
  14947. WHEN "U","u" :
  14948. IF usebottomstave$ = "y" THEN usebottomstave$ = "n" ELSE usebottomstave$ = "y"
  14949. IF usebottomstave$ = "y" THEN askaboutpitches$ = "n" ELSE askaboutpitches$ = "y"
  14950. WHEN "S" :
  14951. CASE sequalssection$ OF
  14952. WHEN "y" : sequalssection$ = "n"
  14953. WHEN "n" : sequalssection$ = "y"
  14954. ENDCASE
  14955. WHEN "y","Y" :
  14956. IF addpitches$ = "y" THEN addpitches$ = "n" ELSE addpitches$ = "y"
  14957. WHEN "[" :
  14958. IF squarebracket$ = "remarks" THEN squarebracket$ = "addten" ELSE squarebracket$ = "remarks"
  14959. WHEN "]" :
  14960. IF queryalong$ = "y" THEN queryalong$ = "n" ELSEqueryalong$ = "y"
  14961. WHEN "~" :
  14962. CLS
  14963. INPUT " pressing ^ or v movesup/down by how many staves "updisplay%
  14964. WHEN "@" :
  14965. IF singlepitch$ = "s" THEN singlepitch$ = "m" ELSE singlepitch$ = "s"
  14966. WHEN "B" :
  14967. IF usebeep$ = "y" THEN usebeep$ = "n" ELSE usebeep$ = "y"
  14968. WHEN "C" :
  14969. IF onlycontent$ = "y" THEN onlycontent$ = "n" ELSE onlycontent$ = "y"
  14970. PROCdisplayonlycontent
  14971. WHEN "L" : PROCcontentonlylist
  14972. WHEN "D" : IF nodelay$ = "y" THEN nodelay$ = "n" ELSE nodelay$ = "y"
  14973. WHEN "F" : IF askprevious$ = "y" THEN askprevious$ = "n" ELSE askprevious$ = "y"
  14974. WHEN "G" : IF errorbeforedisplay$ = "n" THEN errorbeforedisplay$ = "debug" ELSE errorbeforedisplay$ = "n"
  14975. :
  14976. OTHERWISE
  14977. :
  14978. ENDCASE
  14979. ON
  14980. :
  14981. ENDPROC
  14982. :
  14983. REM******************************************************************
  14984. :
  14985. DEF PROCremarks
  14986. :
  14987. CLS
  14988. INPUT'" Which bar "baar%
  14989. PRINT'" line 1 or 2 "
  14990. CASE GET$ OF
  14991. WHEN "1" : line% = 0
  14992. WHEN "2" : line% = 1
  14993. OTHERWISE VDU7 : PROCremarks
  14994. ENDCASE
  14995. INPUT '" What are the remarks "remarks$
  14996. remarks$(baar%,line%) = remarks$
  14997. :
  14998. ENDPROC
  14999. :
  15000. REM********************************************************************
  15001. :
  15002. DEF PROCwindow(a%,b%,c%,d%)
  15003. :
  15004. bigger$ = "n"
  15005. IF a% < biga% THEN
  15006. biga% = a% : bigger$ = "y"
  15007. ENDIF
  15008. IF b% > bigb% THEN
  15009. bigb% = b% : bigger$ = "y"
  15010. ENDIF
  15011. IF c% > bigc% THEN
  15012. bigc% = c% : bigger$ = "y"
  15013. ENDIF
  15014. IF d% < bigd% THEN
  15015. bigd% = d% : bigger$ = "y"
  15016. ENDIF
  15017. :
  15018. IF box$ = "n" THEN
  15019. box$ = "y"
  15020. VDU 28,a%-1,b%+1,c%+1,d%-1 : COLOUR 131 : CLS
  15021. VDU 28,a%,b%,c%,d% : COLOUR 0 : COLOUR 191 : CLS : OFF
  15022. ELSE
  15023. IF bigger$ = "y" THEN
  15024. VDU 28,a%-1,b%+1,c%+1,d%-1 : COLOUR 131 : CLS
  15025. ENDIF
  15026. CLS : VDU 28,a%,b%,c%,d% : COLOUR 0 : COLOUR 191 : CLS : OFF
  15027. ENDIF
  15028. :
  15029. ENDPROC
  15030. :
  15031. REM***********************************************
  15032. :
  15033. DEF PROCslave
  15034. REM this program returns not simply a random
  15035. REM percentage (tends to be too high) nor
  15036. REM a random percentage of a random percentage
  15037. REM (tends to be too low), but something
  15038. REM inbetween, averaging not 50% nor 25% but 37.5%
  15039. :
  15040. IF quickslave$ = "n" THEN
  15041. IF easiermenus$ = "n" THEN PROCwindow(20,69,96,55) ELSE PROCwindow(20,69,96,42)
  15042. PRINT''" To begin, display the Mastervoice's two half-phases first on the screen."
  15043. PRINT " This function then generates a Slavevoice's associated two half-phases,"
  15044. PRINT " their random starting and ending points averaging 37.5% and 62.5% of the"
  15045. PRINT " MV half-phases respectively (other averages tend to be too high or too low)"
  15046. PRINT '" Alternatively, percentages may be determined - "
  15047. PRINT " press D for determined or R for random now "
  15048. CASE GET$ OF
  15049. WHEN "D","d" : slavemethod$ = "determined"
  15050. OTHERWISE slavemethod$ = "random"
  15051. ENDCASE
  15052. ENDIF
  15053. :
  15054. test$ = "n"
  15055. PROCinput
  15056. :
  15057. ENDPROC
  15058. :
  15059. DEF PROCinput
  15060. REM procedure for getting first 2 attacks displayed
  15061. IF quickslave$ = "y" THEN
  15062. IF easiermenus$ = "n" THEN PROCwindow(20,67,49,55) ELSE PROCwindow(20,67,49,42)
  15063. ENDIF
  15064. INPUT '" Mastervoice is which voice "voice%
  15065. IF voice% = 0 THEN voice% = savevoice%
  15066. IF voice% <> 0 THEN savevoice% = voice%
  15067. voice% -= 1
  15068. startingbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  15069. startbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  15070. midbar% = array%(holdstartcell%(voice%)+1+along%,0,voice%)DIV10^6
  15071. midbeat% = (array%(holdstartcell%(voice%)+1+along%,0,voice%)MOD10^6)DIV10^3
  15072. endbar% = array%(holdstartcell%(voice%)+2+along%,0,voice%)DIV10^6
  15073. endbeat% = (array%(holdstartcell%(voice%)+2+along%,0,voice%)MOD10^6)DIV10^3
  15074. startpoint% = startingbar%*960
  15075. startpoint% += startbeat%
  15076. midpoint% = midbar%*960
  15077. midpoint% += midbeat%
  15078. endpoint% = endbar% * 960
  15079. endpoint% += endbeat%
  15080. PROCprogram
  15081. ENDPROC
  15082. :
  15083. DEF PROCprogram
  15084. IF test$ = "y" THEN number% = 1000 ELSE number% = 1
  15085. total% = 0 : total1% = 0
  15086. FOR count% = 1 TO number%
  15087. firstdur% = midpoint%-startpoint%
  15088. seconddur% = endpoint%-midpoint%
  15089. REPEAT
  15090. IF slavemethod$ = "determined" THEN
  15091. INPUT'" Percentage for first half-phase is..."percentage%
  15092. ELSE
  15093. c% = RND(100)
  15094. percentage% = RND(100) * (RND(101-c%)+(c%-1)) / 100
  15095. ENDIF
  15096. UNTIL percentage% >= lowerstart% AND percentage% <= upperstart%
  15097. SVfirstdur% = firstdur%*percentage%/100
  15098. REPEAT
  15099. IF slavemethod$ = "determined" THEN
  15100. INPUT'" Percentage for second half-phase is..."percentage1%
  15101. ELSE
  15102. c% = RND(100)
  15103. percentage1% = 100 - (RND(100) * (RND(101-c%)+(c%-1)) / 100)
  15104. ENDIF
  15105. UNTIL percentage1% >= lowerend% AND percentage1% <= upperend%
  15106. SVseconddur% = seconddur%*percentage1%/100
  15107. :
  15108. SVtotaldur% = firstdur% - SVfirstdur% + SVseconddur%
  15109. SVthirddur% = SVtotaldur%/(firstdur%+seconddur%)*firstdur%
  15110. :
  15111. SVbar% = startingbar%
  15112. SVbeat% = startbeat% + SVfirstdur%
  15113. PROCbeats
  15114. SVstartbar% = SVbar% : SVstartbeat% = SVbeat%
  15115. :
  15116. SVbar% = SVstartbar%
  15117. SVbeat% = SVstartbeat% + SVthirddur%
  15118. PROCbeats
  15119. SVmidbar% = SVbar% : SVmidbeat% = SVbeat%
  15120. :
  15121. SVbar% = midbar%
  15122. SVbeat% = midbeat% + SVseconddur%
  15123. PROCbeats
  15124. SVendbar% = SVbar% : SVendbeat% = SVbeat%
  15125. :
  15126. IF quickslave$ = "y" THEN
  15127. IF easiermenus$ = "n" THEN PROCwindow(20,69,82,55) ELSE PROCwindow(20,69,82,42)
  15128. ENDIF
  15129. CLS
  15130. PRINT'" The Slavevoice's first half-phase starts at ";SVstartbar%;".";SVstartbeat%;" (";percentage%;"%)"
  15131. PRINT '" and ends at ";SVmidbar%;".";SVmidbeat%
  15132. PRINT '" And its second half-phase ends at ";SVendbar%;".";SVendbeat%;" (";percentage1%;"%)"
  15133. total% += percentage% : total1% += percentage1%
  15134. NEXT
  15135. IF test$ = "y" THEN
  15136. PRINT''" Average 1st percent = ";total%/1000
  15137. PRINT" Average second = ";total1%/1000
  15138. PRINT'" to continue press C"
  15139. CASE GET$ OF
  15140. WHEN"C","c" : PROCdisplay
  15141. ENDCASE
  15142. ENDIF
  15143. PRINT''" Do you want to add this slave voice to the array?"
  15144. PRINT" (or, to test average percentages out of 1000 throws, press P"
  15145. PRINT" or, to set limits for the random percentages, press L)"
  15146. CASE GET$ OF
  15147. WHEN"Y","y" :
  15148. WHEN"N","n" : PROCdisplay
  15149. WHEN "P","p" : test$ = "y" : PROCprogram
  15150. WHEN "L","l" : PROClimits
  15151. ENDCASE
  15152. attacks1%(1) = ((SVmidbar%*960)+SVmidbeat%) - ((SVstartbar%*960)+SVstartbeat%)
  15153. attacks1%(2) = ((SVendbar%*960)+SVendbeat%) - ((SVstartbar%*960)+SVstartbeat%)
  15154. funcbar% = SVstartbar% : funcbeat% = SVstartbeat%
  15155. method$ = "raw" : quiz$ = "no" : manyattacks% = 3
  15156. PROCinsertattacks
  15157. ENDPROC
  15158. :
  15159. DEF PROCbeats
  15160. WHILE SVbeat% > 959
  15161. SVbeat% -= 960 : SVbar% += 1
  15162. ENDWHILE
  15163. ENDPROC
  15164. :
  15165. DEF PROClimits
  15166. INPUT'" Give the lower limit for SV's start-point, between 1% & 99% "lowerstart%
  15167. INPUT " Give the upper limit for SV's start-point, between 1% & 99% "upperstart%
  15168. INPUT'" Give the lower limit for SV's end-point, between 1% & 99% "lowerend%
  15169. PRINT " Give the upper limit for SV's end-point, between 1% & 99% "
  15170. INPUT " (these limits last for the session) "upperend%
  15171. PROCdisplay
  15172. ENDPROC
  15173. :
  15174. ENDPROC
  15175. :
  15176. REM*******************************************
  15177. :
  15178. DEF PROCprintattacks
  15179. :
  15180. durat% = 0
  15181. MODE 16 : COLOUR 0 : COLOUR 191 : CLS
  15182. PRINT '" The group of attacks will be at "
  15183. PRINT" "
  15184. PRINT TAB(8) "ATTACKS AT";
  15185. PRINT TAB(30) "DURATIONS";
  15186. PRINT TAB(54) "RATIOS"
  15187. tal% = 0 : printnum% = 0
  15188. FOR count% = 0 TO (manyattacks%-1)
  15189. tal% += 1
  15190. PRINT TAB(1)(attacks2%(count%))DIV10^3;" ";
  15191. PRINT ;(attacks2%(count%))MOD10^3;
  15192. IF count% > 0 THEN
  15193. durat1% = durat%
  15194. durat% = (attacks2%(count%)MOD10^3)-(attacks2%(count%-1)MOD10^3)
  15195. addon% = ((attacks2%(count%)DIV(10^3))-(attacks2%(count%-1)DIV(10^3)))*960
  15196. durat% = durat% + addon%
  15197. PRINT TAB(26) durat%;
  15198. IF count%>1 THEN
  15199. IF direction$ = "rit" THEN ratio = durat%/durat1% ELSE ratio = durat1%/durat%
  15200. CASE ratio OF
  15201. WHEN 0.5 : PRINT TAB(52) "0.5"
  15202. WHEN 1.0 : PRINT TAB(52) "1.0"
  15203. WHEN 1.5 : PRINT TAB(52) "1.5"
  15204. WHEN 2.0 : PRINT TAB(52) "2.0"
  15205. WHEN 2.5 : PRINT TAB(52) "2.5"
  15206. OTHERWISE PRINT TAB(52) ratio
  15207. ENDCASE
  15208. ENDIF
  15209. ENDIF
  15210. IF tal% > 54 AND printinfo$ = "y" THEN
  15211. printnum% += 1
  15212. MOVE 0,0
  15213. MOVE 1800,1223
  15214. *SGet mysprite
  15215. OSCLI "SSave SDFS::RISCOSpi.$.CAC.Printing."+STR$(printnum%)
  15216. tal% = 0
  15217. ENDIF
  15218. NEXT
  15219. IF printinfo$ = "y" THEN
  15220. MOVE 0,0
  15221. MOVE 1800,1223
  15222. *SGet mysprite
  15223. OSCLI "SSave SDFS::RISCOSpi.$.CAC.Printing."+STR$(printnum%+1)
  15224. ENDIF
  15225. :
  15226. PROCdisplay
  15227. :
  15228. ENDPROC
  15229. :
  15230. REM*************************************************
  15231. :
  15232. DEF PROCnamestaves
  15233. :
  15234. CLS
  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. INPUT'" Create envelope points for which voice "voice%
  15351. IF voice% = 0 THEN PROCpressenter
  15352. voice% -= 1
  15353. INPUT'" Starting at bar "copystartbar%
  15354. holdbar% = copystartbar%
  15355. INPUT'" beat "beats%
  15356. PROCalterbeats : copystartbeat% = beats%
  15357. holdbeat% = copystartbeat%
  15358. IF justone$ = "n" THEN
  15359. PRINT'" Ending at bar "
  15360. INPUT'" (for last type 0) "copyendbar%
  15361. IF copyendbar% > 0 THEN
  15362. INPUT '" beat "beats%
  15363. PROCalterbeats : copyendbeat% = beats%
  15364. ENDIF
  15365. ELSE
  15366. copyendbar% = copystartbar%
  15367. copyendbeat% = copystartbeat%
  15368. ENDIF
  15369. :
  15370. ELSE
  15371. :
  15372. INPUT'" Create envelope points for which voice "voice%
  15373. IF voice% = 0 THEN PROCpressenter
  15374. voice% -= 1
  15375. INPUT '" note number "along%
  15376. IF along% = 0 THEN along% = 1
  15377. along%-=1
  15378. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  15379. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  15380. holdbar% = copystartbar%
  15381. holdbeat% = copystartbeat%
  15382. IF justone$ = "n" THEN
  15383. PRINT'" to note number "
  15384. INPUT'" (for last type 0) "along%
  15385. IF along% = 0 THEN
  15386. copyendbar% = 0
  15387. ELSE
  15388. along%-=1
  15389. copyendbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  15390. copyendbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  15391. ENDIF
  15392. ELSE
  15393. copyendbar% = copystartbar%
  15394. copyendbeat% = copystartbeat%
  15395. ENDIF
  15396. ENDIF
  15397. :
  15398. :
  15399. value% = (copystartbar%*10^3)+copystartbeat%
  15400. IF value% <= array%(0,0,voice%)DIV10^3 THEN
  15401. startatcell% = 0
  15402. ELSE
  15403. PROCsearch(value%)
  15404. startatcell% = startcell%
  15405. ENDIF
  15406. IF copyendbar% = 0 THEN
  15407. endatcell% = numusedcells%(voice%) - 1
  15408. ELSE
  15409. value% = (copyendbar%*10^3)+copyendbeat%
  15410. IF value% >= array%(numusedcells%(voice%)-1,0,voice%)DIV10^3 THEN
  15411. endatcell% = numusedcells%(voice%) - 1
  15412. ELSE
  15413. PROCsearch(value%)
  15414. IF shunt$ = "N" THEN endatcell% = startcell% ELSE endatcell% = startcell% - 1
  15415. ENDIF
  15416. ENDIF
  15417. :
  15418. manyattacks% = endatcell% - startatcell% + 1
  15419. REM create 'gap' between beat-of-bar and first actual attack
  15420. carrybars% = (array%(startatcell%,0,voice%)DIV10^6)-copystartbar%
  15421. carrybeats% = ((array%(startatcell%,0,voice%)DIV10^3)MOD10^3)-copystartbeat%
  15422. attacks1%(0) = (carrybars%*960)+carrybeats%
  15423. :
  15424. FOR count% = 0 TO (manyattacks%-1)
  15425. IF count% > 0 THEN
  15426. carrybars% = (array%(startatcell%+count%,0,voice%)DIV10^6)-(array%(startatcell%+count%-1,0,voice%)DIV10^6)
  15427. carrybeats% = ((array%(startatcell%+count%,0,voice%)DIV10^3)MOD10^3)-((array%(startatcell%+count%-1,0,voice%)DIV10^3)MOD10^3)
  15428. attacks1%(count%) = attacks1%(count%-1) + ((carrybars%*960)+carrybeats%)
  15429. ENDIF
  15430. :
  15431. pitches%(count%) = array%(startatcell%+count%,0,voice%)MOD10^3
  15432. dur% = (array%(startatcell%+count%,1,voice%)DIV10)MOD10^3
  15433. brrr% = array%(startatcell%+count%,0,voice%)DIV10^6 : PROCreconvertdur
  15434. durations%(count%) = dur%
  15435. NEXT
  15436. :
  15437. counter% = -1
  15438. FOR count% = 0 TO (manyattacks%-1)
  15439. :
  15440. counter% += 1
  15441. gliss1% = (array%(startatcell%+count%,1,voice%)DIV10^4)MOD10^2 : gliss1% = 50-gliss1%
  15442. gliss2% = (array%(startatcell%+count%,1,voice%)DIV10^6)MOD10^2 : gliss2% = 50 - gliss2%
  15443. gliss3% = array%(startatcell%+count%,1,voice%)DIV10^8 : gliss3% = 10 - gliss3%
  15444. note% = pitches%(count%)DIV10^2
  15445. accid% = (pitches%(count%)DIV10)MOD10
  15446. oct% = pitches%(count%)MOD10
  15447. :
  15448. ph1% = ((array%(startatcell%+count%,2,voice%))DIV10^5)MOD10^2
  15449. IF ph1% <> 0 THEN
  15450. envattacks%(counter%) = attacks1%(count%)+(durations%(count%)*ph1%/100)
  15451. gliss% = gliss1%
  15452. IF gliss% <> 0 THEN
  15453. PROCglisspitches
  15454. envpitches%(counter%) = (note1%*100)+(accid1%*10)+oct1%
  15455. ELSE
  15456. envpitches%(counter%) = (note%*100)+(accid%*10)+oct%
  15457. ENDIF
  15458. :
  15459. ENDIF
  15460. :
  15461. ph2% = (array%(startatcell%+count%,2,voice%))DIV10^7
  15462. IF ph2% <> 0 THEN
  15463. counter% += 1
  15464. envattacks%(counter%) = attacks1%(count%)+(durations%(count%)*ph2%/100)
  15465. gliss% = gliss1% + gliss2%
  15466. IF gliss% <> 0 THEN
  15467. PROCglisspitches
  15468. envpitches%(counter%) = (note1%*100)+(accid1%*10)+oct1%
  15469. ELSE
  15470. envpitches%(counter%) = (note%*100)+(accid%*10)+oct%
  15471. ENDIF
  15472. :
  15473. ENDIF
  15474. :
  15475. IF ph1% <> 0 THEN counter% += 1
  15476. envattacks%(counter%) = attacks1%(count%)+durations%(count%)
  15477. IF ph1% = 0 THEN gliss% = gliss1%
  15478. IF ph1% <> 0 AND ph2% = 0 THEN gliss% = gliss1% + gliss2%
  15479. IF ph2% <> 0 THEN gliss% = gliss1% + gliss2% + gliss3%
  15480. IF gliss% <> 0 THEN
  15481. PROCglisspitches
  15482. envpitches%(counter%) = (note1%*100)+(accid1%*10)+oct1%
  15483. ELSE
  15484. envpitches%(counter%) = (note%*100)+(accid%*10)+oct%
  15485. ENDIF
  15486. :
  15487. NEXT
  15488. :
  15489. FOR count% = 0 TO counter%
  15490. :
  15491. attacks1%(count%) = envattacks%(count%)
  15492. pitches%(count%) = envpitches%(count%)
  15493. durations%(count%) = 0
  15494. amplitudes%(count%) = 0
  15495. envelopes%(count%) = 9
  15496. glissandos%(count%) = 105050
  15497. inflections%(count%) = 50
  15498. NEXT
  15499. :
  15500. numpitches% = counter% + 1
  15501. manyattacks% = counter% + 1
  15502. method$ = "raw"
  15503. copyit$ = "ON"
  15504. PROCinsertattacks
  15505. :
  15506. justone$ = "n"
  15507. :
  15508. ENDPROC
  15509. :
  15510. REM**********************************************
  15511. :
  15512. DEF PROCglisspitches
  15513. :
  15514. note1% = note% : accid1% = accid% : oct1% = oct%
  15515. :
  15516. IF gliss% < 0 THEN step% = -1 ELSE step% = 1
  15517. IF gliss% > 0 THEN startloop% = 1 ELSE startloop% = -1
  15518. :
  15519. FOR country% = startloop% TO gliss% STEP step%
  15520. :
  15521. CASE step% OF
  15522. WHEN -1 :
  15523. CASE accid1% OF
  15524. WHEN 1 :
  15525. CASE note1% OF
  15526. WHEN 0 :
  15527. note1% = 6 : accid1% = 4 : oct1% -=1
  15528. WHEN 1, 2, 4, 5, 6 :
  15529. note1% -= 1 : accid1% = 8
  15530. WHEN 3 :
  15531. note1% -= 1 : accid1% = 4
  15532. ENDCASE
  15533. OTHERWISE accid1% -= 1
  15534. ENDCASE
  15535. WHEN 1 :
  15536. CASE accid1% OF
  15537. WHEN 9 :
  15538. CASE note1% OF
  15539. WHEN 0, 1, 3, 4, 5 :
  15540. note1% += 1 : accid1% = 2
  15541. WHEN 2 :
  15542. note1% += 1 : accid1% = 6
  15543. WHEN 6 :
  15544. note1% = 0 : accid1% = 6 : oct1% += 1
  15545. ENDCASE
  15546. OTHERWISE accid1% += 1
  15547. ENDCASE
  15548. ENDCASE
  15549. NEXT
  15550. :
  15551. ENDPROC
  15552. :
  15553. REM*********************************************
  15554. :
  15555. DEF PROCdoublestop
  15556. :
  15557. IF easiermenus$ = "n" THEN PROCwindow(20,69,96,54) ELSE PROCwindow(20,69,96,42)
  15558. repeatposit$ = "n"
  15559. distort$ = "OFF"
  15560. dothis$ = "YES"
  15561. :
  15562. copymove$ = "DS"
  15563. savevoice$ = "N"
  15564. justone$ = "n"
  15565. :
  15566. PRINT'" Violin, viola, cello or bass (N,A,O,S)? "
  15567. PRINT'" (or press E for an explanation of the function) "
  15568. CASE GET$ OF
  15569. WHEN "N","n" : member$ = "violin"
  15570. WHEN "A","a" : member$ = "viola"
  15571. WHEN "O","o" : member$ = "cello"
  15572. WHEN "S","s" : member$ = "bass"
  15573. WHEN "E","e" :
  15574. IF easiermenus$ = "n" THEN PROCwindow(8,71,96,54) ELSE PROCwindow(11,69,96,42)
  15575. VDU 14
  15576. CLS
  15577. PRINT'" The typical situation in which the double-stop function would play a part"
  15578. PRINT" is imagined to be this: up to four voices are employed to schedule attack-points "
  15579. PRINT" on each of the strings (at this stage make a single-voice reduction with the attacks "
  15580. PRINT" pitched on the open strings, because this will be needed in the function). "
  15581. PRINT'" Pitches are allocated to the attacks, including open strings and harmonics, with "
  15582. PRINT" the condition that all are within a single lh position at any one time. "
  15583. PRINT'" Now reduce these separate-string voices to a single voice - this is treated by "
  15584. PRINT" the function to produce a version inserting practical double-stops according to "
  15585. PRINT" user-defined probabilities; this is copied into two further voices to enable faithful "
  15586. PRINT" play-back; durations are correctly clipped, so a further reduction of these two "
  15587. PRINT" voices will give a clear indication of notation on a single stave. "
  15588. PRINT'" (press C to continue) "
  15589. CASE GET$ OF
  15590. ENDCASE
  15591. VDU 15
  15592. PROCdisplay
  15593. OTHERWISE PROCdoublestop
  15594. ENDCASE
  15595. INPUT'" Which single voice is to be treated? "treatvoice%
  15596. treatvoice% -= 1
  15597. INPUT'" Which other 2 voices is it divided into? - voice... "firstvoice%
  15598. firstvoice% -= 1
  15599. INPUT'" and voice... "secondvoice%
  15600. secondvoice% -= 1
  15601. INPUT'" And which single voice carries the open strings? - voice... "stringvoice%
  15602. stringvoice% -= 1
  15603. CLS
  15604. PRINT''" These 4 voices are assumed to correspond vertically; "
  15605. INPUT'" the passage is to start at bar "copystartbar%
  15606. IF copystartbar% = 0 THEN
  15607. copystartbar% = holdbar% : copystartbeat% = holdbeat% : repeatposit$ = "y"
  15608. ENDIF
  15609. holdbar% = copystartbar%
  15610. IF repeatposit$ = "y" THEN
  15611. PRINT'" bar ";copystartbar%;" beat ";copystartbeat%;"?"
  15612. PRINT" (for OK press 0, if not OK press X)"
  15613. CASE GET$ OF
  15614. WHEN"X","x" : PROCdoublestop
  15615. OTHERWISE
  15616. ENDCASE
  15617. ELSE
  15618. INPUT" beat "beats%
  15619. ENDIF
  15620. PROCalterbeats : copystartbeat% = beats%
  15621. holdbeat% = copystartbeat%
  15622. IF justone$ = "n" THEN
  15623. PRINT'" Ending at bar "
  15624. INPUT" (for last type 0) "copyendbar%
  15625. IF copyendbar% > 0 THEN
  15626. INPUT " beat "beats%
  15627. PROCalterbeats : copyendbeat% = beats%
  15628. ENDIF
  15629. ELSE
  15630. copyendbar% = copystartbar%
  15631. copyendbeat% = copystartbeat%
  15632. ENDIF
  15633. :
  15634. CLS
  15635. PRINT'" On what percentage of occasions do you want a potential "
  15636. PRINT" double-stop to be allowed? "
  15637. INPUT'" (a) following a single-stop... "singlechance%
  15638. INPUT'" (b) following a double-stop... "doublechance%
  15639. :
  15640. FOR run% = 0 TO 1
  15641. IF run% = 0 THEN voice% = stringvoice% ELSE voice% = treatvoice%
  15642. value% = (copystartbar%*10^3)+copystartbeat%
  15643. IF value% <= array%(0,0,voice%)DIV10^3 THEN
  15644. startatcell% = 0
  15645. ELSE
  15646. PROCsearch(value%)
  15647. startatcell% = startcell%
  15648. ENDIF
  15649. IF copyendbar% = 0 THEN
  15650. endatcell% = numusedcells%(voice%) - 1
  15651. ELSE
  15652. value% = (copyendbar%*10^3)+copyendbeat%
  15653. IF value% >= array%(numusedcells%(voice%)-1,0,voice%)DIV10^3 THEN
  15654. endatcell% = numusedcells%(voice%) - 1
  15655. ELSE
  15656. PROCsearch(value%)
  15657. IF shunt$ = "N" THEN endatcell% = startcell% ELSE endatcell% = startcell% - 1
  15658. ENDIF
  15659. ENDIF
  15660. :
  15661. manyattacks% = endatcell% - startatcell% + 1
  15662. REM create 'gap' between beat-of-bar and first actual attack
  15663. carrybars% = (array%(startatcell%,0,voice%)DIV10^6)-copystartbar%
  15664. carrybeats% = ((array%(startatcell%,0,voice%)DIV10^3)MOD10^3)-copystartbeat%
  15665. attacks1%(0) = (carrybars%*960)+carrybeats%
  15666. :
  15667. IF copymove$ = "DS" THEN
  15668. FOR count% = 0 TO (manyattacks%-1)
  15669. IF count% > 0 THEN
  15670. carrybars% = (array%(startatcell%+count%,0,voice%)DIV10^6)-(array%(startatcell%+count%-1,0,voice%)DIV10^6)
  15671. carrybeats% = ((array%(startatcell%+count%,0,voice%)DIV10^3)MOD10^3)-((array%(startatcell%+count%-1,0,voice%)DIV10^3)MOD10^3)
  15672. attacks1%(count%) = attacks1%(count%-1) + ((carrybars%*960)+carrybeats%)
  15673. ENDIF
  15674. :
  15675. pitches%(count%) = array%(startatcell%+count%,0,voice%)MOD10^3
  15676. IF run% = 0 THEN
  15677. pitch% = pitches%(count%)
  15678. PROCopenstgs
  15679. ENDIF
  15680. dur% = (array%(startatcell%+count%,1,voice%)DIV10)MOD10^3
  15681. brrr% = array%(startatcell%+count%,0,voice%)DIV10^6 : PROCreconvertdur
  15682. durations%(count%) = dur%
  15683. amplitudes%(count%) = (array%(startatcell%+count%,1,voice%))MOD10
  15684. envelopes%(count%) = (array%(startatcell%+count%,2,voice%))DIV10^2
  15685. glissandos%(count%) = (array%(startatcell%+count%,1,voice%)DIV10^4)
  15686. inflections%(count%) = array%(startatcell%+count%,2,voice%)MOD10^2
  15687. NEXT
  15688. ENDIF
  15689. NEXT run%
  15690. :
  15691. :
  15692. firstcutoff% = 0
  15693. secondcutoff% = 0
  15694. :
  15695. FOR count% = 0 TO (manyattacks%-1)
  15696. :
  15697. REM determine state before making decision
  15698. state$ = "tacet"
  15699. IF firstcutoff% > attacks1%(count%) THEN state$ = "single1"
  15700. IF secondcutoff% > attacks1%(count%) AND state$ = "tacet" THEN state$ = "single2"
  15701. IF secondcutoff% > attacks1%(count%) AND state$ = "single1" THEN state$ = "double"
  15702. :
  15703. CASE state$ OF
  15704. WHEN "tacet" :
  15705. dsvoice%(count%) = firstvoice%
  15706. firstcutoff% = attacks1%(count%) + durations%(count%)
  15707. firstcount% = count%
  15708. firststg% = openstgs%(count%)
  15709. :
  15710. WHEN "single1" :
  15711. newstg$ = "nonadj"
  15712. IF firststg% = openstgs%(count%) THEN newstg$ = "same"
  15713. IF firststg% = (openstgs%(count%)-1) OR firststg% = (openstgs%(count%)+1) THEN newstg$ = "adj"
  15714. :
  15715. CASE newstg$ OF
  15716. WHEN "same" :
  15717. dsvoice%(count%) = firstvoice%
  15718. firstcutoff% = attacks1%(count%) + durations%(count%)
  15719. firststg% = openstgs%(count%)
  15720. REM clip duration of interrupted note
  15721. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15722. firstcount% = count%
  15723. WHEN "adj" :
  15724. PROCsingleprob
  15725. IF ds$ = "n" THEN
  15726. dsvoice%(count%) = firstvoice%
  15727. firstcutoff% = attacks1%(count%) + durations%(count%)
  15728. firststg% = openstgs%(count%)
  15729. REM clip duration of interrupted note
  15730. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15731. firstcount% = count%
  15732. ELSE
  15733. dsvoice%(count%) = secondvoice%
  15734. secondcutoff% = attacks1%(count%) + durations%(count%)
  15735. secondcount% = count%
  15736. secondstg% = openstgs%(count%)
  15737. ENDIF
  15738. WHEN "nonadj" :
  15739. dsvoice%(count%) = firstvoice%
  15740. firstcutoff% = attacks1%(count%) + durations%(count%)
  15741. firststg% = openstgs%(count%)
  15742. REM clip duration of interrupted note and add slight 'rest'
  15743. durations%(firstcount%) = attacks1%(count%) - (attacks1%(firstcount%)+60)
  15744. IF durations%(firstcount%) <0 THEN durations%(firstcount%) = 1
  15745. firstcount% = count%
  15746. ENDCASE
  15747. :
  15748. WHEN "single2" :
  15749. newstg$ = "nonadj"
  15750. IF secondstg% = openstgs%(count%) THEN newstg$ = "same"
  15751. IF secondstg% = (openstgs%(count%)-1) OR secondstg% = (openstgs%(count%)+1) THEN newstg$ = "adj"
  15752. :
  15753. CASE newstg$ OF
  15754. WHEN "same" :
  15755. dsvoice%(count%) = secondvoice%
  15756. secondcutoff% = attacks1%(count%) + durations%(count%)
  15757. secondstg% = openstgs%(count%)
  15758. REM clip duration of interrupted note
  15759. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15760. secondcount% = count%
  15761. WHEN "adj" :
  15762. PROCsingleprob
  15763. IF ds$ = "n" THEN
  15764. dsvoice%(count%) = secondvoice%
  15765. secondcutoff% = attacks1%(count%) + durations%(count%)
  15766. secondstg% = openstgs%(count%)
  15767. REM clip duration of interrupted note
  15768. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15769. secondcount% = count%
  15770. ELSE
  15771. dsvoice%(count%) = firstvoice%
  15772. firstcutoff% = attacks1%(count%) + durations%(count%)
  15773. firstcount% = count%
  15774. firststg% = openstgs%(count%)
  15775. ENDIF
  15776. WHEN "nonadj" :
  15777. dsvoice%(count%) = secondvoice%
  15778. secondcutoff% = attacks1%(count%) + durations%(count%)
  15779. secondstg% = openstgs%(count%)
  15780. REM clip duration of interrupted note and add slight 'rest'
  15781. durations%(secondcount%) = attacks1%(count%) - (attacks1%(secondcount%)+60)
  15782. IF durations%(secondcount%) <0 THEN durations%(secondcount%) = 1
  15783. secondcount% = count%
  15784. ENDCASE
  15785. :
  15786. WHEN "double" :
  15787. newstg$ = "nonadj"
  15788. IF openstgs%(count%) = firststg% THEN newstg$ = "sameasfirst"
  15789. IF openstgs%(count%) = secondstg% THEN newstg$ = "sameassecond"
  15790. IF (openstgs%(count%) = (firststg%-1) OR openstgs%(count%) = (firststg%+1)) AND openstgs%(count%) <> secondstg% THEN newstg$ = "adjtofirst"
  15791. IF (openstgs%(count%) = (secondstg%-1) OR openstgs%(count%) = (secondstg%+1)) AND openstgs%(count%) <> firststg% THEN newstg$ = "adjtosecond"
  15792. :
  15793. CASE newstg$ OF
  15794. WHEN "sameasfirst" :
  15795. PROCdoubleprob
  15796. IF ds$ = "n" THEN
  15797. dsvoice%(count%) = firstvoice%
  15798. firstcutoff% = attacks1%(count%) + durations%(count%)
  15799. firststg% = openstgs%(count%)
  15800. REM clip durations of both interrupted notes
  15801. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15802. firstcount% = count%
  15803. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15804. secondcutoff% = attacks1%(secondcount%) + durations%(secondcount%)
  15805. ELSE
  15806. dsvoice%(count%) = firstvoice%
  15807. firstcutoff% = attacks1%(count%) + durations%(count%)
  15808. firststg% = openstgs%(count%)
  15809. REM clip duration of interrupted note
  15810. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15811. firstcount% = count%
  15812. ENDIF
  15813. WHEN "sameassecond" :
  15814. PROCdoubleprob
  15815. IF ds$ = "n" THEN
  15816. dsvoice%(count%) = secondvoice%
  15817. secondcutoff% = attacks1%(count%) + durations%(count%)
  15818. secondstg% = openstgs%(count%)
  15819. REM clip durations of both interrupted notes
  15820. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15821. secondcount% = count%
  15822. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15823. firstcutoff% = attacks1%(firstcount%) + durations%(firstcount%)
  15824. ELSE
  15825. dsvoice%(count%) = secondvoice%
  15826. secondcutoff% = attacks1%(count%) + durations%(count%)
  15827. secondstg% = openstgs%(count%)
  15828. REM clip duration of interrupted note
  15829. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15830. secondcount% = count%
  15831. ENDIF
  15832. WHEN "adjtofirst" :
  15833. PROCdoubleprob
  15834. IF ds$ = "n" THEN
  15835. dsvoice%(count%) = firstvoice%
  15836. firstcutoff% = attacks1%(count%) + durations%(count%)
  15837. firststg% = openstgs%(count%)
  15838. REM clip durations of both interrupted notes
  15839. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15840. firstcount% = count%
  15841. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15842. secondcutoff% = attacks1%(secondcount%) + durations%(secondcount%)
  15843. ELSE
  15844. dsvoice%(count%) = secondvoice%
  15845. secondcutoff% = attacks1%(count%) + durations%(count%)
  15846. secondstg% = openstgs%(count%)
  15847. REM clip duration of interrupted note
  15848. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15849. secondcount% = count%
  15850. ENDIF
  15851. WHEN "adjtosecond" :
  15852. PROCdoubleprob
  15853. IF ds$ = "n" THEN
  15854. dsvoice%(count%) = secondvoice%
  15855. secondcutoff% = attacks1%(count%) + durations%(count%)
  15856. secondstg% = openstgs%(count%)
  15857. REM clip durations of both interrupted notes
  15858. durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
  15859. secondcount% = count%
  15860. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15861. firstcutoff% = attacks1%(firstcount%) + durations%(firstcount%)
  15862. ELSE
  15863. dsvoice%(count%) = firstvoice%
  15864. firstcutoff% = attacks1%(count%) + durations%(count%)
  15865. firststg% = openstgs%(count%)
  15866. REM clip duration of interrupted note
  15867. durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
  15868. firstcount% = count%
  15869. ENDIF
  15870. WHEN "nonadj" :
  15871. dsvoice%(count%) = firstvoice%
  15872. firstcutoff% = attacks1%(count%) + durations%(count%)
  15873. firststg% = openstgs%(count%)
  15874. REM clip durations of both interrupted notes and add 'rests'
  15875. durations%(firstcount%) = attacks1%(count%) - (attacks1%(firstcount%)+60)
  15876. IF durations%(firstcount%) <0 THEN durations%(firstcount%) = 1
  15877. firstcount% = count%
  15878. durations%(secondcount%) = attacks1%(count%) - (attacks1%(secondcount%)+60)
  15879. IF durations%(secondcount%) <0 THEN durations%(secondcount%) = 1
  15880. secondcutoff% = attacks1%(secondcount%) + durations%(secondcount%)
  15881. ENDCASE
  15882. :
  15883. ENDCASE
  15884. :
  15885. NEXT
  15886. :
  15887. :
  15888. numpitches% = manyattacks% : method$ = "raw" : copyit$ = "ON" : justone$ = "n"
  15889. : repeatposit$ = "n" : reordered$ = "n" : equalized$ = "n" : rhythmicized$ = "n"
  15890. :
  15891. : startat% = (copystartbar%*(10^3))+copystartbeat%
  15892. attacks2%() = attacks1%()
  15893. :
  15894. attacks2%() = attacks2%() + (startat% MOD 10^3) : REM moves attacks further up bar, if necc
  15895. :
  15896. attacks3%() = attacks2%()
  15897. FOR count% = 0 TO (manyattacks%-1)
  15898. attacks3%(count%) = attacks3%(count%) DIV 960
  15899. NEXT
  15900. REM gives list of bar mos starting at 0
  15901. :
  15902. attacks3%() = attacks3%() * 960
  15903. attacks2%() = attacks2%() - attacks3%()
  15904. attacks3%() = attacks3%() / 960
  15905. REM list of actual beat numbers
  15906. :
  15907. attacks3%() = attacks3%() + (startat% DIV 10^3) : REM list of actual bar nos
  15908. :
  15909. attacks3%() = attacks3%()*(10^3)
  15910. attacks2%() = attacks2%() + attacks3%()
  15911. REM list of actual bar/beat numbers
  15912. :
  15913. :
  15914. addingnotes$ = "y"
  15915. :
  15916. FOR counter% = 0 TO (manyattacks%-1)
  15917. voice% = dsvoice%(counter%)
  15918. PROCnewnotereception(voice%, (attacks2%(counter%)DIV10^3), (attacks2%(counter%)MOD10^3), pitches%(counter%), amplitudes%(counter%), envelopes%(counter%), durations%(counter%), glissandos%(counter%), inflections%(counter%))
  15919. NEXT
  15920. :
  15921. copyit$ = "OFF" : displayedfunc$ = "n" : PROCdisplay
  15922. :
  15923. ENDPROC
  15924. :
  15925. REM******************************************************************
  15926. :
  15927. DEF PROCopenstgs
  15928. :
  15929. CASE member$ OF
  15930. WHEN "violin" :
  15931. CASE pitch% OF
  15932. WHEN 255 : openstgs%(count%) = 1
  15933. WHEN 554 : openstgs%(count%) = 2
  15934. WHEN 154 : openstgs%(count%) = 3
  15935. WHEN 453 : openstgs%(count%) = 4
  15936. OTHERWISE
  15937. VDU 7 : PRINT "NOT AN OPEN STRING"
  15938. PRINT "press C to continue"
  15939. CASE GET$ OF
  15940. ENDCASE
  15941. PROCdoublestop
  15942. ENDCASE
  15943. :
  15944. WHEN "viola" :
  15945. CASE pitch% OF
  15946. WHEN 554 : openstgs%(count%) = 1
  15947. WHEN 154 : openstgs%(count%) = 2
  15948. WHEN 453 : openstgs%(count%) = 3
  15949. WHEN 53 : openstgs%(count%) = 4
  15950. OTHERWISE
  15951. VDU 7 : PRINT "NOT AN OPEN STRING"
  15952. PRINT "press C to continue"
  15953. CASE GET$ OF
  15954. ENDCASE
  15955. PROCdoublestop
  15956. ENDCASE
  15957. :
  15958. WHEN "cello" :
  15959. CASE pitch% OF
  15960. WHEN 553 : openstgs%(count%) = 1
  15961. WHEN 153 : openstgs%(count%) = 2
  15962. WHEN 452 : openstgs%(count%) = 3
  15963. WHEN 52 : openstgs%(count%) = 4
  15964. OTHERWISE
  15965. VDU 7 : PRINT "NOT AN OPEN STRING"
  15966. PRINT "press C to continue"
  15967. CASE GET$ OF
  15968. ENDCASE
  15969. PROCdoublestop
  15970. ENDCASE
  15971. :
  15972. WHEN "bass" :
  15973. CASE pitch% OF
  15974. WHEN 452 : openstgs%(count%) = 1
  15975. WHEN 152 : openstgs%(count%) = 2
  15976. WHEN 551 : openstgs%(count%) = 3
  15977. WHEN 251 : openstgs%(count%) = 4
  15978. OTHERWISE
  15979. VDU 7 : PRINT "NOT AN OPEN STRING"
  15980. PRINT "press C to continue"
  15981. CASE GET$ OF
  15982. ENDCASE
  15983. PROCdoublestop
  15984. ENDCASE
  15985. :
  15986. ENDCASE
  15987. :
  15988. ENDPROC
  15989. :
  15990. REM****************************************************
  15991. :
  15992. DEF PROCsingleprob
  15993. :
  15994. number% = RND(100)
  15995. IF number% > 0 AND number% <= singlechance% THEN
  15996. ds$ = "y"
  15997. ELSE
  15998. ds$ = "n"
  15999. ENDIF
  16000. ENDPROC
  16001. :
  16002. REM***************************************************
  16003. :
  16004. DEF PROCdoubleprob
  16005. :
  16006. number% = RND(100)
  16007. IF number% > 0 AND number% <= doublechance% THEN
  16008. ds$ = "y"
  16009. ELSE
  16010. ds$ = "n"
  16011. ENDIF
  16012. ENDPROC
  16013. :
  16014. REM***************************************************
  16015. :
  16016. DEF PROCsamepitches
  16017. :
  16018. PRINT' " Note name for pitch is ";
  16019. COLOUR 3
  16020. CASE GET$ OF
  16021. WHEN "C","c" : note% = 0 : PRINT "C"
  16022. WHEN "D","d" : note% = 1 : PRINT "D"
  16023. WHEN "E","e" : note% = 2 : PRINT "E"
  16024. WHEN "F","f" : note% = 3 : PRINT "F"
  16025. WHEN "G","g" : note% = 4 : PRINT "G"
  16026. WHEN "A","a" : note% = 5 : PRINT "A"
  16027. WHEN "B","b" : note% = 6 : PRINT "B"
  16028. ENDCASE
  16029. COLOUR 0
  16030. PRINT " accidental ";
  16031. COLOUR 3
  16032. CASE GET$ OF
  16033. WHEN "1" : accid% = 1 : PRINT "flat"
  16034. WHEN "2" : accid% = 2 : PRINT "3/8flat"
  16035. WHEN "3" : accid% = 3 : PRINT "1/4flat"
  16036. WHEN "4" : accid% = 4 : PRINT "1/8flat"
  16037. WHEN "5" : accid% = 5 : PRINT "nat"
  16038. WHEN "6" : accid% = 6 : PRINT "1/8shrp"
  16039. WHEN "7" : accid% = 7 : PRINT "1/4shrp"
  16040. WHEN "8" : accid% = 8 : PRINT "3/8shrp"
  16041. WHEN "9" : accid% = 9 : PRINT "shrp"
  16042. ENDCASE
  16043. COLOUR 0
  16044. PRINT " octave ";
  16045. COLOUR 3
  16046. CASE GET$ OF
  16047. WHEN "0" : octave% = 0 : PRINT "0"
  16048. WHEN "1" : octave% = 1 : PRINT "1"
  16049. WHEN "2" : octave% = 2 : PRINT "2"
  16050. WHEN "3" : octave% = 3 : PRINT "3"
  16051. WHEN "4" : octave% = 4 : PRINT "4"
  16052. WHEN "5" : octave% = 5 : PRINT "5"
  16053. WHEN "6" : octave% = 6 : PRINT "6"
  16054. WHEN "7" : octave% = 7 : PRINT "7"
  16055. WHEN "8" : octave% = 8 : PRINT "8"
  16056. ENDCASE
  16057. COLOUR 0
  16058. FOR count% = 0 TO numpitches% - 1
  16059. pitches%(count%) = (note%*100)+(accid%*10)+octave%
  16060. NEXT
  16061. :
  16062. firstpitch$ = "n" : prevnumpitches% = numpitches%
  16063. REM function can feed pitches similarly into pitches%
  16064. :
  16065. PROCinsertpitches
  16066. :
  16067. ENDPROC
  16068. :
  16069. REM*************************************************
  16070. :
  16071. DEF PROCedit
  16072. :
  16073. PROCwindow(20,60,58,39)
  16074. PRINT ' " move 1st envelope point E"
  16075. PRINT ' " move 2nd envelope point R"
  16076. PRINT ' " change 1st amplitude A"
  16077. PRINT ' " change 2nd amplitude S"
  16078. PRINT ' " change 3rd amplitude D"
  16079. PRINT ' " change 4th amplitude F"
  16080. PRINT ' " move note+following note N"
  16081. PRINT ' " move note+drag previous duration M"
  16082. PRINT ' " change duration C"
  16083. PRINT ' " then Shift + < OR >"
  16084. CASE GET$ OF
  16085. WHEN "E", "e" : editwhat$ = "1stenvelope"
  16086. WHEN "R", "r" : editwhat$ = "2ndenvelope"
  16087. WHEN "A", "a" : editwhat$ = "1stamplitude"
  16088. WHEN "S", "s" : editwhat$ = "2ndamplitude"
  16089. WHEN "D", "d" : editwhat$ = "3rdamplitude"
  16090. WHEN "F", "f" : editwhat$ = "4thamplitude"
  16091. WHEN "N", "n" : editwhat$ = "movetwo"
  16092. WHEN "M", "m" : editwhat$ = "move&drag"
  16093. WHEN "C", "c" : editwhat$ = "duration"
  16094. ENDCASE
  16095. PROCdisplay
  16096. ENDPROC
  16097. :
  16098. REM*************************************************
  16099. :
  16100. DEF PROCconvertoldenvelopes
  16101. :
  16102. REM When a/dal niente was introduced, notes with amp2%=0 had to display an envelope
  16103. REM whereas previously amp2%=0 meant "no envelope"
  16104. REM Consequently files predating this change now undesirably display "no envelope" notes as single-phase "dim a niente" notes
  16105. REM To update the old files, use this proc to give a value amp2%=9 to all notes
  16106. PROCwindow(20,60,68,45)
  16107. PRINT' " Do you want to convert all the envelopes"
  16108. PRINT" in the file back to 0 phase envelopes?"
  16109. CASE GET$ OF
  16110. WHEN "Y", "y" :
  16111. FOR voice% = 0 TO (numparts%-1)
  16112. :
  16113. FOR count% = 0 TO numusedcells%(voice%)-1
  16114. number% = array%(count%,2,voice%) DIV 10^2
  16115. array%(count%,2,voice%) = array%(count%,2,voice%) - (number%*100)
  16116. array%(count%,2,voice%) = array%(count%,2,voice%) + 900
  16117. NEXT
  16118. :
  16119. NEXT
  16120. PROCdisplay
  16121. OTHERWISE PROCdisplay
  16122. ENDCASE
  16123. ENDPROC
  16124. :
  16125. REM************************************************
  16126. :
  16127. DEF PROCkeyboardshortcuts
  16128. :
  16129. PROCwindow(2,68,97,2)
  16130. :
  16131. PRINT ' " Menu M Accel/rit by total duration T"
  16132. PRINT ' " Display menu O Accel/rit by start/end points E"
  16133. PRINT ' " Move down 1, 3/10, x many, 50 v/vv/vx/v0 Accel/rit between adjacent notes F"
  16134. PRINT ' " Move up 1, 3/10, x many, 50 ^/^^/^x/^0 Starting note for F above 1,2,3..."
  16135. PRINT ' " Move left </<</<9 Random number/with same values n/N"
  16136. PRINT ' " Move right >/>>/>9 Group of durations U"
  16137. PRINT ' " Go to bar B Quickplay top x voices (see M-V-Q) P"
  16138. PRINT ' " Go to SECTION S Quickplay 2nd voice only ;"
  16139. PRINT ' " Display x number of bars D Quickplay 3rd voice only /"
  16140. PRINT ' " Double number of bars + Quickplay top x voices, screen only ^P"
  16141. PRINT ' " Halve number of bars - Quickplay 2nd voice, screen only :"
  16142. PRINT ' " Quick display Q Quickplay 3rd voice, screem only ?"
  16143. PRINT ' " Prev Quick/Quick/Ord Display W Replay R"
  16144. PRINT ' " Top remarks left/right [/] Slavevoice function ^L"
  16145. PRINT ' " Bottom remarks left/right '/# Edit envelope voice 1, note 1,2,3... ^QWER..."
  16146. PRINT ' " [free keystroke] ~ Edit envelope voice 2, note 1,2,3... ^ASDF..."
  16147. PRINT ' " Menus easier to read @ Edit envelope voice 3, note 1,2,3... ^ZXCV..."
  16148. PRINT ' " Hard copy H Enter last value again Return"
  16149. PRINT ' " Name staves ^V Import ^I"
  16150. PRINT ' " Accel/rit A Group of attacks 0"
  16151. PRINT ' " Group of amplitudes L Group of envelopes J"
  16152. PRINT ' " Show keyboard shortcuts K Move a passage \"
  16153. PRINT ' " Distort attacks/pitches `/`` Move one note ^\"
  16154. PRINT ' " Increment calculator C Copy one note Z"
  16155. PRINT ' " Group of pitches Y Copy a passage X"
  16156. PRINT ' " Copy note x down 1/x stave(s)^x/^xx Quickdisplay x voices 1,2,3..."
  16157. PRINT ' " Delete note 1/x top stave ^O/^Ox Delete sim middle/bottom staves ^K/^M"
  16158. PRINT ' " [free keystroke] # Extract I"
  16159. PRINT ' " Fill gaps with durations G Copy successive voices to same voice S"
  16160. PRINT ' " Add 0/10/20 to copying down [/]/' Input screen voice Return 1/2/3 times"
  16161. PRINT ' " Display all voices ^= Display from which voice down ¬"
  16162. PRINT ' " Quick copy on { Quick copy off }"
  16163. PRINT ' " (press a key to continue)"
  16164. CASE GET$ OF
  16165. WHEN "c", "C" :
  16166. PROCdisplay
  16167. OTHERWISE
  16168. PROCdisplay
  16169. ENDCASE
  16170. :
  16171. ENDPROC
  16172. :
  16173. REM***************************************************************************************
  16174. :
  16175. DEF PROCmoveback
  16176. :
  16177. INPUT " Move back by how many bars "backbybars%
  16178. INPUT " and how many beats "backby%
  16179. backby% = backby%+(backbybars%*960)
  16180. :
  16181. IF backby% = 0 THEN
  16182. COLOUR 3 : PRINT' holdbackby%;"?"
  16183. CASE GET$ OF
  16184. WHEN "N","n" : COLOUR 0 : PROCmoveback
  16185. OTHERWISE backby% = holdbackby%
  16186. ENDCASE
  16187. COLOUR 0
  16188. ENDIF
  16189. :
  16190. holdbackby% = backby%
  16191. beats% = beats% - backby%
  16192. REPEAT
  16193. IF beats% < 0 THEN
  16194. REPEAT
  16195. beats% = 960 + beats%
  16196. bars% -= 1
  16197. UNTIL beats% >= 0
  16198. ENDIF
  16199. :
  16200. ENDPROC
  16201. :
  16202. REM******************************************************************************************
  16203. :
  16204. DEF PROCmoveforward
  16205. :
  16206. INPUT " Move forward by how many bars "backbybars%
  16207. INPUT " and how many beats "backby%
  16208. backby% = backby%+(backbybars%*960)
  16209. :
  16210. IF backby% = 0 THEN
  16211. COLOUR 3 : PRINT' holdbackby%;"?"
  16212. CASE GET$ OF
  16213. WHEN "N","n" : COLOUR 0 : PROCmoveforward
  16214. OTHERWISE backby% = holdbackby%
  16215. ENDCASE
  16216. COLOUR 0
  16217. ENDIF
  16218. :
  16219. holdbackby% = backby%
  16220. beats% = beats% + backby%
  16221. REPEAT
  16222. IF beats% > 960 THEN
  16223. REPEAT
  16224. beats% = beats% - 960
  16225. bars% += 1
  16226. UNTIL beats% <= 960
  16227. ENDIF
  16228. :
  16229. ENDPROC
  16230. :
  16231. REM******************************************************************************************
  16232. :
  16233. DEF PROCpitchstring3
  16234. :
  16235. IF easiermenus$ = "n" THEN PROCwindow(20,69,60,55) ELSE PROCwindow(20,69,60,42)
  16236. PRINT'" Return a random pitch-class having"
  16237. PRINT" pre-defined its probability "
  16238. PRINT'" Use previous shares or re-define (P/R)? "
  16239. CASE GET$ OF
  16240. WHEN "r","R" :
  16241. :
  16242. totalshares% = 0
  16243. INPUT '" C nat has how many shares "many%
  16244. cnat% = 0 + many% : totalshares% += many%
  16245. INPUT '" C sharp has how many shares "many%
  16246. cshrp% = cnat% + many% : totalshares% += many%
  16247. INPUT '" D nat has how many shares "many%
  16248. dnat% = cshrp% + many% : totalshares% += many%
  16249. INPUT '" D sharp has how many shares "many%
  16250. dshrp% = dnat% + many% : totalshares% += many%
  16251. INPUT '" E nat has how many shares "many%
  16252. enat% = dshrp% + many% : totalshares% += many%
  16253. INPUT '" F nat has how many shares "many%
  16254. fnat% = enat% + many% : totalshares% += many%
  16255. INPUT '" F sharp has how many shares "many%
  16256. fshrp% = fnat% + many% : totalshares% += many%
  16257. INPUT '" G nat has how many shares "many%
  16258. gnat% = fshrp% + many% : totalshares% += many%
  16259. INPUT '" G sharp has how many shares "many%
  16260. gshrp% = gnat% + many% : totalshares% += many%
  16261. INPUT '" A nat has how many shares "many%
  16262. anat% = gshrp% + many% : totalshares% += many%
  16263. INPUT '" A sharp has how many shares "many%
  16264. ashrp% = anat% + many% : totalshares% += many%
  16265. INPUT '" B nat has how many shares "many%
  16266. bnat% = ashrp% + many% : totalshares% += many%
  16267. OTHERWISE
  16268. ENDCASE
  16269. throw% = RND(totalshares%)
  16270. IF throw% > 0 AND throw% <= cnat% THEN note$ = "C nat"
  16271. IF throw% > cnat% AND throw% <= cshrp% THEN note$ = "C sharp"
  16272. IF throw% > cshrp% AND throw% <= dnat% THEN note$ = "D nat"
  16273. IF throw% > dnat% AND throw% <= dshrp% THEN note$ = "D sharp"
  16274. IF throw% > dshrp% AND throw% <= enat% THEN note$ = "E nat"
  16275. IF throw% > enat% AND throw% <= fnat% THEN note$ = "F nat"
  16276. IF throw% > fnat% AND throw% <= fshrp% THEN note$ = "F sharp"
  16277. IF throw% > fshrp% AND throw% <= gnat% THEN note$ = "G nat"
  16278. IF throw% > gnat% AND throw% <= gshrp% THEN note$ = "G sharp"
  16279. IF throw% > gshrp% AND throw% <= anat% THEN note$ = "A nat"
  16280. IF throw% > anat% AND throw% <= ashrp% THEN note$ = "A sharp"
  16281. IF throw% > ashrp% AND throw% <= bnat% THEN note$ = "B nat"
  16282. PRINT ''" note = ";note$
  16283. PRINT '" use this? "
  16284. CASE GET$ OF
  16285. WHEN "n","N" :
  16286. PROCpitchstring3
  16287. OTHERWISE
  16288. ENDCASE
  16289. INPUT'" which octave "octave%
  16290. IF octave% > 0 THEN sameoctave% = octave%
  16291. IF octave% = 0 THEN octave% = sameoctave%
  16292. CASE note$ OF
  16293. WHEN "C nat" : note% = 0 : accid% = 5 : octave% = octave%
  16294. WHEN "C sharp" : note% = 0 : accid% = 9 : octave% = octave%
  16295. WHEN "D nat" : note% = 1 : accid% = 5 : octave% = octave%
  16296. WHEN "D sharp" : note% = 1 : accid% = 9 : octave% = octave%
  16297. WHEN "E nat" : note% = 2 : accid% = 5 : octave% = octave%
  16298. WHEN "F nat" : note% = 3 : accid% = 5 : octave% = octave%
  16299. WHEN "F sharp" : note% = 3 : accid% = 9 : octave% = octave%
  16300. WHEN "G nat" : note% = 4 : accid% = 5 : octave% = octave%
  16301. WHEN "G sharp" : note% = 4 : accid% = 9 : octave% = octave%
  16302. WHEN "A nat" : note% = 5 : accid% = 5 : octave% = octave%
  16303. WHEN "A sharp" : note% = 5 : accid% = 9 : octave% = octave%
  16304. WHEN "B nat" : note% = 6 : accid% = 5 : octave% = octave%
  16305. ENDCASE
  16306. numpitches% = 1 : pitches%(0) = (note%*100)+(accid%*10)+octave%
  16307. PROCinsertpitches
  16308. :
  16309. ENDPROC
  16310. :
  16311. REM******************************************************************
  16312. :
  16313. DEF PROCincrementcalc
  16314. :
  16315. PROCwindow(15,71,89,45)
  16316. CLS
  16317. :
  16318. PRINT'" As it is written, Accel/Rit allows no.attacks and rate"
  16319. PRINT" to be defined in one mode, or start/finish durs in the other"
  16320. PRINT" but not start dur AND a defined rate together (and just to"
  16321. PRINT" complicate things, the resultant rate in fact varies in different"
  16322. PRINT" contexts). If you want, say, a closely defined quickend and"
  16323. PRINT" also a closely defined rate of rit, to get this in accel/Rit"
  16324. PRINT" you will also need to know IN ADVANCE what the end dur will be"
  16325. PRINT" so as to input this when using Accel/Rit in its second mode."
  16326. PRINT" The proceedure below is for finding precisely this."
  16327. :
  16328. count% = 1
  16329. INPUT'" First type the start duration "value
  16330. PRINT'" then the arithmetic rate of increment (not the Accel/Rit rate)"
  16331. INPUT" as a decimal number "factor
  16332. total% = value
  16333. INPUT'" and finally the total duration "reqtotal%
  16334. PRINT'" (then press a key for successive increments)"
  16335. PRINT'count%;". duration = ";value;" total = ";total%
  16336. REPEAT
  16337. CASE GET$ OF
  16338. OTHERWISE
  16339. count% += 1
  16340. value = value * factor
  16341. total% = total% + value
  16342. gap% = reqtotal% - total%
  16343. value% = value DIV 1
  16344. PRINT'count%;". duration = ";value%;" total = ";total%;" (";gap%;" short of required total)"
  16345. ENDCASE
  16346. UNTIL gap% <0
  16347. :
  16348. PRINT'" (to return to display press F)"
  16349. REPEAT
  16350. key$ = GET$
  16351. IF key$ = "f" THEN PROCdisplay ELSE VDU 7
  16352. UNTIL key$ = "f"
  16353. ENDPROC
  16354. :
  16355. REM*********************************************************************************
  16356. :
  16357. DEF PROCchangeclef
  16358. :
  16359. REM IF easiermenus$ = "n" THEN PROCwindow(20,69,65,55) ELSEPROCwindow(20,69,65,42)
  16360. CLS
  16361. INPUT'" Change clef for which voice "itsvoice%
  16362. INPUT'" How many staves does this voice have "numstaves$
  16363. PRINT'" And what is/are its clefs (P/T/B/D or"
  16364. INPUT" PP/PT etc.) "clef$
  16365. :
  16366. insts$(itsvoice%,2) = numstaves$
  16367. insts$(itsvoice%,1) = clef$
  16368. :
  16369. ENDPROC
  16370. :
  16371. REM**********************************************************************************
  16372. :
  16373. DEF PROCrandomassign
  16374. :
  16375. CLS
  16376. INPUT'" between voice "first%
  16377. IF first% = 0 THEN firs% = 1
  16378. INPUT'" and voice (for last press 0) "last%
  16379. IF last% = 0 THEN last% = numparts%
  16380. :
  16381. INPUT '" using how many of the 19 voices "no%
  16382. taken%() = 0
  16383. :
  16384. FOR count% = 1 TO no%
  16385. result$ = "failure"
  16386. REPEAT
  16387. voice% = RND(19)
  16388. IF taken%(voice%) = 0 THEN
  16389. taken%(voice%) = 1
  16390. result$ = "success"
  16391. ENDIF
  16392. UNTIL result$ = "success"
  16393. NEXT
  16394. :
  16395. FOR count% = first% TO last%
  16396. REPEAT
  16397. x% = RND(19)
  16398. UNTIL taken%(x%) = 1
  16399. :
  16400. CASE x% OF
  16401. WHEN 1 : IF type$ = "drums" THEN waveforms$(count%) = "Timpani" ELSE waveforms$(count%) = "RecorderGb"
  16402. WHEN 2 : IF type$ = "drums" THEN waveforms$(count%) = "TimpCresBb" ELSE waveforms$(count%) = "PiccoloE"
  16403. WHEN 3 : IF type$ = "drums" THEN waveforms$(count%) = "TimpRollEb" ELSE waveforms$(count%) = "SaxSoprnoE"
  16404. WHEN 4 : IF type$ = "drums" THEN waveforms$(count%) = "TimpLowBb" ELSE waveforms$(count%) = "SaxEbBarC"
  16405. WHEN 5 : IF type$ = "drums" THEN waveforms$(count%) = "BassDrum" ELSE waveforms$(count%) = "SaxBbTenrE"
  16406. WHEN 7 : IF type$ = "drums" THEN waveforms$(count%) = "BDGatedRev" ELSE waveforms$(count%) = "BugleC"
  16407. WHEN 8 : IF type$ = "drums" THEN waveforms$(count%) = "BDMarching" ELSE waveforms$(count%) = "Trombone1"
  16408. WHEN 9 : IF type$ = "drums" THEN waveforms$(count%) = "BDPiloMute" ELSE waveforms$(count%) = "Trumpet"
  16409. WHEN 10 : IF type$ = "drums" THEN waveforms$(count%) = "CongaHi" ELSE waveforms$(count%) = "EngHornGb"
  16410. WHEN 11 : IF type$ = "drums" THEN waveforms$(count%) = "CongaMid" ELSE waveforms$(count%) = "ClarinetBb"
  16411. WHEN 12 : IF type$ = "drums" THEN waveforms$(count%) = "CongaSmCl" ELSE waveforms$(count%) = "ClarVibEb"
  16412. WHEN 14 : IF type$ = "drums" THEN waveforms$(count%) = "ElecTom1" ELSE waveforms$(count%) = "BassoonEb"
  16413. WHEN 16 : IF type$ = "drums" THEN waveforms$(count%) = "RotoTomRev" ELSE waveforms$(count%) = "FlugelHnEb"
  16414. WHEN 15 : IF type$ = "drums" THEN waveforms$(count%) = "SimmonsBD1" ELSE waveforms$(count%) = "CornetEb"
  16415. WHEN 13 : IF type$ = "drums" THEN waveforms$(count%) = "Snare" ELSE waveforms$(count%) = "TubaGb"
  16416. WHEN 6 : IF type$ = "drums" THEN waveforms$(count%) = "SnareEcho" ELSE waveforms$(count%) = "BassBowAb"
  16417. WHEN 17 : IF type$ = "drums" THEN waveforms$(count%) = "SynTom" ELSE waveforms$(count%) = "JapFlute"
  16418. WHEN 18 : IF type$ = "drums" THEN waveforms$(count%) = "TablaHi" ELSE waveforms$(count%) = "EnsWodAb45"
  16419. WHEN 19 : IF type$ = "drums" THEN waveforms$(count%) = "Tomtom1" ELSE waveforms$(count%) = "Bass"
  16420. ENDCASE
  16421. NEXT
  16422. :
  16423. PROCwindow(20,72,83,25)
  16424. VDU 14
  16425. PRINT'" Current assignations are now "
  16426. PRINT " (press Ctrl-Shift to scroll down) "
  16427. FOR count% = 1 TO numparts%
  16428. IF waveforms$(count%) <> "" THEN
  16429. PRINT'" voice ";count%;
  16430. IF insts$(count%,0)<> "" THEN PRINT " (";insts$(count%,0);")";
  16431. PRINT " - ";waveforms$(count%)
  16432. ENDIF
  16433. NEXT
  16434. VDU 15
  16435. PRINT'" Do you want to keep these, reassign,"
  16436. PRINT " use WaveSynth-Beep defaults, "
  16437. PRINT " randomly assign sustaining/dry instruments/drums "
  16438. PRINT " to all staves, or assign in groups "
  16439. PRINT " (K/R/W/S/D/M/G) "
  16440. CASE GET$ OF
  16441. WHEN "R","r" : defaultvoices$ = "n" : PROCassignvoices : PROCdisplay
  16442. WHEN "W","w" : defaultvoices$ = "y" : PROCassignvoices : PROCdisplay
  16443. WHEN "K","k" : defaultvoices$ = "n" : PROCdisplay
  16444. WHEN "S","s" : defaultvoices$ = "n" : type$ = "sustaining" : PROCrandomassign : PROCdisplay
  16445. WHEN "M","m" : defaultvoices$ = "n" : type$ = "drums" : PROCrandomassign : PROCdisplay
  16446. WHEN "D","d" : defaultvoices$ = "n" : PROCrandomdry : PROCdisplay
  16447. WHEN "G","g" : defaultvoices$ = "n" : PROCgroupassign : PROCdisplay
  16448. ENDCASE
  16449. :
  16450. ENDPROC
  16451. :
  16452. REM************************************************************************8
  16453. :
  16454. DEF PROCrandomdry
  16455. :
  16456. CLS
  16457. PRINT'" Group A = 'ch' sounds "
  16458. PRINT " Group B = 'donk' sounds "
  16459. PRINT " Group C = pizz sounds "
  16460. PRINT'" Select a group or to mix A+B press D, to mix A+C press E "
  16461. PRINT " to mix B+C press F, or to mix all three press G "
  16462. CASE GET$ OF
  16463. WHEN "A","a" : choice$ = "A"
  16464. WHEN "B","b" : choice$ = "B"
  16465. WHEN "C","c" : choice$ = "C"
  16466. WHEN "D","d" : choice$ = "D"
  16467. WHEN "E","e" : choice$ = "E"
  16468. WHEN "F","f" : choice$ = "F"
  16469. OTHERWISE choice$ = "G"
  16470. ENDCASE
  16471. :
  16472. INPUT'" between voice (for first press 0) "first%
  16473. IF first% = 0 THEN first% = 1
  16474. INPUT'" and voice (for last press 0) "last%
  16475. IF last% = 0 THEN last% = numparts%
  16476. :
  16477. FOR count% = first% TO last%
  16478. waveforms$(count%) = "empty"
  16479. NEXT
  16480. :
  16481. FOR count% = first% TO last%
  16482. :
  16483. REPEAT
  16484. x% = RND(19)
  16485. :
  16486. CASE x% OF
  16487. WHEN 1 : IF choice$ = "A" OR choice$ = "D" OR choice$ = "E" OR choice$ = "G" THEN waveforms$(count%) = "GuiroFast"
  16488. WHEN 2 : IF choice$ = "A" OR choice$ = "D" OR choice$ = "E" OR choice$ = "G" THEN waveforms$(count%) = "Cachichi1"
  16489. WHEN 3 : IF choice$ = "A" OR choice$ = "D" OR choice$ = "E" OR choice$ = "G" THEN waveforms$(count%) = "Cabasa"
  16490. WHEN 4 : IF choice$ = "A" OR choice$ = "D" OR choice$ = "E" OR choice$ = "G" THEN waveforms$(count%) = "HiHat"
  16491. WHEN 5 : IF choice$ = "A" OR choice$ = "D" OR choice$ = "E" OR choice$ = "G" THEN waveforms$(count%) = "HiHatFoot"
  16492. WHEN 7 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "TablaHi"
  16493. WHEN 8 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "Clave"
  16494. WHEN 9 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "AgogoWood"
  16495. WHEN 10 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "CongaHi"
  16496. WHEN 11 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "CowBell"
  16497. WHEN 12 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" waveforms$(count%) = "AgogoAfric"
  16498. WHEN 14 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "Vibe"
  16499. WHEN 16 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "Xylophone"
  16500. WHEN 15 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "AcouBass"
  16501. WHEN 13 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "AcuBassAb1"
  16502. WHEN 6 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "AcGuitar1"
  16503. WHEN 17 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "Bass"
  16504. WHEN 18 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "AcouGtr2B"
  16505. WHEN 19 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "GtrDobroB"
  16506. REM another possibility is Harp1
  16507. ENDCASE
  16508. :
  16509. UNTIL waveforms$(count%) <> "empty"
  16510. :
  16511. NEXT
  16512. :
  16513. PROCwindow(20,72,83,25)
  16514. VDU 14
  16515. PRINT'" Current assignations are now "
  16516. PRINT " (press Ctrl-Shift to scroll down) "
  16517. FOR count% = 1 TO numparts%
  16518. IF waveforms$(count%) <> "" THEN
  16519. PRINT'" voice ";count%;
  16520. IF insts$(count%,0)<> "" THEN PRINT " (";insts$(count%,0);")";
  16521. PRINT " - ";waveforms$(count%)
  16522. ENDIF
  16523. NEXT
  16524. VDU 15
  16525. PRINT'" Do you want to keep these, reassign,"
  16526. PRINT " use WaveSynth-Beep defaults, "
  16527. PRINT " randomly assign sustaining/dry instruments/drums "
  16528. PRINT " to all staves, or assign in groups "
  16529. PRINT " (K/R/W/S/D/M/G) "
  16530. CASE GET$ OF
  16531. WHEN "R","r" : defaultvoices$ = "n" : PROCassignvoices : PROCdisplay
  16532. WHEN "W","w" : defaultvoices$ = "y" : PROCassignvoices : PROCdisplay
  16533. WHEN "K","k" : defaultvoices$ = "n" : PROCdisplay
  16534. WHEN "S","s" : defaultvoices$ = "n" : type$ = "sustaining" : PROCrandomassign : PROCdisplay
  16535. WHEN "M","m" : defaultvoices$ = "n" : type$ = "drums" : PROCrandomassign : PROCdisplay
  16536. WHEN "D","d" : defaultvoices$ = "n" : PROCrandomdry : PROCdisplay
  16537. WHEN "G","g" : defaultvoices$ = "n" : PROCgroupassign : PROCdisplay
  16538. ENDCASE
  16539. :
  16540. ENDPROC
  16541. :
  16542. REM***********************************************************************************
  16543. :
  16544. DEF PROCgroupassign
  16545. :
  16546. CLS
  16547. PRINT'" Groups of voices ranging downwards are to "
  16548. PRINT " take the waveform of the first in the group "
  16549. INPUT " in batches of how many voices "gap%
  16550. INPUT'" To apply between voice "low%
  16551. INPUT " and voice "high%
  16552. :
  16553. FOR count% = 1 TO numparts%
  16554. :
  16555. IF count% >= low% AND count% <= high% THEN
  16556. :
  16557. x% = 0
  16558. REPEAT
  16559. :
  16560. IF count% > (low%+(gap%*x%)) AND count% < (low%+(gap%*(x%+1))) THEN
  16561. number% = low%+(gap%*x%)
  16562. waveforms$(count%) = waveforms$(number%)
  16563. ENDIF
  16564. :
  16565. x% = x%+1
  16566. UNTIL (low%+(gap%*x%)) > high%
  16567. :
  16568. ENDIF
  16569. :
  16570. NEXT
  16571. :
  16572. PROCwindow(20,72,83,25)
  16573. VDU 14
  16574. PRINT'" Current assignations are now "
  16575. PRINT " (press Ctrl-Shift to scroll down) "
  16576. FOR count% = 1 TO numparts%
  16577. IF waveforms$(count%) <> "" THEN
  16578. PRINT'" voice ";count%;
  16579. IF insts$(count%,0)<> "" THEN PRINT " (";insts$(count%,0);")";
  16580. PRINT " - ";waveforms$(count%)
  16581. ENDIF
  16582. NEXT
  16583. VDU 15
  16584. PRINT'" Do you want to keep these, reassign,"
  16585. PRINT " use WaveSynth-Beep defaults, "
  16586. PRINT " randomly assign sustaining/dry instruments "
  16587. PRINT " to all staves, or assign in groups "
  16588. PRINT " (K/R/W/S/D/G) "
  16589. CASE GET$ OF
  16590. WHEN "R","r" : defaultvoices$ = "n" : PROCassignvoices : PROCdisplay
  16591. WHEN "W","w" : defaultvoices$ = "y" : PROCassignvoices : PROCdisplay
  16592. WHEN "K","k" : defaultvoices$ = "n" : PROCdisplay
  16593. WHEN "S","s" : defaultvoices$ = "n" : PROCrandomassign : PROCdisplay
  16594. WHEN "D","d" : defaultvoices$ = "n" : PROCrandomdry : PROCdisplay
  16595. WHEN "G","g" : defaultvoices$ = "n" : PROCgroupassign : PROCdisplay
  16596. ENDCASE
  16597. :
  16598. ENDPROC
  16599. :
  16600. REM***********************************************************************************
  16601. :
  16602. DEF PROCpitchstring4
  16603. :
  16604. CLS
  16605. INPUT'" How many attacks "many%
  16606. PRINT'" the first note is ";
  16607. COLOUR 3
  16608. CASE GET$ OF
  16609. WHEN "c" : note1% = 0 : PRINT "C"
  16610. WHEN "d" : note1% = 1 : PRINT "D"
  16611. WHEN "e" : note1% = 2 : PRINT "E"
  16612. WHEN "f" : note1% = 3 : PRINT "F"
  16613. WHEN "g" : note1% = 4 : PRINT "G"
  16614. WHEN "a" : note1% = 5 : PRINT "A"
  16615. WHEN "b" : note1% = 6 : PRINT "B"
  16616. ENDCASE
  16617. COLOUR 0
  16618. PRINT " accidental ";
  16619. COLOUR 3
  16620. CASE GET$ OF
  16621. WHEN "1" : accid1% = 1 : PRINT " flat"
  16622. WHEN "2" : accid1% = 2 : PRINT " 3/8 flat"
  16623. WHEN "3" : accid1% = 3 : PRINT " 1/4 flat"
  16624. WHEN "4" : accid1% = 4 : PRINT " 1/8 flat"
  16625. WHEN "5" : accid1% = 5 : PRINT " natural"
  16626. WHEN "6" : accid1% = 6 : PRINT " 1/8 sharp"
  16627. WHEN "7" : accid1% = 7 : PRINT " 1/4 sharp"
  16628. WHEN "8" : accid1% = 8 : PRINT " 3/8 sharp"
  16629. WHEN "9" : accid1% = 9 : PRINT " sharp"
  16630. ENDCASE
  16631. COLOUR 0
  16632. PRINT " octave ";
  16633. COLOUR 3
  16634. CASE GET$ OF
  16635. WHEN "1" : octave1% = 1 : PRINT " octave 1"
  16636. WHEN "2" : octave1% = 2 : PRINT " octave 2"
  16637. WHEN "3" : octave1% = 3 : PRINT " octave 3"
  16638. WHEN "4" : octave1% = 4 : PRINT " octave 4"
  16639. WHEN "5" : octave1% = 5 : PRINT " octave 5"
  16640. WHEN "6" : octave1% = 6 : PRINT " octave 6"
  16641. WHEN "7" : octave1% = 7 : PRINT " octave 7"
  16642. WHEN "8" : octave1% = 8 : PRINT " octave 8"
  16643. ENDCASE
  16644. COLOUR 0
  16645. PRINT'" and the second note is ";
  16646. COLOUR 3
  16647. CASE GET$ OF
  16648. WHEN "c" : note2% = 0 : PRINT "C"
  16649. WHEN "d" : note2% = 1 : PRINT "D"
  16650. WHEN "e" : note2% = 2 : PRINT "E"
  16651. WHEN "f" : note2% = 3 : PRINT "F"
  16652. WHEN "g" : note2% = 4 : PRINT "G"
  16653. WHEN "a" : note2% = 5 : PRINT "A"
  16654. WHEN "b" : note2% = 6 : PRINT "B"
  16655. ENDCASE
  16656. COLOUR 0
  16657. PRINT " accidental ";
  16658. COLOUR 3
  16659. CASE GET$ OF
  16660. WHEN "1" : accid2% = 1 : PRINT " flat"
  16661. WHEN "2" : accid2% = 2 : PRINT " 3/8 flat"
  16662. WHEN "3" : accid2% = 3 : PRINT " 1/4 flat"
  16663. WHEN "4" : accid2% = 4 : PRINT " 1/8 flat"
  16664. WHEN "5" : accid2% = 5 : PRINT " natural"
  16665. WHEN "6" : accid2% = 6 : PRINT " 1/8 sharp"
  16666. WHEN "7" : accid2% = 7 : PRINT " 1/4 sharp"
  16667. WHEN "8" : accid2% = 8 : PRINT " 3/8 sharp"
  16668. WHEN "9" : accid2% = 9 : PRINT " sharp"
  16669. ENDCASE
  16670. COLOUR 0
  16671. PRINT " octave ";
  16672. COLOUR 3
  16673. CASE GET$ OF
  16674. WHEN "1" : octave2% = 1 : PRINT " octave 1"
  16675. WHEN "2" : octave2% = 2 : PRINT " octave 2"
  16676. WHEN "3" : octave2% = 3 : PRINT " octave 3"
  16677. WHEN "4" : octave2% = 4 : PRINT " octave 4"
  16678. WHEN "5" : octave2% = 5 : PRINT " octave 5"
  16679. WHEN "6" : octave2% = 6 : PRINT " octave 6"
  16680. WHEN "7" : octave2% = 7 : PRINT " octave 7"
  16681. WHEN "8" : octave2% = 8 : PRINT " octave 8"
  16682. ENDCASE
  16683. COLOUR 0
  16684. tick% = 1
  16685. FOR count% = 1 TO many%
  16686. IF tick% = 1 THEN
  16687. pitches%(count%-1) = (note1%*100)+(accid1%*10)+octave1%
  16688. ELSE
  16689. pitches%(count%-1) = (note2%*100)+(accid2%*10)+octave2%
  16690. ENDIF
  16691. IF tick% = 1 THEN tick% = 2 ELSE tick% = 1
  16692. NEXT
  16693. :
  16694. numpitches% = many%
  16695. PROCinsertpitches
  16696. :
  16697. ENDPROC
  16698. :
  16699. REM*********************************************************************************
  16700. :
  16701. DEF PROCcopyonenote
  16702. :
  16703. repeatposit$ = "n"
  16704. IF distort$ = "OFF" THEN dothis$ = "YES"
  16705. IF distort$ = "ON" THEN
  16706. IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
  16707. ENDIF
  16708. copymove$ = "C" : savevoice$ = "N" : justone$ = "y"
  16709. :
  16710. PROCcopy2
  16711. :
  16712. justone$ = "n"
  16713. :
  16714. ENDPROC
  16715. :
  16716. REM***********************************************************************************
  16717. :
  16718. DEF PROCcopygroupofnotes
  16719. :
  16720. repeatposit$ = "n"
  16721. IF distort$ = "OFF" THEN dothis$ = "YES"
  16722. IF distort$ = "ON" THEN
  16723. IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
  16724. ENDIF
  16725. :
  16726. copymove$ = "C" : savevoice$ = "N" : justone$ = "n"
  16727. :
  16728. PROCcopy2
  16729. :
  16730. ENDPROC
  16731. :
  16732. REM*************************************************************************************
  16733. :
  16734. DEF PROCcopydownwards
  16735. :
  16736. repeatposit$ = "n"
  16737. IF distort$ = "OFF" THEN dothis$ = "YES"
  16738. IF distort$ = "ON" THEN
  16739. IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
  16740. ENDIF
  16741. copymove$ = "C" : savevoice$ = "N" : justone$ = "y"
  16742. :
  16743. voice% = displayvoices%(startv%)
  16744. voice% = voice%-1
  16745. :
  16746. along% = copydownwards%
  16747. :
  16748. along%-=1
  16749. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  16750. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  16751. holdbar% = copystartbar%
  16752. holdbeat% = copystartbeat%
  16753. :
  16754. copyendbar% = copystartbar%
  16755. copyendbeat% = copystartbeat%
  16756. :
  16757. value% = (copystartbar%*10^3)+copystartbeat%
  16758. IF value% <= array%(0,0,voice%)DIV10^3 THEN
  16759. startatcell% = 0
  16760. ELSE
  16761. PROCsearch(value%)
  16762. startatcell% = startcell%
  16763. ENDIF
  16764. IF copyendbar% = 0 THEN
  16765. endatcell% = numusedcells%(voice%) - 1
  16766. ELSE
  16767. value% = (copyendbar%*10^3)+copyendbeat%
  16768. IF value% >= array%(numusedcells%(voice%)-1,0,voice%)DIV10^3 THEN
  16769. endatcell% = numusedcells%(voice%) - 1
  16770. ELSE
  16771. PROCsearch(value%)
  16772. IF shunt$ = "N" THEN endatcell% = startcell% ELSE endatcell% = startcell% - 1
  16773. ENDIF
  16774. ENDIF
  16775. :
  16776. manyattacks% = endatcell% - startatcell% + 1
  16777. REM create 'gap' between beat-of-bar and first actual attack
  16778. carrybars% = (array%(startatcell%,0,voice%)DIV10^6)-copystartbar%
  16779. carrybeats% = ((array%(startatcell%,0,voice%)DIV10^3)MOD10^3)-copystartbeat%
  16780. attacks1%(0) = (carrybars%*960)+carrybeats%
  16781. :
  16782. IF copymove$ = "C" OR copymove$ = "M" THEN
  16783. FOR count% = 0 TO (manyattacks%-1)
  16784. IF count% > 0 THEN
  16785. carrybars% = (array%(startatcell%+count%,0,voice%)DIV10^6)-(array%(startatcell%+count%-1,0,voice%)DIV10^6)
  16786. carrybeats% = ((array%(startatcell%+count%,0,voice%)DIV10^3)MOD10^3)-((array%(startatcell%+count%-1,0,voice%)DIV10^3)MOD10^3)
  16787. attacks1%(count%) = attacks1%(count%-1) + ((carrybars%*960)+carrybeats%)
  16788. ENDIF
  16789. :
  16790. pitches%(count%) = array%(startatcell%+count%,0,voice%)MOD10^3
  16791. dur% = (array%(startatcell%+count%,1,voice%)DIV10)MOD10^3
  16792. brrr% = array%(startatcell%+count%,0,voice%)DIV10^6 : PROCreconvertdur
  16793. durations%(count%) = dur%
  16794. amplitudes%(count%) = (array%(startatcell%+count%,1,voice%))MOD10
  16795. envelopes%(count%) = (array%(startatcell%+count%,2,voice%))DIV10^2
  16796. glissandos%(count%) = array%(startatcell%+count%,1,voice%)DIV10^4
  16797. inflections%(count%) = array%(startatcell%+count%,2,voice%)MOD10^2
  16798. NEXT
  16799. ELSE PROCextract
  16800. ENDIF
  16801. :
  16802. IF copymove$ = "M" THEN
  16803. numnotes% = manyattacks% : startcell% = startatcell%
  16804. FOR count% = startcell% TO (startcell%+(numnotes%-1))
  16805. FOR counter% = 0 TO 1
  16806. barno% = (array%(count%,0,voice%)DIV10^6)-counter%
  16807. beatnum% = ((array%(count%,0,voice%)DIV10^3)MOD10^3)
  16808. :
  16809. group1start% = (disarray%(barno%,0,voice%)DIV10^7)*beatfactor%
  16810. group1end% = group1start% + (((disarray%(barno%,0,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
  16811. IF beatnum%+(960*counter%) >= group1start% AND beatnum%+(960*counter%) <= group1end% THEN
  16812. disarray%(barno%,0,voice%) = disarray%(barno%,0,voice%)MOD10^3
  16813. ENDIF
  16814. :
  16815. group2start% = ((disarray%(barno%,0,voice%)DIV10)MOD10^2)*beatfactor%
  16816. group2end% = group2start%+((((disarray%(barno%,0,voice%)MOD10)*10)+(disarray%(barno%,1,voice%)DIV10^8))*beatfactor%)-1
  16817. IF beatnum%+(960*counter%) >= group2start% AND beatnum%+(960*counter%) <= group2end% THEN
  16818. disarray%(barno%,0,voice%) = (disarray%(barno%,0,voice%)DIV10^3)*10^3
  16819. disarray%(barno%,1,voice%) = disarray%(barno%,1,voice%)MOD10^6
  16820. ENDIF
  16821. group3start%=((disarray%(barno%,1,voice%)DIV10^4)MOD10^2)*beatfactor%
  16822. group3end% = group3start% + (((disarray%(barno%,1,voice%)MOD10^4)DIV10^2)*beatfactor%)-1
  16823. IF beatnum%+(960*counter%) >= group3start% AND beatnum%+(960*counter%) <= group3end% THEN
  16824. disarray%(barno%,1,voice%) = (disarray%(barno%,1,voice%)DIV10^6)*10^6
  16825. ENDIF
  16826. group4start% = (disarray%(barno%,2,voice%)DIV10^7)*beatfactor%
  16827. group4end% = group4start%+(((disarray%(barno%,2,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
  16828. IF beatnum%+(960*counter%) >= group4start% AND beatnum%+(960*counter%) <= group4end% THEN
  16829. disarray%(barno%,2,voice%) = disarray%(barno%,2,voice%)MOD10^3
  16830. ENDIF
  16831. group5start% = ((disarray%(barno%,2,voice%)MOD10^3)DIV10)*beatfactor%
  16832. group5end% = group5start%+((((disarray%(barno%,2,voice%)MOD10)*10)+(disarray%(barno%,3,voice%)DIV10^8))*beatfactor%)-1
  16833. IF beatnum%+(960*counter%) >= group5start% AND beatnum%+(960*counter%) <= group5end% THEN
  16834. disarray%(barno%,2,voice%) = (disarray%(barno%,2,voice%)DIV10^3)*10^3
  16835. disarray%(barno%,3,voice%) = disarray%(barno%,3,voice%)MOD10^6
  16836. ENDIF
  16837. group6start% = ((disarray%(barno%,3,voice%)DIV10^4)MOD10^2)*beatfactor%
  16838. group6end% = group6start% + (((disarray%(barno%,3,voice%)DIV10^2)MOD10^2)*beatfactor%)-1
  16839. IF beatnum%+(960*counter%) >= group6start% AND beatnum%+(960*counter%) <= group6end% THEN
  16840. disarray%(barno%,3,voice%)=(disarray%(barno%,3,voice%)DIV10^6)*10^6
  16841. ENDIF
  16842. NEXT
  16843. :
  16844. NEXT
  16845. PROCshuntleft(startcell%,numnotes%)
  16846. ENDIF
  16847. :
  16848. numpitches% = manyattacks% : method$ = "raw" : copyit$ = "ON" : copydownwards$ = "y"
  16849. :
  16850. PROCinsertattacks
  16851. :
  16852. justone$ = "n" : copydownwards$ = "n"
  16853. ENDPROC
  16854. :
  16855. REM****************************************************************
  16856. :
  16857. DEF PROCdeleteone
  16858. :
  16859. CASE deleteone$ OF
  16860. WHEN "top" :
  16861. voice% = 1
  16862. voice% = displayvoices%(startv%+voice%-1)
  16863. voice% -= 1
  16864. WHEN "middle" :
  16865. voice% = 2
  16866. voice% = displayvoices%(startv%+voice%-1)
  16867. voice% -= 1
  16868. WHEN "bottom" :
  16869. voice% = 3
  16870. voice% = displayvoices%(startv%+voice%-1)
  16871. voice% -= 1
  16872. ENDCASE
  16873. :
  16874. numnotes% = 1
  16875. :
  16876. incre$ = INKEY$(100)
  16877. IF incre$ <> "" THEN
  16878. CASE incre$ OF
  16879. WHEN "!" : along% = 1
  16880. WHEN """" : along% = 2
  16881. WHEN "£" : along% = 3
  16882. WHEN "$" : along% = 4
  16883. WHEN "%" : along% = 5
  16884. WHEN "^" : along% = 6
  16885. WHEN "&" : along% = 7
  16886. WHEN "*" : along% = 8
  16887. WHEN "(" : along% = 9
  16888. WHEN ")" : along% = 10
  16889. ENDCASE
  16890. ELSE along% = 1
  16891. ENDIF
  16892. :
  16893. IF addten$ = "y" THEN along% +=10
  16894. IF addten$ = "twenty" THEN along% +=20
  16895. :
  16896. along%-=1
  16897. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  16898. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  16899. beats% = copystartbeat%
  16900. PROCalterbeats
  16901. start% = (copystartbar%*(10^3))+beats%
  16902. PROCsearch(start%)
  16903. PROCshuntleft(startcell%,numnotes%)
  16904. :
  16905. deleteone$ = "none"
  16906. ENDPROC
  16907. :
  16908. REM**********************************************************************
  16909. :
  16910. DEF PROCpitchstring5
  16911. :
  16912. IF easiermenus$ = "n" THEN PROCwindow(20,65,60,55) ELSE PROCwindow(20,65,60,42)
  16913. PRINT'" This function returns a string"
  16914. PRINT" of pitches which recycles an"
  16915. PRINT" ascending chromatic scale,"
  16916. PRINT" useful for subsequently"
  16917. PRINT" extracting certain pitches"
  16918. INPUT'" How many semitones in the scale "numsemis%
  16919. INPUT'" How many pitches in the string "numpitches%
  16920. counter% = 0
  16921. :
  16922. FOR count% = 0 TO numpitches%-1
  16923. counter% += 1
  16924. CASE counter% OF
  16925. WHEN 1 : pitches%(count%) = 54
  16926. WHEN 2 : pitches%(count%) = 94
  16927. WHEN 3 : pitches%(count%) = 154
  16928. WHEN 4 : pitches%(count%) = 214
  16929. WHEN 5 : pitches%(count%) = 254
  16930. WHEN 6 : pitches%(count%) = 354
  16931. WHEN 7 : pitches%(count%) = 394
  16932. WHEN 8 : pitches%(count%) = 454
  16933. WHEN 9 : pitches%(count%) = 514
  16934. WHEN 10 : pitches%(count%) = 554
  16935. WHEN 11 : pitches%(count%) = 614
  16936. WHEN 12 : pitches%(count%) = 654
  16937. ENDCASE
  16938. :
  16939. IF counter% = numsemis% THEN counter% = 0
  16940. :
  16941. NEXT
  16942. :
  16943. PROCinsertpitches
  16944. ENDPROC
  16945. :
  16946. ******************************************
  16947. :
  16948. DEF PROCdurationsbetween
  16949. :
  16950. IF numdurations% = 111 THEN mode$ = "legato"
  16951. IF numdurations% = 222 THEN mode$ = "mezzostacc"
  16952. PROCwindow(20,69,60,55)
  16953. CLS
  16954. :
  16955. IF screenvoices$ = "n" THEN
  16956. INPUT' " Which voice "voice%
  16957. IF voice% = 0 THEN PROCpressenter
  16958. ELSE
  16959. PRINT'" Which screen voice "
  16960. CASE GET$ OF
  16961. WHEN "1" : voice% = 1
  16962. WHEN "2" : voice% = 2
  16963. WHEN "3" : voice% = 3
  16964. OTHERWISE PROCpressenter
  16965. ENDCASE
  16966. ENDIF
  16967. IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
  16968. voice% -= 1
  16969. IF voice% >= 0 THEN samevoice% = voice%
  16970. IF voice% = -1 THEN voice% = samevoice%
  16971. :
  16972. INPUT'" How many gaps to be filled "numdurations%
  16973. INPUT'" starting at note number "note%
  16974. IF note% = 0 THEN note% = 1
  16975. :
  16976. PROCnewnotereception(voice%,startbar%,0,0,0,0,0,0,0)
  16977. CASE option% OF
  16978. WHEN 1 : startcell% = 0
  16979. WHEN 2 : startcell% = numusedcells%(voice%)
  16980. WHEN 3 : startcell% = 0
  16981. WHEN 4 : start% = firstbar%*10^3 : PROCsearch(start%)
  16982. ENDCASE
  16983. silly% = startcell%+note%-1
  16984. :
  16985. FOR count% = 0 TO numdurations%-1
  16986. beatdiff% = ((array%(silly%+1+count%,0,voice%)DIV10^3)MOD10^3)-((array%(silly%+count%,0,voice%)DIV10^3)MOD10^3)
  16987. beatdiff%+=(((array%(silly%+1+count%,0,voice%)DIV10^6)-(array%(silly%+count%,0,voice%)DIV10^6))*960)
  16988. CASE mode$ OF
  16989. WHEN "legato" :
  16990. durations%(count%+1) = beatdiff%
  16991. OTHERWISE
  16992. durations%(count%+1) = beatdiff%/2
  16993. ENDCASE
  16994. :
  16995. NEXT
  16996. :
  16997. along% = note%-1
  16998. copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
  16999. copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
  17000. beats% = copystartbeat%
  17001. PROCalterbeats
  17002. startat% = (copystartbar%*(10^3))+beats%
  17003. :
  17004. PROCsearch(startat%)
  17005. shunt$ = "N"
  17006. :
  17007. FOR count% = startcell% TO (startcell%+(numdurations%-1))
  17008. PROCcellfill(count%,voice%,999,999,999,9,999,durations%(count%-startcell%+1),99,99)
  17009. NEXT
  17010. :
  17011. PROCdisplay
  17012. :
  17013. ENDPROC
  17014. :
  17015. REM************************************************************************88
  17016. :
  17017. DEF PROCshortmove
  17018. :
  17019. ON : PROCwindow(20,69,60,55)
  17020. CLS
  17021. repeatposit$ = "n"
  17022. IF distort$ = "OFF" THEN dothis$ = "YES"
  17023. IF distort$ = "ON" THEN
  17024. IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
  17025. ENDIF
  17026. :
  17027. IF dothis$ = "YES" THEN
  17028. copymove$ = "M" : savevoice$ = "N" : justone$ = "n"
  17029. ELSE copymove$ = "C"
  17030. ENDIF
  17031. :
  17032. PROCcopy2
  17033. IF quickextract$ = "y" THEN quickextract$ = "n"
  17034. :
  17035. ENDPROC
  17036. :
  17037. REM***********************************************************************8
  17038. :
  17039. DEF PROCshortmoveone
  17040. :
  17041. ON : PROCwindow(20,69,60,55)
  17042. CLS
  17043. repeatposit$ = "n"
  17044. IF distort$ = "OFF" THEN dothis$ = "YES"
  17045. IF distort$ = "ON" THEN
  17046. IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
  17047. ENDIF
  17048. :
  17049. IF dothis$ = "YES" THEN
  17050. copymove$ = "M" : savevoice$ = "N" : justone$ = "y"
  17051. ELSE copymove$ = "C"
  17052. ENDIF
  17053. :
  17054. PROCcopy2
  17055. IF quickextract$ = "y" THEN quickextract$ = "n"
  17056. :
  17057. ENDPROC
  17058. :
  17059. REM************************************************************************
  17060. :
  17061. DEF PROCcopysuccessively
  17062. :
  17063. IF succfirsttime$ = "y" THEN
  17064. INPUT'" Which voice "voice%
  17065. IF voice% = 0 THEN PROCpressenter
  17066. fromvoice% = voice%
  17067. succfirsttime$ = "n"
  17068. succcounter% = 0
  17069. ELSE succcounter% += 1
  17070. ENDIF
  17071. :
  17072. IF succcounter% > 0 THEN
  17073. :
  17074. fromvoice% += 1 : voice% = fromvoice%
  17075. PRINT' " That's voice ";voice%;"?"
  17076. PRINT' " (0 = yes/C = cancel successive copying) "
  17077. CASE GET$ OF
  17078. WHEN "C","c" :
  17079. copysuccessively$ = "n" : succfirsttime$ = "y" : PROCdisplay
  17080. OTHERWISE
  17081. ENDCASE
  17082. :
  17083. ENDIF
  17084. :
  17085. ENDPROC
  17086. :
  17087. REM***************************************************************************
  17088. :
  17089. DEF PROCpressenter
  17090. :
  17091. COLOUR 3
  17092. incre$ = INKEY$(50)
  17093. IF incre$ = "" THEN
  17094. IF screenvoices$ = "y" THEN
  17095. voice% = 1 : PRINT ' voice%
  17096. ELSE
  17097. voice% = displayvoices%(startv%) : PRINT ' voice%
  17098. ENDIF
  17099. ELSE
  17100. incre$ = INKEY$(50)
  17101. IF screenvoices$ = "y" THEN
  17102. IF incre$ = "" THEN voice% = 2 ELSE voice% = 3
  17103. PRINT ' voice%
  17104. ELSE
  17105. IF incre$ = "" THEN voice% = displayvoices%(startv%+1) ELSE voice% = displayvoices%(startv%+2)
  17106. PRINT ' voice%
  17107. ENDIF
  17108. ENDIF
  17109. COLOUR 0
  17110. :
  17111. ENDPROC
  17112. :
  17113. REM***************************************************************************
  17114. :
  17115. DEF PROCfornexttime
  17116. :
  17117. IF housekeepingdimmed$ = "n" THEN
  17118. DIM lastfilename$(9)
  17119. ENDIF
  17120. *Dir SDFS::RISCOSpi.$.CAC.Files
  17121. thisfilename$ = "housekeeping2"
  17122. channel = OPENOUT thisfilename$
  17123. FOR count% = 1 TO 9
  17124. PRINT#channel, lastfilename$(count%)
  17125. NEXT
  17126. CLOSE#channel
  17127. *NoDir
  17128. :
  17129. ENDPROC
  17130. :
  17131. REM****************************************************************************
  17132. :
  17133. DEF PROChousekeeping
  17134. :
  17135. IF housekeepingdimmed$ = "n" THEN
  17136. DIM lastfilename$(9) : housekeepingdimmed$ = "y"
  17137. ENDIF
  17138. *Dir SDFS::RISCOSpi.$.CAC.Files
  17139. thisfilename$ = "housekeeping2"
  17140. channel = OPENIN thisfilename$
  17141. REPEAT
  17142. FOR count% = 1 TO 9
  17143. INPUT#channel, lastfilename$(count%)
  17144. NEXT
  17145. UNTIL EOF#channel
  17146. CLOSE#channel
  17147. *NoDir
  17148. :
  17149. ENDPROC
  17150. :
  17151. REM*****************************************************************************
  17152. :
  17153. DEF PROCshuntlastfilename
  17154. :
  17155. FOR count% = 9 TO 2 STEP -1
  17156. lastfilename$(count%) = lastfilename$(count%-1)
  17157. NEXT
  17158. lastfilename$(1) = filename$
  17159. :
  17160. ENDPROC
  17161. :
  17162. REM*****************************************************************************
  17163. :
  17164. DEF PROCspecialshunt
  17165. :
  17166. FOR count% = theone% TO 2 STEP -1
  17167. lastfilename$(count%) = lastfilename$(count%-1)
  17168. NEXT
  17169. lastfilename$(1) = filename$
  17170. :
  17171. ENDPROC
  17172. :
  17173. REM******************************************************************************
  17174. :
  17175. DEF PROCroguenotes
  17176. :
  17177. FOR count% = 0 TO numparts%-1
  17178. array%(numusedcells%(count%),0,count%) = 0
  17179. NEXT
  17180. :
  17181. PROCdisplay
  17182. :
  17183. ENDPROC
  17184. :
  17185. REM*******************************************************************
  17186. :
  17187. DEF PROCnotenumberfreq
  17188. :
  17189. CASE nosevery% OF
  17190. WHEN 1 :
  17191. IF howmany% >= startnos% THEN printnumber$ = "y" ELSE printnumber$ = "n"
  17192. WHEN 2 :
  17193. howmany = howmany%/2
  17194. howmany = (howmany * 10) MOD 10
  17195. IF howmany = 5 THEN printnumber$ = "n" ELSE printnumber$ = "y"
  17196. IF howmany% < startnos% THEN printnumber$ = "n"
  17197. WHEN 4 :
  17198. howmany = howmany%/4
  17199. howmany = (howmany * 10) MOD 10
  17200. IF howmany = 2 OR howmany = 5 OR howmany = 7 THEN printnumber$ = "n" ELSE printnumber$ = "y"
  17201. IF howmany% < startnos% THEN printnumber$ = "n"
  17202. WHEN 10 :
  17203. IF howmany% MOD 10 = 0 THEN printnumber$ = "y" ELSE printnumber$ = "n"
  17204. IF howmany% < startnos% THEN printnumber$ = "n"
  17205. ENDCASE
  17206. :
  17207. ENDPROC
  17208. :
  17209. REM**************************************************************************
  17210. :
  17211. DEF PROCnotenumbersep
  17212. old% = current%
  17213. current% = hposn%-100
  17214. gap% = current%-old%
  17215. IF old% <> 0 AND howmany% > 1 THEN
  17216. IF gap% < 50 THEN lowernumber% += 20 ELSE lowernumber% = 0
  17217. IF (hposn%-100) - firsttrack% > 50 THEN
  17218. lowernumber% = 0
  17219. firsttrack% = hposn%-100
  17220. ENDIF
  17221. ENDIF
  17222. ENDPROC
  17223. :
  17224. REM****************************************************************************
  17225. :
  17226. DEF PROCpitchstring6
  17227. :
  17228. CLS
  17229. PRINT'" How many semitones high is the "
  17230. INPUT " vertical space (0 = previous) "height
  17231. IF height = 0 THEN
  17232. height = previousheight
  17233. COLOUR 3
  17234. PRINT' previousheight
  17235. COLOUR 0
  17236. ENDIF
  17237. PRINT'" and this is to be divided into "
  17238. INPUT " how many steps "steps
  17239. IF steps = 0 THEN
  17240. steps = previoussteps
  17241. COLOUR 3
  17242. PRINT' previoussteps
  17243. COLOUR 0
  17244. ENDIF
  17245. :
  17246. each = height/(steps-1)
  17247. result = 0
  17248. FOR count% = 1 TO (steps-1)
  17249. result += each
  17250. IF ((result*10)MOD10) <= 5 add$ = "n" ELSE add$ = "y"
  17251. result% = result DIV 1
  17252. IF add$ = "y" result% += 1
  17253. :
  17254. oct% = 1
  17255. IF result% > 11 THEN
  17256. REPEAT
  17257. result% -= 12
  17258. oct% += 1
  17259. UNTIL result% < 12
  17260. ENDIF
  17261. :
  17262. CASE result% OF
  17263. WHEN 0 : pitch% = 050
  17264. WHEN 1 : pitch% = 090
  17265. WHEN 2 : pitch% = 150
  17266. WHEN 3 : pitch% = 210
  17267. WHEN 4 : pitch% = 250
  17268. WHEN 5 : pitch% = 350
  17269. WHEN 6 : pitch% = 390
  17270. WHEN 7 : pitch% = 450
  17271. WHEN 8 : pitch% = 490
  17272. WHEN 9 : pitch% = 550
  17273. WHEN 10 : pitch% = 610
  17274. WHEN 11 : pitch% = 650
  17275. ENDCASE
  17276. :
  17277. pitch% += oct%
  17278. pitches%(count%) = pitch%
  17279. pitches%(0) = 051
  17280. NEXT
  17281. numpitches% = steps
  17282. :
  17283. PRINT'" Contour upwards, downwards,"
  17284. PRINT " up-down, down-up (1/2/3/4) "
  17285. CASE GET$ OF
  17286. WHEN "1" : previouscontour$ = "1"
  17287. WHEN "2" : previouscontour$ = "2" : PROCcontourdown
  17288. WHEN "3" : previouscontour$ = "3" : PROCcontourupdown
  17289. WHEN "4" : previouscontour$ = "4" : PROCcontourdownup
  17290. OTHERWISE
  17291. CASE previouscontour$ OF
  17292. WHEN "1" : COLOUR 3 : PRINT'" upwards " : COLOUR 0
  17293. wait$ = INKEY$(50)
  17294. WHEN "2" : PROCcontourdown : COLOUR 3 : PRINT' "downwards " : COLOUR 0
  17295. wait$ = INKEY$(50)
  17296. WHEN "3" : PROCcontourupdown : COLOUR 3 : PRINT'" up-down " : COLOUR 0
  17297. wait$ = INKEY$(50)
  17298. WHEN "4" : PROCcontourdownup : COLOUR 3 : PRINT' " down-up " : COLOUR 0
  17299. wait$ = INKEY$(50)
  17300. ENDCASE
  17301. ENDCASE
  17302. :
  17303. previousheight = height
  17304. previoussteps = steps
  17305. :
  17306. PROCinsertpitches
  17307. :
  17308. ENDPROC
  17309. :
  17310. REM************************************************************************8
  17311. :
  17312. DEF PROCcontourdown
  17313. :
  17314. FOR count% = 0 TO (numpitches%-1)
  17315. pitches1%(count%) = pitches%((numpitches%-1)-count%)
  17316. NEXT
  17317. FOR count% = 0 TO (numpitches%-1)
  17318. pitches%(count%) = pitches1%(count%)
  17319. NEXT
  17320. :
  17321. ENDPROC
  17322. :
  17323. REM***************************************************************************
  17324. :
  17325. DEF PROCcontourupdown
  17326. :
  17327. middle% = ((numpitches%+1)/2)-1
  17328. addnumber% = 1
  17329. minusnumber% = 0
  17330. swing$ = "add"
  17331. FOR count% = 0 TO (numpitches%-1)
  17332. IF swing$ = "subtract" THEN swing$ = "add" ELSE swing$ = "subtract"
  17333. :
  17334. IF swing$ = "add" THEN
  17335. pitches1%(middle%+addnumber%) = pitches%((numpitches%-1)-count%)
  17336. addnumber% += 1
  17337. ELSE
  17338. pitches1%(middle%-minusnumber%) = pitches%((numpitches%-1)-count%)
  17339. minusnumber% += 1
  17340. ENDIF
  17341. NEXT
  17342. :
  17343. FOR count% = 0 TO (numpitches%-1)
  17344. pitches%(count%) = pitches1%(count%)
  17345. NEXT
  17346. :
  17347. ENDPROC
  17348. :
  17349. REM******************************************************************************
  17350. :
  17351. DEF PROCcontourdownup
  17352. :
  17353. middle% = ((numpitches%+1)/2)-1
  17354. addnumber% = 1
  17355. minusnumber% = 0
  17356. swing$ = "add"
  17357. FOR count% = 0 TO (numpitches%-1)
  17358. IF swing$ = "subtract" THEN swing$ = "add" ELSE swing$ = "subtract"
  17359. :
  17360. IF swing$ = "add" THEN
  17361. pitches1%(middle%+addnumber%) = pitches%(count%)
  17362. addnumber% += 1
  17363. ELSE
  17364. pitches1%(middle%-minusnumber%) = pitches%(count%)
  17365. minusnumber% += 1
  17366. ENDIF
  17367. NEXT
  17368. :
  17369. FOR count% = 0 TO (numpitches%-1)
  17370. pitches%(count%) = pitches1%(count%)
  17371. NEXT
  17372. :
  17373. ENDPROC
  17374. :
  17375. REM**********************************************************************************
  17376. :
  17377. DEF PROCdisplayonlycontent
  17378. :
  17379. IF onlycontent$ = "n" THEN
  17380. displayvoices%() = displayvoices1%() : numvoices% = numvoices1%
  17381. ELSE
  17382. voicedone% = -1 : voicesdone% = 0 : displayvoices1%() = displayvoices%()
  17383. numvoices1% = numvoices%
  17384. FOR count% = 1 TO numvoices%
  17385. FOR counter% = startbar% TO (startbar%+numbars%-1)
  17386. voice% = displayvoices%(count%)-1
  17387. addingnotes$ = "n"
  17388. PROCnewnotereception(voice%,counter%,0,0,0,0,0,0,0)
  17389. CASE option% OF
  17390. WHEN 1 : startcell% = 0
  17391. WHEN 2 : startcell% = numusedcells%(voice%)
  17392. WHEN 3 : startcell% = 0
  17393. WHEN 4 : PROCsearch(counter%*10^3)
  17394. ENDCASE
  17395. IF array%(startcell%,0,voice%) DIV10^6 > 0 THEN
  17396. IF (array%(startcell%,0,voice%) DIV10^6) < (startbar%+numbars%) THEN
  17397. IF voice% <> voicedone% THEN
  17398. voicesdone% += 1 : displayvoices%(voicesdone%) = (voice%+1) : holddisplay%(voicesdone%) = (voice%+1)
  17399. voicedone% = voice%
  17400. ENDIF
  17401. ENDIF
  17402. ENDIF
  17403. NEXT
  17404. NEXT
  17405. :
  17406. numvoices% = voicesdone% : startv% = 1 : holdstart% = 1
  17407. :
  17408. ENDIF
  17409. :
  17410. PROCdisplay
  17411. :
  17412. ENDPROC
  17413. :
  17414. REM**********************************************************8
  17415. :
  17416. DEF PROCcontentonlylist
  17417. :
  17418. CLS
  17419. PRINT ""
  17420. voicedone% = -1
  17421. FOR count% = 1 TO numvoices%
  17422. FOR counter% = startbar% TO (startbar%+numbars%-1)
  17423. voice% = displayvoices%(count%)-1
  17424. addingnotes$ = "n"
  17425. PROCnewnotereception(voice%,counter%,0,0,0,0,0,0,0)
  17426. CASE option% OF
  17427. WHEN 1 : startcell% = 0
  17428. WHEN 2 : startcell% = numusedcells%(voice%)
  17429. WHEN 3 : startcell% = 0
  17430. WHEN 4 : PROCsearch(counter%*10^3)
  17431. ENDCASE
  17432. IF array%(startcell%,0,voice%) DIV 10^6 > 0 THEN
  17433. IF (array%(startcell%,0,voice%)) DIV 10^6 < (startbar%+numbars%) THEN
  17434. IF voice% <> voicedone% THEN
  17435. IF compress$ = "n" THEN
  17436. PRINT ' voice%+1;". ";insts$(voice%+1,0)
  17437. ELSE
  17438. PRINT voice%+1;". ";insts$(voice%+1,0)
  17439. ENDIF
  17440. voicedone% = voice%
  17441. ENDIF
  17442. ENDIF
  17443. ENDIF
  17444. NEXT
  17445. NEXT
  17446. :
  17447. PRINT'" (press R to remove the list, press C to"
  17448. PRINT'" compress/uncompress the list or press Q to"
  17449. PRINT'" go to Quickdisplay without removing the list"
  17450. CASE GET$ OF
  17451. WHEN "C","c" :
  17452. IF compress$ = "y" THEN compress$ = "n" ELSE compress$ = "y"
  17453. PROCcontentonlylist
  17454. WHEN "Q","q" : quickdisplaywindow$ = "n" : PROCquickdisplay
  17455. OTHERWISE PROCdisplay
  17456. ENDCASE
  17457. :
  17458. ENDPROC
  17459. :
  17460. REM*************************************************************
  17461. :
  17462. DEF PROCundoprepare
  17463. :
  17464. manynotesX%=manynotes%
  17465. numpartsX%=numparts%
  17466. nobarsX% =nobars%
  17467. startvX% =startv%
  17468. startv1X% =startv1%
  17469. numbarsX% =numbars%
  17470. startbarX% =startbar%
  17471. numvoicesX%=numvoices%
  17472. factorX% =factor%
  17473. beatfactorX%=beatfactor%
  17474. beamsX% =beams%
  17475. longbeatsupperX%= longbeatsupper%
  17476. longbeatslowerX%=longbeatslower%
  17477. tempoX% =tempo%
  17478. MMX% =MM%
  17479. noteheadX$=notehead$
  17480. longscoreX$= longscore$
  17481. barlinesX$ =barlines$
  17482. stavesX$ =staves$
  17483. beatsX$ =beats$
  17484. amplitudesX$= amplitudes$
  17485. namesX$ =names$
  17486. accidentalsX$=accidentals$
  17487. stemsX$=stems$
  17488. xoptionX$= xoption$
  17489. durationsX$=durations$
  17490. envelopesX$ =envelopes$
  17491. glissandosX$ =glissandos$
  17492. numwavesX% =numwaves%
  17493. manywavesX% =manywaves%
  17494. barnosoftenX%= barnosoften%
  17495. FOR c% = 0 TO (numparts%-1)
  17496. numusedcellsX%(c%)=numusedcells%(c%)
  17497. NEXT
  17498. FOR e% = 0 TO (numparts%-1)
  17499. FOR d% = 0 TO 2
  17500. FOR c% = 0 TO manynotes%
  17501. arrayX%(c%,d%,e%)=array%(c%,d%,e%)
  17502. NEXT
  17503. NEXT
  17504. NEXT
  17505. FOR c% = 0 TO numparts%
  17506. FOR d% = 0 TO 2
  17507. instsX$(c%,d%)=insts$(c%,d%)
  17508. NEXT
  17509. NEXT
  17510. FOR c% = 0 TO nobars%
  17511. FOR d% = 0 TO 3
  17512. FOR e% = 0 TO (numparts%-1)
  17513. disarrayX%(c%,d%,e%)= disarray%(c%,d%,e%)
  17514. NEXT
  17515. NEXT
  17516. NEXT
  17517. FOR c% = 0 TO numparts%
  17518. longbeamposnX%(c%) =longbeamposn%(c%)
  17519. NEXT
  17520. FOR c% = 0 TO numparts%
  17521. shortbeamposnX%(c%) =shortbeamposn%(c%)
  17522. NEXT
  17523. FOR c% = 0 TO numparts%
  17524. shortampposX%(c%)=shortamppos%(c%)
  17525. NEXT
  17526. FOR c% = 0 TO numparts%
  17527. longampposX%(c%) =longamppos%(c%)
  17528. NEXT
  17529. FOR c% = 0 TO (numparts%-1)
  17530. longstemdirX$(c%)=longstemdir$(c%)
  17531. NEXT
  17532. FOR c% = 0 TO (numparts%-1)
  17533. shortstemdirX$(c%)=shortstemdir$(c%)
  17534. NEXT
  17535. FOR c% = 0 TO numparts%
  17536. waveformsX$(c%)=waveforms$(c%)
  17537. NEXT
  17538. FOR c% = 0 TO numvoices%
  17539. displayvoicesX%(c%)=displayvoices%(c%)
  17540. NEXT
  17541. FOR c% = 0 TO 19
  17542. wformsX$(c%)=wforms$(c%)
  17543. NEXT
  17544. FOR c% = 0 TO 8
  17545. FOR d% = 0 TO 9
  17546. lvdataX%(c%,d%)= lvdata%(c%,d%)
  17547. NEXT
  17548. NEXT
  17549. FOR a% = 0 TO 47
  17550. pitchsetX%(a%)=pitchset%(a%)
  17551. NEXT
  17552. FOR a% = 0 TO 47
  17553. dursetX%(a%)=durset%(a%)
  17554. NEXT
  17555. FOR a% = 0 TO 47
  17556. ampsetX%(a%) =ampset%(a%)
  17557. NEXT
  17558. FOR a% = 0 TO 47
  17559. glisssetX%(a%)=glissset%(a%)
  17560. NEXT
  17561. FOR a% = 0 TO 47
  17562. envsetX%(a%) =envset%(a%)
  17563. NEXT
  17564. FOR a% = 0 TO nobars%
  17565. tempiX%(a%) =tempi%(a%)
  17566. NEXT
  17567. FOR a% = 0 TO nobars%
  17568. FOR b% = 0 TO 1
  17569. remarksX$(a%,b%)= remarks$(a%,b%)
  17570. NEXT
  17571. NEXT
  17572. :
  17573. ENDPROC
  17574. :
  17575. REM****************************************
  17576. :
  17577. DEF PROCundo
  17578. :
  17579. manynotes%=manynotes%
  17580. numparts%=numpartsX%
  17581. nobars% =nobarsX%
  17582. startv% =startvX%
  17583. startv1% =startv1X%
  17584. numbars% =numbarsX%
  17585. startbar% =startbarX%
  17586. numvoices%=numvoicesX%
  17587. factor% =factorX%
  17588. beatfactor%=beatfactorX%
  17589. beams% =beamsX%
  17590. longbeatsupper%= longbeatsupperX%
  17591. longbeatslower%=longbeatslowerX%
  17592. tempo% =tempoX%
  17593. MM% =MMX%
  17594. notehead$=noteheadX$
  17595. longscore$= longscoreX$
  17596. barlines$ =barlinesX$
  17597. staves$ =stavesX$
  17598. beats$ =beatsX$
  17599. amplitudes$= amplitudesX$
  17600. names$ =namesX$
  17601. accidentals$=accidentalsX$
  17602. stems$=stemsX$
  17603. xoption$= xoptionX$
  17604. durations$=durationsX$
  17605. envelopes$ =envelopesX$
  17606. glissandos$ =glissandosX$
  17607. numwaves% =numwavesX%
  17608. manywaves% =manywavesX%
  17609. barnosoften%= barnosoftenX%
  17610. FOR c% = 0 TO (numparts%-1)
  17611. numusedcells%(c%)=numusedcellsX%(c%)
  17612. NEXT
  17613. FOR e% = 0 TO (numparts%-1)
  17614. FOR d% = 0 TO 2
  17615. FOR c% = 0 TO manynotes%
  17616. array%(c%,d%,e%)=arrayX%(c%,d%,e%)
  17617. NEXT
  17618. NEXT
  17619. NEXT
  17620. FOR c% = 0 TO numparts%
  17621. FOR d% = 0 TO 2
  17622. insts$(c%,d%)=instsX$(c%,d%)
  17623. NEXT
  17624. NEXT
  17625. FOR c% = 0 TO nobars%
  17626. FOR d% = 0 TO 3
  17627. FOR e% = 0 TO (numparts%-1)
  17628. disarray%(c%,d%,e%)= disarrayX%(c%,d%,e%)
  17629. NEXT
  17630. NEXT
  17631. NEXT
  17632. FOR c% = 0 TO numparts%
  17633. longbeamposn%(c%) =longbeamposnX%(c%)
  17634. NEXT
  17635. FOR c% = 0 TO numparts%
  17636. shortbeamposn%(c%) =shortbeamposnX%(c%)
  17637. NEXT
  17638. FOR c% = 0 TO numparts%
  17639. shortamppos%(c%)=shortampposX%(c%)
  17640. NEXT
  17641. FOR c% = 0 TO numparts%
  17642. longamppos%(c%) =longampposX%(c%)
  17643. NEXT
  17644. FOR c% = 0 TO (numparts%-1)
  17645. longstemdir$(c%)=longstemdirX$(c%)
  17646. NEXT
  17647. FOR c% = 0 TO (numparts%-1)
  17648. shortstemdir$(c%)=shortstemdirX$(c%)
  17649. NEXT
  17650. FOR c% = 0 TO numparts%
  17651. waveforms$(c%)=waveformsX$(c%)
  17652. NEXT
  17653. FOR c% = 0 TO numvoices%
  17654. displayvoices%(c%)=displayvoicesX%(c%)
  17655. NEXT
  17656. FOR c% = 0 TO 19
  17657. wforms$(c%)=wformsX$(c%)
  17658. NEXT
  17659. FOR c% = 0 TO 8
  17660. FOR d% = 0 TO 9
  17661. lvdata%(c%,d%)= lvdataX%(c%,d%)
  17662. NEXT
  17663. NEXT
  17664. FOR a% = 0 TO 47
  17665. pitchset%(a%)=pitchsetX%(a%)
  17666. NEXT
  17667. FOR a% = 0 TO 47
  17668. durset%(a%)=dursetX%(a%)
  17669. NEXT
  17670. FOR a% = 0 TO 47
  17671. ampset%(a%) =ampsetX%(a%)
  17672. NEXT
  17673. FOR a% = 0 TO 47
  17674. glissset%(a%)=glisssetX%(a%)
  17675. NEXT
  17676. FOR a% = 0 TO 47
  17677. envset%(a%) =envsetX%(a%)
  17678. NEXT
  17679. FOR a% = 0 TO nobars%
  17680. tempi%(a%) =tempiX%(a%)
  17681. NEXT
  17682. FOR a% = 0 TO nobars%
  17683. FOR b% = 0 TO 1
  17684. remarks$(a%,b%)= remarksX$(a%,b%)
  17685. NEXT
  17686. NEXT
  17687. :
  17688. PROCdisplay
  17689. :
  17690. ENDPROC
  17691. :
  17692. REM*********************************
  17693. :
  17694. DEF PROCtutorial
  17695. :
  17696. CLS
  17697. :
  17698. PRINT ' " Bars and beats B"
  17699. PRINT ' " Handling of durations D"
  17700. PRINT ' " Exiting dialogue windows E"
  17701. PRINT ' " Quickly selecting voices W"
  17702. PRINT ' " Accel/rit A"
  17703. CASE GET$ OF
  17704. WHEN "D","d" : PROCwindow(10,71,72,20) : CLS
  17705. PRINT '" When a duration is input in bars/beats it is converted "
  17706. PRINT '" into 1/20ths of a second at the current tempo "
  17707. PRINT '" before being saved in the array. "
  17708. PRINT '" (This is because when sounds are played, their durations "
  17709. PRINT '" are given by BASIC to the OS as so many 1/20ths of a second). "
  17710. PRINT' '" The Display procedure then reconverts back to bars/beats. "
  17711. PRINT' '" Unavoidable floating point discrepencies occur during "
  17712. PRINT '" this conversion/reconversion process, which often lead to "
  17713. PRINT '" durations being displayed with different values to those "
  17714. PRINT '" initially input, especially in the case of very small values. "
  17715. PRINT ''" (to return to program press any key)"
  17716. CASE GET$ OF
  17717. WHEN "R","r" : PROCdisplay
  17718. OTHERWISE PROCdisplay
  17719. ENDCASE
  17720. :
  17721. WHEN "E","e" : PROCwindow(10,71,72,20) : CLS
  17722. PRINT '" When no obvious key-presses are indicated, e.g. when you "
  17723. PRINT '" want to exit a dialogue window at any point etc., simply "
  17724. PRINT '" press <Esc> to return to the display. "
  17725. CASE GET$ OF
  17726. WHEN "R","r" : PROCdisplay
  17727. OTHERWISE PROCdisplay
  17728. ENDCASE
  17729. :
  17730. WHEN "W","w" : PROCwindow(10,71,72,20) : CLS
  17731. PRINT '" This is a keyboard shortcut to select a voice which "
  17732. PRINT '" is already displayed on the screen. "
  17733. PRINT '" Press <Enter> once to select the top voice displayed. "
  17734. PRINT '" Press <Enter> twice quickly to select the second voice "
  17735. PRINT '" selected. Press <Enter> three times quickly to select "
  17736. PRINT '" the bottom voice displayed. "
  17737. CASE GET$ OF
  17738. WHEN "R","r" : PROCdisplay
  17739. OTHERWISE PROCdisplay
  17740. ENDCASE
  17741. :
  17742. WHEN "A","a": PROCwindow(10,71,72,20) : CLS
  17743. CASE GET$ OF
  17744. WHEN "R","r" : PROCdisplay
  17745. OTHERWISE PROCdisplay
  17746. ENDCASE
  17747. :
  17748. WHEN "B","b": PROCwindow(10,71,82,10) : CLS
  17749. PRINT '" CAC invariably understands that a bar consists of 960 micro-beats, "
  17750. PRINT '" regardless of which file you create. This fine gradation allows "
  17751. PRINT '" you to position sounds effectively in continuous time, just as "
  17752. PRINT '" CAC allows you also to position sounds effectively in continuous "
  17753. PRINT '" pitch. "
  17754. PRINT ''" When you initially create a new file, you can decide how the bar "
  17755. PRINT '" is to be subdivided into a particular 'time signature'. For example, "
  17756. PRINT '" in 4/4 each crotchet is a quarter of the bar, and thus 240 beats each."
  17757. PRINT '" When a passage will later be 'rhythmicized' to become musical notation "
  17758. PRINT '" each bar will consist of rhythms adding up to a 4/4 time signature."
  17759. PRINT ''" The beats of a time signature are called macro-beats and their "
  17760. PRINT '" position can be displayed by pressing Display Menu/Add Beats (O/T). "
  17761. CASE GET$ OF
  17762. WHEN "R","r" : PROCdisplay
  17763. OTHERWISE PROCdisplay
  17764. ENDCASE
  17765. :
  17766. OTHERWISE
  17767. CASE GET$ OF
  17768. WHEN "R","r" : PROCdisplay
  17769. OTHERWISE PROCdisplay
  17770. ENDCASE
  17771. :
  17772. ENDCASE
  17773. :
  17774. ENDPROC