[mythtv-commits] Ticket #10214: 88-Key Piano Visualization for MythMusic

MythTV noreply at mythtv.org
Mon Dec 19 04:46:37 UTC 2011


#10214: 88-Key Piano Visualization for MythMusic
----------------------------------------------+----------------------------
     Reporter:  MythTV-Trac@…                 |      Owner:  paulh
         Type:  Patch - Feature               |     Status:  new
     Priority:  minor                         |  Milestone:  unknown
    Component:  Plugin - MythMusic            |    Version:  Trunk Head
     Severity:  medium                        |   Keywords:  visualization,
Ticket locked:  0                             |  new
----------------------------------------------+----------------------------
 Here's the pull request I just put in on GitHub :

 I've created a Piano Visualization to mythmusic.

 Basically, it's a spectrum analyzer that detects frequencies specifically
 at the pitches of a piano keyboard, and then displays the notes being
 pressed on a piano keyboard displayed across the screen.

 It makes interesting viewing (particularly for piano music, of course).
 But it's cool to look at for all styles of music...

 One feature, coding-wise, is that an additional private variable had to be
 added to MainVisual, and two extra virtual functions to VisualBase, so
 that the Piano visualization can inspect every sample of the audio.

 Most visualizations don't inspect every sample of the audio, typically
 looking at 512 samples every 50ms. Since exact pitch detection (on each of
 the 88 keys) takes more than 512 samples, we need to collect data over far
 longer windows (rough calculation : 10 cycles of 440Hz ~=1000 samples at
 CD rates. Lower notes take correspondingly longer).

 The interfaces to all the other visualizations require no changes - no
 extra work is done unless the plugins specifically use it.

 Please let me know if there's anything else you need from me. Licensing
 (of course) to comply with the rest of MythTV.

 And thanks for MythTV generally : I've been a happy user for many years -
 and am glad that I finally have something interesting to give back.

 Martin
 :-)

-- 
Ticket URL: <http://code.mythtv.org/trac/ticket/10214>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center


More information about the mythtv-commits mailing list