Turntable physics to sound (via Mixxx?) using Blender GE

Random non-Mixxx stuff...

Moderator: garth

Turntable physics to sound (via Mixxx?) using Blender GE

Postby Michael Z Freeman » Fri Aug 12, 2016 7:12 pm

Hi, looking for anyone to help with this project. Here is the BlenderArtists thread and a video.



Still experimental/a prototype. But it works. Spin the platter with mouse button left/right. Space stop/start. ALT turn deck on/off (sometimes needs 2 key presses for some reason).

Currently writing Python modules using Audaspace to provide reverse play. It also needs some friction setting up to provide a better brake effect.

I started the project because I could not find any digital DJ mixer out there that can really provide digital versions of turntabalism effects. Even Mixxx can't do it; it has some things like a brake effect using Javascript. I did consider using a physics simulation to put MIDI message into Mixxx to provide similar effects. If Audaspace can't properly reverse the track and keep audio quality/realtime operation then that might be an alternative approach; A Blender Game Engine virtual turntable interface to Mixxx. Actually now I think of it that makes some sense as it would offload all the file loading and so forth to Mixxx, but as I said this is all experimental/prototypical.
"I heard the sound of the Universe vibrating as one harmonious force." ... Previously "djbarney".
User avatar
Michael Z Freeman
 
Posts: 81
Joined: Thu Sep 15, 2011 10:02 pm

Re: Turntable physics to sound (via Mixxx?) using Blender GE

Postby daschuer » Sat Aug 13, 2016 6:11 am

Hi djbarney,

I would be really great to have a vinyl physics engine in the Mixxx code base.
It should be allays, drive the spinnies.
Currently we have a (poor) throw effect and a mouse move ironing filter in Mixxx.

Do you see a chance to move your project into Mixxx?

By the way: I have prepared a branch, that models the gain change by tempo from a real vinyl.
Maybe that is of interest for you. https://github.com/mixxxdj/mixxx/pull/602
daschuer
Mixxx Developer
 
Posts: 1132
Joined: Sun Mar 10, 2013 11:26 am

Re: Turntable physics to sound (via Mixxx?) using Blender GE

Postby Michael Z Freeman » Sat Aug 13, 2016 1:33 pm

daschuer wrote:Hi djbarney,

I would be really great to have a vinyl physics engine in the Mixxx code base.


Too right. I've been looking for such a thing for years and can't find it in any of the commercial or open source digital mixers. The only reference I've found so far has been in an obscure physics forum, here and here.

Various Turntablism effects have been developed over the last half century yet we are still forced to resort to time coded vinyl to use those effects in the digital realm. I don't want to see digital replace decks and vinyl but timecoded vinyl always seemed like a bit of a "kludge" to me when using computers. I'm playing video games with physics simulation making stuff fly around all over the place. I thought what is it that makes a Technics 1200/1210 make that unique sound ? It's the physics of that heavy platter. So far my Blender experiments have proved that sound can be recreated for digital when actual decks and vinyl are not available.

It should be allays, drive the spinnies.


Of course ! The spinnies. I'd forgotten that Mixxx already has the vinyl record carried through into it, if even only symbolically.

Currently we have a (poor) throw effect and a mouse move ironing filter in Mixxx.


I guess physics can be simulated in Javascript as well.

Do you see a chance to move your project into Mixxx?


I don't know about move into it as such. I'm still setting up what I have in Blender. But you are certainly welcome to the idea and concepts and I could work with coders to implement it. I am an experienced vinyl DJ and I think it would be great for Mixxx. Would love to see Mixxx to be the first to implement this, I bet all the other digital mixers out there would follow along.

By the way: I have prepared a branch, that models the gain change by tempo from a real vinyl.
Maybe that is of interest for you. https://github.com/mixxxdj/mixxx/pull/602


Wow ! Had never considered that. Now I think of it I seem to remember an increase in "punchiness" of sounds when scratched. The gain change would explain that. Not sure about the comment about the "shortcomings" of vinyl although you would certainly want to be able to turn the gain formulae on and off.

EDIT:

I've had some problems with Audaspace. The way I understand it at the moment it can't set the pitch accurately for a sample. That can be done using a BGE Actuator but the Audaspace needs to be in there to track the location of the sample and reverse it. that can't be done in the Logic Bricks (as far as I know). But the I made a breakthrough. I found some software out there ....

http://djtechtools.com/2015/03/16/tonet ... blist-vst/

... that produces the timecode vinyl sine waves IN SOFTWARE ! So I wonder if Audaspace could synthesise the timecode sine waves ? Either way its an interesting alternative approach to produce a sort of virtual timecode vinyl deck driven by the physics simulation.
"I heard the sound of the Universe vibrating as one harmonious force." ... Previously "djbarney".
User avatar
Michael Z Freeman
 
Posts: 81
Joined: Thu Sep 15, 2011 10:02 pm

Re: Turntable physics to sound (via Mixxx?) using Blender GE

Postby daschuer » Sun Aug 14, 2016 11:46 pm

Code: Select all
... that produces the timecode vinyl sine waves IN SOFTWARE ! So I wonder if Audaspace could synthesise the timecode sine waves ? Either way its an interesting alternative approach to produce a sort of virtual timecode vinyl deck driven by the physics simulation.


It is a hard job for Mixxx to decode the time-code signal and iron it to make it usable.
It would be much better if such a controller will act directly on the speed signal.
daschuer
Mixxx Developer
 
Posts: 1132
Joined: Sun Mar 10, 2013 11:26 am

Re: Turntable physics to sound (via Mixxx?) using Blender GE

Postby Michael Z Freeman » Mon Aug 15, 2016 10:43 am

Which would mean generating midi or OSC signals. This can also be done in Python in ways that hopefully are more flexible than Audaspace is (although 'I still need to consult an Audaspace expert).

But I thought Mixxx works fine with timecode vinyl ?

EDIT: Good news ! Audaspace *CAN* handle the pitch properly. I was just misled by some poor documentation and my unfamiliarity with Audaspace. See this thread.
"I heard the sound of the Universe vibrating as one harmonious force." ... Previously "djbarney".
User avatar
Michael Z Freeman
 
Posts: 81
Joined: Thu Sep 15, 2011 10:02 pm

Re: Turntable physics to sound (via Mixxx?) using Blender GE

Postby Michael Z Freeman » Wed Apr 18, 2018 7:24 pm

So, hi again.

I realised I never actually came back here and posted my now working prototype ! 2018 now, better late than never I guess!

Here it is ...

"Creating DJ turntable effects in Blender Game Engine using physics of platter rotation"

[youtube]http://www.youtube.com/embed/2qL4TdcXn7A[/youtube]

https://youtu.be/2qL4TdcXn7A

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

https://blenderartists.org/forum/showth ... tion-speed

Blender file download is now: http://files.michaelzfreeman.org/dj_tur ... n_97.blend

It's really fast in BGE itself although there are some noise artefacts (don't know if they can be heard in the video) to do with Audaspace. When the track is playing very slowly and is then stopped Audaspace continues rendering the sound and there is a low rumbling sound. I suppose this could be a bug in Audaspace or my hackey Python scripting.

I also tried the Vinyl timecode WAV (linked from the Mixxx wiki) with this. Routed to Mixxx. It works but I had problems with latency. More testing required.

What might work a lot better is sending HID or MIDI from the virtual turntable to Mixxx. This would also solve the BGE application having to have an entire track loading GUI (not easy to do in BGE) which is practically reinventing Mixxx in BGE. But I'm not yet clear how proceed writing a controller mapping for Mixxx. I've read the jog wheel stuff on the wiki but cannot yet see how to implement this in this case yet. The virtual BGE turntable is basically a motorised jog wheel, so how does Mixxx handle that ?

(BTW if anyone is interested in working together to patent this invention please contact me).
"I heard the sound of the Universe vibrating as one harmonious force." ... Previously "djbarney".
User avatar
Michael Z Freeman
 
Posts: 81
Joined: Thu Sep 15, 2011 10:02 pm

Re: Turntable physics to sound (via Mixxx?) using Blender GE

Postby Pegasus » Fri Apr 20, 2018 8:09 pm

Michael Z Freeman wrote:What might work a lot better is sending HID or MIDI from the virtual turntable to Mixxx.


Definitely. If you can make BGE send MIDI messages (CCs (0xBn) probably would fit best, or 0xEn) or HID packets (just a bunch of bytes sent each time something changes on your "controller" like the wheel is moved or the time stamp clock ticks) you can make a mapping to process them in Mixxx just as for a physical controller. If your "controller" acts as a motorized wheel, then it will also need to send periodic (on the order of 1ms) time stamps. These are required in order to correct for jitter. That said, Mixxx can't yet use these (so has issues with any real motorized controllers) but plans exist to change that, so you might as well prepare for it now on the BGE side. (The time stamp clock can roll over about every couple seconds or so; it doesn't have to be absolute time.)
"D.J. Pegasus"
Mixxx Developer - Controller Specialist
Mixxx Windows package maintainer
User avatar
Pegasus
Mixxx Developer
 
Posts: 1712
Joined: Thu Jan 29, 2009 7:48 pm
Location: Las Vegas, NV, USA

Re: Turntable physics to sound (via Mixxx?) using Blender GE

Postby Michael Z Freeman » Wed Apr 25, 2018 2:54 pm

Thanks Pegasus. Would you say MIDI is simpler to work with than HID ?
"I heard the sound of the Universe vibrating as one harmonious force." ... Previously "djbarney".
User avatar
Michael Z Freeman
 
Posts: 81
Joined: Thu Sep 15, 2011 10:02 pm


Return to Mixxxscellaneous (Off-Topic)

Who is online

Users browsing this forum: No registered users and 1 guest

cron