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

Python3 support #26

Open
JPfeP opened this issue May 21, 2019 · 4 comments
Open

Python3 support #26

JPfeP opened this issue May 21, 2019 · 4 comments
Assignees
Labels

Comments

@JPfeP
Copy link
Contributor

JPfeP commented May 21, 2019

Hello,

It seems that audiostream is not yet ready for python3. I tried to fix a few errors but then my knowledge found its limits.

  1. In sources directory, two files have problems with arrays (waves.pyx and puredata.pyx):
    search for lines like that :
    buf = array('h', '\x00' * self.chunksize)
    It seems that this is easy to fix by just adding a 'b':
    buf = array('h', b'\x00' * self.chunksize)
    There are a few iterations only of them.

  2. Then in waves.pyx there are a few uses of "next" that is no more valid in python3. I tried to change them with the new syntax but it was not sufficient or proper I am afraid.

@avour
Copy link

avour commented Oct 22, 2019

Nice work trying to port it to python3 which is very helpful by the why.
If the obj is an iterator the in python2 it will have a next() method but for py3 just use the built in next()
Py2
obj.next()
Py3
next(obj)

@JPfeP
Copy link
Contributor Author

JPfeP commented Feb 21, 2020

I have managed to fix all the errors for python3 on my local version (I am getting some sound), I am going to push all the changes gradually.

@tito
Copy link
Member

tito commented Mar 19, 2020

I merged all PR, is it ok for you @JPfeP ?

@tito tito self-assigned this Mar 19, 2020
@JPfeP
Copy link
Contributor Author

JPfeP commented Mar 25, 2020

Hi tito,

Yes, perfecto.

The multisin example would need py3 update too, but I don't have time neither motivation for this. The pd examples work fine.

@Julian-O Julian-O added bug and removed enhancement labels Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants