1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693 |
- REM CAC is free software: you can redistribute it and/or modify
- REM it under the terms of the GNU General Public License as published by
- REM the Free Software Foundation, either version 2 of the License, or
- REM (at your option) any later version.
- REM
- REM CAC is distributed in the hope that it will be useful,
- REM but WITHOUT ANY WARRANTY; without even the implied warranty of
- REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- REM GNU General Public License for more details.
- REM
- REM You should have received a copy of the GNU General Public License
- REM along with CAC. If not, see <https://www.gnu.org/licenses/>.
- REM
- REM CAC
- REM Copyright (C) 1990 Richard Emsley
- REM >CAC
- MODE 12 : COLOUR 0 : COLOUR 135 : CLS
- *CONFIGURE spritesize 300K
- errorbeforedisplay$ = "y"
- ON ERROR PROCerror
- biga% = 10^5 : bigb% = 0 : bigc% = 0 : bigd% = 10^5 : box$ = "n"
- :
- PROCtobegin
- END
- :
- REM*******************************
- :
- DEF PROCawait
- :
- PROCwindow(20,69,60,55)
- PRINT'" Functions F"
- PRINT " Add one note (fully defined) O"
- PRINT " Delete notes X"
- PRINT " Copy/move notes (1 or `) C"
- PRINT " Define a group of values G"
- PRINT " Add the group of values A"
- PRINT " Rhythmicize R"
- PRINT " Display D"
- PRINT " Play P"
- PRINT " Various V"
- PRINT " Undo last operation Z"
- PRINT " Save S"
- PRINT " Quit Q"
- :
- CASE GET$ OF
- WHEN "f" : ON : PROCfunctionreception
- WHEN "o" : ON : PROCaddonenote
- WHEN "x" : ON : PROCdelete
- WHEN "c","1","`" : ON : PROCcopy
- WHEN "g", "3" : ON : PROCsubawaitG
- WHEN "a" : ON : PROCsubawaitA
- WHEN "r" :
- VDU 7
- PROCwindow(20,69,63,52)
- CLS
- PRINT'" To rhythmicize attacks, first switch on "
- PRINT'" Rhythmicize Attacks in Display Options "
- PRINT'" (M/V/D/H) then create a group of attacks "
- PRINT'" or copy some attacks or move some attacks "
- PRINT'" to itself, during the course of which you "
- PRINT'" will be invited to rhythmicize them. "
- PRINT'" (press a key to continue) "
- CASE GET$ OF
- WHEN "m" : PROCdisplay
- OTHERWISE
- PROCdisplay
- ENDCASE
- WHEN "d" : ON : PROCpredisplay
- WHEN "p" : ON : play$ = "play" : PROCplay
- WHEN "m" : ON :
- PROCdisplay : REM toggle
- WHEN "v" : ON : PROCplaysubmenu
- WHEN "s" : ON : PROCsave
- WHEN "Z", "z" : PROCundo
- WHEN "q" : ON : PROCquit
- OTHERWISE ON : VDU 7 : PROCawait : REM bleep and loop back to start of proc
- ENDCASE
- :
- ENDPROC
- :
- REM*********************************
- :
- DEF PROCsubawaitG
- :
- CLS
- PRINT' " attacks A"
- PRINT " envelope points R"
- PRINT " pitches P"
- PRINT " amplitudes L"
- PRINT " amplitude gradations G"
- PRINT " envelopes/glissandos E"
- PRINT " durations D"
- PRINT " microtonal inflections M"
- :
- CASE GET$ OF
- WHEN "A","a" : PROCseriesattacks
- WHEN "R","r" : PROCreleases
- WHEN "P","p", "3" : PROCseriespitches
- WHEN "L","l" : PROCseriesamplitudes
- WHEN "E","e" : PROCseriesenvelopes
- WHEN "G","g" : gradations$ = "y" : PROCseriesenvelopes
- WHEN "D","d" : PROCseriesdurations
- WHEN "M","m" : PROCseriesinflections
- OTHERWISE VDU 7 : PROCsubawaitG
- ENDCASE
- :
- ENDPROC
- :
- REM***********************************
- :
- DEF PROCprearraysetup
- :
- MODE 12 : COLOUR 0 : COLOUR 135
- CLS
- numwaves% = 19
- INPUT'''''" Estimate the maximum number of bars "nobars%
- INPUT''" Estimate the average number of notes per bar in the busiest part "nonotes
- INPUT''" How many voices/strands "numparts%
- :
- DIM insts$(numparts%,2) : instsdimmed$ = "y"
- PRINT''" Do you want to define the voices or use default ones (Y/D)"
- CASE GET$ OF
- WHEN "Y","y" :
- FOR count% = 1 TO numparts%
- PRINT '" voice ";count%;" is called"
- INPUT name$
- PRINT " and is in clef (P/T/B/D...TT/TB/BB etc)"
- INPUT clef$
- PRINT " and has how many staves"
- INPUT staves$
- insts$(count%,0) = name$ : insts$(count%,1) = clef$ : insts$(count%,2) = staves$
- NEXT
- WHEN "D","d" :
- FOR count% = 1 TO numparts%
- insts$(count%,0) = "" : insts$(count%,1) = "T" : insts$(count%,2)="1"
- NEXT
- OTHERWISE
- ENDCASE
- :
- REPEAT
- INPUT''" The time signature has how many beats to the bar "factor%
- :
- CASE factor% OF
- WHEN 1,2,3,4,5,6,8,10,12 : success$ = "YES"
- OTHERWISE
- success$ = "NO"
- VDU 7
- PRINT'" Only 1,2,3,4,5,6,8,10 or 12 are allowed "
- PRINT'" press a key to try again"
- CASE GET$ OF
- WHEN "m" : success$ = "NO"
- OTHERWISE
- success$ = "NO"
- ENDCASE
- :
- ENDCASE
- UNTIL success$ = "YES"
- :
- factor% = factor% * 8
- beatfactor% = 960/factor%
- :
- REPEAT
- success$ = "YES"
- PRINT''" of what note value "
- PRINT' " (minim/half-note = 2 "
- PRINT' " crotchet/quarter-note = 4 "
- PRINT' " quaver/eighth-note = 8 "
- PRINT' " semiquaver/sixteenth-note = 16 "
- INPUT' " demisemiquaver/thirtysecond-note = 32) "beams%
- :
- CASE beams% OF
- WHEN 2 : beams% = 2
- WHEN 4 : beams% = 3
- WHEN 8 : beams% = 4
- WHEN 16 : beams% = 5
- WHEN 32 : beams% = 6
- OTHERWISE
- PRINT'" sorry, try again "
- success$ = "NO"
- ENDCASE
- UNTIL success$ = "YES"
- :
- manynotes% = nobars%*nonotes
- filename$ = ""
- ENDPROC
- :
- REM***********************************************
- :
- DEF PROCarraysetup
- :
- DIM array%(manynotes%,2,(numparts%-1)) : DIM arrayX%(manynotes%,2,(numparts%-1))
- IF instsdimmed$ = "n" THEN DIM insts$(numparts%,2)
- DIM instsX$(numparts%,2)
- DIM numusedcells%(numparts%-1) : DIM numusedcellsX%(numparts%-1)
- DIM cell%(1999), bar%(1999)
- DIM attacks1%(10000), attacks2%(10000), attacks3%(10000), attacks4%(10000), attacks5%(10000)
- DIM pitches%(10000), pitches1%(10000), pitches2%(10000), amplitudes%(10000), envelopes%(10000)
- DIM durations%(10000), glissandos%(10000), inflections%(10000)
- DIM pitchset%(numparts%+47), ampset%(numparts%+47), envset%(numparts%+47), durset%(numparts%+47), glissset%(numparts%+47), infset%(numparts%+47)
- DIM pitchsetX%(numparts%+47), ampsetX%(numparts%+47), envsetX%(numparts%+47), dursetX%(numparts%+47), glisssetX%(numparts%+47)
- DIM functionattacks(10000)
- DIM nodes%(47), nodes1%(47)
- DIM dur%(999), proportion%(999), rhythmicattacks%(999), groupattacks%(999)
- DIM error%(999), notategroup%(999,1), errororder%(999), errororder1%(999)
- DIM disarray%(nobars%,3,(numparts%-1)) : DIM disarrayX%(nobars%,3,(numparts%-1))
- DIM displayvoices%(numparts%), holddisplay%(numparts%), rgroup%(6), longinsts$(2,2), staves%(6)
- DIM displayvoices1%(numparts%) : DIM displayvoicesX%(numparts%)
- DIM value%(2), pos%(2), longbeamposn%(numparts%), shortbeamposn%(numparts%), actbeamposn%(numparts%), shortamppos%(numparts%), longamppos%(numparts%), actamppos%(numparts%)
- DIM longbeamposnX%(numparts%), shortbeamposnX%(numparts%), shortampposX%(numparts%), longampposX%(numparts%)
- DIM longstemdir$(numparts%-1), shortstemdir$(numparts%-1)
- DIM longstemdirX$(numparts%-1), shortstemdirX$(numparts%-1)
- DIM waveforms$(numparts%), playvoices%(8), lvdata%(8,9), tic%(4), tun%(8)
- DIM waveformsX$(numparts%), lvdataX%(8,9)
- DIM wforms$(19) : waveload$ = "notdone"
- DIM wformsX$(19)
- DIM startoflayersection%(50), shareoflayers%(50,50), chanceoflayer%(50)
- DIM layershare%(50), numattackssections%(50), startofattackssection%(50,50)
- DIM numattax%(50,50,1), attackscontrol$(50)
- DIM numattackssections1%(50), startofattackssection1%(50,200)
- DIM numattax1%(50,200,1), appearances%(50)
- DIM durationscontrol$(50), numdurationssections%(50)
- DIM numdurationssections1%(50), startofdurationssection%(50,200)
- DIM startofdurationssection1%(50,200), doorations%(50,200), doorations1%(50,200)
- DIM numvalues%(50), values(50,50), valuescounter%(50), multiplier$(50)
- DIM multipliermode$(50)
- DIM contoursequences%(50,15), transpositionsequences%(199,1)
- DIM sample%(299), group%(7), contours%(69,7), octavesequences%(50,48,11)
- DIM pitchnames$(47), octaveloop%(48), distortparas%(50,3)
- DIM numlayerOKsects%(50), OKtouselayers%(50,1), layersOK%(50,50,2)
- DIM layerends%(50), amplitudes1%(3000), dynlayers%(12,5), dynnumbers%(99)
- DIM ampsample%(49)
- DIM tempi%(nobars%), bannedpitches%(80), bannedints%(24,2), triednotes%(88)
- DIM tempiX%(nobars%)
- DIM extractinfo%(20), redpitches%(9,30), numredpitches%(9), holdstartcell%(numparts%)
- DIM remarks$(nobars%,1), quickdisplay%(numparts%), prequickdisplay%(numparts%), thebeats%(15)
- DIM remarksX$(nobars%,1)
- DIM envattacks%(3000), envpitches%(3000), taken%(19)
- FOR count% = 0 TO nobars% : tempi%(count%) = 30 : NEXT
- FOR count% = 0 TO 47 : READ name$ : pitchnames$(count%) = name$ : NEXT
- DATA "C 1/4 flat","C 1/8 flat","C nat","C 1/8 shrp","C 1/4 shrp"
- DATA "C 3/8 shrp","D flat","D 3/8 flat","D 1/4 flat","D 1/8 flat"
- DATA "D nat","D 1/8 shrp","D 1/4 shrp","D 3/8 shrp","E flat","E 3/8 flat"
- DATA "E 1/4 flat","E 1/8 flat","E nat","E 1/8 shrp","E 1/4 shrp"
- DATA "F 1/8 flat","F nat","F 1/8 shrp","F 1/4 shrp","F 3/8 shrp"
- DATA "F shrp","G 3/8 flat","G 1/4 flat","G 1/8 flat","G nat","G 1/8 shrp"
- DATA "G 1/4 shrp","G 3/8 shrp","A flat","A 3/8 flat","A 1/4 flat"
- DATA "A 1/8 flat","A nat","A 1/8 shrp","A 1/4 shrp","A 3/8 shrp"
- DATA "B flat","B 3/8 flat","B 1/4 flat","B 1/8 flat","B nat","B 1/8 shrp"
- 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
- 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
- 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
- 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
- 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
- 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
- DATA 51,5,5,4,3,2,1,52,6,1,2,4,5,6,3,53,6,6,5,3,2,1,4
- 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
- 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
- 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
- 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
- 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
- DATA 69,7,1,7,6,5,4,3,2
- FOR count% = 1 TO 47
- READ a%,b%
- contours%(a%,0) = b%
- FOR counter% = 1 TO b%
- READ c%
- contours%(a%,counter%) = c%
- NEXT
- NEXT
- FOR count% = 0 TO numparts%-1 : pitchset%(count%) = 55 : NEXT
- FOR count% = 0 TO numparts%-1 : ampset%(count%) = 3 : NEXT
- FOR count% = 0 TO numparts%-1 : envset%(count%) = 9 : NEXT
- FOR count% = 0 TO numparts%-1 : durset%(count%) = 60 : NEXT
- FOR count% = 0 TO numparts%-1 : glissset%(count%) = 105050 : NEXT
- FOR count% = 0 TO numparts%-1 : infset%(count%) = 50 : NEXT
- *TUNING 0
- VOICES 8
- *CHANNELVOICE 1 WaveSynth-Beep
- *CHANNELVOICE 2 WaveSynth-Beep
- *CHANNELVOICE 3 WaveSynth-Beep
- *CHANNELVOICE 4 WaveSynth-Beep
- *CHANNELVOICE 5 WaveSynth-Beep
- *CHANNELVOICE 6 WaveSynth-Beep
- *CHANNELVOICE 7 WaveSynth-Beep
- *CHANNELVOICE 8 WaveSynth-Beep
- direction$ = "" : shortstemdir$() = "U" : longstemdir$() = "U" : shortbeamposn%() = 106 : longbeamposn%() = 106
- manyattacks% = 0 : longbeatsupper% = 739 : longbeatslower% = 405
- tempo% = 19660 : REM default tempo = MM30 per bar
- defaultvoices$ = "y" : PROCassignvoices
- CLS
- VDU 28,20,27,60,15
- COLOUR 0 : COLOUR 191 : CLS
- numbars% = 4 : startbar% = 1
- :
- numvoices% = numparts%
- FOR count% = 1 TO numvoices%
- displayvoices%(count%) = 1 + count% - 1
- holddisplay%(count%) = 1 + count% - 1
- NEXT
- holdnum% = numvoices%
- :
- quickdisplay%(1) = 1 : prequickdisplay%(1) = 1
- holdnum% = 1 : holdstart% = 1 : quicknum% = 1 : quickstart% = 1
- prequicknum% = 1 : prequickstart% = 1
- notehead$ = "vsmall" : longscore$ = "y" : startv% = 1 : startv1% = 1
- printing$ = "n"
- barlines$ = "y" : staves$ = "y" : beats$ = "n" : amplitudes$ = "y"
- staves$ = "y" : barlines$ = "y" : names$ = "y" : lowerstave$ = "y"
- accidentals$ = "y" : stems$ = "y" : xoption$ = "y" : durations$ = "n"
- envelopes$ = "y" : glissandos$ = "y" : MM% = 30 : beatstep% = 8
- copyit$ = "OFF" : distort$ = "OFF" : beatnumbers$ = "n"
- wavefilingsystem$ = "notloaded" : manywaves% = 0 : barnosoften% = 5
- reordered$ = "n" : equalized$ = "n" : notenumbers$ = "n" : beatnum_diff$ = "num"
- beatunits$ = "big" : parasdefined$ = "no" : preplaydisplay$ = "n"
- paraset$ = "off" : savevoice$ = "N"
- method$ = "raw" : reordered$ = "n" : quiz$ = "yes" : typeintervals$ = "s"
- displayintervals$ = "n" : numintervals% = 1 : alterbeatsat% = 0
- compoundpitch% = 12 : compoundquarter% = 24 : compoundeighth% = 48 : compoundcent% = 1200
- defaultsieve = 2 : funcinput$ = "displayed" : redpitches$ = "n" : printno% = 0
- seegraph$ = "n" : seeinfo$ = "n" : seereorder$ = "n" : seereorderx$ = "n" : seereordery$ = "n"
- seeequalize$ = "n" : seeequalizex$ = "n" : seeequalizey$ = "n"
- seerhythmicize$ = "n" : seequery$ = "n" : startfinishdurats$ = "Y" : displayedfunc$ = "n"
- along% = 0 : playnewscreen$ = "y" : seeduration$ = "n" : lower% = 0 : justone$ = "n"
- biga% = 10^5 : bigb% = 0 : bigc% = 0 : bigd% = 10^5 : printinfo$ = "n"
- lowerstart% = 1 : upperstart% = 99 : lowerend% = 1 : upperend% = 99 : toggle$ = "orig"
- quickcopy$ = "y" : quickplay% = 2 : seedurinbts$ = "n" : seedurincrots$ = "n"
- screenvoices$ = "n" : ampoptions$ = "n" : screenmovesby% = 3 : copydownwards$ = "n"
- setalong$ = "y" : numvoicesgiven$ = "n" : envelopedata$ = "none" : deleteone$ = "none"
- quickextract$ = "n" : askaboutpitches$ = "y" : usebottomstave$ = "n" : copysuccessively$ = "n"
- succfirsttime$ = "y" : sequalssection$ = "n"
- addpitches$ = "y" : downwardsspeed% = 50
- horizscroll% = 25 : addten$ = "n" : squarebracket$ = "addten" : queryalong$ = "n"
- waitafterfirst% = 50 : waitaftersecond% = 50 : notenames$ = "n" : holdbackby% = 0
- updisplay% = 1 : vertscroll% = 25 : singlepitch$ = "m" : nosevery% = 1 : startnos% = 1
- reorderpitches$ = "n" : namestaves$ = "nameone" : usebeep$ = "n" : firsttimequick$ = "y"
- onlycontent$ = "n" : compress$ = "n" : quickdisplaywindow$ = "y" : ampmethod$ = "sample"
- holdbackby% = 960 : copytoend$ = "n" : gradations$ = "n" : firstasking$ = "y"
- resetdefaults$ = "n" : firstpitch$ = "y" : usedprev$ = "n" : nodelay$ = "n"
- askprevious$ = "y" : errorbeforedisplay$ = "n" : quitnow$ = "n"
- crossing$ = "n" : copymove$ = "C"
- PROCrhythmdefaults
- :
- ENDPROC
- :
- REM*************************************
- :
- DEF PROCsubawaitA
- :
- CLS
- PRINT' " attacks A"
- PRINT " pitches P"
- PRINT " amplitudes L"
- PRINT " envelopes E"
- PRINT " durations D"
- PRINT " glissandos G"
- PRINT " microtonal inflections M"
- :
- CASE GET$ OF
- WHEN "A","a" : PROCinsertattacks
- WHEN "P","p" : PROCinsertpitches
- WHEN "L","l" : PROCinsertamplitudes
- WHEN "E","e" : PROCinsertenvelopes
- WHEN "D","d" : PROCinsertdurations
- WHEN "M","m" : PROCinsertinflections
- OTHERWISE VDU 7 : PROCsubawaitA
- ENDCASE
- :
- ENDPROC
- :
- REM**************************************
- :
- DEF PROCnewnotereception(voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
- :
- value% = (barno% * 10^3) + beatno%
- :
- option% = 0
- :
- ::::::REM if new note is very first to be added::::::
- IF numusedcells%(voice%) = 0 THEN option% = 1
- :
- IF option% <> 1 THEN
- :
- :::::::REM to tack new note on at end:::::
- IF numusedcells%(voice%) > 0 AND value% > (array%((numusedcells%(voice%)-1),0,voice%)) DIV 10^3 THEN option% = 2
- :
- :::::::REM to tack new note on at START::::
- IF numusedcells%(voice%) > 0 AND value% < (array%(0,0,voice%)) DIV 10^3 THEN option% = 3
- :
- ::::::REM to put new note in middle::::::::::
- 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
- :
- ENDIF
- :
- IF addingnotes$ = "y" THEN
- CASE option% OF
- WHEN 1 : shunt$ = "Y"
- PROCcellfill(0,voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
- :
- WHEN 2 : shunt$="Y"
- PROCcellfill(numusedcells%(voice%),voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
- :
- WHEN 3 : shunt$="Y"
- PROCshuntright(0)
- PROCcellfill(0,voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
- :
- WHEN 4 : PROCsearch(value%)
- IF shunt$="Y" PROCshuntright(startcell%)
- PROCcellfill(startcell%,voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
- :
- ENDCASE
- ENDIF
- :
- ENDPROC
- :
- REM****************************************************
- :
- DEF PROCcellfill(cell%,voice%,barno%,beatno%,pitch%,amp%,env%,dur%,gliss%,inf%)
- :
- IF barno% = 999 THEN barno% = array%(cell%,0,voice%) DIV 10^6
- IF beatno% = 999 THEN beatno% = (array%(cell%,0,voice%)DIV 10^3)MOD 10^3
- IF pitch% = 999 THEN pitch% = array%(cell%,0,voice%) MOD 10^3
- IF amp% = 9 THEN amp% = array%(cell%,1,voice%) MOD10
- IF env% = 999 THEN env% = array%(cell%,2,voice%) DIV10^2
- IF dur% = 999 THEN dur% = (array%(cell%,1,voice%) DIV10) MOD 10^3 ELSE PROCconvertdur
- IF gliss% = 99 THEN gliss% = array%(cell%,1,voice%) DIV10^4
- IF inf% = 99 THEN inf% = array%(cell%,2,voice%) MOD 10^2
- :
- array%(cell%,0,voice%) = (barno%*10^6) + (beatno%*10^3) + pitch%
- array%(cell%,1,voice%) = (gliss%*10^4)+(dur%*10)+amp%
- array%(cell%,2,voice%) = (env%*10^2)+inf%
- :
- IF shunt$="Y" THEN numusedcells%(voice%) += 1
- :
- ENDPROC
- :
- REM******************************************************
- :
- DEF PROCshuntright(startcell%)
- :
- FOR tier% = 0 TO 2
- FOR count% = (numusedcells%(voice%)) TO (startcell%+1) STEP -1
- array%(count%,tier%,voice%) = array%((count%-1),tier%,voice%)
- NEXT
- NEXT
- :
- ENDPROC
- :
- REM*********************************************************
- :
- DEF PROCsearch(newvalue%)
- :
- startcell% = -1
- distance% = numusedcells%(voice%)/2
- cellnum% = distance%
- :
- REPEAT
- :
- :
- IF newvalue% = (array%(cellnum%,0,voice%)) DIV 10^3 THEN
- startcell% = cellnum% : REM this ALTERS, rather than adds, a note
- shunt$ = "N"
- ENDIF
- :
- IF cellnum% > 0 THEN
- :
- IF newvalue% = (array%(cellnum%+1,0,voice%)) DIV 10^3 THEN
- startcell% = cellnum%+1 : REM this ALTERS too
- shunt$ = "N"
- ENDIF
- :
- :
- IF newvalue% = (array%(cellnum%-1,0,voice%)) DIV 10^3 THEN
- startcell% = cellnum%-1 : REM this ALTERS too
- shunt$ = "N"
- ENDIF
- :
- IF newvalue% > (array%(cellnum%,0,voice%) DIV 10^3) AND newvalue% < (array%(cellnum%+1,0,voice%) DIV 10^3) THEN
- startcell% = (cellnum%+1) : REM newvalue immediately to right of cellnum
- shunt$ = "Y"
- ENDIF
- :
- :
- IF newvalue% < (array%(cellnum%,0,voice%) DIV 10^3) AND newvalue% > (array%(cellnum%-1,0,voice%) DIV 10^3) THEN
- startcell% = cellnum% : REM immediately to left
- shunt$ = "Y"
- ENDIF
- :
- :
- IF newvalue% > (array%(cellnum%+1,0,voice%) DIV 10^3) THEN
- IF distance% = 1 THEN distance% = 2
- distance% = distance%/2
- cellnum% = cellnum% + distance%
- ENDIF
- :
- :
- IF newvalue% < (array%(cellnum%-1,0,voice%) DIV 10^3) THEN
- IF distance% = 1 THEN distance% = 2
- distance% = distance%/2
- cellnum% = cellnum% - distance%
- ENDIF
- ENDIF
- :
- :
- UNTIL startcell% > -1
- :
- ENDPROC
- :
- REM***************************************************
- :
- DEF PROCplay
- :
- IF waveload$ = "notdone" THEN
- PROCwindow(20,69,60,55)
- CLS
- PRINT'" Have any waveforms been loaded in this "
- PRINT " VirtualRiscPC session? "
- CASE GET$ OF
- WHEN "N","n","2" :
- OTHERWISE
- waveload$ = "done"
- ENDCASE
- ENDIF
- :
- BEATS 960 : REM 2/4 bars, 480 each crotchet
- tic%() = 0
- tun%() = 0
- :
- IF play$ = "play" THEN
- CLS
- INPUT'" Starting at bar "startingbar%
- INPUT " beat "beats%
- PROCalterbeats : startbeat% = beats%
- INPUT " and ending at bar "endbar%
- INPUT'" How many voices "nvoices%
- ENDIF
- :
- :
- FOR count% = 1 TO nvoices%
- IF play$ = "play" THEN
- PRINT'" voice number ";count%;" is which voice number"
- INPUT vnumber%
- playvoices%(count%) = vnumber%
- ELSE vnumber% = playvoices%(count%)
- ENDIF
- :
- IF usebeep$ = "n" THEN
- CASE count% OF
- WHEN 1 :
- CASE waveforms$(vnumber%) OF
- WHEN "WaveSynth-Beep" : *CHANNELVOICE 1 WaveSynth-Beep
- WHEN "StringLib-Soft" : *CHANNELVOICE 1 StringLib-Soft
- WHEN "StringLib-Pluck" : *CHANNELVOICE 1 StringLib-Pluck
- WHEN "StringLib-Steel" : *CHANNELVOICE 1 StringLib-Steel
- WHEN "StringLib-Hard" : *CHANNELVOICE 1 StringLib-Hard
- WHEN "Percussion-Soft" : *CHANNELVOICE 1 Percussion-Soft
- WHEN "Percussion-Medium" : *CHANNELVOICE 1 Percussion-Medium
- WHEN "Percussion-Snare" : *CHANNELVOICE 1 Percussion-Snare
- WHEN "Percussion-Noise" : *CHANNELVOICE 1 Percussion-Noise
- WHEN "BassBowAb" : *CHANNELVOICE 1 BassBowAb
- tun%(1) = -1470
- WHEN "AcouBass" : *CHANNELVOICE 1 AcouBass
- tun%(1) = -2731
- WHEN "Vibe" : *CHANNELVOICE 1 Vibe
- tun%(1) = -6912
- WHEN "BugleC" : *CHANNELVOICE 1 BugleC
- tun%(1) = -11008
- WHEN "CornetEb" : *CHANNELVOICE 1 CornetEb
- tun%(1) = -12117
- WHEN "SaxEbBarC" : *CHANNELVOICE 1 SaxEbBarC
- tun%(1) = -2816
- WHEN "SaxBbTenrE" : *CHANNELVOICE 1 SaxBbTenrE
- tun%(1) = -4181
- WHEN "BassoonEb" : *CHANNELVOICE 1 BassoonEb
- tun%(1) = -4011
- WHEN "ClarinetBb" : *CHANNELVOICE 1 ClarinetBb
- tun%(1) = -10325
- WHEN "EngHornGb" : *CHANNELVOICE 1 EngHornGb
- tun%(1) = -8960
- WHEN "MandolinDb" : *CHANNELVOICE 1 MandolinDb
- tun%(1) = -11264
- WHEN "Piano2B" : *CHANNELVOICE 1 Piano2B
- tun%(1) = -2475
- WHEN "ClarVibEb" : *CHANNELVOICE 1 ClarVibEb
- tun%(1) = -7850
- WHEN "GtrDobroB" : *CHANNELVOICE 1 GtrDobroB
- tun%(1) = -6485
- WHEN "RecorderGb" : *CHANNELVOICE 1 RecorderGb
- tun%(1) = -13056
- WHEN "FlugelHnEb" : *CHANNELVOICE 1 FlugelHnEb
- tun%(1) = -12032
- WHEN "VceMmmGb23" : *CHANNELVOICE 1 VceMmmGb23
- tun%(1) = -853
- WHEN "VceMOooGb3" : *CHANNELVOICE 1 VceMOooGb3
- tun%(1) = -4843
- WHEN "VceFemAahC" : *CHANNELVOICE 1 VceFemAahC
- tun%(1) = -10948
- WHEN "VceFMmmGb4" : *CHANNELVOICE 1 VceFMmmGb4
- tun%(1) = -8918
- WHEN "Bass" : *CHANNELVOICE 1 Bass
- tun%(1) = 0
- WHEN "ChurchBell" : *CHANNELVOICE 1 ChurchBell
- tun%(1) = -2731
- WHEN "mysound" : *CHANNELVOICE 1 mysound
- tun%(1) = 0
- WHEN "GuiroFast" : *CHANNELVOICE 1 GuiroFast
- tun%(1) = -4000
- WHEN "Clave" : *CHANNELVOICE 1 Clave
- tun%(1) = -8096
- WHEN "CowBell" : *CHANNELVOICE 1 CowBell
- tun%(1) = -5707
- WHEN "CymbRideHd" : *CHANNELVOICE 1 CymbRideHd
- tun%(1) = -8096
- WHEN "AcGuitar1" : *CHANNELVOICE 1 AcGuitar1
- tun%(1) = -7072
- WHEN "CongaHi" : *CHANNELVOICE 1 CongaHi
- tun%(1) = -4000
- WHEN "DrumExplo" : *CHANNELVOICE 1 DrumExplo
- tun%(1) = -4000
- WHEN "ElecTom1" : *CHANNELVOICE 1 ElecTom1
- tun%(1) = -8096
- WHEN "Harp1" : *CHANNELVOICE 1 Harp1
- tun%(1) = -10997
- WHEN "Harpsi" : *CHANNELVOICE 1 Harpsi
- tun%(1) = -6901
- WHEN "HiString" : *CHANNELVOICE 1 HiString
- tun%(1) = -10997
- WHEN "HonkyPiano" : *CHANNELVOICE 1 HonkyPiano
- tun%(1) = -6901
- WHEN "JapFlute" : *CHANNELVOICE 1 JapFlute
- tun%(1) = -10997
- WHEN "JazzOrgan" : *CHANNELVOICE 1 JazzOrgan
- tun%(1) = -10997
- WHEN "MidStrings" : *CHANNELVOICE 1 MidStrings
- tun%(1) = -6901
- WHEN "NoteArp1" : *CHANNELVOICE 1 NoteArp1
- tun%(1) = -4000
- WHEN "SnareEcho" : *CHANNELVOICE 1 SnareEcho
- tun%(1) = -4341
- WHEN "TablaHi" : *CHANNELVOICE 1 TablaHi
- tun%(1) = -7669
- WHEN "Timpani" : *CHANNELVOICE 1 Timpani
- tun%(1) = -928
- WHEN "Tomtom1" : *CHANNELVOICE 1 Tomtom1
- tun%(1) = -5365
- WHEN "Trombone1" : *CHANNELVOICE 1 Trombone1
- tun%(1) = -6901
- WHEN "Trumpet" : *CHANNELVOICE 1 Trumpet
- tun%(1) = -10997
- WHEN "Xylophone" : *CHANNELVOICE 1 Xylophone
- tun%(1) = -6901
- WHEN "AcouGtr2B" : *CHANNELVOICE 1 AcouGtr2B
- tun%(1) = -6560
- WHEN "AcuBassAb1" : *CHANNELVOICE 1 AcuBassAb1
- tun%(1) = -1610
- WHEN "BagPipeG" : *CHANNELVOICE 1 BagPipeG
- tun%(1) = -9291
- WHEN "BanjoChdBb" : *CHANNELVOICE 1 BanjoChdBb
- tun%(1) = -4000
- WHEN "BazookiE" : *CHANNELVOICE 1 BazookiE
- tun%(1) = -8267
- WHEN "BellC" : *CHANNELVOICE 1 BellC
- tun%(1) = -10997
- WHEN "BrassEns1B" : *CHANNELVOICE 1 BrassEns1B
- tun%(1) = -6560
- WHEN "ClavichdBb" : *CHANNELVOICE 1 ClavichdBb
- tun%(1) = -10315
- WHEN "ClavinetBb" : *CHANNELVOICE 1 ClavinetBb
- tun%(1) = -6219
- WHEN "CornetEb" : *CHANNELVOICE 1 CornetEb
- tun%(1) = -4000
- WHEN "EnsWodAb45" : *CHANNELVOICE 1 EnsWodAb45
- tun%(1) = -9632
- WHEN "EnsWodGb12" : *CHANNELVOICE 1 EnsWodGb12
- tun%(1) = -4853
- WHEN "Glock2Ab5" : *CHANNELVOICE 1 Glock2Ab5
- tun%(1) = -9632
- WHEN "GtMelobarC" : *CHANNELVOICE 1 GtMelobarC
- tun%(1) = -6901
- WHEN "GtWashbnBb" : *CHANNELVOICE 1 GtWashbnBb
- tun%(1) = -6219
- WHEN "HarmonicaE" : *CHANNELVOICE 1 HarmonicaE
- tun%(1) = -4171
- WHEN "Jew'sHarpA" : *CHANNELVOICE 1 Jew'sHarpA
- tun%(1) = -6219
- WHEN "MusetteB" : *CHANNELVOICE 1 MusetteB
- tun%(1) = -10656
- WHEN "OboeGb" : *CHANNELVOICE 1 OboeGb
- tun%(1) = -13131
- WHEN "OrchHit2B" : *CHANNELVOICE 1 OrchHit2B
- tun%(1) = -5451
- WHEN "OrcSusBb23" : *CHANNELVOICE 1 OrcSusBb23
- tun%(1) = -6304
- WHEN "PiccoloE" : *CHANNELVOICE 1 PiccoloE
- tun%(1) = -16544
- WHEN "SaxSoprnoE" : *CHANNELVOICE 1 SaxSoprnoE
- tun%(1) = -12448
- WHEN "StrngThkBb" : *CHANNELVOICE 1 StrngThkBb
- tun%(1) = -5792
- WHEN "TubaGb" : *CHANNELVOICE 1 TubaGb
- tun%(1) = -929
- WHEN "BassDrum" : *CHANNELVOICE 1 BassDrum
- tun%(1) = -4000
- WHEN "HiHat" : *CHANNELVOICE 1 HiHat
- tun%(1) = -4000
- WHEN "OrcHit" : *CHANNELVOICE 1 OrcHit
- tun%(1) = -4085
- WHEN "Piano" : *CHANNELVOICE 1 Piano
- tun%(1) = -4171
- WHEN "Sax" : *CHANNELVOICE 1 Sax
- tun%(1) = -4085
- WHEN "Snare" : *CHANNELVOICE 1 Snare
- tun%(1) = -8096
- WHEN "Choir1" : *CHANNELVOICE 1 Choir1
- tun%(1) = -6901
- WHEN "ChurOrgan" : *CHANNELVOICE 1 ChurOrgan
- tun%(1) = -6901
- WHEN "Opera" : *CHANNELVOICE 1 Opera
- tun%(1) = -13387
- WHEN "OrchChoir" : *CHANNELVOICE 1 OrchChoir
- tun%(1) = -6133
- WHEN "OrganHit" : *CHANNELVOICE 1 OrganHit
- tun%(1) = -5024
- WHEN "AgogoAfric" : *CHANNELVOICE 1 AgogoAfric
- tun%(1) = -6219
- WHEN "AgogoBrazi" : *CHANNELVOICE 1 AgogoBrazi
- tun%(1) = -10997
- WHEN "AgogoWood" : *CHANNELVOICE 1 AgogoWood
- tun%(1) = -13728
- WHEN "BDGatedRev" : *CHANNELVOICE 1 BDGatedRev
- tun%(1) = -5877
- WHEN "BDMarching" : *CHANNELVOICE 1 BDMarching
- tun%(1) = -8608
- WHEN "BDPiloMute" : *CHANNELVOICE 1 BDPiloMute
- tun%(1) = -7072
- WHEN "Cabasa" : *CHANNELVOICE 1 Cabasa
- tun%(1) = -7072
- WHEN "Cachichi1" : *CHANNELVOICE 1 Cachichi1
- tun%(1) = -4000
- WHEN "CachichiTr" : *CHANNELVOICE 1 CachichiTr
- tun%(1) = -8096
- WHEN "Castanets" : *CHANNELVOICE 1 Castanets
- tun%(1) = -4000
- WHEN "CongaMid" : *CHANNELVOICE 1 CongaMid
- tun%(1) = -4171
- WHEN "CongaSmCl" : *CHANNELVOICE 1 CongaSmCl
- tun%(1) = -4683
- WHEN "CymbalCrsh" : *CHANNELVOICE 1 CymbalCrsh
- tun%(1) = -4000
- WHEN "CymRideBel" : *CHANNELVOICE 1 CymRideBel
- tun%(1) = -16288
- WHEN "CymRStRoll" : *CHANNELVOICE 1 CymRStRoll
- tun%(1) = -6389
- WHEN "CymSplshCa" : *CHANNELVOICE 1 CymSplshCa
- tun%(1) = -9120
- WHEN "Flexitone" : *CHANNELVOICE 1 Flexitone
- tun%(1) = -8096
- WHEN "GongSoft" : *CHANNELVOICE 1 GongSoft
- tun%(1) = -5365
- WHEN "Gonza1" : *CHANNELVOICE 1 Gonza1
- tun%(1) = -12192
- WHEN "GuiroSlow" : *CHANNELVOICE 1 GuiroSlow
- tun%(1) = -6048
- WHEN "HandClaps" : *CHANNELVOICE 1 HandClaps
- tun%(1) = -4000
- WHEN "HiHatFoot" : *CHANNELVOICE 1 HiHatFoot
- tun%(1) = -6389
- WHEN "Maracas1" : *CHANNELVOICE 1 Maracas1
- tun%(1) = -8096
- WHEN "MarimbaSB3" : *CHANNELVOICE 1 MarimbaSB3
- tun%(1) = -4000
- WHEN "Ratchet" : *CHANNELVOICE 1 Ratchet
- tun%(1) = -6731
- WHEN "RotoTomRev" : *CHANNELVOICE 1 RotoTomRev
- tun%(1) = -6133
- WHEN "SimmonsBD1" : *CHANNELVOICE 1 SimmonsBD1
- tun%(1) = -8096
- WHEN "SimmonsSn1" : *CHANNELVOICE 1 SimmonsSn1
- tun%(1) = -5707
- WHEN "SleighBell" : *CHANNELVOICE 1 SleighBell
- tun%(1) = -4000
- WHEN "SuperGong" : *CHANNELVOICE 1 SuperGong
- tun%(1) = -4341
- WHEN "SynthSnare" : *CHANNELVOICE 1 SynthSnare
- tun%(1) = -4000
- WHEN "SynTom" : *CHANNELVOICE 1 SynTom
- tun%(1) = -9120
- WHEN "TimpCresBb" : *CHANNELVOICE 1 TimpCresBb
- tun%(1) = -5962
- WHEN "TimpLowBb" : *CHANNELVOICE 1 TimpLowBb
- tun%(1) = -5707
- WHEN "TimpRollEb" : *CHANNELVOICE 1 TimpRollEb
- tun%(1) = -4000
- WHEN "TomRoll" : *CHANNELVOICE 1 TomRoll
- tun%(1) = -4000
- WHEN "ToyHooter" : *CHANNELVOICE 1 ToyHooter
- tun%(1) = -9717
- WHEN "ToyWhistle" : *CHANNELVOICE 1 ToyWhistle
- tun%(1) = -4000
- ENDCASE
- :
- WHEN 2 :
- CASE waveforms$(vnumber%) OF
- WHEN "WaveSynth-Beep" : *CHANNELVOICE 2 WaveSynth-Beep
- WHEN "StringLib-Soft" : *CHANNELVOICE 2 StringLib-Soft
- WHEN "StringLib-Pluck" : *CHANNELVOICE 2 StringLib-Pluck
- WHEN "StringLib-Steel" : *CHANNELVOICE 2 StringLib-Steel
- WHEN "StringLib-Hard" : *CHANNELVOICE 2 StringLib-Hard
- WHEN "Percussion-Soft" : *CHANNELVOICE 2 Percussion-Soft
- WHEN "Percussion-Medium" : *CHANNELVOICE 2 Percussion-Medium
- WHEN "Percussion-Snare" : *CHANNELVOICE 2 Percussion-Snare
- WHEN "Percussion-Noise" : *CHANNELVOICE 2 Percussion-Noise
- WHEN "BassBowAb" : *CHANNELVOICE 2 BassBowAb
- tun%(2) = -1470
- WHEN "AcouBass" : *CHANNELVOICE 2 AcouBass
- tun%(2) = -2731
- WHEN "Vibe" : *CHANNELVOICE 2 Vibe
- tun%(2) = -6912
- WHEN "BugleC" : *CHANNELVOICE 2 BugleC
- tun%(2) = -11008
- WHEN "CornetEb" : *CHANNELVOICE 2 CornetEb
- tun%(2) = -12117
- WHEN "SaxEbBarC" : *CHANNELVOICE 2 SaxEbBarC
- tun%(2) = -2816
- WHEN "SaxBbTenrE" : *CHANNELVOICE 2 SaxBbTenrE
- tun%(2) = -4181
- WHEN "BassoonEb" : *CHANNELVOICE 2 BassoonEb
- tun%(2) = -4011
- WHEN "ClarinetBb" : *CHANNELVOICE 2 ClarinetBb
- tun%(2) = -10325
- WHEN "EngHornGb" : *CHANNELVOICE 2 EngHornGb
- tun%(2) = -8960
- WHEN "MandolinDb" : *CHANNELVOICE 2 MandolinDb
- tun%(2) = -11264
- WHEN "Piano2B" : *CHANNELVOICE 2 Piano2B
- tun%(2) = -2475
- WHEN "ClarVibEb" : *CHANNELVOICE 2 ClarVibEb
- tun%(2) = -7850
- WHEN "GtrDobroB" : *CHANNELVOICE 2 GtrDobroB
- tun%(2) = -6485
- WHEN "RecorderGb" : *CHANNELVOICE 2 RecorderGb
- tun%(2) = -13056
- WHEN "FlugelHnEb" : *CHANNELVOICE 2 FlugelHnEb
- tun%(2) = -12032
- WHEN "VceMmmGb23" : *CHANNELVOICE 2 VceMmmGb23
- tun%(2) = -853
- WHEN "VceMOooGb3" : *CHANNELVOICE 2 VceMOooGb3
- tun%(2) = -4843
- WHEN "VceFemAahC" : *CHANNELVOICE 2 VceFemAahC
- tun%(2) = -10948
- WHEN "VceFMmmGb4" : *CHANNELVOICE 2 VceFMmmGb4
- tun%(2) = -8918
- WHEN "Bass" : *CHANNELVOICE 2 Bass
- tun%(2) = 0
- WHEN "ChurchBell" : *CHANNELVOICE 2 ChurchBell
- tun%(2) = -2731
- WHEN "mysound" : *CHANNELVOICE 2 mysound
- tun%(2) = 0
- WHEN "GuiroFast" : *CHANNELVOICE 2 GuiroFast
- tun%(2) = -4000
- WHEN "Clave" : *CHANNELVOICE 2 Clave
- tun%(2) = -8096
- WHEN "CowBell" : *CHANNELVOICE 2 CowBell
- tun%(2) = -5707
- WHEN "CymbRideHd" : *CHANNELVOICE 2 CymbRideHd
- tun%(2) = -8096
- WHEN "AcGuitar1" : *CHANNELVOICE 2 AcGuitar1
- tun%(2) = -7072
- WHEN "CongaHi" : *CHANNELVOICE 2 CongaHi
- tun%(2) = -4000
- WHEN "DrumExplo" : *CHANNELVOICE 2 DrumExplo
- tun%(2) = -4000
- WHEN "ElecTom1" : *CHANNELVOICE 2 ElecTom1
- tun%(2) = -8096
- WHEN "Harp1" : *CHANNELVOICE 2 Harp1
- tun%(2) = -10997
- WHEN "Harpsi" : *CHANNELVOICE 2 Harpsi
- tun%(2) = -6901
- WHEN "HiString" : *CHANNELVOICE 2 HiString
- tun%(2) = -10997
- WHEN "HonkyPiano" : *CHANNELVOICE 2 HonkyPiano
- tun%(2) = -6901
- WHEN "JapFlute" : *CHANNELVOICE 2 JapFlute
- tun%(2) = -10997
- WHEN "JazzOrgan" : *CHANNELVOICE 2 JazzOrgan
- tun%(2) = -10997
- WHEN "MidStrings" : *CHANNELVOICE 2 MidStrings
- tun%(2) = -6901
- WHEN "NoteArp1" : *CHANNELVOICE 2 NoteArp1
- tun%(2) = -4000
- WHEN "SnareEcho" : *CHANNELVOICE 2 SnareEcho
- tun%(2) = -4341
- WHEN "TablaHi" : *CHANNELVOICE 2 TablaHi
- tun%(2) = -7669
- WHEN "Timpani" : *CHANNELVOICE 2 Timpani
- tun%(2) = -928
- WHEN "Tomtom1" : *CHANNELVOICE 2 Tomtom1
- tun%(2) = -5365
- WHEN "Trombone1" : *CHANNELVOICE 2 Trombone1
- tun%(2) = -6901
- WHEN "Trumpet" : *CHANNELVOICE 2 Trumpet
- tun%(2) = -10997
- WHEN "Xylophone" : *CHANNELVOICE 2 Xylophone
- tun%(2) = -6901
- WHEN "AcouGtr2B" : *CHANNELVOICE 2 AcouGtr2B
- tun%(2) = -6560
- WHEN "AcuBassAb1" : *CHANNELVOICE 2 AcuBassAb1
- tun%(2) = -1610
- WHEN "BagPipeG" : *CHANNELVOICE 2 BagPipeG
- tun%(2) = -9291
- WHEN "BanjoChdBb" : *CHANNELVOICE 2 BanjoChdBb
- tun%(2) = -4000
- WHEN "BazookiE" : *CHANNELVOICE 2 BazookiE
- tun%(2) = -8267
- WHEN "BellC" : *CHANNELVOICE 2 BellC
- tun%(2) = -10997
- WHEN "BrassEns1B" : *CHANNELVOICE 2 BrassEns1B
- tun%(2) = -6560
- WHEN "ClavichdBb" : *CHANNELVOICE 2 ClavichdBb
- tun%(2) = -10315
- WHEN "ClavinetBb" : *CHANNELVOICE 2 ClavinetBb
- tun%(2) = -6219
- WHEN "CornetEb" : *CHANNELVOICE 2 CornetEb
- tun%(2) = -4000
- WHEN "EnsWodAb45" : *CHANNELVOICE 2 EnsWodAb45
- tun%(2) = -9632
- WHEN "EnsWodGb12" : *CHANNELVOICE 2 EnsWodGb12
- tun%(2) = -4853
- WHEN "Glock2Ab5" : *CHANNELVOICE 2 Glock2Ab5
- tun%(2) = -9632
- WHEN "GtMelobarC" : *CHANNELVOICE 2 GtMelobarC
- tun%(2) = -6901
- WHEN "GtWashbnBb" : *CHANNELVOICE 2 GtWashbnBb
- tun%(2) = -6219
- WHEN "HarmonicaE" : *CHANNELVOICE 2 HarmonicaE
- tun%(2) = -4171
- WHEN "Jew'sHarpA" : *CHANNELVOICE 2 Jew'sHarpA
- tun%(2) = -6219
- WHEN "MusetteB" : *CHANNELVOICE 2 MusetteB
- tun%(2) = -10656
- WHEN "OboeGb" : *CHANNELVOICE 2 OboeGb
- tun%(2) = -13131
- WHEN "OrchHit2B" : *CHANNELVOICE 2 OrchHit2B
- tun%(2) = -5451
- WHEN "OrcSusBb23" : *CHANNELVOICE 2 OrcSusBb23
- tun%(2) = -6304
- WHEN "PiccoloE" : *CHANNELVOICE 2 PiccoloE
- tun%(2) = -16544
- WHEN "SaxSoprnoE" : *CHANNELVOICE 2 SaxSoprnoE
- tun%(2) = -12448
- WHEN "StrngThkBb" : *CHANNELVOICE 2 StrngThkBb
- tun%(2) = -5792
- WHEN "TubaGb" : *CHANNELVOICE 2 TubaGb
- tun%(2) = -929
- WHEN "BassDrum" : *CHANNELVOICE 2 BassDrum
- tun%(2) = -4000
- WHEN "HiHat" : *CHANNELVOICE 2 HiHat
- tun%(2) = -4000
- WHEN "OrcHit" : *CHANNELVOICE 2 OrcHit
- tun%(2) = -4085
- WHEN "Piano" : *CHANNELVOICE 2 Piano
- tun%(2) = -4171
- WHEN "Sax" : *CHANNELVOICE 2 Sax
- tun%(2) = -4085
- WHEN "Snare" : *CHANNELVOICE 2 Snare
- tun%(2) = -8096
- WHEN "Choir1" : *CHANNELVOICE 2 Choir1
- tun%(2) = -6901
- WHEN "ChurOrgan" : *CHANNELVOICE 2 ChurOrgan
- tun%(2) = -6901
- WHEN "Opera" : *CHANNELVOICE 2 Opera
- tun%(2) = -13387
- WHEN "OrchChoir" : *CHANNELVOICE 2 OrchChoir
- tun%(2) = -6133
- WHEN "OrganHit" : *CHANNELVOICE 2 OrganHit
- tun%(2) = -5024
- WHEN "AgogoAfric" : *CHANNELVOICE 2 AgogoAfric
- tun%(2) = -6219
- WHEN "AgogoBrazi" : *CHANNELVOICE 2 AgogoBrazi
- tun%(2) = -10997
- WHEN "AgogoWood" : *CHANNELVOICE 2 AgogoWood
- tun%(2) = -13728
- WHEN "BDGatedRev" : *CHANNELVOICE 2 BDGatedRev
- tun%(2) = -5877
- WHEN "BDMarching" : *CHANNELVOICE 2 BDMarching
- tun%(2) = -8608
- WHEN "BDPiloMute" : *CHANNELVOICE 2 BDPiloMute
- tun%(2) = -7072
- WHEN "Cabasa" : *CHANNELVOICE 2 Cabasa
- tun%(2) = -7072
- WHEN "Cachichi1" : *CHANNELVOICE 2 Cachichi1
- tun%(2) = -4000
- WHEN "CachichiTr" : *CHANNELVOICE 2 CachichiTr
- tun%(2) = -8096
- WHEN "Castanets" : *CHANNELVOICE 2 Castanets
- tun%(2) = -4000
- WHEN "CongaMid" : *CHANNELVOICE 2 CongaMid
- tun%(2) = -4171
- WHEN "CongaSmCl" : *CHANNELVOICE 2 CongaSmCl
- tun%(2) = -4683
- WHEN "CymbalCrsh" : *CHANNELVOICE 2 CymbalCrsh
- tun%(2) = -4000
- WHEN "CymRideBel" : *CHANNELVOICE 2 CymRideBel
- tun%(2) = -16288
- WHEN "CymRStRoll" : *CHANNELVOICE 2 CymRStRoll
- tun%(2) = -6389
- WHEN "CymSplshCa" : *CHANNELVOICE 2 CymSplshCa
- tun%(2) = -9120
- WHEN "Flexitone" : *CHANNELVOICE 2 Flexitone
- tun%(2) = -8096
- WHEN "GongSoft" : *CHANNELVOICE 2 GongSoft
- tun%(2) = -5365
- WHEN "Gonza1" : *CHANNELVOICE 2 Gonza1
- tun%(2) = -12192
- WHEN "GuiroSlow" : *CHANNELVOICE 2 GuiroSlow
- tun%(2) = -6048
- WHEN "HandClaps" : *CHANNELVOICE 2 HandClaps
- tun%(2) = -4000
- WHEN "HiHatFoot" : *CHANNELVOICE 2 HiHatFoot
- tun%(2) = -6389
- WHEN "Maracas1" : *CHANNELVOICE 2 Maracas1
- tun%(2) = -8096
- WHEN "MarimbaSB3" : *CHANNELVOICE 2 MarimbaSB3
- tun%(2) = -4000
- WHEN "Ratchet" : *CHANNELVOICE 2 Ratchet
- tun%(2) = -6731
- WHEN "RotoTomRev" : *CHANNELVOICE 2 RotoTomRev
- tun%(2) = -6133
- WHEN "SimmonsBD1" : *CHANNELVOICE 2 SimmonsBD1
- tun%(2) = -8096
- WHEN "SimmonsSn1" : *CHANNELVOICE 2 SimmonsSn1
- tun%(2) = -5707
- WHEN "SleighBell" : *CHANNELVOICE 2 SleighBell
- tun%(2) = -4000
- WHEN "SuperGong" : *CHANNELVOICE 2 SuperGong
- tun%(2) = -4341
- WHEN "SynthSnare" : *CHANNELVOICE 2 SynthSnare
- tun%(2) = -4000
- WHEN "SynTom" : *CHANNELVOICE 2 SynTom
- tun%(2) = -9120
- WHEN "TimpCresBb" : *CHANNELVOICE 2 TimpCresBb
- tun%(2) = -5962
- WHEN "TimpLowBb" : *CHANNELVOICE 2 TimpLowBb
- tun%(2) = -5707
- WHEN "TimpRollEb" : *CHANNELVOICE 2 TimpRollEb
- tun%(2) = -4000
- WHEN "TomRoll" : *CHANNELVOICE 2 TomRoll
- tun%(2) = -4000
- WHEN "ToyHooter" : *CHANNELVOICE 2 ToyHooter
- tun%(2) = -9717
- WHEN "ToyWhistle" : *CHANNELVOICE 2 ToyWhistle
- tun%(2) = -4000
- ENDCASE
- WHEN 3 :
- CASE waveforms$(vnumber%) OF
- WHEN "WaveSynth-Beep" : *CHANNELVOICE 3 WaveSynth-Beep
- WHEN "StringLib-Soft" : *CHANNELVOICE 3 StringLib-Soft
- WHEN "StringLib-Pluck" : *CHANNELVOICE 3 StringLib-Pluck
- WHEN "StringLib-Steel" : *CHANNELVOICE 3 StringLib-Steel
- WHEN "StringLib-Hard" : *CHANNELVOICE 3 StringLib-Hard
- WHEN "Percussion-Soft" : *CHANNELVOICE 3 Percussion-Soft
- WHEN "Percussion-Medium" : *CHANNELVOICE 3 Percussion-Medium
- WHEN "Percussion-Snare" : *CHANNELVOICE 3 Percussion-Snare
- WHEN "Percussion-Noise" : *CHANNELVOICE 3 Percussion-Noise
- WHEN "BassBowAb" : *CHANNELVOICE 3 BassBowAb
- tun%(3) = -1470
- WHEN "AcouBass" : *CHANNELVOICE 3 AcouBass
- tun%(3) = -2731
- WHEN "Vibe" : *CHANNELVOICE 3 Vibe
- tun%(3) = -6912
- WHEN "BugleC" : *CHANNELVOICE 3 BugleC
- tun%(3) = -11008
- WHEN "CornetEb" : *CHANNELVOICE 3 CornetEb
- tun%(3) = -12117
- WHEN "SaxEbBarC" : *CHANNELVOICE 3 SaxEbBarC
- tun%(3) = -2816
- WHEN "SaxBbTenrE" : *CHANNELVOICE 3 SaxBbTenrE
- tun%(3) = -4181
- WHEN "BassoonEb" : *CHANNELVOICE 3 BassoonEb
- tun%(3) = -4011
- WHEN "ClarinetBb" : *CHANNELVOICE 3 ClarinetBb
- tun%(3) = -10325
- WHEN "EngHornGb" : *CHANNELVOICE 3 EngHornGb
- tun%(3) = -8960
- WHEN "MandolinDb" : *CHANNELVOICE 3 MandolinDb
- tun%(3) = -11264
- WHEN "Piano2B" : *CHANNELVOICE 3 Piano2B
- tun%(3) = -2475
- WHEN "ClarVibEb" : *CHANNELVOICE 3 ClarVibEb
- tun%(3) = -7850
- WHEN "GtrDobroB" : *CHANNELVOICE 3 GtrDobroB
- tun%(3) = -6485
- WHEN "RecorderGb" : *CHANNELVOICE 3 RecorderGb
- tun%(3) = -13056
- WHEN "FlugelHnEb" : *CHANNELVOICE 3 FlugelHnEb
- tun%(3) = -12032
- WHEN "VceMmmGb23" : *CHANNELVOICE 3 VceMmmGb23
- tun%(3) = -853
- WHEN "VceMOooGb3" : *CHANNELVOICE 3 VceMOooGb3
- tun%(3) = -4843
- WHEN "VceFemAahC" : *CHANNELVOICE 3 VceFemAahC
- tun%(3) = -10948
- WHEN "VceFMmmGb4" : *CHANNELVOICE 3 VceFMmmGb4
- tun%(3) = -8918
- WHEN "Bass" : *CHANNELVOICE 3 Bass
- tun%(3) = 0
- WHEN "ChurchBell" : *CHANNELVOICE 3 ChurchBell
- tun%(3) = -2731
- WHEN "mysound" : *CHANNELVOICE 3 mysound
- tun%(3) = 0
- WHEN "GuiroFast" : *CHANNELVOICE 3 GuiroFast
- tun%(3) = -4000
- WHEN "Clave" : *CHANNELVOICE 3 Clave
- tun%(3) = -8096
- WHEN "CowBell" : *CHANNELVOICE 3 CowBell
- tun%(3) = -5707
- WHEN "CymbRideHd" : *CHANNELVOICE 3 CymbRideHd
- tun%(3) = -8096
- WHEN "AcGuitar1" : *CHANNELVOICE 3 AcGuitar1
- tun%(3) = -7072
- WHEN "CongaHi" : *CHANNELVOICE 3 CongaHi
- tun%(3) = -4000
- WHEN "DrumExplo" : *CHANNELVOICE 3 DrumExplo
- tun%(3) = -4000
- WHEN "ElecTom1" : *CHANNELVOICE 3 ElecTom1
- tun%(3) = -8096
- WHEN "Harp1" : *CHANNELVOICE 3 Harp1
- tun%(3) = -10997
- WHEN "Harpsi" : *CHANNELVOICE 3 Harpsi
- tun%(3) = -6901
- WHEN "HiString" : *CHANNELVOICE 3 HiString
- tun%(3) = -10997
- WHEN "HonkyPiano" : *CHANNELVOICE 3 HonkyPiano
- tun%(3) = -6901
- WHEN "JapFlute" : *CHANNELVOICE 3 JapFlute
- tun%(3) = -10997
- WHEN "JazzOrgan" : *CHANNELVOICE 3 JazzOrgan
- tun%(3) = -10997
- WHEN "MidStrings" : *CHANNELVOICE 3 MidStrings
- tun%(3) = -6901
- WHEN "NoteArp1" : *CHANNELVOICE 3 NoteArp1
- tun%(3) = -4000
- WHEN "SnareEcho" : *CHANNELVOICE 3 SnareEcho
- tun%(3) = -4341
- WHEN "TablaHi" : *CHANNELVOICE 3 TablaHi
- tun%(3) = -7669
- WHEN "Timpani" : *CHANNELVOICE 3 Timpani
- tun%(3) = -928
- WHEN "Tomtom1" : *CHANNELVOICE 3 Tomtom1
- tun%(3) = -5365
- WHEN "Trombone1" : *CHANNELVOICE 3 Trombone1
- tun%(3) = -6901
- WHEN "Trumpet" : *CHANNELVOICE 3 Trumpet
- tun%(3) = -10997
- WHEN "Xylophone" : *CHANNELVOICE 3 Xylophone
- tun%(3) = -6901
- WHEN "AcouGtr2B" : *CHANNELVOICE 3 AcouGtr2B
- tun%(3) = -6560
- WHEN "AcuBassAb1" : *CHANNELVOICE 3 AcuBassAb1
- tun%(3) = -1610
- WHEN "BagPipeG" : *CHANNELVOICE 3 BagPipeG
- tun%(3) = -9291
- WHEN "BanjoChdBb" : *CHANNELVOICE 3 BanjoChdBb
- tun%(3) = -4000
- WHEN "BazookiE" : *CHANNELVOICE 3 BazookiE
- tun%(3) = -8267
- WHEN "BellC" : *CHANNELVOICE 3 BellC
- tun%(3) = -10997
- WHEN "BrassEns1B" : *CHANNELVOICE 3 BrassEns1B
- tun%(3) = -6560
- WHEN "ClavichdBb" : *CHANNELVOICE 3 ClavichdBb
- tun%(3) = -10315
- WHEN "ClavinetBb" : *CHANNELVOICE 3 ClavinetBb
- tun%(3) = -6219
- WHEN "CornetEb" : *CHANNELVOICE 3 CornetEb
- tun%(3) = -4000
- WHEN "EnsWodAb45" : *CHANNELVOICE 3 EnsWodAb45
- tun%(3) = -9632
- WHEN "EnsWodGb12" : *CHANNELVOICE 3 EnsWodGb12
- tun%(3) = -4853
- WHEN "Glock2Ab5" : *CHANNELVOICE 3 Glock2Ab5
- tun%(3) = -9632
- WHEN "GtMelobarC" : *CHANNELVOICE 3 GtMelobarC
- tun%(3) = -6901
- WHEN "GtWashbnBb" : *CHANNELVOICE 3 GtWashbnBb
- tun%(3) = -6219
- WHEN "HarmonicaE" : *CHANNELVOICE 3 HarmonicaE
- tun%(3) = -4171
- WHEN "Jew'sHarpA" : *CHANNELVOICE 3 Jew'sHarpA
- tun%(3) = -6219
- WHEN "MusetteB" : *CHANNELVOICE 3 MusetteB
- tun%(3) = -10656
- WHEN "OboeGb" : *CHANNELVOICE 3 OboeGb
- tun%(3) = -13131
- WHEN "OrchHit2B" : *CHANNELVOICE 3 OrchHit2B
- tun%(3) = -5451
- WHEN "OrcSusBb23" : *CHANNELVOICE 3 OrcSusBb23
- tun%(3) = -6304
- WHEN "PiccoloE" : *CHANNELVOICE 3 PiccoloE
- tun%(3) = -16544
- WHEN "SaxSoprnoE" : *CHANNELVOICE 3 SaxSoprnoE
- tun%(3) = -12448
- WHEN "StrngThkBb" : *CHANNELVOICE 3 StrngThkBb
- tun%(3) = -5792
- WHEN "TubaGb" : *CHANNELVOICE 3 TubaGb
- tun%(3) = -929
- WHEN "BassDrum" : *CHANNELVOICE 3 BassDrum
- tun%(3) = -4000
- WHEN "HiHat" : *CHANNELVOICE 3 HiHat
- tun%(3) = -4000
- WHEN "OrcHit" : *CHANNELVOICE 3 OrcHit
- tun%(3) = -4085
- WHEN "Piano" : *CHANNELVOICE 3 Piano
- tun%(3) = -4171
- WHEN "Sax" : *CHANNELVOICE 3 Sax
- tun%(3) = -4085
- WHEN "Snare" : *CHANNELVOICE 3 Snare
- tun%(3) = -8096
- WHEN "Choir1" : *CHANNELVOICE 3 Choir1
- tun%(3) = -6901
- WHEN "ChurOrgan" : *CHANNELVOICE 3 ChurOrgan
- tun%(3) = -6901
- WHEN "Opera" : *CHANNELVOICE 3 Opera
- tun%(3) = -13387
- WHEN "OrchChoir" : *CHANNELVOICE 3 OrchChoir
- tun%(3) = -6133
- WHEN "OrganHit" : *CHANNELVOICE 3 OrganHit
- tun%(3) = -5024
- WHEN "AgogoAfric" : *CHANNELVOICE 3 AgogoAfric
- tun%(3) = -6219
- WHEN "AgogoBrazi" : *CHANNELVOICE 3 AgogoBrazi
- tun%(3) = -10997
- WHEN "AgogoWood" : *CHANNELVOICE 3 AgogoWood
- tun%(3) = -13728
- WHEN "BDGatedRev" : *CHANNELVOICE 3 BDGatedRev
- tun%(3) = -5877
- WHEN "BDMarching" : *CHANNELVOICE 3 BDMarching
- tun%(3) = -8608
- WHEN "BDPiloMute" : *CHANNELVOICE 3 BDPiloMute
- tun%(3) = -7072
- WHEN "Cabasa" : *CHANNELVOICE 3 Cabasa
- tun%(3) = -7072
- WHEN "Cachichi1" : *CHANNELVOICE 3 Cachichi1
- tun%(3) = -4000
- WHEN "CachichiTr" : *CHANNELVOICE 3 CachichiTr
- tun%(3) = -8096
- WHEN "Castanets" : *CHANNELVOICE 3 Castanets
- tun%(3) = -4000
- WHEN "CongaMid" : *CHANNELVOICE 3 CongaMid
- tun%(3) = -4171
- WHEN "CongaSmCl" : *CHANNELVOICE 3 CongaSmCl
- tun%(3) = -4683
- WHEN "CymbalCrsh" : *CHANNELVOICE 3 CymbalCrsh
- tun%(3) = -4000
- WHEN "CymRideBel" : *CHANNELVOICE 3 CymRideBel
- tun%(3) = -16288
- WHEN "CymRStRoll" : *CHANNELVOICE 3 CymRStRoll
- tun%(3) = -6389
- WHEN "CymSplshCa" : *CHANNELVOICE 3 CymSplshCa
- tun%(3) = -9120
- WHEN "Flexitone" : *CHANNELVOICE 3 Flexitone
- tun%(3) = -8096
- WHEN "GongSoft" : *CHANNELVOICE 3 GongSoft
- tun%(3) = -5365
- WHEN "Gonza1" : *CHANNELVOICE 3 Gonza1
- tun%(3) = -12192
- WHEN "GuiroSlow" : *CHANNELVOICE 3 GuiroSlow
- tun%(3) = -6048
- WHEN "HandClaps" : *CHANNELVOICE 3 HandClaps
- tun%(3) = -4000
- WHEN "HiHatFoot" : *CHANNELVOICE 3 HiHatFoot
- tun%(3) = -6389
- WHEN "Maracas1" : *CHANNELVOICE 3 Maracas1
- tun%(3) = -8096
- WHEN "MarimbaSB3" : *CHANNELVOICE 3 MarimbaSB3
- tun%(3) = -4000
- WHEN "Ratchet" : *CHANNELVOICE 3 Ratchet
- tun%(3) = -6731
- WHEN "RotoTomRev" : *CHANNELVOICE 3 RotoTomRev
- tun%(3) = -6133
- WHEN "SimmonsBD1" : *CHANNELVOICE 3 SimmonsBD1
- tun%(3) = -8096
- WHEN "SimmonsSn1" : *CHANNELVOICE 3 SimmonsSn1
- tun%(3) = -5707
- WHEN "SleighBell" : *CHANNELVOICE 3 SleighBell
- tun%(3) = -4000
- WHEN "SuperGong" : *CHANNELVOICE 3 SuperGong
- tun%(3) = -4341
- WHEN "SynthSnare" : *CHANNELVOICE 3 SynthSnare
- tun%(3) = -4000
- WHEN "SynTom" : *CHANNELVOICE 3 SynTom
- tun%(3) = -9120
- WHEN "TimpCresBb" : *CHANNELVOICE 3 TimpCresBb
- tun%(3) = -5962
- WHEN "TimpLowBb" : *CHANNELVOICE 3 TimpLowBb
- tun%(3) = -5707
- WHEN "TimpRollEb" : *CHANNELVOICE 3 TimpRollEb
- tun%(3) = -4000
- WHEN "TomRoll" : *CHANNELVOICE 3 TomRoll
- tun%(3) = -4000
- WHEN "ToyHooter" : *CHANNELVOICE 3 ToyHooter
- tun%(3) = -9717
- WHEN "ToyWhistle" : *CHANNELVOICE 3 ToyWhistle
- tun%(3) = -4000
- ENDCASE
- WHEN 4 :
- CASE waveforms$(vnumber%) OF
- WHEN "WaveSynth-Beep" : *CHANNELVOICE 4 WaveSynth-Beep
- WHEN "StringLib-Soft" : *CHANNELVOICE 4 StringLib-Soft
- WHEN "StringLib-Pluck" : *CHANNELVOICE 4 StringLib-Pluck
- WHEN "StringLib-Steel" : *CHANNELVOICE 4 StringLib-Steel
- WHEN "StringLib-Hard" : *CHANNELVOICE 4 StringLib-Hard
- WHEN "Percussion-Soft" : *CHANNELVOICE 4 Percussion-Soft
- WHEN "Percussion-Medium" : *CHANNELVOICE 4 Percussion-Medium
- WHEN "Percussion-Snare" : *CHANNELVOICE 4 Percussion-Snare
- WHEN "Percussion-Noise" : *CHANNELVOICE 4 Percussion-Noise
- WHEN "BassBowAb" : *CHANNELVOICE 4 BassBowAb
- tun%(4) = -1470
- WHEN "AcouBass" : *CHANNELVOICE 4 AcouBass
- tun%(4) = -2731
- WHEN "Vibe" : *CHANNELVOICE 4 Vibe
- tun%(4) = -6912
- WHEN "BugleC" : *CHANNELVOICE 4 BugleC
- tun%(4) = -11008
- WHEN "CornetEb" : *CHANNELVOICE 4 CornetEb
- tun%(4) = -12117
- WHEN "SaxEbBarC" : *CHANNELVOICE 4 SaxEbBarC
- tun%(4) = -2816
- WHEN "SaxBbTenrE" : *CHANNELVOICE 4 SaxBbTenrE
- tun%(4) = -4181
- WHEN "BassoonEb" : *CHANNELVOICE 4 BassoonEb
- tun%(4) = -4011
- WHEN "ClarinetBb" : *CHANNELVOICE 4 ClarinetBb
- tun%(4) = -10325
- WHEN "EngHornGb" : *CHANNELVOICE 4 EngHornGb
- tun%(4) = -8960
- WHEN "MandolinDb" : *CHANNELVOICE 4 MandolinDb
- tun%(4) = -11264
- WHEN "Piano2B" : *CHANNELVOICE 4 Piano2B
- tun%(4) = -2475
- WHEN "ClarVibEb" : *CHANNELVOICE 4 ClarVibEb
- tun%(4) = -7850
- WHEN "GtrDobroB" : *CHANNELVOICE 4 GtrDobroB
- tun%(4) = -6485
- WHEN "RecorderGb" : *CHANNELVOICE 4 RecorderGb
- tun%(4) = -13056
- WHEN "FlugelHnEb" : *CHANNELVOICE 4 FlugelHnEb
- tun%(4) = -12032
- WHEN "VceMmmGb23" : *CHANNELVOICE 4 VceMmmGb23
- tun%(4) = -853
- WHEN "VceMOooGb3" : *CHANNELVOICE 4 VceMOooGb3
- tun%(4) = -4843
- WHEN "VceFemAahC" : *CHANNELVOICE 4 VceFemAahC
- tun%(4) = -10948
- WHEN "VceFMmmGb4" : *CHANNELVOICE 4 VceFMmmGb4
- tun%(4) = -8918
- WHEN "Bass" : *CHANNELVOICE 4 Bass
- tun%(4) = 0
- WHEN "ChurchBell" : *CHANNELVOICE 4 ChurchBell
- tun%(4) = -2731
- WHEN "mysound" : *CHANNELVOICE 4 mysound
- tun%(4) = 0
- WHEN "GuiroFast" : *CHANNELVOICE 4 GuiroFast
- tun%(4) = -4000
- WHEN "Clave" : *CHANNELVOICE 4 Clave
- tun%(4) = -8096
- WHEN "CowBell" : *CHANNELVOICE 4 CowBell
- tun%(4) = -5707
- WHEN "CymbRideHd" : *CHANNELVOICE 4 CymbRideHd
- tun%(4) = -8096
- WHEN "AcGuitar1" : *CHANNELVOICE 4 AcGuitar1
- tun%(4) = -7072
- WHEN "CongaHi" : *CHANNELVOICE 4 CongaHi
- tun%(4) = -4000
- WHEN "DrumExplo" : *CHANNELVOICE 4 DrumExplo
- tun%(4) = -4000
- WHEN "ElecTom1" : *CHANNELVOICE 4 ElecTom1
- tun%(4) = -8096
- WHEN "Harp1" : *CHANNELVOICE 4 Harp1
- tun%(4) = -10997
- WHEN "Harpsi" : *CHANNELVOICE 4 Harpsi
- tun%(4) = -6901
- WHEN "HiString" : *CHANNELVOICE 4 HiString
- tun%(4) = -10997
- WHEN "HonkyPiano" : *CHANNELVOICE 4 HonkyPiano
- tun%(4) = -6901
- WHEN "JapFlute" : *CHANNELVOICE 4 JapFlute
- tun%(4) = -10997
- WHEN "JazzOrgan" : *CHANNELVOICE 4 JazzOrgan
- tun%(4) = -10997
- WHEN "MidStrings" : *CHANNELVOICE 4 MidStrings
- tun%(4) = -6901
- WHEN "NoteArp1" : *CHANNELVOICE 4 NoteArp1
- tun%(4) = -4000
- WHEN "SnareEcho" : *CHANNELVOICE 4 SnareEcho
- tun%(4) = -4341
- WHEN "TablaHi" : *CHANNELVOICE 4 TablaHi
- tun%(4) = -7669
- WHEN "Timpani" : *CHANNELVOICE 4 Timpani
- tun%(4) = -928
- WHEN "Tomtom1" : *CHANNELVOICE 4 Tomtom1
- tun%(4) = -5365
- WHEN "Trombone1" : *CHANNELVOICE 4 Trombone1
- tun%(4) = -6901
- WHEN "Trumpet" : *CHANNELVOICE 4 Trumpet
- tun%(4) = -10997
- WHEN "Xylophone" : *CHANNELVOICE 4 Xylophone
- tun%(4) = -6901
- WHEN "AcouGtr2B" : *CHANNELVOICE 4 AcouGtr2B
- tun%(4) = -6560
- WHEN "AcuBassAb1" : *CHANNELVOICE 4 AcuBassAb1
- tun%(4) = -1610
- WHEN "BagPipeG" : *CHANNELVOICE 4 BagPipeG
- tun%(4) = -9291
- WHEN "BanjoChdBb" : *CHANNELVOICE 4 BanjoChdBb
- tun%(4) = -4000
- WHEN "BazookiE" : *CHANNELVOICE 4 BazookiE
- tun%(4) = -8267
- WHEN "BellC" : *CHANNELVOICE 4 BellC
- tun%(4) = -10997
- WHEN "BrassEns1B" : *CHANNELVOICE 4 BrassEns1B
- tun%(4) = -6560
- WHEN "ClavichdBb" : *CHANNELVOICE 4 ClavichdBb
- tun%(4) = -10315
- WHEN "ClavinetBb" : *CHANNELVOICE 4 ClavinetBb
- tun%(4) = -6219
- WHEN "CornetEb" : *CHANNELVOICE 4 CornetEb
- tun%(4) = -4000
- WHEN "EnsWodAb45" : *CHANNELVOICE 4 EnsWodAb45
- tun%(4) = -9632
- WHEN "EnsWodGb12" : *CHANNELVOICE 4 EnsWodGb12
- tun%(4) = -4853
- WHEN "Glock2Ab5" : *CHANNELVOICE 4 Glock2Ab5
- tun%(4) = -9632
- WHEN "GtMelobarC" : *CHANNELVOICE 4 GtMelobarC
- tun%(4) = -6901
- WHEN "GtWashbnBb" : *CHANNELVOICE 4 GtWashbnBb
- tun%(4) = -6219
- WHEN "HarmonicaE" : *CHANNELVOICE 4 HarmonicaE
- tun%(4) = -4171
- WHEN "Jew'sHarpA" : *CHANNELVOICE 4 Jew'sHarpA
- tun%(4) = -6219
- WHEN "MusetteB" : *CHANNELVOICE 4 MusetteB
- tun%(4) = -10656
- WHEN "OboeGb" : *CHANNELVOICE 4 OboeGb
- tun%(4) = -13131
- WHEN "OrchHit2B" : *CHANNELVOICE 4 OrchHit2B
- tun%(4) = -5451
- WHEN "OrcSusBb23" : *CHANNELVOICE 4 OrcSusBb23
- tun%(4) = -6304
- WHEN "PiccoloE" : *CHANNELVOICE 4 PiccoloE
- tun%(4) = -16544
- WHEN "SaxSoprnoE" : *CHANNELVOICE 4 SaxSoprnoE
- tun%(4) = -12448
- WHEN "StrngThkBb" : *CHANNELVOICE 4 StrngThkBb
- tun%(4) = -5792
- WHEN "TubaGb" : *CHANNELVOICE 4 TubaGb
- tun%(4) = -929
- WHEN "BassDrum" : *CHANNELVOICE 4 BassDrum
- tun%(4) = -4000
- WHEN "HiHat" : *CHANNELVOICE 4 HiHat
- tun%(4) = -4000
- WHEN "OrcHit" : *CHANNELVOICE 4 OrcHit
- tun%(4) = -4085
- WHEN "Piano" : *CHANNELVOICE 4 Piano
- tun%(4) = -4171
- WHEN "Sax" : *CHANNELVOICE 4 Sax
- tun%(4) = -4085
- WHEN "Snare" : *CHANNELVOICE 4 Snare
- tun%(4) = -8096
- WHEN "Choir1" : *CHANNELVOICE 4 Choir1
- tun%(4) = -6901
- WHEN "ChurOrgan" : *CHANNELVOICE 4 ChurOrgan
- tun%(4) = -6901
- WHEN "Opera" : *CHANNELVOICE 4 Opera
- tun%(4) = -13387
- WHEN "OrchChoir" : *CHANNELVOICE 4 OrchChoir
- tun%(4) = -6133
- WHEN "OrganHit" : *CHANNELVOICE 4 OrganHit
- tun%(4) = -5024
- WHEN "AgogoAfric" : *CHANNELVOICE 4 AgogoAfric
- tun%(4) = -6219
- WHEN "AgogoBrazi" : *CHANNELVOICE 4 AgogoBrazi
- tun%(4) = -10997
- WHEN "AgogoWood" : *CHANNELVOICE 4 AgogoWood
- tun%(4) = -13728
- WHEN "BDGatedRev" : *CHANNELVOICE 4 BDGatedRev
- tun%(4) = -5877
- WHEN "BDMarching" : *CHANNELVOICE 4 BDMarching
- tun%(4) = -8608
- WHEN "BDPiloMute" : *CHANNELVOICE 4 BDPiloMute
- tun%(4) = -7072
- WHEN "Cabasa" : *CHANNELVOICE 4 Cabasa
- tun%(4) = -7072
- WHEN "Cachichi1" : *CHANNELVOICE 4 Cachichi1
- tun%(4) = -4000
- WHEN "CachichiTr" : *CHANNELVOICE 4 CachichiTr
- tun%(4) = -8096
- WHEN "Castanets" : *CHANNELVOICE 4 Castanets
- tun%(4) = -4000
- WHEN "CongaMid" : *CHANNELVOICE 4 CongaMid
- tun%(4) = -4171
- WHEN "CongaSmCl" : *CHANNELVOICE 4 CongaSmCl
- tun%(4) = -4683
- WHEN "CymbalCrsh" : *CHANNELVOICE 4 CymbalCrsh
- tun%(4) = -4000
- WHEN "CymRideBel" : *CHANNELVOICE 4 CymRideBel
- tun%(4) = -16288
- WHEN "CymRStRoll" : *CHANNELVOICE 4 CymRStRoll
- tun%(4) = -6389
- WHEN "CymSplshCa" : *CHANNELVOICE 4 CymSplshCa
- tun%(4) = -9120
- WHEN "Flexitone" : *CHANNELVOICE 4 Flexitone
- tun%(4) = -8096
- WHEN "GongSoft" : *CHANNELVOICE 4 GongSoft
- tun%(4) = -5365
- WHEN "Gonza1" : *CHANNELVOICE 4 Gonza1
- tun%(4) = -12192
- WHEN "GuiroSlow" : *CHANNELVOICE 4 GuiroSlow
- tun%(4) = -6048
- WHEN "HandClaps" : *CHANNELVOICE 4 HandClaps
- tun%(4) = -4000
- WHEN "HiHatFoot" : *CHANNELVOICE 4 HiHatFoot
- tun%(4) = -6389
- WHEN "Maracas1" : *CHANNELVOICE 4 Maracas1
- tun%(4) = -8096
- WHEN "MarimbaSB3" : *CHANNELVOICE 4 MarimbaSB3
- tun%(4) = -4000
- WHEN "Ratchet" : *CHANNELVOICE 4 Ratchet
- tun%(4) = -6731
- WHEN "RotoTomRev" : *CHANNELVOICE 4 RotoTomRev
- tun%(4) = -6133
- WHEN "SimmonsBD1" : *CHANNELVOICE 4 SimmonsBD1
- tun%(4) = -8096
- WHEN "SimmonsSn1" : *CHANNELVOICE 4 SimmonsSn1
- tun%(4) = -5707
- WHEN "SleighBell" : *CHANNELVOICE 4 SleighBell
- tun%(4) = -4000
- WHEN "SuperGong" : *CHANNELVOICE 4 SuperGong
- tun%(4) = -4341
- WHEN "SynthSnare" : *CHANNELVOICE 4 SynthSnare
- tun%(4) = -4000
- WHEN "SynTom" : *CHANNELVOICE 4 SynTom
- tun%(4) = -9120
- WHEN "TimpCresBb" : *CHANNELVOICE 4 TimpCresBb
- tun%(4) = -5962
- WHEN "TimpLowBb" : *CHANNELVOICE 4 TimpLowBb
- tun%(4) = -5707
- WHEN "TimpRollEb" : *CHANNELVOICE 4 TimpRollEb
- tun%(4) = -4000
- WHEN "TomRoll" : *CHANNELVOICE 4 TomRoll
- tun%(4) = -4000
- WHEN "ToyHooter" : *CHANNELVOICE 4 ToyHooter
- tun%(4) = -9717
- WHEN "ToyWhistle" : *CHANNELVOICE 4 ToyWhistle
- tun%(4) = -4000
- ENDCASE
- WHEN 5 :
- CASE waveforms$(vnumber%) OF
- WHEN "WaveSynth-Beep" : *CHANNELVOICE 5 WaveSynth-Beep
- WHEN "StringLib-Soft" : *CHANNELVOICE 5 StringLib-Soft
- WHEN "StringLib-Pluck" : *CHANNELVOICE 5 StringLib-Pluck
- WHEN "StringLib-Steel" : *CHANNELVOICE 5 StringLib-Steel
- WHEN "StringLib-Hard" : *CHANNELVOICE 5 StringLib-Hard
- WHEN "Percussion-Soft" : *CHANNELVOICE 5 Percussion-Soft
- WHEN "Percussion-Medium" : *CHANNELVOICE 5 Percussion-Medium
- WHEN "Percussion-Snare" : *CHANNELVOICE 5 Percussion-Snare
- WHEN "Percussion-Noise" : *CHANNELVOICE 5 Percussion-Noise
- WHEN "BassBowAb" : *CHANNELVOICE 5 BassBowAb
- tun%(5) = -1470
- WHEN "AcouBass" : *CHANNELVOICE 5 AcouBass
- tun%(5) = -2731
- WHEN "Vibe" : *CHANNELVOICE 5 Vibe
- tun%(5) = -6912
- WHEN "BugleC" : *CHANNELVOICE 5 BugleC
- tun%(5) = -11008
- WHEN "CornetEb" : *CHANNELVOICE 5 CornetEb
- tun%(5) = -12117
- WHEN "SaxEbBarC" : *CHANNELVOICE 5 SaxEbBarC
- tun%(5) = -2816
- WHEN "SaxBbTenrE" : *CHANNELVOICE 5 SaxBbTenrE
- tun%(5) = -4181
- WHEN "BassoonEb" : *CHANNELVOICE 5 BassoonEb
- tun%(5) = -4011
- WHEN "ClarinetBb" : *CHANNELVOICE 5 ClarinetBb
- tun%(5) = -10325
- WHEN "EngHornGb" : *CHANNELVOICE 5 EngHornGb
- tun%(5) = -8960
- WHEN "MandolinDb" : *CHANNELVOICE 5 MandolinDb
- tun%(5) = -11264
- WHEN "Piano2B" : *CHANNELVOICE 5 Piano2B
- tun%(5) = -2475
- WHEN "ClarVibEb" : *CHANNELVOICE 5 ClarVibEb
- tun%(5) = -7850
- WHEN "GtrDobroB" : *CHANNELVOICE 5 GtrDobroB
- tun%(5) = -6485
- WHEN "RecorderGb" : *CHANNELVOICE 5 RecorderGb
- tun%(5) = -13056
- WHEN "FlugelHnEb" : *CHANNELVOICE 5 FlugelHnEb
- tun%(5) = -12032
- WHEN "VceMmmGb23" : *CHANNELVOICE 5 VceMmmGb23
- tun%(5) = -853
- WHEN "VceMOooGb3" : *CHANNELVOICE 5 VceMOooGb3
- tun%(5) = -4843
- WHEN "VceFemAahC" : *CHANNELVOICE 5 VceFemAahC
- tun%(5) = -10948
- WHEN "VceFMmmGb4" : *CHANNELVOICE 5 VceFMmmGb4
- tun%(5) = -8918
- WHEN "Bass" : *CHANNELVOICE 5 Bass
- tun%(5) = 0
- WHEN "ChurchBell" : *CHANNELVOICE 5 ChurchBell
- tun%(5) = -2731
- WHEN "mysound" : *CHANNELVOICE 5 mysound
- tun%(5) = 0
- WHEN "GuiroFast" : *CHANNELVOICE 5 GuiroFast
- tun%(5) = -4000
- WHEN "Clave" : *CHANNELVOICE 5 Clave
- tun%(5) = -8096
- WHEN "CowBell" : *CHANNELVOICE 5 CowBell
- tun%(5) = -5707
- WHEN "CymbRideHd" : *CHANNELVOICE 5 CymbRideHd
- tun%(5) = -8096
- WHEN "AcGuitar1" : *CHANNELVOICE 5 AcGuitar1
- tun%(5) = -7072
- WHEN "CongaHi" : *CHANNELVOICE 5 CongaHi
- tun%(5) = -4000
- WHEN "DrumExplo" : *CHANNELVOICE 5 DrumExplo
- tun%(5) = -4000
- WHEN "ElecTom1" : *CHANNELVOICE 5 ElecTom1
- tun%(5) = -8096
- WHEN "Harp1" : *CHANNELVOICE 5 Harp1
- tun%(5) = -10997
- WHEN "Harpsi" : *CHANNELVOICE 5 Harpsi
- tun%(5) = -6901
- WHEN "HiString" : *CHANNELVOICE 5 HiString
- tun%(5) = -10997
- WHEN "HonkyPiano" : *CHANNELVOICE 5 HonkyPiano
- tun%(5) = -6901
- WHEN "JapFlute" : *CHANNELVOICE 5 JapFlute
- tun%(5) = -10997
- WHEN "JazzOrgan" : *CHANNELVOICE 5 JazzOrgan
- tun%(5) = -10997
- WHEN "MidStrings" : *CHANNELVOICE 5 MidStrings
- tun%(5) = -6901
- WHEN "NoteArp1" : *CHANNELVOICE 5 NoteArp1
- tun%(5) = -4000
- WHEN "SnareEcho" : *CHANNELVOICE 5 SnareEcho
- tun%(5) = -4341
- WHEN "TablaHi" : *CHANNELVOICE 5 TablaHi
- tun%(5) = -7669
- WHEN "Timpani" : *CHANNELVOICE 5 Timpani
- tun%(5) = -928
- WHEN "Tomtom1" : *CHANNELVOICE 5 Tomtom1
- tun%(5) = -5365
- WHEN "Trombone1" : *CHANNELVOICE 5 Trombone1
- tun%(5) = -6901
- WHEN "Trumpet" : *CHANNELVOICE 5 Trumpet
- tun%(5) = -10997
- WHEN "Xylophone" : *CHANNELVOICE 5 Xylophone
- tun%(5) = -6901
- WHEN "AcouGtr2B" : *CHANNELVOICE 5 AcouGtr2B
- tun%(5) = -6560
- WHEN "AcuBassAb1" : *CHANNELVOICE 5 AcuBassAb1
- tun%(5) = -1610
- WHEN "BagPipeG" : *CHANNELVOICE 5 BagPipeG
- tun%(5) = -9291
- WHEN "BanjoChdBb" : *CHANNELVOICE 5 BanjoChdBb
- tun%(5) = -4000
- WHEN "BazookiE" : *CHANNELVOICE 5 BazookiE
- tun%(5) = -8267
- WHEN "BellC" : *CHANNELVOICE 5 BellC
- tun%(5) = -10997
- WHEN "BrassEns1B" : *CHANNELVOICE 5 BrassEns1B
- tun%(5) = -6560
- WHEN "ClavichdBb" : *CHANNELVOICE 5 ClavichdBb
- tun%(5) = -10315
- WHEN "ClavinetBb" : *CHANNELVOICE 5 ClavinetBb
- tun%(5) = -6219
- WHEN "CornetEb" : *CHANNELVOICE 5 CornetEb
- tun%(5) = -4000
- WHEN "EnsWodAb45" : *CHANNELVOICE 5 EnsWodAb45
- tun%(5) = -9632
- WHEN "EnsWodGb12" : *CHANNELVOICE 5 EnsWodGb12
- tun%(5) = -4853
- WHEN "Glock2Ab5" : *CHANNELVOICE 5 Glock2Ab5
- tun%(5) = -9632
- WHEN "GtMelobarC" : *CHANNELVOICE 5 GtMelobarC
- tun%(5) = -6901
- WHEN "GtWashbnBb" : *CHANNELVOICE 5 GtWashbnBb
- tun%(5) = -6219
- WHEN "HarmonicaE" : *CHANNELVOICE 5 HarmonicaE
- tun%(5) = -4171
- WHEN "Jew'sHarpA" : *CHANNELVOICE 5 Jew'sHarpA
- tun%(5) = -6219
- WHEN "MusetteB" : *CHANNELVOICE 5 MusetteB
- tun%(5) = -10656
- WHEN "OboeGb" : *CHANNELVOICE 5 OboeGb
- tun%(5) = -13131
- WHEN "OrchHit2B" : *CHANNELVOICE 5 OrchHit2B
- tun%(5) = -5451
- WHEN "OrcSusBb23" : *CHANNELVOICE 5 OrcSusBb23
- tun%(5) = -6304
- WHEN "PiccoloE" : *CHANNELVOICE 5 PiccoloE
- tun%(5) = -16544
- WHEN "SaxSoprnoE" : *CHANNELVOICE 5 SaxSoprnoE
- tun%(5) = -12448
- WHEN "StrngThkBb" : *CHANNELVOICE 5 StrngThkBb
- tun%(5) = -5792
- WHEN "TubaGb" : *CHANNELVOICE 5 TubaGb
- tun%(5) = -929
- WHEN "BassDrum" : *CHANNELVOICE 5 BassDrum
- tun%(5) = -4000
- WHEN "HiHat" : *CHANNELVOICE 5 HiHat
- tun%(5) = -4000
- WHEN "OrcHit" : *CHANNELVOICE 5 OrcHit
- tun%(5) = -4085
- WHEN "Piano" : *CHANNELVOICE 5 Piano
- tun%(5) = -4171
- WHEN "Sax" : *CHANNELVOICE 5 Sax
- tun%(5) = -4085
- WHEN "Snare" : *CHANNELVOICE 5 Snare
- tun%(5) = -8096
- WHEN "Choir1" : *CHANNELVOICE 5 Choir1
- tun%(5) = -6901
- WHEN "ChurOrgan" : *CHANNELVOICE 5 ChurOrgan
- tun%(5) = -6901
- WHEN "Opera" : *CHANNELVOICE 5 Opera
- tun%(5) = -13387
- WHEN "OrchChoir" : *CHANNELVOICE 5 OrchChoir
- tun%(5) = -6133
- WHEN "OrganHit" : *CHANNELVOICE 5 OrganHit
- tun%(5) = -5024
- WHEN "AgogoAfric" : *CHANNELVOICE 5 AgogoAfric
- tun%(5) = -6219
- WHEN "AgogoBrazi" : *CHANNELVOICE 5 AgogoBrazi
- tun%(5) = -10997
- WHEN "AgogoWood" : *CHANNELVOICE 5 AgogoWood
- tun%(5) = -13728
- WHEN "BDGatedRev" : *CHANNELVOICE 5 BDGatedRev
- tun%(5) = -5877
- WHEN "BDMarching" : *CHANNELVOICE 5 BDMarching
- tun%(5) = -8608
- WHEN "BDPiloMute" : *CHANNELVOICE 5 BDPiloMute
- tun%(5) = -7072
- WHEN "Cabasa" : *CHANNELVOICE 5 Cabasa
- tun%(5) = -7072
- WHEN "Cachichi1" : *CHANNELVOICE 5 Cachichi1
- tun%(5) = -4000
- WHEN "CachichiTr" : *CHANNELVOICE 5 CachichiTr
- tun%(5) = -8096
- WHEN "Castanets" : *CHANNELVOICE 5 Castanets
- tun%(5) = -4000
- WHEN "CongaMid" : *CHANNELVOICE 5 CongaMid
- tun%(5) = -4171
- WHEN "CongaSmCl" : *CHANNELVOICE 5 CongaSmCl
- tun%(5) = -4683
- WHEN "CymbalCrsh" : *CHANNELVOICE 5 CymbalCrsh
- tun%(5) = -4000
- WHEN "CymRideBel" : *CHANNELVOICE 5 CymRideBel
- tun%(5) = -16288
- WHEN "CymRStRoll" : *CHANNELVOICE 5 CymRStRoll
- tun%(5) = -6389
- WHEN "CymSplshCa" : *CHANNELVOICE 5 CymSplshCa
- tun%(5) = -9120
- WHEN "Flexitone" : *CHANNELVOICE 5 Flexitone
- tun%(5) = -8096
- WHEN "GongSoft" : *CHANNELVOICE 5 GongSoft
- tun%(5) = -5365
- WHEN "Gonza1" : *CHANNELVOICE 5 Gonza1
- tun%(5) = -12192
- WHEN "GuiroSlow" : *CHANNELVOICE 5 GuiroSlow
- tun%(5) = -6048
- WHEN "HandClaps" : *CHANNELVOICE 5 HandClaps
- tun%(5) = -4000
- WHEN "HiHatFoot" : *CHANNELVOICE 5 HiHatFoot
- tun%(5) = -6389
- WHEN "Maracas1" : *CHANNELVOICE 5 Maracas1
- tun%(5) = -8096
- WHEN "MarimbaSB3" : *CHANNELVOICE 5 MarimbaSB3
- tun%(5) = -4000
- WHEN "Ratchet" : *CHANNELVOICE 5 Ratchet
- tun%(5) = -6731
- WHEN "RotoTomRev" : *CHANNELVOICE 5 RotoTomRev
- tun%(5) = -6133
- WHEN "SimmonsBD1" : *CHANNELVOICE 5 SimmonsBD1
- tun%(5) = -8096
- WHEN "SimmonsSn1" : *CHANNELVOICE 5 SimmonsSn1
- tun%(5) = -5707
- WHEN "SleighBell" : *CHANNELVOICE 5 SleighBell
- tun%(5) = -4000
- WHEN "SuperGong" : *CHANNELVOICE 5 SuperGong
- tun%(5) = -4341
- WHEN "SynthSnare" : *CHANNELVOICE 5 SynthSnare
- tun%(5) = -4000
- WHEN "SynTom" : *CHANNELVOICE 5 SynTom
- tun%(5) = -9120
- WHEN "TimpCresBb" : *CHANNELVOICE 5 TimpCresBb
- tun%(5) = -5962
- WHEN "TimpLowBb" : *CHANNELVOICE 5 TimpLowBb
- tun%(5) = -5707
- WHEN "TimpRollEb" : *CHANNELVOICE 5 TimpRollEb
- tun%(5) = -4000
- WHEN "TomRoll" : *CHANNELVOICE 5 TomRoll
- tun%(5) = -4000
- WHEN "ToyHooter" : *CHANNELVOICE 5 ToyHooter
- tun%(5) = -9717
- WHEN "ToyWhistle" : *CHANNELVOICE 5 ToyWhistle
- tun%(5) = -4000
- ENDCASE
- WHEN 6 :
- CASE waveforms$(vnumber%) OF
- WHEN "WaveSynth-Beep" : *CHANNELVOICE 6 WaveSynth-Beep
- WHEN "StringLib-Soft" : *CHANNELVOICE 6 StringLib-Soft
- WHEN "StringLib-Pluck" : *CHANNELVOICE 6 StringLib-Pluck
- WHEN "StringLib-Steel" : *CHANNELVOICE 6 StringLib-Steel
- WHEN "StringLib-Hard" : *CHANNELVOICE 6 StringLib-Hard
- WHEN "Percussion-Soft" : *CHANNELVOICE 6 Percussion-Soft
- WHEN "Percussion-Medium" : *CHANNELVOICE 6 Percussion-Medium
- WHEN "Percussion-Snare" : *CHANNELVOICE 6 Percussion-Snare
- WHEN "Percussion-Noise" : *CHANNELVOICE 6 Percussion-Noise
- WHEN "BassBowAb" : *CHANNELVOICE 6 BassBowAb
- tun%(6) = -1470
- WHEN "AcouBass" : *CHANNELVOICE 6 AcouBass
- tun%(6) = -2731
- WHEN "Vibe" : *CHANNELVOICE 6 Vibe
- tun%(6) = -6912
- WHEN "BugleC" : *CHANNELVOICE 6 BugleC
- tun%(6) = -11008
- WHEN "CornetEb" : *CHANNELVOICE 6 CornetEb
- tun%(6) = -12117
- WHEN "SaxEbBarC" : *CHANNELVOICE 6 SaxEbBarC
- tun%(6) = -2816
- WHEN "SaxBbTenrE" : *CHANNELVOICE 6 SaxBbTenrE
- tun%(6) = -4181
- WHEN "BassoonEb" : *CHANNELVOICE 6 BassoonEb
- tun%(6) = -4011
- WHEN "ClarinetBb" : *CHANNELVOICE 6 ClarinetBb
- tun%(6) = -10325
- WHEN "EngHornGb" : *CHANNELVOICE 6 EngHornGb
- tun%(6) = -8960
- WHEN "MandolinDb" : *CHANNELVOICE 6 MandolinDb
- tun%(6) = -11264
- WHEN "Piano2B" : *CHANNELVOICE 6 Piano2B
- tun%(6) = -2475
- WHEN "ClarVibEb" : *CHANNELVOICE 6 ClarVibEb
- tun%(6) = -7850
- WHEN "GtrDobroB" : *CHANNELVOICE 6 GtrDobroB
- tun%(6) = -6485
- WHEN "RecorderGb" : *CHANNELVOICE 6 RecorderGb
- tun%(6) = -13056
- WHEN "FlugelHnEb" : *CHANNELVOICE 6 FlugelHnEb
- tun%(6) = -12032
- WHEN "VceMmmGb23" : *CHANNELVOICE 6 VceMmmGb23
- tun%(6) = -853
- WHEN "VceMOooGb3" : *CHANNELVOICE 6 VceMOooGb3
- tun%(6) = -4843
- WHEN "VceFemAahC" : *CHANNELVOICE 6 VceFemAahC
- tun%(6) = -10948
- WHEN "VceFMmmGb4" : *CHANNELVOICE 6 VceFMmmGb4
- tun%(6) = -8918
- WHEN "Bass" : *CHANNELVOICE 6 Bass
- tun%(6) = 0
- WHEN "ChurchBell" : *CHANNELVOICE 6 ChurchBell
- tun%(6) = -2731
- WHEN "mysound" : *CHANNELVOICE 6 mysound
- tun%(6) = 0
- WHEN "GuiroFast" : *CHANNELVOICE 6 GuiroFast
- tun%(6) = -4000
- WHEN "Clave" : *CHANNELVOICE 6 Clave
- tun%(6) = -8096
- WHEN "CowBell" : *CHANNELVOICE 6 CowBell
- tun%(6) = -5707
- WHEN "CymbRideHd" : *CHANNELVOICE 6 CymbRideHd
- tun%(6) = -8096
- WHEN "AcGuitar1" : *CHANNELVOICE 6 AcGuitar1
- tun%(6) = -7072
- WHEN "CongaHi" : *CHANNELVOICE 6 CongaHi
- tun%(6) = -4000
- WHEN "DrumExplo" : *CHANNELVOICE 6 DrumExplo
- tun%(6) = -4000
- WHEN "ElecTom1" : *CHANNELVOICE 6 ElecTom1
- tun%(6) = -8096
- WHEN "Harp1" : *CHANNELVOICE 6 Harp1
- tun%(6) = -10997
- WHEN "Harpsi" : *CHANNELVOICE 6 Harpsi
- tun%(6) = -6901
- WHEN "HiString" : *CHANNELVOICE 6 HiString
- tun%(6) = -10997
- WHEN "HonkyPiano" : *CHANNELVOICE 6 HonkyPiano
- tun%(6) = -6901
- WHEN "JapFlute" : *CHANNELVOICE 6 JapFlute
- tun%(6) = -10997
- WHEN "JazzOrgan" : *CHANNELVOICE 6 JazzOrgan
- tun%(6) = -10997
- WHEN "MidStrings" : *CHANNELVOICE 6 MidStrings
- tun%(6) = -6901
- WHEN "NoteArp1" : *CHANNELVOICE 6 NoteArp1
- tun%(6) = -4000
- WHEN "SnareEcho" : *CHANNELVOICE 6 SnareEcho
- tun%(6) = -4341
- WHEN "TablaHi" : *CHANNELVOICE 6 TablaHi
- tun%(6) = -7669
- WHEN "Timpani" : *CHANNELVOICE 6 Timpani
- tun%(6) = -928
- WHEN "Tomtom1" : *CHANNELVOICE 6 Tomtom1
- tun%(6) = -5365
- WHEN "Trombone1" : *CHANNELVOICE 6 Trombone1
- tun%(6) = -6901
- WHEN "Trumpet" : *CHANNELVOICE 6 Trumpet
- tun%(6) = -10997
- WHEN "Xylophone" : *CHANNELVOICE 6 Xylophone
- tun%(6) = -6901
- WHEN "AcouGtr2B" : *CHANNELVOICE 6 AcouGtr2B
- tun%(6) = -6560
- WHEN "AcuBassAb1" : *CHANNELVOICE 6 AcuBassAb1
- tun%(6) = -1610
- WHEN "BagPipeG" : *CHANNELVOICE 6 BagPipeG
- tun%(6) = -9291
- WHEN "BanjoChdBb" : *CHANNELVOICE 6 BanjoChdBb
- tun%(6) = -4000
- WHEN "BazookiE" : *CHANNELVOICE 6 BazookiE
- tun%(6) = -8267
- WHEN "BellC" : *CHANNELVOICE 6 BellC
- tun%(6) = -10997
- WHEN "BrassEns1B" : *CHANNELVOICE 6 BrassEns1B
- tun%(6) = -6560
- WHEN "ClavichdBb" : *CHANNELVOICE 6 ClavichdBb
- tun%(6) = -10315
- WHEN "ClavinetBb" : *CHANNELVOICE 6 ClavinetBb
- tun%(6) = -6219
- WHEN "CornetEb" : *CHANNELVOICE 6 CornetEb
- tun%(6) = -4000
- WHEN "EnsWodAb45" : *CHANNELVOICE 6 EnsWodAb45
- tun%(6) = -9632
- WHEN "EnsWodGb12" : *CHANNELVOICE 6 EnsWodGb12
- tun%(6) = -4853
- WHEN "Glock2Ab5" : *CHANNELVOICE 6 Glock2Ab5
- tun%(6) = -9632
- WHEN "GtMelobarC" : *CHANNELVOICE 6 GtMelobarC
- tun%(6) = -6901
- WHEN "GtWashbnBb" : *CHANNELVOICE 6 GtWashbnBb
- tun%(6) = -6219
- WHEN "HarmonicaE" : *CHANNELVOICE 6 HarmonicaE
- tun%(6) = -4171
- WHEN "Jew'sHarpA" : *CHANNELVOICE 6 Jew'sHarpA
- tun%(6) = -6219
- WHEN "MusetteB" : *CHANNELVOICE 6 MusetteB
- tun%(6) = -10656
- WHEN "OboeGb" : *CHANNELVOICE 6 OboeGb
- tun%(6) = -13131
- WHEN "OrchHit2B" : *CHANNELVOICE 6 OrchHit2B
- tun%(6) = -5451
- WHEN "OrcSusBb23" : *CHANNELVOICE 6 OrcSusBb23
- tun%(6) = -6304
- WHEN "PiccoloE" : *CHANNELVOICE 6 PiccoloE
- tun%(6) = -16544
- WHEN "SaxSoprnoE" : *CHANNELVOICE 6 SaxSoprnoE
- tun%(6) = -12448
- WHEN "StrngThkBb" : *CHANNELVOICE 6 StrngThkBb
- tun%(6) = -5792
- WHEN "TubaGb" : *CHANNELVOICE 6 TubaGb
- tun%(6) = -929
- WHEN "BassDrum" : *CHANNELVOICE 6 BassDrum
- tun%(6) = -4000
- WHEN "HiHat" : *CHANNELVOICE 6 HiHat
- tun%(6) = -4000
- WHEN "OrcHit" : *CHANNELVOICE 6 OrcHit
- tun%(6) = -4085
- WHEN "Piano" : *CHANNELVOICE 6 Piano
- tun%(6) = -4171
- WHEN "Sax" : *CHANNELVOICE 6 Sax
- tun%(6) = -4085
- WHEN "Snare" : *CHANNELVOICE 6 Snare
- tun%(6) = -8096
- WHEN "Choir1" : *CHANNELVOICE 6 Choir1
- tun%(6) = -6901
- WHEN "ChurOrgan" : *CHANNELVOICE 6 ChurOrgan
- tun%(6) = -6901
- WHEN "Opera" : *CHANNELVOICE 6 Opera
- tun%(6) = -13387
- WHEN "OrchChoir" : *CHANNELVOICE 6 OrchChoir
- tun%(6) = -6133
- WHEN "OrganHit" : *CHANNELVOICE 6 OrganHit
- tun%(6) = -5024
- WHEN "AgogoAfric" : *CHANNELVOICE 6 AgogoAfric
- tun%(6) = -6219
- WHEN "AgogoBrazi" : *CHANNELVOICE 6 AgogoBrazi
- tun%(6) = -10997
- WHEN "AgogoWood" : *CHANNELVOICE 6 AgogoWood
- tun%(6) = -13728
- WHEN "BDGatedRev" : *CHANNELVOICE 6 BDGatedRev
- tun%(6) = -5877
- WHEN "BDMarching" : *CHANNELVOICE 6 BDMarching
- tun%(6) = -8608
- WHEN "BDPiloMute" : *CHANNELVOICE 6 BDPiloMute
- tun%(6) = -7072
- WHEN "Cabasa" : *CHANNELVOICE 6 Cabasa
- tun%(6) = -7072
- WHEN "Cachichi1" : *CHANNELVOICE 6 Cachichi1
- tun%(6) = -4000
- WHEN "CachichiTr" : *CHANNELVOICE 6 CachichiTr
- tun%(6) = -8096
- WHEN "Castanets" : *CHANNELVOICE 6 Castanets
- tun%(6) = -4000
- WHEN "CongaMid" : *CHANNELVOICE 6 CongaMid
- tun%(6) = -4171
- WHEN "CongaSmCl" : *CHANNELVOICE 6 CongaSmCl
- tun%(6) = -4683
- WHEN "CymbalCrsh" : *CHANNELVOICE 6 CymbalCrsh
- tun%(6) = -4000
- WHEN "CymRideBel" : *CHANNELVOICE 6 CymRideBel
- tun%(6) = -16288
- WHEN "CymRStRoll" : *CHANNELVOICE 6 CymRStRoll
- tun%(6) = -6389
- WHEN "CymSplshCa" : *CHANNELVOICE 6 CymSplshCa
- tun%(6) = -9120
- WHEN "Flexitone" : *CHANNELVOICE 6 Flexitone
- tun%(6) = -8096
- WHEN "GongSoft" : *CHANNELVOICE 6 GongSoft
- tun%(6) = -5365
- WHEN "Gonza1" : *CHANNELVOICE 6 Gonza1
- tun%(6) = -12192
- WHEN "GuiroSlow" : *CHANNELVOICE 6 GuiroSlow
- tun%(6) = -6048
- WHEN "HandClaps" : *CHANNELVOICE 6 HandClaps
- tun%(6) = -4000
- WHEN "HiHatFoot" : *CHANNELVOICE 6 HiHatFoot
- tun%(6) = -6389
- WHEN "Maracas1" : *CHANNELVOICE 6 Maracas1
- tun%(6) = -8096
- WHEN "MarimbaSB3" : *CHANNELVOICE 6 MarimbaSB3
- tun%(6) = -4000
- WHEN "Ratchet" : *CHANNELVOICE 6 Ratchet
- tun%(6) = -6731
- WHEN "RotoTomRev" : *CHANNELVOICE 6 RotoTomRev
- tun%(6) = -6133
- WHEN "SimmonsBD1" : *CHANNELVOICE 6 SimmonsBD1
- tun%(6) = -8096
- WHEN "SimmonsSn1" : *CHANNELVOICE 6 SimmonsSn1
- tun%(6) = -5707
- WHEN "SleighBell" : *CHANNELVOICE 6 SleighBell
- tun%(6) = -4000
- WHEN "SuperGong" : *CHANNELVOICE 6 SuperGong
- tun%(6) = -4341
- WHEN "SynthSnare" : *CHANNELVOICE 6 SynthSnare
- tun%(6) = -4000
- WHEN "SynTom" : *CHANNELVOICE 6 SynTom
- tun%(6) = -9120
- WHEN "TimpCresBb" : *CHANNELVOICE 6 TimpCresBb
- tun%(6) = -5962
- WHEN "TimpLowBb" : *CHANNELVOICE 6 TimpLowBb
- tun%(6) = -5707
- WHEN "TimpRollEb" : *CHANNELVOICE 6 TimpRollEb
- tun%(6) = -4000
- WHEN "TomRoll" : *CHANNELVOICE 6 TomRoll
- tun%(6) = -4000
- WHEN "ToyHooter" : *CHANNELVOICE 6 ToyHooter
- tun%(6) = -9717
- WHEN "ToyWhistle" : *CHANNELVOICE 6 ToyWhistle
- tun%(6) = -4000
- ENDCASE
- WHEN 7 :
- CASE waveforms$(vnumber%) OF
- WHEN "WaveSynth-Beep" : *CHANNELVOICE 7 WaveSynth-Beep
- WHEN "StringLib-Soft" : *CHANNELVOICE 7 StringLib-Soft
- WHEN "StringLib-Pluck" : *CHANNELVOICE 7 StringLib-Pluck
- WHEN "StringLib-Steel" : *CHANNELVOICE 7 StringLib-Steel
- WHEN "StringLib-Hard" : *CHANNELVOICE 7 StringLib-Hard
- WHEN "Percussion-Soft" : *CHANNELVOICE 7 Percussion-Soft
- WHEN "Percussion-Medium" : *CHANNELVOICE 7 Percussion-Medium
- WHEN "Percussion-Snare" : *CHANNELVOICE 7 Percussion-Snare
- WHEN "Percussion-Noise" : *CHANNELVOICE 7 Percussion-Noise
- WHEN "BassBowAb" : *CHANNELVOICE 7 BassBowAb
- tun%(7) = -1470
- WHEN "AcouBass" : *CHANNELVOICE 7 AcouBass
- tun%(7) = -2731
- WHEN "Vibe" : *CHANNELVOICE 7 Vibe
- tun%(7) = -6912
- WHEN "BugleC" : *CHANNELVOICE 7 BugleC
- tun%(7) = -11008
- WHEN "CornetEb" : *CHANNELVOICE 7 CornetEb
- tun%(7) = -12117
- WHEN "SaxEbBarC" : *CHANNELVOICE 7 SaxEbBarC
- tun%(7) = -2816
- WHEN "SaxBbTenrE" : *CHANNELVOICE 7 SaxBbTenrE
- tun%(7) = -4181
- WHEN "BassoonEb" : *CHANNELVOICE 7 BassoonEb
- tun%(7) = -4011
- WHEN "ClarinetBb" : *CHANNELVOICE 7 ClarinetBb
- tun%(7) = -10325
- WHEN "EngHornGb" : *CHANNELVOICE 7 EngHornGb
- tun%(7) = -8960
- WHEN "MandolinDb" : *CHANNELVOICE 7 MandolinDb
- tun%(7) = -11264
- WHEN "Piano2B" : *CHANNELVOICE 7 Piano2B
- tun%(7) = -2475
- WHEN "ClarVibEb" : *CHANNELVOICE 7 ClarVibEb
- tun%(7) = -7850
- WHEN "GtrDobroB" : *CHANNELVOICE 7 GtrDobroB
- tun%(7) = -6485
- WHEN "RecorderGb" : *CHANNELVOICE 7 RecorderGb
- tun%(7) = -13056
- WHEN "FlugelHnEb" : *CHANNELVOICE 7 FlugelHnEb
- tun%(7) = -12032
- WHEN "VceMmmGb23" : *CHANNELVOICE 7 VceMmmGb23
- tun%(7) = -853
- WHEN "VceMOooGb3" : *CHANNELVOICE 7 VceMOooGb3
- tun%(7) = -4843
- WHEN "VceFemAahC" : *CHANNELVOICE 7 VceFemAahC
- tun%(7) = -10948
- WHEN "VceFMmmGb4" : *CHANNELVOICE 7 VceFMmmGb4
- tun%(7) = -8918
- WHEN "Bass" : *CHANNELVOICE 7 Bass
- tun%(7) = 0
- WHEN "ChurchBell" : *CHANNELVOICE 7 ChurchBell
- tun%(7) = -2731
- WHEN "mysound" : *CHANNELVOICE 7 mysound
- tun%(7) = 0
- WHEN "GuiroFast" : *CHANNELVOICE 7 GuiroFast
- tun%(7) = -4000
- WHEN "Clave" : *CHANNELVOICE 7 Clave
- tun%(7) = -8096
- WHEN "CowBell" : *CHANNELVOICE 7 CowBell
- tun%(7) = -5707
- WHEN "CymbRideHd" : *CHANNELVOICE 7 CymbRideHd
- tun%(7) = -8096
- WHEN "AcGuitar1" : *CHANNELVOICE 7 AcGuitar1
- tun%(7) = -7072
- WHEN "CongaHi" : *CHANNELVOICE 7 CongaHi
- tun%(7) = -4000
- WHEN "DrumExplo" : *CHANNELVOICE 7 DrumExplo
- tun%(7) = -4000
- WHEN "ElecTom1" : *CHANNELVOICE 7 ElecTom1
- tun%(7) = -8096
- WHEN "Harp1" : *CHANNELVOICE 7 Harp1
- tun%(7) = -10997
- WHEN "Harpsi" : *CHANNELVOICE 7 Harpsi
- tun%(7) = -6901
- WHEN "HiString" : *CHANNELVOICE 7 HiString
- tun%(7) = -10997
- WHEN "HonkyPiano" : *CHANNELVOICE 7 HonkyPiano
- tun%(7) = -6901
- WHEN "JapFlute" : *CHANNELVOICE 7 JapFlute
- tun%(7) = -10997
- WHEN "JazzOrgan" : *CHANNELVOICE 7 JazzOrgan
- tun%(7) = -10997
- WHEN "MidStrings" : *CHANNELVOICE 7 MidStrings
- tun%(7) = -6901
- WHEN "NoteArp1" : *CHANNELVOICE 7 NoteArp1
- tun%(7) = -4000
- WHEN "SnareEcho" : *CHANNELVOICE 7 SnareEcho
- tun%(7) = -4341
- WHEN "TablaHi" : *CHANNELVOICE 7 TablaHi
- tun%(7) = -7669
- WHEN "Timpani" : *CHANNELVOICE 7 Timpani
- tun%(7) = -928
- WHEN "Tomtom1" : *CHANNELVOICE 7 Tomtom1
- tun%(7) = -5365
- WHEN "Trombone1" : *CHANNELVOICE 7 Trombone1
- tun%(7) = -6901
- WHEN "Trumpet" : *CHANNELVOICE 7 Trumpet
- tun%(7) = -10997
- WHEN "Xylophone" : *CHANNELVOICE 7 Xylophone
- tun%(7) = -6901
- WHEN "AcouGtr2B" : *CHANNELVOICE 7 AcouGtr2B
- tun%(7) = -6560
- WHEN "AcuBassAb1" : *CHANNELVOICE 7 AcuBassAb1
- tun%(7) = -1610
- WHEN "BagPipeG" : *CHANNELVOICE 7 BagPipeG
- tun%(7) = -9291
- WHEN "BanjoChdBb" : *CHANNELVOICE 7 BanjoChdBb
- tun%(7) = -4000
- WHEN "BazookiE" : *CHANNELVOICE 7 BazookiE
- tun%(7) = -8267
- WHEN "BellC" : *CHANNELVOICE 7 BellC
- tun%(7) = -10997
- WHEN "BrassEns1B" : *CHANNELVOICE 7 BrassEns1B
- tun%(7) = -6560
- WHEN "ClavichdBb" : *CHANNELVOICE 7 ClavichdBb
- tun%(7) = -10315
- WHEN "ClavinetBb" : *CHANNELVOICE 7 ClavinetBb
- tun%(7) = -6219
- WHEN "CornetEb" : *CHANNELVOICE 7 CornetEb
- tun%(7) = -4000
- WHEN "EnsWodAb45" : *CHANNELVOICE 7 EnsWodAb45
- tun%(7) = -9632
- WHEN "EnsWodGb12" : *CHANNELVOICE 7 EnsWodGb12
- tun%(7) = -4853
- WHEN "Glock2Ab5" : *CHANNELVOICE 7 Glock2Ab5
- tun%(7) = -9632
- WHEN "GtMelobarC" : *CHANNELVOICE 7 GtMelobarC
- tun%(7) = -6901
- WHEN "GtWashbnBb" : *CHANNELVOICE 7 GtWashbnBb
- tun%(7) = -6219
- WHEN "HarmonicaE" : *CHANNELVOICE 7 HarmonicaE
- tun%(7) = -4171
- WHEN "Jew'sHarpA" : *CHANNELVOICE 7 Jew'sHarpA
- tun%(7) = -6219
- WHEN "MusetteB" : *CHANNELVOICE 7 MusetteB
- tun%(7) = -10656
- WHEN "OboeGb" : *CHANNELVOICE 7 OboeGb
- tun%(7) = -13131
- WHEN "OrchHit2B" : *CHANNELVOICE 7 OrchHit2B
- tun%(7) = -5451
- WHEN "OrcSusBb23" : *CHANNELVOICE 7 OrcSusBb23
- tun%(7) = -6304
- WHEN "PiccoloE" : *CHANNELVOICE 7 PiccoloE
- tun%(7) = -16544
- WHEN "SaxSoprnoE" : *CHANNELVOICE 7 SaxSoprnoE
- tun%(7) = -12448
- WHEN "StrngThkBb" : *CHANNELVOICE 7 StrngThkBb
- tun%(7) = -5792
- WHEN "TubaGb" : *CHANNELVOICE 7 TubaGb
- tun%(7) = -929
- WHEN "BassDrum" : *CHANNELVOICE 7 BassDrum
- tun%(7) = -4000
- WHEN "HiHat" : *CHANNELVOICE 7 HiHat
- tun%(7) = -4000
- WHEN "OrcHit" : *CHANNELVOICE 7 OrcHit
- tun%(7) = -4085
- WHEN "Piano" : *CHANNELVOICE 7 Piano
- tun%(7) = -4171
- WHEN "Sax" : *CHANNELVOICE 7 Sax
- tun%(7) = -4085
- WHEN "Snare" : *CHANNELVOICE 7 Snare
- tun%(7) = -8096
- WHEN "Choir1" : *CHANNELVOICE 7 Choir1
- tun%(7) = -6901
- WHEN "ChurOrgan" : *CHANNELVOICE 7 ChurOrgan
- tun%(7) = -6901
- WHEN "Opera" : *CHANNELVOICE 7 Opera
- tun%(7) = -13387
- WHEN "OrchChoir" : *CHANNELVOICE 7 OrchChoir
- tun%(7) = -6133
- WHEN "OrganHit" : *CHANNELVOICE 7 OrganHit
- tun%(7) = -5024
- WHEN "AgogoAfric" : *CHANNELVOICE 7 AgogoAfric
- tun%(7) = -6219
- WHEN "AgogoBrazi" : *CHANNELVOICE 7 AgogoBrazi
- tun%(7) = -10997
- WHEN "AgogoWood" : *CHANNELVOICE 7 AgogoWood
- tun%(7) = -13728
- WHEN "BDGatedRev" : *CHANNELVOICE 7 BDGatedRev
- tun%(7) = -5877
- WHEN "BDMarching" : *CHANNELVOICE 7 BDMarching
- tun%(7) = -8608
- WHEN "BDPiloMute" : *CHANNELVOICE 7 BDPiloMute
- tun%(7) = -7072
- WHEN "Cabasa" : *CHANNELVOICE 7 Cabasa
- tun%(7) = -7072
- WHEN "Cachichi1" : *CHANNELVOICE 7 Cachichi1
- tun%(7) = -4000
- WHEN "CachichiTr" : *CHANNELVOICE 7 CachichiTr
- tun%(7) = -8096
- WHEN "Castanets" : *CHANNELVOICE 7 Castanets
- tun%(7) = -4000
- WHEN "CongaMid" : *CHANNELVOICE 7 CongaMid
- tun%(7) = -4171
- WHEN "CongaSmCl" : *CHANNELVOICE 7 CongaSmCl
- tun%(7) = -4683
- WHEN "CymbalCrsh" : *CHANNELVOICE 7 CymbalCrsh
- tun%(7) = -4000
- WHEN "CymRideBel" : *CHANNELVOICE 7 CymRideBel
- tun%(7) = -16288
- WHEN "CymRStRoll" : *CHANNELVOICE 7 CymRStRoll
- tun%(7) = -6389
- WHEN "CymSplshCa" : *CHANNELVOICE 7 CymSplshCa
- tun%(7) = -9120
- WHEN "Flexitone" : *CHANNELVOICE 7 Flexitone
- tun%(7) = -8096
- WHEN "GongSoft" : *CHANNELVOICE 7 GongSoft
- tun%(7) = -5365
- WHEN "Gonza1" : *CHANNELVOICE 7 Gonza1
- tun%(7) = -12192
- WHEN "GuiroSlow" : *CHANNELVOICE 7 GuiroSlow
- tun%(7) = -6048
- WHEN "HandClaps" : *CHANNELVOICE 7 HandClaps
- tun%(7) = -4000
- WHEN "HiHatFoot" : *CHANNELVOICE 7 HiHatFoot
- tun%(7) = -6389
- WHEN "Maracas1" : *CHANNELVOICE 7 Maracas1
- tun%(7) = -8096
- WHEN "MarimbaSB3" : *CHANNELVOICE 7 MarimbaSB3
- tun%(7) = -4000
- WHEN "Ratchet" : *CHANNELVOICE 7 Ratchet
- tun%(7) = -6731
- WHEN "RotoTomRev" : *CHANNELVOICE 7 RotoTomRev
- tun%(7) = -6133
- WHEN "SimmonsBD1" : *CHANNELVOICE 7 SimmonsBD1
- tun%(7) = -8096
- WHEN "SimmonsSn1" : *CHANNELVOICE 7 SimmonsSn1
- tun%(7) = -5707
- WHEN "SleighBell" : *CHANNELVOICE 7 SleighBell
- tun%(7) = -4000
- WHEN "SuperGong" : *CHANNELVOICE 7 SuperGong
- tun%(7) = -4341
- WHEN "SynthSnare" : *CHANNELVOICE 7 SynthSnare
- tun%(7) = -4000
- WHEN "SynTom" : *CHANNELVOICE 7 SynTom
- tun%(7) = -9120
- WHEN "TimpCresBb" : *CHANNELVOICE 7 TimpCresBb
- tun%(7) = -5962
- WHEN "TimpLowBb" : *CHANNELVOICE 7 TimpLowBb
- tun%(7) = -5707
- WHEN "TimpRollEb" : *CHANNELVOICE 7 TimpRollEb
- tun%(7) = -4000
- WHEN "TomRoll" : *CHANNELVOICE 7 TomRoll
- tun%(7) = -4000
- WHEN "ToyHooter" : *CHANNELVOICE 7 ToyHooter
- tun%(7) = -9717
- WHEN "ToyWhistle" : *CHANNELVOICE 7 ToyWhistle
- tun%(7) = -4000
- ENDCASE
- WHEN 8 :
- CASE waveforms$(vnumber%) OF
- WHEN "WaveSynth-Beep" : *CHANNELVOICE 8 WaveSynth-Beep
- WHEN "StringLib-Soft" : *CHANNELVOICE 8 StringLib-Soft
- WHEN "StringLib-Pluck" : *CHANNELVOICE 8 StringLib-Pluck
- WHEN "StringLib-Steel" : *CHANNELVOICE 8 StringLib-Steel
- WHEN "StringLib-Hard" : *CHANNELVOICE 8 StringLib-Hard
- WHEN "Percussion-Soft" : *CHANNELVOICE 8 Percussion-Soft
- WHEN "Percussion-Medium" : *CHANNELVOICE 8 Percussion-Medium
- WHEN "Percussion-Snare" : *CHANNELVOICE 8 Percussion-Snare
- WHEN "Percussion-Noise" : *CHANNELVOICE 8 Percussion-Noise
- WHEN "BassBowAb" : *CHANNELVOICE 8 BassBowAb
- tun%(8) = -1470
- WHEN "AcouBass" : *CHANNELVOICE 8 AcouBass
- tun%(8) = -2731
- WHEN "Vibe" : *CHANNELVOICE 8 Vibe
- tun%(8) = -6912
- WHEN "BugleC" : *CHANNELVOICE 8 BugleC
- tun%(8) = -11008
- WHEN "CornetEb" : *CHANNELVOICE 8 CornetEb
- tun%(8) = -12117
- WHEN "SaxEbBarC" : *CHANNELVOICE 8 SaxEbBarC
- tun%(8) = -2816
- WHEN "SaxBbTenrE" : *CHANNELVOICE 8 SaxBbTenrE
- tun%(8) = -4181
- WHEN "BassoonEb" : *CHANNELVOICE 8 BassoonEb
- tun%(8) = -4011
- WHEN "ClarinetBb" : *CHANNELVOICE 8 ClarinetBb
- tun%(8) = -10325
- WHEN "EngHornGb" : *CHANNELVOICE 8 EngHornGb
- tun%(8) = -8960
- WHEN "MandolinDb" : *CHANNELVOICE 8 MandolinDb
- tun%(8) = -11264
- WHEN "Piano2B" : *CHANNELVOICE 8 Piano2B
- tun%(8) = -2475
- WHEN "ClarVibEb" : *CHANNELVOICE 8 ClarVibEb
- tun%(8) = -7850
- WHEN "GtrDobroB" : *CHANNELVOICE 8 GtrDobroB
- tun%(8) = -6485
- WHEN "RecorderGb" : *CHANNELVOICE 8 RecorderGb
- tun%(8) = -13056
- WHEN "FlugelHnEb" : *CHANNELVOICE 8 FlugelHnEb
- tun%(8) = -12032
- WHEN "VceMmmGb23" : *CHANNELVOICE 8 VceMmmGb23
- tun%(8) = -853
- WHEN "VceMOooGb3" : *CHANNELVOICE 8 VceMOooGb3
- tun%(8) = -4843
- WHEN "VceFemAahC" : *CHANNELVOICE 8 VceFemAahC
- tun%(8) = -10948
- WHEN "VceFMmmGb4" : *CHANNELVOICE 8 VceFMmmGb4
- tun%(8) = -8918
- WHEN "Bass" : *CHANNELVOICE 8 Bass
- tun%(8) = 0
- WHEN "ChurchBell" : *CHANNELVOICE 8 ChurchBell
- tun%(8) = -2731
- WHEN "mysound" : *CHANNELVOICE 8 mysound
- tun%(8) = 0
- WHEN "GuiroFast" : *CHANNELVOICE 8 GuiroFast
- tun%(8) = -4000
- WHEN "Clave" : *CHANNELVOICE 8 Clave
- tun%(8) = -8096
- WHEN "CowBell" : *CHANNELVOICE 8 CowBell
- tun%(8) = -5707
- WHEN "CymbRideHd" : *CHANNELVOICE 8 CymbRideHd
- tun%(8) = -8096
- WHEN "AcGuitar1" : *CHANNELVOICE 8 AcGuitar1
- tun%(8) = -7072
- WHEN "CongaHi" : *CHANNELVOICE 8 CongaHi
- tun%(8) = -4000
- WHEN "DrumExplo" : *CHANNELVOICE 8 DrumExplo
- tun%(8) = -4000
- WHEN "ElecTom1" : *CHANNELVOICE 8 ElecTom1
- tun%(8) = -8096
- WHEN "Harp1" : *CHANNELVOICE 8 Harp1
- tun%(8) = -10997
- WHEN "Harpsi" : *CHANNELVOICE 8 Harpsi
- tun%(8) = -6901
- WHEN "HiString" : *CHANNELVOICE 8 HiString
- tun%(8) = -10997
- WHEN "HonkyPiano" : *CHANNELVOICE 8 HonkyPiano
- tun%(8) = -6901
- WHEN "JapFlute" : *CHANNELVOICE 8 JapFlute
- tun%(8) = -10997
- WHEN "JazzOrgan" : *CHANNELVOICE 8 JazzOrgan
- tun%(8) = -10997
- WHEN "MidStrings" : *CHANNELVOICE 8 MidStrings
- tun%(8) = -6901
- WHEN "NoteArp1" : *CHANNELVOICE 8 NoteArp1
- tun%(8) = -4000
- WHEN "SnareEcho" : *CHANNELVOICE 8 SnareEcho
- tun%(8) = -4341
- WHEN "TablaHi" : *CHANNELVOICE 8 TablaHi
- tun%(8) = -7669
- WHEN "Timpani" : *CHANNELVOICE 8 Timpani
- tun%(8) = -928
- WHEN "Tomtom1" : *CHANNELVOICE 8 Tomtom1
- tun%(8) = -5365
- WHEN "Trombone1" : *CHANNELVOICE 8 Trombone1
- tun%(8) = -6901
- WHEN "Trumpet" : *CHANNELVOICE 8 Trumpet
- tun%(8) = -10997
- WHEN "Xylophone" : *CHANNELVOICE 8 Xylophone
- tun%(8) = -6901
- WHEN "AcouGtr2B" : *CHANNELVOICE 8 AcouGtr2B
- tun%(8) = -6560
- WHEN "AcuBassAb1" : *CHANNELVOICE 8 AcuBassAb1
- tun%(8) = -1610
- WHEN "BagPipeG" : *CHANNELVOICE 8 BagPipeG
- tun%(8) = -9291
- WHEN "BanjoChdBb" : *CHANNELVOICE 8 BanjoChdBb
- tun%(8) = -4000
- WHEN "BazookiE" : *CHANNELVOICE 8 BazookiE
- tun%(8) = -8267
- WHEN "BellC" : *CHANNELVOICE 8 BellC
- tun%(8) = -10997
- WHEN "BrassEns1B" : *CHANNELVOICE 8 BrassEns1B
- tun%(8) = -6560
- WHEN "ClavichdBb" : *CHANNELVOICE 8 ClavichdBb
- tun%(8) = -10315
- WHEN "ClavinetBb" : *CHANNELVOICE 8 ClavinetBb
- tun%(8) = -6219
- WHEN "CornetEb" : *CHANNELVOICE 8 CornetEb
- tun%(8) = -4000
- WHEN "EnsWodAb45" : *CHANNELVOICE 8 EnsWodAb45
- tun%(8) = -9632
- WHEN "EnsWodGb12" : *CHANNELVOICE 8 EnsWodGb12
- tun%(8) = -4853
- WHEN "Glock2Ab5" : *CHANNELVOICE 8 Glock2Ab5
- tun%(8) = -9632
- WHEN "GtMelobarC" : *CHANNELVOICE 8 GtMelobarC
- tun%(8) = -6901
- WHEN "GtWashbnBb" : *CHANNELVOICE 8 GtWashbnBb
- tun%(8) = -6219
- WHEN "HarmonicaE" : *CHANNELVOICE 8 HarmonicaE
- tun%(8) = -4171
- WHEN "Jew'sHarpA" : *CHANNELVOICE 8 Jew'sHarpA
- tun%(8) = -6219
- WHEN "MusetteB" : *CHANNELVOICE 8 MusetteB
- tun%(8) = -10656
- WHEN "OboeGb" : *CHANNELVOICE 8 OboeGb
- tun%(8) = -13131
- WHEN "OrchHit2B" : *CHANNELVOICE 8 OrchHit2B
- tun%(8) = -5451
- WHEN "OrcSusBb23" : *CHANNELVOICE 8 OrcSusBb23
- tun%(8) = -6304
- WHEN "PiccoloE" : *CHANNELVOICE 8 PiccoloE
- tun%(8) = -16544
- WHEN "SaxSoprnoE" : *CHANNELVOICE 8 SaxSoprnoE
- tun%(8) = -12448
- WHEN "StrngThkBb" : *CHANNELVOICE 8 StrngThkBb
- tun%(8) = -5792
- WHEN "TubaGb" : *CHANNELVOICE 8 TubaGb
- tun%(8) = -929
- WHEN "BassDrum" : *CHANNELVOICE 8 BassDrum
- tun%(8) = -4000
- WHEN "HiHat" : *CHANNELVOICE 8 HiHat
- tun%(8) = -4000
- WHEN "OrcHit" : *CHANNELVOICE 8 OrcHit
- tun%(8) = -4085
- WHEN "Piano" : *CHANNELVOICE 8 Piano
- tun%(8) = -4171
- WHEN "Sax" : *CHANNELVOICE 8 Sax
- tun%(8) = -4085
- WHEN "Snare" : *CHANNELVOICE 8 Snare
- tun%(8) = -8096
- WHEN "Choir1" : *CHANNELVOICE 8 Choir1
- tun%(8) = -6901
- WHEN "ChurOrgan" : *CHANNELVOICE 8 ChurOrgan
- tun%(8) = -6901
- WHEN "Opera" : *CHANNELVOICE 8 Opera
- tun%(8) = -13387
- WHEN "OrchChoir" : *CHANNELVOICE 8 OrchChoir
- tun%(8) = -6133
- WHEN "OrganHit" : *CHANNELVOICE 8 OrganHit
- tun%(8) = -5024
- WHEN "AgogoAfric" : *CHANNELVOICE 8 AgogoAfric
- tun%(8) = -6219
- WHEN "AgogoBrazi" : *CHANNELVOICE 8 AgogoBrazi
- tun%(8) = -10997
- WHEN "AgogoWood" : *CHANNELVOICE 8 AgogoWood
- tun%(8) = -13728
- WHEN "BDGatedRev" : *CHANNELVOICE 8 BDGatedRev
- tun%(8) = -5877
- WHEN "BDMarching" : *CHANNELVOICE 8 BDMarching
- tun%(8) = -8608
- WHEN "BDPiloMute" : *CHANNELVOICE 8 BDPiloMute
- tun%(8) = -7072
- WHEN "Cabasa" : *CHANNELVOICE 8 Cabasa
- tun%(8) = -7072
- WHEN "Cachichi1" : *CHANNELVOICE 8 Cachichi1
- tun%(8) = -4000
- WHEN "CachichiTr" : *CHANNELVOICE 8 CachichiTr
- tun%(8) = -8096
- WHEN "Castanets" : *CHANNELVOICE 8 Castanets
- tun%(8) = -4000
- WHEN "CongaMid" : *CHANNELVOICE 8 CongaMid
- tun%(8) = -4171
- WHEN "CongaSmCl" : *CHANNELVOICE 8 CongaSmCl
- tun%(8) = -4683
- WHEN "CymbalCrsh" : *CHANNELVOICE 8 CymbalCrsh
- tun%(8) = -4000
- WHEN "CymRideBel" : *CHANNELVOICE 8 CymRideBel
- tun%(8) = -16288
- WHEN "CymRStRoll" : *CHANNELVOICE 8 CymRStRoll
- tun%(8) = -6389
- WHEN "CymSplshCa" : *CHANNELVOICE 8 CymSplshCa
- tun%(8) = -9120
- WHEN "Flexitone" : *CHANNELVOICE 8 Flexitone
- tun%(8) = -8096
- WHEN "GongSoft" : *CHANNELVOICE 8 GongSoft
- tun%(8) = -5365
- WHEN "Gonza1" : *CHANNELVOICE 8 Gonza1
- tun%(8) = -12192
- WHEN "GuiroSlow" : *CHANNELVOICE 8 GuiroSlow
- tun%(8) = -6048
- WHEN "HandClaps" : *CHANNELVOICE 8 HandClaps
- tun%(8) = -4000
- WHEN "HiHatFoot" : *CHANNELVOICE 8 HiHatFoot
- tun%(8) = -6389
- WHEN "Maracas1" : *CHANNELVOICE 8 Maracas1
- tun%(8) = -8096
- WHEN "MarimbaSB3" : *CHANNELVOICE 8 MarimbaSB3
- tun%(8) = -4000
- WHEN "Ratchet" : *CHANNELVOICE 8 Ratchet
- tun%(8) = -6731
- WHEN "RotoTomRev" : *CHANNELVOICE 8 RotoTomRev
- tun%(8) = -6133
- WHEN "SimmonsBD1" : *CHANNELVOICE 8 SimmonsBD1
- tun%(8) = -8096
- WHEN "SimmonsSn1" : *CHANNELVOICE 8 SimmonsSn1
- tun%(8) = -5707
- WHEN "SleighBell" : *CHANNELVOICE 8 SleighBell
- tun%(8) = -4000
- WHEN "SuperGong" : *CHANNELVOICE 8 SuperGong
- tun%(8) = -4341
- WHEN "SynthSnare" : *CHANNELVOICE 8 SynthSnare
- tun%(8) = -4000
- WHEN "SynTom" : *CHANNELVOICE 8 SynTom
- tun%(8) = -9120
- WHEN "TimpCresBb" : *CHANNELVOICE 8 TimpCresBb
- tun%(8) = -5962
- WHEN "TimpLowBb" : *CHANNELVOICE 8 TimpLowBb
- tun%(8) = -5707
- WHEN "TimpRollEb" : *CHANNELVOICE 8 TimpRollEb
- tun%(8) = -4000
- WHEN "TomRoll" : *CHANNELVOICE 8 TomRoll
- tun%(8) = -4000
- WHEN "ToyHooter" : *CHANNELVOICE 8 ToyHooter
- tun%(8) = -9717
- WHEN "ToyWhistle" : *CHANNELVOICE 8 ToyWhistle
- tun%(8) = -4000
- ENDCASE
- ENDCASE
- :
- ELSE
- *CHANNELVOICE 1 WaveSynth-Beep
- *CHANNELVOICE 2 WaveSynth-Beep
- *CHANNELVOICE 3 WaveSynth-Beep
- *CHANNELVOICE 4 WaveSynth-Beep
- *CHANNELVOICE 5 WaveSynth-Beep
- *CHANNELVOICE 6 WaveSynth-Beep
- *CHANNELVOICE 7 WaveSynth-Beep
- *CHANNELVOICE 8 WaveSynth-Beep
- ENDIF
- :
- REM fill bar%() with starting bar nos for each voice
- PROCnewnotereception((vnumber%-1),startingbar%,startbeat%,0,0,0,0,0,0)
- CASE option% OF
- WHEN 1,3 : startcell% = 0
- WHEN 2 : startcell% = numusedcells%(vnumber%-1)
- WHEN 4 : start% = (startingbar%*10^3)+startbeat%
- voice% = vnumber%-1 : PROCsearch(start%)
- ENDCASE
- cell%(vnumber%-1) = startcell%
- bar%(vnumber%-1) = array%(cell%(vnumber%-1),0,vnumber%-1)DIV10^6
- NEXT
- :
- startbar% = startingbar% : preplaydisplay$ = "y" : PROCdisplay : preplaydisplay$ = "n"
- tempo% = tempi%(startingbar%)*960*0.681595
- IF waveload$ = "done" THEN tempo% = tempo%*1.23065
- TEMPO tempo%
- kount% = 1
- :
- FOR barnum% = startingbar% TO endbar%
- :
- IF playnewscreen$ = "y" AND ((startbar%+(numbars%*2)) <= nobars%) THEN
- IF barnum% = startingbar% + (numbars%*kount%) + 1 THEN
- startbar% += numbars% : preplaydisplay$ = "y" : PROCdisplay: kount% += 1
- preplaydisplay$ = "n"
- ENDIF
- ENDIF
- :
- tempo% = tempi%(barnum%-1)*960*0.681595
- IF waveload$ = "done" THEN tempo% = tempo%*1.23065
- TEMPO tempo%
- REPEAT UNTIL BEAT < 20
- :
- FOR count% = 1 TO nvoices%
- voicenum% = playvoices%(count%)-1
- lv$ = "n"
- IF lvdata%(count%,1)>0 THEN lv$ = "y"
- :
- WHILE bar%(voicenum%) = barnum%
- after% = ((array%(cell%(voicenum%),0,voicenum%) DIV 10^3) MOD 10^3) + 20
- pitchdata% = (array%(cell%(voicenum%),0,voicenum%)MOD10^3)
- notename% = pitchdata% DIV 100
- accid% = (pitchdata% MOD 100) DIV 10
- octave% = pitchdata%MOD10
- inflect% = (array%(cell%(voicenum%),2,voicenum%)MOD10^2) : inflect% -= 50
- :
- CASE notename% OF
- WHEN 6 : pitch% = 3755
- WHEN 5 : pitch% = 3072
- WHEN 4 : pitch% = 2389
- WHEN 3 : pitch% = 1707
- WHEN 2 : pitch% = 1365
- WHEN 1 : pitch% = 683
- WHEN 0 : pitch% = 0
- ENDCASE
- accid% = accid%-5
- accid% = accid%*85.34
- pitch% = pitch% + accid%
- pitch% = pitch% + (4096*octave%) + tun%(count%) + (inflect%*3.41)
- amp2% = (array%(cell%(voicenum%),2,voicenum%)DIV10^2)MOD10
- amp3% = (array%(cell%(voicenum%),2,voicenum%)DIV10^3)MOD10
- :
- dyn% = array%(cell%(voicenum%),1,voicenum%)MOD10
- dyn% = 257 + (16*dyn%)
- IF amp2% = 9 AND amp3% <> 0 THEN
- CASE amp3% OF
- WHEN 1 : dyn% += 1
- WHEN 2 : dyn% += 2
- WHEN 3 : dyn% += 4
- WHEN 4 : dyn% += 6
- WHEN 5 : dyn% += 8
- WHEN 6 : dyn% += 10
- WHEN 7 : dyn% += 12
- WHEN 8 : dyn% += 14
- WHEN 9 : dyn% += 15
- ENDCASE
- ENDIF
- IF dyn% > 383 THEN dyn% = 383
- :
- dur% = (array%(cell%(voicenum%),1,voicenum%)MOD10^4)DIV10
- IF waveload$ = "done" THEN dur% = dur%/1.23065
- IF dur% < 1 THEN dur% = 1
- IF lv$ = "n" THEN
- chan% = count%
- ELSE
- tic%(count%)+=1
- IF lvdata%(count%,tic%(count%)) = 0 THEN tic%(count%) = 1
- chan% = lvdata%(count%,tic%(count%))
- ENDIF
- :
- SOUND chan%, dyn%, pitch%, dur%, after%
- :
- IF amp2% <> 9 THEN PROCenv
- :
- cell%(voicenum%) += 1
- bar%(voicenum%) = array%(cell%(voicenum%),0,voicenum%) DIV 10^6
- :
- ENDWHILE
- :
- NEXT count%
- :
- REPEAT UNTIL BEAT > 20
- :
- NEXT barnum%
- :
- PROCpostdisplay
- :
- ENDPROC
- :
- REM*******************************
- :
- DEF PROCaddonenote
- :
- PROCwindow(20,72,72,55)
- CLS
- INPUT' " Which voice (0 = top) "voice%
- IF voice% = 0 THEN PROCpressenter
- voice% -= 1
- INPUT '" Bar number (for 1 press 0) "barno%
- IF barno% = 0 THEN barno% = 1
- INPUT '" Beat number "beats%
- PROCalterbeats
- beatno% = beats%
- :
- PRINT '" Pitch name ";
- COLOUR 1
- CASE GET$ OF
- WHEN "C","c" : note% = 0 : PRINT "C"
- WHEN "D","d" : note% = 1 : PRINT "D"
- WHEN "E","e" : note% = 2 : PRINT "E"
- WHEN "F","f" : note% = 3 : PRINT "F"
- WHEN "G","g" : note% = 4 : PRINT "G"
- WHEN "A","a" : note% = 5 : PRINT "A"
- WHEN "B","b" : note% = 6 : PRINT "B"
- ENDCASE
- COLOUR 0
- PRINT '" Accidental ";
- COLOUR 1
- CASE GET$ OF
- WHEN "1" : accid% = 1 : PRINT "flat"
- WHEN "2" : accid% = 2 : PRINT "3/8flat"
- WHEN "3" : accid% = 3 : PRINT "1/4flat"
- WHEN "4" : accid% = 4 : PRINT "1/8flat"
- WHEN "5" : accid% = 5 : PRINT "nat"
- WHEN "6" : accid% = 6 : PRINT "1/8shrp"
- WHEN "7" : accid% = 7 : PRINT "1/4shrp"
- WHEN "8" : accid% = 8 : PRINT "3/8shrp"
- WHEN "9" : accid% = 9 : PRINT "shrp"
- ENDCASE
- COLOUR 0
- PRINT '" octave ";
- COLOUR 1
- CASE GET$ OF
- WHEN "0" : octave% = 0 : PRINT "0"
- WHEN "1" : octave% = 1 : PRINT "1"
- WHEN "2" : octave% = 2 : PRINT "2"
- WHEN "3" : octave% = 3 : PRINT "3"
- WHEN "4" : octave% = 4 : PRINT "4"
- WHEN "5" : octave% = 5 : PRINT "5"
- WHEN "6" : octave% = 6 : PRINT "6"
- WHEN "7" : octave% = 7 : PRINT "7"
- WHEN "8" : octave% = 8 : PRINT "8"
- ENDCASE
- COLOUR 0
- pitch% = (note%*100)+(accid%*10)+octave%
- INPUT '" Duration: bars "b%
- INPUT '" beats "beats% : PROCalterbeats
- dur% = (b%*960)+beats%
- :
- CLS
- :
- PRINT'" Envelope/glissando has how many phases? "
- INPUT'" (if no envelope/glissando type 0) "numphases%
- :
- CASE numphases% OF
- :
- WHEN 0 :
- INPUT'" ampitude is "amp$ : PROCconvertdynamics : amp1% = amp%
- ph2% = 0 : ph1% = 0 : amp4% = 0 : amp3% = 0 : amp2% = 9 : gliss3% = 10 : gliss2% = 50 : gliss1% = 50
- :
- WHEN 1 :
- INPUT'" starting amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
- INPUT " destination amplitude is "amp$ : PROCconvertdynamics : amp2% = amp%
- IF amp2% = amp1% THEN amp2% = 0
- INPUT'" glissando is (in 1/8 tones, max 48,-48) "gliss%
- gliss1% = 50-gliss%
- ph2% = 0 : ph1% = 0 : amp4% = 0 : amp3% = 0 : gliss3% = 10 : gliss2% = 50
- :
- WHEN 2 :
- INPUT'" starting amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
- PRINT'" phase 1 ends after what percentage "
- INPUT " of the note's duration "ph1%
- INPUT " phase 1's destination amplitude is "amp$ : PROCconvertdynamics : amp2% = amp%
- INPUT " phase 1's glissando is (in 1/8 tones, max 48,-48) "gliss%
- gliss1% = 50-gliss%
- INPUT'" phase 2's destination amplitude is "amp$ : PROCconvertdynamics : amp3% = amp%
- INPUT " phase 2's glissando is (in 1/8 tones, max 48,-48) "gliss%
- gliss2% = 50-gliss%
- ph2% = 0 : amp4% = 0 : gliss3% = 10
- :
- WHEN 3 :
- INPUT'" starting amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
- PRINT'" phase 1 ends after what percentage "
- INPUT " of the note's duration "ph1%
- INPUT " phase 1's destination amplitude is "amp$ : PROCconvertdynamics : amp2% = amp%
- INPUT " phase 1's glissando is (in 1/8 tones, max 48,-48) "gliss%
- gliss1% = 50-gliss%
- PRINT'" phase 2 ends after what percentage "
- INPUT " of the note's duration "ph2%
- INPUT'" phase 2's destination amplitude is "amp$ : PROCconvertdynamics : amp3% = amp%
- INPUT " phase 2's glissando is (in 1/8 tones, max 48,-48) "gliss%
- gliss2% = 50-gliss%
- INPUT'" phase 3's destination amplitude is "amp$ : PROCconvertdynamics : amp4% = amp%
- REPEAT
- INPUT " phase 3's glissando is (in 1/8 tones, max 10,-10) "gliss%
- gliss3% = 10-gliss%
- IF gliss3% > 20 THEN VDU7
- IF gliss3% < 0 THEN VDU7
- UNTIL gliss3% < 21 AND gliss3% >= 0
- :
- ENDCASE
- :
- env% = (ph2%*10^5)+(ph1%*10^3)+(amp4%*10^2)+(amp3%*10)+amp2%
- dyn% = amp1%
- gliss% = (gliss3%*10^4)+(gliss2%*10^2)+gliss1%
- :
- PRINT' " Microtonal inflection (in cents: 1,-1 etc)"
- INPUT " [max 49,-49]: "inf%
- inf% = 50+inf%
- :
- addingnotes$ = "y"
- PROCnewnotereception(voice%,barno%,beatno%,pitch%,dyn%,env%,dur%,gliss%,inf%)
- :
- PROCdisplay
- :
- ENDPROC
- :
- REM*************************************
- :
- DEF PROCinsertattacks
- :
- PROCundoprepare
- :
- destinationdone$ = "n"
- :
- CASE savevoice$ OF
- WHEN "Y" : PROCsavevoice
- OTHERWISE
- ENDCASE
- REM PROCwindow(20,69,67,55)
- CLS
- repeatposit$ = "n"
- IF method$ = "raw" THEN
- IF reordered$ = "n" THEN
- IF equalized$ = "n" THEN
- IF quiz$ = "yes" THEN
- IF copyit$ = "ON" THEN
- :
- IF copydownwards$ = "n" THEN
- PRINT ' " the passage is to be copied/moved to bar... "
- PRINT ' " (press 0 for same position as original "
- PRINT " or forward/back from it by so much) "
- INPUT ' " (press 0 twice for previous position) "bars%
- IF bars% <> 0 THEN memorybar% = bars%
- IF bars% = 0 THEN
- bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
- IF askprevious$ = "y" THEN
- thing$ = INKEY$(50)
- IF thing$ <> "" THEN
- bars% = memorybar% : beats% = memorybeat%
- COLOUR 1
- PRINT'" bar ";bars%;" beat ";beats%;"?"
- COLOUR 0
- PRINT '" (for OK press 0, if not OK press X) "
- destinationdone$ = "y"
- CASE GET$ OF
- WHEN "X","x" : PROCinsertattacks
- OTHERWISE
- ENDCASE
- ENDIF
- ENDIF
- ENDIF
- ELSE bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
- :
- ENDIF
- :
- ELSE
- :
- PRINT' " the group of attacks is to start at bar "
- INPUT " (0 = first bar displayed) "bars%
- IF bars% = 0 THEN
- bars% = startbar%
- ENDIF
- :
- ENDIF : REM copyit$
- :
- :
- IF repeatposit$ = "n" THEN
- INPUT " beat "beats%
- memorybeat% = beats%
- ELSE
- :
- IF copydownwards$ = "n" AND destinationdone$ = "n" THEN
- COLOUR 1
- PRINT'" bar ";bars%;" beat ";beats%;"?"
- COLOUR 0
- PRINT'" (press 0 for OK, B for Back"
- PRINT " F for Forward, X if not OK)"
- CASE GET$ OF
- WHEN "b", "B" : PROCmoveback
- WHEN "f", "F" : PROCmoveforward
- WHEN "x","X" : PROCinsertattacks
- OTHERWISE
- ENDCASE
- ELSE
- ENDIF
- :
- ENDIF : REM repeatposit$
- :
- ELSE
- bars% = funcbar% : beats% = funcbeat%
- ENDIF : REM quiz$
- :
- quiz$ = "yes"
- PROCalterbeats
- startat% = (bars%*(10^3))+beats%
- ENDIF : REM equalized$
- ENDIF : REM reordered$
- :
- reordered$ = "n" : equalized$ = "n"
- :
- attacks2%() = attacks1%()
- :
- attacks2%() = attacks2%() + (startat% MOD 10^3) : REM moves attacks further up bar, if necc
- :
- attacks3%() = attacks2%()
- FOR count% = 0 TO (manyattacks%-1)
- attacks3%(count%) = attacks3%(count%) DIV 960
- NEXT
- REM gives list of bar mos starting at 0
- :
- attacks3%() = attacks3%() * 960
- attacks2%() = attacks2%() - attacks3%()
- attacks3%() = attacks3%() / 960
- REM list of actual beat numbers
- :
- attacks3%() = attacks3%() + (startat% DIV 10^3) : REM list of actual bar nos
- :
- attacks3%() = attacks3%()*(10^3)
- attacks2%() = attacks2%() + attacks3%()
- REM list of actual bar/beat numbers
- :
- ENDIF : REM method$
- :
- : IF method$ <> "alreadyrhythmicized" THEN rhythmicized$ = "n"
- IF seeinfo$ = "y" THEN
- :
- IF printinfo$ = "y" THEN PROCprintattacks
- durat% = 0
- PROCwindow(10,60,90,5)
- VDU 14
- PRINT '" The group of attacks will be at "
- PRINT" "
- PRINT TAB(8) "ATTACKS AT";
- PRINT TAB(30) "DURATIONS";
- PRINT TAB(54) "RATIOS"
- FOR count% = 0 TO (manyattacks%-1)
- COLOUR 1 : PRINT TAB(1)(attacks2%(count%))DIV10^3;" ";
- COLOUR 0 : PRINT ;(attacks2%(count%))MOD10^3;
- IF count% > 0 THEN
- durat1% = durat%
- durat% = (attacks2%(count%)MOD10^3)-(attacks2%(count%-1)MOD10^3)
- addon% = ((attacks2%(count%)DIV(10^3))-(attacks2%(count%-1)DIV(10^3)))*960
- durat% = durat% + addon%
- PRINT TAB(26) durat%;
- IF count%>1 THEN
- IF direction$ = "rit" THEN ratio = durat%/durat1% ELSE ratio = durat1%/durat%
- CASE ratio OF
- WHEN 0.5 : PRINT TAB(52) "0.5"
- WHEN 1.0 : PRINT TAB(52) "1.0"
- WHEN 1.5 : PRINT TAB(52) "1.5"
- WHEN 2.0 : PRINT TAB(52) "2.0"
- WHEN 2.5 : PRINT TAB(52) "2.5"
- OTHERWISE PRINT TAB(52) ratio
- ENDCASE
- ENDIF
- ENDIF
- NEXT
- :
- VDU 15
- :
- ENDIF : REM seeinfo
- :
- IF method$ = "raw" THEN
- IF seereordery$ = "y" THEN
- PRINT'" Do you want this group to be re-ordered?"
- PRINT'" (Y/1 = yes, any other key = no) "
- :
- CASE GET$ OF
- WHEN "Y","y","1" : PROCreorderattacks
- OTHERWISE
- ENDCASE
- seereordery$ = "n"
- rhythmicized$ = "n"
- ENDIF
- IF seeequalizey$ = "y" THEN
- PRINT'" Do you want to equalize any durations? "
- PRINT'" (Y/0/1 = yes, N/2 = no) "
- CASE GET$ OF
- WHEN "n","N","2" :
- OTHERWISE PROCequalizedurats
- ENDCASE
- seeequalizey$ = "n"
- ENDIF
- IF seerhythmicize$ = "y" THEN
- PRINT'" Do you want this group to be rhythmicized? "
- CASE GET$ OF
- WHEN "Y","y" : PROCprerhythmicize
- rhythmicized$ = "y"
- OTHERWISE
- ENDCASE
- ENDIF
- ENDIF : REM method$ = raw?
- IF seequery$ = "y" THEN
- PRINT ' " Do you want to add this group to the array? "
- CASE GET$ OF
- 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
- OTHERWISE
- ENDCASE
- ENDIF : REM seequery
- :
- IF displayedfunc$ = "n" THEN
- :
- IF copydownwards$ = "n" THEN
- IF screenvoices$ = "n" THEN
- :
- IF copysuccessively$ = "y" THEN
- INPUT' " Which voice (0 = top) "voice%
- IF voice% <> 0 THEN succto% = voice% ELSE PROCpressenter
- ELSE
- INPUT'" Which voice (0 = top) "voice%
- IF voice% = 0 THEN PROCpressenter
- ENDIF : REM copysuccessively$
- :
- ELSE
- PRINT'" Which screen voice "
- CASE GET$ OF
- WHEN "1" : voice% = 1
- WHEN "2" : voice% = 2
- WHEN "3" : voice% = 3
- OTHERWISE PROCpressenter
- ENDCASE
- ENDIF
- IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
- voice% -= 1
- IF voice% >= 0 THEN samevoice% = voice%
- IF voice% = -1 THEN
- IF copysuccessively$ = "n" THEN
- voice% = samevoice%
- ELSE
- voice% = succto%-1
- ENDIF : REM copysucc
- ENDIF : REM if voice = -1
- :
- ELSE voice% = displayvoices%(startv%+downby%) : voice% = voice%-1
- ENDIF
- :
- ENDIF
- :
- IF copyit$ = "OFF" THEN
- IF paraset$ = "on" THEN
- PRINT'" Do you want to (re)define the values assigned "
- PRINT " to each parameter when inputting a group of "
- PRINT " attacks, use defaults or reset defaults? "
- PRINT " (press Y/N/D/R)"
- PRINT'" - press M/V/D/P again to go back to always "
- PRINT " using the assigned values without asking "
- CASE GET$ OF
- WHEN "R","r" : resetdefaults$ = "y"
- PRINT'" Please press the same key again to proceed"
- OTHERWISE
- PRINT'" Please press the same key again to proceed"
- ENDCASE
- :
- CASE GET$ OF
- WHEN "Y","y","R","r" :
- CLS : parasdefined$ = "yes" : PRINT' " all at pitch name ";
- COLOUR 1
- CASE GET$ OF
- WHEN "C","c" : note% = 0 : PRINT "C"
- WHEN "D","d" : note% = 1 : PRINT "D"
- WHEN "E","e" : note% = 2 : PRINT "E"
- WHEN "F","f" : note% = 3 : PRINT "F"
- WHEN "G","g" : note% = 4 : PRINT "G"
- WHEN "A","a" : note% = 5 : PRINT "A"
- WHEN "B","b" : note% = 6 : PRINT "B"
- ENDCASE
- COLOUR 0
- PRINT " accidental ";
- COLOUR 1
- CASE GET$ OF
- WHEN "1" : accid% = 1 : PRINT "flat"
- WHEN "2" : accid% = 2 : PRINT "3/8flat"
- WHEN "3" : accid% = 3 : PRINT "1/4flat"
- WHEN "4" : accid% = 4 : PRINT "1/8flat"
- WHEN "5" : accid% = 5 : PRINT "nat"
- WHEN "6" : accid% = 6 : PRINT "1/8shrp"
- WHEN "7" : accid% = 7 : PRINT "1/4shrp"
- WHEN "8" : accid% = 8 : PRINT "3/8shrp"
- WHEN "9" : accid% = 9 : PRINT "shrp"
- ENDCASE
- COLOUR 0
- PRINT " octave ";
- COLOUR 1
- CASE GET$ OF
- WHEN "0" : octave% = 0 : PRINT "0"
- WHEN "1" : octave% = 1 : PRINT "1"
- WHEN "2" : octave% = 2 : PRINT "2"
- WHEN "3" : octave% = 3 : PRINT "3"
- WHEN "4" : octave% = 4 : PRINT "4"
- WHEN "5" : octave% = 5 : PRINT "5"
- WHEN "6" : octave% = 6 : PRINT "6"
- WHEN "7" : octave% = 7 : PRINT "7"
- WHEN "8" : octave% = 8 : PRINT "8"
- ENDCASE
- COLOUR 0
- pitchset%(voice%) = (note%*100)+(accid%*10)+octave%
- IF resetdefaults$ = "y" THEN
- FOR count% = 0 TO (numparts%-1)
- pitchset%(count%) = pitchset%(voice%)
- NEXT
- ENDIF
- INPUT " all at duration: bars "b%
- INPUT " beats "beats% : PROCalterbeats
- dur% = (b%*960)+beats%
- durset%(voice%) = dur%
- IF resetdefaults$ = "y" THEN
- FOR count% = 0 TO (numparts%-1)
- durset%(count%) = durset%(voice%)
- NEXT
- ENDIF
- :
- INPUT " all at amplitude "amp$
- CASE amp$ OF
- WHEN "0" : ampset%(voice%) = 0
- WHEN "ppp" : ampset%(voice%) = 1
- WHEN "pp" : ampset%(voice%) = 2
- WHEN "p" : ampset%(voice%) = 3
- WHEN "mp" : ampset%(voice%) = 4
- WHEN "mf" : ampset%(voice%) = 5
- WHEN "f" : ampset%(voice%) = 6
- WHEN "ff" : ampset%(voice%) = 7
- WHEN "fff" : ampset%(voice%) = 8
- ENDCASE
- IF resetdefaults$ = "y" THEN
- FOR count% = 0 TO (numparts%-1)
- ampset%(count%) = ampset%(voice%)
- NEXT
- ENDIF
- :
- INPUT " all at microtonal inflection (in cents: 1,-1 etc) [max 49,-49]: "infset%
- infset%(voice%) = 50+infset%
- envset%(voice%) = 9
- glissset%(voice%) = 105050
- resetdefaults$ = "n"
- WHEN "D","d" : pitchset%(voice%) = 55
- ampset%(voice%) = 6
- envset%(voice%) = 9
- durset%(voice%) = 319
- glissset%(voice%) = 105050
- infset%(voice%) = 50
- OTHERWISE
- ENDCASE
- ENDIF
- ENDIF
- :
- addingnotes$ = "y"
- IF copyit$ = "OFF" THEN
- IF rhythmicized$ = "n" THEN
- FOR counter% = 0 TO (manyattacks%-1)
- PROCnewnotereception(voice%,(attacks2%(counter%)DIV10^3), (attacks2%(counter%) MOD 10^3), pitchset%(voice%), ampset%(voice%), envset%(voice%), durset%(voice%), glissset%(voice%), infset%(voice%))
- NEXT
- ELSE
- FOR counter% = 0 TO (manyattacks%-1)
- PROCnewnotereception(voice%,(attacks5%(counter%)DIV10^3), (attacks5%(counter%) MOD 10^3), pitchset%(voice%), ampset%(voice%), envset%(voice%), durset%(voice%), glissset%(voice%), infset%(voice%))
- NEXT
- PROCdisarrayfill
- ENDIF
- ELSE
- IF rhythmicized$ = "n" THEN
- FOR counter% = 0 TO (manyattacks%-1)
- PROCnewnotereception(voice%, (attacks2%(counter%)DIV10^3), (attacks2%(counter%)MOD10^3), pitches%(counter%), amplitudes%(counter%), envelopes%(counter%), durations%(counter%), glissandos%(counter%), inflections%(counter%))
- NEXT
- ELSE
- FOR counter% = 0 TO (manyattacks%-1)
- PROCnewnotereception(voice%, (attacks5%(counter%)DIV10^3), (attacks5%(counter%)MOD10^3), pitches%(counter%), amplitudes%(counter%), envelopes%(counter%), durations%(counter%), glissandos%(counter%), inflections%(counter%))
- NEXT
- PROCdisarrayfill
- ENDIF
- :
- ENDIF
- :
- copyit$ = "OFF" : displayedfunc$ = "n" : copydownwards$ = "n" : justone$ = "n"
- quickextract$ = "n"
- PROCdisplay
- :
- ENDPROC
- :
- REM*********************************************
- :
- DEF PROCseriespitches
- :
- PROCwindow(20,69,60,55)
- :
- IF usebottomstave$ = "n" THEN
- :
- IF singlepitch$ = "m" THEN
- IF firstpitch$ = "y" THEN
- PRINT' " How many pitches "
- INPUT " (for 1 press 0) "numpitches%
- ELSE
- PRINT' " How many pitches "
- PRINT " (for 1 press 0,";
- PRINT " for "; prevnumpitches%;
- INPUT " press 0 twice) "numpitches%
- IF numpitches% = 0 THEN
- wait$ = INKEY$(50)
- IF wait$ <> "" THEN numpitches% = prevnumpitches%
- ENDIF
- ENDIF
- ELSE
- numpitches% = 1
- ENDIF
- :
- ELSE
- numpitches% = howmany%
- ENDIF
- :
- IF numpitches% = 0 THEN numpitches% = 1
- IF numpitches% > 1 THEN
- :
- IF askaboutpitches$ = "y" THEN
- PRINT'" Are the pitches all the same?"
- PRINT " (0/1 count as yes, 2 counts as no) "
- CASE GET$ OF
- WHEN "N","n","2" :
- OTHERWISE PROCsamepitches
- ENDCASE
- ELSE PROCsamepitches
- ENDIF
- :
- ENDIF
- :
- FOR count% = 0 TO numpitches% - 1
- PRINT' " Note name for pitch ";count%+1;" is ";
- COLOUR 1
- CASE GET$ OF
- WHEN "C","c" : note% = 0 : PRINT "C"
- WHEN "D","d" : note% = 1 : PRINT "D"
- WHEN "E","e" : note% = 2 : PRINT "E"
- WHEN "F","f" : note% = 3 : PRINT "F"
- WHEN "G","g" : note% = 4 : PRINT "G"
- WHEN "A","a" : note% = 5 : PRINT "A"
- WHEN "B","b" : note% = 6 : PRINT "B"
- ENDCASE
- COLOUR 0
- PRINT " accidental ";
- COLOUR 1
- CASE GET$ OF
- WHEN "1" : accid% = 1 : PRINT "flat"
- WHEN "2" : accid% = 2 : PRINT "3/8flat"
- WHEN "3" : accid% = 3 : PRINT "1/4flat"
- WHEN "4" : accid% = 4 : PRINT "1/8flat"
- WHEN "5" : accid% = 5 : PRINT "nat"
- WHEN "6" : accid% = 6 : PRINT "1/8shrp"
- WHEN "7" : accid% = 7 : PRINT "1/4shrp"
- WHEN "8" : accid% = 8 : PRINT "3/8shrp"
- WHEN "9" : accid% = 9 : PRINT "shrp"
- ENDCASE
- COLOUR 0
- PRINT " octave ";
- COLOUR 1
- CASE GET$ OF
- WHEN "0" : octave% = 0 : PRINT "0"
- WHEN "1" : octave% = 1 : PRINT "1"
- WHEN "2" : octave% = 2 : PRINT "2"
- WHEN "3" : octave% = 3 : PRINT "3"
- WHEN "4" : octave% = 4 : PRINT "4"
- WHEN "5" : octave% = 5 : PRINT "5"
- WHEN "6" : octave% = 6 : PRINT "6"
- WHEN "7" : octave% = 7 : PRINT "7"
- WHEN "8" : octave% = 8 : PRINT "8"
- ENDCASE
- COLOUR 0
- pitches%(count%) = (note%*100)+(accid%*10)+octave%
- NEXT
- :
- prevnumpitches% = numpitches% : firstpitch$ = "n"
- REM function can feed pitches similarly into pitches%
- :
- PROCinsertpitches
- :
- ENDPROC
- :
- REM************************************************
- :
- DEF PROCinsertpitches
- :
- CLS
- :
- IF reorderpitches$ = "y" THEN
- PRINT'" Do you want to randomly re-order"
- PRINT " the pitches (0 = yes, 2 = no)"
- CASE GET$ OF
- WHEN "2" :
- OTHERWISE
- CLS
- PRINT'" Randomly reorder pitches in batches of "
- INPUT " between how many (0 = previous) "low%
- IF low% = 0 THEN
- low% = previouslow%
- COLOUR 1
- PRINT low%
- COLOUR 0
- wait$ = INKEY$(50)
- ENDIF
- INPUT'" and how many "high%
- IF high% = 0 THEN
- high% = previoushigh%
- COLOUR 1
- PRINT high%
- COLOUR 0
- wait$ = INKEY$(50)
- ENDIF
- :
- startingcell% = 0
- pitches1%() = 0
- pitches2%() = 0
- pitches1%() = pitches%()
- REPEAT
- diff% = high%-low%
- batchsize% = RND(diff%+1)-1
- batchsize% += low%
- counter% = 0
- REPEAT
- cell% = RND(batchsize%)
- cell% = startingcell% + cell% - 1
- IF pitches1%(cell%) <> 0 THEN
- pitches2%(startingcell%+counter%) = pitches1%(cell%)
- counter% += 1
- ENDIF
- pitches1%(cell%) = 0
- check% = 0
- FOR count% = 1 TO batchsize%
- check% += pitches1%(startingcell%+count%-1)
- NEXT
- UNTIL check% = 0
- startingcell% += batchsize%
- UNTIL (numpitches%-high%) < startingcell%
- FOR count% = 0 TO numpitches%-1
- IF pitches2%(count%) <> 0 THEN
- pitches%(count%) = pitches2%(count%)
- ENDIF
- NEXT
- previouslow% = low%
- previoushigh% = high%
- ENDCASE
- ENDIF : REM reorderpitches$
- :
- repeatposit$ = "n"
- IF seequery$ = "y" THEN
- PRINT ' " Do you want to read these pitches "
- PRINT " into the array? "
- CASE GET$ OF
- WHEN "N","n" : PROCdisplay : REM pitches% remains intact
- OTHERWISE
- ENDCASE
- ENDIF : REM seequery$
- :
- IF usebottomstave$ = "n" THEN
- IF screenvoices$ = "n" THEN
- :
- IF copysuccessively$ = "n" THEN
- INPUT'' " Which voice? (0 = top) "voice%
- IF voice% = 0 THEN PROCpressenter
- ELSE PROCcopysuccessively
- ENDIF
- :
- ELSE
- PRINT'" Which screen voice "
- CASE GET$ OF
- WHEN "1" : voice% = 1
- WHEN "2" : voice% = 2
- WHEN "3" : voice% = 3
- OTHERWISE PROCpressenter
- ENDCASE
- ENDIF
- ENDIF : REM usebottomstave$
- :
- IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
- IF usebottomstave$ = "y" THEN voice% = displayvoices%(startv%+2)
- voice% -= 1
- IF voice% >= 0 THEN samevoice% = voice%
- IF voice% = -1 THEN voice% = samevoice%
- :
- IF usebottomstave$ = "n" THEN
- :
- IF quickcopy$ = "y" THEN
- INPUT ' " starting at note number (0 counts as 1) "along%
- IF along% = 0 THEN along% = 1
- along%-=1
- bars% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
- beats% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
- holdbar% = bars%
- holdbeat% = beats%
- PROCalterbeats
- startat% = (bars%*(10^3))+beats%
- :
- ELSE
- :
- INPUT'" Starting at bar number "bars%
- IF bars% = 0 THEN
- bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
- ENDIF
- holdbar% = bars%
- IF repeatposit$ = "y" THEN
- PRINT'" bar ";bars%;" beat ";beats%;"?"
- PRINT'" (for OK press 0, if not OK press X)"
- CASE GET$ OF
- WHEN"X","x" : PROCinsertpitches
- OTHERWISE
- ENDCASE
- ELSE
- INPUT " beat "beats%
- holdbeat% = beats%
- ENDIF
- PROCalterbeats
- startat% = (bars%*(10^3))+beats%
- :
- ENDIF : REM quickcopy$
- :
- ELSE
- along% = 0
- bars% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
- beats% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
- holdbar% = bars%
- holdbeat% = beats%
- PROCalterbeats
- startat% = (bars%*(10^3))+beats%
- :
- ENDIF : REM usebottomstave$
- :
- PROCsearch(startat%)
- shunt$ = "N"
- :
- endcell% = startcell% + numpitches% -1
- IF endcell% >= numusedcells%(voice%) THEN endcell% = numusedcells%(voice%)-1
- FOR count% = startcell% TO endcell%
- PROCcellfill(count%,voice%,999,999,(pitches%(count%-startcell%)),9,999,999,99,99)
- NEXT
- :
- PROCdisplay
- :
- ENDPROC
- :
- REM*************************************************
- :
- DEF PROCfunctionprelude
- :
- IF seereorderx$ = "y" THEN seereordery$ = "y"
- IF seeequalizex$ = "y" THEN seeequalizey$ = "y"
- :
- PROCwindow(20,69,60,55) : CLS
- CASE startfinishdurats$ OF
- WHEN "N", "n" :
- INPUT' " rate "rate
- IF rate = 0 THEN rate = 1 : REM for quick inputting
- IF rate <> 1 THEN
- INPUT'" bias (for 3.7 press 0) "bias
- IF bias = 0 THEN bias = 3.7
- ENDIF
- INPUT'" number of attacks "manyattacks%
- IF manyattacks% = 0 THEN manyattacks% = prevmanyattacks%
- COLOUR 1 : PRINT'manyattacks% : COLOUR 0
- prevmanyattacks% = manyattacks%
- CASE funcinput$ OF
- WHEN "durat" :
- PRINT '" total duration between first "
- PRINT " and last attack "
- INPUT'" bars "bars%
- INPUT" beats "beats%
- PROCalterbeats
- totaldur% = (bars%*960)+beats%
- WHEN "points" :
- INPUT '" first attack at bar "funcbar%
- INPUT " beat "funcbeat%
- INPUT " and last attack at bar "funcbar1%
- INPUT " beat "funcbeat1%
- totaldur% = ((funcbar1%*960)+funcbeat1%)-((funcbar%*960)+funcbeat%)
- WHEN "displayed" :
- IF screenvoices$ = "n" THEN
- INPUT' " Which voice/strand (0 = top) "voice%
- IF voice% = 0 THEN PROCpressenter
- :
- ELSE
- PRINT'" Which screen voice "
- CASE GET$ OF
- WHEN "1" : voice% = 1
- WHEN "2" : voice% = 2
- WHEN "3" : voice% = 3
- OTHERWISE PROCpressenter
- ENDCASE
- ENDIF
- IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
- voice% -= 1
- IF voice% = -1 THEN voice% = samevoice% ELSE samevoice% = voice%
- IF queryalong$ = "y" THEN
- INPUT' " Starting at note number (0 counts as 1) "along%
- IF along% = 0 THEN along% = 1
- along%-=1
- ENDIF
- funcbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
- funcbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
- funcbar1% = array%(holdstartcell%(voice%)+1+along%,0,voice%)DIV10^6
- funcbeat1% = (array%(holdstartcell%(voice%)+1+along%,0,voice%)MOD10^6)DIV10^3
- totaldur% = ((funcbar1%*960)+funcbeat1%)-((funcbar%*960)+funcbeat%)
- displayedfunc$ = "y" : along% = 0
- OTHERWISE PROCfunctionprelude
- ENDCASE
- :
- result$ = "success"
- :
- PROCfunction
- IF rate <> 1 AND seegraph$ = "y" THEN
- PROCwindow(20,69,50,55)
- PRINT'" Do you want to see the graph? "
- CASE GET$ OF
- WHEN "Y","y" : PROCgraph
- OTHERWISE PROCfunctionpostlude
- ENDCASE
- ELSE
- PROCfunctionpostlude
- ENDIF
- ENDCASE
- :
- CASE funcinput$ OF
- WHEN "durat" :
- PROCwindow(20,69,69,55)
- PRINT' " total duration between first attack "
- PRINT " and last attack "
- INPUT' " bars "bars%
- INPUT " beats "beats%
- PROCalterbeats
- totaldur% = (bars%*960)+beats%
- WHEN "points" :
- PROCwindow(20,69,69,55)
- INPUT' " first attack at bar "funcbar%
- INPUT " beat "funcbeat%
- INPUT " and last attack at bar "funcbar1%
- INPUT " beat "funcbeat1%
- totaldur% = ((funcbar1%*960)+funcbeat1%)-((funcbar%*960)+funcbeat%)
- WHEN "displayed" :
- IF screenvoices$ = "n" THEN
- INPUT' " Which voice/strand (0 = top) "voice%
- IF voice% = 0 THEN PROCpressenter
- ELSE
- PRINT'" Which screen voice "
- CASE GET$ OF
- WHEN "1" : voice% = 1
- WHEN "2" : voice% = 2
- WHEN "3" : voice% = 3
- OTHERWISE PROCpressenter
- ENDCASE
- ENDIF
- IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
- voice% -= 1
- IF voice% = -1 THEN voice% = samevoice%
- funcbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
- funcbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
- funcbar1% = array%(holdstartcell%(voice%)+1+along%,0,voice%)DIV10^6
- funcbeat1% = (array%(holdstartcell%(voice%)+1+along%,0,voice%)MOD10^6)DIV10^3
- totaldur% = ((funcbar1%*960)+funcbeat1%)-((funcbar%*960)+funcbeat%)
- displayedfunc$ = "y" : along% = 0
- OTHERWISE PROCfunctionprelude
- ENDCASE
- :
- PROCwindow(20,69,69,54)
- :
- IF firsttimequick$ = "y" THEN
- PRINT' " quick end duration to be... "
- INPUT' " bars "bars%
- INPUT " beats "beats%
- ELSE
- PRINT' " quick end duration to be how many bars "
- PRINT " (for ";prevbars%;" press 0) "
- INPUT bars%
- PRINT' " and how many beats "
- PRINT " (for ";prevbeats%;" press 0) "
- INPUT beats%
- IF bars% = 0 AND beats% = 0 THEN
- bars% = prevbars% : beats% = prevbeats%
- ENDIF
- ENDIF
- prevbars% = bars%
- prevbeats% = beats%
- PROCalterbeats
- quickend% = (bars%*960)+beats%
- :
- IF firsttimequick$ = "y" THEN
- PRINT' " slow end duration to be... "
- INPUT' " bars "bars%
- INPUT " beats "beats%
- ELSE
- PRINT' " slow end duration to be how many bars "
- PRINT " (for ";prevslowbars%;" press 0) "
- INPUT bars%
- PRINT' " and how many beats "
- PRINT " (for ";prevslowbeats%;" press 0) "
- INPUT beats%
- IF bars% = 0 AND beats% = 0 THEN
- bars% = prevslowbars% : beats% = prevslowbeats%
- ENDIF
- ENDIF
- prevslowbars% = bars%
- prevslowbeats% = beats%
- PROCalterbeats
- slowend% = (bars%*960)+beats%
- INPUT' " bias (0 = 3.7) "bias
- IF bias = 0 THEN bias = 3.7
- IF firsttimequick$ = "y" THEN
- INPUT' " estimated number of attacks "manyattacks%
- ELSE
- PRINT' " estimated number of attacks "
- PRINT " (for ";prevest%;" press 0) "
- INPUT manyattacks%
- IF manyattacks% = 0 THEN manyattacks% = prevest%
- ENDIF
- prevest% = manyattacks%
- firsttimequick$ = "n"
- :
- rate = 5.1 : increment = 4
- increment2% = manyattacks%
- ratedir$ = "" : attacksdir$ = ""
- result$ = "noresult"
- doesitloop$ = "" : maybeloop$ = ""
- manyattacks1% = 0 : manyattacks2% = 0 : manyattacks3% = 0 : manyattacks4% = 0 : manyattacks5% = 0
- rate1=0 : rate2=0 : rate3=0 : rate4=0 : rate5=0
- testquickend1% = 0 : testslowend1% = 0
- testquickend% = 0 : testslowend% = 0
- numberoftries%=0
- goes% = 0 : goes1% = 0
- :
- REPEAT
- :
- PROCfunction
- testquickend1% = testquickend%
- testslowend1% = testslowend%
- testquickend% = functionattacks(1)
- testslowend% = functionattacks(manyattacks%-1) - functionattacks(manyattacks%-2)
- manyattacks5% = manyattacks4% : manyattacks4% = manyattacks3%
- manyattacks3% = manyattacks2% : manyattacks2% = manyattacks1%
- manyattacks1% = manyattacks%
- rate5=rate4 : rate4=rate3 : rate3=rate2 : rate2=rate1 : rate1=rate
- IF testquickend% =quickend% AND testslowend% = slowend% THEN
- result$ = "success"
- ENDIF
- :
- IF result$ = "noresult" THEN
- :
- IF testquickend% <= quickend% AND testslowend% >= slowend% THEN
- IF ratedir$ = "up" THEN increment = increment/2.1
- IF increment < 0.01 THEN increment = 0.01
- ratedir$ = "down"
- rate = rate-increment
- IF rate < 1.01 THEN rate = 1.01
- ENDIF
- :
- IF testquickend% >= quickend% AND testslowend% <= slowend% THEN
- IF ratedir$ = "down" THEN increment = increment/2.1
- IF increment < 0.01 THEN increment = 0.01
- ratedir$ = "up"
- rate = rate+increment
- ENDIF
- :
- IF testquickend% < quickend% AND testslowend% < slowend% THEN
- IF attacksdir$ = "up" THEN increment2% = increment2%/2
- IF increment2% < 1 THEN increment2% = 1
- attacksdir$ = "down"
- manyattacks% = manyattacks% - increment2%
- IF manyattacks% < 4 THEN manyattacks% = 4
- ENDIF
- :
- IF testquickend% > quickend% AND testslowend% > slowend% THEN
- IF attacksdir$ = "down" THEN increment2% = increment2%/2
- IF increment2% < 1 THEN increment2% = 1
- attacksdir$ = "up"
- manyattacks% = manyattacks% + increment2%
- IF manyattacks% < 4 THEN manyattacks% = 4
- ENDIF
- :
- ENDIF
- :
- 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
- doesitloop$ = "yes"
- ENDIF
- :
- 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"
- 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
- IF maybeloop$="yes" AND manyattacks%=manyattacks1% AND manyattacks% = manyattacks2% AND manyattacks% = manyattacks3% AND manyattacks%=manyattacks4% AND manyattacks%=manyattacks5% THEN doesitloop$ = "yes"
- :
- IF doesitloop$ = "yes" THEN
- CLS
- IF quickend% >= testquickend1% THEN
- margin1 = (quickend%-testquickend1%)/quickend%*100
- ELSE
- margin1 = (testquickend1%-quickend%)/quickend%*100
- ENDIF
- IF slowend% >= testslowend1% THEN
- margin2 = (slowend%-testslowend1%)/slowend%*100
- ELSE
- margin2 = (testslowend1%-slowend%)/slowend%*100
- ENDIF
- IF quickend% >= testquickend% THEN
- margin3 = (quickend%-testquickend%)/quickend%*100
- ELSE
- margin3 = (testquickend%-quickend%)/quickend%*100
- ENDIF
- IF slowend%>=testslowend% THEN
- margin4 = (slowend%-testslowend%)/slowend%*100
- ELSE
- margin4 = (testslowend%-slowend%)/slowend%*100
- ENDIF
- IF ((margin1*10)DIV1)MOD10>4 THEN margin1% = margin1 ELSE margin1% = margin1
- IF ((margin2*10)DIV1)MOD10>4 THEN margin2% = margin2 ELSE margin2% = margin2
- IF ((margin3*10)DIV1)MOD10>4 THEN margin3% = margin3 ELSE margin3% = margin3
- IF ((margin4*10)DIV1)MOD10>4 THEN margin4% = margin4 ELSE margin4% = margin4
- VDU 7
- PROCwindow(10,69,90,48)
- PRINT''" the search is looping between the two closest possible solutions, "
- PRINT " given the present bias (see below)"
- PRINT ' " do you want to opt for one of these, or carry on searching with"
- PRINT " a different bias (press A/B)"
- PRINT'" quickend ";testquickend1%;" (";margin1%;"% off ";quickend%;")"
- PRINT " slowend ";testslowend1%;" (";margin2%;"% off ";slowend%;")"
- PRINT " number of attacks ";manyattacks2%
- PRINT " rate ";rate2
- PRINT " bias ";bias
- PRINT'" quickend ";testquickend%;" (";margin3%;"% off ";quickend%;")"
- PRINT " slowend ";testslowend%;" (";margin4%;"% off ";slowend%;")"
- PRINT " number of attacks ";manyattacks1%
- PRINT " rate ";rate1
- PRINT " bias ";bias
- CASE GET$ OF
- WHEN "A","a" : numberoftries% = 3
- OTHERWISE
- ENDCASE
- numberoftries% +=1 : IF numberoftries% = 1 THEN bias=bias/2
- IF numberoftries% = 2 THEN bias =bias*4
- IF numberoftries% = 3 THEN
- PRINT'" three different biases now tried -"
- PRINT " to opt for one of the last three tries press A/B/C"
- PRINT " or to try again with fresh values press D"
- CASE GET$ OF
- WHEN "A","a" : bias = bias/2
- WHEN "B","b" : bias = bias/4
- WHEN "C","c" : result$ = "loop"
- WHEN "D","d" : PROCfunctionprelude
- ENDCASE
- ENDIF
- IF numberoftries% = 4 THEN result$ = "loop"
- IF result$ <> "loop" THEN
- manyattacks1% = 0 : manyattacks2% = 0 : manyattacks3% = 0 : manyattacks4% = 0 : manyattacks5% = 0
- rate1=0 : rate2=0 : rate3=0 : rate4=0 : rate5=0
- doesitloop$ = "" : maybeloop$ = ""
- ENDIF
- ENDIF
- ENDIF
- :
- UNTIL result$ <> "noresult"
- :
- CASE result$ OF
- WHEN "success" :
- PROCfunction
- PROCwindow(10,69,90,44)
- PRINT''" quickend ";testquickend%
- PRINT " slowend ";testslowend%
- PRINT " "
- PRINT" rate ";rate
- PRINT" bias ";bias
- PRINT" number of attacks ";manyattacks%
- :
- IF seegraph$ = "y" THEN
- PRINT'" Do you want to see the graph? "
- CASE GET$ OF
- WHEN "Y","y" : PROCgraph
- OTHERWISE PROCfunctionpostlude
- ENDCASE
- ELSE PROCfunctionpostlude
- ENDIF
- :
- WHEN "loop" :
- PRINT'" - to opt for the first solution above press A, for the"
- PRINT " second press B, to try again with fresh values press F"
- CASE GET$ OF
- WHEN "A","a" : PROCfunction
- :
- IF seegraph$ = "y" THEN
- PRINT'" Do you want to see the graph? "
- CASE GET$ OF
- WHEN "Y","y" : PROCgraph
- OTHERWISE PROCfunctionpostlude
- ENDCASE
- ELSE PROCfunctionpostlude
- ENDIF
- :
- WHEN "B","b" : manyattacks%=manyattacks1% : rate = rate1
- PROCfunction
- IF seegraph$ = "y" THEN
- PRINT'" Do you want to see the graph? "
- CASE GET$ OF
- WHEN "Y","y" : PROCgraph
- OTHERWISE PROCfunctionpostlude
- ENDCASE
- ELSE PROCfunctionpostlude
- ENDIF
- WHEN "F","f" : PROCfunctionprelude
- ENDCASE
- ENDCASE
- :
- ENDPROC
- :
- REM**********************************************************
- :
- DEF PROCgraph
- :
- numplots% = 10000
- segment = numplots%/(manyattacks%-1)
- horizline = numplots% - segment
- count =1
- REM convolutions below necc simply to get a 'square' graph
- factor1 = numplots%/rate
- factor2 = rate/(rate-1)
- factor3 = rate/numplots%
- factor4 = numplots%/((FNfunction(1)*factor1)-(FNfunction(rate)*factor1))
- factor5 = FNfunction(rate)*factor1
- factor6 = (factor4*factor5)-factor5
- MODE 31 : CLG : CLS
- PRINT TAB(50) " rate ";rate
- PRINT TAB(50) " bias ";bias
- PRINT TAB(50) " number of attacks ";manyattacks%
- PRINT TAB(50) " quickend ";functionattacks(1)
- PRINT TAB(50) " slowend ";functionattacks(manyattacks%-1)-functionattacks(manyattacks%-2)
- PRINT TAB(50) " total duration ";totaldur%
- MOVE 1000,0 : DRAW 0,0 : DRAW 0,1000
- scaling = 900/numplots%
- FOR x = 1 TO rate STEP factor3
- xaxis = ((x*factor1)-factor1)*2
- yaxis = ((FNfunction(x)*factor1)*factor4)-(factor5 + factor6)
- xplot = xaxis*scaling : yplot = yaxis*scaling
- DRAW xplot,yplot
- REM the function uses x = 1 to rate, but the graph plots (xaxis & yaxis) run from 0 to 1000 in each axis
- IF yaxis <= horizline THEN
- LINE 0,yplot, xplot,yplot
- LINE xplot,yplot, xplot,0
- MOVE xplot,yplot
- count += 1
- horizline -= segment
- ENDIF
- NEXT
- PROCfunctionpostlude
- ENDPROC
- :
- REM***************************************
- :
- DEF PROCfunctionpostlude
- :
- IF rate <> 1 THEN
- PRINT '" Accel or rit"
- PRINT " (press A/R or 1/2)"
- CASE GET$ OF
- WHEN "A","a","1" :
- FOR count% = 0 TO (manyattacks%-1)
- attacks1%(count%) = totaldur% - (functionattacks((manyattacks%-1)-count%))
- NEXT
- direction$ = "accel"
- :
- OTHERWISE
- FOR count = 0 TO (manyattacks%-1)
- attacks1%(count) = functionattacks(count)
- NEXT
- direction$ = "rit"
- ENDCASE
- ELSE
- FOR count% = 0 TO (manyattacks%-1)
- attacks1%(count%) = functionattacks(count%)
- NEXT
- direction$ = "rit"
- ENDIF
- :
- method$ = "raw"
- IF funcinput$ = "points" OR funcinput$ = "displayed" THEN quiz$ = "no"
- COLOUR 0 : COLOUR 135 : CLS : PROCinsertattacks
- ENDPROC
- :
- REM***************************************
- :
- DEF FNfunction(x)
- = (rate/x)-(x/bias)+(rate/bias)
- :
- REM***************************************
- :
- DEF PROCprerhythmicize
- :
- PROCwindow(20,69,90,45)
- CLS : PRINT' " Do you want to (re)define the criteria"
- PRINT " for the positioning of irrational groups,"
- PRINT " or use default ones? (Y/N/D) "
- PRINT'" (defaults are: irrat.lngths ";shortirrat%" - "; longirrat%
- PRINT " irrat.locats. ";irratbeats%;" fallback locats. ";irratbeats1%
- PRINT " shortest dur. ";mindur%;" complexity ";given%;" default divs. ";defaultsieve;")"
- CASE GET$ OF
- WHEN "Y","y" :
- PRINT'" Give length of the SHORTEST irrational group desired... "
- INPUT' " bars "bars%
- INPUT " beats "beats%
- PROCalterbeats
- shortirrat% = (bars%*960)+beats%
- PRINT'" Give length of the LONGEST irrational group desired... "
- INPUT'" bars "bars%
- INPUT " beats "beats%
- PROCalterbeats
- longirrat% = (bars%*960)+beats%
- IF longirrat%/beatfactor% > 999 THEN
- VDU 7 : PRINT'" !!Maximum length for irrational groups is 999 beats!! "
- PRINT'" (to try again press C) "
- CASE GET$ OF
- WHEN"C","c" : CLS :PROCprerhythmicize
- ENDCASE
- ENDIF
- PRINT'" Which beats of the bar is it acceptable to begin "
- PRINT " irrational groups of attacks on (1 = first beat of bar only,"
- PRINT " 2 = any 1/2 bar, 3 = any 1/3 bar etc) "
- PRINT " (use this to control allowability of certain group lengths) "
- INPUT irratbeats% : REM 1-16 make integers except 7,9,11,13 & 14
- PRINT'" Which beats of the bar is it acceptable to begin 'fall back' "
- PRINT " irrational groups, ie ones beginning or ending with rests, on "
- PRINT " (1, 2, 3 etc - also for controlling which lengths allowable) "
- INPUT irratbeats1%
- PRINT'" What is the shortest allowable duration, in beats "
- PRINT " (any less than this will be 'edited up')"
- INPUT mindur%
- PROCalterbeats
- sieve = 960/mindur%
- buffer% = 960/(sieve*2)
- PRINT'" What is the maximum allowable irrational complexity, "
- PRINT " eg, '5' allows upto 5 'in the time of' (this parameter "
- PRINT " controls the trade-off between user-friendliness and accuracy) "
- INPUT given%
- PRINT'" By default, irrationals will avoid small divisions beyond a "
- PRINT " certain point, unless required by the rhythm. Confirm or "
- PRINT " re-set this default, which is currently at ";defaultsieve;" divisions "
- INPUT " of the bar (same trade-off as above)"defaultsieve
- WHEN "D","d" :
- PROCrhythmdefaults
- OTHERWISE
- ENDCASE
- :
- PROCquantize
- :
- attacks5%() = attacks2%()
- attacks3%() = attacks3%()/(10^3) : REM list of actual bar nos
- FOR count% = 0 TO (manyattacks%-1)
- attacks4%(count%) = attacks2%(count%) MOD (10^3)
- NEXT : REM list of actual beat nos (attacks2 containing bar/beat nos remains intact)
- :
- REM routine to fill array nodes%() with acceptable beats of bar to start irrat groups on
- IF irratbeats% > 0 THEN
- nextbeat% = 960/irratbeats%
- FOR count% = 1 TO (irratbeats%-1)
- nodes%(count%) = nodes%(count%-1) + nextbeat%
- NEXT
- ENDIF
- :
- REM routine to fill nodes1%() with acceptable beats to start fallback groups on
- nextbeat% = 960/irratbeats1%
- FOR count% = 1 TO (irratbeats1% - 1)
- nodes1%(count%) = nodes1%(count%-1) + nextbeat%
- NEXT
- nodes1%(irratbeats1%) = 960
- :
- REM routine to test whether first attack is on an acceptable beat
- firstattack$ = "offbeat"
- count% = 0
- REPEAT
- IF attacks4%(0) = nodes%(count%) THEN firstattack$ = "onbeat"
- count% += 1
- UNTIL firstattack$ = "onbeat" OR count% > (irratbeats%-1)
- :
- IF firstattack$ = "onbeat" THEN
- endbeat% = attacks2%(0)
- endcell% = 0
- status$ = "onbeat"
- firstgroup$ = "y"
- ELSE
- word$ = ""
- count% = irratbeats1%
- REPEAT
- IF nodes1%(count%) < attacks4%(0) THEN
- endbeat% = (attacks3%(0)*(10^3)) + nodes1%(count%)
- word$ = "found"
- ENDIF
- count% -= 1
- UNTIL word$ = "found" OR count% < 0
- endcell% = 0
- status$ = ""
- firstgroup$ = "y"
- ENDIF
- PROCrhythmicize
- :
- ENDPROC
- :
- REM***************************************************************
- :
- DEF PROCfunction
- :
- IF rate = 1 THEN
- :
- unit = totaldur%/(manyattacks%-1)
- :
- FOR count% = 1 TO (manyattacks%-2)
- :
- attackpoint = unit * count%
- :
- REM rounding-off to nearest integer
- attackpoint = attackpoint * 10
- attackpoint = attackpoint DIV 1
- fraction = attackpoint MOD 10
- IF fraction > 4 THEN
- attackpoint = (attackpoint DIV 10) + 1
- ELSE
- attackpoint = attackpoint DIV 10
- ENDIF
- functionattacks(count%) = attackpoint
- REM list of 'real' attack-values 0-totaldur% rounded to nearest integer
- :
- NEXT
- :
- functionattacks(manyattacks%-1) = totaldur%
- :
- ELSE
- :
- yrange = FNfunction(1) - 1
- segment = yrange/(manyattacks%-1)
- ypoint = FNfunction(1)
- :
- FOR count% = 1 TO (manyattacks%-2)
- :
- ypoint -= segment
- xincrement = rate - 1
- xtry = 1 + (xincrement/2)
- :
- tolerance = yrange/100000 : REM this ought to give highly accurate results
- :
- IF result$ = "success" OR result$ = "loop" OR count% = 1 OR count% = (manyattacks%-2) THEN
- :
- WHILE FNfunction(xtry) > (ypoint+tolerance) OR FNfunction(xtry) < (ypoint-tolerance)
- :
- xincrement = xincrement/2
- IF FNfunction(xtry) < ypoint THEN
- xtry -= xincrement
- ELSE
- xtry += xincrement
- ENDIF
- :
- ENDWHILE
- :
- ENDIF
- :
- functionattacks(count%) = xtry
- :
- NEXT
- :
- functionattacks(0) = 1
- functionattacks(manyattacks%-1) = rate
- :
- REM scaling & rounding routine
- functionattacks() -= 1
- divider = rate-1
- FOR count% = 0 TO (manyattacks%-1)
- functionattacks(count%) = functionattacks(count%)/divider*totaldur%
- NEXT
- :
- FOR count% = 1 TO (manyattacks%-1)
- number = functionattacks(count%)
- number = number*10
- number = number DIV 1
- fraction = number MOD 10
- IF fraction > 4 THEN
- number = (number DIV 10) + 1
- ELSE
- number = number DIV 10
- ENDIF
- functionattacks(count%) = number
- REM list of 'real' attack-values 0-totaldur% rounded to nearest integer
- NEXT
- :
- ENDIF
- :
- ENDPROC
- :
- REM**************************************************************
- :
- DEF PROCrhythmicize
- :
- cant% = 0 : REM for notategroup%() subscript - poss change later
- notategroup%() = 0
- :
- REPEAT
- :
- status1$ = status$
- status$ = ""
- startbeat% = endbeat%
- :
- IF status1$ = "onbeat" OR firstgroup$ = "y" THEN
- startcell% = endcell%
- ELSE startcell% = endcell% + 1
- ENDIF
- firstgroup$ = "n"
- :
- cell% = startcell%
- count% = 0
- condition$ = "full"
- :
- PROCbuffers
- :
- WHILE status$ = "" AND attacks5%(cell%) <= rightbuffer% AND cell% < manyattacks%
- :
- IF attacks5%(cell%) >= leftbuffer% AND attacks5%(cell%) <= rightbuffer% THEN
- :
- IF attacks4%(cell%) >= (960-buffer%) THEN attacks4%(cell%) = (960-attacks4%(cell%))*-1 : REM catches attacks just before barline
- :
- REPEAT
- :
- IF attacks4%(cell%) >= (nodes%(count%)-(buffer%)) AND attacks4%(cell%) <= (nodes%(count%)+(buffer%)) THEN
- :
- IF attacks4%(cell%) < 0 THEN
- br% = attacks3%(cell%)+1
- attacks4%(cell%) = 960 - (attacks4%(cell%)*-1)
- beforebar$ = "y"
- ELSE
- br% = attacks3%(cell%)
- beforebar$ = "n"
- ENDIF
- :
- IF attacks5%(cell%) >= ((br%*10^3)+nodes%(count%)) THEN
- diff% = attacks4%(cell%) - nodes%(count%) + ((attacks3%(cell%)-br%)*960)
- ELSE
- diff% = nodes%(count%) - attacks4%(cell%) + ((br%-attacks3%(cell%))*960)
- ENDIF
- :
- IF attacks5%(cell%+1) >= ((br%*10^3)+nodes%(count%)) THEN
- diff1% = attacks4%(cell%+1)-nodes%(count%)+((attacks3%(cell%+1)-br%)*960)
- ELSE
- diff1% = nodes%(count%)-attacks4%(cell%+1)+((br%-attacks3%(cell%+1))*960)
- ENDIF
- :
- IF diff% <= diff1% THEN
- :
- status$ = "onbeat"
- IF beforebar$ = "y" THEN
- attacks5%(cell%) = (attacks3%(cell%)*10^3) + 1000 + nodes%(count%)
- ELSE
- attacks5%(cell%) = (attacks3%(cell%)*10^3) + nodes%(count%)
- ENDIF
- endbeat% = attacks5%(cell%)
- endcell% = cell%
- difference% = endcell% - startcell%
- IF status1$ = "onbeat" AND difference% = 1 THEN condition$ = "empty"
- IF status1$ = "" AND difference% = 0 THEN condition$ = "empty"
- :
- ENDIF
- :
- ENDIF
- :
- count% += 1
- :
- UNTIL count% = irratbeats% OR status$ = "onbeat"
- :
- ENDIF
- :
- cell% += 1
- count% = 0
- :
- ENDWHILE
- :
- :
- IF status$ = "" THEN
- word$ = ""
- leftbuffer% = leftbuffer% + buffer%
- :
- REPEAT
- :
- IF nodes1%(count%) >= (leftbuffer%MOD10^3) THEN
- :
- IF nodes1%(count%) = 960 THEN
- endbeat% = ((leftbuffer%DIV(10^3))*10^3)+(10^3)
- ELSE
- endbeat% = ((leftbuffer%DIV(10^3))*(10^3)) + nodes1%(count%)
- ENDIF
- :
- IF status1$ = "" AND attacks5%(startcell%) > endbeat% THEN
- condition$ = "empty"
- ENDIF
- IF status1$ = "onbeat" AND attacks5%(startcell%+1) > endbeat% THEN
- condition$ = "empty"
- ENDIF
- :
- IF condition$ = "full" THEN
- :
- searchcell% = startcell% - 1
- REPEAT
- searchcell% += 1
- UNTIL attacks5%(searchcell%) > endbeat% OR searchcell% = manyattacks%
- :
- endcell% = searchcell% - 1
- ENDIF
- word$ = "done"
- :
- ENDIF
- :
- count% += 1
- :
- UNTIL word$ = "done"
- :
- :
- ENDIF
- :
- PROCprechoosegroup
- :
- UNTIL endbeat% >= attacks5%(manyattacks%-1)
- :
- IF seeinfo$ = "y" THEN
- durat% = 0
- counter% = 0
- thing$ = "on"
- PROCwindow(10,60,90,5) : CLS
- VDU 14
- PRINT '" The group of rhythmicised attacks will be at "
- PRINT" "
- PRINT TAB(28) "ATTACKS AT";
- PRINT TAB(46) "DURATIONS";
- PRINT TAB(64) "RATIOS"
- attacks5%(manyattacks%) = 10^9
- FOR count% = 0 TO manyattacks%
- IF counter% < cant% THEN
- item% = ((notategroup%(counter%,1)DIV10^4)*10^3)+(notategroup%(counter%,0)MOD10^3)
- IF item% = attacks5%(count%) THEN
- PRINT TAB(15) item%;
- counter% += 1
- thing$ = "on"
- ENDIF
- ENDIF
- IF counter% < cant% THEN
- item% = ((notategroup%(counter%,1)DIV10^4)*10^3)+(notategroup%(counter%,0)MOD10^3)
- IF item% < attacks5%(count%) THEN
- PRINT TAB(15) item%
- counter% += 1
- thing$ = "on"
- ENDIF
- ENDIF
- IF counter% < cant% THEN
- IF thing$ = "on" THEN
- IF (notategroup%(counter%,0)DIV1000)= attacks5%(count%) THEN
- PRINT " "
- PRINT " "
- PRINT TAB(0) (notategroup%(counter%,1)MOD10000);
- PRINT TAB(15) (notategroup%(counter%,0)DIV1000);
- thing$ = "off"
- ENDIF
- :
- IF (notategroup%(counter%,0)DIV1000)< attacks5%(count%) THEN
- PRINT " "
- PRINT " "
- PRINT TAB(0) ((notategroup%(counter%,1))MOD10000);
- PRINT TAB(15) (notategroup%(counter%,0)DIV1000)
- thing$ = "off"
- ENDIF
- ENDIF
- ENDIF
- :
- IF thing$ = "on" THEN PRINT'" "
- :
- IF count% < manyattacks% THEN
- PRINT TAB(25)attacks5%(count%);
- IF count% < (manyattacks%-1) THEN
- durat1% = durat%
- durat% = (attacks5%(count%+1)MOD10^3)-(attacks5%(count%)MOD10^3)
- addon% = ((attacks5%(count%+1)DIV(10^3))-(attacks5%(count%)DIV(10^3)))*960
- durat% = durat% + addon%
- PRINT TAB(42) durat%;
- IF count%>0 THEN
- IF direction$ = "rit" THEN ratio = durat%/durat1% ELSE ratio = durat1%/durat%
- CASE ratio OF
- WHEN 0.5 : PRINT TAB(65) "0.5"
- WHEN 1.0 : PRINT TAB(65) "1.0"
- WHEN 1.5 : PRINT TAB(65) "1.5"
- WHEN 2.0 : PRINT TAB(65) "2.0"
- WHEN 2.5 : PRINT TAB(65) "2.5"
- OTHERWISE PRINT TAB(65) ratio
- ENDCASE
- ENDIF
- ENDIF
- ENDIF
- NEXT
- :
- VDU 15
- ENDIF
- :
- ENDPROC
- :
- REM*******************************************
- :
- DEF PROCbuffers
- :
- beatnum% = (startbeat%MOD(10^3)) + shortirrat% - buffer%
- carrybars% = beatnum% DIV 960
- beatnum% = beatnum% - (carrybars%*960)
- leftbuffer% = ((startbeat%DIV(10^3))*10^3) + (carrybars%*(10^3)) + beatnum%
- :
- beatnum% = (startbeat%MOD(10^3)) + longirrat% + buffer%
- carrybars% = beatnum% DIV 960
- beatnum% = beatnum% - (carrybars%*960)
- rightbuffer% = ((startbeat%DIV(10^3))*10^3) + (carrybars%*(10^3)) + beatnum%
- :
- REM tolerance of 'buffer%' incorporated into buffers
- :
- ENDPROC
- :
- REM********************************************8
- :
- DEF PROCprechoosegroup
- :
- :
- IF condition$ = "full" THEN
- :
- REM routine to find grouplength%
- carrybars% = (endbeat% DIV (10^3)) - (startbeat% DIV (10^3))
- grouplength% = (endbeat% MOD (10^3)) - (startbeat% MOD (10^3)) + (carrybars% * 960)
- :
- REM routine to find first and last durats
- IF status1$ = "onbeat" THEN
- :
- carrybars% = attacks3%(startcell%+1)-attacks3%(startcell%)
- firstdur% = attacks4%(startcell%+1)-attacks4%(startcell%)+(carrybars%*960)
- ELSE
- carrybars% = attacks3%(startcell%)-(startbeat%DIV(10^3))
- firstdur% = attacks4%(startcell%)-(startbeat%MOD(10^3))+(carrybars%*960)
- ENDIF
- :
- IF status$ = "onbeat" THEN
- :
- carrybars% = attacks3%(endcell%)-attacks3%(endcell%-1)
- lastdur% = attacks4%(endcell%)-attacks4%(endcell%-1)+(carrybars%*960)
- ELSE
- carrybars% = (endbeat%DIV(10^3))-attacks3%(endcell%)
- lastdur% = (endbeat%MOD(10^3))-attacks4%(endcell%)+(carrybars%*960)
- ENDIF
- :
- :
- :
- REM routine to determine each individual duration
- IF status1$ = "onbeat" AND status$ = "onbeat" THEN
- numdurs% = endcell% - startcell%
- FOR count% = 2 TO (numdurs%-1)
- dur%(count%) = attacks1%(startcell%+count%)-attacks1%(startcell%+(count%-1))
- NEXT
- dur%(1) = firstdur%
- dur%(numdurs%) = lastdur%
- ENDIF
- :
- IF status1$ = "onbeat" AND status$ = "" THEN
- numdurs% = endcell% - startcell% + 1
- FOR count% = 2 TO (numdurs%-1)
- dur%(count%) = attacks1%(startcell%+count%)-attacks1%(startcell%+(count%-1))
- NEXT
- dur%(1) = firstdur%
- dur%(numdurs%) = lastdur%
- ENDIF
- :
- IF status1$ = "" AND status$ = "onbeat" THEN
- numdurs% = endcell% - startcell% + 1
- FOR count% = 2 TO (numdurs%-1)
- dur%(count%) = attacks1%(startcell%+(count%-1))-attacks1%(startcell%+(count%-2))
- NEXT
- dur%(1) = firstdur%
- dur%(numdurs%) = lastdur%
- ENDIF
- :
- IF status1$ = "" AND status$ = "" THEN
- numdurs% = endcell% - startcell% + 2
- FOR count% = 2 TO (numdurs%-1)
- dur%(count%) = attacks1%(startcell%+(count%-1))-attacks1%(startcell%+(count%-2))
- NEXT
- dur%(1) = firstdur%
- dur%(numdurs%) = lastdur%
- ENDIF
- :
- REM routine to find enddur (ie smallest duration)
- enddur = 10^9
- FOR count% = 1 TO numdurs%
- IF dur%(count%) < enddur THEN
- enddur = dur%(count%) : enddurnum% = count%
- ENDIF
- NEXT
- :
- REM routine to find numsubdivs of enddur poss, using a default min division, forcing that
- REM down with durats less than it, but not beyond the minimum div given by sieve
- defaultmindur% = 960/defaultsieve
- IF enddur < defaultmindur% THEN
- x = 960/enddur : defaultmindur% = 960/x
- ELSE x = defaultsieve
- ENDIF
- IF x > sieve THEN
- x = sieve : defaultmindur% = mindur%
- ENDIF
- numsubdivs = x * enddur / 960 * 1.04 : REM 1.04 catches numbers just below whole nos eg 1.96
- IF numsubdivs < 1 THEN numsubdivs% = 1 ELSE numsubdivs% = numsubdivs
- :
- REM repeat/until loop to keep increasing and decreasing enddur until a 'reasonable' proportiontotal% is found
- switch$ = "A" : nudge% = -5
- REPEAT
- nudge% += 5
- IF switch$ = "A" THEN enddur += (nudge%/100) ELSE enddur -= (nudge%/100)
- IF enddur < 1 THEN
- VDU 7 : PRINT''" !!!THE COMPLEXITY LEVEL IS TOO LOW "
- PRINT" FOR LONG GROUPS CONSISTING "
- PRINT" OF ODD NUMBERS OF BEATS, "
- PRINT" eg 13 QUAVERS, 31 SEMIS ETC. "
- PRINT" INCREASE THIS LEVEL OR SHORTEN "
- PRINT" GROUPS OR, BEST, REDUCE INPUTS 3/4!!! "
- PRINT" (press C to continue) "
- CASE GET$ OF
- WHEN"C","c" : PROCdisplay
- ENDCASE
- ENDIF
- :
- IF switch$ = "A" THEN switch$ = "B" ELSE switch$ = "A"
- numsubdivs1 = x*enddur/960*1.04
- IF numsubdivs1 < 1 THEN numsubdivs% = 1 ELSE numsubdivs% = numsubdivs1
- REM prev 2 lines allow 'stretched' enddurs to include more (or less) subdivs
- REM without altering original subdivs, which tends to vitiate the whole process
- :
- REM routine to create list of attacks 0 - totalduration
- FOR count% = 1 TO numdurs%
- groupattacks%(count%) = groupattacks%(count%-1)+dur%(count%)
- NEXT
- REM groupattacks%(numdurs%) SHOULD = grouplength%
- :
- timeround% = 1
- PROCchoosegroup
- :
- REM routine to place error-values in order
- errororder%() = 10000000
- FOR count% = 1 TO numsubdivs%
- tick% = 0
- REPEAT
- do$ = "n"
- tick%+=1 : inplace$ = "n"
- IF error%(count%) < errororder%(tick%) THEN
- FOR tock% = numsubdivs% TO tick% STEP -1
- errororder%(tock%+1) = errororder%(tock%)
- errororder1%(tock%+1) = errororder1%(tock%)
- NEXT
- errororder%(tick%) = error%(count%) : errororder1%(tick%) = count% : inplace$ = "y"
- ENDIF
- UNTIL inplace$ = "y"
- NEXT
- :
- timeround% = 2 : tog% = 0
- REPEAT
- tog%+=1 : closest% = errororder1%(tog%)
- PROCchoosegroup
- PROCcheckproportiontotal
- UNTIL proportiontotal$ = "OK" OR tog% = numsubdivs%
- UNTIL proportiontotal$ = "OK"
- REM routine to alter attacks5%() to closest group & to save notation in a parallel temp array
- IF status1$ = "onbeat" THEN
- FOR count% = 1 TO (numdurs%-1)
- totalbeat% = (startbeat%MOD(10^3))+rhythmicattacks%(count%)
- carrybars% = ((totalbeat%/960)DIV1)
- beat% = totalbeat%-(carrybars%*960)
- bar% = (carrybars%+(startbeat%DIV(10^3)))*(10^3)
- attacks5%(startcell%+count%) = beat% + bar%
- NEXT
- ENDIF
- :
- IF status1$ = "" THEN
- FOR count% = 1 TO (numdurs%-1)
- totalbeat% = (startbeat%MOD(10^3))+rhythmicattacks%(count%)
- carrybars% = ((totalbeat%/960)DIV1)
- beat% = totalbeat% - (carrybars%*960)
- bar% = (carrybars% + (startbeat%DIV(10^3))) * (10^3)
- attacks5%(startcell%+(count%-1)) = beat% + bar%
- NEXT
- ENDIF
- :
- notategroup%(cant%,0) = (startbeat%*10^3)+(endbeat%MOD10^3)
- notategroup%(cant%,1) = ((endbeat%DIV10^3)*10^4)+proportiontotal%
- cant% += 1
- :
- ENDIF
- :
- ENDPROC
- :
- REM******************************************************
- :
- DEF PROCchoosegroup
- :
- IF timeround% = 1 THEN
- start% = 1 : finish% = numsubdivs%
- ELSE start% = closest% : finish% = closest%
- ENDIF
- :
- error%() = 0
- FOR count% = start% TO finish%
- :
- FOR count1% = 1 TO numdurs%
- IF count1% = enddurnum% THEN thedur% = enddur ELSE thedur% = dur%(count1%)
- IF numsubdivs < 1 THEN
- proportion = thedur%/enddur*numsubdivs/1.04
- ELSE proportion = thedur%/enddur*count%
- ENDIF
- IF (((proportion*10)DIV1)MOD10) < 5 THEN
- proportion%(count1%) = (proportion) DIV 1
- ELSE proportion%(count1%) = ((proportion) DIV 1) + 1
- ENDIF
- IF proportion%(count1%) < 1 THEN proportion%(count1%) = 1
- NEXT
- :
- proportiontotal% = 0
- :
- FOR count2% = 1 TO numdurs%
- proportiontotal% = proportiontotal%+proportion%(count2%)
- NEXT
- :
- unit = grouplength%/proportiontotal%
- :
- rhythmicattack = 0
- FOR count3% = 1 TO numdurs%
- rhythmicattack = rhythmicattack + (proportion%(count3%)*unit)
- IF (((rhythmicattack*10)DIV1)MOD10) < 5 THEN
- rhythmicattacks%(count3%) = rhythmicattack DIV 1
- ELSE
- rhythmicattacks%(count3%) = ((rhythmicattack)DIV1)+1
- ENDIF
- NEXT : REM rhythmicattacks%(numdurs%) SHOULD = grouplength%
- :
- REM compare attackpoints with attackpoints
- FOR count4% = 1 TO (numdurs%-1)
- IF rhythmicattacks%(count4%) <= groupattacks%(count4%) THEN
- error%(count%) = error%(count%) + (groupattacks%(count4%) - rhythmicattacks%(count4%))
- ELSE
- error%(count%) = error%(count%)+(rhythmicattacks%(count4%)-groupattacks%(count4%))
- ENDIF
- NEXT
- :
- NEXT
- :
- ENDPROC
- :
- REM***************************************************************
- :
- DEF PROCseriesattacks
- :
- PROCwindow(20,69,70,55)
- PRINT '" Input attacks as a series of raw BEAT numbers, or"
- PRINT " already rhythmicized, or multiplied by factors,"
- PRINT " or played, or single attack (R/A/F/P/1)"
- :
- CASE GET$ OF
- REM CASE 1
- WHEN "A","a" :
- count% = 0 : cant% = 0 :
- notategroup%() = 0 : finished$ = "n"
- :
- REPEAT
- :
- PRINT '" single attack or group (ALL irrationals must be given"
- PRINT " as a group) or finished (press S/G/F)"
- CASE GET$ OF
- REM CASE 2
- WHEN "S","s","1","0" :
- :
- INPUT " bar"bar%
- INPUT " beat"beats%
- PROCalterbeats
- attacks2%(count%) = (bar%*(10^3)) + beats%
- count% += 1
- :
- WHEN "G","g" :
- INPUT " starting at bar "bars%
- INPUT " beat "beats%
- PROCalterbeats
- start% = (bars%*(10^3))+beats%
- INPUT " ending at bar "bars%
- INPUT " beat "beats%
- PROCalterbeats
- end% = (bars%*(10^3))+beats%
- INPUT " number of divisions"numdivs%
- notategroup%(cant%,0) = (start%*10^3)+(end%MOD10^3)
- notategroup%(cant%,1) = ((end%DIV10^3)*10^4)+numdivs%
- cant% += 1
- beat% = (start%)MOD(10^3) : bar% = (start%)DIV(10^3)
- :
- grouplength% = ((end%MOD(10^3))-(start%MOD(10^3)))+(((end%DIV(10^3))-(start%DIV(10^3)))*960)
- unit = grouplength%/numdivs%
- :
- IF (grouplength%/beatfactor%) > 999 THEN
- PRINT'''" !!!Maximum group length is 999 (big) beats!!! "
- PRINT" (press C to try again) "
- CASE GET$ OF
- REM CASE 3
- WHEN "C","c": CLS : PROCseriesattacks
- OTHERWISE PROCdisplay
- ENDCASE
- REM ENDCASE 3
- ENDIF
- IF numdivs% > 9999 THEN
- PRINT'''" !!!Maximum number of divisions is 9999!!! "
- PRINT" (press C to try again) "
- CASE GET$ OF
- REM CASE 4
- WHEN "C","c": CLS : PROCseriesattacks
- OTHERWISE PROCdisplay
- ENDCASE
- REM ENDCASE 4
- ENDIF
- :
- INPUT " how many attacks"numattacks%
- FOR counter% = 1 TO numattacks%
- PRINT '" attack ";counter%;" is on division number "
- INPUT div%
- place = ((div%-1)*unit)
- IF (((place*10)DIV1)MOD10) < 5 THEN
- place% = (place)DIV1
- ELSE place% = ((place)DIV1)+1
- ENDIF
- :
- beatnum% = beat% + place%
- carrybars% = (beatnum%/960)DIV1
- beatnum% = beatnum% - (carrybars%*960)
- barnum% = carrybars% + bar%
- attacks2%(count%) = (barnum%*(10^3)) + beatnum%
- count% += 1
- NEXT
- :
- WHEN "F","f" : finished$ = "y"
- ENDCASE
- REM ENDCASE 2
- :
- UNTIL finished$ = "y"
- :
- method$ = "alreadyrhythmicized" : manyattacks% = count%
- attacks5%() = attacks2%() : rhythmicized$ = "y"
- :
- WHEN "R","r","0" :
- REM function will feed a sim string of beat values 0 - n into attacks1%()
- :
- attacks1%() = 0
- INPUT' " How many attacks "manyattacks%
- :
- IF manyattacks% > 2 THEN
- PRINT'" Are the intervals between them the same? "
- CASE GET$ OF
- WHEN "N","n","2" : sameintervals$ = "n"
- OTHERWISE sameintervals$ = "y"
- ENDCASE
- ELSE sameintervals$ = "y"
- ENDIF
- :
- IF manyattacks% > 1 THEN
- :
- CASE sameintervals$ OF
- WHEN "n" :
- FOR count% = 1 TO (manyattacks% - 1)
- PRINT' " Give the interval between attacks ";count%;" and ";count%+1;"... "
- INPUT'" bars "bars%
- INPUT " beats "beats%
- PROCalterbeats
- onbeat% = (bars%*960)+beats%
- attacks1%(count%) = attacks1%(count%-1) + onbeat%
- NEXT
- WHEN "y" :
- PRINT'" The interval between them is "
- INPUT " bars "bars%
- INPUT " bears "beats%
- PROCalterbeats
- onbeat% = (bars%*960)+beats%
- FOR count% = 1 TO (manyattacks%-1)
- attacks1%(count%) = attacks1%(count%-1) + onbeat%
- NEXT
- :
- ENDCASE
- :
- ENDIF
- method$ = "raw" : attacks1%(0) = 0
- WHEN "1" :
- REM function will feed a sim string of beat values 0 - n into attacks1%()
- :
- manyattacks% = 1
- :
- method$ = "raw" : attacks1%(0) = 0
- :
- WHEN "F","f" :
- REM function will feed a sim string of beat values 0 - n into attacks1%()
- :
- attacks1%() = 0
- INPUT' " How many attacks "manyattacks%
- :
- FOR count% = 1 TO (manyattacks% - 1)
- IF count% = 1 THEN
- PRINT' " Give the interval between attacks ";count%;" and ";count%+1;"... "
- INPUT'" bars "bars%
- INPUT " beats "beats%
- PROCalterbeats
- onbeat% = (bars%*960)+beats%
- attacks1%(count%) = attacks1%(count%-1) + onbeat%
- ELSE
- PRINT' " Multiply by ? to give the interval between attacks ";count%;" and ";count%+1;"... "
- IF count% = 2 THEN onbeat% = attacks1%(count%-1)
- CASE GET$ OF
- WHEN "0": onbeat% = onbeat% * 1.03
- WHEN "1": onbeat% = onbeat% * 1.04
- WHEN "2": onbeat% = onbeat% * 1.06
- WHEN "3": onbeat% = onbeat% * 1.09
- WHEN "4": onbeat% = onbeat% * 1.13
- WHEN "5": onbeat% = onbeat% * 1.19
- WHEN "6": onbeat% = onbeat% * 1.29
- WHEN "7": onbeat% = onbeat% * 1.41
- WHEN "8": onbeat% = onbeat% * 1.61
- WHEN "9": onbeat% = onbeat% * 1.91
- ENDCASE
- attacks1%(count%) = attacks1%(count%-1) + onbeat%
- ENDIF
- NEXT
- method$ = "raw" : attacks1%(0) = 0
- :
- WHEN "P","p" :
- CLS
- PRINT " Play the rhythm using any"
- PRINT " keys or the spacebar"
- PRINT'" When finished, press ~"
- :
- key$ = GET$ : TIME = 0 : VDU 7 : manyattacks% = 1
- :
- REPEAT
- manyattacks% += 1 : key$ = GET$
- attacks2%(manyattacks%-1) = TIME : VDU 7
- UNTIL key$ = "~" OR key$ = "`"
- :
- manyattacks% -= 1
- :
- FOR count% = 1 TO manyattacks% - 1
- attacks1%(count%) = attacks2%(count%)*960*MM%/6000
- NEXT
- :
- method$ = "raw"
- :
- ENDCASE
- REM ENDCASE 1
- :
- PROCinsertattacks
- :
- ENDPROC
- :
- REM***************************************************************
- :
- DEF PROCalterbeats
- :
- IF beats% < alterbeatsat% THEN beats% = beats% * beatfactor% * 8
- :
- ENDPROC
- :
- REM****************************************************************
- :
- DEF PROCdisarrayfill
- :
- FOR count% = 0 TO (cant%-1)
- :
- bar% = notategroup%(count%,0)DIV(10^6)
- carrybars% = (notategroup%(count%,1)DIV(10^4))-bar%
- carrybeats% = (notategroup%(count%,0)MOD(10^3))-((notategroup%(count%,0)MOD(10^6))DIV(10^3))
- grouplength% = (carrybars%*960)+carrybeats%
- grouplength% = grouplength%/beatfactor%
- :
- beat% = ((notategroup%(count%,0)MOD(10^6))DIV(10^3))/beatfactor%
- divs% = notategroup%(count%,1)MOD(10^4)
- :
- IF grouplength% > 99 OR divs% > 99 THEN bigirrat$ = "y" ELSE bigirrat$ = "n"
- :
- IF (disarray%(bar%,0,voice%) DIV(10^3)) MOD10^2 = 0 AND bigirrat$ = "n" THEN
- hold% = disarray%(bar%,0,voice%)MOD10^3
- add% = ((beat%*(10^4)) + (grouplength%*(10^2)) + divs%) * (10^3)
- disarray%(bar%,0,voice%) = hold% + add%
- ELSE
- IF (disarray%(bar%,1,voice%)DIV(10^6))MOD10^2=0 AND bigirrat$ = "n" THEN
- disarray%(bar%,0,voice%)=disarray%(bar%,0,voice%)+(beat%*10)+(grouplength%DIV10)
- hold% = disarray%(bar%,1,voice%)MOD10^6
- add% = (((grouplength%MOD10)*100)+divs%)*10^6
- disarray%(bar%,1,voice%) = hold% + add%
- ELSE
- IF disarray%(bar%,1,voice%)MOD10^2=0 AND bigirrat$ = "n" THEN
- disarray%(bar%,1,voice%)=disarray%(bar%,1,voice%)+(beat%*(10^4))+(grouplength%*(10^2))+divs%
- ELSE
- IF (disarray%(bar%,2,voice%)DIV(10^3))MOD10^2 = 0 AND bigirrat$ = "n" THEN
- hold% = disarray%(bar%,2,voice%)MOD10^3
- add% = ((beat%*(10^4)) + (grouplength%*(10^2)) + divs%) * (10^3)
- disarray%(bar%,2,voice%)= hold% + add%
- ELSE
- IF disarray%(bar%,3,voice%)=0 THEN
- disarray%(bar%,3,voice%)=(beat%*10^7)+(grouplength%*10^4)+divs%
- ELSE
- VDU 7
- PRINT''''" THERE ARE ALREADY 5 RHYTHMIC GROUPS IN THIS BAR"
- PRINT" (this is the maximum)"
- PRINT''" TO CONTINUE PRESS C"
- CASE GET$ OF
- WHEN "C","c" : PROCawait
- OTHERWISE
- PROCawait
- ENDCASE
- ENDIF
- ENDIF
- ENDIF
- ENDIF
- ENDIF
- :
- NEXT
- :
- ENDPROC
- :
- REM**********************************************
- :
- DEF PROCdelete
- :
- IF deleteone$ <> "none" THEN
- PROCdeleteone
- ELSE
- PROCwindow(20,69,80,55)
- PRINT '" One or several notes LEAVING rhythmic notation - A"
- PRINT '" One or several notes DELETING rhythmic notation - B"
- PRINT '" One or several bars - C"
- PRINT '" Whole voice - D"
- PRINT '" Group of voices - G"
- :
- CASE GET$ OF
- WHEN "A","a" :
- :
- CLS
- IF screenvoices$ = "n" THEN
- INPUT' " Which voice/strand (0 = top) "voice%
- IF voice% = 0 THEN PROCpressenter
- ELSE
- PRINT'" Which screen voice "
- CASE GET$ OF
- WHEN "1" : voice% = 1
- WHEN "2" : voice% = 2
- WHEN "3" : voice% = 3
- OTHERWISE PROCpressenter
- ENDCASE
- ENDIF
- IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
- voice% -= 1
- IF voice% >= 0 THEN samevoice% = voice%
- IF voice% = -1 THEN voice% = samevoice%
- :
- INPUT " how many notes (for 1 press 0) "numnotes%
- IF numnotes% = 0 THEN numnotes% = 1
- IF quickcopy$ = "n" THEN
- PRINT'" Starting at bar number "
- INPUT " (press 0 for first bar displayed) "bar%
- IF bar% = 0 THEN bar% = startbar%
- INPUT " beat "beats% : PROCalterbeats
- start% = (bar%*(10^3))+beats%
- ELSE
- INPUT ' " starting at note number (0 counts as 1) "along%
- IF along% = 0 THEN along% = 1
- along%-=1
- copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
- copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
- beats% = copystartbeat%
- PROCalterbeats
- start% = (copystartbar%*(10^3))+beats%
- ENDIF
- PROCsearch(start%)
- PROCshuntleft(startcell%,numnotes%)
- :
- ENDIF
- :
- WHEN "B","b" :
- :
- CLS
- IF screenvoices$ = "n" THEN
- INPUT' " Which voice/strand (0 = top) "voice%
- IF voice% = 0 THEN PROCpressenter
- ELSE
- PRINT'" Which screen voice "
- CASE GET$ OF
- WHEN "1" : voice% = 1
- WHEN "2" : voice% = 2
- WHEN "3" : voice% = 3
- OTHERWISE PROCpressenter
- ENDCASE
- ENDIF
- IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
- voice% -= 1
- IF voice% >= 0 THEN samevoice% = voice%
- IF voice% = -1 THEN voice% = samevoice%
- :
- INPUT " how many notes "numnotes%
- :
- IF quickcopy$ = "n" THEN
- PRINT'" Starting at bar number "
- INPUT " (press 0 for first bar displayed "bar%
- IF bar% = 0 THEN bar% = startbar%
- INPUT " beat "beats% : PROCalterbeats
- start% = (bar%*(10^3))+beats%
- ELSE
- INPUT ' " starting at note number (0 counts as 1) "along%
- IF along% = 0 THEN along% = 1
- along%-=1
- copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
- copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
- beats% = copystartbeat%
- PROCalterbeats
- start% = (copystartbar%*(10^3))+beats%
- ENDIF
- PROCsearch(start%)
- FOR count% = startcell% TO (startcell%+(numnotes%-1))
- FOR counter% = 0 TO 1
- barno% = (array%(count%,0,voice%)DIV10^6)-counter%
- beatnum% = ((array%(count%,0,voice%)DIV10^3)MOD10^3)
- :
- group1start% = (disarray%(barno%,0,voice%)DIV10^7)*beatfactor%
- group1end% = group1start% + (((disarray%(barno%,0,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
- IF beatnum%+(960*counter%) >= group1start% AND beatnum%+(960*counter%) <= group1end% THEN
- disarray%(barno%,0,voice%) = disarray%(barno%,0,voice%)MOD10^3
- ENDIF
- :
- group2start% = ((disarray%(barno%,0,voice%)DIV10)MOD10^2)*beatfactor%
- group2end% = group2start%+((((disarray%(barno%,0,voice%)MOD10)*10)+(disarray%(barno%,1,voice%)DIV10^8))*beatfactor%)-1
- IF beatnum%+(960*counter%) >= group2start% AND beatnum%+(960*counter%) <= group2end% THEN
- disarray%(barno%,0,voice%) = (disarray%(barno%,0,voice%)DIV10^3)*10^3
- disarray%(barno%,1,voice%) = disarray%(barno%,1,voice%)MOD10^6
- ENDIF
- :
- group3start%=((disarray%(barno%,1,voice%)DIV10^4)MOD10^2)*beatfactor%
- group3end% = group3start% + (((disarray%(barno%,1,voice%)MOD10^4)DIV10^2)*beatfactor%)-1
- IF beatnum%+(960*counter%) >= group3start% AND beatnum%+(960*counter%) <= group3end% THEN
- disarray%(barno%,1,voice%) = (disarray%(barno%,1,voice%)DIV10^6)*10^6
- ENDIF
- :
- group4start% = (disarray%(barno%,2,voice%)DIV10^7)*beatfactor%
- group4end% = group4start%+(((disarray%(barno%,2,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
- IF beatnum%+(960*counter%) >= group4start% AND beatnum%+(960*counter%) <= group4end% THEN
- disarray%(barno%,2,voice%) = disarray%(barno%,2,voice%)MOD10^3
- ENDIF
- :
- group5start% = (disarray%(barno%,3,voice%)DIV10^7)*beatfactor%
- group5end% = group5start%+(((disarray%(barno%,3,voice%)DIV10^4)MOD10^3)*beatfactor%)-1
- IF beatnum%+(960*counter%) >= group5start% AND beatnum%+(960*counter%) <= group5end% THEN
- disarray%(barno%,2,voice%) = (disarray%(barno%,2,voice%)DIV10^3)*10^3
- disarray%(barno%,3,voice%) = 0
- ENDIF
- :
- NEXT
- :
- NEXT
- PROCshuntleft(startcell%,numnotes%)
- :
- WHEN "C","c" :
- CLS
- PRINT '" If rhythmic groups cross from the bar(s) in question "
- PRINT " to other bars, use A or B to delete those groups, "
- PRINT " in which case press X"
- PRINT'" Otherwise, press C to continue with deleting"
- PRINT" self-contained bar(s)"
- CASE GET$ OF
- WHEN "X","x" : PROCdelete
- OTHERWISE
- ENDCASE
- CLS
- INPUT '" how many bars (0 = 100) "NUMbars%
- IF NUMbars% = 0 THEN NUMbars% = 100
- PRINT '" starting at bar "
- INPUT "(press 0 for first bar displayed) "STARTbar%
- IF STARTbar% = 0 THEN STARTbar% = startbar%
- :
- IF screenvoices$ = "n" THEN
- INPUT' " Which voice/strand (0 = top) "voice%
- IF voice% = 0 THEN PROCpressenter
- ELSE
- PRINT'" Which screen voice "
- CASE GET$ OF
- WHEN "1" : voice% = 1
- WHEN "2" : voice% = 2
- WHEN "3" : voice% = 3
- OTHERWISE PROCpressenter
- ENDCASE
- ENDIF
- IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
- voice% -= 1
- IF voice% >= 0 THEN samevoice% = voice%
- IF voice% = -1 THEN voice% = samevoice%
- :
- startcell% = 0
- :
- FOR bar% = STARTbar% TO (STARTbar%+(NUMbars%-1))
- :
- IF numusedcells%(voice%)-startcell% > 0 THEN
- :
- start% = bar%*(10^3)
- IF start% < (array%(0,0,voice%)DIV10^3) THEN
- startcell% = 0
- ELSE PROCsearch(start%)
- ENDIF
- :
- numnotes% = 0
- WHILE (array%((startcell%+numnotes%),0,voice%)DIV10^6) = bar%
- numnotes% += 1
- ENDWHILE
- IF numnotes% > 0 THEN PROCshuntleft(startcell%,numnotes%)
- :
- FOR count% = 0 TO 3
- disarray%(bar%,count%,voice%) = 0
- NEXT
- :
- ENDIF
- :
- NEXT
- :
- WHEN "D","d" :
- IF screenvoices$ = "n" THEN
- INPUT' " Which voice/strand "voice%
- ELSE
- PRINT'" Which screen voice "
- CASE GET$ OF
- WHEN "1" : voice% = 1
- WHEN "2" : voice% = 2
- WHEN "3" : voice% = 3
- OTHERWISE PROCpressenter
- ENDCASE
- ENDIF
- IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
- voice% -= 1
- IF voice% >= 0 THEN samevoice% = voice%
- IF voice% = -1 THEN voice% = samevoice%
- :
- FOR count% = 0 TO (numusedcells%(voice%)-1)
- array%(count%,0,voice%) = 0
- array%(count%,1,voice%) = 0
- array%(count%,2,voice%) = 0
- NEXT
- numusedcells%(voice%) = 0
- :
- FOR count% = 1 TO nobars%
- FOR counter% = 0 TO 3
- disarray%(count%,counter%,voice%) = 0
- NEXT
- NEXT
- :
- WHEN "G","g" :
- INPUT'" Between which voice "voice1%
- INPUT'" and which voice "voice2%
- voice1% -= 1 : voice2% -= 1
- FOR whichvoice% = voice1% TO voice2%
- voice% = whichvoice%
- FOR count% = 0 TO (numusedcells%(voice%)-1)
- array%(count%,0,voice%) = 0
- array%(count%,1,voice%) = 0
- array%(count%,2,voice%) = 0
- NEXT
- numusedcells%(voice%) = 0
- FOR count% = 1 TO nobars%
- FOR counter% = 0 TO 3
- disarray%(count%,counter%,voice%) = 0
- NEXT
- NEXT
- NEXT
- :
- OTHERWISE VDU 7 : PROCdelete
- :
- ENDCASE
- PROCdisplay
- ENDPROC
- :
- REM************************************************
- :
- DEF PROCshuntleft(startcell%,numnotes%)
- :
- FOR count% = startcell% TO numusedcells%(voice%)-(numnotes%+1)
- array%(count%,0,voice%) = array%(count%+numnotes%,0,voice%)
- array%(count%,1,voice%) = array%(count%+numnotes%,1,voice%)
- array%(count%,2,voice%) = array%(count%+numnotes%,2,voice%)
- NEXT
- FOR count% = (numusedcells%(voice%)-1) TO (numusedcells%(voice%)-numnotes%) STEP -1
- array%(count%,0,voice%) = 0
- array%(count%,1,voice%) = 0
- array%(count%,2,voice%) = 0
- NEXT
- numusedcells%(voice%) = numusedcells%(voice%)-numnotes%
- ENDPROC
- :
- REM********************************************************
- :
- DEF PROCpredisplay
- :
- CLS
- methd$ = "second"
- INPUT '" How many bars "numbars%
- INPUT '" starting at bar "startbar%
- INPUT '" How many voices "numvoices%
- :
- requestedend% = startbar% + numbars%
- :
- IF requestedend% > nobars% THEN startbar% -= (requestedend%-nobars%)
- IF startbar% < 1 THEN
- startbar% = 1 : numbars% = nobars%-1
- ENDIF
- IF numvoices% > numparts% THEN numvoices% = numparts%
- holdnum% = numvoices%
- :
- IF numvoices% > 9 THEN
- PRINT '" Are the voice numbers"
- PRINT " successive?"
- CASE GET$ OF
- WHEN "Y","y" :
- INPUT " starting at voice number "vce%
- FOR count% = 1 TO numvoices%
- displayvoices%(count%) = vce% + count% - 1
- holddisplay%(count%) = vce% + count% - 1
- NEXT
- methd$ = "first"
- OTHERWISE
- ENDCASE
- ENDIF
- IF methd$ = "second" THEN
- FOR count% = 1 TO numvoices%
- PRINT '" voice ";count%;
- INPUT " is voice "vce%
- displayvoices%(count%) = vce%
- holddisplay%(count%) = vce%
- NEXT
- ENDIF
- startv% = 1 : holdstart% = 1
- PROCdisplay
- ENDPROC
- :
- REM********************************************
- :
- DEF PROCquickdisplay
- :
- FOR count% = 1 TO quicknum%
- prequickdisplay%(count%) = quickdisplay%(count%)
- NEXT
- prequicknum% = quicknum%
- :
- IF quickdisplaywindow$ = "y" THEN
- PROCwindow(20,63,48,55) : ON
- ENDIF
- :
- IF numvoicesgiven$ = "n" THEN
- REPEAT
- INPUT'" How many voices "numvoices%
- UNTIL numvoices% > 0 : REM stops a crash if 0 accidentally input
- quicknum% = numvoices%
- ENDIF
- :
- IF numvoices% > 1 THEN
- PRINT'" Are the voices successive "
- CASE GET$ OF
- WHEN "N","n","2" : succ$ = "n"
- OTHERWISE succ$ = "y"
- ENDCASE
- ELSE
- succ$ = "n"
- ENDIF
- :
- IF succ$ = "y" THEN
- INPUT'" starting at voice "vce%
- FOR count% = 1 TO numvoices%
- displayvoices%(count%) = vce%+count%-1
- quickdisplay%(count%) = vce%+count%-1
- NEXT
- :
- ELSE
- FOR count% = 1 TO numvoices%
- IF numvoices% = 1 THEN
- PRINT'" which voice "
- ELSE
- PRINT'" voice ";count%;" is voice "
- ENDIF
- REPEAT
- INPUT vce%
- UNTIL vce% > 0
- displayvoices%(count%) = vce%
- quickdisplay%(count%) = vce%
- NEXT
- ENDIF
- :
- quicknum% = numvoices%
- startv% = 1
- toggle$ = "quick" : numvoicesgiven$ = "n"
- quickdisplaywindow$ = "y"
- PROCdisplay
- ENDPROC
- :
- REM********************************************
- :
- DEF PROCdisplay
- :
- *CONFIGURE ScreenSize 256K
- MODE 31
- VDU 5
- ledgerkey% = 1 : height1% = 0 : wideness1% = 0 : along% = 0
- :
- VDU 23,17,7,6,7;7;0;
- REM penultimate and pre-penultimate values determine text size
- :
- endv% = startv% + numvoices% - 1
- IF longscore$ = "y" AND (endv%-startv%)>2 THEN endv% = startv%+2
- :
- IF printing$ = "n" THEN
- GCOL 0 : GCOL 135 : CLG
- ENDIF
- :
- REM display of beatnumbers, notenumbers etc shuffle up to occupy empty space
- beatsheight% = 0 : numbersheight% = 0 : intheight% = 0
- IF amplitudes$ = "y" THEN
- beatsheight% += 40 : numbersheight% += 40 : intheight% += 40
- ENDIF
- IF beatnumbers$ = "y" THEN
- numbersheight% += 40 : intheight% += 40
- ENDIF
- IF notenumbers$ = "y" OR notenumbers$ = "from1" THEN intheight% += 40
- :
- IF longscore$ = "n" THEN width% = 1520 ELSE width% = 1480
- IF printing$ = "y" THEN width% -= 0
- factor = width%/((numbars%/2)*960)
- IF longscore$ = "y" THEN factor = factor/2
- :
- REM stave lines, barlines & beats for shortscore
- IF longscore$ = "n" THEN
- IF staves$ = "y" THEN
- FOR count% = 938 TO 874 STEP -16 : LINE 0,count%,2112,count% : NEXT
- IF lowerstave$ = "y" THEN
- FOR count% = 794 TO 730 STEP -16 : LINE 0,count%,2112,count% : NEXT
- ENDIF
- FOR count% = 414 TO 350 STEP -16 : LINE 0,count%,2112,count% : NEXT
- IF lowerstave$ = "y" THEN
- FOR count% = 270 TO 206 STEP -16 : LINE 0,count%,2112,count% : NEXT
- ENDIF
- ENDIF
- :
- REM barlines
- IF barlines$ = "y" THEN
- FOR system% = 0 TO 1
- FOR barline% = 1 TO (numbars%/2)
- horpos% = (960*barline%*factor)+40
- IF notehead$ = "small" THEN horpos% += 16
- IF notehead$ = "vsmall" THEN horpos% += 24
- FOR thickness% = 2 TO 8 STEP 2
- LINE horpos%+thickness%,874-(524*system%),horpos%+thickness%,794-(524*system%)
- NEXT
- REM bar nos
- IF printing$ = "n" THEN GCOL 1
- IF tempi%(startbar%) <> tempi%(startbar%-1) THEN
- MOVE 40,1145 : PRINT "b.";startbar%;" MM.";tempi%(startbar%)
- ELSE MOVE 40,1145 : PRINT "b.";startbar%;" (MM.";tempi%(startbar%);")"
- ENDIF
- IF remarks$(startbar%,0) <> "" OR remarks$(startbar%,1) <> "" THEN
- MOVE 40,1120 : PRINT remarks$(startbar%,0) : MOVE 40,1095 : PRINT remarks$(startbar%,1)
- ENDIF
- IF printing$ = "n" THEN GCOL 0
- barline1% = (system%*(numbars%/2))+barline%
- MOVE horpos%-125,1145-(533*system%)
- IF printing$ = "n" THEN GCOL 1
- IF tempi%(startbar% + barline1%) <> tempi%(startbar% + barline1% - 1) THEN
- PRINT startbar% + barline1%;" MM.";tempi%(startbar% + barline1%);
- ELSE IF barline1% MOD barnosoften% = 0 THEN PRINT startbar% + barline1%
- ENDIF
- IF remarks$(startbar%+barline1%,0) <> "" OR remarks$(startbar%+barline1%,1) <> "" THEN
- MOVE horpos%,1120-(533*system%) : PRINT remarks$(startbar%+barline1%,0)
- MOVE horpos%,1095-(533*system%) : PRINT remarks$(startbar%+barline1%,1)
- ENDIF
- REM print duration at bottom right
- IF seeduration$ = "y" THEN
- IF startbar% + barline1% = startbar% + numbars% - 1 THEN
- totaldur = 0
- FOR count% = 1 TO startbar% + numbars% - 1
- duration = 60/tempi%(count%)
- totaldur = totaldur + duration
- NEXT
- totaldur% = totaldur
- mins% = totaldur% DIV 60
- secs% = totaldur% - (mins%*60)
- MOVE 1200,50 : PRINT "duration ";mins%;" mins ";secs%;" secs"
- ENDIF
- ENDIF
- IF printing$ = "n" THEN GCOL 0
- NEXT
- NEXT
- REM bar no for system 2 first bar
- MOVE -70,612
- IF printing$ = "n" THEN GCOL 1
- IF tempi%(startbar%+(numbars%/2)) <> tempi%(startbar%+(numbars%/2)-1) THEN
- PRINT startbar%+(numbars%/2);" MM.";tempi%(startbar%+(numbars%/2))
- ELSE IF (numbars%/2) MOD barnosoften% = 0 THEN PRINT startbar%+(numbars%/2)
- ENDIF
- IF remarks$(startbar%+(numbars%/2),0) <> "" OR remarks$(startbar%+(numbars%/2),1) <> "" THEN
- MOVE 40,587 : PRINT remarks$(startbar%+(numbars%/2),0)
- MOVE 40,562 : PRINT remarks$(startbar%+(numbars%/2),1)
- ENDIF
- IF printing$ = "n" THEN GCOL 0
- ENDIF
- :
- REM beats
- IF beats$ = "y" THEN
- IF notehead$ = "big" THEN add% = 26
- IF notehead$ = "small" THEN add% = 34
- IF notehead$ = "vsmall" THEN add% = 38
- :
- FOR system% = 0 TO 1
- FOR br% = 0 TO (numbars%/2)-1
- horpos% = (960*br%*factor)+add%+40
- FOR bt% = 0 TO (factor%-1) STEP beatstep%
- CIRCLE horpos%+(bt%*960/factor%*factor),834-(524*system%),4
- NEXT
- NEXT
- NEXT
- ENDIF
- :
- ENDIF
- :
- REM staves, barlines, beats etc for longscore
- IF longscore$ = "y" THEN
- longinsts$() = ""
- REM staves
- lastcount% = numvoices%-1
- IF lastcount% > 2 THEN lastcount% = 2
- FOR count% = 0 TO lastcount%
- longinsts$(count%,0) = insts$(displayvoices%(startv%+count%),0)
- longinsts$(count%,1) = insts$(displayvoices%(startv%+count%),1)
- longinsts$(count%,2) = insts$(displayvoices%(startv%+count%),2)
- NEXT
- stavecombination$ = longinsts$(0,2) + longinsts$(1,2) + longinsts$(2,2)
- clefcombination$ = longinsts$(0,1)+longinsts$(1,1)+longinsts$(2,1)
- CASE stavecombination$ OF
- WHEN "111" :
- IF staves$ = "y" THEN
- FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,604-count%,2112,604-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
- ENDIF
- PROCclef(3,938,604,270,0,0,0,clefcombination$)
- PROClongvalue(938,604,270,clefcombination$)
- WHEN "121" :
- IF staves$ = "y" THEN
- FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,652-count%,2112,652-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
- ENDIF
- PROCclef(4,938,652,556,270,0,0,clefcombination$)
- PROClongvalue(938,652,270,clefcombination$)
- WHEN "211" :
- IF staves$ = "y" THEN
- FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
- ENDIF
- PROCclef(4,938,842,556,270,0,0,clefcombination$)
- PROClongvalue(938,556,270,clefcombination$)
- WHEN "112" :
- IF staves$ = "y" THEN
- FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,652-count%,2112,652-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,366-count%,2112,366-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
- ENDIF
- PROCclef(4,938,652,366,270,0,0,clefcombination$)
- PROClongvalue(938,652,366,clefcombination$)
- WHEN "221" :
- IF staves$ = "y" THEN
- FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,604-count%,2112,604-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,508-count%,2112,508-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
- ENDIF
- PROCclef(5,938,842,604,508,270,0,clefcombination$)
- PROClongvalue(938,604,270,clefcombination$)
- WHEN "222" :
- IF staves$ = "y" THEN
- FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,652-count%,2112,652-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,366-count%,2112,366-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
- ENDIF
- PROCclef(6,938,842,652,556,366,270,clefcombination$)
- PROClongvalue(938,652,366,clefcombination$)
- WHEN "122" :
- IF staves$ = "y" THEN
- FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,700-count%,2112,700-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,604-count%,2112,604-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,366-count%,2112,366-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
- ENDIF
- PROCclef(5,938,700,604,366,270,0,clefcombination$)
- PROClongvalue(938,700,366,clefcombination$)
- WHEN "212" :
- IF staves$ = "y" THEN
- FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,604-count%,2112,604-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,366-count%,2112,366-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,270-count%,2112,270-count% : NEXT
- ENDIF
- PROCclef(5,938,842,604,366,270,0,clefcombination$)
- PROClongvalue(938,604,366,clefcombination$)
- WHEN "1" :
- IF staves$ = "y" THEN
- FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
- ENDIF
- PROCclef(1,938,0,0,0,0,0,clefcombination$)
- PROClongvalue(938,0,0,clefcombination$)
- WHEN "2" :
- IF staves$ = "y" THEN
- FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
- ENDIF
- PROCclef(2,938,842,0,0,0,0,clefcombination$)
- PROClongvalue(938,0,0,clefcombination$)
- WHEN "11" :
- IF staves$ = "y" THEN
- FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,604-count%,2112,604-count% : NEXT
- ENDIF
- PROCclef(2,938,604,0,0,0,0,clefcombination$)
- PROClongvalue(938,604,0,clefcombination$)
- WHEN "12" :
- IF staves$ = "y" THEN
- FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,652-count%,2112,652-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
- ENDIF
- PROCclef(3,938,652,556,0,0,0,clefcombination$)
- PROClongvalue(938,652,0,clefcombination$)
- WHEN "21" :
- IF staves$ = "y" THEN
- FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
- ENDIF
- PROCclef(3,938,842,556,0,0,0,clefcombination$)
- PROClongvalue(938,556,0,clefcombination$)
- WHEN "22" :
- IF staves$ = "y" THEN
- FOR count% = 0 TO 64 STEP16 : LINE 0,938-count%,2112,938-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,842-count%,2112,842-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,556-count%,2112,556-count% : NEXT
- FOR count% = 0 TO 64 STEP16 : LINE 0,460-count%,2112,460-count% : NEXT
- ENDIF
- PROCclef(4,938,842,556,460,0,0,clefcombination$)
- PROClongvalue(938,556,0,clefcombination$)
- ENDCASE
- :
- REM time signature
- beatstothebar% = (960/beatfactor%)/8
- CASE beams% OF
- WHEN 1 : whichvalue% = 1
- WHEN 2 : whichvalue% = 2
- WHEN 3 : whichvalue% = 4
- WHEN 4 : whichvalue% = 8
- WHEN 5 : whichvalue% = 16
- WHEN 6 : whichvalue% = 32
- ENDCASE
- MOVE 15,1050
- PRINT "meter"
- MOVE 15,1030
- PRINT" ";beatstothebar%;"/";whichvalue%
- :
- REM beats
- IF beats$ = "y" THEN
- IF notehead$ = "big" THEN add% = 26
- IF notehead$ = "small" THEN add% = 34
- IF notehead$ = "vsmall" THEN add% = 38
- :
- FOR br% = 0 TO (numbars%-1)
- horpos% = (960*br%*factor)+add%+80
- FOR bt% = 0 TO (factor%-1) STEP beatstep%
- CIRCLE horpos%+(bt%*960/factor%*factor),longbeatsupper%,4:CIRCLE horpos%+(bt%*960/factor%*factor),longbeatslower%,4
- NEXT
- NEXT
- ENDIF
- ENDIF
- :
- IF longscore$ = "n" THEN number% = 2 ELSE number% = 1
- FOR system% = 1 TO number%
- :
- FOR count% = startv% TO endv%
- :
- voice% = (displayvoices%(count%))-1
- addingnotes$ = "n"
- current% = 0 : lowernumber% = 0
- IF system% = 1 THEN firstbar% = startbar%
- IF system% = 2 THEN firstbar% = startbar%+(numbars%/2)
- PROCnewnotereception(voice%,firstbar%,0,0,0,0,0,0,0)
- CASE option% OF
- WHEN 1 : startcell% = 0
- WHEN 2 : startcell% = numusedcells%(voice%)
- WHEN 3 : startcell% = 0
- WHEN 4 : start% = firstbar%*10^3 : PROCsearch(start%)
- ENDCASE
- holdstartcell%(voice%) = startcell%
- :
- IF array%(startcell%,0,voice%)DIV10^6 > 0 THEN
- :
- howmany% = 0
- REPEAT
- howmany% += 1
- :
- carrybars% = (array%(startcell%,0,voice%)DIV10^6) - firstbar%
- beat% = ((array%(startcell%,0,voice%)DIV10^3)MOD10^3)+(carrybars%*960)
- hposn% = (beat%*factor)+50 : REM gives horiz co-ordinate
- :
- IF howmany% = 1 THEN firsttrack% = hposn%
- :
- IF longscore$ = "y" THEN hposn% += 40
- :
- octave% = (array%(startcell%,0,voice%)MOD10)
- IF longscore$ = "n" THEN
- IF octave% < 4 AND system% = 1 THEN value% = 586
- IF octave% >= 4 AND system% = 1 THEN value% = 858
- IF octave% < 4 AND system% = 2 THEN value% = 62
- IF octave% >= 4 AND system% = 2 THEN value% = 334
- IF octave% > 3 THEN octave% = octave%-4
- ENDIF
- :
- ENDCASE
- IF longscore$ = "y" THEN value% = value%(count%-startv%)
- :
- vposn% = value%+(((array%(startcell%,0,voice%)MOD10^3)DIV10^2)*8)+(octave%*56) : REM gives vert co-ordinate
- :
- REM notehead
- IF redpitches$ = "y" THEN PROCredpitches
- IF notehead$ = "big" THEN
- LINE hposn%+12,vposn%+8,hposn%+26,vposn%+8
- LINE hposn%+4,vposn%+4,hposn%+30,vposn%+4
- LINE hposn%,vposn%,hposn%+32,vposn%
- LINE hposn%+2,vposn%-4,hposn%+28,vposn%-4
- LINE hposn%+6,vposn%-8,hposn%+20,vposn%-8
- ENDIF
- IF notehead$ = "small" THEN
- LINE hposn%+24,vposn%+8,hposn%+28,vposn%+8
- LINE hposn%+20,vposn%+4,hposn%+30,vposn%+4
- LINE hposn%+16,vposn%,hposn%+32,vposn%
- LINE hposn%+18,vposn%-4,hposn%+28,vposn%-4
- LINE hposn%+20,vposn%-8,hposn%+24,vposn%-8
- ENDIF
- IF notehead$ = "vsmall" THEN
- LINE hposn%+28,vposn%+8,hposn%+28,vposn%+8
- LINE hposn%+27,vposn%+6,hposn%+29,vposn%+6
- LINE hposn%+26,vposn%+4,hposn%+30,vposn%+4
- LINE hposn%+25,vposn%+2,hposn%+31,vposn%+2
- LINE hposn%+24,vposn%,hposn%+32,vposn%
- LINE hposn%+25,vposn%-2,hposn%+31,vposn%-2
- LINE hposn%+26,vposn%-4,hposn%+30,vposn%-4
- LINE hposn%+27,vposn%-6,hposn%+29,vposn%-6
- LINE hposn%+28,vposn%-8,hposn%+28,vposn%-8
- ENDIF
- IF printing$ = "n" THEN GCOL 0
- :
- REM beatnumbers
- IF beatnumbers$ = "y" OR (beatnumbers$ = "first" AND howmany% = 1) THEN
- PROCnotenumbersep
- IF longscore$ = "y" THEN
- MOVE hposn%-100,actamppos%(voice%+1)-beatsheight%-lower%-lowernumber%
- PROCbeatnumbers
- ELSE MOVE hposn%-100,674+shortamppos%(voice%)-((system%-1)*524)-beatsheight%+40-lower%
- PROCbeatnumbers
- ENDIF
- ENDIF
- :
- REM notenumbers
- IF notenumbers$ = "y" THEN
- PROCnotenumbersep
- IF longscore$ = "y" THEN
- MOVE hposn%-100,actamppos%(voice%+1)-numbersheight%-lowernumber%
- PRINT startcell%+1
- ELSE MOVE hposn%-100,(674+shortamppos%(voice%)-((system%-1)*524))-numbersheight%+40
- PRINT startcell%+1
- ENDIF
- ENDIF
- :
- IF notenumbers$ = "last" THEN
- IF (array%(startcell%+1,0,voice%) DIV10^6) >= (numbars%+firstbar%) OR array%(startcell%+1,0,voice%) = 0 THEN print$ = "y" ELSE print$ = "n"
- IF print$ = "y" THEN
- MOVE hposn%-100,actamppos%(voice%+1)-numbersheight%
- PRINT startcell%+1
- ENDIF
- ENDIF
- :
- IF notenumbers$ = "from1" THEN
- PROCnotenumberfreq
- PROCnotenumbersep
- IF printnumber$ = "y" THEN
- IF longscore$ = "y" THEN
- MOVE hposn%-100,actamppos%(voice%+1)-numbersheight%-lowernumber%
- PRINT howmany%
- ELSE MOVE hposn%-100,(674+shortamppos%(voice%)-((system%-1)*524))-numbersheight%+40
- PRINT howmany%
- ENDIF
- ENDIF
- ENDIF
- :
- REM intervals
- IF displayintervals$ = "y" THEN
- pitch% = array%(startcell%,0,voice%)MOD10^3
- CASE typeintervals$ OF
- WHEN "s" : PROCconvertpitch
- WHEN "q" : PROCconvertquarter
- WHEN "e" : PROCconverteighth
- WHEN "c" : cent% = (array%(startcell%,2,voice%)MOD10^2)-50 : PROCconvertcent
- OTHERWISE
- ENDCASE
- currentpitch% = note%
- FOR cout% = 1 TO numintervals%
- IF (startcell%-cout%) >= 0 THEN
- pitch% = array%((startcell%-cout%),0,voice%)MOD10^3
- CASE typeintervals$ OF
- WHEN "s" : PROCconvertpitch
- WHEN "q" : PROCconvertquarter
- WHEN "e" : PROCconverteighth
- WHEN "c" : cent% = (array%((startcell%-cout%),2,voice%)MOD10^2)-50 : PROCconvertcent
- OTHERWISE
- ENDCASE
- comparepitch% = note%
- IF currentpitch% >= comparepitch% THEN
- interval% = currentpitch% - comparepitch%
- ELSE interval% = comparepitch% - currentpitch%
- ENDIF
- REPEAT : IF interval% > compoundint% THEN interval% -= chunk% : UNTIL interval% <= compoundint%
- IF longscore$ = "y" THEN
- MOVE hposn%-125,actamppos%(voice%+1)-(intheight%+(40*(cout%-1)))
- PRINT interval%
- ELSE MOVE hposn%-125,(674+shortamppos%(voice%)-((system%-1)*524))-(intheight%+(40*(cout%-1))-40)
- PRINT interval%
- ENDIF
- ENDIF
- NEXT
- ENDIF
- :
- REM note names
- IF notenames$ = "y" THEN
- whichnote% = (array%(startcell%,0,voice%)MOD10^3)DIV10^2
- CASE whichnote% OF
- WHEN 0 : name$ = "C"
- WHEN 1 : name$ = "D"
- WHEN 2 : name$ = "E"
- WHEN 3 : name$ = "F"
- WHEN 4 : name$ = "G"
- WHEN 5 : name$ = "A"
- WHEN 6 : name$ = "B"
- OTHERWISE
- ENDCASE
- MOVE hposn%+10,actamppos%(voice%+1)-(numbersheight%+32)
- PRINT name$;array%(startcell%,0,voice%)MOD10
- ENDIF
- :
- REM durations/glissandos
- IF durations$ = "y" THEN
- dur% = (array%(startcell%,1,voice%)DIV10)MOD10^3
- brrr% = array%(startcell%,0,voice%)DIV10^6 : PROCreconvertdur
- IF notehead$ = "big" THEN pointplus% = 16
- IF notehead$ = "small" THEN pointplus% = 24
- IF notehead$ = "vsmall" THEN pointplus% = 28
- point% = (dur%*factor)+hposn%+pointplus%
- thirdphase$ = "n"
- :
- number% = array%(startcell%,2,voice%)DIV10^5
- IF number% = 0 THEN numphases% = 1
- IF number% > 0 AND number% < 100 THEN numphases% = 2
- IF number% > 99 THEN numphases% = 3
- :
- CASE numphases% OF
- :
- WHEN 1 :
- gl% = (array%(startcell%,1,voice%)DIV10^4)MOD10^2
- IF gl% <> 50 THEN
- PROCroundgliss
- LINE hposn%+40,vposn%+4,point%,vposn%+4+gl%
- hp% = ((point%-hposn%)/2)+hposn%
- vp% = vposn%+44+(gl%/2)
- MOVE hp%,vp% : PRINT "gl.";gl1%
- ELSE
- LINE hposn%+40,vposn%+4,point%,vposn%+4
- ENDIF
- :
- WHEN 2 :
- REM extra horizontal point in middle
- ph1% = number% MOD 10^2
- point1% = ((dur%*ph1%/100)*factor)+hposn%+pointplus%
- :
- REM first phase
- gl% = (array%(startcell%,1,voice%)DIV10^4)MOD10^2
- IF gl% <> 50 THEN
- PROCroundgliss
- LINE hposn%+40,vposn%+4,point1%,vposn%+4+gl%
- hp% = ((point1%-hposn%)/2)+hposn%
- vp% = vposn%+44+(gl%/2)
- MOVE hp%,vp% : PRINT "gl.";gl1%
- ELSE
- gl% = 0
- LINE hposn%+40,vposn%+4,point1%,vposn%+4
- ENDIF
- IF envelopedata$ <> "none" THEN
- hp% = point1%-130
- vp% = vposn%-10
- MOVE hp%,vp%
- CASE envelopedata$ OF
- WHEN "percentage" :PRINT ph1%;"%"
- WHEN "marker" : PRINT hp%
- ENDCASE
- ENDIF
- :
- REM second phase
- vposn1% = vposn%+gl%
- gl% = (array%(startcell%,1,voice%)DIV10^6)MOD10^2
- IF gl% <> 50 THEN
- PROCroundgliss
- LINE point1%,vposn1%+4,point%,vposn1%+4+gl%
- hp% = ((point%-point1%)/2)+point1%
- vp% = vposn1%+44+(gl%/2)
- MOVE hp%,vp% : PRINT "gl.";gl1%
- ELSE
- LINE point1%,vposn1%+4,point%,vposn1%+4
- ENDIF
- :
- WHEN 3 :
- REM two extra horizontal points in middle
- ph1% = number% MOD 10^2
- point1% = ((dur%*ph1%/100)*factor)+hposn%+pointplus%
- ph2% = number% DIV 10^2
- point2% = ((dur%*ph2%/100)*factor)+hposn%+pointplus%
- :
- REM first phase
- gl% = (array%(startcell%,1,voice%)DIV10^4)MOD10^2
- IF gl% <> 50 THEN
- PROCroundgliss
- LINE hposn%+40,vposn%+4,point1%,vposn%+4+gl%
- hp% = ((point1%-hposn%)/2)+hposn%
- vp% = vposn%+44+(gl%/2)
- MOVE hp%,vp% : PRINT "gl.";gl1%
- ELSE
- gl% = 0
- LINE hposn%+40,vposn%+4,point1%,vposn%+4
- ENDIF
- IF envelopedata$ <> "none" THEN
- hp% = point1%-130
- vp% = vposn%-10
- MOVE hp%,vp%
- CASE envelopedata$ OF
- WHEN "percentage" :PRINT ph1%;"%"
- WHEN "marker" : PRINT hp%
- ENDCASE
- ENDIF
- :
- REM second phase
- vposn1% = vposn%+gl%
- gl% = (array%(startcell%,1,voice%)DIV10^6)MOD10^2
- IF gl% <> 50 THEN
- PROCroundgliss
- LINE point1%,vposn1%+4,point2%,vposn1%+4+gl%
- hp% = ((point2%-point1%)/2)+point1%
- vp% = vposn1%+44+(gl%/2)
- MOVE hp%,vp% : PRINT "gl.";gl1%
- ELSE
- gl% = 0
- LINE point1%,vposn1%+4,point2%,vposn1%+4
- ENDIF
- IF envelopedata$ <> "none" THEN
- hp% = point2%-130
- vp% = vposn%-10
- MOVE hp%,vp%
- CASE envelopedata$ OF
- WHEN "percentage" :PRINT ph2%;"%"
- WHEN "marker" : PRINT hp%
- ENDCASE
- ENDIF
- :
- REM third phase
- vposn2% = vposn1%+gl%
- gl% = array%(startcell%,1,voice%)DIV10^8
- IF gl% <> 10 THEN
- thirdphase$ = "y" : PROCroundgliss : thirdphase$ = "n"
- LINE point2%,vposn2%+4,point%,vposn2%+4+gl%
- hp% = ((point%-point2%)/2)+point2%
- vp% = vposn2%+44+(gl%/2)
- MOVE hp%,vp% : PRINT "gl.";gl1%
- ELSE
- LINE point2%,vposn2%+4,point%,vposn2%+4
- ENDIF
- :
- ENDCASE
- :
- ENDIF
- :
- REM next block of code added just to print durations
- IF seedurinbts$ = "y" OR seedurinbts$ = "stepped" THEN
- IF seedurinbts$ = "stepped" THEN
- IF lower% = 0 THEN lower% = 23 ELSE lower% = 0
- ENDIF
- IF longscore$ = "y" THEN
- MOVE hposn%,actamppos%(voice%+1)-lower%
- PRINT dur%
- ELSE MOVE hposn%,714+shortamppos%(voice%)-((system%-1)*524)-lower%
- PRINT dur%
- ENDIF
- ENDIF
- IF seedurincrots$ = "y" OR seedurincrots$ = "stepped" THEN
- REM dur = (((dur%/480)*100)DIV1)/100
- dur = (((dur%/(beatfactor%*8))*100)DIV1)/100
- IF seedurincrots$ = "stepped" THEN
- IF lower% = 0 THEN lower% = 23 ELSE lower% = 0
- ENDIF
- IF longscore$ = "y" THEN
- MOVE hposn%,actamppos%(voice%+1)-lower%
- PRINT dur
- ELSE MOVE hposn%,714+shortamppos%(voice%)-((system%-1)*524)-lower%
- PRINT dur
- ENDIF
- ENDIF
- :
- REM amplitudes
- :
- IF amplitudes$ = "y" OR amplitudes$ = "stepped" THEN
- amp$=""
- amp1% = array%(startcell%,1,voice%)MOD10
- amp2% = (array%(startcell%,2,voice%)DIV10^2)MOD10
- amp3% = (array%(startcell%,2,voice%)DIV10^3)MOD10
- amp4% = (array%(startcell%,2,voice%)DIV10^4)MOD10
- FOR something% = 1 TO 4
- IF something% = 1 THEN amp% = amp1%
- IF something% = 2 THEN amp% = amp2%
- IF something% = 3 THEN amp% = amp3%
- IF something% = 4 THEN amp% = amp4%
- CASE amp% OF
- WHEN 0 :
- IF amp1% = 0 AND amp2% = 9 THEN
- amp$ = "" : x% = 22 : y% = 20 : REM releases
- ELSE
- amp$ = "0" : x% = 22 : y% = 20
- ENDIF
- WHEN 1 : amp$ = "ppp" : x% = 8 : y% = 50
- WHEN 2 : amp$ = "pp" : x% = 15 : y% = 35
- WHEN 3 : amp$ = "p" : x% = 22 : y% = 20
- WHEN 4 : amp$ = "mp" : x% = 15 : y% = 35
- WHEN 5 : amp$ = "mf" : x% = 15 : y% = 35
- WHEN 6 : amp$ = "f" : x% = 22 : y% = 20
- WHEN 7 : amp$ = "ff" : x% = 15 : y% = 35
- WHEN 8 : amp$ = "fff" : x% = 8 : y% = 50
- ENDCASE
- IF something% = 1 THEN amp1$ = amp$ : x1% = x% : y1% = y%
- IF something% = 2 THEN amp2$ = amp$ : x2% = x% : y2% = y%
- IF something% = 3 THEN amp3$ = amp$ : x3% = x% : y3% = y%
- IF something% = 4 THEN amp4$ = amp$ : x4% = x% : y4% = y%
- NEXT
- :
- IF amplitudes$ = "stepped" THEN
- IF lower% = 0 THEN lower% = 23 ELSE lower% = 0
- ENDIF
- :
- IF longscore$ = "y" THEN
- MOVE hposn%+x1%,actamppos%(voice%+1)-lower%
- PRINT amp1$
- :
- IF amp2% = 9 AND amp3% <> 0 THEN
- MOVE hposn%+20,(actamppos%(voice%+1)-lower%)-20
- PRINT "+";amp3%
- ENDIF
- :
- ELSE MOVE hposn%+x1%,714+shortamppos%(voice%)-((system%-1)*524)-lower%
- PRINT amp1$
- ENDIF
- :
- dur% = (array%(startcell%,1,voice%)DIV10)MOD10^3
- brrr% = array%(startcell%,0,voice%)DIV10^6 : PROCreconvertdur
- IF notehead$ = "big" THEN pointplus% = 16
- IF notehead$ = "small" THEN pointplus% = 24
- IF notehead$ = "vsmall" THEN pointplus% = 28
- point% = (dur%*factor)+hposn%+pointplus%
- :
- number% = array%(startcell%,2,voice%)DIV10^5
- IF amp2% = 9 THEN numphases% = 0
- IF amp2% <> 9 AND number% = 0 THEN numphases% = 1
- IF number% > 0 AND number% < 100 THEN numphases% = 2
- IF number% > 99 THEN numphases% = 3
- :
- CASE numphases% OF
- :
- WHEN 1 :
- IF amp2% < amp1% THEN
- IF longscore$ = "y" THEN
- LINE hposn%+x1%+y1%,actamppos%(voice%+1)+8,point%-90+(x2%*2),actamppos%(voice%+1)-8
- LINE hposn%+x1%+y1%,actamppos%(voice%+1)-24,point%-90+(x2%*2),actamppos%(voice%+1)-8
- MOVE point%-80+(x2%*2),actamppos%(voice%+1) : PRINT amp2$
- ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)+8,point%-90+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
- LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-24,point%-90+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
- MOVE point%-80+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
- ENDIF
- ENDIF
- IF amp2% > amp1% THEN
- IF longscore$ = "y" THEN
- LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point%-90+(x2%*2),actamppos%(voice%+1)+8
- LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point%-90+(x2%*2),actamppos%(voice%+1)-24
- MOVE point%-80+(x2%*2),actamppos%(voice%+1) : PRINT amp2$
- ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524)+8
- LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524)-24
- MOVE point%-80+(x2%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
- ENDIF
- ENDIF
- :
- WHEN 2 :
- ph1% = number% MOD 10^2
- point1% = ((dur%*ph1%/100)*factor)+hposn%+pointplus%
- :
- REM first phase
- IF amp2% < amp1% THEN
- IF longscore$ = "y" THEN
- LINE hposn%+x1%+y1%,actamppos%(voice%+1)+8,point1%-35+x2%,actamppos%(voice%+1)-8
- LINE hposn%+x1%+y1%,actamppos%(voice%+1)-24,point1%-35+x2%,actamppos%(voice%+1)-8
- MOVE point1%-25+x2%,actamppos%(voice%+1) : PRINT amp2$
- ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)+8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-8
- LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-24,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-8
- MOVE point1%-25+x2%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
- ENDIF
- ENDIF
- IF amp2% > amp1% THEN
- IF longscore$ = "y" THEN
- LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point1%-35+x2%,actamppos%(voice%+1)+8
- LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point1%-35+x2%,actamppos%(voice%+1)-24
- MOVE point1%-25+x2%,actamppos%(voice%+1) : PRINT amp2$
- ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)+8
- LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-24
- MOVE point1%-25+x2%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
- ENDIF
- ENDIF
- :
- REM second phase
- IF amp1% <> amp2% THEN start% = point1%-25+x2%+y2% ELSE start% = point1%
- IF amp3% < amp2% THEN
- IF longscore$ = "y" THEN
- LINE start%,actamppos%(voice%+1)+8,point%-90+(x3%*2),actamppos%(voice%+1)-8
- LINE start%,actamppos%(voice%+1)-24,point%-90+(x3%*2),actamppos%(voice%+1)-8
- MOVE point%-80+(x3%*2),actamppos%(voice%+1) : PRINT amp3$
- ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)+8,point%-90+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
- LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-24,point%-90+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
- MOVE point%-80+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp3$
- ENDIF
- ENDIF
- IF amp3% > amp2% THEN
- IF longscore$ = "y" THEN
- LINE start%,actamppos%(voice%+1)-8,point%-90+(x3%*2),actamppos%(voice%+1)+8
- LINE start%,actamppos%(voice%+1)-8,point%-90+(x3%*2),actamppos%(voice%+1)-24
- MOVE point%-80+(x3%*2),actamppos%(voice%+1) : PRINT amp3$
- ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524)+8
- LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524)-24
- MOVE point%-80+(x3%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp3$
- ENDIF
- ENDIF
- :
- WHEN 3 :
- ph1% = number% MOD 10^2
- point1% = ((dur%*ph1%/100)*factor)+hposn%+pointplus%
- ph2% = number% DIV 10^2
- point2% = ((dur%*ph2%/100)*factor)+hposn%+pointplus%
- :
- REM first phase
- IF amp2% < amp1% THEN
- IF longscore$ = "y" THEN
- LINE hposn%+x1%+y1%,actamppos%(voice%+1)+8,point1%-35+x2%,actamppos%(voice%+1)-8
- LINE hposn%+x1%+y1%,actamppos%(voice%+1)-24,point1%-35+x2%,actamppos%(voice%+1)-8
- MOVE point1%-25+x2%,actamppos%(voice%+1) : PRINT amp2$
- ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)+8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-8
- LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-24,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-8
- MOVE point1%-25+x2%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
- ENDIF
- ENDIF
- IF amp2% > amp1% THEN
- IF longscore$ = "y" THEN
- LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point1%-35+x2%,actamppos%(voice%+1)+8
- LINE hposn%+x1%+y1%,actamppos%(voice%+1)-8,point1%-35+x2%,actamppos%(voice%+1)-24
- MOVE point1%-25+x2%,actamppos%(voice%+1) : PRINT amp2$
- ELSE LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)+8
- LINE hposn%+x1%+y1%,714+shortamppos%(voice%)-((system%-1)*524)-8,point1%-35+x2%,714+shortamppos%(voice%)-((system%-1)*524)-24
- MOVE point1%-25+x2%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp2$
- ENDIF
- ENDIF
- :
- REM second phase
- IF amp1% <> amp2% THEN start% = point1%-25+x2%+y2% ELSE start% = point1%
- IF amp3% < amp2% THEN
- IF longscore$ = "y" THEN
- LINE start%,actamppos%(voice%+1)+8,point2%-35+x3%,actamppos%(voice%+1)-8
- LINE start%,actamppos%(voice%+1)-24,point2%-35+x3%,actamppos%(voice%+1)-8
- MOVE point2%-25+x3%,actamppos%(voice%+1) : PRINT amp3$
- ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)+8,point2%-35+x3%,714+shortamppos%(voice%)-((system%-1)*524)-8
- LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-24,point2%-35+x3%,714+shortamppos%(voice%)-((system%-1)*524)-8
- MOVE point2%-25+x3%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp3$
- ENDIF
- ENDIF
- IF amp3% > amp2% THEN
- IF longscore$ = "y" THEN
- LINE start%,actamppos%(voice%+1)-8,point2%-35+x3%,actamppos%(voice%+1)+8
- LINE start%,actamppos%(voice%+1)-8,point2%-35+x3%,actamppos%(voice%+1)-24
- MOVE point2%-25+x3%,actamppos%(voice%+1) : PRINT amp3$
- ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point2%-35+x3%,714+shortamppos%(voice%)-((system%-1)*524)+8
- LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point2%-35+x3%,714+shortamppos%(voice%)-((system%-1)*524)-24
- MOVE point2%-25+x3%,714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp3$
- ENDIF
- ENDIF
- :
- REM third phase
- IF amp2% <> amp3% THEN start% = point2%-25+x3%+y3% ELSE start% = point2%
- IF amp4% < amp3% THEN
- IF longscore$ = "y" THEN
- LINE start%,actamppos%(voice%+1)+8,point%-90+(x4%*2),actamppos%(voice%+1)-8
- LINE start%,actamppos%(voice%+1)-24,point%-90+(x4%*2),actamppos%(voice%+1)-8
- MOVE point%-80+(x4%*2),actamppos%(voice%+1) : PRINT amp4$
- ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)+8,point%-90+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
- LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-24,point%-90+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524)-8
- MOVE point%-80+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp4$
- ENDIF
- ENDIF
- IF amp4% > amp3% THEN
- IF longscore$ = "y" THEN
- LINE start%,actamppos%(voice%+1)-8,point%-90+(x4%*2),actamppos%(voice%+1)+8
- LINE start%,actamppos%(voice%+1)-8,point%-90+(x4%*2),actamppos%(voice%+1)-24
- MOVE point%-80+(x4%*2),actamppos%(voice%+1) : PRINT amp4$
- ELSE LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524)+8
- LINE start%,714+shortamppos%(voice%)-((system%-1)*524)-8,point%-90+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524)-24
- MOVE point%-80+(x4%*2),714+shortamppos%(voice%)-((system%-1)*524) : PRINT amp4$
- ENDIF
- ENDIF
- :
- ENDCASE
- :
- ENDIF
- :
- :
- REM ledger lines
- IF staves$ = "y" THEN
- IF notehead$ = "big" THEN
- lend% = -12 : rend% = 44
- ENDIF
- IF notehead$ = "small" THEN
- lend% = 8 : rend% = 40
- ENDIF
- IF notehead$ = "vsmall" THEN
- lend% = 18 : rend% = 38
- ENDIF
- :
- IF longscore$ = "n" THEN
- IF value% = 858 THEN
- IF vposn% >= 954 THEN
- numledgers% = (vposn%-938)/16
- FOR ct% = 1 TO numledgers%
- LINE hposn%+lend%,954+((ct%-1)*16),hposn%+rend%,954+((ct%-1)*16)
- NEXT
- ENDIF
- IF vposn% = 858 THEN LINE hposn%+lend%,858,hposn%+rend%,858
- ENDIF
- IF value% = 586 THEN
- IF vposn% <= 714 THEN
- numledgers% = (730-vposn%)/16
- FOR ct% = 1 TO numledgers%
- LINE hposn%+lend%,714-((ct%-1)*16),hposn%+rend%,714-((ct%-1)*16)
- NEXT
- ENDIF
- ENDIF
- IF value% = 334 THEN
- IF vposn% >= 430 THEN
- numledgers% = (vposn%-414)/16
- FOR ct% = 1 TO numledgers%
- LINE hposn%+lend%,430+((ct%-1)*16),hposn%+rend%,430+((ct%-1)*16)
- NEXT
- ENDIF
- IF vposn% = 334 THEN LINE hposn%+lend%,334,hposn%+rend%,334
- ENDIF
- IF value% = 62 THEN
- IF vposn% <= 190 THEN
- numledgers% = (206-vposn%)/16
- FOR ct% = 1 TO numledgers%
- LINE hposn%+lend%,190-((ct%-1)*16),hposn%+rend%,190-((ct%-1)*16)
- NEXT
- ENDIF
- ENDIF
- ENDIF
- :
- IF longscore$ = "y" THEN
- CASE MID$(clefcombination$,ledgerkey%,1) OF
- WHEN "T" : num% = 320
- WHEN "P" : num% = 376
- WHEN "B" : num% = 224
- WHEN "D" : num% = 168
- ENDCASE
- IF vposn% - value% >= num% THEN
- numledgers% = ((vposn%-value%)-(num%-16))/16
- FOR ct% = 1 TO numledgers%
- LINE hposn% + lend%,value%+(num%-16)+(16*ct%),hposn%+rend%,value%+(num%-16)+(16*ct%)
- NEXT
- ENDIF
- IF vposn%-value% <= (num%-96) THEN
- numledgers% = ((num%-80)-(vposn%-value%))/16
- FOR ct% = 1 TO numledgers%
- LINE hposn%+lend%,(value%+(num%-80))-(16*ct%),hposn%+rend%,(value%+(num%-80))-(16*ct%)
- NEXT
- ENDIF
- ENDIF
- :
- ENDIF : REM applies to 'IF staves$ = "y" '
- :
- REM stems
- IF stems$ = "y" THEN
- IF longscore$ = "n" THEN
- IF notehead$ = "big" THEN
- LINE hposn%+30,vposn%,hposn%+30,938+shortbeamposn%(voice%)-(524*(system%-1))
- ENDIF
- LINE hposn%+32,vposn%,hposn%+32,938+shortbeamposn%(voice%)-(524*(system%-1))
- ENDIF
- :
- IF longscore$ = "y" THEN
- IF notehead$ = "big" THEN
- LINE hposn%+30,vposn%,hposn%+30,actbeamposn%(count%-startv%)
- ENDIF
- LINE hposn%+32,vposn%,hposn%+32,actbeamposn%(count%-startv%)
- ENDIF
- ENDIF
- :
- REM accidentals
- IF accidentals$ = "y" THEN
- acc% = (array%(startcell%,0,voice%)MOD100)DIV10
- IF notehead$ = "big" THEN
- CASE acc% OF
- WHEN 9 : REM sharp
- LINE hposn%-30,vposn%-24,hposn%-30,vposn%+24
- LINE hposn%-28,vposn%-24,hposn%-28,vposn%+24
- LINE hposn%-16,vposn%-24,hposn%-16,vposn%+24
- LINE hposn%-14,vposn%-24,hposn%-14,vposn%+24
- LINE hposn%-36,vposn%+4,hposn%-8,vposn%+12
- LINE hposn%-36,vposn%-12,hposn%-8,vposn%-4
- WHEN 8 : REM 3/8 sharp
- LINE hposn%-30,vposn%-24,hposn%-30,vposn%+24
- LINE hposn%-28,vposn%-24,hposn%-28,vposn%+24
- LINE hposn%-16,vposn%-24,hposn%-16,vposn%+24
- LINE hposn%-14,vposn%-24,hposn%-14,vposn%+24
- LINE hposn%-36,vposn%+4,hposn%-8,vposn%+12
- LINE hposn%-36,vposn%-12,hposn%-8,vposn%-4
- LINE hposn%-20,vposn%-20,hposn%-16,vposn%-28
- LINE hposn%-14,vposn%-28,hposn%-10,vposn%-20
- LINE hposn%-18,vposn%-20,hposn%-16,vposn%-28
- LINE hposn%-14,vposn%-28,hposn%-12,vposn%-20
- WHEN 1 : REM flat
- LINE hposn%-28,vposn%-12,hposn%-28,vposn%+28
- LINE hposn%-26,vposn%-12,hposn%-26,vposn%+28
- LINE hposn%-20,vposn%+8,hposn%-10,vposn%+8
- LINE hposn%-24,vposn%+4,hposn%-22,vposn%+4
- LINE hposn%-12,vposn%+4,hposn%-8,vposn%+4
- LINE hposn%-28,vposn%,hposn%-26,vposn%
- LINE hposn%-12,vposn%,hposn%-8,vposn%
- LINE hposn%-16,vposn%-4,hposn%-12,vposn%-4
- LINE hposn%-28,vposn%-8,hposn%-18,vposn%-8
- WHEN 2 : REM 3/8 flat
- LINE hposn%-28,vposn%-12,hposn%-28,vposn%+28
- LINE hposn%-26,vposn%-12,hposn%-26,vposn%+28
- LINE hposn%-20,vposn%+8,hposn%-10,vposn%+8
- LINE hposn%-24,vposn%+4,hposn%-22,vposn%+4
- LINE hposn%-12,vposn%+4,hposn%-8,vposn%+4
- LINE hposn%-28,vposn%,hposn%-26,vposn%
- LINE hposn%-12,vposn%,hposn%-8,vposn%
- LINE hposn%-16,vposn%-4,hposn%-12,vposn%-4
- LINE hposn%-28,vposn%-8,hposn%-18,vposn%-8
- LINE hposn%-32,vposn%+20,hposn%-28,vposn%+28
- LINE hposn%-26,vposn%+28,hposn%-22,vposn%+20
- LINE hposn%-30,vposn%+20,hposn%-28,vposn%+28
- LINE hposn%-26,vposn%+28,hposn%-24,vposn%+20
- WHEN 7 : REM quartersharp
- LINE hposn%-18,vposn%+24,hposn%-18,vposn%-24
- LINE hposn%-16,vposn%+24,hposn%-16,vposn%-24
- LINE hposn%-26,vposn%+4,hposn%-8,vposn%+12
- LINE hposn%-26,vposn%-12,hposn%-8,vposn%-4
- WHEN 3 : REM quarterflat
- LINE hposn%-12,vposn%-12,hposn%-12,vposn%+28
- LINE hposn%-10,vposn%-12,hposn%-10,vposn%+28
- LINE hposn%-28,vposn%+8,hposn%-18,vposn%+8
- LINE hposn%-30,vposn%+4,hposn%-26,vposn%+4
- LINE hposn%-16,vposn%+4,hposn%-14,vposn%+4
- LINE hposn%-30,vposn%,hposn%-26,vposn%
- LINE hposn%-26,vposn%-4,hposn%-22,vposn%-4
- LINE hposn%-20,vposn%-8,hposn%-10,vposn%-8
- WHEN 5 : REM natural
- LINE hposn%-30,vposn%+24,hposn%-30,vposn%-8
- LINE hposn%-28,vposn%+24,hposn%-28,vposn%-8
- LINE hposn%-12,vposn%+8,hposn%-12,vposn%-24
- LINE hposn%-10,vposn%+8,hposn%-10,vposn%-24
- LINE hposn%-30,vposn%+4,hposn%-24,vposn%+4
- LINE hposn%-22,vposn%+8,hposn%-18,vposn%+8
- LINE hposn%-16,vposn%+12,hposn%-10,vposn%+12
- LINE hposn%-30,vposn%-12,hposn%-24,vposn%-12
- LINE hposn%-22,vposn%-8,hposn%-18,vposn%-8
- LINE hposn%-16,vposn%-4,hposn%-10,vposn%-4
- WHEN 4 : REM 1/8 flat
- LINE hposn%-30,vposn%+24,hposn%-30,vposn%-8
- LINE hposn%-28,vposn%+24,hposn%-28,vposn%-8
- LINE hposn%-12,vposn%+8,hposn%-12,vposn%-24
- LINE hposn%-10,vposn%+8,hposn%-10,vposn%-24
- LINE hposn%-30,vposn%+4,hposn%-24,vposn%+4
- LINE hposn%-22,vposn%+8,hposn%-18,vposn%+8
- LINE hposn%-16,vposn%+12,hposn%-10,vposn%+12
- LINE hposn%-30,vposn%-12,hposn%-24,vposn%-12
- LINE hposn%-22,vposn%-8,hposn%-18,vposn%-8
- LINE hposn%-16,vposn%-4,hposn%-10,vposn%-4
- LINE hposn%-16,vposn%-20,hposn%-12,vposn%-28
- LINE hposn%-10,vposn%-28,hposn%-6,vposn%-20
- LINE hposn%-14,vposn%-20,hposn%-12,vposn%-28
- LINE hposn%-10,vposn%-28,hposn%-8,vposn%-20
- WHEN 6 : REM 1/8 sharp
- LINE hposn%-30,vposn%+24,hposn%-30,vposn%-8
- LINE hposn%-28,vposn%+24,hposn%-28,vposn%-8
- LINE hposn%-12,vposn%+8,hposn%-12,vposn%-24
- LINE hposn%-10,vposn%+8,hposn%-10,vposn%-24
- LINE hposn%-30,vposn%+4,hposn%-24,vposn%+4
- LINE hposn%-22,vposn%+8,hposn%-18,vposn%+8
- LINE hposn%-16,vposn%+12,hposn%-10,vposn%+12
- LINE hposn%-30,vposn%-12,hposn%-24,vposn%-12
- LINE hposn%-22,vposn%-8,hposn%-18,vposn%-8
- LINE hposn%-16,vposn%-4,hposn%-10,vposn%-4
- LINE hposn%-34,vposn%+20,hposn%-30,vposn%+28
- LINE hposn%-32,vposn%+20,hposn%-30,vposn%+28
- LINE hposn%-26,vposn%+20,hposn%-28,vposn%+28
- LINE hposn%-24,vposn%+20,hposn%-28,vposn%+28
- ENDCASE
- ENDIF
- IF notehead$ = "vsmall" THEN
- CASE acc% OF
- WHEN 5 : REM natural
- LINE hposn%+12,vposn%+24,hposn%+12,vposn%-4
- LINE hposn%+20,vposn%+4,hposn%+20,vposn%-24
- LINE hposn%+12,vposn%+4,hposn%+20,vposn%+8
- LINE hposn%+12,vposn%-8,hposn%+20,vposn%-4
- WHEN 6 : REM 1/8 sharp
- LINE hposn%+12,vposn%+24,hposn%+12,vposn%-4
- LINE hposn%+20,vposn%+4,hposn%+20,vposn%-24
- LINE hposn%+12,vposn%+4,hposn%+20,vposn%+8
- LINE hposn%+12,vposn%-8,hposn%+20,vposn%-4
- LINE hposn%+10,vposn%+20,hposn%+12,vposn%+28
- LINE hposn%+14,vposn%+20,hposn%+12,vposn%+28
- LINE hposn%+8,vposn%+20,hposn%+12,vposn%+28
- LINE hposn%+16,vposn%+20,hposn%+12,vposn%+28
- WHEN 9 : REM sharp
- LINE hposn%+12,vposn%+24,hposn%+12,vposn%-24
- LINE hposn%+18,vposn%+24,hposn%+18,vposn%-24
- LINE hposn%+10,vposn%+4,hposn%+20,vposn%+8
- LINE hposn%+10,vposn%-8,hposn%+20,vposn%-4
- WHEN 8 : REM 3/8 sharp
- LINE hposn%+12,vposn%+24,hposn%+12,vposn%-24
- LINE hposn%+18,vposn%+24,hposn%+18,vposn%-24
- LINE hposn%+10,vposn%+4,hposn%+20,vposn%+8
- LINE hposn%+10,vposn%-8,hposn%+20,vposn%-4
- LINE hposn%+14,vposn%-20,hposn%+18,vposn%-28
- LINE hposn%+16,vposn%-20,hposn%+18,vposn%-28
- LINE hposn%+20,vposn%-20,hposn%+18,vposn%-28
- LINE hposn%+22,vposn%-20,hposn%+18,vposn%-28
- WHEN 4 : REM 1/8 flat
- LINE hposn%+12,vposn%+24,hposn%+12,vposn%-4
- LINE hposn%+20,vposn%+4,hposn%+20,vposn%-24
- LINE hposn%+12,vposn%+4,hposn%+20,vposn%+8
- LINE hposn%+12,vposn%-8,hposn%+20,vposn%-4
- LINE hposn%+16,vposn%-20,hposn%+20,vposn%-28
- LINE hposn%+18,vposn%-20,hposn%+20,vposn%-28
- LINE hposn%+22,vposn%-20,hposn%+20,vposn%-28
- LINE hposn%+24,vposn%-20,hposn%+20,vposn%-28
- WHEN 7 : REM quartersharp
- LINE hposn%+18,vposn%+24,hposn%+18,vposn%-24
- LINE hposn%+16,vposn%+4,hposn%+20,vposn%+8
- LINE hposn%+16,vposn%-8,hposn%+20,vposn%-4
- WHEN 2 : REM 3/8 flat
- LINE hposn%+12,vposn%+28,hposn%+12,vposn%-12
- LINE hposn%+16,vposn%+8,hposn%+18,vposn%+8
- LINE hposn%+14,vposn%+4,hposn%+14,vposn%+4
- LINE hposn%+20,vposn%+4,hposn%+20,vposn%+4
- LINE hposn%+20,vposn%,hposn%+20,vposn%
- LINE hposn%+18,vposn%-4,hposn%+18,vposn%-4
- LINE hposn%+12,vposn%-8,hposn%+16,vposn%-8
- LINE hposn%+8,vposn%+20,hposn%+12,vposn%+28
- LINE hposn%+10,vposn%+20,hposn%+12,vposn%+28
- LINE hposn%+14,vposn%+20,hposn%+12,vposn%+28
- LINE hposn%+16,vposn%+20,hposn%+12,vposn%+28
- WHEN 1 : REM flat
- LINE hposn%+12,vposn%+28,hposn%+12,vposn%-12
- LINE hposn%+16,vposn%+8,hposn%+18,vposn%+8
- LINE hposn%+14,vposn%+4,hposn%+14,vposn%+4
- LINE hposn%+20,vposn%+4,hposn%+20,vposn%+4
- LINE hposn%+20,vposn%,hposn%+20,vposn%
- LINE hposn%+18,vposn%-4,hposn%+18,vposn%-4
- LINE hposn%+12,vposn%-8,hposn%+16,vposn%-8
- WHEN 3 : REM quarterflat
- LINE hposn%+20,vposn%+28,hposn%+20,vposn%-12
- LINE hposn%+14,vposn%+8,hposn%+16,vposn%+8
- LINE hposn%+12,vposn%+4,hposn%+12,vposn%+4
- LINE hposn%+18,vposn%+4,hposn%+18,vposn%+4
- LINE hposn%+12,vposn%,hposn%+12,vposn%
- LINE hposn%+14,vposn%-4,hposn%+14,vposn%-4
- LINE hposn%+16,vposn%-8,hposn%+20,vposn%-8
- ENDCASE
- inf% = (array%(startcell%,2,voice%)MOD100)-50
- IF inf% < 0 THEN
- MOVE hposn%-125,vposn%-30 : PRINT inf%;"c"
- ENDIF
- IF inf% > 0 THEN
- MOVE hposn%-16,vposn%+45 : PRINT "+";inf%;"c"
- ENDIF
- ENDIF
- :
- IF notehead$ = "small" THEN
- CASE acc% OF
- WHEN 1 : REM flat
- LINE hposn%-2,vposn%+28,hposn%-2,vposn%-12
- LINE hposn%+4,vposn%+8,hposn%+8,vposn%+8
- LINE hposn%,vposn%+4,hposn%+2,vposn%+4
- LINE hposn%+8,vposn%+4,hposn%+10,vposn%+4
- LINE hposn%+8,vposn%,hposn%+10,vposn%
- LINE hposn%+4,vposn%-4,hposn%+6,vposn%-4
- LINE hposn%-2,vposn%-8,hposn%+2,vposn%-8
- WHEN 2 : REM 3/8 flat
- LINE hposn%-2,vposn%+28,hposn%-2,vposn%-12
- LINE hposn%+4,vposn%+8,hposn%+8,vposn%+8
- LINE hposn%,vposn%+4,hposn%+2,vposn%+4
- LINE hposn%+8,vposn%+4,hposn%+10,vposn%+4
- LINE hposn%+8,vposn%,hposn%+10,vposn%
- LINE hposn%+4,vposn%-4,hposn%+6,vposn%-4
- LINE hposn%-2,vposn%-8,hposn%+2,vposn%-8
- LINE hposn%-6,vposn%+20,hposn%-2,vposn%+28
- LINE hposn%-4,vposn%+20,hposn%-2,vposn%+28
- LINE hposn%,vposn%+20,hposn%-2,vposn%+28
- LINE hposn%+2,vposn%+20,hposn%-2,vposn%+28
- WHEN 3 : REM quarterflat
- LINE hposn%+10,vposn%+28,hposn%+10,vposn%-12
- LINE hposn%,vposn%+8,hposn%+4,vposn%+8
- LINE hposn%-2,vposn%+4,hposn%,vposn%+4
- LINE hposn%+6,vposn%+4,hposn%+8,vposn%+4
- LINE hposn%-2,vposn%,hposn%,vposn%
- LINE hposn%+2,vposn%-4,hposn%+4,vposn%-4
- LINE hposn%+6,vposn%-8,hposn%+10,vposn%-8
- WHEN 5 : REM natural
- LINE hposn%,vposn%+24,hposn%,vposn%-4
- LINE hposn%+10,vposn%+4,hposn%+10,vposn%-24
- LINE hposn%,vposn%+4,hposn%+10,vposn%+8
- LINE hposn%,vposn%-8,hposn%+10,vposn%-4
- WHEN 6 : REM 1/8 sharp
- LINE hposn%,vposn%+24,hposn%,vposn%-4
- LINE hposn%+10,vposn%+4,hposn%+10,vposn%-24
- LINE hposn%,vposn%+4,hposn%+10,vposn%+8
- LINE hposn%,vposn%-8,hposn%+10,vposn%-4
- LINE hposn%-4,vposn%+20,hposn%,vposn%+28
- LINE hposn%-2,vposn%+20,hposn%,vposn%+28
- LINE hposn%+2,vposn%+20,hposn%,vposn%+28
- LINE hposn%+4,vposn%+20,hposn%,vposn%+28
- WHEN 7 : REM quartersharp
- LINE hposn%+6,vposn%+24,hposn%+6,vposn%-24
- LINE hposn%+2,vposn%+4,hposn%+10,vposn%+8
- LINE hposn%+2,vposn%-8,hposn%+10,vposn%-4
- WHEN 4 : REM 1/8 flat
- LINE hposn%,vposn%+24,hposn%,vposn%-4
- LINE hposn%+10,vposn%+4,hposn%+10,vposn%-24
- LINE hposn%,vposn%+4,hposn%+10,vposn%+8
- LINE hposn%,vposn%-8,hposn%+10,vposn%-4
- LINE hposn%+6,vposn%-20,hposn%+10,vposn%-28
- LINE hposn%+8,vposn%-20,hposn%+10,vposn%-28
- LINE hposn%+12,vposn%-20,hposn%+10,vposn%-28
- LINE hposn%+14,vposn%-20,hposn%+10,vposn%-28
- WHEN 9 : REM sharp
- LINE hposn%-2,vposn%+24,hposn%-2,vposn%-24
- LINE hposn%+6,vposn%+24,hposn%+6,vposn%-24
- LINE hposn%-6,vposn%+4,hposn%+10,vposn%+8
- LINE hposn%-6,vposn%-8,hposn%+10,vposn%-4
- WHEN 8 : REM 3/8 sharp
- LINE hposn%-2,vposn%+24,hposn%-2,vposn%-24
- LINE hposn%+6,vposn%+24,hposn%+6,vposn%-24
- LINE hposn%-6,vposn%+4,hposn%+10,vposn%+8
- LINE hposn%-6,vposn%-8,hposn%+10,vposn%-4
- LINE hposn%+2,vposn%-20,hposn%+6,vposn%-28
- LINE hposn%+4,vposn%-20,hposn%+6,vposn%-28
- LINE hposn%+8,vposn%-20,hposn%+6,vposn%-28
- LINE hposn%+10,vposn%-20,hposn%+6,vposn%-28
- ENDCASE
- :
- ENDIF
- ENDIF
- startcell% += 1
- IF longscore$ = "n" THEN div% = 2 ELSE div% = 1
- :
- UNTIL (array%(startcell%,0,voice%) DIV10^6) >= ((numbars%/div%)+firstbar%) OR array%(startcell%,0,voice%) = 0
- ENDIF
- :
- IF stems$ = "y" THEN PROCrhythmdisplay
- :
- IF longscore$ = "y" THEN ledgerkey% += EVAL(MID$(stavecombination$,count%-startv%+1,1))
- :
- NEXT
- :
- NEXT
- :
- VDU 4 : OFF : box$ = "n" : biga% = 10^5 : bigb% = 0 : bigc% = 0 : bigd% = 10^5
- IF printing$ = "n" AND preplaydisplay$ = "n" THEN PROCpostdisplay
- ENDPROC
- :
- REM*************************************************
- :
- DEF PROCroundgliss
- :
- IF thirdphase$ = "n" THEN gl1% = 50-gl% ELSE gl1% = 10-gl%
- gl% = gl1%*1.1665 : gl% = (gl%DIV4)*4
- IF gl% = 0 THEN
- IF gl1% > 0 THEN gl% = 4 ELSE gl% = -4
- ENDIF
- IF gl% < 0 THEN g% = gl%*-1 ELSE g% = gl%
- rem = g%/8
- IF (rem*10)MOD10 <> 0 THEN
- IF gl% > 0 THEN gl% += 4 ELSE gl% -= 4
- ENDIF
- :
- ENDPROC
- :
- REM**************************************************
- :
- DEF PROCpostdisplay
- :
- distort$ = "OFF"
- REM in case of Escqping from a distort routine before switching it off
- :
- OFF
- CASE GET$ OF
- :
- WHEN "i" :
- PROCwindow(20,69,60,55)
- CLS : PRINT'" Copy-extract or move-extract? (C/M) "
- CASE GET$ OF
- WHEN "C","c" : copymove$ = "EC"
- OTHERWISE copymove$ = "EM"
- ENDCASE
- savevoice$ = "N"
- PROCcopy2
- :
- WHEN "{" : quickcopy$ = "y" : PROCdisplay
- WHEN "}" : quickcopy$ = "n" : PROCdisplay
- WHEN "¬" :
- PROCwindow(20,69,60,55) : CLS
- INPUT'" Display from which voice "startv%
- PROCdisplay
- :
- WHEN "`" :
- distort$ = "ON" : distortpara$ = "attacks" : ON
- PROCwindow(20,69,60,55) : CLS : OFF :
- incre$ = INKEY$(50)
- IF incre$ = "`" THEN
- distortpara$ = "pitches"
- ENDIF
- PROCcopy
- :
- WHEN "+" :
- numvoices% = numparts%
- FOR count% = 1 TO numvoices%
- displayvoices%(count%) = 1 + count% - 1
- holddisplay%(count%) = 1 + count% - 1
- NEXT
- holdnum% = numvoices%
- PROCdisplay
- :
- WHEN "!" : copydownwards% = 1 :
- IF addten$ = "y" THEN copydownwards% +=10
- IF addten$ = "twenty" THEN copydownwards% += 20
- incre$ = INKEY$(downwardsspeed%)
- IF incre$ <> "" THEN
- CASE incre$ OF
- WHEN "!" : downby% = 1
- WHEN """" : downby% = 2
- WHEN "£" : downby% = 3
- WHEN "$" : downby% = 4
- WHEN "%" : downby% = 5
- WHEN "^" : downby% = 6
- WHEN "&" : downby% = 7
- WHEN "*" : downby% = 8
- WHEN "(" : downby% = 9
- WHEN ")" : downby% = 10
- ENDCASE
- ELSE downby% = 1
- ENDIF
- PROCcopydownwards
- WHEN """" : copydownwards% = 2 :
- IF addten$ = "y" THEN copydownwards% +=10
- IF addten$ = "twenty" THEN copydownwards% +=20
- incre$ = INKEY$(downwardsspeed%)
- IF incre$ <> "" THEN
- CASE incre$ OF
- WHEN "!" : downby% = 1
- WHEN """" : downby% = 2
- WHEN "£" : downby% = 3
- WHEN "$" : downby% = 4
- WHEN "%" : downby% = 5
- WHEN "^" : downby% = 6
- WHEN "&" : downby% = 7
- WHEN "*" : downby% = 8
- WHEN "(" : downby% = 9
- ENDCASE
- ELSE downby% = 1
- ENDIF
- PROCcopydownwards
- WHEN "£" : copydownwards% = 3 :
- IF addten$ = "y" THEN copydownwards% +=10
- IF addten$ = "twenty" THEN copydownwards% +=20
- incre$ = INKEY$(downwardsspeed%)
- IF incre$ <> "" THEN
- CASE incre$ OF
- WHEN "!" : downby% = 1
- WHEN """" : downby% = 2
- WHEN "£" : downby% = 3
- WHEN "$" : downby% = 4
- WHEN "%" : downby% = 5
- WHEN "^" : downby% = 6
- WHEN "&" : downby% = 7
- WHEN "*" : downby% = 8
- WHEN "(" : downby% = 9
- ENDCASE
- ELSE downby% = 1
- ENDIF
- PROCcopydownwards
- WHEN "$" : copydownwards% = 4 :
- IF addten$ = "y" THEN copydownwards% +=10
- IF addten$ = "twenty" THEN copydownwards% +=20
- incre$ = INKEY$(downwardsspeed%)
- IF incre$ <> "" THEN
- CASE incre$ OF
- WHEN "!" : downby% = 1
- WHEN """" : downby% = 2
- WHEN "£" : downby% = 3
- WHEN "$" : downby% = 4
- WHEN "%" : downby% = 5
- WHEN "^" : downby% = 6
- WHEN "&" : downby% = 7
- WHEN "*" : downby% = 8
- WHEN "(" : downby% = 9
- ENDCASE
- ELSE downby% = 1
- ENDIF
- PROCcopydownwards
- WHEN "%" : copydownwards% = 5 :
- IF addten$ = "y" THEN copydownwards% +=10
- IF addten$ = "twenty" THEN copydownwards% +=20
- incre$ = INKEY$(downwardsspeed%)
- IF incre$ <> "" THEN
- CASE incre$ OF
- WHEN "!" : downby% = 1
- WHEN """" : downby% = 2
- WHEN "£" : downby% = 3
- WHEN "$" : downby% = 4
- WHEN "%" : downby% = 5
- WHEN "^" : downby% = 6
- WHEN "&" : downby% = 7
- WHEN "*" : downby% = 8
- WHEN "(" : downby% = 9
- ENDCASE
- ELSE downby% = 1
- ENDIF
- PROCcopydownwards
- WHEN "^" : copydownwards% = 6 :
- IF addten$ = "y" THEN copydownwards% +=10
- IF addten$ = "twenty" THEN copydownwards% +=20
- incre$ = INKEY$(downwardsspeed%)
- IF incre$ <> "" THEN
- CASE incre$ OF
- WHEN "!" : downby% = 1
- WHEN """" : downby% = 2
- WHEN "£" : downby% = 3
- WHEN "$" : downby% = 4
- WHEN "%" : downby% = 5
- WHEN "^" : downby% = 6
- WHEN "&" : downby% = 7
- WHEN "*" : downby% = 8
- WHEN "(" : downby% = 9
- ENDCASE
- ELSE downby% = 1
- ENDIF
- PROCcopydownwards
- WHEN "&" : copydownwards% = 7 :
- IF addten$ = "y" THEN copydownwards% +=10
- IF addten$ = "twenty" THEN copydownwards% +=20
- incre$ = INKEY$(downwardsspeed%)
- IF incre$ <> "" THEN
- CASE incre$ OF
- WHEN "!" : downby% = 1
- WHEN """" : downby% = 2
- WHEN "£" : downby% = 3
- WHEN "$" : downby% = 4
- WHEN "%" : downby% = 5
- WHEN "^" : downby% = 6
- WHEN "&" : downby% = 7
- WHEN "*" : downby% = 8
- WHEN "(" : downby% = 9
- ENDCASE
- ELSE downby% = 1
- ENDIF
- PROCcopydownwards
- WHEN "*" : copydownwards% = 8 :
- IF addten$ = "y" THEN copydownwards% +=10
- IF addten$ = "twenty" THEN copydownwards% +=20
- incre$ = INKEY$(downwardsspeed%)
- IF incre$ <> "" THEN
- CASE incre$ OF
- WHEN "!" : downby% = 1
- WHEN """" : downby% = 2
- WHEN "£" : downby% = 3
- WHEN "$" : downby% = 4
- WHEN "%" : downby% = 5
- WHEN "^" : downby% = 6
- WHEN "&" : downby% = 7
- WHEN "*" : downby% = 8
- WHEN "(" : downby% = 9
- ENDCASE
- ELSE downby% = 1
- ENDIF
- PROCcopydownwards
- WHEN "(" : copydownwards% = 9 :
- IF addten$ = "y" THEN copydownwards% +=10
- IF addten$ = "twenty" THEN copydownwards% +=20
- incre$ = INKEY$(downwardsspeed%)
- IF incre$ <> "" THEN
- CASE incre$ OF
- WHEN "!" : downby% = 1
- WHEN """" : downby% = 2
- WHEN "£" : downby% = 3
- WHEN "$" : downby% = 4
- WHEN "%" : downby% = 5
- WHEN "^" : downby% = 6
- WHEN "&" : downby% = 7
- WHEN "*" : downby% = 8
- WHEN "(" : downby% = 9
- ENDCASE
- ELSE downby% = 1
- ENDIF
- PROCcopydownwards
- WHEN ")" : copydownwards% = 10 :
- IF addten$ = "y" THEN copydownwards% +=10
- IF addten$ = "twenty" THEN copydownwards% +=20
- incre$ = INKEY$(downwardsspeed%)
- IF incre$ <> "" THEN
- CASE incre$ OF
- WHEN "!" : downby% = 1
- WHEN """" : downby% = 2
- WHEN "£" : downby% = 3
- WHEN "$" : downby% = 4
- WHEN "%" : downby% = 5
- WHEN "^" : downby% = 6
- WHEN "&" : downby% = 7
- WHEN "*" : downby% = 8
- WHEN "(" : downby% = 9
- ENDCASE
- ELSE downby% = 1
- ENDIF
- PROCcopydownwards
- :
- WHEN "c" : PROCincrementcalc
- WHEN "k" : ON : PROCkeyboardshortcuts
- WHEN "I" : copymove$ = "C" : savevoice$ = "N" : PROCwindow(20,69,60,55) : PROCimportvoice
- WHEN "0",")" : PROCseriesattacks
- WHEN "a" : PROCfunctionprelude
- WHEN "m" : ON : PROCawait
- WHEN "n" : ON : rerun$ = "n" : PROCrandomnumber
- WHEN "N" : ON : rerun$ = "y" : PROCrandomnumber
- WHEN "o" : ON : PROCdisplaysubmenu
- WHEN "O" : deleteone$ = "top" : PROCdelete
- WHEN "K" : deleteone$ = "middle" : PROCdelete
- WHEN "M" : deleteone$ = "bottom" : PROCdelete
- WHEN "r" : play$ = "replay" : PROCplay
- WHEN "u" : ON : PROCseriesdurations
- WHEN "G", "g" : ON : numdurations% = 111 : PROCdurationsbetween
- WHEN "\" : ON : PROCshortmove
- WHEN "|" : ON : PROCshortmoveone
- WHEN "y" : ON : PROCseriespitches
- WHEN "Y" :
- IF addpitches$ = "y" THEN
- PROCwindow(20,69,60,55)
- ON
- CLS
- PROCinsertpitches
- ELSE
- voix% = 1 : son% = 5 : PROCedit
- ENDIF
- WHEN "l" : ON : PROCseriesamplitudes
- WHEN "J","j" : ON : PROCseriesenvelopes
- WHEN "h" : ON : PROCwindow(20,57,74,55)
- PRINT'" Have you allocated at least 260K for system sprites?"
- CASE GET$ OF
- WHEN "N","n" : PROCdisplay
- WHEN "Y","y" :
- printing$ = "y" : printno% += 1 : PROCdisplay
- MOVE 0,0
- MOVE 1800,1223
- *SGet mysprite
- OSCLI "SSave HostFS::HardDisc4.$.CAC.Printing.print"+STR$(printno%)
- printing$ = "n" : PROCdisplay
- ENDCASE
- WHEN "v" : startv% += updisplay%
- incre$ = INKEY$(vertscroll%)
- IF incre$ <> "" THEN
- CASE incre$ OF
- WHEN "V","v" :
- IF screenmovesby% = 10 THEN startv%+=9 ELSE startv%+=2
- WHEN "0" : startv%+=49
- OTHERWISE startv% += EVAL(incre$)-1
- ENDCASE
- ENDIF
- IF startv% > (numvoices%-lastcount%) THEN startv%= numvoices%-lastcount%
- PROCdisplay
- WHEN "6" :
- startv% -= updisplay%
- decre$ = INKEY$(vertscroll%)
- IF decre$ <> "" THEN
- CASE decre$ OF
- WHEN "6" :
- IF screenmovesby% = 10 THEN startv%-=9 ELSE startv%-=2
- WHEN "0" : startv%-=49
- OTHERWISE startv% -= EVAL(decre$)-1
- ENDCASE
- ENDIF
- IF startv% < 1 THEN startv% = 1
- PROCdisplay
- WHEN "." : startbar% += 1
- incre$ = INKEY$(horizscroll%)
- IF incre$ <> "" THEN
- IF incre$ = ">" OR incre$ = "." THEN startbar% += numbars%-1 ELSE startbar% += EVAL(incre$)-1
- ENDIF
- requestedend% = startbar% + numbars%
- IF requestedend% > nobars% THEN startbar% -= (requestedend%-nobars%)
- PROCdisplay
- WHEN "," : startbar% -= 1
- decre$ = INKEY$(horizscroll%)
- IF decre$ <> "" THEN
- IF decre$ = "<" OR decre$ = "," THEN startbar% -= numbars%-1 ELSE startbar% -= EVAL(decre$)-1
- ENDIF
- IF startbar%<1 THEN startbar% = 1
- PROCdisplay
- WHEN "V" : ON : PROCwindow(20,69,60,55)
- IF namestaves$ = "nameone" THEN PROCnamestaves ELSE PROCdeletenames
- PROCdisplay
- WHEN "b" :
- PROCwindow(20,57,34,55) : ON : INPUT'" Go to bar "startbar%
- requestedend% = startbar% + numbars%
- IF requestedend% > nobars% THEN startbar% -= (requestedend% - nobars%)
- PROCdisplay
- WHEN "s" :
- CASE sequalssection$ OF
- WHEN "y" :
- PROCwindow(20,17,38,15) : ON : INPUT'" Go to section "section$
- count% = 0 : found$ = "n"
- REPEAT
- count% += 1
- IF remarks$(count%,0) = "SECTION "+section$ OR remarks$(count%,1) = "SECTION "+section$ THEN
- startbar% = count% : found$ = "y"
- ENDIF
- UNTIL found$ = "y" OR count% > nobars%
- PROCdisplay
- WHEN "n" :
- copysuccessively$ = "y" : PROCcopygroupofnotes
- ENDCASE : REM sequalussection
- WHEN "d" : PROCwindow(20,58,44,55) : ON
- INPUT'" Display how many bars? "numbars%
- requestedend% = startbar% + numbars%
- IF requestedend% > nobars% THEN startbar% -= (requestedend%-nobars%)
- IF startbar% < 1 THEN
- startbar% = 1 : numbars% = nobars%-1
- ENDIF
- PROCdisplay
- WHEN "=" : numbars% = numbars%*2
- requestedend% = startbar% + numbars%
- IF requestedend% > nobars% THEN startbar% -= (requestedend%-nobars%)
- IF startbar% < 1 THEN
- startbar% = 1 : numbars% = nobars%-1
- ENDIF
- PROCdisplay
- WHEN "q" :
- PROCquickdisplay
- WHEN "w" :
- CASE toggle$ OF
- WHEN "prevquick" : toggle$ = "orig"
- WHEN "quick" : toggle$ = "prevquick"
- WHEN "orig" : toggle$ = "quick"
- ENDCASE
- CASE toggle$ OF
- WHEN "prevquick" :
- numvoices% = prequicknum%
- FOR count% = 1 TO numvoices%
- displayvoices%(count%) = prequickdisplay%(count%)
- NEXT
- startv% = prequickstart%
- WHEN "quick" :
- numvoices% = quicknum%
- FOR count% = 1 TO numvoices%
- displayvoices%(count%) = quickdisplay%(count%)
- NEXT
- startv% = quickstart%
- WHEN "orig" :
- numvoices% = holdnum%
- FOR count% = 1 TO numvoices%
- displayvoices%(count%) = holddisplay%(count%)
- NEXT
- startv% = holdstart%
- ENDCASE
- PROCdisplay
- WHEN "p" :
- play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
- endbar% = nobars% : nvoices% = quickplay%
- FOR count% = 1 TO quickplay%
- playvoices%(count%) = displayvoices%(startv%+count%-1)
- NEXT
- PROCplay
- WHEN ";" :
- play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
- endbar% = nobars% : nvoices% = 1
- playvoices%(1) = displayvoices%(startv%+1)
- PROCplay
- WHEN "/" :
- play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
- endbar% = nobars% : nvoices% = 1
- playvoices%(1) = displayvoices%(startv%+2)
- PROCplay
- WHEN "P" :
- play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
- endbar% = startbar%+numbars%-1 : nvoices% = quickplay%
- FOR count% = 1 TO quickplay%
- playvoices%(count%) = displayvoices%(startv%+count%-1)
- NEXT
- PROCplay
- WHEN ":" :
- play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
- endbar% = startbar%+numbars%-1 : nvoices% = 1
- playvoices%(1) = displayvoices%(startv%+1)
- PROCplay
- WHEN "?" :
- play$ = "playscreen" : startingbar% = startbar% : startbeat% = 0
- endbar% = startbar%+numbars%-1 : nvoices% = 1
- playvoices%(1) = displayvoices%(startv%+2)
- PROCplay
- WHEN "z" : PROCcopyonenote
- WHEN "x" : PROCcopygroupofnotes
- WHEN "-" :
- IF numbars% > 1 THEN numbars% = numbars%/2
- PROCdisplay
- WHEN "t" : funcinput$ = "durat" : PROCdisplay
- WHEN "e" : funcinput$ = "points" : PROCdisplay
- WHEN "f" : funcinput$ = "displayed" : PROCdisplay
- :
- WHEN "1" :
- IF setalong$ = "y" THEN along% = 0 : PROCpostdisplay
- IF setalong$ = "n" THEN numvoices% = 1 : numvoicesgiven$ = "y" : PROCquickdisplay
- IF setalong$ = "playnovoices" THEN quickplay% = 1 : PROCdisplay
- WHEN "2" :
- IF setalong$ = "y" THEN along% = 1 : PROCpostdisplay
- IF setalong$ = "n" THEN numvoices% = 2 : numvoicesgiven$ = "y" : PROCquickdisplay
- IF setalong$ = "playnovoices" THEN quickplay% = 2 : PROCdisplay
- WHEN "3" :
- IF setalong$ = "y" THEN along% = 2 : PROCpostdisplay
- IF setalong$ = "n" THEN numvoices% = 3 : numvoicesgiven$ = "y" : PROCquickdisplay
- IF setalong$ = "playnovoices" THEN quickplay% = 3 : PROCdisplay
- WHEN "4" :
- IF setalong$ = "y" THEN along% = 3 : PROCpostdisplay
- IF setalong$ = "n" THEN numvoices% = 4 : numvoicesgiven$ = "y" : PROCquickdisplay
- IF setalong$ = "playnovoices" THEN quickplay% = 4 : PROCdisplay
- WHEN "5" :
- IF setalong$ = "y" THEN along% = 4 : PROCpostdisplay
- IF setalong$ = "n" THEN numvoices% = 5 : numvoicesgiven$ = "y" : PROCquickdisplay
- IF setalong$ = "playnovoices" THEN quickplay% = 5 : PROCdisplay
- WHEN "7" :
- IF setalong$ = "y" THEN along% = 6 : PROCpostdisplay
- IF setalong$ = "n" THEN numvoices% = 7 : numvoicesgiven$ = "y" : PROCquickdisplay
- IF setalong$ = "playnovoices" THEN quickplay% = 7 : PROCdisplay
- WHEN "8" :
- IF setalong$ = "y" THEN along% = 7 : PROCpostdisplay
- IF setalong$ = "n" THEN numvoices% = 8 : numvoicesgiven$ = "y" : PROCquickdisplay
- IF setalong$ = "playnovoices" THEN quickplay% = 8 : PROCdisplay
- WHEN "9" :
- IF setalong$ = "y" THEN along% = 8 : PROCpostdisplay
- IF setalong$ = "n" THEN numvoices% = 9 : numvoicesgiven$ = "y" : PROCquickdisplay
- IF setalong$ = "playnovoices" THEN
- PROCwindow(20,69,60,55)
- PRINT'" The maximum number of voices "
- PRINT " that can be played is 8 "
- PRINT'" (press a key to continue) "
- CASE GET$ OF
- OTHERWSE PROCdisplay
- ENDCASE
- ENDIF
- WHEN "]" :
- IF squarebracket$ = "remarks" THEN
- count% = startbar%-1
- REPEAT
- count%+=1
- IF remarks$(count%,0) <> "" THEN itt% = count%
- UNTIL remarks$(count%,0) <> ""
- remarks$(itt%+1,0) = remarks$(itt%,0)
- remarks$(itt%,0) = ""
- ELSE
- addten$ = "y"
- ENDIF
- PROCdisplay
- WHEN "}" :
- count% = startbar%-1
- REPEAT
- count%+=1
- IF remarks$(count%,0) <> "" THEN itt% = count%
- UNTIL remarks$(count%,0) <> ""
- remarks$(itt%+10,0) = remarks$(itt%,0)
- remarks$(itt%,0) = ""
- PROCdisplay
- WHEN "[" :
- IF squarebracket$ = "remarks" THEN
- count% = startbar%-1
- REPEAT
- count%+=1
- IF remarks$(count%,0) <> "" THEN itt% = count%
- UNTIL remarks$(count%,0) <> ""
- remarks$(itt%-1,0) = remarks$(itt%,0)
- remarks$(itt%,0) = ""
- ELSE
- addten$ = "n"
- ENDIF
- PROCdisplay
- WHEN "{" :
- count% = startbar%-1
- REPEAT
- count%+=1
- IF remarks$(count%,0) <> "" THEN itt% = count%
- UNTIL remarks$(count%,0) <> ""
- remarks$(itt%-10,0) = remarks$(itt%,0)
- remarks$(itt%,0) = ""
- PROCdisplay
- WHEN "#" :
- IF squarebracket$ = "remarks" THEN
- count% = startbar%-1
- REPEAT
- count%+=1
- IF remarks$(count%,1) <> "" THEN itt% = count%
- UNTIL remarks$(count%,1) <> ""
- remarks$(itt%+1,1) = remarks$(itt%,1)
- remarks$(itt%,1) = ""
- ENDIF
- PROCdisplay
- WHEN "'" :
- IF squarebracket$ = "remarks" THEN
- count% = startbar%-1
- REPEAT
- count%+=1
- IF remarks$(count%,1) <> "" THEN itt% = count%
- UNTIL remarks$(count%,1) <> ""
- remarks$(itt%-1,1) = remarks$(itt%,1)
- remarks$(itt%,1) = ""
- ELSE
- addten$ = "twenty"
- ENDIF
- PROCdisplay
- WHEN "L" : slavemethod$ = "random" : quickslave$ = "y" : PROCslave
- WHEN "Q" : voix% = 1 : son% = 0 : PROCedit
- WHEN "W" : voix% = 1 : son% = 1 : PROCedit
- WHEN "E" : voix% = 1 : son% = 2 : PROCedit
- WHEN "R" : voix% = 1 : son% = 3 : PROCedit
- WHEN "T" : voix% = 1 : son% = 4 : PROCedit
- WHEN "A" : voix% = 2 : son% = 0 : PROCedit
- WHEN "S" : voix% = 2 : son% = 1 : PROCedit
- WHEN "D" : voix% = 2 : son% = 2 : PROCedit
- WHEN "F" : voix% = 2 : son% = 3 : PROCedit
- WHEN "G" : voix% = 2 : son% = 4 : PROCedit
- WHEN "H" : voix% = 2 : son% = 5 : PROCedit
- WHEN "Z" : voix% = 3 : son% = 0 : PROCedit
- WHEN "X" : voix% = 3 : son% = 1 : PROCedit
- WHEN "C" : voix% = 3 : son% = 2 : PROCedit
- WHEN "V" : voix% = 3 : son% = 3 : PROCedit
- WHEN "B" : voix% = 3 : son% = 4 : PROCedit
- WHEN "N" : voix% = 3 : son% = 5 : PROCedit
- WHEN ">" :
- voice% = displayvoices%(voix%+(startv%-1))-1
- CASE editwhat$ OF
- WHEN "1stenvelope" :
- array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 100000
- WHEN "2ndenvelope" :
- array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 10000000
- WHEN "1stamplitude" :
- array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) + 1
- IF array%(holdstartcell%(voice%)+son%,1,voice%)MOD10 = 9 THEN
- array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) - 9
- ENDIF
- WHEN "2ndamplitude" :
- array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 100
- IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^2)MOD10 = 9 THEN
- array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 900
- ENDIF
- WHEN "3rdamplitude" :
- array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 1000
- IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^3)MOD10 = 9 THEN
- array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 9000
- ENDIF
- WHEN "4thamplitude" :
- array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 10000
- IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^4)MOD10 = 9 THEN
- array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 90000
- ENDIF
- WHEN "movetwo" :
- array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 60000
- IF (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3 > 900 THEN
- number% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
- array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - (number%*1000)
- array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 1000000
- ENDIF
- array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) + 60000
- IF (array%(holdstartcell%(voice%)+son%+1,0,voice%)DIV10^3)MOD10^3 > 900 THEN
- number% = (array%(holdstartcell%(voice%)+son%+1,0,voice%)DIV10^3)MOD10^3
- array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) - (number%*1000)
- array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) + 1000000
- ENDIF
- WHEN "move&drag" :
- array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 60000
- IF (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3 > 900 THEN
- number% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
- array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - (number%*1000)
- array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 1000000
- ENDIF
- bar1% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^6)
- beat1% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
- position1% = (bar1%*960) + beat1%
- bar2% = (array%(holdstartcell%(voice%)+son%-1,0,voice%)DIV10^6)
- beat2% = (array%(holdstartcell%(voice%)+son%-1,0,voice%)DIV10^3)MOD10^3
- position2% = (bar2%*960) + beat2%
- dur% = position1% - position2%
- PROCconvertdur
- number% = (array%(holdstartcell%(voice%)+son%-1,1,voice%)DIV10)MOD10^3
- array%(holdstartcell%(voice%)+son%-1,1,voice%) = array%(holdstartcell%(voice%)+son%-1,1,voice%) - (number%*10)
- array%(holdstartcell%(voice%)+son%-1,1,voice%) = array%(holdstartcell%(voice%)+son%-1,1,voice%) + (dur%*10)
- WHEN "duration" :
- array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) + 10
- IF (array%(holdstartcell%(voice%)+son%,1,voice%)DIV10)MOD10^3 > 998 THEN (array%(holdstartcell%(voice%)+son%,1,voice%)DIV10)MOD10^3 = 998
- ENDCASE
- PROCdisplay
- WHEN "<" :
- voice% = displayvoices%(voix%+(startv%-1))-1
- CASE editwhat$ OF
- WHEN "1stenvelope" :
- array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 100000
- WHEN "2ndenvelope" :
- array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 10000000
- WHEN "1stamplitude" :
- array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) - 1
- IF array%(holdstartcell%(voice%)+son%,1,voice%)MOD10 = 9 THEN
- array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) + 9
- ENDIF
- WHEN "2ndamplitude" :
- IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^2)MOD10 = 0 THEN
- array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 800
- ELSEarray%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 100
- ENDIF
- WHEN "3rdamplitude" :
- array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 1000
- IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^3)MOD10 = 9 THEN
- array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 9000
- ENDIF
- WHEN "4thamplitude" :
- array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) - 10000
- IF (array%(holdstartcell%(voice%)+son%,2,voice%)DIV10^4)MOD10 = 9 THEN
- array%(holdstartcell%(voice%)+son%,2,voice%) = array%(holdstartcell%(voice%)+son%,2,voice%) + 90000
- ENDIF
- WHEN "movetwo" :
- array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - 60000
- IF (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3 > 900 THEN
- number% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
- array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - (number%*1000)
- array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 900000
- ENDIF
- array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) - 60000
- IF (array%(holdstartcell%(voice%)+son%+1,0,voice%)DIV10^3)MOD10^3 > 900 THEN
- number% = (array%(holdstartcell%(voice%)+son%+1,0,voice%)DIV10^3)MOD10^3
- array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) - (number%*1000)
- array%(holdstartcell%(voice%)+son%+1,0,voice%) = array%(holdstartcell%(voice%)+son%+1,0,voice%) + 900000
- ENDIF
- WHEN "move&drag" :
- array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - 60000
- IF (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3 > 900 THEN
- number% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
- array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) - (number%*1000)
- array%(holdstartcell%(voice%)+son%,0,voice%) = array%(holdstartcell%(voice%)+son%,0,voice%) + 900000
- ENDIF
- bar1% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^6)
- beat1% = (array%(holdstartcell%(voice%)+son%,0,voice%)DIV10^3)MOD10^3
- position1% = (bar1%*960) + beat1%
- bar2% = (array%(holdstartcell%(voice%)+son%-1,0,voice%)DIV10^6)
- beat2% = (array%(holdstartcell%(voice%)+son%-1,0,voice%)DIV10^3)MOD10^3
- position2% = (bar2%*960) + beat2%
- dur% = position1% - position2%
- PROCconvertdur
- number% = (array%(holdstartcell%(voice%)+son%-1,1,voice%)DIV10)MOD10^3
- array%(holdstartcell%(voice%)+son%-1,1,voice%) = array%(holdstartcell%(voice%)+son%-1,1,voice%) - (number%*10)
- array%(holdstartcell%(voice%)+son%-1,1,voice%) = array%(holdstartcell%(voice%)+son%-1,1,voice%) + (dur%*10)
- WHEN "duration" :
- array%(holdstartcell%(voice%)+son%,1,voice%) = array%(holdstartcell%(voice%)+son%,1,voice%) - 10
- ENDCASE
- PROCdisplay
- :
- OTHERWISE PROCawait
- :
- ENDCASE
- ENDPROC
- :
- REM**********************************************
- :
- DEF PROCrhythmdisplay
- :
- IF longscore$ = "n" THEN finalbar% = (firstbar%+((numbars%/2)))-1 ELSE finalbar% = (firstbar%+(numbars%))-1
- FOR bar% = firstbar% TO finalbar%
- :
- rgroup%(1) = disarray%(bar%,0,voice%)DIV10^3
- rgroup%(2) = ((disarray%(bar%,0,voice%)MOD10^3)*10^3)+(disarray%(bar%,1,voice%)DIV10^6)
- rgroup%(3) = disarray%(bar%,1,voice%)MOD10^6
- rgroup%(4) = disarray%(bar%,2,voice%)DIV10^3
- rgroup%(5) = disarray%(bar%,3,voice%)
- :
- FOR group% = 1 TO 5
- :
- IF rgroup%(group%) <> 0 THEN
- IF group% < 5 THEN
- beat% = rgroup%(group%)DIV10^4
- addition% = (960*factor)*(bar%-firstbar%)
- leftend% = (beat%*beatfactor%)
- grouplength% = ((rgroup%(group%)MOD10^4)DIV10^2)*beatfactor%
- divs% = (rgroup%(group%)MOD10^2)
- rightend% = leftend%+((grouplength%/divs%)*(divs%-1))
- ELSE
- beat% = rgroup%(group%)DIV10^7
- addition% = (960*factor)*(bar%-firstbar%)
- leftend% = (beat%*beatfactor%)
- grouplength% = ((rgroup%(group%)MOD10^7)DIV10^4)*beatfactor%
- divs% = (rgroup%(group%)MOD10^4)
- rightend% = leftend%+((grouplength%/divs%)*(divs%-1))
- ENDIF
- :
- value = divs%/(grouplength%/beatfactor%)
- IF value >= 1 AND value < 2 THEN change% = 0
- IF value >= 2 AND value < 4 THEN change% = 1
- IF value >= 4 AND value < 8 THEN change% = 2
- IF value >= 8 AND value < 16 THEN change% = 3
- IF value >= 0.5 AND value < 1 THEN change% = -1
- IF value >= 0.25 AND value < 0.5 THEN change% = -2
- IF value >= 0.125 AND value < 0.25 THEN change% = -3
- IF value >= 0.0625 AND value < 0.125 THEN change% = -4
- IF value >= 0.03125 AND value < 0.0625 THEN change% = -5
- numbeams% = beams% + change%
- IF numbeams% < 0 THEN numbeams% = 0
- :
- IF longscore$ = "n" THEN v% = 938 + shortbeamposn%(voice%) ELSE v% = actbeamposn%(count%-startv%)
- IF longscore$ = "n" THEN
- IF shortstemdir$(voice%) = "D" THEN x% = -12 ELSE x% = 12
- ELSE IF longstemdir$(voice%) = "D" THEN x% = -12 ELSE x% = 12
- ENDIF
- IF longscore$ = "n" THEN inc% = 80 ELSE inc% = 120
- :
- IF numbeams% > 0 THEN
- :
- left% = (leftend%*factor)+inc%+addition%
- right% = (rightend%*factor)+inc%+addition%
- gap% = (right% - left%)/(divs%-1)
- FOR times% = 1 TO numbeams%
- pt1% = left%
- space = grouplength%/divs%
- pt2% = ((leftend%*factor)+(inc%+2)+((space*factor)))+addition%
- ct% = -1
- power% = (5-times%)
- IF power% < 1 THEN power% = 1
- n% = 2^power%
- WHILE pt2%<= (right%+10)
- ct% += 1
- IF ((ct%+1)/n%*10)MOD10 <> 0 OR times% = 1 THEN
- LINE pt1%,((v%-(524*(system%-1)))-(x%*(times%-1))),pt2%,((v%-(524*(system%-1)))-(x%*(times%-1)))
- LINE pt1%,(((v%-2)-(524*(system%-1)))-(x%*(times%-1))),pt2%,(((v%-2)-(524*(system%-1)))-(x%*(times%-1)))
- LINE pt1%,(((v%-4)-(524*(system%-1)))-(x%*(times%-1))),pt2%,(((v%-4)-(524*(system%-1)))-(x%*(times%-1)))
- REM for beams crossing systems
- IF right% > 1600 THEN crossing$ = "y" ELSE crossing$ = "n"
- IF crossing$ = "y" AND longscore$ = "n" AND system% = 1 THEN
- LINE pt1%-1600+inc%,((v%-(524*(system%-1)))-(x%*(times%-1)))-524,pt2%-1600+inc%,((v%-(524*(system%-1)))-(x%*(times%-1)))-524
- 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
- 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
- ENDIF
- ENDIF
- pt1% = pt2%
- pt2% = ((leftend%*factor)+(inc%+2)+((ct%+2)*(space*factor)))+addition%
- ENDWHILE
- NEXT
- ENDIF
- :
- space = grouplength%/divs%
- IF longscore$ = "y" THEN
- IF longstemdir$(voice%) = "U" THEN dir% = 1 ELSE dir% = -1
- ELSE
- IF shortstemdir$(voice%) = "U" THEN dir% = 1 ELSE dir% = -1
- ENDIF
- :
- FOR counter% = 0 TO (divs%-1)
- REM grouping% adds to length of stems to group in 2's, 4's etc
- grouping% = 0
- CASE shortstemdir$(voice%) OF
- WHEN "D" :
- IF (counter%/2*10)MOD10 = 0 THEN grouping% = -20
- IF (counter%/4*10)MOD10 = 0 THEN grouping% = -40
- IF (counter%/8*10)MOD10 = 0 THEN grouping% = -60
- OTHERWISE
- IF (counter%/2*10)MOD10 = 0 THEN grouping% = 20
- IF (counter%/4*10)MOD10 = 0 THEN grouping% = 40
- IF (counter%/8*10)MOD10 = 0 THEN grouping% = 60
- ENDCASE
- 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%)
- NEXT
- REM routine for groups crossing systems
- IF system% = 1 AND longscore$ = "n" AND crossing$ = "y" THEN
- FOR counter% = 0 TO (divs%-1)
- 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
- :
- NEXT
- ENDIF
- :
- hposition% = (leftend%*factor)+inc%+addition%+(grouplength%/divs%*(divs%-1)/2*factor)
- vposition% =((v%+32)-(524*(system%-1)))
- REM routine for groups crossing systems
- IF hposition% > 2112 THEN
- hposition% = hposition% - 2062
- vposition% = vposition% - 524
- ENDIF
- IF longscore$ = "y" THEN
- IF longstemdir$(voice%) = "D" THEN vposition% -= 50
- ELSE
- IF shortstemdir$(voice%) ="D" THEN vposition% -= 50
- ENDIF
- IF longstemdir$(voice%) = "U" THEN vposition% -= 6
- IF shortstemdir$(voice%) ="U" THEN vposition% -= 6
- :
- grouplength% = grouplength%/beatfactor%
- lownum% = grouplength%
- IF change% = 0 THEN decimal% = 0
- IF change% = 1 THEN lownum% = lownum%*2 : decimal% = 0
- IF change% = 2 THEN lownum% = lownum%*4 : decimal% = 0
- IF change% = 3 THEN lownum% = lownum%*8 : decimal% = 0
- IF change% = -1 THEN lownum = lownum%/2 : decimal% = (lownum*10)MOD10 : lownum% = lownum*1
- IF change% = -2 THEN lownum = lownum%/4 : decimal% = (lownum*10)MOD10 : lownum% = lownum*1
- IF change% = -3 THEN lownum = lownum%/8 : decimal% = (lownum*10)MOD10 : lownum% = lownum*1
- IF change% = -4 THEN lownum = lownum%/16 :decimal% = (lownum*10)MOD10 : lownum% = lownum*1
- IF change% = -5 THEN lownum = lownum%/32 :decimal% = (lownum*10)MOD10 : lownum% = lownum*1
- :
- printname$ = "n"
- WHILE ((divs%/2)*10)MOD10 = 0 AND ((lownum%/2)*10)MOD10 = 0 AND decimal% = 0
- divs% = divs%/2 : lownum% = lownum%/2 : change% -= 1 : printname$ = "y"
- ENDWHILE
- IF change% < -2 THEN printname$ = "y"
- :
- VDU 23,128,32,32,32,32,32,32,32,32
- VDU 23,129,48,40,36,34,32,32,32,32
- VDU 23,130,48,40,36,50,40,36,34,32
- VDU 23,131,36,34,32,32,32,32,32,32
- VDU 23,132,48,40,36,50,40,36,50,40
- VDU 23,133,36,50,40,36,50,32,32,32
- VDU 23,134,36,50,40,36,50,40,36,34
- VDU 23,135,1,1,1,29,63,63,62,28
- VDU 23,136,0,0,1,1,1,1,1,1
- VDU 23,137,1,1,1,29,35,35,34,28
- VDU 23,138,0,0,0,28,34,34,34,28
- :
- MOVE hposition%,vposition%
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- :
- IF decimal% = 0 THEN
- IF divs% <> lownum% THEN
- IF printname$ = "y" THEN
- PRINT ,;divs%;":";lownum%;
- CASE change% OF
- WHEN 3 : PRINT"//////"
- WHEN 2 : PRINT CHR$(134) : MOVE hposition%,vposition%+16
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(132)
- WHEN 1 : PRINT CHR$(133) : MOVE hposition%,vposition%+16
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(132)
- WHEN 0 : PRINT CHR$(131) : MOVE hposition%,vposition%+16
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(132)
- WHEN -1 : PRINT CHR$(128) : MOVE hposition%,vposition%+16
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(130)
- WHEN -2 : PRINT CHR$(128) : MOVE hposition%,vposition%+16
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(129)
- WHEN -3 : PRINT CHR$(135) : MOVE hposition%,vposition%+16
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(136)
- WHEN -4 : PRINT CHR$(137) : MOVE hposition%,vposition%+16
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(136)
- WHEN -5 : PRINT CHR$(138)
- OTHERWISE
- ENDCASE
- ELSE PRINT ,;divs%;":";lownum%
- ENDIF
- ENDIF
- ELSE PRINT ,;divs%;":";lownum%;".";decimal%;
- CASE change% OF
- WHEN -1 : PRINT CHR$(128) : MOVE hposition%,vposition%+16
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;".";decimal%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(130)
- WHEN -2 : PRINT CHR$(128) : MOVE hposition%,vposition%+16
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;".";decimal%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(129)
- WHEN -3 : PRINT CHR$(135) : MOVE hposition%,vposition%+16
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;".";decimal%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(136)
- WHEN -4 : PRINT CHR$(137) : MOVE hposition%,vposition%+16
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;".";decimal%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(136)
- WHEN -5 : PRINT CHR$(138)
- OTHERWISE
- ENDCASE
- ENDCASE
- ENDIF
- :
- REM routine for groups crossing systems
- IF system% = 1 AND longscore$ = "n" AND crossing$ = "y" THEN
- MOVE hposition%-1600+inc%,vposition%-524
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- :
- IF decimal% = 0 THEN
- IF divs% <> lownum% THEN
- IF printname$ = "y" THEN
- PRINT ,;divs%;":";lownum%;
- CASE change% OF
- WHEN 3 : PRINT"//////"
- WHEN 2 : PRINT CHR$(134) : MOVE hposition%-1600+inc%,vposition%+16-524
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(132)
- WHEN 1 : PRINT CHR$(133) : MOVE hposition%-1600+inc%,vposition%+16-524
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(132)
- WHEN 0 : PRINT CHR$(131) : MOVE hposition%-1600+inc%,vposition%+16-524
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(132)
- WHEN -1 : PRINT CHR$(128) : MOVE hposition%-1600+inc%,vposition%+16-524
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(130)
- WHEN -2 : PRINT CHR$(128) : MOVE hposition%-1600+inc%,vposition%+16-524
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(129)
- WHEN -3 : PRINT CHR$(135) : MOVE hposition%-1600+inc%,vposition%+16-524
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(136)
- WHEN -4 : PRINT CHR$(137) : MOVE hposition%-1600+inc%,vposition%+16-524
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(136)
- WHEN -5 : PRINT CHR$(138)
- OTHERWISE
- ENDCASE
- ELSE PRINT ,;divs%;":";lownum%
- ENDIF
- ENDIF
- ELSE PRINT ,;divs%;":";lownum%;".";decimal%;
- CASE change% OF
- WHEN -1 : PRINT CHR$(128) : MOVE hposition%-1600+inc%,vposition%+16-524
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;".";decimal%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(130)
- WHEN -2 : PRINT CHR$(128) : MOVE hposition%-1600+inc%,vposition%+16-524
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;".";decimal%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(129)
- WHEN -3 : PRINT CHR$(135) : MOVE hposition%-1600,+inc%,vposition%+16-524
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;".";decimal%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(136)
- WHEN -4 : PRINT CHR$(137) : MOVE hposition%-1600+inc%,vposition%+16-524
- IF divs% < 10 THEN VDU 8
- IF divs% >= 10 THEN
- VDU 8 : VDU 8
- ENDIF
- IF printing$ = "n" THEN GCOL 7 ELSE GCOL 0
- PRINT ,;divs%;":";lownum%;".";decimal%;
- IF printing$ = "n" THEN GCOL 0 ELSE GCOL 7
- PRINT CHR$(136)
- WHEN -5 : PRINT CHR$(138)
- OTHERWISE
- ENDCASE
- ENDCASE
- ENDIF
- ENDIF
- :
- ENDIF
- NEXT
- :
- NEXT
- :
- ENDPROC
- :
- REM*******************************************************
- :
- DEF PROCdisplaysubmenu
- :
- PROCwindow(20,66,60,39)
- CLS : OFF
- PRINT'" Notehead sizes N"
- PRINT " Longscore/Shortscore L"
- PRINT " Stem lengths S"
- PRINT " Beats positions/freq P"
- PRINT " Beat numbers/diffs I"
- PRINT " Beat numbers/diffs unit J"
- PRINT " Dynamics positions F"
- PRINT " Note number freq G"
- PRINT " Bar numbers Z"
- PRINT " Intervals settings Q"
- PRINT " Remove: "
- PRINT " staves, ledgers, clefs C"
- PRINT " lower stave (shrt sc) U"
- PRINT " barlines B"
- PRINT " beats T"
- PRINT " names, voice numbers V"
- PRINT " accidentals A"
- PRINT " stems, beams R"
- PRINT " durations D"
- PRINT " dynamics M"
- PRINT " beat numbers (n,1st,y) O"
- PRINT " notenumbers H"
- PRINT " notenames E"
- PRINT " intervals K"
- PRINT " play screen renew Y"
- PRINT " all except noteheads X"
- :
- CASE GET$ OF
- WHEN "E","e" :
- IF notenames$ = "y" THEN notenames$ = "n" ELSE notenames$ = "y"
- WHEN "N","n" :
- CLS
- PRINT'" What size note-heads? (B/S/V) "
- CASE GET$ OF
- WHEN "B","b" : notehead$ = "big"
- WHEN "S","s" : notehead$ = "small"
- WHEN "V","v" : notehead$ = "vsmall"
- ENDCASE
- WHEN "L","l" :
- IF longscore$ = "n" THEN longscore$ = "y" ELSE longscore$ = "n"
- IF longscore$ = "n" THEN
- startv1% = startv% : startv% =1
- ELSE startv% = startv1%
- ENDIF
- WHEN "S","s" :
- CLS
- INPUT'" Which voice "voys%
- voys% -= 1
- PRINT'" stems to end how many"
- PRINT" octaves from top"
- INPUT" stave-line (0,1,-1 etc) "st
- INPUT " stems up or down (U/D)"stemdir$
- IF longscore$ = "n" THEN
- shortbeamposn%(voys%) = st*56
- IF shortbeamposn%(voys%) <= -112 THEN shortbeamposn%(voys%)-=48
- shortstemdir$(voys%) = stemdir$
- ENDIF
- IF longscore$ = "y" THEN
- longbeamposn%(voys%) = st*56
- longstemdir$(voys%) = stemdir$
- ENDIF
- :
- WHEN "P","p" :
- CLS
- PRINT'" Beats positions or frequecy (P/F)"
- CASE GET$ OF
- WHEN "P","p" :
- INPUT'" Upper or lower beats (U/L)"whichset$
- PRINT '" up or down by how many"
- INPUT " stave-lines (1,-1 etc)"move%
- IF whichset$ = "U" THEN
- longbeatsupper% += (move%*16)
- ELSE longbeatslower% += (move%*16)
- ENDIF
- OTHERWISE
- PRINT'" Beats frequency doubled/halved (+/-) "
- CASE GET$ OF
- WHEN "+","=" : beatstep% = beatstep%/2
- WHEN "_","-" : beatstep% = beatstep%*2
- OTHERWISE
- ENDCASE
- :
- ENDCASE
- :
- WHEN "Z","z" : CLS : INPUT'" Bar nos how often (1,2 etc) "barnosoften%
- WHEN "Y","y" :
- IF playnewscreen$ = "y" THEN playnewscreen$ = "n" ELSE playnewscreen$ = "y"
- WHEN "I","i" :
- IF beatnum_diff$ = "num" THEN beatnum_diff$ = "diff" ELSE beatnum_diff$ = "num"
- WHEN "J","j" :
- IF beatunits$ = "big" THEN beatunits$ = "small" ELSE beatunits$ = "big"
- WHEN "C","c" :
- IF staves$ = "y" THEN staves$ = "n" ELSE staves$ = "y"
- WHEN "B","b" :
- IF barlines$ = "y" THEN barlines$ = "n" ELSE barlines$ = "y"
- WHEN "T","t" :
- IF beats$ = "y" THEN beats$ = "n" ELSE beats$ = "y"
- WHEN "U","u" :
- IF lowerstave$ = "y" THEN lowerstave$ = "n" ELSE lowerstave$ = "y"
- WHEN "V","v" :
- IF names$ = "y" THEN names$ = "n" ELSE names$ = "y"
- WHEN "A","a" :
- IF accidentals$ = "y" THEN accidentals$ = "n" ELSE accidentals$ = "y"
- WHEN "R","r" :
- IF stems$ = "y" THEN stems$ = "n" ELSE stems$ = "y"
- WHEN "D","d" :
- IF durations$ = "y" THEN durations$ = "n" ELSE durations$ = "y"
- WHEN "M","m" :
- CASE amplitudes$ OF
- WHEN "n" : amplitudes$ = "y"
- WHEN "y" : amplitudes$ = "stepped"
- WHEN "stepped" : amplitudes$ = "n"
- ENDCASE
- WHEN "O","o" :
- CASE beatnumbers$ OF
- WHEN "y" : beatnumbers$ = "n"
- WHEN "n" : beatnumbers$ = "first"
- WHEN "first" : beatnumbers$ = "y"
- ENDCASE
- WHEN "H","h" :
- CASE notenumbers$ OF
- WHEN "last" : notenumbers$ = "n"
- WHEN "y" : notenumbers$ = "last"
- WHEN "from1" : notenumbers$ = "y"
- WHEN "n" : notenumbers$ = "from1"
- ENDCASE
- WHEN "F","f" :
- CLS
- INPUT'" Which voice "voys%
- voys% -= 1
- PRINT' " dynamics up/down by how many "
- INPUT " stave-lines (1,-1 etc) "dy%
- dy% = dy%*16
- IF longscore$ = "y" THEN
- longamppos%(voys%) += dy%
- ELSE shortamppos%(voys%) += dy%
- ENDIF
- WHEN "G","g" :
- CLS
- PRINT'" Note numbers every 1/2/4/10 notes (0 = 10) "
- CASE GET$ OF
- WHEN "1" : nosevery% = 1
- WHEN "2" : nosevery% = 2
- WHEN "4" : nosevery% = 4
- OTHERWISE nosevery% = 10
- ENDCASE
- INPUT' " starting at note number "startnos%
- :
- WHEN "Q","q" :
- CLS
- PRINT'" Set number/type of intervals displayed"
- PRINT" or compound reduction point? (N/C)"
- CASE GET$ OF
- WHEN "N","n" :
- PRINT'" Display intervals for how"
- INPUT" many previous notes "numintervals%
- PRINT'" Semitones, quartertones, "
- PRINT" eighthtones or cents (S/Q/E/C) "
- CASE GET$ OF
- WHEN "S","s" : typeintervals$ = "s"
- WHEN "Q","q" : typeintervals$ = "q"
- WHEN "E","e" : typeintervals$ = "e"
- WHEN "C","c" : typeintervals$ = "c"
- ENDCASE
- WHEN "C","c" :
- PRINT'" Above which interval should"
- PRINT" compounds be reduced for "
- INPUT" the current interval type "compound%
- CASE typeintervals$ OF
- WHEN "s" : compoundpitch% = compound%
- WHEN "q" : compoundquarter% = compound%
- WHEN "e" : compoundeighth% = compound%
- WHEN "c" : compoundcent% = compound%
- ENDCASE
- ENDCASE
- WHEN "K","k" :
- IF displayintervals$ = "y" THEN displayintervals$ = "n" ELSE displayintervals$ = "y"
- WHEN "X","x" :
- IF xoption$ = "y" THEN xoption$ = "n" ELSE xoption$ = "y"
- IF xoption$ = "y" THEN
- staves$ = "y" : barlines$ = "y" : beats$ = "y" : names$ = "y"
- accidentals$ = "y" : stems$ = "y" : durations$ = "y"
- amplitudes$ = "y" : envelopes$ = "y" : glissandos$ = "y"
- beatnumbers$ = "y"
- ELSE
- staves$ = "n" : barlines$ = "n" : beats$ = "n" : names$ = "n"
- accidentals$ = "n" : stems$ = "n" : durations$ = "n"
- amplitudes$ = "n" : envelopes$ = "n" : glissandos$ = "n"
- beatnumbers$ = "n"
- ENDIF
- OTHERWISE VDU 7 : PROCdisplaysubmenu
- ENDCASE
- ON
- PROCdisplay
- ENDPROC
- :
- REM*********************************************************
- :
- DEF PROCclef(numstaves%,staves%(1),staves%(2),staves%(3),staves%(4),staves%(5),staves%(6),clefcomb$)
- :
- IF staves$ = "y" THEN
- FOR count% = 1 TO numstaves%
- IF MID$(clefcomb$,count%,1) = "T" OR MID$(clefcomb$,count%,1) = "P" THEN
- LINE 48,staves%(count%)+20,52,staves%(count%)+20
- LINE 44,staves%(count%)+16,56,staves%(count%)+16
- LINE 42,staves%(count%)+12,52,staves%(count%)+12
- LINE 58,staves%(count%)+12,58,staves%(count%)+12
- LINE 40,staves%(count%)+8,48,staves%(count%)+8
- LINE 58,staves%(count%)+8,58,staves%(count%)+8
- LINE 40,staves%(count%)+4,42,staves%(count%)+4
- LINE 58,staves%(count%)+4,58,staves%(count%)+4
- LINE 38,staves%(count%)+0,40,staves%(count%)+0
- LINE 54,staves%(count%)+0,56,staves%(count%)+0
- LINE 38,staves%(count%)-4,38,staves%(count%)-4
- LINE 50,staves%(count%)-4,54,staves%(count%)-4
- LINE 38,staves%(count%)-8,38,staves%(count%)-8
- LINE 46,staves%(count%)-8,52,staves%(count%)-8
- LINE 36,staves%(count%)-12,52,staves%(count%)-12
- LINE 32,staves%(count%)-16,50,staves%(count%)-16
- LINE 24,staves%(count%)-20,44,staves%(count%)-20
- LINE 20,staves%(count%)-24,42,staves%(count%)-24
- LINE 14,staves%(count%)-28,26,staves%(count%)-28
- LINE 42,staves%(count%)-28,42,staves%(count%)-28
- LINE 12,staves%(count%)-32,22,staves%(count%)-32
- LINE 42,staves%(count%)-32,42,staves%(count%)-32
- LINE 12,staves%(count%)-36,22,staves%(count%)-36
- LINE 34,staves%(count%)-36,52,staves%(count%)-36
- LINE 10,staves%(count%)-40,18,staves%(count%)-40
- LINE 30,staves%(count%)-40,56,staves%(count%)-40
- LINE 10,staves%(count%)-44,14,staves%(count%)-44
- LINE 24,staves%(count%)-44,32,staves%(count%)-44
- LINE 42,staves%(count%)-44,42,staves%(count%)-44
- LINE 56,staves%(count%)-44,60,staves%(count%)-44
- LINE 10,staves%(count%)-48,14,staves%(count%)-48
- LINE 24,staves%(count%)-48,32,staves%(count%)-48
- LINE 42,staves%(count%)-48,42,staves%(count%)-48
- LINE 56,staves%(count%)-48,60,staves%(count%)-48
- LINE 10,staves%(count%)-52,16,staves%(count%)-52
- LINE 24,staves%(count%)-52,26,staves%(count%)-52
- LINE 42,staves%(count%)-52,42,staves%(count%)-52
- LINE 56,staves%(count%)-52,60,staves%(count%)-52
- LINE 12,staves%(count%)-56,16,staves%(count%)-56
- LINE 28,staves%(count%)-56,30,staves%(count%)-56
- LINE 42,staves%(count%)-56,42,staves%(count%)-56
- LINE 56,staves%(count%)-56,60,staves%(count%)-56
- LINE 18,staves%(count%)-60,22,staves%(count%)-60
- LINE 42,staves%(count%)-60,42,staves%(count%)-60
- LINE 52,staves%(count%)-60,58,staves%(count%)-60
- LINE 22,staves%(count%)-64,54,staves%(count%)-64
- LINE 42,staves%(count%)-68,42,staves%(count%)-68
- LINE 42,staves%(count%)-72,42,staves%(count%)-72
- LINE 22,staves%(count%)-76,28,staves%(count%)-76
- LINE 42,staves%(count%)-76,42,staves%(count%)-76
- LINE 18,staves%(count%)-80,32,staves%(count%)-80
- LINE 42,staves%(count%)-80,42,staves%(count%)-80
- LINE 14,staves%(count%)-84,28,staves%(count%)-84
- LINE 44,staves%(count%)-84,44,staves%(count%)-84
- LINE 14,staves%(count%)-88,22,staves%(count%)-88
- LINE 44,staves%(count%)-88,44,staves%(count%)-88
- LINE 24,staves%(count%)-92,42,staves%(count%)-92
- IF MID$(clefcomb$,count%,1) = "P" THEN
- MOVE 42,staves%(count%)+44
- PRINT;"8"
- ENDIF
- ENDIF
- IF MID$(clefcomb$,count%,1) = "B" OR MID$(clefcomb$,count%,1) = "D" THEN
- LINE 20,staves%(count%)-4,38,staves%(count%)-4
- LINE 16,staves%(count%)-8,18,staves%(count%)-8
- LINE 38,staves%(count%)-8,44,staves%(count%)-8
- LINE 58,staves%(count%)-8,60,staves%(count%)-8
- LINE 12,staves%(count%)-12,24,staves%(count%)-12
- LINE 40,staves%(count%)-12,48,staves%(count%)-12
- LINE 12,staves%(count%)-16,28,staves%(count%)-16
- LINE 40,staves%(count%)-16,48,staves%(count%)-16
- LINE 16,staves%(count%)-20,28,staves%(count%)-20
- LINE 40,staves%(count%)-20,48,staves%(count%)-20
- LINE 20,staves%(count%)-24,24,staves%(count%)-24
- LINE 40,staves%(count%)-24,48,staves%(count%)-24
- LINE 58,staves%(count%)-24,60,staves%(count%)-24
- LINE 40,staves%(count%)-28,48,staves%(count%)-28
- LINE 40,staves%(count%)-32,48,staves%(count%)-32
- LINE 36,staves%(count%)-36,44,staves%(count%)-36
- LINE 32,staves%(count%)-40,40,staves%(count%)-40
- LINE 28,staves%(count%)-44,34,staves%(count%)-44
- LINE 20,staves%(count%)-48,30,staves%(count%)-48
- LINE 10,staves%(count%)-52,18,staves%(count%)-52
- IFMID$(clefcomb$,count%,1) = "D" THEN
- MOVE 10,staves%(count%)-56
- PRINT;"8"
- ENDIF
- ENDIF
- NEXT
- ENDIF
- :
- IF names$ = "y" THEN
- stave% = 1
- FOR count% = 0 TO lastcount%
- IF MID$(clefcomb$,count%+1,1) = "P" THEN MOVE 20,staves%(stave%)+78 ELSE MOVE 20,staves%(stave%)+58
- PRINT longinsts$(count%,0);
- PRINT;"(";displayvoices%(startv%+count%);")" : REM voice number
- stave% += EVAL(MID$(stavecombination$,count%+1,1))
- NEXT
- ENDIF
- :
- REM defining actamppos%() values
- stave% = 1
- FOR count% = 0 TO lastcount%
- IF MID$(stavecombination$,count%+1,1) = "1" THEN
- actamppos%(displayvoices%(startv%+count%)) = staves%(stave%)-128+longamppos%(displayvoices%(startv%+count%)-1)
- ELSE actamppos%(displayvoices%(startv%+count%)) = staves%(stave%)-224+longamppos%(displayvoices%(startv%+count%)-1)
- ENDIF
- stave% += EVAL(MID$(stavecombination$,count%+1,1))
- NEXT
- :
- :
- REM barlines
- IF barlines$ = "y" THEN
- stave% = 1
- FOR system% = 0 TO lastcount%
- FOR barline% = 1 TO numbars%
- horpos% = (960*barline%*factor)+80
- IF notehead$ = "small" THEN horpos% += 16
- IF notehead$ = "vsmall" THEN horpos% += 24
- FOR thickness% = 2 TO 8 STEP 2
- IF MID$(stavecombination$,system%+1,1) = "1" THEN
- LINE horpos%+thickness%,staves%(stave%),horpos%+thickness%,staves%(stave%)-64
- ELSE
- LINE horpos%+thickness%,staves%(stave%),horpos%+thickness%,staves%(stave%)-160
- ENDIF
- NEXT
- REM bar nos
- IF printing$ = "n" THEN GCOL 1
- IF tempi%(startbar%) <> tempi%(startbar%-1) THEN
- MOVE 40,1145 : PRINT "b.";startbar%;" MM.";tempi%(startbar%)
- ELSE MOVE 40,1145 : PRINT "b.";startbar%;" (MM.";tempi%(startbar%);")"
- ENDIF
- IF remarks$(startbar%,0) <> "" OR remarks$(startbar%,1) <> "" THEN
- MOVE 40,1120 : PRINT remarks$(startbar%,0) : MOVE 40,1095 : PRINT remarks$(startbar%,1)
- ENDIF
- IF printing$ = "n" THEN GCOL 0
- IF system% = 0 THEN
- IF printing$ = "n" THEN GCOL 1
- IF tempi%(startbar%+barline%) <> tempi%(startbar%+barline%-1) THEN
- MOVE horpos%-125,1145 : PRINT startbar%+barline%;" MM.";tempi%(startbar%+barline%)
- ELSE IF barline% MOD barnosoften% = 0 THEN MOVE horpos%-125,1145 : PRINT startbar%+barline%
- ENDIF
- IF remarks$(startbar%+barline%,0) <> "" OR remarks$(startbar%+barline%,1) <> "" THEN
- MOVE horpos%,1120 : PRINT remarks$(startbar%+barline%,0)
- MOVE horpos%,1095 : PRINT remarks$(startbar%+barline%,1)
- ENDIF
- REM print duration at bottom right
- IF seeduration$ = "y" THEN
- IF startbar% + barline% = startbar% + numbars% - 1 THEN
- totaldur = 0
- FOR count% = 1 TO startbar% + numbars% - 1
- duration = 60/tempi%(count%)
- totaldur = totaldur + duration
- NEXT
- totaldur% = totaldur
- mins% = totaldur% DIV 60
- secs% = totaldur% - (mins%*60)
- MOVE 1200,50 : PRINT "duration ";mins%;" mins ";secs%;" secs"
- ENDIF
- ENDIF
- IF printing$ = "n" THEN GCOL 0
- ENDIF
- NEXT
- stave% += EVAL(MID$(stavecombination$,system%+1,1))
- NEXT
- ENDIF
- :
- ENDPROC
- :
- REM*************************************************
- :
- DEF PROClongvalue(pos%(0),pos%(1),pos%(2),clefcomb$)
- :
- staff% = 1
- finish% = endv%-startv%
- IF finish% > 2 THEN finish% = 2
- FOR ct% = 0 TO finish%
- CASE MID$(clefcomb$,staff%,1) OF
- WHEN "P" : decrement% = 360
- WHEN "T" : decrement% = 304
- WHEN "B" : decrement% = 208
- WHEN "D" : decrement% = 152
- ENDCASE
- value%(ct%) = pos%(ct%) - decrement%
- staff% += EVAL(MID$(stavecombination$,ct%+1,1))
- NEXT
- :
- FOR ct% = 0 TO finish%
- actbeamposn%(ct%) = longbeamposn%(displayvoices%(startv%+ct%)-1) + pos%(ct%)
- NEXT
- ENDPROC
- :
- REM*************************************************
- :
- DEF PROCconvertdur
- :
- REM converts dur% from beats to 1/20ths of a second
- converter = (60 * 20)/(tempi%(barno%) * 960)
- dur = dur% * converter
- fraction = ((dur*10)DIV1)MOD10
- IF fraction>4 THEN dur% = dur+1 ELSE dur% = dur
- IF dur% = 0 THEN dur% = 1
- IF dur% > 999 THEN dur% = 998 : REM max 3 array cells available
- :
- ENDPROC
- :
- REM**********************************************
- :
- DEF PROCreconvertdur
- :
- converter = (60 * 20)/(tempi%(brrr%) * 960)
- dur% = dur%/converter
- :
- ENDPROC
- :
- REM************************************************
- :
- DEF PROCseriesdurations
- :
- PROCwindow(20,69,60,55)
- CLS
- PRINT'" How many durations (for 1 press 0) "
- PRINT'" (to fill gaps between attacks "
- PRINT " press 111 or to half-fill gaps "
- INPUT " between attacks press 222) "numdurations%
- IF numdurations% = 0 THEN numdurations% = 1
- IF numdurations% = 111 OR numdurations% = 222 THEN PROCdurationsbetween
- :
- IF numdurations% = 1 THEN
- PRINT'" the duration is:" : INPUT " bars "b% : INPUT " beats "beats%
- PROCalterbeats : dur% = (b%*960)+beats%
- durations%(0) = dur%
- ELSE
- PRINT'" Are all the durations the same?"
- PRINT " (no = n/2)"
- CASE GET$ OF
- WHEN "N","n","2"
- FOR count% = 0 TO (numdurations% - 1)
- PRINT'" duration ";count%;" is:"
- INPUT " bars "b%
- INPUT " beats "beats% : PROCalterbeats
- dur% = (b%*960)+beats%
- durations%(count%) = dur%
- NEXT
- OTHERWISE
- : PRINT'" the duration is:" : INPUT " bars "b% : INPUT " beats "beats%
- PROCalterbeats : dur% = (b%*960)+beats%
- FOR count% = 0 TO (numdurations%-1) : durations%(count%) = dur% : NEXT
- ENDCASE
- ENDIF
- :
- REM function can feed durats similarly into durations%()
- :
- PROCinsertdurations
- :
- ENDPROC
- :
- REM***********************************************
- :
- DEF PROCinsertdurations
- :
- CLS
- IF seequery$ = "y" THEN
- PRINT'" Do you want to read these "
- PRINT " durations into the array? "
- CASE GET$ OF
- WHEN "N","n" : PROCdisplay : REM durations%() remains intact
- OTHERWISE
- ENDCASE
- ENDIF : REM seequery$
- :
- IF screenvoices$ = "n" THEN
- INPUT' " Which voice/strand (0 = top)"voice%
- IF voice% = 0 THEN PROCpressenter
- ELSE
- PRINT'" Which screen voice "
- CASE GET$ OF
- WHEN "1" : voice% = 1
- WHEN "2" : voice% = 2
- WHEN "3" : voice% = 3
- OTHERWISE PROCpressenter
- ENDCASE
- ENDIF
- IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
- voice% -= 1
- IF voice% >= 0 THEN samevoice% = voice%
- IF voice% = -1 THEN voice% = samevoice%
- :
- IF quickcopy$ = "n" THEN
- INPUT'" Starting at bar number "bars%
- INPUT " beat "beats% : PROCalterbeats
- startat% = (bars%*(10^3))+beats%
- ELSE
- INPUT ' " starting at note number (0 counts as 1) "along%
- IF along% = 0 THEN along% = 1
- along%-=1
- copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
- copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
- beats% = copystartbeat%
- PROCalterbeats
- startat% = (copystartbar%*(10^3))+beats%
- ENDIF
- :
- PROCsearch(startat%)
- shunt$ = "N"
- :
- FOR count% = startcell% TO (startcell%+(numdurations%-1))
- PROCcellfill(count%,voice%,999,999,999,9,999,durations%(count%-startcell%),99,99)
- NEXT
- :
- PROCdisplay
- :
- ENDPROC
- :
- REM*************************************************
- :
- DEF PROCinsertamplitudes
- :
- CLS
- repeatposit$ = "n"
- IF seequery$ = "y" THEN
- PRINT'" Do you want to read these amplitudes "
- PRINT " into the array? "
- CASE GET$ OF
- WHEN "N","n" : PROCdisplay : REM amplitudes%()) remains intact
- OTHERWISE
- ENDCASE
- ENDIF : REM seequery$
- :
- IF ampmethod$ = "sample" THEN
- IF screenvoices$ = "n" THEN
- INPUT' " Which voice/strand (0 = top)"voice%
- IF voice% = 0 THEN PROCpressenter
- ELSE
- PRINT'" Which screen voice "
- CASE GET$ OF
- WHEN "1" : voice% = 1
- WHEN "2" : voice% = 2
- WHEN "3" : voice% = 3
- OTHERWISE PROCpressenter
- ENDCASE
- ENDIF
- IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
- voice% -= 1
- IF voice% >= 0 THEN samevoice% = voice%
- IF voice% = -1 THEN voice% = samevoice%
- :
- IF quickcopy$ = "y" THEN
- INPUT ' " starting at note number (0 counts as 1) "along%
- IF along% = 0 THEN along% = 1
- along%-=1
- bars% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
- beats% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
- holdbar% = bars%
- holdbeat% = beats%
- PROCalterbeats
- startat% = (bars%*(10^3))+beats%
- :
- ELSE
- :
- INPUT'" Starting at bar number "bars%
- IF bars% = 0 THEN
- bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
- ENDIF
- holdbar% = bars%
- IF repeatposit$ = "y" THEN
- PRINT'" bar ";bars%;" beat ";beats%;"?"
- PRINT'" (for OK press 0, if not OK press X)"
- CASE GET$ OF
- WHEN"X","x" : PROCinsertpitches
- OTHERWISE
- ENDCASE
- ELSE
- INPUT " beat "beats%
- holdbeat% = beats%
- ENDIF
- PROCalterbeats
- startat% = (bars%*(10^3))+beats%
- :
- ENDIF
- :
- ENDIF
- :
- PROCsearch(startat%)
- shunt$ = "N"
- :
- FOR count% = startcell% TO (startcell%+(numamplitudes%-1))
- PROCcellfill(count%,voice%,999,999,999,amplitudes%(count%-startcell%),999,999,99,99)
- NEXT
- :
- PROCdisplay
- :
- ENDPROC
- :
- REM************************************************
- :
- DEF PROCassignvoices
- :
- IF defaultvoices$ = "y" THEN
- waveforms$() = "WaveSynth-Beep"
- ELSE
- CLS
- PRINT '" Assign waveforms to"
- INPUT" how many voices "vcesx%
- FOR count% = 1 TO vcesx%
- PRINT'" voice ";count%;" is which voice number"
- INPUT vcen%
- PRINT'" voice ";vcen%;
- IF insts$(vcen%,0) <> "" THEN PRINT " (";insts$(vcen%,0);")"
- PRINT" is assigned which waveform?"
- INPUT waveform$
- waveforms$(vcen%) = waveform$
- NEXT
- ENDIF
- :
- ENDPROC
- :
- REM************************************************
- :
- DEF PROCseriesenvelopes
- :
- REM envelopes%() and glissandos%() are always input at the same time
- PROCwindow(20,69,73,45)
- IF gradations$ = "y" THEN PRINT'" Input gradations as if envelopes with 4 phases "
- PRINT'" How many envelopes/glissandos "
- INPUT " (for 1 press 0) "numenvelopes%
- IF numenvelopes% = 0 THEN numenvelopes% = 1
- :
- IF numenvelopes% > 1 THEN
- PRINT '" are the envelopes all the same? "
- PRINT " (Y/0/1, N/2) "
- CASE GET$ OF
- WHEN "N","n","2" : sameenvelopes$ = "n"
- OTHERWISE sameenvelopes$ = "y"
- ENDCASE
- ELSE
- sameenvelopes$ = "y"
- ENDIF
- :
- FOR count% = 0 TO (numenvelopes%-1)
- IF sameenvelopes$ = "n" OR (sameenvelopes$ ="y" AND count% = 0) THEN
- IF numphases% <> 4 THEN
- PRINT'" Envelope ";count%+1;" has how many phases? "
- PRINT " (for 1 press 0, for 0 press 9) "
- INPUT numphases%
- IF numphases% = 0 THEN numphases% = 1
- IF numphases% = 9 THEN numphases% = 0
- ENDIF
- :
- CASE numphases% OF
- :
- WHEN 0 :
- INPUT'" amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
- amp2% = 9
- gliss1% = 50
- ph2% = 0 : ph1% = 0 : amp4% = 0 : amp3% = 0 : gliss3% = 10 : gliss2% = 50
- :
- WHEN 4 :
- INPUT'" amplitude is (0 = previous) "amp$
- IF amp$ = "" THEN amp$ = prevamp$
- COLOUR 1 : PRINT amp$
- wait$ = INKEY$(20) : COLOUR 0
- PROCconvertdynamics : amp1% = amp%
- INPUT'" gradation is (select from 1-9) "gradation%
- IF gradation% = 0 THEN gradation% = prevgradation%
- COLOUR 1 : PRINT gradation%
- wait$ = INKEY$(20) : COLOUR 0
- amp2% = 9
- amp3% = gradation%
- gliss1% = 50
- ph2% = 0 : ph1% = 0 : amp4% = 0 : gliss3% = 10 : gliss2% = 50
- prevamp$ = amp$ : prevgradation% = gradation%
- :
- WHEN 1 :
- INPUT'" starting amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
- INPUT " destination amplitude is "amp$ : PROCconvertdynamics : amp2% = amp%
- INPUT'" glissando is (in 1/8 tones, max 48,-48) "gliss%
- gliss1% = 50-gliss%
- ph2% = 0 : ph1% = 0 : amp4% = 0 : amp3% = 0 : gliss3% = 10 : gliss2% = 50
- :
- WHEN 2 :
- INPUT'" starting amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
- PRINT'" phase 1 ends after what percentage "
- INPUT " of the note's duration "ph1%
- INPUT " phase 1's destination amplitude is "amp$ : PROCconvertdynamics : amp2% = amp%
- INPUT " phase 1's glissando is (in 1/8 tones, max 48,-48) "gliss%
- gliss1% = 50-gliss%
- INPUT'" phase 2's destination amplitude is "amp$ : PROCconvertdynamics : amp3% = amp%
- INPUT " phase 2's glissando is (in 1/8 tones, max 48,-48) "gliss%
- gliss2% = 50-gliss%
- ph2% = 0 : amp4% = 0 : gliss3% = 10
- :
- WHEN 3 :
- INPUT'" starting amplitude is "amp$ : PROCconvertdynamics : amp1% = amp%
- PRINT'" phase 1 ends after what percentage "
- INPUT " of the note's duration "ph1%
- INPUT " phase 1's destination amplitude is "amp$ : PROCconvertdynamics : amp2% = amp%
- INPUT " phase 1's glissando is (in 1/8 tones, max 48,-48) "gliss%
- gliss1% = 50-gliss%
- PRINT'" phase 2 ends after what percentage "
- INPUT " of the note's duration "ph2%
- INPUT'" phase 2's destination amplitude is "amp$ : PROCconvertdynamics : amp3% = amp%
- INPUT " phase 2's glissando is (in 1/8 tones, max 48,-48) "gliss%
- gliss2% = 50-gliss%
- INPUT'" phase 3's destination amplitude is "amp$ : PROCconvertdynamics : amp4% = amp%
- REPEAT
- INPUT " phase 3's glissando is (in 1/8 tones, max 10,-10) "gliss%
- gliss3% = 10-gliss%
- IF gliss3% > 20 THEN VDU7
- IF gliss3% < 0 THEN VDU7
- UNTIL gliss3% < 21 AND gliss3% >= 0
- :
- ENDCASE
- :
- envelopes%(count%) = (ph2%*10^5)+(ph1%*10^3)+(amp4%*10^2)+(amp3%*10)+amp2%
- amplitudes%(count%) = amp1%
- glissandos%(count%) = (gliss3%*10^4)+(gliss2%*10^2)+gliss1%
- :
- :
- ENDIF
- NEXT
- :
- IF sameenvelopes$ = "y" THEN
- FOR count% = 1 TO (numenvelopes%-1)
- envelopes%(count%) = (ph2%*10^5)+(ph1%*10^3)+(amp4%*10^2)+(amp3%*10)+amp2%
- amplitudes%(count%) = amp1%
- glissandos%(count%) = (gliss3%*10^4)+(gliss2%*10^2)+gliss1%
- NEXT
- ENDIF
- :
- gradations$ = "n"
- REM function can feed envelopes similarly into envelopes%()
- :
- PROCinsertenvelopes
- :
- ENDPROC
- :
- REM*******************************************
- :
- DEF PROCconvertdynamics
- CASE amp$ OF
- WHEN "0" : amp% = 0
- WHEN "ppp" : amp% = 1
- WHEN "pp" : amp% = 2
- WHEN "p" : amp% = 3
- WHEN "mp" : amp% = 4
- WHEN "mf" : amp% = 5
- WHEN "f" : amp% = 6
- WHEN "ff" : amp% = 7
- WHEN "fff" : amp% = 8
- ENDCASE
- ENDPROC
- :
- REM*******************************************
- :
- DEF PROCinsertenvelopes
- :
- CLS
- repeatposit$ = "n"
- IF seequery$ = "y" THEN
- PRINT '" Do you want to read these envelopes into the array?"
- CASE GET$ OF
- WHEN "N","n" : PROCdisplay : REM envelopes%() stays intact
- OTHERWISE
- ENDCASE
- ENDIF : REM seequery$
- :
- IF screenvoices$ = "n" THEN
- INPUT' " Which voice/strand (0 = top)"voice%
- IF voice% = 0 THEN PROCpressenter
- ELSE
- PRINT'" Which screen voice "
- CASE GET$ OF
- WHEN "1" : voice% = 1
- WHEN "2" : voice% = 2
- WHEN "3" : voice% = 3
- OTHERWISE PROCpressenter
- ENDCASE
- ENDIF
- IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
- voice% -= 1
- IF voice% >= 0 THEN samevoice% = voice%
- IF voice% = -1 THEN voice% = samevoice%
- :
- IF quickcopy$ = "y" THEN
- INPUT ' " starting at note number (0 counts as 1) "along%
- IF along% = 0 THEN along% = 1
- along%-=1
- bars% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
- beats% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
- holdbar% = bars%
- holdbeat% = beats%
- PROCalterbeats
- startat% = (bars%*(10^3))+beats%
- :
- ELSE
- :
- INPUT'" Starting at bar number "bars%
- IF bars% = 0 THEN
- bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
- ENDIF
- holdbar% = bars%
- IF repeatposit$ = "y" THEN
- PRINT'" bar ";bars%;" beat ";beats%;"?"
- PRINT" (for OK press 0, if not OK press X)"
- CASE GET$ OF
- WHEN"X","x" : PROCinsertpitches
- OTHERWISE
- ENDCASE
- ELSE
- INPUT " beat "beats%
- holdbeat% = beats%
- ENDIF
- PROCalterbeats
- startat% = (bars%*(10^3))+beats%
- :
- ENDIF
- :
- PROCsearch(startat%)
- shunt$ = "N"
- :
- FOR count% = startcell% TO (startcell%+(numenvelopes%-1))
- PROCcellfill(count%,voice%,999,999,999,amplitudes%(count%-startcell%),envelopes%(count%-startcell%),999,glissandos%(count%-startcell%),99)
- NEXT
- :
- PROCdisplay
- :
- ENDPROC
- :
- REM**********************************************
- :
- DEF PROCseriesinflections
- :
- PROCwindow(20,69,88,45)
- PRINT'" semitone = 100 cents quartertone = 50 cents eigthtone = 25 cents"
- PRINT " sixteenthtone = 12 cents sixthtone = 33 cents"
- PRINT'" harmonic 3 = perfect 5th + 2 cents"
- PRINT " harmonic 5 = major 3rd eigthtone flat + 11 cents "
- PRINT " harmonic 7 = minor 7th eightone flat -6 cents"
- PRINT " harmonic 9 = major 2nd + 4 cents"
- PRINT " harmonic 11 = perfect 4th quartertone sharp + 1 cent"
- PRINT " harmonic 13 = major 6th quartertone flat - 9 cents"
- PRINT " harmonic 15 = major 7th - 12 cents"
- INPUT'" How many inflections "numinflections%
- FOR count% = 0 TO (numinflections%-1)
- PRINT'" inflection ";count%+1;" is (in cents:"
- INPUT " 1,-1 etc; max 49,-49) "inf%
- inf% = 50+inf%
- inflections%(count%) = inf%
- NEXT
- :
- REM function can feed similarly into inflections%()
- :
- PROCinsertinflections
- :
- ENDPROC
- :
- REM**********************************************
- :
- DEF PROCinsertinflections
- :
- CLS
- repeatposit$ = "n"
- IF seequery$ = "y" THEN
- PRINT'" Do you want to read these inflections into the array?"
- CASE GET$ OF
- WHEN "N","n" : PROCdisplay : REM inflections%() remains intact
- OTHERWISE
- ENDCASE
- ENDIF : REM seequery$
- IF screenvoices$ = "n" THEN
- INPUT' " Which voice/strand "voice%
- ELSE
- PRINT'" Which screen voice "
- CASE GET$ OF
- WHEN "1" : voice% = 1
- WHEN "2" : voice% = 2
- WHEN "3" : voice% = 3
- OTHERWISE PROCpressenter
- ENDCASE
- ENDIF
- IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
- voice% -= 1
- IF voice% >= 0 THEN samevoice% = voice%
- IF voice% = -1 THEN voice% = samevoice%
- :
- IF quickcopy$ = "y" THEN
- INPUT ' " starting at note number (0 counts as 1) "along%
- IF along% = 0 THEN along% = 1
- along%-=1
- bars% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
- beats% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
- holdbar% = bars%
- holdbeat% = beats%
- PROCalterbeats
- startat% = (bars%*(10^3))+beats%
- :
- ELSE
- :
- INPUT'" Starting at bar number "bars%
- IF bars% = 0 THEN
- bars% = holdbar% : beats% = holdbeat% : repeatposit$ = "y"
- ENDIF
- holdbar% = bars%
- IF repeatposit$ = "y" THEN
- PRINT'" bar ";bars%;" beat ";beats%;"?"
- PRINT" (for OK press 0, if not OK press X)"
- CASE GET$ OF
- WHEN"X","x" : PROCinsertpitches
- OTHERWISE
- ENDCASE
- ELSE
- INPUT " beat "beats%
- holdbeat% = beats%
- ENDIF
- PROCalterbeats
- startat% = (bars%*(10^3))+beats%
- :
- ENDIF
- :
- PROCsearch(startat%)
- shunt$ = "N"
- :
- FOR count% = startcell% TO (startcell%+(numinflections%-1))
- PROCcellfill(count%,voice%,999,999,999,9,999,999,99,inflections%(count%-startcell%))
- NEXT
- PROCdisplay
- ENDPROC
- :
- REM****************************************************
- :
- DEF PROCenv
- :
- temp = tempi%(brrr%)
- IF waveload$ = "done" THEN temp = temp*1.23065
- converter = 1200/(temp*960)
- dur1 = dur%/converter
- dur2 = dur1*10
- dur3 = dur2 MOD 10
- IF dur3 >= 5 THEN dur% = dur1+1 ELSE dur% = dur1
- :
- dyn1% = dyn% + 128
- :
- number% = array%(cell%(voicenum%),2,voicenum%)DIV10^5
- IF number% = 0 THEN numphases% = 1
- IF number% > 0 AND number% < 100 THEN numphases% = 2
- IF number% > 99 THEN numphases% = 3
- :
- CASE nvoices% OF
- WHEN 1 : st% = 1
- OTHERWISE st% = 2
- ENDCASE
- :
- CASE numphases% OF
- :
- WHEN 1 :
- :
- gliss1% = (array%(cell%(voicenum%),1,voicenum%)DIV10^4)MOD10^2
- gliss1% = 50 - gliss1%
- gliss1% = gliss1% * 85.5
- pitchinc = gliss1%/dur%
- :
- amp2% = (array%(cell%(voicenum%),2,voicenum%)DIV10^2)MOD10
- dyn2% = 384 + (16*amp2%)
- IF dyn2% = 512 THEN dyn2% = 511
- dynspan% = dyn2% - dyn1%
- dyninc = dynspan%/dur%
- :
- FOR loop% = 10 TO dur% STEP (dur%/32)*st%
- loud% = dyninc*loop%
- high% = pitchinc*loop%
- SOUND count%, dyn1%+loud%, pitch%+high%, 0, after%+loop%
- NEXT
- :
- WHEN 2 :
- ph1% = number% MOD 10^2
- point1% = dur%*ph1%/100
- :
- REM first phase
- gliss1% = (array%(cell%(voicenum%),1,voicenum%)DIV10^4)MOD10^2
- gliss1% = 50 - gliss1%
- gliss1% = gliss1% * 85.5
- pitchinc = gliss1%/point1%
- :
- amp2% = (array%(cell%(voicenum%),2,voicenum%)DIV10^2)MOD10
- dyn2% = 384 + (16*amp2%)
- IF dyn2% = 512 THEN dyn2% = 511
- dynspan% = dyn2% - dyn1%
- dyninc = dynspan%/point1%
- :
- FOR loop% = 10 TO point1%-10 STEP ((point1%)/32)*st%
- loud% = dyninc*loop%
- high% = pitchinc*loop%
- SOUND count%, dyn1%+loud%, pitch%+high%, 0, after%+loop%
- NEXT
- :
- REM second phase
- gliss2% = (array%(cell%(voicenum%),1,voicenum%)DIV10^6)MOD10^2
- gliss2% = 50 - gliss2%
- gliss2% = gliss2% * 85.5
- pitchinc = gliss2%/(dur%-point1%)
- :
- amp3% = (array%(cell%(voicenum%),2,voicenum%)DIV10^3)MOD10
- dyn3% = 384 + (16*amp3%)
- IF dyn3% = 512 THEN dyn2% = 511
- dynspan% = dyn3% - dyn2%
- dyninc = dynspan%/(dur%-point1%)
- :
- FOR loop% = 0 TO dur%-point1% STEP ((dur%-point1%)/32)*st%
- loud% = dyninc*loop%
- high% = pitchinc*loop%
- SOUND count%, dyn2%+loud%, pitch%+gliss1%+high%, 0, after%+point1%+loop%
- NEXT
- :
- WHEN 3 :
- ph1% = number% MOD 10^2
- point1% = dur%*ph1%/100
- ph2% = number% DIV 10^2
- point2% = dur%*ph2%/100
- :
- REM first phase
- gliss1% = (array%(cell%(voicenum%),1,voicenum%)DIV10^4)MOD10^2
- gliss1% = 50 - gliss1%
- gliss1% = gliss1% * 85.5
- pitchinc = gliss1%/point1%
- :
- amp2% = (array%(cell%(voicenum%),2,voicenum%)DIV10^2)MOD10
- dyn2% = 384 + (16*amp2%)
- IF dyn2% = 512 THEN dyn2% = 511
- dynspan% = dyn2% - dyn1%
- dyninc = dynspan%/point1%
- :
- FOR loop% = 10 TO point1%-10 STEP ((point1%)/32)*st%
- loud% = dyninc*loop%
- high% = pitchinc*loop%
- SOUND count%, dyn1%+loud%, pitch%+high%, 0, after%+loop%
- NEXT
- :
- REM second phase
- gliss2% = (array%(cell%(voicenum%),1,voicenum%)DIV10^6)MOD10^2
- gliss2% = 50 - gliss2%
- gliss2% = gliss2% * 85.5
- pitchinc = gliss2%/(point2%-point1%)
- :
- amp3% = (array%(cell%(voicenum%),2,voicenum%)DIV10^3)MOD10
- dyn3% = 384 + (16*amp3%)
- IF dyn3% = 512 THEN dyn3% = 511
- dynspan% = dyn3% - dyn2%
- dyninc = dynspan%/(point2%-point1%)
- :
- FOR loop% = 0 TO point2%-point1%-10 STEP ((point2%-point1%)/32)*st%
- loud% = dyninc*loop%
- high% = pitchinc*loop%
- SOUND count%, dyn2%+loud%, pitch%+gliss1%+high%, 0, after%+point1%+loop%
- NEXT
- :
- REM third phase
- gliss3% = (array%(cell%(voicenum%),1,voicenum%)DIV10^8)
- gliss3% = 10 - gliss3%
- gliss3% = gliss3% * 85.5
- pitchinc = gliss3%/(dur%-point2%)
- :
- amp4% = (array%(cell%(voicenum%),2,voicenum%)DIV10^4)MOD10
- dyn4% = 384 + (16*amp4%)
- IF dyn4% = 512 THEN dyn4% = 511
- dynspan% = dyn4% - dyn3%
- dyninc = dynspan%/(dur%-point2%)
- :
- FOR loop% = 0 TO dur%-point2% STEP ((dur%-point2%)/32)*st%
- loud% = dyninc*loop%
- high% = pitchinc*loop%
- SOUND count%, dyn3%+loud%, pitch%+gliss1%+gliss2%+high%, 0, after%+point2%+loop%
- NEXT
- :
- ENDCASE
- :
- ENDPROC
- :
- REM******************************************************
- :
- DEF PROCquit
- :
- CLS
- PRINT''''" Do you want to SAVE"
- PRINT" before quitting?"
- CASE GET$ OF
- WHEN "N","n" :
- REM this line and next two 'deleted' for now - IF wavefilingsystem$ = "loaded" THEN
- REM *RMKill WFS
- REM ENDIF
- *NoDir
- QUIT
- OTHERWISE
- quitnow$ = "y"
- PROCsave
- ENDCASE
- ENDPROC
- :
- REM******************************************************
- :
- DEF PROCsave
- :
- firstnaming$ = "n"
- CLS
- IF filename$ = "" THEN
- INPUT'" filename "filename$
- firstnaming$ = "y"
- DIM lastfilename$(9)
- housekeepingdimmed$ = "y"
- PROChousekeeping
- ENDIF
- IF firstnaming$ = "n" THEN
- PRINT'" as '";filename$;"'?"
- CASE GET$ OF
- WHEN "N","n" :
- INPUT'" filename "filename$
- OTHERWISE
- ENDCASE
- ENDIF
- :
- *Dir HostFS::HardDisc4.$.CAC.Files
- :
- channel = OPENOUT filename$
- PRINT#channel, manynotes%
- PRINT#channel, numparts%
- PRINT#channel, nobars%
- PRINT#channel, startv%
- PRINT#channel, startv1%
- PRINT#channel, numbars%
- PRINT#channel, startbar%
- PRINT#channel, numvoices%
- PRINT#channel, factor%
- PRINT#channel, beatfactor%
- PRINT#channel, beams%
- PRINT#channel, longbeatsupper%
- PRINT#channel, longbeatslower%
- PRINT#channel, tempo%
- PRINT#channel, MM%
- PRINT#channel, notehead$
- PRINT#channel, longscore$
- PRINT#channel, barlines$
- PRINT#channel, staves$
- PRINT#channel, beats$
- PRINT#channel, amplitudes$
- PRINT#channel, names$
- PRINT#channel, accidentals$
- PRINT#channel, stems$
- PRINT#channel, xoption$
- PRINT#channel, durations$
- PRINT#channel, envelopes$
- PRINT#channel, glissandos$
- PRINT#channel, numwaves%
- PRINT#channel, manywaves%
- PRINT#channel, barnosoften%
- FOR c% = 0 TO (numparts%-1)
- PRINT#channel, numusedcells%(c%)
- NEXT
- FOR e% = 0 TO (numparts%-1)
- FOR d% = 0 TO 2
- FOR c% = 0 TO numusedcells%(e%)
- PRINT#channel, array%(c%,d%,e%)
- NEXT
- NEXT
- NEXT
- FOR c% = 0 TO numparts%
- FOR d% = 0 TO 2
- PRINT#channel, insts$(c%,d%)
- NEXT
- NEXT
- FOR c% = 0 TO nobars%
- FOR d% = 0 TO 3
- FOR e% = 0 TO (numparts%-1)
- PRINT#channel, disarray%(c%,d%,e%)
- NEXT
- NEXT
- NEXT
- FOR c% = 0 TO numparts%
- PRINT#channel, longbeamposn%(c%)
- NEXT
- FOR c% = 0 TO numparts%
- PRINT#channel, shortbeamposn%(c%)
- NEXT
- FOR c% = 0 TO numparts%
- PRINT#channel, shortamppos%(c%)
- NEXT
- FOR c% = 0 TO numparts%
- PRINT#channel, longamppos%(c%)
- NEXT
- FOR c% = 0 TO (numparts%-1)
- PRINT#channel, longstemdir$(c%)
- NEXT
- FOR c% = 0 TO (numparts%-1)
- PRINT#channel, shortstemdir$(c%)
- NEXT
- FOR c% = 0 TO numparts%
- PRINT#channel, waveforms$(c%)
- NEXT
- FOR c% = 0 TO numvoices%
- PRINT#channel, displayvoices%(c%)
- NEXT
- FOR c% = 0 TO 19
- PRINT#channel, wforms$(c%)
- NEXT
- FOR c% = 0 TO 8
- FOR d% = 0 TO 9
- PRINT#channel, lvdata%(c%,d%)
- NEXT
- NEXT
- FOR a% = 0 TO 47
- PRINT#channel, pitchset%(a%)
- NEXT
- FOR a% = 0 TO 47
- PRINT#channel, durset%(a%)
- NEXT
- FOR a% = 0 TO 47
- PRINT#channel, ampset%(a%)
- NEXT
- FOR a% = 0 TO 47
- PRINT#channel, glissset%(a%)
- NEXT
- FOR a% = 0 TO 47
- PRINT#channel, envset%(a%)
- NEXT
- FOR a% = 0 TO nobars%
- PRINT#channel, tempi%(a%)
- NEXT
- FOR a% = 0 TO nobars%
- FOR b% = 0 TO 1
- PRINT#channel, remarks$(a%,b%)
- NEXT
- NEXT
- :
- CLOSE#channel
- *NoDir
- :
- goproc$ = "y"
- FOR count% = 1 TO 9
- IF lastfilename$(count%) = filename$ THEN
- goproc$ = "n" : theone% = count%
- ENDIF
- NEXT
- IF goproc$ = "n" THEN
- IF theone% > 1 THEN
- PROCspecialshunt : PROCfornexttime
- ENDIF
- ENDIF
- IF goproc$ = "y" THEN
- PROCshuntlastfilename : PROCfornexttime
- ENDIF
- :
- PROCdisplay
- ENDPROC
- :
- REM******************************************
- :
- DEF PROCloadfile
- :
- housekeepingdimmed$ = "n"
- PROChousekeeping
- PRINT'" The most recent files saved were "
- FOR count% = 1 TO 9
- PRINT'count%;". ";lastfilename$(count%)
- NEXT
- PRINT'" To open one press its number, for another press 0 "
- CASE GET$ OF
- WHEN "1" : filename$ = lastfilename$(1)
- WHEN "2" : filename$ = lastfilename$(2)
- WHEN "3" : filename$ = lastfilename$(3)
- WHEN "4" : filename$ = lastfilename$(4)
- WHEN "5" : filename$ = lastfilename$(5)
- WHEN "6" : filename$ = lastfilename$(6)
- WHEN "7" : filename$ = lastfilename$(7)
- WHEN "8" : filename$ = lastfilename$(8)
- WHEN "9" : filename$ = lastfilename$(9)
- OTHERWISE
- INPUT'" the one you want is "filename$
- ENDCASE
- :
- *Dir HostFS::HardDisc4.$.CAC.Files
- channel = OPENIN filename$
- REPEAT
- INPUT#channel, manynotes%
- INPUT#channel, numparts%
- INPUT#channel, nobars%
- instsdimmed$ = "n"
- PROCarraysetup
- INPUT#channel, startv%
- INPUT#channel, startv1%
- INPUT#channel, numbars%
- INPUT#channel, startbar%
- INPUT#channel, numvoices%
- INPUT#channel, factor%
- INPUT#channel, beatfactor%
- INPUT#channel, beams%
- INPUT#channel, longbeatsupper%
- INPUT#channel, longbeatslower%
- INPUT#channel, tempo%
- INPUT#channel, MM%
- INPUT#channel, notehead$
- INPUT#channel, longscore$
- INPUT#channel, barlines$
- INPUT#channel, staves$
- INPUT#channel, beats$
- INPUT#channel, amplitudes$
- INPUT#channel, names$
- INPUT#channel, accidentals$
- INPUT#channel, stems$
- INPUT#channel, xoption$
- INPUT#channel, durations$
- INPUT#channel, envelopes$
- INPUT#channel, glissandos$
- INPUT#channel, numwaves%
- INPUT#channel, manywaves%
- INPUT#channel, barnosoften%
- FOR c% = 0 TO (numparts%-1)
- INPUT#channel, numusedcells%(c%)
- NEXT
- FOR e% = 0 TO (numparts%-1)
- FOR d% = 0 TO 2
- FOR c% = 0 TO numusedcells%(e%)
- INPUT#channel, array%(c%,d%,e%)
- NEXT
- NEXT
- NEXT
- FOR c% = 0 TO numparts%
- FOR d% = 0 TO 2
- INPUT#channel, insts$(c%,d%)
- NEXT
- NEXT
- FOR c% = 0 TO nobars%
- FOR d% = 0 TO 3
- FOR e% = 0 TO (numparts%-1)
- INPUT#channel, disarray%(c%,d%,e%)
- NEXT
- NEXT
- NEXT
- FOR c% = 0 TO numparts%
- INPUT#channel, longbeamposn%(c%)
- NEXT
- FOR c% = 0 TO numparts%
- INPUT#channel, shortbeamposn%(c%)
- NEXT
- FOR c% = 0 TO numparts%
- INPUT#channel, shortamppos%(c%)
- NEXT
- FOR c% = 0 TO numparts%
- INPUT#channel, longamppos%(c%)
- NEXT
- FOR c% = 0 TO (numparts%-1)
- INPUT#channel, longstemdir$(c%)
- NEXT
- FOR c% = 0 TO (numparts%-1)
- INPUT#channel, shortstemdir$(c%)
- NEXT
- FOR c% = 0 TO numparts%
- INPUT#channel, waveforms$(c%)
- NEXT
- FOR c% = 0 TO numvoices%
- INPUT#channel, displayvoices%(c%)
- NEXT
- FOR c% = 0 TO 19
- INPUT#channel, wforms$(c%)
- NEXT
- FOR c% = 0 TO 8
- FOR d% = 0 TO 9
- INPUT#channel, lvdata%(c%,d%)
- NEXT
- NEXT
- FOR a% = 0 TO 47
- INPUT#channel, pitchset%(a%)
- NEXT
- FOR a% = 0 TO 47
- INPUT#channel, durset%(a%)
- NEXT
- FOR a% = 0 TO 47
- INPUT#channel, ampset%(a%)
- NEXT
- FOR a% = 0 TO 47
- INPUT#channel, glissset%(a%)
- NEXT
- FOR a% = 0 TO 47
- INPUT#channel, envset%(a%)
- NEXT
- FOR a% = 0 TO nobars%
- INPUT#channel, tempi%(a%)
- tempi%(0) = tempi%(1)
- NEXT
- FOR a% = 0 TO nobars%
- FOR b% = 0 TO 1
- INPUT#channel, remarks$(a%,b%)
- NEXT
- NEXT
- :
- holdnum% = numvoices% : holdstart% = startv%
- FOR count% = 1 TO numvoices% : holddisplay%(count%) = displayvoices%(count%) : NEXT
- :
- UNTIL EOF#channel
- CLOSE#channel
- *NoDir
- :
- alterbeatsat% = (960/beatfactor%)/8
- :
- PROCdisplay
- :
- ENDPROC
- :
- REM******************************************************
- :
- DEF PROCplaysubmenu
- :
- PROCwindow(20,71,60,54)
- PRINT'" Load waveforms W"
- PRINT " Assign waveforms to voices A"
- PRINT " Set tempo T"
- PRINT " Set l.v. L"
- PRINT " Beats input B"
- PRINT " Memory setup M"
- PRINT " Display pitches in colours C"
- PRINT " Display options D"
- PRINT " Remarks R"
- PRINT " Rename staves S"
- PRINT " Change a stave's clef K"
- PRINT " Quickplay options Q"
- PRINT " Set stereo positions P"
- PRINT " Set key response speeds E"
- PRINT " Tutorial U"
- PRINT " Re-set parameter defaults V"
- CASE GET$ OF
- WHEN "v" : CLS
- PRINT'" Amplitude A"
- CASE GET$ OF
- WHEN "a" :
- PRINT'" Re-set default amplitude"
- INPUT " in a batch between which voice "firstvoice%
- INPUT'" and which voice "secondvoice%
- INPUT'" And set it at which amplitude "value$
- CASE value$ OF
- WHEN "fff" : value% = 8
- WHEN "ff" : value% = 7
- WHEN "f" : value% = 6
- WHEN "mf" : value% = 5
- WHEN "mp" : value% = 4
- WHEN "p" : value% = 3
- WHEN "pp" : value% = 2
- WHEN "ppp" : value% = 1
- WHEN "0" : value% = 0
- ENDCASE
- FOR count% = (firstvoice%-1) TO (secondvoice%-1)
- ampset%(count%) = value%
- NEXT
- ENDCASE
- PROCdisplay
- :
- WHEN "U","u" : CLS
- PRINT ' " Handling of durations D"
- PRINT ' " Bar '0' bug B"
- PRINT ' " Only voices with content O"
- PRINT ' " Exiting dialogue windows E"
- CASE GET$ OF
- WHEN "D","d" : PROCwindow(10,71,72,20) : CLS
- PRINT '" When a duration is input in bars/beats it is converted "
- PRINT '" into 1/20ths of a second at the current tempo "
- PRINT '" before being saved in the array. "
- PRINT '" (This is because when sounds are played, their durations "
- PRINT '" are given by BASIC to the OS as so many 1/20ths of a second). "
- PRINT' '" The Display procedure then reconverts back to bars/beats. "
- PRINT' '" Unavoidable floating point discrepencies occur during "
- PRINT '" this conversion/reconversion process, which often lead to "
- PRINT '" durations being displayed with different values to those "
- PRINT '" initially input, especially in the case of very small values. "
- PRINT ''" (to return to program press any key)"
- CASE GET$ OF
- WHEN "R","r" : PROCdisplay
- OTHERWISE PROCdisplay
- ENDCASE
- WHEN "B","b" : PROCwindow(10,71,72,20) : CLS
- PRINT '" Some files created before Oct 2017 will occasionally "
- PRINT '" display rogue notes to the left of the first bar with "
- PRINT '" odd gliss's and inflections, caused by inputting more "
- PRINT '" pitches than there were attacks (now not possible). "
- PRINT' '" To correct the file, use function Remove Rogue Notes. "
- PRINT' '" (to return to program press any key)"
- CASE GET$ OF
- WHEN "R","r" : PROCdisplay
- OTHERWISE PROCdisplay
- ENDCASE
- WHEN "O","o" : PROCwindow(10,71,72,20) : CLS
- PRINT '" This displays only the voices containing music out of the "
- PRINT '" currently requested display. Thus, to show the voices with "
- PRINT '" music for a different selection of bars/voices, first display "
- PRINT '" those bars/voices with this function turned off (by toggling) "
- PRINT '" then turn it back on again. "
- PRINT ''" (to return to program press any key)"
- CASE GET$ OF
- WHEN "R","r" : PROCdisplay
- OTHERWISE PROCdisplay
- ENDCASE
- WHEN "E","e" : PROCwindow(10,71,72,20) : CLS
- PRINT '" When no obvious key-presses are indicated, e.g. when you "
- PRINT '" want to exit a dialogue window at any point etc., simply "
- PRINT '" press <Esc> to return to the display. "
- CASE GET$ OF
- WHEN "R","r" : PROCdisplay
- OTHERWISE PROCdisplay
- ENDCASE
- :
- ENDCASE
- :
- WHEN "E","e" : CLS
- PRINT '" To set response time for downward "
- PRINT " copying from top stave press D "
- PRINT '" To set response time for "
- PRINT " move left/right press M "
- PRINT '" To set response time for "
- PRINT " move up/down press U "
- PRINT '" To set response time for pause "
- PRINT " after first digit input press F "
- PRINT '" To set response time for pause "
- PRINT " after second digit input press S "
- CASE GET$ OF
- WHEN "D","d" :
- CLS
- PRINT'" delay how many hundredths of a second "
- PRINT " (default is 50,";
- PRINT " currently set at ";downwardsspeed%;")"
- INPUT ' downwardsspeed%
- WHEN "M","m" :
- PRINT'" delay how many hundredths of a second "
- PRINT " (default is 25, currently set at ";horizscroll%;")"
- INPUT horizscroll%
- WHEN "U","u" :
- PRINT'" delay how many hundredths of a second "
- PRINT " (default is 25, currently set at ";vertscroll%;")"
- INPUT vertscroll%
- WHEN "F","f" :
- PRINT'" pause for how many hundredths "
- PRINT " of a second (currently ";waitafterfirst%;")"
- INPUT waitafterfirst%
- waitaftersecond% = waitafterfirst% : REM stops waiting unnecessarily for a 3rd digit
- WHEN "S","s" :
- PRINT'" pause for how many hundredths "
- PRINT " of a second (currently ";waitaftersecond%;")"
- INPUT waitaftersecond%
- ENDCASE
- PROCdisplay
- :
- WHEN "A","a" :
- PROCwindow(20,72,83,25)
- VDU 14
- PRINT'" Current assignations are "
- PRINT " (press Ctrl-Shift to scroll down) "
- FOR count% = 1 TO numparts%
- IF waveforms$(count%) <> "" THEN
- PRINT'" voice ";count%;
- IF insts$(count%,0)<> "" THEN PRINT " (";insts$(count%,0);")";
- PRINT " - ";waveforms$(count%)
- ENDIF
- NEXT
- VDU 15
- PRINT'" Do you want to keep these, reassign,"
- PRINT " use WaveSynth-Beep defaults, "
- PRINT " randomly assign sustaining/dry instruments/drums "
- PRINT " to all staves, or assign in groups "
- PRINT " (K/R/W/S/D/M/G) "
- CASE GET$ OF
- WHEN "R","r" : defaultvoices$ = "n" : PROCassignvoices : PROCdisplay
- WHEN "W","w" : defaultvoices$ = "y" : PROCassignvoices : PROCdisplay
- WHEN "K","k" : defaultvoices$ = "n" : PROCdisplay
- WHEN "S","s" : defaultvoices$ = "n" : type$ = "sustaining" : PROCrandomassign : PROCdisplay
- WHEN "M","m" : defaultvoices$ = "n" : type$ = "drums" : PROCrandomassign : PROCdisplay
- WHEN "D","d" : defaultvoices$ = "n" : PROCrandomdry : PROCdisplay
- WHEN "G","g" : defaultvoices$ = "n" : PROCgroupassign : PROCdisplay
- ENDCASE
- WHEN "T","t" : PROCtempo
- WHEN "L","l" : PROClv
- WHEN "W","w" : PROCloadwaveforms
- WHEN "B","b" :
- CLS : PRINT' " Typing numbers up to ";((960/beatfactor%)/8)-1
- PRINT " should be read as macro-beats "
- PRINT" or micro-beats? (+/-) "
- CASE GET$ OF
- WHEN "+","=" : alterbeatsat% = (960/beatfactor%)/8
- OTHERWISE
- alterbeatsat% = 0
- ENDCASE
- :
- PROCdisplay
- WHEN "M","m" :
- CLS : PRINT '" This file was set up as follows:"
- PRINT" Number of bars - ";nobars%
- PRINT" Notes per bar in busiest - ";manynotes%/nobars%
- PRINT" Number of voices - ";numparts%
- PRINT'" (Press a key to continue)"
- CASE GET$ OF
- WHEN "C","c" :
- OTHERWISE
- ENDCASE
- PROCdisplay
- WHEN "C","c" :
- CLS : PRINT'" Do you want any pitches displayed in "
- PRINT " in colours?"
- CASE GET$ OF
- WHEN "Y","y" :
- PRINT'" Re-define these, or use previous "
- PRINT " settings? (R/P)"
- CASE GET$ OF
- WHEN "R","r" :
- INPUT'" How many colours "numcols%
- FOR tt% = 1 TO numcols%
- PRINT'" Colour ";tt%;" has how many pitches "
- INPUT numredpitches%(tt%)
- FOR ttt% = 1 TO numredpitches%(tt%)
- PRINT' " Note name for pitch ";ttt%;" is ";
- COLOUR 3
- CASE GET$ OF
- WHEN "C","c" : note% = 0 : PRINT "C"
- WHEN "D","d" : note% = 1 : PRINT "D"
- WHEN "E","e" : note% = 2 : PRINT "E"
- WHEN "F","f" : note% = 3 : PRINT "F"
- WHEN "G","g" : note% = 4 : PRINT "G"
- WHEN "A","a" : note% = 5 : PRINT "A"
- WHEN "B","b" : note% = 6 : PRINT "B"
- ENDCASE
- COLOUR 0
- PRINT " accidental ";
- COLOUR 3
- CASE GET$ OF
- WHEN "1" : accid% = 1 : PRINT "flat"
- WHEN "2" : accid% = 2 : PRINT "3/8flat"
- WHEN "3" : accid% = 3 : PRINT "1/4flat"
- WHEN "4" : accid% = 4 : PRINT "1/8flat"
- WHEN "5" : accid% = 5 : PRINT "nat"
- WHEN "6" : accid% = 6 : PRINT "1/8shrp"
- WHEN "7" : accid% = 7 : PRINT "1/4shrp"
- WHEN "8" : accid% = 8 : PRINT "3/8shrp"
- WHEN "9" : accid% = 9 : PRINT "shrp"
- ENDCASE
- COLOUR 0
- PRINT " octave ";
- COLOUR 3
- CASE GET$ OF
- WHEN "0" : octave% = 0 : PRINT "0"
- WHEN "1" : octave% = 1 : PRINT "1"
- WHEN "2" : octave% = 2 : PRINT "2"
- WHEN "3" : octave% = 3 : PRINT "3"
- WHEN "4" : octave% = 4 : PRINT "4"
- WHEN "5" : octave% = 5 : PRINT "5"
- WHEN "6" : octave% = 6 : PRINT "6"
- WHEN "7" : octave% = 7 : PRINT "7"
- WHEN "8" : octave% = 8 : PRINT "8"
- ENDCASE
- COLOUR 0
- redpitches%(tt%,ttt%) = (note%*100)+(accid%*10)+octave%
- NEXT
- NEXT
- redpitches$ = "y"
- OTHERWISE
- redpitches$ = "n"
- FOR count% = 0 TO 9
- IF numredpitches%(count%) <> 0 THEN redpitches$ = "y"
- NEXT
- ENDCASE
- OTHERWISE redpitches$ = "n"
- ENDCASE
- PROCdisplay
- :
- WHEN "D","d" : PROCdisplayoptions : PROCdisplay
- WHEN "R","r" : PROCremarks : PROCdisplay
- WHEN "S","s" : PROCnamestaves : PROCdisplay
- WHEN "K","k" : PROCchangeclef : PROCdisplay
- WHEN "Q","q" :
- CLS
- PRINT '" Quickplay (by pressing P)"
- PRINT " how many voices downwards"
- INPUT" from top of screen "quickplay%
- PROCdisplay
- WHEN "P","p" :
- CLS
- PRINT' " (Voices are assigned to channels 1-8 "
- PRINT " according to the order in which "
- PRINT " they are typed into Play) "
- PRINT' " Set the 8 channels to stereo "
- PRINT " positions 12344567, keep mono default, "
- PRINT " set the 8 channels to random positions "
- PRINT " or define channels' stereo positions "
- PRINT " (S/M/R/D) "
- CASE GET$ OF
- WHEN "S","s" :
- STEREO 1, -127
- STEREO 2, -79
- STEREO 3, -47
- STEREO 4, -15
- STEREO 5, -15
- STEREO 6, +16
- STEREO 7, +48
- STEREO 8, +80
- WHEN "M","m" :
- STEREO 1, -15
- STEREO 2, -15
- STEREO 3, -15
- STEREO 4, -15
- STEREO 5, -15
- STEREO 6, -15
- STEREO 7, -15
- STEREO 8, -15
- WHEN "D","d" :
- CLS
- PRINT '" Define positions for how many "
- INPUT " channels "numchannels%
- FOR count% = 1 TO numchannels%
- PRINT' " Channel ";count%;" is set to which "
- INPUT " stereo position of the 7 available "position%
- CASE count% OF
- WHEN 1 :
- CASE position% OF
- WHEN 1 : STEREO 1, -127
- WHEN 2 : STEREO 1, -79
- WHEN 3 : STEREO 1, -47
- WHEN 4 : STEREO 1, -15
- WHEN 5 : STEREO 1, +16
- WHEN 6 : STEREO 1, +48
- WHEN 7 : STEREO 1, +80
- ENDCASE
- WHEN 2 :
- CASE position% OF
- WHEN 1 : STEREO 2, -127
- WHEN 2 : STEREO 2, -79
- WHEN 3 : STEREO 2, -47
- WHEN 4 : STEREO 2, -15
- WHEN 5 : STEREO 2, +16
- WHEN 6 : STEREO 2, +48
- WHEN 7 : STEREO 2, +80
- ENDCASE
- WHEN 3 :
- CASE position% OF
- WHEN 1 : STEREO 3, -127
- WHEN 2 : STEREO 3, -79
- WHEN 3 : STEREO 3, -47
- WHEN 4 : STEREO 3, -15
- WHEN 5 : STEREO 3, +16
- WHEN 6 : STEREO 3, +48
- WHEN 7 : STEREO 3, +80
- ENDCASE
- WHEN 4 :
- CASE position% OF
- WHEN 1 : STEREO 4, -127
- WHEN 2 : STEREO 4, -79
- WHEN 3 : STEREO 4, -47
- WHEN 4 : STEREO 4, -15
- WHEN 5 : STEREO 4, +16
- WHEN 6 : STEREO 4, +48
- WHEN 7 : STEREO 4, +80
- ENDCASE
- WHEN 5 :
- CASE position% OF
- WHEN 1 : STEREO 5, -127
- WHEN 2 : STEREO 5, -79
- WHEN 3 : STEREO 5, -47
- WHEN 4 : STEREO 5, -15
- WHEN 5 : STEREO 5, +16
- WHEN 6 : STEREO 5, +48
- WHEN 7 : STEREO 5, +80
- ENDCASE
- WHEN 6 :
- CASE position% OF
- WHEN 1 : STEREO 6, -127
- WHEN 2 : STEREO 6, -79
- WHEN 3 : STEREO 6, -47
- WHEN 4 : STEREO 6, -15
- WHEN 5 : STEREO 6, +16
- WHEN 6 : STEREO 6, +48
- WHEN 7 : STEREO 6, +80
- ENDCASE
- WHEN 7 :
- CASE position% OF
- WHEN 1 : STEREO 7, -127
- WHEN 2 : STEREO 7, -79
- WHEN 3 : STEREO 7, -47
- WHEN 4 : STEREO 7, -15
- WHEN 5 : STEREO 7, +16
- WHEN 6 : STEREO 7, +48
- WHEN 7 : STEREO 7, +80
- ENDCASE
- WHEN 8 :
- CASE position% OF
- WHEN 1 : STEREO 8, -127
- WHEN 2 : STEREO 8, -79
- WHEN 3 : STEREO 8, -47
- WHEN 4 : STEREO 8, -15
- WHEN 5 : STEREO 8, +16
- WHEN 6 : STEREO 8, +48
- WHEN 7 : STEREO 8, +80
- ENDCASE
- ENDCASE
- NEXT
- WHEN "R","r" :
- position% = RND(7)
- CASE position% OF
- WHEN 1 : STEREO 1, -127
- WHEN 2 : STEREO 1, -79
- WHEN 3 : STEREO 1, -47
- WHEN 4 : STEREO 1, -15
- WHEN 5 : STEREO 1, +16
- WHEN 6 : STEREO 1, +48
- WHEN 7 : STEREO 1, +80
- ENDCASE
- position% = RND(7)
- CASE position% OF
- WHEN 1 : STEREO 2, -127
- WHEN 2 : STEREO 2, -79
- WHEN 3 : STEREO 2, -47
- WHEN 4 : STEREO 2, -15
- WHEN 5 : STEREO 2, +16
- WHEN 6 : STEREO 2, +48
- WHEN 7 : STEREO 2, +80
- ENDCASE
- position% = RND(7)
- CASE position% OF
- WHEN 1 : STEREO 3, -127
- WHEN 2 : STEREO 3, -79
- WHEN 3 : STEREO 3, -47
- WHEN 4 : STEREO 3, -15
- WHEN 5 : STEREO 3, +16
- WHEN 6 : STEREO 3, +48
- WHEN 7 : STEREO 3, +80
- ENDCASE
- position% = RND(7)
- CASE position% OF
- WHEN 1 : STEREO 4, -127
- WHEN 2 : STEREO 4, -79
- WHEN 3 : STEREO 4, -47
- WHEN 4 : STEREO 4, -15
- WHEN 5 : STEREO 4, +16
- WHEN 6 : STEREO 4, +48
- WHEN 7 : STEREO 4, +80
- ENDCASE
- position% = RND(7)
- CASE position% OF
- WHEN 1 : STEREO 5, -127
- WHEN 2 : STEREO 5, -79
- WHEN 3 : STEREO 5, -47
- WHEN 4 : STEREO 5, -15
- WHEN 5 : STEREO 5, +16
- WHEN 6 : STEREO 5, +48
- WHEN 7 : STEREO 5, +80
- ENDCASE
- position% = RND(7)
- CASE position% OF
- WHEN 1 : STEREO 6, -127
- WHEN 2 : STEREO 6, -79
- WHEN 3 : STEREO 6, -47
- WHEN 4 : STEREO 6, -15
- WHEN 5 : STEREO 6, +16
- WHEN 6 : STEREO 6, +48
- WHEN 7 : STEREO 6, +80
- ENDCASE
- position% = RND(7)
- CASE position% OF
- WHEN 1 : STEREO 7, -127
- WHEN 2 : STEREO 7, -79
- WHEN 3 : STEREO 7, -47
- WHEN 4 : STEREO 7, -15
- WHEN 5 : STEREO 7, +16
- WHEN 6 : STEREO 7, +48
- WHEN 7 : STEREO 7, +80
- ENDCASE
- position% = RND(7)
- CASE position% OF
- WHEN 1 : STEREO 8, -127
- WHEN 2 : STEREO 8, -79
- WHEN 3 : STEREO 8, -47
- WHEN 4 : STEREO 8, -15
- WHEN 5 : STEREO 8, +16
- WHEN 6 : STEREO 8, +48
- WHEN 7 : STEREO 8, +80
- ENDCASE
- :
- ENDCASE
- PROCdisplay
- OTHERWISE VDU 7 : PROCplaysubmenu
- ENDCASE
- :
- ENDPROC
- :
- REM*******************************************
- :
- DEF PROClv
- :
- CLS
- lvdata%() = 0
- PRINT'" How many sound channels"
- INPUT" are to generate lv "nlv%
- IF nlv% = 0 THEN
- lvdata%() = 0
- ELSE
- FOR count% = 1 TO nlv%
- PRINT '" lv channel ";count%;" is to use"
- PRINT " how many other channels?"
- INPUT numchans%
- FOR c% = 1 TO numchans%
- PRINT '" of these, channel ";c%;" is channel"
- INPUT ch%
- lvdata%(count%,c%+1) = ch%
- NEXT
- lvdata%(count%,1) = count%
- NEXT
- ENDIF
- :
- PROCdisplay
- :
- ENDPROC
- :
- REM***********************************
- :
- DEF PROCloadwaveforms
- :
- CLS
- IF waveload$ = "done" THEN
- PROCwindow(20,71,60,35) : CLS
- PRINT'" These waveforms have already been loaded"
- PRINT " (press Ctrl-Shft to scroll down)"
- VDU 14
- FOR count% = 1 TO manywaves%
- PRINT'wforms$(count%)
- NEXT
- VDU 15
- PRINT' " Do you want to load a fresh group?"
- CASE GET$ OF
- WHEN "Y","y" : PRINT' " Press M then quit, to"
- PRINT " flush present waveforms"
- CASE GET$ OF
- WHEN "M","m" : PROCawait
- ENDCASE
- OTHERWISE PROCdisplay
- ENDCASE
- ELSE
- load$ = "new"
- IF filename$ <> "" AND wforms$(1) <> "" THEN
- PROCwindow(20,71,60,45)
- PRINT'" The waveforms previously "
- PRINT" loaded for this file were"
- PRINT" (press Ctrl-Shift to scroll down)"
- VDU 14
- FOR count% = 1 TO manywaves%
- PRINT'wforms$(count%)
- NEXT
- VDU 15
- PRINT'" Do you want to reload"
- PRINT " these or choose new ones (R/N)"
- CASE GET$ OF
- WHEN "R","r" : load$ = "previous"
- OTHERWISE
- ENDCASE
- ENDIF
- :
- IF load$ = "new" THEN
- :
- PRINT '" load individually or from lists? (I/L) "
- CASE GET$ OF
- WHEN "I","i" :
- PRINT '" How many waveforms do you want to load"
- PRINT " (the maximum for this file is ";numwaves%;")"
- INPUT manywaves%
- FOR count% = 1 TO manywaves%
- PRINT '" waveform ";count%;" is "
- INPUT wform$
- wforms$(count%) = wform$
- NEXT
- OTHERWISE
- PRINT'" Sustaining insts A "
- PRINT'" Percussion insts B "
- PRINT'" Percussion insts C "
- PRINT " (press A/B/C) "
- CASE GET$ OF
- WHEN "A","a" :
- manywaves% = 19
- wforms$(1) = "RecorderGb"
- wforms$(2) = "PiccoloE"
- wforms$(3) = "SaxSoprnoE"
- wforms$(4) = "JapFlute"
- wforms$(5) = "SaxBbTenrE"
- wforms$(6) = "BugleC"
- wforms$(7) = "Trombone1"
- wforms$(8) = "Trumpet"
- wforms$(9) = "EngHornGb"
- wforms$(10) = "ClarinetBb"
- wforms$(11) = "ClarVibEb"
- wforms$(12) = "BassoonEb"
- wforms$(13) = "FlugelHnEb"
- wforms$(14) = "CornetEb"
- wforms$(15) = "TubaGb"
- wforms$(16) = "HiString"
- wforms$(17) = "MidStrings"
- wforms$(18) = "BassBowAb"
- wforms$(19) = "SaxEbBarC"
- WHEN "B","b" :
- manywaves% = 19
- wforms$(1) = "Harp1"
- wforms$(2) = "Piano"
- wforms$(3) = "Vibe"
- wforms$(4) = "Timpani"
- wforms$(5) = "TimpRollEb"
- wforms$(6) = "Xylophone"
- wforms$(7) = "TablaHi"
- wforms$(8) = "BDPiloMute"
- wforms$(9) = "Snare"
- wforms$(10) = "TablaHi"
- wforms$(11) = "CymRStRoll"
- wforms$(12) = "CowBell"
- wforms$(13) = "AcuBassAb1"
- wforms$(14) = "GongSoft"
- wforms$(15) = "RotoTomRev"
- wforms$(16) = "HiHat"
- wforms$(17) = "Maracas1"
- wforms$(18) = "SimmonsBD1"
- wforms$(19) = "HiHatFoot"
- WHEN "C","c" :
- manywaves% = 19
- wforms$(1) = "CymSplshCa"
- wforms$(2) = "BassBowAb"
- wforms$(3) = "Bass"
- wforms$(4) = "HiHat"
- wforms$(5) = "HiHatFoot"
- wforms$(6) = "Maracas1"
- wforms$(7) = "CachichiTr"
- wforms$(8) = "BDPiloMute"
- wforms$(9) = "AcuBassAb1"
- wforms$(10) = "SimmonsBD1"
- wforms$(11) = "CymRideBel"
- wforms$(12) = "CowBell"
- wforms$(13) = "AcouBass"
- wforms$(14) = "RotoTomRev"
- wforms$(15) = "Castanets"
- wforms$(16) = "ElecTom1"
- wforms$(17) = "CymbalCrsh"
- wforms$(18) = "CymRStRoll"
- wforms$(19) = "Tomtom1"
- ENDCASE
- :
- ENDCASE
- :
- ENDIF
- :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Voices
- *RMLOAD WFS 500000
- wavefilingsystem$ = "loaded"
- :
- FOR count% = 1 TO manywaves%
- wave$ = wforms$(count%)
- CASE wave$ OF
- WHEN "BassBowAb" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD BassBowAb
- *WINSTALL BassBowAb
- WHEN "Vibe" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD Vibe
- *WINSTALL Vibe
- WHEN "AcouBass" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD AcouBass
- *WINSTALL AcouBass
- WHEN "BugleC" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD BugleC
- *WINSTALL BugleC
- WHEN "CornetEb" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD CornetEb
- *WINSTALL CornetEb
- WHEN "SaxEbBarC" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD SaxEbBarC
- *WINSTALL SaxEbBarC
- WHEN "SaxBbTenrE" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD SaxBbTenrE
- *WINSTALL SaxBbTenrE
- WHEN "BassoonEb" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD BassoonEb
- *WINSTALL BassoonEb
- WHEN "ClarinetBb" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD ClarinetBb
- *WINSTALL ClarinetBb
- WHEN "EngHornGb" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD EngHornGb
- *WINSTALL EngHornGb
- WHEN "MandolinDb" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD MandolinDb
- *WINSTALL MandolinDb
- WHEN "Piano2B" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD Piano2B
- *WINSTALL Piano2B
- WHEN "ClarVibEb" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD ClarVibEb
- *WINSTALL ClarVibEb
- WHEN "GtrDobroB" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD GtrDobroB
- *WINSTALL GtrDobroB
- WHEN "RecorderGb" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD RecorderGb
- *WINSTALL RecorderGb
- WHEN "FlugelHnEb" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD FlugelHnEb
- *WINSTALL FlugelHnEb
- WHEN "VceMmmGb23" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations3
- *WLOAD VceMmmGb23
- *WINSTALL VceMmmGb23
- WHEN "VceMOooGb3" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations3
- *WLOAD VceMOooGb3
- *WINSTALL VceMOooGb3
- WHEN "VceFemAahC" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations3
- *WLOAD VceFemAahC
- *WINSTALL VceFemAahC
- WHEN "VceFMmmGb4" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations3
- *WLOAD VceFMmmGb4
- *WINSTALL VceFMmmGb4
- WHEN "Bass" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.SoundSynth
- *WLOAD Bass
- *WINSTALL Bass
- WHEN "ChurchBell" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.SoundSynth
- *WLOAD ChurchBell
- *WINSTALL ChurchBell
- WHEN "GuiroFast" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD GuiroFast
- *WINSTALL GuiroFast
- WHEN "Clave" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD Clave
- *WINSTALL Clave
- WHEN "CowBell" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD CowBell
- *WINSTALL CowBell
- WHEN "CymbRideHd" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD CymbRideHd
- *WINSTALL CymbRideHd
- WHEN "AcGuitar1" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD AcGuitar1
- *WINSTALL AcGuitar1
- WHEN "CongaHi" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD CongaHi
- *WINSTALL CongaHi
- WHEN "DrumExplo" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD DrumExplo
- *WINSTALL DrumExplo
- WHEN "ElecTom1" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD ElecTom1
- *WINSTALL ElecTom1
- WHEN "Harp1" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD Harp1
- *WINSTALL Harp1
- WHEN "Harpsi" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD Harpsi
- *WINSTALL Harpsi
- WHEN "HiString" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD HiString
- *WINSTALL HiString
- WHEN "HonkyPiano" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD HonkyPiano
- *WINSTALL HonkyPiano
- WHEN "JapFlute" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD JapFlute
- *WINSTALL JapFlute
- WHEN "JazzOrgan" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD JazzOrgan
- *WINSTALL JazzOrgan
- WHEN "MidStrings" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD MidStrings
- *WINSTALL MidStrings
- WHEN "NoteArp1" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD NoteArp1
- *WINSTALL NoteArp1
- WHEN "SnareEcho" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD SnareEcho
- *WINSTALL SnareEcho
- WHEN "TablaHi" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD TablaHi
- *WINSTALL TablaHi
- WHEN "Timpani" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD Timpani
- *WINSTALL Timpani
- WHEN "Tomtom1" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD Tomtom1
- *WINSTALL Tomtom1
- WHEN "Trombone1" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD Trombone1
- *WINSTALL Trombone1
- WHEN "Trumpet" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD Trumpet
- *WINSTALL Trumpet
- WHEN "Xylophone" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD Xylophone
- *WINSTALL Xylophone
- WHEN "AcouGtr2B" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD AcouGtr2B
- *WINSTALL AcouGtr2B
- WHEN "AcuBassAb1" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD AcuBassAb1
- *WINSTALL AcuBassAb1
- WHEN "BagPipeG" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD BagPipeG
- *WINSTALL BagPipeG
- WHEN "BanjoChdBb" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD BanjoChdBb
- *WINSTALL BanjoChdBb
- WHEN "BazookiE" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD BazookiE
- *WINSTALL BazookiE
- WHEN "BellC" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD BellC
- *WINSTALL BellC
- WHEN "BrassEns1B" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD BrassEns1B
- *WINSTALL BrassEns1B
- WHEN "ClavichdBb" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD ClavichdBb
- *WINSTALL ClavichdBb
- WHEN "ClavinetBb" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD ClavinetBb
- *WINSTALL ClavinetBb
- WHEN "CornetEb" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD CornetEb
- *WINSTALL CornetEb
- WHEN "EnsWodAb45" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD EnsWodAb45
- *WINSTALL EnsWodAb45
- WHEN "EnsWodGb12" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD EnsWodGb12
- *WINSTALL EnsWodGb12
- WHEN "Glock2Ab5" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD Glock2Ab5
- *WINSTALL Glock2Ab5
- WHEN "GtMelobarC" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD GtMelobarC
- *WINSTALL GtMelobarC
- WHEN "GtWashbnBb" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD GtWashbnBb
- *WINSTALL GtWashbnBb
- WHEN "HarmonicaE" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD HarmonicaE
- *WINSTALL HarmonicaE
- WHEN "Jew'sHarpA" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD Jew'sHarpA
- *WINSTALL Jew'sHarpA
- WHEN "MusetteB" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD MusetteB
- *WINSTALL MusetteB
- WHEN "OboeGb" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD OboeGb
- *WINSTALL OboeGb
- WHEN "OrchHit2B" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD OrchHit2B
- *WINSTALL OrchHit2B
- WHEN "OrcSusBb23" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD OrcSusBb23
- *WINSTALL OrcSusBb23
- WHEN "PiccoloE" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD PiccoloE
- *WINSTALL PiccoloE
- WHEN "SaxSoprnoE" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD SaxSoprnoE
- *WINSTALL SaxSoprnoE
- WHEN "StrngThkBb" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD StrngThkBb
- *WINSTALL StrngThkBb
- WHEN "TubaGb" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations2
- *WLOAD TubaGb
- *WINSTALL TubaGb
- WHEN "BassDrum" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.SoundSynth
- *WLOAD BassDrum
- *WINSTALL BassDrum
- WHEN "HiHat" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.SoundSynth
- *WLOAD HiHat
- *WINSTALL HiHat
- WHEN "OrcHit" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.SoundSynth
- *WLOAD OrcHit
- *WINSTALL OrcHit
- WHEN "Piano" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.SoundSynth
- *WLOAD Piano
- *WINSTALL Piano
- WHEN "Sax" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.SoundSynth
- *WLOAD Sax
- *WINSTALL Sax
- WHEN "Snare" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.SoundSynth
- *WLOAD Snare
- *WINSTALL Snare
- WHEN "Choir1" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD Choir1
- *WINSTALL Choir1
- WHEN "ChurOrgan" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD ChurOrgan
- *WINSTALL ChurOrgan
- WHEN "Opera" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD Opera
- *WINSTALL Opera
- WHEN "OrchChoir" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD OrchChoir
- *WINSTALL OrchChoir
- WHEN "OrganHit" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations1
- *WLOAD OrganHit
- *WINSTALL OrganHit
- WHEN "AgogoAfric" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD AgogoAfric
- *WINSTALL AgogoAfric
- WHEN "AgogoBrazi" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD AgogoBrazi
- *WINSTALL AgogoBrazi
- WHEN "AgogoWood" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD AgogoWood
- *WINSTALL AgogoWood
- WHEN "BDGatedRev" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD BDGatedRev
- *WINSTALL BDGatedRev
- WHEN "BDMarching" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD BDMarching
- *WINSTALL BDMarching
- WHEN "BDPiloMute" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD BDPiloMute
- *WINSTALL BDPiloMute
- WHEN "Cabasa" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD Cabasa
- *WINSTALL Cabasa
- WHEN "Cachichi1" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD Cachichi1
- *WINSTALL Cachichi1
- WHEN "CachichiTr" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD CachichiTr
- *WINSTALL CachichiTr
- WHEN "Castanets" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD Castanets
- *WINSTALL Castanets
- WHEN "CongaMid" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD CongaMid
- *WINSTALL CongaMid
- WHEN "CongaSmCl" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD CongaSmCl
- *WINSTALL CongaSmCl
- WHEN "CymbalCrsh" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD CymbalCrsh
- *WINSTALL CymbalCrsh
- WHEN "CymRideBel" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD CymRideBel
- *WINSTALL CymRideBel
- WHEN "CymRStRoll" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD CymRStRoll
- *WINSTALL CymRStRoll
- WHEN "CymSplshCa" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD CymSplshCa
- *WINSTALL CymSplshCa
- WHEN "Flexitone" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD Flexitone
- *WINSTALL Flexitone
- WHEN "GongSoft" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD GongSoft
- *WINSTALL GongSoft
- WHEN "Gonza1" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD Gonza1
- *WINSTALL Gonza1
- WHEN "GuiroSlow" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD GuiroSlow
- *WINSTALL GuiroSlow
- WHEN "HandClaps" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD HandClaps
- *WINSTALL HandClaps
- WHEN "HiHatFoot" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD HiHatFoot
- *WINSTALL HiHatFoot
- WHEN "Maracas1" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD Maracas1
- *WINSTALL Maracas1
- WHEN "Ratchet" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD Ratchet
- *WINSTALL Ratchet
- WHEN "RotoTomRev" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD RotoTomRev
- *WINSTALL RotoTomRev
- WHEN "SimmonsBD1" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD SimmonsBD1
- *WINSTALL SimmonsBD1
- WHEN "SimmonsSn1" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD SimmonsSn1
- *WINSTALL SimmonsSn1
- WHEN "SuperGong" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD SuperGong
- *WINSTALL SuperGong
- WHEN "SynTom" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD SynTom
- *WINSTALL SynTom
- WHEN "TimpCresBb" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD TimpCresBb
- *WINSTALL TimpCresBb
- WHEN "TimpLowBb" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD TimpLowBb
- *WINSTALL TimpLowBb
- WHEN "TimpRollEb" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD TimpRollEb
- *WINSTALL TimpRollEb
- WHEN "TomRoll" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD TomRoll
- *WINSTALL TomRoll
- WHEN "ToyHooter" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD ToyHooter
- *WINSTALL ToyHooter
- WHEN "ToyWhistle" :
- *Dir HostFS::HardDisc4.$.CAC.CACvar.Creations.Creations6
- *WLOAD ToyWhistle
- *WINSTALL ToyWhistle
- OTHERWISE VDU 7 : PRINT''" !!! ";wave$;" not loaded !!!"
- PRINT'" Press C to continue loading"
- CASE GET$ OF
- WHEN"C","c" :
- ENDCASE
- ENDCASE
- NEXT
- waveload$ = "done"
- ENDIF
- *NoDir
- PROCdisplay
- ENDPROC
- :
- REM*********************************************
- :
- DEF PROCtempo
- :
- warning$ = "y"
- CLS
- PRINT'" Tempo to start at which bar "
- INPUT " (for 1 type 0)"sbar%
- PRINT'" and last until which bar "
- INPUT " (for end type 0) "ebar%
- IF ebar% = 0 THEN ebar% = nobars%
- INPUT'" Tempo per bar is "MM%
- :
- REM convert durations to new tempo
- FOR count% = 0 TO numparts%-1
- FOR counter% = 0 TO numusedcells%(count%)
- bar% = array%(counter%,0,count%)DIV10^6
- IF bar% >= sbar% AND bar% <= ebar% THEN
- oldtempo% = tempi%(bar%)
- dur% = (array%(counter%,1,count%)DIV10)MOD10^3
- converter = oldtempo%/MM%
- dur = dur% * converter
- fraction = ((dur*10)DIV1)MOD10
- IF fraction>4 THEN dur% = dur+1 ELSE dur% = dur
- IF dur% > 999 THEN
- dur% = 998 : REM only 3 array cells available
- IF warning$ = "y" THEN
- VDU 7
- CLS
- PRINT'" This tempo change has resulted in some "
- PRINT " voices, starting with voice ";count%+1;", being "
- PRINT " given a duration which will now be "
- PRINT " permanently too short (max = 50 secs). "
- PRINT'" If this is okay simply continue, "
- PRINT " otherwise now QUIT and reload the file. "
- PRINT'" (to continue press a key - NOT Esc)"
- CASE GET$ OF
- WHEN "c" : warning$ = "n"
- OTHERWISE warning$ = "n"
- ENDCASE
- ENDIF
- ENDIF
- part1% = (array%(counter%,1,count%)DIV10^4)*10^4
- part2% = dur% * 10
- part3% = array%(counter%,1,count%)MOD10
- array%(counter%,1,count%) = part1% + part2% + part3%
- ENDIF
- NEXT
- NEXT
- :
- FOR count% = sbar% TO ebar%
- tempi%(count%) = MM%
- NEXT
- IF sbar% = 1 THEN tempi%(0) = MM% : REM anticipates a bug when bars 1 - 1 PLAYed
- :
- PROCdisplay
- :
- ENDPROC
- :
- REM************************************************
- :
- DEF PROCerror
- :
- CASE errorbeforedisplay$ OF
- WHEN "y":
- CLS
- REPORT
- PRINT " at line ";ERL
- PRINT '" To continue press Q to quit"
- PRINT '" then allocate more memory in "
- PRINT '" Tasks before starting CAC "
- CASE GET$ OF
- WHEN "Q","q" : QUIT
- ENDCASE
- WHEN "debug" :
- PROCwindow(20,69,60,54)
- REPORT
- PRINT " at line ";ERL
- PRINT'" To continue press a key"
- PRINT'" or to quit press Q "
- CASE GET$ OF
- WHEN "Q","q": QUIT
- OTHERWISE
- PROCdisplay
- ENDCASE
- OTHERWISE
- PROCdisplay
- ENDCASE
- :
- ENDPROC
- :
- REM*************************************************
- :
- DEF PROCtobegin
- :
- PRINT''''" Open a new file or an existing one? (N/E)"
- CASE GET$ OF
- WHEN "N","n" : PROCprearraysetup : PROCarraysetup
- alterbeatsat% = (960/beatfactor%)/8 : PROCdisplay
- WHEN "E","e" : PROCloadfile
- OTHERWISE VDU 7 : PROCtobegin
- ENDCASE
- :
- ENDPROC
- :
- REM************************************************
- :
- DEF PROCfunctionreception
- :
- PROCwindow(20,69,60,54)
- CLS : OFF
- :
- PRINT'" Accel/rit A"
- PRINT " Layered attacks L"
- PRINT " Pitch string P"
- PRINT " Pitch string 2 S"
- PRINT " Pitch string 3 N"
- PRINT " Pitch string 4 (trill/trem) T"
- PRINT " pitch string 5 (pattern) R"
- PRINT " pitch string 6 (equal steps) C"
- PRINT " Interval string I"
- PRINT " Distort D"
- PRINT " Slave voice V"
- PRINT " Double-stop B"
- PRINT " Convert old envelopes E"
- PRINT " Remove rogue notes O"
- CASE GET$ OF
- WHEN "A","a" : PROCfunctionprelude
- WHEN "L","l" : PROCprelayeredattacks
- WHEN "P","p" : PROCpitchstring
- WHEN "S","s" : PROCpitchstring2
- WHEN "N","n" : PROCpitchstring3
- WHEN "T","t" : PROCpitchstring4
- WHEN "R","r" : PROCpitchstring5
- WHEN "C","c" : PROCpitchstring6
- WHEN "I","i" : PROCpreintervalstring
- WHEN "D","d" : distort$ = "ON" : CLS
- PRINT''" Distort"
- PRINT'" ATTACKS A"
- PRINT " PITCHES P"
- PRINT " DURATIONS D"
- PRINT " AMPLITUDES M"
- PRINT " ENVELOPES E"
- PRINT " INFLECTIONS I"
- CASE GET$ OF
- WHEN "A","a" : distortpara$ = "attacks"
- WHEN "P","p" : distortpara$ = "pitches"
- WHEN "D","d" : distortpara$ = "durations"
- WHEN "M","m" : distortpara$ = "amplitudes"
- WHEN "E","e" : distortpara$ = "envelopes"
- WHEN "I","i" : distortpara$ = "inflections"
- OTHERWISE VDU 7 : PROCfunctionreception
- ENDCASE
- PROCcopy
- WHEN "V","v" : quickslave$ = "n" : PROCslave
- WHEN "B","b" : PROCdoublestop
- WHEN "E", "e" : PROCconvertoldenvelopes
- WHEN "O", "o" : PROCroguenotes
- OTHERWISE VDU 7 : PROCfunctionreception
- ENDCASE
- ON
- :
- ENDPROC
- :
- REM**********************************************
- :
- DEF PROCprelayeredattacks
- :
- PROCwindow(20,69,70,55)
- :
- PRINT'" Re-run current settings, or edit current settings,"
- PRINT" or create new ones, or load a file? (R/E/N/F)"
- CASE GET$ OF
- WHEN "R","r" : PROClayeredattacks
- WHEN "E","e" : PROCeditlayers
- WHEN "F","f" : PROCloadlayers :PROCeditlayers
- OTHERWISE
- filenamelyr$ = ""
- :
- chanceoflayer%(1) = 1 : numlayersections% = 1 : numlayerOKsects%() = 0
- :
- INPUT'" Total duration is how many bars "bars%
- INPUT'" and how many beats "beats%
- PROCalterbeats : totallength% = (bars%*960)+beats%
- PRINT''" LAYERS -"
- INPUT'" How many layers "numlayers%
- PRINT'" Are the layers to appear equally frequently,"
- PRINT " or in certain proportions (E/P) "
- :
- CASE GET$ OF
- :
- WHEN "P","p" :
- PRINT'" Piece is divided into how many sections"
- INPUT " of different contribution-proportions "numlayersections%
- :
- IF numlayersections% > 1 THEN
- :
- FOR count% = 2 TO numlayersections%
- PRINT'" Section ";count%;" starts at beat number "
- INPUT beats%
- PROCalterbeats : startoflayersection%(count%) = beats%
- NEXT
- ENDIF
- :
- FOR count% = 1 TO numlayersections%
- FOR count1% = 1 TO numlayers%
- PRINT '"In section ";count%;", layer ";count1%;" has "
- PRINT "how many proportions?"
- INPUT shareoflayers%(count%,count1%)
- NEXT
- NEXT
- :
- OTHERWISE shareoflayers%() = 1
- ENDCASE
- :
- PRINT''" Are number of attacks or unit durations to be"
- PRINT " divided into sections or appearance numbers?"
- CASE GET$ OF
- WHEN "Y","y" : bysections$ = "y"
- OTHERWISE bysections$ = "n"
- ENDCASE
- PRINT'" Are unit durations in any layers to be multiplied?"
- CASE GET$ OF
- WHEN "Y","y" : tomultiply$ = "y"
- OTHERWISE tomultiply$ = "n"
- ENDCASE
- PRINT'" Are the occurance of layers to be controlled?"
- CASE GET$ OF
- WHEN "Y","y" : tooccur$ = "y"
- OTHERWISE tooccur$ = "n"
- ENDCASE
- PRINT'" Does the number of attacks ever exceed 1?"
- CASE GET$ OF
- WHEN "Y","y" : exceed1$ = "y"
- OTHERWISE exceed1$ = "n"
- ENDCASE
- :
- FOR count% = 1 TO numlayers%
- :
- PRINT''" NUMBER OF ATTACKS -"
- :
- IF bysections$ = "y" THEN
- PRINT'" In layer ";count%;" are the number of attacks controlled"
- PRINT " by sections or by appearance number (S/A)"
- CASE GET$ OF
- WHEN "S","s" :
- attackscontrol$(count%) = "S"
- INPUT'" How many sections "numattackssections%(count%)
- IF numattackssections%(count%) > 1 THEN
- FOR count1% = 2 TO numattackssections%(count%)
- PRINT'" (layer ";count%;") section ";count1%;" starts at beat"
- INPUT beats%
- PROCalterbeats : startofattackssection%(count%,count1%) = beats%
- NEXT
- ENDIF
- :
- IF exceed1$ = "y" THEN
- FOR count1% = 1 TO numattackssections%(count%)
- PRINT'" In layer ";count%;", section ";count1%;" the number"
- PRINT" of attacks varies between..."
- INPUT numattax%(count%,count1%,0)
- INPUT" and..."numattax%(count%,count1%,1)
- NEXT
- ELSE numattax%() = 1
- ENDIF
- :
- WHEN "A","a" :
- attackscontrol$(count%) = "A"
- INPUT'" How many 'sections' of appearances "numattackssections1%(count%)
- IF numattackssections1%(count%) > 1 THEN
- FOR count1% = 2 TO numattackssections1%(count%)
- PRINT'" (layer ";count%;") section ";count1%;" starts at appearance "
- INPUT startofattackssection1%(count%,count1%)
- NEXT
- ENDIF
- :
- IF exceed1$ = "y" THEN
- FOR count1% = 1 TO numattackssections1%(count%)
- PRINT'" In layer ";count%;", section ";count1%;" the number"
- PRINT" of attacks varies between..."
- INPUT numattax1%(count%,count1%,0)
- INPUT" and... "numattax1%(count%,count1%,1)
- NEXT
- ELSE numattax1%() = 1
- ENDIF
- ENDCASE
- :
- ELSE
- attackscontrol$(count%) = "S" : numattackssections%(count%) = 1
- IF exceed1$ = "y" THEN
- PRINT'" In layer ";count%;" the number"
- PRINT" of attacks varies between "
- INPUT numattax%(count%,1,0)
- INPUT" and..."numattax%(count%,1,1)
- ELSE numattax%() = 1
- ENDIF
- ENDIF
- :
- PRINT''" DURATIONS"
- :
- IF bysections$ = "y" THEN
- :
- PRINT'" In layer ";count%;" are the unit durations controlled"
- PRINT" by sections or by appearance number (S/A)"
- CASE GET$ OF
- WHEN "S","s" :
- durationscontrol$(count%) = "S"
- INPUT'" How many sections "numdurationssections%(count%)
- IF numdurationssections%(count%) > 1 THEN
- FOR count1% = 2 TO numdurationssections%(count%)
- PRINT'" (layer ";count%;") section ";count1%;" starts at beat "
- INPUT beats%
- PROCalterbeats : startofdurationssection%(count%,count1%) = beats%
- NEXT
- ENDIF
- :
- FOR count1% = 1 TO numdurationssections%(count%)
- PRINT'" In layer ";count%;", section ";count1%;" the unit duration is"
- INPUT beats%
- PROCalterbeats : doorations%(count%,count1%) = beats%
- NEXT
- :
- WHEN "A","a" :
- durationscontrol$(count%) = "A"
- INPUT'" How many 'sections' "numdurationssections1%(count%)
- IF numdurationssections1%(count%) > 1 THEN
- FOR count1% = 2 TO numdurationssections1%(count%)
- PRINT'" (layer ";count%;") section ";count1%;" starts at appearance "
- INPUT startofdurationssection1%(count%,count1%)
- NEXT
- ENDIF
- FOR count1% = 1 TO numdurationssections1%(count%)
- PRINT'" In layer ";count%;", section ";count1%;" the unit duration is "
- INPUT beats%
- PROCalterbeats : doorations1%(count%,count1%) = beats%
- NEXT
- ENDCASE
- :
- ELSE durationscontrol$(count%) = "S" : numdurationssections%(count%) = 1
- PRINT'" In layer ";count%;" the unit duration is"
- INPUT beats%
- PROCalterbeats : doorations%(count%,1) = beats%
- ENDIF
- :
- IF tomultiply$ = "y" THEN
- :
- PRINT'" Do you want the unit duration to be multiplied"
- PRINT " by a given series of values (Y/N) "
- CASE GET$ OF
- WHEN "Y","y" :
- multiplier$(count%) = "Y"
- PRINT'" starting fresh at each appearance or irrespective (F/I) "
- CASE GET$ OF
- WHEN "F","f" :
- multipliermode$(count%) = "F"
- OTHERWISE multipliermode$(count%) = "I"
- ENDCASE
- :
- PRINT'" How many values "
- INPUT numvalues%(count%)
- FOR count1% = 1 TO numvalues%(count%)
- PRINT'" value ";count1%;" is "
- INPUT values(count%,count1%)
- NEXT
- OTHERWISE multiplier$(count%) = "N"
- ENDCASE
- :
- ELSE multiplier$(count%) = "N"
- ENDIF
- :
- IF tooccur$ = "y" THEN
- :
- PRINT'" Do you want this layer to reoccur according"
- PRINT " to minimum and maximum intervals (eg to"
- PRINT " control phrase-lengths)?"
- CASE GET$ OF
- WHEN "Y","y" :
- INPUT'" How many sections of this "numlayerOKsects%(count%)
- FOR count1% = 1 TO numlayerOKsects%(count%)
- IF numlayerOKsects%(count%) > 1 THEN
- PRINT'" section ";count1%;" begins at beat "
- INPUT beats%
- PROCalterbeats : x% = beats%
- ELSE x% = 0
- ENDIF
- PRINT'" in this section the layer should NOT reoccur"
- PRINT" until at least how many beats from the"
- PRINT" end of its previous occurence?"
- INPUT beats%
- PROCalterbeats : y% = beats%
- PRINT'" but SHOULD be made to reoccur after how "
- PRINT" many beats from the end of its previous"
- PRINT" occurence?"
- INPUT beats%
- PROCalterbeats : z% = beats%
- layersOK%(count%,count1%,0) = x%
- layersOK%(count%,count1%,1) = y%
- layersOK%(count%,count1%,2) = z%
- NEXT
- OTHERWISE
- ENDCASE
- :
- ENDIF
- :
- NEXT
- :
- ENDCASE
- :
- PROClayeredattacks
- :
- ENDPROC
- :
- REM**************************************************
- :
- DEF PROClayeredattacks
- :
- REM line below to come BEFORE the loop
- cellsused% = 0 : attacks1%() = 0 : layer% = 0 : appearances%() = 0
- valuescounter%() = 1 : layerends%() = 0
- :
- REPEAT
- REM WHICH LAYER (loop starts here)
- layer1% = layer%
- layerends%(layer1%) = attacks1%(cellsused%)
- :
- REM fill OKtouselayers%() according to which section you're in
- :
- FOR count% = 1 TO numlayers%
- IF numlayerOKsects%(count%) > 0 THEN
- FOR counter% = 1 TO numlayerOKsects%(count%)
- IF attacks1%(cellsused%) >= layersOK%(count%,counter%,0) THEN
- OKtouselayers%(count%,0) = layerends%(count%) + layersOK%(count%,counter%,1)
- OKtouselayers%(count%,1) = layerends%(count%) + layersOK%(count%,counter%,2)
- ENDIF
- NEXT
- ENDIF
- NEXT
- :
- REM use any layers due
- FOR count% = 1 TO numlayers%
- IF numlayerOKsects%(count%) > 0 THEN
- IF attacks1%(cellsused%) >= OKtouselayers%(count%,1) THEN layer% = count%
- ENDIF
- NEXT
- :
- IF layer1% = layer% THEN
- :
- REPEAT
- :
- REM fill layershare%() according to which section you're in
- FOR count% = 1 TO numlayersections%
- :
- IF attacks1%(cellsused%) >= startoflayersection%(count%) THEN
- FOR count1% = 1 TO numlayers%
- layershare%(count1%) = shareoflayers%(count%,count1%)
- NEXT
- ENDIF
- NEXT
- :
- FOR count% = 1 TO numlayers%
- chanceoflayer%(count%+1) = chanceoflayer%(count%)+layershare%(count%)
- NEXT
- x% = RND((chanceoflayer%(numlayers%+1))-1)
- FOR count% = 1 TO numlayers%
- IF x% >= chanceoflayer%(count%) THEN layer% = count%
- NEXT
- :
- REM exclude layers coming too soon
- IF numlayerOKsects%(layer%) > 0 THEN
- IF attacks1%(cellsused%) < OKtouselayers%(layer%,0) THEN layerOK$ = "n" ELSE layerOK$ = "y"
- ELSE layerOK$ = "y"
- ENDIF
- UNTIL layer% <> layer1% AND layerOK$ = "y"
- :
- ENDIF
- appearances%(layer%) += 1
- :
- REM NUMBER OF ATTACKS
- IF attackscontrol$(layer%) = "S" THEN
- FOR count% = 1 TO numattackssections%(layer%)
- IF attacks1%(cellsused%) >= startofattackssection%(layer%,count%) THEN
- a% = numattax%(layer%,count%,0) : b% = numattax%(layer%,count%,1)
- IF (b%-a%) = 0 THEN
- noattax% = 1
- ELSE
- noattax% = RND((b%-a%)+1)
- ENDIF
- noattax% += (a%-1)
- ENDIF
- NEXT
- ELSE
- FOR count% = 1 TO numattackssections1%(layer%)
- IF appearances%(layer%) >= startofattackssection1%(layer%,count%) THEN
- a% = numattax1%(layer%,count%,0) : b% = numattax1%(layer%,count%,1)
- IF (b%-a%) = 0 THEN
- noattax% = 1
- ELSE
- noattax% = RND((b%-a%)+1)
- ENDIF
- noattax% += (a%-1)
- ENDIF
- NEXT
- ENDIF
- :
- IF durationscontrol$(layer%) = "S" THEN
- FOR count% = 1 TO numdurationssections%(layer%)
- IF attacks1%(cellsused%) >= startofdurationssection%(layer%,count%) THEN
- duration% = doorations%(layer%,count%)
- ENDIF
- NEXT
- ELSE
- FOR count% = 1 TO numdurationssections1%(layer%)
- IF appearances%(layer%) >= startofdurationssection1%(layer%,count%) THEN
- duration% = doorations1%(layer%,count%)
- ENDIF
- NEXT
- ENDIF
- :
- IF multiplier$(layer%) = "N" THEN
- FOR count% = 1 TO noattax%
- attacks1%(cellsused%+1) = attacks1%(cellsused%)+duration%
- cellsused% += 1
- NEXT
- ELSE
- IF multipliermode$(layer%) = "F" THEN
- FOR count% = 1 TO noattax%
- attacks1%(cellsused%+1)=attacks1%(cellsused%)+(duration%*values(layer%,count%))
- cellsused% += 1
- NEXT
- ELSE
- FOR count% = 1 TO noattax%
- attacks1%(cellsused%+1)=attacks1%(cellsused%)+(duration%*values(layer%,valuescounter%(layer%)))
- cellsused% += 1
- valuescounter%(layer%) += 1
- IF valuescounter%(layer%) > numvalues%(layer%) THEN valuescounter%(layer%) = 1
- NEXT
- ENDIF
- ENDIF
- :
- UNTIL attacks1%(cellsused%) >= totallength%
- manyattacks% = cellsused%+1
- :
- PRINT'" Do you want to save these settings?"
- CASE GET$ OF
- WHEN "Y","y" : PROCsavelayers
- OTHERWISE
- ENDCASE
- :
- method$ = "raw" : PROCinsertattacks
- :
- ENDPROC
- :
- REM*********************************************************
- :
- DEF PROCconvertsamplenote
- :
- pitchclass% = samplenote% DIV 100
- CASE pitchclass% OF
- WHEN 0 : eighthtone% = 1
- WHEN 1 : eighthtone% = 9
- WHEN 2 : eighthtone% = 17
- WHEN 3 : eighthtone% = 21
- WHEN 4 : eighthtone% = 29
- WHEN 5 : eighthtone% = 37
- WHEN 6 : eighthtone% = 45
- ENDCASE
- octave% = samplenote% MOD 10
- eighthtone% += (octave%*48)
- accidental% = ((samplenote% MOD 100)DIV10)-1
- eighthtone% += accidental%
- samplenote% = eighthtone%
- ENDPROC
- :
- REM*******************************************
- :
- DEF PROCconvertsimplenote
- :
- IF simplenote% > 2 THEN oct% = 0
- IF simplenote% > 50 THEN oct% = 1
- IF simplenote% > 98 THEN oct% = 2
- IF simplenote% > 146 THEN oct% = 3
- IF simplenote% > 194 THEN oct% = 4
- IF simplenote% > 242 THEN oct% = 5
- IF simplenote% > 290 THEN oct% = 6
- IF simplenote% > 338 THEN oct% = 7
- IF simplenote% > 386 THEN oct% = 8
- :
- WHILE simplenote% > 50
- simplenote% -= 48
- ENDWHILE
- :
- CASE simplenote% OF
- WHEN 3 : pitch% = 3
- WHEN 4 : pitch% = 4
- WHEN 5 : pitch% = 5
- WHEN 6 : pitch% = 6
- WHEN 7 : pitch% = 7
- WHEN 8 : pitch% = 8
- WHEN 9 : pitch% = 11
- WHEN 10 : pitch% = 12
- WHEN 11 : pitch% = 13
- WHEN 12 : pitch% = 14
- WHEN 13 : pitch% = 15
- WHEN 14 : pitch% = 16
- WHEN 15 : pitch% = 17
- WHEN 16 : pitch% = 18
- WHEN 17 : pitch% = 21
- WHEN 18 : pitch% = 22
- WHEN 19 : pitch% = 23
- WHEN 20 : pitch% = 24
- WHEN 21 : pitch% = 25
- WHEN 22 : pitch% = 26
- WHEN 23 : pitch% = 27
- WHEN 24 : pitch% = 34
- WHEN 25 : pitch% = 35
- WHEN 26 : pitch% = 36
- WHEN 27 : pitch% = 37
- WHEN 28 : pitch% = 38
- WHEN 29 : pitch% = 39
- WHEN 30 : pitch% = 42
- WHEN 31 : pitch% = 43
- WHEN 32 : pitch% = 44
- WHEN 33 : pitch% = 45
- WHEN 34 : pitch% = 46
- WHEN 35 : pitch% = 47
- WHEN 36 : pitch% = 48
- WHEN 37 : pitch% = 51
- WHEN 38 : pitch% = 52
- WHEN 39 : pitch% = 53
- WHEN 40 : pitch% = 54
- WHEN 41 : pitch% = 55
- WHEN 42 : pitch% = 56
- WHEN 43 : pitch% = 57
- WHEN 44 : pitch% = 58
- WHEN 45 : pitch% = 61
- WHEN 46 : pitch% = 62
- WHEN 47 : pitch% = 63
- WHEN 48 : pitch% = 64
- WHEN 49 : pitch% = 65
- WHEN 50 : pitch% = 66
- ENDCASE
- :
- simplenote% = (pitch%*10)+oct%
- ENDPROC
- :
- REM**************************************
- :
- :
- DEF PROCpitchstring
- :
- PROCwindow(20,25,70,35)
- :
- :
- PRINT'" Create a new pitch string or edit the"
- PRINT " current one, or load a file (N/E/F)"
- CASE GET$ OF
- WHEN "E","e" : loadstring$ = "n" :PROCeditpitchstring
- WHEN "F","f" : loadstring$ = "y" :PROCeditpitchstring
- OTHERWISE
- ENDCASE
- :
- filenamestg$ = ""
- contoursequences%() = 0
- transpositionsequences%() = 0
- octavesequences%() = 0
- PRINT'" Total number of notes in the"
- INPUT " pitch string (inc. sample) "numpitches%
- PRINT'" Is the grid semi, quarter or eighth-tone (S/Q/E) "
- PRINT'" (0 = semi) "
- CASE GET$ OF
- WHEN "S","s" : grid$ = "s"
- WHEN "Q","q" : grid$ = "q"
- WHEN "E","e" : grid$ = "e"
- OTHERWISE grid$ = "s"
- ENDCASE
- CLS
- :
- PRINT'" SAMPLE "
- INPUT'" How many notes in the sample? "samplesize%
- FOR count% = 1 TO samplesize%
- PRINT'" note ";count%;" is pitchclass ";
- COLOUR 1
- CASE GET$ OF
- WHEN "C","c" : samplenote% = 0 : PRINT "C"
- WHEN "D","d" : samplenote% = 1 : PRINT "D"
- WHEN "E","e" : samplenote% = 2 : PRINT "E"
- WHEN "F","f" : samplenote% = 3 : PRINT "F"
- WHEN "G","g" : samplenote% = 4 : PRINT "G"
- WHEN "A","a" : samplenote% = 5 : PRINT "A"
- WHEN "B","b" : samplenote% = 6 : PRINT "B"
- ENDCASE
- samplenote% = samplenote%*100
- COLOUR 0
- PRINT " accidental ";
- COLOUR 1
- CASE GET$ OF
- WHEN "1" : samplenote% += 10 : PRINT "flat"
- WHEN "2" : samplenote% += 20 : PRINT "3/8 flat"
- WHEN "3" : samplenote% += 30 : PRINT "1/4 flat"
- WHEN "4" : samplenote% += 40 : PRINT "1/8 flat"
- WHEN "5" : samplenote% += 50 : PRINT "nat"
- WHEN "6" : samplenote% += 60 : PRINT "1/8 shrp"
- WHEN "7" : samplenote% += 70 : PRINT "1/4 shrp"
- WHEN "8" : samplenote% += 80 : PRINT "3/8 shrp"
- WHEN "9" : samplenote% += 90 : PRINT "shrp"
- ENDCASE
- COLOUR 0
- samplenote% += 5
- PROCconvertsamplenote
- sample%(count%) = samplenote%
- :
- NEXT
- :
- CLS
- PRINT'" OCTAVE SEQUENCES"
- PRINT'" How many different sections of"
- INPUT " octave sequences are there "octavesections%
- IF octavesections% > 1 THEN
- FOR count% = 2 TO octavesections%
- PRINT'" section ";count%;" begins at note number "
- INPUT x%
- octavesequences%(count%,0,0) = x%
- NEXT
- ENDIF
- :
- FOR count% = 1 TO octavesections%
- FOR pitch% = 0 TO 47
- entry$ = "n"
- IF pitch% MOD 4 = 0 AND grid$<>"s" THEN entry$ = "y"
- IF (pitch%-2)MOD4 = 0 THEN entry$ = "y"
- IF (pitch%-1)MOD2 = 0 AND grid$ = "e" THEN entry$ = "y"
- IF entry$ = "y" THEN
- PRINT '"In section ";count%;" the sequence of octaves for ";
- COLOUR 1 : PRINT pitchnames$(pitch%)
- COLOUR 0 : PRINT "has how many elements "
- INPUT e%
- PRINT""
- octavesequences%(count%,pitch%+1,0) = e%
- FOR counter% = 1 TO e%
- PRINT " element ";counter%;
- INPUT " is octave "o%
- octavesequences%(count%,pitch%+1,counter%) = o%
- NEXT
- ENDIF
- NEXT
- NEXT
- :
- CLS
- PRINT'" TRANSPOSITION LEVELS"
- PRINT'" How many different sections of"
- INPUT" transposition are there "transpositionsections%
- IF transpositionsections% > 1 THEN
- FOR count% = 2 TO transpositionsections%
- PRINT'" Section ";count%;
- INPUT " begins at note number "n%
- transpositionsequences%(count%,0) = n%
- PRINT" and transposes up/down by how many ";
- CASE grid$ OF
- WHEN "e" : PRINT "eighthtones" : INPUT " (+/- 1 etc) "x%
- transpositionsequences%(count%,1) = x%
- WHEN "q" : PRINT "quartertones" : INPUT " (+/- 1 etc) "x%
- transpositionsequences%(count%,1) = x% * 2
- WHEN "s" : PRINT "semitones" : INPUT " (+/- 1 etc) "x%
- transpositionsequences%(count%,1) = x% * 4
- ENDCASE
- NEXT
- ENDIF
- :
- CLS
- PRINT'" CONTOUR SEQUENCES"
- PRINT'" How many different sections of "
- INPUT " contour sequences are there "contoursections%
- IF contoursections%>1 THEN
- FOR count% = 2 TO contoursections%
- PRINT'" Section ";count%;
- INPUT " begins at note number "n%
- contoursequences%(count%,0) = n%
- NEXT
- ENDIF
- :
- FOR count% = 1 TO contoursections%
- PRINT'" In section ";count%;
- INPUT " there are how many contours "c%
- contoursequences%(count%,1) = c%
- PRINT""
- FOR counter% = 1 TO c%
- PRINT " number ";counter%;
- INPUT " is contour "contoor%
- contoursequences%(count%,counter%+1) = contoor%
- NEXT
- NEXT
- :
- contoursize% = 0 : seriesnote% = 1 : samplenote% = 0
- contoursequence% = 1 : transpositionsequence% = 1
- octavesequence% = 1 : transpositionsequences%(1,1) = 0
- contourloop% = 0 : octaveloop%() = 0
- :
- REPEAT
- seriesnote% += contoursize%
- IF seriesnote% >= contoursequences%(contoursequence%+1,0) AND contoursequences%(contoursequence%+1,0) <> 0 THEN
- contoursequence% += 1
- contourloop% = 0
- ENDIF
- :
- contourloop% += 1
- IF contourloop% > contoursequences%(contoursequence%,1) THEN contourloop% = 1
- contour% = contoursequences%(contoursequence%,contourloop%+1)
- contoursize% = contours%(contour%,0)
- :
- IF seriesnote% >= transpositionsequences%(transpositionsequence%+1,0) AND transpositionsequences%(transpositionsequence%+1,0) <> 0 THEN
- transpositionsequence% += 1
- ENDIF
- transposition% = transpositionsequences%(transpositionsequence%,1)
- :
- FOR count% = 1 TO contoursize%
- samplenote% += 1
- IF samplenote% > samplesize% THEN samplenote% = 1
- group%(count%) = sample%(samplenote%) + transposition%
- NEXT
- :
- IF seriesnote% >= octavesequences%(octavesequence%+1,0,0) AND octavesequences%(octavesequence%+1,0,0) <> 0 THEN
- octavesequence% += 1
- octaveloop%() = 0
- ENDIF
- :
- FOR count% = 1 TO contoursize%
- pitchclass% = group%(count%)
- REPEAT
- pitchclass% -= 48
- UNTIL pitchclass% < 51
- pitchclass% -= 2
- octaveloop%(pitchclass%) += 1
- IF octaveloop%(pitchclass%) > octavesequences%(octavesequence%,pitchclass%,0) THEN octaveloop%(pitchclass%) = 1
- oxtave% = octavesequences%(octavesequence%,pitchclass%,octaveloop%(pitchclass%))
- group%(count%) = (pitchclass%+2) + (48*oxtave%)
- NEXT
- :
- IF contoursize% > 1 THEN
- REPEAT
- FOR count% = 1 TO (contoursize%-1)
- IF group%(count%) >= group%(count%+1) THEN
- save% = group%(count%)
- group%(count%) = group%(count%+1)
- group%(count%+1) = save%
- ENDIF
- NEXT
- no% = 0
- FOR count% = 1 TO (contoursize%-1)
- IF group%(count%) > group%(count%+1) THEN no% = 1
- NEXT
- UNTIL no% = 0
- ENDIF
- :
- FOR count% = 1 TO contoursize%
- simplenote% = group%(contours%(contour%,count%))
- PROCconvertsimplenote
- pitches%((seriesnote%+count%)-1) = simplenote%
- NEXT
- :
- UNTIL ((seriesnote%+contoursize%)-1) >= numpitches%
- :
- FOR count% = 0 TO numpitches%-1 : pitches%(count%) = pitches%(count%+1) : NEXT
- PRINT'" Do you want to save this pitch string?"
- CASE GET$ OF
- WHEN "Y","y","+" : PROCsavepitchstring
- OTHERWISE
- ENDCASE
- :
- PROCinsertpitches
- :
- ENDPROC
- :
- REM*******************************************************
- :
- DEF PROCcopy
- :
- CLS : OFF
- repeatposit$ = "n"
- IF distort$ = "OFF" THEN dothis$ = "YES"
- IF distort$ = "ON" THEN
- IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
- ENDIF
- IF dothis$ = "YES" THEN
- PRINT'" Copy one note - C "
- PRINT " Copy passage - c "
- PRINT " Move one note - M "
- PRINT " Move passage - m "
- PRINT " Extract - E "
- PRINT " Copy rhythm - R "
- PRINT " Save - S "
- PRINT " Import - I "
- CASE GET$ OF
- WHEN "c" : copymove$ = "C" : savevoice$ = "N" : justone$ = "n"
- WHEN "m" : copymove$ = "M" : savevoice$ = "N" : justone$ = "n"
- WHEN "C" : copymove$ = "C" : savevoice$ = "N" : justone$ = "y"
- WHEN "M" : copymove$ = "M" : savevoice$ = "N" : justone$ = "y"
- WHEN "E","e" :
- CLS : PRINT'" Copy-extract or move-extract? (C/M) "
- CASE GET$ OF
- WHEN "C","c" : copymove$ = "EC" : justone$ = "n"
- OTHERWISE copymove$ = "EM": justone$ = "n"
- ENDCASE
- savevoice$ = "N"
- WHEN "R","r" : PROCcopyrhythm
- WHEN "S","s" : copymove$ = "C" : savevoice$ = "Y"
- WHEN "I","i" : copymove$ = "C" : savevoice$ = "N" : PROCimportvoice
- OTHERWISE
- copymove$ = "C" : savevoice$ = "N" : justone$ = "n"
- ENDCASE
- ELSE copymove$ = "C"
- ENDIF
- :
- PROCcopy2
- IF quickextract$ = "y" THEN quickextract$ = "n"
- :
- ENDPROC
- :
- *******************************************************************
- :
- DEF PROCcopy2
- :
- PROCwindow(20,69,67,54)
- CLS
- :
- IF quickcopy$ = "n" THEN
- :
- IF screenvoices$ = "n" THEN
- INPUT'" Which voice? (0 = 1) "voice%
- IF voice% = 0 THEN PROCpressenter
- ELSE
- PRINT'" Which screen voice "
- CASE GET$ OF
- WHEN "1" : voice% = 1
- WHEN "2" : voice% = 2
- WHEN "3" : voice% = 3
- OTHERWISE PROCpressenter
- ENDCASE
- ENDIF
- :
- IF copymove$ = "EC" OR copymove$ = "EM" THEN
- IF screenvoices$ = "y" THEN extractvoice% = displayvoices%(startv%+voice%-1) ELSE extractvoice% = voice%
- ENDIF : REM copymove$
- :
- IF screenvoices$ = "y" THEN voice% = displayvoices%(startv%+voice%-1)
- voice% -= 1
- samevoice% = voice%
- :
- CLS
- INPUT'" Starting at bar "copystartbar%
- IF copystartbar% = 0 THEN
- copystartbar% = holdbar1% : copystartbeat% = holdbeat1% : repeatposit$ = "y"
- ENDIF
- holdbar% = copystartbar%
- holdbar1% = copystartbar%
- IF repeatposit$ = "y" THEN
- PRINT'" bar ";copystartbar%;" beat ";copystartbeat%;"?"
- PRINT'" (for OK press 0, if not OK press X)"
- CASE GET$ OF
- WHEN"X","x" : PROCcopy
- OTHERWISE
- ENDCASE
- ELSE
- INPUT" beat "beats%
- PROCalterbeats : copystartbeat% = beats%
- holdbeat% = copystartbeat%
- holdbeat1% = copystartbeat%
- ENDIF : REM repeatposit$
- :
- IF justone$ = "n" THEN
- PRINT'" Ending at bar "
- PRINT '" (for last bar press 0, for previous "
- INPUT " last bar press 0 twice) "copyendbar%
- IF copyendbar% > 0 THEN savethisbar% = copyendbar%
- IF copyendbar% > 0 THEN
- INPUT " beat "beats%
- PROCalterbeats : copyendbeat% = beats% : savethisbeats% = beats%
- :
- ELSE
- thing$ = INKEY$(50)
- IF thing$ <> "" THEN
- copyendbar% = savethisbar% : copyendbeat% = savethisbeats%
- COLOUR 3
- PRINT'" bar ";copyendbar%;" beat ";copyendbeat%;"?"
- COLOUR 0
- PRINT '" (for OK press 0, if not OK press X)"
- CASE GET$ OF
- WHEN "X","x" : PROCcopy2
- OTHERWISE
- ENDCASE
- ENDIF : REM thing$
- :
- ENDIF : REM copyendbar%
- :
- ELSE
- copyendbar% = copystartbar%
- copyendbeat% = copystartbeat%
- ENDIF : REM justone$
- :
- IF copymove$ = "EC" OR copymove$ = "EM" THEN PROCextractinfo
- :
- ELSE : REM quickcopy$
- :
- IF screenvoices$ = "n" THEN
- :
- IF copysuccessively$ = "n" THEN
- INPUT ' ' " Which voice? (0 = top) "voice%
- :
- IF voice% = 0 THEN
- :
- IF nodelay$ = "y" THEN voice% = displayvoices%(startv%) ELSE PROCpressenter
- :
- ENDIF : REM voice%
- :
- ELSE PROCcopysuccessively: REM copysuccessively
- :
- ENDIF : REM copysuccessively
- :
- ELSE : REM screenvoices$
- PRINT'" Which screen voice "
- CASE GET$ OF
- WHEN "1" : voice% = 1
- WHEN "2" : voice% = 2
- WHEN "3" : voice% = 3
- WHEN "x" : voice% = 1
- OTHERWISE PROCpressenter
- ENDCASE
- ENDIF : REM screenvoices$
- :
- IF copymove$ = "EC" OR copymove$ = "EM" THEN
- IF screenvoices$ = "y" THEN extractvoice% = displayvoices%(startv%+voice%-1) ELSE extractvoice% = voice%
- ENDIF : REM copymove$
- :
- IF screenvoices$ = "y" AND quickextract$ = "n" THEN voice% = displayvoices%(startv%+voice%-1)
- voice% -= 1 : samevoice% = voice%
- :
- PRINT ' " note number "
- PRINT ' " (for first type 0) "
- CASE GET$ OF
- WHEN "1" : along% = 1
- WHEN "2" : along% = 2
- WHEN "3" : along% = 3
- WHEN "4" : along% = 4
- WHEN "5" : along% = 5
- WHEN "6" : along% = 6
- WHEN "7" : along% = 7
- WHEN "8" : along% = 8
- WHEN "9" : along% = 9
- WHEN "0" : along% = 0
- ENDCASE
- :
- IF along% <> 0 THEN
- :
- another$ = INKEY$(waitafterfirst%)
- IF another$ <> "" THEN
- CASE another$ OF
- WHEN "1" : along% = (along%*10)+1
- WHEN "2" : along% = (along%*10)+2
- WHEN "3" : along% = (along%*10)+3
- WHEN "4" : along% = (along%*10)+4
- WHEN "5" : along% = (along%*10)+5
- WHEN "6" : along% = (along%*10)+6
- WHEN "7" : along% = (along%*10)+7
- WHEN "8" : along% = (along%*10)+8
- WHEN "9" : along% = (along%*10)+9
- WHEN "0" : along% = (along%*10)+0
- ENDCASE
- ENDIF : REM another$
- :
- another$ = INKEY$(waitaftersecond%)
- IF another$ <> "" THEN
- CASE another$ OF
- WHEN "1" : along% = (along%*10)+1
- WHEN "2" : along% = (along%*10)+2
- WHEN "3" : along% = (along%*10)+3
- WHEN "4" : along% = (along%*10)+4
- WHEN "5" : along% = (along%*10)+5
- WHEN "6" : along% = (along%*10)+6
- WHEN "7" : along% = (along%*10)+7
- WHEN "8" : along% = (along%*10)+8
- WHEN "9" : along% = (along%*10)+9
- WHEN "0" : along% = (along%*10)+0
- ENDCASE
- ENDIF : REM another$
- :
- COLOUR 3 : PRINT ' along% : COLOUR 0
- :
- ENDIF : REM along% <> 0
- :
- IF along% = 0 THEN along% = 1
- along%-=1
- copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
- copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
- holdbar% = copystartbar%
- holdbeat% = copystartbeat%
- IF justone$ = "n" THEN
- :
- PRINT'" to note number "
- :
- IF firstasking$ = "y" THEN
- IF copytoend$ = "y" THEN PRINT'" (for last type 0) "
- ELSE
- :
- IF copytoend$ = "y" THEN
- PRINT'" (for last type 0) "
- ELSE
- PRINT'" (for ";prevlast%;" type 0) "
- ENDIF : REM copytoend$
- :
- ENDIF : REM firstasking$
- :
- CASE GET$ OF
- WHEN "1" : along% = 1
- WHEN "2" : along% = 2
- WHEN "3" : along% = 3
- WHEN "4" : along% = 4
- WHEN "5" : along% = 5
- WHEN "6" : along% = 6
- WHEN "7" : along% = 7
- WHEN "8" : along% = 8
- WHEN "9" : along% = 9
- WHEN "0" :
- IF copytoend$ = "y" THEN
- along% = 0
- ELSE
- along% = prevlast% : usedprev$ = "y"
- ENDIF : REM copytoend$
- OTHERWISE
- IF copytoend$ = "y" THEN
- along% = 0
- ELSE
- IF firstasking$ = "y" THEN
- CLS : COLOUR 3
- PRINT'" COPYING TO END NOT ENABLED "
- COLOUR 0
- PRINT '" (press a key to continue)"
- prevlast% = 0
- CASE GET$ OF
- ENDCASE
- ELSE
- along% = prevlast% : usedprev$ = "y"
- ENDIF : REM firstasking$
- ENDIF : REM copytoend$
- ENDCASE
- firstasking$ = "n"
- :
- IF along% <> 0 AND usedprev$ = "n" THEN
- :
- another$ = INKEY$(waitafterfirst%)
- IF another$ <> "" THEN
- CASE another$ OF
- WHEN "1" : along% = (along%*10)+1
- WHEN "2" : along% = (along%*10)+2
- WHEN "3" : along% = (along%*10)+3
- WHEN "4" : along% = (along%*10)+4
- WHEN "5" : along% = (along%*10)+5
- WHEN "6" : along% = (along%*10)+6
- WHEN "7" : along% = (along%*10)+7
- WHEN "8" : along% = (along%*10)+8
- WHEN "9" : along% = (along%*10)+9
- WHEN "0" : along% = (along%*10)+0
- ENDCASE
- ENDIF : REM another$
- :
- another$ = INKEY$(waitaftersecond%)
- IF another$ <> "" THEN
- CASE another$ OF
- WHEN "1" : along% = (along%*10)+1
- WHEN "2" : along% = (along%*10)+2
- WHEN "3" : along% = (along%*10)+3
- WHEN "4" : along% = (along%*10)+4
- WHEN "5" : along% = (along%*10)+5
- WHEN "6" : along% = (along%*10)+6
- WHEN "7" : along% = (along%*10)+7
- WHEN "8" : along% = (along%*10)+8
- WHEN "9" : along% = (along%*10)+9
- WHEN "0" : along% = (along%*10)+0
- ENDCASE
- ENDIF : REM another$
- :
- prevlast% = along%
- COLOUR 3 : PRINT ' along% : COLOUR 0
- wait$ = INKEY$(50)
- :
- ENDIF : REM along% <> 0
- :
- usedprev$ = "n"
- :
- IF along% = 0 THEN
- copyendbar% = 0
- ELSE
- along%-=1
- copyendbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
- copyendbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
- ENDIF : REM along$
- ELSE
- copyendbar% = copystartbar%
- copyendbeat% = copystartbeat%
- ENDIF : REM justone$ = "n"
- :
- IF copymove$ = "EC" OR copymove$ = "EM" THEN PROCextractinfo
- :
- ENDIF : REM quickcopy$ = "n"
- :
- :
- value% = (copystartbar%*10^3)+copystartbeat%
- IF value% <= array%(0,0,voice%)DIV10^3 THEN
- startatcell% = 0
- ELSE
- PROCsearch(value%)
- startatcell% = startcell%
- ENDIF : REM value%
- :
- IF copyendbar% = 0 THEN
- endatcell% = numusedcells%(voice%) - 1
- ELSE
- value% = (copyendbar%*10^3)+copyendbeat%
- IF value% >= array%(numusedcells%(voice%)-1,0,voice%)DIV10^3 THEN
- endatcell% = numusedcells%(voice%) - 1
- ELSE
- PROCsearch(value%)
- IF shunt$ = "N" THEN endatcell% = startcell% ELSE endatcell% = startcell% - 1
- ENDIF : REM value%
- :
- ENDIF : REM copyendbar%
- :
- manyattacks% = endatcell% - startatcell% + 1
- REM create 'gap' between beat-of-bar and first actual attack
- carrybars% = (array%(startatcell%,0,voice%)DIV10^6)-copystartbar%
- carrybeats% = ((array%(startatcell%,0,voice%)DIV10^3)MOD10^3)-copystartbeat%
- attacks1%(0) = (carrybars%*960)+carrybeats%
- :
- IF copymove$ = "C" OR copymove$ = "M" THEN
- FOR count% = 0 TO (manyattacks%-1)
- IF count% > 0 THEN
- carrybars% = (array%(startatcell%+count%,0,voice%)DIV10^6)-(array%(startatcell%+count%-1,0,voice%)DIV10^6)
- carrybeats% = ((array%(startatcell%+count%,0,voice%)DIV10^3)MOD10^3)-((array%(startatcell%+count%-1,0,voice%)DIV10^3)MOD10^3)
- attacks1%(count%) = attacks1%(count%-1) + ((carrybars%*960)+carrybeats%)
- ENDIF : REM count% > 0
- :
- pitches%(count%) = array%(startatcell%+count%,0,voice%)MOD10^3
- dur% = (array%(startatcell%+count%,1,voice%)DIV10)MOD10^3
- brrr% = array%(startatcell%+count%,0,voice%)DIV10^6 : PROCreconvertdur
- durations%(count%) = dur%
- amplitudes%(count%) = (array%(startatcell%+count%,1,voice%))MOD10
- envelopes%(count%) = (array%(startatcell%+count%,2,voice%))DIV10^2
- glissandos%(count%) = array%(startatcell%+count%,1,voice%)DIV10^4
- inflections%(count%) = array%(startatcell%+count%,2,voice%)MOD10^2
- NEXT
- ELSE
- :
- PROCextract
- :
- ENDIF : REM copymove$
- :
- IF copymove$ = "M" THEN
- numnotes% = manyattacks% : startcell% = startatcell%
- FOR count% = startcell% TO (startcell%+(numnotes%-1))
- FOR counter% = 0 TO 1
- barno% = (array%(count%,0,voice%)DIV10^6)-counter%
- beatnum% = ((array%(count%,0,voice%)DIV10^3)MOD10^3)
- :
- group1start% = (disarray%(barno%,0,voice%)DIV10^7)*beatfactor%
- group1end% = group1start% + (((disarray%(barno%,0,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
- IF beatnum%+(960*counter%) >= group1start% AND beatnum%+(960*counter%) <= group1end% THEN
- disarray%(barno%,0,voice%) = disarray%(barno%,0,voice%)MOD10^3
- ENDIF : REM beatnum%
- :
- group2start% = ((disarray%(barno%,0,voice%)DIV10)MOD10^2)*beatfactor%
- group2end% = group2start%+((((disarray%(barno%,0,voice%)MOD10)*10)+(disarray%(barno%,1,voice%)DIV10^8))*beatfactor%)-1
- IF beatnum%+(960*counter%) >= group2start% AND beatnum%+(960*counter%) <= group2end% THEN
- disarray%(barno%,0,voice%) = (disarray%(barno%,0,voice%)DIV10^3)*10^3
- disarray%(barno%,1,voice%) = disarray%(barno%,1,voice%)MOD10^6
- ENDIF : REM beatnum%
- group3start%=((disarray%(barno%,1,voice%)DIV10^4)MOD10^2)*beatfactor%
- group3end% = group3start% + (((disarray%(barno%,1,voice%)MOD10^4)DIV10^2)*beatfactor%)-1
- IF beatnum%+(960*counter%) >= group3start% AND beatnum%+(960*counter%) <= group3end% THEN
- disarray%(barno%,1,voice%) = (disarray%(barno%,1,voice%)DIV10^6)*10^6
- ENDIF : REM beatnum%
- group4start% = (disarray%(barno%,2,voice%)DIV10^7)*beatfactor%
- group4end% = group4start%+(((disarray%(barno%,2,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
- IF beatnum%+(960*counter%) >= group4start% AND beatnum%+(960*counter%) <= group4end% THEN
- disarray%(barno%,2,voice%) = disarray%(barno%,2,voice%)MOD10^3
- ENDIF : REM beatnum%
- group5start% = ((disarray%(barno%,2,voice%)MOD10^3)DIV10)*beatfactor%
- group5end% = group5start%+((((disarray%(barno%,2,voice%)MOD10)*10)+(disarray%(barno%,3,voice%)DIV10^8))*beatfactor%)-1
- IF beatnum%+(960*counter%) >= group5start% AND beatnum%+(960*counter%) <= group5end% THEN
- disarray%(barno%,2,voice%) = (disarray%(barno%,2,voice%)DIV10^3)*10^3
- disarray%(barno%,3,voice%) = disarray%(barno%,3,voice%)MOD10^6
- ENDIF : REM beatnum%
- group6start% = ((disarray%(barno%,3,voice%)DIV10^4)MOD10^2)*beatfactor%
- group6end% = group6start% + (((disarray%(barno%,3,voice%)DIV10^2)MOD10^2)*beatfactor%)-1
- IF beatnum%+(960*counter%) >= group6start% AND beatnum%+(960*counter%) <= group6end% THEN
- disarray%(barno%,3,voice%)=(disarray%(barno%,3,voice%)DIV10^6)*10^6
- ENDIF : REM beatnum%
- :
- NEXT
- :
- NEXT : REM count%
- :
- PROCshuntleft(startcell%,numnotes%)
- ENDIF : REM copymove$
- :
- IF distort$ = "OFF" THEN
- numpitches% = manyattacks% : numdurations% = manyattacks% : numamplitudes% = manyattacks%
- numenvelopes% = manyattacks% : numinflections% = manyattacks% : method$ = "raw" : copyit$ = "ON"
- IF seeequalize$ = "y" THEN seeequalizey$ = "y"
- IF seereorder$ = "y" THEN seereordery$ = "y"
- PROCinsertattacks
- ELSE
- PROCdistort
- ENDIF : REM distort$
- :
- $ = "n" : quickextract$ = "n" : usedprev$ = "n"
- ENDPROC
- :
- REM**************************************************************
- :
- DEF PROCdistort
- :
- CLS
- CASE distortpara$ OF
- WHEN "attacks" :
- :
- INPUT'" How many bands? (0 = previous values) "answer%
- IF answer% <> 0 THEN numbands% = answer%
- :
- IF answer% > 0 THEN
- IF answer% = 1 THEN
- PRINT'" intervals to be multiplied by"
- PRINT" random percentages between..."
- PRINT '"(for ";distortparas%(1,2);
- INPUT" press 0) "number%
- IF number% = 0 THEN distortparas%(1,2) = distortparas%(1,2) ELSE distortparas%(1,2) = number%
- PRINT'" and...(for ";distortparas%(1,3);
- INPUT " press 0) "number%
- IF number% = 0 THEN distortparas%(1,3) = distortparas%(1,3) ELSE distortparas%(1,3) = number%
- distortparas%(1,0) = 0 : distortparas%(1,1) = 960000
- :
- ELSE
- :
- FOR count% = 1 TO numbands%
- CLS
- PRINT'" Band ";count%;"'s intervals are between (incl.) "
- INPUT'" bars..."bars%
- INPUT " beats..."beats%
- PROCalterbeats
- distortparas%(count%,0) = (bars%*960) + beats%
- INPUT " and bars..."bars%
- INPUT " beats..."beats%
- PROCalterbeats
- distortparas%(count%,1) = (bars%*960) + beats%
- PRINT'" which are to be multiplied by random "
- INPUT" percentages between..."distortparas%(count%,2)
- INPUT" and..."distortparas%(count%,3)
- NEXT
- :
- ENDIF
- ELSE
- COLOUR 1
- PRINT'" values as last time?"
- PRINT'distortparas%(1,0);" - ";distortparas%(1,1);" ";distortparas%(1,2);"% - ";distortparas%(1,3)"%"
- IF numbands% > 1 THEN PRINT distortparas%(2,0);" - ";distortparas%(2,1);" ";distortparas%(2,2);"% - ";distortparas%(2,3)"%"
- COLOUR 0
- CASE GET$ OF
- WHEN"y","Y":
- OTHERWISE
- ENDCASE
- ENDIF
- :
- nextinterval% = attacks1%(1) - attacks1%(0)
- FOR count% = 1 TO manyattacks% - 1
- :
- interval% = nextinterval%
- :
- band% = 0
- FOR counter% = 1 TO numbands%
- IF interval% >= distortparas%(counter%,0) AND interval% <= distortparas%(counter%,1) THEN band% = counter%
- NEXT
- :
- IF band% > 0 THEN percentage1% = distortparas%(band%,2) ELSE percentage1% = 100
- IF band% > 0 THEN percentage2% = distortparas%(band%,3) ELSE percentage2% = 100
- range% = percentage2%-percentage1%
- IF range% = 0 THEN
- percentage3 = percentage1%
- ELSE
- percentage3 = RND(range%) + percentage1% - 1
- percentage3 += (RND(99))/100
- ENDIF
- :
- nextinterval% = attacks1%(count%+1) - attacks1%(count%)
- attacks1%(count%) = attacks1%(count%-1) + ((interval%*percentage3)DIV100)
- :
- NEXT
- :
- method$ = "raw" : copyit$ = "ON" : distort$ = "OFF"
- PROCinsertattacks
- :
- WHEN "pitches" :
- :
- PROCwindow(20,69,70,54)
- PRINT'" Is the grid semi-, quarter- or eighthtone (S/Q/E)"
- PRINT'" (0 = previous) "
- CASE GET$ OF
- WHEN "S","s" : distortgrid$ = "S"
- WHEN "Q","q" : distortgrid$ = "Q"
- WHEN "E","e" : distortgrid$ = "E"
- OTHERWISE distortgrid$ = distortgrid$
- ENDCASE
- :
- INPUT'" How many bands? (0 = 1) "numbands%
- IF numbands% = 0 THEN numbands% = 1
- :
- IF numbands% = 1 THEN
- distortparas%(1,0) = 0
- distortparas%(1,1) = 1000
- PRINT'" Pitches are to be raised/lowered randomly by"
- PRINT " between how many ";
- CASE distortgrid$ OF
- WHEN "S" : PRINT"semitones (-1,1 etc) "
- INPUT" (11 = previous) "distortparas%(1,2)
- IF distortparas%(1,2) = 11 THEN
- distortparas%(1,2) = previousdistort1%
- COLOUR 1
- PRINT' previousdistort1%
- COLOUR 0
- ENDIF
- WHEN "Q" : PRINT"quartertones (-1,1 etc) "
- INPUT" (0 = previous) "distortparas%(1,2)
- IF distortparas%(1,2) = 0 THEN
- distortparas%(1,2) = previousdistort1%
- COLOUR 1
- PRINT' previousdistort1%
- COLOUR 0
- ENDIF
- WHEN "E" : INPUT"eighthtones (-1,1 etc) "distortparas%(1,2)
- ENDCASE
- PRINT '" and how many ";
- CASE distortgrid$ OF
- WHEN "S" : INPUT"semitones "distortparas%(1,3)
- IF distortparas%(1,3) = 11 THEN
- distortparas%(1,3) = previousdistort2%
- COLOUR 1
- PRINT ' previousdistort2%
- COLOUR 0
- pause$ = INKEY$(50)
- ENDIF
- WHEN "Q" : INPUT"quartertones "distortparas%(1,3)
- IF distortparas%(1,3) = 0 THEN
- distortparas%(1,3) = previousdistort2%
- COLOUR 1
- PRINT' previousdistort2%
- COLOUR 0
- pause$ = INKEY$(50)
- ENDIF
- WHEN "E" : INPUT"eighthtones "distortparas%(1,3)
- ENDCASE
- previousdistort1% = distortparas%(1,2)
- previousdistort2% = distortparas%(1,3)
- :
- ELSE
- :
- FOR count% = 1 TO numbands%
- PRINT'" Band ";count%;" is from the ";
- FOR counter% = 0 TO 1
- IF counter% = 0 THEN PRINT"lower note" ELSE PRINT'"to the upper note"
- PRINT'" pitchclass ";
- COLOUR 1
- CASE GET$ OF
- WHEN "C","c" : note% = 4 : PRINT "C"
- WHEN "D","d" : note% = 12 : PRINT "D"
- WHEN "E","e" : note% = 20 : PRINT "E"
- WHEN "F","f" : note% = 24 : PRINT "F"
- WHEN "G","g" : note% = 32 : PRINT "G"
- WHEN "A","a" : note% = 40 : PRINT "A"
- WHEN "B","b" : note% = 48 : PRINT "B"
- OTHERWISE VDU 7 : PROCdistort
- ENDCASE
- COLOUR 0
- PRINT" accidental ";
- COLOUR 1
- CASE GET$ OF
- WHEN "1" : note% -= 4 : PRINT "flat"
- WHEN "2" : note% -= 3 : PRINT "3/8 flat"
- WHEN "3" : note% -= 2 : PRINT "1/4 flat"
- WHEN "4" : note% -= 1 : PRINT "1/8 flat"
- WHEN "5" : note% -= 0 : PRINT "nat"
- WHEN "6" : note% += 1 : PRINT "1/8 shrp"
- WHEN "7" : note% += 2 : PRINT "1/4 shrp"
- WHEN "8" : note% += 3 : PRINT "3/8 shrp"
- WHEN "9" : note% += 4 : PRINT "shrp"
- ENDCASE
- COLOUR 0
- PRINT" octave ";
- COLOUR 1
- oct% = VAL(GET$) : oct%=oct%DIV1 : note% += (48*oct%) : PRINT oct%
- COLOUR 0
- distortparas%(count%,counter%) = note%
- NEXT
- :
- PRINT'" and pitches are to be raised/lowered"
- PRINT " randomly by between how many ";
- CASE distortgrid$ OF
- WHEN "S" : INPUT"semitones "distortparas%(count%,2)
- WHEN "Q" : INPUT"quartertones "distortparas%(count%,2)
- WHEN "E" : INPUT"eighthtones "distortparas%(count%,2)
- ENDCASE
- PRINT" and how many ";
- CASE distortgrid$ OF
- WHEN "S" : INPUT"semitones "distortparas%(count%,3)
- WHEN "Q" : INPUT"quartertones "distortparas%(count%,3)
- WHEN "E" : INPUT"eighthtones "distortparas%(count%,3)
- ENDCASE
- :
- NEXT
- :
- ENDIF
- :
- nextpitch% = pitches%(0)
- FOR count% = 0 TO (manyattacks%-1)
- :
- note% = nextpitch%DIV100
- accid% = (nextpitch%DIV10)MOD10
- oct% = nextpitch%MOD10
- CASE note% OF
- WHEN 0 : pitch% = 4
- WHEN 1 : pitch% = 12
- WHEN 2 : pitch% = 20
- WHEN 3 : pitch% = 24
- WHEN 4 : pitch% = 32
- WHEN 5 : pitch% = 40
- WHEN 6 : pitch% = 48
- ENDCASE
- accid% -= 5 : pitch% += accid%
- pitch% += (48*oct%)
- :
- FOR counter% = 1 TO numbands%
- IF pitch%>=distortparas%(counter%,0)ANDpitch%<=distortparas%(counter%,1) THEN band% = counter%
- NEXT
- :
- lower% = distortparas%(band%,2)
- upper% = distortparas%(band%,3)
- x% = 0 - lower%
- range% = upper% + x% + 1
- IF range% = 1 THEN inc% = 1-(x%+1) ELSE inc% = RND(range%)-(x%+1)
- IF distortgrid$ = "S" THEN inc% = inc%*4
- IF distortgrid$ = "Q" THEN inc% = inc%*2
- pitch% += inc%
- :
- FOR counter% = 0 TO 9
- IF pitch% > 2 + (48*counter%) THEN
- octave% = counter%
- ENDIF
- NEXT
- :
- pitch% -= (48*octave%)
- IF pitch% > 2 AND pitch% < 8 THEN
- pitchclass% = 0 : diff% = pitch% - 4
- ENDIF
- IF pitch% > 7 AND pitch% < 16 THEN
- pitchclass% = 1 : diff% = pitch% - 12
- ENDIF
- IF pitch% > 15 AND pitch% < 23 THEN
- pitchclass% = 2 : diff% = pitch% - 20
- ENDIF
- IF pitch% > 22 AND pitch% < 29 THEN
- pitchclass% = 3 : diff% = pitch% - 24
- ENDIF
- IF pitch% > 28 AND pitch% < 36 THEN
- pitchclass% = 4 : diff% = pitch% - 32
- ENDIF
- IF pitch% > 35 AND pitch% < 44 THEN
- pitchclass% = 5 : diff% = pitch% - 40
- ENDIF
- IF pitch% > 43 AND pitch% < 51 THEN
- pitchclass% = 6 : diff% = pitch% - 48
- ENDIF
- accid% = diff% + 5 : nextpitch% = pitches%(count%+1)
- pitches%(count%) = (pitchclass%*100)+(accid%*10)+octave%
- :
- NEXT
- :
- numpitches% = manyattacks%
- distort$ = "OFF" : PROCinsertpitches
- :
- WHEN "durations" :
- :
- PROCwindow(20,69,70,54)
- PRINT'" distort durations between"
- INPUT" what percentage "firstpercent%
- IF firstpercent% = 0 THEN
- PRINT '" that's ";prevfirstpercent%;" then?"
- CASE GET$ OF
- WHEN "Y","y" :
- firstpercent% = prevfirstpercent%
- OTHERWISE firstpercent% = prevfirstpercent%
- ENDCASE
- ENDIF
- INPUT" and what percentage "secondpercent%
- IF secondpercent% = 0 THEN
- PRINT '" that's ";prevsecondpercent%;" then?"
- CASE GET$ OF
- WHEN "Y","y","0" :
- secondpercent% = prevsecondpercent%
- OTHERWISE secondpercent% = prevsecondpercent%
- ENDCASE
- ENDIF
- :
- prevfirstpercent% = firstpercent% : prevsecondpercent% = secondpercent%
- :
- FOR count% = manyattacks% TO 1 STEP -1
- durations%(count%) = durations%(count%-1)
- NEXT
- :
- FOR count% = 1 TO manyattacks%
- multiplier = (RND(secondpercent%-firstpercent%)+firstpercent%)/100
- durations%(count%) = durations%(count%)*multiplier
- NEXT
- :
- FOR count% = 0 TO (manyattacks%-1)
- durations%(count%) = durations%(count%+1)
- NEXT
- durations%(manyattacks%) = 0
- :
- numdurations% = manyattacks%
- distort$ = "OFF" : PROCinsertdurations
- WHEN "amplitudes" :
- :
- PROCwindow(20,69,70,54)
- CLS
- PRINT'" Increase or decrease by 1 notch (I/D) "
- CASE GET$ OF
- WHEN "I","i" :
- FOR count% = 0 TO manyattacks%-1
- IF amplitudes%(count%) < 9 THEN amplitudes%(count%) += 1
- IF envelopes%(count%) <> 9 THEN
- number% = envelopes%(count%) DIV 10^3
- IF number% = 0 THEN numphases% = 1
- IF number% > 0 AND number% < 100 THEN numphases% = 2
- IF number% > 99 THEN numphases% = 3
- CASE numphases% OF
- WHEN 1 :
- IF envelopes%(count%)MOD10 < 9 THEN envelopes%(count%) += 1
- WHEN 2 :
- IF envelopes%(count%)MOD10 < 9 THEN envelopes%(count%) += 1
- IF (envelopes%(count%)DIV10)MOD10 < 9 THEN envelopes%(count%) += 10
- WHEN 3 :
- IF envelopes%(count%)MOD10 < 9 THEN envelopes%(count%) += 1
- IF (envelopes%(count%)DIV10)MOD10 < 9 THEN envelopes%(count%) += 10
- IF (envelopes%(count%)DIV100)MOD10 < 9 THEN envelopes%(count%) += 100
- ENDCASE
- ENDIF
- NEXT
- :
- OTHERWISE
- FOR count% = 0 TO manyattacks%-1
- IF amplitudes%(count%) > 0 THEN amplitudes%(count%) -= 1
- IF envelopes%(count%) <> 9 THEN
- number% = envelopes%(count%) DIV 10^3
- IF number% = 0 THEN numphases% = 1
- IF number% > 0 AND number% < 100 THEN numphases% = 2
- IF number% > 99 THEN numphases% = 3
- :
- CASE numphases% OF
- WHEN 1 :
- IF envelopes%(count%)MOD10 > 0 THEN envelopes%(count%) -= 1
- WHEN 2 :
- IF envelopes%(count%)MOD10 > 0 THEN envelopes%(count%) -= 1
- IF (envelopes%(count%)DIV10)MOD10 > 0 THEN envelopes%(count%) -= 10
- WHEN 3 :
- IF envelopes%(count%)MOD10 > 0 THEN envelopes%(count%) -= 1
- IF (envelopes%(count%)DIV10)MOD10 > 0 THEN envelopes%(count%) -= 10
- IF (envelopes%(count%)DIV100)MOD10 > 0 THEN envelopes%(count%) -= 100
- ENDCASE
- ENDIF
- NEXT
- :
- ENDCASE
- :
- numenvelopes% = manyattacks%
- distort$ = "OFF" : PROCinsertenvelopes
- :
- WHEN "envelopes" :
- PRINT'" give 1st envelope point random "
- INPUT" percentages between what percentage "firstpercent%
- INPUT" and what percentage "secondpercent%
- :
- FOR count% = manyattacks% TO 1 STEP -1
- envelopes%(count%) = envelopes%(count%-1)
- glissandos%(count%) = glissandos%(count%-1)
- NEXT
- :
- FOR count% = 1 TO manyattacks%
- newpercentage% = RND(secondpercent%-(firstpercent%-1))+(firstpercent%)
- ph2% = envelopes%(count%) DIV 10^5
- amps% = envelopes%(count%) MOD 10^3
- ph1% = newpercentage%
- envelopes%(count%) = (ph2%*10^5)+(ph1%*10^3)+amps%
- glissandos%(count%) = glissandos%(count%)
- :
- NEXT
- :
- IF numphases% = 3 THEN
- :
- PRINT'" give 2nd envelope point random "
- INPUT" percentages between what percentage "firstpercent%
- INPUT" and what percentage "secondpercent%
- :
- FOR count% = 1 TO manyattacks%
- newpercentage% = RND(secondpercent%-(firstpercent%-1))+(firstpercent%)
- ph1% = (envelopes%(count%) DIV 10^3) MOD 10^2
- amps% = envelopes%(count%) MOD 10^3
- ph2% = newpercentage%
- envelopes%(count%) = (ph2%*10^5)+(ph1%*10^3)+amps%
- glissandos%(count%) = glissandos%(count%)
- :
- NEXT
- :
- ENDIF
- :
- FOR count% = 0 TO (manyattacks%-1)
- envelopes%(count%) = envelopes%(count%+1)
- NEXT
- envelopes%(manyattacks%) = 0
- numenvelopes% = manyattacks%
- distort$ = "OFF" : PROCinsertenvelopes
- :
- WHEN "inflections" :
- :
- PROCwindow(20,69,70,55)
- PRINT'" distort inflections up or down "
- PRINT" by up to how many cents "
- INPUT" (max. 49) "cents%
- :
- FOR count% = manyattacks% TO 1 STEP -1
- inflections%(count%) = inflections%(count%-1)
- NEXT
- :
- FOR count% = 1 TO manyattacks%
- :
- REPEAT
- factor% = RND(cents%)
- upordown% = RND(2)
- :
- IF upordown% = 1 THEN
- :
- inflections%(count%) = inflections%(count%)+factor%
- ELSE
- inflections%(count%) = inflections%(count%)-factor% :
- ENDIF
- :
- UNTIL inflections%(count%) > 0 AND inflections%(count%) < 100
- :
- NEXT
- :
- FOR count% = 0 TO (manyattacks%-1)
- inflections%(count%) = inflections%(count%+1)
- NEXT
- inflections%(manyattacks%) = 0
- :
- numinflections% = manyattacks%
- distort$ = "OFF" : PROCinsertinflections
- :
- ENDCASE
- :
- ENDPROC
- :
- REM****************************************************
- :
- DEF PROCreorderattacks
- :
- r1% = 0
- :
- REM fills attacks3% with original actual durats in beats
- attacks2%() = attacks1%()
- FOR count% = 0 TO manyattacks%-2
- attacks3%(count%) = attacks2%(count%+1)-attacks2%(count%)
- NEXT
- :
- PRINT''" Random or determined order? (R/1 or D)"
- CASE GET$ OF
- WHEN "D","d" :
- CLS
- PRINT''" There are ";manyattacks%-1;" durations in the group"
- FOR count% = 1 TO manyattacks%-1
- PRINT'" New duration ";count%;
- INPUT" is now to be old duration "r%
- attacks1%(count%) = attacks1%(count%-1)+attacks3%(r%-1)
- NEXT
- OTHERWISE
- CLS
- PRINT''" There are ";manyattacks%-1;" durations in the group"
- PRINT'" How many durations do you want to re-order? "
- INPUT " (for all press 0) "howmany%
- IF howmany% = 0 THEN howmany% = manyattacks%-1
- INPUT'" Starting at duration number (0 = 1) "number%
- IF number% = 0 THEN number% = 1
- INPUT'" Chance of repeating original order(%) "chanceofnext%
- attacks2%() = 0 : count% = number%
- REPEAT
- PROCchoosenext
- IF choosenext$ = "y" AND r1% < howmany% THEN
- r1% = r1% + 1
- ELSE
- r1% = RND(howmany%)
- ENDIF
- r% = r1%+number%-1
- IF attacks2%(r%) = 0 THEN
- attacks1%(count%) = attacks1%(count%-1)+attacks3%(r%-1)
- attacks2%(r%) = 1 : count% += 1
- ENDIF
- UNTIL count% = howmany%+number%
- ENDCASE
- :
- reordered$ = "y" : seereordery$ = "n"
- PROCinsertattacks
- :
- ENDPROC
- :
- REM********************************************************
- :
- DEF PROCchoosenext
- :
- numb% = RND(100)
- IF numb% >= chanceofnext% THEN choosenext$ = "n" ELSE choosenext$ = "y"
- ENDPROC
- :
- REM********************************************************
- :
- DEF PROCsavepitchstring
- :
- *Dir HostFS::HardDisc4.$.CAC.Files
- firstnaming$ = "n"
- CLS
- IF filenamestg$ = "" THEN
- INPUT'" filename "filenamestg$
- firstnaming$ = "y"
- ENDIF
- IF firstnaming$ = "n" THEN
- PRINT'" as '";filenamestg$;"'?"
- CASE GET$ OF
- WHEN "Y","y","+" :
- OTHERWISE INPUT'" filename "filenamestg$
- ENDCASE
- ENDIF
- :
- channel = OPENOUT filenamestg$
- PRINT#channel, numpitches%
- PRINT#channel, grid$
- PRINT#channel, samplesize%
- PRINT#channel, octavesections%
- PRINT#channel, transpositionsections%
- PRINT#channel, contoursections%
- FOR a% = 0 TO samplesize%
- PRINT#channel, sample%(a%)
- NEXT
- FOR a% = 0 TO octavesections%
- FOR b% = 0 TO 48
- FOR c% = 0 TO 11
- PRINT#channel, octavesequences%(a%,b%,c%)
- NEXT
- NEXT
- NEXT
- FOR a% = 0 TO transpositionsections%
- FOR b% = 0 TO 1
- PRINT#channel, transpositionsequences%(a%,b%)
- NEXT
- NEXT
- FOR a% = 0 TO contoursections%
- FOR b% = 0 TO 11
- PRINT#channel, contoursequences%(a%,b%)
- NEXT
- NEXT
- :
- CLOSE#channel
- *NoDir
- :
- ENDPROC
- :
- REM***************************************************
- :
- DEF PROCloadpitchstring
- :
- *Dir HostFS::HardDisc4.$.CAC.Files
- INPUT'" filename "filenamestg$
- channel = OPENIN filenamestg$
- REPEAT
- INPUT#channel, numpitches%
- INPUT#channel, grid$
- INPUT#channel, samplesize%
- INPUT#channel, octavesections%
- INPUT#channel, transpositionsections%
- INPUT#channel, contoursections%
- FOR a% = 0 TO samplesize%
- INPUT#channel, sample%(a%)
- NEXT
- FOR a% = 0 TO octavesections%
- FOR b% = 0 TO 48
- FOR c% = 0 TO 11
- INPUT#channel, octavesequences%(a%,b%,c%)
- NEXT
- NEXT
- NEXT
- FOR a% = 0 TO transpositionsections%
- FOR b% = 0 TO 1
- INPUT#channel, transpositionsequences%(a%,b%)
- NEXT
- NEXT
- FOR a% = 0 TO contoursections%
- FOR b% = 0 TO 11
- INPUT#channel, contoursequences%(a%,b%)
- NEXT
- NEXT
- UNTIL EOF#channel
- CLOSE#channel
- *NoDir
- :
- ENDPROC
- :
- REM*****************************************************
- :
- DEF PROCeditpitchstring
- :
- IF loadstring$ = "y" THEN PROCloadpitchstring
- :
- PRINT'" Change number of notes in the"
- PRINT " pitch string? (Y/+ OR N/return)"
- PRINT'" (currently ";numpitches%;")"
- CASE GET$ OF
- WHEN "Y","y","+","=" : do$ = "y"
- OTHERWISE do$ = "n"
- ENDCASE
- IF do$ = "y" THEN
- PRINT'" Total number of notes in the"
- INPUT " pitch string (inc. sample) "numpitches%
- ENDIF
- CLS
- :
- PRINT'" Change the sample?"
- PRINT'" currently "
- FOR count% = 1 TO samplesize%
- x% = sample%(count%)
- WHILE x% > 52
- x% -= 48
- ENDWHILE
- CASE x% OF
- WHEN 5 : PRINT count%;". C nat"
- WHEN 9 : PRINT count%;". C shrp"
- WHEN 13 : PRINT count%;". D nat"
- WHEN 17 : PRINT count%;". E flat"
- WHEN 21 : PRINT count%;". E nat"
- WHEN 25 : PRINT count%;". F nat"
- WHEN 29 : PRINT count%;". F shrp"
- WHEN 33 : PRINT count%;". G nat"
- WHEN 37 : PRINT count%;". A flat"
- WHEN 41 : PRINT count%;". A nat"
- WHEN 45 : PRINT count%;". B flat"
- WHEN 49 : PRINT count%;". B nat"
- OTHERWISE
- ENDCASE
- NEXT
- REM eighthtones not yet implemented!
- CASE GET$ OF
- WHEN "Y","y","+","=" : do$ = "y"
- OTHERWISE do$ = "n"
- ENDCASE
- IF do$ = "y" THEN
- PRINT'" Change the number of notes in the sample?"
- PRINT'" Currently ";samplesize%
- CASE GET$ OF
- WHEN "Y","y","+" : do$ = "y"
- OTHERWISE do$ = "n"
- ENDCASE
- IF do$ = "y" THEN
- INPUT'" How many notes in the sample? "samplesize%
- ENDIF
- PRINT'" Change any of the sample's notes?"
- CASE GET$ OF
- WHEN "Y","y","+" : do$ = "y"
- OTHERWISE do$ = "n"
- ENDCASE
- IF do$ = "y" THEN
- INPUT'" How many "x%
- FOR count% = 1 TO x%
- IF x% < samplesize% THEN
- PRINT'" note ";count%;" is note number "
- INPUT y%
- PRINT'" this note is now pitchclass ";
- ELSE
- y% = count%
- PRINT'" note ";count%;" is now pitchclass ";
- ENDIF
- COLOUR 1
- CASE GET$ OF
- WHEN "C","c" : samplenote% = 0 : PRINT "C"
- WHEN "D","d" : samplenote% = 1 : PRINT "D"
- WHEN "E","e" : samplenote% = 2 : PRINT "E"
- WHEN "F","f" : samplenote% = 3 : PRINT "F"
- WHEN "G","g" : samplenote% = 4 : PRINT "G"
- WHEN "A","a" : samplenote% = 5 : PRINT "A"
- WHEN "B","b" : samplenote% = 6 : PRINT "B"
- ENDCASE
- samplenote% = samplenote%*100
- COLOUR 0
- PRINT " accidental ";
- COLOUR 1
- CASE GET$ OF
- WHEN "1" : samplenote% += 10 : PRINT "flat"
- WHEN "2" : samplenote% += 20 : PRINT "3/8 flat"
- WHEN "3" : samplenote% += 30 : PRINT "1/4 flat"
- WHEN "4" : samplenote% += 40 : PRINT "1/8 flat"
- WHEN "5" : samplenote% += 50 : PRINT "nat"
- WHEN "6" : samplenote% += 60 : PRINT "1/8 shrp"
- WHEN "7" : samplenote% += 70 : PRINT "1/4 shrp"
- WHEN "8" : samplenote% += 80 : PRINT "3/8 shrp"
- WHEN "9" : samplenote% += 90 : PRINT "shrp"
- ENDCASE
- COLOUR 0
- samplenote% += 5
- PROCconvertsamplenote
- sample%(y%) = samplenote%
- :
- NEXT
- ENDIF
- :
- ENDIF
- :
- CLS
- PRINT'" Make changes to the octave sequences?"
- PRINT'" Currently"
- VDU 14
- FOR a% = 1 TO octavesections%
- FOR b% = 3 TO 47 STEP 4
- FOR c% = 1 TO 11
- IF b% = 3 AND c% = 1 THEN PRINT'" C nat"
- IF b% = 7 AND c% = 1 THEN PRINT'" C shrp"
- IF b% = 11 AND c% = 1 THEN PRINT'" D nat"
- IF b% = 15 AND c% = 1 THEN PRINT'" E flat"
- IF b% = 19 AND c% = 1 THEN PRINT'" E nat"
- IF b% = 23 AND c% = 1 THEN PRINT'" F nat"
- IF b% = 27 AND c% = 1 THEN PRINT'" F shrp"
- IF b% = 31 AND c% = 1 THEN PRINT'" G nat"
- IF b% = 35 AND c% = 1 THEN PRINT'" A flat"
- IF b% = 39 AND c% = 1 THEN PRINT'" A nat"
- IF b% = 43 AND c% = 1 THEN PRINT'" B flat"
- IF b% = 47 AND c% = 1 THEN PRINT'" B nat"
- IF octavesequences%(a%,b%,c%) > 0 THEN PRINT octavesequences%(a%,b%,c%)
- NEXT
- NEXT
- NEXT
- VDU 15
- CASE GET$ OF
- WHEN "Y","y","+" : do$ = "y"
- OTHERWISE do$ = "n"
- ENDCASE
- IF do$ = "y" THEN
- PRINT'" Change the number of sections of "
- PRINT" octave sequences?"
- CASE GET$ OF
- WHEN "Y","y","+" : do$ = "y"
- OTHERWISE do$ = "n"
- ENDCASE
- IF do$ = "y" THEN
- PRINT'" How many different sections of"
- INPUT " octave sequences are there "octavesections%
- ENDIF
- IF octavesections% > 1 THEN
- PRINT'" Change the starting point of"
- PRINT" any sections?"
- CASE GET$ OF
- WHEN "Y","y","+" : do$ = "y"
- OTHERWISE do$ = "n"
- ENDCASE
- IF do$ = "y" THEN
- INPUT'" How many "z%
- FOR count% = 1 TO z%
- PRINT'" section ";count%;" is section "
- INPUT y%
- PRINT'" this section now begins at note number "
- INPUT x%
- octavesequences%(y%,0,0) = x%
- NEXT
- ENDIF
- ENDIF
- :
- PRINT'" Make changes to the actual octave"
- PRINT" sequences?"
- CASE GET$ OF
- WHEN "Y","y","+" : do$ = "y"
- OTHERWISE do$ = "n"
- ENDCASE
- IF do$ = "y" THEN
- FOR count% = 1 TO octavesections%
- PRINT'" Any changes to section ";count%
- CASE GET$ OF
- WHEN "Y","y","+" : do$ = "y"
- OTHERWISE do$ = "n"
- ENDCASE
- IF do$ = "y" THEN
- FOR pitch% = 0 TO 47
- entry$ = "n"
- IF pitch% MOD 4 = 0 AND grid$<>"s" THEN entry$ = "y"
- IF (pitch%-2)MOD4 = 0 THEN entry$ = "y"
- IF (pitch%-1)MOD2 = 0 AND grid$ = "e" THEN entry$ = "y"
- IF entry$ = "y" THEN
- PRINT'" changes in section ";count%;" to ";
- COLOUR 1 : PRINT pitchnames$(pitch%) : COLOUR 0
- CASE GET$ OF
- WHEN "Y","y","+" : do$ = "y"
- OTHERWISE do$ = "n"
- ENDCASE
- IF do$ = "y" THEN
- PRINT '"In section ";count%;" the sequence of octaves for ";
- COLOUR 1 : PRINT pitchnames$(pitch%)
- COLOUR 0 : PRINT "has how many elements "
- INPUT e%
- PRINT""
- octavesequences%(count%,pitch%+1,0) = e%
- FOR counter% = 1 TO 11
- octavesequences%(count%,pitch%+1,counter%) = 0
- NEXT
- FOR counter% = 1 TO e%
- PRINT " element ";counter%;
- INPUT " is octave "o%
- octavesequences%(count%,pitch%+1,counter%) = o%
- NEXT
- ENDIF
- ENDIF
- NEXT
- ENDIF
- NEXT
- ENDIF
- ENDIF
- :
- CLS
- PRINT'" Make changes to transposition levels?"
- PRINT'" Currently"
- FOR a% = 1 TO transpositionsections%
- PRINT'" section ";a%;". ";transpositionsequences%(a%,1)/4;" semitones starting at note number ";transpositionsequences%(a%,0)
- NEXT
- CASE GET$ OF
- WHEN "Y","y","+" : do$ = "y"
- OTHERWISE do$ = "n"
- ENDCASE
- IF do$ = "y" THEN
- PRINT'" Change the number of sections "
- PRINT" of transposition levels?"
- CASE GET$ OF
- WHEN "Y","y","+" : do$ = "y"
- OTHERWISE do$ = "n"
- ENDCASE
- IF do$ = "y" THEN
- PRINT'" How many different sections of"
- INPUT" transposition are there "transpositionsections%
- ENDIF
- IF transpositionsections% > 1 THEN
- PRINT'" Change the starting point of"
- PRINT" any sections?"
- CASE GET$ OF
- WHEN "Y","y","+" : do$ = "y"
- OTHERWISE do$ = "n"
- ENDCASE
- IF do$ = "y" THEN
- INPUT'" How many "z%
- FOR count% = 1 TO z%
- PRINT'" Section ";count%;" is section "
- INPUT y%
- PRINT'" this section now begins at "
- INPUT " note number "n%
- transpositionsequences%(y%,0) = n%
- NEXT
- ENDIF
- PRINT'" Change the degree of transposition"
- PRINT" of any sections?"
- CASE GET$ OF
- WHEN "Y","y","+" : do$ = "y"
- OTHERWISE do$ = "n"
- ENDCASE
- IF do$ = "y" THEN
- INPUT'" How many "z%
- FOR count% = 1 TO z%
- PRINT'" Section ";count%;" is section "
- INPUT y%
- PRINT'" This section now transposes"
- PRINT" up/down by how many ";
- CASE grid$ OF
- WHEN "e" : PRINT "eighthtones" : INPUT " (+/- 1 etc) "x%
- transpositionsequences%(y%,1) = x%
- WHEN "q" : PRINT "quartertones" : INPUT " (+/- 1 etc) "x%
- transpositionsequences%(y%,1) = x% * 2
- WHEN "s" : PRINT "semitones" : INPUT " (+/- 1 etc) "x%
- transpositionsequences%(y%,1) = x% * 4
- ENDCASE
- NEXT
- ENDIF
- ENDIF
- ENDIF
- :
- CLS
- PRINT'" Make changes to the contour sequences?"
- PRINT'" Currently"
- FOR a% = 1 TO contoursections%
- FOR b% = 2 TO contoursequences%(a%,1)+1
- IF b% = 2 THEN PRINT'" section ";a%
- PRINT contoursequences%(a%,b%)
- NEXT
- NEXT
- CASE GET$ OF
- WHEN "Y","y","+" : do$ = "y"
- OTHERWISE do$ = "n"
- ENDCASE
- IF do$ = "y" THEN
- PRINT'" Change the number of sections?"
- CASE GET$ OF
- WHEN "Y","y","+" : do$ = "y"
- OTHERWISE do$ = "n"
- ENDCASE
- IF do$ = "y" THEN
- PRINT'" How many different sections of "
- INPUT " contour sequences are there "contoursections%
- ENDIF
- IF contoursections%>1 THEN
- PRINT'" Change the starting point"
- PRINT" of any sections?"
- CASE GET$ OF
- WHEN "Y","y","+" : do$ = "y"
- OTHERWISE do$ = "n"
- ENDCASE
- IF do$ = "y" THEN
- INPUT'" How many "z%
- FOR count% = 1 TO z%
- PRINT'" Section ";count%;" is section "
- INPUT y%
- PRINT'" This section"
- INPUT " begins at note number "n%
- contoursequences%(y%,0) = n%
- NEXT
- ENDIF
- ENDIF
- :
- PRINT'" Make changes to any contours?"
- CASE GET$ OF
- WHEN "Y","y","+" : do$ = "y"
- OTHERWISE do$ = "n"
- ENDCASE
- IF do$ = "y" THEN
- FOR count% = 1 TO contoursections%
- PRINT'" Change section ";count%;"?"
- CASE GET$ OF
- WHEN "Y","y","+" : do$ = "y"
- OTHERWISE do$ = "n"
- ENDCASE
- IF do$ = "y" THEN
- PRINT'" In section ";count%;
- INPUT " there are how many contours "c%
- contoursequences%(count%,1) = c%
- PRINT""
- FOR counter% = 1 TO c%
- PRINT " number ";counter%;
- INPUT " is contour "contoor%
- contoursequences%(count%,counter%+1) = contoor%
- NEXT
- ENDIF
- NEXT
- ENDIF
- ENDIF
- :
- PROCdeletesections
- REM this deletes info about sections which existed in
- REM previous versions of the string
- :
- contoursize% = 0 : seriesnote% = 1 : samplenote% = 0
- contoursequence% = 1 : transpositionsequence% = 1
- octavesequence% = 1 : transpositionsequences%(1,1) = 0
- contourloop% = 0 : octaveloop%() = 0
- :
- REPEAT
- seriesnote% += contoursize%
- IF seriesnote% >= contoursequences%(contoursequence%+1,0) AND contoursequences%(contoursequence%+1,0) <> 0 THEN
- contoursequence% += 1
- contourloop% = 0
- ENDIF
- :
- contourloop% += 1
- IF contourloop% > contoursequences%(contoursequence%,1) THEN contourloop% = 1
- contour% = contoursequences%(contoursequence%,contourloop%+1)
- contoursize% = contours%(contour%,0)
- :
- IF seriesnote% >= transpositionsequences%(transpositionsequence%+1,0) AND transpositionsequences%(transpositionsequence%+1,0) <> 0 THEN
- transpositionsequence% += 1
- ENDIF
- transposition% = transpositionsequences%(transpositionsequence%,1)
- :
- FOR count% = 1 TO contoursize%
- samplenote% += 1
- IF samplenote% > samplesize% THEN samplenote% = 1
- group%(count%) = sample%(samplenote%) + transposition%
- NEXT
- :
- IF seriesnote% >= octavesequences%(octavesequence%+1,0,0) AND octavesequences%(octavesequence%+1,0,0) <> 0 THEN
- octavesequence% += 1
- octaveloop%() = 0
- ENDIF
- :
- FOR count% = 1 TO contoursize%
- pitchclass% = group%(count%)
- REPEAT
- pitchclass% -= 48
- UNTIL pitchclass% < 51
- pitchclass% -= 2
- octaveloop%(pitchclass%) += 1
- IF octaveloop%(pitchclass%) > octavesequences%(octavesequence%,pitchclass%,0) THEN octaveloop%(pitchclass%) = 1
- oxtave% = octavesequences%(octavesequence%,pitchclass%,octaveloop%(pitchclass%))
- group%(count%) = (pitchclass%+2) + (48*oxtave%)
- NEXT
- :
- IF contoursize% > 1 THEN
- REPEAT
- FOR count% = 1 TO (contoursize%-1)
- IF group%(count%) >= group%(count%+1) THEN
- save% = group%(count%)
- group%(count%) = group%(count%+1)
- group%(count%+1) = save%
- ENDIF
- NEXT
- no% = 0
- FOR count% = 1 TO (contoursize%-1)
- IF group%(count%) > group%(count%+1) THEN no% = 1
- NEXT
- UNTIL no% = 0
- ENDIF
- :
- FOR count% = 1 TO contoursize%
- simplenote% = group%(contours%(contour%,count%))
- PROCconvertsimplenote
- pitches%((seriesnote%+count%)-1) = simplenote%
- NEXT
- :
- UNTIL ((seriesnote%+contoursize%)-1) >= numpitches%
- :
- FOR count% = 0 TO numpitches%-1 : pitches%(count%) = pitches%(count%+1) : NEXT
- PRINT'" Do you want to save this pitch string?"
- CASE GET$ OF
- WHEN "Y","y","+" : PROCsavepitchstring
- OTHERWISE
- ENDCASE
- :
- PROCinsertpitches
- :
- ENDPROC
- :
- REM************************************************
- :
- :
- DEF PROCdeletesections
- :
- FOR count% = 2 TO 50
- IF count% > octavesections% THEN
- octavesequences%(count%,0,0) = 0
- ENDIF
- NEXT
- :
- FOR count% = 2 TO 199
- IF count% > transpositionsections% THEN
- transpositionsequences%(count%,0) = 0
- ENDIF
- NEXT
- :
- FOR count% = 2 TO 50
- IF count% > contoursections% THEN
- contoursequences%(count%,0) = 0
- ENDIF
- NEXT
- :
- ENDPROC
- :
- REM**************************************************
- :
- DEF PROCyesno
- :
- CASE GET$ OF
- WHEN "Y","y" : on = 1
- OTHERWISE on = 2
- ENDCASE
- :
- ENDPROC
- :
- REM**************************************************
- :
- DEF PROCeditlayers
- :
- chanceoflayer%(1) = 1
- :
- PRINT'" Alter total length? [currently ";totallength%;"]"
- PROCyesno
- IF on = 1 THEN
- INPUT'" Total duration, in BEATS "totallength%
- ENDIF
- PRINT''" LAYERS -"
- PRINT'" Alter number of layers? [currently ";numlayers%;"]"
- PROCyesno
- IF on = 1 THEN
- INPUT'" How many layers "numlayers%
- ENDIF
- :
- PRINT'" Alter contribution proportions"
- PRINT" of the layers?"
- PROCyesno
- IF on = 1 THEN
- REM 1
- :
- PRINT'" Alter number of sections of"
- PRINT" proportions?"
- PROCyesno
- IF on = 1 THEN
- PRINT'" Piece is divided into how many sections"
- PRINT " of different contribution-proportions "
- PRINT " [currently "; numlayersections%;"]"
- INPUT numlayersections%
- ENDIF
- :
- IF numlayersections% > 1 THEN
- :
- PRINT'" Alter starting points of sections?"
- PROCyesno
- IF on = 1 THEN
- FOR count% = 2 TO numlayersections%
- PRINT'" Alter start point of section ";count%;" [currently ";startoflayersection%(count%);"]"
- PROCyesno
- IF on = 1 THEN
- PRINT'" Section ";count%;" starts at beat number "
- INPUT startoflayersection%(count%)
- ENDIF
- NEXT
- ENDIF
- ENDIF
- :
- PRINT'" Alter any of the proportions?"
- PROCyesno
- IF on = 1 THEN
- REM 2
- FOR count% = 1 TO numlayersections%
- PRINT'" Alter proportions in section ";count%
- PROCyesno
- IF on = 1 THEN
- REM 3
- FOR count1% = 1 TO numlayers%
- PRINT'" Alter (section ";count%;") layer ";count1%;" proportions? [currently ";shareoflayers%(count%,count1%);"]"
- PROCyesno
- IF on = 1 THEN
- REM 4
- PRINT '"In section ";count%;", layer ";count1%;" has "
- PRINT "how many proportions?"
- INPUT shareoflayers%(count%,count1%)
- ENDIF : REM 4
- NEXT
- ENDIF : REM 3
- NEXT
- ENDIF : REM 2
- :
- ENDIF : REM 1
- :
- PRINT''" NUMBER OF ATTACKS, DURATIONS, MULTIPLIERS, RETURN AFTERS"
- FOR count% = 1 TO numlayers%
- PRINT'" Alterations to layer ";count%
- PROCyesno
- IF on = 1 THEN
- REM 5
- PRINT'" Alter number of attacks?"
- PROCyesno
- IF on = 1 THEN
- REM 6
- PRINT'" Alter whether controlled by sections/appearances?"
- PROCyesno
- IF on = 1 THEN
- REM 7
- PRINT'" In layer ";count%;" are the number of attacks controlled"
- PRINT " by sections or by appearance number (S/A)"
- PRINT " [currently ";attackscontrol$(count%);"]"
- CASE GET$ OF
- WHEN "S","s" :
- attackscontrol$(count%) = "S"
- OTHERWISE attackscontrol$(count%) = "A"
- ENDCASE
- ELSE
- IF attackscontrol$(count%) = "" THEN attackscontrol$(count%) = "S" : REM default for added layers
- ENDIF : REM 7
- :
- IF attackscontrol$(count%) = "S" THEN
- REM 8
- IF numattackssections%(count%) = 0 THEN numattackssections%(count%) = 1 : REM new layers
- PRINT'" Alter number of sections? [currently ";numattackssections%(count%);"]"
- PROCyesno
- IF on = 1 THEN
- REM 9
- INPUT'" How many sections "numattackssections%(count%)
- ENDIF : REM 9
- IF numattackssections%(count%) > 1 THEN
- PRINT'" Alter starting point of any sections?"
- PROCyesno
- IF on = 1 THEN
- REM 10
- FOR count1% = 2 TO numattackssections%(count%)
- PRINT'" Alter starting point of section ";count1%;" currently [";startofattackssection%(count%,count1%);"]"
- PROCyesno
- IF on = 1 THEN
- REM 11
- PRINT'" (layer ";count%;") section ";count1%;" starts at beat"
- INPUT startofattackssection%(count%,count1%)
- ENDIF : REM 11
- NEXT
- ENDIF : REM 10
- ENDIF
- PRINT'" Alter the number of attacks in layer ";count%
- PROCyesno
- IF on = 1 THEN
- REM 12
- :
- FOR count1% = 1 TO numattackssections%(count%)
- PRINT'" Alter attacks in section ";count1%;" [currently ";numattax%(count%,count1%,0);"-";numattax%(count%,count1%,1);"]"
- PROCyesno
- IF on = 1 THEN
- REM 13
- PRINT'" In layer ";count%;", section ";count1%;" the number"
- PRINT" of attacks varies between..."
- INPUT numattax%(count%,count1%,0)
- INPUT" and..."numattax%(count%,count1%,1)
- ENDIF : REM 13
- NEXT
- ENDIF : REM 12
- ENDIF : REM 8
- :
- IF attackscontrol$(count%) = "A" THEN
- REM 14
- PRINT'" Alter number of 'sections' of appearances? [currently ";numattackssections1%(count%);"]"
- PROCyesno
- IF on = 1 THEN
- REM 15
- INPUT'" How many 'sections' of appearances "numattackssections1%(count%)
- ENDIF : REM 15
- IF numattackssections1%(count%) > 1 THEN
- PRINT'" Alter starting point of any sections?"
- PROCyesno
- IF on = 1 THEN
- REM 16
- FOR count1% = 2 TO numattackssections1%(count%)
- PRINT'" Alter starting point of section ";count1%;" [currently appearance ";startofattackssection1%(count%,count1%);"]"
- PROCyesno
- IF on = 1 THEN
- REM 17
- PRINT'" (layer ";count%;") section ";count1%;" starts at appearance "
- INPUT startofattackssection1%(count%,count1%)
- ENDIF : REM 17
- NEXT
- ENDIF : REM 16
- ENDIF
- :
- PRINT'" Alter number of attacks in layer ";count%
- PROCyesno
- IF on = 1 THEN
- REM 18
- FOR count1% = 1 TO numattackssections1%(count%)
- PRINT'" Alter number of attacks in section ";count1%;" [currently ";numattax1%(count%,count1%,0);"-";numattax1%(count%,count1%,1);"]"
- PROCyesno
- IF on = 1 THEN
- REM 19
- PRINT'" In layer ";count%;", section ";count1%;" the number"
- PRINT" of attacks varies between..."
- INPUT numattax1%(count%,count1%,0)
- INPUT" and... "numattax1%(count%,count1%,1)
- ENDIF : REM 19
- NEXT
- ENDIF : REM 18
- ENDIF : REM 14
- ENDIF : REM 6
- :
- PRINT''" DURATIONS"
- PRINT'" Alter durations in layer ";count%
- PROCyesno
- IF on = 1 THEN
- REM 20
- :
- PRINT'" Alter whether durations in sections/appearances?"
- PROCyesno
- IF on = 1 THEN
- REM 21
- PRINT'" In layer ";count%;" are the unit durations controlled"
- PRINT" by sections or by appearance number (S/A)"
- PRINT " [currently ";durationscontrol$(count%);"]"
- CASE GET$ OF
- WHEN "S","s" :
- durationscontrol$(count%) = "S"
- OTHERWISE durationscontrol$(count%) = "A"
- ENDCASE
- ELSE
- IF durationscontrol$(count%) = "" THEN durationscontrol$(count%) = "S" : REM new layers default
- ENDIF : REM 21
- IF durationscontrol$(count%) = "S" THEN
- REM 22
- IF numdurationssections%(count%) = 0 THEN numdurationssections%(count%) = 1 : REM new layers
- PRINT'" Alter number of sections of durations? [currently ";numdurationssections%(count%);"]"
- PROCyesno
- IF on = 1 THEN
- REM 23
- INPUT'" How many sections "numdurationssections%(count%)
- ENDIF : REM 23
- IF numdurationssections%(count%) > 1 THEN
- PRINT'" Alter starting point of sections?"
- PROCyesno
- IF on = 1 THEN
- REM 24
- FOR count1% = 2 TO numdurationssections%(count%)
- PRINT'" Alter starting point of section ";count1%;" [currently ";startofdurationssection%(count%,count1%);"]"
- PROCyesno
- IF on = 1 THEN
- REM 25
- PRINT'" (layer ";count%;") section ";count1%;" starts at beat "
- INPUT startofdurationssection%(count%,count1%)
- ENDIF : REM 25
- NEXT
- ENDIF : REM 24
- ENDIF
- :
- PRINT'" Alter the unit durations?"
- PROCyesno
- IF on = 1 THEN
- REM 26
- FOR count1% = 1 TO numdurationssections%(count%)
- PRINT'" Alter the duration in section ";count1%;" [currently ";doorations%(count%,count1%);"]"
- PROCyesno
- IF on = 1 THEN
- REM 27
- PRINT'" In layer ";count%;", section ";count1%;" the unit duration is"
- INPUT beats% : PROCalterbeats
- doorations%(count%,count1%) = beats%
- ENDIF : REM 27
- NEXT
- ENDIF : REM 26
- ENDIF : REM 22
- :
- IF durationscontrol$(count%) = "A" THEN
- REM 28
- PRINT'" Alter number of 'sections'? [currently ";numdurationssections1%(count%);"]"
- PROCyesno
- IF on = 1 THEN
- REM 29
- INPUT'" How many 'sections' "numdurationssections1%(count%)
- ENDIF : REM 29
- IF numdurationssections1%(count%) > 1 THEN
- PRINT'" Alter starting point of 'sections'?"
- PROCyesno
- IF on = 1 THEN
- REM 30
- FOR count1% = 2 TO numdurationssections1%(count%)
- PRINT'" Alter section ";count1%;" [currently appearance ";startofdurationssection1%(count%,count1%);"]"
- PROCyesno
- IF on = 1 THEN
- REM 31
- PRINT'" (layer ";count%;") section ";count1%;" starts at appearance "
- INPUT startofdurationssection1%(count%,count1%)
- ENDIF : REM 31
- NEXT
- ENDIF : REM 30
- ENDIF
- PRINT'" Alter the unit durations?"
- PROCyesno
- IF on = 1 THEN
- REM 32
- FOR count1% = 1 TO numdurationssections1%(count%)
- PRINT'" Alter section ";count1%;" [currently ";doorations1%(count%,count1%);"]"
- PROCyesno
- IF on = 1 THEN
- REM 33
- PRINT'" In layer ";count%;", section ";count1%;" the unit duration is "
- INPUT doorations1%(count%,count1%)
- ENDIF : REM 33
- NEXT
- ENDIF : REM 32
- ENDIF : REM 28
- ENDIF : REM 20
- :
- PRINT'" Alter multiplication of durations?"
- PROCyesno
- IF on = 1 THEN
- REM 34
- PRINT'" Do you want the unit duration to be multiplied"
- PRINT " by a given series of values (Y/N) [currently ";multiplier$(count%);"]"
- CASE GET$ OF
- WHEN "Y","y" :
- multiplier$(count%) = "Y"
- PRINT'" starting fresh at each appearance or irrespective (F/I) "
- PRINT " [currently ";multipliermode$(count%);"]"
- CASE GET$ OF
- WHEN "F","f" :
- multipliermode$(count%) = "F"
- OTHERWISE multipliermode$(count%) = "I"
- ENDCASE
- :
- PRINT'" How many values [currently ";numvalues%(count%);"]"
- INPUT numvalues%(count%)
- FOR count1% = 1 TO numvalues%(count%)
- PRINT'" value ";count1%;" is [currently ";values(count%,count1%);"]"
- INPUT values(count%,count1%)
- NEXT
- OTHERWISE multiplier$(count%) = "N"
- ENDCASE
- ELSE
- IF multiplier$(count%) = "" THEN multiplier$(count%) = "N" : REM default for new layers
- ENDIF : REM 34
- :
- PRINT'" Alter control over reoccurence of layers?"
- PROCyesno
- IF on = 1 THEN
- REM 35
- IF numlayerOKsects%(count%) = 0 THEN word$ = "No" ELSE word$ = "Yes"
- PRINT'" Do you want this layer to reoccur according"
- PRINT " to minimum and maximum intervals (eg to"
- PRINT " control phrase-lengths)? [currently ";word$;"]"
- CASE GET$ OF
- WHEN "Y","y" :
- PRINT'" Alter number of sections? [currently ";numlayerOKsects%(count%);"]"
- PROCyesno
- IF on = 1 THEN
- REM 36
- INPUT'" How many sections of this "numlayerOKsects%(count%)
- ENDIF : REM 36
- FOR count1% = 1 TO numlayerOKsects%(count%)
- PRINT'" Any alteration to section ";count1%
- PROCyesno
- IF on = 1 THEN
- REM 37
- PRINT'" Alter the starting point? [currently ";layersOK%(count%,count1%,0);"]"
- PROCyesno
- IF on = 1 THEN
- REM 38
- IF numlayerOKsects%(count%) > 1 THEN
- PRINT'" section ";count1%;" begins at beat "
- INPUT x%
- ELSE x% = 0
- ENDIF
- layersOK%(count%,count1%,0) = x%
- ENDIF : REM 38
- PRINT'" Alter the controlling intervals?"
- PROCyesno
- IF on = 1 THEN
- REM 39
- PRINT'" in this section the layer should NOT reoccur"
- PRINT" until at least how many beats from the"
- PRINT" end of its previous occurence? [currently ";layersOK%(count%,count1%,1);"]"
- INPUT y%
- PRINT'" but SHOULD be made to reoccur after how "
- PRINT" many beats from the end of its previous"
- PRINT" occurence? [currently ";layersOK%(count%,count1%,2);"]"
- INPUT z%
- layersOK%(count%,count1%,1) = y%
- layersOK%(count%,count1%,2) = z%
- ENDIF : REM 39
- ENDIF : REM 37
- NEXT
- OTHERWISE numlayerOKsects%(count%) = 0
- ENDCASE
- ENDIF : REM 35
- :
- ENDIF : REM 5
- :
- NEXT
- :
- :
- PROClayeredattacks
- :
- ENDPROC
- :
- REM**************************************************
- :
- DEF PROCsavelayers
- :
- *Dir HostFS::HardDisc4.$.CAC.Files
- firstnaming$ = "n"
- CLS
- IF filenamelyr$ = "" THEN
- INPUT'" filename "filenamelyr$
- firstnaming$ = "y"
- ENDIF
- IF firstnaming$ = "n" THEN
- PRINT'" as '";filenamelyr$;"'?"
- CASE GET$ OF
- WHEN "N","n" : INPUT'" filename "filenamelyr$
- OTHERWISE
- ENDCASE
- ENDIF
- :
- channel = OPENOUT filenamelyr$
- PRINT#channel, totallength%
- PRINT#channel, numlayers%
- PRINT#channel, numlayersections%
- FOR a% = 0 TO numlayersections%
- PRINT#channel, startoflayersection%(a%)
- NEXT
- FOR a% = 0 TO numlayersections%
- FOR b% = 0 TO numlayers%
- PRINT#channel, shareoflayers%(a%,b%)
- NEXT
- NEXT
- FOR a% = 0 TO numlayers%
- PRINT#channel, attackscontrol$(a%)
- NEXT
- FOR a% = 0 TO numlayers%
- PRINT#channel, numattackssections%(a%)
- NEXT
- FOR a% = 0 TO numlayers%
- FOR b% = 0 TO numattackssections%(a%)
- PRINT#channel, startofattackssection%(a%,b%)
- NEXT
- NEXT
- FOR a% = 0 TO numlayers%
- FOR b% = 0 TO numattackssections%(a%)
- FOR c% = 0 TO 1
- PRINT#channel, numattax%(a%,b%,c%)
- NEXT
- NEXT
- NEXT
- FOR a% = 0 TO numlayers%
- PRINT#channel, numattackssections1%(a%)
- NEXT
- FOR a% = 0 TO numlayers%
- FOR b% = 0 TO numattackssections1%(a%)
- PRINT#channel, startofattackssection1%(a%,b%)
- NEXT
- NEXT
- FOR a% = 0 TO numlayers%
- FOR b% = 0 TO numattackssections1%(a%)
- FOR c% = 0 TO 1
- PRINT#channel, numattax1%(a%,b%,c%)
- NEXT
- NEXT
- NEXT
- FOR a% = 0 TO numlayers%
- PRINT#channel, durationscontrol$(a%)
- NEXT
- FOR a% = 0 TO numlayers%
- PRINT#channel, numdurationssections%(a%)
- NEXT
- FOR a% = 0 TO numlayers%
- FOR b% = 0 TO numdurationssections%(a%)
- PRINT#channel, startofdurationssection%(a%,b%)
- NEXT
- NEXT
- FOR a% = 0 TO numlayers%
- FOR b% = 0 TO numdurationssections%(a%)
- PRINT#channel, doorations%(a%,b%)
- NEXT
- NEXT
- FOR a% = 0 TO numlayers%
- PRINT#channel, numdurationssections1%(a%)
- NEXT
- FOR a% = 0 TO numlayers%
- FOR b% = 0 TO numdurationssections1%(a%)
- PRINT#channel, doorations1%(a%,b%)
- NEXT
- NEXT
- FOR a% = 0 TO numlayers%
- FOR b% = 0 TO numdurationssections1%(a%)
- PRINT#channel, startofdurationssection1%(a%,b%)
- NEXT
- NEXT
- FOR a% = 0 TO numlayers%
- PRINT#channel, multiplier$(a%)
- NEXT
- FOR a% = 0 TO numlayers%
- PRINT#channel, multipliermode$(a%)
- NEXT
- FOR a% = 0 TO numlayers%
- PRINT#channel, numvalues%(a%)
- NEXT
- FOR a% = 0 TO numlayers%
- FOR b% = 0 TO numvalues%(a%)
- PRINT#channel, values(a%,b%)
- NEXT
- NEXT
- FOR a% = 0 TO numlayers%
- PRINT#channel, numlayerOKsects%(a%)
- NEXT
- FOR a% = 0 TO numlayers%
- FOR b% = 0 TO numlayerOKsects%(a%)
- FOR c% = 0 TO 2
- PRINT#channel, layersOK%(a%,b%,c%)
- NEXT
- NEXT
- NEXT
- :
- CLOSE#channel
- *NoDir
- :
- ENDPROC
- :
- REM****************************************************
- :
- DEF PROCloadlayers
- :
- *Dir HostFS::HardDisc4.$.CAC.Files
- INPUT'" filename "filenamelyr$
- channel = OPENIN filenamelyr$
- REPEAT
- INPUT#channel, totallength%
- INPUT#channel, numlayers%
- INPUT#channel, numlayersections%
- FOR a% = 0 TO numlayersections%
- INPUT#channel, startoflayersection%(a%)
- NEXT
- FOR a% = 0 TO numlayersections%
- FOR b% = 0 TO numlayers%
- INPUT#channel, shareoflayers%(a%,b%)
- NEXT
- NEXT
- FOR a% = 0 TO numlayers%
- INPUT#channel, attackscontrol$(a%)
- NEXT
- FOR a% = 0 TO numlayers%
- INPUT#channel, numattackssections%(a%)
- NEXT
- FOR a% = 0 TO numlayers%
- FOR b% = 0 TO numattackssections%(a%)
- INPUT#channel, startofattackssection%(a%,b%)
- NEXT
- NEXT
- FOR a% = 0 TO numlayers%
- FOR b% = 0 TO numattackssections%(a%)
- FOR c% = 0 TO 1
- INPUT#channel, numattax%(a%,b%,c%)
- NEXT
- NEXT
- NEXT
- FOR a% = 0 TO numlayers%
- INPUT#channel, numattackssections1%(a%)
- NEXT
- FOR a% = 0 TO numlayers%
- FOR b% = 0 TO numattackssections1%(a%)
- INPUT#channel, startofattackssection1%(a%,b%)
- NEXT
- NEXT
- FOR a% = 0 TO numlayers%
- FOR b% = 0 TO numattackssections1%(a%)
- FOR c% = 0 TO 1
- INPUT#channel, numattax1%(a%,b%,c%)
- NEXT
- NEXT
- NEXT
- FOR a% = 0 TO numlayers%
- INPUT#channel, durationscontrol$(a%)
- NEXT
- FOR a% = 0 TO numlayers%
- INPUT#channel, numdurationssections%(a%)
- NEXT
- FOR a% = 0 TO numlayers%
- FOR b% = 0 TO numdurationssections%(a%)
- INPUT#channel, startofdurationssection%(a%,b%)
- NEXT
- NEXT
- FOR a% = 0 TO numlayers%
- FOR b% = 0 TO numdurationssections%(a%)
- INPUT#channel, doorations%(a%,b%)
- NEXT
- NEXT
- FOR a% = 0 TO numlayers%
- INPUT#channel, numdurationssections1%(a%)
- NEXT
- FOR a% = 0 TO numlayers%
- FOR b% = 0 TO numdurationssections1%(a%)
- INPUT#channel, doorations1%(a%,b%)
- NEXT
- NEXT
- FOR a% = 0 TO numlayers%
- FOR b% = 0 TO numdurationssections1%(a%)
- INPUT#channel, startofdurationssection1%(a%,b%)
- NEXT
- NEXT
- FOR a% = 0 TO numlayers%
- INPUT#channel, multiplier$(a%)
- NEXT
- FOR a% = 0 TO numlayers%
- INPUT#channel, multipliermode$(a%)
- NEXT
- FOR a% = 0 TO numlayers%
- INPUT#channel, numvalues%(a%)
- NEXT
- FOR a% = 0 TO numlayers%
- FOR b% = 0 TO numvalues%(a%)
- INPUT#channel, values(a%,b%)
- NEXT
- NEXT
- FOR a% = 0 TO numlayers%
- INPUT#channel, numlayerOKsects%(a%)
- NEXT
- FOR a% = 0 TO numlayers%
- FOR b% = 0 TO numlayerOKsects%(a%)
- FOR c% = 0 TO 2
- INPUT#channel, layersOK%(a%,b%,c%)
- NEXT
- NEXT
- NEXT
- UNTIL EOF#channel
- CLOSE#channel
- *NoDir
- :
- ENDPROC
- :
- REM************************************************
- :
- DEF PROCseriesamplitudes
- :
- PROCwindow(20,69,73,45)
- :
- IF ampoptions$ = "y" THEN
- PRINT'" Create a new group, edit current group,"
- PRINT" or load a file (N/E/F)"
- CASE GET$ OF
- WHEN "N","n" :
- filenameamps$ = ""
- PRINT'" from a sample of amplitudes or"
- PRINT" according to attacks or by note"
- PRINT" numbers (S/A/N)"
- CASE GET$ OF
- WHEN "S","s" : ampmethod$ = "sample" : PROCnewamps
- WHEN "A","a" : ampmethod$ = "attacks" : PROCnewamps
- WHEN "N","n" : ampmethod$ = "notenumber" : PROCnewamps
- OTHERWISE VDU 7 : PROCseriesamplitudes
- ENDCASE
- WHEN "E","e" : PROCeditamps
- WHEN "F","f" : PROCloadamps : PROCeditamps
- OTHERWISE VDU 7 : PROCseriesamplitudes
- ENDCASE
- :
- PRINT'" Save these settings?"
- CASE GET$ OF
- WHEN "Y","y" : PROCsaveamps
- OTHERWISE
- ENDCASE
- :
- PROCrunamps
- :
- PRINT'" Re-order amplitudes randomly?"
- CASE GET$ OF
- WHEN "Y","y" : PROCreorderamps
- OTHERWISE
- ENDCASE
- :
- numamplitudes% = manyattacks% : PROCinsertamplitudes
- :
- ELSE PROCsimpleamps
- ENDIF
- :
- ENDPROC
- :
- REM***************************************
- DEF PROCsimpleamps
- :
- PROCwindow(20,69,73,45)
- PRINT'" How many amplitudes "
- INPUT " (for 1 press 0) "numamplitudes%
- IF numamplitudes% = 0 THEN numamplitudes% = 1
- :
- IF numamplitudes% = 1 THEN
- INPUT'" the amplitude is: "dyn$
- PROCconvertdyn
- amplitudes%(0) = dyn%
- ELSE
- PRINT'" Are all the amplitudes the same?"
- CASE GET$ OF
- WHEN "N","n","2" :
- FOR count% = 0 TO (numamplitudes%-1)
- PRINT'" amplitude ";count%+1;" is: "
- IF count% > 0 THEN PRINT " (0 = previous) "
- INPUT dyn$
- IF dyn$ = "" THEN
- dyn$ = prevdyn$
- COLOUR 1 : PRINT dyn$
- wait$ = INKEY$(20) : COLOUR 0
- ENDIF
- prevdyn$ = dyn$
- PROCconvertdyn
- amplitudes%(count%) = dyn%
- NEXT
- OTHERWISE
- INPUT'" the amplitude is: "dyn$
- PROCconvertdyn
- FOR count% = 0 TO (numamplitudes%-1) : amplitudes%(count%) = dyn% : NEXT
- ENDCASE
- ENDIF
- :
- REM function can feed amplitudes similarly into amplitudes%()
- :
- ampmethod$ = "sample"
- PROCinsertamplitudes
- :
- ENDPROC
- :
- *************************************************************************
- :
- DEF PROCnewamps
- :
- CASE ampmethod$ OF
- WHEN "attacks" :
- PRINT'" Dynamics determined by the preceding"
- PRINT" attack intervals, the succeeding ones, "
- PRINT" or both (P/S/B)"
- CASE GET$ OF
- WHEN "P","p" : prepost$ = "P"
- WHEN "S","s" : prepost$ = "S"
- OTHERWISE prepost$ = "B"
- ENDCASE
- CLS
- PRINT'" How many different 'layers' of dynamics?"
- PRINT'" (NB layers inputted later override earlier ones;"
- PRINT" existing dynamics remain unchanged if their"
- PRINT" interval is not included, or if the interval is"
- PRINT" set at 0 - 0)"
- INPUT dynlayers%
- :
- FOR count% = 1 TO dynlayers%
- IF prepost$ = "P" OR prepost$ = "B" THEN
- PRINT'" In layer ";count%;" the preceding interval "
- PRINT " is between how many beats..."
- INPUT dynlayers%(count%,0)
- PRINT'" and how many beats..."
- INPUT dynlayers%(count%,1)
- PRINT'" and the dynamic is "
- INPUT dyn$
- PROCconvertdyn : dynlayers%(count%,2) = dyn%
- ENDIF
- :
- IF prepost$ = "S" OR prepost$ = "B" THEN
- PRINT'" In layer ";count%;" the succeeding interval "
- PRINT " is between how many beats..."
- INPUT dynlayers%(count%,3)
- PRINT'" and how many beats..."
- INPUT dynlayers%(count%,4)
- PRINT'" and the dynamic is "
- INPUT dyn$
- PROCconvertdyn : dynlayers%(count%,5) = dyn%
- ENDIF
- NEXT
- :
- WHEN "notenumber" :
- INPUT'" How many elements in the (recycling) pattern "dynnumbers%
- FOR count% = 1 TO dynnumbers%
- PRINT'" Element ";count%;" places dynamics ";count%;" and ";count%+1
- PRINT" how many notes apart?"
- INPUT dynnumbers%(count%)
- NEXT
- PRINT" and the dynamic for these notes is "
- INPUT dynnumbers$
- :
- WHEN "sample" :
- INPUT'" Total number of amplitudes "manyattacks%
- INPUT " Number of amplitudes in the sample "ampsample%
- FOR count% = 0 TO (ampsample%-1)
- PRINT'" Element ";count%+1;" in the sample is "
- INPUT dyn$
- PROCconvertdyn : ampsample%(count%) = dyn%
- NEXT
- :
- ENDCASE
- :
- ENDPROC
- :
- REM*********************************************
- :
- DEF PROCconvertdyn
- :
- CASE dyn$ OF
- WHEN "0" : dyn% = 0
- WHEN "ppp" : dyn% = 1
- WHEN "pp" : dyn% = 2
- WHEN "p" : dyn% = 3
- WHEN "mp" : dyn% = 4
- WHEN "mf" : dyn% = 5
- WHEN "f" : dyn% = 6
- WHEN "ff" : dyn% = 7
- WHEN "fff" : dyn% = 8
- ENDCASE
- ENDPROC
- :
- REM*********************************************
- :
- DEF PROCrunamps
- :
- IF ampmethod$ = "attacks" OR ampmethod$ = "notenumber" THEN
- INPUT'" The dynamics are to be read into which voice? "voice%
- voice% -= 1
- INPUT'" Starting at bar "copystartbar%
- INPUT" beat "beats%
- PROCalterbeats : copystartbeat% = beats%
- startat% = (copystartbar%*10^3)+beats%
- INPUT'" Ending at bar "copyendbar%
- INPUT " beat "beats%
- PROCalterbeats : copyendbeat% = beats%
- :
- value% = (copystartbar%*10^3)+copystartbeat%
- IF value% <= array%(0,0,voice%)DIV10^3 THEN
- startatcell% = 0
- ELSE
- PROCsearch(value%)
- startatcell% = startcell%
- ENDIF
- value% = (copyendbar%*10^3)+copyendbeat%
- IF value% >= array%(numusedcells%(voice%)-1,0,voice%)DIV10^3 THEN
- endatcell% = numusedcells%(voice%) - 1
- ELSE
- PROCsearch(value%)
- IF shunt$ = "N" THEN endatcell% = startcell% ELSE endatcell% = startcell% - 1
- ENDIF
- :
- manyattacks% = endatcell% - startatcell% + 1
- REM create 'gap' between beat-of-bar and first actual attack
- carrybars% = (array%(startatcell%,0,voice%)DIV10^6)-copystartbar%
- carrybeats% = ((array%(startatcell%,0,voice%)DIV10^3)MOD10^3)-copystartbeat%
- attacks1%(0) = (carrybars%*960)+carrybeats%
- :
- FOR count% = 0 TO (manyattacks%-1)
- IF count% > 0 THEN
- carrybars% = (array%(startatcell%+count%,0,voice%)DIV10^6)-(array%(startatcell%+count%-1,0,voice%)DIV10^6)
- carrybeats% = ((array%(startatcell%+count%,0,voice%)DIV10^3)MOD10^3)-((array%(startatcell%+count%-1,0,voice%)DIV10^3)MOD10^3)
- attacks1%(count%) = attacks1%(count%-1) + ((carrybars%*960)+carrybeats%)
- ENDIF
- :
- pitches%(count%+1) = array%(startatcell%+count%,0,voice%)MOD10^3
- durations%(count%+1) = (array%(startatcell%+count%,1,voice%)DIV10)MOD10^3
- amplitudes%(count%+1) = (array%(startatcell%+count%,1,voice%))MOD10
- envelopes%(count%+1) = (array%(startatcell%+count%,2,voice%))DIV10^2
- glissandos%(count%+1) = (array%(startatcell%+count%,1,voice%)DIV10^4)
- inflections%(count%+1) = array%(startatcell%+count%,2,voice%)MOD10^2
- NEXT
- ENDIF
- :
- CASE ampmethod$ OF
- WHEN "attacks" :
- FOR count% = 0 TO manyattacks%-1
- FOR count1% = 1 TO dynlayers%
- IF count% > 0 THEN
- IF prepost$ = "P" OR prepost$ = "B" THEN
- 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)
- ENDIF
- ENDIF
- IF prepost$ = "S" OR prepost$ = "B" THEN
- IF attacks1%(count%+1)-attacks1%(count%)>=dynlayers%(count1%,3)ANDattacks1%(count%+1)-attacks1%(count%)<=dynlayers%(count1%,4) THEN amplitudes%(count%+1) = dynlayers%(count1%,5)
- ENDIF
- NEXT
- NEXT
- :
- WHEN "notenumber" :
- count% = 1 : count1% = 0
- dyn$ = dynnumbers$ : PROCconvertdyn
- REPEAT
- count1% += 1
- IF count1% > dynnumbers% THEN count1% = 1
- amplitudes%(count%) = dyn%
- count% += dynnumbers%(count1%)
- UNTIL count% > manyattacks%
- :
- WHEN "sample" :
- count% = 1 : count1% = 1
- REPEAT
- amplitudes%(count%-1) = ampsample%(count1%-1)
- count% += 1 : count1% += 1
- IF count1% > ampsample% THEN count1% = 1
- UNTIL count% > manyattacks%
- :
- ENDCASE
- :
- ENDPROC
- :
- REM******************************************************
- :
- DEF PROCreorderamps
- :
- FOR count% = 0 TO manyattacks%-1
- REPEAT
- x% = RND(manyattacks%)
- x% = x%-1
- IF amplitudes%(x%) = 0 THEN thiscell$ = "done" ELSE thiscell$ = "available"
- UNTIL thiscell$ = "available"
- amplitudes1%(count%) = amplitudes%(x%)
- amplitudes%(x%) = 0
- NEXT
- amplitudes%() = amplitudes1%()
- :
- ENDPROC
- :
- REM*****************************************************
- :
- DEF PROCeditamps
- :
- CASE ampmethod$ OF
- WHEN "attacks" :
- PRINT'" Alter whether dynamics determined by"
- PRINT" preceding, succeeding intervals or both?"
- PROCyesno
- IF on = 1 THEN
- PRINT'" Dynamics determined by the preceding"
- PRINT" attack intervals, the succeeding ones, "
- PRINT" or both (P/S/B)"
- CASE GET$ OF
- WHEN "P","p" : prepost$ = "P"
- WHEN "S","s" : prepost$ = "S"
- OTHERWISE prepost$ = "B"
- ENDCASE
- ENDIF
- CLS
- PRINT'" Alter number of 'layers'?"
- PROCyesno
- IF on = 1 THEN
- PRINT'" How many different 'layers' of dynamics?"
- PRINT'" (NB layers inputted later override earlier ones;"
- PRINT" existing dynamics remain unchanged if their"
- PRINT" interval is not included, or if the interval is"
- PRINT" set at 0 - 0)"
- INPUT dynlayers%
- ENDIF
- :
- PRINT'" Alter any of the layers?"
- PROCyesno
- IF on = 1 THEN
- FOR count% = 1 TO dynlayers%
- PRINT'" Alter layer ";count%
- PROCyesno
- IF on = 1 THEN
- IF prepost$ = "P" OR prepost$ = "B" THEN
- PRINT'" In layer ";count%;" the preceding interval "
- PRINT " is between how many beats..."
- INPUT dynlayers%(count%,0)
- PRINT'" and how many beats..."
- INPUT dynlayers%(count%,1)
- PRINT'" and the dynamic is "
- INPUT dyn$
- PROCconvertdyn : dynlayers%(count%,2) = dyn%
- ENDIF
- :
- IF prepost$ = "S" OR prepost$ = "B" THEN
- PRINT'" In layer ";count%;" the succeeding interval "
- PRINT " is between how many beats..."
- INPUT dynlayers%(count%,3)
- PRINT'" and how many beats..."
- INPUT dynlayers%(count%,4)
- PRINT'" and the dynamic is "
- INPUT dyn$
- PROCconvertdyn : dynlayers%(count%,5) = dyn%
- ENDIF
- ENDIF
- NEXT
- ENDIF
- :
- WHEN "notenumber" :
- PRINT'" Alter number of elements in the pattern?"
- PROCyesno
- IF on = 1 THEN
- INPUT'" How many elements in the (recycling) pattern "dynnumbers%
- ENDIF
- FOR count% = 1 TO dynnumbers%
- PRINT'" Alter element ";count%
- PROCyesno
- IF on =1 THEN
- PRINT'" Element ";count%;" places dynamics ";count%;" and ";count%+1
- PRINT" how many notes apart?"
- INPUT dynnumbers%(count%)
- ENDIF
- NEXT
- PRINT'" Alter the dynamic?"
- PROCyesno
- IF on =1 THEN
- PRINT" and the dynamic for these notes is "
- INPUT dynnumbers$
- ENDIF
- :
- WHEN "sample" :
- PRINT'" Alter total number of amplitudes?"
- PROCyesno
- IF on =1 THEN
- INPUT'" Total number of amplitudes "manyattacks%
- ENDIF
- PRINT'" Alter number of amplitudes in the sample?"
- PROCyesno
- IF on =1 THEN
- INPUT " Number of amplitudes in the sample "ampsample%
- ENDIF
- PRINT'" Alter the sample?"
- PROCyesno
- IF on =1 THEN
- FOR count% = 0 TO ampsample%-1
- PRINT'" Alter element ";count%+1
- PROCyesno
- IF on =1 THEN
- PRINT'" Element ";count%+1;" in the sample is "
- INPUT dyn$
- PROCconvertdyn : ampsample%(count%) = dyn%
- ENDIF
- NEXT
- ENDIF
- :
- ENDCASE
- :
- ENDPROC
- :
- REM***************************************************
- :
- DEF PROCsaveamps
- :
- :
- *Dir HostFS::HardDisc4.$.CAC.Files
- firstnaming$ = "n"
- CLS
- IF filenameamps$ = "" THEN
- INPUT'" filename "filenameamps$
- firstnaming$ = "y"
- ENDIF
- IF firstnaming$ = "n" THEN
- PRINT'" as '";filenameamps$;"'?"
- CASE GET$ OF
- WHEN "N","n" : INPUT'" filename "filenameamps$
- OTHERWISE
- ENDCASE
- ENDIF
- :
- channel = OPENOUT filenameamps$
- PRINT#channel, ampmethod$
- IF ampmethod$ = "attacks" THEN
- PRINT#channel, prepost$
- PRINT#channel, dynlayers%
- ENDIF
- IF ampmethod$ = "notenumber" THEN
- PRINT#channel, dynnumbers%
- PRINT#channel, dynnumbers$
- ENDIF
- IF ampmethod$ = "sample" THEN
- PRINT#channel, manyattacks%
- PRINT#channel, ampsample%
- ENDIF
- IF ampmethod$ = "attacks" THEN
- FOR a% = 0 TO 12
- FOR b% = 0 TO 5
- PRINT#channel, dynlayers%(a%,b%)
- NEXT
- NEXT
- ENDIF
- IF ampmethod$ = "notenumber" THEN
- FOR a% = 0 TO 99
- PRINT#channel, dynnumbers%(a%)
- NEXT
- ENDIF
- IF ampmethod$ = "sample" THEN
- FOR a% = 0 TO 49
- PRINT#channel, ampsample%(a%)
- NEXT
- ENDIF
- :
- CLOSE#channel
- *NoDir
- :
- ENDPROC
- :
- REM***********************************
- :
- DEF PROCloadamps
- :
- :
- *Dir HostFS::HardDisc4.$.CAC.Files
- INPUT'" filename "filenameamps$
- channel = OPENIN filenameamps$
- REPEAT
- INPUT#channel, ampmethod$
- IF ampmethod$ = "attacks" THEN
- INPUT#channel, prepost$
- INPUT#channel, dynlayers%
- ENDIF
- IF ampmethod$ = "notenumber" THEN
- INPUT#channel, dynnumbers%
- INPUT#channel, dynnumbers$
- ENDIF
- IF ampmethod$ = "sample" THEN
- INPUT#channel, manyattacks%
- INPUT#channel, ampsample%
- ENDIF
- IF ampmethod$ = "attacks" THEN
- FOR a% = 0 TO 12
- FOR b% = 0 TO 5
- INPUT#channel, dynlayers%(a%,b%)
- NEXT
- NEXT
- ENDIF
- IF ampmethod$ = "notenumber" THEN
- FOR a% = 0 TO 99
- INPUT#channel, dynnumbers%(a%)
- NEXT
- ENDIF
- IF ampmethod$ = "sample" THEN
- FOR a% = 0 TO 49
- INPUT#channel, ampsample%(a%)
- NEXT
- ENDIF
- :
- UNTIL EOF#channel
- CLOSE#channel
- *NoDir
- :
- ENDPROC
- :
- REM*********************************
- :
- DEF PROCbeatnumbers
- :
- amount% = 10
- IF beatnum_diff$ = "num" THEN
- IF beatunits$ = "big" THEN
- PRINT (array%(startcell%,0,voice%)DIV10^3)MOD10^3
- ELSE beatnum = ((array%(startcell%,0,voice%)DIV10^3)MOD10^3)/beatfactor%
- IF beatnum MOD 1 > 0 THEN
- beatnum = beatnum*10
- beatnum% = beatnum DIV 1
- PRINT beatnum%/amount%
- ELSE PRINT beatnum
- ENDIF
- ENDIF
- ELSE
- beatdiff% = ((array%(startcell%+1,0,voice%)DIV10^3)MOD10^3)-((array%(startcell%,0,voice%)DIV10^3)MOD10^3)
- beatdiff%+=(((array%(startcell%+1,0,voice%)DIV10^6)-(array%(startcell%,0,voice%)DIV10^6))*960)
- :
- IF beatdiff% > 0 THEN
- IF beatunits$ = "big" THEN
- PRINT beatdiff%
- ELSE
- beatdiff = beatdiff%/beatfactor%
- IF beatdiff MOD 1 > 0 THEN
- beatdiff = beatdiff*10
- beatdiff% = beatdiff DIV 1
- PRINT beatdiff%/amount%
- ELSE PRINT beatdiff%/beatfactor%
- ENDIF
- ENDIF
- ENDIF
- :
- ENDIF
- ENDPROC
- :
- REM****************************************************
- :
- DEF PROCextract
- :
- counter% = -1 : attacks1%() = 0 : countt% = -1 : endcell% = manyattacks%
- IF extractmode$ = "random" THEN numb% = RND(higher%-lower%+1)+lower%-2
- REPEAT
- countt% += 1
- extract$ = "n"
- :
- CASE extractmode$ OF
- WHEN "pitchclass" :
- attempts% = 0
- REPEAT
- attempts% += 1
- :
- IF extractinfo%(attempts%) = array%(startatcell%+countt%,0,voice%)MOD10^3 THEN extract$ = "y"
- UNTIL extract$ = "y" OR attempts% = npitches%
- WHEN "band" :
- attempts% = 0 : top$ = "n" : bottom$ = "n"
- theoctave% = array%(startatcell%+countt%,0,voice%)MOD10
- thepitch% = (array%(startatcell%+countt%,0,voice%)DIV10^2)MOD10
- theaccid% = (array%(startatcell%+countt%,0,voice%)DIV10)MOD10
- REPEAT
- attempts% += 1
- testoctave% = extractinfo%(attempts%)MOD10
- testpitch% = extractinfo%(attempts%)DIV10^2
- testaccid% = (extractinfo%(attempts%)DIV10)MOD10
- IF ((attempts%/2)*10)MOD10 > 0 THEN
- IF theoctave% >= testoctave% THEN bottom$ = "y" ELSE bottom$ = "n"
- IF bottom$ = "y" AND theoctave% = testoctave% THEN
- IF thepitch% >= testpitch% THEN bottom$ = "y" ELSE bottom$ = "n"
- ENDIF
- IF bottom$ = "y" AND theoctave% = testoctave% AND thepitch% = testpitch% THEN
- IF theaccid% >= testaccid% THEN bottom$ = "y" ELSE bottom$ = "n"
- ENDIF
- ELSE
- IF theoctave% <= testoctave% THEN top$ = "y" ELSE top$ = "n"
- IF top$ = "y" AND theoctave% = testoctave% THEN
- IF thepitch% <= testpitch% THEN top$ = "y" ELSE top$ = "n"
- ENDIF
- IF top$ = "y" AND theoctave% = testoctave% AND thepitch% = testpitch% THEN
- IF theaccid% <= testaccid% THEN top$ = "y" ELSE top$ = "n"
- ENDIF
- ENDIF
- IF bottom$ = "y" AND top$ = "y" THEN extract$ = "y"
- UNTIL extract$ = "y" OR attempts% = npitches%
- WHEN "random" :
- extract$ = "n"
- IF numb% = countt% THEN
- extract$ = "y"
- max% = higher%-lower%+1 : a% = RND(max%) : b% = lower% -1 : c% = countt%
- IF a% = 0 THEN a% = 1
- numb% = a% + b% + c%
- IF copymove$ = "EM" THEN numb% -= 1
- ENDIF
- WHEN "attackinterval" :
- bar1% = array%(startatcell%+countt%,0,voice%)DIV10^6
- beat1% = (array%(startatcell%+countt%,0,voice%)DIV10^3)MOD10^3
- beat1% = (bar1%*960)+beat1%
- bar2% = array%(startatcell%+countt%+1,0,voice%)DIV10^6
- beat2% = (array%(startatcell%+countt%+1,0,voice%)DIV10^3)MOD10^3
- beat2% = (bar2%*960)+beat2%
- interval% = beat2% - beat1%
- IF interval% >= lower% AND interval% <= higher% THEN extract$ = "y"
- ENDCASE
- :
- IF extract$ = "y" THEN
- counter% += 1
- attacks2%(counter%) = (array%(startatcell%+countt%,0,voice%))DIV10^3
- pitches%(counter%) = array%(startatcell%+countt%,0,voice%)MOD10^3
- durations%(counter%) = (array%(startatcell%+countt%,1,voice%)DIV10)MOD10^3
- amplitudes%(counter%) = (array%(startatcell%+countt%,1,voice%))MOD10
- envelopes%(counter%) = (array%(startatcell%+countt%,2,voice%))DIV10^2
- glissandos%(counter%) = (array%(startatcell%+countt%,1,voice%)DIV10^4)
- inflections%(counter%) = array%(startatcell%+countt%,2,voice%)MOD10^2
- IF copymove$ = "EM" THEN
- REM routine to delete each note as it is extracted, if move-extract wanted
- numnotes% = 1
- bar% = array%(startatcell%+countt%,0,voice%) DIV10^6
- beats% = (array%(startatcell%+countt%,0,voice%)DIV10^3)MOD10^3
- PROCalterbeats
- start% = (bar%*(10^3))+beats%
- PROCsearch(start%)
- PROCshuntleft(startcell%,numnotes%)
- countt% -= 1 : endcell% -= 1
- REM prev line is because of deletion, ie array cells have all now shifted one to left!
- ENDIF
- REM end of delete routine
- :
- ENDIF
- UNTIL countt% = endcell% - 1
- manyattacks% = counter%+1
- attacks1%(0) = (((attacks2%(0)DIV10^3)*960)+(attacks2%(0)MOD10^3)-960)-((copystartbar%*960)+copystartbeat%-960)
- FOR count% = 1 TO manyattacks% - 1
- bars% = (attacks2%(count%)DIV10^3)-(attacks2%(count%-1)DIV10^3)
- beats% = (attacks2%(count%)MOD10^3)-(attacks2%(count%-1)MOD10^3)
- attacks1%(count%) = attacks1%(count%-1) + (bars%*960) + beats%
- NEXT
- :
- :
- ENDPROC
- :
- REM********************************************************
- :
- DEF PROCextractinfo
- :
- IF quickextract$ = "n" THEN
- :
- CLS
- aslasttime$ = "n"
- PRINT'" Extract by pitch-class, pitch-band,"
- PRINT" attack interval, random number"
- PRINT" or as last time (P/B/A/R/L) "
- CASE GET$ OF
- WHEN "P","p","0" :
- CLS
- extractmode$ = "pitchclass"
- WHEN "B","b" :
- CLS : extractmode$ = "band"
- WHEN "R","r" :
- CLS : extractmode$ = "random"
- PRINT'" Random extractions follow "
- PRINT" each other at a distance "
- INPUT " of between how many notes "lower%
- INPUT " and how many notes "higher%
- WHEN "A","a" :
- CLS : extractmode$ = "attackinterval"
- PRINT'" Extract notes which precede"
- PRINT" next note by between"
- INPUT" how many beats "lower%
- INPUT" and how many beats "higher%
- WHEN "L","l" :
- aslasttime$ = "y"
- OTHERWISE CLS : extractmode$ = "pitchclass"
- ENDCASE
- :
- ENDIF
- :
- IF aslasttime$ = "n" THEN
- :
- IF extractmode$ = "pitchclass" OR extractmode$ = "band" THEN
- :
- IF quickextract$ = "n" THEN
- IF extractmode$ = "pitchclass" THEN
- INPUT'" How many pitch-classes? "npitches%
- IF npitches% = 0 THEN npitches% = 1
- ELSE
- INPUT'" How many bands (0 = 1) "nbands%
- IF nbands% = 0 THEN nbands% = 1
- ENDIF
- ENDIF
- :
- IF extractmode$ = "band" THEN npitches% = nbands%*2
- FOR p% = 1 TO npitches%
- IF extractmode$ = "pitchclass" THEN
- PRINT' " Pitch-class ";p%;" has the note name ";
- ELSE PRINT'" Going up, band-point ";p%;" is note ";
- ENDIF
- COLOUR 1
- CASE GET$ OF
- WHEN "C","c" : note% = 0 : PRINT "C" : finished$ = "n"
- WHEN "D","d" : note% = 1 : PRINT "D" : finished$ = "n"
- WHEN "E","e" : note% = 2 : PRINT "E" : finished$ = "n"
- WHEN "F","f" : note% = 3 : PRINT "F" : finished$ = "n"
- WHEN "G","g" : note% = 4 : PRINT "G" : finished$ = "n"
- WHEN "A","a" : note% = 5 : PRINT "A" : finished$ = "n"
- WHEN "B","b" : note% = 6 : PRINT "B" : finished$ = "n"
- WHEN "1" : note% = 0 : accid% = 5 : octave% = 4 : finished$ = "y"
- WHEN "2" : note% = 0 : accid% = 9 : octave% = 4 : finished$ = "y"
- WHEN "3" : note% = 1 : accid% = 5 : octave% = 4 : finished$ = "y"
- WHEN "4" : note% = 2 : accid% = 1 : octave% = 4 : finished$ = "y"
- WHEN "5" : note% = 2 : accid% = 5 : octave% = 4 : finished$ = "y"
- WHEN "6" : note% = 3 : accid% = 5 : octave% = 4 : finished$ = "y"
- WHEN "7" : note% = 3 : accid% = 9 : octave% = 4 : finished$ = "y"
- WHEN "8" : note% = 4 : accid% = 5 : octave% = 4 : finished$ = "y"
- WHEN "9" : note% = 5 : accid% = 1 : octave% = 4 : finished$ = "y"
- ENDCASE
- COLOUR 0
- :
- IF finished$ = "n" THEN
- :
- PRINT " accidental ";
- COLOUR 1
- CASE GET$ OF
- WHEN "1" : accid% = 1 : PRINT "flat"
- WHEN "2" : accid% = 2 : PRINT "3/8flat"
- WHEN "3" : accid% = 3 : PRINT "1/4flat"
- WHEN "4" : accid% = 4 : PRINT "1/8flat"
- WHEN "5" : accid% = 5 : PRINT "nat"
- WHEN "6" : accid% = 6 : PRINT "1/8shrp"
- WHEN "7" : accid% = 7 : PRINT "1/4shrp"
- WHEN "8" : accid% = 8 : PRINT "3/8shrp"
- WHEN "9" : accid% = 9 : PRINT "shrp"
- ENDCASE
- COLOUR 0
- PRINT " octave ";
- COLOUR 1
- CASE GET$ OF
- WHEN "0" : octave% = 0 : PRINT "0"
- WHEN "1" : octave% = 1 : PRINT "1"
- WHEN "2" : octave% = 2 : PRINT "2"
- WHEN "3" : octave% = 3 : PRINT "3"
- WHEN "4" : octave% = 4 : PRINT "4"
- WHEN "5" : octave% = 5 : PRINT "5"
- WHEN "6" : octave% = 6 : PRINT "6"
- WHEN "7" : octave% = 7 : PRINT "7"
- WHEN "8" : octave% = 8 : PRINT "8"
- ENDCASE
- COLOUR 0
- :
- ENDIF
- :
- extractinfo%(p%) = (note%*100)+(accid%*10)+octave%
- NEXT
- :
- ENDIF
- :
- ENDIF
- :
- IF extractmode$ = "random" AND quickextract$ = "y" THEN
- PRINT '" Random extractions follow "
- PRINT " each other at a distance "
- INPUT " of between how many notes "lower%
- INPUT " and how many notes "higher%
- ENDIF
- ENDPROC
- :
- REM*************************************************
- :
- DEF PROCequalizedurats
- :
- CLS
- PRINT'" There are ";manyattacks%-1;" durations "
- PRINT'" How many do you want to equalise? "
- PRINT " (0 = ";manyattacks%-1;")"
- INPUTnumdurats%
- IF numdurats% = 0 THEN numdurats% = manyattacks%-1
- INPUT'" Starting at duration number (0 = 1) "startattack%
- IF startattack% = 0 THEN startattack% = 1
- IF (manyattacks%-startattack%)<numdurats% THEN startattack% = manyattacks%-numdurats%
- totaldurats% = 0
- FOR count% = startattack% TO (startattack%+numdurats%-1)
- totaldurats%+=(attacks1%(count%)-attacks1%(count%-1))
- NEXT
- average = totaldurats%/numdurats%
- residue% = average * 10
- residue% = residue%MOD10
- IF residue%>=5 THEN average% = ((average)DIV1)+1 ELSE average% = (average)DIV1
- FOR count% = startattack% TO (startattack%+numdurats%-1)
- attacks1%(count%) = attacks1%(count%-1)+average%
- NEXT
- adjust% = totaldurats% - (average%*numdurats%)
- attacks1%(count%-1) += adjust%
- equalized$ = "y" : seeequalizey$ = "n"
- PROCinsertattacks
- ENDPROC
- :
- REM************************************************
- :
- DEF PROCsavevoice
- :
- *Dir HostFS::HardDisc4.$.CAC.Files
- INPUT'" filename "filenamevoice$
- channel = OPENOUT filenamevoice$
- PRINT#channel, manyattacks%
- FOR a% = 0 TO manyattacks%-1
- PRINT#channel, attacks1%(a%)
- NEXT
- FOR a% = 0 TO manyattacks%-1
- PRINT#channel, pitches%(a%)
- NEXT
- FOR a% = 0 TO manyattacks%-1
- PRINT#channel, durations%(a%)
- NEXT
- FOR a% = 0 TO manyattacks%-1
- PRINT#channel, amplitudes%(a%)
- NEXT
- FOR a% = 0 TO manyattacks%-1
- PRINT#channel, envelopes%(a%)
- NEXT
- FOR a% = 0 TO manyattacks%-1
- PRINT#channel, glissandos%(a%)
- NEXT
- FOR a% = 0 TO manyattacks%-1
- PRINT#channel, inflections%(a%)
- NEXT
- CLOSE#channel
- *NoDir
- savevoice$ = "N" : PROCdisplay
- ENDPROC
- :
- REM**********************************
- :
- DEF PROCimportvoice
- :
- *Dir HostFS::HardDisc4.$.CAC.Files
- INPUT'" filename "filenamevoice$
- channel = OPENIN filenamevoice$
- REPEAT
- INPUT#channel, manyattacks%
- FOR a% = 0 TO manyattacks%-1
- INPUT#channel, attacks1%(a%)
- NEXT
- FOR a% = 0 TO manyattacks%-1
- INPUT#channel, pitches%(a%)
- NEXT
- FOR a% = 0 TO manyattacks%-1
- INPUT#channel, durations%(a%)
- NEXT
- FOR a% = 0 TO manyattacks%-1
- INPUT#channel, amplitudes%(a%)
- NEXT
- FOR a% = 0 TO manyattacks%-1
- INPUT#channel, envelopes%(a%)
- NEXT
- FOR a% = 0 TO manyattacks%-1
- INPUT#channel, glissandos%(a%)
- NEXT
- FOR a% = 0 TO manyattacks%-1
- INPUT#channel, inflections%(a%)
- NEXT
- UNTIL EOF#channel
- CLOSE#channel
- *NoDir
- method$ = "raw" : copyit$ = "ON" : PROCinsertattacks
- ENDPROC
- :
- REM***********************************
- :
- DEF PROCpreintervalstring
- :
- PROCwindow(20,60,70,35)
- PRINT'" Re-run current interval string,"
- PRINT" create a new string, edit the"
- PRINT " current one, or load a file (R/N/E/F)"
- CASE GET$ OF
- WHEN "R","r" : PROCintervalstring
- WHEN "E","e" : loadstring$ = "n" :PROCeditintervalstring
- WHEN "F","f" : loadstring$ = "y" :PROCeditintervalstring
- OTHERWISE
- ENDCASE
- :
- filenamestg$ = ""
- numbannedpitches% = 0 : numbannedints% = 0 : bannedpitches%() = 0
- :
- INPUT'" How many pitches "numpitches%
- INPUT'" The tessitura is how many semitones wide "tess%
- PRINT'" The bottom pitch of the tessitura is ";
- COLOUR 1
- CASE GET$ OF
- WHEN "C","c" : note% = 1 : PRINT "C" : pitch$ = "C"
- WHEN "D","d" : note% = 3 : PRINT "D" : pitch$ = "D"
- WHEN "E","e" : note% = 5 : PRINT "E" : pitch$ = "E"
- WHEN "F","f" : note% = 6 : PRINT "F" : pitch$ = "F"
- WHEN "G","g" : note% = 8 : PRINT "G" : pitch$ = "G"
- WHEN "A","a" : note% = 10 : PRINT "A" : pitch$ = "A"
- WHEN "B","b" : note% = 12 : PRINT "B" : pitch$ = "B"
- ENDCASE
- COLOUR 0
- PRINT " Accidental ";
- COLOUR 1
- CASE GET$ OF
- WHEN "1" : note% -= 1 : PRINT "flat" : accid$ = "flat"
- WHEN "5" : PRINT "nat" : accid$ = "nat"
- WHEN "9" : note% += 1 : PRINT "shrp" : accid$ = "shrp"
- OTHERWISE VDU 7
- ENDCASE
- COLOUR 0
- PRINT " Octave ";
- COLOUR 1
- octave% = EVAL(GET$) : saveoctave% = octave%
- PRINT octave%
- COLOUR 0
- transposer% = note% + (12*(octave%-1)) - 1
- PRINT'" Are any pitches to be banned? "
- CASE GET$ OF
- WHEN "Y","y" :
- REPEAT
- numbannedpitches% += 1
- PRINT '" Pitch ";numbannedpitches%;" is, going up,"
- PRINT " semitone number what, starting at 0?"
- INPUT " (type F to finish) "bannedpitch$
- IF bannedpitch$ <> "F" AND bannedpitch$ <> "f" THEN bannedpitches%(numbannedpitches%) = EVAL(bannedpitch$) + 1
- UNTIL bannedpitch$ = "F" OR bannedpitch$ = "f"
- numbannedpitches% -= 1
- OTHERWISE
- ENDCASE
- :
- PRINT'" Are any intervals to be banned?"
- CASE GET$ OF
- WHEN "Y","y" :
- REPEAT
- numbannedints% += 1
- PRINT''" Interval ";numbannedints%;" is how many semitones?"
- PRINT" (NB intervals between 12 & 23 are "
- PRINT" applied at all compounds - "
- INPUT" type F to finish) "int$
- IF int$ <> "F" AND int$ <> "f" THEN
- PRINT'" And is banned at between a"
- INPUT" minimum of how many notes from the last one "range%
- INPUT" And a maximum of how many "range1%
- bannedints%(numbannedints%,0) = EVAL(int$)
- bannedints%(numbannedints%,1) = range%
- bannedints%(numbannedints%,2) = range1%
- ENDIF
- UNTIL int$ = "F" OR int$ = "f"
- numbannedints% -= 1
- OTHERWISE
- ENDCASE
- :
- stringattempts% = 0 : PROCintervalstring
- :
- ENDPROC
- :
- REM********************************************************
- :
- DEF PROCintervalstring
- :
- notenumber% = 0 : stringattempts% += 1
- :
- REPEAT
- notenumber% += 1 : triednotes%() = 0
- :
- REPEAT
- note% = RND(tess%+1) : triednotes%(note%) = 1
- count% = 0
- test$ = "pass"
- IF numbannedpitches% > 0 THEN
- REPEAT
- count% += 1
- IF note% = bannedpitches%(count%) THEN test$ = "fail"
- UNTIL test$ = "fail" OR count% = numbannedpitches%
- ENDIF
- :
- IF notenumber% > 1 AND numbannedints% > 0 AND test$ = "pass" THEN
- count% = 0
- REPEAT
- count% += 1 : count1% = 0
- REPEAT
- count1% += 1
- testnotenumber% = bannedints%(count%,1)+count1%-1
- testnotenumber% = notenumber%-testnotenumber%
- IF testnotenumber% > 0 THEN
- IF note% >= amplitudes%(testnotenumber%) THEN
- interval% = note%-amplitudes%(testnotenumber%)
- ELSE interval% = amplitudes%(testnotenumber%)-note%
- ENDIF
- :
- REPEAT
- IF interval% > 23 THEN interval% -= 12
- UNTIL interval% < 24
- IF interval% = bannedints%(count%,0) THEN test$ = "fail"
- :
- ENDIF
- UNTIL count1% > (bannedints%(count%,2)-bannedints%(count%,1)) OR test$ = "fail"
- UNTIL count% = numbannedints% OR test$ = "fail"
- ENDIF
- :
- REM check to see if all notes tried
- check$ = "alltried"
- FOR checker% = 1 TO tess%+1
- IF triednotes%(checker%) = 0 THEN check$ = "notalltried"
- NEXT
- UNTIL test$ = "pass" OR check$ = "alltried"
- :
- amplitudes%(notenumber%) = note%
- :
- IF check$ = "alltried" AND test$ = "fail" THEN whattodo$ = "abort" ELSE whattodo$ = "continue"
- UNTIL notenumber% = numpitches% OR whattodo$ = "abort"
- :
- IF whattodo$ = "abort" THEN
- CLS : PRINT''" Attempts from fresh start - ";stringattempts%
- PROCintervalstring
- ELSE
- FOR count% = 1 TO numpitches%
- amplitudes%(count%) += transposer%
- REM which octave
- count1% = 0
- REPEAT
- count1% += 1
- UNTIL (count1%*12) >= amplitudes%(count%)
- octave% = count1%
- REM which pitch and accid
- amplitudes%(count%) -= (12*(octave%-1))
- CASE amplitudes%(count%) OF
- WHEN 1 : pitches%(count%-1) = 50 + octave%
- WHEN 2 : pitches%(count%-1) = 90 + octave%
- WHEN 3 : pitches%(count%-1) = 150 + octave%
- WHEN 4 : pitches%(count%-1) = 210 + octave%
- WHEN 5 : pitches%(count%-1) = 250 + octave%
- WHEN 6 : pitches%(count%-1) = 350 + octave%
- WHEN 7 : pitches%(count%-1) = 390 + octave%
- WHEN 8 : pitches%(count%-1) = 450 + octave%
- WHEN 9 : pitches%(count%-1) = 490 + octave%
- WHEN 10 : pitches%(count%-1) = 550 + octave%
- WHEN 11 : pitches%(count%-1) = 610 + octave%
- WHEN 12 : pitches%(count%-1) = 650 + octave%
- ENDCASE
- NEXT
- PRINT'" Do you want to save this interval string?"
- CASE GET$ OF
- WHEN "Y","y" : PROCsaveintervalstring
- OTHERWISE
- ENDCASE
- PROCinsertpitches
- ENDIF
- :
- ENDPROC
- :
- REM**********************************************
- :
- DEF PROCsaveintervalstring
- :
- *Dir HostFS::HardDisc4.$.CAC.Files
- firstnaming$ = "n"
- CLS
- IF filenamestg$ = "" THEN
- INPUT'" filename "filenamestg$
- firstnaming$ = "y"
- ENDIF
- IF firstnaming$ = "n" THEN
- PRINT'" as '";filenamestg$;"'?"
- CASE GET$ OF
- WHEN "N","n" : INPUT'" filename "filenamestg$
- OTHERWISE
- ENDCASE
- ENDIF
- :
- channel = OPENOUT filenamestg$
- PRINT#channel, numpitches%
- PRINT#channel, tess%
- PRINT#channel, numbannedpitches%
- PRINT#channel, numbannedints%
- PRINT#channel, transposer%
- PRINT#channel, pitch$
- PRINT#channel, accid$
- PRINT#channel, saveoctave%
- FOR a% = 1 TO numbannedpitches%
- PRINT#channel, bannedpitches%(a%)
- NEXT
- FOR a% = 1 TO numbannedints%
- FOR b% = 0 TO 2
- PRINT#channel, bannedints%(a%,b%)
- NEXT
- NEXT
- :
- CLOSE#channel
- *NoDir
- :
- ENDPROC
- :
- REM******************************************
- :
- DEF PROCloadintervalstring
- :
- *Dir HostFS::HardDisc4.$.CAC.Files
- INPUT'" filename "filenamestg$
- channel = OPENIN filenamestg$
- REPEAT
- INPUT#channel, numpitches%
- INPUT#channel, tess%
- INPUT#channel, numbannedpitches%
- INPUT#channel, numbannedints%
- INPUT#channel, transposer%
- INPUT#channel, pitch$
- INPUT#channel, accid$
- INPUT#channel, saveoctave%
- FOR a% = 1 TO numbannedpitches%
- INPUT#channel, bannedpitches%(a%)
- NEXT
- FOR a% = 1 TO numbannedints%
- FOR b% = 0 TO 2
- INPUT#channel, bannedints%(a%,b%)
- NEXT
- NEXT
- UNTIL EOF#channel
- CLOSE#channel
- *NoDir
- :
- ENDPROC
- :
- REM**************************************
- :
- DEF PROCeditintervalstring
- :
- IF loadstring$ = "y" THEN PROCloadintervalstring
- :
- CLS
- PRINT'" Alter the number of pitches?"
- PRINT" (currently ";numpitches%;")"
- CASE GET$ OF
- WHEN "Y","y" :
- INPUT'" How many pitches "numpitches%
- ENDCASE
- CLS
- PRINT'" Alter tessitura and/or location?"
- PRINT" (currently ";tess%;" semitones wide"
- PRINT" with a bottom note of ";pitch$;accid$;saveoctave%;")"
- CASE GET$ OF
- WHEN "Y","y" :
- INPUT'" The tessitura is how many semitones wide "tess%
- PRINT'" The bottom pitch of the tessitura is ";
- COLOUR 1
- CASE GET$ OF
- WHEN "C","c" : note% = 1 : PRINT "C" : pitch$ = "C"
- WHEN "D","d" : note% = 3 : PRINT "D" : pitch$ = "D"
- WHEN "E","e" : note% = 5 : PRINT "E" : pitch$ = "E"
- WHEN "F","f" : note% = 6 : PRINT "F" : pitch$ = "F"
- WHEN "G","g" : note% = 8 : PRINT "G" : pitch$ = "G"
- WHEN "A","a" : note% = 10 : PRINT "A" : pitch$ = "A"
- WHEN "B","b" : note% = 12 : PRINT "B" : pitch$ = "B"
- ENDCASE
- COLOUR 0
- PRINT " Accidental ";
- COLOUR 1
- CASE GET$ OF
- WHEN "1" : note% -= 1 : PRINT "flat" : accid$ = "flat"
- WHEN "5" : PRINT "nat" : accid$ = "nat"
- WHEN "9" : note% += 1 : PRINT "shrp" : accid$ = "shrp"
- OTHERWISE VDU 7
- ENDCASE
- COLOUR 0
- PRINT " Octave ";
- COLOUR 1
- octave% = EVAL(GET$) : saveoctave% = octave%
- PRINT octave%
- COLOUR 0
- transposer% = note% + (12*(octave%-1)) - 1
- OTHERWISE
- ENDCASE
- :
- PRINT'" Alter the banning of pitches? "
- IF numbannedpitches% = 0 THEN
- PRINT" No pitches are currently banned "
- ELSE
- PRINT" Currently banned pitches are,"
- PRINT" going up, starting at 0 -"
- PRINT" "
- VDU 14
- FOR count% = 1 TO numbannedpitches%
- PRINT " ";count%;". semitone ";bannedpitches%(count%)-1
- NEXT
- VDU 15
- ENDIF
- CASE GET$ OF
- WHEN "Y","y" :
- INPUT'" The number of banned pitches is now to be "numbannedpitches%
- FOR count% = 1 TO numbannedpitches%
- PRINT'" Alter banned pitch ";count%
- CASE GET$ OF
- WHEN "Y","y" :
- PRINT '" Pitch ";count%;" is, going up,"
- INPUT " semitone number what, starting at 0?"semitone%
- bannedpitches%(count%) = semitone%+1
- ENDCASE
- NEXT
- ENDCASE
- CLS : VDU 14
- PRINT'" Alter the banning of intervals?"
- IF numbannedints% = 0 THEN
- PRINT" No intervals are currently banned "
- ELSE
- VDU 28,20,43,70,15
- PRINT" Currently banned intervals are -"
- PRINT" "
- FOR count% = 1 TO numbannedints%
- IF bannedints%(count%,1) > 0 THEN COLOUR 131 ELSE COLOUR 135
- 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"
- 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"
- 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"
- NEXT
- COLOUR 135
- VDU 15
- ENDIF
- CASE GET$ OF
- WHEN "Y","y" :
- VDU 28,20,65,70,45
- PRINT'" Alter the number of banned intervals?"
- CASE GET$ OF
- WHEN "Y","y" :
- INPUT'" The number of banned intervals is now to be "numbannedints%
- ENDCASE
- FOR count% = 1 TO numbannedints%
- PRINT'" Alter interval ";count%
- CASE GET$ OF
- WHEN "Y","y" :
- PRINT'" Interval ";count%;" is how many semitones?"
- PRINT" (NB intervals between 12 & 23 are "
- INPUT" applied at all compounds) "bannedints%(count%,0)
- PRINT'" And is banned at between a minimum"
- INPUT" of how many notes from the last one "range%
- INPUT" And a maximum of how many "range1%
- bannedints%(count%,1) = range%
- bannedints%(count%,2) = range1%
- OTHERWISE
- ENDCASE
- NEXT
- ENDCASE
- :
- stringattempts% = 0 : PROCintervalstring
- :
- ENDPROC
- :
- REM********************************************************
- :
- DEF PROCconvertpitch
- :
- CASE (pitch%DIV10^2) OF
- WHEN 0 : note% = 1
- WHEN 1 : note% = 3
- WHEN 2 : note% = 5
- WHEN 3 : note% = 6
- WHEN 4 : note% = 8
- WHEN 5 : note% = 10
- WHEN 6 : note% = 12
- ENDCASE
- :
- CASE ((pitch%DIV10)MOD10) OF
- WHEN 1 : note% -= 1
- WHEN 9 : note% += 1
- OTHERWISE
- ENDCASE
- :
- octave% = pitch%MOD10
- note% = note% + (12*(octave%-1))
- chunk% = 12 : compoundint% = compoundpitch%
- ENDPROC
- :
- REM****************************************************
- :
- DEF PROCconvertquarter
- :
- CASE (pitch%DIV10^2) OF
- WHEN 0 : note% = 2
- WHEN 1 : note% = 6
- WHEN 2 : note% = 10
- WHEN 3 : note% = 12
- WHEN 4 : note% = 16
- WHEN 5 : note% = 20
- WHEN 6 : note% = 24
- ENDCASE
- :
- CASE ((pitch%DIV10)MOD10) OF
- WHEN 1 : note% -= 2
- WHEN 3 : note% -= 1
- WHEN 7 : note% += 1
- WHEN 9 : note% += 2
- OTHERWISE
- ENDCASE
- :
- octave% = pitch%MOD10
- note% = note% + (24*(octave%-1))
- chunk% = 24 : compoundint% = compoundquarter%
- ENDPROC
- ENDPROC
- :
- REM****************************************************
- :
- DEF PROCconverteighth
- :
- CASE (pitch%DIV10^2) OF
- WHEN 0 : note% = 4
- WHEN 1 : note% = 12
- WHEN 2 : note% = 20
- WHEN 3 : note% = 24
- WHEN 4 : note% = 32
- WHEN 5 : note% = 40
- WHEN 6 : note% = 48
- ENDCASE
- :
- CASE ((pitch%DIV10)MOD10) OF
- WHEN 1 : note% -= 4
- WHEN 2 : note% -= 3
- WHEN 3 : note% -= 2
- WHEN 4 : note% -= 1
- WHEN 6 : note% += 1
- WHEN 7 : note% += 2
- WHEN 8 : note% += 3
- WHEN 9 : note% += 4
- OTHERWISE
- ENDCASE
- :
- octave% = pitch%MOD10
- note% = note% + (48*(octave%-1))
- chunk% = 48 : compoundint% = compoundeighth%
- ENDPROC
- :
- REM****************************************************
- :
- DEF PROCconvertcent
- :
- CASE (pitch%DIV10^2) OF
- WHEN 0 : note% = 100
- WHEN 1 : note% = 300
- WHEN 2 : note% = 500
- WHEN 3 : note% = 600
- WHEN 4 : note% = 800
- WHEN 5 : note% = 1000
- WHEN 6 : note% = 1200
- ENDCASE
- :
- CASE ((pitch%DIV10)MOD10) OF
- WHEN 1 : note% -= 100
- WHEN 2 : note% -= 75
- WHEN 3 : note% -= 50
- WHEN 4 : note% -= 25
- WHEN 6 : note% += 25
- WHEN 7 : note% += 50
- WHEN 8 : note% += 75
- WHEN 9 : note% += 100
- OTHERWISE
- ENDCASE
- :
- octave% = pitch%MOD10
- note% = note% + (1200*(octave%-1)) + cent%
- chunk% = 1200 : compoundint% = compoundcent%
- ENDPROC
- :
- REM****************************************************
- :
- DEF PROCrandomnumber
- :
- PROCwindow(20,65,65,55)
- CLS
- :
- IF rerun$ = "n" THEN
- INPUT'" Return a random number between ? "ranx%
- INPUT " and ? "rany%
- ENDIF
- diff% = (rany%-ranx%)+1
- PRINT' RND(diff%)+(ranx%-1)
- :
- PRINT '" (press R to re-run, U for new number "
- PRINT " or any key to continue) "
- CASE GET$ OF
- WHEN "U","u" : rerun$ = "n" : PROCrandomnumber
- WHEN "R","r" : rerun$ = "y" : PROCrandomnumber
- OTHERWISE PROCdisplay
- ENDCASE
- ENDPROC
- :
- REM****************************************************
- :
- DEF PROCcheckproportiontotal
- :
- proportiontotal$ = "notOK"
- :
- it% = 0
- REPEAT
- it% += 1
- mplier = 0.5
- REPEAT
- mplier = mplier*2
- testnum% = it%*mplier
- posslownum = grouplength%/beatfactor%
- WHILE posslownum > proportiontotal%
- posslownum = posslownum/2
- ENDWHILE
- WHILE posslownum <= (proportiontotal%/2)
- posslownum = posslownum*2
- ENDWHILE
- IF proportiontotal% = testnum% AND ((it%/testnum%)*posslownum*10^3)MOD10^3=0 THEN proportiontotal$ = "OK"
- IF proportiontotal% = posslownum THEN proportiontotal$ = "OK"
- UNTIL proportiontotal$ = "OK" OR testnum% > (grouplength%/defaultmindur%)
- UNTIL proportiontotal$ = "OK" OR it% = given%
- :
- IF proportiontotal%>9999 THEN proportiontotal$ = "notOK"
- :
- ENDPROC
- :
- REM***************************************************
- :
- DEF PROCredpitches
- :
- tiss% = 0
- REPEAT
- tiss%+=1
- toss% = 0 : dored$ = "n"
- REPEAT
- toss%+=1
- IF (array%(startcell%,0,voice%)MOD10^3) = redpitches%(tiss%,toss%) THEN
- IF printing$ = "n" THEN GCOL tiss%
- dored$ = "y"
- ENDIF
- UNTIL dored$ = "y" OR toss% = numredpitches%(tiss%)
- UNTIL dored$ = "y" OR tiss% = numcols%
- ENDPROC
- :
- REM****************************************************
- :
- DEF PROCpitchstring2
- :
- PROCwindow(20,65,60,55)
- PRINT'" This function returns a string"
- PRINT" of pitches drawn from a semitonal"
- PRINT" cluster based on middle C,"
- PRINT" with a controlled chance "
- PRINT" of pitch repetitions"
- INPUT'" How many semitones in the cluster "numsemis%
- INPUT'" How many pitches in the string "numpitches%
- PRINT'" Randomly occuring pitch repetitions "
- PRINT" are included or not by what "
- INPUT" percentage? "percentage%
- :
- x% = RND(numsemis%)
- CASE x% OF
- WHEN 1 : pitches%(0) = 54
- WHEN 2 : pitches%(0) = 94
- WHEN 3 : pitches%(0) = 154
- WHEN 4 : pitches%(0) = 214
- WHEN 5 : pitches%(0) = 254
- WHEN 6 : pitches%(0) = 354
- WHEN 7 : pitches%(0) = 394
- WHEN 8 : pitches%(0) = 454
- WHEN 9 : pitches%(0) = 514
- WHEN 10 : pitches%(0) = 554
- WHEN 11 : pitches%(0) = 614
- WHEN 12 : pitches%(0) = 654
- ENDCASE
- :
- FOR count% = 1 TO numpitches%-1
- REPEAT
- continue$ = "y"
- x% = RND(numsemis%)
- CASE x% OF
- WHEN 1 : pitches%(count%) = 54
- WHEN 2 : pitches%(count%) = 94
- WHEN 3 : pitches%(count%) = 154
- WHEN 4 : pitches%(count%) = 214
- WHEN 5 : pitches%(count%) = 254
- WHEN 6 : pitches%(count%) = 354
- WHEN 7 : pitches%(count%) = 394
- WHEN 8 : pitches%(count%) = 454
- WHEN 9 : pitches%(count%) = 514
- WHEN 10 : pitches%(count%) = 554
- WHEN 11 : pitches%(count%) = 614
- WHEN 12 : pitches%(count%) = 654
- ENDCASE
- :
- IF pitches%(count%) = pitches%(count%-1) THEN
- y% = RND(100)
- IF y% <= percentage% THEN continue$ = "y" ELSE continue$ = "n"
- ENDIF
- UNTIL continue$ = "y"
- NEXT
- :
- PROCinsertpitches
- ENDPROC
- :
- REM***************************************
- :
- DEF PROCrhythmdefaults
- shortirrat% = 480
- longirrat% = 480
- irratbeats% = 2
- irratbeats1% = 2
- mindur% = 60 : sieve = 960/mindur%
- buffer% = 960/(sieve*2)
- given% = 9
- defaultsieve = 2
- ENDPROC
- :
- REM******************************************
- :
- DEF PROCdisplayoptions
- :
- PROCwindow(2,72,97,1)
- OFF
- PRINT' " Do you want to (press to toggle)"
- IF copytoend$ = "y" THEN state$ = "on" ELSE state$ = "off"
- IF seegraph$ = "y" THEN state1$ = "on" ELSE state1$ = "off"
- PRINT' " See graph during accel/rit G (";state1$;") Allow copying to last note ^A (";state$;")"
- IF seeinfo$ = "y" THEN state$ = "on" ELSE state$ = "off"
- IF nodelay$ = "y" THEN state1$ = "on" ELSE state1$ = "off"
- PRINT' " See info on attacks A (";state$;") Pause for querying stave ^D (";state1$;")"
- IF printinfo$ = "y" THEN state$ = "on" ELSE state$ = "off"
- IF askprevious$ = "y" THEN state1$ = "on" ELSE state1$ = "off"
- PRINT' " get printout of info on attacks I (";state$;") Pause for previous position^F (";state1$;")"
- IF seereorder$ = "y" THEN state$ = "on" ELSE state$ = "off"
- IF errorbeforedisplay$ = "n" THEN state1$ = "off" ELSE state1$ = "on"
- PRINT' " Re-order attacks R (";state$;") Debugging mode ^G (";state1$;")"
- IF seereorderx$ = "y" THEN state$ = "on" ELSE state$ = "off"
- PRINT' " Re-order attacks during accel/rit only ^R (";state$;")"
- IF seeequalize$ = "y" THEN state$ = "on" ELSE state$ = "off"
- PRINT' " Equalize attacks E (";state$;") [press spacebar to continue] "
- IF seeequalizex$ = "y" THEN state$ = "on" ELSE state$ = "off"
- PRINT' " Equalize attacks during accel/rit only ^E (";state$;")"
- IF seerhythmicize$ = "y" THEN state$ = "on" ELSE state$ = "off"
- PRINT' " Rhythmicize attacks H (";state$;")"
- IF reorderpitches$ = "y" THEN state$ = "on" ELSE state$ = "off"
- PRINT' " Re-order pitches using M/A/P ^P (";state$;")"
- IF seequery$ = "y" THEN state$ = "on" ELSE state$ = "off"
- PRINT' " Query before adding new values to array Q (";state$;")"
- PRINT' " Define parameter values during input P (";paraset$;")"
- PRINT' " Accel/rit by total durat, endpoints or "
- PRINT " first two notes displayed T/N/F (";funcinput$;")"
- IF startfinishdurats$ = "Y" THEN state$ = "on" ELSE state$ = "off"
- PRINT' " Accel/rit by start and finish durations S (";state$;")"
- IF seeduration$ = "y" THEN state$ = "on" ELSE state$ = "off"
- PRINT' " See duration upto last displayed bar D (";state$;")"
- IF quickcopy$ = "y" THEN state$ ="on" ELSE state$ = "off"
- PRINT' " Quick copy B (";state$;")"
- CASE seedurinbts$ OF
- WHEN "y" : state$ = "on"
- WHEN "stepped" : state$ = "stepped"
- WHEN "n" : state$ = "off"
- ENDCASE
- PRINT' " See durations in micro-beats K (";state$;")"
- CASE seedurincrots$ OF
- WHEN "y" : state$ = "on"
- WHEN "stepped" : state$ = "stepped"
- WHEN "n" : state$ = "off"
- ENDCASE
- PRINT' " See durations in macro-beats C (";state$;")"
- IF screenvoices$ = "y" THEN state$ = "on" ELSE state$ = "off"
- PRINT' " Voice numbers by 1/2/3 on screen V (";state$;")"
- IF ampoptions$ = "y" THEN state$ = "on" ELSE state$ = "off"
- PRINT' " Use advanced amplitudes options O (";state$;")"
- PRINT' " Double v/^ moves down/up by 3/10 staves Z (";screenmovesby%;")"
- CASE setalong$ OF
- WHEN "y" : state$ = "A/R"
- WHEN "n" : state$ = "quick"
- WHEN "playnovoices" : state$ = "play"
- ENDCASE
- PRINT' " 1,2 = A/R start/quickdisplay/play vces J (";state$;")"
- CASE envelopedata$ OF
- WHEN "none" : stage$ = "neither"
- WHEN "percentage" : stage$ = "%'s"
- WHEN "marker" : stage$ = "indicators"
- ENDCASE
- PRINT' " See envelope %'s/indicators/neither L (";stage$;")"
- IF askaboutpitches$ = "y" THEN state$ = "on" ELSE state$ = "off"
- PRINT' " Query if pitches all the same M (";state$;")"
- IF usebottomstave$ = "y" THEN state$ = "on" ELSE state$ = "off"
- PRINT' " Group of pitches fills bottom stave U (";state$;")"
- CASE sequalssection$ OF
- WHEN "y" : state$ = "sect"
- WHEN "n" : state$ = "next"
- ENDCASE
- PRINT' " Copy from next voices/Go to section ^S (";state$;")"
- IF addpitches$ = "y" THEN state$ = "pitch" ELSE state$ = "env"
- PRINT' " ^Y = Add pitches/edit envelope Y (";state$;")"
- IF squarebracket$ = "remarks" THEN state$ = "remarks" ELSE state$ = "copy +"
- PRINT' " [] keys = move remarks/add to copydown [ (";state$;")"
- IF queryalong$ = "y" THEN state$ = "on" ELSE state$ = "off"
- PRINT' " Accel/rit asks for starting attack ] (";state$;")"
- PRINT' " Reset no.staves ^/v moves up/down by ~"
- IF singlepitch$ = "m" THEN state$ = "multiple" ELSE state$ = "single"
- PRINT' " Y = single/multiple pitch entry @ (";state$;")"
- IF namestaves$ = "nameone" THEN state$ = "rename" ELSE state$ = "delete"
- PRINT' " ^V = rename/delete batch of voice names^V (";state$;")"
- IF usebeep$ = "n" THEN state$ = "assnd" ELSE state$ = "beep"
- PRINT' " Play with beep or assigned voices ^B (";state$;")"
- IF onlycontent$ = "y" THEN state$ = "on" ELSE state$ = "off"
- PRINT' " Display only voices with content ^C (";state$;")"
- PRINT' " Show list of voices with content ^L"
- :
- CASE GET$ OF
- :
- WHEN "g" :
- IF seegraph$ = "y" THEN seegraph$ = "n" ELSE seegraph$ = "y"
- WHEN "a" :
- IF seeinfo$ = "y" THEN seeinfo$ = "n" ELSE seeinfo$ = "y"
- WHEN "A" :
- IF copytoend$ = "y" THEN copytoend$ = "n" ELSE copytoend$ = "y"
- WHEN "I","i" :
- IF printinfo$ = "y" THEN printinfo$ = "n" ELSE printinfo$ = "y"
- WHEN "r" :
- IF seereorder$ = "y" THEN
- seereorder$ = "n"
- seereordery$ = "n"
- ELSE
- seereorder$ = "y"
- seereorderx$ = "y"
- seereordery$ = "y"
- ENDIF
- WHEN "R" :
- IF seereorderx$ = "y" THEN
- seereorderx$ = "n"
- seereordery$ = "n"
- ELSE seereorderx$ = "y"
- ENDIF
- WHEN "e" :
- IF seeequalize$ = "y" THEN
- seeequalize$ = "n"
- seeequalizey$ = "n"
- ELSE
- seeequalize$ = "y"
- seeequalizex$ = "y"
- seeequalizey$ = "y"
- ENDIF
- WHEN "E" :
- IF seeequalizex$ = "y" THEN
- seeequalizex$ = "n"
- seeequalizey$ = "n"
- ELSE seereorderx$ = "y"
- ENDIF
- WHEN "P" :
- IF reorderpitches$ = "y" THEN reorderpitches$ = "n" ELSE reorderpitches$ = "y"
- WHEN "H","h" :
- IF seerhythmicize$ = "y" THEN seerhythmicize$ = "n" ELSE seerhythmicize$ = "y"
- WHEN "Q","q" :
- IF seequery$ = "y" THEN seequery$ = "n" ELSE seequery$ = "y"
- WHEN "p" :
- IF paraset$ = "on" THEN paraset$ = "off" ELSE paraset$ = "on"
- WHEN "T","t" :
- funcinput$ = "durat"
- WHEN "N","n" :
- funcinput$ = "points"
- WHEN "f" :
- funcinput$ = "displayed"
- WHEN "s" :
- IF startfinishdurats$ = "Y" THEN startfinishdurats$ = "N" ELSE startfinishdurats$ = "Y"
- WHEN "d" :
- IF seeduration$ = "y" THEN
- seeduration$ = "n" : PROCdisplay
- ELSE seeduration$ = "y" : PROCdisplay
- ENDIF
- WHEN "b" :
- IF quickcopy$ = "n" THEN quickcopy$ = "y" ELSE quickcopy$ = "n"
- WHEN "K","k" :
- IF seedurinbts$ = "n" THEN
- seedurinbts$ = "y" : seedurincrots$ = "n" : PROCdisplay
- ENDIF
- IF seedurinbts$ = "y" THEN
- seedurinbts$ = "stepped" : seedurincrots$ = "n" : PROCdisplay
- ENDIF
- IF seedurinbts$ = "stepped" THEN
- seedurinbts$ = "n": PROCdisplay
- ENDIF
- WHEN "c" :
- IF seedurincrots$ = "n" THEN
- seedurincrots$ = "y" : seedurinbts$ = "n" : PROCdisplay
- ENDIF
- IF seedurincrots$ = "y" THEN
- seedurincrots$ = "stepped" : seedurinbts$ = "n" : PROCdisplay
- ENDIF
- IF seedurincrots$ = "stepped" THEN
- seedurincrots$ = "n" : PROCdisplay
- ENDIF
- WHEN "v" :
- IF screenvoices$ = "n" THEN screenvoices$ = "y" ELSE screenvoices$ = "n" : PROCdisplay
- WHEN "V" :
- IF namestaves$ = "nameone" THEN namestaves$ = "deletemany" ELSE namestaves$ = "nameone"
- WHEN "O","o" :
- IF ampoptions$ = "n" THEN ampoptions$ = "y" ELSE ampoptions$ = "n" : PROCdisplay
- WHEN "z","Z" : IF screenmovesby% = 10 THEN screenmovesby% = 3 ELSE screenmovesby% = 10 : PROCdisplay
- WHEN "J","j" :
- CASE setalong$ OF
- WHEN "y" : setalong$ = "n"
- WHEN "n" : setalong$ = "playnovoices"
- WHEN "playnovoices" : setalong$ = "y"
- ENDCASE
- WHEN "l" :
- CASE envelopedata$ OF
- WHEN "none" : envelopedata$ = "percentage"
- WHEN "percentage" : envelopedata$ = "marker"
- WHEN "marker" : envelopedata$ = "none"
- ENDCASE
- WHEN "M","m" :
- IF askaboutpitches$ = "y" THEN askaboutpitches$ = "n" ELSE askaboutpitches$ = "y"
- WHEN "U","u" :
- IF usebottomstave$ = "y" THEN usebottomstave$ = "n" ELSE usebottomstave$ = "y"
- IF usebottomstave$ = "y" THEN askaboutpitches$ = "n" ELSE askaboutpitches$ = "y"
- WHEN "S" :
- CASE sequalssection$ OF
- WHEN "y" : sequalssection$ = "n"
- WHEN "n" : sequalssection$ = "y"
- ENDCASE
- WHEN "y","Y" :
- IF addpitches$ = "y" THEN addpitches$ = "n" ELSE addpitches$ = "y"
- WHEN "[" :
- IF squarebracket$ = "remarks" THEN squarebracket$ = "addten" ELSE squarebracket$ = "remarks"
- WHEN "]" :
- IF queryalong$ = "y" THEN queryalong$ = "n" ELSEqueryalong$ = "y"
- WHEN "~" :
- CLS
- INPUT " pressing ^ or v movesup/down by how many staves "updisplay%
- WHEN "@" :
- IF singlepitch$ = "s" THEN singlepitch$ = "m" ELSE singlepitch$ = "s"
- WHEN "B" :
- IF usebeep$ = "y" THEN usebeep$ = "n" ELSE usebeep$ = "y"
- WHEN "C" :
- IF onlycontent$ = "y" THEN onlycontent$ = "n" ELSE onlycontent$ = "y"
- PROCdisplayonlycontent
- WHEN "L" : PROCcontentonlylist
- WHEN "D" : IF nodelay$ = "y" THEN nodelay$ = "n" ELSE nodelay$ = "y"
- WHEN "F" : IF askprevious$ = "y" THEN askprevious$ = "n" ELSE askprevious$ = "y"
- WHEN "G" : IF errorbeforedisplay$ = "n" THEN errorbeforedisplay$ = "debug" ELSE errorbeforedisplay$ = "n"
- :
- OTHERWISE
- :
- ENDCASE
- ON
- :
- ENDPROC
- :
- REM******************************************************************
- :
- DEF PROCremarks
- :
- INPUT'" Which bar "baar%
- PRINT" line 1 or 2 "
- CASE GET$ OF
- WHEN "1" : line% = 0
- WHEN "2" : line% = 1
- OTHERWISE VDU7 : PROCremarks
- ENDCASE
- INPUT " What are the remarks "remarks$
- remarks$(baar%,line%) = remarks$
- :
- ENDPROC
- :
- REM********************************************************************
- :
- DEF PROCwindow(a%,b%,c%,d%)
- :
- bigger$ = "n"
- IF a% < biga% THEN
- biga% = a% : bigger$ = "y"
- ENDIF
- IF b% > bigb% THEN
- bigb% = b% : bigger$ = "y"
- ENDIF
- IF c% > bigc% THEN
- bigc% = c% : bigger$ = "y"
- ENDIF
- IF d% < bigd% THEN
- bigd% = d% : bigger$ = "y"
- ENDIF
- :
- IF box$ = "n" THEN
- box$ = "y"
- VDU 28,a%-1,b%+1,c%+1,d%-1 : COLOUR 129 : CLS
- VDU 28,a%,b%,c%,d% : COLOUR 0 : COLOUR 135 : CLS : OFF
- ELSE
- IF bigger$ = "y" THEN
- VDU 28,a%-1,b%+1,c%+1,d%-1 : COLOUR 129 : CLS
- ENDIF
- CLS : VDU 28,a%,b%,c%,d% : COLOUR 0 : COLOUR 135 : CLS : OFF
- ENDIF
- :
- ENDPROC
- :
- REM***********************************************
- :
- DEF PROCslave
- REM this program returns not simply a random
- REM percentage (tends to be too high) nor
- REM a random percentage of a random percentage
- REM (tends to be too low), but something
- REM inbetween, averaging not 50% nor 25% but 37.5%
- :
- IF quickslave$ = "n" THEN
- PROCwindow(20,69,96,55)
- PRINT''" To begin, display the Mastervoice's two half-phases first on the screen."
- PRINT " This function then generates a Slavevoice's associated two half-phases,"
- PRINT " their random starting and ending points averaging 37.5% and 62.5% of the"
- PRINT " MV half-phases respectively (other averages tend to be too high or too low)"
- PRINT '" Alternatively, percentages may be determined - "
- PRINT " press D for determined or R for random now "
- CASE GET$ OF
- WHEN "D","d" : slavemethod$ = "determined"
- OTHERWISE slavemethod$ = "random"
- ENDCASE
- ENDIF
- :
- test$ = "n"
- PROCinput
- :
- DEF PROCinput
- REM procedure for getting first 2 attacks displayed
- IF quickslave$ = "y" THEN PROCwindow(20,67,48,55)
- INPUT '" Mastervoice is which voice "voice%
- IF voice% = 0 THEN voice% = savevoice%
- IF voice% <> 0 THEN savevoice% = voice%
- voice% -= 1
- startingbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
- startbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
- midbar% = array%(holdstartcell%(voice%)+1+along%,0,voice%)DIV10^6
- midbeat% = (array%(holdstartcell%(voice%)+1+along%,0,voice%)MOD10^6)DIV10^3
- endbar% = array%(holdstartcell%(voice%)+2+along%,0,voice%)DIV10^6
- endbeat% = (array%(holdstartcell%(voice%)+2+along%,0,voice%)MOD10^6)DIV10^3
- startpoint% = startingbar%*960
- startpoint% += startbeat%
- midpoint% = midbar%*960
- midpoint% += midbeat%
- endpoint% = endbar% * 960
- endpoint% += endbeat%
- PROCprogram
- ENDPROC
- :
- DEF PROCprogram
- IF test$ = "y" THEN number% = 1000 ELSE number% = 1
- total% = 0 : total1% = 0
- FOR count% = 1 TO number%
- firstdur% = midpoint%-startpoint%
- seconddur% = endpoint%-midpoint%
- REPEAT
- IF slavemethod$ = "determined" THEN
- INPUT'" Percentage for first half-phase is..."percentage%
- ELSE
- c% = RND(100)
- percentage% = RND(100) * (RND(101-c%)+(c%-1)) / 100
- ENDIF
- UNTIL percentage% >= lowerstart% AND percentage% <= upperstart%
- SVfirstdur% = firstdur%*percentage%/100
- REPEAT
- IF slavemethod$ = "determined" THEN
- INPUT'" Percentage for second half-phase is..."percentage1%
- ELSE
- c% = RND(100)
- percentage1% = 100 - (RND(100) * (RND(101-c%)+(c%-1)) / 100)
- ENDIF
- UNTIL percentage1% >= lowerend% AND percentage1% <= upperend%
- SVseconddur% = seconddur%*percentage1%/100
- :
- SVtotaldur% = firstdur% - SVfirstdur% + SVseconddur%
- SVthirddur% = SVtotaldur%/(firstdur%+seconddur%)*firstdur%
- :
- SVbar% = startingbar%
- SVbeat% = startbeat% + SVfirstdur%
- PROCbeats
- SVstartbar% = SVbar% : SVstartbeat% = SVbeat%
- :
- SVbar% = SVstartbar%
- SVbeat% = SVstartbeat% + SVthirddur%
- PROCbeats
- SVmidbar% = SVbar% : SVmidbeat% = SVbeat%
- :
- SVbar% = midbar%
- SVbeat% = midbeat% + SVseconddur%
- PROCbeats
- SVendbar% = SVbar% : SVendbeat% = SVbeat%
- :
- IF quickslave$ = "y" THEN PROCwindow(20,69,82,55)
- CLS
- PRINT'" The Slavevoice's first half-phase starts at ";SVstartbar%;".";SVstartbeat%;" (";percentage%;"%)"
- PRINT '" and ends at ";SVmidbar%;".";SVmidbeat%
- PRINT '" And its second half-phase ends at ";SVendbar%;".";SVendbeat%;" (";percentage1%;"%)"
- total% += percentage% : total1% += percentage1%
- NEXT
- IF test$ = "y" THEN
- PRINT''" Average 1st percent = ";total%/1000
- PRINT" Average second = ";total1%/1000
- PRINT'" to continue press C"
- CASE GET$ OF
- WHEN"C","c" : PROCdisplay
- ENDCASE
- ENDIF
- PRINT''" Do you want to add this slave voice to the array?"
- PRINT" (or, to test average percentages out of 1000 throws, press P"
- PRINT" or, to set limits for the random percentages, press L)"
- CASE GET$ OF
- WHEN"Y","y" :
- WHEN"N","n" : PROCdisplay
- WHEN "P","p" : test$ = "y" : PROCprogram
- WHEN "L","l" : PROClimits
- ENDCASE
- attacks1%(1) = ((SVmidbar%*960)+SVmidbeat%) - ((SVstartbar%*960)+SVstartbeat%)
- attacks1%(2) = ((SVendbar%*960)+SVendbeat%) - ((SVstartbar%*960)+SVstartbeat%)
- funcbar% = SVstartbar% : funcbeat% = SVstartbeat%
- method$ = "raw" : quiz$ = "no" : manyattacks% = 3
- PROCinsertattacks
- ENDPROC
- :
- DEF PROCbeats
- WHILE SVbeat% > 959
- SVbeat% -= 960 : SVbar% += 1
- ENDWHILE
- ENDPROC
- :
- DEF PROClimits
- INPUT'" Give the lower limit for SV's start-point, between 1% & 99% "lowerstart%
- INPUT " Give the upper limit for SV's start-point, between 1% & 99% "upperstart%
- INPUT'" Give the lower limit for SV's end-point, between 1% & 99% "lowerend%
- PRINT " Give the upper limit for SV's end-point, between 1% & 99% "
- INPUT " (these limits last for the session) "upperend%
- PROCdisplay
- ENDPROC
- :
- ENDPROC
- :
- REM*******************************************
- :
- DEF PROCprintattacks
- :
- durat% = 0
- MODE 16 : COLOUR 7 : COLOUR 128 : CLS
- PRINT '" The group of attacks will be at "
- PRINT" "
- PRINT TAB(8) "ATTACKS AT";
- PRINT TAB(30) "DURATIONS";
- PRINT TAB(54) "RATIOS"
- tal% = 0 : printnum% = 0
- FOR count% = 0 TO (manyattacks%-1)
- tal% += 1
- PRINT TAB(1)(attacks2%(count%))DIV10^3;" ";
- PRINT ;(attacks2%(count%))MOD10^3;
- IF count% > 0 THEN
- durat1% = durat%
- durat% = (attacks2%(count%)MOD10^3)-(attacks2%(count%-1)MOD10^3)
- addon% = ((attacks2%(count%)DIV(10^3))-(attacks2%(count%-1)DIV(10^3)))*960
- durat% = durat% + addon%
- PRINT TAB(26) durat%;
- IF count%>1 THEN
- IF direction$ = "rit" THEN ratio = durat%/durat1% ELSE ratio = durat1%/durat%
- CASE ratio OF
- WHEN 0.5 : PRINT TAB(52) "0.5"
- WHEN 1.0 : PRINT TAB(52) "1.0"
- WHEN 1.5 : PRINT TAB(52) "1.5"
- WHEN 2.0 : PRINT TAB(52) "2.0"
- WHEN 2.5 : PRINT TAB(52) "2.5"
- OTHERWISE PRINT TAB(52) ratio
- ENDCASE
- ENDIF
- ENDIF
- IF tal% > 54 AND printinfo$ = "y" THEN
- printnum% += 1
- MOVE 0,0
- MOVE 1800,1223
- *SGet mysprite
- OSCLI "SSave HostFS::HardDisc4.$.CAC.Printing."+STR$(printnum%)
- tal% = 0
- ENDIF
- NEXT
- IF printinfo$ = "y" THEN
- MOVE 0,0
- MOVE 1800,1223
- *SGet mysprite
- OSCLI "SSave HostFS::HardDisc4.$.CAC.Printing."+STR$(printnum%+1)
- ENDIF
- :
- PROCdisplay
- :
- ENDPROC
- :
- REM*************************************************
- :
- DEF PROCnamestaves
- :
- INPUT'" Rename which voice "thevoice%
- INPUT' " calling it what "thename$
- insts$(thevoice%,0) = thename$
- :
- ENDPROC
- :
- REM**************************************************
- :
- DEF PROCdeletenames
- :
- INPUT'" Delete names between voice "firstvoice%
- INPUT " and which voice "secondvoice%
- FOR count% = firstvoice% TO secondvoice%
- insts$(count%,0) = ""
- NEXT
- :
- ENDPROC
- :
- REM***************************************************
- :
- DEF PROCcopyrhythm
- :
- REM copies disarray data from one voice to another directly
- :
- CLS
- INPUT'" Copy rhythm from voice "fromvoice%
- INPUT'" to voice "tovoice%
- INPUT'" the passage starting at bar "frombar%
- INPUT'" and ending with bar "tobar%
- INPUT'" the copy to start at bar "copytobar%
- diff% = copytobar% - frombar%
- FOR count% = frombar% TO tobar%
- disarray%(count%+diff%,0,tovoice%-1) = disarray%(count%,0,fromvoice%-1)
- disarray%(count%+diff%,1,tovoice%-1) = disarray%(count%,1,fromvoice%-1)
- disarray%(count%+diff%,2,tovoice%-1) = disarray%(count%,2,fromvoice%-1)
- disarray%(count%+diff%,3,tovoice%-1) = disarray%(count%,3,fromvoice%-1)
- NEXT
- :
- PROCdisplay
- :
- ENDPROC
- :
- REM****************************************************
- :
- DEF PROCquantize
- :
- FOR count% = 0 TO manyattacks%-1
- :
- proceed1$ = "yes"
- proceed2$ = "yes"
- REM routine to illimunate from quantizing attacks closer than 120 bts to adjacent attacks
- IF count% > 0 THEN
- value1% = (attacks2%(count%)MOD10^3) + ((attacks2%(count%)DIV10^3)*960)
- value2% = (attacks2%(count%-1)MOD10^3) + ((attacks2%(count%-1)DIV10^3)*960)
- IF (value1% - value2%) > 120 THEN proceed1$ = "yes" ELSE proceed1$ = "no"
- ENDIF
- :
- IF count%<(manyattacks%-1) THEN
- value1% = (attacks2%(count%)MOD10^3) + ((attacks2%(count%)DIV10^3)*960)
- value2% = (attacks2%(count%+1)MOD10^3) + ((attacks2%(count%+1)DIV10^3)*960)
- IF (value2% - value1%) > 120 THEN proceed2$ = "yes" ELSE proceed2$ = "no"
- ENDIF
- :
- IF proceed1$ = "yes" AND proceed2$ = "yes" THEN
- :
- beat% = attacks2%(count%)MOD10^3
- :
- IF beat%>900 AND beat%<960 THEN
- IF beat%<930 THEN
- attacks2%(count%) = (attacks2%(count%)-beat%+900)
- ELSE
- attacks2%(count%) = (attacks2%(count%)-beat%+1000)
- attacks3%(count%)+= 1000
- ENDIF
- ENDIF
- :
- IF beat%>0 AND beat%<60 THEN
- IF beat%<31 THEN
- attacks2%(count%)-=beat%
- ELSE
- attacks2%(count%) = (attacks2%(count%)-beat%+60)
- ENDIF
- ENDIF
- :
- IF beat%>420 AND beat%<480 THEN
- IF beat%<430 THEN
- attacks2%(count%)= (attacks2%(count%)-beat%+420)
- ELSE
- attacks2%(count%) = (attacks2%(count%)-beat%+480)
- ENDIF
- ENDIF
- :
- IF beat%>480 AND beat%<540 THEN
- IF beat%<511 THEN
- attacks2%(count%)= (attacks2%(count%)-beat%+480)
- ELSE
- attacks2%(count%) = (attacks2%(count%)-beat%+540)
- ENDIF
- ENDIF
- :
- ENDIF
- :
- NEXT
- :
- ENDPROC
- :
- REM**************************************************************
- :
- DEF PROCreleases
- :
- CLS
- copymove$ = "C"
- :
- :
- IF quickcopy$ = "n" THEN
- PRINT'" Create envelope points for which voice? "
- INPUT " (0 = top) "voice%
- IF voice% = 0 THEN PROCpressenter
- voice% -= 1
- INPUT'" Starting at bar "copystartbar%
- holdbar% = copystartbar%
- INPUT" beat "beats%
- PROCalterbeats : copystartbeat% = beats%
- holdbeat% = copystartbeat%
- IF justone$ = "n" THEN
- PRINT'" Ending at bar "
- INPUT" (for last type 0) "copyendbar%
- IF copyendbar% > 0 THEN
- INPUT " beat "beats%
- PROCalterbeats : copyendbeat% = beats%
- ENDIF
- ELSE
- copyendbar% = copystartbar%
- copyendbeat% = copystartbeat%
- ENDIF
- :
- ELSE
- :
- PRINT'" Create envelope points for which voice? "
- INPUT " (0 = top) "voice%
- IF voice% = 0 THEN PROCpressenter
- voice% -= 1
- INPUT '" note number (for 1 press 0) "along%
- IF along% = 0 THEN along% = 1
- along%-=1
- copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
- copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
- holdbar% = copystartbar%
- holdbeat% = copystartbeat%
- IF justone$ = "n" THEN
- PRINT'" to note number "
- INPUT" (for last type 0) "along%
- IF along% = 0 THEN
- copyendbar% = 0
- ELSE
- along%-=1
- copyendbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
- copyendbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
- ENDIF
- ELSE
- copyendbar% = copystartbar%
- copyendbeat% = copystartbeat%
- ENDIF
- ENDIF
- :
- :
- value% = (copystartbar%*10^3)+copystartbeat%
- IF value% <= array%(0,0,voice%)DIV10^3 THEN
- startatcell% = 0
- ELSE
- PROCsearch(value%)
- startatcell% = startcell%
- ENDIF
- IF copyendbar% = 0 THEN
- endatcell% = numusedcells%(voice%) - 1
- ELSE
- value% = (copyendbar%*10^3)+copyendbeat%
- IF value% >= array%(numusedcells%(voice%)-1,0,voice%)DIV10^3 THEN
- endatcell% = numusedcells%(voice%) - 1
- ELSE
- PROCsearch(value%)
- IF shunt$ = "N" THEN endatcell% = startcell% ELSE endatcell% = startcell% - 1
- ENDIF
- ENDIF
- :
- manyattacks% = endatcell% - startatcell% + 1
- REM create 'gap' between beat-of-bar and first actual attack
- carrybars% = (array%(startatcell%,0,voice%)DIV10^6)-copystartbar%
- carrybeats% = ((array%(startatcell%,0,voice%)DIV10^3)MOD10^3)-copystartbeat%
- attacks1%(0) = (carrybars%*960)+carrybeats%
- :
- FOR count% = 0 TO (manyattacks%-1)
- IF count% > 0 THEN
- carrybars% = (array%(startatcell%+count%,0,voice%)DIV10^6)-(array%(startatcell%+count%-1,0,voice%)DIV10^6)
- carrybeats% = ((array%(startatcell%+count%,0,voice%)DIV10^3)MOD10^3)-((array%(startatcell%+count%-1,0,voice%)DIV10^3)MOD10^3)
- attacks1%(count%) = attacks1%(count%-1) + ((carrybars%*960)+carrybeats%)
- ENDIF
- :
- pitches%(count%) = array%(startatcell%+count%,0,voice%)MOD10^3
- dur% = (array%(startatcell%+count%,1,voice%)DIV10)MOD10^3
- brrr% = array%(startatcell%+count%,0,voice%)DIV10^6 : PROCreconvertdur
- durations%(count%) = dur%
- NEXT
- :
- counter% = -1
- FOR count% = 0 TO (manyattacks%-1)
- :
- counter% += 1
- gliss1% = (array%(startatcell%+count%,1,voice%)DIV10^4)MOD10^2 : gliss1% = 50-gliss1%
- gliss2% = (array%(startatcell%+count%,1,voice%)DIV10^6)MOD10^2 : gliss2% = 50 - gliss2%
- gliss3% = array%(startatcell%+count%,1,voice%)DIV10^8 : gliss3% = 10 - gliss3%
- note% = pitches%(count%)DIV10^2
- accid% = (pitches%(count%)DIV10)MOD10
- oct% = pitches%(count%)MOD10
- :
- ph1% = ((array%(startatcell%+count%,2,voice%))DIV10^5)MOD10^2
- IF ph1% <> 0 THEN
- envattacks%(counter%) = attacks1%(count%)+(durations%(count%)*ph1%/100)
- gliss% = gliss1%
- IF gliss% <> 0 THEN
- PROCglisspitches
- envpitches%(counter%) = (note1%*100)+(accid1%*10)+oct1%
- ELSE
- envpitches%(counter%) = (note%*100)+(accid%*10)+oct%
- ENDIF
- :
- ENDIF
- :
- ph2% = (array%(startatcell%+count%,2,voice%))DIV10^7
- IF ph2% <> 0 THEN
- counter% += 1
- envattacks%(counter%) = attacks1%(count%)+(durations%(count%)*ph2%/100)
- gliss% = gliss1% + gliss2%
- IF gliss% <> 0 THEN
- PROCglisspitches
- envpitches%(counter%) = (note1%*100)+(accid1%*10)+oct1%
- ELSE
- envpitches%(counter%) = (note%*100)+(accid%*10)+oct%
- ENDIF
- :
- ENDIF
- :
- IF ph1% <> 0 THEN counter% += 1
- envattacks%(counter%) = attacks1%(count%)+durations%(count%)
- IF ph1% = 0 THEN gliss% = gliss1%
- IF ph1% <> 0 AND ph2% = 0 THEN gliss% = gliss1% + gliss2%
- IF ph2% <> 0 THEN gliss% = gliss1% + gliss2% + gliss3%
- IF gliss% <> 0 THEN
- PROCglisspitches
- envpitches%(counter%) = (note1%*100)+(accid1%*10)+oct1%
- ELSE
- envpitches%(counter%) = (note%*100)+(accid%*10)+oct%
- ENDIF
- :
- NEXT
- :
- FOR count% = 0 TO counter%
- :
- attacks1%(count%) = envattacks%(count%)
- pitches%(count%) = envpitches%(count%)
- durations%(count%) = 0
- amplitudes%(count%) = 0
- envelopes%(count%) = 9
- glissandos%(count%) = 105050
- inflections%(count%) = 50
- NEXT
- :
- numpitches% = counter% + 1
- manyattacks% = counter% + 1
- method$ = "raw"
- copyit$ = "ON"
- PROCinsertattacks
- :
- justone$ = "n"
- :
- ENDPROC
- :
- REM**********************************************
- :
- DEF PROCglisspitches
- :
- note1% = note% : accid1% = accid% : oct1% = oct%
- :
- IF gliss% < 0 THEN step% = -1 ELSE step% = 1
- IF gliss% > 0 THEN startloop% = 1 ELSE startloop% = -1
- :
- FOR country% = startloop% TO gliss% STEP step%
- :
- CASE step% OF
- WHEN -1 :
- CASE accid1% OF
- WHEN 1 :
- CASE note1% OF
- WHEN 0 :
- note1% = 6 : accid1% = 4 : oct1% -=1
- WHEN 1, 2, 4, 5, 6 :
- note1% -= 1 : accid1% = 8
- WHEN 3 :
- note1% -= 1 : accid1% = 4
- ENDCASE
- OTHERWISE accid1% -= 1
- ENDCASE
- WHEN 1 :
- CASE accid1% OF
- WHEN 9 :
- CASE note1% OF
- WHEN 0, 1, 3, 4, 5 :
- note1% += 1 : accid1% = 2
- WHEN 2 :
- note1% += 1 : accid1% = 6
- WHEN 6 :
- note1% = 0 : accid1% = 6 : oct1% += 1
- ENDCASE
- OTHERWISE accid1% += 1
- ENDCASE
- ENDCASE
- NEXT
- :
- ENDPROC
- :
- REM*********************************************
- :
- DEF PROCdoublestop
- :
- PROCwindow(20,69,96,55)
- repeatposit$ = "n"
- distort$ = "OFF"
- dothis$ = "YES"
- :
- copymove$ = "DS"
- savevoice$ = "N"
- justone$ = "n"
- :
- PRINT'" Violin, viola, cello or bass (N,A,O,S)? "
- PRINT'" (or press E for an explanation of the function) "
- CASE GET$ OF
- WHEN "N","n" : member$ = "violin"
- WHEN "A","a" : member$ = "viola"
- WHEN "O","o" : member$ = "cello"
- WHEN "S","s" : member$ = "bass"
- WHEN "E","e" :
- PROCwindow(10,60,96,25)
- VDU 14
- CLS
- PRINT'" The typical situation in which the double-stop function would play a part"
- PRINT" is imagined to be this: up to four voices are employed to schedule attack-points "
- PRINT" on each of the strings (at this stage make a single-voice reduction with the attacks "
- PRINT" pitched on the open strings, because this will be needed in the function). "
- PRINT'" Pitches are allocated to the attacks, including open strings and harmonics, with "
- PRINT" the condition that all are within a single lh position at any one time. "
- PRINT'" Now reduce these separate-string voices to a single voice - this is treated by "
- PRINT" the function to produce a version inserting practical double-stops according to "
- PRINT" user-defined probabilities; this is copied into two further voices to enable faithful "
- PRINT" play-back; durations are correctly clipped, so a further reduction of these two "
- PRINT" voices will give a clear indication of notation on a single stave. "
- PRINT'" (press C to continue) "
- CASE GET$ OF
- ENDCASE
- VDU 15
- PROCdisplay
- OTHERWISE PROCdoublestop
- ENDCASE
- INPUT'" Which single voice is to be treated? "treatvoice%
- treatvoice% -= 1
- INPUT'" Which other 2 voices is it divided into? - voice... "firstvoice%
- firstvoice% -= 1
- INPUT'" and voice... "secondvoice%
- secondvoice% -= 1
- INPUT'" And which single voice carries the open strings? - voice... "stringvoice%
- stringvoice% -= 1
- CLS
- PRINT''" These 4 voices are assumed to correspond vertically; "
- INPUT'" the passage is to start at bar "copystartbar%
- IF copystartbar% = 0 THEN
- copystartbar% = holdbar% : copystartbeat% = holdbeat% : repeatposit$ = "y"
- ENDIF
- holdbar% = copystartbar%
- IF repeatposit$ = "y" THEN
- PRINT'" bar ";copystartbar%;" beat ";copystartbeat%;"?"
- PRINT" (for OK press 0, if not OK press X)"
- CASE GET$ OF
- WHEN"X","x" : PROCdoublestop
- OTHERWISE
- ENDCASE
- ELSE
- INPUT" beat "beats%
- ENDIF
- PROCalterbeats : copystartbeat% = beats%
- holdbeat% = copystartbeat%
- IF justone$ = "n" THEN
- PRINT'" Ending at bar "
- INPUT" (for last type 0) "copyendbar%
- IF copyendbar% > 0 THEN
- INPUT " beat "beats%
- PROCalterbeats : copyendbeat% = beats%
- ENDIF
- ELSE
- copyendbar% = copystartbar%
- copyendbeat% = copystartbeat%
- ENDIF
- :
- CLS
- PRINT'" On what percentage of occasions do you want a potential "
- PRINT" double-stop to be allowed? "
- INPUT'" (a) following a single-stop... "singlechance%
- INPUT'" (b) following a double-stop... "doublechance%
- :
- FOR run% = 0 TO 1
- IF run% = 0 THEN voice% = stringvoice% ELSE voice% = treatvoice%
- value% = (copystartbar%*10^3)+copystartbeat%
- IF value% <= array%(0,0,voice%)DIV10^3 THEN
- startatcell% = 0
- ELSE
- PROCsearch(value%)
- startatcell% = startcell%
- ENDIF
- IF copyendbar% = 0 THEN
- endatcell% = numusedcells%(voice%) - 1
- ELSE
- value% = (copyendbar%*10^3)+copyendbeat%
- IF value% >= array%(numusedcells%(voice%)-1,0,voice%)DIV10^3 THEN
- endatcell% = numusedcells%(voice%) - 1
- ELSE
- PROCsearch(value%)
- IF shunt$ = "N" THEN endatcell% = startcell% ELSE endatcell% = startcell% - 1
- ENDIF
- ENDIF
- :
- manyattacks% = endatcell% - startatcell% + 1
- REM create 'gap' between beat-of-bar and first actual attack
- carrybars% = (array%(startatcell%,0,voice%)DIV10^6)-copystartbar%
- carrybeats% = ((array%(startatcell%,0,voice%)DIV10^3)MOD10^3)-copystartbeat%
- attacks1%(0) = (carrybars%*960)+carrybeats%
- :
- IF copymove$ = "DS" THEN
- FOR count% = 0 TO (manyattacks%-1)
- IF count% > 0 THEN
- carrybars% = (array%(startatcell%+count%,0,voice%)DIV10^6)-(array%(startatcell%+count%-1,0,voice%)DIV10^6)
- carrybeats% = ((array%(startatcell%+count%,0,voice%)DIV10^3)MOD10^3)-((array%(startatcell%+count%-1,0,voice%)DIV10^3)MOD10^3)
- attacks1%(count%) = attacks1%(count%-1) + ((carrybars%*960)+carrybeats%)
- ENDIF
- :
- pitches%(count%) = array%(startatcell%+count%,0,voice%)MOD10^3
- IF run% = 0 THEN
- pitch% = pitches%(count%)
- PROCopenstgs
- ENDIF
- dur% = (array%(startatcell%+count%,1,voice%)DIV10)MOD10^3
- brrr% = array%(startatcell%+count%,0,voice%)DIV10^6 : PROCreconvertdur
- durations%(count%) = dur%
- amplitudes%(count%) = (array%(startatcell%+count%,1,voice%))MOD10
- envelopes%(count%) = (array%(startatcell%+count%,2,voice%))DIV10^2
- glissandos%(count%) = (array%(startatcell%+count%,1,voice%)DIV10^4)
- inflections%(count%) = array%(startatcell%+count%,2,voice%)MOD10^2
- NEXT
- ENDIF
- NEXT run%
- :
- :
- firstcutoff% = 0
- secondcutoff% = 0
- :
- FOR count% = 0 TO (manyattacks%-1)
- :
- REM determine state before making decision
- state$ = "tacet"
- IF firstcutoff% > attacks1%(count%) THEN state$ = "single1"
- IF secondcutoff% > attacks1%(count%) AND state$ = "tacet" THEN state$ = "single2"
- IF secondcutoff% > attacks1%(count%) AND state$ = "single1" THEN state$ = "double"
- :
- CASE state$ OF
- WHEN "tacet" :
- dsvoice%(count%) = firstvoice%
- firstcutoff% = attacks1%(count%) + durations%(count%)
- firstcount% = count%
- firststg% = openstgs%(count%)
- :
- WHEN "single1" :
- newstg$ = "nonadj"
- IF firststg% = openstgs%(count%) THEN newstg$ = "same"
- IF firststg% = (openstgs%(count%)-1) OR firststg% = (openstgs%(count%)+1) THEN newstg$ = "adj"
- :
- CASE newstg$ OF
- WHEN "same" :
- dsvoice%(count%) = firstvoice%
- firstcutoff% = attacks1%(count%) + durations%(count%)
- firststg% = openstgs%(count%)
- REM clip duration of interrupted note
- durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
- firstcount% = count%
- WHEN "adj" :
- PROCsingleprob
- IF ds$ = "n" THEN
- dsvoice%(count%) = firstvoice%
- firstcutoff% = attacks1%(count%) + durations%(count%)
- firststg% = openstgs%(count%)
- REM clip duration of interrupted note
- durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
- firstcount% = count%
- ELSE
- dsvoice%(count%) = secondvoice%
- secondcutoff% = attacks1%(count%) + durations%(count%)
- secondcount% = count%
- secondstg% = openstgs%(count%)
- ENDIF
- WHEN "nonadj" :
- dsvoice%(count%) = firstvoice%
- firstcutoff% = attacks1%(count%) + durations%(count%)
- firststg% = openstgs%(count%)
- REM clip duration of interrupted note and add slight 'rest'
- durations%(firstcount%) = attacks1%(count%) - (attacks1%(firstcount%)+60)
- IF durations%(firstcount%) <0 THEN durations%(firstcount%) = 1
- firstcount% = count%
- ENDCASE
- :
- WHEN "single2" :
- newstg$ = "nonadj"
- IF secondstg% = openstgs%(count%) THEN newstg$ = "same"
- IF secondstg% = (openstgs%(count%)-1) OR secondstg% = (openstgs%(count%)+1) THEN newstg$ = "adj"
- :
- CASE newstg$ OF
- WHEN "same" :
- dsvoice%(count%) = secondvoice%
- secondcutoff% = attacks1%(count%) + durations%(count%)
- secondstg% = openstgs%(count%)
- REM clip duration of interrupted note
- durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
- secondcount% = count%
- WHEN "adj" :
- PROCsingleprob
- IF ds$ = "n" THEN
- dsvoice%(count%) = secondvoice%
- secondcutoff% = attacks1%(count%) + durations%(count%)
- secondstg% = openstgs%(count%)
- REM clip duration of interrupted note
- durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
- secondcount% = count%
- ELSE
- dsvoice%(count%) = firstvoice%
- firstcutoff% = attacks1%(count%) + durations%(count%)
- firstcount% = count%
- firststg% = openstgs%(count%)
- ENDIF
- WHEN "nonadj" :
- dsvoice%(count%) = secondvoice%
- secondcutoff% = attacks1%(count%) + durations%(count%)
- secondstg% = openstgs%(count%)
- REM clip duration of interrupted note and add slight 'rest'
- durations%(secondcount%) = attacks1%(count%) - (attacks1%(secondcount%)+60)
- IF durations%(secondcount%) <0 THEN durations%(secondcount%) = 1
- secondcount% = count%
- ENDCASE
- :
- WHEN "double" :
- newstg$ = "nonadj"
- IF openstgs%(count%) = firststg% THEN newstg$ = "sameasfirst"
- IF openstgs%(count%) = secondstg% THEN newstg$ = "sameassecond"
- IF (openstgs%(count%) = (firststg%-1) OR openstgs%(count%) = (firststg%+1)) AND openstgs%(count%) <> secondstg% THEN newstg$ = "adjtofirst"
- IF (openstgs%(count%) = (secondstg%-1) OR openstgs%(count%) = (secondstg%+1)) AND openstgs%(count%) <> firststg% THEN newstg$ = "adjtosecond"
- :
- CASE newstg$ OF
- WHEN "sameasfirst" :
- PROCdoubleprob
- IF ds$ = "n" THEN
- dsvoice%(count%) = firstvoice%
- firstcutoff% = attacks1%(count%) + durations%(count%)
- firststg% = openstgs%(count%)
- REM clip durations of both interrupted notes
- durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
- firstcount% = count%
- durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
- secondcutoff% = attacks1%(secondcount%) + durations%(secondcount%)
- ELSE
- dsvoice%(count%) = firstvoice%
- firstcutoff% = attacks1%(count%) + durations%(count%)
- firststg% = openstgs%(count%)
- REM clip duration of interrupted note
- durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
- firstcount% = count%
- ENDIF
- WHEN "sameassecond" :
- PROCdoubleprob
- IF ds$ = "n" THEN
- dsvoice%(count%) = secondvoice%
- secondcutoff% = attacks1%(count%) + durations%(count%)
- secondstg% = openstgs%(count%)
- REM clip durations of both interrupted notes
- durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
- secondcount% = count%
- durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
- firstcutoff% = attacks1%(firstcount%) + durations%(firstcount%)
- ELSE
- dsvoice%(count%) = secondvoice%
- secondcutoff% = attacks1%(count%) + durations%(count%)
- secondstg% = openstgs%(count%)
- REM clip duration of interrupted note
- durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
- secondcount% = count%
- ENDIF
- WHEN "adjtofirst" :
- PROCdoubleprob
- IF ds$ = "n" THEN
- dsvoice%(count%) = firstvoice%
- firstcutoff% = attacks1%(count%) + durations%(count%)
- firststg% = openstgs%(count%)
- REM clip durations of both interrupted notes
- durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
- firstcount% = count%
- durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
- secondcutoff% = attacks1%(secondcount%) + durations%(secondcount%)
- ELSE
- dsvoice%(count%) = secondvoice%
- secondcutoff% = attacks1%(count%) + durations%(count%)
- secondstg% = openstgs%(count%)
- REM clip duration of interrupted note
- durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
- secondcount% = count%
- ENDIF
- WHEN "adjtosecond" :
- PROCdoubleprob
- IF ds$ = "n" THEN
- dsvoice%(count%) = secondvoice%
- secondcutoff% = attacks1%(count%) + durations%(count%)
- secondstg% = openstgs%(count%)
- REM clip durations of both interrupted notes
- durations%(secondcount%) = attacks1%(count%) - attacks1%(secondcount%)
- secondcount% = count%
- durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
- firstcutoff% = attacks1%(firstcount%) + durations%(firstcount%)
- ELSE
- dsvoice%(count%) = firstvoice%
- firstcutoff% = attacks1%(count%) + durations%(count%)
- firststg% = openstgs%(count%)
- REM clip duration of interrupted note
- durations%(firstcount%) = attacks1%(count%) - attacks1%(firstcount%)
- firstcount% = count%
- ENDIF
- WHEN "nonadj" :
- dsvoice%(count%) = firstvoice%
- firstcutoff% = attacks1%(count%) + durations%(count%)
- firststg% = openstgs%(count%)
- REM clip durations of both interrupted notes and add 'rests'
- durations%(firstcount%) = attacks1%(count%) - (attacks1%(firstcount%)+60)
- IF durations%(firstcount%) <0 THEN durations%(firstcount%) = 1
- firstcount% = count%
- durations%(secondcount%) = attacks1%(count%) - (attacks1%(secondcount%)+60)
- IF durations%(secondcount%) <0 THEN durations%(secondcount%) = 1
- secondcutoff% = attacks1%(secondcount%) + durations%(secondcount%)
- ENDCASE
- :
- ENDCASE
- :
- NEXT
- :
- :
- numpitches% = manyattacks% : method$ = "raw" : copyit$ = "ON" : justone$ = "n"
- : repeatposit$ = "n" : reordered$ = "n" : equalized$ = "n" : rhythmicized$ = "n"
- :
- : startat% = (copystartbar%*(10^3))+copystartbeat%
- attacks2%() = attacks1%()
- :
- attacks2%() = attacks2%() + (startat% MOD 10^3) : REM moves attacks further up bar, if necc
- :
- attacks3%() = attacks2%()
- FOR count% = 0 TO (manyattacks%-1)
- attacks3%(count%) = attacks3%(count%) DIV 960
- NEXT
- REM gives list of bar mos starting at 0
- :
- attacks3%() = attacks3%() * 960
- attacks2%() = attacks2%() - attacks3%()
- attacks3%() = attacks3%() / 960
- REM list of actual beat numbers
- :
- attacks3%() = attacks3%() + (startat% DIV 10^3) : REM list of actual bar nos
- :
- attacks3%() = attacks3%()*(10^3)
- attacks2%() = attacks2%() + attacks3%()
- REM list of actual bar/beat numbers
- :
- :
- addingnotes$ = "y"
- :
- FOR counter% = 0 TO (manyattacks%-1)
- voice% = dsvoice%(counter%)
- PROCnewnotereception(voice%, (attacks2%(counter%)DIV10^3), (attacks2%(counter%)MOD10^3), pitches%(counter%), amplitudes%(counter%), envelopes%(counter%), durations%(counter%), glissandos%(counter%), inflections%(counter%))
- NEXT
- :
- copyit$ = "OFF" : displayedfunc$ = "n" : PROCdisplay
- :
- ENDPROC
- :
- REM******************************************************************
- :
- DEF PROCopenstgs
- :
- CASE member$ OF
- WHEN "violin" :
- CASE pitch% OF
- WHEN 255 : openstgs%(count%) = 1
- WHEN 554 : openstgs%(count%) = 2
- WHEN 154 : openstgs%(count%) = 3
- WHEN 453 : openstgs%(count%) = 4
- OTHERWISE
- VDU 7 : PRINT "NOT AN OPEN STRING"
- PRINT "press C to continue"
- CASE GET$ OF
- ENDCASE
- PROCdoublestop
- ENDCASE
- :
- WHEN "viola" :
- CASE pitch% OF
- WHEN 554 : openstgs%(count%) = 1
- WHEN 154 : openstgs%(count%) = 2
- WHEN 453 : openstgs%(count%) = 3
- WHEN 53 : openstgs%(count%) = 4
- OTHERWISE
- VDU 7 : PRINT "NOT AN OPEN STRING"
- PRINT "press C to continue"
- CASE GET$ OF
- ENDCASE
- PROCdoublestop
- ENDCASE
- :
- WHEN "cello" :
- CASE pitch% OF
- WHEN 553 : openstgs%(count%) = 1
- WHEN 153 : openstgs%(count%) = 2
- WHEN 452 : openstgs%(count%) = 3
- WHEN 52 : openstgs%(count%) = 4
- OTHERWISE
- VDU 7 : PRINT "NOT AN OPEN STRING"
- PRINT "press C to continue"
- CASE GET$ OF
- ENDCASE
- PROCdoublestop
- ENDCASE
- :
- WHEN "bass" :
- CASE pitch% OF
- WHEN 452 : openstgs%(count%) = 1
- WHEN 152 : openstgs%(count%) = 2
- WHEN 551 : openstgs%(count%) = 3
- WHEN 251 : openstgs%(count%) = 4
- OTHERWISE
- VDU 7 : PRINT "NOT AN OPEN STRING"
- PRINT "press C to continue"
- CASE GET$ OF
- ENDCASE
- PROCdoublestop
- ENDCASE
- :
- ENDCASE
- :
- ENDPROC
- :
- REM****************************************************
- :
- DEF PROCsingleprob
- :
- number% = RND(100)
- IF number% > 0 AND number% <= singlechance% THEN
- ds$ = "y"
- ELSE
- ds$ = "n"
- ENDIF
- ENDPROC
- :
- REM***************************************************
- :
- DEF PROCdoubleprob
- :
- number% = RND(100)
- IF number% > 0 AND number% <= doublechance% THEN
- ds$ = "y"
- ELSE
- ds$ = "n"
- ENDIF
- ENDPROC
- :
- REM***************************************************
- :
- DEF PROCsamepitches
- :
- PRINT' " Note name for pitch is ";
- COLOUR 1
- CASE GET$ OF
- WHEN "C","c" : note% = 0 : PRINT "C"
- WHEN "D","d" : note% = 1 : PRINT "D"
- WHEN "E","e" : note% = 2 : PRINT "E"
- WHEN "F","f" : note% = 3 : PRINT "F"
- WHEN "G","g" : note% = 4 : PRINT "G"
- WHEN "A","a" : note% = 5 : PRINT "A"
- WHEN "B","b" : note% = 6 : PRINT "B"
- ENDCASE
- COLOUR 0
- PRINT " accidental ";
- COLOUR 1
- CASE GET$ OF
- WHEN "1" : accid% = 1 : PRINT "flat"
- WHEN "2" : accid% = 2 : PRINT "3/8flat"
- WHEN "3" : accid% = 3 : PRINT "1/4flat"
- WHEN "4" : accid% = 4 : PRINT "1/8flat"
- WHEN "5" : accid% = 5 : PRINT "nat"
- WHEN "6" : accid% = 6 : PRINT "1/8shrp"
- WHEN "7" : accid% = 7 : PRINT "1/4shrp"
- WHEN "8" : accid% = 8 : PRINT "3/8shrp"
- WHEN "9" : accid% = 9 : PRINT "shrp"
- ENDCASE
- COLOUR 0
- PRINT " octave ";
- COLOUR 1
- CASE GET$ OF
- WHEN "0" : octave% = 0 : PRINT "0"
- WHEN "1" : octave% = 1 : PRINT "1"
- WHEN "2" : octave% = 2 : PRINT "2"
- WHEN "3" : octave% = 3 : PRINT "3"
- WHEN "4" : octave% = 4 : PRINT "4"
- WHEN "5" : octave% = 5 : PRINT "5"
- WHEN "6" : octave% = 6 : PRINT "6"
- WHEN "7" : octave% = 7 : PRINT "7"
- WHEN "8" : octave% = 8 : PRINT "8"
- ENDCASE
- COLOUR 0
- FOR count% = 0 TO numpitches% - 1
- pitches%(count%) = (note%*100)+(accid%*10)+octave%
- NEXT
- :
- firstpitch$ = "n" : prevnumpitches% = numpitches%
- REM function can feed pitches similarly into pitches%
- :
- PROCinsertpitches
- :
- ENDPROC
- :
- REM*************************************************
- :
- DEF PROCedit
- :
- PROCwindow(20,60,58,39)
- PRINT ' " move 1st envelope point E"
- PRINT ' " move 2nd envelope point R"
- PRINT ' " change 1st amplitude A"
- PRINT ' " change 2nd amplitude S"
- PRINT ' " change 3rd amplitude D"
- PRINT ' " change 4th amplitude F"
- PRINT ' " move note+following note N"
- PRINT ' " move note+drag previous duration M"
- PRINT ' " change duration C"
- PRINT ' " then Shift + < OR >"
- CASE GET$ OF
- WHEN "E", "e" : editwhat$ = "1stenvelope"
- WHEN "R", "r" : editwhat$ = "2ndenvelope"
- WHEN "A", "a" : editwhat$ = "1stamplitude"
- WHEN "S", "s" : editwhat$ = "2ndamplitude"
- WHEN "D", "d" : editwhat$ = "3rdamplitude"
- WHEN "F", "f" : editwhat$ = "4thamplitude"
- WHEN "N", "n" : editwhat$ = "movetwo"
- WHEN "M", "m" : editwhat$ = "move&drag"
- WHEN "C", "c" : editwhat$ = "duration"
- ENDCASE
- PROCdisplay
- ENDPROC
- :
- REM*************************************************
- :
- DEF PROCconvertoldenvelopes
- :
- REM When a/dal niente was introduced, notes with amp2%=0 had to display an envelope
- REM whereas previously amp2%=0 meant "no envelope"
- REM Consequently files predating this change now undesirably display "no envelope" notes as single-phase "dim a niente" notes
- REM To update the old files, use this proc to give a value amp2%=9 to all notes
- PROCwindow(20,60,68,45)
- PRINT' " Do you want to convert all the envelopes"
- PRINT" in the file back to 0 phase envelopes?"
- CASE GET$ OF
- WHEN "Y", "y" :
- FOR voice% = 0 TO (numparts%-1)
- :
- FOR count% = 0 TO numusedcells%(voice%)-1
- number% = array%(count%,2,voice%) DIV 10^2
- array%(count%,2,voice%) = array%(count%,2,voice%) - (number%*100)
- array%(count%,2,voice%) = array%(count%,2,voice%) + 900
- NEXT
- :
- NEXT
- PROCdisplay
- OTHERWISE PROCdisplay
- ENDCASE
- ENDPROC
- :
- REM************************************************
- :
- DEF PROCkeyboardshortcuts
- :
- PROCwindow(2,68,97,2)
- :
- PRINT ' " Menu M Accel/rit by total duration T"
- PRINT ' " Display options O Accel/rit by start/end points E"
- PRINT ' " Move down 1, 3/10, x many, 50 v/vv/vx/v0 Accel/rit between adjacent notes F"
- PRINT ' " Move up 1, 3/10, x many, 50 ^/^^/^x/^0 Starting note for F above 1,2,3..."
- PRINT ' " Move left </<</<9 Random number/with same values n/N"
- PRINT ' " Move right >/>>/>9 Group of durations U"
- PRINT ' " Go to bar B Quickplay top x voices (see M-V-Q) P"
- PRINT ' " Go to SECTION S Quickplay 2nd voice only ;"
- PRINT ' " Display x number of bars D Quickplay 3rd voice only /"
- PRINT ' " Double number of bars + Quickplay top x voices, screen only ^P"
- PRINT ' " Halve number of bars - Quickplay 2nd voice, screen only :"
- PRINT ' " Quick display Q Quickplay 3rd voice, screem only ?"
- PRINT ' " Prev Quick/Quick/Ord Display W Replay R"
- PRINT ' " Top remarks left/right [/] Slavevoice function L"
- PRINT ' " Bottom remarks left/right '/# Edit envelope voice 1, note 1,2,3... ^QWER..."
- PRINT ' " [free keystroke] ~ Edit envelope voice 2, note 1,2,3... ^ASDF..."
- PRINT ' " [free keystroke] @ Edit envelope voice 3, note 1,2,3... ^ZXCV..."
- PRINT ' " Hard copy H Enter last value again Return"
- PRINT ' " Name staves ^V Import ^I"
- PRINT ' " Accel/rit A Group of attacks 0"
- PRINT ' " Group of amplitudes l Group of envelopes J"
- PRINT ' " Show keyboard shortcuts K Move a passage \"
- PRINT ' " Distort attacks/pitches `/`` Move one note ^\"
- PRINT ' " Increment calculator C Copy one note Z"
- PRINT ' " Group of pitches Y Copy a passage X"
- PRINT ' " Copy note x down 1/x stave(s)^x/^xx Quickdisplay x voices 1,2,3..."
- PRINT ' " Delete note 1/x top stave ^O/^Ox Delete sim middle/bottom staves ^K/^M"
- PRINT ' " [free keystroke] # Extract I"
- PRINT ' " Fill gaps with durations G Copy successive voices to same voice S"
- PRINT ' " Add 0/10/20 to copying down [/]/' Input screen voice Return 1/2/3 times"
- PRINT ' " Display all voices ^= Display from which voice down ¬"
- PRINT ' " Quick copy on { Quick copy off }"
- PRINT ' " (press a key to continue)"
- CASE GET$ OF
- WHEN "c", "C" :
- PROCdisplay
- OTHERWISE
- PROCdisplay
- ENDCASE
- :
- ENDPROC
- :
- REM***************************************************************************************
- :
- DEF PROCmoveback
- :
- INPUT " Move back by how many bars "backbybars%
- INPUT " and how many beats "backby%
- backby% = backby%+(backbybars%*960)
- :
- IF backby% = 0 THEN
- COLOUR 1 : PRINT' holdbackby%;"?"
- CASE GET$ OF
- WHEN "N","n" : COLOUR 0 : PROCmoveback
- OTHERWISE backby% = holdbackby%
- ENDCASE
- COLOUR 0
- ENDIF
- :
- holdbackby% = backby%
- beats% = beats% - backby%
- REPEAT
- IF beats% < 0 THEN
- REPEAT
- beats% = 960 + beats%
- bars% -= 1
- UNTIL beats% >= 0
- ENDIF
- :
- ENDPROC
- :
- REM******************************************************************************************
- :
- DEF PROCmoveforward
- :
- INPUT " Move forward by how many bars "backbybars%
- INPUT " and how many beats "backby%
- backby% = backby%+(backbybars%*960)
- :
- IF backby% = 0 THEN
- COLOUR 1 : PRINT' holdbackby%;"?"
- CASE GET$ OF
- WHEN "N","n" : COLOUR 0 : PROCmoveforward
- OTHERWISE backby% = holdbackby%
- ENDCASE
- COLOUR 0
- ENDIF
- :
- holdbackby% = backby%
- beats% = beats% + backby%
- REPEAT
- IF beats% > 960 THEN
- REPEAT
- beats% = beats% - 960
- bars% += 1
- UNTIL beats% <= 960
- ENDIF
- :
- ENDPROC
- :
- REM******************************************************************************************
- :
- DEF PROCpitchstring3
- :
- PROCwindow(20,69,60,55)
- PRINT'" Return a random pitch-class having"
- PRINT" pre-defined its probability "
- PRINT'" Use previous shares or re-define (P/R)? "
- CASE GET$ OF
- WHEN "r","R" :
- :
- totalshares% = 0
- INPUT '" C nat has how many shares "many%
- cnat% = 0 + many% : totalshares% += many%
- INPUT '" C sharp has how many shares "many%
- cshrp% = cnat% + many% : totalshares% += many%
- INPUT '" D nat has how many shares "many%
- dnat% = cshrp% + many% : totalshares% += many%
- INPUT '" D sharp has how many shares "many%
- dshrp% = dnat% + many% : totalshares% += many%
- INPUT '" E nat has how many shares "many%
- enat% = dshrp% + many% : totalshares% += many%
- INPUT '" F nat has how many shares "many%
- fnat% = enat% + many% : totalshares% += many%
- INPUT '" F sharp has how many shares "many%
- fshrp% = fnat% + many% : totalshares% += many%
- INPUT '" G nat has how many shares "many%
- gnat% = fshrp% + many% : totalshares% += many%
- INPUT '" G sharp has how many shares "many%
- gshrp% = gnat% + many% : totalshares% += many%
- INPUT '" A nat has how many shares "many%
- anat% = gshrp% + many% : totalshares% += many%
- INPUT '" A sharp has how many shares "many%
- ashrp% = anat% + many% : totalshares% += many%
- INPUT '" B nat has how many shares "many%
- bnat% = ashrp% + many% : totalshares% += many%
- OTHERWISE
- ENDCASE
- throw% = RND(totalshares%)
- IF throw% > 0 AND throw% <= cnat% THEN note$ = "C nat"
- IF throw% > cnat% AND throw% <= cshrp% THEN note$ = "C sharp"
- IF throw% > cshrp% AND throw% <= dnat% THEN note$ = "D nat"
- IF throw% > dnat% AND throw% <= dshrp% THEN note$ = "D sharp"
- IF throw% > dshrp% AND throw% <= enat% THEN note$ = "E nat"
- IF throw% > enat% AND throw% <= fnat% THEN note$ = "F nat"
- IF throw% > fnat% AND throw% <= fshrp% THEN note$ = "F sharp"
- IF throw% > fshrp% AND throw% <= gnat% THEN note$ = "G nat"
- IF throw% > gnat% AND throw% <= gshrp% THEN note$ = "G sharp"
- IF throw% > gshrp% AND throw% <= anat% THEN note$ = "A nat"
- IF throw% > anat% AND throw% <= ashrp% THEN note$ = "A sharp"
- IF throw% > ashrp% AND throw% <= bnat% THEN note$ = "B nat"
- PRINT ''" note = ";note$
- PRINT '" use this? "
- CASE GET$ OF
- WHEN "n","N" :
- PROCpitchstring3
- OTHERWISE
- ENDCASE
- INPUT'" which octave "octave%
- IF octave% > 0 THEN sameoctave% = octave%
- IF octave% = 0 THEN octave% = sameoctave%
- CASE note$ OF
- WHEN "C nat" : note% = 0 : accid% = 5 : octave% = octave%
- WHEN "C sharp" : note% = 0 : accid% = 9 : octave% = octave%
- WHEN "D nat" : note% = 1 : accid% = 5 : octave% = octave%
- WHEN "D sharp" : note% = 1 : accid% = 9 : octave% = octave%
- WHEN "E nat" : note% = 2 : accid% = 5 : octave% = octave%
- WHEN "F nat" : note% = 3 : accid% = 5 : octave% = octave%
- WHEN "F sharp" : note% = 3 : accid% = 9 : octave% = octave%
- WHEN "G nat" : note% = 4 : accid% = 5 : octave% = octave%
- WHEN "G sharp" : note% = 4 : accid% = 9 : octave% = octave%
- WHEN "A nat" : note% = 5 : accid% = 5 : octave% = octave%
- WHEN "A sharp" : note% = 5 : accid% = 9 : octave% = octave%
- WHEN "B nat" : note% = 6 : accid% = 5 : octave% = octave%
- ENDCASE
- numpitches% = 1 : pitches%(0) = (note%*100)+(accid%*10)+octave%
- PROCinsertpitches
- :
- ENDPROC
- :
- REM******************************************************************
- :
- DEF PROCincrementcalc
- :
- PROCwindow(15,71,89,45)
- CLS
- :
- PRINT'" As it is written, Accel/Rit allows no.attacks and rate"
- PRINT" to be defined in one mode, or start/finish durs in the other"
- PRINT" but not start dur AND a defined rate together (and just to"
- PRINT" complicate things, the resultant rate in fact varies in different"
- PRINT" contexts). If you want, say, a closely defined quickend and"
- PRINT" also a closely defined rate of rit, to get this in accel/Rit"
- PRINT" you will also need to know IN ADVANCE what the end dur will be"
- PRINT" so as to input this when using Accel/Rit in its second mode."
- PRINT" The proceedure below is for finding precisely this."
- :
- count% = 1
- INPUT'" First type the start duration "value
- PRINT'" then the arithmetic rate of increment (not the Accel/Rit rate)"
- INPUT" as a decimal number "factor
- total% = value
- INPUT'" and finally the total duration "reqtotal%
- PRINT'" (then press a key for successive increments)"
- PRINT'count%;". duration = ";value;" total = ";total%
- REPEAT
- CASE GET$ OF
- OTHERWISE
- count% += 1
- value = value * factor
- total% = total% + value
- gap% = reqtotal% - total%
- value% = value DIV 1
- PRINT'count%;". duration = ";value%;" total = ";total%;" (";gap%;" short of required total)"
- ENDCASE
- UNTIL gap% <0
- :
- PRINT'" (to return to display press F)"
- REPEAT
- key$ = GET$
- IF key$ = "f" THEN PROCdisplay ELSE VDU 7
- UNTIL key$ = "f"
- ENDPROC
- :
- REM*********************************************************************************
- :
- DEF PROCchangeclef
- :
- PROCwindow(20,69,65,55)
- INPUT'" Change clef for which voice "itsvoice%
- INPUT'" How many staves does this voice have "numstaves$
- PRINT'" And what is/are its clefs (P/T/B/D or"
- INPUT" PP/PT etc.) "clef$
- :
- insts$(itsvoice%,2) = numstaves$
- insts$(itsvoice%,1) = clef$
- :
- ENDPROC
- :
- REM**********************************************************************************
- :
- DEF PROCrandomassign
- :
- CLS
- INPUT'" between voice (for 1 press 0) "first%
- IF first% = 0 THEN firs% = 1
- INPUT'" and voice (for last press 0) "last%
- IF last% = 0 THEN last% = numparts%
- :
- INPUT '" using how many of the 19 voices "no%
- taken%() = 0
- :
- FOR count% = 1 TO no%
- result$ = "failure"
- REPEAT
- voice% = RND(19)
- IF taken%(voice%) = 0 THEN
- taken%(voice%) = 1
- result$ = "success"
- ENDIF
- UNTIL result$ = "success"
- NEXT
- :
- FOR count% = first% TO last%
- REPEAT
- x% = RND(19)
- UNTIL taken%(x%) = 1
- :
- CASE x% OF
- WHEN 1 : IF type$ = "drums" THEN waveforms$(count%) = "Timpani" ELSE waveforms$(count%) = "RecorderGb"
- WHEN 2 : IF type$ = "drums" THEN waveforms$(count%) = "TimpCresBb" ELSE waveforms$(count%) = "PiccoloE"
- WHEN 3 : IF type$ = "drums" THEN waveforms$(count%) = "TimpRollEb" ELSE waveforms$(count%) = "SaxSoprnoE"
- WHEN 4 : IF type$ = "drums" THEN waveforms$(count%) = "TimpLowBb" ELSE waveforms$(count%) = "SaxEbBarC"
- WHEN 5 : IF type$ = "drums" THEN waveforms$(count%) = "BassDrum" ELSE waveforms$(count%) = "SaxBbTenrE"
- WHEN 7 : IF type$ = "drums" THEN waveforms$(count%) = "BDGatedRev" ELSE waveforms$(count%) = "BugleC"
- WHEN 8 : IF type$ = "drums" THEN waveforms$(count%) = "BDMarching" ELSE waveforms$(count%) = "Trombone1"
- WHEN 9 : IF type$ = "drums" THEN waveforms$(count%) = "BDPiloMute" ELSE waveforms$(count%) = "Trumpet"
- WHEN 10 : IF type$ = "drums" THEN waveforms$(count%) = "CongaHi" ELSE waveforms$(count%) = "EngHornGb"
- WHEN 11 : IF type$ = "drums" THEN waveforms$(count%) = "CongaMid" ELSE waveforms$(count%) = "ClarinetBb"
- WHEN 12 : IF type$ = "drums" THEN waveforms$(count%) = "CongaSmCl" ELSE waveforms$(count%) = "ClarVibEb"
- WHEN 14 : IF type$ = "drums" THEN waveforms$(count%) = "ElecTom1" ELSE waveforms$(count%) = "BassoonEb"
- WHEN 16 : IF type$ = "drums" THEN waveforms$(count%) = "RotoTomRev" ELSE waveforms$(count%) = "FlugelHnEb"
- WHEN 15 : IF type$ = "drums" THEN waveforms$(count%) = "SimmonsBD1" ELSE waveforms$(count%) = "CornetEb"
- WHEN 13 : IF type$ = "drums" THEN waveforms$(count%) = "Snare" ELSE waveforms$(count%) = "TubaGb"
- WHEN 6 : IF type$ = "drums" THEN waveforms$(count%) = "SnareEcho" ELSE waveforms$(count%) = "BassBowAb"
- WHEN 17 : IF type$ = "drums" THEN waveforms$(count%) = "SynTom" ELSE waveforms$(count%) = "JapFlute"
- WHEN 18 : IF type$ = "drums" THEN waveforms$(count%) = "TablaHi" ELSE waveforms$(count%) = "EnsWodAb45"
- WHEN 19 : IF type$ = "drums" THEN waveforms$(count%) = "Tomtom1" ELSE waveforms$(count%) = "Bass"
- ENDCASE
- NEXT
- :
- PROCwindow(20,72,83,25)
- VDU 14
- PRINT'" Current assignations are now "
- PRINT " (press Ctrl-Shift to scroll down) "
- FOR count% = 1 TO numparts%
- IF waveforms$(count%) <> "" THEN
- PRINT'" voice ";count%;
- IF insts$(count%,0)<> "" THEN PRINT " (";insts$(count%,0);")";
- PRINT " - ";waveforms$(count%)
- ENDIF
- NEXT
- VDU 15
- PRINT'" Do you want to keep these, reassign,"
- PRINT " use WaveSynth-Beep defaults, "
- PRINT " randomly assign sustaining/dry instruments/drums "
- PRINT " to all staves, or assign in groups "
- PRINT " (K/R/W/S/D/M/G) "
- CASE GET$ OF
- WHEN "R","r" : defaultvoices$ = "n" : PROCassignvoices : PROCdisplay
- WHEN "W","w" : defaultvoices$ = "y" : PROCassignvoices : PROCdisplay
- WHEN "K","k" : defaultvoices$ = "n" : PROCdisplay
- WHEN "S","s" : defaultvoices$ = "n" : type$ = "sustaining" : PROCrandomassign : PROCdisplay
- WHEN "M","m" : defaultvoices$ = "n" : type$ = "drums" : PROCrandomassign : PROCdisplay
- WHEN "D","d" : defaultvoices$ = "n" : PROCrandomdry : PROCdisplay
- WHEN "G","g" : defaultvoices$ = "n" : PROCgroupassign : PROCdisplay
- ENDCASE
- :
- ENDPROC
- :
- REM************************************************************************8
- :
- DEF PROCrandomdry
- :
- CLS
- PRINT'" Group A = 'ch' sounds "
- PRINT " Group B = 'donk' sounds "
- PRINT " Group C = pizz sounds "
- PRINT'" Select a group or to mix A+B press D, to mix A+C press E "
- PRINT " to mix B+C press F, or to mix all three press G "
- CASE GET$ OF
- WHEN "A","a" : choice$ = "A"
- WHEN "B","b" : choice$ = "B"
- WHEN "C","c" : choice$ = "C"
- WHEN "D","d" : choice$ = "D"
- WHEN "E","e" : choice$ = "E"
- WHEN "F","f" : choice$ = "F"
- OTHERWISE choice$ = "G"
- ENDCASE
- :
- INPUT'" between voice (for first press 0) "first%
- IF first% = 0 THEN first% = 1
- INPUT'" and voice (for last press 0) "last%
- IF last% = 0 THEN last% = numparts%
- :
- FOR count% = first% TO last%
- waveforms$(count%) = "empty"
- NEXT
- :
- FOR count% = first% TO last%
- :
- REPEAT
- x% = RND(19)
- :
- CASE x% OF
- WHEN 1 : IF choice$ = "A" OR choice$ = "D" OR choice$ = "E" OR choice$ = "G" THEN waveforms$(count%) = "GuiroFast"
- WHEN 2 : IF choice$ = "A" OR choice$ = "D" OR choice$ = "E" OR choice$ = "G" THEN waveforms$(count%) = "Cachichi1"
- WHEN 3 : IF choice$ = "A" OR choice$ = "D" OR choice$ = "E" OR choice$ = "G" THEN waveforms$(count%) = "Cabasa"
- WHEN 4 : IF choice$ = "A" OR choice$ = "D" OR choice$ = "E" OR choice$ = "G" THEN waveforms$(count%) = "HiHat"
- WHEN 5 : IF choice$ = "A" OR choice$ = "D" OR choice$ = "E" OR choice$ = "G" THEN waveforms$(count%) = "HiHatFoot"
- WHEN 7 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "TablaHi"
- WHEN 8 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "Clave"
- WHEN 9 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "AgogoWood"
- WHEN 10 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "CongaHi"
- WHEN 11 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "CowBell"
- WHEN 12 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" waveforms$(count%) = "AgogoAfric"
- WHEN 14 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "Vibe"
- WHEN 16 : IF choice$ = "B" OR choice$ = "D" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "Xylophone"
- WHEN 15 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "AcouBass"
- WHEN 13 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "AcuBassAb1"
- WHEN 6 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "AcGuitar1"
- WHEN 17 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "Bass"
- WHEN 18 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "AcouGtr2B"
- WHEN 19 : IF choice$ = "C" OR choice$ = "E" OR choice$ = "F" OR choice$ = "G" THEN waveforms$(count%) = "GtrDobroB"
- REM another possibility is Harp1
- ENDCASE
- :
- UNTIL waveforms$(count%) <> "empty"
- :
- NEXT
- :
- PROCwindow(20,72,83,25)
- VDU 14
- PRINT'" Current assignations are now "
- PRINT " (press Ctrl-Shift to scroll down) "
- FOR count% = 1 TO numparts%
- IF waveforms$(count%) <> "" THEN
- PRINT'" voice ";count%;
- IF insts$(count%,0)<> "" THEN PRINT " (";insts$(count%,0);")";
- PRINT " - ";waveforms$(count%)
- ENDIF
- NEXT
- VDU 15
- PRINT'" Do you want to keep these, reassign,"
- PRINT " use WaveSynth-Beep defaults, "
- PRINT " randomly assign sustaining/dry instruments/drums "
- PRINT " to all staves, or assign in groups "
- PRINT " (K/R/W/S/D/M/G) "
- CASE GET$ OF
- WHEN "R","r" : defaultvoices$ = "n" : PROCassignvoices : PROCdisplay
- WHEN "W","w" : defaultvoices$ = "y" : PROCassignvoices : PROCdisplay
- WHEN "K","k" : defaultvoices$ = "n" : PROCdisplay
- WHEN "S","s" : defaultvoices$ = "n" : type$ = "sustaining" : PROCrandomassign : PROCdisplay
- WHEN "M","m" : defaultvoices$ = "n" : type$ = "drums" : PROCrandomassign : PROCdisplay
- WHEN "D","d" : defaultvoices$ = "n" : PROCrandomdry : PROCdisplay
- WHEN "G","g" : defaultvoices$ = "n" : PROCgroupassign : PROCdisplay
- ENDCASE
- :
- ENDPROC
- :
- REM***********************************************************************************
- :
- DEF PROCgroupassign
- :
- CLS
- PRINT'" Groups of voices ranging downwards are to "
- PRINT " take the waveform of the first in the group "
- INPUT " in batches of how many voices "gap%
- INPUT'" To apply between voice "low%
- INPUT " and voice "high%
- :
- FOR count% = 1 TO numparts%
- :
- IF count% >= low% AND count% <= high% THEN
- :
- x% = 0
- REPEAT
- :
- IF count% > (low%+(gap%*x%)) AND count% < (low%+(gap%*(x%+1))) THEN
- number% = low%+(gap%*x%)
- waveforms$(count%) = waveforms$(number%)
- ENDIF
- :
- x% = x%+1
- UNTIL (low%+(gap%*x%)) > high%
- :
- ENDIF
- :
- NEXT
- :
- PROCwindow(20,72,83,25)
- VDU 14
- PRINT'" Current assignations are now "
- PRINT " (press Ctrl-Shift to scroll down) "
- FOR count% = 1 TO numparts%
- IF waveforms$(count%) <> "" THEN
- PRINT'" voice ";count%;
- IF insts$(count%,0)<> "" THEN PRINT " (";insts$(count%,0);")";
- PRINT " - ";waveforms$(count%)
- ENDIF
- NEXT
- VDU 15
- PRINT'" Do you want to keep these, reassign,"
- PRINT " use WaveSynth-Beep defaults, "
- PRINT " randomly assign sustaining/dry instruments "
- PRINT " to all staves, or assign in groups "
- PRINT " (K/R/W/S/D/G) "
- CASE GET$ OF
- WHEN "R","r" : defaultvoices$ = "n" : PROCassignvoices : PROCdisplay
- WHEN "W","w" : defaultvoices$ = "y" : PROCassignvoices : PROCdisplay
- WHEN "K","k" : defaultvoices$ = "n" : PROCdisplay
- WHEN "S","s" : defaultvoices$ = "n" : PROCrandomassign : PROCdisplay
- WHEN "D","d" : defaultvoices$ = "n" : PROCrandomdry : PROCdisplay
- WHEN "G","g" : defaultvoices$ = "n" : PROCgroupassign : PROCdisplay
- ENDCASE
- :
- ENDPROC
- :
- REM***********************************************************************************
- :
- DEF PROCpitchstring4
- :
- CLS
- INPUT'" How many attacks "many%
- PRINT'" the first note is ";
- COLOUR 1
- CASE GET$ OF
- WHEN "c" : note1% = 0 : PRINT "C"
- WHEN "d" : note1% = 1 : PRINT "D"
- WHEN "e" : note1% = 2 : PRINT "E"
- WHEN "f" : note1% = 3 : PRINT "F"
- WHEN "g" : note1% = 4 : PRINT "G"
- WHEN "a" : note1% = 5 : PRINT "A"
- WHEN "b" : note1% = 6 : PRINT "B"
- ENDCASE
- COLOUR 0
- PRINT " accidental ";
- COLOUR 1
- CASE GET$ OF
- WHEN "1" : accid1% = 1 : PRINT " flat"
- WHEN "2" : accid1% = 2 : PRINT " 3/8 flat"
- WHEN "3" : accid1% = 3 : PRINT " 1/4 flat"
- WHEN "4" : accid1% = 4 : PRINT " 1/8 flat"
- WHEN "5" : accid1% = 5 : PRINT " natural"
- WHEN "6" : accid1% = 6 : PRINT " 1/8 sharp"
- WHEN "7" : accid1% = 7 : PRINT " 1/4 sharp"
- WHEN "8" : accid1% = 8 : PRINT " 3/8 sharp"
- WHEN "9" : accid1% = 9 : PRINT " sharp"
- ENDCASE
- COLOUR 0
- PRINT " octave ";
- COLOUR 1
- CASE GET$ OF
- WHEN "1" : octave1% = 1 : PRINT " octave 1"
- WHEN "2" : octave1% = 2 : PRINT " octave 2"
- WHEN "3" : octave1% = 3 : PRINT " octave 3"
- WHEN "4" : octave1% = 4 : PRINT " octave 4"
- WHEN "5" : octave1% = 5 : PRINT " octave 5"
- WHEN "6" : octave1% = 6 : PRINT " octave 6"
- WHEN "7" : octave1% = 7 : PRINT " octave 7"
- WHEN "8" : octave1% = 8 : PRINT " octave 8"
- ENDCASE
- COLOUR 0
- PRINT'" and the second note is ";
- COLOUR 1
- CASE GET$ OF
- WHEN "c" : note2% = 0 : PRINT "C"
- WHEN "d" : note2% = 1 : PRINT "D"
- WHEN "e" : note2% = 2 : PRINT "E"
- WHEN "f" : note2% = 3 : PRINT "F"
- WHEN "g" : note2% = 4 : PRINT "G"
- WHEN "a" : note2% = 5 : PRINT "A"
- WHEN "b" : note2% = 6 : PRINT "B"
- ENDCASE
- COLOUR 0
- PRINT " accidental ";
- COLOUR 1
- CASE GET$ OF
- WHEN "1" : accid2% = 1 : PRINT " flat"
- WHEN "2" : accid2% = 2 : PRINT " 3/8 flat"
- WHEN "3" : accid2% = 3 : PRINT " 1/4 flat"
- WHEN "4" : accid2% = 4 : PRINT " 1/8 flat"
- WHEN "5" : accid2% = 5 : PRINT " natural"
- WHEN "6" : accid2% = 6 : PRINT " 1/8 sharp"
- WHEN "7" : accid2% = 7 : PRINT " 1/4 sharp"
- WHEN "8" : accid2% = 8 : PRINT " 3/8 sharp"
- WHEN "9" : accid2% = 9 : PRINT " sharp"
- ENDCASE
- COLOUR 0
- PRINT " octave ";
- COLOUR 1
- CASE GET$ OF
- WHEN "1" : octave2% = 1 : PRINT " octave 1"
- WHEN "2" : octave2% = 2 : PRINT " octave 2"
- WHEN "3" : octave2% = 3 : PRINT " octave 3"
- WHEN "4" : octave2% = 4 : PRINT " octave 4"
- WHEN "5" : octave2% = 5 : PRINT " octave 5"
- WHEN "6" : octave2% = 6 : PRINT " octave 6"
- WHEN "7" : octave2% = 7 : PRINT " octave 7"
- WHEN "8" : octave2% = 8 : PRINT " octave 8"
- ENDCASE
- COLOUR 0
- tick% = 1
- FOR count% = 1 TO many%
- IF tick% = 1 THEN
- pitches%(count%-1) = (note1%*100)+(accid1%*10)+octave1%
- ELSE
- pitches%(count%-1) = (note2%*100)+(accid2%*10)+octave2%
- ENDIF
- IF tick% = 1 THEN tick% = 2 ELSE tick% = 1
- NEXT
- :
- numpitches% = many%
- PROCinsertpitches
- :
- ENDPROC
- :
- REM*********************************************************************************
- :
- DEF PROCcopyonenote
- :
- repeatposit$ = "n"
- IF distort$ = "OFF" THEN dothis$ = "YES"
- IF distort$ = "ON" THEN
- IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
- ENDIF
- copymove$ = "C" : savevoice$ = "N" : justone$ = "y"
- :
- PROCcopy2
- :
- justone$ = "n"
- :
- ENDPROC
- :
- REM***********************************************************************************
- :
- DEF PROCcopygroupofnotes
- :
- repeatposit$ = "n"
- IF distort$ = "OFF" THEN dothis$ = "YES"
- IF distort$ = "ON" THEN
- IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
- ENDIF
- :
- copymove$ = "C" : savevoice$ = "N" : justone$ = "n"
- :
- PROCcopy2
- :
- ENDPROC
- :
- REM*************************************************************************************
- :
- DEF PROCcopydownwards
- :
- repeatposit$ = "n"
- IF distort$ = "OFF" THEN dothis$ = "YES"
- IF distort$ = "ON" THEN
- IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
- ENDIF
- copymove$ = "C" : savevoice$ = "N" : justone$ = "y"
- :
- voice% = displayvoices%(startv%)
- voice% = voice%-1
- :
- along% = copydownwards%
- :
- along%-=1
- copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
- copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
- holdbar% = copystartbar%
- holdbeat% = copystartbeat%
- :
- copyendbar% = copystartbar%
- copyendbeat% = copystartbeat%
- :
- value% = (copystartbar%*10^3)+copystartbeat%
- IF value% <= array%(0,0,voice%)DIV10^3 THEN
- startatcell% = 0
- ELSE
- PROCsearch(value%)
- startatcell% = startcell%
- ENDIF
- IF copyendbar% = 0 THEN
- endatcell% = numusedcells%(voice%) - 1
- ELSE
- value% = (copyendbar%*10^3)+copyendbeat%
- IF value% >= array%(numusedcells%(voice%)-1,0,voice%)DIV10^3 THEN
- endatcell% = numusedcells%(voice%) - 1
- ELSE
- PROCsearch(value%)
- IF shunt$ = "N" THEN endatcell% = startcell% ELSE endatcell% = startcell% - 1
- ENDIF
- ENDIF
- :
- manyattacks% = endatcell% - startatcell% + 1
- REM create 'gap' between beat-of-bar and first actual attack
- carrybars% = (array%(startatcell%,0,voice%)DIV10^6)-copystartbar%
- carrybeats% = ((array%(startatcell%,0,voice%)DIV10^3)MOD10^3)-copystartbeat%
- attacks1%(0) = (carrybars%*960)+carrybeats%
- :
- IF copymove$ = "C" OR copymove$ = "M" THEN
- FOR count% = 0 TO (manyattacks%-1)
- IF count% > 0 THEN
- carrybars% = (array%(startatcell%+count%,0,voice%)DIV10^6)-(array%(startatcell%+count%-1,0,voice%)DIV10^6)
- carrybeats% = ((array%(startatcell%+count%,0,voice%)DIV10^3)MOD10^3)-((array%(startatcell%+count%-1,0,voice%)DIV10^3)MOD10^3)
- attacks1%(count%) = attacks1%(count%-1) + ((carrybars%*960)+carrybeats%)
- ENDIF
- :
- pitches%(count%) = array%(startatcell%+count%,0,voice%)MOD10^3
- dur% = (array%(startatcell%+count%,1,voice%)DIV10)MOD10^3
- brrr% = array%(startatcell%+count%,0,voice%)DIV10^6 : PROCreconvertdur
- durations%(count%) = dur%
- amplitudes%(count%) = (array%(startatcell%+count%,1,voice%))MOD10
- envelopes%(count%) = (array%(startatcell%+count%,2,voice%))DIV10^2
- glissandos%(count%) = array%(startatcell%+count%,1,voice%)DIV10^4
- inflections%(count%) = array%(startatcell%+count%,2,voice%)MOD10^2
- NEXT
- ELSE PROCextract
- ENDIF
- :
- IF copymove$ = "M" THEN
- numnotes% = manyattacks% : startcell% = startatcell%
- FOR count% = startcell% TO (startcell%+(numnotes%-1))
- FOR counter% = 0 TO 1
- barno% = (array%(count%,0,voice%)DIV10^6)-counter%
- beatnum% = ((array%(count%,0,voice%)DIV10^3)MOD10^3)
- :
- group1start% = (disarray%(barno%,0,voice%)DIV10^7)*beatfactor%
- group1end% = group1start% + (((disarray%(barno%,0,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
- IF beatnum%+(960*counter%) >= group1start% AND beatnum%+(960*counter%) <= group1end% THEN
- disarray%(barno%,0,voice%) = disarray%(barno%,0,voice%)MOD10^3
- ENDIF
- :
- group2start% = ((disarray%(barno%,0,voice%)DIV10)MOD10^2)*beatfactor%
- group2end% = group2start%+((((disarray%(barno%,0,voice%)MOD10)*10)+(disarray%(barno%,1,voice%)DIV10^8))*beatfactor%)-1
- IF beatnum%+(960*counter%) >= group2start% AND beatnum%+(960*counter%) <= group2end% THEN
- disarray%(barno%,0,voice%) = (disarray%(barno%,0,voice%)DIV10^3)*10^3
- disarray%(barno%,1,voice%) = disarray%(barno%,1,voice%)MOD10^6
- ENDIF
- group3start%=((disarray%(barno%,1,voice%)DIV10^4)MOD10^2)*beatfactor%
- group3end% = group3start% + (((disarray%(barno%,1,voice%)MOD10^4)DIV10^2)*beatfactor%)-1
- IF beatnum%+(960*counter%) >= group3start% AND beatnum%+(960*counter%) <= group3end% THEN
- disarray%(barno%,1,voice%) = (disarray%(barno%,1,voice%)DIV10^6)*10^6
- ENDIF
- group4start% = (disarray%(barno%,2,voice%)DIV10^7)*beatfactor%
- group4end% = group4start%+(((disarray%(barno%,2,voice%)DIV10^5)MOD10^2)*beatfactor%)-1
- IF beatnum%+(960*counter%) >= group4start% AND beatnum%+(960*counter%) <= group4end% THEN
- disarray%(barno%,2,voice%) = disarray%(barno%,2,voice%)MOD10^3
- ENDIF
- group5start% = ((disarray%(barno%,2,voice%)MOD10^3)DIV10)*beatfactor%
- group5end% = group5start%+((((disarray%(barno%,2,voice%)MOD10)*10)+(disarray%(barno%,3,voice%)DIV10^8))*beatfactor%)-1
- IF beatnum%+(960*counter%) >= group5start% AND beatnum%+(960*counter%) <= group5end% THEN
- disarray%(barno%,2,voice%) = (disarray%(barno%,2,voice%)DIV10^3)*10^3
- disarray%(barno%,3,voice%) = disarray%(barno%,3,voice%)MOD10^6
- ENDIF
- group6start% = ((disarray%(barno%,3,voice%)DIV10^4)MOD10^2)*beatfactor%
- group6end% = group6start% + (((disarray%(barno%,3,voice%)DIV10^2)MOD10^2)*beatfactor%)-1
- IF beatnum%+(960*counter%) >= group6start% AND beatnum%+(960*counter%) <= group6end% THEN
- disarray%(barno%,3,voice%)=(disarray%(barno%,3,voice%)DIV10^6)*10^6
- ENDIF
- NEXT
- :
- NEXT
- PROCshuntleft(startcell%,numnotes%)
- ENDIF
- :
- numpitches% = manyattacks% : method$ = "raw" : copyit$ = "ON" : copydownwards$ = "y"
- :
- PROCinsertattacks
- :
- justone$ = "n" : copydownwards$ = "n"
- ENDPROC
- :
- REM****************************************************************
- :
- DEF PROCdeleteone
- :
- CASE deleteone$ OF
- WHEN "top" :
- voice% = 1
- voice% = displayvoices%(startv%+voice%-1)
- voice% -= 1
- WHEN "middle" :
- voice% = 2
- voice% = displayvoices%(startv%+voice%-1)
- voice% -= 1
- WHEN "bottom" :
- voice% = 3
- voice% = displayvoices%(startv%+voice%-1)
- voice% -= 1
- ENDCASE
- :
- numnotes% = 1
- :
- incre$ = INKEY$(100)
- IF incre$ <> "" THEN
- CASE incre$ OF
- WHEN "!" : along% = 1
- WHEN """" : along% = 2
- WHEN "£" : along% = 3
- WHEN "$" : along% = 4
- WHEN "%" : along% = 5
- WHEN "^" : along% = 6
- WHEN "&" : along% = 7
- WHEN "*" : along% = 8
- WHEN "(" : along% = 9
- WHEN ")" : along% = 10
- ENDCASE
- ELSE along% = 1
- ENDIF
- :
- IF addten$ = "y" THEN along% +=10
- IF addten$ = "twenty" THEN along% +=20
- :
- along%-=1
- copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
- copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
- beats% = copystartbeat%
- PROCalterbeats
- start% = (copystartbar%*(10^3))+beats%
- PROCsearch(start%)
- PROCshuntleft(startcell%,numnotes%)
- :
- deleteone$ = "none"
- ENDPROC
- :
- REM**********************************************************************
- :
- DEF PROCpitchstring5
- :
- PROCwindow(20,65,60,55)
- PRINT'" This function returns a string"
- PRINT" of pitches which recycles an"
- PRINT" ascending chromatic scale,"
- PRINT" useful for subsequently"
- PRINT" extracting certain pitches"
- INPUT'" How many semitones in the scale "numsemis%
- INPUT'" How many pitches in the string "numpitches%
- counter% = 0
- :
- FOR count% = 0 TO numpitches%-1
- counter% += 1
- CASE counter% OF
- WHEN 1 : pitches%(count%) = 54
- WHEN 2 : pitches%(count%) = 94
- WHEN 3 : pitches%(count%) = 154
- WHEN 4 : pitches%(count%) = 214
- WHEN 5 : pitches%(count%) = 254
- WHEN 6 : pitches%(count%) = 354
- WHEN 7 : pitches%(count%) = 394
- WHEN 8 : pitches%(count%) = 454
- WHEN 9 : pitches%(count%) = 514
- WHEN 10 : pitches%(count%) = 554
- WHEN 11 : pitches%(count%) = 614
- WHEN 12 : pitches%(count%) = 654
- ENDCASE
- :
- IF counter% = numsemis% THEN counter% = 0
- :
- NEXT
- :
- PROCinsertpitches
- ENDPROC
- :
- ******************************************
- :
- DEF PROCdurationsbetween
- :
- IF numdurations% = 111 THEN mode$ = "legato"
- IF numdurations% = 222 THEN mode$ = "mezzostacc"
- PROCwindow(20,69,60,55)
- CLS
- :
- IF screenvoices$ = "n" THEN
- INPUT' " Which voice/strand (0 = top) "voice%
- IF voice% = 0 THEN PROCpressenter
- ELSE
- PRINT'" Which screen voice "
- CASE GET$ OF
- WHEN "1" : voice% = 1
- WHEN "2" : voice% = 2
- WHEN "3" : voice% = 3
- OTHERWISE PROCpressenter
- ENDCASE
- ENDIF
- IF screenvoices$ = "y" AND voice% > 0 THEN voice% = displayvoices%(startv%+voice%-1)
- voice% -= 1
- IF voice% >= 0 THEN samevoice% = voice%
- IF voice% = -1 THEN voice% = samevoice%
- :
- PRINT'" How many gaps to be filled "
- INPUT " (for 1 press 0) "numdurations%
- PRINT'" starting at note number "
- INPUT " (for 1 press 0) "note%
- IF note% = 0 THEN note% = 1
- :
- PROCnewnotereception(voice%,startbar%,0,0,0,0,0,0,0)
- CASE option% OF
- WHEN 1 : startcell% = 0
- WHEN 2 : startcell% = numusedcells%(voice%)
- WHEN 3 : startcell% = 0
- WHEN 4 : start% = firstbar%*10^3 : PROCsearch(start%)
- ENDCASE
- silly% = startcell%+note%-1
- :
- FOR count% = 0 TO numdurations%-1
- beatdiff% = ((array%(silly%+1+count%,0,voice%)DIV10^3)MOD10^3)-((array%(silly%+count%,0,voice%)DIV10^3)MOD10^3)
- beatdiff%+=(((array%(silly%+1+count%,0,voice%)DIV10^6)-(array%(silly%+count%,0,voice%)DIV10^6))*960)
- CASE mode$ OF
- WHEN "legato" :
- durations%(count%+1) = beatdiff%
- OTHERWISE
- durations%(count%+1) = beatdiff%/2
- ENDCASE
- :
- NEXT
- :
- along% = note%-1
- copystartbar% = array%(holdstartcell%(voice%)+along%,0,voice%)DIV10^6
- copystartbeat% = (array%(holdstartcell%(voice%)+along%,0,voice%)MOD10^6)DIV10^3
- beats% = copystartbeat%
- PROCalterbeats
- startat% = (copystartbar%*(10^3))+beats%
- :
- PROCsearch(startat%)
- shunt$ = "N"
- :
- FOR count% = startcell% TO (startcell%+(numdurations%-1))
- PROCcellfill(count%,voice%,999,999,999,9,999,durations%(count%-startcell%+1),99,99)
- NEXT
- :
- PROCdisplay
- :
- ENDPROC
- :
- REM************************************************************************88
- :
- DEF PROCshortmove
- :
- ON : PROCwindow(20,69,60,55)
- CLS
- repeatposit$ = "n"
- IF distort$ = "OFF" THEN dothis$ = "YES"
- IF distort$ = "ON" THEN
- IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
- ENDIF
- :
- IF dothis$ = "YES" THEN
- copymove$ = "M" : savevoice$ = "N" : justone$ = "n"
- ELSE copymove$ = "C"
- ENDIF
- :
- PROCcopy2
- IF quickextract$ = "y" THEN quickextract$ = "n"
- :
- ENDPROC
- :
- REM***********************************************************************8
- :
- DEF PROCshortmoveone
- :
- ON : PROCwindow(20,69,60,55)
- CLS
- repeatposit$ = "n"
- IF distort$ = "OFF" THEN dothis$ = "YES"
- IF distort$ = "ON" THEN
- IF distortpara$ = "attacks" THEN dothis$ = "YES" ELSE dothis$ = "NO"
- ENDIF
- :
- IF dothis$ = "YES" THEN
- copymove$ = "M" : savevoice$ = "N" : justone$ = "y"
- ELSE copymove$ = "C"
- ENDIF
- :
- PROCcopy2
- IF quickextract$ = "y" THEN quickextract$ = "n"
- :
- ENDPROC
- :
- REM************************************************************************
- :
- DEF PROCcopysuccessively
- :
- IF succfirsttime$ = "y" THEN
- INPUT'" Which voice? (0 = top) "voice%
- IF voice% = 0 THEN PROCpressenter
- fromvoice% = voice%
- succfirsttime$ = "n"
- succcounter% = 0
- ELSE succcounter% += 1
- ENDIF
- :
- IF succcounter% > 0 THEN
- :
- fromvoice% += 1 : voice% = fromvoice%
- PRINT' " That's voice ";voice%;"?"
- PRINT' " (0 = yes/C = cancel successive copying) "
- CASE GET$ OF
- WHEN "C","c" :
- copysuccessively$ = "n" : succfirsttime$ = "y" : PROCdisplay
- OTHERWISE
- ENDCASE
- :
- ENDIF
- :
- ENDPROC
- :
- REM***************************************************************************
- :
- DEF PROCpressenter
- :
- COLOUR 1
- incre$ = INKEY$(50)
- IF incre$ = "" THEN
- IF screenvoices$ = "y" THEN
- voice% = 1 : PRINT ' voice%
- ELSE
- voice% = displayvoices%(startv%) : PRINT ' voice%
- ENDIF
- ELSE
- incre$ = INKEY$(50)
- IF screenvoices$ = "y" THEN
- IF incre$ = "" THEN voice% = 2 ELSE voice% = 3
- PRINT ' voice%
- ELSE
- IF incre$ = "" THEN voice% = displayvoices%(startv%+1) ELSE voice% = displayvoices%(startv%+2)
- PRINT ' voice%
- ENDIF
- ENDIF
- COLOUR 0
- :
- ENDPROC
- :
- REM***************************************************************************
- :
- DEF PROCfornexttime
- :
- IF housekeepingdimmed$ = "n" THEN
- DIM lastfilename$(9)
- ENDIF
- *Dir HostFS::HardDisc4.$.CAC.Files
- thisfilename$ = "housekeeping2"
- channel = OPENOUT thisfilename$
- FOR count% = 1 TO 9
- PRINT#channel, lastfilename$(count%)
- NEXT
- CLOSE#channel
- *NoDir
- :
- ENDPROC
- :
- REM****************************************************************************
- :
- DEF PROChousekeeping
- :
- IF housekeepingdimmed$ = "n" THEN
- DIM lastfilename$(9) : housekeepingdimmed$ = "y"
- ENDIF
- *Dir HostFS::HardDisc4.$.CAC.Files
- thisfilename$ = "housekeeping2"
- channel = OPENIN thisfilename$
- REPEAT
- FOR count% = 1 TO 9
- INPUT#channel, lastfilename$(count%)
- NEXT
- UNTIL EOF#channel
- CLOSE#channel
- *NoDir
- :
- ENDPROC
- :
- REM*****************************************************************************
- :
- DEF PROCshuntlastfilename
- :
- FOR count% = 9 TO 2 STEP -1
- lastfilename$(count%) = lastfilename$(count%-1)
- NEXT
- lastfilename$(1) = filename$
- :
- ENDPROC
- :
- REM*****************************************************************************
- :
- DEF PROCspecialshunt
- :
- FOR count% = theone% TO 2 STEP -1
- lastfilename$(count%) = lastfilename$(count%-1)
- NEXT
- lastfilename$(1) = filename$
- :
- ENDPROC
- :
- REM******************************************************************************
- :
- DEF PROCroguenotes
- :
- FOR count% = 0 TO numparts%-1
- array%(numusedcells%(count%),0,count%) = 0
- NEXT
- :
- PROCdisplay
- :
- ENDPROC
- :
- REM*******************************************************************
- :
- DEF PROCnotenumberfreq
- :
- CASE nosevery% OF
- WHEN 1 :
- IF howmany% >= startnos% THEN printnumber$ = "y" ELSE printnumber$ = "n"
- WHEN 2 :
- howmany = howmany%/2
- howmany = (howmany * 10) MOD 10
- IF howmany = 5 THEN printnumber$ = "n" ELSE printnumber$ = "y"
- IF howmany% < startnos% THEN printnumber$ = "n"
- WHEN 4 :
- howmany = howmany%/4
- howmany = (howmany * 10) MOD 10
- IF howmany = 2 OR howmany = 5 OR howmany = 7 THEN printnumber$ = "n" ELSE printnumber$ = "y"
- IF howmany% < startnos% THEN printnumber$ = "n"
- WHEN 10 :
- IF howmany% MOD 10 = 0 THEN printnumber$ = "y" ELSE printnumber$ = "n"
- IF howmany% < startnos% THEN printnumber$ = "n"
- ENDCASE
- :
- ENDPROC
- :
- REM**************************************************************************
- :
- DEF PROCnotenumbersep
- old% = current%
- current% = hposn%-100
- gap% = current%-old%
- IF old% <> 0 AND howmany% > 1 THEN
- IF gap% < 50 THEN lowernumber% += 20 ELSE lowernumber% = 0
- IF (hposn%-100) - firsttrack% > 50 THEN
- lowernumber% = 0
- firsttrack% = hposn%-100
- ENDIF
- ENDIF
- ENDPROC
- :
- REM****************************************************************************
- :
- DEF PROCpitchstring6
- :
- CLS
- PRINT'" How many semitones high is the "
- INPUT " vertical space (0 = previous) "height
- IF height = 0 THEN
- height = previousheight
- COLOUR 1
- PRINT' previousheight
- COLOUR 0
- ENDIF
- PRINT'" and this is to be divided into "
- INPUT " how many steps "steps
- IF steps = 0 THEN
- steps = previoussteps
- COLOUR 1
- PRINT' previoussteps
- COLOUR 0
- ENDIF
- :
- each = height/(steps-1)
- result = 0
- FOR count% = 1 TO (steps-1)
- result += each
- IF ((result*10)MOD10) <= 5 add$ = "n" ELSE add$ = "y"
- result% = result DIV 1
- IF add$ = "y" result% += 1
- :
- oct% = 1
- IF result% > 11 THEN
- REPEAT
- result% -= 12
- oct% += 1
- UNTIL result% < 12
- ENDIF
- :
- CASE result% OF
- WHEN 0 : pitch% = 050
- WHEN 1 : pitch% = 090
- WHEN 2 : pitch% = 150
- WHEN 3 : pitch% = 210
- WHEN 4 : pitch% = 250
- WHEN 5 : pitch% = 350
- WHEN 6 : pitch% = 390
- WHEN 7 : pitch% = 450
- WHEN 8 : pitch% = 490
- WHEN 9 : pitch% = 550
- WHEN 10 : pitch% = 610
- WHEN 11 : pitch% = 650
- ENDCASE
- :
- pitch% += oct%
- pitches%(count%) = pitch%
- pitches%(0) = 051
- NEXT
- numpitches% = steps
- :
- PRINT'" Contour upwards, downwards,"
- PRINT " up-down, down-up (1/2/3/4) "
- CASE GET$ OF
- WHEN "1" : previouscontour$ = "1"
- WHEN "2" : previouscontour$ = "2" : PROCcontourdown
- WHEN "3" : previouscontour$ = "3" : PROCcontourupdown
- WHEN "4" : previouscontour$ = "4" : PROCcontourdownup
- OTHERWISE
- CASE previouscontour$ OF
- WHEN "1" : COLOUR 1 : PRINT'" upwards " : COLOUR 0
- wait$ = INKEY$(50)
- WHEN "2" : PROCcontourdown : COLOUR 1 : PRINT' "downwards " : COLOUR 0
- wait$ = INKEY$(50)
- WHEN "3" : PROCcontourupdown : COLOUR 1 : PRINT'" up-down " : COLOUR 0
- wait$ = INKEY$(50)
- WHEN "4" : PROCcontourdownup : COLOUR 1 : PRINT' " down-up " : COLOUR 0
- wait$ = INKEY$(50)
- ENDCASE
- ENDCASE
- :
- previousheight = height
- previoussteps = steps
- :
- PROCinsertpitches
- :
- ENDPROC
- :
- REM************************************************************************8
- :
- DEF PROCcontourdown
- :
- FOR count% = 0 TO (numpitches%-1)
- pitches1%(count%) = pitches%((numpitches%-1)-count%)
- NEXT
- FOR count% = 0 TO (numpitches%-1)
- pitches%(count%) = pitches1%(count%)
- NEXT
- :
- ENDPROC
- :
- REM***************************************************************************
- :
- DEF PROCcontourupdown
- :
- middle% = ((numpitches%+1)/2)-1
- addnumber% = 1
- minusnumber% = 0
- swing$ = "add"
- FOR count% = 0 TO (numpitches%-1)
- IF swing$ = "subtract" THEN swing$ = "add" ELSE swing$ = "subtract"
- :
- IF swing$ = "add" THEN
- pitches1%(middle%+addnumber%) = pitches%((numpitches%-1)-count%)
- addnumber% += 1
- ELSE
- pitches1%(middle%-minusnumber%) = pitches%((numpitches%-1)-count%)
- minusnumber% += 1
- ENDIF
- NEXT
- :
- FOR count% = 0 TO (numpitches%-1)
- pitches%(count%) = pitches1%(count%)
- NEXT
- :
- ENDPROC
- :
- REM******************************************************************************
- :
- DEF PROCcontourdownup
- :
- middle% = ((numpitches%+1)/2)-1
- addnumber% = 1
- minusnumber% = 0
- swing$ = "add"
- FOR count% = 0 TO (numpitches%-1)
- IF swing$ = "subtract" THEN swing$ = "add" ELSE swing$ = "subtract"
- :
- IF swing$ = "add" THEN
- pitches1%(middle%+addnumber%) = pitches%(count%)
- addnumber% += 1
- ELSE
- pitches1%(middle%-minusnumber%) = pitches%(count%)
- minusnumber% += 1
- ENDIF
- NEXT
- :
- FOR count% = 0 TO (numpitches%-1)
- pitches%(count%) = pitches1%(count%)
- NEXT
- :
- ENDPROC
- :
- REM**********************************************************************************
- :
- DEF PROCdisplayonlycontent
- :
- IF onlycontent$ = "n" THEN
- displayvoices%() = displayvoices1%() : numvoices% = numvoices1%
- ELSE
- voicedone% = -1 : voicesdone% = 0 : displayvoices1%() = displayvoices%()
- numvoices1% = numvoices%
- FOR count% = 1 TO numvoices%
- FOR counter% = startbar% TO (startbar%+numbars%-1)
- voice% = displayvoices%(count%)-1
- addingnotes$ = "n"
- PROCnewnotereception(voice%,counter%,0,0,0,0,0,0,0)
- CASE option% OF
- WHEN 1 : startcell% = 0
- WHEN 2 : startcell% = numusedcells%(voice%)
- WHEN 3 : startcell% = 0
- WHEN 4 : PROCsearch(counter%*10^3)
- ENDCASE
- IF array%(startcell%,0,voice%) DIV10^6 > 0 THEN
- IF (array%(startcell%,0,voice%) DIV10^6) < (startbar%+numbars%) THEN
- IF voice% <> voicedone% THEN
- voicesdone% += 1 : displayvoices%(voicesdone%) = (voice%+1) : holddisplay%(voicesdone%) = (voice%+1)
- voicedone% = voice%
- ENDIF
- ENDIF
- ENDIF
- NEXT
- NEXT
- :
- numvoices% = voicesdone% : startv% = 1 : holdstart% = 1
- :
- ENDIF
- :
- PROCdisplay
- :
- ENDPROC
- :
- REM**********************************************************8
- :
- DEF PROCcontentonlylist
- :
- CLS
- PRINT ""
- voicedone% = -1
- FOR count% = 1 TO numvoices%
- FOR counter% = startbar% TO (startbar%+numbars%-1)
- voice% = displayvoices%(count%)-1
- addingnotes$ = "n"
- PROCnewnotereception(voice%,counter%,0,0,0,0,0,0,0)
- CASE option% OF
- WHEN 1 : startcell% = 0
- WHEN 2 : startcell% = numusedcells%(voice%)
- WHEN 3 : startcell% = 0
- WHEN 4 : PROCsearch(counter%*10^3)
- ENDCASE
- IF array%(startcell%,0,voice%) DIV 10^6 > 0 THEN
- IF (array%(startcell%,0,voice%)) DIV 10^6 < (startbar%+numbars%) THEN
- IF voice% <> voicedone% THEN
- IF compress$ = "n" THEN
- PRINT ' voice%+1;". ";insts$(voice%+1,0)
- ELSE
- PRINT voice%+1;". ";insts$(voice%+1,0)
- ENDIF
- voicedone% = voice%
- ENDIF
- ENDIF
- ENDIF
- NEXT
- NEXT
- :
- PRINT'" (press R to remove the list, press C to"
- PRINT'" compress/uncompress the list or press Q to"
- PRINT'" go to Quickdisplay without removing the list"
- CASE GET$ OF
- WHEN "C","c" :
- IF compress$ = "y" THEN compress$ = "n" ELSE compress$ = "y"
- PROCcontentonlylist
- WHEN "Q","q" : quickdisplaywindow$ = "n" : PROCquickdisplay
- OTHERWISE PROCdisplay
- ENDCASE
- :
- ENDPROC
- :
- REM*************************************************************
- :
- DEF PROCundoprepare
- :
- manynotesX%=manynotes%
- numpartsX%=numparts%
- nobarsX% =nobars%
- startvX% =startv%
- startv1X% =startv1%
- numbarsX% =numbars%
- startbarX% =startbar%
- numvoicesX%=numvoices%
- factorX% =factor%
- beatfactorX%=beatfactor%
- beamsX% =beams%
- longbeatsupperX%= longbeatsupper%
- longbeatslowerX%=longbeatslower%
- tempoX% =tempo%
- MMX% =MM%
- noteheadX$=notehead$
- longscoreX$= longscore$
- barlinesX$ =barlines$
- stavesX$ =staves$
- beatsX$ =beats$
- amplitudesX$= amplitudes$
- namesX$ =names$
- accidentalsX$=accidentals$
- stemsX$=stems$
- xoptionX$= xoption$
- durationsX$=durations$
- envelopesX$ =envelopes$
- glissandosX$ =glissandos$
- numwavesX% =numwaves%
- manywavesX% =manywaves%
- barnosoftenX%= barnosoften%
- FOR c% = 0 TO (numparts%-1)
- numusedcellsX%(c%)=numusedcells%(c%)
- NEXT
- FOR e% = 0 TO (numparts%-1)
- FOR d% = 0 TO 2
- FOR c% = 0 TO manynotes%
- arrayX%(c%,d%,e%)=array%(c%,d%,e%)
- NEXT
- NEXT
- NEXT
- FOR c% = 0 TO numparts%
- FOR d% = 0 TO 2
- instsX$(c%,d%)=insts$(c%,d%)
- NEXT
- NEXT
- FOR c% = 0 TO nobars%
- FOR d% = 0 TO 3
- FOR e% = 0 TO (numparts%-1)
- disarrayX%(c%,d%,e%)= disarray%(c%,d%,e%)
- NEXT
- NEXT
- NEXT
- FOR c% = 0 TO numparts%
- longbeamposnX%(c%) =longbeamposn%(c%)
- NEXT
- FOR c% = 0 TO numparts%
- shortbeamposnX%(c%) =shortbeamposn%(c%)
- NEXT
- FOR c% = 0 TO numparts%
- shortampposX%(c%)=shortamppos%(c%)
- NEXT
- FOR c% = 0 TO numparts%
- longampposX%(c%) =longamppos%(c%)
- NEXT
- FOR c% = 0 TO (numparts%-1)
- longstemdirX$(c%)=longstemdir$(c%)
- NEXT
- FOR c% = 0 TO (numparts%-1)
- shortstemdirX$(c%)=shortstemdir$(c%)
- NEXT
- FOR c% = 0 TO numparts%
- waveformsX$(c%)=waveforms$(c%)
- NEXT
- FOR c% = 0 TO numvoices%
- displayvoicesX%(c%)=displayvoices%(c%)
- NEXT
- FOR c% = 0 TO 19
- wformsX$(c%)=wforms$(c%)
- NEXT
- FOR c% = 0 TO 8
- FOR d% = 0 TO 9
- lvdataX%(c%,d%)= lvdata%(c%,d%)
- NEXT
- NEXT
- FOR a% = 0 TO 47
- pitchsetX%(a%)=pitchset%(a%)
- NEXT
- FOR a% = 0 TO 47
- dursetX%(a%)=durset%(a%)
- NEXT
- FOR a% = 0 TO 47
- ampsetX%(a%) =ampset%(a%)
- NEXT
- FOR a% = 0 TO 47
- glisssetX%(a%)=glissset%(a%)
- NEXT
- FOR a% = 0 TO 47
- envsetX%(a%) =envset%(a%)
- NEXT
- FOR a% = 0 TO nobars%
- tempiX%(a%) =tempi%(a%)
- NEXT
- FOR a% = 0 TO nobars%
- FOR b% = 0 TO 1
- remarksX$(a%,b%)= remarks$(a%,b%)
- NEXT
- NEXT
- :
- ENDPROC
- :
- REM****************************************
- :
- DEF PROCundo
- :
- manynotes%=manynotes%
- numparts%=numpartsX%
- nobars% =nobarsX%
- startv% =startvX%
- startv1% =startv1X%
- numbars% =numbarsX%
- startbar% =startbarX%
- numvoices%=numvoicesX%
- factor% =factorX%
- beatfactor%=beatfactorX%
- beams% =beamsX%
- longbeatsupper%= longbeatsupperX%
- longbeatslower%=longbeatslowerX%
- tempo% =tempoX%
- MM% =MMX%
- notehead$=noteheadX$
- longscore$= longscoreX$
- barlines$ =barlinesX$
- staves$ =stavesX$
- beats$ =beatsX$
- amplitudes$= amplitudesX$
- names$ =namesX$
- accidentals$=accidentalsX$
- stems$=stemsX$
- xoption$= xoptionX$
- durations$=durationsX$
- envelopes$ =envelopesX$
- glissandos$ =glissandosX$
- numwaves% =numwavesX%
- manywaves% =manywavesX%
- barnosoften%= barnosoftenX%
- FOR c% = 0 TO (numparts%-1)
- numusedcells%(c%)=numusedcellsX%(c%)
- NEXT
- FOR e% = 0 TO (numparts%-1)
- FOR d% = 0 TO 2
- FOR c% = 0 TO manynotes%
- array%(c%,d%,e%)=arrayX%(c%,d%,e%)
- NEXT
- NEXT
- NEXT
- FOR c% = 0 TO numparts%
- FOR d% = 0 TO 2
- insts$(c%,d%)=instsX$(c%,d%)
- NEXT
- NEXT
- FOR c% = 0 TO nobars%
- FOR d% = 0 TO 3
- FOR e% = 0 TO (numparts%-1)
- disarray%(c%,d%,e%)= disarrayX%(c%,d%,e%)
- NEXT
- NEXT
- NEXT
- FOR c% = 0 TO numparts%
- longbeamposn%(c%) =longbeamposnX%(c%)
- NEXT
- FOR c% = 0 TO numparts%
- shortbeamposn%(c%) =shortbeamposnX%(c%)
- NEXT
- FOR c% = 0 TO numparts%
- shortamppos%(c%)=shortampposX%(c%)
- NEXT
- FOR c% = 0 TO numparts%
- longamppos%(c%) =longampposX%(c%)
- NEXT
- FOR c% = 0 TO (numparts%-1)
- longstemdir$(c%)=longstemdirX$(c%)
- NEXT
- FOR c% = 0 TO (numparts%-1)
- shortstemdir$(c%)=shortstemdirX$(c%)
- NEXT
- FOR c% = 0 TO numparts%
- waveforms$(c%)=waveformsX$(c%)
- NEXT
- FOR c% = 0 TO numvoices%
- displayvoices%(c%)=displayvoicesX%(c%)
- NEXT
- FOR c% = 0 TO 19
- wforms$(c%)=wformsX$(c%)
- NEXT
- FOR c% = 0 TO 8
- FOR d% = 0 TO 9
- lvdata%(c%,d%)= lvdataX%(c%,d%)
- NEXT
- NEXT
- FOR a% = 0 TO 47
- pitchset%(a%)=pitchsetX%(a%)
- NEXT
- FOR a% = 0 TO 47
- durset%(a%)=dursetX%(a%)
- NEXT
- FOR a% = 0 TO 47
- ampset%(a%) =ampsetX%(a%)
- NEXT
- FOR a% = 0 TO 47
- glissset%(a%)=glisssetX%(a%)
- NEXT
- FOR a% = 0 TO 47
- envset%(a%) =envsetX%(a%)
- NEXT
- FOR a% = 0 TO nobars%
- tempi%(a%) =tempiX%(a%)
- NEXT
- FOR a% = 0 TO nobars%
- FOR b% = 0 TO 1
- remarks$(a%,b%)= remarksX$(a%,b%)
- NEXT
- NEXT
- :
- PROCdisplay
- :
- ENDPROC
|