Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Midi player measure navigation #952

Open
wants to merge 63 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
c4624e6
Read Score Data by new USE Attribute
May 3, 2022
01acbe3
Add Verovio Toolkit
May 3, 2022
f37d075
Integrate Verovio Toolkit
May 3, 2022
6f7555d
Add getPageBeginning Method
May 18, 2022
fd5d859
Scroll to Pagebeginning
May 18, 2022
20fc2ad
Read Score Data by new USE Attribute
May 3, 2022
8cac53e
Full text branch
hizclick Aug 18, 2022
c090bd4
midiplayer
hizclick Aug 18, 2022
eb75fa8
Add mini player play button
hizclick Aug 24, 2022
31ff1d8
add Midi player
hizclick Aug 24, 2022
f933925
Verovio integration updated
roewenstrunk Oct 25, 2022
75b9f45
this is verovio toolkit update
hizclick Nov 25, 2022
487db72
saveas.js
hizclick Nov 25, 2022
67deb6b
Midi player test
hizclick Dec 6, 2022
1e658c3
Open Layers for Verovio
roewenstrunk Dec 13, 2022
904f541
Use the global variable for toolkit
roewenstrunk Dec 21, 2022
49543bf
Rendering of Scores
roewenstrunk Jan 20, 2023
341ed54
loading webmidi
hizclick Feb 7, 2023
c1ed25f
Load wildwebmidi.data
roewenstrunk Feb 7, 2023
8452961
Extended MetsDocument for the new musical struct.
haogatyp Apr 6, 2023
336debd
Added cross-page navigation for measures.
haogatyp Apr 27, 2023
1b28c62
structMap musical xpath adjustments and read coords from mets into mu…
chrizzor May 31, 2023
66048c3
Read in measure information and make it available in the javascript
chrizzor May 31, 2023
2fc9018
Add measure layer with select option. Layer is only visible if score …
chrizzor May 31, 2023
809ba58
Add sync control and add projection to scoreMap
chrizzor Jun 12, 2023
a594728
Add annotation feature.
haogatyp Jun 18, 2023
47688ba
Add gridstack to load multiple documents
chrizzor Jun 30, 2023
d7c2be6
Merge branch 'midi-player-annotations' into midi-player-navigation
chrizzor Jun 30, 2023
8a30d81
Add gridstack lib
chrizzor Jun 30, 2023
7d93e80
Add form model to use multiple sources
chrizzor Jul 3, 2023
f550bcb
Add form model to use multiple sources
chrizzor Jul 3, 2023
21f8854
Annotations: Write semicolon separated ranges in data attributes inst…
haogatyp Jul 3, 2023
d0ca4da
Merge branch 'midi-player-navigation' of github.com:effective-webwork…
chrizzor Jul 4, 2023
e75ea36
Add multiview parameter and define global navigation for multiview
chrizzor Jul 6, 2023
61b99aa
Add annotation interaction with openlayers
chrizzor Jul 6, 2023
5e203ab
Add a hover event from the html annotation
chrizzor Jul 6, 2023
6d0d75f
use file group to build a measure to page array
chrizzor Jul 14, 2023
0850200
Add measure/page navigation for pageview
chrizzor Jul 14, 2023
c8ea6b8
Select current measure on measure navigation
chrizzor Jul 17, 2023
774217b
Merge branch 'slub_master' into midi-player-navigation
chrizzor Sep 4, 2023
46c9344
Move the DocPage parameter, because the parameters are now handled in…
chrizzor Sep 4, 2023
91a4bc3
Codacy changes
chrizzor Sep 4, 2023
6bf6f84
Add placeholder function
chrizzor Sep 4, 2023
3f71fdf
Adjustment isDocMissingOrEmpty for type multiview
chrizzor Sep 15, 2023
27e9fca
Convert tabs to spaces
chrizzor Sep 15, 2023
09f8261
Move gridstack.js to PageView directory
chrizzor Sep 15, 2023
7fc3888
Codacy fix
chrizzor Sep 15, 2023
6467d08
Convert tabs to spaces
chrizzor Sep 15, 2023
64ce1ff
Merge branch 'master' into midi-player-navigation
chrizzor Jul 1, 2024
e2bdccb
Fix PHPStan Static Analysis
chrizzor Jul 2, 2024
02934c8
Merge branch 'main_master' into midi-player-navigation
chrizzor Jul 2, 2024
1b1e029
Remove conflict comments
chrizzor Jul 2, 2024
2d10270
Fix PHPStan
chrizzor Jul 3, 2024
8b6b40f
Fix PHPStan
chrizzor Jul 3, 2024
40028a4
Codacy fix
chrizzor Jul 3, 2024
3ac82bb
Fix wrong javascript folder name
chrizzor Jul 4, 2024
07ebe08
Fix wrong javascript folder name
chrizzor Jul 4, 2024
1d1f7a8
Remove .DS_Store and ignore them
chrizzor Jul 4, 2024
bb9848f
Use "magicGet" for musicalStructure
chrizzor Jul 4, 2024
787318f
Load gridstack js only if multiview parameter is set
chrizzor Jul 4, 2024
b32a002
Add changes from project-slub
chrizzor Jul 5, 2024
a097b97
Fix PHPStan
chrizzor Jul 5, 2024
804c05f
Fix measure view and verovio
chrizzor Jul 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
Binary file added Build/.DS_Store
Binary file not shown.
Binary file added Build/Documentation/.DS_Store
Binary file not shown.
78 changes: 78 additions & 0 deletions Classes/Common/AnnotationRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?php

namespace Kitodo\Dlf\Common;

/**
* (c) Kitodo. Key to digital objects e.V. <[email protected]>
*
* This file is part of the Kitodo and TYPO3 projects.
*
* @license GNU General Public License version 3 or later.
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*/

class AnnotationRequest
{
/**
* @var string
*/
protected $apiUrl = '';

/**
* @param string $apiUrl The url of the annotation server api.
*/
public function __construct($apiUrl)
{
$this->apiUrl = trim($apiUrl, "/ ");
}


/**
* Requests the annotation server
*
* @param string $url The annotation request url.
* @return array
*/
protected function requestAnnotions($url) : array
{
$jsonld = Helper::getUrl($url);

if ($jsonld) {
$annotationData = json_decode($jsonld, true);

if ($annotationData) {
return $annotationData;
}
}

return [];
}

/**
* Returns all annotations of a document.
*
* @param string $id Document id (purl)
* @return array
*/
public function getAll($id)
{
$annotations = [];

$annotationData = $this->requestAnnotions($this->apiUrl . '?target=' . urlencode($id . '/*'));

if (array_key_exists('first', $annotationData)) {
$annotationPageData = $annotationData['first'];
$annotations = array_merge($annotations, $annotationPageData["items"]);

while (array_key_exists('next', $annotationPageData)) {
$annotationPageData = $this->requestAnnotions($annotationPageData['next']);
if (array_key_exists('items', $annotationPageData)) {
$annotations = array_merge($annotations, $annotationPageData["items"]);
}
}
}

return $annotations;
}
}
14 changes: 14 additions & 0 deletions Classes/Common/Doc.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,20 @@ public abstract function getDownloadLocation($id);
*/
public abstract function getFileLocation($id);

/**
* Returns id of pb element representing the beginning of a physical page
*
* @access public
*
* @abstract
*
* @param string $pageId: The "@ID" attribute of the page node (METS)
* @param string $fileId: The "@ID" attribute of the file node (METS)
*
* @return string The node's id
*/
public abstract function getPageBeginning($pageId, $fileId);

/**
* This gets the MIME type of a file representing a physical page or track
*
Expand Down
Loading