Skip to content

Can we see this package contain a very rough estimate on length and general stats? #138

@chariegg

Description

@chariegg

It would be very beneficial (and I would really like to see this get implemented to make fountain-mode even more appealing to use since it has built in export now if you have groff installed) to get a very rough estimate on how long the screenplay is and how long dialogue is for each character and each scene. Looking at the source code for betterfountain, which is fountain support for visual studio code, it's commented the general formula it's using to give a guess on average how long it would take for the movie to go by. I'm a terrible programmer and wanted to hear your feedback how this would be implemented.

Now, the formula is this (Hopefully I'm understanding this right): You take how long the sentence is and how many sentences are per character dialogue. The more dialogue and action elements, the longer a scene will be. I'm going to give a ballpark estimate that the average person would say a sentence at normal speed no longer than 3-5 seconds (See attached PDF for a research paper done on average articulation from 14 movies). Take the total time and possibly include word count and add together all the dialogue and action such as monologue into the scene itself. Then you can show statistics breakdown of each scene. The betterfountain extension only truly cares if the scene starts with INT. or EXT. Everything else (Because anything can be a scene heading under fountain) is categorized under other and it also shows if more stuff happened at night or day. Even more using all this, it can show how many total pages based on what you've typed. But I think fountain mode already does that.

Attaching an example snippet of the typescript code, this was what was under 'calculateDialogueDuration' from utils.ts:

export const calculateDialogueDuration = (dialogue:string): number =>{
	var duration = 0;

	//According to this paper: http://www.office.usp.ac.jp/~klinger.w/2010-An-Analysis-of-Articulation-Rates-in-Movies.pdf
	//The average amount of syllables per second in the 14 movies analysed is 5.13994 (0.1945548s/syllable)
	var sanitized = dialogue.replace(/[^\w]/gi, '');
	duration+=((sanitized.length)/3)*0.1945548;
	//duration += syllable(dialogue)*0.1945548;

	//According to a very crude analysis involving watching random movie scenes on youtube and measuring pauses with a stopwatch
	//A comma in the middle of a sentence adds 0.4sec and a full stop/excalmation/question mark adds 0.8 sec.
	var punctuationMatches=dialogue.match(/(\.|\?|\!|\:) |(\, )/g);
	if(punctuationMatches){
		if(punctuationMatches[0]) duration+=0.75*punctuationMatches[0].length;
		if(punctuationMatches[1]) duration+=0.3*punctuationMatches[1].length;
	}
	return duration
}

Apologizes for the large wall of text. I wanted to help make it not confusing about how to tackle this and generally, it would be very helpful to have this included because then one less reason to leave emacs.

You can find betterfountain here and attached is the PDF as mentioned:
AnAnalysisOfArticulationRatesInMovies.pdf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions