Closed kohanyirobert closed 4 years ago
Hi, thanks for reporting, indeed the 3D functionality is faulty at the moment, I will release a new version in the next days, unfortunately I didn't have much spare time to dedicate to this lately! Where you able to generate the xml document with the fingering labels?
Yep both worked (alas, this was my first use of the program - I was mainly interested in visually seeing the fingering).
I just pushed the version that I had in my local, so if you want to try it out, type:
pip install -U git+https://github.com/marcomusy/pianoplayer.git
The GUI now shows, but I get this instead
Input File is C:/Users/rkohanyi/Work/git/pianoplayer/scores/bach_invention4.xml
Building Keyboard..
Exception in Tkinter callback
Traceback (most recent call last):
File "c:\python38\lib\tkinter\__init__.py", line 1883, in __call__
return self.func(*args)
File "C:\Python38\Scripts\pianoplayer", line 100, in vpCMD
if self.Rcb.get(): vk.build_RH(self.rh)
AttributeError: 'PianoGUI' object has no attribute 'rh'
Traceback (most recent call last):
File "C:\Python38\Scripts\pianoplayer", line 115, in <module>
root.mainloop()
File "c:\python38\lib\tkinter\__init__.py", line 1420, in mainloop
self.tk.mainloop(n)
KeyboardInterrupt
I've tried with a simpler score as well to no avail. Should this be turned into another issue?
Are you sure you pressed GENERATE
before 3D Player
?
You're right, didn't think I'd need to do that, nevermind, my fault. However I get this now after I hit space the very first time in the Tk window (the hands and all are showing).
('Press space to proceed by one note',)
('Press F1 to exit.',)
('meas.1 t=0.0', '\t\t\t\tRH.finger', 2, 'hit', 'F#5')
Exception in Tkinter callback
Traceback (most recent call last):
File "c:\python38\lib\tkinter\__init__.py", line 1883, in __call__
return self.func(*args)
File "C:\Python38\Scripts\pianoplayer", line 103, in vpCMD
vk.play()
File "c:\python38\lib\site-packages\pianoplayer\vkeyboard.py", line 171, in play
if self.rightHand: self._moveHand( 1, t)
File "c:\python38\lib\site-packages\pianoplayer\vkeyboard.py", line 236, in _moveHand
playSound(n, self.speedfactor)
File "c:\python38\lib\site-packages\pianoplayer\wavegenerator.py", line 75, in playSound
soundof([n], n.duration/speedfactor)
File "c:\python38\lib\site-packages\pianoplayer\wavegenerator.py", line 30, in soundof
t = np.linspace(0, duration, duration * sample_rate, False)
File "<__array_function__ internals>", line 5, in linspace
File "c:\python38\lib\site-packages\numpy\core\function_base.py", line 113, in linspace
num = operator.index(num)
TypeError: 'float' object cannot be interpreted as an integer
oh, looks like numpy's python 3.8 is more strict on argument passing.. Try again:
pip install -U git+https://github.com/marcomusy/pianoplayer.git
You may also try from command line something like:
pianoplayer scores\bach_invention4.xml -n10 -vz
Thanks for your patience in debugging this
This seems to work, although when I exit the keyboard window I receive the error below.
Also, the whole experience is choppy on my end, after hitting space there's a 1-2 seconds delay between finger changes and the sounds are continuously kept on which is horrendous, I jumped when I started the playback without the -z
flag :)
2020-08-31 16:02:36.745 ( 36.472s) [ ] vtkOpenGLState.cxx:1380 WARN| Hardware does not support the number of textures defined.
2020-08-31 16:02:36.784 ( 36.511s) [ ] vtkOpenGLState.cxx:1380 WARN| Hardware does not support the number of textures defined.
2020-08-31 16:02:36.803 ( 36.530s) [ ] vtkShaderProgram.cxx:437 ERR| vtkShaderProgram (00000168E64C6BB0): 1: #version 150
2: #ifndef GL_ES
3: #define highp
4: #define mediump
5: #define lowp
6: #endif // GL_ES
7: #define attribute in
8: #define varying out
9:
10:
11: /*=========================================================================
12:
13: Program: Visualization Toolkit
14: Module: vtkPolyData2DVS.glsl
15:
16: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
17: All rights reserved.
18: See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
19:
20: This software is distributed WITHOUT ANY WARRANTY; without even
21: the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
22: PURPOSE. See the above copyright notice for more information.
23:
24: =========================================================================*/
25:
26: // all variables that represent positions or directions have a suffix
27: // indicating the coordinate system they are in. The possible values are
28: // MC - Model Coordinates
29: // WC - WC world coordinates
30: // VC - View Coordinates
31: // DC - Display Coordinates
32:
33: in vec4 vertexWC;
34:
35: // material property values
36: in vec4 diffuseColor;
37: out vec4 fcolorVSOutput;
38:
39: // Texture coordinates
40: //VTK::TCoord::Dec
41:
42: // Apple Bug
43: //VTK::PrimID::Dec
44:
45: uniform mat4 WCVCMatrix; // World to view matrix
46:
47: void main()
48: {
49: // Apple Bug
50: //VTK::PrimID::Impl
51:
52: gl_Position = WCVCMatrix*vertexWC;
53: //VTK::TCoord::Impl
54: fcolorVSOutput = diffuseColor;
55: }
2020-08-31 16:02:37.277 ( 37.004s) [ ] vtkShaderProgram.cxx:438 ERR| vtkShaderProgram (00000168E64C6BB0): Could not create shader object.
2020-08-31 16:02:37.314 ( 37.041s) [ ] vtkOpenGLState.cxx:1380 WARN| Hardware does not support the number of textures defined.
2020-08-31 16:02:37.340 ( 37.067s) [ ] vtkOpenGLState.cxx:1380 WARN| Hardware does not support the number of textures defined.
2020-08-31 16:02:37.367 ( 37.094s) [ ] vtkOpenGLState.cxx:1380 WARN| Hardware does not support the number of textures defined.
2020-08-31 16:02:37.395 ( 37.122s) [ ] vtkShaderProgram.cxx:437 ERR| vtkShaderProgram (00000168E64C96D0): 1: #version 150
2: #ifndef GL_ES
3: #define highp
4: #define mediump
5: #define lowp
6: #endif // GL_ES
7: #define attribute in
8: #define varying out
9:
10:
11: /*=========================================================================
12:
13: Program: Visualization Toolkit
14: Module: vtkPolyDataVS.glsl
15:
16: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
17: All rights reserved.
18: See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
19:
20: This software is distributed WITHOUT ANY WARRANTY; without even
21: the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
22: PURPOSE. See the above copyright notice for more information.
23:
24: =========================================================================*/
25:
26: in vec4 vertexMC;
27:
28:
29:
30: // frag position in VC
31: out vec4 vertexVCVSOutput;
32:
33: // optional normal declaration
34: in vec3 normalMC;
35: uniform mat3 normalMatrix;
36: out vec3 normalVCVSOutput;
37:
38: // extra lighting parameters
39: //VTK::Light::Dec
40:
41: // Texture coordinates
42: in vec2 tcoord;
43: out vec2 tcoordVCVSOutput;
44:
45:
46: // material property values
47: //VTK::Color::Dec
48:
49: // clipping plane vars
50: //VTK::Clip::Dec
51:
52: // camera and actor matrix values
53: uniform mat4 MCDCMatrix;
54: uniform mat4 MCVCMatrix;
55:
56: // Apple Bug
57: //VTK::PrimID::Dec
58:
59: // Value raster
60: //VTK::ValuePass::Dec
61:
62: // picking support
63: //VTK::Picking::Dec
64:
65: void main()
66: {
67: //VTK::Color::Impl
68:
69: normalVCVSOutput = normalMatrix * normalMC;
70:
71: tcoordVCVSOutput = tcoord;
72:
73:
74: //VTK::Clip::Impl
75:
76: //VTK::PrimID::Impl
77:
78: vertexVCVSOutput = MCVCMatrix * vertexMC;
79: gl_Position = MCDCMatrix * vertexMC;
80:
81:
82: //VTK::ValuePass::Impl
83:
84: //VTK::Light::Impl
85:
86: //VTK::Picking::Impl
87: }
2020-08-31 16:02:38.152 ( 37.879s) [ ] vtkShaderProgram.cxx:438 ERR| vtkShaderProgram (00000168E64C96D0): Could not create shader object.
This seems to work, although when I exit the keyboard window I receive the error below.
Also, the whole experience is choppy on my end, after hitting space there's a 1-2 seconds delay between finger changes and the sounds are continuously kept on which is horrendous, I jumped when I started the playback without the
-z
flag :)
yes - unfortunately I could not find a decent library to generate sound in python which is quite surprising :( the lag is due to the fact that it's trying to play the note with the prescribed duration but it fails... I 'll try to fix that.
The awful core dump is pretty weird, I have no idea why that happens, maybe your hardware doesnt support 3d textures.
The awful core dump is pretty weird, I have no idea why that happens, maybe your hardware doesnt support 3d textures.
Probably, not a big deal, it works to an extent.
the lag is due to the fact that it's trying to play the note with the prescribed duration but it fails... I 'll try to fix that.
Sure. I'm closing this issue as my initial problem is solved now. Thanks for the cooperation.
I receive the following error on Windows 10 and Ubuntu 18.04 as well after I import a score and click on 3D player in the GUI.
Any idea?