Random Poetical Form Generator

My new course, Poetry in a Few Words launched in July 2017. I’m still working on  “Poetry for Writers and Non-Writers” which might be a course, it might be a poetry anthology. Either way it’s getting big; over 100 poetical forms and counting, with an original poem for each one.

If you want to find out more about Poetry for Writers and Non-Writers, use the sign-up form at the bottom of this page.

Meanwhile, if you want to practice your poetry skills, or hone them, or test them to destruction, why not try out my “Poetry Box.

Poetry Box is a random black box poetry form generator. Select your options, click the button, and it will give you a set of rules to apply when you write your next poem.‚Äč

[tcb-script]function complexTypeChange(src){var cmplx = parseInt(src.value,10);switch(cmplx){case 1 :tickNone();tickBasicGroup();deactivate();break;case 2 :tickNone();tickBasicGroup();tickIntermediateGroup();deactivate();break;case 3 :tickAll();deactivate();break;case 4 :tickNone();activate();break;default :alert(cmplx);break;}}function tickBasicGroup(){tickById(“include-0”);tickById(“include-3”);tickById(“include-6”);}function tickIntermediateGroup(){tickById(“include-2”);tickById(“include-4”);tickById(“include-4”);tickById(“include-7”);tickById(“include-11”);tickById(“include-13”);}function checkHimIfIam(me, him, whatIAm){if(me.checked==whatIAm){him.checked=true;}}function unCheckHimIfIAmNot(me, him, whatIAm){if(me.checked!=whatIAm){him.checked=false;}}function active(tf){var includeDiv = document.getElementById(“includes”);var chkboxes = includeDiv.getElementsByTagName(“input”);for(var i=0;i<chkboxes.length;i++){chkboxes[i].disabled=tf;}}function ruleActive(tf){var ruleCount = document.getElementsByName(“ruleCount”);for(var i=0;i<ruleCount.length;i++){ruleCount[i].disabled=tf;}}function deactivate(){active(true);ruleActive(true);}function activate(){active(false);ruleActive(false);}function tick(tf){var includeDiv = document.getElementById(“includes”);var chkboxes = includeDiv.getElementsByTagName(“input”);for(var i=0;i<chkboxes.length;i++){chkboxes[i].checked = tf;}}function tickAll(){tick(true);}function tickNone(){tick(false);}function tickById(idOfCheckbox){document.getElementById(idOfCheckbox).checked=true;}function getRandomInt(min, max) {return Math.floor(Math.random() * (max – min + 1)) + min;}function getBiasedRandomInt(min, max){var rnda = Math.random();var rndb = Math.pow(rnda,3);return Math.floor(rndb * (max – min + 1)) + min;}function IMakeTheRules(){//Work out how many rules the box has to havevar cmplxVal=parseInt(document.querySelector(‘input[name=”1″]:checked’).value,10);var ruleCountLower = 2;var ruleCountUpper = 3;var ruleCount = 2;switch(cmplxVal){case 1 :ruleCount = getRandomInt(ruleCountLower, ruleCountUpper);break;case 2 :ruleCountUpper = 4ruleCount = getRandomInt(ruleCountLower, ruleCountUpper);break;case 3 :ruleCountLower = 4ruleCountUpper = 8ruleCount = getRandomInt(ruleCountLower, ruleCountUpper);break;case 4 :ruleCount = document.querySelector(‘input[name=”ruleCount”]:checked’).value;break;}// get set of rules to choose from; if there aren’t enough to match the count, add more at random from the others.var rulesChosen=””;var rulesLeft=”abcdefghijklmno”;var rules = document.getElementsByName(“include”);for(var i=0;i<rules.length;i++){if(rules[i].checked){rulesChosen+=rules[i].value;rulesLeft=rulesLeft.replace(rules[i].value,””);}}var newChosen = ruleConflicts.isConflict(rulesChosen);rulesChosen=newChosen ;while (rulesChosen.length<ruleCount){var pick=getRandomInt(0,rulesLeft.length);var picked=rulesLeft.charAt(pick);rulesChosen+=picked;rulesLeft=rulesLeft.replace(picked,””);newChosen = ruleConflicts.isConflict(rulesChosen);rulesChosen=newChosen ;}while (rulesChosen.length>ruleCount){var pick=getRandomInt(0,rulesChosen.length);var picked=rulesChosen.charAt(pick);rulesLeft+=picked;rulesChosen=rulesChosen.replace(picked,””);}// if it contains g (line count) put g at the end.if(rulesChosen.indexOf(“g”)>-1){rulesChosen=rulesChosen.replace(“g”,””)+”g”}// now for each rule you have to generate the instructions.//crumbs!lineCounts.init();var ruleset=[];for(var i=0;i<rulesChosen.length;i++){var rule = rulesChosen[i];ruleset.push(getRules[rule](rulesChosen));}var opt = document.createElement(“span”);opt.innerHTML = (ruleset.join(“<br></rulesChosen>”));document.getElementById(“instructions”).firstChild.remove();document.getElementById(“instructions”).appendChild(opt);}function getRules(){};function getOption(ay){var idx = getRandomInt(0,ay.length-1);return ay[idx];}function getOptionObj(ay, dt){var idx = getRandomInt(0,ay.length-1);return [ay[idx],dt[idx]];}getRules.a = function(rulesChosen){var options=[“Monorhyme: all lines end with the same rhyme”,”Couplets: AA BB CC DD … etc”,”Alternating unrhymed: xAxA xBxB … etc”,”Alternating rhymed: ABAB CDCD EFEF etc”,”Mirrored: ABBA CDDC EFFE”];var data=[0,2,4,4,4];var optOut = getOptionObj(options,data);lineCounts.setStanzasByOthers(optOut[1]);return optOut[0];}getRules.b = function(rulesChosen){var options=[“Looped Rhyme(simple): First and last lines rhyme but intervening lines do not – if you have stanzas, applies to each stanza individually”,”Looped Rhyme (mixed #1): First and last lines rhyme, all other lines in couplets – if you have stanzas, applies to each stanza individually”,”Looped Rhyme (mixed #2): First and last lines rhyme all other lines ABAB – if you have stanzas, applies to each stanza individually”,”Rolling Rhyme (3): ABCABC DEFDEF”,”Rolling Rhyme (4): ABCDABCD EFGHEFGH”,”Mirrored Rhyme (3): ABCCBA DEFFED”,”Mirrored Rhyme (4): ABCDDCBA EFGHHGFE”,”Interspersed Rhyme (3a): ABBACCADDAEE”,”Interspersed Rhyme (3b): AABCCBDDBEEB”,”Limerick Rhyme: AABBA”]var data=[0,0,0,3,4,3,4,3,3,5];var optOut = getOptionObj(options,data);lineCounts.setStanzasByOthers(optOut[1]);return optOut[0];}getRules.c = function(){var options=[“At least one near/forced rhyme per stanza, or every four lines without stanzas”,”At least one in every two rhyming pairs should be Hudibrastic (at least one of the following: i: stressed syllable rhymed with unstressed, ii: made up word ending to ensure rhyming, iii: penultimate syllable rhymes better than final syllable, iv: ‘feminine’ rhyme where the final syllable rhymes better than the penultimate, v: the rhyming words end in the same vowel but pronounced differently – or any other suitable deliberately ‘off’ rhyme)”,”At least one in every two rhyming pairs should be visual – word endings spelt the same but pronounced differently (e.g flower, mower)”,”Dialect rhymes – words that rhyme only in some regional accents.”,”A few of the rhymes must be either archaic or non-English words.”]return getOption(options);}getRules.d = function(){var options=[“ti tum ti tum ti tum (iambic)”,”ti ti tum ti ti tum ti ti tum (anapestic)”,”tumpty tumpty tumpty (trochaic)”,”tum ti ti tum ti ti tum ti ti (dactylic)”]return getOption(options) + “<br>&nbsp;&nbsp;(The name of the rhythm type is given in brackets, and three examples of the tumpty notation given first. If you have a syllable count rule (or preference) then adjust the number of repetitions to match it) “;}getRules.e = function(){var options=[“ti ti tum ti ti tum ti ti tum tum tum (William Tell)”,”tum ti ti tum tum, to to (shave and a hair cut)”,”tumpty tumpty tumpty tumpty<br>tum tum tum (pitter-patter)”,”tum tum tum ti ti tum (buckle-my-shoe)”,getAlternatingRhythms()]var data = [0,0,2,0,2];var optOut = getOptionObj(options,data);lineCounts.setStanzasByOthers(optOut[1]);return optOut[0]+ “<br>&nbsp;&nbsp;(The name of the rhythm type is given in brackets, and examples of the tumpty notation given first (‘tum’ is stressed, ‘ti’ is unstressed, ‘to’ may be either). If you have a syllable count rule (or preference) then adjust the number of repetitions to match it.)”;}function getAlternatingRhythms (){var meter = getRandomInt(2,6);var foot = getRandomInt(0,3);var feets = “0123”;var feet = [“ti tum (iambic)”,”tumpty (trochaic)”,”ti ti tum (anapestic)”,”tum ti ti (dactylic)”]var foot = getRandomInt(0,3);var firstLine = feet[foot] + ” ” + getRandomInt(2,6) + ” times”;feets=feets.replace(foot,””);foot =feets.charAt(getRandomInt(0,2));var secondLine = feet[foot] + ” ” + getRandomInt(2,6) + ” times”;return “First line of each couplet is ” + firstLine + ” and second line of each couplet is ” + secondLine;}getRules.f = function(rulesChosen){var opt = getRandomInt(1,3);if(hasRule(rulesChosen,”h”)){opt=0;}if(opt==1){//complexvar lines = getRandomInt(2,4);var lineCount = lines;var syllableCountsLines = “”;while (lines > 0){var intSyllables = getRandomInt(5,10);syllableCountsLines += ” and a line of ” + intSyllables+ ” syllables”lines–}lineCounts.setSyllablePattern(lineCount);return syllableCountsLines.replace(/^ and a/,”A”);}else{//simplereturn “Each line has ” + getRandomInt(5,10) + ” syllables.”}}getRules.g = function(){var lineCount = getBiasedRandomInt(2,32);lineCounts.setLines(lineCount);lineCount = lineCounts.GetLines();return “The poem should have ” + lineCount + ” lines.”}getRules.h = function(){var linesOneStanza = getRandomInt(2,6);var lines1= getRandomInt(2,5);var lines2= getRandomInt(2,5);while (lines1==lines2){lines2= getRandomInt(2,5);}var options = [“Divide the poem into equal stanzas as you please.”,”Divide the poem into stanzas of ” + linesOneStanza + ” lines each.”,”Divide the poem into alternating stanzas of ” + lines1 + ” and ” + lines2 + ” lines.”]var idx = getRandomInt(0,2);var emg = idx;if(lineCounts.stanzaSetByOthers){emg=3};var opt;switch (emg) {case 0 :lineCounts.setStanzas([0]);opt = options[idx];break;case 1 :lineCounts.setStanzas([linesOneStanza]);opt = options[idx];break;case 2 :lineCounts.setStanzas([lines1,lines2]);opt = options[idx];break;case 3 :if(lineCounts.stanzaLines==0){opt = options[idx];}else{opt = “Divide the poem into stanzas of ” + lineCounts.stanzaLines*2 + ” lines each.”;}break;}return opt;}getRules.i = function(){var options = [“Internal Rhyme, purist’s: each line contains at least one word that rhymes with at least one word in the next line. Neither word may be at the end of the line. Use the rhyme scheme of your preference”,”Internal Rhyme, self: each line contains at least one line that rhymes with the last word of the same line.”,”Internal Rhyme, incestuous: each line contains at least two words that rhyme with each other before the end of the line.”]return getOption(options);}getRules.j = function(){return “Use wreathing: wreathing can be achieved either by repeating a word, or by rhyming it. The effect is acheived by pairing words such that the word at the end of one line is paired with (either rhymes, or is the same word) a word before the end of the next line. You can make this slighly easier if you skip a line each time you wreath – e.g. the word at the end of line 1 is repeated/rhymed within line 3; the word at the end of line 2 is not wreathed.”}getRules.k = function(){var options = [“Use looping, line 1: the poem starts and ends with the same line.”,”Use looping, word 1: the poem starts and ends with the same word.”,”Use looping, stanza, line: each stanza starts and ends with the same line.”,”Use looping, stanza, word: each stanza starts and ends with the same word.”]return getOption(options);}getRules.l = function(){var options = [“Use Alliteration, local: at least one line in two should have alliteration within the line.”,”Use Alliteration, general: the same consonant sounds or groupings should be used throughout the poem.”]return getOption(options) + ” Alliteration is the deliberate repetition of consonant sounds through careful choice of words. The easiest way is to use groups of words that all start with the same consonant. Alliteration can also be acheived through repeated association of the same consonants, e.g. the ‘s’ and ‘k’ sounds in ‘basic’ and ‘tusk.'”}getRules.m = function(){var options = [“Use Assonance, local: at least one line in two should have assonance within the line.”,”Use Assonance, general: the same vowel sounds or groupings should be used throughout the poem.”]return getOption(options) + ” Assonance is the deliberate repetition of vowel sounds through careful choice of words. The easiest way is to use groups of words that share the same first vowel sound, or end in the same vowel sound, however it can be acheived more subtly using short and long words to build up the sensation of repetition.”}getRules.n = function(){var options = [“Use Repetition, general: at least ” + getBiasedRandomInt(1,8) + ” words should be repeated up to ” + getBiasedRandomInt(2,8) + “times through the whole poem.”,”Use Repetition, local, 1: one word should be used in every line of the poem at least once.”,”Use Repetition, local, 2: one word in each line should be used twice in the line.”,”Use Repetition, local, 3: one word in each line should be used at least once in any other line.”,”Use Repetition, local, 4: one word in every ” + getRandomInt(2,4) + ” lines should be used twice consecutively.”,”Use Repetition, lines, 1: at least one line in the poem should be used twice.”,”Use Repetition, lines, 1: at least one line in the poem should be used twice consecutively.”];return getOption(options);}getRules.o = function(){var options = [“Use an Image Lexicon: all and any similes or metaphors in your poem must match a theme of your choice. Write it down.”,”Use an Image Lexicon: all and any similes or metaphors in your poem must match a theme of your choice. Write it down.”,”Use an Image Lexicon: all and any similes or metaphors in your poem must match a theme of your choice. Write it down.”,”Use an Image Lexicon: all and any similes or metaphors in your poem must match a theme of your choice. Write it down.”,”Use an Image Lexicon: all and any similes or metaphors in your poem must match a theme of your choice. Write it down.”,”Use an Image Lexicon: all and any similes or metaphors in your poem must match a theme of your choice. Write it down.”,”Use an Image Lexicon: all and any similes or metaphors in your poem must match the theme of landscape.”,”Use an Image Lexicon: all and any similes or metaphors in your poem must match the theme of animals.”,”Use an Image Lexicon: all and any similes or metaphors in your poem must match the theme of elements.”,”Use an Image Lexicon: all and any similes or metaphors in your poem must match the theme of minerals.”,”Use an Image Lexicon: all and any similes or metaphors in your poem must match the theme of weather.”,”Use an Image Lexicon: all and any similes or metaphors in your poem must match the theme of buildings.”,”Use an Image Lexicon: all and any similes or metaphors in your poem must match the theme of war.”,”Use an Image Lexicon: all and any similes or metaphors in your poem must match the theme of craft.”,”Use an Image Lexicon: all and any similes or metaphors in your poem must match the theme of parenting.”,”Use an Image Lexicon: all and any similes or metaphors in your poem must match the theme of learning.”,”Use an Image Lexicon: all and any similes or metaphors in your poem must match the theme of playing.”]return getOption(options) + ” An Image Lexicon is a theme you choose as a way of ensuring a coherent figurative experience; as many as possible of the words, and phrases you employ – as well as the similes and metaphors, should match this theme.”}function hasRule(rulesChosen, ruleSought){return rulesChosen.indexOf(ruleSought)!=-1;}function ruleConflicts(){}ruleConflicts.data=[[“a”,”b”],[“d”,”e”],[“i”,”j”]];ruleConflicts.isConflict = function(rulesChosen){var keep = rulesChosen;var exclude = “”;for(var i=0;i<3;i++){var a = ruleConflicts.data[i][0];var b = ruleConflicts.data[i][1];if(rulesChosen.indexOf(a)>=0 && rulesChosen.indexOf(b)>=0){//conflict found. chose one or the other, and return object containing the new ruleschosen, and the rules that have been excluded.var notChoose = getRandomInt(0,1);keep = keep.replace(ruleConflicts.data[i][notChoose],””);exclude+=ruleConflicts.data[i][1];}}return keep;}function lineCounts(){}lineCounts.minLines = -1;lineCounts.maxLines = -1;lineCounts.syllableLines = 0;lineCounts.fixedLines = 0;lineCounts.stanzaLines = null;lineCounts.stanzaSetByOthers = false;lineCounts.init = function(){lineCounts.minLines = -1;lineCounts.maxLines = -1;lineCounts.syllableLines = 0;lineCounts.fixedLines = 0;lineCounts.stanzaLines = null;lineCounts.stanzaSetByOthers = false;}lineCounts.setSyllablePattern = function(objSyllableLines){lineCounts.syllableLines = objSyllableLineslineCounts.doCalc();}lineCounts.setLines = function(intLines){lineCounts.fixedLines = intLines;if(lineCounts.minLines==-1){lineCounts.minLines=intLines;lineCounts.maxLines=intLines;}else{lineCounts.doCalc();}}lineCounts.setStanzasByOthers = function(objStanzas){if(objStanzas[0]!=0){if(lineCounts.stanzaSetByOthers){if(lineCounts.stanzaLines[0]<objStanzas){lineCounts.stanzaLines = [objStanzas];lineCounts.doCalc();}}else{lineCounts.stanzaSetByOthers = true;lineCounts.stanzaLines = [objStanzas];lineCounts.doCalc();}}}lineCounts.setStanzas = function(objStanzas){if(!lineCounts.stanzaSetByOthers){lineCounts.stanzaLines = objStanzas;}return lineCounts.stanzaLines;lineCounts.doCalc();}lineCounts.doCalc = function(){lineCounts._minLines();if(lineCounts.minLines>=lineCounts.fixedLines){lineCounts.maxLines=lineCounts.minLines;}if(lineCounts.minLines<lineCounts.fixedLines){lineCounts.maxLines=lineCounts.minLines;while(lineCounts.maxLines<lineCounts.fixedLines){lineCounts.maxLines+=lineCounts.minLines;}}}lineCounts.GetLines = function(){return lineCounts.maxLines;}lineCounts._minLines = function(){//syllableLines effectively defines a stanza, so multiple syllable lines and stanzas are mutually exclusive.//but if there are stanzas and syllable counts, the syllable counts will be the same for every line, so the stanzas will make the definition. Otherwise the syllables do.// case: syllable lines = 1 and no stanzas defined. Use line counts as max lines.if((lineCounts.syllableLines==1)&&(!lineCounts.stanzaLines)){lineCounts.minLines = lineCounts.fixedLines;return;}// case: syllable lines = 1 or no syllable lines and stanzas are defined; use stanzas to define length.if((lineCounts.syllableLines<2)&&(lineCounts.stanzaLines)){if(lineCounts.stanzaLines.length==2){lineCounts.minLines = lineCounts.stanzaLines[0] + lineCounts.stanzaLines[1];return;}else if(lineCounts.stanzaLines[0]==0){lineCounts.minLines = lineCounts.fixedLines;return;}else{lineCounts.minLines = lineCounts.stanzaLines[0] *2;return;}}// case: syllable lines > 1 (there will be no stanzas) use syllable lines for minlinesif(lineCounts.syllableLines>1){lineCounts.minLines=lineCounts.syllableLines;return;}}[/tcb-script]Poem Box OptionsPoem ComplexityBasic — (2 to 3 rules)Intermediate — (2 to 4 rules)Complex — (4 to 8 rules)Customize — choose what rules to pick from, and how many to applynumber of rules to apply – if you don’t choose enough rules, I will!23456789+Include specific rules or decorations (“Customize” only):RhymeComplex rhymes — (more complex than ABAB/ABCB/AABB)”Awkward” rhymes — (forced, Hudibrastic, visual, dialect)Rhythm — (basic Tumpty rhythms, all lines the same)Mixed Rhythms — (complex Tumpty rhythms and different lines)Syllable countLine count (2 to 40 but small numbers are more likely)Stanzas (and stanza count)Internal rhymes — (rhyming words before the end of lines)Wreathing — (end line words rhyme internally in other lines)Looping — (the same word or line starts and ends poems or stanzas)Alliteration — (repeated consonant sounds)Assonance — (repeated vowel sounds)Repetition — (words or phrases are repeated)Image lexicon — (all imagery chosen from a fixed theme)Generate Poem BoxGo

Want to stay informed about new courses?

There will be new courses in poetry, writing (fiction and non-fiction) and storytelling (for authors and non-authors) in the near future. Sign up to stay informed.