source: gs3-installations/mars/trunk/sites/mars/collect/amc-essentia/etc/collectionConfig.xml@ 37029

Last change on this file since 37029 was 37029, checked in by davidb, 15 months ago

Some debugging work around treatment of AV values; Some initial work in moving the AV-chart to a main central area, rather than being part of the AV-Recommendation area

File size: 30.8 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<CollectionConfig xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3 <metadataList>
4 <metadata lang="en" name="creator"></metadata>
5 <metadata lang="en" name="maintainer"></metadata>
6 <metadata lang="en" name="public">true</metadata>
7 </metadataList>
8 <displayItemList>
9 <displayItem assigned="true" lang="en" name="name">AMC-Essentia</displayItem>
10 <displayItem assigned="true" lang="en" name="description">
11 <h4>Overview</h4>
12 <p>
13 This content analysis enhanced digital library collection is
14 comprised of 9960 audio files from the
15 <a href="https://www.australianmusiccentre.com.au/">
16 Australian Music Centre</a>, an organisation
17 which hosts music and sound art from the country's
18 leading contemporary classical, improvisatory and experimental
19 composers.
20 Through this digital library you can use traditional text-based
21 searching and browsing to locate content. You can also try
22 out our experimental arousal-valence based music recommender.
23 </p>
24
25 <h4>Background</h4>
26 <p>
27 Using the <a href="https://essentia.upf.edu/documentation/">Essentia</a>
28 DSP library, a range of audio features are computed. This is
29 combined with the
30 <a href="http://cvml.unige.ch/databases/DEAM/">media-eval
31 Database for Emotional Analysis of Music (DEAM)</a> dataset to
32 produced a Machine Learning model to predict levels of arousal
33 and valence that a section of music evokes. We have chosen
34 REPTree for the predictive modeling, a fast decision tree
35 learner that exploits gain/variance and pruning (with
36 back-fitting) to build a regression tree.
37 </p>
38
39 <p>
40 Next, we have taken this modeling capability and woven it
41 into the <a href="https://greenstone.org">Greenstone3</a>
42 Digital Library software architecture. The act of building
43 the digital library triggers the computation of the audio
44 features, which are then used to predict arousal and valence
45 features throughout each audio file, currently set to using
46 a window of 6 seconds and an overlap of 50%. This is stored
47 as metadata within the built digital library, alongside
48 the more regular metadata values for title and artist.
49 </p>
50
51 <p>Finally, using
52 Greenstone3's <a href="https://files.greenstone.org/technical/gs3design.pdf">extensible
53 service-based architecture</a> we have enriched the user's experience
54 of listening to a work in the digital library collection. The most prominent
55 feature is a frequency spectrogram of the work, with a timeline bar that
56 moves through the work as it is played. The timeline bar visually shows the
57 computed level of arousal by broadening the width of the timeline bar as the
58 level of arousal rises. The timeline bar is rendered in white, varying
59 the brightness used to reflect the computed level of valence.
60 </p>
61
62 <p>
63 Below the AV frequency visualizer, is a <i>Recommend</i>
64 button. If a user clicks on this, then—again leveraging the
65 service-based architecture to the digital library software—the
66 values of arousal and valence for the passage of work being
67 played are used to select other works in the digital library
68 collection that share similar features.
69 These are added at the bottom of
70 the page as recommendations that the user might also like
71 to listen to.
72 </p>
73
74 <!--
75 <p>
76 This collection shows the capabilities of the
77 <a href="https://essentia.upf.edu/documentation/">Essentia</a> DSP library
78 in combination with Greenstone3, based on the
79 9960 MP3 files from
80 <a href="https://www.australianmusiccentre.com.au/">Australian Music Centre</a>
81 </p>
82
83 <p>
84 When the digital library collection is built, Essentia is used to compute
85 a range of audio fetures commonly use in Music Information Retrieval (MIR) for
86 content analysis based techniques. These features are bound to
87 the document in the digital library correspondig to the source MP3 file.
88 </p>
89 -->
90
91 </displayItem>
92 </displayItemList>
93 <search type="lucene">
94 <level name="document">
95 <displayItem lang="en" name="name">document</displayItem>
96 </level>
97<!--
98 <level name="section">
99 <displayItem lang="en" name="name">section</displayItem>
100 </level>
101-->
102 <defaultLevel name="document"/>
103 <index name="dc.Title,dc.Creator,amc.title,amc.artist">
104 <displayItem lang="en" name="name">all fields</displayItem>
105 </index>
106 <index name="dc.Title,amc.title">
107 <displayItem lang="en" name="name">titles</displayItem>
108 </index>
109 <index name="dc.Creator,amc.artist">
110 <displayItem lang="en" name="name">artists</displayItem>
111 </index>
112 <defaultIndex name="dc.Title,dc.Creator,amc.title,amc.artist"/>
113 <searchType name="plain"/>
114 <searchType name="simpleform"/>
115 <searchType name="advancedform"/>
116 <format>
117 <gsf:template match="documentNode">
118
119 <xsl:choose>
120 <xsl:when test="/page/pageResponse/service/@name = 'AudioQuery'">
121
122 <gsf:variable name="frameOffset">
123 <xsl:value-of select="@frameOffset"/>
124 </gsf:variable>
125 <gsf:variable name="rank">
126 <xsl:value-of select="@rank"/>
127 </gsf:variable>
128
129 <td valign="top">
130 <gsf:icon type="document"/>
131 </td>
132 <td>
133
134 <a class="AVRecommendation">
135 <xsl:choose>
136 <xsl:when test="/page/pageResponse/collection/@name">
137 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;d=<xsl:value-of select="@nodeID"/>&amp;dt=<xsl:value-of select="@docType"/>&amp;p.frameOffset=<xsl:value-of select="@frameOffset"/>&amp;p.a=q&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/>&amp;hl=on&amp;ed=1#<xsl:value-of select="@nodeID"/></xsl:attribute>
138 </xsl:when>
139 <xsl:when test="@collection">
140 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="@collection"/>&amp;d=<xsl:value-of select="@nodeID"/>&amp;dt=<xsl:value-of select="@docType"/>p.frameOffset=<xsl:value-of select="@frameOffset"/>&amp;p.a=q&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/>&amp;hl=on&amp;ed=1#<xsl:value-of select="@nodeID"/></xsl:attribute>
141 </xsl:when>
142 </xsl:choose>
143 <xsl:attribute name="data-arousalval"><xsl:value-of select="@arousalVal"/></xsl:attribute>
144 <xsl:attribute name="data-valenceval"><xsl:value-of select="@valenceVal"/></xsl:attribute>
145 <xsl:attribute name="data-frameoffset"><xsl:value-of select="@frameOffset"/></xsl:attribute>
146
147 <gsf:metadata name="amc.title"/>
148 by <gsf:metadata name="amc.artist"/>
149 </a>
150
151 <span style="font-style: italics; font-size: 100%" >
152 (Matching offset @ <xsl:value-of select="@frameOffset"/> secs)
153 </span>
154
155 </td>
156 </xsl:when>
157 <xsl:otherwise>
158 <td valign="top">
159 <gsf:link type="document" extraLinkArgs="renderWave=0">
160 <gsf:icon type="document"/>
161 </gsf:link>
162 </td>
163 <td>
164
165 <gsf:link type="document" extraLinkArgs="renderWave=0">
166 <gsf:metadata name="amc.title"/>
167 by <gsf:metadata name="amc.artist"/>
168 </gsf:link>
169 <!--
170 <gsf:switch>
171 <gsf:metadata name="Title" select="ancestors" separator=": "/>
172 <gsf:when test="exists">
173 <gsf:metadata name="Title" select="ancestors" separator=": "/>:
174 </gsf:when>
175 </gsf:switch>
176 <gsf:link type="document">
177 <gsf:metadata name="Title"/>
178 </gsf:link>
179 -->
180 </td>
181 </xsl:otherwise>
182 </xsl:choose>
183
184 <!--
185 <xsl:if test="/page/pageResponse/service/@name = 'AudioQuery'">
186 <span style="font-style: italics; font-size: 90%" >
187 Matching offset @
188 <script>
189 <xsl:text disable-output-escaping="yes">
190 var frameOffsetStr="</xsl:text><xsl:value-of select="@frameOffset"/><xsl:text disable-output-escaping="yes">";
191 var frameOffsetList = frameOffsetStr.split(",");
192 for(i=0; i &lt; frameOffsetList.length; i++) {
193 var frameOffset = frameOffsetList[i];
194 var offsetInSecs=(250*frameOffset)/1000.0;
195 if (i &gt; 0) { document.write(", "); }
196 document.write(offsetInSecs.toFixed(2));
197 }
198 </xsl:text>
199 </script> secs
200 </span>
201 </xsl:if>
202
203 -->
204 </gsf:template>
205 </format>
206 </search>
207
208 <!--
209 <search type="wekaDB" orthogonal="true" />
210 -->
211
212 <search type="wekaDB" orthogonal="true" serviceRack="GS2WekaDBSearch" />
213
214 <!--
215 <search type="wekaDB" orthogonal="true" serviceRack="GS2WekaAVRecommender" />
216
217 <search type="wekaAVFeatures" orthogonal="true" serviceRack="GS2WekaAVRecommender" />
218 -->
219
220 <infodb type="jdbm"/>
221
222 <import>
223 <pluginList>
224 <plugin name="ZIPPlugin"/>
225 <plugin name="GreenstoneXMLPlugin"/>
226
227 <plugin name="EmbeddedMetadataPlugin"/>
228 <plugin name="AMCMetadataJSONPlugin"/>
229
230 <plugin name="EssentiaPlugin">
231 <option name="-block_exp" value=".*\.csv$"/>
232 <!--
233 <option name="-compute_mir_features" value="true"/>
234 -->
235
236 <option name="-compute_essentia_features" value="true"/>
237 <!--
238 <option name="-retrieve_mir_metadata" value="true"/>
239 -->
240 <option name="-enable_cache"/>
241 </plugin>
242
243 <plugin name="TextPlugin"/>
244 <plugin name="HTMLPlugin"/>
245 <plugin name="EmailPlugin"/>
246 <plugin name="PDFv2Plugin"/>
247 <plugin name="RTFPlugin"/>
248 <plugin name="WordPlugin"/>
249 <plugin name="PostScriptPlugin"/>
250 <plugin name="PowerPointPlugin"/>
251 <plugin name="ExcelPlugin"/>
252 <plugin name="ImagePlugin"/>
253 <plugin name="ISISPlugin"/>
254 <plugin name="NulPlugin"/>
255 <plugin name="MetadataXMLPlugin"/>
256 <plugin name="ArchivesInfPlugin"/>
257 <plugin name="DirectoryPlugin"/>
258 </pluginList>
259 </import>
260 <importOption name="OIDtype" value="assigned"/>
261 <importOption name="OIDmetadata" value="amc.id"/>
262
263 <browse>
264
265 <classifier name="AZCompactList">
266 <option name="-metadata" value="dc.Title;amc.title;ex.amc.title;Title"/>
267 <option name="-mingroup" value="2"/>
268 </classifier>
269 <classifier name="AZCompactList">
270 <option name="-metadata" value="dc.Creator,amc.artist,ex.amc.artist"/>
271 <option name="-buttonname" value="Artists"/>
272 <option name="-mingroup" value="1"/>
273 <option name="-minnesting" value="40"/>
274 </classifier>
275 <format>
276
277 <xsl:template name="gsf-link-render-wave">
278 <xsl:variable name="collNameLocal" select="/page/pageResponse/collection/@name"/>
279 <xsl:variable name="opt-title">
280 <xsl:choose>
281 <xsl:when test="@title">
282 <xsl:attribute name="title">
283 <xsl:value-of select="@title"/>
284 </xsl:attribute>
285 </xsl:when>
286 <xsl:when test="@titlekey">
287 <xsl:attribute name="title">
288 <xsl:value-of disable-output-escaping="yes" select="util:getCollectionText($collNameLocal, $site_name, /page/@lang, '{@titlekey}')"/>
289 </xsl:attribute>
290 </xsl:when>
291 </xsl:choose>
292 </xsl:variable>
293
294 <a>
295 <xsl:if test="@target">
296 <xsl:attribute name='target'>
297 <xsl:value-of select='@target'/>
298 </xsl:attribute>
299 </xsl:if>
300
301
302 <xsl:copy-of select="$opt-title"/>
303 <xsl:attribute name="href">
304 <xsl:value-of select='$library_name'/>
305 <xsl:text>/collection/</xsl:text>
306 <xsl:value-of select='/page/pageResponse/collection/@name'/>
307 <xsl:text>/document/</xsl:text>
308 <xsl:choose>
309 <xsl:when test="@OID">
310 <xsl:value-of select="@OID"/>
311 </xsl:when>
312 <xsl:when test="@OIDmetadata">
313 <xsl:variable name="OIDmeta" select="@OIDmetadata"/>
314 <xsl:value-of select="(.//metadataList)[last()]/metadata[@name='{$OIDmeta}']"/>
315 </xsl:when>
316 <xsl:otherwise>
317 <xsl:value-of select='@nodeID'/>
318 </xsl:otherwise>
319 </xsl:choose>
320 <xsl:text>?renderWave=1</xsl:text>
321 </xsl:attribute>
322 [Traditional Wave Display]
323 </a>
324 </xsl:template>
325
326 <gsf:template match="documentNode">
327 <td valign="top">
328 <gsf:link type="document" extraLinkArgs="renderWave=0">
329 <gsf:icon type="document"/>
330 </gsf:link>
331 </td>
332 <td valign="top">
333 <gsf:link type="source">
334 <gsf:choose-metadata>
335 <gsf:metadata name="thumbicon"/>
336 <gsf:metadata name="srcicon"/>
337 </gsf:choose-metadata>
338 </gsf:link>
339 </td>
340 <td valign="top">
341 <gsf:link type="document" extraLinkArgs="renderWave=0">
342 <gsf:choose-metadata>
343 <gsf:metadata name="dc.Title"/>
344 <gsf:metadata name="amc.title"/>
345 <gsf:metadata name="exp.Title"/>
346 <gsf:metadata name="Title"/>
347 <gsf:default>Untitled</gsf:default>
348 </gsf:choose-metadata>
349 <gsf:space />
350 </gsf:link>
351
352 <!--
353 <gsf:link type="document">[Experimental Spectral Frequency]</gsf:link>
354
355 <gsf:space />
356 -->
357
358 <!--
359 <gsf:variable name="AssocEssentiaJSON"><gsf:OID/>-AssocEssentia.json</gsf:variable>
360 <a download="{$AssocEssentiaJSON}" href="{$httpCollection}/index/assoc/{$assocFilePath}/{$AssocEssentiaJSON}">Download Audio Features</a>
361 -->
362<!--
363 <xsl:call-template name="gsf-link-render-wave"/>
364-->
365 <!--
366 <span id="renderWave">
367 <gsf:link type="document">[Traditional Wave Display]</gsf:link>
368 </span>
369
370
371 <gsf:script>
372 var $alink = $('#renderWave a');
373 var alink_href = $alink.attr('href');
374 if (!alink_href.includes('renderWave')) {
375 alink_href += '?renderWave=1';
376 $alink.attr('href',alink_href);
377 }
378 </gsf:script>
379
380 -->
381
382 </td>
383 </gsf:template>
384 <gsf:template match="classifierNode">
385 <td valign="top">
386 <gsf:link type="classifier">
387 <gsf:icon type="classifier"/>
388 </gsf:link>
389 </td>
390 <td valign="top">(<gsf:metadata name="numleafdocs"/>)</td>
391 <td valign="top">
392 <gsf:link type="source">
393 <gsf:choose-metadata>
394 <gsf:metadata name="thumbicon"/>
395 <gsf:metadata name="srcicon"/>
396 </gsf:choose-metadata>
397 </gsf:link>
398 </td>
399 <td valign="top">
400 <gsf:link type="classifier">
401 <gsf:choose-metadata>
402 <gsf:metadata name="dc.Title"/>
403 <gsf:metadata name="amc.title"/>
404 <gsf:metadata name="exp.Title"/>
405 <gsf:metadata name="Title"/>
406 <gsf:default>Untitled</gsf:default>
407 </gsf:choose-metadata>
408 </gsf:link>
409 <gsf:switch>
410 <gsf:metadata name="Source"/>
411 <gsf:when test="exists">
412 <br/>
413 <i>(<gsf:metadata name="Source"/>)</i>
414 </gsf:when>
415 </gsf:switch>
416 </td>
417 </gsf:template>
418 <gsf:template match="classifierNode" mode="horizontal">
419 <gsf:link type="horizontal">
420 <gsf:metadata name="Title"/>
421 </gsf:link>
422 </gsf:template>
423 </format>
424<!--
425
426 <classifier name="List">
427 <option name="-metadata" value="dc.Title;Title"/>
428 <option name="-partition_type_within_level" value="approximate_size"/>
429 <option name="-removeprefix" value="&quot;"/>
430 </classifier>
431 <classifier name="AZCompactList">
432 <option name="-metadata" value="dc.Type.genre"/>
433 <option name="-buttonname" value="Genre"/>
434 </classifier>
435 <format>
436 <gsf:template match="documentNode">
437 <td valign="top">
438 <gsf:link type="document">
439 <gsf:icon type="document"/>
440 </gsf:link>
441 </td>
442 <td valign="top">
443 <gsf:metadata name="srclink"/>
444 <gsf:choose-metadata>
445 <gsf:metadata name="thumbicon"/>
446 <gsf:metadata name="srcicon"/>
447 </gsf:choose-metadata>
448 <gsf:metadata name="/srclink"/>
449 </td>
450 <td valign="top">
451 <gsf:choose-metadata>
452 <gsf:metadata name="dc.Title"/>
453 <gsf:metadata name="exp.Title"/>
454 <gsf:metadata name="Title"/>
455 <gsf:default>Untitled</gsf:default>
456 </gsf:choose-metadata>
457 <gsf:switch>
458 <gsf:metadata name="Source"/>
459 <gsf:when test="exists">
460 <br/>
461 <i>(<gsf:metadata name="Source"/>)</i>
462 </gsf:when>
463 </gsf:switch>
464 </td>
465 </gsf:template>
466 <gsf:template match="classifierNode">
467 <td valign="top">
468 <gsf:link type="classifier">
469 <gsf:icon type="classifier"/>
470 </gsf:link>
471 </td>
472 <td valign="top">
473 <gsf:metadata name="srclink"/>
474 <gsf:choose-metadata>
475 <gsf:metadata name="thumbicon"/>
476 <gsf:metadata name="srcicon"/>
477 </gsf:choose-metadata>
478 <gsf:metadata name="/srclink"/>
479 </td>
480 <td valign="top">
481 <gsf:choose-metadata>
482 <gsf:metadata name="dc.Title"/>
483 <gsf:metadata name="exp.Title"/>
484 <gsf:metadata name="Title"/>
485 <gsf:default>Untitled</gsf:default>
486 </gsf:choose-metadata>
487 <gsf:switch>
488 <gsf:metadata name="Source"/>
489 <gsf:when test="exists">
490 <br/><i>(<gsf:metadata name="Source"/>)</i>
491 </gsf:when>
492 </gsf:switch>
493 </td>
494 </gsf:template>
495 <gsf:template match="classifierNode" mode="horizontal">
496 <gsf:link type="horizontal">
497 <gsf:metadata name="Title"/>
498 </gsf:link>
499 </gsf:template>
500 </format>
501 -->
502</browse>
503
504
505 <display>
506 <format>
507 <gsf:option name="TOC" value="false"/>
508 <gsf:template name="documentHeading">
509 <!-- title will be dsiplayed in playbar at top of page, so supress showing title here -->
510 <!--
511 <gsf:script src="interfaces/{$interface_name}/js/direct-edit-source.js"/>
512 <xsl:call-template name="init-direct-edit"/>
513 -->
514 </gsf:template>
515
516 <gsf:template name="documentContentXXX">
517 <xsl:param name="collName"/>
518 <xsl:variable name="docID" select="@docID"/>
519 </gsf:template>
520
521<!--
522 <xsl:variable name="httpCollection"><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/></xsl:variable>
523-->
524
525
526
527
528
529 <xsl:template name="documentContent">
530 <xsl:variable name="httpCollection">library/sites/<xsl:value-of select="$site_name"/>/collect/<xsl:value-of select="/page/pageResponse/collection/@name"/></xsl:variable>
531 <xsl:variable name="assocFilePath"><gsf:metadata name="assocfilepath" select="root"/></xsl:variable>
532
533 <xsl:variable name="cgiargFrameOffset">
534 <xsl:value-of select="/page/pageRequest/paramList/param[@name='p.frameOffset']/@value"/>
535 </xsl:variable>
536 <xsl:variable name="lastfmtrackurl">
537 <gsf:metadata name="dc.Identifier.lastfmtrackurl"/>
538 </xsl:variable>
539 <xsl:variable name="imageUrls">
540 <gsf:metadata multiple="true" name="EchoNest.Artist-RelatedImage" separator="&amp;quot;, &amp;quot;"/>
541 </xsl:variable>
542 <xsl:variable name="echonestid">
543 <gsf:metadata name="dc.Identifier"/>
544 </xsl:variable>
545
546 <!--
547 <xsl:variable name="assocFilePath"><gsf:metadata name="assocfilepath" select="root"/></xsl:variable>
548 -->
549
550 <gsf:script src="{$httpCollection}/js/av_document.js"/>
551
552 <div id="metadata-documenttext" class="documenttext" style="padding-bottom: 35px; width:100%;">
553 <style>
554 .doc-metadata td { padding: 7px; }
555 </style>
556 <table class="doc-metadata" style="width: 100%;">
557 <tbody>
558 <tr style="background-color:#C4CBA1">
559 <td style="width: 4rem;">
560 Title:
561 </td>
562 <td>
563 <gsf:metadata name="amc.title"/>
564 </td>
565 </tr>
566
567 <tr style="background-color:#fff">
568 <td>Artist:</td>
569 <td><gsf:metadata name="amc.artist"/></td>
570 </tr>
571
572 <!--
573 <tr style="background-color:#C4CBA1">
574 <td>Essentia MFCC Features:</td><td><a href="{$httpCollection}/index/assoc/{$assocFilePath}/pessentia.json">Download</a></td>
575 </tr>
576
577 <tr style="background-color:#fff">
578 <td>Weka Predicted Arousal-Valence Features:</td><td><a href="{$httpCollection}/index/assoc/{$assocFilePath}/av.json">Download</a></td>
579 </tr>
580 -->
581
582 </tbody>
583 </table>
584 </div>
585
586
587 <div id="playervisual-documenttext" class="documenttext" style="position: relative;">
588 <div id="ajax-loaded-assocfilepath" style="display: none;"><gsf:metadata name="assocfilepath" pos="first"/></div>
589
590 <style>
591 #hide-av-chart {
592 display: none;
593 }
594
595 span.display-view-modes, a.display-view-modes {
596 padding: 5px;
597 }
598
599 .display-view-modes:hover {
600 background-color: #b0b0b0;
601 }
602 </style>
603
604 <div style="position: absolute; right: 24px; top: -23px; z-index: 1000; font-size: 90%; font-styleXX:italic">
605 <span style="display: inline-block">
606 <a id="switch-to-waveform" class="display-view-modes" stylexx="display: none;" href="">Switch to Waveform</a>
607 <a id="switch-to-spectrogram" class="display-view-modes" stylexx="display: none;" href="">Switch to Spectrogram</a>
608 </span>
609 <span style="display: inline-block; width: 140px;">
610 | <span id="show-av-chart" class="display-view-modes" onclick="return showAVChart();">Display AV Chart</span>
611 <span id="hide-av-chart" class="display-view-modes" onclick="return hideAVChart();">Hide AV Chart</span>
612 </span>
613 <span style="display: inline-block">
614 | <span class="display-view-modes" onclick="alert('To be implemented')">&#x23fa; Record <i>your</i> AV experience</span>
615 </span>
616 </div>
617
618 <style>
619 #wave-timeline {
620 background-color: #fff;
621 }
622 </style>
623
624 <div id="demo">
625 <div id="waveform">
626 <!-- Here be the waveform -->
627 <xsl:text> </xsl:text>
628 </div>
629 <div id="wave-timeline"><xsl:text> </xsl:text></div>
630 <div id="wave-spectrogram"><xsl:text> </xsl:text></div>
631 <div id="wave-harmonic-pitch-class-profile"><xsl:text> </xsl:text></div>
632
633 <div id = "av-display" style="margin: auto; width: 200px;padding-top: 18px; display: none;">
634
635 <div id="arousal-display" style="display: inline-block; width: 95px;">
636 Arousal:
637 <span id="arousal-val">
638 0
639 </span>
640 </div>
641
642 <div id="valence-display" style="display: inline-block; width: 95px;">
643 Valence
644 <span id="valence-val">
645 0
646 </span>
647 </div>
648 </div>
649
650
651 <div>
652 <style>
653 .controls .btn {
654 margin-bottom: 25px;
655 }
656 </style>
657
658 <div id="av-timelinebar-help" style="display: none; background-color: rgb(255,255,255); padding: 6px; position: absolute; right: 4px; font-style: italic; font-size: 90%; padding-top: 0.5rem;">
659 Audio player Arousal-Valence timeline bar:
660 <ul style="margin: 0.2rem;">
661 <li>Width corresponds to valence</li>
662 <li>Intensity of white corresponds to arousal</li>
663 </ul>
664 </div>
665
666 <div class="controls" style="padding-bottom: 0px;">
667 <button class="btn btn-primary" onclick="AVSeekTo(0)">
668 <i id="ws-return-to-start-icon" class="fa-solid fa-backward-fast" ><xsl:text> </xsl:text></i>
669 Return to Start
670 </button>
671
672 <button class="btn btn-primary" data-action="play" style="display: none;">
673 <i class="glyphicon glyphicon-play"><xsl:text> </xsl:text></i>
674 Play /
675 <i class="glyphicon glyphicon-pause"><xsl:text> </xsl:text></i>
676 Pause
677 </button>
678
679
680 <button id="ws-playpause" class="btn btn-primary" onclick="AVPlayPause()">
681 <span id="ws-playpause-label" style="display: inline-block; width: 3rem;">Play</span>
682 <span style="display: inline-block; width: 1rem;">
683 <i id="ws-play-icon" class="fa-solid fa-play" ><xsl:text> </xsl:text></i>
684 <i id="ws-pause-icon" class="fa-solid fa-pause" style="display:none"><xsl:text> </xsl:text></i>
685 </span>
686 </button>
687
688 </div>
689
690 </div>
691
692 </div>
693
694
695 <div id="av-chart-outerdiv" style="display: none;">
696 <hr/>
697 <div style="width: 500px; margin: auto;">
698 <div id="av-chart-div" style="position: relative; height: 325px; width: 300px; margin: auto">
699 <div style="position: absolute; top: 0; left: 0; width: 300px; height: 300px; pointer-events: none;">
700 <canvas id="av-chart-canvas" style="XXwidth: 100%; height: 300px;">
701 Your browser does not support the canvas element
702 </canvas>
703 </div>
704 <img id="av-chart-img" width="300"
705 style="cursor: crosshair; background-colorXX: #fefefe;"
706 src="{$library_name}/sites/{$site_name}/collect/{$collName}/images/av-diagram-bw.svg" />
707 <div>
708 <i>Click inside the Arousal-Valence visualisation above to initiate an AV-based recommendation.</i>
709 </div>
710
711 </div>
712 </div>
713 </div>
714
715 <gsf:variable name="mp3url"><xsl:value-of select="$httpCollection"/>/index/assoc/<xsl:value-of select="$assocFilePath"/>/audio.mp3</gsf:variable>
716
717 <script src="ext/audio/wavesurfer-player.js">
718 <xsl:text> </xsl:text>
719 </script>
720
721 <gsf:script>
722 //var currentPosIsZero = true;
723
724 document.addEventListener('DOMContentLoaded', function() {
725 postInitWavesurfer(wavesurfer);
726 });
727 </gsf:script>
728
729 </div>
730
731
732
733 <gsf:variable name="docID"><xsl:value-of select="@nodeID"/></gsf:variable>
734
735 <hr/>
736 <div id="recommendationArea">
737
738 <form id="av-query-form" action="{$library_name}" method="get" name="QueryForm">
739 <input name="a" type="hidden" value="q"/>
740 <input name="sa" type="hidden">
741 <xsl:attribute name="value">
742 <xsl:value-of select="/page/pageRequest/@subaction"/>
743 </xsl:attribute>
744 </input>
745 <input name="rt" type="hidden" value="rd"/>
746 <input name="s" type="hidden" value="AudioQuery"/>
747 <input name="c" type="hidden" value="{$collName}"/>
748 <xsl:if test="not(paramList/param[@name='startPage'])">
749 <input name="startPage" type="hidden" value="1"/>
750 </xsl:if>
751 <xsl:choose>
752 <xsl:when test="/page/pageRequest/paramList/param[@name = 's1.maxDocs']">
753 <input name="s1.maxDocs" type="hidden">
754 <xsl:attribute name="value">
755 <xsl:value-of select="/page/pageRequest/paramList/param[@name = 's1.maxDocs']/@value"/>
756 </xsl:attribute>
757 </input>
758 </xsl:when>
759 <xsl:otherwise>
760 <input name="s1.maxDocs" type="hidden" value="5"/>
761 </xsl:otherwise>
762 </xsl:choose>
763 <xsl:choose>
764 <xsl:when test="/page/pageRequest/paramList/param[@name = 's1.hitsPerPage']">
765 <input name="s1.hitsPerPage" type="hidden">
766 <xsl:attribute name="value">
767 <xsl:value-of select="/page/pageRequest/paramList/param[@name = 's1.hitsPerPage']/@value"/>
768 </xsl:attribute>
769 </input>
770 </xsl:when>
771 <xsl:otherwise>
772 <input name="s1.hitsPerPage" type="hidden" value="5"/>
773 </xsl:otherwise>
774 </xsl:choose>
775
776 <!--
777 <input name="q" type="hidden" value="{$assocFilePath}" />
778 -->
779 <input name="q" type="hidden" value="{$docID}" />
780 <input name="s1.query" type="hidden" value="{$docID}" />
781
782 <input name="s1.offset" type="hidden" value="0"/>
783 <input name="s1.length" type="hidden" value="200"/>
784
785 <input name="s1.arousal" type="hidden" value="0"/>
786 <input name="s1.valence" type="hidden" value="0"/>
787
788 <div style="font-style: italic;">
789 <span id="makeRecommendationFrom">
790 Based on the start of this musical/sound art work:
791 </span>
792 <input onclick="return preSubmit(this.form);" type="submit" value="Make Arousal-Valence Recommendation"/>
793 <div id="makeRecommendationFrom-AV" style="font-style: italics; font-size: 90%;">
794 <xsl:text> </xsl:text>
795 </div>
796 </div>
797
798 <div style="font-style: italics; display: none;">
799 Make arousal-valence music recommendation based on content @ <span id="audioCurrentPos">0 secs
800 </span>:
801 <!--,
802 with excerpt lasting <span class="editable-offset" id="audioWindowDuration" style="cursor: pointer; border: 1px solid black; padding: 3px; width: 200px; min-width: 200px;">3.0</span> secs
803 -->
804 </div>
805 </form>
806 <div>
807 <!--
808 <div id="av-chart-div" style="position: relative; height: 325px; width: 300px; float: right; display: none;">
809 <div style="position: absolute; top: 0; left: 0; width: 300px; height: 300px; pointer-events: none;">
810 <canvas id="av-chart-canvas" style="XXwidth: 100%; height: 300px;">
811 Your browser does not support the canvas element
812 </canvas>
813 </div>
814 <img id="av-chart-img" width="300"
815 style="cursor: crosshair; background-colorXX: #fefefe;"
816 src="{$library_name}/sites/{$site_name}/collect/{$collName}/images/av-diagram-bw.svg" />
817 <div>
818 <i>Or click inside the Arousal-Valence visualisation above to initiate a new AV-based recommendation.</i>
819 </div>
820
821 </div>
822 -->
823 <div id="resultsAreaDiv" style="padding-top: 1rem; min-height: 325px; display: none;">
824 <xsl:text> </xsl:text>
825 </div>
826 </div>
827
828 </div>
829 <hr/>
830 <!--
831 <script>
832 <xsl:text disable-output-escaping="yes">
833 </xsl:text>
834 </script>
835 -->
836
837 </xsl:template>
838
839 </format>
840 </display>
841
842 <replaceListRef id="gs2-standard"/>
843 <serviceRackList>
844 <!--
845 <serviceRack name="GS2WekaDBSearch">
846 </serviceRack>
847 -->
848 <!--
849 <serviceRack name="GS2WekaAVRecommender">
850 </serviceRack>
851 -->
852
853 <!-- comment out the following serviceRack if you want to disable OAI for this collection -->
854 <serviceRack name="OAIPMH">
855 <ListMetadataFormats>
856 <!--What metadata sets to support is collection specific. To support other metadata schema, simply add a metadataFormat element here.
857 The support of unqualified Dublin Core metadata set is mandatory in the oai specification.
858 -->
859 <metadataFormat metadataPrefix="oai_dc">
860 <metadataPrefix>oai_dc</metadataPrefix>
861 <schema>http://www.openarchives.org/OAI/2.0/oai_dc.xsd</schema>
862 <metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/</metadataNamespace>
863 <!--<metadataElements>dc.Title,dc.Creator,dc.Subject,dc.Description,dc.Publisher,dc.Contributor,dc.Date,dc.Type,dc.Format,dc.Identifier,dc.Source,dc.Language,dc.Relation,dc.Coverage,dc.Rights</metadataElements>
864 -->
865 <mappingList>
866 <!--
867 The mapping is in the form: <publicly supported metadata name>,<mapped metadata name>, short as <A>,<B>
868 The first metadata name is medatory; if there is no mapped name followed, then the first name must be used by the records and
869 searchable in the database, otherwise it is the mapped name stored in the database. The number of mapping elements matches the
870 number of external metadata of the records. If only one name is present, the returned metadata will use this name plus the retrieved value;
871 if both <A>,<B> are present, the returned metadata will use <A>'s name plus <B>'s value retrieved from database.
872
873 **Bear in mind: if this mapping list is not present, the standard dc. metadata names (15 in total) will be used to retrieve metadata in the database.
874
875 **The only case when this mapping is not present is that: 1. this metadata format is oai_dc; 2. the metadata is also stored in the database by Dublin Core's names.
876 -->
877 <mapping>dc.Title,Title</mapping>
878 <!-- This mapping example means that the dc.Title is requested and the value of the metadata Title, which is used in this repository, is returned as response. -->
879 </mappingList>
880 </metadataFormat>
881 </ListMetadataFormats>
882 </serviceRack>
883 </serviceRackList>
884</CollectionConfig>
Note: See TracBrowser for help on using the repository browser.