changeset 3:83702725b6e7 no-matlab

removed matlab from audio-ui and score
author wolffd@googlemail.com
date Fri, 13 Jul 2018 16:42:16 +0000
parents cef93a1252f2
children bbebda98c679
files cpack/dml/applications/audio_ui.pl cpack/dml/components/score.pl
diffstat 2 files changed, 14 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/cpack/dml/applications/audio_ui.pl	Fri Jul 13 15:14:03 2018 +0000
+++ b/cpack/dml/applications/audio_ui.pl	Fri Jul 13 16:42:16 2018 +0000
@@ -37,7 +37,7 @@
 :- use_module(library(spotify/echotools), [mb_to_spotify/2]).
 :- use_module(library(spotify/spotools)).
 
-:- use_module(components(matlab)).
+% :- use_module(components(matlab)).
 :- use_module(components(audio)).
 
 :- use_module(cliopatria(hooks)).
@@ -129,8 +129,8 @@
 
    reply_html_page(cliopatria(bare),[title("Spectrogram viewer")],
       [ \html_requires(font_awesome)
-      , \figure( spectrogram(URI,O,L), W, H, 
-                 [ format(png), color_map(CM) | Params2])
+      %, \figure( spectrogram(URI,O,L), W, H, 
+      %           [ format(png), color_map(CM) | Params2])
       , div(style="display:inline-block;vertical_align:middle",
          [  a(href=Home,    i(class='fa fa-home',[])), br([]) 
          ,  a(href=ZoomIn,  i(class='fa fa-plus',[])), br([])
--- a/cpack/dml/components/score.pl	Fri Jul 13 15:14:03 2018 +0000
+++ b/cpack/dml/components/score.pl	Fri Jul 13 16:42:16 2018 +0000
@@ -29,10 +29,10 @@
 :- use_module(library(dcg_core)).
 :- use_module(library(musiclab)).
 :- use_module(library(humdrum_p2r)).
-:- use_module(library(mlserver)).
+% :- use_module(library(mlserver)).
 :- use_module(library(real)).
 :- use_module(library(sandbox)).
-:- use_module(components(matlab),[]).
+% :- use_module(components(matlab),[]).
 :- use_module(components(r_fig),[]).
 :- use_module(components(audio),[audio_player//2]).
 :- use_module(api(score)).
@@ -106,7 +106,7 @@
 %  from the given URI, assumed to refer to a Humdrum file. Figure is 
 %  generated using Matlab.
 pitch_class_histogram(URI) -->
-   cp_r_fig:figure( cp_score:pitch_class_histogram(r,URI), 12, 6, []).
+   cp_r_fig:figure( cp_score:pitch_class_histogram(r,URI), 12, 6, []). %% <- we should replace more like this
    % cp_matlab:figure( cp_score:pitch_class_histogram(ml,URI), 12, 6, []).
 
 pitch_class_histogram(Lang,URI) :-
@@ -116,15 +116,14 @@
    numlist(0,11,PCNs),
    maplist(pc_number_name,PCNs,PCNames),
    maplist(pcn_count(Hist2),PCNs,Counts),
-   (  Lang=r
-   -> r(par(ps=10,mar=[2.1,2.2,1.1,0])),
-      r(barplot(Counts,'names.arg'=PCNames,main="Pitch class histogram"))
-   ;  Lang=ml
-   -> ?? (  bar(PCNs,Counts);
-            xticks(PCNs,cell(PCNames));
-            title("Pitch class histogram");
-            caxis([0,3]))
-   ).
+   r(par(ps=10,mar=[2.1,2.2,1.1,0])),
+   r(barplot(Counts,'names.arg'=PCNames,main="Pitch class histogram")).
+   % ;  Lang=ml
+   % -> ?? (  bar(PCNs,Counts);
+   %         xticks(PCNs,cell(PCNames));
+   %         title("Pitch class histogram");
+   %         caxis([0,3]))
+   % ).
 
 pcn_count(Hist,PCN,Count) :- member(PCN-Count,Hist) -> true; Count=0.