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

Last change on this file since 36965 was 36965, checked in by davidb, 17 months ago

Rough plotting of AV val on plot

File size: 28.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">
160 <gsf:icon type="document"/>
161 </gsf:link>
162 </td>
163 <td>
164
165 <gsf:link type="document">
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">
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">
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 class="documenttext" style="padding-bottom: 20px; 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 class="documenttext" style="position: relative;">
588
589 <div style="position: absolute; right: 24px; top: -18px; z-index: 1000; font-size: 90%; font-style:italic">
590 <a id="switch-to-waveform" stylexx="display: none;" href="">Switch to Waveform</a>
591 <a id="switch-to-spectrogram" stylexx="display: none;" href="">Switch to Spectrogram</a>
592 </div>
593
594 <style>
595 #wave-timeline {
596 background-color: #fff;
597 }
598 </style>
599
600 <div id="demo">
601 <div id="waveform">
602 <!-- Here be the waveform -->
603 <xsl:text> </xsl:text>
604 </div>
605 <div id="wave-timeline"><xsl:text> </xsl:text></div>
606 <div id="wave-spectrogram"><xsl:text> </xsl:text></div>
607 <div id="wave-harmonic-pitch-class-profile"><xsl:text> </xsl:text></div>
608
609 <div id = "av-display" style="margin: auto; width: 200px;padding-top: 18px; display: none;">
610
611 <div id="arousal-display" style="display: inline-block; width: 95px;">
612 Arousal:
613 <span id="arousal-val">
614 0
615 </span>
616 </div>
617
618 <div id="valence-display" style="display: inline-block; width: 95px;">
619 Valence
620 <span id="valence-val">
621 0
622 </span>
623 </div>
624 </div>
625
626
627 <div>
628 <style>
629 .controls .btn {
630 margin-bottom: 25px;
631 }
632 </style>
633
634 <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;">
635 Audio player Arousal-Valence timeline bar:
636 <ul style="margin: 0.2rem;">
637 <li>Width corresponds to valence</li>
638 <li>Intensity of white corresponds to arousal</li>
639 </ul>
640 </div>
641
642 <div class="controls" style="padding-bottom: 0px;">
643 <button class="btn btn-primary" onclick="AVSeekTo(0)">
644 <i id="ws-return-to-start-icon" class="fa-solid fa-backward-fast" ><xsl:text> </xsl:text></i>
645 Return to Start
646 </button>
647
648 <button class="btn btn-primary" data-action="play" style="display: none;">
649 <i class="glyphicon glyphicon-play"><xsl:text> </xsl:text></i>
650 Play /
651 <i class="glyphicon glyphicon-pause"><xsl:text> </xsl:text></i>
652 Pause
653 </button>
654
655
656 <button id="ws-playpause" class="btn btn-primary" onclick="AVPlayPause()">
657 <span id="ws-playpause-label" style="display: inline-block; width: 3rem;">Play</span>
658 <span style="display: inline-block; width: 1rem;">
659 <i id="ws-play-icon" class="fa-solid fa-play" ><xsl:text> </xsl:text></i>
660 <i id="ws-pause-icon" class="fa-solid fa-pause" style="display:none"><xsl:text> </xsl:text></i>
661 </span>
662 </button>
663
664 </div>
665
666 </div>
667
668 </div>
669
670 <gsf:variable name="mp3url"><xsl:value-of select="$httpCollection"/>/index/assoc/<xsl:value-of select="$assocFilePath"/>/audio.mp3</gsf:variable>
671
672 <script src="ext/audio/wavesurfer-player.js">
673 <xsl:text> </xsl:text>
674 </script>
675
676 <gsf:script>
677 //var currentPosIsZero = true;
678
679
680
681 document.addEventListener('DOMContentLoaded', function() {
682 postInitWavesurfer(wavesurfer);
683 });
684 </gsf:script>
685
686 </div>
687
688
689
690 <gsf:variable name="docID"><xsl:value-of select="@nodeID"/></gsf:variable>
691
692 <hr/>
693 <div id="recommendationArea">
694
695 <form id="av-query-form" action="{$library_name}" method="get" name="QueryForm">
696 <input name="a" type="hidden" value="q"/>
697 <input name="sa" type="hidden">
698 <xsl:attribute name="value">
699 <xsl:value-of select="/page/pageRequest/@subaction"/>
700 </xsl:attribute>
701 </input>
702 <input name="rt" type="hidden" value="rd"/>
703 <input name="s" type="hidden" value="AudioQuery"/>
704 <input name="c" type="hidden" value="{$collName}"/>
705 <xsl:if test="not(paramList/param[@name='startPage'])">
706 <input name="startPage" type="hidden" value="1"/>
707 </xsl:if>
708 <xsl:choose>
709 <xsl:when test="/page/pageRequest/paramList/param[@name = 's1.maxDocs']">
710 <input name="s1.maxDocs" type="hidden">
711 <xsl:attribute name="value">
712 <xsl:value-of select="/page/pageRequest/paramList/param[@name = 's1.maxDocs']/@value"/>
713 </xsl:attribute>
714 </input>
715 </xsl:when>
716 <xsl:otherwise>
717 <input name="s1.maxDocs" type="hidden" value="3"/>
718 </xsl:otherwise>
719 </xsl:choose>
720 <xsl:choose>
721 <xsl:when test="/page/pageRequest/paramList/param[@name = 's1.hitsPerPage']">
722 <input name="s1.hitsPerPage" type="hidden">
723 <xsl:attribute name="value">
724 <xsl:value-of select="/page/pageRequest/paramList/param[@name = 's1.hitsPerPage']/@value"/>
725 </xsl:attribute>
726 </input>
727 </xsl:when>
728 <xsl:otherwise>
729 <input name="s1.hitsPerPage" type="hidden" value="3"/>
730 </xsl:otherwise>
731 </xsl:choose>
732
733 <!--
734 <input name="q" type="hidden" value="{$assocFilePath}" />
735 -->
736 <input name="q" type="hidden" value="{$docID}" />
737 <input name="s1.query" type="hidden" value="{$docID}" />
738
739 <input name="s1.offset" type="hidden" value="0"/>
740 <input name="s1.length" type="hidden" value="200"/>
741
742 <input name="s1.arousal" type="hidden" value="0"/>
743 <input name="s1.valence" type="hidden" value="0"/>
744
745 <div style="font-style: italic;">
746 <span id="makeRecommendationFrom">
747 Based on the start of this musical/sound art work:
748 </span>
749 <input onclick="return preSubmit(this.form);" type="submit" value="Make Arousal-Valence Recommendation"/>
750 <div id="makeRecommendationFrom-AV" style="font-style: italics; font-size: 90%;">
751 <xsl:text> </xsl:text>
752 </div>
753 </div>
754
755 <div style="font-style: italics; display: none;">
756 Make arousal-valence music recommendation based on content @ <span id="audioCurrentPos">0 secs
757 </span>:
758 <!--,
759 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
760 -->
761 </div>
762 </form>
763 <div>
764 <div id="av-chart-div" style="position: relative; height: 325px; width: 300px; float: right; display: none;">
765 <div style="position: absolute; top: 0; left: 0; width: 300px; height: 300px; pointer-events: none;">
766 <canvas id="av-chart-canvas" style="XXwidth: 100%; height: 300px;">
767 Your browser does not support the canvas element
768 </canvas>
769 </div>
770 <img id="av-chart-img" width="300"
771 style="cursor: crosshair; background-colorXX: #fefefe;"
772 src="{$library_name}/sites/{$site_name}/collect/{$collName}/images/av-diagram-bw.svg" />
773 <div>
774 <i>Or click inside the Arousal-Valence visualisation above to initiate a new AV-based recommendation.</i>
775 </div>
776
777 </div>
778 <div id="resultsAreaDiv" style="padding-top: 1rem; min-height: 325px; display: none;">
779 <xsl:text> </xsl:text>
780 </div>
781 </div>
782
783 </div>
784 <hr/>
785 <!--
786 <script>
787 <xsl:text disable-output-escaping="yes">
788 </xsl:text>
789 </script>
790 -->
791
792 </xsl:template>
793
794 </format>
795 </display>
796
797 <replaceListRef id="gs2-standard"/>
798 <serviceRackList>
799 <!--
800 <serviceRack name="GS2WekaDBSearch">
801 </serviceRack>
802 -->
803 <!--
804 <serviceRack name="GS2WekaAVRecommender">
805 </serviceRack>
806 -->
807
808 <!-- comment out the following serviceRack if you want to disable OAI for this collection -->
809 <serviceRack name="OAIPMH">
810 <ListMetadataFormats>
811 <!--What metadata sets to support is collection specific. To support other metadata schema, simply add a metadataFormat element here.
812 The support of unqualified Dublin Core metadata set is mandatory in the oai specification.
813 -->
814 <metadataFormat metadataPrefix="oai_dc">
815 <metadataPrefix>oai_dc</metadataPrefix>
816 <schema>http://www.openarchives.org/OAI/2.0/oai_dc.xsd</schema>
817 <metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/</metadataNamespace>
818 <!--<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>
819 -->
820 <mappingList>
821 <!--
822 The mapping is in the form: <publicly supported metadata name>,<mapped metadata name>, short as <A>,<B>
823 The first metadata name is medatory; if there is no mapped name followed, then the first name must be used by the records and
824 searchable in the database, otherwise it is the mapped name stored in the database. The number of mapping elements matches the
825 number of external metadata of the records. If only one name is present, the returned metadata will use this name plus the retrieved value;
826 if both <A>,<B> are present, the returned metadata will use <A>'s name plus <B>'s value retrieved from database.
827
828 **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.
829
830 **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.
831 -->
832 <mapping>dc.Title,Title</mapping>
833 <!-- 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. -->
834 </mappingList>
835 </metadataFormat>
836 </ListMetadataFormats>
837 </serviceRack>
838 </serviceRackList>
839</CollectionConfig>
Note: See TracBrowser for help on using the repository browser.