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

vrender throws Exception if tmp files don't exist #120

Open
jwmatthys opened this issue Aug 24, 2018 · 12 comments
Open

vrender throws Exception if tmp files don't exist #120

jwmatthys opened this issue Aug 24, 2018 · 12 comments

Comments

@jwmatthys
Copy link

>>> vrender("v1", lyrics="hey ho lets go", notes=[0,2,4,5], dur=[1,1.5,0.5,1.5])
Running voice renderization
[0, 2, 4, 5]
[1, 1.5, 0.5, 1.5]
[0, 2, 4, 5, 7, 9, 11]
[(60, 1, 100, 0), (64, 1.5, 100, 1), (67, 0.5, 100, 2.5), (69, 1.5, 100, 3.0)]
Composition:
[(60, 1, 100, 0), (64, 1.5, 100, 1), (67, 0.5, 100, 2.5), (69, 1.5, 100, 3.0)]
Traceback (most recent call last):
  File "FoxDot/lib/Code/main_lib.py", line 110, in __call__
    exec(self._compile(code), self.namespace)
  File "FoxDot", line 2, in <module>
  File "FoxDot/lib/Extensions/VRender/__init__.py", line 32, in __call__
    renderizeVoice(filename,lyrics,notes,durations,tempo,scale)
  File "FoxDot/lib/Extensions/VRender/VRender.py", line 18, in renderizeVoice
    generateVoiceSpecification(lyrics,tempo,VOICE_XML_ORIGINAL,VOICE_XML_PROCESSED)
  File "FoxDot/lib/Extensions/VRender/VoiceSpecificator.py", line 6, in generateVoiceSpecification
    with open(inputMusicXMLPath, 'r') as c:
IOError: [Errno 2] No such file or directory: 'FoxDot/lib/Extensions/VRender/tmp/last_voice.musicxml'

Maybe change the flag to r+?

@jwmatthys
Copy link
Author

Oops, nope, that doesn't fix it.

@Qirky
Copy link
Owner

Qirky commented Sep 13, 2018

Updated the setup.py file to include directories in extension modules so should work ok

@wblamkin
Copy link

Hi, I've encountered this problem as well, and don't really understand from the vrender documentation how to actually use this. I've double checked that VRender is in my Extensions folder, but beyond that I just keep getting this same error. Can anyone provide any help?

@Qirky
Copy link
Owner

Qirky commented Jan 2, 2019

What OS and version of Python are you using? Might be a permission issue as the file wouldn't exist if FoxDot doesn't have the ability to create it in the first place. Also, how are you running FoxDot and from what directory? From the README it assumes you are in a certain folder but I think we can update this

@wblamkin
Copy link

wblamkin commented Jan 3, 2019

I am running on macOS High Sierra, as for Python I have Python 3 installed but I believe it runs in Python 2.7? SuperCollider loads FoxDot from /Library/Python/2.7/site-packages/FoxDot/
I launch FoxDot from the Mac Terminal, and have to use the command "sudo FoxDot" to get permission to launch, so if there is a permission problem it could have something to do with that.

@Qirky
Copy link
Owner

Qirky commented Jan 4, 2019

I think it has something to do with the relative path of VRender so will look at making it an absolute path to avoid issues. Will update when this is done.

@mathigatti
Copy link
Contributor

I changed them to be absolute paths about two months ago. Let me know if there is still some problem.

@RoboticMind
Copy link
Contributor

I managed to partially solve this. Still having too many other issues with vrender to fully get it working. I was having the same issue and saw that I was getting an error with musescore converting the files. I realized the latest relased version of it on the standard ubuntu apt repo is musescore 2 so I manually added in a ppa for musescore3 (https://launchpad.net/~mscore-ubuntu/+archive/ubuntu/mscore3-stable) and changed composer.py to use the command musescore3 instead of musescore. This made the temp file exist and let it at least get that far. I also had to apply the patches in #224 to get a bit further.

I keep getting issues with a few things

  1. the vrender syth definition keeps throwing errors in supercollider when importing vrender (it keeps saying SynthDef vrender build failed ERROR: Pan2 input 0 is not audio rate: 0 scalar) I tried figuring out how to change its synth def but could't figure out how

  2. the wav files do generate but for the weirdest reason it seems to not work no matter how long I set the dur for, yet the minute I shorten it with audacity it starts being able to play it. I've given up at figuring it out for now.

@mathigatti
Copy link
Contributor

mathigatti commented Feb 29, 2020

Hey, I'm sorry about it not working, I'm not updating this anymore but, in case it's useful for you, I keep this repositories updated https://github.com/mathigatti/midi2voice it's pretty much the same code, it converts midi files to singing voices.

I think vrender doesn't make sense as a synth, it should be just a function that we import and use inside FoxDot.

so maybe changing

class VRenderSynthDef(SynthDef):

    def __init__(self):
        ...

    def __call__(self, ...):
        ...

vrender = VRenderSynthDef()

to something like this might fix your problems with supercollider.

def vrender(...):
        renderizeVoice(...)

This is the fork of foxdot I use, it has some hardcoded paths pointing out to this project so it's not going to work in your computer but maybe it helps.

@mathigatti
Copy link
Contributor

mathigatti commented Feb 29, 2020

oh and about playing the audios, sinsy.jp adds 4 beats of silence at the beginning, you can try something like this, so you say you want to start on the fourth beat of the audio

v1 >> loop("v1",P[4:8])

otherwise I implemented in this file something to remove automatically those 4 beats of silence.

@RoboticMind
Copy link
Contributor

Ah that did fix both issues. Now it seems to work. Thank you!

@parisac
Copy link

parisac commented Mar 24, 2020

@RoboticMind thanks for your post, got it working on Ubuntu 18.04 LTS with Python 3.x, aside from installing musicscore3 and changing reference to it in composer.py I merged in the (branch and it worked fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants