electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » ChucK programming language
ASIO miniAudicle
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [12 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
moudi



Joined: Oct 07, 2006
Posts: 63
Location: Bern Switzerland

PostPosted: Mon Nov 19, 2007 3:00 pm    Post subject: ASIO miniAudicle Reply with quote  Mark this post and the followings unread

hi all

i finally got it working to compile a valid miniAudicle with ASIO support. Very Happy
i have to admit, that i didn't make a lot of QA so far. only some basic smoke tests like running the application, start the vm, and produce a magic Sine osc sound for some seconds Wink

i already noticed some strange behaviour:
1) the miniAudicle process will remain when i close the application and i need to kill it every time with the task manager.
dunno if i remember me correctly, but i think this was mentioned some releases earlier as a solved bug?

2) when i chucked the SinOsc to the DAC, i got only on one channel sound (1st channel of my hammerfall multiface).
i tried it with dac.right/left and got surprisingly only on the .right a sound.
but probably this is a normal behaviour in multichannel mode and there's only the question on how to root something to a specific output??

3) the running time of the vm is not updated correctly. first time i thought the vm died, but then i noticed that just the seconds are not actualised on the gui. the minutes are correct.

however i really like to know if you'd like it and how it performs in your environment.
if someone's interested, i should be able to write a short "HowTo Build" tutorial.

jassas
/moudi


miniAudicle.zip
 Description:
1st debug asio miniAudicle

Download
 Filename:  miniAudicle.zip
 Filesize:  2.12 MB
 Downloaded:  225 Time(s)

Back to top
View user's profile Send private message Visit poster's website
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 22567
Location: The Netherlands, Enschede
Audio files: 220
G2 patch files: 319

PostPosted: Mon Nov 19, 2007 4:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

Cool Exclamation

I think it would be useful to have build directions for this as well!

_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
moudi



Joined: Oct 07, 2006
Posts: 63
Location: Bern Switzerland

PostPosted: Tue Nov 20, 2007 2:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

Blue Hell wrote:
I think it would be useful to have build directions for this as well!

yep, here we go... Cool


Code:
How to build an ASIO miniAudicle on Windows with Visual Studio 2005

Some of the mentioned steps and requirements came from other people in that thread:
http://electro-music.com/forum/topic-20796.html
i'm very thankful for all the hints and help i got in that thread.

Some of the terms i use here could be different on english machines because my installation is in german
and i'm trying to translate them to english synonyms. i hope haven't forgot anything...

1) First of all you need to download (and if needed install) the following sources/components.
   - miniAudicle Sources (take the ones for linux, since there are none for Win)
      http://audicle.cs.princeton.edu/mini/release/files/miniAudicle-0.1.3.8.tgz
   - wxWidgets (the wxMSW package) i took version 2.6.4, the one with the installer.
      i assume it should also be possible with the newer version, but i haven't tried it so far.
      http://prdownloads.sourceforge.net/wxwindows/wxMSW-2.6.4-Setup.exe
   - Windows Platform SDK
      http://msdn2.microsoft.com/en-us/vstudio/aa700755.aspx
   - DirectX SDK
      http://msdn2.microsoft.com/en-us/xna/aa937788.aspx
   - RTAudio
      http://www.music.mcgill.ca/~gary/rtaudio
   
2) Build the wxWidgets Libraries.
   Open the <wxWidgets>\build\msw\wx.dsw with the Visual Studio and convert all included projects to the actual version.
   Next you need to compile the needed projects. Use the Debug and/or Release configurations, the others aren't needed.
   Probably you won't need all of the projects but i just made all of them, and because there are dependencies among themselves,
   it would be the simplest to follow the order of compiling i've found:
   - wxtiff
   - wxjpeg
   - wxpng
   - wxzlib
   - wxregex
   - wxexpat
   - base
   - qa
   - odbc
   - net
   - media
   - html
   - gl
   - dbgrid
   - core
   - adv
   - xml
   - xrc
   Once you've compiled the basic libraries, you need to compile the stc library which is part of the contribution package.
   you can use the <wxWidgets>\contrib\build\stc\stc.dsw file to compile this library (also use the Debug and/or Release configurations).

3) Add the additional needed linker paths in your visual studio environment.
   I added them in the <Extras>Options->Projects and Solutions->VC++Directories>
   Please note that i don't mention the ones for the Platform- and DirectX SDK's. You should be able to find out them by reading the HowTo's
   provided in the links above.
   I've made the following entries for the include directories:
   - <wxWidgets>\include
   - <wxWidgets>\lib\vc_lib\mswd
   - <wxWidgets>\contrib\include
   The following entries for the Libraries directories:
   - <wxWidgets>\lib\vc_lib
   Dunno why, but the added entries by the wxWidgets installer weren't working. i think you can remove them.

4) Correct/remove the following typos:
   - ugen_xxx.cpp
      line 2590 change from: char * format = strrchr( filename, '.');
      to: char * format = (char *) strrchr( filename, '.');
   - rtaudio.cpp
      lines 4891 and 4914 change from: EM_poplog():
      to: EM_poplog();
      line 5137 and 5138 from: if ( mode == INPUT && stream_.mode == OUTPUT && stream_.bufferSize != *bufferSize )
      std::cerr << "Possible input/output buffersize discrepancy!" << std::endl;
      to: //if ( mode == INPUT && stream_.mode == OUTPUT && stream_.bufferSize != *bufferSize )
      //std::cerr << "Possible input/output buffersize discrepancy!" << std::endl;

5) Add the following part:
   #define _HAS_ITERATOR_DEBUGGING 0
   #define _SECURE_SCL 0
   in chuck_oo.cpp before #include "chuck_oo.h"

6) Copy the asio directory and its content of the RTAudio distribution to the chuck source directory of your miniAudicle environment.
   The directory structure should look like this <miniAudicle-0.1.3.8\chuck-1.2.1.1\src\asio
   Then add the following source files from this asio directory to the source files of your vs-project:
   - asio.h
   - asio.cpp
   - asiodrivers.h
   - asiodrivers.cpp
   - asiolist.h
   - asiolist.cpp
   - asiosys.h
         
7) Use the following preprocessor settings:
   _DEBUG
   WIN32
   _WINDOWS
   __WINDOWS_ASIO__
   __WINDOWS_DS__
   __PLATFORM_WIN32__
   _SCL_SECURE_NO_WARNINGS

8) If you're using a newer version of the wxWidgets you need to change the filenames of the following linker dependencies:
   - wxmsw26d_adv.lib
   - wxmsw26d_stc.lib
   - wxmsw26d_core.lib
   - wxbase26d.lib
   from *26d* to *28d* (depending on the version you are using).

9) Hit the compile button and pray :))


jassas
/moudi

Last edited by moudi on Sun Nov 25, 2007 2:47 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 22567
Location: The Netherlands, Enschede
Audio files: 220
G2 patch files: 319

PostPosted: Tue Nov 20, 2007 3:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

Great, quite a story again Very Happy

Too bad I've got no time to check it out now ...

_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Tue Nov 20, 2007 3:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

moudi wrote:

4) Correct/remove the following typos:


Did you email Ge about those?

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
moudi



Joined: Oct 07, 2006
Posts: 63
Location: Bern Switzerland

PostPosted: Wed Nov 21, 2007 12:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

Kassen wrote:
moudi wrote:

4) Correct/remove the following typos:


Did you email Ge about those?

not yet.
i thought i will send a mail to the dev-list when i had some more time to investigate in that strange behaviour with the channels.

jassas
/d
Back to top
View user's profile Send private message Visit poster's website
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Wed Nov 21, 2007 5:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

Sounds good.

At least one of those looks to me like a plain typo that should be fixed in the general source to benefit all.

Good work!

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ge



Joined: Aug 13, 2006
Posts: 105
Location: Palo Alto, CA

PostPosted: Thu Nov 22, 2007 4:02 pm    Post subject: Reply with quote  Mark this post and the followings unread

Kassen wrote:
Sounds good.

At least one of those looks to me like a plain typo that should be fixed in the general source to benefit all.

Good work!

The casting in ugen_xxx.cpp (now both are const char *) with typos in rtaudio.cpp are both fixed in CVS. Will be part of next source release!

Thanks!!
Back to top
View user's profile Send private message Visit poster's website
lamarcph



Joined: Oct 21, 2004
Posts: 40
Location: Montreal, Canada
G2 patch files: 4

PostPosted: Thu Nov 22, 2007 4:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hi,

I compiled it and I it works. The directions are very clear.


I tested with a few files and encountered no problems with the channels.

Moudi, there is probably something wrong with your files somewhere (Asio header? DirectX?), because I followed your directions and it worked on the first time.

I am having problem with the November version of DirectX. I had to revert to June's. Something with util_hui and DirectInput.

I attached my exe if anyone is interested.


miniAudicle.zip
 Description:
Asio miniAudicle.

Download
 Filename:  miniAudicle.zip
 Filesize:  1.12 MB
 Downloaded:  215 Time(s)

Back to top
View user's profile Send private message
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 22567
Location: The Netherlands, Enschede
Audio files: 220
G2 patch files: 319

PostPosted: Thu Nov 22, 2007 5:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

lamarcph wrote:
I tested with a few files and encountered no problems with the channels.


With a Hammerfall as well, or something different?

_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
lamarcph



Joined: Oct 21, 2004
Posts: 40
Location: Montreal, Canada
G2 patch files: 4

PostPosted: Fri Nov 23, 2007 7:44 am    Post subject: Reply with quote  Mark this post and the followings unread

Yes, that's true; I only tested it with the asio4all and the reaRoute asio router.

Also, I now realize that the when closed, the application won't terminate properly. That too, is a mystery.
Back to top
View user's profile Send private message
moudi



Joined: Oct 07, 2006
Posts: 63
Location: Bern Switzerland

PostPosted: Sun Nov 25, 2007 2:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

AARRGGHHH!!! Rolling Eyes
it was the absolute super embarrassing beginners fault Exclamation (30 centimeters in front of the screen Embarassed

of course it's not enough to only comment out the content of the if statement. it's also needed to comment out the if statement itself.
(rtaudio.cpp line 5138 AND 5137)

everything's working now as it should. (except the running time of the vm and the termination of the mini)

the world's pink again Laughing
/moudi
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [12 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » ChucK programming language
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use