Reason 3.0 + Wine + wineasio = No Sound

What other apps and distros do you use to round out your studio?

Moderators: khz, MattKingUSA

Post Reply
mtownsend
Established Member
Posts: 4
Joined: Wed Jun 10, 2015 7:41 pm

Reason 3.0 + Wine + wineasio = No Sound

Post by mtownsend »

Hi,

I'm having problems getting Reason 3.0 to work in my new Linux Setup. I'm using Ubuntu Studio 14.04 LTS. I've installed the excellent kxstudio. I have an RME hammerfall Mutliface and have Ardour3 running nicely. I've managed to use Carla to use some of my old VST's which is great. I run cadence to setup Jack and wineasio. I've installed Reason 3 fine using wine and can select the wineasio driver in the audio tab and see Reason in Catia etc. But I get no audio.
I've tried building wineasio from source but still no sound.
Here's how I start Reason:
wine64 regsvr32 wineasio.dll
env WINEDEBUG=-all,+asio WINEPREFIX="/home/martin/.wine" wine64 /home/martin/.wine/drive_c/Program\ Files\ \(x86\)/Propellerhead/Reason/Reason.exe

here's the output
martin@martin-ubuntu-studio:~$ ./start-reason.sh
Successfully registered DLL wineasio.dll
trace:asio:DllMain hInstDLL: 0x7cf50000, fdwReason: 1 lpvReserved: (nil))
trace:asio:DllGetClassObject rclsid: {48d0c522-bfcc-45cc-8b84-17f25f33e6e8}, riid: {00000001-0000-0000-c000-000000000046}, ppv: 0x325adc)
trace:asio:CF_AddRef iface: 0x7cf60554, ref has been set to 2
trace:asio:CF_CreateInstance iface: 0x7cf60554, pOuter: (nil), riid: {48d0c522-bfcc-45cc-8b84-17f25f33e6e8}, ppobj: 0x3b6acc)
trace:asio:CF_CreateInstance Creating the WineASIO object
trace:asio:WineASIOCreateInstance riid: {48d0c522-bfcc-45cc-8b84-17f25f33e6e8}, ppobj: 0x3b6acc
trace:asio:WineASIOCreateInstance pobj = 0x1d88b0
trace:asio:WineASIOCreateInstance return 0x1d88b0
trace:asio:CF_Release iface 0x7cf60554, ref has been set to 1
trace:asio:Init iface: 0x1d88b0, sysRef: 0x90036
trace:asio:DllMain hInstDLL: 0x7cf50000, fdwReason: 2 lpvReserved: (nil))
trace:asio:DllMain hInstDLL: 0x7cf50000, fdwReason: 2 lpvReserved: (nil))
trace:asio:Init JACK client opened as: 'Reason'
trace:asio:Init 32 IOChannel structures allocated
trace:asio:Init 32 IOChannel structures initialized
trace:asio:Init WineASIO 0.9.0 initialized
trace:asio:GetDriverName iface: 0x1d88b0, name: 0x325be0
trace:asio:GetDriverVersion iface: 0x1d88b0
trace:asio:GetSampleRate iface: 0x1d88b0, Sample rate is 44100
trace:asio:CanSampleRate iface: 0x1d88b0, Samplerate = 44100, requested samplerate = 22050
trace:asio:CanSampleRate iface: 0x1d88b0, Samplerate = 44100, requested samplerate = 32000
trace:asio:CanSampleRate iface: 0x1d88b0, Samplerate = 44100, requested samplerate = 48000
trace:asio:CanSampleRate iface: 0x1d88b0, Samplerate = 44100, requested samplerate = 88200
trace:asio:CanSampleRate iface: 0x1d88b0, Samplerate = 44100, requested samplerate = 96000
trace:asio:CanSampleRate iface: 0x1d88b0, Samplerate = 44100, requested samplerate = 192000
trace:asio:GetSampleRate iface: 0x1d88b0, Sample rate is 44100
trace:asio:GetSampleRate iface: 0x1d88b0, Sample rate is 44100
trace:asio:GetSampleRate iface: 0x1d88b0, Sample rate is 44100
trace:asio:GetClockSources iface: 0x1d88b0, clocks: 0x324a24, numSources: 0x324a10
trace:asio:SetClockSource iface: 0x1d88b0, index: 0
trace:asio:GetChannels iface: 0x1d88b0, inputs: 16, outputs: 16
trace:asio:GetSampleRate iface: 0x1d88b0, Sample rate is 44100
trace:asio:CanSampleRate iface: 0x1d88b0, Samplerate = 44100, requested samplerate = 22050
trace:asio:CanSampleRate iface: 0x1d88b0, Samplerate = 44100, requested samplerate = 32000
trace:asio:CanSampleRate iface: 0x1d88b0, Samplerate = 44100, requested samplerate = 48000
trace:asio:CanSampleRate iface: 0x1d88b0, Samplerate = 44100, requested samplerate = 88200
trace:asio:CanSampleRate iface: 0x1d88b0, Samplerate = 44100, requested samplerate = 96000
trace:asio:CanSampleRate iface: 0x1d88b0, Samplerate = 44100, requested samplerate = 192000
trace:asio:GetSampleRate iface: 0x1d88b0, Sample rate is 44100
trace:asio:GetClockSources iface: 0x1d88b0, clocks: 0x324954, numSources: 0x324940
trace:asio:GetChannels iface: 0x1d88b0, inputs: 16, outputs: 16
trace:asio:GetBufferSize iface: 0x1d88b0, minSize: 0x325c14, maxSize: 0x325c10, preferredSize: 0x325c08, granularity: 0x325c0c
trace:asio:GetBufferSize Buffersize fixed at 1024
trace:asio:GetChannels iface: 0x1d88b0, inputs: 16, outputs: 16
trace:asio:CreateBuffers iface: 0x1d88b0, bufferInfo: 0x149d010, numChannels: 4, bufferSize: 1024, asioCallbacks: 0x1497a88
trace:asio:CreateBuffers Buffersize fixed at 1024
trace:asio:CreateBuffers The ASIO host supports ASIO v0
trace:asio:CreateBuffers 32 ASIO audio buffers allocated (256 kB)
trace:asio:CreateBuffers 4 audio channels initialized
trace:asio:GetLatencies iface: 0x1d88b0 Latency = 1024 frames
trace:asio:GetLatencies iface: 0x1d88b0 Latency = 1024 frames
trace:asio:Start iface: 0x1d88b0
trace:asio:Start Runnning simple BufferSwitch() callback
trace:asio:jack_thread_creator arg: 0x7e0c0ad8, thread_id: 0x7e0c0aec, attr: 0x325aec, function: 0x7cde04a0
trace:asio:DllMain hInstDLL: 0x7cf50000, fdwReason: 2 lpvReserved: (nil))
trace:asio:jack_thread_creator_helper arg: 0x7e0c0ad8
trace:asio:Start WineASIO successfully loaded
trace:asio:DllMain hInstDLL: 0x7cf50000, fdwReason: 2 lpvReserved: (nil))
trace:asio:GetSamplePosition iface: 0x1d88b0, sPos: 0x372e7e0, tStamp: 0x372e7e8
trace:asio:GetSamplePosition iface: 0x1d88b0, sPos: 0x372e7e0, tStamp: 0x372e7e8
trace:asio:GetSamplePosition iface: 0x1d88b0, sPos: 0x372e7e0, tStamp: 0x372e7e8
trace:asio:GetSamplePosition iface: 0x1d88b0, sPos: 0x372e7e0, tStamp: 0x372e7e8
.... repeated until stopped.

Here's a few details of my installation:
ii wine 1:1.6.2-0ubuntu4 amd64 Microsoft Windows Compatibility Layer (meta-package)
ii wine-gecko2.21:amd64 2.21-0ubuntu1 amd64 Microsoft Windows compatibility layer (embedded web browser)
ii wine-gecko2.21:i386 2.21-0ubuntu1 i386 Microsoft Windows compatibility layer (embedded web browser)
ii wine-gecko2.36:amd64 2.36-0kxstudio1 amd64 Microsoft Windows compatibility layer (embedded web browser)
ii wine-gecko2.36:i386 2.36-0kxstudio1 i386 Microsoft Windows compatibility layer (embedded web browser)
ii wine-mono0.0.8 0.0.8-0ubuntu1 all Microsoft Windows compatibility layer (.NET compatibility)
ii wine-mono4.5.6 4.5.6-0kxstudio1 all Microsoft Windows compatibility layer (.NET compatibility)
rc wine-rt 2:1.7.43-1~trusty1 i386 Microsoft Windows Compatibility Layer (Binary Emulator and Library)
rc wine-rt-amd64 2:1.7.43-1~trusty1 amd64 Microsoft Windows Compatibility Layer (64-bit support)
rc wine-rt-i386 2:1.7.43-1~trusty1 i386 Microsoft Windows Compatibility Layer (32-bit support)
ii wine1.6 1:1.6.2-0ubuntu4 amd64 Microsoft Windows Compatibility Layer (Binary Emulator and Library)
ii wine1.6-amd64 1:1.6.2-0ubuntu4 amd64 Microsoft Windows Compatibility Layer (64-bit support)
ii wine1.6-i386 1:1.6.2-0ubuntu4 i386 Microsoft Windows Compatibility Layer (32-bit support)
ii wineasio-amd64 0.9.0+git20110613-2kxstudio3 amd64 Wine ASIO driver for JACK (64bit)
ii wineasio-i386 0.9.0+git20110613-2kxstudio3 i386 Wine ASIO driver for JACK (32bit)
ii winetricks 0.0+20140302-0ubuntu2 all Microsoft Windows Compatibility Layer (winetricks)
martin@martin-ubuntu-studio:~$ dpkg --list |grep alsa
ii alsa-base 1.0.25+dfsg-0ubuntu4+kxstudio1~trusty all ALSA driver configuration files
ii alsa-firmware-loaders 1.0.27-2ubuntu3 amd64 ALSA software loaders for specific hardware
ii alsa-oss 1.0.25-1ubuntu1 amd64 ALSA wrapper for OSS applications
ii alsa-source 1.0.25+dfsg-0ubuntu4+kxstudio1~trusty all ALSA driver sources
ii alsa-tools 1.0.27-2ubuntu3 amd64 Console based ALSA utilities for specific hardware
ii alsa-tools-gui 1.0.27-2ubuntu3 amd64 GUI based ALSA utilities for specific hardware
ii alsa-utils 1.0.27.2-1ubuntu2 amd64 Utilities for configuring and using ALSA
ii alsamixergui 0.9.0rc2-1-9.1 amd64 graphical soundcard mixer for ALSA soundcard driver
ii bluez-alsa:amd64 4.101-0ubuntu13.1 amd64 Bluetooth ALSA support
ii gstreamer0.10-alsa:amd64 0.10.36-1.1ubuntu2 amd64 GStreamer plugin for ALSA
ii libsox-fmt-alsa:amd64 14.4.1-3ubuntu1 amd64 SoX alsa format I/O library
ii libzita-alsa-pcmi0:amd64 0.2.0-2 amd64 C++ wrapper around the ALSA API
ii zita-ajbridge 0.4.0-1 amd64 alsa to jack bridge
martin@martin-ubuntu-studio:~$ dpkg --list |grep jack
ii dssi-host-jack 1.1.1~dfsg0-1 amd64 Example of DSSI host
ii jack-capture 0.9.71-1 amd64 program for recording soundfiles with jack
ii jack-keyboard 1:2.7.1-1kxstudio1.1 amd64 Virtual MIDI keyboard for JACK MIDI
ii jack-rack 1.4.8~rc1-2 amd64 LADSPA effects "rack" for JACK
ii jackd 5 all JACK Audio Connection Kit (default server package)
ii jackd2 2:1.9.11~20150521-1~trusty2 amd64 JACK Audio Connection Kit (server and example clients)
ii jackd2-firewire 2:1.9.11~20150521-1~trusty2 amd64 JACK Audio Connection Kit (FFADO and FreeBoB backends)
ii libjack-jackd2-0:amd64 2:1.9.11~20150521-1~trusty2 amd64 JACK Audio Connection Kit (libraries)
ii libjack-jackd2-0:i386 2:1.9.11~20150521-1~trusty2 i386 JACK Audio Connection Kit (libraries)
ii libjack-jackd2-dev:amd64 2:1.9.11~20150521-1~trusty2 amd64 JACK Audio Connection Kit (development files)
ii pulseaudio-module-jack 1:4.0-0ubuntu11.1+kxstudio1 amd64 jackd modules for PulseAudio sound server
ii qjackctl 0.3.10-2 amd64 User interface for controlling the JACK sound server
ii slv2-jack 0.6.6+dfsg1-2 amd64 Jack support for LV2 plugins
ii zita-ajbridge 0.4.0-1 amd64 alsa to jack bridge
ii zita-lrx 0.1.0-2 amd64 Command line jack application providing crossover filters
ii zynjacku 6-4 amd64 JACK based host for LV2 synths and LV2 plugins


any help is greatly appreciated.

I'm a software developer albeit no experience with these audio apps but I'm happy to debug some code using gdb if someone can point me in the right direction.

Many Thanks, Martin.

i2productions
Established Member
Posts: 544
Joined: Sun May 22, 2011 6:14 pm
Location: New Hampshire, US

Re: Reason 3.0 + Wine + wineasio = No Sound

Post by i2productions »

I can tell you Reason 5 works perfectly for me. What I have done is use PlayOnLinux to create a specific wine version just for Reason. I use a 32 bit wine, because, well there's no reason for it to be 64 with Reason(and 64 bit wineasio has been reported to have more issues.) I used POL to install wineasio, though I still have to manually move wineasio into the appropriate folder(these steps I copied from somewhere on the net a few years ago to a notepad, don't have the reference though):

Copy wineasio.dll.so to either:
32-bit:
~/.PlayOnLinux/wine/linux-x86/name-of-wineversion-used/lib/wine/
64-bit:
~/.PlayOnLinux/wine/linux-amd64/name-of-wineversion-used/lib/wine/
AND
~/.PlayOnLinux/wine/linux-amd64/name-of-wineversion-used/lib64/wine/
Now, open a terminal, and type:
*NOTE: THIS IS ALL ONE COMMAND, NOT TWO*
WINEPREFIX=/path/to/your/wineprefix regsvr32 /path/to/wineasio/listed/above/wineasio.dll

Once everything is setup correctly, make sure in a JACK patchbay the output of the first 2 wineasio outputs is connected to your speakers. Another tip, if you want access to all the internal in's/out's of the reason patchbay, make sure you check your preferences in Reason. Only the first 2 ins and outs are enabled by default. But it's pretty awesome to be able to directly output every rack module and/or bring it back in! Hope this helps.

mtownsend
Established Member
Posts: 4
Joined: Wed Jun 10, 2015 7:41 pm

Re: Reason 3.0 + Wine + wineasio = No Sound

Post by mtownsend »

Thanks for the reply, out of interest what version of wine does your Reason 5 use? also what version of the wineasio driver?

I've tried using a 32bit wine prefix but Reason wouldn't even recognise the wineasio driver. I'll give PlayOnLinux a go to see how it sets up wine, maybe there is a clue there. I've got the source code so will have a dig around to see if the wineasio driver is at least getting the audio data.

glowrak guy
Established Member
Posts: 1502
Joined: Sat Jun 21, 2014 8:37 pm

Re: Reason 3.0 + Wine + wineasio = No Sound

Post by glowrak guy »

Since it's an old reason version, Is your winecfg set to XP?
Registering the wineasio .dll only needs to be done once, not in every command.
What happens with the simple command, wine path-to-reason .exe ?
A pure 32 bit wine, using wine 1.4 is good for older windows apps,
and it's winecfg lets you choose your midi system, between alsa and jackd.
Do you have a usb drive to do a separate simplified test install?
I would make, or get one, just for professional quality luck, anyway.
With wine focussed on office and games, sometimes a registry edit is needed, to choose alsa.
It's lucky to snoop through the registry, and see what's lurking, or available.

a simple test, for a working wineasio, install qjackctl gui,

run reaper 9 meg installer, install reaper in /home/martin/reaper

launch qjackctl, run command wine reaper/reaper.exe

use reaper menu options-prefs and in the panel list under audio-Device,
choose wineasio, and in MIDI Devices, your keys.

Further down the panel list, click Plugins, choose VST, and in its panel,
browse to your vst plugins folder, and then do a rescan.

It should just work.

Some nice reaper user posted a reaper-reason rewire template,
download at the bottom of his post at this link:

http://forum.cockos.com/showthread.php?t=94553

In general, your wine setup seems really complicated for just basic asio audio. (but your other needs may prevail)
I've never needed POL, winetricks, wine prefixes, (or the dreaded pulse-audio--> :lol: :twisted: :lol: )
or anything beyond the basic wine command.
You might consider testing the reason 8 demo, just for reference, if you have newer hardware,
lots of bugs squished between a 3 and an 8 :wink:

Reason is good, but combining linux audio instruments and effects, and adding favorite vsts,
provides a plethora of great alternatives.
Cheers

mtownsend
Established Member
Posts: 4
Joined: Wed Jun 10, 2015 7:41 pm

Re: Reason 3.0 + Wine + wineasio = No Sound

Post by mtownsend »

Hi Glowrak Guy,

Yep it is an old version, been a while since I had time to produce some music. I installed my NI FM7 synth using wine and the standalone version works a treat with my setup so at least I know it can work. So after hacking around with the wineasio driver and Reason 3 I've come to the conclusion that the Host -> ASIO driver interface is good but the ASIO driver -> Host interface doesn't work so good. Looking at my trace you can see that it reports that the Host is using ASIO v0.

"trace:asio:CreateBuffers The ASIO host supports ASIO v0"

So either Reason 3 doesn't implement the asioMessage callback or callbacks are broken or ASIO -> Host is broken. The ASIO documentation does mention something about some early Hosts not implementing asioMessage, maybe Reason 3 is one of them?? if anyone can confirm this that would be great. I personally think there is something more fundementally wrong. So I then checked the contents of the audio output buffers in process_callback and they are always completely empty, ie all zeroes, ie silence. As they are double buffers I checked both and still empty. So basically Reason 3 isn't filling the output buffers with data. I haven't quite worked out what trigger Reason is expecting to fill the buffers. Any ASIO experts out there I sure would like to pick your brains :)

Another thing that I noticed is that with Reason 3, I get loads of
trace:asio:GetSamplePosition iface: 0x1d88b0, sPos: 0x372e7e0, tStamp: 0x372e7e8
you can see one of these messages for every sample event. (I increase the buffer size and the rate they appear slows).

With FM7 I don't see this at all. Both are using the simple BufferSwitch() callback.

BTW With FM7 the Host reports V2 ASIO
"trace:asio:CreateBuffers The ASIO host supports kAsioEngineVersion
trace:asio:CreateBuffers The ASIO host supports ASIO v2
trace:asio:CreateBuffers The ASIO host supports kAsioResetRequest
trace:asio:CreateBuffers The ASIO host supports kAsioResyncRequest"


Anyway I'll keep plugging away as I'm determined to get this working unless the latest Reason works with wine then it might be worth upgrading :)

Martin.

glowrak guy
Established Member
Posts: 1502
Joined: Sat Jun 21, 2014 8:37 pm

Re: Reason 3.0 + Wine + wineasio = No Sound

Post by glowrak guy »

In the meantime, as an FM7 user, maybe you might like that 'blackwinny' went through all the worlds
hordes of dx7 sysex bank collections, weeded out all the duplicates, and made them available as a cartrige for dexed,
but the zip file can be expanded, and used with whatever can import such banks, fm7/8, linux dssi Hexter,
and dexed lv2/vst. 10 meg of unique sysex banks :shock:

http://hsjp.eu/downloads/Dexed/

A long dexed topic is here: http://www.kvraudio.com/forum/viewtopic ... &start=855
Cheers

mtownsend
Established Member
Posts: 4
Joined: Wed Jun 10, 2015 7:41 pm

Re: Reason 3.0 + Wine + wineasio = No Sound

Post by mtownsend »

Thanks for the dexed info.

Finally got Reason 3 working :) Noticed #ifdef of ASIOST32INT in several places in the code and thought, I wonder what would happen if I turned this on and hey presto Reason 3 started working. I just need to understand what this switch is doing and then see if I can maybe make this switch a runtime option.
For those that want to try it, hack the Makefile so it looks like, the part I've added is in bold.
CEXTRA = -m32 -g -O2 -DASIOST32INT -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith

Now onto my next issue, getting MIDI working.

i2productions
Established Member
Posts: 544
Joined: Sun May 22, 2011 6:14 pm
Location: New Hampshire, US

Re: Reason 3.0 + Wine + wineasio = No Sound

Post by i2productions »

Glad you finally got Reason 3 to work. For MIDI I've used the system "MIDI Through" in Reason to get stuff into and out of reason, and a JACK patchbay to connect everything

Post Reply