DJ turntable platter physics simulation: Link sound pitch to platter rotation speed?

Great ! I’ll have a look at this when I can.

For file loading I’m looking at using a third party python library to bring up a system file selection window. Same with the audio file formats, it could probably do with more than just WAV, although I think Blender can do OGG and MP3. FLAC would be nice.


File open dialog using wxPython Phoenix Project ( https://wiki.wxpython.org/ProjectPhoenix ) on system installed Python 3.5.1 (matches Blender 2.77a Python version).

Install with “pip install -U --pre -f https://wxpython.org/Phoenix/snapshot-builds/ wxPython_Phoenix”.

This only works on Windows at the moment as Linux (Ubuntu in my case) cannot install specific versions of Python. A work around may be had by using “virtualenv” but that could be difficult. I’m looking at simply dropping in third party Python modules into the Blender distributed Python as that would seem easier for people wanting to test this and for eventual packaging. I originally went the system Python way (disable the Blender Python directory) because it looked like an easier way of having “pip” to hand. However I think there is a way of installing “pip” for Blender. Anyway, hope I can resolve all that as I don’t think Blender Python has native ways of opening file selection dialogs, and this will need further third party modules for other audio formats.

I’m also looking at possibly generating a spiral waveform image (well, not strictly a waveform, more like a wavy line much a like a vinyl groove) that can be mapped to the platter surface to aid in track location selection on mouse button click. This thing also really needs a logo or slip mat image or some other graphics putting in there somewhere :cool:.

I’m struggling to setup a Blender Python installation that allows full installation of modules including https://wiki.wxpython.org/ProjectPhoenix … there is no binary installation available so even though I got “pip” working in the packaged Python that comes with Blender, the of wxPython fails compile fails.

http://files.djbarney.org/pip_wxpython-phoenix_install_output.txt

This does work on Windows where I have installed specific system Python version 3.5.1 for this Blender version (2.77) but I really need to be in Linux. However in Linux (Ubuntu) it seems to be impossible to install a specific system Python version.

I got “pip” to install by using the latest Blender version: https://builder.blender.org/download/ … and then …

~/Downloads/blender-2.77-a5261e0-linux-glibc219-x86_64/2.77/python/bin/python3.5m ~/Downloads//get-pip.py

… and then …

~/Downloads/blender-2.77-a5261e0-linux-glibc219-x86_64/2.77/python/bin/python3.5m /home/michaelzfreeman/Downloads/blender-2.77-a5261e0-linux-glibc219-x86_64/2.77/python/bin/pip install module

… installs modules to …

"/home/michaelzfreeman/Downloads/blender-2.77-a5261e0-linux-glibc219-x86_64/2.77/python/lib/python3.5/site-packages

… then wxPython Phoenix installation …

~/Downloads/blender-2.77-a5261e0-linux-glibc219-x86_64/2.77/python/bin/python3.5m /home/michaelzfreeman/Downloads/blender-2.77-a5261e0-linux-glibc219-x86_64/2.77/python/bin/pip install -U --pre -f https://wxpython.org/Phoenix/snapshot-builds/ wxPython_Phoenix

But the build fails (see above). It seems to then want to find “python-config” and also starts looking for a system python library path variable.

I tried setting some variables but the Python that comes with Blender only has a non-built version of “python-config” which refuses to build.

It was recommended to me to try “One workaround that may work for you would be to use a stock Python 3.5 or a virtualenv made from the stock Python 3.5, to build a wheel file and then install that wheel into the Blender Python, something like this: “pip -v wheel wxPython_Phoenix-3.0.3.dev2445+ca34d71.tar.gz”, using the pip from the stock or virtualenv Python 3.5.” but I’m still not convinced that its not possible to do all this in the Blender Python directory.The closest thing I’ve found is this: https://wiki.blender.org/index.php/User:Brita/Configs/Pyenv … but its more for a Blender build environment.

Is having a fully functional Blender Python directory possible ? Otherwise I’ll have to build separately and transfer across to Blender.

After a LOT of problem solving I got wxPython Phoenix to build on Linux. Needed to be done because I chose wx for its cross platform nature and ability to have folder “favourites” and so forth when picking tracks to load quickly. So now I have a nice open file dialog in Linux …


The core problem was getting the right Python version on Ubuntu. Specific python versions just cannot be installed via the package manager and it took me ages to work out that I can build Python 3.5.1 from source and then use the “alternatives” system to switch system Python versions (Ubuntu expects specific Python version for it’s system scripts - package updates and so forth).

So now how to have the file open dialog without the engine no longer responding to input in case the DJ has to quickly adjust something.

This is starting to get interesting. Project renamed “Virtual DVS System”. Confirmed working using the Serato CD timecode download as the track source. This means that the project no longer needs any complex Python stuff for file loading. Timecode signal was fed to Mixxx using Jack and it works like a charm producing a sound that can only be replicated by real vinyl timecode control. Needs some more tuning and controls to make it work for real mixing / turntabalism / scratching.

Cool, this is one of the rare projects focussing on Audio. :slight_smile:

Do you have a recent blend to share? I think the ones in the original post expired or are not the latest. Your screenshot shows something like, v120, while the other blends in this thread are older.

PS: I have posted another sound related demo a while ago, maybe it’s interesting for you. Link: Soundwaves: Speed of Sound (Delay) & Doppler

Unfortunately I can no longer post my files, please see below. You project looks interesting.

Now working in UPBGE ! The physics works off the bat. The textures need converting from Blender internal to Eeevee which is the work in progress at the moment. I can no longer discuss the details of this project or post working examples in the open forum, but I may still post screenshots from time to time. This is due to the project moving towards becoming commercial. If anyone is interested in getting involved you need to have experience in one, some or all of software engineering and coding, modelling, music, professional audio, dj’ing, running a business, marketing, web design. You must be serious about getting involved in a commercial project and/or helping to start a business. I’ll post a proper post in the correct forum jobs category in due course. PM me or [email protected]

1 Like

If anyone is interested I’m thinking of putting this on github (or some repository) and following the same business model as VCV Rack VCV Rack - The Eurorack Simulator for Windows/Mac/Linux … They have a fully free open source version, but you woud have to pay for it if you want the VST plugin as well. I can see this project being used for effects in DAW’s etc.

Scrub what I said about not publishing Blender files. Here it is for the UPBGE alpha. Look at it, if you’re interested then maybe we can work together.

The Blend audio is not functional as some things changed in Audaspace ( see this post ) that need fixing. However the functionality of the deck is. See logic bricks for keybord controls. The deck power control needs to be hit twice to make it work, a gremlin I have not tracked down yet. Would live to hear what you think.