diff options
| author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-11-19 11:20:38 +0100 | 
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-11-26 07:44:58 +0100 | 
| commit | 0d271a79c702d4b986809cb3acfbe8911bba892e (patch) | |
| tree | 9379e7479274c04dbb103472ed7ccd8acafaf362 /tools/perf/scripts/python/bin/mem-phys-addr-record | |
| parent | ab6bad0a4db69009fb7b2a50b8929b2bcaf7824d (diff) | |
media: vidtv: fix some notes at the tone generator
The sheet music used to generate the tones had a few
polyphonic notes. Due to that, its conversion to a
tones sequence had a few errors.
Also, due to a bug at the tone generator, it was missing
the pause at the initial compass.
Fix them.
While here, reduce the compass to 100bpm.
The music was converted from a Music XML file using
this small script:
<snip>
my $count = 0;
my $silent = 0;
my $note;
my $octave;
print "\t";
while (<>) {
	$note = $1 if (m,\<step\>(.*)\</step\>,);
	$octave = "_$1" if (m,\<octave\>(.*)\</octave\>,);
	if (m,\<alter\>1\</alter\>,) {
		$note .= "S";
		$sharp = 1;
	}
	if (m,\<rest/\>,) {
		$note = "SILENT";
		$silent = 1;
	}
	if (m,\<duration\>(.*)\</duration\>,) {
		printf "{ NOTE_${note}${octave}, %d},", $1 * 128 / 480;
		$count++;
		if ($silent || $count >= 3) {
			print "\n\t";
			$count = 0;
			$silent = 0;
		} else {
			print " ";
			print " " if (!$sharp);
		}
		$sharp = 0;
		$note = "";
		$octave = "";
	};
};
print "\n";
</snip>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/mem-phys-addr-record')
0 files changed, 0 insertions, 0 deletions
