Giter VIP home page Giter VIP logo

sunvox-dll-python's People

Contributors

gldnspud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

kilon josienatal

sunvox-dll-python's Issues

load_module example

interesting, for some reason this doesn't load any sunsynth on linux.
I tried looking at radiant voices, but everything seems similar.
Basically I cloned this repo, and tried to run this script (fragment):

Screenshot 2019-05-20 at 19 07 50

running myscript.py test.sunsynth gives me the following output:

Screenshot 2019-05-20 at 19 08 00

What i tried:

  • adding encode('utf-8') and encode('utf8')
  • loading an empty .sunvox before calling load_module(...)

Any tips appreciated

audio_callback

Hi I'm playing around (again) with this awesome lib.
Could you be so kind to give an example for audio_callback?

Desired result

a python list with floats (or ints, whatever is easiest).

What I tried:

flags = (sunvox.api.SV_INIT_FLAG.ONE_THREAD)
flags2 = (sunvox.api.SV_INIT_FLAG.USER_AUDIO_CALLBACK | sunvox.api.SV_INIT_FLAG.AUDIO_FLOAT32)
		
sunvox.api.init(None, 44100, 2, flags)

# creating slot + loading the sunvoxfile + playing slot
bufsize = 20
buf = ctypes.c_void_p()		
sunvox.api.audio_callback( buf, bufsize, 0, sunvox.api.get_ticks() )
out = ctypes.cast(buf, ctypes.POINTER(ctypes.c_float))
if out:
	print( len(list(out)) )

output with flags or flags2 is always:

0
0
0
0
0

Any help is appreciated!

ps. sunvox-file plays fine (is audable) with flags so I omitted the songloading/play-code

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.